@zyphr-dev/node-sdk 0.1.46 → 0.1.47
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/index.cjs +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/clientAuth.ts +10 -4
- package/src/src/apis/EmailsApi.ts +3 -2
- package/src/src/models/EmailMessage.ts +11 -1
package/dist/index.d.cts
CHANGED
|
@@ -6269,6 +6269,13 @@ interface EmailMessage {
|
|
|
6269
6269
|
* @memberof EmailMessage
|
|
6270
6270
|
*/
|
|
6271
6271
|
status?: EmailMessageStatusEnum;
|
|
6272
|
+
/**
|
|
6273
|
+
* Why the message is in its current status, when applicable. For a `suppressed` row this is the suppression reason (e.g. `recipient_not_allowlisted` when blocked by the auth application's test_recipients allowlist). Null for normal sends.
|
|
6274
|
+
*
|
|
6275
|
+
* @type {string}
|
|
6276
|
+
* @memberof EmailMessage
|
|
6277
|
+
*/
|
|
6278
|
+
statusReason?: string | null;
|
|
6272
6279
|
/**
|
|
6273
6280
|
*
|
|
6274
6281
|
* @type {Array<string>}
|
|
@@ -6329,6 +6336,7 @@ declare const EmailMessageStatusEnum: {
|
|
|
6329
6336
|
readonly FAILED: "failed";
|
|
6330
6337
|
readonly BOUNCED: "bounced";
|
|
6331
6338
|
readonly REJECTED: "rejected";
|
|
6339
|
+
readonly SUPPRESSED: "suppressed";
|
|
6332
6340
|
};
|
|
6333
6341
|
type EmailMessageStatusEnum = typeof EmailMessageStatusEnum[keyof typeof EmailMessageStatusEnum];
|
|
6334
6342
|
/**
|
|
@@ -28139,7 +28147,7 @@ interface EmailsApiInterface {
|
|
|
28139
28147
|
/**
|
|
28140
28148
|
* Retrieve a paginated list of sent emails
|
|
28141
28149
|
* @summary List emails
|
|
28142
|
-
* @param {'pending' | 'queued' | 'sent' | 'delivered' | 'failed' | 'bounced' | 'rejected'} [status]
|
|
28150
|
+
* @param {'pending' | 'queued' | 'sent' | 'delivered' | 'failed' | 'bounced' | 'rejected' | 'suppressed'} [status]
|
|
28143
28151
|
* @param {string} [tag]
|
|
28144
28152
|
* @param {number} [limit]
|
|
28145
28153
|
* @param {number} [offset]
|
|
@@ -28258,6 +28266,7 @@ declare const ListEmailsStatusEnum: {
|
|
|
28258
28266
|
readonly FAILED: "failed";
|
|
28259
28267
|
readonly BOUNCED: "bounced";
|
|
28260
28268
|
readonly REJECTED: "rejected";
|
|
28269
|
+
readonly SUPPRESSED: "suppressed";
|
|
28261
28270
|
};
|
|
28262
28271
|
type ListEmailsStatusEnum = typeof ListEmailsStatusEnum[keyof typeof ListEmailsStatusEnum];
|
|
28263
28272
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6269,6 +6269,13 @@ interface EmailMessage {
|
|
|
6269
6269
|
* @memberof EmailMessage
|
|
6270
6270
|
*/
|
|
6271
6271
|
status?: EmailMessageStatusEnum;
|
|
6272
|
+
/**
|
|
6273
|
+
* Why the message is in its current status, when applicable. For a `suppressed` row this is the suppression reason (e.g. `recipient_not_allowlisted` when blocked by the auth application's test_recipients allowlist). Null for normal sends.
|
|
6274
|
+
*
|
|
6275
|
+
* @type {string}
|
|
6276
|
+
* @memberof EmailMessage
|
|
6277
|
+
*/
|
|
6278
|
+
statusReason?: string | null;
|
|
6272
6279
|
/**
|
|
6273
6280
|
*
|
|
6274
6281
|
* @type {Array<string>}
|
|
@@ -6329,6 +6336,7 @@ declare const EmailMessageStatusEnum: {
|
|
|
6329
6336
|
readonly FAILED: "failed";
|
|
6330
6337
|
readonly BOUNCED: "bounced";
|
|
6331
6338
|
readonly REJECTED: "rejected";
|
|
6339
|
+
readonly SUPPRESSED: "suppressed";
|
|
6332
6340
|
};
|
|
6333
6341
|
type EmailMessageStatusEnum = typeof EmailMessageStatusEnum[keyof typeof EmailMessageStatusEnum];
|
|
6334
6342
|
/**
|
|
@@ -28139,7 +28147,7 @@ interface EmailsApiInterface {
|
|
|
28139
28147
|
/**
|
|
28140
28148
|
* Retrieve a paginated list of sent emails
|
|
28141
28149
|
* @summary List emails
|
|
28142
|
-
* @param {'pending' | 'queued' | 'sent' | 'delivered' | 'failed' | 'bounced' | 'rejected'} [status]
|
|
28150
|
+
* @param {'pending' | 'queued' | 'sent' | 'delivered' | 'failed' | 'bounced' | 'rejected' | 'suppressed'} [status]
|
|
28143
28151
|
* @param {string} [tag]
|
|
28144
28152
|
* @param {number} [limit]
|
|
28145
28153
|
* @param {number} [offset]
|
|
@@ -28258,6 +28266,7 @@ declare const ListEmailsStatusEnum: {
|
|
|
28258
28266
|
readonly FAILED: "failed";
|
|
28259
28267
|
readonly BOUNCED: "bounced";
|
|
28260
28268
|
readonly REJECTED: "rejected";
|
|
28269
|
+
readonly SUPPRESSED: "suppressed";
|
|
28261
28270
|
};
|
|
28262
28271
|
type ListEmailsStatusEnum = typeof ListEmailsStatusEnum[keyof typeof ListEmailsStatusEnum];
|
|
28263
28272
|
|
package/dist/index.js
CHANGED
|
@@ -4293,7 +4293,8 @@ var EmailMessageStatusEnum = {
|
|
|
4293
4293
|
DELIVERED: "delivered",
|
|
4294
4294
|
FAILED: "failed",
|
|
4295
4295
|
BOUNCED: "bounced",
|
|
4296
|
-
REJECTED: "rejected"
|
|
4296
|
+
REJECTED: "rejected",
|
|
4297
|
+
SUPPRESSED: "suppressed"
|
|
4297
4298
|
};
|
|
4298
4299
|
function instanceOfEmailMessage(value) {
|
|
4299
4300
|
return true;
|
|
@@ -4311,6 +4312,7 @@ function EmailMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4311
4312
|
"to": json["to"] == null ? void 0 : EmailAddressFromJSON(json["to"]),
|
|
4312
4313
|
"subject": json["subject"] == null ? void 0 : json["subject"],
|
|
4313
4314
|
"status": json["status"] == null ? void 0 : json["status"],
|
|
4315
|
+
"statusReason": json["status_reason"] == null ? void 0 : json["status_reason"],
|
|
4314
4316
|
"tags": json["tags"] == null ? void 0 : json["tags"],
|
|
4315
4317
|
"queuedAt": json["queued_at"] == null ? void 0 : new Date(json["queued_at"]),
|
|
4316
4318
|
"sentAt": json["sent_at"] == null ? void 0 : new Date(json["sent_at"]),
|
|
@@ -4334,6 +4336,7 @@ function EmailMessageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4334
4336
|
"to": EmailAddressToJSON(value["to"]),
|
|
4335
4337
|
"subject": value["subject"],
|
|
4336
4338
|
"status": value["status"],
|
|
4339
|
+
"status_reason": value["statusReason"],
|
|
4337
4340
|
"tags": value["tags"],
|
|
4338
4341
|
"queued_at": value["queuedAt"] == null ? void 0 : value["queuedAt"].toISOString(),
|
|
4339
4342
|
"sent_at": value["sentAt"] == null ? void 0 : value["sentAt"].toISOString(),
|
|
@@ -20739,7 +20742,8 @@ var ListEmailsStatusEnum = {
|
|
|
20739
20742
|
DELIVERED: "delivered",
|
|
20740
20743
|
FAILED: "failed",
|
|
20741
20744
|
BOUNCED: "bounced",
|
|
20742
|
-
REJECTED: "rejected"
|
|
20745
|
+
REJECTED: "rejected",
|
|
20746
|
+
SUPPRESSED: "suppressed"
|
|
20743
20747
|
};
|
|
20744
20748
|
|
|
20745
20749
|
// src/src/apis/ExecutionsApi.ts
|
|
@@ -26393,7 +26397,8 @@ var ZyphrClient = class {
|
|
|
26393
26397
|
authedRequest(accessToken) {
|
|
26394
26398
|
const token = accessToken ?? this.accessToken;
|
|
26395
26399
|
const headers = {
|
|
26396
|
-
"X-Application-Key": this.applicationKey
|
|
26400
|
+
"X-Application-Key": this.applicationKey,
|
|
26401
|
+
"Content-Type": "application/json"
|
|
26397
26402
|
};
|
|
26398
26403
|
if (token) {
|
|
26399
26404
|
headers.Authorization = `Bearer ${token}`;
|