@sylphx/sdk 0.28.0 → 0.31.0

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 (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -114
  3. package/dist/access.d.ts +670 -0
  4. package/dist/access.js +640 -0
  5. package/dist/access.js.map +1 -0
  6. package/dist/ai.d.ts +176 -0
  7. package/dist/ai.js +112 -0
  8. package/dist/ai.js.map +1 -0
  9. package/dist/artifacts.d.ts +165 -0
  10. package/dist/artifacts.js +129 -0
  11. package/dist/artifacts.js.map +1 -0
  12. package/dist/auth/verify.d.ts +57 -0
  13. package/dist/auth/verify.js +157 -0
  14. package/dist/auth/verify.js.map +1 -0
  15. package/dist/auth.d.ts +896 -0
  16. package/dist/auth.js +828 -0
  17. package/dist/auth.js.map +1 -0
  18. package/dist/billing.d.ts +854 -0
  19. package/dist/billing.js +593 -0
  20. package/dist/billing.js.map +1 -0
  21. package/dist/broker.d.ts +226 -0
  22. package/dist/broker.js +187 -0
  23. package/dist/broker.js.map +1 -0
  24. package/dist/build.d.ts +313 -0
  25. package/dist/build.js +271 -0
  26. package/dist/build.js.map +1 -0
  27. package/dist/common.d.ts +162 -0
  28. package/dist/common.js +41 -0
  29. package/dist/common.js.map +1 -0
  30. package/dist/config.d.ts +198 -0
  31. package/dist/config.js +168 -0
  32. package/dist/config.js.map +1 -0
  33. package/dist/connections.d.ts +354 -0
  34. package/dist/connections.js +313 -0
  35. package/dist/connections.js.map +1 -0
  36. package/dist/data.d.ts +1141 -0
  37. package/dist/data.js +1082 -0
  38. package/dist/data.js.map +1 -0
  39. package/dist/entitlement.d.ts +179 -0
  40. package/dist/entitlement.js +117 -0
  41. package/dist/entitlement.js.map +1 -0
  42. package/dist/events.d.ts +1324 -0
  43. package/dist/events.js +1227 -0
  44. package/dist/events.js.map +1 -0
  45. package/dist/hosting.d.ts +709 -0
  46. package/dist/hosting.js +611 -0
  47. package/dist/hosting.js.map +1 -0
  48. package/dist/index.d.ts +79 -33656
  49. package/dist/index.js +113 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/keys.d.ts +438 -0
  52. package/dist/keys.js +406 -0
  53. package/dist/keys.js.map +1 -0
  54. package/dist/methods.d.ts +2 -0
  55. package/dist/methods.js +4200 -0
  56. package/dist/methods.js.map +1 -0
  57. package/dist/network.d.ts +733 -0
  58. package/dist/network.js +711 -0
  59. package/dist/network.js.map +1 -0
  60. package/dist/notify.d.ts +1753 -0
  61. package/dist/notify.js +1551 -0
  62. package/dist/notify.js.map +1 -0
  63. package/dist/observability.d.ts +509 -0
  64. package/dist/observability.js +437 -0
  65. package/dist/observability.js.map +1 -0
  66. package/dist/release.d.ts +303 -0
  67. package/dist/release.js +214 -0
  68. package/dist/release.js.map +1 -0
  69. package/dist/runners.d.ts +262 -0
  70. package/dist/runners.js +238 -0
  71. package/dist/runners.js.map +1 -0
  72. package/dist/runtime.d.ts +121 -0
  73. package/dist/runtime.js +305 -0
  74. package/dist/runtime.js.map +1 -0
  75. package/dist/sandboxes.d.ts +1705 -0
  76. package/dist/sandboxes.js +1226 -0
  77. package/dist/sandboxes.js.map +1 -0
  78. package/dist/secrets.d.ts +508 -0
  79. package/dist/secrets.js +474 -0
  80. package/dist/secrets.js.map +1 -0
  81. package/dist/workflows.d.ts +678 -0
  82. package/dist/workflows.js +595 -0
  83. package/dist/workflows.js.map +1 -0
  84. package/package.json +33 -112
  85. package/dist/connect.d.ts +0 -2838
  86. package/dist/connect.mjs +0 -220
  87. package/dist/connect.mjs.map +0 -1
  88. package/dist/health/index.d.ts +0 -1394
  89. package/dist/health/index.mjs +0 -1394
  90. package/dist/health/index.mjs.map +0 -1
  91. package/dist/index.mjs +0 -38429
  92. package/dist/index.mjs.map +0 -1
  93. package/dist/nextjs/index.d.ts +0 -724
  94. package/dist/nextjs/index.mjs +0 -3332
  95. package/dist/nextjs/index.mjs.map +0 -1
  96. package/dist/react/index.d.ts +0 -13066
  97. package/dist/react/index.mjs +0 -35329
  98. package/dist/react/index.mjs.map +0 -1
  99. package/dist/server/index.d.ts +0 -2000
  100. package/dist/server/index.mjs +0 -3446
  101. package/dist/server/index.mjs.map +0 -1
  102. package/dist/web-analytics.d.ts +0 -90
  103. package/dist/web-analytics.mjs +0 -225
  104. package/dist/web-analytics.mjs.map +0 -1
package/dist/notify.js ADDED
@@ -0,0 +1,1551 @@
1
+ // @generated by sylphx-gen 0.1.0 from contracts@446ceb843d4ff88057b0db68e2e54e4aea52d8143b72d66016122995b878de20. Do not edit.
2
+ // `sylphx.notify.v1`.
3
+ import * as runtime from './runtime.js';
4
+ import './common.js';
5
+ runtime.registerSchemas({
6
+ 'sylphx.notify.v1.ArchiveInboxItemRequest': [],
7
+ 'sylphx.notify.v1.Broadcast': [
8
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
9
+ ['spec', 'spec', 'sylphx.notify.v1.BroadcastSpec'],
10
+ ['status', 'status', 'sylphx.notify.v1.BroadcastStatus'],
11
+ ],
12
+ 'sylphx.notify.v1.BroadcastSpec': [
13
+ ['segmentFilter', 'segment_filter'],
14
+ ['data', 'data', undefined, 'json'],
15
+ ['sendTime', 'send_time'],
16
+ ],
17
+ 'sylphx.notify.v1.BroadcastStatus': [
18
+ ['observedGeneration', 'observed_generation'],
19
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
20
+ ['admittedCount', 'admitted_count'],
21
+ ['skippedCount', 'skipped_count'],
22
+ ],
23
+ 'sylphx.notify.v1.CancelBroadcastRequest': [],
24
+ 'sylphx.notify.v1.CancelMessageRequest': [],
25
+ 'sylphx.notify.v1.ChannelDelivery': [
26
+ ['maskedAddress', 'masked_address'],
27
+ ['providerReceipt', 'provider_receipt'],
28
+ ['receiptTime', 'receipt_time'],
29
+ ['errorCode', 'error_code'],
30
+ ['providerResponse', 'provider_response'],
31
+ ],
32
+ 'sylphx.notify.v1.CreateBroadcastRequest': [
33
+ ['broadcastId', 'broadcast_id'],
34
+ ['broadcast', 'broadcast', 'sylphx.notify.v1.Broadcast'],
35
+ ['validateOnly', 'validate_only'],
36
+ ],
37
+ 'sylphx.notify.v1.CreateMailboxRequest': [
38
+ ['mailboxId', 'mailbox_id'],
39
+ ['mailbox', 'mailbox', 'sylphx.notify.v1.Mailbox'],
40
+ ['validateOnly', 'validate_only'],
41
+ ],
42
+ 'sylphx.notify.v1.CreateMessageRequest': [
43
+ ['messageId', 'message_id'],
44
+ ['message', 'message', 'sylphx.notify.v1.Message'],
45
+ ['validateOnly', 'validate_only'],
46
+ ],
47
+ 'sylphx.notify.v1.CreateRecipientRequest': [
48
+ ['recipientId', 'recipient_id'],
49
+ ['recipient', 'recipient', 'sylphx.notify.v1.Recipient'],
50
+ ['validateOnly', 'validate_only'],
51
+ ],
52
+ 'sylphx.notify.v1.CreateSenderRequest': [
53
+ ['senderId', 'sender_id'],
54
+ ['sender', 'sender', 'sylphx.notify.v1.Sender'],
55
+ ['validateOnly', 'validate_only'],
56
+ ],
57
+ 'sylphx.notify.v1.CreateSendingDomainRequest': [
58
+ ['sendingDomainId', 'sending_domain_id'],
59
+ ['sendingDomain', 'sending_domain', 'sylphx.notify.v1.SendingDomain'],
60
+ ['validateOnly', 'validate_only'],
61
+ ],
62
+ 'sylphx.notify.v1.CreateSuppressionRequest': [
63
+ ['suppressionId', 'suppression_id'],
64
+ ['suppression', 'suppression', 'sylphx.notify.v1.Suppression'],
65
+ ['validateOnly', 'validate_only'],
66
+ ],
67
+ 'sylphx.notify.v1.CreateTemplateRequest': [
68
+ ['templateId', 'template_id'],
69
+ ['template', 'template', 'sylphx.notify.v1.Template'],
70
+ ['validateOnly', 'validate_only'],
71
+ ],
72
+ 'sylphx.notify.v1.DeleteBroadcastRequest': [
73
+ ['allowMissing', 'allow_missing'],
74
+ ['validateOnly', 'validate_only'],
75
+ ],
76
+ 'sylphx.notify.v1.DeleteMailboxRequest': [
77
+ ['allowMissing', 'allow_missing'],
78
+ ['validateOnly', 'validate_only'],
79
+ ],
80
+ 'sylphx.notify.v1.DeletePreferenceRequest': [
81
+ ['allowMissing', 'allow_missing'],
82
+ ['validateOnly', 'validate_only'],
83
+ ],
84
+ 'sylphx.notify.v1.DeleteRecipientRequest': [
85
+ ['allowMissing', 'allow_missing'],
86
+ ['validateOnly', 'validate_only'],
87
+ ],
88
+ 'sylphx.notify.v1.DeleteSenderRequest': [
89
+ ['allowMissing', 'allow_missing'],
90
+ ['validateOnly', 'validate_only'],
91
+ ],
92
+ 'sylphx.notify.v1.DeleteSendingDomainRequest': [
93
+ ['allowMissing', 'allow_missing'],
94
+ ['validateOnly', 'validate_only'],
95
+ ],
96
+ 'sylphx.notify.v1.DeleteSuppressionRequest': [
97
+ ['allowMissing', 'allow_missing'],
98
+ ['validateOnly', 'validate_only'],
99
+ ],
100
+ 'sylphx.notify.v1.DeleteTemplateRequest': [
101
+ ['allowMissing', 'allow_missing'],
102
+ ['validateOnly', 'validate_only'],
103
+ ],
104
+ 'sylphx.notify.v1.DnsRecord': [
105
+ ['recordType', 'record_type'],
106
+ ],
107
+ 'sylphx.notify.v1.EmailContent': [
108
+ ['senderAddress', 'sender_address'],
109
+ ['htmlBody', 'html_body'],
110
+ ['textBody', 'text_body'],
111
+ ['senderName', 'sender_name'],
112
+ ],
113
+ 'sylphx.notify.v1.EraseMailboxAddressRequest': [],
114
+ 'sylphx.notify.v1.EraseMailboxAddressResponse': [
115
+ ['erasedCount', 'erased_count'],
116
+ ],
117
+ 'sylphx.notify.v1.GetBroadcastRequest': [],
118
+ 'sylphx.notify.v1.GetInboundEmailRequest': [],
119
+ 'sylphx.notify.v1.GetInboxItemRequest': [],
120
+ 'sylphx.notify.v1.GetMailboxRequest': [],
121
+ 'sylphx.notify.v1.GetMessageRequest': [],
122
+ 'sylphx.notify.v1.GetPreferenceRequest': [],
123
+ 'sylphx.notify.v1.GetRecipientRequest': [],
124
+ 'sylphx.notify.v1.GetSenderRequest': [],
125
+ 'sylphx.notify.v1.GetSendingDomainRequest': [],
126
+ 'sylphx.notify.v1.GetSuppressionRequest': [],
127
+ 'sylphx.notify.v1.GetTemplateRequest': [],
128
+ 'sylphx.notify.v1.InboundEmail': [
129
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
130
+ ['messageId', 'message_id'],
131
+ ['parentMessageId', 'parent_message_id'],
132
+ ['senderAddress', 'sender_address'],
133
+ ['senderName', 'sender_name'],
134
+ ['recipientAddresses', 'recipient_addresses'],
135
+ ['ccAddresses', 'cc_addresses'],
136
+ ['textBody', 'text_body'],
137
+ ['htmlBody', 'html_body'],
138
+ ['receiveTime', 'receive_time'],
139
+ ['rawSha256', 'raw_sha256'],
140
+ ['sizeBytes', 'size_bytes'],
141
+ ],
142
+ 'sylphx.notify.v1.InboxContent': [
143
+ ['actionUri', 'action_uri'],
144
+ ],
145
+ 'sylphx.notify.v1.InboxItem': [
146
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
147
+ ['actionUri', 'action_uri'],
148
+ ],
149
+ 'sylphx.notify.v1.ListBroadcastsRequest': [
150
+ ['pageSize', 'page_size'],
151
+ ['pageToken', 'page_token'],
152
+ ['orderBy', 'order_by'],
153
+ ],
154
+ 'sylphx.notify.v1.ListBroadcastsResponse': [
155
+ ['broadcasts', 'broadcasts', 'sylphx.notify.v1.Broadcast'],
156
+ ['nextPageToken', 'next_page_token'],
157
+ ],
158
+ 'sylphx.notify.v1.ListInboundEmailsRequest': [
159
+ ['pageSize', 'page_size'],
160
+ ['pageToken', 'page_token'],
161
+ ['orderBy', 'order_by'],
162
+ ],
163
+ 'sylphx.notify.v1.ListInboundEmailsResponse': [
164
+ ['inboundEmails', 'inbound_emails', 'sylphx.notify.v1.InboundEmail'],
165
+ ['nextPageToken', 'next_page_token'],
166
+ ],
167
+ 'sylphx.notify.v1.ListInboxItemsRequest': [
168
+ ['pageSize', 'page_size'],
169
+ ['pageToken', 'page_token'],
170
+ ['orderBy', 'order_by'],
171
+ ],
172
+ 'sylphx.notify.v1.ListInboxItemsResponse': [
173
+ ['inboxItems', 'inbox_items', 'sylphx.notify.v1.InboxItem'],
174
+ ['nextPageToken', 'next_page_token'],
175
+ ],
176
+ 'sylphx.notify.v1.ListMailboxesRequest': [
177
+ ['pageSize', 'page_size'],
178
+ ['pageToken', 'page_token'],
179
+ ['orderBy', 'order_by'],
180
+ ],
181
+ 'sylphx.notify.v1.ListMailboxesResponse': [
182
+ ['mailboxes', 'mailboxes', 'sylphx.notify.v1.Mailbox'],
183
+ ['nextPageToken', 'next_page_token'],
184
+ ],
185
+ 'sylphx.notify.v1.ListMessagesRequest': [
186
+ ['pageSize', 'page_size'],
187
+ ['pageToken', 'page_token'],
188
+ ['orderBy', 'order_by'],
189
+ ],
190
+ 'sylphx.notify.v1.ListMessagesResponse': [
191
+ ['messages', 'messages', 'sylphx.notify.v1.Message'],
192
+ ['nextPageToken', 'next_page_token'],
193
+ ],
194
+ 'sylphx.notify.v1.ListPreferencesRequest': [
195
+ ['pageSize', 'page_size'],
196
+ ['pageToken', 'page_token'],
197
+ ['orderBy', 'order_by'],
198
+ ],
199
+ 'sylphx.notify.v1.ListPreferencesResponse': [
200
+ ['preferences', 'preferences', 'sylphx.notify.v1.Preference'],
201
+ ['nextPageToken', 'next_page_token'],
202
+ ],
203
+ 'sylphx.notify.v1.ListRecipientsRequest': [
204
+ ['pageSize', 'page_size'],
205
+ ['pageToken', 'page_token'],
206
+ ['orderBy', 'order_by'],
207
+ ],
208
+ 'sylphx.notify.v1.ListRecipientsResponse': [
209
+ ['recipients', 'recipients', 'sylphx.notify.v1.Recipient'],
210
+ ['nextPageToken', 'next_page_token'],
211
+ ],
212
+ 'sylphx.notify.v1.ListSendersRequest': [
213
+ ['pageSize', 'page_size'],
214
+ ['pageToken', 'page_token'],
215
+ ['orderBy', 'order_by'],
216
+ ],
217
+ 'sylphx.notify.v1.ListSendersResponse': [
218
+ ['senders', 'senders', 'sylphx.notify.v1.Sender'],
219
+ ['nextPageToken', 'next_page_token'],
220
+ ],
221
+ 'sylphx.notify.v1.ListSendingDomainsRequest': [
222
+ ['pageSize', 'page_size'],
223
+ ['pageToken', 'page_token'],
224
+ ['orderBy', 'order_by'],
225
+ ],
226
+ 'sylphx.notify.v1.ListSendingDomainsResponse': [
227
+ ['sendingDomains', 'sending_domains', 'sylphx.notify.v1.SendingDomain'],
228
+ ['nextPageToken', 'next_page_token'],
229
+ ],
230
+ 'sylphx.notify.v1.ListSuppressionsRequest': [
231
+ ['pageSize', 'page_size'],
232
+ ['pageToken', 'page_token'],
233
+ ['orderBy', 'order_by'],
234
+ ],
235
+ 'sylphx.notify.v1.ListSuppressionsResponse': [
236
+ ['suppressions', 'suppressions', 'sylphx.notify.v1.Suppression'],
237
+ ['nextPageToken', 'next_page_token'],
238
+ ],
239
+ 'sylphx.notify.v1.ListTemplatesRequest': [
240
+ ['pageSize', 'page_size'],
241
+ ['pageToken', 'page_token'],
242
+ ['orderBy', 'order_by'],
243
+ ],
244
+ 'sylphx.notify.v1.ListTemplatesResponse': [
245
+ ['templates', 'templates', 'sylphx.notify.v1.Template'],
246
+ ['nextPageToken', 'next_page_token'],
247
+ ],
248
+ 'sylphx.notify.v1.MailServer': [],
249
+ 'sylphx.notify.v1.Mailbox': [
250
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
251
+ ['spec', 'spec', 'sylphx.notify.v1.MailboxSpec'],
252
+ ['status', 'status', 'sylphx.notify.v1.MailboxStatus'],
253
+ ],
254
+ 'sylphx.notify.v1.MailboxSpec': [
255
+ ['displayName', 'display_name'],
256
+ ['imap', 'imap', 'sylphx.notify.v1.MailServer'],
257
+ ['smtp', 'smtp', 'sylphx.notify.v1.MailServer'],
258
+ ['appendSent', 'append_sent'],
259
+ ['backfillStartTime', 'backfill_start_time'],
260
+ ],
261
+ 'sylphx.notify.v1.MailboxStatus': [
262
+ ['observedGeneration', 'observed_generation'],
263
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
264
+ ['passwordSet', 'password_set'],
265
+ ['lastPollTime', 'last_poll_time'],
266
+ ['lastError', 'last_error'],
267
+ ['sentFolder', 'sent_folder'],
268
+ ],
269
+ 'sylphx.notify.v1.MarkInboxItemReadRequest': [],
270
+ 'sylphx.notify.v1.MarkInboxItemUnreadRequest': [],
271
+ 'sylphx.notify.v1.Message': [
272
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
273
+ ['templateVersion', 'template_version'],
274
+ ['data', 'data', undefined, 'json'],
275
+ ['sendTime', 'send_time'],
276
+ ['deliveries', 'deliveries', 'sylphx.notify.v1.ChannelDelivery'],
277
+ ['deliveryDeadlineTime', 'delivery_deadline_time'],
278
+ ['stateReason', 'state_reason'],
279
+ ['capture', 'capture', 'sylphx.notify.v1.MessageCapture'],
280
+ ['content', 'content', 'sylphx.notify.v1.MessageContent'],
281
+ ['parentMessageId', 'parent_message_id'],
282
+ ['emailMessageId', 'email_message_id'],
283
+ ],
284
+ 'sylphx.notify.v1.MessageCapture': [
285
+ ['textBody', 'text_body'],
286
+ ['htmlBody', 'html_body'],
287
+ ],
288
+ 'sylphx.notify.v1.MessageContent': [
289
+ ['textBody', 'text_body'],
290
+ ['htmlBody', 'html_body'],
291
+ ],
292
+ 'sylphx.notify.v1.Preference': [
293
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
294
+ ['digestInterval', 'digest_interval'],
295
+ ],
296
+ 'sylphx.notify.v1.PushContent': [
297
+ ['data', 'data', undefined, 'json'],
298
+ ],
299
+ 'sylphx.notify.v1.PushDevice': [
300
+ ['deviceToken', 'device_token'],
301
+ ['tokenLast4', 'token_last4'],
302
+ ],
303
+ 'sylphx.notify.v1.PushSender': [
304
+ ['appKey', 'app_key'],
305
+ ],
306
+ 'sylphx.notify.v1.Recipient': [
307
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
308
+ ['externalKey', 'external_key'],
309
+ ['emailAddresses', 'email_addresses'],
310
+ ['phoneNumbers', 'phone_numbers'],
311
+ ['devices', 'devices', 'sylphx.notify.v1.PushDevice'],
312
+ ['languageCode', 'language_code'],
313
+ ['timeZone', 'time_zone'],
314
+ ],
315
+ 'sylphx.notify.v1.SendBroadcastRequest': [
316
+ ['validateOnly', 'validate_only'],
317
+ ],
318
+ 'sylphx.notify.v1.SendLimit': [
319
+ ['minInterval', 'min_interval'],
320
+ ['maxPerHour', 'max_per_hour'],
321
+ ],
322
+ 'sylphx.notify.v1.Sender': [
323
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
324
+ ['spec', 'spec', 'sylphx.notify.v1.SenderSpec'],
325
+ ['status', 'status', 'sylphx.notify.v1.SenderStatus'],
326
+ ],
327
+ 'sylphx.notify.v1.SenderSpec': [
328
+ ['sms', 'sms', 'sylphx.notify.v1.SmsSender'],
329
+ ['push', 'push', 'sylphx.notify.v1.PushSender'],
330
+ ],
331
+ 'sylphx.notify.v1.SenderStatus': [
332
+ ['observedGeneration', 'observed_generation'],
333
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
334
+ ['verificationNote', 'verification_note'],
335
+ ],
336
+ 'sylphx.notify.v1.SendingDomain': [
337
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
338
+ ['spec', 'spec', 'sylphx.notify.v1.SendingDomainSpec'],
339
+ ['status', 'status', 'sylphx.notify.v1.SendingDomainStatus'],
340
+ ],
341
+ 'sylphx.notify.v1.SendingDomainSpec': [
342
+ ['returnPathLabel', 'return_path_label'],
343
+ ],
344
+ 'sylphx.notify.v1.SendingDomainStatus': [
345
+ ['observedGeneration', 'observed_generation'],
346
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
347
+ ['verifyTime', 'verify_time'],
348
+ ['dnsRecords', 'dns_records', 'sylphx.notify.v1.DnsRecord'],
349
+ ['dkimSelector', 'dkim_selector'],
350
+ ],
351
+ 'sylphx.notify.v1.SmsContent': [],
352
+ 'sylphx.notify.v1.SmsSender': [
353
+ ['phoneNumber', 'phone_number'],
354
+ ['senderKey', 'sender_key'],
355
+ ['regionCodes', 'region_codes'],
356
+ ],
357
+ 'sylphx.notify.v1.Suppression': [
358
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
359
+ ['sourceMessage', 'source_message'],
360
+ ],
361
+ 'sylphx.notify.v1.Template': [
362
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
363
+ ['spec', 'spec', 'sylphx.notify.v1.TemplateSpec'],
364
+ ['status', 'status', 'sylphx.notify.v1.TemplateStatus'],
365
+ ],
366
+ 'sylphx.notify.v1.TemplateSpec': [
367
+ ['email', 'email', 'sylphx.notify.v1.EmailContent'],
368
+ ['sms', 'sms', 'sylphx.notify.v1.SmsContent'],
369
+ ['push', 'push', 'sylphx.notify.v1.PushContent'],
370
+ ['inbox', 'inbox', 'sylphx.notify.v1.InboxContent'],
371
+ ['sendLimit', 'send_limit', 'sylphx.notify.v1.SendLimit'],
372
+ ],
373
+ 'sylphx.notify.v1.TemplateStatus': [
374
+ ['observedGeneration', 'observed_generation'],
375
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
376
+ ],
377
+ 'sylphx.notify.v1.UpdateBroadcastRequest': [
378
+ ['broadcast', 'broadcast', 'sylphx.notify.v1.Broadcast'],
379
+ ['updateMask', 'update_mask'],
380
+ ['allowMissing', 'allow_missing'],
381
+ ['validateOnly', 'validate_only'],
382
+ ],
383
+ 'sylphx.notify.v1.UpdateMailboxRequest': [
384
+ ['mailbox', 'mailbox', 'sylphx.notify.v1.Mailbox'],
385
+ ['updateMask', 'update_mask'],
386
+ ['allowMissing', 'allow_missing'],
387
+ ['validateOnly', 'validate_only'],
388
+ ],
389
+ 'sylphx.notify.v1.UpdatePreferenceRequest': [
390
+ ['preference', 'preference', 'sylphx.notify.v1.Preference'],
391
+ ['updateMask', 'update_mask'],
392
+ ['allowMissing', 'allow_missing'],
393
+ ['validateOnly', 'validate_only'],
394
+ ],
395
+ 'sylphx.notify.v1.UpdateRecipientRequest': [
396
+ ['recipient', 'recipient', 'sylphx.notify.v1.Recipient'],
397
+ ['updateMask', 'update_mask'],
398
+ ['allowMissing', 'allow_missing'],
399
+ ['validateOnly', 'validate_only'],
400
+ ],
401
+ 'sylphx.notify.v1.UpdateSenderRequest': [
402
+ ['sender', 'sender', 'sylphx.notify.v1.Sender'],
403
+ ['updateMask', 'update_mask'],
404
+ ['allowMissing', 'allow_missing'],
405
+ ['validateOnly', 'validate_only'],
406
+ ],
407
+ 'sylphx.notify.v1.UpdateSendingDomainRequest': [
408
+ ['sendingDomain', 'sending_domain', 'sylphx.notify.v1.SendingDomain'],
409
+ ['updateMask', 'update_mask'],
410
+ ['allowMissing', 'allow_missing'],
411
+ ['validateOnly', 'validate_only'],
412
+ ],
413
+ 'sylphx.notify.v1.UpdateTemplateRequest': [
414
+ ['template', 'template', 'sylphx.notify.v1.Template'],
415
+ ['updateMask', 'update_mask'],
416
+ ['allowMissing', 'allow_missing'],
417
+ ['validateOnly', 'validate_only'],
418
+ ],
419
+ 'sylphx.notify.v1.VerifySenderRequest': [],
420
+ 'sylphx.notify.v1.VerifySendingDomainRequest': [],
421
+ });
422
+ /**
423
+ * NotifyService is Sylphx Notify: messages to people over email, SMS, push,
424
+ * and in-app inbox, with preferences, suppression, templates, and broadcasts
425
+ * (docs/services/notify/vision.md). Notify is built on Sylphx Events as an
426
+ * ordinary customer.
427
+ *
428
+ * Namespace of Sylphx Notify on `Sylphx`.
429
+ */
430
+ export class NotifyApi {
431
+ /** The `sending_domains` collection. */
432
+ sendingDomains;
433
+ /** The `senders` collection. */
434
+ senders;
435
+ /** The `recipients` collection. */
436
+ recipients;
437
+ /** The `preferences` collection. */
438
+ preferences;
439
+ /** The `suppressions` collection. */
440
+ suppressions;
441
+ /** The `templates` collection. */
442
+ templates;
443
+ /** The `messages` collection. */
444
+ messages;
445
+ /** The `mailboxes` collection. */
446
+ mailboxes;
447
+ /** The `inbound_emails` collection. */
448
+ inboundEmails;
449
+ /** The `inbox_items` collection. */
450
+ inboxItems;
451
+ /** The `broadcasts` collection. */
452
+ broadcasts;
453
+ constructor(client) {
454
+ this.sendingDomains = new SendingDomainsCollection(client);
455
+ this.senders = new SendersCollection(client);
456
+ this.recipients = new RecipientsCollection(client);
457
+ this.preferences = new PreferencesCollection(client);
458
+ this.suppressions = new SuppressionsCollection(client);
459
+ this.templates = new TemplatesCollection(client);
460
+ this.messages = new MessagesCollection(client);
461
+ this.mailboxes = new MailboxesCollection(client);
462
+ this.inboundEmails = new InboundEmailsCollection(client);
463
+ this.inboxItems = new InboxItemsCollection(client);
464
+ this.broadcasts = new BroadcastsCollection(client);
465
+ }
466
+ }
467
+ /** `sending_domains` of Sylphx Notify: Resource type `notify.sylphx.com/SendingDomain`. */
468
+ export class SendingDomainsCollection {
469
+ client;
470
+ constructor(client) {
471
+ this.client = client;
472
+ }
473
+ /**
474
+ * Gets a sending domain.
475
+ *
476
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/sending_domains/*}` · permission `notify:read` · effect `read`
477
+ *
478
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
479
+ */
480
+ async get(request) {
481
+ return this.client.call({
482
+ method: 'GET',
483
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/sending_domains/*', 'name')}`,
484
+ responseType: 'sylphx.notify.v1.SendingDomain',
485
+ mutation: false,
486
+ });
487
+ }
488
+ /**
489
+ * Lists sending domains.
490
+ *
491
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/sending_domains` · permission `notify:read` · effect `read`
492
+ *
493
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
494
+ */
495
+ async list(request) {
496
+ return this.client.call({
497
+ method: 'GET',
498
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/sending_domains`,
499
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
500
+ responseType: 'sylphx.notify.v1.ListSendingDomainsResponse',
501
+ mutation: false,
502
+ });
503
+ }
504
+ /** Every item of every page of `list`. */
505
+ async *listAll(request) {
506
+ let next = request;
507
+ for (;;) {
508
+ const page = await this.list(next);
509
+ yield* page.sendingDomains ?? [];
510
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
511
+ return;
512
+ next = { ...request, pageToken: page.nextPageToken };
513
+ }
514
+ }
515
+ /**
516
+ * Creates a sending domain.
517
+ *
518
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/sending_domains` · permission `notify:write` · effect `write`
519
+ *
520
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
521
+ */
522
+ async create(request) {
523
+ return this.client.call({
524
+ method: 'POST',
525
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/sending_domains`,
526
+ query: { sending_domain_id: request.sendingDomainId, validate_only: request.validateOnly },
527
+ body: request.sendingDomain ?? {},
528
+ bodyType: 'sylphx.notify.v1.SendingDomain',
529
+ responseType: 'sylphx.notify.v1.SendingDomain',
530
+ mutation: true,
531
+ });
532
+ }
533
+ /**
534
+ * Updates a sending domain.
535
+ *
536
+ * `PATCH /v1/{sending_domain.name=orgs/*\/projects/*\/envs/*\/sending_domains/*}` · permission `notify:write` · effect `write`
537
+ *
538
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
539
+ */
540
+ async update(request) {
541
+ return this.client.call({
542
+ method: 'PATCH',
543
+ path: `/v1/${runtime.pathParam(request.sendingDomain?.name, 'orgs/*/projects/*/envs/*/sending_domains/*', 'sending_domain.name')}`,
544
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
545
+ body: request.sendingDomain ?? {},
546
+ bodyType: 'sylphx.notify.v1.SendingDomain',
547
+ responseType: 'sylphx.notify.v1.SendingDomain',
548
+ mutation: true,
549
+ });
550
+ }
551
+ /**
552
+ * Deletes a sending domain.
553
+ *
554
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/sending_domains/*}` · permission `notify:write` · effect `destructive`
555
+ *
556
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
557
+ */
558
+ async delete(request) {
559
+ return this.client.call({
560
+ method: 'DELETE',
561
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/sending_domains/*', 'name')}`,
562
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
563
+ mutation: true,
564
+ });
565
+ }
566
+ /**
567
+ * Checks the domain's DNS records now instead of on the next sweep.
568
+ *
569
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/sending_domains/*}:verify` · permission `notify:write` · effect `write`
570
+ *
571
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `RATE_LIMITED`.
572
+ */
573
+ async verify(request) {
574
+ return this.client.call({
575
+ method: 'POST',
576
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/sending_domains/*', 'name')}:verify`,
577
+ body: runtime.omit(request, ['name']),
578
+ bodyType: 'sylphx.notify.v1.VerifySendingDomainRequest',
579
+ responseType: 'sylphx.notify.v1.SendingDomain',
580
+ mutation: true,
581
+ });
582
+ }
583
+ }
584
+ /** `senders` of Sylphx Notify: Resource type `notify.sylphx.com/Sender`. */
585
+ export class SendersCollection {
586
+ client;
587
+ constructor(client) {
588
+ this.client = client;
589
+ }
590
+ /**
591
+ * Gets a sender.
592
+ *
593
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/senders/*}` · permission `notify:read` · effect `read`
594
+ *
595
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
596
+ */
597
+ async get(request) {
598
+ return this.client.call({
599
+ method: 'GET',
600
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/senders/*', 'name')}`,
601
+ responseType: 'sylphx.notify.v1.Sender',
602
+ mutation: false,
603
+ });
604
+ }
605
+ /**
606
+ * Lists senders.
607
+ *
608
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/senders` · permission `notify:read` · effect `read`
609
+ *
610
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
611
+ */
612
+ async list(request) {
613
+ return this.client.call({
614
+ method: 'GET',
615
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/senders`,
616
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
617
+ responseType: 'sylphx.notify.v1.ListSendersResponse',
618
+ mutation: false,
619
+ });
620
+ }
621
+ /** Every item of every page of `list`. */
622
+ async *listAll(request) {
623
+ let next = request;
624
+ for (;;) {
625
+ const page = await this.list(next);
626
+ yield* page.senders ?? [];
627
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
628
+ return;
629
+ next = { ...request, pageToken: page.nextPageToken };
630
+ }
631
+ }
632
+ /**
633
+ * Creates a sender.
634
+ *
635
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/senders` · permission `notify:write` · effect `write`
636
+ *
637
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
638
+ */
639
+ async create(request) {
640
+ return this.client.call({
641
+ method: 'POST',
642
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/senders`,
643
+ query: { sender_id: request.senderId, validate_only: request.validateOnly },
644
+ body: request.sender ?? {},
645
+ bodyType: 'sylphx.notify.v1.Sender',
646
+ responseType: 'sylphx.notify.v1.Sender',
647
+ mutation: true,
648
+ });
649
+ }
650
+ /**
651
+ * Updates a sender.
652
+ *
653
+ * `PATCH /v1/{sender.name=orgs/*\/projects/*\/envs/*\/senders/*}` · permission `notify:write` · effect `write`
654
+ *
655
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
656
+ */
657
+ async update(request) {
658
+ return this.client.call({
659
+ method: 'PATCH',
660
+ path: `/v1/${runtime.pathParam(request.sender?.name, 'orgs/*/projects/*/envs/*/senders/*', 'sender.name')}`,
661
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
662
+ body: request.sender ?? {},
663
+ bodyType: 'sylphx.notify.v1.Sender',
664
+ responseType: 'sylphx.notify.v1.Sender',
665
+ mutation: true,
666
+ });
667
+ }
668
+ /**
669
+ * Deletes a sender.
670
+ *
671
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/senders/*}` · permission `notify:write` · effect `destructive`
672
+ *
673
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
674
+ */
675
+ async delete(request) {
676
+ return this.client.call({
677
+ method: 'DELETE',
678
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/senders/*', 'name')}`,
679
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
680
+ mutation: true,
681
+ });
682
+ }
683
+ /**
684
+ * Re-checks the sender's registration or credentials now.
685
+ *
686
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/senders/*}:verify` · permission `notify:write` · effect `write`
687
+ *
688
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `RATE_LIMITED`.
689
+ */
690
+ async verify(request) {
691
+ return this.client.call({
692
+ method: 'POST',
693
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/senders/*', 'name')}:verify`,
694
+ body: runtime.omit(request, ['name']),
695
+ bodyType: 'sylphx.notify.v1.VerifySenderRequest',
696
+ responseType: 'sylphx.notify.v1.Sender',
697
+ mutation: true,
698
+ });
699
+ }
700
+ }
701
+ /** `recipients` of Sylphx Notify: Resource type `notify.sylphx.com/Recipient`. */
702
+ export class RecipientsCollection {
703
+ client;
704
+ constructor(client) {
705
+ this.client = client;
706
+ }
707
+ /**
708
+ * Gets a recipient.
709
+ *
710
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/recipients/*}` · permission `notify:read` · effect `read`
711
+ *
712
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
713
+ */
714
+ async get(request) {
715
+ return this.client.call({
716
+ method: 'GET',
717
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/recipients/*', 'name')}`,
718
+ responseType: 'sylphx.notify.v1.Recipient',
719
+ mutation: false,
720
+ });
721
+ }
722
+ /**
723
+ * Lists recipients.
724
+ *
725
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/recipients` · permission `notify:read` · effect `read`
726
+ *
727
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
728
+ */
729
+ async list(request) {
730
+ return this.client.call({
731
+ method: 'GET',
732
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/recipients`,
733
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
734
+ responseType: 'sylphx.notify.v1.ListRecipientsResponse',
735
+ mutation: false,
736
+ });
737
+ }
738
+ /** Every item of every page of `list`. */
739
+ async *listAll(request) {
740
+ let next = request;
741
+ for (;;) {
742
+ const page = await this.list(next);
743
+ yield* page.recipients ?? [];
744
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
745
+ return;
746
+ next = { ...request, pageToken: page.nextPageToken };
747
+ }
748
+ }
749
+ /**
750
+ * Creates a recipient.
751
+ *
752
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/recipients` · permission `notify:write` · effect `write`
753
+ *
754
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
755
+ */
756
+ async create(request) {
757
+ return this.client.call({
758
+ method: 'POST',
759
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/recipients`,
760
+ query: { recipient_id: request.recipientId, validate_only: request.validateOnly },
761
+ body: request.recipient ?? {},
762
+ bodyType: 'sylphx.notify.v1.Recipient',
763
+ responseType: 'sylphx.notify.v1.Recipient',
764
+ mutation: true,
765
+ });
766
+ }
767
+ /**
768
+ * Updates a recipient.
769
+ *
770
+ * `PATCH /v1/{recipient.name=orgs/*\/projects/*\/envs/*\/recipients/*}` · permission `notify:write` · effect `write`
771
+ *
772
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
773
+ */
774
+ async update(request) {
775
+ return this.client.call({
776
+ method: 'PATCH',
777
+ path: `/v1/${runtime.pathParam(request.recipient?.name, 'orgs/*/projects/*/envs/*/recipients/*', 'recipient.name')}`,
778
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
779
+ body: request.recipient ?? {},
780
+ bodyType: 'sylphx.notify.v1.Recipient',
781
+ responseType: 'sylphx.notify.v1.Recipient',
782
+ mutation: true,
783
+ });
784
+ }
785
+ /**
786
+ * Deletes a recipient.
787
+ *
788
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/recipients/*}` · permission `notify:write` · effect `destructive`
789
+ *
790
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
791
+ */
792
+ async delete(request) {
793
+ return this.client.call({
794
+ method: 'DELETE',
795
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/recipients/*', 'name')}`,
796
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
797
+ mutation: true,
798
+ });
799
+ }
800
+ }
801
+ /** `preferences` of Sylphx Notify: Resource type `notify.sylphx.com/Preference`. */
802
+ export class PreferencesCollection {
803
+ client;
804
+ constructor(client) {
805
+ this.client = client;
806
+ }
807
+ /**
808
+ * Gets a preference.
809
+ *
810
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/recipients/*\/preferences/*}` · permission `notify:read` · effect `read`
811
+ *
812
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
813
+ */
814
+ async get(request) {
815
+ return this.client.call({
816
+ method: 'GET',
817
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/recipients/*/preferences/*', 'name')}`,
818
+ responseType: 'sylphx.notify.v1.Preference',
819
+ mutation: false,
820
+ });
821
+ }
822
+ /**
823
+ * Lists preferences.
824
+ *
825
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/recipients/*}/preferences` · permission `notify:read` · effect `read`
826
+ *
827
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
828
+ */
829
+ async list(request) {
830
+ return this.client.call({
831
+ method: 'GET',
832
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/recipients/*', 'parent')}/preferences`,
833
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
834
+ responseType: 'sylphx.notify.v1.ListPreferencesResponse',
835
+ mutation: false,
836
+ });
837
+ }
838
+ /** Every item of every page of `list`. */
839
+ async *listAll(request) {
840
+ let next = request;
841
+ for (;;) {
842
+ const page = await this.list(next);
843
+ yield* page.preferences ?? [];
844
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
845
+ return;
846
+ next = { ...request, pageToken: page.nextPageToken };
847
+ }
848
+ }
849
+ /**
850
+ * Updates a preference.
851
+ *
852
+ * `PATCH /v1/{preference.name=orgs/*\/projects/*\/envs/*\/recipients/*\/preferences/*}` · permission `notify:write` · effect `write`
853
+ *
854
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
855
+ */
856
+ async update(request) {
857
+ return this.client.call({
858
+ method: 'PATCH',
859
+ path: `/v1/${runtime.pathParam(request.preference?.name, 'orgs/*/projects/*/envs/*/recipients/*/preferences/*', 'preference.name')}`,
860
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
861
+ body: request.preference ?? {},
862
+ bodyType: 'sylphx.notify.v1.Preference',
863
+ responseType: 'sylphx.notify.v1.Preference',
864
+ mutation: true,
865
+ });
866
+ }
867
+ /**
868
+ * Deletes a preference.
869
+ *
870
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/recipients/*\/preferences/*}` · permission `notify:write` · effect `destructive`
871
+ *
872
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
873
+ */
874
+ async delete(request) {
875
+ return this.client.call({
876
+ method: 'DELETE',
877
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/recipients/*/preferences/*', 'name')}`,
878
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
879
+ mutation: true,
880
+ });
881
+ }
882
+ }
883
+ /** `suppressions` of Sylphx Notify: Resource type `notify.sylphx.com/Suppression`. */
884
+ export class SuppressionsCollection {
885
+ client;
886
+ constructor(client) {
887
+ this.client = client;
888
+ }
889
+ /**
890
+ * Gets a suppression.
891
+ *
892
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/suppressions/*}` · permission `notify:read` · effect `read`
893
+ *
894
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
895
+ */
896
+ async get(request) {
897
+ return this.client.call({
898
+ method: 'GET',
899
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/suppressions/*', 'name')}`,
900
+ responseType: 'sylphx.notify.v1.Suppression',
901
+ mutation: false,
902
+ });
903
+ }
904
+ /**
905
+ * Lists suppressions.
906
+ *
907
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/suppressions` · permission `notify:read` · effect `read`
908
+ *
909
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
910
+ */
911
+ async list(request) {
912
+ return this.client.call({
913
+ method: 'GET',
914
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/suppressions`,
915
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
916
+ responseType: 'sylphx.notify.v1.ListSuppressionsResponse',
917
+ mutation: false,
918
+ });
919
+ }
920
+ /** Every item of every page of `list`. */
921
+ async *listAll(request) {
922
+ let next = request;
923
+ for (;;) {
924
+ const page = await this.list(next);
925
+ yield* page.suppressions ?? [];
926
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
927
+ return;
928
+ next = { ...request, pageToken: page.nextPageToken };
929
+ }
930
+ }
931
+ /**
932
+ * Creates a suppression.
933
+ *
934
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/suppressions` · permission `notify:write` · effect `write`
935
+ *
936
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
937
+ */
938
+ async create(request) {
939
+ return this.client.call({
940
+ method: 'POST',
941
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/suppressions`,
942
+ query: { suppression_id: request.suppressionId, validate_only: request.validateOnly },
943
+ body: request.suppression ?? {},
944
+ bodyType: 'sylphx.notify.v1.Suppression',
945
+ responseType: 'sylphx.notify.v1.Suppression',
946
+ mutation: true,
947
+ });
948
+ }
949
+ /**
950
+ * Deletes a suppression.
951
+ *
952
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/suppressions/*}` · permission `notify:write` · effect `destructive`
953
+ *
954
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
955
+ */
956
+ async delete(request) {
957
+ return this.client.call({
958
+ method: 'DELETE',
959
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/suppressions/*', 'name')}`,
960
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
961
+ mutation: true,
962
+ });
963
+ }
964
+ }
965
+ /** `templates` of Sylphx Notify: Resource type `notify.sylphx.com/Template`. */
966
+ export class TemplatesCollection {
967
+ client;
968
+ constructor(client) {
969
+ this.client = client;
970
+ }
971
+ /**
972
+ * Gets a template.
973
+ *
974
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/templates/*}` · permission `notify:read` · effect `read`
975
+ *
976
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
977
+ */
978
+ async get(request) {
979
+ return this.client.call({
980
+ method: 'GET',
981
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/templates/*', 'name')}`,
982
+ responseType: 'sylphx.notify.v1.Template',
983
+ mutation: false,
984
+ });
985
+ }
986
+ /**
987
+ * Lists templates.
988
+ *
989
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/templates` · permission `notify:read` · effect `read`
990
+ *
991
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
992
+ */
993
+ async list(request) {
994
+ return this.client.call({
995
+ method: 'GET',
996
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/templates`,
997
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
998
+ responseType: 'sylphx.notify.v1.ListTemplatesResponse',
999
+ mutation: false,
1000
+ });
1001
+ }
1002
+ /** Every item of every page of `list`. */
1003
+ async *listAll(request) {
1004
+ let next = request;
1005
+ for (;;) {
1006
+ const page = await this.list(next);
1007
+ yield* page.templates ?? [];
1008
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1009
+ return;
1010
+ next = { ...request, pageToken: page.nextPageToken };
1011
+ }
1012
+ }
1013
+ /**
1014
+ * Creates a template.
1015
+ *
1016
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/templates` · permission `notify:write` · effect `write`
1017
+ *
1018
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1019
+ */
1020
+ async create(request) {
1021
+ return this.client.call({
1022
+ method: 'POST',
1023
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/templates`,
1024
+ query: { template_id: request.templateId, validate_only: request.validateOnly },
1025
+ body: request.template ?? {},
1026
+ bodyType: 'sylphx.notify.v1.Template',
1027
+ responseType: 'sylphx.notify.v1.Template',
1028
+ mutation: true,
1029
+ });
1030
+ }
1031
+ /**
1032
+ * Updates a template.
1033
+ *
1034
+ * `PATCH /v1/{template.name=orgs/*\/projects/*\/envs/*\/templates/*}` · permission `notify:write` · effect `write`
1035
+ *
1036
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1037
+ */
1038
+ async update(request) {
1039
+ return this.client.call({
1040
+ method: 'PATCH',
1041
+ path: `/v1/${runtime.pathParam(request.template?.name, 'orgs/*/projects/*/envs/*/templates/*', 'template.name')}`,
1042
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1043
+ body: request.template ?? {},
1044
+ bodyType: 'sylphx.notify.v1.Template',
1045
+ responseType: 'sylphx.notify.v1.Template',
1046
+ mutation: true,
1047
+ });
1048
+ }
1049
+ /**
1050
+ * Deletes a template.
1051
+ *
1052
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/templates/*}` · permission `notify:write` · effect `destructive`
1053
+ *
1054
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1055
+ */
1056
+ async delete(request) {
1057
+ return this.client.call({
1058
+ method: 'DELETE',
1059
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/templates/*', 'name')}`,
1060
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1061
+ mutation: true,
1062
+ });
1063
+ }
1064
+ }
1065
+ /** `messages` of Sylphx Notify: Resource type `notify.sylphx.com/Message`. */
1066
+ export class MessagesCollection {
1067
+ client;
1068
+ constructor(client) {
1069
+ this.client = client;
1070
+ }
1071
+ /**
1072
+ * Gets a message.
1073
+ *
1074
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/messages/*}` · permission `notify:read` · effect `read`
1075
+ *
1076
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1077
+ */
1078
+ async get(request) {
1079
+ return this.client.call({
1080
+ method: 'GET',
1081
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/messages/*', 'name')}`,
1082
+ responseType: 'sylphx.notify.v1.Message',
1083
+ mutation: false,
1084
+ });
1085
+ }
1086
+ /**
1087
+ * Lists messages.
1088
+ *
1089
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/messages` · permission `notify:read` · effect `read`
1090
+ *
1091
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1092
+ */
1093
+ async list(request) {
1094
+ return this.client.call({
1095
+ method: 'GET',
1096
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/messages`,
1097
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1098
+ responseType: 'sylphx.notify.v1.ListMessagesResponse',
1099
+ mutation: false,
1100
+ });
1101
+ }
1102
+ /** Every item of every page of `list`. */
1103
+ async *listAll(request) {
1104
+ let next = request;
1105
+ for (;;) {
1106
+ const page = await this.list(next);
1107
+ yield* page.messages ?? [];
1108
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1109
+ return;
1110
+ next = { ...request, pageToken: page.nextPageToken };
1111
+ }
1112
+ }
1113
+ /**
1114
+ * Sends a Message.
1115
+ *
1116
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/messages` · permission `notify:send` · effect `write`
1117
+ *
1118
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `RATE_LIMITED`, `INVALID_STATE`.
1119
+ */
1120
+ async create(request) {
1121
+ return this.client.call({
1122
+ method: 'POST',
1123
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/messages`,
1124
+ query: { message_id: request.messageId, validate_only: request.validateOnly },
1125
+ body: request.message ?? {},
1126
+ bodyType: 'sylphx.notify.v1.Message',
1127
+ responseType: 'sylphx.notify.v1.Message',
1128
+ mutation: true,
1129
+ });
1130
+ }
1131
+ /**
1132
+ * Cancels a Message whose deliveries have not been handed off.
1133
+ *
1134
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/messages/*}:cancel` · permission `notify:send` · effect `destructive`
1135
+ *
1136
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1137
+ */
1138
+ async cancel(request) {
1139
+ return this.client.call({
1140
+ method: 'POST',
1141
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/messages/*', 'name')}:cancel`,
1142
+ body: runtime.omit(request, ['name']),
1143
+ bodyType: 'sylphx.notify.v1.CancelMessageRequest',
1144
+ responseType: 'sylphx.notify.v1.Message',
1145
+ mutation: true,
1146
+ });
1147
+ }
1148
+ }
1149
+ /** `mailboxes` of Sylphx Notify: Resource type `notify.sylphx.com/Mailbox`. */
1150
+ export class MailboxesCollection {
1151
+ client;
1152
+ constructor(client) {
1153
+ this.client = client;
1154
+ }
1155
+ /**
1156
+ * Gets a mailbox.
1157
+ *
1158
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/mailboxes/*}` · permission `notify:read` · effect `read`
1159
+ *
1160
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1161
+ */
1162
+ async get(request) {
1163
+ return this.client.call({
1164
+ method: 'GET',
1165
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/mailboxes/*', 'name')}`,
1166
+ responseType: 'sylphx.notify.v1.Mailbox',
1167
+ mutation: false,
1168
+ });
1169
+ }
1170
+ /**
1171
+ * Lists mailboxes.
1172
+ *
1173
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/mailboxes` · permission `notify:read` · effect `read`
1174
+ *
1175
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1176
+ */
1177
+ async list(request) {
1178
+ return this.client.call({
1179
+ method: 'GET',
1180
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/mailboxes`,
1181
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1182
+ responseType: 'sylphx.notify.v1.ListMailboxesResponse',
1183
+ mutation: false,
1184
+ });
1185
+ }
1186
+ /** Every item of every page of `list`. */
1187
+ async *listAll(request) {
1188
+ let next = request;
1189
+ for (;;) {
1190
+ const page = await this.list(next);
1191
+ yield* page.mailboxes ?? [];
1192
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1193
+ return;
1194
+ next = { ...request, pageToken: page.nextPageToken };
1195
+ }
1196
+ }
1197
+ /**
1198
+ * Creates a mailbox.
1199
+ *
1200
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/mailboxes` · permission `notify:write` · effect `write`
1201
+ *
1202
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1203
+ */
1204
+ async create(request) {
1205
+ return this.client.call({
1206
+ method: 'POST',
1207
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/mailboxes`,
1208
+ query: { mailbox_id: request.mailboxId, validate_only: request.validateOnly },
1209
+ body: request.mailbox ?? {},
1210
+ bodyType: 'sylphx.notify.v1.Mailbox',
1211
+ responseType: 'sylphx.notify.v1.Mailbox',
1212
+ mutation: true,
1213
+ });
1214
+ }
1215
+ /**
1216
+ * Updates a mailbox.
1217
+ *
1218
+ * `PATCH /v1/{mailbox.name=orgs/*\/projects/*\/envs/*\/mailboxes/*}` · permission `notify:write` · effect `write`
1219
+ *
1220
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1221
+ */
1222
+ async update(request) {
1223
+ return this.client.call({
1224
+ method: 'PATCH',
1225
+ path: `/v1/${runtime.pathParam(request.mailbox?.name, 'orgs/*/projects/*/envs/*/mailboxes/*', 'mailbox.name')}`,
1226
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1227
+ body: request.mailbox ?? {},
1228
+ bodyType: 'sylphx.notify.v1.Mailbox',
1229
+ responseType: 'sylphx.notify.v1.Mailbox',
1230
+ mutation: true,
1231
+ });
1232
+ }
1233
+ /**
1234
+ * Deletes a mailbox and its inbound email.
1235
+ *
1236
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/mailboxes/*}` · permission `notify:write` · effect `destructive`
1237
+ *
1238
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `RESOURCE_IN_USE`.
1239
+ */
1240
+ async delete(request) {
1241
+ return this.client.call({
1242
+ method: 'DELETE',
1243
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/mailboxes/*', 'name')}`,
1244
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
1245
+ mutation: true,
1246
+ });
1247
+ }
1248
+ /**
1249
+ * Removes an address's personal data from every inbound email of the
1250
+ * mailbox that it sent or that names it, keeping the dedupe keys so a poll
1251
+ * never brings the mail back.
1252
+ *
1253
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/mailboxes/*}:eraseAddress` · permission `notify:write` · effect `destructive`
1254
+ *
1255
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1256
+ */
1257
+ async eraseAddress(request) {
1258
+ return this.client.call({
1259
+ method: 'POST',
1260
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/mailboxes/*', 'name')}:eraseAddress`,
1261
+ body: runtime.omit(request, ['name']),
1262
+ bodyType: 'sylphx.notify.v1.EraseMailboxAddressRequest',
1263
+ responseType: 'sylphx.notify.v1.EraseMailboxAddressResponse',
1264
+ mutation: true,
1265
+ });
1266
+ }
1267
+ }
1268
+ /** `inbound_emails` of Sylphx Notify: Resource type `notify.sylphx.com/InboundEmail`. */
1269
+ export class InboundEmailsCollection {
1270
+ client;
1271
+ constructor(client) {
1272
+ this.client = client;
1273
+ }
1274
+ /**
1275
+ * Gets an inbound email.
1276
+ *
1277
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/mailboxes/*\/inbound_emails/*}` · permission `notify:read` · effect `read`
1278
+ *
1279
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1280
+ */
1281
+ async get(request) {
1282
+ return this.client.call({
1283
+ method: 'GET',
1284
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/mailboxes/*/inbound_emails/*', 'name')}`,
1285
+ responseType: 'sylphx.notify.v1.InboundEmail',
1286
+ mutation: false,
1287
+ });
1288
+ }
1289
+ /**
1290
+ * Lists a mailbox's inbound email in feed order, oldest first.
1291
+ *
1292
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/mailboxes/*}/inbound_emails` · permission `notify:read` · effect `read`
1293
+ *
1294
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1295
+ */
1296
+ async list(request) {
1297
+ return this.client.call({
1298
+ method: 'GET',
1299
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/mailboxes/*', 'parent')}/inbound_emails`,
1300
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1301
+ responseType: 'sylphx.notify.v1.ListInboundEmailsResponse',
1302
+ mutation: false,
1303
+ });
1304
+ }
1305
+ /** Every item of every page of `list`. */
1306
+ async *listAll(request) {
1307
+ let next = request;
1308
+ for (;;) {
1309
+ const page = await this.list(next);
1310
+ yield* page.inboundEmails ?? [];
1311
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1312
+ return;
1313
+ next = { ...request, pageToken: page.nextPageToken };
1314
+ }
1315
+ }
1316
+ }
1317
+ /** `inbox_items` of Sylphx Notify: Resource type `notify.sylphx.com/InboxItem`. */
1318
+ export class InboxItemsCollection {
1319
+ client;
1320
+ constructor(client) {
1321
+ this.client = client;
1322
+ }
1323
+ /**
1324
+ * Gets an inbox item.
1325
+ *
1326
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/recipients/*\/inbox_items/*}` · permission `notify:read` · effect `read`
1327
+ *
1328
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1329
+ */
1330
+ async get(request) {
1331
+ return this.client.call({
1332
+ method: 'GET',
1333
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/recipients/*/inbox_items/*', 'name')}`,
1334
+ responseType: 'sylphx.notify.v1.InboxItem',
1335
+ mutation: false,
1336
+ });
1337
+ }
1338
+ /**
1339
+ * Lists inbox items.
1340
+ *
1341
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/recipients/*}/inbox_items` · permission `notify:read` · effect `read`
1342
+ *
1343
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1344
+ */
1345
+ async list(request) {
1346
+ return this.client.call({
1347
+ method: 'GET',
1348
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/recipients/*', 'parent')}/inbox_items`,
1349
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1350
+ responseType: 'sylphx.notify.v1.ListInboxItemsResponse',
1351
+ mutation: false,
1352
+ });
1353
+ }
1354
+ /** Every item of every page of `list`. */
1355
+ async *listAll(request) {
1356
+ let next = request;
1357
+ for (;;) {
1358
+ const page = await this.list(next);
1359
+ yield* page.inboxItems ?? [];
1360
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1361
+ return;
1362
+ next = { ...request, pageToken: page.nextPageToken };
1363
+ }
1364
+ }
1365
+ /**
1366
+ * Marks an inbox item read.
1367
+ *
1368
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/recipients/*\/inbox_items/*}:markRead` · permission `notify:write` · effect `write`
1369
+ *
1370
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1371
+ */
1372
+ async markRead(request) {
1373
+ return this.client.call({
1374
+ method: 'POST',
1375
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/recipients/*/inbox_items/*', 'name')}:markRead`,
1376
+ body: runtime.omit(request, ['name']),
1377
+ bodyType: 'sylphx.notify.v1.MarkInboxItemReadRequest',
1378
+ responseType: 'sylphx.notify.v1.InboxItem',
1379
+ mutation: true,
1380
+ });
1381
+ }
1382
+ /**
1383
+ * Marks an inbox item unread.
1384
+ *
1385
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/recipients/*\/inbox_items/*}:markUnread` · permission `notify:write` · effect `write`
1386
+ *
1387
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1388
+ */
1389
+ async markUnread(request) {
1390
+ return this.client.call({
1391
+ method: 'POST',
1392
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/recipients/*/inbox_items/*', 'name')}:markUnread`,
1393
+ body: runtime.omit(request, ['name']),
1394
+ bodyType: 'sylphx.notify.v1.MarkInboxItemUnreadRequest',
1395
+ responseType: 'sylphx.notify.v1.InboxItem',
1396
+ mutation: true,
1397
+ });
1398
+ }
1399
+ /**
1400
+ * Archives an inbox item.
1401
+ *
1402
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/recipients/*\/inbox_items/*}:archive` · permission `notify:write` · effect `write`
1403
+ *
1404
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1405
+ */
1406
+ async archive(request) {
1407
+ return this.client.call({
1408
+ method: 'POST',
1409
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/recipients/*/inbox_items/*', 'name')}:archive`,
1410
+ body: runtime.omit(request, ['name']),
1411
+ bodyType: 'sylphx.notify.v1.ArchiveInboxItemRequest',
1412
+ responseType: 'sylphx.notify.v1.InboxItem',
1413
+ mutation: true,
1414
+ });
1415
+ }
1416
+ }
1417
+ /** `broadcasts` of Sylphx Notify: Resource type `notify.sylphx.com/Broadcast`. */
1418
+ export class BroadcastsCollection {
1419
+ client;
1420
+ constructor(client) {
1421
+ this.client = client;
1422
+ }
1423
+ /**
1424
+ * Gets a broadcast.
1425
+ *
1426
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/broadcasts/*}` · permission `notify:read` · effect `read`
1427
+ *
1428
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1429
+ */
1430
+ async get(request) {
1431
+ return this.client.call({
1432
+ method: 'GET',
1433
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/broadcasts/*', 'name')}`,
1434
+ responseType: 'sylphx.notify.v1.Broadcast',
1435
+ mutation: false,
1436
+ });
1437
+ }
1438
+ /**
1439
+ * Lists broadcasts.
1440
+ *
1441
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/broadcasts` · permission `notify:read` · effect `read`
1442
+ *
1443
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1444
+ */
1445
+ async list(request) {
1446
+ return this.client.call({
1447
+ method: 'GET',
1448
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/broadcasts`,
1449
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1450
+ responseType: 'sylphx.notify.v1.ListBroadcastsResponse',
1451
+ mutation: false,
1452
+ });
1453
+ }
1454
+ /** Every item of every page of `list`. */
1455
+ async *listAll(request) {
1456
+ let next = request;
1457
+ for (;;) {
1458
+ const page = await this.list(next);
1459
+ yield* page.broadcasts ?? [];
1460
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1461
+ return;
1462
+ next = { ...request, pageToken: page.nextPageToken };
1463
+ }
1464
+ }
1465
+ /**
1466
+ * Creates a broadcast.
1467
+ *
1468
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/broadcasts` · permission `notify:write` · effect `write`
1469
+ *
1470
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1471
+ */
1472
+ async create(request) {
1473
+ return this.client.call({
1474
+ method: 'POST',
1475
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/broadcasts`,
1476
+ query: { broadcast_id: request.broadcastId, validate_only: request.validateOnly },
1477
+ body: request.broadcast ?? {},
1478
+ bodyType: 'sylphx.notify.v1.Broadcast',
1479
+ responseType: 'sylphx.notify.v1.Broadcast',
1480
+ mutation: true,
1481
+ });
1482
+ }
1483
+ /**
1484
+ * Updates a broadcast.
1485
+ *
1486
+ * `PATCH /v1/{broadcast.name=orgs/*\/projects/*\/envs/*\/broadcasts/*}` · permission `notify:write` · effect `write`
1487
+ *
1488
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1489
+ */
1490
+ async update(request) {
1491
+ return this.client.call({
1492
+ method: 'PATCH',
1493
+ path: `/v1/${runtime.pathParam(request.broadcast?.name, 'orgs/*/projects/*/envs/*/broadcasts/*', 'broadcast.name')}`,
1494
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1495
+ body: request.broadcast ?? {},
1496
+ bodyType: 'sylphx.notify.v1.Broadcast',
1497
+ responseType: 'sylphx.notify.v1.Broadcast',
1498
+ mutation: true,
1499
+ });
1500
+ }
1501
+ /**
1502
+ * Deletes a broadcast.
1503
+ *
1504
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/broadcasts/*}` · permission `notify:write` · effect `destructive`
1505
+ *
1506
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1507
+ */
1508
+ async delete(request) {
1509
+ return this.client.call({
1510
+ method: 'DELETE',
1511
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/broadcasts/*', 'name')}`,
1512
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1513
+ mutation: true,
1514
+ });
1515
+ }
1516
+ /**
1517
+ * Sends a Broadcast now.
1518
+ *
1519
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/broadcasts/*}:send` · permission `notify:send` · effect `write`
1520
+ *
1521
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `ETAG_MISMATCH`.
1522
+ */
1523
+ async send(request) {
1524
+ return this.client.call({
1525
+ method: 'POST',
1526
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/broadcasts/*', 'name')}:send`,
1527
+ body: runtime.omit(request, ['name']),
1528
+ bodyType: 'sylphx.notify.v1.SendBroadcastRequest',
1529
+ responseType: 'sylphx.notify.v1.Broadcast',
1530
+ mutation: true,
1531
+ });
1532
+ }
1533
+ /**
1534
+ * Cancels a Broadcast; messages already admitted still deliver.
1535
+ *
1536
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/broadcasts/*}:cancel` · permission `notify:send` · effect `destructive`
1537
+ *
1538
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `ETAG_MISMATCH`.
1539
+ */
1540
+ async cancel(request) {
1541
+ return this.client.call({
1542
+ method: 'POST',
1543
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/broadcasts/*', 'name')}:cancel`,
1544
+ body: runtime.omit(request, ['name']),
1545
+ bodyType: 'sylphx.notify.v1.CancelBroadcastRequest',
1546
+ responseType: 'sylphx.notify.v1.Broadcast',
1547
+ mutation: true,
1548
+ });
1549
+ }
1550
+ }
1551
+ //# sourceMappingURL=notify.js.map