@didit-protocol/sdk-node 2.5.0 → 2.7.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/dist/index.d.cts CHANGED
@@ -5228,7 +5228,7 @@ interface PhoneVerificationCheckResponsePhoneLifecycle {
5228
5228
  type?: string;
5229
5229
  /** When the event happened. */
5230
5230
  timestamp?: Date;
5231
- /** Event-specific payload. Send events: `{status, reason, channel, actual_channel}` (`actual_channel` is filled once delivery is confirmed). Delivery events: `{channel, status}`. Code-entry events: `{code_tried, status}`. Final-status events: `null`, or `{reason}` when declined or in review. */
5231
+ /** Event-specific payload. Send events: `{status, reason, channel, actual_channel, attempt, delivery_status}` - `actual_channel` is filled once delivery is confirmed, `attempt` is the 0-based index of the send (the order of the send events), and `delivery_status` is `delivered`, `undeliverable` or `unknown` (no report arrived before the verification ended); it is absent while a report can still arrive. Delivery events: `{channel, status, attempt, reason}` - `attempt` is the send it belongs to, and `reason` (on `PHONE_DELIVERY_UNDELIVERABLE` only) is `expired`, `rejected`, `unreachable`, `blocked` or `unknown` for a message, and `unreachable_number`, `no_answer`, `busy` or `undeliverable` for a call. Code-entry events: `{code_tried, status}`. Final-status events: `null`, or `{reason}` when declined or in review. */
5232
5232
  details?: Record<string, unknown> | null;
5233
5233
  /** USD amount billed for this event. Non-zero only on send events (the delivery price); 0 for code entries, delivery confirmations, and status events. */
5234
5234
  fee?: number;
@@ -7336,16 +7336,21 @@ interface SessionDecisionPhoneVerificationsCarrier {
7336
7336
  interface SessionDecisionPhoneVerificationsLifecycle {
7337
7337
  type?: string;
7338
7338
  timestamp?: Date;
7339
- /** Event-specific payload. Send events carry `status`, `reason`, `channel`, `actual_channel`; delivery events carry `channel`, `status`; code-check events carry `code_tried`, `status`; final status events carry `reason` - or `null` when there is no reason to report (e.g. `PHONE_VERIFICATION_APPROVED`). */
7339
+ /** Event-specific payload. Send events carry `status`, `reason`, `channel`, `actual_channel`, `attempt` (the send's 0-based index, matching the order of the send events) and `delivery_status` (`delivered`, `undeliverable`, or `unknown` once no report can still arrive; absent while one can); delivery events carry `channel`, `status`, `attempt` and, on `PHONE_DELIVERY_UNDELIVERABLE`, `reason` (`expired`, `rejected`, `unreachable`, `blocked` or `unknown` for a message; `unreachable_number`, `no_answer`, `busy` or `undeliverable` for a call - always a fixed word, never a provider status or error code); code-check events carry `code_tried`, `status`; final status events carry `reason` - or `null` when there is no reason to report (e.g. `PHONE_VERIFICATION_APPROVED`). */
7340
7340
  details?: SessionDecisionPhoneVerificationsLifecycleDetails | null;
7341
7341
  fee?: number;
7342
7342
  }
7343
- /** Event-specific payload. Send events carry `status`, `reason`, `channel`, `actual_channel`; delivery events carry `channel`, `status`; code-check events carry `code_tried`, `status`; final status events carry `reason` - or `null` when there is no reason to report (e.g. `PHONE_VERIFICATION_APPROVED`). */
7343
+ /** Event-specific payload. Send events carry `status`, `reason`, `channel`, `actual_channel`, `attempt` (the send's 0-based index, matching the order of the send events) and `delivery_status` (`delivered`, `undeliverable`, or `unknown` once no report can still arrive; absent while one can); delivery events carry `channel`, `status`, `attempt` and, on `PHONE_DELIVERY_UNDELIVERABLE`, `reason` (`expired`, `rejected`, `unreachable`, `blocked` or `unknown` for a message; `unreachable_number`, `no_answer`, `busy` or `undeliverable` for a call - always a fixed word, never a provider status or error code); code-check events carry `code_tried`, `status`; final status events carry `reason` - or `null` when there is no reason to report (e.g. `PHONE_VERIFICATION_APPROVED`). */
7344
7344
  interface SessionDecisionPhoneVerificationsLifecycleDetails {
7345
7345
  status?: string;
7346
+ /** Send events: why the send was blocked (`invalid_phone_number`, `repeated_attempts`, `suspicious`, `spam`, `unknown`), `null` otherwise. Delivery events on `PHONE_DELIVERY_UNDELIVERABLE`: `expired`, `rejected`, `unreachable`, `blocked` or `unknown` for a message, and `unreachable_number`, `no_answer`, `busy` or `undeliverable` for a call - a fixed customer-safe word, never the provider's status or error code. */
7346
7347
  reason?: string | null;
7347
7348
  channel?: string | null;
7348
7349
  actual_channel?: string | null;
7350
+ /** Send events and delivery events: the 0-based index of the send attempt the event belongs to, in the order of the send events. */
7351
+ attempt?: number | null;
7352
+ /** Send events: how the send ended. `unknown` once no delivery report can still arrive (the verification finished without one); absent while one can. */
7353
+ delivery_status?: "delivered" | "undeliverable" | "unknown" | (string & {}) | null;
7349
7354
  code_tried?: string;
7350
7355
  }
7351
7356
  interface SessionDecisionPhoneVerificationsMatches {
@@ -23289,7 +23294,7 @@ declare class TokenVerificationError extends DiditError {
23289
23294
  constructor(reason: TokenVerificationReason, message: string);
23290
23295
  }
23291
23296
 
23292
- declare const VERSION = "2.5.0";
23297
+ declare const VERSION = "2.7.0";
23293
23298
 
23294
23299
  /**
23295
23300
  * The canonical JSON of a parsed webhook body: the text `X-Signature-V2` signs
package/dist/index.d.ts CHANGED
@@ -5228,7 +5228,7 @@ interface PhoneVerificationCheckResponsePhoneLifecycle {
5228
5228
  type?: string;
5229
5229
  /** When the event happened. */
5230
5230
  timestamp?: Date;
5231
- /** Event-specific payload. Send events: `{status, reason, channel, actual_channel}` (`actual_channel` is filled once delivery is confirmed). Delivery events: `{channel, status}`. Code-entry events: `{code_tried, status}`. Final-status events: `null`, or `{reason}` when declined or in review. */
5231
+ /** Event-specific payload. Send events: `{status, reason, channel, actual_channel, attempt, delivery_status}` - `actual_channel` is filled once delivery is confirmed, `attempt` is the 0-based index of the send (the order of the send events), and `delivery_status` is `delivered`, `undeliverable` or `unknown` (no report arrived before the verification ended); it is absent while a report can still arrive. Delivery events: `{channel, status, attempt, reason}` - `attempt` is the send it belongs to, and `reason` (on `PHONE_DELIVERY_UNDELIVERABLE` only) is `expired`, `rejected`, `unreachable`, `blocked` or `unknown` for a message, and `unreachable_number`, `no_answer`, `busy` or `undeliverable` for a call. Code-entry events: `{code_tried, status}`. Final-status events: `null`, or `{reason}` when declined or in review. */
5232
5232
  details?: Record<string, unknown> | null;
5233
5233
  /** USD amount billed for this event. Non-zero only on send events (the delivery price); 0 for code entries, delivery confirmations, and status events. */
5234
5234
  fee?: number;
@@ -7336,16 +7336,21 @@ interface SessionDecisionPhoneVerificationsCarrier {
7336
7336
  interface SessionDecisionPhoneVerificationsLifecycle {
7337
7337
  type?: string;
7338
7338
  timestamp?: Date;
7339
- /** Event-specific payload. Send events carry `status`, `reason`, `channel`, `actual_channel`; delivery events carry `channel`, `status`; code-check events carry `code_tried`, `status`; final status events carry `reason` - or `null` when there is no reason to report (e.g. `PHONE_VERIFICATION_APPROVED`). */
7339
+ /** Event-specific payload. Send events carry `status`, `reason`, `channel`, `actual_channel`, `attempt` (the send's 0-based index, matching the order of the send events) and `delivery_status` (`delivered`, `undeliverable`, or `unknown` once no report can still arrive; absent while one can); delivery events carry `channel`, `status`, `attempt` and, on `PHONE_DELIVERY_UNDELIVERABLE`, `reason` (`expired`, `rejected`, `unreachable`, `blocked` or `unknown` for a message; `unreachable_number`, `no_answer`, `busy` or `undeliverable` for a call - always a fixed word, never a provider status or error code); code-check events carry `code_tried`, `status`; final status events carry `reason` - or `null` when there is no reason to report (e.g. `PHONE_VERIFICATION_APPROVED`). */
7340
7340
  details?: SessionDecisionPhoneVerificationsLifecycleDetails | null;
7341
7341
  fee?: number;
7342
7342
  }
7343
- /** Event-specific payload. Send events carry `status`, `reason`, `channel`, `actual_channel`; delivery events carry `channel`, `status`; code-check events carry `code_tried`, `status`; final status events carry `reason` - or `null` when there is no reason to report (e.g. `PHONE_VERIFICATION_APPROVED`). */
7343
+ /** Event-specific payload. Send events carry `status`, `reason`, `channel`, `actual_channel`, `attempt` (the send's 0-based index, matching the order of the send events) and `delivery_status` (`delivered`, `undeliverable`, or `unknown` once no report can still arrive; absent while one can); delivery events carry `channel`, `status`, `attempt` and, on `PHONE_DELIVERY_UNDELIVERABLE`, `reason` (`expired`, `rejected`, `unreachable`, `blocked` or `unknown` for a message; `unreachable_number`, `no_answer`, `busy` or `undeliverable` for a call - always a fixed word, never a provider status or error code); code-check events carry `code_tried`, `status`; final status events carry `reason` - or `null` when there is no reason to report (e.g. `PHONE_VERIFICATION_APPROVED`). */
7344
7344
  interface SessionDecisionPhoneVerificationsLifecycleDetails {
7345
7345
  status?: string;
7346
+ /** Send events: why the send was blocked (`invalid_phone_number`, `repeated_attempts`, `suspicious`, `spam`, `unknown`), `null` otherwise. Delivery events on `PHONE_DELIVERY_UNDELIVERABLE`: `expired`, `rejected`, `unreachable`, `blocked` or `unknown` for a message, and `unreachable_number`, `no_answer`, `busy` or `undeliverable` for a call - a fixed customer-safe word, never the provider's status or error code. */
7346
7347
  reason?: string | null;
7347
7348
  channel?: string | null;
7348
7349
  actual_channel?: string | null;
7350
+ /** Send events and delivery events: the 0-based index of the send attempt the event belongs to, in the order of the send events. */
7351
+ attempt?: number | null;
7352
+ /** Send events: how the send ended. `unknown` once no delivery report can still arrive (the verification finished without one); absent while one can. */
7353
+ delivery_status?: "delivered" | "undeliverable" | "unknown" | (string & {}) | null;
7349
7354
  code_tried?: string;
7350
7355
  }
7351
7356
  interface SessionDecisionPhoneVerificationsMatches {
@@ -23289,7 +23294,7 @@ declare class TokenVerificationError extends DiditError {
23289
23294
  constructor(reason: TokenVerificationReason, message: string);
23290
23295
  }
23291
23296
 
23292
- declare const VERSION = "2.5.0";
23297
+ declare const VERSION = "2.7.0";
23293
23298
 
23294
23299
  /**
23295
23300
  * The canonical JSON of a parsed webhook body: the text `X-Signature-V2` signs
package/dist/index.js CHANGED
@@ -278,7 +278,7 @@ function decodeDates(value, plan, named, depth = 0) {
278
278
  }
279
279
 
280
280
  // src/core/version.ts
281
- var VERSION = "2.5.0";
281
+ var VERSION = "2.7.0";
282
282
 
283
283
  // src/core/runtime.ts
284
284
  function processLike() {