@sylphx/sdk 0.32.1 → 0.32.2

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.
Files changed (120) hide show
  1. package/README.md +105 -0
  2. package/dist/access.d.ts +16 -1
  3. package/dist/access.js +1 -1
  4. package/dist/access.js.map +1 -1
  5. package/dist/agents.d.ts +463 -25
  6. package/dist/agents.js +276 -5
  7. package/dist/agents.js.map +1 -1
  8. package/dist/ai.js +1 -1
  9. package/dist/ai.js.map +1 -1
  10. package/dist/analytics.d.ts +232 -0
  11. package/dist/analytics.js +126 -0
  12. package/dist/analytics.js.map +1 -0
  13. package/dist/artifacts.d.ts +47 -1
  14. package/dist/artifacts.js +30 -2
  15. package/dist/artifacts.js.map +1 -1
  16. package/dist/assets.js +1 -1
  17. package/dist/assets.js.map +1 -1
  18. package/dist/auth/client.d.ts +34 -3
  19. package/dist/auth/client.js +42 -5
  20. package/dist/auth/client.js.map +1 -1
  21. package/dist/auth/continue-mock.d.ts +21 -0
  22. package/dist/auth/continue-mock.js +75 -0
  23. package/dist/auth/continue-mock.js.map +1 -0
  24. package/dist/auth/end-user-keys-mock.js +1 -1
  25. package/dist/auth/end-user-keys-mock.js.map +1 -1
  26. package/dist/auth/end-user-keys.js +1 -1
  27. package/dist/auth/end-user-keys.js.map +1 -1
  28. package/dist/auth/verify.js +1 -1
  29. package/dist/auth/verify.js.map +1 -1
  30. package/dist/auth.d.ts +169 -0
  31. package/dist/auth.js +135 -1
  32. package/dist/auth.js.map +1 -1
  33. package/dist/billing.d.ts +13 -6
  34. package/dist/billing.js +3 -1
  35. package/dist/billing.js.map +1 -1
  36. package/dist/broker.d.ts +165 -33
  37. package/dist/broker.js +103 -7
  38. package/dist/broker.js.map +1 -1
  39. package/dist/browser-upload.d.ts +101 -0
  40. package/dist/browser-upload.js +130 -0
  41. package/dist/browser-upload.js.map +1 -0
  42. package/dist/build.js +1 -1
  43. package/dist/build.js.map +1 -1
  44. package/dist/common.d.ts +1 -1
  45. package/dist/common.js +1 -1
  46. package/dist/common.js.map +1 -1
  47. package/dist/config/flags.d.ts +12 -2
  48. package/dist/config/flags.js +54 -6
  49. package/dist/config/flags.js.map +1 -1
  50. package/dist/config.d.ts +24 -0
  51. package/dist/config.js +22 -1
  52. package/dist/config.js.map +1 -1
  53. package/dist/connections.d.ts +128 -25
  54. package/dist/connections.js +72 -25
  55. package/dist/connections.js.map +1 -1
  56. package/dist/data.d.ts +306 -13
  57. package/dist/data.js +110 -9
  58. package/dist/data.js.map +1 -1
  59. package/dist/entitlement.js +1 -1
  60. package/dist/entitlement.js.map +1 -1
  61. package/dist/events/realtime.js +1 -1
  62. package/dist/events/realtime.js.map +1 -1
  63. package/dist/events/webhooks.js +1 -1
  64. package/dist/events/webhooks.js.map +1 -1
  65. package/dist/events.d.ts +36 -0
  66. package/dist/events.js +29 -1
  67. package/dist/events.js.map +1 -1
  68. package/dist/flags.d.ts +2 -0
  69. package/dist/flags.js +5 -1
  70. package/dist/flags.js.map +1 -1
  71. package/dist/hosting.js +1 -1
  72. package/dist/hosting.js.map +1 -1
  73. package/dist/ids.d.ts +40 -0
  74. package/dist/ids.js +9 -1
  75. package/dist/ids.js.map +1 -1
  76. package/dist/index.d.ts +5 -1
  77. package/dist/index.js +14 -2
  78. package/dist/index.js.map +1 -1
  79. package/dist/keys.js +1 -1
  80. package/dist/keys.js.map +1 -1
  81. package/dist/knowledge.d.ts +32 -9
  82. package/dist/knowledge.js +21 -11
  83. package/dist/knowledge.js.map +1 -1
  84. package/dist/localization.js +1 -1
  85. package/dist/localization.js.map +1 -1
  86. package/dist/methods.js +408 -8
  87. package/dist/methods.js.map +1 -1
  88. package/dist/money.d.ts +263 -7
  89. package/dist/money.js +121 -7
  90. package/dist/money.js.map +1 -1
  91. package/dist/network.js +1 -1
  92. package/dist/network.js.map +1 -1
  93. package/dist/notify.d.ts +340 -0
  94. package/dist/notify.js +304 -1
  95. package/dist/notify.js.map +1 -1
  96. package/dist/observability.js +1 -1
  97. package/dist/observability.js.map +1 -1
  98. package/dist/realtime.js +1 -1
  99. package/dist/realtime.js.map +1 -1
  100. package/dist/release.js +1 -1
  101. package/dist/release.js.map +1 -1
  102. package/dist/runners.js +1 -1
  103. package/dist/runners.js.map +1 -1
  104. package/dist/runtime.d.ts +3 -0
  105. package/dist/runtime.js +54 -1
  106. package/dist/runtime.js.map +1 -1
  107. package/dist/sandboxes/stream-mock.d.ts +124 -0
  108. package/dist/sandboxes/stream-mock.js +476 -0
  109. package/dist/sandboxes/stream-mock.js.map +1 -0
  110. package/dist/sandboxes/stream.d.ts +407 -0
  111. package/dist/sandboxes/stream.js +335 -0
  112. package/dist/sandboxes/stream.js.map +1 -0
  113. package/dist/sandboxes.d.ts +94 -17
  114. package/dist/sandboxes.js +33 -4
  115. package/dist/sandboxes.js.map +1 -1
  116. package/dist/secrets.js +1 -1
  117. package/dist/secrets.js.map +1 -1
  118. package/dist/workflows.js +1 -1
  119. package/dist/workflows.js.map +1 -1
  120. package/package.json +1 -1
package/dist/notify.js CHANGED
@@ -1,4 +1,4 @@
1
- // @generated by sylphx-gen 0.1.0 from contracts@c8a7361c53e572321b0ec9fb014fd1e8279b007b62562423038e0d0e5b9d767a. Do not edit.
1
+ // @generated by sylphx-gen. Do not edit.
2
2
  // `sylphx.notify.v1`.
3
3
  import * as runtime from './runtime.js';
4
4
  import './common.js';
@@ -74,6 +74,10 @@ runtime.registerSchemas({
74
74
  ['sender', 'sender', 'sylphx.notify.v1.Sender'],
75
75
  ['validateOnly', 'validate_only'],
76
76
  ],
77
+ 'sylphx.notify.v1.CreateSmsNumberRequest': [
78
+ ['smsNumberId', 'sms_number_id'],
79
+ ['smsNumber', 'sms_number', 'sylphx.notify.v1.SmsNumber'],
80
+ ],
77
81
  'sylphx.notify.v1.CreateSuppressionRequest': [
78
82
  ['suppressionId', 'suppression_id'],
79
83
  ['suppression', 'suppression', 'sylphx.notify.v1.Suppression'],
@@ -100,6 +104,10 @@ runtime.registerSchemas({
100
104
  ['allowMissing', 'allow_missing'],
101
105
  ['validateOnly', 'validate_only'],
102
106
  ],
107
+ 'sylphx.notify.v1.DeleteMessageTopicRequest': [
108
+ ['allowMissing', 'allow_missing'],
109
+ ['validateOnly', 'validate_only'],
110
+ ],
103
111
  'sylphx.notify.v1.DeletePreferenceRequest': [
104
112
  ['allowMissing', 'allow_missing'],
105
113
  ['validateOnly', 'validate_only'],
@@ -116,6 +124,7 @@ runtime.registerSchemas({
116
124
  ['allowMissing', 'allow_missing'],
117
125
  ['validateOnly', 'validate_only'],
118
126
  ],
127
+ 'sylphx.notify.v1.DeleteSmsNumberRequest': [],
119
128
  'sylphx.notify.v1.DeleteSuppressionRequest': [
120
129
  ['allowMissing', 'allow_missing'],
121
130
  ['validateOnly', 'validate_only'],
@@ -161,15 +170,18 @@ runtime.registerSchemas({
161
170
  'sylphx.notify.v1.GetBroadcastRequest': [],
162
171
  'sylphx.notify.v1.GetEmailDomainRequest': [],
163
172
  'sylphx.notify.v1.GetInboundEmailRequest': [],
173
+ 'sylphx.notify.v1.GetInboundSmsRequest': [],
164
174
  'sylphx.notify.v1.GetInboxItemRequest': [],
165
175
  'sylphx.notify.v1.GetMailboxConnectLinkRequest': [],
166
176
  'sylphx.notify.v1.GetMailboxOauthAppRequest': [],
167
177
  'sylphx.notify.v1.GetMailboxRequest': [],
168
178
  'sylphx.notify.v1.GetMessageRequest': [],
179
+ 'sylphx.notify.v1.GetMessageTopicRequest': [],
169
180
  'sylphx.notify.v1.GetPreferenceRequest': [],
170
181
  'sylphx.notify.v1.GetRecipientRequest': [],
171
182
  'sylphx.notify.v1.GetRouteRequest': [],
172
183
  'sylphx.notify.v1.GetSenderRequest': [],
184
+ 'sylphx.notify.v1.GetSmsNumberRequest': [],
173
185
  'sylphx.notify.v1.GetSuppressionRequest': [],
174
186
  'sylphx.notify.v1.GetTemplateRequest': [],
175
187
  'sylphx.notify.v1.InboundEmail': [
@@ -186,6 +198,13 @@ runtime.registerSchemas({
186
198
  ['rawSha256', 'raw_sha256'],
187
199
  ['sizeBytes', 'size_bytes'],
188
200
  ],
201
+ 'sylphx.notify.v1.InboundSms': [
202
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
203
+ ['carrierMessageId', 'carrier_message_id'],
204
+ ['senderNumber', 'sender_number'],
205
+ ['recipientNumber', 'recipient_number'],
206
+ ['receiveTime', 'receive_time'],
207
+ ],
189
208
  'sylphx.notify.v1.InboxContent': [
190
209
  ['actionUri', 'action_uri'],
191
210
  ],
@@ -220,6 +239,15 @@ runtime.registerSchemas({
220
239
  ['inboundEmails', 'inbound_emails', 'sylphx.notify.v1.InboundEmail'],
221
240
  ['nextPageToken', 'next_page_token'],
222
241
  ],
242
+ 'sylphx.notify.v1.ListInboundSmsRequest': [
243
+ ['pageSize', 'page_size'],
244
+ ['pageToken', 'page_token'],
245
+ ['orderBy', 'order_by'],
246
+ ],
247
+ 'sylphx.notify.v1.ListInboundSmsResponse': [
248
+ ['inboundSms', 'inbound_sms', 'sylphx.notify.v1.InboundSms'],
249
+ ['nextPageToken', 'next_page_token'],
250
+ ],
223
251
  'sylphx.notify.v1.ListInboxItemsRequest': [
224
252
  ['pageSize', 'page_size'],
225
253
  ['pageToken', 'page_token'],
@@ -256,6 +284,15 @@ runtime.registerSchemas({
256
284
  ['mailboxes', 'mailboxes', 'sylphx.notify.v1.Mailbox'],
257
285
  ['nextPageToken', 'next_page_token'],
258
286
  ],
287
+ 'sylphx.notify.v1.ListMessageTopicsRequest': [
288
+ ['pageSize', 'page_size'],
289
+ ['pageToken', 'page_token'],
290
+ ['orderBy', 'order_by'],
291
+ ],
292
+ 'sylphx.notify.v1.ListMessageTopicsResponse': [
293
+ ['messageTopics', 'message_topics', 'sylphx.notify.v1.MessageTopic'],
294
+ ['nextPageToken', 'next_page_token'],
295
+ ],
259
296
  'sylphx.notify.v1.ListMessagesRequest': [
260
297
  ['pageSize', 'page_size'],
261
298
  ['pageToken', 'page_token'],
@@ -301,6 +338,14 @@ runtime.registerSchemas({
301
338
  ['senders', 'senders', 'sylphx.notify.v1.Sender'],
302
339
  ['nextPageToken', 'next_page_token'],
303
340
  ],
341
+ 'sylphx.notify.v1.ListSmsNumbersRequest': [
342
+ ['pageSize', 'page_size'],
343
+ ['pageToken', 'page_token'],
344
+ ],
345
+ 'sylphx.notify.v1.ListSmsNumbersResponse': [
346
+ ['smsNumbers', 'sms_numbers', 'sylphx.notify.v1.SmsNumber'],
347
+ ['nextPageToken', 'next_page_token'],
348
+ ],
304
349
  'sylphx.notify.v1.ListSuppressionsRequest': [
305
350
  ['pageSize', 'page_size'],
306
351
  ['pageToken', 'page_token'],
@@ -397,6 +442,12 @@ runtime.registerSchemas({
397
442
  ['textBody', 'text_body'],
398
443
  ['htmlBody', 'html_body'],
399
444
  ],
445
+ 'sylphx.notify.v1.MessageTopic': [
446
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
447
+ ['requiredFeature', 'required_feature'],
448
+ ['sendLimitFeature', 'send_limit_feature'],
449
+ ['sendLimitWindow', 'send_limit_window'],
450
+ ],
400
451
  'sylphx.notify.v1.Preference': [
401
452
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
402
453
  ['digestInterval', 'digest_interval'],
@@ -459,6 +510,30 @@ runtime.registerSchemas({
459
510
  ['verificationNote', 'verification_note'],
460
511
  ],
461
512
  'sylphx.notify.v1.SmsContent': [],
513
+ 'sylphx.notify.v1.SmsNumber': [
514
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
515
+ ['spec', 'spec', 'sylphx.notify.v1.SmsNumberSpec'],
516
+ ['status', 'status', 'sylphx.notify.v1.SmsNumberStatus'],
517
+ ],
518
+ 'sylphx.notify.v1.SmsNumberSpec': [
519
+ ['regionCode', 'region_code'],
520
+ ['numberType', 'number_type'],
521
+ ['upfrontCostLimit', 'upfront_cost_limit'],
522
+ ['monthlyCostLimit', 'monthly_cost_limit'],
523
+ ],
524
+ 'sylphx.notify.v1.SmsNumberStatus': [
525
+ ['observedGeneration', 'observed_generation'],
526
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
527
+ ['retiredTime', 'retired_time'],
528
+ ['phoneNumber', 'phone_number'],
529
+ ['carrierAccount', 'carrier_account'],
530
+ ['providerNumberId', 'provider_number_id'],
531
+ ['orderId', 'order_id'],
532
+ ['messagingProfileId', 'messaging_profile_id'],
533
+ ['stateReason', 'state_reason'],
534
+ ['upfrontCost', 'upfront_cost'],
535
+ ['monthlyCost', 'monthly_cost'],
536
+ ],
462
537
  'sylphx.notify.v1.SmsSender': [
463
538
  ['phoneNumber', 'phone_number'],
464
539
  ['senderKey', 'sender_key'],
@@ -508,6 +583,12 @@ runtime.registerSchemas({
508
583
  ['allowMissing', 'allow_missing'],
509
584
  ['validateOnly', 'validate_only'],
510
585
  ],
586
+ 'sylphx.notify.v1.UpdateMessageTopicRequest': [
587
+ ['messageTopic', 'message_topic', 'sylphx.notify.v1.MessageTopic'],
588
+ ['updateMask', 'update_mask'],
589
+ ['allowMissing', 'allow_missing'],
590
+ ['validateOnly', 'validate_only'],
591
+ ],
511
592
  'sylphx.notify.v1.UpdatePreferenceRequest': [
512
593
  ['preference', 'preference', 'sylphx.notify.v1.Preference'],
513
594
  ['updateMask', 'update_mask'],
@@ -559,6 +640,8 @@ export class NotifyApi {
559
640
  recipients;
560
641
  /** The `preferences` collection. */
561
642
  preferences;
643
+ /** The `message_topics` collection. */
644
+ messageTopics;
562
645
  /** The `suppressions` collection. */
563
646
  suppressions;
564
647
  /** The `templates` collection. */
@@ -577,12 +660,17 @@ export class NotifyApi {
577
660
  inboxItems;
578
661
  /** The `broadcasts` collection. */
579
662
  broadcasts;
663
+ /** The `sms_numbers` collection. */
664
+ smsNumbers;
665
+ /** The `inbound_sms` collection. */
666
+ inboundSms;
580
667
  constructor(client) {
581
668
  this.mailDomains = new MailDomainsCollection(client);
582
669
  this.mailRoutes = new MailRoutesCollection(client);
583
670
  this.senders = new SendersCollection(client);
584
671
  this.recipients = new RecipientsCollection(client);
585
672
  this.preferences = new PreferencesCollection(client);
673
+ this.messageTopics = new MessageTopicsCollection(client);
586
674
  this.suppressions = new SuppressionsCollection(client);
587
675
  this.templates = new TemplatesCollection(client);
588
676
  this.messages = new MessagesCollection(client);
@@ -592,6 +680,8 @@ export class NotifyApi {
592
680
  this.inboundEmails = new InboundEmailsCollection(client);
593
681
  this.inboxItems = new InboxItemsCollection(client);
594
682
  this.broadcasts = new BroadcastsCollection(client);
683
+ this.smsNumbers = new SmsNumbersCollection(client);
684
+ this.inboundSms = new InboundSmsCollection(client);
595
685
  }
596
686
  }
597
687
  /** `mail_domains` of Sylphx Notify: Resource type `notify.sylphx.com/EmailDomain`. */
@@ -1110,6 +1200,88 @@ export class PreferencesCollection {
1110
1200
  });
1111
1201
  }
1112
1202
  }
1203
+ /** `message_topics` of Sylphx Notify: Resource type `notify.sylphx.com/MessageTopic`. */
1204
+ export class MessageTopicsCollection {
1205
+ client;
1206
+ constructor(client) {
1207
+ this.client = client;
1208
+ }
1209
+ /**
1210
+ * Gets a message topic.
1211
+ *
1212
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/message_topics/*}` · permission `notify:read` · effect `read`
1213
+ *
1214
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1215
+ */
1216
+ async get(request) {
1217
+ return this.client.call({
1218
+ method: 'GET',
1219
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/message_topics/*', 'name')}`,
1220
+ responseType: 'sylphx.notify.v1.MessageTopic',
1221
+ mutation: false,
1222
+ });
1223
+ }
1224
+ /**
1225
+ * Lists message topics.
1226
+ *
1227
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/message_topics` · permission `notify:read` · effect `read`
1228
+ *
1229
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1230
+ */
1231
+ async list(request) {
1232
+ return this.client.call({
1233
+ method: 'GET',
1234
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/message_topics`,
1235
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1236
+ responseType: 'sylphx.notify.v1.ListMessageTopicsResponse',
1237
+ mutation: false,
1238
+ });
1239
+ }
1240
+ /** Every item of every page of `list`. */
1241
+ async *listAll(request) {
1242
+ let next = request;
1243
+ for (;;) {
1244
+ const page = await this.list(next);
1245
+ yield* page.messageTopics ?? [];
1246
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1247
+ return;
1248
+ next = { ...request, pageToken: page.nextPageToken };
1249
+ }
1250
+ }
1251
+ /**
1252
+ * Updates a message topic; with `allow_missing`, creates it.
1253
+ *
1254
+ * `PATCH /v1/{message_topic.name=orgs/*\/projects/*\/envs/*\/message_topics/*}` · permission `notify:write` · effect `write`
1255
+ *
1256
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1257
+ */
1258
+ async update(request) {
1259
+ return this.client.call({
1260
+ method: 'PATCH',
1261
+ path: `/v1/${runtime.pathParam(request.messageTopic?.name, 'orgs/*/projects/*/envs/*/message_topics/*', 'message_topic.name')}`,
1262
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1263
+ body: request.messageTopic ?? {},
1264
+ bodyType: 'sylphx.notify.v1.MessageTopic',
1265
+ responseType: 'sylphx.notify.v1.MessageTopic',
1266
+ mutation: true,
1267
+ });
1268
+ }
1269
+ /**
1270
+ * Deletes a message topic; its messages are admitted with no gate or topic limit.
1271
+ *
1272
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/message_topics/*}` · permission `notify:write` · effect `destructive`
1273
+ *
1274
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1275
+ */
1276
+ async delete(request) {
1277
+ return this.client.call({
1278
+ method: 'DELETE',
1279
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/message_topics/*', 'name')}`,
1280
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1281
+ mutation: true,
1282
+ });
1283
+ }
1284
+ }
1113
1285
  /** `suppressions` of Sylphx Notify: Resource type `notify.sylphx.com/Suppression`. */
1114
1286
  export class SuppressionsCollection {
1115
1287
  client;
@@ -1946,4 +2118,135 @@ export class BroadcastsCollection {
1946
2118
  });
1947
2119
  }
1948
2120
  }
2121
+ /** `sms_numbers` of Sylphx Notify: Resource type `notify.sylphx.com/SmsNumber`. */
2122
+ export class SmsNumbersCollection {
2123
+ client;
2124
+ constructor(client) {
2125
+ this.client = client;
2126
+ }
2127
+ /**
2128
+ * Provisions one carrier number within explicit cost limits and receives its SMS.
2129
+ *
2130
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/sms_numbers` · permission `notify:write` · effect `write`
2131
+ *
2132
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
2133
+ */
2134
+ async create(request) {
2135
+ return this.client.call({
2136
+ method: 'POST',
2137
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/sms_numbers`,
2138
+ query: { sms_number_id: request.smsNumberId },
2139
+ body: request.smsNumber ?? {},
2140
+ bodyType: 'sylphx.notify.v1.SmsNumber',
2141
+ responseType: 'sylphx.notify.v1.SmsNumber',
2142
+ mutation: true,
2143
+ });
2144
+ }
2145
+ /**
2146
+ * Gets an SMS number binding.
2147
+ *
2148
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/sms_numbers/*}` · permission `notify:read` · effect `read`
2149
+ *
2150
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
2151
+ */
2152
+ async get(request) {
2153
+ return this.client.call({
2154
+ method: 'GET',
2155
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/sms_numbers/*', 'name')}`,
2156
+ responseType: 'sylphx.notify.v1.SmsNumber',
2157
+ mutation: false,
2158
+ });
2159
+ }
2160
+ /**
2161
+ * Lists an environment's SMS number bindings.
2162
+ *
2163
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/sms_numbers` · permission `notify:read` · effect `read`
2164
+ *
2165
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
2166
+ */
2167
+ async list(request) {
2168
+ return this.client.call({
2169
+ method: 'GET',
2170
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/sms_numbers`,
2171
+ query: { page_size: request.pageSize, page_token: request.pageToken },
2172
+ responseType: 'sylphx.notify.v1.ListSmsNumbersResponse',
2173
+ mutation: false,
2174
+ });
2175
+ }
2176
+ /** Every item of every page of `list`. */
2177
+ async *listAll(request) {
2178
+ let next = request;
2179
+ for (;;) {
2180
+ const page = await this.list(next);
2181
+ yield* page.smsNumbers ?? [];
2182
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
2183
+ return;
2184
+ next = { ...request, pageToken: page.nextPageToken };
2185
+ }
2186
+ }
2187
+ /**
2188
+ * Requests carrier release and stops recurring number billing. Read status
2189
+ * until retired_time is set. Historical messages stay readable.
2190
+ *
2191
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/sms_numbers/*}` · permission `notify:write` · effect `destructive`
2192
+ *
2193
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`.
2194
+ */
2195
+ async delete(request) {
2196
+ return this.client.call({
2197
+ method: 'DELETE',
2198
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/sms_numbers/*', 'name')}`,
2199
+ mutation: true,
2200
+ });
2201
+ }
2202
+ }
2203
+ /** `inbound_sms` of Sylphx Notify: Resource type `notify.sylphx.com/InboundSms`. */
2204
+ export class InboundSmsCollection {
2205
+ client;
2206
+ constructor(client) {
2207
+ this.client = client;
2208
+ }
2209
+ /**
2210
+ * Gets one inbound SMS.
2211
+ *
2212
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/sms_numbers/*\/inbound_sms/*}` · permission `notify:read` · effect `read`
2213
+ *
2214
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
2215
+ */
2216
+ async get(request) {
2217
+ return this.client.call({
2218
+ method: 'GET',
2219
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/sms_numbers/*/inbound_sms/*', 'name')}`,
2220
+ responseType: 'sylphx.notify.v1.InboundSms',
2221
+ mutation: false,
2222
+ });
2223
+ }
2224
+ /**
2225
+ * Lists a number's inbound SMS in feed order, oldest first.
2226
+ *
2227
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/sms_numbers/*}/inbound_sms` · permission `notify:read` · effect `read`
2228
+ *
2229
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
2230
+ */
2231
+ async list(request) {
2232
+ return this.client.call({
2233
+ method: 'GET',
2234
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/sms_numbers/*', 'parent')}/inbound_sms`,
2235
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
2236
+ responseType: 'sylphx.notify.v1.ListInboundSmsResponse',
2237
+ mutation: false,
2238
+ });
2239
+ }
2240
+ /** Every item of every page of `list`. */
2241
+ async *listAll(request) {
2242
+ let next = request;
2243
+ for (;;) {
2244
+ const page = await this.list(next);
2245
+ yield* page.inboundSms ?? [];
2246
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
2247
+ return;
2248
+ next = { ...request, pageToken: page.nextPageToken };
2249
+ }
2250
+ }
2251
+ }
1949
2252
  //# sourceMappingURL=notify.js.map