diff --git a/openapi/SOURCE.json b/openapi/SOURCE.json index 43ac7d5..ad1474b 100644 --- a/openapi/SOURCE.json +++ b/openapi/SOURCE.json @@ -1,13 +1,13 @@ { "verification.json": { "url": "https://docs.didit.me/openapi-25.json", - "sha256": "99198089e59db66a2eb3fa2a17c9475a2dafce62ee25ed8998eaf00fb2108406", - "fetched_at": "2026-11-10T07:59:42Z" + "sha256": "e1667363543375d49fb5682c1e5a6fcf7b3ebe7b48ab3fb53616b3bc6ea8ac3d", + "fetched_at": "2026-11-10T11:01:46Z" }, "account.json": { "url": "https://docs.didit.me/openapi-auth.json", "sha256": "3ebf65c9668861bcd2008c11d65be4055ef58ba5fa57945c72afe3d4ac4fb523", - "fetched_at": "2026-11-10T07:59:42Z" + "fetched_at": "2026-11-10T11:01:46Z" }, "webhook-vectors.json": { "generator": "product-automations scripts/server-sdks/make_vectors.py (seeded 2026-10-17)", @@ -16,6 +16,6 @@ "authentication.json": { "url": "https://docs.didit.me/openapi-authentication.json", "sha256": "3987984647bfcaa4b5462c8d60cd3c53894bf7585a38109e0cc813292b2416fe", - "fetched_at": "2026-11-10T07:59:42Z" + "fetched_at": "2026-11-10T11:01:46Z" } } \ No newline at end of file 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/src/didit/types/components/phone_verification_check_response.py b/src/didit/types/components/phone_verification_check_response.py index d386c24..f744436 100644 --- a/src/didit/types/components/phone_verification_check_response.py +++ b/src/didit/types/components/phone_verification_check_response.py @@ -36,7 +36,7 @@ class PhoneVerificationCheckResponsePhoneLifecycle(BaseModel): """When the event happened.""" details: dict[str, object] | None = None - """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.""" + """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: float | None = None """USD amount billed for this event. Non-zero only on send events (the delivery price); 0 for code entries, delivery confirmations, and status events.""" diff --git a/src/didit/types/components/session_decision.py b/src/didit/types/components/session_decision.py index 6001df7..cc13043 100644 --- a/src/didit/types/components/session_decision.py +++ b/src/didit/types/components/session_decision.py @@ -2996,16 +2996,23 @@ class SessionDecisionPhoneVerificationsCarrier(BaseModel): class SessionDecisionPhoneVerificationsLifecycleDetails(BaseModel): - """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`).""" status: str | None = None reason: str | None = None + """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: str | None = None actual_channel: str | None = None + attempt: int | None = None + """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: Literal["delivered", "undeliverable", "unknown"] | str | None = None + """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: str | None = None @@ -3015,7 +3022,7 @@ class SessionDecisionPhoneVerificationsLifecycle(BaseModel): timestamp: _dt.datetime | None = None details: SessionDecisionPhoneVerificationsLifecycleDetails | None = None - """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`).""" fee: float | None = None diff --git a/tests/generated/test_phone.py b/tests/generated/test_phone.py index 3e7e1f4..f724965 100644 --- a/tests/generated/test_phone.py +++ b/tests/generated/test_phone.py @@ -110,13 +110,15 @@ def test_phone_check_code() -> None: "reason": None, "channel": "whatsapp", "actual_channel": "whatsapp", + "attempt": 0, + "delivery_status": "delivered", }, "fee": 0.0509, }, { "type": "PHONE_DELIVERY_DELIVERED", "timestamp": "2026-06-12T01:23:43.118220+00:00", - "details": {"channel": "whatsapp", "status": "delivered"}, + "details": {"channel": "whatsapp", "status": "delivered", "attempt": 0}, "fee": 0, }, { diff --git a/tests/generated/test_sessions.py b/tests/generated/test_sessions.py index c694494..6d6808d 100644 --- a/tests/generated/test_sessions.py +++ b/tests/generated/test_sessions.py @@ -1813,6 +1813,7 @@ def test_sessions_retrieve_decision() -> None: "reason": None, "channel": "sms", "actual_channel": "sms", + "attempt": 0, }, "fee": 0.1, },