diff --git a/src/feed.ts b/src/feed.ts index f2f7ed13..5ab3770d 100644 --- a/src/feed.ts +++ b/src/feed.ts @@ -198,6 +198,22 @@ export type GetActivitiesAPIResponse[] | FlatActivityEnriched[]; }; +export type ToTargetUpdate = { + foreignId: string; + time: string; + addedTargets?: string[]; + newTargets?: string[]; + removedTargets?: string[]; +}; + +type ToTargetUpdateInternal = { + foreign_id: string; + time: string; + added_targets?: string[]; + new_targets?: string[]; + removed_targets?: string[]; +}; + /** * Manage api calls for specific feeds * The feed object contains convenience functions such add activity, remove activity etc @@ -551,16 +567,7 @@ export class StreamFeed & { added?: string[]; removed?: string[] }>({ url: `feed_targets/${this.feedUrl}/activity_to_targets/`, token: this.token, - body, + body: body.length > 1 ? body : body[0], }); } }