@stream-io/node-sdk 0.8.13 → 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 +7 -0
- package/__tests__/docs-snippets/README.md +23 -12
- package/dist/index.cjs.js +388 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +388 -20
- 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 +998 -154
- package/package.json +1 -1
- 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 +11 -0
- package/src/gen/model-decoders/decoders.ts +220 -9
- package/src/gen/models/index.ts +1103 -215
- package/src/gen/moderation/ModerationApi.ts +3 -0
|
@@ -1424,6 +1424,30 @@ decoders['ChangeFeedVisibilityResponse'] = (input?: { [key: string]: any }) => {
|
|
|
1424
1424
|
return decode(typeMappings, input);
|
|
1425
1425
|
};
|
|
1426
1426
|
|
|
1427
|
+
decoders['ChannelBanResponse'] = (input?: { [key: string]: any }) => {
|
|
1428
|
+
const typeMappings: TypeMapping = {
|
|
1429
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1430
|
+
|
|
1431
|
+
channel_ban: { type: 'ChannelBanScopeResponse', isSingle: true },
|
|
1432
|
+
|
|
1433
|
+
future_channel_ban: { type: 'ChannelBanScopeResponse', isSingle: true },
|
|
1434
|
+
|
|
1435
|
+
user: { type: 'UserResponse', isSingle: true },
|
|
1436
|
+
};
|
|
1437
|
+
return decode(typeMappings, input);
|
|
1438
|
+
};
|
|
1439
|
+
|
|
1440
|
+
decoders['ChannelBanScopeResponse'] = (input?: { [key: string]: any }) => {
|
|
1441
|
+
const typeMappings: TypeMapping = {
|
|
1442
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1443
|
+
|
|
1444
|
+
expires: { type: 'DatetimeType', isSingle: true },
|
|
1445
|
+
|
|
1446
|
+
banned_by: { type: 'UserResponse', isSingle: true },
|
|
1447
|
+
};
|
|
1448
|
+
return decode(typeMappings, input);
|
|
1449
|
+
};
|
|
1450
|
+
|
|
1427
1451
|
decoders['ChannelBatchCompletedEvent'] = (input?: { [key: string]: any }) => {
|
|
1428
1452
|
const typeMappings: TypeMapping = {
|
|
1429
1453
|
batch_created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1644,6 +1668,8 @@ decoders['ChannelStateResponse'] = (input?: { [key: string]: any }) => {
|
|
|
1644
1668
|
|
|
1645
1669
|
read: { type: 'ReadStateResponse', isSingle: false },
|
|
1646
1670
|
|
|
1671
|
+
scheduled_messages: { type: 'ScheduledMessageResponse', isSingle: false },
|
|
1672
|
+
|
|
1647
1673
|
watchers: { type: 'UserResponse', isSingle: false },
|
|
1648
1674
|
|
|
1649
1675
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
@@ -1681,6 +1707,8 @@ decoders['ChannelStateResponseFields'] = (input?: { [key: string]: any }) => {
|
|
|
1681
1707
|
|
|
1682
1708
|
read: { type: 'ReadStateResponse', isSingle: false },
|
|
1683
1709
|
|
|
1710
|
+
scheduled_messages: { type: 'ScheduledMessageResponse', isSingle: false },
|
|
1711
|
+
|
|
1684
1712
|
watchers: { type: 'UserResponse', isSingle: false },
|
|
1685
1713
|
|
|
1686
1714
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
@@ -2346,6 +2374,15 @@ decoders['DeleteReactionResponse'] = (input?: { [key: string]: any }) => {
|
|
|
2346
2374
|
return decode(typeMappings, input);
|
|
2347
2375
|
};
|
|
2348
2376
|
|
|
2377
|
+
decoders['DeleteScheduledMessageResponse'] = (input?: {
|
|
2378
|
+
[key: string]: any;
|
|
2379
|
+
}) => {
|
|
2380
|
+
const typeMappings: TypeMapping = {
|
|
2381
|
+
scheduled_message: { type: 'ScheduledMessageResponse', isSingle: true },
|
|
2382
|
+
};
|
|
2383
|
+
return decode(typeMappings, input);
|
|
2384
|
+
};
|
|
2385
|
+
|
|
2349
2386
|
decoders['DeviceResponse'] = (input?: { [key: string]: any }) => {
|
|
2350
2387
|
const typeMappings: TypeMapping = {
|
|
2351
2388
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3360,15 +3397,6 @@ decoders['IngressStoppedEvent'] = (input?: { [key: string]: any }) => {
|
|
|
3360
3397
|
return decode(typeMappings, input);
|
|
3361
3398
|
};
|
|
3362
3399
|
|
|
3363
|
-
decoders['IntentDetectedEvent'] = (input?: { [key: string]: any }) => {
|
|
3364
|
-
const typeMappings: TypeMapping = {
|
|
3365
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3366
|
-
|
|
3367
|
-
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3368
|
-
};
|
|
3369
|
-
return decode(typeMappings, input);
|
|
3370
|
-
};
|
|
3371
|
-
|
|
3372
3400
|
decoders['KickedUserEvent'] = (input?: { [key: string]: any }) => {
|
|
3373
3401
|
const typeMappings: TypeMapping = {
|
|
3374
3402
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -4260,6 +4288,28 @@ decoders['PolicyTestSetResponse'] = (input?: { [key: string]: any }) => {
|
|
|
4260
4288
|
return decode(typeMappings, input);
|
|
4261
4289
|
};
|
|
4262
4290
|
|
|
4291
|
+
decoders['PollClosedEvent'] = (input?: { [key: string]: any }) => {
|
|
4292
|
+
const typeMappings: TypeMapping = {
|
|
4293
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4294
|
+
|
|
4295
|
+
poll: { type: 'PollResponseData', isSingle: true },
|
|
4296
|
+
|
|
4297
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4298
|
+
};
|
|
4299
|
+
return decode(typeMappings, input);
|
|
4300
|
+
};
|
|
4301
|
+
|
|
4302
|
+
decoders['PollDeletedEvent'] = (input?: { [key: string]: any }) => {
|
|
4303
|
+
const typeMappings: TypeMapping = {
|
|
4304
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4305
|
+
|
|
4306
|
+
poll: { type: 'PollResponseData', isSingle: true },
|
|
4307
|
+
|
|
4308
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4309
|
+
};
|
|
4310
|
+
return decode(typeMappings, input);
|
|
4311
|
+
};
|
|
4312
|
+
|
|
4263
4313
|
decoders['PollResponse'] = (input?: { [key: string]: any }) => {
|
|
4264
4314
|
const typeMappings: TypeMapping = {
|
|
4265
4315
|
poll: { type: 'PollResponseData', isSingle: true },
|
|
@@ -4282,6 +4332,56 @@ decoders['PollResponseData'] = (input?: { [key: string]: any }) => {
|
|
|
4282
4332
|
return decode(typeMappings, input);
|
|
4283
4333
|
};
|
|
4284
4334
|
|
|
4335
|
+
decoders['PollUpdatedEvent'] = (input?: { [key: string]: any }) => {
|
|
4336
|
+
const typeMappings: TypeMapping = {
|
|
4337
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4338
|
+
|
|
4339
|
+
poll: { type: 'PollResponseData', isSingle: true },
|
|
4340
|
+
|
|
4341
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4342
|
+
};
|
|
4343
|
+
return decode(typeMappings, input);
|
|
4344
|
+
};
|
|
4345
|
+
|
|
4346
|
+
decoders['PollVoteCastedEvent'] = (input?: { [key: string]: any }) => {
|
|
4347
|
+
const typeMappings: TypeMapping = {
|
|
4348
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4349
|
+
|
|
4350
|
+
poll: { type: 'PollResponseData', isSingle: true },
|
|
4351
|
+
|
|
4352
|
+
poll_vote: { type: 'PollVoteResponseData', isSingle: true },
|
|
4353
|
+
|
|
4354
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4355
|
+
};
|
|
4356
|
+
return decode(typeMappings, input);
|
|
4357
|
+
};
|
|
4358
|
+
|
|
4359
|
+
decoders['PollVoteChangedEvent'] = (input?: { [key: string]: any }) => {
|
|
4360
|
+
const typeMappings: TypeMapping = {
|
|
4361
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4362
|
+
|
|
4363
|
+
poll: { type: 'PollResponseData', isSingle: true },
|
|
4364
|
+
|
|
4365
|
+
poll_vote: { type: 'PollVoteResponseData', isSingle: true },
|
|
4366
|
+
|
|
4367
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4368
|
+
};
|
|
4369
|
+
return decode(typeMappings, input);
|
|
4370
|
+
};
|
|
4371
|
+
|
|
4372
|
+
decoders['PollVoteRemovedEvent'] = (input?: { [key: string]: any }) => {
|
|
4373
|
+
const typeMappings: TypeMapping = {
|
|
4374
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4375
|
+
|
|
4376
|
+
poll: { type: 'PollResponseData', isSingle: true },
|
|
4377
|
+
|
|
4378
|
+
poll_vote: { type: 'PollVoteResponseData', isSingle: true },
|
|
4379
|
+
|
|
4380
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4381
|
+
};
|
|
4382
|
+
return decode(typeMappings, input);
|
|
4383
|
+
};
|
|
4384
|
+
|
|
4285
4385
|
decoders['PollVoteResponse'] = (input?: { [key: string]: any }) => {
|
|
4286
4386
|
const typeMappings: TypeMapping = {
|
|
4287
4387
|
poll: { type: 'PollResponseData', isSingle: true },
|
|
@@ -4564,6 +4664,13 @@ decoders['QueryCampaignsResponse'] = (input?: { [key: string]: any }) => {
|
|
|
4564
4664
|
return decode(typeMappings, input);
|
|
4565
4665
|
};
|
|
4566
4666
|
|
|
4667
|
+
decoders['QueryChannelBansResponse'] = (input?: { [key: string]: any }) => {
|
|
4668
|
+
const typeMappings: TypeMapping = {
|
|
4669
|
+
bans: { type: 'ChannelBanResponse', isSingle: false },
|
|
4670
|
+
};
|
|
4671
|
+
return decode(typeMappings, input);
|
|
4672
|
+
};
|
|
4673
|
+
|
|
4567
4674
|
decoders['QueryChannelsResponse'] = (input?: { [key: string]: any }) => {
|
|
4568
4675
|
const typeMappings: TypeMapping = {
|
|
4569
4676
|
channels: { type: 'ChannelStateResponseFields', isSingle: false },
|
|
@@ -4762,6 +4869,15 @@ decoders['QueryRevisionHistoryResponse'] = (input?: { [key: string]: any }) => {
|
|
|
4762
4869
|
return decode(typeMappings, input);
|
|
4763
4870
|
};
|
|
4764
4871
|
|
|
4872
|
+
decoders['QueryScheduledMessagesResponse'] = (input?: {
|
|
4873
|
+
[key: string]: any;
|
|
4874
|
+
}) => {
|
|
4875
|
+
const typeMappings: TypeMapping = {
|
|
4876
|
+
scheduled_messages: { type: 'ScheduledMessageResponse', isSingle: false },
|
|
4877
|
+
};
|
|
4878
|
+
return decode(typeMappings, input);
|
|
4879
|
+
};
|
|
4880
|
+
|
|
4765
4881
|
decoders['QuerySegmentTargetsResponse'] = (input?: { [key: string]: any }) => {
|
|
4766
4882
|
const typeMappings: TypeMapping = {
|
|
4767
4883
|
targets: { type: 'SegmentTargetResponse', isSingle: false },
|
|
@@ -5104,6 +5220,8 @@ decoders['ReviewQueueItemResponse'] = (input?: { [key: string]: any }) => {
|
|
|
5104
5220
|
|
|
5105
5221
|
message: { type: 'ChatMessageResponse', isSingle: true },
|
|
5106
5222
|
|
|
5223
|
+
poll: { type: 'PollResponseData', isSingle: true },
|
|
5224
|
+
|
|
5107
5225
|
reaction: { type: 'Reaction', isSingle: true },
|
|
5108
5226
|
};
|
|
5109
5227
|
return decode(typeMappings, input);
|
|
@@ -5199,6 +5317,65 @@ decoders['SIPTrunkResponse'] = (input?: { [key: string]: any }) => {
|
|
|
5199
5317
|
return decode(typeMappings, input);
|
|
5200
5318
|
};
|
|
5201
5319
|
|
|
5320
|
+
decoders['ScheduledMessageContentResponse'] = (input?: {
|
|
5321
|
+
[key: string]: any;
|
|
5322
|
+
}) => {
|
|
5323
|
+
const typeMappings: TypeMapping = {
|
|
5324
|
+
pin_expires: { type: 'DatetimeType', isSingle: true },
|
|
5325
|
+
|
|
5326
|
+
shared_location: { type: 'ScheduledMessageLocation', isSingle: true },
|
|
5327
|
+
};
|
|
5328
|
+
return decode(typeMappings, input);
|
|
5329
|
+
};
|
|
5330
|
+
|
|
5331
|
+
decoders['ScheduledMessageFailedEvent'] = (input?: { [key: string]: any }) => {
|
|
5332
|
+
const typeMappings: TypeMapping = {
|
|
5333
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
5334
|
+
|
|
5335
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
5336
|
+
|
|
5337
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
5338
|
+
|
|
5339
|
+
scheduled_message: { type: 'ScheduledMessageResponse', isSingle: true },
|
|
5340
|
+
};
|
|
5341
|
+
return decode(typeMappings, input);
|
|
5342
|
+
};
|
|
5343
|
+
|
|
5344
|
+
decoders['ScheduledMessageLocation'] = (input?: { [key: string]: any }) => {
|
|
5345
|
+
const typeMappings: TypeMapping = {
|
|
5346
|
+
end_at: { type: 'DatetimeType', isSingle: true },
|
|
5347
|
+
};
|
|
5348
|
+
return decode(typeMappings, input);
|
|
5349
|
+
};
|
|
5350
|
+
|
|
5351
|
+
decoders['ScheduledMessageResponse'] = (input?: { [key: string]: any }) => {
|
|
5352
|
+
const typeMappings: TypeMapping = {
|
|
5353
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
5354
|
+
|
|
5355
|
+
scheduled_at: { type: 'DatetimeType', isSingle: true },
|
|
5356
|
+
|
|
5357
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
5358
|
+
|
|
5359
|
+
message: { type: 'ScheduledMessageContentResponse', isSingle: true },
|
|
5360
|
+
|
|
5361
|
+
user: { type: 'UserResponse', isSingle: true },
|
|
5362
|
+
};
|
|
5363
|
+
return decode(typeMappings, input);
|
|
5364
|
+
};
|
|
5365
|
+
|
|
5366
|
+
decoders['ScheduledMessageSentEvent'] = (input?: { [key: string]: any }) => {
|
|
5367
|
+
const typeMappings: TypeMapping = {
|
|
5368
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
5369
|
+
|
|
5370
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
5371
|
+
|
|
5372
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
5373
|
+
|
|
5374
|
+
scheduled_message: { type: 'ScheduledMessageResponse', isSingle: true },
|
|
5375
|
+
};
|
|
5376
|
+
return decode(typeMappings, input);
|
|
5377
|
+
};
|
|
5378
|
+
|
|
5202
5379
|
decoders['SearchResponse'] = (input?: { [key: string]: any }) => {
|
|
5203
5380
|
const typeMappings: TypeMapping = {
|
|
5204
5381
|
results: { type: 'SearchResult', isSingle: false },
|
|
@@ -5306,6 +5483,8 @@ decoders['SendMessageResponse'] = (input?: { [key: string]: any }) => {
|
|
|
5306
5483
|
message: { type: 'MessageResponse', isSingle: true },
|
|
5307
5484
|
|
|
5308
5485
|
channel_context: { type: 'ChannelContextResponse', isSingle: true },
|
|
5486
|
+
|
|
5487
|
+
scheduled_message: { type: 'ScheduledMessageResponse', isSingle: true },
|
|
5309
5488
|
};
|
|
5310
5489
|
return decode(typeMappings, input);
|
|
5311
5490
|
};
|
|
@@ -5319,6 +5498,15 @@ decoders['SendReactionResponse'] = (input?: { [key: string]: any }) => {
|
|
|
5319
5498
|
return decode(typeMappings, input);
|
|
5320
5499
|
};
|
|
5321
5500
|
|
|
5501
|
+
decoders['SendScheduledMessageNowResponse'] = (input?: {
|
|
5502
|
+
[key: string]: any;
|
|
5503
|
+
}) => {
|
|
5504
|
+
const typeMappings: TypeMapping = {
|
|
5505
|
+
scheduled_message: { type: 'ScheduledMessageResponse', isSingle: true },
|
|
5506
|
+
};
|
|
5507
|
+
return decode(typeMappings, input);
|
|
5508
|
+
};
|
|
5509
|
+
|
|
5322
5510
|
decoders['SessionWarningResponse'] = (input?: { [key: string]: any }) => {
|
|
5323
5511
|
const typeMappings: TypeMapping = {
|
|
5324
5512
|
time: { type: 'DatetimeType', isSingle: true },
|
|
@@ -5416,6 +5604,13 @@ decoders['StartCampaignResponse'] = (input?: { [key: string]: any }) => {
|
|
|
5416
5604
|
return decode(typeMappings, input);
|
|
5417
5605
|
};
|
|
5418
5606
|
|
|
5607
|
+
decoders['StopCampaignResponse'] = (input?: { [key: string]: any }) => {
|
|
5608
|
+
const typeMappings: TypeMapping = {
|
|
5609
|
+
campaign: { type: 'CampaignResponse', isSingle: true },
|
|
5610
|
+
};
|
|
5611
|
+
return decode(typeMappings, input);
|
|
5612
|
+
};
|
|
5613
|
+
|
|
5419
5614
|
decoders['StopLiveResponse'] = (input?: { [key: string]: any }) => {
|
|
5420
5615
|
const typeMappings: TypeMapping = {
|
|
5421
5616
|
call: { type: 'CallResponse', isSingle: true },
|
|
@@ -5717,6 +5912,13 @@ decoders['UpdateCallTypeResponse'] = (input?: { [key: string]: any }) => {
|
|
|
5717
5912
|
return decode(typeMappings, input);
|
|
5718
5913
|
};
|
|
5719
5914
|
|
|
5915
|
+
decoders['UpdateCampaignResponse'] = (input?: { [key: string]: any }) => {
|
|
5916
|
+
const typeMappings: TypeMapping = {
|
|
5917
|
+
campaign: { type: 'CampaignResponse', isSingle: true },
|
|
5918
|
+
};
|
|
5919
|
+
return decode(typeMappings, input);
|
|
5920
|
+
};
|
|
5921
|
+
|
|
5720
5922
|
decoders['UpdateChannelPartialResponse'] = (input?: { [key: string]: any }) => {
|
|
5721
5923
|
const typeMappings: TypeMapping = {
|
|
5722
5924
|
members: { type: 'ChannelMemberResponse', isSingle: false },
|
|
@@ -5885,6 +6087,15 @@ decoders['UpdateSIPTrunkResponse'] = (input?: { [key: string]: any }) => {
|
|
|
5885
6087
|
return decode(typeMappings, input);
|
|
5886
6088
|
};
|
|
5887
6089
|
|
|
6090
|
+
decoders['UpdateScheduledMessageResponse'] = (input?: {
|
|
6091
|
+
[key: string]: any;
|
|
6092
|
+
}) => {
|
|
6093
|
+
const typeMappings: TypeMapping = {
|
|
6094
|
+
scheduled_message: { type: 'ScheduledMessageResponse', isSingle: true },
|
|
6095
|
+
};
|
|
6096
|
+
return decode(typeMappings, input);
|
|
6097
|
+
};
|
|
6098
|
+
|
|
5888
6099
|
decoders['UpdateSegmentResponse'] = (input?: { [key: string]: any }) => {
|
|
5889
6100
|
const typeMappings: TypeMapping = {
|
|
5890
6101
|
segment: { type: 'SegmentResponse', isSingle: true },
|