@sylphx/sdk 0.32.5 → 0.32.9
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/dist/auth.d.ts +1 -1
- package/dist/broker.d.ts +61 -1
- package/dist/broker.js +33 -1
- package/dist/broker.js.map +1 -1
- package/dist/events.d.ts +738 -3
- package/dist/events.js +575 -2
- package/dist/events.js.map +1 -1
- package/dist/ids.d.ts +25 -0
- package/dist/ids.js +5 -0
- package/dist/ids.js.map +1 -1
- package/dist/methods.js +367 -2
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +332 -2
- package/dist/money.js +284 -0
- package/dist/money.js.map +1 -1
- package/dist/notify.d.ts +94 -3
- package/dist/notify.js +53 -0
- package/dist/notify.js.map +1 -1
- package/dist/observability.d.ts +15 -2
- package/dist/observability.js +2 -0
- package/dist/observability.js.map +1 -1
- package/package.json +1 -1
package/dist/events.js
CHANGED
|
@@ -9,6 +9,89 @@ runtime.registerSchemas({
|
|
|
9
9
|
'sylphx.events.v1.AckQueueMessagesResponse': [
|
|
10
10
|
['staleLeases', 'stale_leases', 'sylphx.events.v1.MessageLease'],
|
|
11
11
|
],
|
|
12
|
+
'sylphx.events.v1.BindChatIdentityRequest': [
|
|
13
|
+
['sourceClientId', 'source_client_id'],
|
|
14
|
+
['linkReceiptId', 'link_receipt_id'],
|
|
15
|
+
],
|
|
16
|
+
'sylphx.events.v1.ChatChannelPolicy': [
|
|
17
|
+
['termsVersion', 'terms_version'],
|
|
18
|
+
['messagesPerMinute', 'messages_per_minute'],
|
|
19
|
+
['participantIds', 'participant_ids'],
|
|
20
|
+
['titleId', 'title_id'],
|
|
21
|
+
],
|
|
22
|
+
'sylphx.events.v1.ChatCosmetics': [
|
|
23
|
+
['avatarFrameId', 'avatar_frame_id'],
|
|
24
|
+
['nameColorId', 'name_color_id'],
|
|
25
|
+
['titleBadgeId', 'title_badge_id'],
|
|
26
|
+
],
|
|
27
|
+
'sylphx.events.v1.ChatImage': [
|
|
28
|
+
['contentUri', 'content_uri'],
|
|
29
|
+
],
|
|
30
|
+
'sylphx.events.v1.ChatLocation': [],
|
|
31
|
+
'sylphx.events.v1.ChatMediaReview': [
|
|
32
|
+
['contentUri', 'content_uri'],
|
|
33
|
+
['uploaderId', 'uploader_id'],
|
|
34
|
+
],
|
|
35
|
+
'sylphx.events.v1.ChatMessageContent': [
|
|
36
|
+
['image', 'image', 'sylphx.events.v1.ChatImage'],
|
|
37
|
+
['location', 'location', 'sylphx.events.v1.ChatLocation'],
|
|
38
|
+
['poll', 'poll', 'sylphx.events.v1.ChatPoll'],
|
|
39
|
+
['roomInvite', 'room_invite'],
|
|
40
|
+
['replyToCursor', 'reply_to_cursor'],
|
|
41
|
+
['mentionedClientIds', 'mentioned_client_ids'],
|
|
42
|
+
['sticker', 'sticker', 'sylphx.events.v1.ChatSticker'],
|
|
43
|
+
],
|
|
44
|
+
'sylphx.events.v1.ChatPoll': [],
|
|
45
|
+
'sylphx.events.v1.ChatProfile': [
|
|
46
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
47
|
+
['termsVersion', 'terms_version'],
|
|
48
|
+
['displayName', 'display_name'],
|
|
49
|
+
['allowStrangerImages', 'allow_stranger_images'],
|
|
50
|
+
['quietHoursStartUtcMinute', 'quiet_hours_start_utc_minute'],
|
|
51
|
+
['quietHoursEndUtcMinute', 'quiet_hours_end_utc_minute'],
|
|
52
|
+
['cosmetics', 'cosmetics', 'sylphx.events.v1.ChatCosmetics'],
|
|
53
|
+
],
|
|
54
|
+
'sylphx.events.v1.ChatPushDeviceRegistration': [
|
|
55
|
+
['recipientName', 'recipient_name'],
|
|
56
|
+
['recipientUid', 'recipient_uid'],
|
|
57
|
+
['registrationId', 'registration_id'],
|
|
58
|
+
['registrationGeneration', 'registration_generation'],
|
|
59
|
+
['applicationServerKey', 'application_server_key'],
|
|
60
|
+
],
|
|
61
|
+
'sylphx.events.v1.ChatReaction': [
|
|
62
|
+
['clientIds', 'client_ids'],
|
|
63
|
+
],
|
|
64
|
+
'sylphx.events.v1.ChatRelationship': [
|
|
65
|
+
['clientId', 'client_id'],
|
|
66
|
+
['peerId', 'peer_id'],
|
|
67
|
+
['peer', 'peer', 'sylphx.events.v1.ChatProfile'],
|
|
68
|
+
],
|
|
69
|
+
'sylphx.events.v1.ChatReport': [
|
|
70
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
71
|
+
['reporterId', 'reporter_id'],
|
|
72
|
+
['targetType', 'target_type'],
|
|
73
|
+
['targetId', 'target_id'],
|
|
74
|
+
['dueTime', 'due_time'],
|
|
75
|
+
],
|
|
76
|
+
'sylphx.events.v1.ChatSender': [
|
|
77
|
+
['clientId', 'client_id'],
|
|
78
|
+
['displayName', 'display_name'],
|
|
79
|
+
['cosmetics', 'cosmetics', 'sylphx.events.v1.ChatCosmetics'],
|
|
80
|
+
],
|
|
81
|
+
'sylphx.events.v1.ChatSticker': [
|
|
82
|
+
['packId', 'pack_id'],
|
|
83
|
+
['stickerId', 'sticker_id'],
|
|
84
|
+
['contentUri', 'content_uri'],
|
|
85
|
+
['mimeType', 'mime_type'],
|
|
86
|
+
],
|
|
87
|
+
'sylphx.events.v1.ChatStickerAsset': [
|
|
88
|
+
['sticker', 'sticker', 'sylphx.events.v1.ChatSticker'],
|
|
89
|
+
],
|
|
90
|
+
'sylphx.events.v1.ChatStickerPack': [
|
|
91
|
+
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
92
|
+
['displayName', 'display_name'],
|
|
93
|
+
['assets', 'assets', 'sylphx.events.v1.ChatStickerAsset'],
|
|
94
|
+
],
|
|
12
95
|
'sylphx.events.v1.CloudEvent': [
|
|
13
96
|
['eventTime', 'event_time'],
|
|
14
97
|
['dataContentType', 'data_content_type'],
|
|
@@ -16,6 +99,14 @@ runtime.registerSchemas({
|
|
|
16
99
|
['data', 'data', undefined, 'json'],
|
|
17
100
|
['extensions', 'extensions', undefined, 'map'],
|
|
18
101
|
],
|
|
102
|
+
'sylphx.events.v1.ConfigureChatProfileRequest': [
|
|
103
|
+
['termsVersion', 'terms_version'],
|
|
104
|
+
['displayName', 'display_name'],
|
|
105
|
+
['allowStrangerImages', 'allow_stranger_images'],
|
|
106
|
+
['quietHoursStartUtcMinute', 'quiet_hours_start_utc_minute'],
|
|
107
|
+
['quietHoursEndUtcMinute', 'quiet_hours_end_utc_minute'],
|
|
108
|
+
['cosmetics', 'cosmetics', 'sylphx.events.v1.ChatCosmetics'],
|
|
109
|
+
],
|
|
19
110
|
'sylphx.events.v1.Connector': [
|
|
20
111
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
21
112
|
['displayName', 'display_name'],
|
|
@@ -93,13 +184,17 @@ runtime.registerSchemas({
|
|
|
93
184
|
['extensions', 'extensions', undefined, 'map'],
|
|
94
185
|
['admitTime', 'admit_time'],
|
|
95
186
|
],
|
|
187
|
+
'sylphx.events.v1.GetChatProfileRequest': [],
|
|
188
|
+
'sylphx.events.v1.GetChatStickerPackRequest': [],
|
|
96
189
|
'sylphx.events.v1.GetConnectorRequest': [],
|
|
97
190
|
'sylphx.events.v1.GetEventRequest': [],
|
|
98
191
|
'sylphx.events.v1.GetInboundEndpointRequest': [],
|
|
99
192
|
'sylphx.events.v1.GetQueueRequest': [],
|
|
100
193
|
'sylphx.events.v1.GetRealtimeChannelRequest': [],
|
|
101
194
|
'sylphx.events.v1.GetRealtimeMemberRequest': [],
|
|
102
|
-
'sylphx.events.v1.GetRealtimeMessageRequest': [
|
|
195
|
+
'sylphx.events.v1.GetRealtimeMessageRequest': [
|
|
196
|
+
['clientId', 'client_id'],
|
|
197
|
+
],
|
|
103
198
|
'sylphx.events.v1.GetSubscriptionRequest': [],
|
|
104
199
|
'sylphx.events.v1.GetTopicRequest': [],
|
|
105
200
|
'sylphx.events.v1.GetWebhookDeliveryRequest': [],
|
|
@@ -120,6 +215,11 @@ runtime.registerSchemas({
|
|
|
120
215
|
['lastReceiveTime', 'last_receive_time'],
|
|
121
216
|
['rejectedCount', 'rejected_count'],
|
|
122
217
|
],
|
|
218
|
+
'sylphx.events.v1.IssueChatTokenRequest': [],
|
|
219
|
+
'sylphx.events.v1.IssueChatTokenResponse': [
|
|
220
|
+
['expireTime', 'expire_time'],
|
|
221
|
+
['clientId', 'client_id'],
|
|
222
|
+
],
|
|
123
223
|
'sylphx.events.v1.IssueRealtimeChannelTokenRequest': [
|
|
124
224
|
['clientId', 'client_id'],
|
|
125
225
|
['clientData', 'client_data', undefined, 'json'],
|
|
@@ -128,6 +228,9 @@ runtime.registerSchemas({
|
|
|
128
228
|
['expireTime', 'expire_time'],
|
|
129
229
|
['connectUri', 'connect_uri'],
|
|
130
230
|
],
|
|
231
|
+
'sylphx.events.v1.JoinRealtimeChannelRequest': [
|
|
232
|
+
['clientId', 'client_id'],
|
|
233
|
+
],
|
|
131
234
|
'sylphx.events.v1.LeaseQueueMessagesRequest': [
|
|
132
235
|
['maxMessages', 'max_messages'],
|
|
133
236
|
['visibilityTimeout', 'visibility_timeout'],
|
|
@@ -142,6 +245,33 @@ runtime.registerSchemas({
|
|
|
142
245
|
['deliveryCount', 'delivery_count'],
|
|
143
246
|
['leaseExpireTime', 'lease_expire_time'],
|
|
144
247
|
],
|
|
248
|
+
'sylphx.events.v1.LeaveRealtimeChannelRequest': [
|
|
249
|
+
['clientId', 'client_id'],
|
|
250
|
+
],
|
|
251
|
+
'sylphx.events.v1.ListChatRelationshipsRequest': [
|
|
252
|
+
['pageSize', 'page_size'],
|
|
253
|
+
['pageToken', 'page_token'],
|
|
254
|
+
],
|
|
255
|
+
'sylphx.events.v1.ListChatRelationshipsResponse': [
|
|
256
|
+
['relationships', 'relationships', 'sylphx.events.v1.ChatRelationship'],
|
|
257
|
+
['nextPageToken', 'next_page_token'],
|
|
258
|
+
],
|
|
259
|
+
'sylphx.events.v1.ListChatReportsRequest': [
|
|
260
|
+
['pageSize', 'page_size'],
|
|
261
|
+
['pageToken', 'page_token'],
|
|
262
|
+
],
|
|
263
|
+
'sylphx.events.v1.ListChatReportsResponse': [
|
|
264
|
+
['chatReports', 'chat_reports', 'sylphx.events.v1.ChatReport'],
|
|
265
|
+
['nextPageToken', 'next_page_token'],
|
|
266
|
+
],
|
|
267
|
+
'sylphx.events.v1.ListChatStickerPacksRequest': [
|
|
268
|
+
['pageSize', 'page_size'],
|
|
269
|
+
['pageToken', 'page_token'],
|
|
270
|
+
],
|
|
271
|
+
'sylphx.events.v1.ListChatStickerPacksResponse': [
|
|
272
|
+
['chatStickerPacks', 'chat_sticker_packs', 'sylphx.events.v1.ChatStickerPack'],
|
|
273
|
+
['nextPageToken', 'next_page_token'],
|
|
274
|
+
],
|
|
145
275
|
'sylphx.events.v1.ListConnectorsRequest': [
|
|
146
276
|
['pageSize', 'page_size'],
|
|
147
277
|
['pageToken', 'page_token'],
|
|
@@ -198,6 +328,9 @@ runtime.registerSchemas({
|
|
|
198
328
|
'sylphx.events.v1.ListRealtimeMessagesRequest': [
|
|
199
329
|
['pageSize', 'page_size'],
|
|
200
330
|
['pageToken', 'page_token'],
|
|
331
|
+
['clientId', 'client_id'],
|
|
332
|
+
['afterCursor', 'after_cursor'],
|
|
333
|
+
['beforeCursor', 'before_cursor'],
|
|
201
334
|
],
|
|
202
335
|
'sylphx.events.v1.ListRealtimeMessagesResponse': [
|
|
203
336
|
['realtimeMessages', 'realtime_messages', 'sylphx.events.v1.RealtimeMessage'],
|
|
@@ -239,6 +372,10 @@ runtime.registerSchemas({
|
|
|
239
372
|
['webhookEndpoints', 'webhook_endpoints', 'sylphx.events.v1.WebhookEndpoint'],
|
|
240
373
|
['nextPageToken', 'next_page_token'],
|
|
241
374
|
],
|
|
375
|
+
'sylphx.events.v1.MergeChatIdentityRequest': [
|
|
376
|
+
['sourceClientId', 'source_client_id'],
|
|
377
|
+
['linkReceiptId', 'link_receipt_id'],
|
|
378
|
+
],
|
|
242
379
|
'sylphx.events.v1.MessageLease': [
|
|
243
380
|
['messageId', 'message_id'],
|
|
244
381
|
['leaseGeneration', 'lease_generation'],
|
|
@@ -259,6 +396,7 @@ runtime.registerSchemas({
|
|
|
259
396
|
['messageType', 'message_type'],
|
|
260
397
|
['data', 'data', undefined, 'json'],
|
|
261
398
|
['clientId', 'client_id'],
|
|
399
|
+
['content', 'content', 'sylphx.events.v1.ChatMessageContent'],
|
|
262
400
|
],
|
|
263
401
|
'sylphx.events.v1.PublishRealtimeMessagesResponse': [
|
|
264
402
|
['realtimeMessage', 'realtime_message', 'sylphx.events.v1.RealtimeMessage'],
|
|
@@ -288,6 +426,12 @@ runtime.registerSchemas({
|
|
|
288
426
|
['leasedCount', 'leased_count'],
|
|
289
427
|
['deadLetterCount', 'dead_letter_count'],
|
|
290
428
|
],
|
|
429
|
+
'sylphx.events.v1.ReactRealtimeMessageRequest': [
|
|
430
|
+
['clientId', 'client_id'],
|
|
431
|
+
],
|
|
432
|
+
'sylphx.events.v1.ReadRealtimeMemberRequest': [
|
|
433
|
+
['lastReadCursor', 'last_read_cursor'],
|
|
434
|
+
],
|
|
291
435
|
'sylphx.events.v1.RealtimeChannel': [
|
|
292
436
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
293
437
|
['spec', 'spec', 'sylphx.events.v1.RealtimeChannelSpec'],
|
|
@@ -296,6 +440,7 @@ runtime.registerSchemas({
|
|
|
296
440
|
'sylphx.events.v1.RealtimeChannelSpec': [
|
|
297
441
|
['publishableOk', 'publishable_ok'],
|
|
298
442
|
['historyRetention', 'history_retention'],
|
|
443
|
+
['chat', 'chat', 'sylphx.events.v1.ChatChannelPolicy'],
|
|
299
444
|
],
|
|
300
445
|
'sylphx.events.v1.RealtimeChannelStatus': [
|
|
301
446
|
['observedGeneration', 'observed_generation'],
|
|
@@ -310,6 +455,8 @@ runtime.registerSchemas({
|
|
|
310
455
|
['data', 'data', undefined, 'json'],
|
|
311
456
|
['enterTime', 'enter_time'],
|
|
312
457
|
['connectionCount', 'connection_count'],
|
|
458
|
+
['lastReadCursor', 'last_read_cursor'],
|
|
459
|
+
['unreadCount', 'unread_count'],
|
|
313
460
|
],
|
|
314
461
|
'sylphx.events.v1.RealtimeMessage': [
|
|
315
462
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
@@ -317,6 +464,12 @@ runtime.registerSchemas({
|
|
|
317
464
|
['data', 'data', undefined, 'json'],
|
|
318
465
|
['clientId', 'client_id'],
|
|
319
466
|
['publishTime', 'publish_time'],
|
|
467
|
+
['content', 'content', 'sylphx.events.v1.ChatMessageContent'],
|
|
468
|
+
['sender', 'sender', 'sylphx.events.v1.ChatSender'],
|
|
469
|
+
['reactions', 'reactions', 'sylphx.events.v1.ChatReaction'],
|
|
470
|
+
],
|
|
471
|
+
'sylphx.events.v1.RegisterChatPushDeviceRequest': [
|
|
472
|
+
['deviceToken', 'device_token'],
|
|
320
473
|
],
|
|
321
474
|
'sylphx.events.v1.ReplayQueueRequest': [
|
|
322
475
|
['startTime', 'start_time'],
|
|
@@ -333,6 +486,14 @@ runtime.registerSchemas({
|
|
|
333
486
|
'sylphx.events.v1.ReplayWebhookEndpointResponse': [
|
|
334
487
|
['replayedCount', 'replayed_count'],
|
|
335
488
|
],
|
|
489
|
+
'sylphx.events.v1.ReportChatContentRequest': [
|
|
490
|
+
['targetType', 'target_type'],
|
|
491
|
+
['targetId', 'target_id'],
|
|
492
|
+
],
|
|
493
|
+
'sylphx.events.v1.ResolveChatReportRequest': [],
|
|
494
|
+
'sylphx.events.v1.ReviewChatMediaRequest': [
|
|
495
|
+
['contentUri', 'content_uri'],
|
|
496
|
+
],
|
|
336
497
|
'sylphx.events.v1.RotateWebhookEndpointSecretRequest': [],
|
|
337
498
|
'sylphx.events.v1.SendQueueMessagesRequest': [
|
|
338
499
|
['events', 'events', 'sylphx.events.v1.CloudEvent'],
|
|
@@ -340,6 +501,10 @@ runtime.registerSchemas({
|
|
|
340
501
|
'sylphx.events.v1.SendQueueMessagesResponse': [
|
|
341
502
|
['messageIds', 'message_ids'],
|
|
342
503
|
],
|
|
504
|
+
'sylphx.events.v1.SetChatOfficialStatusRequest': [],
|
|
505
|
+
'sylphx.events.v1.SetChatRelationshipRequest': [
|
|
506
|
+
['peerId', 'peer_id'],
|
|
507
|
+
],
|
|
343
508
|
'sylphx.events.v1.Subscription': [
|
|
344
509
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
345
510
|
['spec', 'spec', 'sylphx.events.v1.SubscriptionSpec'],
|
|
@@ -367,6 +532,9 @@ runtime.registerSchemas({
|
|
|
367
532
|
['observedGeneration', 'observed_generation'],
|
|
368
533
|
['conditions', 'conditions', 'sylphx.common.v1.Condition'],
|
|
369
534
|
],
|
|
535
|
+
'sylphx.events.v1.UnregisterChatPushDeviceRequest': [
|
|
536
|
+
['registration', 'registration', 'sylphx.events.v1.ChatPushDeviceRegistration'],
|
|
537
|
+
],
|
|
370
538
|
'sylphx.events.v1.UpdateInboundEndpointRequest': [
|
|
371
539
|
['inboundEndpoint', 'inbound_endpoint', 'sylphx.events.v1.InboundEndpoint'],
|
|
372
540
|
['updateMask', 'update_mask'],
|
|
@@ -403,6 +571,10 @@ runtime.registerSchemas({
|
|
|
403
571
|
['allowMissing', 'allow_missing'],
|
|
404
572
|
['validateOnly', 'validate_only'],
|
|
405
573
|
],
|
|
574
|
+
'sylphx.events.v1.UpsertChatStickerPackRequest': [
|
|
575
|
+
['displayName', 'display_name'],
|
|
576
|
+
['assets', 'assets', 'sylphx.events.v1.ChatStickerAsset'],
|
|
577
|
+
],
|
|
406
578
|
'sylphx.events.v1.WebhookDelivery': [
|
|
407
579
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
408
580
|
['attempts', 'attempts', 'sylphx.events.v1.DeliveryAttempt'],
|
|
@@ -459,6 +631,12 @@ export class EventsApi {
|
|
|
459
631
|
realtimeMessages;
|
|
460
632
|
/** The `realtime_members` collection. */
|
|
461
633
|
realtimeMembers;
|
|
634
|
+
/** The `chat_profiles` collection. */
|
|
635
|
+
chatProfiles;
|
|
636
|
+
/** The `chat_reports` collection. */
|
|
637
|
+
chatReports;
|
|
638
|
+
/** The `chat_sticker_packs` collection. */
|
|
639
|
+
chatStickerPacks;
|
|
462
640
|
constructor(client) {
|
|
463
641
|
this.topics = new TopicsCollection(client);
|
|
464
642
|
this.events = new EventsCollection(client);
|
|
@@ -471,6 +649,9 @@ export class EventsApi {
|
|
|
471
649
|
this.realtimeChannels = new RealtimeChannelsCollection(client);
|
|
472
650
|
this.realtimeMessages = new RealtimeMessagesCollection(client);
|
|
473
651
|
this.realtimeMembers = new RealtimeMembersCollection(client);
|
|
652
|
+
this.chatProfiles = new ChatProfilesCollection(client);
|
|
653
|
+
this.chatReports = new ChatReportsCollection(client);
|
|
654
|
+
this.chatStickerPacks = new ChatStickerPacksCollection(client);
|
|
474
655
|
}
|
|
475
656
|
}
|
|
476
657
|
/** `topics` of Sylphx Events: Resource type `events.sylphx.com/Topic`. */
|
|
@@ -1456,6 +1637,39 @@ export class RealtimeChannelsCollection {
|
|
|
1456
1637
|
mutation: true,
|
|
1457
1638
|
});
|
|
1458
1639
|
}
|
|
1640
|
+
/**
|
|
1641
|
+
* Joins a persistent Chat conversation.
|
|
1642
|
+
*
|
|
1643
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*}:join` · permission `events:write` · effect `write`
|
|
1644
|
+
*
|
|
1645
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1646
|
+
*/
|
|
1647
|
+
async join(request) {
|
|
1648
|
+
return this.client.call({
|
|
1649
|
+
method: 'POST',
|
|
1650
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/realtime_channels/*', 'name')}:join`,
|
|
1651
|
+
body: runtime.omit(request, ['name']),
|
|
1652
|
+
bodyType: 'sylphx.events.v1.JoinRealtimeChannelRequest',
|
|
1653
|
+
responseType: 'sylphx.events.v1.RealtimeMember',
|
|
1654
|
+
mutation: true,
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
/**
|
|
1658
|
+
* Leaves Chat while retaining durable read state.
|
|
1659
|
+
*
|
|
1660
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*}:leave` · permission `events:write` · effect `write`
|
|
1661
|
+
*
|
|
1662
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1663
|
+
*/
|
|
1664
|
+
async leave(request) {
|
|
1665
|
+
return this.client.call({
|
|
1666
|
+
method: 'POST',
|
|
1667
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/realtime_channels/*', 'name')}:leave`,
|
|
1668
|
+
body: runtime.omit(request, ['name']),
|
|
1669
|
+
bodyType: 'sylphx.events.v1.LeaveRealtimeChannelRequest',
|
|
1670
|
+
mutation: true,
|
|
1671
|
+
});
|
|
1672
|
+
}
|
|
1459
1673
|
}
|
|
1460
1674
|
/** `realtime_messages` of Sylphx Events: Resource type `events.sylphx.com/RealtimeMessage`. */
|
|
1461
1675
|
export class RealtimeMessagesCollection {
|
|
@@ -1474,6 +1688,7 @@ export class RealtimeMessagesCollection {
|
|
|
1474
1688
|
return this.client.call({
|
|
1475
1689
|
method: 'GET',
|
|
1476
1690
|
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/realtime_channels/*/realtime_messages/*', 'name')}`,
|
|
1691
|
+
query: { client_id: request.clientId },
|
|
1477
1692
|
responseType: 'sylphx.events.v1.RealtimeMessage',
|
|
1478
1693
|
mutation: false,
|
|
1479
1694
|
});
|
|
@@ -1489,7 +1704,7 @@ export class RealtimeMessagesCollection {
|
|
|
1489
1704
|
return this.client.call({
|
|
1490
1705
|
method: 'GET',
|
|
1491
1706
|
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/realtime_channels/*', 'parent')}/realtime_messages`,
|
|
1492
|
-
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
|
|
1707
|
+
query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, client_id: request.clientId, after_cursor: request.afterCursor, before_cursor: request.beforeCursor },
|
|
1493
1708
|
responseType: 'sylphx.events.v1.ListRealtimeMessagesResponse',
|
|
1494
1709
|
mutation: false,
|
|
1495
1710
|
});
|
|
@@ -1505,6 +1720,23 @@ export class RealtimeMessagesCollection {
|
|
|
1505
1720
|
next = { ...request, pageToken: page.nextPageToken };
|
|
1506
1721
|
}
|
|
1507
1722
|
}
|
|
1723
|
+
/**
|
|
1724
|
+
* Adds or removes a member reaction on a visible Chat message.
|
|
1725
|
+
*
|
|
1726
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*\/realtime_messages/*}:react` · permission `events:write` · effect `write`
|
|
1727
|
+
*
|
|
1728
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_NOT_FOUND`.
|
|
1729
|
+
*/
|
|
1730
|
+
async react(request) {
|
|
1731
|
+
return this.client.call({
|
|
1732
|
+
method: 'POST',
|
|
1733
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/realtime_channels/*/realtime_messages/*', 'name')}:react`,
|
|
1734
|
+
body: runtime.omit(request, ['name']),
|
|
1735
|
+
bodyType: 'sylphx.events.v1.ReactRealtimeMessageRequest',
|
|
1736
|
+
responseType: 'sylphx.events.v1.RealtimeMessage',
|
|
1737
|
+
mutation: true,
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1508
1740
|
}
|
|
1509
1741
|
/** `realtime_members` of Sylphx Events: Resource type `events.sylphx.com/RealtimeMember`. */
|
|
1510
1742
|
export class RealtimeMembersCollection {
|
|
@@ -1554,5 +1786,346 @@ export class RealtimeMembersCollection {
|
|
|
1554
1786
|
next = { ...request, pageToken: page.nextPageToken };
|
|
1555
1787
|
}
|
|
1556
1788
|
}
|
|
1789
|
+
/**
|
|
1790
|
+
* Advances a member read cursor monotonically and sets mute.
|
|
1791
|
+
*
|
|
1792
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/realtime_channels/*\/realtime_members/*}:read` · permission `events:write` · effect `write`
|
|
1793
|
+
*
|
|
1794
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1795
|
+
*/
|
|
1796
|
+
async read(request) {
|
|
1797
|
+
return this.client.call({
|
|
1798
|
+
method: 'POST',
|
|
1799
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/realtime_channels/*/realtime_members/*', 'name')}:read`,
|
|
1800
|
+
body: runtime.omit(request, ['name']),
|
|
1801
|
+
bodyType: 'sylphx.events.v1.ReadRealtimeMemberRequest',
|
|
1802
|
+
responseType: 'sylphx.events.v1.RealtimeMember',
|
|
1803
|
+
mutation: true,
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
/** `chat_profiles` of Sylphx Events: Resource type `events.sylphx.com/ChatProfile`. */
|
|
1808
|
+
export class ChatProfilesCollection {
|
|
1809
|
+
client;
|
|
1810
|
+
constructor(client) {
|
|
1811
|
+
this.client = client;
|
|
1812
|
+
}
|
|
1813
|
+
/**
|
|
1814
|
+
* Gets a Chat profile and fresh presence.
|
|
1815
|
+
*
|
|
1816
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}` · permission `events:read` · effect `read`
|
|
1817
|
+
*
|
|
1818
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1819
|
+
*/
|
|
1820
|
+
async get(request) {
|
|
1821
|
+
return this.client.call({
|
|
1822
|
+
method: 'GET',
|
|
1823
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}`,
|
|
1824
|
+
responseType: 'sylphx.events.v1.ChatProfile',
|
|
1825
|
+
mutation: false,
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
/**
|
|
1829
|
+
* Configures an authenticated Chat identity through its trusted backend.
|
|
1830
|
+
*
|
|
1831
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:configure` · permission `events:write` · effect `write`
|
|
1832
|
+
*
|
|
1833
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1834
|
+
*/
|
|
1835
|
+
async configure(request) {
|
|
1836
|
+
return this.client.call({
|
|
1837
|
+
method: 'POST',
|
|
1838
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}:configure`,
|
|
1839
|
+
body: runtime.omit(request, ['name']),
|
|
1840
|
+
bodyType: 'sylphx.events.v1.ConfigureChatProfileRequest',
|
|
1841
|
+
responseType: 'sylphx.events.v1.ChatProfile',
|
|
1842
|
+
mutation: true,
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Changes friendship or a bilateral interaction block.
|
|
1847
|
+
*
|
|
1848
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:setRelationship` · permission `events:write` · effect `write`
|
|
1849
|
+
*
|
|
1850
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1851
|
+
*/
|
|
1852
|
+
async setRelationship(request) {
|
|
1853
|
+
return this.client.call({
|
|
1854
|
+
method: 'POST',
|
|
1855
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}:setRelationship`,
|
|
1856
|
+
body: runtime.omit(request, ['name']),
|
|
1857
|
+
bodyType: 'sylphx.events.v1.SetChatRelationshipRequest',
|
|
1858
|
+
responseType: 'sylphx.events.v1.ChatRelationship',
|
|
1859
|
+
mutation: true,
|
|
1860
|
+
});
|
|
1861
|
+
}
|
|
1862
|
+
/**
|
|
1863
|
+
* Lists friends and pending requests with presence.
|
|
1864
|
+
*
|
|
1865
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:listRelationships` · permission `events:read` · effect `read`
|
|
1866
|
+
*
|
|
1867
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1868
|
+
*/
|
|
1869
|
+
async listRelationships(request) {
|
|
1870
|
+
return this.client.call({
|
|
1871
|
+
method: 'GET',
|
|
1872
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'parent')}:listRelationships`,
|
|
1873
|
+
query: { page_size: request.pageSize, page_token: request.pageToken },
|
|
1874
|
+
responseType: 'sylphx.events.v1.ListChatRelationshipsResponse',
|
|
1875
|
+
mutation: false,
|
|
1876
|
+
});
|
|
1877
|
+
}
|
|
1878
|
+
/**
|
|
1879
|
+
* Reports a message, image or user to the moderation queue.
|
|
1880
|
+
*
|
|
1881
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:report` · permission `events:write` · effect `write`
|
|
1882
|
+
*
|
|
1883
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1884
|
+
*/
|
|
1885
|
+
async report(request) {
|
|
1886
|
+
return this.client.call({
|
|
1887
|
+
method: 'POST',
|
|
1888
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}:report`,
|
|
1889
|
+
body: runtime.omit(request, ['name']),
|
|
1890
|
+
bodyType: 'sylphx.events.v1.ReportChatContentRequest',
|
|
1891
|
+
responseType: 'sylphx.events.v1.ChatReport',
|
|
1892
|
+
mutation: true,
|
|
1893
|
+
});
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* Registers an image and its automated moderation receipt.
|
|
1897
|
+
*
|
|
1898
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:reviewMedia` · permission `events:write` · effect `write`
|
|
1899
|
+
*
|
|
1900
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1901
|
+
*/
|
|
1902
|
+
async reviewMedia(request) {
|
|
1903
|
+
return this.client.call({
|
|
1904
|
+
method: 'POST',
|
|
1905
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}:reviewMedia`,
|
|
1906
|
+
body: runtime.omit(request, ['name']),
|
|
1907
|
+
bodyType: 'sylphx.events.v1.ReviewChatMediaRequest',
|
|
1908
|
+
responseType: 'sylphx.events.v1.ChatMediaReview',
|
|
1909
|
+
mutation: true,
|
|
1910
|
+
});
|
|
1911
|
+
}
|
|
1912
|
+
/**
|
|
1913
|
+
* Verifies an official account through a distinct administrator permission.
|
|
1914
|
+
*
|
|
1915
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:setOfficialStatus` · permission `events:chat:admin` · effect `write`
|
|
1916
|
+
*
|
|
1917
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
1918
|
+
*/
|
|
1919
|
+
async setOfficialStatus(request) {
|
|
1920
|
+
return this.client.call({
|
|
1921
|
+
method: 'POST',
|
|
1922
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}:setOfficialStatus`,
|
|
1923
|
+
body: runtime.omit(request, ['name']),
|
|
1924
|
+
bodyType: 'sylphx.events.v1.SetChatOfficialStatusRequest',
|
|
1925
|
+
responseType: 'sylphx.events.v1.ChatProfile',
|
|
1926
|
+
mutation: true,
|
|
1927
|
+
});
|
|
1928
|
+
}
|
|
1929
|
+
/**
|
|
1930
|
+
* Records an exact Auth-verified guest-to-platform identity link grant.
|
|
1931
|
+
*
|
|
1932
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:bindIdentity` · permission `events:chat:admin` · effect `write`
|
|
1933
|
+
*
|
|
1934
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1935
|
+
*/
|
|
1936
|
+
async bindIdentity(request) {
|
|
1937
|
+
return this.client.call({
|
|
1938
|
+
method: 'POST',
|
|
1939
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}:bindIdentity`,
|
|
1940
|
+
body: runtime.omit(request, ['name']),
|
|
1941
|
+
bodyType: 'sylphx.events.v1.BindChatIdentityRequest',
|
|
1942
|
+
responseType: 'sylphx.events.v1.ChatProfile',
|
|
1943
|
+
mutation: true,
|
|
1944
|
+
});
|
|
1945
|
+
}
|
|
1946
|
+
/**
|
|
1947
|
+
* Rehomes linked guest state without discarding messages or relationships.
|
|
1948
|
+
*
|
|
1949
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:mergeIdentity` · permission `events:chat:admin` · effect `write`
|
|
1950
|
+
*
|
|
1951
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
1952
|
+
*/
|
|
1953
|
+
async mergeIdentity(request) {
|
|
1954
|
+
return this.client.call({
|
|
1955
|
+
method: 'POST',
|
|
1956
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}:mergeIdentity`,
|
|
1957
|
+
body: runtime.omit(request, ['name']),
|
|
1958
|
+
bodyType: 'sylphx.events.v1.MergeChatIdentityRequest',
|
|
1959
|
+
responseType: 'sylphx.events.v1.ChatProfile',
|
|
1960
|
+
mutation: true,
|
|
1961
|
+
});
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Registers a browser device using only the authenticated Chat session.
|
|
1965
|
+
*
|
|
1966
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:registerPushDevice` · permission `events:write` · effect `write`
|
|
1967
|
+
*
|
|
1968
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`, `INVALID_STATE`, `UNAVAILABLE`.
|
|
1969
|
+
*/
|
|
1970
|
+
async registerPushDevice(request) {
|
|
1971
|
+
return this.client.call({
|
|
1972
|
+
method: 'POST',
|
|
1973
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}:registerPushDevice`,
|
|
1974
|
+
body: runtime.omit(request, ['name']),
|
|
1975
|
+
bodyType: 'sylphx.events.v1.RegisterChatPushDeviceRequest',
|
|
1976
|
+
responseType: 'sylphx.events.v1.ChatPushDeviceRegistration',
|
|
1977
|
+
mutation: true,
|
|
1978
|
+
});
|
|
1979
|
+
}
|
|
1980
|
+
/**
|
|
1981
|
+
* Removes this session's exact upstream device epoch; stale logout is a no-op.
|
|
1982
|
+
*
|
|
1983
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:unregisterPushDevice` · permission `events:write` · effect `write`
|
|
1984
|
+
*
|
|
1985
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`, `UNAVAILABLE`.
|
|
1986
|
+
*/
|
|
1987
|
+
async unregisterPushDevice(request) {
|
|
1988
|
+
return this.client.call({
|
|
1989
|
+
method: 'POST',
|
|
1990
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}:unregisterPushDevice`,
|
|
1991
|
+
body: runtime.omit(request, ['name']),
|
|
1992
|
+
bodyType: 'sylphx.events.v1.UnregisterChatPushDeviceRequest',
|
|
1993
|
+
mutation: true,
|
|
1994
|
+
});
|
|
1995
|
+
}
|
|
1996
|
+
/**
|
|
1997
|
+
* Issues a bounded player capability after verified Auth token exchange.
|
|
1998
|
+
*
|
|
1999
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_profiles/*}:issueToken` · permission `events:write` · effect `write`
|
|
2000
|
+
*
|
|
2001
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_NOT_FOUND`, `UNAVAILABLE`.
|
|
2002
|
+
*/
|
|
2003
|
+
async issueToken(request) {
|
|
2004
|
+
return this.client.call({
|
|
2005
|
+
method: 'POST',
|
|
2006
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_profiles/*', 'name')}:issueToken`,
|
|
2007
|
+
body: runtime.omit(request, ['name']),
|
|
2008
|
+
bodyType: 'sylphx.events.v1.IssueChatTokenRequest',
|
|
2009
|
+
responseType: 'sylphx.events.v1.IssueChatTokenResponse',
|
|
2010
|
+
mutation: true,
|
|
2011
|
+
});
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
/** `chat_reports` of Sylphx Events: Resource type `events.sylphx.com/ChatReport`. */
|
|
2015
|
+
export class ChatReportsCollection {
|
|
2016
|
+
client;
|
|
2017
|
+
constructor(client) {
|
|
2018
|
+
this.client = client;
|
|
2019
|
+
}
|
|
2020
|
+
/**
|
|
2021
|
+
* Lists the moderation queue.
|
|
2022
|
+
*
|
|
2023
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/chat_reports` · permission `events:read` · effect `read`
|
|
2024
|
+
*
|
|
2025
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2026
|
+
*/
|
|
2027
|
+
async list(request) {
|
|
2028
|
+
return this.client.call({
|
|
2029
|
+
method: 'GET',
|
|
2030
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/chat_reports`,
|
|
2031
|
+
query: { page_size: request.pageSize, page_token: request.pageToken },
|
|
2032
|
+
responseType: 'sylphx.events.v1.ListChatReportsResponse',
|
|
2033
|
+
mutation: false,
|
|
2034
|
+
});
|
|
2035
|
+
}
|
|
2036
|
+
/** Every item of every page of `list`. */
|
|
2037
|
+
async *listAll(request) {
|
|
2038
|
+
let next = request;
|
|
2039
|
+
for (;;) {
|
|
2040
|
+
const page = await this.list(next);
|
|
2041
|
+
yield* page.chatReports ?? [];
|
|
2042
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2043
|
+
return;
|
|
2044
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
/**
|
|
2048
|
+
* Records a moderation response.
|
|
2049
|
+
*
|
|
2050
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_reports/*}:resolve` · permission `events:write` · effect `write`
|
|
2051
|
+
*
|
|
2052
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
|
|
2053
|
+
*/
|
|
2054
|
+
async resolve(request) {
|
|
2055
|
+
return this.client.call({
|
|
2056
|
+
method: 'POST',
|
|
2057
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_reports/*', 'name')}:resolve`,
|
|
2058
|
+
body: runtime.omit(request, ['name']),
|
|
2059
|
+
bodyType: 'sylphx.events.v1.ResolveChatReportRequest',
|
|
2060
|
+
responseType: 'sylphx.events.v1.ChatReport',
|
|
2061
|
+
mutation: true,
|
|
2062
|
+
});
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
/** `chat_sticker_packs` of Sylphx Events: Resource type `events.sylphx.com/ChatStickerPack`. */
|
|
2066
|
+
export class ChatStickerPacksCollection {
|
|
2067
|
+
client;
|
|
2068
|
+
constructor(client) {
|
|
2069
|
+
this.client = client;
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
* Gets an authoritative tenant sticker pack.
|
|
2073
|
+
*
|
|
2074
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/chat_sticker_packs/*}` · permission `events:read` · effect `read`
|
|
2075
|
+
*
|
|
2076
|
+
* Errors: `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
|
|
2077
|
+
*/
|
|
2078
|
+
async get(request) {
|
|
2079
|
+
return this.client.call({
|
|
2080
|
+
method: 'GET',
|
|
2081
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_sticker_packs/*', 'name')}`,
|
|
2082
|
+
responseType: 'sylphx.events.v1.ChatStickerPack',
|
|
2083
|
+
mutation: false,
|
|
2084
|
+
});
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
* Lists the tenant sticker catalog for player discovery.
|
|
2088
|
+
*
|
|
2089
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/chat_sticker_packs` · permission `events:read` · effect `read`
|
|
2090
|
+
*
|
|
2091
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
2092
|
+
*/
|
|
2093
|
+
async list(request) {
|
|
2094
|
+
return this.client.call({
|
|
2095
|
+
method: 'GET',
|
|
2096
|
+
path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/chat_sticker_packs`,
|
|
2097
|
+
query: { page_size: request.pageSize, page_token: request.pageToken },
|
|
2098
|
+
responseType: 'sylphx.events.v1.ListChatStickerPacksResponse',
|
|
2099
|
+
mutation: false,
|
|
2100
|
+
});
|
|
2101
|
+
}
|
|
2102
|
+
/** Every item of every page of `list`. */
|
|
2103
|
+
async *listAll(request) {
|
|
2104
|
+
let next = request;
|
|
2105
|
+
for (;;) {
|
|
2106
|
+
const page = await this.list(next);
|
|
2107
|
+
yield* page.chatStickerPacks ?? [];
|
|
2108
|
+
if (page.nextPageToken === undefined || page.nextPageToken === '')
|
|
2109
|
+
return;
|
|
2110
|
+
next = { ...request, pageToken: page.nextPageToken };
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
/**
|
|
2114
|
+
* Publishes the trusted backend's complete sticker pack catalog.
|
|
2115
|
+
*
|
|
2116
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/chat_sticker_packs/*}:upsert` · permission `events:chat:admin` · effect `write`
|
|
2117
|
+
*
|
|
2118
|
+
* Errors: `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
2119
|
+
*/
|
|
2120
|
+
async upsert(request) {
|
|
2121
|
+
return this.client.call({
|
|
2122
|
+
method: 'POST',
|
|
2123
|
+
path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/chat_sticker_packs/*', 'name')}:upsert`,
|
|
2124
|
+
body: runtime.omit(request, ['name']),
|
|
2125
|
+
bodyType: 'sylphx.events.v1.UpsertChatStickerPackRequest',
|
|
2126
|
+
responseType: 'sylphx.events.v1.ChatStickerPack',
|
|
2127
|
+
mutation: true,
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
1557
2130
|
}
|
|
1558
2131
|
//# sourceMappingURL=events.js.map
|