Skip to content

RemoveActivity

type RemoveActivity = {
(activityId, opts?): Promise<void>;
(ref, opts?): Promise<RemovedActivities>;
};

Call-signature type for feed().removeActivity, kept as a named local type (rather than overload signatures on a function declaration) so the two forms keep their JSDoc in the emitted .d.ts — tsup’s dts step strips comments from inner-function overload declarations, but preserves them here.

(activityId, opts?): Promise<void>;

Soft-deletes one activity by dropin’s id. A server token may remove it from ANY feed — the origin-feed authority check applies to user tokens only — which is what makes this usable for moderation and for cleaning up content deleted in your own app.

Parameter Type
activityId string
opts? RequestOptions

Promise<void>

(ref, opts?): Promise<RemovedActivities>;

Removes every live activity that lives in THIS feed with this foreign_id — with time, only that exact instant (pass activity.time from the add response). Resolves { removed: [] } when nothing matched, so a retry or a redelivered event is safe. The (foreign_id, time) identity stays burned: re-posting it is a 409 CONFLICT.

Parameter Type
ref ForeignIdRef
opts? RequestOptions

Promise<RemovedActivities>