ark-email 0.9.0 → 0.10.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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/resources/emails.d.mts +107 -6
- package/resources/emails.d.mts.map +1 -1
- package/resources/emails.d.ts +107 -6
- package/resources/emails.d.ts.map +1 -1
- package/resources/emails.js +37 -3
- package/resources/emails.js.map +1 -1
- package/resources/emails.mjs +37 -3
- package/resources/emails.mjs.map +1 -1
- package/src/resources/emails.ts +117 -6
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0 (2026-01-22)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.9.0...v0.10.0](https://github.com/ArkHQ-io/ark-nodejs/compare/v0.9.0...v0.10.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** improve GET delivery attempts ([e8307a5](https://github.com/ArkHQ-io/ark-nodejs/commit/e8307a540da03a58c6ade2ca444a4f2dcf265b8d))
|
|
10
|
+
|
|
3
11
|
## 0.9.0 (2026-01-21)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v0.8.0...v0.9.0](https://github.com/ArkHQ-io/ark-nodejs/compare/v0.8.0...v0.9.0)
|
package/package.json
CHANGED
package/resources/emails.d.mts
CHANGED
|
@@ -38,13 +38,47 @@ export declare class Emails extends APIResource {
|
|
|
38
38
|
*/
|
|
39
39
|
list(query?: EmailListParams | null | undefined, options?: RequestOptions): PagePromise<EmailListResponsesPageNumberPagination, EmailListResponse>;
|
|
40
40
|
/**
|
|
41
|
-
* Get the
|
|
42
|
-
* and
|
|
41
|
+
* Get the complete delivery history for an email, including SMTP response codes,
|
|
42
|
+
* timestamps, and current retry state.
|
|
43
|
+
*
|
|
44
|
+
* ## Response Fields
|
|
45
|
+
*
|
|
46
|
+
* ### Status
|
|
47
|
+
*
|
|
48
|
+
* The current status of the email:
|
|
49
|
+
*
|
|
50
|
+
* - `pending` - Awaiting first delivery attempt
|
|
51
|
+
* - `sent` - Successfully delivered to recipient server
|
|
52
|
+
* - `softfail` - Temporary failure, automatic retry scheduled
|
|
53
|
+
* - `hardfail` - Permanent failure, will not retry
|
|
54
|
+
* - `held` - Held for manual review
|
|
55
|
+
* - `bounced` - Bounced by recipient server
|
|
56
|
+
*
|
|
57
|
+
* ### Retry State
|
|
58
|
+
*
|
|
59
|
+
* When the email is in the delivery queue (`pending` or `softfail` status),
|
|
60
|
+
* `retryState` provides information about the retry schedule:
|
|
61
|
+
*
|
|
62
|
+
* - `attempt` - Current attempt number (0 = first attempt)
|
|
63
|
+
* - `maxAttempts` - Maximum attempts before hard-fail (typically 18)
|
|
64
|
+
* - `attemptsRemaining` - Attempts left before hard-fail
|
|
65
|
+
* - `nextRetryAt` - When the next retry is scheduled (Unix timestamp)
|
|
66
|
+
* - `processing` - Whether the email is currently being processed
|
|
67
|
+
* - `manual` - Whether this was triggered by a manual retry
|
|
68
|
+
*
|
|
69
|
+
* When the email has finished processing (`sent`, `hardfail`, `held`, `bounced`),
|
|
70
|
+
* `retryState` is `null`.
|
|
71
|
+
*
|
|
72
|
+
* ### Can Retry Manually
|
|
73
|
+
*
|
|
74
|
+
* Indicates whether you can call `POST /emails/{emailId}/retry` to manually retry
|
|
75
|
+
* the email. This is `true` when the raw message content is still available (not
|
|
76
|
+
* expired due to retention policy).
|
|
43
77
|
*
|
|
44
78
|
* @example
|
|
45
79
|
* ```ts
|
|
46
80
|
* const response = await client.emails.retrieveDeliveries(
|
|
47
|
-
* '
|
|
81
|
+
* 'msg_12345_aBc123XyZ',
|
|
48
82
|
* );
|
|
49
83
|
* ```
|
|
50
84
|
*/
|
|
@@ -293,15 +327,41 @@ export interface EmailRetrieveDeliveriesResponse {
|
|
|
293
327
|
}
|
|
294
328
|
export declare namespace EmailRetrieveDeliveriesResponse {
|
|
295
329
|
interface Data {
|
|
330
|
+
/**
|
|
331
|
+
* Whether the message can be manually retried via `POST /emails/{emailId}/retry`.
|
|
332
|
+
* `true` when the raw message content is still available (not expired). Messages
|
|
333
|
+
* older than the retention period cannot be retried.
|
|
334
|
+
*/
|
|
335
|
+
canRetryManually: boolean;
|
|
336
|
+
/**
|
|
337
|
+
* Chronological list of delivery attempts for this message. Each attempt includes
|
|
338
|
+
* SMTP response codes and timestamps.
|
|
339
|
+
*/
|
|
296
340
|
deliveries: Array<Data.Delivery>;
|
|
297
341
|
/**
|
|
298
|
-
* Internal message ID
|
|
342
|
+
* Internal numeric message ID
|
|
299
343
|
*/
|
|
300
|
-
messageId:
|
|
344
|
+
messageId: number;
|
|
301
345
|
/**
|
|
302
|
-
*
|
|
346
|
+
* Unique message token for API references
|
|
303
347
|
*/
|
|
304
348
|
messageToken: string;
|
|
349
|
+
/**
|
|
350
|
+
* Information about the current retry state of a message that is queued for
|
|
351
|
+
* delivery. Only present when the message is in the delivery queue.
|
|
352
|
+
*/
|
|
353
|
+
retryState: Data.RetryState | null;
|
|
354
|
+
/**
|
|
355
|
+
* Current message status (lowercase). Possible values:
|
|
356
|
+
*
|
|
357
|
+
* - `pending` - Initial state, awaiting first delivery attempt
|
|
358
|
+
* - `sent` - Successfully delivered
|
|
359
|
+
* - `softfail` - Temporary failure, will retry automatically
|
|
360
|
+
* - `hardfail` - Permanent failure, will not retry
|
|
361
|
+
* - `held` - Held for manual review (suppression list, etc.)
|
|
362
|
+
* - `bounced` - Bounced by recipient server
|
|
363
|
+
*/
|
|
364
|
+
status: 'pending' | 'sent' | 'softfail' | 'hardfail' | 'held' | 'bounced';
|
|
305
365
|
}
|
|
306
366
|
namespace Data {
|
|
307
367
|
interface Delivery {
|
|
@@ -338,6 +398,47 @@ export declare namespace EmailRetrieveDeliveriesResponse {
|
|
|
338
398
|
*/
|
|
339
399
|
sentWithSsl?: boolean;
|
|
340
400
|
}
|
|
401
|
+
/**
|
|
402
|
+
* Information about the current retry state of a message that is queued for
|
|
403
|
+
* delivery. Only present when the message is in the delivery queue.
|
|
404
|
+
*/
|
|
405
|
+
interface RetryState {
|
|
406
|
+
/**
|
|
407
|
+
* Current attempt number (0-indexed). The first delivery attempt is 0, the first
|
|
408
|
+
* retry is 1, and so on.
|
|
409
|
+
*/
|
|
410
|
+
attempt: number;
|
|
411
|
+
/**
|
|
412
|
+
* Number of attempts remaining before the message is hard-failed. Calculated as
|
|
413
|
+
* `maxAttempts - attempt`.
|
|
414
|
+
*/
|
|
415
|
+
attemptsRemaining: number;
|
|
416
|
+
/**
|
|
417
|
+
* Whether this queue entry was created by a manual retry request. Manual retries
|
|
418
|
+
* bypass certain hold conditions like suppression lists.
|
|
419
|
+
*/
|
|
420
|
+
manual: boolean;
|
|
421
|
+
/**
|
|
422
|
+
* Maximum number of delivery attempts before the message is hard-failed.
|
|
423
|
+
* Configured at the server level.
|
|
424
|
+
*/
|
|
425
|
+
maxAttempts: number;
|
|
426
|
+
/**
|
|
427
|
+
* Whether the message is currently being processed by a delivery worker. When
|
|
428
|
+
* `true`, the message is actively being sent.
|
|
429
|
+
*/
|
|
430
|
+
processing: boolean;
|
|
431
|
+
/**
|
|
432
|
+
* Unix timestamp of when the next retry attempt is scheduled. `null` if the
|
|
433
|
+
* message is ready for immediate processing or currently being processed.
|
|
434
|
+
*/
|
|
435
|
+
nextRetryAt?: number | null;
|
|
436
|
+
/**
|
|
437
|
+
* ISO 8601 formatted timestamp of the next retry attempt. `null` if the message is
|
|
438
|
+
* ready for immediate processing.
|
|
439
|
+
*/
|
|
440
|
+
nextRetryAtIso?: string | null;
|
|
441
|
+
}
|
|
341
442
|
}
|
|
342
443
|
}
|
|
343
444
|
export interface EmailRetryResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emails.d.mts","sourceRoot":"","sources":["../src/resources/emails.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,oBAAoB,EAAE,KAAK,0BAA0B,EAAE,WAAW,EAAE;OAEtE,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAIpC;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sCAAsC,EAAE,iBAAiB,CAAC;IAIzE
|
|
1
|
+
{"version":3,"file":"emails.d.mts","sourceRoot":"","sources":["../src/resources/emails.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,oBAAoB,EAAE,KAAK,0BAA0B,EAAE,WAAW,EAAE;OAEtE,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAIpC;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sCAAsC,EAAE,iBAAiB,CAAC;IAIzE;;;;;;;;;;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AAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
package/resources/emails.d.ts
CHANGED
|
@@ -38,13 +38,47 @@ export declare class Emails extends APIResource {
|
|
|
38
38
|
*/
|
|
39
39
|
list(query?: EmailListParams | null | undefined, options?: RequestOptions): PagePromise<EmailListResponsesPageNumberPagination, EmailListResponse>;
|
|
40
40
|
/**
|
|
41
|
-
* Get the
|
|
42
|
-
* and
|
|
41
|
+
* Get the complete delivery history for an email, including SMTP response codes,
|
|
42
|
+
* timestamps, and current retry state.
|
|
43
|
+
*
|
|
44
|
+
* ## Response Fields
|
|
45
|
+
*
|
|
46
|
+
* ### Status
|
|
47
|
+
*
|
|
48
|
+
* The current status of the email:
|
|
49
|
+
*
|
|
50
|
+
* - `pending` - Awaiting first delivery attempt
|
|
51
|
+
* - `sent` - Successfully delivered to recipient server
|
|
52
|
+
* - `softfail` - Temporary failure, automatic retry scheduled
|
|
53
|
+
* - `hardfail` - Permanent failure, will not retry
|
|
54
|
+
* - `held` - Held for manual review
|
|
55
|
+
* - `bounced` - Bounced by recipient server
|
|
56
|
+
*
|
|
57
|
+
* ### Retry State
|
|
58
|
+
*
|
|
59
|
+
* When the email is in the delivery queue (`pending` or `softfail` status),
|
|
60
|
+
* `retryState` provides information about the retry schedule:
|
|
61
|
+
*
|
|
62
|
+
* - `attempt` - Current attempt number (0 = first attempt)
|
|
63
|
+
* - `maxAttempts` - Maximum attempts before hard-fail (typically 18)
|
|
64
|
+
* - `attemptsRemaining` - Attempts left before hard-fail
|
|
65
|
+
* - `nextRetryAt` - When the next retry is scheduled (Unix timestamp)
|
|
66
|
+
* - `processing` - Whether the email is currently being processed
|
|
67
|
+
* - `manual` - Whether this was triggered by a manual retry
|
|
68
|
+
*
|
|
69
|
+
* When the email has finished processing (`sent`, `hardfail`, `held`, `bounced`),
|
|
70
|
+
* `retryState` is `null`.
|
|
71
|
+
*
|
|
72
|
+
* ### Can Retry Manually
|
|
73
|
+
*
|
|
74
|
+
* Indicates whether you can call `POST /emails/{emailId}/retry` to manually retry
|
|
75
|
+
* the email. This is `true` when the raw message content is still available (not
|
|
76
|
+
* expired due to retention policy).
|
|
43
77
|
*
|
|
44
78
|
* @example
|
|
45
79
|
* ```ts
|
|
46
80
|
* const response = await client.emails.retrieveDeliveries(
|
|
47
|
-
* '
|
|
81
|
+
* 'msg_12345_aBc123XyZ',
|
|
48
82
|
* );
|
|
49
83
|
* ```
|
|
50
84
|
*/
|
|
@@ -293,15 +327,41 @@ export interface EmailRetrieveDeliveriesResponse {
|
|
|
293
327
|
}
|
|
294
328
|
export declare namespace EmailRetrieveDeliveriesResponse {
|
|
295
329
|
interface Data {
|
|
330
|
+
/**
|
|
331
|
+
* Whether the message can be manually retried via `POST /emails/{emailId}/retry`.
|
|
332
|
+
* `true` when the raw message content is still available (not expired). Messages
|
|
333
|
+
* older than the retention period cannot be retried.
|
|
334
|
+
*/
|
|
335
|
+
canRetryManually: boolean;
|
|
336
|
+
/**
|
|
337
|
+
* Chronological list of delivery attempts for this message. Each attempt includes
|
|
338
|
+
* SMTP response codes and timestamps.
|
|
339
|
+
*/
|
|
296
340
|
deliveries: Array<Data.Delivery>;
|
|
297
341
|
/**
|
|
298
|
-
* Internal message ID
|
|
342
|
+
* Internal numeric message ID
|
|
299
343
|
*/
|
|
300
|
-
messageId:
|
|
344
|
+
messageId: number;
|
|
301
345
|
/**
|
|
302
|
-
*
|
|
346
|
+
* Unique message token for API references
|
|
303
347
|
*/
|
|
304
348
|
messageToken: string;
|
|
349
|
+
/**
|
|
350
|
+
* Information about the current retry state of a message that is queued for
|
|
351
|
+
* delivery. Only present when the message is in the delivery queue.
|
|
352
|
+
*/
|
|
353
|
+
retryState: Data.RetryState | null;
|
|
354
|
+
/**
|
|
355
|
+
* Current message status (lowercase). Possible values:
|
|
356
|
+
*
|
|
357
|
+
* - `pending` - Initial state, awaiting first delivery attempt
|
|
358
|
+
* - `sent` - Successfully delivered
|
|
359
|
+
* - `softfail` - Temporary failure, will retry automatically
|
|
360
|
+
* - `hardfail` - Permanent failure, will not retry
|
|
361
|
+
* - `held` - Held for manual review (suppression list, etc.)
|
|
362
|
+
* - `bounced` - Bounced by recipient server
|
|
363
|
+
*/
|
|
364
|
+
status: 'pending' | 'sent' | 'softfail' | 'hardfail' | 'held' | 'bounced';
|
|
305
365
|
}
|
|
306
366
|
namespace Data {
|
|
307
367
|
interface Delivery {
|
|
@@ -338,6 +398,47 @@ export declare namespace EmailRetrieveDeliveriesResponse {
|
|
|
338
398
|
*/
|
|
339
399
|
sentWithSsl?: boolean;
|
|
340
400
|
}
|
|
401
|
+
/**
|
|
402
|
+
* Information about the current retry state of a message that is queued for
|
|
403
|
+
* delivery. Only present when the message is in the delivery queue.
|
|
404
|
+
*/
|
|
405
|
+
interface RetryState {
|
|
406
|
+
/**
|
|
407
|
+
* Current attempt number (0-indexed). The first delivery attempt is 0, the first
|
|
408
|
+
* retry is 1, and so on.
|
|
409
|
+
*/
|
|
410
|
+
attempt: number;
|
|
411
|
+
/**
|
|
412
|
+
* Number of attempts remaining before the message is hard-failed. Calculated as
|
|
413
|
+
* `maxAttempts - attempt`.
|
|
414
|
+
*/
|
|
415
|
+
attemptsRemaining: number;
|
|
416
|
+
/**
|
|
417
|
+
* Whether this queue entry was created by a manual retry request. Manual retries
|
|
418
|
+
* bypass certain hold conditions like suppression lists.
|
|
419
|
+
*/
|
|
420
|
+
manual: boolean;
|
|
421
|
+
/**
|
|
422
|
+
* Maximum number of delivery attempts before the message is hard-failed.
|
|
423
|
+
* Configured at the server level.
|
|
424
|
+
*/
|
|
425
|
+
maxAttempts: number;
|
|
426
|
+
/**
|
|
427
|
+
* Whether the message is currently being processed by a delivery worker. When
|
|
428
|
+
* `true`, the message is actively being sent.
|
|
429
|
+
*/
|
|
430
|
+
processing: boolean;
|
|
431
|
+
/**
|
|
432
|
+
* Unix timestamp of when the next retry attempt is scheduled. `null` if the
|
|
433
|
+
* message is ready for immediate processing or currently being processed.
|
|
434
|
+
*/
|
|
435
|
+
nextRetryAt?: number | null;
|
|
436
|
+
/**
|
|
437
|
+
* ISO 8601 formatted timestamp of the next retry attempt. `null` if the message is
|
|
438
|
+
* ready for immediate processing.
|
|
439
|
+
*/
|
|
440
|
+
nextRetryAtIso?: string | null;
|
|
441
|
+
}
|
|
341
442
|
}
|
|
342
443
|
}
|
|
343
444
|
export interface EmailRetryResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emails.d.ts","sourceRoot":"","sources":["../src/resources/emails.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,oBAAoB,EAAE,KAAK,0BAA0B,EAAE,WAAW,EAAE;OAEtE,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAIpC;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CACF,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sCAAsC,EAAE,iBAAiB,CAAC;IAIzE
|
|
1
|
+
{"version":3,"file":"emails.d.ts","sourceRoot":"","sources":["../src/resources/emails.ts"],"names":[],"mappings":"OAEO,EAAE,WA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MAAM,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
package/resources/emails.js
CHANGED
|
@@ -45,13 +45,47 @@ class Emails extends resource_1.APIResource {
|
|
|
45
45
|
return this._client.getAPIList('/emails', (pagination_1.PageNumberPagination), { query, ...options });
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* Get the
|
|
49
|
-
* and
|
|
48
|
+
* Get the complete delivery history for an email, including SMTP response codes,
|
|
49
|
+
* timestamps, and current retry state.
|
|
50
|
+
*
|
|
51
|
+
* ## Response Fields
|
|
52
|
+
*
|
|
53
|
+
* ### Status
|
|
54
|
+
*
|
|
55
|
+
* The current status of the email:
|
|
56
|
+
*
|
|
57
|
+
* - `pending` - Awaiting first delivery attempt
|
|
58
|
+
* - `sent` - Successfully delivered to recipient server
|
|
59
|
+
* - `softfail` - Temporary failure, automatic retry scheduled
|
|
60
|
+
* - `hardfail` - Permanent failure, will not retry
|
|
61
|
+
* - `held` - Held for manual review
|
|
62
|
+
* - `bounced` - Bounced by recipient server
|
|
63
|
+
*
|
|
64
|
+
* ### Retry State
|
|
65
|
+
*
|
|
66
|
+
* When the email is in the delivery queue (`pending` or `softfail` status),
|
|
67
|
+
* `retryState` provides information about the retry schedule:
|
|
68
|
+
*
|
|
69
|
+
* - `attempt` - Current attempt number (0 = first attempt)
|
|
70
|
+
* - `maxAttempts` - Maximum attempts before hard-fail (typically 18)
|
|
71
|
+
* - `attemptsRemaining` - Attempts left before hard-fail
|
|
72
|
+
* - `nextRetryAt` - When the next retry is scheduled (Unix timestamp)
|
|
73
|
+
* - `processing` - Whether the email is currently being processed
|
|
74
|
+
* - `manual` - Whether this was triggered by a manual retry
|
|
75
|
+
*
|
|
76
|
+
* When the email has finished processing (`sent`, `hardfail`, `held`, `bounced`),
|
|
77
|
+
* `retryState` is `null`.
|
|
78
|
+
*
|
|
79
|
+
* ### Can Retry Manually
|
|
80
|
+
*
|
|
81
|
+
* Indicates whether you can call `POST /emails/{emailId}/retry` to manually retry
|
|
82
|
+
* the email. This is `true` when the raw message content is still available (not
|
|
83
|
+
* expired due to retention policy).
|
|
50
84
|
*
|
|
51
85
|
* @example
|
|
52
86
|
* ```ts
|
|
53
87
|
* const response = await client.emails.retrieveDeliveries(
|
|
54
|
-
* '
|
|
88
|
+
* 'msg_12345_aBc123XyZ',
|
|
55
89
|
* );
|
|
56
90
|
* ```
|
|
57
91
|
*/
|
package/resources/emails.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emails.js","sourceRoot":"","sources":["../src/resources/emails.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAwG;AACxG,oDAAmD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,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,IAAwB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AAlND,wBAkNC"}
|
package/resources/emails.mjs
CHANGED
|
@@ -42,13 +42,47 @@ export class Emails extends APIResource {
|
|
|
42
42
|
return this._client.getAPIList('/emails', (PageNumberPagination), { query, ...options });
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* Get the
|
|
46
|
-
* and
|
|
45
|
+
* Get the complete delivery history for an email, including SMTP response codes,
|
|
46
|
+
* timestamps, and current retry state.
|
|
47
|
+
*
|
|
48
|
+
* ## Response Fields
|
|
49
|
+
*
|
|
50
|
+
* ### Status
|
|
51
|
+
*
|
|
52
|
+
* The current status of the email:
|
|
53
|
+
*
|
|
54
|
+
* - `pending` - Awaiting first delivery attempt
|
|
55
|
+
* - `sent` - Successfully delivered to recipient server
|
|
56
|
+
* - `softfail` - Temporary failure, automatic retry scheduled
|
|
57
|
+
* - `hardfail` - Permanent failure, will not retry
|
|
58
|
+
* - `held` - Held for manual review
|
|
59
|
+
* - `bounced` - Bounced by recipient server
|
|
60
|
+
*
|
|
61
|
+
* ### Retry State
|
|
62
|
+
*
|
|
63
|
+
* When the email is in the delivery queue (`pending` or `softfail` status),
|
|
64
|
+
* `retryState` provides information about the retry schedule:
|
|
65
|
+
*
|
|
66
|
+
* - `attempt` - Current attempt number (0 = first attempt)
|
|
67
|
+
* - `maxAttempts` - Maximum attempts before hard-fail (typically 18)
|
|
68
|
+
* - `attemptsRemaining` - Attempts left before hard-fail
|
|
69
|
+
* - `nextRetryAt` - When the next retry is scheduled (Unix timestamp)
|
|
70
|
+
* - `processing` - Whether the email is currently being processed
|
|
71
|
+
* - `manual` - Whether this was triggered by a manual retry
|
|
72
|
+
*
|
|
73
|
+
* When the email has finished processing (`sent`, `hardfail`, `held`, `bounced`),
|
|
74
|
+
* `retryState` is `null`.
|
|
75
|
+
*
|
|
76
|
+
* ### Can Retry Manually
|
|
77
|
+
*
|
|
78
|
+
* Indicates whether you can call `POST /emails/{emailId}/retry` to manually retry
|
|
79
|
+
* the email. This is `true` when the raw message content is still available (not
|
|
80
|
+
* expired due to retention policy).
|
|
47
81
|
*
|
|
48
82
|
* @example
|
|
49
83
|
* ```ts
|
|
50
84
|
* const response = await client.emails.retrieveDeliveries(
|
|
51
|
-
* '
|
|
85
|
+
* 'msg_12345_aBc123XyZ',
|
|
52
86
|
* );
|
|
53
87
|
* ```
|
|
54
88
|
*/
|
package/resources/emails.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emails.mjs","sourceRoot":"","sources":["../src/resources/emails.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,oBAAoB,EAAgD;OACtE,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,OAAe,EACf,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,WAAW,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAA,oBAAuC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"emails.mjs","sourceRoot":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,CAAC,SAAS,EAAE;YAClC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACnF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,SAAS,CAAC,MAA4B,EAAE,OAAwB;QAC9D,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;YACxC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACnF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,IAAwB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF"}
|
package/src/resources/emails.ts
CHANGED
|
@@ -56,13 +56,47 @@ export class Emails extends APIResource {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* Get the
|
|
60
|
-
* and
|
|
59
|
+
* Get the complete delivery history for an email, including SMTP response codes,
|
|
60
|
+
* timestamps, and current retry state.
|
|
61
|
+
*
|
|
62
|
+
* ## Response Fields
|
|
63
|
+
*
|
|
64
|
+
* ### Status
|
|
65
|
+
*
|
|
66
|
+
* The current status of the email:
|
|
67
|
+
*
|
|
68
|
+
* - `pending` - Awaiting first delivery attempt
|
|
69
|
+
* - `sent` - Successfully delivered to recipient server
|
|
70
|
+
* - `softfail` - Temporary failure, automatic retry scheduled
|
|
71
|
+
* - `hardfail` - Permanent failure, will not retry
|
|
72
|
+
* - `held` - Held for manual review
|
|
73
|
+
* - `bounced` - Bounced by recipient server
|
|
74
|
+
*
|
|
75
|
+
* ### Retry State
|
|
76
|
+
*
|
|
77
|
+
* When the email is in the delivery queue (`pending` or `softfail` status),
|
|
78
|
+
* `retryState` provides information about the retry schedule:
|
|
79
|
+
*
|
|
80
|
+
* - `attempt` - Current attempt number (0 = first attempt)
|
|
81
|
+
* - `maxAttempts` - Maximum attempts before hard-fail (typically 18)
|
|
82
|
+
* - `attemptsRemaining` - Attempts left before hard-fail
|
|
83
|
+
* - `nextRetryAt` - When the next retry is scheduled (Unix timestamp)
|
|
84
|
+
* - `processing` - Whether the email is currently being processed
|
|
85
|
+
* - `manual` - Whether this was triggered by a manual retry
|
|
86
|
+
*
|
|
87
|
+
* When the email has finished processing (`sent`, `hardfail`, `held`, `bounced`),
|
|
88
|
+
* `retryState` is `null`.
|
|
89
|
+
*
|
|
90
|
+
* ### Can Retry Manually
|
|
91
|
+
*
|
|
92
|
+
* Indicates whether you can call `POST /emails/{emailId}/retry` to manually retry
|
|
93
|
+
* the email. This is `true` when the raw message content is still available (not
|
|
94
|
+
* expired due to retention policy).
|
|
61
95
|
*
|
|
62
96
|
* @example
|
|
63
97
|
* ```ts
|
|
64
98
|
* const response = await client.emails.retrieveDeliveries(
|
|
65
|
-
* '
|
|
99
|
+
* 'msg_12345_aBc123XyZ',
|
|
66
100
|
* );
|
|
67
101
|
* ```
|
|
68
102
|
*/
|
|
@@ -381,17 +415,46 @@ export interface EmailRetrieveDeliveriesResponse {
|
|
|
381
415
|
|
|
382
416
|
export namespace EmailRetrieveDeliveriesResponse {
|
|
383
417
|
export interface Data {
|
|
418
|
+
/**
|
|
419
|
+
* Whether the message can be manually retried via `POST /emails/{emailId}/retry`.
|
|
420
|
+
* `true` when the raw message content is still available (not expired). Messages
|
|
421
|
+
* older than the retention period cannot be retried.
|
|
422
|
+
*/
|
|
423
|
+
canRetryManually: boolean;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Chronological list of delivery attempts for this message. Each attempt includes
|
|
427
|
+
* SMTP response codes and timestamps.
|
|
428
|
+
*/
|
|
384
429
|
deliveries: Array<Data.Delivery>;
|
|
385
430
|
|
|
386
431
|
/**
|
|
387
|
-
* Internal message ID
|
|
432
|
+
* Internal numeric message ID
|
|
388
433
|
*/
|
|
389
|
-
messageId:
|
|
434
|
+
messageId: number;
|
|
390
435
|
|
|
391
436
|
/**
|
|
392
|
-
*
|
|
437
|
+
* Unique message token for API references
|
|
393
438
|
*/
|
|
394
439
|
messageToken: string;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Information about the current retry state of a message that is queued for
|
|
443
|
+
* delivery. Only present when the message is in the delivery queue.
|
|
444
|
+
*/
|
|
445
|
+
retryState: Data.RetryState | null;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Current message status (lowercase). Possible values:
|
|
449
|
+
*
|
|
450
|
+
* - `pending` - Initial state, awaiting first delivery attempt
|
|
451
|
+
* - `sent` - Successfully delivered
|
|
452
|
+
* - `softfail` - Temporary failure, will retry automatically
|
|
453
|
+
* - `hardfail` - Permanent failure, will not retry
|
|
454
|
+
* - `held` - Held for manual review (suppression list, etc.)
|
|
455
|
+
* - `bounced` - Bounced by recipient server
|
|
456
|
+
*/
|
|
457
|
+
status: 'pending' | 'sent' | 'softfail' | 'hardfail' | 'held' | 'bounced';
|
|
395
458
|
}
|
|
396
459
|
|
|
397
460
|
export namespace Data {
|
|
@@ -436,6 +499,54 @@ export namespace EmailRetrieveDeliveriesResponse {
|
|
|
436
499
|
*/
|
|
437
500
|
sentWithSsl?: boolean;
|
|
438
501
|
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Information about the current retry state of a message that is queued for
|
|
505
|
+
* delivery. Only present when the message is in the delivery queue.
|
|
506
|
+
*/
|
|
507
|
+
export interface RetryState {
|
|
508
|
+
/**
|
|
509
|
+
* Current attempt number (0-indexed). The first delivery attempt is 0, the first
|
|
510
|
+
* retry is 1, and so on.
|
|
511
|
+
*/
|
|
512
|
+
attempt: number;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Number of attempts remaining before the message is hard-failed. Calculated as
|
|
516
|
+
* `maxAttempts - attempt`.
|
|
517
|
+
*/
|
|
518
|
+
attemptsRemaining: number;
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Whether this queue entry was created by a manual retry request. Manual retries
|
|
522
|
+
* bypass certain hold conditions like suppression lists.
|
|
523
|
+
*/
|
|
524
|
+
manual: boolean;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Maximum number of delivery attempts before the message is hard-failed.
|
|
528
|
+
* Configured at the server level.
|
|
529
|
+
*/
|
|
530
|
+
maxAttempts: number;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Whether the message is currently being processed by a delivery worker. When
|
|
534
|
+
* `true`, the message is actively being sent.
|
|
535
|
+
*/
|
|
536
|
+
processing: boolean;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Unix timestamp of when the next retry attempt is scheduled. `null` if the
|
|
540
|
+
* message is ready for immediate processing or currently being processed.
|
|
541
|
+
*/
|
|
542
|
+
nextRetryAt?: number | null;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* ISO 8601 formatted timestamp of the next retry attempt. `null` if the message is
|
|
546
|
+
* ready for immediate processing.
|
|
547
|
+
*/
|
|
548
|
+
nextRetryAtIso?: string | null;
|
|
549
|
+
}
|
|
439
550
|
}
|
|
440
551
|
}
|
|
441
552
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.10.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.10.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.10.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.10.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|