@stream-io/node-sdk 0.9.4 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/index.cjs.js +87 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +87 -1
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/feeds/FeedsApi.d.ts +16 -1
- package/dist/src/gen/models/index.d.ts +366 -0
- package/package.json +1 -1
- package/src/gen/feeds/FeedsApi.ts +192 -0
- package/src/gen/models/index.ts +396 -0
|
@@ -59,6 +59,7 @@ import {
|
|
|
59
59
|
DeleteFeedsBatchResponse,
|
|
60
60
|
DeleteFeedsRetentionPolicyRequest,
|
|
61
61
|
DeleteFeedsRetentionPolicyResponse,
|
|
62
|
+
DeleteScheduledActivityResponse,
|
|
62
63
|
DeleteUserInterestsResponse,
|
|
63
64
|
ExportFeedUserDataResponse,
|
|
64
65
|
ExportFeedsAppRequest,
|
|
@@ -91,6 +92,7 @@ import {
|
|
|
91
92
|
GetOrCreateFollowResponse,
|
|
92
93
|
GetOrCreateUnfollowRequest,
|
|
93
94
|
GetOrCreateUnfollowResponse,
|
|
95
|
+
GetScheduledActivityResponse,
|
|
94
96
|
GetUserInterestsResponse,
|
|
95
97
|
ListFeedGroupsResponse,
|
|
96
98
|
ListFeedViewsResponse,
|
|
@@ -101,6 +103,7 @@ import {
|
|
|
101
103
|
PinActivityRequest,
|
|
102
104
|
PinActivityResponse,
|
|
103
105
|
PollVoteResponse,
|
|
106
|
+
PublishScheduledActivityNowResponse,
|
|
104
107
|
QueryActivitiesRequest,
|
|
105
108
|
QueryActivitiesResponse,
|
|
106
109
|
QueryActivityReactionsRequest,
|
|
@@ -118,6 +121,8 @@ import {
|
|
|
118
121
|
QueryCommentsResponse,
|
|
119
122
|
QueryFeedMembersRequest,
|
|
120
123
|
QueryFeedMembersResponse,
|
|
124
|
+
QueryFeedsReactionsRequest,
|
|
125
|
+
QueryFeedsReactionsResponse,
|
|
121
126
|
QueryFeedsRequest,
|
|
122
127
|
QueryFeedsResponse,
|
|
123
128
|
QueryFeedsUsageStatsRequest,
|
|
@@ -130,6 +135,8 @@ import {
|
|
|
130
135
|
QueryPinnedActivitiesResponse,
|
|
131
136
|
QueryRevisionHistoryRequest,
|
|
132
137
|
QueryRevisionHistoryResponse,
|
|
138
|
+
QueryScheduledActivitiesRequest,
|
|
139
|
+
QueryScheduledActivitiesResponse,
|
|
133
140
|
ReadCollectionsResponse,
|
|
134
141
|
RejectFeedMemberInviteRequest,
|
|
135
142
|
RejectFeedMemberInviteResponse,
|
|
@@ -141,6 +148,8 @@ import {
|
|
|
141
148
|
RestoreCommentRequest,
|
|
142
149
|
RestoreCommentResponse,
|
|
143
150
|
RestoreFeedGroupResponse,
|
|
151
|
+
ScheduleActivityRequest,
|
|
152
|
+
ScheduleActivityResponse,
|
|
144
153
|
SetFeedsRetentionPolicyRequest,
|
|
145
154
|
SetFeedsRetentionPolicyResponse,
|
|
146
155
|
SingleFollowResponse,
|
|
@@ -186,6 +195,8 @@ import {
|
|
|
186
195
|
UpdateFollowResponse,
|
|
187
196
|
UpdateMembershipLevelRequest,
|
|
188
197
|
UpdateMembershipLevelResponse,
|
|
198
|
+
UpdateScheduledActivityRequest,
|
|
199
|
+
UpdateScheduledActivityResponse,
|
|
189
200
|
UpsertActivitiesRequest,
|
|
190
201
|
UpsertActivitiesResponse,
|
|
191
202
|
UpsertCollectionsRequest,
|
|
@@ -3055,6 +3066,33 @@ export class FeedsApi {
|
|
|
3055
3066
|
return response;
|
|
3056
3067
|
}
|
|
3057
3068
|
|
|
3069
|
+
async queryFeedsReactions(
|
|
3070
|
+
request: QueryFeedsReactionsRequest,
|
|
3071
|
+
): Promise<StreamResponse<QueryFeedsReactionsResponse>> {
|
|
3072
|
+
const body = {
|
|
3073
|
+
object_type: request?.object_type,
|
|
3074
|
+
user_id: request?.user_id,
|
|
3075
|
+
limit: request?.limit,
|
|
3076
|
+
next: request?.next,
|
|
3077
|
+
prev: request?.prev,
|
|
3078
|
+
sort: request?.sort,
|
|
3079
|
+
filter: request?.filter,
|
|
3080
|
+
};
|
|
3081
|
+
|
|
3082
|
+
const response =
|
|
3083
|
+
await this.apiClient.sendRequest<QueryFeedsReactionsResponse>(
|
|
3084
|
+
'POST',
|
|
3085
|
+
'/api/v2/feeds/reactions/query',
|
|
3086
|
+
undefined,
|
|
3087
|
+
undefined,
|
|
3088
|
+
body,
|
|
3089
|
+
);
|
|
3090
|
+
|
|
3091
|
+
decoders['QueryFeedsReactionsResponse']?.(response);
|
|
3092
|
+
|
|
3093
|
+
return response;
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3058
3096
|
async feedsGetRetentionPolicy(): Promise<
|
|
3059
3097
|
StreamResponse<GetFeedsRetentionPolicyResponse>
|
|
3060
3098
|
> {
|
|
@@ -3166,6 +3204,160 @@ export class FeedsApi {
|
|
|
3166
3204
|
return response;
|
|
3167
3205
|
}
|
|
3168
3206
|
|
|
3207
|
+
async scheduleActivity(
|
|
3208
|
+
request: ScheduleActivityRequest,
|
|
3209
|
+
): Promise<StreamResponse<ScheduleActivityResponse>> {
|
|
3210
|
+
const body = {
|
|
3211
|
+
type: request?.type,
|
|
3212
|
+
feeds: request?.feeds,
|
|
3213
|
+
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
3214
|
+
create_notification_activity: request?.create_notification_activity,
|
|
3215
|
+
create_users: request?.create_users,
|
|
3216
|
+
expires_at: request?.expires_at,
|
|
3217
|
+
force_moderation: request?.force_moderation,
|
|
3218
|
+
id: request?.id,
|
|
3219
|
+
parent_id: request?.parent_id,
|
|
3220
|
+
poll_id: request?.poll_id,
|
|
3221
|
+
restrict_replies: request?.restrict_replies,
|
|
3222
|
+
scheduled_at: request?.scheduled_at,
|
|
3223
|
+
skip_enrich_url: request?.skip_enrich_url,
|
|
3224
|
+
skip_push: request?.skip_push,
|
|
3225
|
+
text: request?.text,
|
|
3226
|
+
user_id: request?.user_id,
|
|
3227
|
+
visibility: request?.visibility,
|
|
3228
|
+
visibility_tag: request?.visibility_tag,
|
|
3229
|
+
attachments: request?.attachments,
|
|
3230
|
+
collection_refs: request?.collection_refs,
|
|
3231
|
+
collections: request?.collections,
|
|
3232
|
+
filter_tags: request?.filter_tags,
|
|
3233
|
+
interest_tags: request?.interest_tags,
|
|
3234
|
+
mentioned_user_ids: request?.mentioned_user_ids,
|
|
3235
|
+
custom: request?.custom,
|
|
3236
|
+
location: request?.location,
|
|
3237
|
+
search_data: request?.search_data,
|
|
3238
|
+
};
|
|
3239
|
+
|
|
3240
|
+
const response = await this.apiClient.sendRequest<ScheduleActivityResponse>(
|
|
3241
|
+
'POST',
|
|
3242
|
+
'/api/v2/feeds/scheduled_activities',
|
|
3243
|
+
undefined,
|
|
3244
|
+
undefined,
|
|
3245
|
+
body,
|
|
3246
|
+
);
|
|
3247
|
+
|
|
3248
|
+
decoders['ScheduleActivityResponse']?.(response);
|
|
3249
|
+
|
|
3250
|
+
return response;
|
|
3251
|
+
}
|
|
3252
|
+
|
|
3253
|
+
async queryScheduledActivities(
|
|
3254
|
+
request?: QueryScheduledActivitiesRequest,
|
|
3255
|
+
): Promise<StreamResponse<QueryScheduledActivitiesResponse>> {
|
|
3256
|
+
const body = {
|
|
3257
|
+
limit: request?.limit,
|
|
3258
|
+
next: request?.next,
|
|
3259
|
+
filter: request?.filter,
|
|
3260
|
+
};
|
|
3261
|
+
|
|
3262
|
+
const response =
|
|
3263
|
+
await this.apiClient.sendRequest<QueryScheduledActivitiesResponse>(
|
|
3264
|
+
'POST',
|
|
3265
|
+
'/api/v2/feeds/scheduled_activities/query',
|
|
3266
|
+
undefined,
|
|
3267
|
+
undefined,
|
|
3268
|
+
body,
|
|
3269
|
+
);
|
|
3270
|
+
|
|
3271
|
+
decoders['QueryScheduledActivitiesResponse']?.(response);
|
|
3272
|
+
|
|
3273
|
+
return response;
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3276
|
+
async deleteScheduledActivity(request: {
|
|
3277
|
+
id: string;
|
|
3278
|
+
}): Promise<StreamResponse<DeleteScheduledActivityResponse>> {
|
|
3279
|
+
const pathParams = {
|
|
3280
|
+
id: request?.id,
|
|
3281
|
+
};
|
|
3282
|
+
|
|
3283
|
+
const response =
|
|
3284
|
+
await this.apiClient.sendRequest<DeleteScheduledActivityResponse>(
|
|
3285
|
+
'DELETE',
|
|
3286
|
+
'/api/v2/feeds/scheduled_activities/{id}',
|
|
3287
|
+
pathParams,
|
|
3288
|
+
undefined,
|
|
3289
|
+
);
|
|
3290
|
+
|
|
3291
|
+
decoders['DeleteScheduledActivityResponse']?.(response);
|
|
3292
|
+
|
|
3293
|
+
return response;
|
|
3294
|
+
}
|
|
3295
|
+
|
|
3296
|
+
async getScheduledActivity(request: {
|
|
3297
|
+
id: string;
|
|
3298
|
+
}): Promise<StreamResponse<GetScheduledActivityResponse>> {
|
|
3299
|
+
const pathParams = {
|
|
3300
|
+
id: request?.id,
|
|
3301
|
+
};
|
|
3302
|
+
|
|
3303
|
+
const response =
|
|
3304
|
+
await this.apiClient.sendRequest<GetScheduledActivityResponse>(
|
|
3305
|
+
'GET',
|
|
3306
|
+
'/api/v2/feeds/scheduled_activities/{id}',
|
|
3307
|
+
pathParams,
|
|
3308
|
+
undefined,
|
|
3309
|
+
);
|
|
3310
|
+
|
|
3311
|
+
decoders['GetScheduledActivityResponse']?.(response);
|
|
3312
|
+
|
|
3313
|
+
return response;
|
|
3314
|
+
}
|
|
3315
|
+
|
|
3316
|
+
async updateScheduledActivity(
|
|
3317
|
+
request: UpdateScheduledActivityRequest & { id: string },
|
|
3318
|
+
): Promise<StreamResponse<UpdateScheduledActivityResponse>> {
|
|
3319
|
+
const pathParams = {
|
|
3320
|
+
id: request?.id,
|
|
3321
|
+
};
|
|
3322
|
+
const body = {
|
|
3323
|
+
scheduled_at: request?.scheduled_at,
|
|
3324
|
+
activity: request?.activity,
|
|
3325
|
+
};
|
|
3326
|
+
|
|
3327
|
+
const response =
|
|
3328
|
+
await this.apiClient.sendRequest<UpdateScheduledActivityResponse>(
|
|
3329
|
+
'PATCH',
|
|
3330
|
+
'/api/v2/feeds/scheduled_activities/{id}',
|
|
3331
|
+
pathParams,
|
|
3332
|
+
undefined,
|
|
3333
|
+
body,
|
|
3334
|
+
);
|
|
3335
|
+
|
|
3336
|
+
decoders['UpdateScheduledActivityResponse']?.(response);
|
|
3337
|
+
|
|
3338
|
+
return response;
|
|
3339
|
+
}
|
|
3340
|
+
|
|
3341
|
+
async publishScheduledActivityNow(request: {
|
|
3342
|
+
id: string;
|
|
3343
|
+
}): Promise<StreamResponse<PublishScheduledActivityNowResponse>> {
|
|
3344
|
+
const pathParams = {
|
|
3345
|
+
id: request?.id,
|
|
3346
|
+
};
|
|
3347
|
+
|
|
3348
|
+
const response =
|
|
3349
|
+
await this.apiClient.sendRequest<PublishScheduledActivityNowResponse>(
|
|
3350
|
+
'POST',
|
|
3351
|
+
'/api/v2/feeds/scheduled_activities/{id}/publish_now',
|
|
3352
|
+
pathParams,
|
|
3353
|
+
undefined,
|
|
3354
|
+
);
|
|
3355
|
+
|
|
3356
|
+
decoders['PublishScheduledActivityNowResponse']?.(response);
|
|
3357
|
+
|
|
3358
|
+
return response;
|
|
3359
|
+
}
|
|
3360
|
+
|
|
3169
3361
|
async queryFeedsUsageStats(
|
|
3170
3362
|
request?: QueryFeedsUsageStatsRequest,
|
|
3171
3363
|
): Promise<StreamResponse<QueryFeedsUsageStatsResponse>> {
|
package/src/gen/models/index.ts
CHANGED
|
@@ -9198,6 +9198,10 @@ export interface DeleteSIPTrunkResponse {
|
|
|
9198
9198
|
duration: string;
|
|
9199
9199
|
}
|
|
9200
9200
|
|
|
9201
|
+
export interface DeleteScheduledActivityResponse {
|
|
9202
|
+
duration: string;
|
|
9203
|
+
}
|
|
9204
|
+
|
|
9201
9205
|
export interface DeleteScheduledMessageResponse {
|
|
9202
9206
|
/**
|
|
9203
9207
|
* Duration of the request in milliseconds
|
|
@@ -12629,6 +12633,14 @@ export interface GetReviewQueueItemResponse {
|
|
|
12629
12633
|
item?: ReviewQueueItemResponse;
|
|
12630
12634
|
}
|
|
12631
12635
|
|
|
12636
|
+
export interface GetScheduledActivityResponse {
|
|
12637
|
+
duration: string;
|
|
12638
|
+
/**
|
|
12639
|
+
* An activity scheduled to be published at a future time
|
|
12640
|
+
*/
|
|
12641
|
+
scheduled_activity: ScheduledActivityResponse;
|
|
12642
|
+
}
|
|
12643
|
+
|
|
12632
12644
|
export interface GetSegmentResponse {
|
|
12633
12645
|
/**
|
|
12634
12646
|
* Duration of the request in milliseconds
|
|
@@ -17365,6 +17377,14 @@ export interface PublishConfigVersionResponse {
|
|
|
17365
17377
|
config?: ConfigResponse;
|
|
17366
17378
|
}
|
|
17367
17379
|
|
|
17380
|
+
export interface PublishScheduledActivityNowResponse {
|
|
17381
|
+
duration: string;
|
|
17382
|
+
/**
|
|
17383
|
+
* An activity scheduled to be published at a future time
|
|
17384
|
+
*/
|
|
17385
|
+
scheduled_activity: ScheduledActivityResponse;
|
|
17386
|
+
}
|
|
17387
|
+
|
|
17368
17388
|
export interface PublishedTrackFlags {
|
|
17369
17389
|
audio: boolean;
|
|
17370
17390
|
screenshare: boolean;
|
|
@@ -18544,6 +18564,38 @@ export interface QueryFeedModerationTemplatesResponse {
|
|
|
18544
18564
|
templates: Array<QueryFeedModerationTemplate>;
|
|
18545
18565
|
}
|
|
18546
18566
|
|
|
18567
|
+
export interface QueryFeedsReactionsRequest {
|
|
18568
|
+
/**
|
|
18569
|
+
* Which reactions to list: activity reactions or comment reactions
|
|
18570
|
+
*/
|
|
18571
|
+
object_type: 'activity' | 'comment';
|
|
18572
|
+
/**
|
|
18573
|
+
* The user whose reactions to list
|
|
18574
|
+
*/
|
|
18575
|
+
user_id: string;
|
|
18576
|
+
limit?: number;
|
|
18577
|
+
next?: string;
|
|
18578
|
+
prev?: string;
|
|
18579
|
+
/**
|
|
18580
|
+
* Sort by created_at only (a single field); defaults to created_at descending
|
|
18581
|
+
*/
|
|
18582
|
+
sort?: Array<SortParamRequest>;
|
|
18583
|
+
/**
|
|
18584
|
+
* Optional filter; only reaction_type and created_at are accepted
|
|
18585
|
+
*/
|
|
18586
|
+
filter?: Record<string, any>;
|
|
18587
|
+
}
|
|
18588
|
+
|
|
18589
|
+
export interface QueryFeedsReactionsResponse {
|
|
18590
|
+
/**
|
|
18591
|
+
* Duration of the request in milliseconds
|
|
18592
|
+
*/
|
|
18593
|
+
duration: string;
|
|
18594
|
+
reactions: Array<FeedsReactionResponse>;
|
|
18595
|
+
next?: string;
|
|
18596
|
+
prev?: string;
|
|
18597
|
+
}
|
|
18598
|
+
|
|
18547
18599
|
export interface QueryFeedsRequest {
|
|
18548
18600
|
enrich_own_fields?: boolean;
|
|
18549
18601
|
limit?: number;
|
|
@@ -19252,6 +19304,45 @@ export interface QueryRevisionHistoryResponse {
|
|
|
19252
19304
|
prev?: string;
|
|
19253
19305
|
}
|
|
19254
19306
|
|
|
19307
|
+
export interface QueryScheduledActivitiesFilter {
|
|
19308
|
+
/**
|
|
19309
|
+
* Only activities scheduled for this feed
|
|
19310
|
+
*/
|
|
19311
|
+
fid?: string;
|
|
19312
|
+
/**
|
|
19313
|
+
* Only activities of this user. Server-side only; client-side requests always see their own.
|
|
19314
|
+
*/
|
|
19315
|
+
user_id?: string;
|
|
19316
|
+
/**
|
|
19317
|
+
* Only activities with one of these statuses: scheduled, publishing, failed
|
|
19318
|
+
*/
|
|
19319
|
+
status?: Array<ScheduledActivityQueryStatus>;
|
|
19320
|
+
}
|
|
19321
|
+
|
|
19322
|
+
export interface QueryScheduledActivitiesRequest {
|
|
19323
|
+
/**
|
|
19324
|
+
* Maximum number of scheduled activities to return. Default 25, maximum 100.
|
|
19325
|
+
*/
|
|
19326
|
+
limit?: number;
|
|
19327
|
+
/**
|
|
19328
|
+
* Cursor from a previous response to fetch the next page
|
|
19329
|
+
*/
|
|
19330
|
+
next?: string;
|
|
19331
|
+
filter?: QueryScheduledActivitiesFilter;
|
|
19332
|
+
}
|
|
19333
|
+
|
|
19334
|
+
export interface QueryScheduledActivitiesResponse {
|
|
19335
|
+
duration: string;
|
|
19336
|
+
/**
|
|
19337
|
+
* The scheduled activities, ordered by scheduled_at
|
|
19338
|
+
*/
|
|
19339
|
+
scheduled_activities: Array<ScheduledActivityResponse>;
|
|
19340
|
+
/**
|
|
19341
|
+
* Cursor for the next page, absent on the last page
|
|
19342
|
+
*/
|
|
19343
|
+
next?: string;
|
|
19344
|
+
}
|
|
19345
|
+
|
|
19255
19346
|
export interface QueryScheduledMessagesRequest {
|
|
19256
19347
|
/**
|
|
19257
19348
|
* Page size, 1 to 100. Defaults to 20
|
|
@@ -21401,6 +21492,291 @@ export interface SaveConfigVersionResponse {
|
|
|
21401
21492
|
published_version?: number;
|
|
21402
21493
|
}
|
|
21403
21494
|
|
|
21495
|
+
export interface ScheduleActivityRequest {
|
|
21496
|
+
/**
|
|
21497
|
+
* Type of activity
|
|
21498
|
+
*/
|
|
21499
|
+
type: string;
|
|
21500
|
+
/**
|
|
21501
|
+
* List of feeds to add the activity to with a default max limit of 25 feeds
|
|
21502
|
+
*/
|
|
21503
|
+
feeds: Array<string>;
|
|
21504
|
+
/**
|
|
21505
|
+
* @deprecated
|
|
21506
|
+
* Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
|
|
21507
|
+
*/
|
|
21508
|
+
copy_custom_to_notification?: boolean;
|
|
21509
|
+
/**
|
|
21510
|
+
* Whether to create notification activities for mentioned users
|
|
21511
|
+
*/
|
|
21512
|
+
create_notification_activity?: boolean;
|
|
21513
|
+
/**
|
|
21514
|
+
* If true, creates the user referenced by user_id when it does not exist. Server-side only.
|
|
21515
|
+
*/
|
|
21516
|
+
create_users?: boolean;
|
|
21517
|
+
/**
|
|
21518
|
+
* Expiration time for the activity
|
|
21519
|
+
*/
|
|
21520
|
+
expires_at?: string;
|
|
21521
|
+
/**
|
|
21522
|
+
* If true, forces moderation to run at publish for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
|
|
21523
|
+
*/
|
|
21524
|
+
force_moderation?: boolean;
|
|
21525
|
+
/**
|
|
21526
|
+
* Optional ID for the activity
|
|
21527
|
+
*/
|
|
21528
|
+
id?: string;
|
|
21529
|
+
/**
|
|
21530
|
+
* ID of parent activity for replies/comments
|
|
21531
|
+
*/
|
|
21532
|
+
parent_id?: string;
|
|
21533
|
+
/**
|
|
21534
|
+
* ID of a poll to attach to activity
|
|
21535
|
+
*/
|
|
21536
|
+
poll_id?: string;
|
|
21537
|
+
/**
|
|
21538
|
+
* Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody
|
|
21539
|
+
*/
|
|
21540
|
+
restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody';
|
|
21541
|
+
/**
|
|
21542
|
+
* When to publish the activity, an RFC 3339 time. A time less than a minute ahead or in the past is moved to one minute from now, and the time is rounded up to a whole minute.
|
|
21543
|
+
*/
|
|
21544
|
+
scheduled_at?: Date;
|
|
21545
|
+
/**
|
|
21546
|
+
* Whether to skip URL enrichment for the activity
|
|
21547
|
+
*/
|
|
21548
|
+
skip_enrich_url?: boolean;
|
|
21549
|
+
/**
|
|
21550
|
+
* Whether to skip push notifications
|
|
21551
|
+
*/
|
|
21552
|
+
skip_push?: boolean;
|
|
21553
|
+
/**
|
|
21554
|
+
* Text content of the activity
|
|
21555
|
+
*/
|
|
21556
|
+
text?: string;
|
|
21557
|
+
/**
|
|
21558
|
+
* ID of the user creating the activity
|
|
21559
|
+
*/
|
|
21560
|
+
user_id?: string;
|
|
21561
|
+
/**
|
|
21562
|
+
* Visibility setting for the activity. One of: public, private, tag
|
|
21563
|
+
*/
|
|
21564
|
+
visibility?: 'public' | 'private' | 'tag';
|
|
21565
|
+
/**
|
|
21566
|
+
* If visibility is 'tag', this is the tag name and is required
|
|
21567
|
+
*/
|
|
21568
|
+
visibility_tag?: string;
|
|
21569
|
+
/**
|
|
21570
|
+
* List of attachments for the activity
|
|
21571
|
+
*/
|
|
21572
|
+
attachments?: Array<Attachment>;
|
|
21573
|
+
/**
|
|
21574
|
+
* Collections that this activity references
|
|
21575
|
+
*/
|
|
21576
|
+
collection_refs?: Array<string>;
|
|
21577
|
+
/**
|
|
21578
|
+
* Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions.
|
|
21579
|
+
*/
|
|
21580
|
+
collections?: Array<CollectionRequest>;
|
|
21581
|
+
/**
|
|
21582
|
+
* Tags for filtering activities
|
|
21583
|
+
*/
|
|
21584
|
+
filter_tags?: Array<string>;
|
|
21585
|
+
/**
|
|
21586
|
+
* Tags for indicating user interests
|
|
21587
|
+
*/
|
|
21588
|
+
interest_tags?: Array<string>;
|
|
21589
|
+
/**
|
|
21590
|
+
* List of users mentioned in the activity
|
|
21591
|
+
*/
|
|
21592
|
+
mentioned_user_ids?: Array<string>;
|
|
21593
|
+
/**
|
|
21594
|
+
* Custom data for the activity
|
|
21595
|
+
*/
|
|
21596
|
+
custom?: Record<string, any>;
|
|
21597
|
+
location?: Location;
|
|
21598
|
+
/**
|
|
21599
|
+
* Additional data for search indexing
|
|
21600
|
+
*/
|
|
21601
|
+
search_data?: Record<string, any>;
|
|
21602
|
+
}
|
|
21603
|
+
|
|
21604
|
+
export interface ScheduleActivityResponse {
|
|
21605
|
+
duration: string;
|
|
21606
|
+
/**
|
|
21607
|
+
* An activity scheduled to be published at a future time
|
|
21608
|
+
*/
|
|
21609
|
+
scheduled_activity: ScheduledActivityResponse;
|
|
21610
|
+
}
|
|
21611
|
+
|
|
21612
|
+
export interface ScheduledActivityFailedEvent {
|
|
21613
|
+
/**
|
|
21614
|
+
* Date/time of creation
|
|
21615
|
+
*/
|
|
21616
|
+
created_at: TimestampNS;
|
|
21617
|
+
/**
|
|
21618
|
+
* Why the activity failed to publish
|
|
21619
|
+
*/
|
|
21620
|
+
failure_reason: ScheduledActivityFailureReason;
|
|
21621
|
+
custom: Record<string, any>;
|
|
21622
|
+
/**
|
|
21623
|
+
* An activity scheduled to be published at a future time
|
|
21624
|
+
*/
|
|
21625
|
+
scheduled_activity: ScheduledActivityResponse;
|
|
21626
|
+
/**
|
|
21627
|
+
* The type of event: "feeds.scheduled_activity.failed" in this case
|
|
21628
|
+
*/
|
|
21629
|
+
type: string;
|
|
21630
|
+
received_at?: TimestampNS;
|
|
21631
|
+
user?: UserResponseCommonFields;
|
|
21632
|
+
}
|
|
21633
|
+
|
|
21634
|
+
export type ScheduledActivityFailureReason =
|
|
21635
|
+
| 'banned'
|
|
21636
|
+
| 'no_permission'
|
|
21637
|
+
| 'feed_deleted'
|
|
21638
|
+
| 'user_deleted'
|
|
21639
|
+
| 'moderation_blocked'
|
|
21640
|
+
| 'id_conflict'
|
|
21641
|
+
| 'expired'
|
|
21642
|
+
| 'invalid_activity'
|
|
21643
|
+
| 'internal_error';
|
|
21644
|
+
|
|
21645
|
+
export interface ScheduledActivityPreview {
|
|
21646
|
+
/**
|
|
21647
|
+
* Type of activity
|
|
21648
|
+
*/
|
|
21649
|
+
type: string;
|
|
21650
|
+
/**
|
|
21651
|
+
* Feeds the activity will be added to
|
|
21652
|
+
*/
|
|
21653
|
+
feeds: Array<string>;
|
|
21654
|
+
/**
|
|
21655
|
+
* When the published activity expires
|
|
21656
|
+
*/
|
|
21657
|
+
expires_at?: TimestampNS;
|
|
21658
|
+
/**
|
|
21659
|
+
* ID the activity gets when published
|
|
21660
|
+
*/
|
|
21661
|
+
id?: string;
|
|
21662
|
+
/**
|
|
21663
|
+
* ID of the parent activity
|
|
21664
|
+
*/
|
|
21665
|
+
parent_id?: string;
|
|
21666
|
+
/**
|
|
21667
|
+
* ID of the poll attached to the activity
|
|
21668
|
+
*/
|
|
21669
|
+
poll_id?: string;
|
|
21670
|
+
/**
|
|
21671
|
+
* Who may reply to the activity
|
|
21672
|
+
*/
|
|
21673
|
+
restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody';
|
|
21674
|
+
/**
|
|
21675
|
+
* Text content of the activity
|
|
21676
|
+
*/
|
|
21677
|
+
text?: string;
|
|
21678
|
+
/**
|
|
21679
|
+
* Visibility of the activity
|
|
21680
|
+
*/
|
|
21681
|
+
visibility?: 'public' | 'private' | 'tag';
|
|
21682
|
+
/**
|
|
21683
|
+
* Visibility tag of the activity
|
|
21684
|
+
*/
|
|
21685
|
+
visibility_tag?: string;
|
|
21686
|
+
/**
|
|
21687
|
+
* Attachments of the activity
|
|
21688
|
+
*/
|
|
21689
|
+
attachments?: Array<Attachment>;
|
|
21690
|
+
/**
|
|
21691
|
+
* Collections referenced by the activity
|
|
21692
|
+
*/
|
|
21693
|
+
collection_refs?: Array<string>;
|
|
21694
|
+
/**
|
|
21695
|
+
* Filter tags of the activity
|
|
21696
|
+
*/
|
|
21697
|
+
filter_tags?: Array<string>;
|
|
21698
|
+
/**
|
|
21699
|
+
* Interest tags of the activity
|
|
21700
|
+
*/
|
|
21701
|
+
interest_tags?: Array<string>;
|
|
21702
|
+
/**
|
|
21703
|
+
* Users mentioned in the activity
|
|
21704
|
+
*/
|
|
21705
|
+
mentioned_user_ids?: Array<string>;
|
|
21706
|
+
/**
|
|
21707
|
+
* Custom data of the activity
|
|
21708
|
+
*/
|
|
21709
|
+
custom?: Record<string, any>;
|
|
21710
|
+
location?: Location;
|
|
21711
|
+
/**
|
|
21712
|
+
* Search data of the activity
|
|
21713
|
+
*/
|
|
21714
|
+
search_data?: Record<string, any>;
|
|
21715
|
+
}
|
|
21716
|
+
|
|
21717
|
+
export interface ScheduledActivityPublishedEvent {
|
|
21718
|
+
/**
|
|
21719
|
+
* Date/time of creation
|
|
21720
|
+
*/
|
|
21721
|
+
created_at: TimestampNS;
|
|
21722
|
+
custom: Record<string, any>;
|
|
21723
|
+
/**
|
|
21724
|
+
* An activity scheduled to be published at a future time
|
|
21725
|
+
*/
|
|
21726
|
+
scheduled_activity: ScheduledActivityResponse;
|
|
21727
|
+
/**
|
|
21728
|
+
* The type of event: "feeds.scheduled_activity.published" in this case
|
|
21729
|
+
*/
|
|
21730
|
+
type: string;
|
|
21731
|
+
received_at?: TimestampNS;
|
|
21732
|
+
user?: UserResponseCommonFields;
|
|
21733
|
+
}
|
|
21734
|
+
|
|
21735
|
+
export type ScheduledActivityQueryStatus =
|
|
21736
|
+
'scheduled' | 'publishing' | 'failed';
|
|
21737
|
+
|
|
21738
|
+
export interface ScheduledActivityResponse {
|
|
21739
|
+
/**
|
|
21740
|
+
* When the activity was scheduled
|
|
21741
|
+
*/
|
|
21742
|
+
created_at: TimestampNS;
|
|
21743
|
+
/**
|
|
21744
|
+
* ID of the scheduled activity, also the ID the activity gets when published
|
|
21745
|
+
*/
|
|
21746
|
+
id: string;
|
|
21747
|
+
/**
|
|
21748
|
+
* When the activity will be published
|
|
21749
|
+
*/
|
|
21750
|
+
scheduled_at: TimestampNS;
|
|
21751
|
+
/**
|
|
21752
|
+
* One of: scheduled, publishing, failed, canceled
|
|
21753
|
+
*/
|
|
21754
|
+
status: ScheduledActivityStatus;
|
|
21755
|
+
/**
|
|
21756
|
+
* When the scheduled activity was last changed
|
|
21757
|
+
*/
|
|
21758
|
+
updated_at: TimestampNS;
|
|
21759
|
+
/**
|
|
21760
|
+
* ID of the user the activity is published as
|
|
21761
|
+
*/
|
|
21762
|
+
user_id: string;
|
|
21763
|
+
/**
|
|
21764
|
+
* Feeds the activity will be added to
|
|
21765
|
+
*/
|
|
21766
|
+
feeds: Array<string>;
|
|
21767
|
+
/**
|
|
21768
|
+
* The activity a scheduled activity will publish
|
|
21769
|
+
*/
|
|
21770
|
+
activity: ScheduledActivityPreview;
|
|
21771
|
+
/**
|
|
21772
|
+
* Why the publish failed; set only when status is failed
|
|
21773
|
+
*/
|
|
21774
|
+
failure_reason?: ScheduledActivityFailureReason;
|
|
21775
|
+
}
|
|
21776
|
+
|
|
21777
|
+
export type ScheduledActivityStatus =
|
|
21778
|
+
'scheduled' | 'publishing' | 'failed' | 'canceled';
|
|
21779
|
+
|
|
21404
21780
|
export interface ScheduledMessageChannelResponse {
|
|
21405
21781
|
/**
|
|
21406
21782
|
* Channel CID (<type>:<id>)
|
|
@@ -25461,6 +25837,22 @@ export interface UpdateSIPTrunkResponse {
|
|
|
25461
25837
|
sip_trunk?: SIPTrunkResponse;
|
|
25462
25838
|
}
|
|
25463
25839
|
|
|
25840
|
+
export interface UpdateScheduledActivityRequest {
|
|
25841
|
+
/**
|
|
25842
|
+
* When to publish the activity, an RFC 3339 time. A time less than a minute ahead or in the past is moved to one minute from now, and the time is rounded up to a whole minute.
|
|
25843
|
+
*/
|
|
25844
|
+
scheduled_at?: Date;
|
|
25845
|
+
activity?: ActivityRequest;
|
|
25846
|
+
}
|
|
25847
|
+
|
|
25848
|
+
export interface UpdateScheduledActivityResponse {
|
|
25849
|
+
duration: string;
|
|
25850
|
+
/**
|
|
25851
|
+
* An activity scheduled to be published at a future time
|
|
25852
|
+
*/
|
|
25853
|
+
scheduled_activity: ScheduledActivityResponse;
|
|
25854
|
+
}
|
|
25855
|
+
|
|
25464
25856
|
export interface UpdateScheduledMessageRequest {
|
|
25465
25857
|
/**
|
|
25466
25858
|
* New send time (UTC). Must be in the future and at most the app's maximum lead time from now. Rounded up to the first whole minute that is at least 1 minute from now, never earlier than requested. Resending the stored time leaves it unchanged
|
|
@@ -27024,6 +27416,10 @@ export type WHEvent =
|
|
|
27024
27416
|
| ({ type: 'feeds.follow.deleted' } & FollowDeletedEvent)
|
|
27025
27417
|
| ({ type: 'feeds.follow.updated' } & FollowUpdatedEvent)
|
|
27026
27418
|
| ({ type: 'feeds.notification_feed.updated' } & NotificationFeedUpdatedEvent)
|
|
27419
|
+
| ({ type: 'feeds.scheduled_activity.failed' } & ScheduledActivityFailedEvent)
|
|
27420
|
+
| ({
|
|
27421
|
+
type: 'feeds.scheduled_activity.published';
|
|
27422
|
+
} & ScheduledActivityPublishedEvent)
|
|
27027
27423
|
| ({ type: 'feeds.stories_feed.updated' } & StoriesFeedUpdatedEvent)
|
|
27028
27424
|
| ({ type: 'flag.updated' } & FlagUpdatedEvent)
|
|
27029
27425
|
| ({ type: 'import.error' } & AsyncImportErrorEvent)
|