botshield-sdk 4.0.1 → 4.0.3

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.
Files changed (108) hide show
  1. package/README.md +3 -5
  2. package/bin/mcp-server.js +15 -13
  3. package/bin/mcp-server.js.map +19 -19
  4. package/dist/commonjs/funcs/census-confirm-link.d.ts +1 -1
  5. package/dist/commonjs/funcs/census-confirm-link.js +1 -1
  6. package/dist/commonjs/funcs/census-send-by-number.d.ts +1 -1
  7. package/dist/commonjs/funcs/census-send-by-number.js +1 -1
  8. package/dist/commonjs/funcs/census-verify-token.d.ts +1 -1
  9. package/dist/commonjs/funcs/census-verify-token.js +1 -1
  10. package/dist/commonjs/funcs/verification-get-status.d.ts +1 -1
  11. package/dist/commonjs/funcs/verification-get-status.js +1 -1
  12. package/dist/commonjs/lib/config.d.ts +2 -12
  13. package/dist/commonjs/lib/config.d.ts.map +1 -1
  14. package/dist/commonjs/lib/config.js +3 -13
  15. package/dist/commonjs/lib/config.js.map +1 -1
  16. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  17. package/dist/commonjs/mcp-server/server.js +1 -1
  18. package/dist/commonjs/models/bot-shield-action.d.ts +7 -7
  19. package/dist/commonjs/models/bot-shield-action.js +1 -1
  20. package/dist/commonjs/models/error-body.d.ts +1 -1
  21. package/dist/commonjs/models/operations/actions-propose.d.ts +1 -1
  22. package/dist/commonjs/models/operations/gates-api-actions-create.d.ts +2 -2
  23. package/dist/commonjs/models/operations/gates-api-actions-list.d.ts +1 -1
  24. package/dist/commonjs/models/operations/gates-api-actions-request.d.ts +2 -2
  25. package/dist/commonjs/models/operations/gates-api-actions-set-state.d.ts +1 -1
  26. package/dist/commonjs/models/operations/gates-api-actions-update.d.ts +2 -2
  27. package/dist/commonjs/models/operations/sdk-create-verification-link.d.ts +2 -2
  28. package/dist/commonjs/models/operations/sdk-send-by-number.d.ts +1 -1
  29. package/dist/commonjs/models/operations/sdk-verify-token.d.ts +7 -7
  30. package/dist/commonjs/models/operations/secured-accounts-list.d.ts +5 -0
  31. package/dist/commonjs/models/operations/secured-accounts-list.d.ts.map +1 -1
  32. package/dist/commonjs/models/operations/secured-accounts-list.js +2 -0
  33. package/dist/commonjs/models/operations/secured-accounts-list.js.map +1 -1
  34. package/dist/commonjs/models/operations/secured-accounts-status.d.ts +5 -0
  35. package/dist/commonjs/models/operations/secured-accounts-status.d.ts.map +1 -1
  36. package/dist/commonjs/models/operations/secured-accounts-status.js +2 -0
  37. package/dist/commonjs/models/operations/secured-accounts-status.js.map +1 -1
  38. package/dist/commonjs/models/operations/verification-get-status.d.ts +6 -6
  39. package/dist/commonjs/models/operations/verification-get-status.js +1 -1
  40. package/dist/commonjs/sdk/census.d.ts +3 -3
  41. package/dist/commonjs/sdk/census.js +3 -3
  42. package/dist/commonjs/sdk/verification.d.ts +1 -1
  43. package/dist/commonjs/sdk/verification.js +1 -1
  44. package/dist/esm/funcs/census-confirm-link.d.ts +1 -1
  45. package/dist/esm/funcs/census-confirm-link.js +1 -1
  46. package/dist/esm/funcs/census-send-by-number.d.ts +1 -1
  47. package/dist/esm/funcs/census-send-by-number.js +1 -1
  48. package/dist/esm/funcs/census-verify-token.d.ts +1 -1
  49. package/dist/esm/funcs/census-verify-token.js +1 -1
  50. package/dist/esm/funcs/verification-get-status.d.ts +1 -1
  51. package/dist/esm/funcs/verification-get-status.js +1 -1
  52. package/dist/esm/lib/config.d.ts +2 -12
  53. package/dist/esm/lib/config.d.ts.map +1 -1
  54. package/dist/esm/lib/config.js +2 -12
  55. package/dist/esm/lib/config.js.map +1 -1
  56. package/dist/esm/mcp-server/mcp-server.js +1 -1
  57. package/dist/esm/mcp-server/server.js +1 -1
  58. package/dist/esm/models/bot-shield-action.d.ts +7 -7
  59. package/dist/esm/models/bot-shield-action.js +1 -1
  60. package/dist/esm/models/error-body.d.ts +1 -1
  61. package/dist/esm/models/operations/actions-propose.d.ts +1 -1
  62. package/dist/esm/models/operations/gates-api-actions-create.d.ts +2 -2
  63. package/dist/esm/models/operations/gates-api-actions-list.d.ts +1 -1
  64. package/dist/esm/models/operations/gates-api-actions-request.d.ts +2 -2
  65. package/dist/esm/models/operations/gates-api-actions-set-state.d.ts +1 -1
  66. package/dist/esm/models/operations/gates-api-actions-update.d.ts +2 -2
  67. package/dist/esm/models/operations/sdk-create-verification-link.d.ts +2 -2
  68. package/dist/esm/models/operations/sdk-send-by-number.d.ts +1 -1
  69. package/dist/esm/models/operations/sdk-verify-token.d.ts +7 -7
  70. package/dist/esm/models/operations/secured-accounts-list.d.ts +5 -0
  71. package/dist/esm/models/operations/secured-accounts-list.d.ts.map +1 -1
  72. package/dist/esm/models/operations/secured-accounts-list.js +2 -0
  73. package/dist/esm/models/operations/secured-accounts-list.js.map +1 -1
  74. package/dist/esm/models/operations/secured-accounts-status.d.ts +5 -0
  75. package/dist/esm/models/operations/secured-accounts-status.d.ts.map +1 -1
  76. package/dist/esm/models/operations/secured-accounts-status.js +2 -0
  77. package/dist/esm/models/operations/secured-accounts-status.js.map +1 -1
  78. package/dist/esm/models/operations/verification-get-status.d.ts +6 -6
  79. package/dist/esm/models/operations/verification-get-status.js +1 -1
  80. package/dist/esm/sdk/census.d.ts +3 -3
  81. package/dist/esm/sdk/census.js +3 -3
  82. package/dist/esm/sdk/verification.d.ts +1 -1
  83. package/dist/esm/sdk/verification.js +1 -1
  84. package/jsr.json +1 -1
  85. package/package.json +1 -1
  86. package/src/funcs/census-confirm-link.ts +1 -1
  87. package/src/funcs/census-send-by-number.ts +1 -1
  88. package/src/funcs/census-verify-token.ts +1 -1
  89. package/src/funcs/verification-get-status.ts +1 -1
  90. package/src/lib/config.ts +2 -12
  91. package/src/mcp-server/mcp-server.ts +1 -1
  92. package/src/mcp-server/server.ts +1 -1
  93. package/src/models/bot-shield-action.ts +7 -7
  94. package/src/models/error-body.ts +1 -1
  95. package/src/models/operations/actions-propose.ts +1 -1
  96. package/src/models/operations/gates-api-actions-create.ts +2 -2
  97. package/src/models/operations/gates-api-actions-list.ts +1 -1
  98. package/src/models/operations/gates-api-actions-request.ts +2 -2
  99. package/src/models/operations/gates-api-actions-set-state.ts +1 -1
  100. package/src/models/operations/gates-api-actions-update.ts +2 -2
  101. package/src/models/operations/sdk-create-verification-link.ts +2 -2
  102. package/src/models/operations/sdk-send-by-number.ts +1 -1
  103. package/src/models/operations/sdk-verify-token.ts +7 -7
  104. package/src/models/operations/secured-accounts-list.ts +7 -0
  105. package/src/models/operations/secured-accounts-status.ts +7 -0
  106. package/src/models/operations/verification-get-status.ts +6 -6
  107. package/src/sdk/census.ts +3 -3
  108. package/src/sdk/verification.ts +1 -1
@@ -32,7 +32,7 @@ export type BotShieldActionEnvironment = OpenEnum<
32
32
  >;
33
33
 
34
34
  /**
35
- * 4.0: `action` (a BotShield Action), `recovery` (your one Recovery Action: only your customer starts it, from the Recover Account with BotShield button) or `signin` (your one Sign-on Action: only signin/request starts it). Recovery and Sign-on Actions are placed in the Console; no `act`, server ask, send by number or staff send reaches them (`action_is_recovery` / `action_is_signin`). `action` on an engine before 4.0.
35
+ * `action` (a BotShield Action), `recovery` (your one Recovery Action: only your customer starts it, from the Recover Account with BotShield button) or `signin` (your one Sign-on Action: only signin/request starts it). Recovery and Sign-on Actions are placed in the Console; no `act`, server ask, send by number or staff send reaches them (`action_is_recovery` / `action_is_signin`). `action` on an engine before 4.0.
36
36
  */
37
37
  export const BotShieldActionKind = {
38
38
  Action: "action",
@@ -40,7 +40,7 @@ export const BotShieldActionKind = {
40
40
  Signin: "signin",
41
41
  } as const;
42
42
  /**
43
- * 4.0: `action` (a BotShield Action), `recovery` (your one Recovery Action: only your customer starts it, from the Recover Account with BotShield button) or `signin` (your one Sign-on Action: only signin/request starts it). Recovery and Sign-on Actions are placed in the Console; no `act`, server ask, send by number or staff send reaches them (`action_is_recovery` / `action_is_signin`). `action` on an engine before 4.0.
43
+ * `action` (a BotShield Action), `recovery` (your one Recovery Action: only your customer starts it, from the Recover Account with BotShield button) or `signin` (your one Sign-on Action: only signin/request starts it). Recovery and Sign-on Actions are placed in the Console; no `act`, server ask, send by number or staff send reaches them (`action_is_recovery` / `action_is_signin`). `action` on an engine before 4.0.
44
44
  */
45
45
  export type BotShieldActionKind = OpenEnum<typeof BotShieldActionKind>;
46
46
 
@@ -73,23 +73,23 @@ export type BotShieldAction = {
73
73
  */
74
74
  staffCanSend?: boolean | undefined;
75
75
  /**
76
- * 4.0: `action` (a BotShield Action), `recovery` (your one Recovery Action: only your customer starts it, from the Recover Account with BotShield button) or `signin` (your one Sign-on Action: only signin/request starts it). Recovery and Sign-on Actions are placed in the Console; no `act`, server ask, send by number or staff send reaches them (`action_is_recovery` / `action_is_signin`). `action` on an engine before 4.0.
76
+ * `action` (a BotShield Action), `recovery` (your one Recovery Action: only your customer starts it, from the Recover Account with BotShield button) or `signin` (your one Sign-on Action: only signin/request starts it). Recovery and Sign-on Actions are placed in the Console; no `act`, server ask, send by number or staff send reaches them (`action_is_recovery` / `action_is_signin`). `action` on an engine before 4.0.
77
77
  */
78
78
  kind?: BotShieldActionKind | undefined;
79
79
  /**
80
- * 4.0: on a Sign-on Action, whether BotShield's own QR may finish a sign-in (default off: your page's passkey only). Always false on other kinds.
80
+ * On a Sign-on Action, whether BotShield's own QR may finish a sign-in (default off: your page's passkey only). Always false on other kinds.
81
81
  */
82
82
  signinQr?: boolean | undefined;
83
83
  /**
84
- * 4.0: a Recovery Action's new landing address while it waits to take effect (24 hours in Production; every admin is told). `where_url` is the address in effect until then.
84
+ * A Recovery Action's new landing address while it waits to take effect (24 hours in Production; every admin is told). `where_url` is the address in effect until then.
85
85
  */
86
86
  pendingWhereUrl?: string | null | undefined;
87
87
  /**
88
- * 4.0: when `pending_where_url` takes effect.
88
+ * When `pending_where_url` takes effect.
89
89
  */
90
90
  pendingWhereUrlAt?: Date | null | undefined;
91
91
  /**
92
- * 4.0: high-value. It starts only from your customer's signed-in session (your server naming the account by your own reference); by phone number or by staff it is refused (`action_requires_signed_in`). Set with `highValue` on create or update.
92
+ * High-value. It starts only from your customer's signed-in session (your server naming the account by your own reference); by phone number or by staff it is refused (`action_requires_signed_in`). Set with `highValue` on create or update.
93
93
  */
94
94
  highValue?: boolean | undefined;
95
95
  };
@@ -36,7 +36,7 @@ export type ErrorBody = {
36
36
  message: string;
37
37
  statusCode: number;
38
38
  /**
39
- * `ttl_below_floor`, `ttl_above_ceiling`, `trust_layer_rejected`, `trust_layer_unavailable`, `gate_required`, `alias_retired`, `RATE_LIMITED`, `inline_not_for_age_gate`, `act_label_has_link`, and in 4.0 `link_requires_server_session`, `account_override_refused`, `action_is_recovery`, `action_is_signin`, `invalid_key`, `recovery_code_invalid`, `handle_invalid`, `signin_not_set_up`, `not_verified`, `account_paused`, `signin_unknown`, `signin_pending`, `signin_refused`, `signin_expired`, `signin_used`, `signin_wrong_account`, `unavailable`.
39
+ * `ttl_below_floor`, `ttl_above_ceiling`, `trust_layer_rejected`, `trust_layer_unavailable`, `gate_required`, `alias_retired`, `RATE_LIMITED`, `inline_not_for_age_gate`, `act_label_has_link`, and in `link_requires_server_session`, `account_override_refused`, `action_is_recovery`, `action_is_signin`, `invalid_key`, `recovery_code_invalid`, `handle_invalid`, `signin_not_set_up`, `not_verified`, `account_paused`, `signin_unknown`, `signin_pending`, `signin_refused`, `signin_expired`, `signin_used`, `signin_wrong_account`, `unavailable`.
40
40
  */
41
41
  code?: string | undefined;
42
42
  minTtlSeconds?: number | undefined;
@@ -62,7 +62,7 @@ export type ActionsProposeRequest = {
62
62
  */
63
63
  userEmail?: string | undefined;
64
64
  /**
65
- * 4.0 · the person's phone number, in place of `opaque_id` / `botshield_user_id` / `user_email` (never together with them). Used for one lookup, then dropped: never stored, logged or sent in a webhook. The answer is the same whether or not anyone holds the number. Show the returned `match_number` to the person; they pick it in the app before approving. A person not yet linked to your company gets an introduction first, never the card; the ask is held and becomes the card if they allow. An ask nobody answers reads `queued`, then `expired`. Production needs a verified business.
65
+ * The person's phone number, in place of `opaque_id` / `botshield_user_id` / `user_email` (never together with them). Used for one lookup, then dropped: never stored, logged or sent in a webhook. The answer is the same whether or not anyone holds the number. Show the returned `match_number` to the person; they pick it in the app before approving. A person not yet linked to your company gets an introduction first, never the card; the ask is held and becomes the card if they allow. An ask nobody answers reads `queued`, then `expired`. Production needs a verified business.
66
66
  */
67
67
  phoneNumber?: string | undefined;
68
68
  action: ActionsProposeAction;
@@ -32,7 +32,7 @@ export type GatesApiActionsCreateRequest = {
32
32
  */
33
33
  staffCanSend?: boolean | undefined;
34
34
  /**
35
- * 4.0 VH-31: high-value. It starts only from your customer's signed-in session (your server naming the account by your own reference). It is refused by phone number and for staff sends (`action_requires_signed_in`).
35
+ * High-value. It starts only from your customer's signed-in session (your server naming the account by your own reference). It is refused by phone number and for staff sends (`action_requires_signed_in`).
36
36
  */
37
37
  highValue?: boolean | undefined;
38
38
  };
@@ -53,7 +53,7 @@ export type GatesApiActionsCreateData = {
53
53
  };
54
54
 
55
55
  /**
56
- * The placed action. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key), `gates_scope_required` (403 — the key lacks Gates API access), `org_not_found` (404), `action_key_taken` (409), `not_migrated` (503 — `staffCanSend` is not available yet), `internal` (500). 4.0: each action carries `kind` (`action`, `recovery` or `signin`), `signin_qr` and, for a Recovery Action, `pending_where_url` / `pending_where_url_at`. Recovery and Sign-on Actions are placed in the Console, not here.
56
+ * The placed action. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key), `gates_scope_required` (403 — the key lacks Gates API access), `org_not_found` (404), `action_key_taken` (409), `not_migrated` (503 — `staffCanSend` is not available yet), `internal` (500). Each action carries `kind` (`action`, `recovery` or `signin`), `signin_qr` and, for a Recovery Action, `pending_where_url` / `pending_where_url_at`. Recovery and Sign-on Actions are placed in the Console, not here.
57
57
  */
58
58
  export type GatesApiActionsCreateResponse = {
59
59
  data: GatesApiActionsCreateData;
@@ -27,7 +27,7 @@ export type GatesApiActionsListData = {
27
27
  };
28
28
 
29
29
  /**
30
- * Actions. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key), `gates_scope_required` (403 — the key lacks Gates API access), `org_not_found` (404), `internal` (500). Each action carries `staff_can_send`. 4.0: each action carries `kind` (`action`, `recovery` or `signin`), `signin_qr` and, for a Recovery Action, `pending_where_url` / `pending_where_url_at`. Recovery and Sign-on Actions are placed in the Console, not here.
30
+ * Actions. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key), `gates_scope_required` (403 — the key lacks Gates API access), `org_not_found` (404), `internal` (500). Each action carries `staff_can_send`. Each action carries `kind` (`action`, `recovery` or `signin`), `signin_qr` and, for a Recovery Action, `pending_where_url` / `pending_where_url_at`. Recovery and Sign-on Actions are placed in the Console, not here.
31
31
  */
32
32
  export type GatesApiActionsListResponse = {
33
33
  data: GatesApiActionsListData;
@@ -43,7 +43,7 @@ export type GatesApiActionsRequestRequest = {
43
43
  */
44
44
  partnerUserRef?: string | undefined;
45
45
  /**
46
- * 4.0 · the person's phone number, in place of `partner_user_ref` (exactly one of the two). Used for one lookup, then dropped: never stored, logged or sent in a webhook. The answer is the same whether or not anyone holds the number. Show the returned `match_number` to the person; they pick it in the app before approving. A person not yet linked to your company gets an introduction first, never the card; the ask is held and becomes the card if they allow. An ask nobody answers reads `queued`, then `expired`. Production needs a verified business.
46
+ * The person's phone number, in place of `partner_user_ref` (exactly one of the two). Used for one lookup, then dropped: never stored, logged or sent in a webhook. The answer is the same whether or not anyone holds the number. Show the returned `match_number` to the person; they pick it in the app before approving. A person not yet linked to your company gets an introduction first, never the card; the ask is held and becomes the card if they allow. An ask nobody answers reads `queued`, then `expired`. Production needs a verified business.
47
47
  */
48
48
  phoneNumber?: string | undefined;
49
49
  /**
@@ -90,7 +90,7 @@ export type GatesApiActionsRequestData = {
90
90
  };
91
91
 
92
92
  /**
93
- * Queued. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401), `gates_scope_required` (403), `org_not_found` (404), `action_invalid` (400), `action_not_found` (404), `action_off` (404), `agent_not_found` (404), `not_linked` (409 — the person isn't linked to your company), `details_invalid` (400), `agent_removed_by_person` (409 — the person removed this agent), `account_reconfirm_required` (409 — the customer changed their phone number without approval from another phone, so they must confirm this account with BotShield again from your signed-in page before anything can be sent to them; nothing is counted or sent), `request_id_reused` (409 — also when the same request_id is sent with other terms), `too_many_open_requests` (429 — this person already has 5 of your requests waiting; carries `retry_after_seconds`), `daily_request_limit` (429 — 50 requests to this person in 24 hours; carries `retry_after_seconds`), `request_limit_unavailable` (503 — the request could not be counted, so it was not sent; retry), `one_addressee_required` (400 — send exactly one of partner_user_ref and phone_number), `phone_invalid` (400), `org_not_verified` (403 — by phone number in production), `send_rate_limited` (429 — asks by phone number per key per hour), `unanswered_limit_reached` (429 — too many unanswered asks by phone number in 24 hours), `unavailable` (503), `internal` (500). 4.0: `action_is_recovery` / `action_is_signin` (404 — that act is your Recovery Action or Sign-on Action, which no request starts).
93
+ * Queued. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401), `gates_scope_required` (403), `org_not_found` (404), `action_invalid` (400), `action_not_found` (404), `action_off` (404), `agent_not_found` (404), `not_linked` (409 — the person isn't linked to your company), `details_invalid` (400), `agent_removed_by_person` (409 — the person removed this agent), `account_reconfirm_required` (409 — the customer changed their phone number without approval from another phone, so they must confirm this account with BotShield again from your signed-in page before anything can be sent to them; nothing is counted or sent), `request_id_reused` (409 — also when the same request_id is sent with other terms), `too_many_open_requests` (429 — this person already has 5 of your requests waiting; carries `retry_after_seconds`), `daily_request_limit` (429 — 50 requests to this person in 24 hours; carries `retry_after_seconds`), `request_limit_unavailable` (503 — the request could not be counted, so it was not sent; retry), `one_addressee_required` (400 — send exactly one of partner_user_ref and phone_number), `phone_invalid` (400), `org_not_verified` (403 — by phone number in production), `send_rate_limited` (429 — asks by phone number per key per hour), `unanswered_limit_reached` (429 — too many unanswered asks by phone number in 24 hours), `unavailable` (503), `internal` (500). `action_is_recovery` / `action_is_signin` (404 — that act is your Recovery Action or Sign-on Action, which no request starts).
94
94
  */
95
95
  export type GatesApiActionsRequestResponse = {
96
96
  data: GatesApiActionsRequestData;
@@ -47,7 +47,7 @@ export type GatesApiActionsSetStateData = {
47
47
  };
48
48
 
49
49
  /**
50
- * The action. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key), `gates_scope_required` (403 — the key lacks Gates API access), `org_not_found` (404), `action_not_found` (404), `internal` (500). Each action carries `staff_can_send`. 4.0: each action carries `kind` (`action`, `recovery` or `signin`), `signin_qr` and, for a Recovery Action, `pending_where_url` / `pending_where_url_at`. Recovery and Sign-on Actions are placed in the Console, not here.
50
+ * The action. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key), `gates_scope_required` (403 — the key lacks Gates API access), `org_not_found` (404), `action_not_found` (404), `internal` (500). Each action carries `staff_can_send`. Each action carries `kind` (`action`, `recovery` or `signin`), `signin_qr` and, for a Recovery Action, `pending_where_url` / `pending_where_url_at`. Recovery and Sign-on Actions are placed in the Console, not here.
51
51
  */
52
52
  export type GatesApiActionsSetStateResponse = {
53
53
  data: GatesApiActionsSetStateData;
@@ -28,7 +28,7 @@ export type GatesApiActionsUpdateRequest = {
28
28
  */
29
29
  staffCanSend?: boolean | undefined;
30
30
  /**
31
- * 4.0 VH-31: high-value. It starts only from your customer's signed-in session (your server naming the account by your own reference). It is refused by phone number and for staff sends (`action_requires_signed_in`).
31
+ * High-value. It starts only from your customer's signed-in session (your server naming the account by your own reference). It is refused by phone number and for staff sends (`action_requires_signed_in`).
32
32
  */
33
33
  highValue?: boolean | undefined;
34
34
  };
@@ -49,7 +49,7 @@ export type GatesApiActionsUpdateData = {
49
49
  };
50
50
 
51
51
  /**
52
- * The action. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key), `gates_scope_required` (403 — the key lacks Gates API access), `org_not_found` (404), `nothing_to_change` (400), `action_not_found` (404), `not_migrated` (503), `internal` (500). 4.0: each action carries `kind` (`action`, `recovery` or `signin`), `signin_qr` and, for a Recovery Action, `pending_where_url` / `pending_where_url_at`. Recovery and Sign-on Actions are placed in the Console, not here.
52
+ * The action. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: `invalid_key` (401 — missing, malformed or inactive key), `gates_scope_required` (403 — the key lacks Gates API access), `org_not_found` (404), `nothing_to_change` (400), `action_not_found` (404), `not_migrated` (503), `internal` (500). Each action carries `kind` (`action`, `recovery` or `signin`), `signin_qr` and, for a Recovery Action, `pending_where_url` / `pending_where_url_at`. Recovery and Sign-on Actions are placed in the Console, not here.
53
53
  */
54
54
  export type GatesApiActionsUpdateResponse = {
55
55
  data: GatesApiActionsUpdateData;
@@ -192,7 +192,7 @@ export type SDKCreateVerificationLinkNotarizeFallbackReason = OpenEnum<
192
192
  export type SDKCreateVerificationLinkDataData = {
193
193
  requestId: string;
194
194
  /**
195
- * 4.0: only on a request started with your site key (`pk_…`, a page's grant). The one secret that reads this request's answer: send it as `X-BotShield-Request-Secret` to verification/status, which returns the finished tokens only with it. Returned once, here; BotShield keeps only its hash. A request your server started with its secret key has none (its tokens go to that key).
195
+ * Only on a request started with your site key (`pk_…`, a page's grant). The one secret that reads this request's answer: send it as `X-BotShield-Request-Secret` to verification/status, which returns the finished tokens only with it. Returned once, here; BotShield keeps only its hash. A request your server started with its secret key has none (its tokens go to that key).
196
196
  */
197
197
  readSecret?: string | undefined;
198
198
  deepLink: string;
@@ -262,7 +262,7 @@ export type SDKCreateVerificationLinkData = {
262
262
  };
263
263
 
264
264
  /**
265
- * Verification link created. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes for this operation: 400 (partner not found / gate not active), 401, 403 (gate not in the token allowlist), 409 (pending request already exists — call revoke-verification). BotShield Actions and linking codes (`data.error.code`): `act_label_without_act` (400), `act_label_has_link` (400 — `act_label` may not contain a link, a domain or a URI scheme), `action_not_a_gate` (400), `action_invalid` (400 — act malformed), `action_not_found` (400 — no action with that key here), `action_off` (409), `action_requires_user_ref` (400), `link_requires_user_ref` (400 — the gate's policy is `link: required` and no partner_user_ref was sent), `account_reconfirm_required` (409 — the customer changed their phone number without approval from another phone; only the link ceremony (`notarize`) can be started for this partner_user_ref until they confirm the account again from your signed-in page). A development key over its limit: `RATE_LIMITED`. 4.0: `link_requires_server_session` (403 — a request on a site-key grant that would write a NEW link: a `notarize` ceremony, or an `act` on an account not linked here yet; open the session from your server with your secret key, naming the signed-in customer), `account_override_refused` (403 — `partner_user_ref` names a different account from the one the session names), `action_is_recovery` / `action_is_signin` (400 — that `act` is your Recovery Action or your Sign-on Action, which no request starts), and 503 when BotShield could not tell whether the account is already linked (nothing was written; retry).
265
+ * Verification link created. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes for this operation: 400 (partner not found / gate not active), 401, 403 (gate not in the token allowlist), 409 (pending request already exists — call revoke-verification). BotShield Actions and linking codes (`data.error.code`): `act_label_without_act` (400), `act_label_has_link` (400 — `act_label` may not contain a link, a domain or a URI scheme), `action_not_a_gate` (400), `action_invalid` (400 — act malformed), `action_not_found` (400 — no action with that key here), `action_off` (409), `action_requires_user_ref` (400), `link_requires_user_ref` (400 — the gate's policy is `link: required` and no partner_user_ref was sent), `account_reconfirm_required` (409 — the customer changed their phone number without approval from another phone; only the link ceremony (`notarize`) can be started for this partner_user_ref until they confirm the account again from your signed-in page). A development key over its limit: `RATE_LIMITED`. `link_requires_server_session` (403 — a request on a site-key grant that would write a NEW link: a `notarize` ceremony, or an `act` on an account not linked here yet; open the session from your server with your secret key, naming the signed-in customer), `account_override_refused` (403 — `partner_user_ref` names a different account from the one the session names), `action_is_recovery` / `action_is_signin` (400 — that `act` is your Recovery Action or your Sign-on Action, which no request starts), and 503 when BotShield could not tell whether the account is already linked (nothing was written; retry).
266
266
  */
267
267
  export type SDKCreateVerificationLinkResponse = {
268
268
  data: SDKCreateVerificationLinkData;
@@ -57,7 +57,7 @@ export type SDKSendByNumberData = {
57
57
  };
58
58
 
59
59
  /**
60
- * Result. NOTE: handler errors arrive here (HTTP 200) as data.error — codes: secret_key_required · invalid_key · phone_invalid · action_invalid · action_not_found · action_off · act_label_has_link · org_not_verified · send_rate_limited · unanswered_limit_reached · unavailable. 4.0: action_is_recovery · action_is_signin (400 — your Recovery Action and Sign-on Action are never sent).
60
+ * Result. NOTE: handler errors arrive here (HTTP 200) as data.error — codes: secret_key_required · invalid_key · phone_invalid · action_invalid · action_not_found · action_off · act_label_has_link · org_not_verified · send_rate_limited · unanswered_limit_reached · unavailable. Action_is_recovery · action_is_signin (400 — your Recovery Action and Sign-on Action are never sent).
61
61
  */
62
62
  export type SDKSendByNumberResponse = {
63
63
  data?: SDKSendByNumberData | undefined;
@@ -27,11 +27,11 @@ export type SDKVerifyTokenRequest = {
27
27
  */
28
28
  audience?: string | undefined;
29
29
  /**
30
- * 4.0: with your secret key, on a token whose link is pending, this confirms the link (same as sdk/confirm-link). The answer's `link` says whether it went live.
30
+ * With your secret key, on a token whose link is pending, this confirms the link (same as sdk/confirm-link). The answer's `link` says whether it went live.
31
31
  */
32
32
  partnerUserRef?: string | undefined;
33
33
  /**
34
- * 4.0: the request YOUR server made for this attempt. When given, a token for any other request is refused (`valid: false`, `code: request_mismatch`) and is not spent.
34
+ * The request YOUR server made for this attempt. When given, a token for any other request is refused (`valid: false`, `code: request_mismatch`) and is not spent.
35
35
  */
36
36
  expectedRequestId?: string | undefined;
37
37
  };
@@ -116,11 +116,11 @@ export type Claims = {
116
116
  */
117
117
  environment?: SDKVerifyTokenEnvironment | null | undefined;
118
118
  /**
119
- * 4.0: present for 72 hours after this verified account was recovered with Recover Account with BotShield: when it was recovered. Only when `trusted` is true.
119
+ * Present for 72 hours after this verified account was recovered with Recover Account with BotShield: when it was recovered. Only when `trusted` is true.
120
120
  */
121
121
  recoveredAt?: Date | undefined;
122
122
  /**
123
- * 4.0: where the link stood for this token: `pending`, `live`, `expired` or `refused`. Absent on a plain check.
123
+ * Where the link stood for this token: `pending`, `live`, `expired` or `refused`. Absent on a plain check.
124
124
  */
125
125
  linkState?: string | undefined;
126
126
  };
@@ -145,7 +145,7 @@ export const SDKVerifyTokenState = {
145
145
  export type SDKVerifyTokenState = OpenEnum<typeof SDKVerifyTokenState>;
146
146
 
147
147
  /**
148
- * 4.0: present only on a token whose link waited for your server. `pending`: not confirmed (send your secret key and `partner_user_ref`, or call sdk/confirm-link). `live` with `confirmed: true`: this check confirmed it. `not_live`: the confirm was refused (`code`).
148
+ * Present only on a token whose link waited for your server. `pending`: not confirmed (send your secret key and `partner_user_ref`, or call sdk/confirm-link). `live` with `confirmed: true`: this check confirmed it. `not_live`: the confirm was refused (`code`).
149
149
  */
150
150
  export type SDKVerifyTokenLink = {
151
151
  state?: SDKVerifyTokenState | undefined;
@@ -166,7 +166,7 @@ export type SDKVerifyTokenDataData = {
166
166
  */
167
167
  reason?: string | undefined;
168
168
  /**
169
- * 4.0: on some refusals (`valid: false`), a code beside `reason`: `secret_key_required` (called without your secret key; the token was not spent), `request_mismatch` (the token is for another request than `expected_request_id`; not spent).
169
+ * On some refusals (`valid: false`), a code beside `reason`: `secret_key_required` (called without your secret key; the token was not spent), `request_mismatch` (the token is for another request than `expected_request_id`; not spent).
170
170
  */
171
171
  code?: string | undefined;
172
172
  /**
@@ -183,7 +183,7 @@ export type SDKVerifyTokenDataData = {
183
183
  */
184
184
  verdict?: SDKVerifyTokenVerdict | undefined;
185
185
  /**
186
- * 4.0: present only on a token whose link waited for your server. `pending`: not confirmed (send your secret key and `partner_user_ref`, or call sdk/confirm-link). `live` with `confirmed: true`: this check confirmed it. `not_live`: the confirm was refused (`code`).
186
+ * Present only on a token whose link waited for your server. `pending`: not confirmed (send your secret key and `partner_user_ref`, or call sdk/confirm-link). `live` with `confirmed: true`: this check confirmed it. `not_live`: the confirm was refused (`code`).
187
187
  */
188
188
  link?: SDKVerifyTokenLink | undefined;
189
189
  };
@@ -94,6 +94,10 @@ export type Row = {
94
94
  * The Link with BotShield ID surface the account was secured through; null when it was secured at a Gate.
95
95
  */
96
96
  surfaceId: string | null;
97
+ /**
98
+ * True while the person's number changed without approval from another phone: this account answers nothing (refusals say account_reconfirm_required) until your signed-in link ceremony completes again. Never true for an unlinked account.
99
+ */
100
+ paused: boolean;
97
101
  };
98
102
 
99
103
  /**
@@ -304,6 +308,7 @@ export const Row$inboundSchema: z.ZodType<Row, z.ZodTypeDef, unknown> = z
304
308
  SecuredAccountsListUnlinkReason$inboundSchema,
305
309
  ),
306
310
  surface_id: types.nullable(types.string()),
311
+ paused: types.boolean(),
307
312
  }).transform((v) => {
308
313
  return remap$(v, {
309
314
  "secured_at": "securedAt",
@@ -322,6 +327,7 @@ export type Row$Outbound = {
322
327
  unlinked_by: string | null;
323
328
  unlink_reason: string | null;
324
329
  surface_id: string | null;
330
+ paused: boolean;
325
331
  };
326
332
 
327
333
  /** @internal */
@@ -334,6 +340,7 @@ export const Row$outboundSchema: z.ZodType<Row$Outbound, z.ZodTypeDef, Row> = z
334
340
  unlinkedBy: z.nullable(UnlinkedBy$outboundSchema),
335
341
  unlinkReason: z.nullable(SecuredAccountsListUnlinkReason$outboundSchema),
336
342
  surfaceId: z.nullable(z.string()),
343
+ paused: z.boolean(),
337
344
  }).transform((v) => {
338
345
  return remap$(v, {
339
346
  securedAt: "secured_at",
@@ -38,6 +38,10 @@ export type SecuredAccountsStatusDataData = {
38
38
  * When recent presence lapses (in the past when `stale`); null when `none`.
39
39
  */
40
40
  freshUntil: Date | null;
41
+ /**
42
+ * True while the person's number changed without approval from another phone: this account answers nothing (refusals say account_reconfirm_required) until your signed-in link ceremony completes again. null when it can't be read; false when there is no live account.
43
+ */
44
+ paused?: boolean | null | undefined;
41
45
  };
42
46
 
43
47
  export type SecuredAccountsStatusData = {
@@ -174,6 +178,7 @@ export const SecuredAccountsStatusDataData$inboundSchema: z.ZodType<
174
178
  > = z.object({
175
179
  state: SecuredAccountsStatusState$inboundSchema,
176
180
  fresh_until: types.nullable(types.date()),
181
+ paused: z.nullable(types.boolean()).optional(),
177
182
  }).transform((v) => {
178
183
  return remap$(v, {
179
184
  "fresh_until": "freshUntil",
@@ -183,6 +188,7 @@ export const SecuredAccountsStatusDataData$inboundSchema: z.ZodType<
183
188
  export type SecuredAccountsStatusDataData$Outbound = {
184
189
  state: string;
185
190
  fresh_until: string | null;
191
+ paused?: boolean | null | undefined;
186
192
  };
187
193
 
188
194
  /** @internal */
@@ -193,6 +199,7 @@ export const SecuredAccountsStatusDataData$outboundSchema: z.ZodType<
193
199
  > = z.object({
194
200
  state: SecuredAccountsStatusState$outboundSchema,
195
201
  freshUntil: z.nullable(z.date().transform(v => v.toISOString())),
202
+ paused: z.nullable(z.boolean()).optional(),
196
203
  }).transform((v) => {
197
204
  return remap$(v, {
198
205
  freshUntil: "fresh_until",
@@ -20,7 +20,7 @@ export type VerificationGetStatusSecurity = {
20
20
  export type VerificationGetStatusRequest = {
21
21
  requestId: string;
22
22
  /**
23
- * 4.0: the `read_secret` create-verification-link returned for a request started with your site key. Without it such a request's `verification_token` / `signed_token` are never returned. A request your server started reads them with your secret key (`Authorization: Bearer bs_…`) instead. A passkey sign-in's answer is never returned here (use signin/confirm).
23
+ * The `read_secret` create-verification-link returned for a request started with your site key. Without it such a request's `verification_token` / `signed_token` are never returned. A request your server started reads them with your secret key (`Authorization: Bearer bs_…`) instead. A passkey sign-in's answer is never returned here (use signin/confirm).
24
24
  */
25
25
  xBotShieldRequestSecret?: string | undefined;
26
26
  };
@@ -172,7 +172,7 @@ export type VerificationGetStatusGateType = OpenEnum<
172
172
  >;
173
173
 
174
174
  /**
175
- * 4.0: where the link stands on this request. Null on a plain check and on a link from before 4.0. A pass whose link is not live carries no destination.
175
+ * Where the link stands on this request. Null on a plain check and on a link from before 4.0. A pass whose link is not live carries no destination.
176
176
  */
177
177
  export const LinkState = {
178
178
  Pending: "pending",
@@ -181,7 +181,7 @@ export const LinkState = {
181
181
  Refused: "refused",
182
182
  } as const;
183
183
  /**
184
- * 4.0: where the link stands on this request. Null on a plain check and on a link from before 4.0. A pass whose link is not live carries no destination.
184
+ * Where the link stands on this request. Null on a plain check and on a link from before 4.0. A pass whose link is not live carries no destination.
185
185
  */
186
186
  export type LinkState = OpenEnum<typeof LinkState>;
187
187
 
@@ -270,15 +270,15 @@ export type VerificationGetStatusData = {
270
270
  */
271
271
  ageSource?: string | null | undefined;
272
272
  /**
273
- * 4.0: where the link stands on this request. Null on a plain check and on a link from before 4.0. A pass whose link is not live carries no destination.
273
+ * Where the link stands on this request. Null on a plain check and on a link from before 4.0. A pass whose link is not live carries no destination.
274
274
  */
275
275
  linkState?: LinkState | null | undefined;
276
276
  /**
277
- * 4.0: when a pending link expires (24 hours after the tap). Null unless `link_state` is `pending`.
277
+ * When a pending link expires (24 hours after the tap). Null unless `link_state` is `pending`.
278
278
  */
279
279
  linkExpiresAt?: Date | null | undefined;
280
280
  /**
281
- * 4.0: `link_pending` while the link waits for your server.
281
+ * `link_pending` while the link waits for your server.
282
282
  */
283
283
  linkCode?: string | undefined;
284
284
  linkMessage?: string | undefined;
package/src/sdk/census.ts CHANGED
@@ -61,7 +61,7 @@ export class Census extends ClientSDK {
61
61
  * Validate a verification token
62
62
  *
63
63
  * @remarks
64
- * Validates a BotShield attestation JWT — the primary server-side check. Attestations are ES256-signed; the public key is published at /.well-known/jwks.json (kid in the header), so you may also verify locally with any JWT library. Claims are anonymous by construction: the token attests the event, never the person. Each attestation is for one organization (aud = its organization_id; pass `audience` to enforce it) and one check: a repeat check is refused (`valid: false`, `replayed: true`). Check it once, on your server. Each token names its `kind` (`verification` or `action`) and the `environment` it was issued in. A token of any other kind is refused, and when you call with your secret key (`Authorization: Bearer bs_…`) a token from the other environment is refused (a development token never passes a production check). A refused token is not spent. 4.0: the check needs your secret key (`Authorization: Bearer bs_…`); without it the answer is `valid: false, code: secret_key_required` and the token is not spent. Send `expected_request_id` (the request your server made) and a token for any other request is refused (`code: request_mismatch`), unspent. A passkey sign-in's token is refused here: redeem a sign-in with signin/confirm.
64
+ * Validates a BotShield attestation JWT — the primary server-side check. Attestations are ES256-signed; the public key is published at /.well-known/jwks.json (kid in the header), so you may also verify locally with any JWT library. Claims are anonymous by construction: the token attests the event, never the person. Each attestation is for one organization (aud = its organization_id; pass `audience` to enforce it) and one check: a repeat check is refused (`valid: false`, `replayed: true`). Check it once, on your server. Each token names its `kind` (`verification` or `action`) and the `environment` it was issued in. A token of any other kind is refused, and when you call with your secret key (`Authorization: Bearer bs_…`) a token from the other environment is refused (a development token never passes a production check). A refused token is not spent. The check needs your secret key (`Authorization: Bearer bs_…`); without it the answer is `valid: false, code: secret_key_required` and the token is not spent. Send `expected_request_id` (the request your server made) and a token for any other request is refused (`code: request_mismatch`), unspent. A passkey sign-in's token is refused here: redeem a sign-in with signin/confirm.
65
65
  */
66
66
  async verifyToken(
67
67
  security: operations.SDKVerifyTokenSecurity,
@@ -168,7 +168,7 @@ export class Census extends ClientSDK {
168
168
  * Confirm a pending link
169
169
  *
170
170
  * @remarks
171
- * 4.0: on a key with “Pending until your server confirms” on, a link waits after the person's tap (account.link_pending). Confirm it from your server with your SECRET key, sending the account your own session shows. The same account makes the link live (account.link_live, account.secured) and returns the finished token on this response only. Another account is refused and the waiting link is dropped. A link not confirmed within 24 hours expires. You can also confirm by passing `partner_user_ref` to sdk/verify-token with your secret key.
171
+ * On a key with “Pending until your server confirms” on, a link waits after the person's tap (account.link_pending). Confirm it from your server with your SECRET key, sending the account your own session shows. The same account makes the link live (account.link_live, account.secured) and returns the finished token on this response only. Another account is refused and the waiting link is dropped. A link not confirmed within 24 hours expires. You can also confirm by passing `partner_user_ref` to sdk/verify-token with your secret key.
172
172
  */
173
173
  async confirmLink(
174
174
  security: operations.SDKConfirmLinkSecurity,
@@ -187,7 +187,7 @@ export class Census extends ClientSDK {
187
187
  * Send a request to verify by phone number
188
188
  *
189
189
  * @remarks
190
- * 4.0: from your server, with your SECRET key, send a request to verify to the person whose BotShield ID carries this phone number. BotShield keeps none of your customer data: the number is used once and is not stored, logged or returned. The answer is the same whether or not anyone holds the number: status `sent`, the request id, its expiry and a two-digit `match_number` — show it to your customer; they pick it in the BotShield app before their passkey. Outcomes arrive as webhooks (or verification/status with this key): verified, declined, or expired. A person who has not linked your company first sees an introduction from you; your request can be answered only after they allow it. Production sends need a verified business. Limits: a cap per key per hour and on unanswered sends per company.
190
+ * From your server, with your SECRET key, send a request to verify to the person whose BotShield ID carries this phone number. BotShield keeps none of your customer data: the number is used once and is not stored, logged or returned. The answer is the same whether or not anyone holds the number: status `sent`, the request id, its expiry and a two-digit `match_number` — show it to your customer; they pick it in the BotShield app before their passkey. Outcomes arrive as webhooks (or verification/status with this key): verified, declined, or expired. A person who has not linked your company first sees an introduction from you; your request can be answered only after they allow it. Production sends need a verified business. Limits: a cap per key per hour and on unanswered sends per company.
191
191
  */
192
192
  async sendByNumber(
193
193
  security: operations.SDKSendByNumberSecurity,
@@ -12,7 +12,7 @@ export class Verification extends ClientSDK {
12
12
  * Check verification status
13
13
  *
14
14
  * @remarks
15
- * Poll a verification request. Carries the signed attestation on completion and NO identity — no user_email, partner_user_id, auth_mode, or botshield_user_id ever cross this boundary. Called without a key, it is rate-limited per client address (a page polling every 2 seconds stays well inside it); over the limit the call is refused with HTTP 403 and `errors[0].code = "RATE_LIMITED"`. 4.0: knowing the request id is not enough to read the finished tokens. A request started with a site key returns them only with its `read_secret` (`X-BotShield-Request-Secret`); a request your server started, only to your secret key. A passkey sign-in's tokens are never returned here.
15
+ * Poll a verification request. Carries the signed attestation on completion and NO identity — no user_email, partner_user_id, auth_mode, or botshield_user_id ever cross this boundary. Called without a key, it is rate-limited per client address (a page polling every 2 seconds stays well inside it); over the limit the call is refused with HTTP 403 and `errors[0].code = "RATE_LIMITED"`. Knowing the request id is not enough to read the finished tokens. A request started with a site key returns them only with its `read_secret` (`X-BotShield-Request-Secret`); a request your server started, only to your secret key. A passkey sign-in's tokens are never returned here.
16
16
  */
17
17
  async getStatus(
18
18
  security: operations.VerificationGetStatusSecurity,