@stream-io/node-sdk 0.8.12 → 0.8.14
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 +19 -0
- package/__tests__/docs-snippets/README.md +98 -0
- package/dist/index.cjs.js +394 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es.mjs +393 -24
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChannelApi.d.ts +2 -1
- package/dist/src/gen/chat/ChatApi.d.ts +19 -5
- package/dist/src/gen/feeds/FeedsApi.d.ts +1 -0
- package/dist/src/gen/models/index.d.ts +999 -154
- package/index.ts +2 -0
- package/package.json +6 -1
- package/src/ApiClient.ts +3 -2
- package/src/gen/chat/ChannelApi.ts +18 -0
- package/src/gen/chat/ChatApi.ts +152 -19
- package/src/gen/common/CommonApi.ts +10 -0
- package/src/gen/feeds/FeedsApi.ts +12 -0
- package/src/gen/model-decoders/decoders.ts +220 -9
- package/src/gen/models/index.ts +1104 -215
- package/src/gen/moderation/ModerationApi.ts +3 -0
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/node-sdk",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
"prepack": "yarn build",
|
|
24
24
|
"test": "vitest",
|
|
25
25
|
"test:bun": "bun run vitest",
|
|
26
|
+
"test:docs": "vitest run --config __tests__/docs-snippets/vitest.config.mts",
|
|
27
|
+
"test:docs:sync": "vitest run --config __tests__/docs-snippets/vitest.sync.config.mts",
|
|
28
|
+
"test:docs:sweep": "vitest run --config __tests__/docs-snippets/vitest.sweep.config.mts",
|
|
29
|
+
"types:docs": "tsc -p __tests__/docs-snippets/tsconfig.json",
|
|
26
30
|
"start": "vite build --watch",
|
|
27
31
|
"build": "rm -rf dist && vite build && tsc --emitDeclarationOnly -p tsconfig.json",
|
|
28
32
|
"generate:open-api": "./generate-openapi.sh",
|
|
@@ -61,6 +65,7 @@
|
|
|
61
65
|
"prettier": "^3.9.6",
|
|
62
66
|
"typescript": "~6.0.3",
|
|
63
67
|
"typescript-eslint": "^8.67.0",
|
|
68
|
+
"undici": "^7.30.0",
|
|
64
69
|
"vite": "^8.2.1",
|
|
65
70
|
"vitest": "~4.1.10"
|
|
66
71
|
},
|
package/src/ApiClient.ts
CHANGED
|
@@ -108,13 +108,14 @@ export class ApiClient {
|
|
|
108
108
|
`The request was aborted due to to the ${this.apiConfig.timeout}ms timeout, you can set the timeout in the StreamClient constructor`,
|
|
109
109
|
metadata,
|
|
110
110
|
undefined,
|
|
111
|
-
error
|
|
111
|
+
{ cause: error },
|
|
112
112
|
);
|
|
113
113
|
} else {
|
|
114
114
|
throw new StreamError(
|
|
115
115
|
`The request failed due to an unexpected error`,
|
|
116
116
|
metadata,
|
|
117
|
-
|
|
117
|
+
undefined,
|
|
118
|
+
{ cause: error },
|
|
118
119
|
);
|
|
119
120
|
}
|
|
120
121
|
}
|
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
MarkReadRequest,
|
|
13
13
|
MarkReadResponse,
|
|
14
14
|
MarkUnreadRequest,
|
|
15
|
+
QueryChannelBansRequest,
|
|
16
|
+
QueryChannelBansResponse,
|
|
15
17
|
Response,
|
|
16
18
|
SendEventRequest,
|
|
17
19
|
SendMessageRequest,
|
|
@@ -114,6 +116,22 @@ export class ChannelApi {
|
|
|
114
116
|
});
|
|
115
117
|
}
|
|
116
118
|
|
|
119
|
+
queryChannelBans(
|
|
120
|
+
request?: QueryChannelBansRequest,
|
|
121
|
+
): Promise<StreamResponse<QueryChannelBansResponse>> {
|
|
122
|
+
if (!this.id) {
|
|
123
|
+
throw new Error(
|
|
124
|
+
`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return this.chatApi.queryChannelBans({
|
|
129
|
+
id: this.id,
|
|
130
|
+
type: this.type,
|
|
131
|
+
...request,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
|
|
117
135
|
deleteDraft(request?: {
|
|
118
136
|
parent_id?: string;
|
|
119
137
|
user_id?: string;
|
package/src/gen/chat/ChatApi.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { ApiClient, StreamResponse } from '../../gen-imports';
|
|
2
2
|
import {
|
|
3
3
|
AddSegmentTargetsRequest,
|
|
4
|
-
CampaignResponse,
|
|
5
4
|
CastPollVoteRequest,
|
|
6
5
|
ChannelBatchUpdateRequest,
|
|
7
6
|
ChannelBatchUpdateResponse,
|
|
8
7
|
ChannelGetOrCreateRequest,
|
|
9
8
|
ChannelStateResponse,
|
|
10
|
-
CommitMessageRequest,
|
|
11
9
|
CreateCampaignRequest,
|
|
12
10
|
CreateCampaignResponse,
|
|
13
11
|
CreateChannelTypeRequest,
|
|
@@ -30,6 +28,7 @@ import {
|
|
|
30
28
|
DeleteReminderResponse,
|
|
31
29
|
DeleteRetentionPolicyRequest,
|
|
32
30
|
DeleteRetentionPolicyResponse,
|
|
31
|
+
DeleteScheduledMessageResponse,
|
|
33
32
|
DeleteSegmentTargetsRequest,
|
|
34
33
|
EventResponse,
|
|
35
34
|
ExportChannelsRequest,
|
|
@@ -71,6 +70,8 @@ import {
|
|
|
71
70
|
QueryBannedUsersResponse,
|
|
72
71
|
QueryCampaignsRequest,
|
|
73
72
|
QueryCampaignsResponse,
|
|
73
|
+
QueryChannelBansRequest,
|
|
74
|
+
QueryChannelBansResponse,
|
|
74
75
|
QueryChannelsRequest,
|
|
75
76
|
QueryChannelsResponse,
|
|
76
77
|
QueryDraftsRequest,
|
|
@@ -87,6 +88,8 @@ import {
|
|
|
87
88
|
QueryReactionsResponse,
|
|
88
89
|
QueryRemindersRequest,
|
|
89
90
|
QueryRemindersResponse,
|
|
91
|
+
QueryScheduledMessagesRequest,
|
|
92
|
+
QueryScheduledMessagesResponse,
|
|
90
93
|
QuerySegmentTargetsRequest,
|
|
91
94
|
QuerySegmentTargetsResponse,
|
|
92
95
|
QuerySegmentsRequest,
|
|
@@ -103,6 +106,7 @@ import {
|
|
|
103
106
|
SendMessageResponse,
|
|
104
107
|
SendReactionRequest,
|
|
105
108
|
SendReactionResponse,
|
|
109
|
+
SendScheduledMessageNowResponse,
|
|
106
110
|
SendUserCustomEventRequest,
|
|
107
111
|
SetRetentionPolicyRequest,
|
|
108
112
|
SetRetentionPolicyResponse,
|
|
@@ -111,7 +115,7 @@ import {
|
|
|
111
115
|
SortParamRequest,
|
|
112
116
|
StartCampaignRequest,
|
|
113
117
|
StartCampaignResponse,
|
|
114
|
-
|
|
118
|
+
StopCampaignResponse,
|
|
115
119
|
TranslateMessageRequest,
|
|
116
120
|
TranslateMessageResponse,
|
|
117
121
|
TruncateChannelRequest,
|
|
@@ -123,6 +127,7 @@ import {
|
|
|
123
127
|
UnreadCountsBatchRequest,
|
|
124
128
|
UnreadCountsBatchResponse,
|
|
125
129
|
UpdateCampaignRequest,
|
|
130
|
+
UpdateCampaignResponse,
|
|
126
131
|
UpdateChannelPartialRequest,
|
|
127
132
|
UpdateChannelPartialResponse,
|
|
128
133
|
UpdateChannelRequest,
|
|
@@ -141,6 +146,8 @@ import {
|
|
|
141
146
|
UpdatePredefinedFilterResponse,
|
|
142
147
|
UpdateReminderRequest,
|
|
143
148
|
UpdateReminderResponse,
|
|
149
|
+
UpdateScheduledMessageRequest,
|
|
150
|
+
UpdateScheduledMessageResponse,
|
|
144
151
|
UpdateSegmentRequest,
|
|
145
152
|
UpdateSegmentResponse,
|
|
146
153
|
UpdateThreadPartialRequest,
|
|
@@ -262,7 +269,7 @@ export class ChatApi {
|
|
|
262
269
|
|
|
263
270
|
async updateCampaign(
|
|
264
271
|
request: UpdateCampaignRequest & { id: string },
|
|
265
|
-
): Promise<StreamResponse<
|
|
272
|
+
): Promise<StreamResponse<UpdateCampaignResponse>> {
|
|
266
273
|
const pathParams = {
|
|
267
274
|
id: request?.id,
|
|
268
275
|
};
|
|
@@ -283,7 +290,7 @@ export class ChatApi {
|
|
|
283
290
|
channel_template: request?.channel_template,
|
|
284
291
|
};
|
|
285
292
|
|
|
286
|
-
const response = await this.apiClient.sendRequest<
|
|
293
|
+
const response = await this.apiClient.sendRequest<UpdateCampaignResponse>(
|
|
287
294
|
'PUT',
|
|
288
295
|
'/api/v2/chat/campaigns/{id}',
|
|
289
296
|
pathParams,
|
|
@@ -291,7 +298,7 @@ export class ChatApi {
|
|
|
291
298
|
body,
|
|
292
299
|
);
|
|
293
300
|
|
|
294
|
-
decoders['
|
|
301
|
+
decoders['UpdateCampaignResponse']?.(response);
|
|
295
302
|
|
|
296
303
|
return response;
|
|
297
304
|
}
|
|
@@ -320,23 +327,21 @@ export class ChatApi {
|
|
|
320
327
|
return response;
|
|
321
328
|
}
|
|
322
329
|
|
|
323
|
-
async stopCampaign(
|
|
324
|
-
|
|
325
|
-
): Promise<StreamResponse<
|
|
330
|
+
async stopCampaign(request: {
|
|
331
|
+
id: string;
|
|
332
|
+
}): Promise<StreamResponse<StopCampaignResponse>> {
|
|
326
333
|
const pathParams = {
|
|
327
334
|
id: request?.id,
|
|
328
335
|
};
|
|
329
|
-
const body = {};
|
|
330
336
|
|
|
331
|
-
const response = await this.apiClient.sendRequest<
|
|
337
|
+
const response = await this.apiClient.sendRequest<StopCampaignResponse>(
|
|
332
338
|
'POST',
|
|
333
339
|
'/api/v2/chat/campaigns/{id}/stop',
|
|
334
340
|
pathParams,
|
|
335
341
|
undefined,
|
|
336
|
-
body,
|
|
337
342
|
);
|
|
338
343
|
|
|
339
|
-
decoders['
|
|
344
|
+
decoders['StopCampaignResponse']?.(response);
|
|
340
345
|
|
|
341
346
|
return response;
|
|
342
347
|
}
|
|
@@ -345,6 +350,7 @@ export class ChatApi {
|
|
|
345
350
|
request?: QueryChannelsRequest,
|
|
346
351
|
): Promise<StreamResponse<QueryChannelsResponse>> {
|
|
347
352
|
const body = {
|
|
353
|
+
include_active_member_count: request?.include_active_member_count,
|
|
348
354
|
limit: request?.limit,
|
|
349
355
|
member_limit: request?.member_limit,
|
|
350
356
|
message_limit: request?.message_limit,
|
|
@@ -452,6 +458,7 @@ export class ChatApi {
|
|
|
452
458
|
const body = {
|
|
453
459
|
limit: request?.limit,
|
|
454
460
|
user_id: request?.user_id,
|
|
461
|
+
sort: request?.sort,
|
|
455
462
|
groups: request?.groups,
|
|
456
463
|
user: request?.user,
|
|
457
464
|
};
|
|
@@ -661,6 +668,37 @@ export class ChatApi {
|
|
|
661
668
|
return response;
|
|
662
669
|
}
|
|
663
670
|
|
|
671
|
+
async queryChannelBans(
|
|
672
|
+
request: QueryChannelBansRequest & { type: string; id: string },
|
|
673
|
+
): Promise<StreamResponse<QueryChannelBansResponse>> {
|
|
674
|
+
const pathParams = {
|
|
675
|
+
type: request?.type,
|
|
676
|
+
id: request?.id,
|
|
677
|
+
};
|
|
678
|
+
const body = {
|
|
679
|
+
exclude_expired_bans: request?.exclude_expired_bans,
|
|
680
|
+
include_total: request?.include_total,
|
|
681
|
+
limit: request?.limit,
|
|
682
|
+
next: request?.next,
|
|
683
|
+
prev: request?.prev,
|
|
684
|
+
user_id: request?.user_id,
|
|
685
|
+
filter_conditions: request?.filter_conditions,
|
|
686
|
+
user: request?.user,
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
const response = await this.apiClient.sendRequest<QueryChannelBansResponse>(
|
|
690
|
+
'POST',
|
|
691
|
+
'/api/v2/chat/channels/{type}/{id}/bans/query',
|
|
692
|
+
pathParams,
|
|
693
|
+
undefined,
|
|
694
|
+
body,
|
|
695
|
+
);
|
|
696
|
+
|
|
697
|
+
decoders['QueryChannelBansResponse']?.(response);
|
|
698
|
+
|
|
699
|
+
return response;
|
|
700
|
+
}
|
|
701
|
+
|
|
664
702
|
async deleteDraft(request: {
|
|
665
703
|
type: string;
|
|
666
704
|
id: string;
|
|
@@ -916,6 +954,7 @@ export class ChatApi {
|
|
|
916
954
|
include_mentioned_members: request?.include_mentioned_members,
|
|
917
955
|
keep_channel_hidden: request?.keep_channel_hidden,
|
|
918
956
|
pending: request?.pending,
|
|
957
|
+
scheduled_at: request?.scheduled_at,
|
|
919
958
|
skip_enrich_url: request?.skip_enrich_url,
|
|
920
959
|
skip_push: request?.skip_push,
|
|
921
960
|
pending_message_metadata: request?.pending_message_metadata,
|
|
@@ -1191,8 +1230,10 @@ export class ChatApi {
|
|
|
1191
1230
|
polls: request?.polls,
|
|
1192
1231
|
push_level: request?.push_level,
|
|
1193
1232
|
push_notifications: request?.push_notifications,
|
|
1233
|
+
quotes: request?.quotes,
|
|
1194
1234
|
reactions: request?.reactions,
|
|
1195
1235
|
read_events: request?.read_events,
|
|
1236
|
+
reminders: request?.reminders,
|
|
1196
1237
|
replies: request?.replies,
|
|
1197
1238
|
search: request?.search,
|
|
1198
1239
|
shared_locations: request?.shared_locations,
|
|
@@ -1205,6 +1246,7 @@ export class ChatApi {
|
|
|
1205
1246
|
blocklists: request?.blocklists,
|
|
1206
1247
|
commands: request?.commands,
|
|
1207
1248
|
permissions: request?.permissions,
|
|
1249
|
+
automod_thresholds: request?.automod_thresholds,
|
|
1208
1250
|
chat_preferences: request?.chat_preferences,
|
|
1209
1251
|
grants: request?.grants,
|
|
1210
1252
|
};
|
|
@@ -1270,7 +1312,6 @@ export class ChatApi {
|
|
|
1270
1312
|
const body = {
|
|
1271
1313
|
automod: request?.automod,
|
|
1272
1314
|
automod_behavior: request?.automod_behavior,
|
|
1273
|
-
max_message_length: request?.max_message_length,
|
|
1274
1315
|
blocklist: request?.blocklist,
|
|
1275
1316
|
blocklist_behavior: request?.blocklist_behavior,
|
|
1276
1317
|
connect_events: request?.connect_events,
|
|
@@ -1278,6 +1319,7 @@ export class ChatApi {
|
|
|
1278
1319
|
custom_events: request?.custom_events,
|
|
1279
1320
|
delivery_events: request?.delivery_events,
|
|
1280
1321
|
mark_messages_pending: request?.mark_messages_pending,
|
|
1322
|
+
max_message_length: request?.max_message_length,
|
|
1281
1323
|
message_retention: request?.message_retention,
|
|
1282
1324
|
mutes: request?.mutes,
|
|
1283
1325
|
partition_size: request?.partition_size,
|
|
@@ -1646,20 +1688,18 @@ export class ChatApi {
|
|
|
1646
1688
|
return response;
|
|
1647
1689
|
}
|
|
1648
1690
|
|
|
1649
|
-
async commitMessage(
|
|
1650
|
-
|
|
1651
|
-
): Promise<StreamResponse<MessageActionResponse>> {
|
|
1691
|
+
async commitMessage(request: {
|
|
1692
|
+
id: string;
|
|
1693
|
+
}): Promise<StreamResponse<MessageActionResponse>> {
|
|
1652
1694
|
const pathParams = {
|
|
1653
1695
|
id: request?.id,
|
|
1654
1696
|
};
|
|
1655
|
-
const body = {};
|
|
1656
1697
|
|
|
1657
1698
|
const response = await this.apiClient.sendRequest<MessageActionResponse>(
|
|
1658
1699
|
'POST',
|
|
1659
1700
|
'/api/v2/chat/messages/{id}/commit',
|
|
1660
1701
|
pathParams,
|
|
1661
1702
|
undefined,
|
|
1662
|
-
body,
|
|
1663
1703
|
);
|
|
1664
1704
|
|
|
1665
1705
|
decoders['MessageActionResponse']?.(response);
|
|
@@ -1854,6 +1894,8 @@ export class ChatApi {
|
|
|
1854
1894
|
poll_id: request?.poll_id,
|
|
1855
1895
|
};
|
|
1856
1896
|
const body = {
|
|
1897
|
+
config_key: request?.config_key,
|
|
1898
|
+
config_team: request?.config_team,
|
|
1857
1899
|
user_id: request?.user_id,
|
|
1858
1900
|
user: request?.user,
|
|
1859
1901
|
vote: request?.vote,
|
|
@@ -2339,6 +2381,97 @@ export class ChatApi {
|
|
|
2339
2381
|
return response;
|
|
2340
2382
|
}
|
|
2341
2383
|
|
|
2384
|
+
async queryScheduledMessages(
|
|
2385
|
+
request?: QueryScheduledMessagesRequest,
|
|
2386
|
+
): Promise<StreamResponse<QueryScheduledMessagesResponse>> {
|
|
2387
|
+
const body = {
|
|
2388
|
+
limit: request?.limit,
|
|
2389
|
+
next: request?.next,
|
|
2390
|
+
user_id: request?.user_id,
|
|
2391
|
+
sort: request?.sort,
|
|
2392
|
+
filter: request?.filter,
|
|
2393
|
+
user: request?.user,
|
|
2394
|
+
};
|
|
2395
|
+
|
|
2396
|
+
const response =
|
|
2397
|
+
await this.apiClient.sendRequest<QueryScheduledMessagesResponse>(
|
|
2398
|
+
'POST',
|
|
2399
|
+
'/api/v2/chat/scheduled_messages/query',
|
|
2400
|
+
undefined,
|
|
2401
|
+
undefined,
|
|
2402
|
+
body,
|
|
2403
|
+
);
|
|
2404
|
+
|
|
2405
|
+
decoders['QueryScheduledMessagesResponse']?.(response);
|
|
2406
|
+
|
|
2407
|
+
return response;
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
async deleteScheduledMessage(request: {
|
|
2411
|
+
id: string;
|
|
2412
|
+
}): Promise<StreamResponse<DeleteScheduledMessageResponse>> {
|
|
2413
|
+
const pathParams = {
|
|
2414
|
+
id: request?.id,
|
|
2415
|
+
};
|
|
2416
|
+
|
|
2417
|
+
const response =
|
|
2418
|
+
await this.apiClient.sendRequest<DeleteScheduledMessageResponse>(
|
|
2419
|
+
'DELETE',
|
|
2420
|
+
'/api/v2/chat/scheduled_messages/{id}',
|
|
2421
|
+
pathParams,
|
|
2422
|
+
undefined,
|
|
2423
|
+
);
|
|
2424
|
+
|
|
2425
|
+
decoders['DeleteScheduledMessageResponse']?.(response);
|
|
2426
|
+
|
|
2427
|
+
return response;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
async updateScheduledMessage(
|
|
2431
|
+
request: UpdateScheduledMessageRequest & { id: string },
|
|
2432
|
+
): Promise<StreamResponse<UpdateScheduledMessageResponse>> {
|
|
2433
|
+
const pathParams = {
|
|
2434
|
+
id: request?.id,
|
|
2435
|
+
};
|
|
2436
|
+
const body = {
|
|
2437
|
+
scheduled_at: request?.scheduled_at,
|
|
2438
|
+
message: request?.message,
|
|
2439
|
+
};
|
|
2440
|
+
|
|
2441
|
+
const response =
|
|
2442
|
+
await this.apiClient.sendRequest<UpdateScheduledMessageResponse>(
|
|
2443
|
+
'PATCH',
|
|
2444
|
+
'/api/v2/chat/scheduled_messages/{id}',
|
|
2445
|
+
pathParams,
|
|
2446
|
+
undefined,
|
|
2447
|
+
body,
|
|
2448
|
+
);
|
|
2449
|
+
|
|
2450
|
+
decoders['UpdateScheduledMessageResponse']?.(response);
|
|
2451
|
+
|
|
2452
|
+
return response;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
async sendScheduledMessageNow(request: {
|
|
2456
|
+
id: string;
|
|
2457
|
+
}): Promise<StreamResponse<SendScheduledMessageNowResponse>> {
|
|
2458
|
+
const pathParams = {
|
|
2459
|
+
id: request?.id,
|
|
2460
|
+
};
|
|
2461
|
+
|
|
2462
|
+
const response =
|
|
2463
|
+
await this.apiClient.sendRequest<SendScheduledMessageNowResponse>(
|
|
2464
|
+
'POST',
|
|
2465
|
+
'/api/v2/chat/scheduled_messages/{id}/send_now',
|
|
2466
|
+
pathParams,
|
|
2467
|
+
undefined,
|
|
2468
|
+
);
|
|
2469
|
+
|
|
2470
|
+
decoders['SendScheduledMessageNowResponse']?.(response);
|
|
2471
|
+
|
|
2472
|
+
return response;
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2342
2475
|
async search(request?: {
|
|
2343
2476
|
payload?: SearchPayload;
|
|
2344
2477
|
}): Promise<StreamResponse<SearchResponse>> {
|
|
@@ -1071,6 +1071,8 @@ export class CommonApi {
|
|
|
1071
1071
|
name: request?.name,
|
|
1072
1072
|
allow_answers: request?.allow_answers,
|
|
1073
1073
|
allow_user_suggested_options: request?.allow_user_suggested_options,
|
|
1074
|
+
config_key: request?.config_key,
|
|
1075
|
+
config_team: request?.config_team,
|
|
1074
1076
|
description: request?.description,
|
|
1075
1077
|
enforce_unique_vote: request?.enforce_unique_vote,
|
|
1076
1078
|
id: request?.id,
|
|
@@ -1105,6 +1107,8 @@ export class CommonApi {
|
|
|
1105
1107
|
name: request?.name,
|
|
1106
1108
|
allow_answers: request?.allow_answers,
|
|
1107
1109
|
allow_user_suggested_options: request?.allow_user_suggested_options,
|
|
1110
|
+
config_key: request?.config_key,
|
|
1111
|
+
config_team: request?.config_team,
|
|
1108
1112
|
description: request?.description,
|
|
1109
1113
|
enforce_unique_vote: request?.enforce_unique_vote,
|
|
1110
1114
|
is_closed: request?.is_closed,
|
|
@@ -1209,6 +1213,8 @@ export class CommonApi {
|
|
|
1209
1213
|
poll_id: request?.poll_id,
|
|
1210
1214
|
};
|
|
1211
1215
|
const body = {
|
|
1216
|
+
config_key: request?.config_key,
|
|
1217
|
+
config_team: request?.config_team,
|
|
1212
1218
|
user_id: request?.user_id,
|
|
1213
1219
|
unset: request?.unset,
|
|
1214
1220
|
set: request?.set,
|
|
@@ -1236,6 +1242,8 @@ export class CommonApi {
|
|
|
1236
1242
|
};
|
|
1237
1243
|
const body = {
|
|
1238
1244
|
text: request?.text,
|
|
1245
|
+
config_key: request?.config_key,
|
|
1246
|
+
config_team: request?.config_team,
|
|
1239
1247
|
user_id: request?.user_id,
|
|
1240
1248
|
custom: request?.custom,
|
|
1241
1249
|
user: request?.user,
|
|
@@ -1263,6 +1271,8 @@ export class CommonApi {
|
|
|
1263
1271
|
const body = {
|
|
1264
1272
|
id: request?.id,
|
|
1265
1273
|
text: request?.text,
|
|
1274
|
+
config_key: request?.config_key,
|
|
1275
|
+
config_team: request?.config_team,
|
|
1266
1276
|
user_id: request?.user_id,
|
|
1267
1277
|
custom: request?.custom,
|
|
1268
1278
|
user: request?.user,
|
|
@@ -209,6 +209,7 @@ export class FeedsApi {
|
|
|
209
209
|
poll_id: request?.poll_id,
|
|
210
210
|
restrict_replies: request?.restrict_replies,
|
|
211
211
|
skip_enrich_url: request?.skip_enrich_url,
|
|
212
|
+
skip_existing: request?.skip_existing,
|
|
212
213
|
skip_push: request?.skip_push,
|
|
213
214
|
text: request?.text,
|
|
214
215
|
user_id: request?.user_id,
|
|
@@ -246,6 +247,7 @@ export class FeedsApi {
|
|
|
246
247
|
create_users: request?.create_users,
|
|
247
248
|
enrich_own_fields: request?.enrich_own_fields,
|
|
248
249
|
force_moderation: request?.force_moderation,
|
|
250
|
+
skip_existing: request?.skip_existing,
|
|
249
251
|
};
|
|
250
252
|
|
|
251
253
|
const response = await this.apiClient.sendRequest<UpsertActivitiesResponse>(
|
|
@@ -511,6 +513,8 @@ export class FeedsApi {
|
|
|
511
513
|
poll_id: request?.poll_id,
|
|
512
514
|
};
|
|
513
515
|
const body = {
|
|
516
|
+
config_key: request?.config_key,
|
|
517
|
+
config_team: request?.config_team,
|
|
514
518
|
user_id: request?.user_id,
|
|
515
519
|
user: request?.user,
|
|
516
520
|
vote: request?.vote,
|
|
@@ -975,9 +979,11 @@ export class FeedsApi {
|
|
|
975
979
|
|
|
976
980
|
async deleteCollections(request: {
|
|
977
981
|
collection_refs: Array<string>;
|
|
982
|
+
hard_delete?: boolean;
|
|
978
983
|
}): Promise<StreamResponse<DeleteCollectionsResponse>> {
|
|
979
984
|
const queryParams = {
|
|
980
985
|
collection_refs: request?.collection_refs,
|
|
986
|
+
hard_delete: request?.hard_delete,
|
|
981
987
|
};
|
|
982
988
|
|
|
983
989
|
const response =
|
|
@@ -1784,6 +1790,7 @@ export class FeedsApi {
|
|
|
1784
1790
|
interest_weights: request?.interest_weights,
|
|
1785
1791
|
member_pagination: request?.member_pagination,
|
|
1786
1792
|
user: request?.user,
|
|
1793
|
+
viewer_location: request?.viewer_location,
|
|
1787
1794
|
};
|
|
1788
1795
|
|
|
1789
1796
|
const response = await this.apiClient.sendRequest<GetOrCreateFeedResponse>(
|
|
@@ -2697,6 +2704,7 @@ export class FeedsApi {
|
|
|
2697
2704
|
): Promise<StreamResponse<FollowBatchResponse>> {
|
|
2698
2705
|
const body = {
|
|
2699
2706
|
follows: request?.follows,
|
|
2707
|
+
async: request?.async,
|
|
2700
2708
|
create_users: request?.create_users,
|
|
2701
2709
|
enrich_own_fields: request?.enrich_own_fields,
|
|
2702
2710
|
};
|
|
@@ -2719,6 +2727,7 @@ export class FeedsApi {
|
|
|
2719
2727
|
): Promise<StreamResponse<FollowBatchResponse>> {
|
|
2720
2728
|
const body = {
|
|
2721
2729
|
follows: request?.follows,
|
|
2730
|
+
async: request?.async,
|
|
2722
2731
|
create_users: request?.create_users,
|
|
2723
2732
|
enrich_own_fields: request?.enrich_own_fields,
|
|
2724
2733
|
};
|
|
@@ -2740,6 +2749,7 @@ export class FeedsApi {
|
|
|
2740
2749
|
request?: QueryFollowsRequest,
|
|
2741
2750
|
): Promise<StreamResponse<QueryFollowsResponse>> {
|
|
2742
2751
|
const body = {
|
|
2752
|
+
include_group_counts: request?.include_group_counts,
|
|
2743
2753
|
limit: request?.limit,
|
|
2744
2754
|
next: request?.next,
|
|
2745
2755
|
prev: request?.prev,
|
|
@@ -3077,6 +3087,7 @@ export class FeedsApi {
|
|
|
3077
3087
|
): Promise<StreamResponse<UnfollowBatchResponse>> {
|
|
3078
3088
|
const body = {
|
|
3079
3089
|
follows: request?.follows,
|
|
3090
|
+
async: request?.async,
|
|
3080
3091
|
delete_notification_activity: request?.delete_notification_activity,
|
|
3081
3092
|
enrich_own_fields: request?.enrich_own_fields,
|
|
3082
3093
|
};
|
|
@@ -3099,6 +3110,7 @@ export class FeedsApi {
|
|
|
3099
3110
|
): Promise<StreamResponse<UnfollowBatchResponse>> {
|
|
3100
3111
|
const body = {
|
|
3101
3112
|
follows: request?.follows,
|
|
3113
|
+
async: request?.async,
|
|
3102
3114
|
delete_notification_activity: request?.delete_notification_activity,
|
|
3103
3115
|
enrich_own_fields: request?.enrich_own_fields,
|
|
3104
3116
|
};
|