You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DX-1211: declare delete() on the RestAnnotations interface
delete() has existed in the RestAnnotations implementation since
04fed9c (which declared it only on RealtimeAnnotations), so the method
works at runtime but TypeScript users cannot call it. Verified live
that the server accepts REST-published deletes.
Co-Authored-By: Claude Fable 5 (1M context) <noreply@anthropic.com>
* Publish an annotation removal request for a message, to remove it from the summary
2732
-
* summaries. The semantics of the delete (and what fields are required) are different
2733
-
* for each annotation type; see annotation types documentation for more details.
2731
+
* Publish an annotation removal request for a message, to remove it from the message's annotation summary. The semantics of the delete (and what fields are required) are different for each annotation type; see annotation types documentation for more details. This is a {@link RestAnnotations.publish | `publish()`} with the `action` set to `annotation.delete`, and it mutates the passed annotation object to carry that action, overwriting any `action` you set. Message annotations must be enabled for the channel's namespace by a channel rule and the key or token must have the `annotation-publish` capability; without these the server rejects the operation and the call rejects with an {@link ErrorInfo}. Rejects with a hinted {@link ErrorInfo} unless the first argument is a message serial string or a {@link Message} carrying a `serial`, such as one received from a subscription or history; newly constructed `Message` objects have no serial.
2734
2732
*
2735
2733
* @param message - The message which has an annotation that you want to delete.
2736
2734
* @param annotation - The annotation deletion request. (Must include at least the
2737
2735
* `type`, other required fields depend on the type).
2736
+
* @returns A promise which resolves upon success of the operation and rejects with an {@link ErrorInfo} object upon its failure.
* Publish an annotation removal request for a message, to remove it from the summary
2742
-
* summaries. The semantics of the delete (and what fields are required) are different
2743
-
* for each annotation type; see annotation types documentation for more details.
2744
+
* Publish an annotation removal request for a message, to remove it from the message's annotation summary (alternative form where you only have the serial of the message, not a complete Message object). The semantics of the delete (and what fields are required) are different for each annotation type; see annotation types documentation for more details. This is a {@link RestAnnotations.publish | `publish()`} with the `action` set to `annotation.delete`, and it mutates the passed annotation object to carry that action, overwriting any `action` you set. Message annotations must be enabled for the channel's namespace by a channel rule and the key or token must have the `annotation-publish` capability; without these the server rejects the operation and the call rejects with an {@link ErrorInfo}. Rejects with a hinted {@link ErrorInfo} unless the first argument is a message serial string or a {@link Message} carrying a `serial`, such as one received from a subscription or history; newly constructed `Message` objects have no serial.
2744
2745
*
2745
2746
* @param messageSerial - The serial field of the message which has an annotation that
2746
2747
* you want to delete.
2747
2748
* @param annotation - The annotation deletion request. (Must include at least the
2748
2749
* `type`, other required fields depend on the type).
2750
+
* @returns A promise which resolves upon success of the operation and rejects with an {@link ErrorInfo} object upon its failure.
0 commit comments