@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.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
  /**
@@ -26906,7 +26914,7 @@ interface AuthSessionsApiInterface {
26906
26914
  */
26907
26915
  listEndUserSessions(initOverrides?: RequestInit | InitOverrideFunction): Promise<SessionListResponse>;
26908
26916
  /**
26909
- * Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided, preserves existing claims).
26917
+ * 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).
26910
26918
  * @summary Refresh access token
26911
26919
  * @param {RefreshSessionRequest} refreshSessionRequest
26912
26920
  * @param {*} [options] Override http request option.
@@ -26915,7 +26923,7 @@ interface AuthSessionsApiInterface {
26915
26923
  */
26916
26924
  refreshEndUserTokenRaw(requestParameters: AuthSessionsApiRefreshEndUserTokenRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<RefreshTokenResponse>>;
26917
26925
  /**
26918
- * Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided, preserves existing claims).
26926
+ * 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).
26919
26927
  * Refresh access token
26920
26928
  */
26921
26929
  refreshEndUserToken(refreshSessionRequest: RefreshSessionRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<RefreshTokenResponse>;
@@ -26962,12 +26970,12 @@ declare class AuthSessionsApi extends BaseAPI implements AuthSessionsApiInterfac
26962
26970
  */
26963
26971
  listEndUserSessions(initOverrides?: RequestInit | InitOverrideFunction): Promise<SessionListResponse>;
26964
26972
  /**
26965
- * Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided, preserves existing claims).
26973
+ * 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).
26966
26974
  * Refresh access token
26967
26975
  */
26968
26976
  refreshEndUserTokenRaw(requestParameters: AuthSessionsApiRefreshEndUserTokenRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<RefreshTokenResponse>>;
26969
26977
  /**
26970
- * Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided, preserves existing claims).
26978
+ * 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).
26971
26979
  * Refresh access token
26972
26980
  */
26973
26981
  refreshEndUserToken(refreshSessionRequest: RefreshSessionRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<RefreshTokenResponse>;
@@ -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
  /**
@@ -26906,7 +26914,7 @@ interface AuthSessionsApiInterface {
26906
26914
  */
26907
26915
  listEndUserSessions(initOverrides?: RequestInit | InitOverrideFunction): Promise<SessionListResponse>;
26908
26916
  /**
26909
- * Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided, preserves existing claims).
26917
+ * 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).
26910
26918
  * @summary Refresh access token
26911
26919
  * @param {RefreshSessionRequest} refreshSessionRequest
26912
26920
  * @param {*} [options] Override http request option.
@@ -26915,7 +26923,7 @@ interface AuthSessionsApiInterface {
26915
26923
  */
26916
26924
  refreshEndUserTokenRaw(requestParameters: AuthSessionsApiRefreshEndUserTokenRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<RefreshTokenResponse>>;
26917
26925
  /**
26918
- * Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided, preserves existing claims).
26926
+ * 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).
26919
26927
  * Refresh access token
26920
26928
  */
26921
26929
  refreshEndUserToken(refreshSessionRequest: RefreshSessionRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<RefreshTokenResponse>;
@@ -26962,12 +26970,12 @@ declare class AuthSessionsApi extends BaseAPI implements AuthSessionsApiInterfac
26962
26970
  */
26963
26971
  listEndUserSessions(initOverrides?: RequestInit | InitOverrideFunction): Promise<SessionListResponse>;
26964
26972
  /**
26965
- * Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided, preserves existing claims).
26973
+ * 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).
26966
26974
  * Refresh access token
26967
26975
  */
26968
26976
  refreshEndUserTokenRaw(requestParameters: AuthSessionsApiRefreshEndUserTokenRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<ApiResponse<RefreshTokenResponse>>;
26969
26977
  /**
26970
- * Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided, preserves existing claims).
26978
+ * 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).
26971
26979
  * Refresh access token
26972
26980
  */
26973
26981
  refreshEndUserToken(refreshSessionRequest: RefreshSessionRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<RefreshTokenResponse>;
@@ -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(),
@@ -19174,7 +19177,7 @@ var AuthSessionsApi = class extends BaseAPI {
19174
19177
  return await response.value();
19175
19178
  }
19176
19179
  /**
19177
- * Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided, preserves existing claims).
19180
+ * 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).
19178
19181
  * Refresh access token
19179
19182
  */
19180
19183
  async refreshEndUserTokenRaw(requestParameters, initOverrides) {
@@ -19203,7 +19206,7 @@ var AuthSessionsApi = class extends BaseAPI {
19203
19206
  return new JSONApiResponse(response, (jsonValue) => RefreshTokenResponseFromJSON(jsonValue));
19204
19207
  }
19205
19208
  /**
19206
- * Refresh access token using a refresh token. Accepts optional custom_claims to update JWT claims (if not provided, preserves existing claims).
19209
+ * 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).
19207
19210
  * Refresh access token
19208
19211
  */
19209
19212
  async refreshEndUserToken(refreshSessionRequest, initOverrides) {
@@ -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}`;