@upyo/core 0.4.0-dev.64 → 0.4.0-dev.67
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/message.cjs +2 -1
- package/dist/message.d.cts +36 -0
- package/dist/message.d.ts +36 -0
- package/dist/message.js +2 -1
- package/dist/transport.d.cts +1 -1
- package/dist/transport.d.ts +1 -1
- package/package.json +1 -1
package/dist/message.cjs
CHANGED
|
@@ -48,7 +48,8 @@ function createMessage(constructor) {
|
|
|
48
48
|
content: constructor.content,
|
|
49
49
|
priority: constructor.priority ?? "normal",
|
|
50
50
|
tags: ensureArray(constructor.tags),
|
|
51
|
-
headers: new Headers(constructor.headers ?? {})
|
|
51
|
+
headers: new Headers(constructor.headers ?? {}),
|
|
52
|
+
idempotencyKey: constructor.idempotencyKey
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
function throwTypeError(message) {
|
package/dist/message.d.cts
CHANGED
|
@@ -77,6 +77,24 @@ interface Message {
|
|
|
77
77
|
* the headers, such as `append`, `delete`, or `set`.
|
|
78
78
|
*/
|
|
79
79
|
readonly headers: ImmutableHeaders;
|
|
80
|
+
/**
|
|
81
|
+
* An idempotency key to ensure that the same message is not sent multiple
|
|
82
|
+
* times. This is useful for retrying failed send operations without
|
|
83
|
+
* risking duplicate delivery.
|
|
84
|
+
*
|
|
85
|
+
* If provided, the transport will use this key to deduplicate requests.
|
|
86
|
+
* If not provided, the transport may generate its own key internally
|
|
87
|
+
* (behavior varies by transport implementation).
|
|
88
|
+
*
|
|
89
|
+
* The key should be unique for each distinct message you want to send.
|
|
90
|
+
* When retrying the same message, use the same idempotency key.
|
|
91
|
+
*
|
|
92
|
+
* Note: Not all transports support idempotency keys. Check the specific
|
|
93
|
+
* transport documentation for details.
|
|
94
|
+
*
|
|
95
|
+
* @since 0.4.0
|
|
96
|
+
*/
|
|
97
|
+
readonly idempotencyKey?: string;
|
|
80
98
|
}
|
|
81
99
|
/**
|
|
82
100
|
* Represents the content of an email message, which can be either HTML
|
|
@@ -182,6 +200,24 @@ interface MessageConstructor {
|
|
|
182
200
|
* @default `{}`
|
|
183
201
|
*/
|
|
184
202
|
readonly headers?: ImmutableHeaders | Record<string, string>;
|
|
203
|
+
/**
|
|
204
|
+
* An idempotency key to ensure that the same message is not sent multiple
|
|
205
|
+
* times. This is useful for retrying failed send operations without
|
|
206
|
+
* risking duplicate delivery.
|
|
207
|
+
*
|
|
208
|
+
* If provided, the transport will use this key to deduplicate requests.
|
|
209
|
+
* If not provided, the transport may generate its own key internally
|
|
210
|
+
* (behavior varies by transport implementation).
|
|
211
|
+
*
|
|
212
|
+
* The key should be unique for each distinct message you want to send.
|
|
213
|
+
* When retrying the same message, use the same idempotency key.
|
|
214
|
+
*
|
|
215
|
+
* Note: Not all transports support idempotency keys. Check the specific
|
|
216
|
+
* transport documentation for details.
|
|
217
|
+
*
|
|
218
|
+
* @since 0.4.0
|
|
219
|
+
*/
|
|
220
|
+
readonly idempotencyKey?: string;
|
|
185
221
|
}
|
|
186
222
|
/**
|
|
187
223
|
* Creates a new email {@link Message} based on the provided constructor
|
package/dist/message.d.ts
CHANGED
|
@@ -77,6 +77,24 @@ interface Message {
|
|
|
77
77
|
* the headers, such as `append`, `delete`, or `set`.
|
|
78
78
|
*/
|
|
79
79
|
readonly headers: ImmutableHeaders;
|
|
80
|
+
/**
|
|
81
|
+
* An idempotency key to ensure that the same message is not sent multiple
|
|
82
|
+
* times. This is useful for retrying failed send operations without
|
|
83
|
+
* risking duplicate delivery.
|
|
84
|
+
*
|
|
85
|
+
* If provided, the transport will use this key to deduplicate requests.
|
|
86
|
+
* If not provided, the transport may generate its own key internally
|
|
87
|
+
* (behavior varies by transport implementation).
|
|
88
|
+
*
|
|
89
|
+
* The key should be unique for each distinct message you want to send.
|
|
90
|
+
* When retrying the same message, use the same idempotency key.
|
|
91
|
+
*
|
|
92
|
+
* Note: Not all transports support idempotency keys. Check the specific
|
|
93
|
+
* transport documentation for details.
|
|
94
|
+
*
|
|
95
|
+
* @since 0.4.0
|
|
96
|
+
*/
|
|
97
|
+
readonly idempotencyKey?: string;
|
|
80
98
|
}
|
|
81
99
|
/**
|
|
82
100
|
* Represents the content of an email message, which can be either HTML
|
|
@@ -182,6 +200,24 @@ interface MessageConstructor {
|
|
|
182
200
|
* @default `{}`
|
|
183
201
|
*/
|
|
184
202
|
readonly headers?: ImmutableHeaders | Record<string, string>;
|
|
203
|
+
/**
|
|
204
|
+
* An idempotency key to ensure that the same message is not sent multiple
|
|
205
|
+
* times. This is useful for retrying failed send operations without
|
|
206
|
+
* risking duplicate delivery.
|
|
207
|
+
*
|
|
208
|
+
* If provided, the transport will use this key to deduplicate requests.
|
|
209
|
+
* If not provided, the transport may generate its own key internally
|
|
210
|
+
* (behavior varies by transport implementation).
|
|
211
|
+
*
|
|
212
|
+
* The key should be unique for each distinct message you want to send.
|
|
213
|
+
* When retrying the same message, use the same idempotency key.
|
|
214
|
+
*
|
|
215
|
+
* Note: Not all transports support idempotency keys. Check the specific
|
|
216
|
+
* transport documentation for details.
|
|
217
|
+
*
|
|
218
|
+
* @since 0.4.0
|
|
219
|
+
*/
|
|
220
|
+
readonly idempotencyKey?: string;
|
|
185
221
|
}
|
|
186
222
|
/**
|
|
187
223
|
* Creates a new email {@link Message} based on the provided constructor
|
package/dist/message.js
CHANGED
|
@@ -48,7 +48,8 @@ function createMessage(constructor) {
|
|
|
48
48
|
content: constructor.content,
|
|
49
49
|
priority: constructor.priority ?? "normal",
|
|
50
50
|
tags: ensureArray(constructor.tags),
|
|
51
|
-
headers: new Headers(constructor.headers ?? {})
|
|
51
|
+
headers: new Headers(constructor.headers ?? {}),
|
|
52
|
+
idempotencyKey: constructor.idempotencyKey
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
function throwTypeError(message) {
|
package/dist/transport.d.cts
CHANGED
package/dist/transport.d.ts
CHANGED