diff --git a/lib/didit/types.rb b/lib/didit/types.rb index ecb8620..1ec863f 100644 --- a/lib/didit/types.rb +++ b/lib/didit/types.rb @@ -1178,6 +1178,7 @@ module Types autoload :SessionDecisionPhoneVerificationsCarrier, "didit/types/components" autoload :SessionDecisionPhoneVerificationsLifecycle, "didit/types/components" autoload :SessionDecisionPhoneVerificationsLifecycleDetails, "didit/types/components" + autoload :SessionDecisionPhoneVerificationsLifecycleDetailsDeliveryStatus, "didit/types/components" autoload :SessionDecisionPhoneVerificationsMatches, "didit/types/components" autoload :SessionDecisionPhoneVerificationsMatchesSource, "didit/types/components" autoload :SessionDecisionPhoneVerificationsStatus, "didit/types/components" diff --git a/lib/didit/types/components.rb b/lib/didit/types/components.rb index de80737..ab0e005 100644 --- a/lib/didit/types/components.rb +++ b/lib/didit/types/components.rb @@ -3818,6 +3818,16 @@ module SessionDecisionNfcVerificationsWarningsFeature VALUES = [ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE].freeze end + # Send events: how the send ended. `unknown` once no delivery report can still arrive (the verification finished + # without one); absent while one can. + module SessionDecisionPhoneVerificationsLifecycleDetailsDeliveryStatus + DELIVERED = "delivered" + UNDELIVERABLE = "undeliverable" + UNKNOWN = "unknown" + + VALUES = [DELIVERED, UNDELIVERABLE, UNKNOWN].freeze + end + # Where this match came from. `session` means another verification session in your application matched on this # value. `list_entry` means the value was hit against an org-managed list (allowlist/blocklist) - see the # management API lists overview at `/management-api/lists/overview` for how to manage those lists. @@ -10921,14 +10931,20 @@ class SessionDecisionPhoneVerificationsLifecycle < Didit::Model field :fee, "fee", :float end - # 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`). + # 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`). class SessionDecisionPhoneVerificationsLifecycleDetails < Didit::Model field :status, "status", :string field :reason, "reason", :string field :channel, "channel", :string field :actual_channel, "actual_channel", :string + field :attempt, "attempt", :integer + field :delivery_status, "delivery_status", :string field :code_tried, "code_tried", :string end diff --git a/openapi/SOURCE.json b/openapi/SOURCE.json index d177abe..b106739 100644 --- a/openapi/SOURCE.json +++ b/openapi/SOURCE.json @@ -1,8 +1,8 @@ { "verification.json": { "url": "https://docs.didit.me/openapi-25.json", - "sha256": "99198089e59db66a2eb3fa2a17c9475a2dafce62ee25ed8998eaf00fb2108406", - "fetched_at": "2026-11-09T06:52:10Z" + "sha256": "e1667363543375d49fb5682c1e5a6fcf7b3ebe7b48ab3fb53616b3bc6ea8ac3d", + "fetched_at": "2026-11-10T11:01:57Z" }, "account.json": { "url": "https://docs.didit.me/openapi-auth.json", diff --git a/openapi/verification.json b/openapi/verification.json index 65d28d8..3c6cccd 100644 --- a/openapi/verification.json +++ b/openapi/verification.json @@ -3055,7 +3055,8 @@ "status": "Success", "reason": null, "channel": "sms", - "actual_channel": "sms" + "actual_channel": "sms", + "attempt": 0 }, "fee": 0.1 }, @@ -16531,7 +16532,9 @@ "status": "Success", "reason": null, "channel": "whatsapp", - "actual_channel": "whatsapp" + "actual_channel": "whatsapp", + "attempt": 0, + "delivery_status": "delivered" }, "fee": 0.0509 }, @@ -16540,7 +16543,8 @@ "timestamp": "2026-06-12T01:23:43.118220+00:00", "details": { "channel": "whatsapp", - "status": "delivered" + "status": "delivered", + "attempt": 0 }, "fee": 0 }, @@ -16619,7 +16623,8 @@ "status": "Success", "reason": null, "channel": "whatsapp", - "actual_channel": "whatsapp" + "actual_channel": "whatsapp", + "attempt": 0 }, "fee": 0.0509 }, @@ -16706,7 +16711,8 @@ "status": "Success", "reason": null, "channel": "whatsapp", - "actual_channel": "sms" + "actual_channel": "sms", + "attempt": 0 }, "fee": 0.0509 }, @@ -92261,7 +92267,7 @@ "details": { "type": "object", "nullable": true, - "description": "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." + "description": "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." }, "fee": { "type": "number", @@ -110902,14 +110908,15 @@ "details": { "type": "object", "nullable": true, - "description": "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`).", + "description": "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`).", "properties": { "status": { "type": "string" }, "reason": { "type": "string", - "nullable": true + "nullable": true, + "description": "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." }, "channel": { "type": "string", @@ -110919,6 +110926,21 @@ "type": "string", "nullable": true }, + "attempt": { + "type": "integer", + "nullable": true, + "description": "Send events and delivery events: the 0-based index of the send attempt the event belongs to, in the order of the send events." + }, + "delivery_status": { + "type": "string", + "nullable": true, + "enum": [ + "delivered", + "undeliverable", + "unknown" + ], + "description": "Send events: how the send ended. `unknown` once no delivery report can still arrive (the verification finished without one); absent while one can." + }, "code_tried": { "type": "string" } diff --git a/sig/didit/types/components.rbs b/sig/didit/types/components.rbs index 7ab5651..b52ee0a 100644 --- a/sig/didit/types/components.rbs +++ b/sig/didit/types/components.rbs @@ -3182,6 +3182,14 @@ module Didit VALUES: Array[String] end + module SessionDecisionPhoneVerificationsLifecycleDetailsDeliveryStatus + DELIVERED: String + UNDELIVERABLE: String + UNKNOWN: String + + VALUES: Array[String] + end + module SessionDecisionPhoneVerificationsMatchesSource SESSION: String LIST_ENTRY: String @@ -9615,6 +9623,8 @@ module Didit def reason: () -> String? def channel: () -> String? def actual_channel: () -> String? + def attempt: () -> Integer? + def delivery_status: () -> String? def code_tried: () -> String? end diff --git a/spec/generated/phone_spec.rb b/spec/generated/phone_spec.rb index f6e39cb..e1615fc 100644 --- a/spec/generated/phone_spec.rb +++ b/spec/generated/phone_spec.rb @@ -110,7 +110,9 @@ "status": "Success", "reason": null, "channel": "whatsapp", - "actual_channel": "whatsapp" + "actual_channel": "whatsapp", + "attempt": 0, + "delivery_status": "delivered" }, "fee": 0.0509 }, @@ -119,7 +121,8 @@ "timestamp": "2026-06-12T01:23:43.118220+00:00", "details": { "channel": "whatsapp", - "status": "delivered" + "status": "delivered", + "attempt": 0 }, "fee": 0 }, diff --git a/spec/generated/sessions_spec.rb b/spec/generated/sessions_spec.rb index 8073a9c..1f57dd2 100644 --- a/spec/generated/sessions_spec.rb +++ b/spec/generated/sessions_spec.rb @@ -1919,7 +1919,8 @@ "status": "Success", "reason": null, "channel": "sms", - "actual_channel": "sms" + "actual_channel": "sms", + "attempt": 0 }, "fee": 0.1 },