@zyphr-dev/node-sdk 0.1.46 → 0.1.48
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 +10 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -5
- package/dist/index.d.ts +14 -5
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/clientAuth.ts +10 -4
- package/src/src/apis/AuthSessionsApi.ts +4 -4
- package/src/src/apis/EmailsApi.ts +3 -2
- package/src/src/models/EmailMessage.ts +11 -1
package/dist/index.cjs
CHANGED
|
@@ -6958,7 +6958,8 @@ var EmailMessageStatusEnum = {
|
|
|
6958
6958
|
DELIVERED: "delivered",
|
|
6959
6959
|
FAILED: "failed",
|
|
6960
6960
|
BOUNCED: "bounced",
|
|
6961
|
-
REJECTED: "rejected"
|
|
6961
|
+
REJECTED: "rejected",
|
|
6962
|
+
SUPPRESSED: "suppressed"
|
|
6962
6963
|
};
|
|
6963
6964
|
function instanceOfEmailMessage(value) {
|
|
6964
6965
|
return true;
|
|
@@ -6976,6 +6977,7 @@ function EmailMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
6976
6977
|
"to": json["to"] == null ? void 0 : EmailAddressFromJSON(json["to"]),
|
|
6977
6978
|
"subject": json["subject"] == null ? void 0 : json["subject"],
|
|
6978
6979
|
"status": json["status"] == null ? void 0 : json["status"],
|
|
6980
|
+
"statusReason": json["status_reason"] == null ? void 0 : json["status_reason"],
|
|
6979
6981
|
"tags": json["tags"] == null ? void 0 : json["tags"],
|
|
6980
6982
|
"queuedAt": json["queued_at"] == null ? void 0 : new Date(json["queued_at"]),
|
|
6981
6983
|
"sentAt": json["sent_at"] == null ? void 0 : new Date(json["sent_at"]),
|
|
@@ -6999,6 +7001,7 @@ function EmailMessageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
6999
7001
|
"to": EmailAddressToJSON(value["to"]),
|
|
7000
7002
|
"subject": value["subject"],
|
|
7001
7003
|
"status": value["status"],
|
|
7004
|
+
"status_reason": value["statusReason"],
|
|
7002
7005
|
"tags": value["tags"],
|
|
7003
7006
|
"queued_at": value["queuedAt"] == null ? void 0 : value["queuedAt"].toISOString(),
|
|
7004
7007
|
"sent_at": value["sentAt"] == null ? void 0 : value["sentAt"].toISOString(),
|
|
@@ -21839,7 +21842,7 @@ var AuthSessionsApi = class extends BaseAPI {
|
|
|
21839
21842
|
return await response.value();
|
|
21840
21843
|
}
|
|
21841
21844
|
/**
|
|
21842
|
-
* Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided,
|
|
21845
|
+
* Refresh an end-user access token using a refresh token. Authenticated with the publishable application key (`X-Application-Key`) — no application secret is required, so client-side apps (browser / mobile) can refresh directly. The refresh token is the credential: it must be valid, unexpired, unrevoked, and issued for this application. Refresh tokens are single-use — each refresh returns a NEW refresh token and invalidates the one you presented, so persist the new token before the next refresh. Accepts optional custom_claims to update JWT claims (if not provided, current stored claims are preserved).
|
|
21843
21846
|
* Refresh access token
|
|
21844
21847
|
*/
|
|
21845
21848
|
async refreshEndUserTokenRaw(requestParameters, initOverrides) {
|
|
@@ -21868,7 +21871,7 @@ var AuthSessionsApi = class extends BaseAPI {
|
|
|
21868
21871
|
return new JSONApiResponse(response, (jsonValue) => RefreshTokenResponseFromJSON(jsonValue));
|
|
21869
21872
|
}
|
|
21870
21873
|
/**
|
|
21871
|
-
* Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided,
|
|
21874
|
+
* Refresh an end-user access token using a refresh token. Authenticated with the publishable application key (`X-Application-Key`) — no application secret is required, so client-side apps (browser / mobile) can refresh directly. The refresh token is the credential: it must be valid, unexpired, unrevoked, and issued for this application. Refresh tokens are single-use — each refresh returns a NEW refresh token and invalidates the one you presented, so persist the new token before the next refresh. Accepts optional custom_claims to update JWT claims (if not provided, current stored claims are preserved).
|
|
21872
21875
|
* Refresh access token
|
|
21873
21876
|
*/
|
|
21874
21877
|
async refreshEndUserToken(refreshSessionRequest, initOverrides) {
|
|
@@ -23404,7 +23407,8 @@ var ListEmailsStatusEnum = {
|
|
|
23404
23407
|
DELIVERED: "delivered",
|
|
23405
23408
|
FAILED: "failed",
|
|
23406
23409
|
BOUNCED: "bounced",
|
|
23407
|
-
REJECTED: "rejected"
|
|
23410
|
+
REJECTED: "rejected",
|
|
23411
|
+
SUPPRESSED: "suppressed"
|
|
23408
23412
|
};
|
|
23409
23413
|
|
|
23410
23414
|
// src/src/apis/ExecutionsApi.ts
|
|
@@ -29058,7 +29062,8 @@ var ZyphrClient = class {
|
|
|
29058
29062
|
authedRequest(accessToken) {
|
|
29059
29063
|
const token = accessToken ?? this.accessToken;
|
|
29060
29064
|
const headers = {
|
|
29061
|
-
"X-Application-Key": this.applicationKey
|
|
29065
|
+
"X-Application-Key": this.applicationKey,
|
|
29066
|
+
"Content-Type": "application/json"
|
|
29062
29067
|
};
|
|
29063
29068
|
if (token) {
|
|
29064
29069
|
headers.Authorization = `Bearer ${token}`;
|