samva 0.31.0 → 0.33.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.
- package/dist/client/sdk.gen.d.ts +77 -10
- package/dist/client/sdk.gen.js +244 -16
- package/dist/client/types.gen.d.ts +607 -34
- package/dist/effect/email.d.ts +3 -0
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/generated/campaigns.d.ts +131 -57
- package/dist/effect/generated/campaigns.js +27 -9
- package/dist/effect/generated/contact-groups.js +2 -2
- package/dist/effect/generated/contacts.js +6 -6
- package/dist/effect/generated/email.d.ts +17 -1
- package/dist/effect/generated/email.js +12 -8
- package/dist/effect/generated/mailboxes.d.ts +969 -16
- package/dist/effect/generated/mailboxes.js +264 -12
- package/dist/effect/generated/newsletter-issues.d.ts +199 -1
- package/dist/effect/generated/newsletter-issues.js +24 -2
- package/dist/effect/generated/newsletters.js +1 -1
- package/dist/effect/generated/organizations.d.ts +345 -2
- package/dist/effect/generated/organizations.js +65 -5
- package/dist/effect/generated/scheduled-messages.d.ts +25 -8
- package/dist/effect/generated/scheduled-messages.js +17 -9
- package/dist/effect/generated/shared.d.ts +90 -9
- package/dist/effect/generated/shared.js +14 -10
- package/dist/effect/generated/subscriptions.js +1 -1
- package/dist/effect/generated/templates.d.ts +307 -1
- package/dist/effect/generated/templates.js +38 -4
- package/dist/effect/generated/topics.js +2 -2
- package/dist/effect/generated/whoami.d.ts +5 -5
- package/dist/effect/generated/whoami.js +1 -0
- package/dist/effect/generated-metadata.d.ts +40 -0
- package/dist/effect/generated-metadata.js +10 -0
- package/dist/effect/index.js +2 -2
- package/dist/effect/internal/send.d.ts +1 -1
- package/dist/effect/mailboxes.d.ts +273 -0
- package/dist/effect/mailboxes.js +7 -1
- package/dist/effect/organizations.d.ts +6 -0
- package/dist/effect/organizations.js +7 -1
- package/dist/index.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/client.js +2 -2
- package/dist/promises/errors.gen.d.ts +12 -2
- package/dist/promises/errors.gen.js +28 -1
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +25 -0
- package/dist/service-map.js +9 -0
- package/package.json +8 -8
|
@@ -14,6 +14,8 @@ export declare const list: ((input?: {
|
|
|
14
14
|
} | undefined) => import("effect/Stream").Stream<{
|
|
15
15
|
readonly items: readonly {
|
|
16
16
|
readonly id: string & import("effect/Brand").Brand<"MailboxId">;
|
|
17
|
+
readonly kind: "personal" | "shared";
|
|
18
|
+
readonly owner: (string & import("effect/Brand").Brand<"UserId">) | null;
|
|
17
19
|
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
18
20
|
readonly slug: string;
|
|
19
21
|
readonly name: string;
|
|
@@ -30,6 +32,8 @@ export declare const list: ((input?: {
|
|
|
30
32
|
readonly before?: string | null | undefined;
|
|
31
33
|
} | undefined) => import("effect/Stream").Stream<{
|
|
32
34
|
readonly id: string & import("effect/Brand").Brand<"MailboxId">;
|
|
35
|
+
readonly kind: "personal" | "shared";
|
|
36
|
+
readonly owner: (string & import("effect/Brand").Brand<"UserId">) | null;
|
|
33
37
|
readonly namespaceId: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
|
|
34
38
|
readonly slug: string;
|
|
35
39
|
readonly name: string;
|
|
@@ -201,6 +205,7 @@ export declare const listThreads: ((input: {
|
|
|
201
205
|
readonly after?: string | null | undefined;
|
|
202
206
|
readonly before?: string | null | undefined;
|
|
203
207
|
readonly q?: string | null | undefined;
|
|
208
|
+
readonly state?: "active" | "done" | null | undefined;
|
|
204
209
|
readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | null | undefined;
|
|
205
210
|
readonly label?: string | null | undefined;
|
|
206
211
|
readonly unread?: boolean | null | undefined;
|
|
@@ -214,6 +219,7 @@ export declare const listThreads: ((input: {
|
|
|
214
219
|
readonly after?: string | null | undefined;
|
|
215
220
|
readonly before?: string | null | undefined;
|
|
216
221
|
readonly q?: string | null | undefined;
|
|
222
|
+
readonly state?: "active" | "done" | null | undefined;
|
|
217
223
|
readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | null | undefined;
|
|
218
224
|
readonly label?: string | null | undefined;
|
|
219
225
|
readonly unread?: boolean | null | undefined;
|
|
@@ -239,6 +245,13 @@ export declare const listThreads: ((input: {
|
|
|
239
245
|
readonly read: boolean;
|
|
240
246
|
readonly starred: boolean;
|
|
241
247
|
readonly snoozedUntil: string | null;
|
|
248
|
+
readonly doneAt: string | null;
|
|
249
|
+
readonly closedAt: string | null;
|
|
250
|
+
readonly closedBy: {
|
|
251
|
+
readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
|
|
252
|
+
readonly id: string;
|
|
253
|
+
readonly displayName?: string | null;
|
|
254
|
+
} | null;
|
|
242
255
|
readonly lastActivityAt: string;
|
|
243
256
|
}[];
|
|
244
257
|
readonly nextCursor: string | null;
|
|
@@ -250,6 +263,7 @@ export declare const listThreads: ((input: {
|
|
|
250
263
|
readonly after?: string | null | undefined;
|
|
251
264
|
readonly before?: string | null | undefined;
|
|
252
265
|
readonly q?: string | null | undefined;
|
|
266
|
+
readonly state?: "active" | "done" | null | undefined;
|
|
253
267
|
readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | null | undefined;
|
|
254
268
|
readonly label?: string | null | undefined;
|
|
255
269
|
readonly unread?: boolean | null | undefined;
|
|
@@ -274,9 +288,209 @@ export declare const listThreads: ((input: {
|
|
|
274
288
|
readonly read: boolean;
|
|
275
289
|
readonly starred: boolean;
|
|
276
290
|
readonly snoozedUntil: string | null;
|
|
291
|
+
readonly doneAt: string | null;
|
|
292
|
+
readonly closedAt: string | null;
|
|
293
|
+
readonly closedBy: {
|
|
294
|
+
readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
|
|
295
|
+
readonly id: string;
|
|
296
|
+
readonly displayName?: string | null;
|
|
297
|
+
} | null;
|
|
298
|
+
readonly lastActivityAt: string;
|
|
299
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
300
|
+
};
|
|
301
|
+
export declare const listOrganizationThreads: ((input?: {
|
|
302
|
+
readonly limit?: number | null | undefined;
|
|
303
|
+
readonly cursor?: string | null | undefined;
|
|
304
|
+
readonly after?: string | null | undefined;
|
|
305
|
+
readonly before?: string | null | undefined;
|
|
306
|
+
readonly q?: string | null | undefined;
|
|
307
|
+
readonly state?: "active" | "done" | null | undefined;
|
|
308
|
+
readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | null | undefined;
|
|
309
|
+
readonly label?: string | null | undefined;
|
|
310
|
+
readonly unread?: boolean | null | undefined;
|
|
311
|
+
readonly starred?: boolean | null | undefined;
|
|
312
|
+
readonly snoozed?: boolean | null | undefined;
|
|
313
|
+
readonly mailboxId?: string | readonly string[] | null | undefined;
|
|
314
|
+
readonly kind?: "personal" | "shared" | null | undefined;
|
|
315
|
+
readonly conversation?: string | null | undefined;
|
|
316
|
+
} | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListOrganizationThreads">) & {
|
|
317
|
+
readonly pages: (input?: {
|
|
318
|
+
readonly limit?: number | null | undefined;
|
|
319
|
+
readonly cursor?: string | null | undefined;
|
|
320
|
+
readonly after?: string | null | undefined;
|
|
321
|
+
readonly before?: string | null | undefined;
|
|
322
|
+
readonly q?: string | null | undefined;
|
|
323
|
+
readonly state?: "active" | "done" | null | undefined;
|
|
324
|
+
readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | null | undefined;
|
|
325
|
+
readonly label?: string | null | undefined;
|
|
326
|
+
readonly unread?: boolean | null | undefined;
|
|
327
|
+
readonly starred?: boolean | null | undefined;
|
|
328
|
+
readonly snoozed?: boolean | null | undefined;
|
|
329
|
+
readonly mailboxId?: string | readonly string[] | null | undefined;
|
|
330
|
+
readonly kind?: "personal" | "shared" | null | undefined;
|
|
331
|
+
readonly conversation?: string | null | undefined;
|
|
332
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
333
|
+
readonly items: readonly {
|
|
334
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
|
|
335
|
+
readonly channel: "email";
|
|
336
|
+
readonly endpointId: (string & import("effect/Brand").Brand<"MailboxEndpointId">) | null;
|
|
337
|
+
readonly subject: string | null;
|
|
338
|
+
readonly preview: string | null;
|
|
339
|
+
readonly from: {
|
|
340
|
+
readonly address: string | null;
|
|
341
|
+
readonly displayName: string | null;
|
|
342
|
+
} | null;
|
|
343
|
+
readonly messageCount: number;
|
|
344
|
+
readonly hasAttachments: boolean;
|
|
345
|
+
readonly hasDraft: boolean;
|
|
346
|
+
readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
|
|
347
|
+
readonly priority: "high" | "low" | "normal" | "urgent";
|
|
348
|
+
readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
|
|
349
|
+
readonly read: boolean;
|
|
350
|
+
readonly starred: boolean;
|
|
351
|
+
readonly snoozedUntil: string | null;
|
|
352
|
+
readonly doneAt: string | null;
|
|
353
|
+
readonly closedAt: string | null;
|
|
354
|
+
readonly closedBy: {
|
|
355
|
+
readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
|
|
356
|
+
readonly id: string;
|
|
357
|
+
readonly displayName?: string | null;
|
|
358
|
+
} | null;
|
|
359
|
+
readonly lastActivityAt: string;
|
|
360
|
+
readonly mailbox: {
|
|
361
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxId">;
|
|
362
|
+
readonly address: string | null;
|
|
363
|
+
readonly kind: "personal" | "shared";
|
|
364
|
+
};
|
|
365
|
+
}[];
|
|
366
|
+
readonly nextCursor: string | null;
|
|
367
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
368
|
+
readonly items: (input?: {
|
|
369
|
+
readonly limit?: number | null | undefined;
|
|
370
|
+
readonly cursor?: string | null | undefined;
|
|
371
|
+
readonly after?: string | null | undefined;
|
|
372
|
+
readonly before?: string | null | undefined;
|
|
373
|
+
readonly q?: string | null | undefined;
|
|
374
|
+
readonly state?: "active" | "done" | null | undefined;
|
|
375
|
+
readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | null | undefined;
|
|
376
|
+
readonly label?: string | null | undefined;
|
|
377
|
+
readonly unread?: boolean | null | undefined;
|
|
378
|
+
readonly starred?: boolean | null | undefined;
|
|
379
|
+
readonly snoozed?: boolean | null | undefined;
|
|
380
|
+
readonly mailboxId?: string | readonly string[] | null | undefined;
|
|
381
|
+
readonly kind?: "personal" | "shared" | null | undefined;
|
|
382
|
+
readonly conversation?: string | null | undefined;
|
|
383
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
384
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxThreadId">;
|
|
385
|
+
readonly channel: "email";
|
|
386
|
+
readonly endpointId: (string & import("effect/Brand").Brand<"MailboxEndpointId">) | null;
|
|
387
|
+
readonly subject: string | null;
|
|
388
|
+
readonly preview: string | null;
|
|
389
|
+
readonly from: {
|
|
390
|
+
readonly address: string | null;
|
|
391
|
+
readonly displayName: string | null;
|
|
392
|
+
} | null;
|
|
393
|
+
readonly messageCount: number;
|
|
394
|
+
readonly hasAttachments: boolean;
|
|
395
|
+
readonly hasDraft: boolean;
|
|
396
|
+
readonly folder: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash";
|
|
397
|
+
readonly priority: "high" | "low" | "normal" | "urgent";
|
|
398
|
+
readonly labels: readonly (string & import("effect/Brand").Brand<"MailboxLabelId">)[];
|
|
399
|
+
readonly read: boolean;
|
|
400
|
+
readonly starred: boolean;
|
|
401
|
+
readonly snoozedUntil: string | null;
|
|
402
|
+
readonly doneAt: string | null;
|
|
403
|
+
readonly closedAt: string | null;
|
|
404
|
+
readonly closedBy: {
|
|
405
|
+
readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
|
|
406
|
+
readonly id: string;
|
|
407
|
+
readonly displayName?: string | null;
|
|
408
|
+
} | null;
|
|
277
409
|
readonly lastActivityAt: string;
|
|
410
|
+
readonly mailbox: {
|
|
411
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxId">;
|
|
412
|
+
readonly address: string | null;
|
|
413
|
+
readonly kind: "personal" | "shared";
|
|
414
|
+
};
|
|
278
415
|
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
279
416
|
};
|
|
417
|
+
export declare const getNeedsYou: ((input?: {
|
|
418
|
+
readonly limit?: number | null | undefined;
|
|
419
|
+
readonly cursor?: string | null | undefined;
|
|
420
|
+
} | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesGetNeedsYou">) & {
|
|
421
|
+
readonly pages: (input?: {
|
|
422
|
+
readonly limit?: number | null | undefined;
|
|
423
|
+
readonly cursor?: string | null | undefined;
|
|
424
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
425
|
+
readonly items: readonly ({
|
|
426
|
+
readonly type: "heldSend";
|
|
427
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
|
|
428
|
+
readonly mailbox: {
|
|
429
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxId">;
|
|
430
|
+
readonly address: string | null;
|
|
431
|
+
readonly kind: "personal" | "shared";
|
|
432
|
+
};
|
|
433
|
+
readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
|
|
434
|
+
readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
|
|
435
|
+
readonly proposedBy: {
|
|
436
|
+
readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
|
|
437
|
+
readonly id: string;
|
|
438
|
+
readonly displayName?: string | null;
|
|
439
|
+
};
|
|
440
|
+
readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
|
|
441
|
+
readonly createdAt: string;
|
|
442
|
+
} | {
|
|
443
|
+
readonly type: "quarantinedMessage";
|
|
444
|
+
readonly id: string & import("effect/Brand").Brand<"MessageId">;
|
|
445
|
+
readonly mailbox: {
|
|
446
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxId">;
|
|
447
|
+
readonly address: string | null;
|
|
448
|
+
readonly kind: "personal" | "shared";
|
|
449
|
+
};
|
|
450
|
+
readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
|
|
451
|
+
readonly source: "classifier" | "receipt";
|
|
452
|
+
readonly heldAt: string;
|
|
453
|
+
})[];
|
|
454
|
+
readonly nextCursor: string | null;
|
|
455
|
+
readonly counts: {
|
|
456
|
+
readonly heldSends: number;
|
|
457
|
+
readonly quarantinedMessages: number;
|
|
458
|
+
readonly total: number;
|
|
459
|
+
};
|
|
460
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
461
|
+
readonly items: (input?: {
|
|
462
|
+
readonly limit?: number | null | undefined;
|
|
463
|
+
readonly cursor?: string | null | undefined;
|
|
464
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
465
|
+
readonly type: "heldSend";
|
|
466
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxActionId">;
|
|
467
|
+
readonly mailbox: {
|
|
468
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxId">;
|
|
469
|
+
readonly address: string | null;
|
|
470
|
+
readonly kind: "personal" | "shared";
|
|
471
|
+
};
|
|
472
|
+
readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
|
|
473
|
+
readonly draftId: (string & import("effect/Brand").Brand<"MailboxDraftId">) | null;
|
|
474
|
+
readonly proposedBy: {
|
|
475
|
+
readonly kind: "apiKey" | "extension" | "externalAgent" | "samvaAgent" | "system" | "user";
|
|
476
|
+
readonly id: string;
|
|
477
|
+
readonly displayName?: string | null;
|
|
478
|
+
};
|
|
479
|
+
readonly source: "aiSdkTool" | "extension" | "externalAgent" | "externalApi" | "humanUi" | "samvaManagedAgent" | "system";
|
|
480
|
+
readonly createdAt: string;
|
|
481
|
+
} | {
|
|
482
|
+
readonly type: "quarantinedMessage";
|
|
483
|
+
readonly id: string & import("effect/Brand").Brand<"MessageId">;
|
|
484
|
+
readonly mailbox: {
|
|
485
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxId">;
|
|
486
|
+
readonly address: string | null;
|
|
487
|
+
readonly kind: "personal" | "shared";
|
|
488
|
+
};
|
|
489
|
+
readonly reason: "dmarc" | "fraud" | "phishing" | "prompt_injection" | "spam" | "virus" | "virus_unscanned";
|
|
490
|
+
readonly source: "classifier" | "receipt";
|
|
491
|
+
readonly heldAt: string;
|
|
492
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
493
|
+
};
|
|
280
494
|
export declare const getThread: (input: {
|
|
281
495
|
readonly id: string;
|
|
282
496
|
readonly threadId: string;
|
|
@@ -286,6 +500,8 @@ export declare const updateThread: (input: {
|
|
|
286
500
|
readonly threadId: string;
|
|
287
501
|
readonly folder?: "archived" | "assigned" | "inbox" | "pending" | "sent" | "trash" | null | undefined;
|
|
288
502
|
readonly priority?: "high" | "low" | "normal" | "urgent" | null | undefined;
|
|
503
|
+
readonly done?: boolean | null | undefined;
|
|
504
|
+
readonly closed?: boolean | null | undefined;
|
|
289
505
|
readonly read?: boolean | null | undefined;
|
|
290
506
|
readonly starred?: boolean | null | undefined;
|
|
291
507
|
readonly snoozedUntil?: string | null | undefined;
|
|
@@ -715,6 +931,63 @@ export declare const discardMessage: (input: {
|
|
|
715
931
|
readonly id: string;
|
|
716
932
|
readonly messageId: string;
|
|
717
933
|
}, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesDiscardMessage">;
|
|
934
|
+
export declare const listOrganizationDrafts: ((input?: {
|
|
935
|
+
readonly limit?: number | null | undefined;
|
|
936
|
+
readonly cursor?: string | null | undefined;
|
|
937
|
+
readonly mailboxId?: string | readonly string[] | null | undefined;
|
|
938
|
+
readonly kind?: "personal" | "shared" | null | undefined;
|
|
939
|
+
readonly threadId?: string | null | undefined;
|
|
940
|
+
} | undefined, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"mailboxesListOrganizationDrafts">) & {
|
|
941
|
+
readonly pages: (input?: {
|
|
942
|
+
readonly limit?: number | null | undefined;
|
|
943
|
+
readonly cursor?: string | null | undefined;
|
|
944
|
+
readonly mailboxId?: string | readonly string[] | null | undefined;
|
|
945
|
+
readonly kind?: "personal" | "shared" | null | undefined;
|
|
946
|
+
readonly threadId?: string | null | undefined;
|
|
947
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
948
|
+
readonly items: readonly {
|
|
949
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
|
|
950
|
+
readonly channel: "email";
|
|
951
|
+
readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
|
|
952
|
+
readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
|
|
953
|
+
readonly state: "locked" | "saved" | "sent";
|
|
954
|
+
readonly lockedByActionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
|
|
955
|
+
readonly to: readonly string[];
|
|
956
|
+
readonly subject: string | null;
|
|
957
|
+
readonly createdAt: string;
|
|
958
|
+
readonly updatedAt: string;
|
|
959
|
+
readonly mailbox: {
|
|
960
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxId">;
|
|
961
|
+
readonly address: string | null;
|
|
962
|
+
readonly kind: "personal" | "shared";
|
|
963
|
+
};
|
|
964
|
+
}[];
|
|
965
|
+
readonly nextCursor: string | null;
|
|
966
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
967
|
+
readonly items: (input?: {
|
|
968
|
+
readonly limit?: number | null | undefined;
|
|
969
|
+
readonly cursor?: string | null | undefined;
|
|
970
|
+
readonly mailboxId?: string | readonly string[] | null | undefined;
|
|
971
|
+
readonly kind?: "personal" | "shared" | null | undefined;
|
|
972
|
+
readonly threadId?: string | null | undefined;
|
|
973
|
+
} | undefined) => import("effect/Stream").Stream<{
|
|
974
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxDraftId">;
|
|
975
|
+
readonly channel: "email";
|
|
976
|
+
readonly threadId: (string & import("effect/Brand").Brand<"MailboxThreadId">) | null;
|
|
977
|
+
readonly inReplyToMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
|
|
978
|
+
readonly state: "locked" | "saved" | "sent";
|
|
979
|
+
readonly lockedByActionId: (string & import("effect/Brand").Brand<"MailboxActionId">) | null;
|
|
980
|
+
readonly to: readonly string[];
|
|
981
|
+
readonly subject: string | null;
|
|
982
|
+
readonly createdAt: string;
|
|
983
|
+
readonly updatedAt: string;
|
|
984
|
+
readonly mailbox: {
|
|
985
|
+
readonly id: string & import("effect/Brand").Brand<"MailboxId">;
|
|
986
|
+
readonly address: string | null;
|
|
987
|
+
readonly kind: "personal" | "shared";
|
|
988
|
+
};
|
|
989
|
+
}, import("./errors").ForbiddenError | import("./errors").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors").InternalError | import("./errors").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./errors").UnauthorizedError | import("./errors").ValidationError, import("./client").Service>;
|
|
990
|
+
};
|
|
718
991
|
export declare const listDrafts: ((input: {
|
|
719
992
|
readonly id: string;
|
|
720
993
|
readonly limit?: number | null | undefined;
|
package/dist/effect/mailboxes.js
CHANGED
|
@@ -32,6 +32,7 @@ var mailboxes_exports = /* @__PURE__ */ __exportAll({
|
|
|
32
32
|
getMessage: () => getMessage,
|
|
33
33
|
getMessageAttachment: () => getMessageAttachment,
|
|
34
34
|
getMessageRaw: () => getMessageRaw,
|
|
35
|
+
getNeedsYou: () => getNeedsYou,
|
|
35
36
|
getPolicy: () => getPolicy,
|
|
36
37
|
getThread: () => getThread,
|
|
37
38
|
getThreadContent: () => getThreadContent,
|
|
@@ -42,6 +43,8 @@ var mailboxes_exports = /* @__PURE__ */ __exportAll({
|
|
|
42
43
|
listFolders: () => listFolders,
|
|
43
44
|
listGrants: () => listGrants,
|
|
44
45
|
listLabels: () => listLabels,
|
|
46
|
+
listOrganizationDrafts: () => listOrganizationDrafts,
|
|
47
|
+
listOrganizationThreads: () => listOrganizationThreads,
|
|
45
48
|
listPolicies: () => listPolicies,
|
|
46
49
|
listQuarantine: () => listQuarantine,
|
|
47
50
|
listThreadMessages: () => listThreadMessages,
|
|
@@ -95,6 +98,8 @@ const createLabel = /* @__PURE__ */ make("mailboxesCreateLabel");
|
|
|
95
98
|
const updateLabel = /* @__PURE__ */ make("mailboxesUpdateLabel");
|
|
96
99
|
const deleteLabel = /* @__PURE__ */ make("mailboxesDeleteLabel");
|
|
97
100
|
const listThreads = /* @__PURE__ */ make("mailboxesListThreads");
|
|
101
|
+
const listOrganizationThreads = /* @__PURE__ */ make("mailboxesListOrganizationThreads");
|
|
102
|
+
const getNeedsYou = /* @__PURE__ */ make("mailboxesGetNeedsYou");
|
|
98
103
|
const getThread = /* @__PURE__ */ make("mailboxesGetThread");
|
|
99
104
|
const updateThread = /* @__PURE__ */ make("mailboxesUpdateThread");
|
|
100
105
|
const addThreadLabels = /* @__PURE__ */ make("mailboxesAddThreadLabels");
|
|
@@ -116,6 +121,7 @@ const forward = /* @__PURE__ */ make("mailboxesForward");
|
|
|
116
121
|
const listQuarantine = /* @__PURE__ */ make("mailboxesListQuarantine");
|
|
117
122
|
const releaseMessage = /* @__PURE__ */ make("mailboxesReleaseMessage");
|
|
118
123
|
const discardMessage = /* @__PURE__ */ make("mailboxesDiscardMessage");
|
|
124
|
+
const listOrganizationDrafts = /* @__PURE__ */ make("mailboxesListOrganizationDrafts");
|
|
119
125
|
const listDrafts = /* @__PURE__ */ make("mailboxesListDrafts");
|
|
120
126
|
const createDraft = /* @__PURE__ */ make("mailboxesCreateDraft");
|
|
121
127
|
const getDraft = /* @__PURE__ */ make("mailboxesGetDraft");
|
|
@@ -129,6 +135,6 @@ const retryAction = /* @__PURE__ */ make("mailboxesRetryAction");
|
|
|
129
135
|
const approveAction = /* @__PURE__ */ make("mailboxesApproveAction");
|
|
130
136
|
const denyAction = /* @__PURE__ */ make("mailboxesDenyAction");
|
|
131
137
|
const listEvents = /* @__PURE__ */ make("mailboxesListEvents");
|
|
132
|
-
export { MailboxEventStreamError, addThreadLabels, approveAction, cancelAction, copyMessageAttachment, create, createDraft, createEndpoint, createGrant, createLabel, createNote, createPolicy, deleteDraft, deleteLabel, deleteNote, deletePolicy, denyAction, discardMessage, events, forward, get, getAction, getAgentActivity, getDraft, getMessage, getMessageAttachment, getMessageRaw, getPolicy, getThread, getThreadContent, list, listActions, listDrafts, listEvents, listFolders, listGrants, listLabels, listPolicies, listQuarantine, listThreadMessages, listThreadNotes, listThreads, mailboxes_exports, pause, releaseMessage, remove, removeEndpoint, removeThreadLabels, reply, replyAll, resume, retryAction, revokeGrant, sendDraft, sendMessage, update, updateDraft, updateEndpoint, updateGrant, updateLabel, updateNote, updatePolicy, updateThread };
|
|
138
|
+
export { MailboxEventStreamError, addThreadLabels, approveAction, cancelAction, copyMessageAttachment, create, createDraft, createEndpoint, createGrant, createLabel, createNote, createPolicy, deleteDraft, deleteLabel, deleteNote, deletePolicy, denyAction, discardMessage, events, forward, get, getAction, getAgentActivity, getDraft, getMessage, getMessageAttachment, getMessageRaw, getNeedsYou, getPolicy, getThread, getThreadContent, list, listActions, listDrafts, listEvents, listFolders, listGrants, listLabels, listOrganizationDrafts, listOrganizationThreads, listPolicies, listQuarantine, listThreadMessages, listThreadNotes, listThreads, mailboxes_exports, pause, releaseMessage, remove, removeEndpoint, removeThreadLabels, reply, replyAll, resume, retryAction, revokeGrant, sendDraft, sendMessage, update, updateDraft, updateEndpoint, updateGrant, updateLabel, updateNote, updatePolicy, updateThread };
|
|
133
139
|
|
|
134
140
|
//# sourceMappingURL=mailboxes.js.map
|
|
@@ -3,6 +3,12 @@ export declare const create: (input: {
|
|
|
3
3
|
}, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"organizationsCreate">;
|
|
4
4
|
export declare const get: (input?: never, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"organizationsGet">;
|
|
5
5
|
export declare const getProfile: (input?: never, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"organizationsGetProfile">;
|
|
6
|
+
export declare const assignPersonalMailbox: (input: {
|
|
7
|
+
readonly userId: string;
|
|
8
|
+
readonly mailboxAddress: string;
|
|
9
|
+
}, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"organizationsAssignPersonalMailbox">;
|
|
10
|
+
export declare const listPersonalMailboxAssignments: (input?: never, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"organizationsListPersonalMailboxAssignments">;
|
|
11
|
+
export declare const getPersonalMailboxAddressOptions: (input?: never, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"organizationsGetPersonalMailboxAddressOptions">;
|
|
6
12
|
export declare const getTrustTier: (input?: never, options?: import("./internal/operation").OperationOptions) => import("./internal/operation").OperationResult<"organizationsGetTrustTier">;
|
|
7
13
|
export declare const update: (input?: {
|
|
8
14
|
readonly name?: string | null | undefined;
|
|
@@ -3,24 +3,30 @@ import { forGroup } from "./internal/operation.js";
|
|
|
3
3
|
import { OrganizationsGroup } from "./generated/organizations.js";
|
|
4
4
|
// src/effect/organizations.ts
|
|
5
5
|
var organizations_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
assignPersonalMailbox: () => assignPersonalMailbox,
|
|
6
7
|
create: () => create,
|
|
7
8
|
createAvatarUpload: () => createAvatarUpload,
|
|
8
9
|
delete: () => deleteOrganization,
|
|
9
10
|
get: () => get,
|
|
11
|
+
getPersonalMailboxAddressOptions: () => getPersonalMailboxAddressOptions,
|
|
10
12
|
getProfile: () => getProfile,
|
|
11
13
|
getTrustTier: () => getTrustTier,
|
|
12
14
|
getUsage: () => getUsage,
|
|
15
|
+
listPersonalMailboxAssignments: () => listPersonalMailboxAssignments,
|
|
13
16
|
update: () => update
|
|
14
17
|
});
|
|
15
18
|
const make = /* @__PURE__ */ forGroup(OrganizationsGroup);
|
|
16
19
|
const create = /* @__PURE__ */ make("organizationsCreate");
|
|
17
20
|
const get = /* @__PURE__ */ make("organizationsGet");
|
|
18
21
|
const getProfile = /* @__PURE__ */ make("organizationsGetProfile");
|
|
22
|
+
const assignPersonalMailbox = /* @__PURE__ */ make("organizationsAssignPersonalMailbox");
|
|
23
|
+
const listPersonalMailboxAssignments = /* @__PURE__ */ make("organizationsListPersonalMailboxAssignments");
|
|
24
|
+
const getPersonalMailboxAddressOptions = /* @__PURE__ */ make("organizationsGetPersonalMailboxAddressOptions");
|
|
19
25
|
const getTrustTier = /* @__PURE__ */ make("organizationsGetTrustTier");
|
|
20
26
|
const update = /* @__PURE__ */ make("organizationsUpdate");
|
|
21
27
|
const createAvatarUpload = /* @__PURE__ */ make("organizationsCreateAvatarUpload");
|
|
22
28
|
const getUsage = /* @__PURE__ */ make("organizationsGetUsage");
|
|
23
29
|
const deleteOrganization = /* @__PURE__ */ make("organizationsDelete");
|
|
24
|
-
export { create, createAvatarUpload, deleteOrganization as delete, get, getProfile, getTrustTier, getUsage, organizations_exports, update };
|
|
30
|
+
export { assignPersonalMailbox, create, createAvatarUpload, deleteOrganization as delete, get, getPersonalMailboxAddressOptions, getProfile, getTrustTier, getUsage, listPersonalMailboxAssignments, organizations_exports, update };
|
|
25
31
|
|
|
26
32
|
//# sourceMappingURL=organizations.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, TemplateSourceError, UnauthorizedError, ValidationError, fromApiError } from "./promises/errors.gen.js";
|
|
1
|
+
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateSourceError, UnauthorizedError, ValidationError, fromApiError } from "./promises/errors.gen.js";
|
|
2
2
|
import { MediaUploadError } from "./inline-attachments.js";
|
|
3
3
|
import { MailboxEventStream, MailboxEventStreamError } from "./mailbox-events.js";
|
|
4
4
|
import { createClient } from "./promises/client.js";
|
|
5
|
-
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, TemplateSourceError, UnauthorizedError, ValidationError, createClient, fromApiError };
|
|
5
|
+
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateSourceError, UnauthorizedError, ValidationError, createClient, fromApiError };
|
package/dist/package.js
CHANGED
package/dist/promises/client.js
CHANGED
|
@@ -2,7 +2,7 @@ import { CLIENT_ATTRIBUTION_HEADER, clientAttribution } from "../client-attribut
|
|
|
2
2
|
import { mergeHeaders } from "../client/client/utils.gen.js";
|
|
3
3
|
import { createClient as createClient$1 } from "../client/client/client.gen.js";
|
|
4
4
|
import { SamvaOperations } from "../effect/generated-metadata.js";
|
|
5
|
-
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, TemplateSourceError, UnauthorizedError, ValidationError, fromApiError } from "./errors.gen.js";
|
|
5
|
+
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateSourceError, UnauthorizedError, ValidationError, fromApiError } from "./errors.gen.js";
|
|
6
6
|
import { configureRequests } from "./request.js";
|
|
7
7
|
import { Agents, Analytics, ApiKeys, Attachments, Brands, Campaigns, ContactEvents, ContactGroups, Contacts, Conversations, CustomFields, Email, Events, ExtensionInstallations, Extensions, Feedback, Journeys, Mailboxes, Media, Messages, Namespaces, Newsletters, Operations, Organizations, ScheduledMessages, Subscriptions, Templates, TopicForms, Topics, Webhooks, Whoami } from "../client/sdk.gen.js";
|
|
8
8
|
import { MediaUploadError, mediaCreateBody, planInlineUploads, withUploadedAttachments } from "../inline-attachments.js";
|
|
@@ -319,6 +319,6 @@ function makeClient(config) {
|
|
|
319
319
|
}));
|
|
320
320
|
return result;
|
|
321
321
|
}
|
|
322
|
-
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, TemplateSourceError, UnauthorizedError, ValidationError, clientWithIdempotency, createBoundClient, createClient, fromApiError };
|
|
322
|
+
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateSourceError, UnauthorizedError, ValidationError, clientWithIdempotency, createBoundClient, createClient, fromApiError };
|
|
323
323
|
|
|
324
324
|
//# sourceMappingURL=client.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as Wire from "../client/types.gen";
|
|
2
|
-
export type SamvaApiErrorTag = "AnalyticsQueryError" | "BillingProviderError" | "BrandAddressRequiredError" | "CampaignFooterRequiredError" | "ConflictError" | "DeliveryUnavailableError" | "EmailChannelError" | "ExternalServiceError" | "FlagDisabledError" | "ForbiddenError" | "FromAddressRequiredError" | "GatewayTimeoutError" | "InternalError" | "MailboxSendConflictError" | "MailboxSendRefusedError" | "OnboardingReviewRequiredError" | "PaymentRequiredError" | "RateLimitedError" | "ResourceNotFoundError" | "SenderNotReadyError" | "TemplateSourceError" | "UnauthorizedError" | "ValidationError";
|
|
2
|
+
export type SamvaApiErrorTag = "AnalyticsQueryError" | "BillingProviderError" | "BrandAddressRequiredError" | "CampaignFooterRequiredError" | "ConflictError" | "DeliveryUnavailableError" | "EmailChannelError" | "ExternalServiceError" | "FlagDisabledError" | "ForbiddenError" | "FromAddressRequiredError" | "GatewayTimeoutError" | "InternalError" | "MailboxSendConflictError" | "MailboxSendRefusedError" | "OnboardingReviewRequiredError" | "PaymentRequiredError" | "RateLimitedError" | "ResourceNotFoundError" | "SenderNotReadyError" | "ServiceUnavailableError" | "TemplateSourceError" | "UnauthorizedError" | "ValidationError";
|
|
3
3
|
export interface SamvaApiErrorContext {
|
|
4
4
|
readonly request?: Request | undefined;
|
|
5
5
|
readonly response?: Response | undefined;
|
|
@@ -233,6 +233,16 @@ export declare class SenderNotReadyError extends SamvaApiError<"SenderNotReadyEr
|
|
|
233
233
|
readonly "sender": string;
|
|
234
234
|
constructor(payload: Omit<SenderNotReadyErrorPayload, "_tag">, context?: SamvaApiErrorContext);
|
|
235
235
|
}
|
|
236
|
+
type ServiceUnavailableErrorPayload = {
|
|
237
|
+
readonly _tag: "ServiceUnavailableError";
|
|
238
|
+
readonly message: string;
|
|
239
|
+
readonly retryAfterSeconds: number;
|
|
240
|
+
};
|
|
241
|
+
export declare class ServiceUnavailableError extends SamvaApiError<"ServiceUnavailableError"> {
|
|
242
|
+
readonly _tag: "ServiceUnavailableError";
|
|
243
|
+
readonly "retryAfterSeconds": number;
|
|
244
|
+
constructor(payload: Omit<ServiceUnavailableErrorPayload, "_tag">, context?: SamvaApiErrorContext);
|
|
245
|
+
}
|
|
236
246
|
type TemplateSourceErrorPayload = {
|
|
237
247
|
readonly _tag: "TemplateSourceError";
|
|
238
248
|
readonly diagnostics: Array<{
|
|
@@ -307,7 +317,7 @@ export declare class ValidationError extends SamvaApiError<"ValidationError"> {
|
|
|
307
317
|
readonly "fields"?: Record<string, Array<string>> | null;
|
|
308
318
|
constructor(payload: Omit<ValidationErrorPayload, "_tag">, context?: SamvaApiErrorContext);
|
|
309
319
|
}
|
|
310
|
-
export type AnySamvaApiError = AnalyticsQueryError | BillingProviderError | BrandAddressRequiredError | CampaignFooterRequiredError | ConflictError | DeliveryUnavailableError | EmailChannelError | ExternalServiceError | FlagDisabledError | ForbiddenError | FromAddressRequiredError | GatewayTimeoutError | InternalError | MailboxSendConflictError | MailboxSendRefusedError | OnboardingReviewRequiredError | PaymentRequiredError | RateLimitedError | ResourceNotFoundError | SenderNotReadyError | TemplateSourceError | UnauthorizedError | ValidationError;
|
|
320
|
+
export type AnySamvaApiError = AnalyticsQueryError | BillingProviderError | BrandAddressRequiredError | CampaignFooterRequiredError | ConflictError | DeliveryUnavailableError | EmailChannelError | ExternalServiceError | FlagDisabledError | ForbiddenError | FromAddressRequiredError | GatewayTimeoutError | InternalError | MailboxSendConflictError | MailboxSendRefusedError | OnboardingReviewRequiredError | PaymentRequiredError | RateLimitedError | ResourceNotFoundError | SenderNotReadyError | ServiceUnavailableError | TemplateSourceError | UnauthorizedError | ValidationError;
|
|
311
321
|
/** Convert a decoded error payload into its generated JavaScript error class. */
|
|
312
322
|
export declare function fromApiError(error: unknown, context?: SamvaApiErrorContext): AnySamvaApiError | SamvaTransportError;
|
|
313
323
|
export {};
|
|
@@ -173,6 +173,13 @@ var SenderNotReadyError = class extends SamvaApiError {
|
|
|
173
173
|
Object.assign(this, payload);
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
|
+
var ServiceUnavailableError = class extends SamvaApiError {
|
|
177
|
+
_tag = "ServiceUnavailableError";
|
|
178
|
+
constructor(payload, context = {}) {
|
|
179
|
+
super(messageOf("ServiceUnavailableError", payload), context);
|
|
180
|
+
Object.assign(this, payload);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
176
183
|
var TemplateSourceError = class extends SamvaApiError {
|
|
177
184
|
_tag = "TemplateSourceError";
|
|
178
185
|
constructor(payload, context = {}) {
|
|
@@ -215,6 +222,7 @@ const constructors = {
|
|
|
215
222
|
RateLimitedError,
|
|
216
223
|
ResourceNotFoundError,
|
|
217
224
|
SenderNotReadyError,
|
|
225
|
+
ServiceUnavailableError,
|
|
218
226
|
TemplateSourceError,
|
|
219
227
|
UnauthorizedError,
|
|
220
228
|
ValidationError
|
|
@@ -1260,6 +1268,25 @@ const payloadSchemas = {
|
|
|
1260
1268
|
"x-category": ["transient"],
|
|
1261
1269
|
"x-retryable": true
|
|
1262
1270
|
},
|
|
1271
|
+
ServiceUnavailableError: {
|
|
1272
|
+
type: "object",
|
|
1273
|
+
properties: {
|
|
1274
|
+
_tag: {
|
|
1275
|
+
type: "string",
|
|
1276
|
+
enum: ["ServiceUnavailableError"]
|
|
1277
|
+
},
|
|
1278
|
+
message: { type: "string" },
|
|
1279
|
+
retryAfterSeconds: { type: "number" }
|
|
1280
|
+
},
|
|
1281
|
+
required: [
|
|
1282
|
+
"_tag",
|
|
1283
|
+
"message",
|
|
1284
|
+
"retryAfterSeconds"
|
|
1285
|
+
],
|
|
1286
|
+
additionalProperties: false,
|
|
1287
|
+
"x-category": ["transient"],
|
|
1288
|
+
"x-retryable": true
|
|
1289
|
+
},
|
|
1263
1290
|
TemplateSourceError: {
|
|
1264
1291
|
type: "object",
|
|
1265
1292
|
properties: {
|
|
@@ -1471,6 +1498,6 @@ function fromApiError(error, context = {}) {
|
|
|
1471
1498
|
}
|
|
1472
1499
|
return new SamvaTransportError(error, context);
|
|
1473
1500
|
}
|
|
1474
|
-
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, TemplateSourceError, UnauthorizedError, ValidationError, fromApiError };
|
|
1501
|
+
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateSourceError, UnauthorizedError, ValidationError, fromApiError };
|
|
1475
1502
|
|
|
1476
1503
|
//# sourceMappingURL=errors.gen.js.map
|
package/dist/promises/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, TemplateSourceError, UnauthorizedError, ValidationError, fromApiError } from "./errors.gen.js";
|
|
1
|
+
import { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxSendConflictError, MailboxSendRefusedError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateSourceError, UnauthorizedError, ValidationError, fromApiError } from "./errors.gen.js";
|
|
2
2
|
import { MediaUploadError } from "../inline-attachments.js";
|
|
3
3
|
import { MailboxEventStream, MailboxEventStreamError } from "../mailbox-events.js";
|
|
4
4
|
import { createClient } from "./client.js";
|
|
5
|
-
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, TemplateSourceError, UnauthorizedError, ValidationError, createClient, fromApiError };
|
|
5
|
+
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, InternalError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, ServiceUnavailableError, TemplateSourceError, UnauthorizedError, ValidationError, createClient, fromApiError };
|