@zyphe-sdk/core 0.2.2 → 0.3.1

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/openapi.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "license": {
7
7
  "name": ""
8
8
  },
9
- "version": "0.1.9"
9
+ "version": "0.1.27"
10
10
  },
11
11
  "paths": {
12
12
  "/flows/{slug}/fullflow": {
@@ -292,9 +292,58 @@
292
292
  "name": "email",
293
293
  "in": "query",
294
294
  "description": "Email address of the user whose verification progress should be queried.",
295
- "required": true,
295
+ "required": false,
296
296
  "schema": {
297
- "type": "string"
297
+ "type": "string",
298
+ "nullable": true
299
+ }
300
+ },
301
+ {
302
+ "name": "credentialType",
303
+ "in": "query",
304
+ "description": "Credential type for wallet or external-ID based resolution (`WALLET` or `EXTERNAL_ID`).",
305
+ "required": false,
306
+ "schema": {
307
+ "allOf": [
308
+ {
309
+ "$ref": "#/components/schemas/CredentialType"
310
+ }
311
+ ],
312
+ "nullable": true
313
+ }
314
+ },
315
+ {
316
+ "name": "chain",
317
+ "in": "query",
318
+ "description": "Wallet chain. Required when `credentialType` is `WALLET`.",
319
+ "required": false,
320
+ "schema": {
321
+ "allOf": [
322
+ {
323
+ "$ref": "#/components/schemas/SiwxChain"
324
+ }
325
+ ],
326
+ "nullable": true
327
+ }
328
+ },
329
+ {
330
+ "name": "address",
331
+ "in": "query",
332
+ "description": "Wallet address. Required when `credentialType` is `WALLET`.",
333
+ "required": false,
334
+ "schema": {
335
+ "type": "string",
336
+ "nullable": true
337
+ }
338
+ },
339
+ {
340
+ "name": "externalId",
341
+ "in": "query",
342
+ "description": "External identifier. Required when `credentialType` is `EXTERNAL_ID`.",
343
+ "required": false,
344
+ "schema": {
345
+ "type": "string",
346
+ "nullable": true
298
347
  }
299
348
  },
300
349
  {
@@ -1867,6 +1916,30 @@
1867
1916
  "description": "The target flow ID to route to."
1868
1917
  }
1869
1918
  }
1919
+ },
1920
+ {
1921
+ "type": "object",
1922
+ "description": "Assign custom risk tags to the current flow result.\nTags are stored on the FlowResult and included in the next risk score computation.",
1923
+ "required": [
1924
+ "tag_ids",
1925
+ "actionType"
1926
+ ],
1927
+ "properties": {
1928
+ "actionType": {
1929
+ "type": "string",
1930
+ "enum": [
1931
+ "assignRiskTags"
1932
+ ]
1933
+ },
1934
+ "tag_ids": {
1935
+ "type": "array",
1936
+ "items": {
1937
+ "type": "string",
1938
+ "format": "uuid"
1939
+ },
1940
+ "description": "IDs of the RiskTagWeight rows (must belong to this org or be global)."
1941
+ }
1942
+ }
1870
1943
  }
1871
1944
  ],
1872
1945
  "description": "Configuration for an action node.\n\nEach variant represents a different action type with its specific configuration.",
@@ -2390,6 +2463,28 @@
2390
2463
  "SECRET"
2391
2464
  ]
2392
2465
  },
2466
+ "AssignedRiskTag": {
2467
+ "type": "object",
2468
+ "description": "A single custom risk tag that was assigned to a flow result by the flow builder.",
2469
+ "required": [
2470
+ "id",
2471
+ "tag",
2472
+ "weight"
2473
+ ],
2474
+ "properties": {
2475
+ "id": {
2476
+ "type": "string",
2477
+ "format": "uuid"
2478
+ },
2479
+ "tag": {
2480
+ "type": "string"
2481
+ },
2482
+ "weight": {
2483
+ "type": "number",
2484
+ "format": "double"
2485
+ }
2486
+ }
2487
+ },
2393
2488
  "AutoOneClickKycConfig": {
2394
2489
  "type": "object",
2395
2490
  "required": [
@@ -2525,6 +2620,11 @@
2525
2620
  "matchType"
2526
2621
  ],
2527
2622
  "properties": {
2623
+ "agentReasoning": {
2624
+ "type": "string",
2625
+ "description": "The AI agent's one-sentence explanation of why this match classification was chosen.\nPresent only when the agent was invoked (i.e. an LLM cross-check was performed).",
2626
+ "nullable": true
2627
+ },
2528
2628
  "catalogValue": {
2529
2629
  "type": "string",
2530
2630
  "description": "The value extracted from the company catalog API.",
@@ -2549,6 +2649,11 @@
2549
2649
  "type": "string",
2550
2650
  "description": "The user-submitted value for this field.",
2551
2651
  "nullable": true
2652
+ },
2653
+ "suggestedValue": {
2654
+ "type": "string",
2655
+ "description": "The canonical corrected value recommended by the AI agent.\nFor `Match` fields, `run_business_info_cross_check` automatically applies this value\nto the stored business information record (canonical normalization of an agreed value).\nFor `Fuzzy`, `Mismatch`, and `NotFound` fields it is surfaced to compliance officers\nfor manual review without mutating the stored record.",
2656
+ "nullable": true
2552
2657
  }
2553
2658
  }
2554
2659
  },
@@ -3015,6 +3120,35 @@
3015
3120
  }
3016
3121
  }
3017
3122
  },
3123
+ {
3124
+ "type": "object",
3125
+ "description": "Substring containment: true if the string at `field` contains `value` as a substring.\nBy default the comparison is case-insensitive (ASCII-lowercased).\nReturns false when the field is missing/null. Errors with\n`IncomparableTypes` when either side is not a string.",
3126
+ "required": [
3127
+ "field",
3128
+ "value",
3129
+ "op"
3130
+ ],
3131
+ "properties": {
3132
+ "case_sensitive": {
3133
+ "type": "boolean",
3134
+ "description": "Whether the match is case-sensitive. Defaults to `false`.",
3135
+ "nullable": true
3136
+ },
3137
+ "field": {
3138
+ "type": "string",
3139
+ "description": "Field path"
3140
+ },
3141
+ "op": {
3142
+ "type": "string",
3143
+ "enum": [
3144
+ "CONTAINS"
3145
+ ]
3146
+ },
3147
+ "value": {
3148
+ "$ref": "#/components/schemas/WorkflowValue"
3149
+ }
3150
+ }
3151
+ },
3018
3152
  {
3019
3153
  "type": "object",
3020
3154
  "description": "A literal boolean value (useful for testing or default branches)",
@@ -3059,6 +3193,7 @@
3059
3193
  "ALL",
3060
3194
  "IS_NULL",
3061
3195
  "IS_NOT_NULL",
3196
+ "CONTAINS",
3062
3197
  "LITERAL"
3063
3198
  ]
3064
3199
  },
@@ -3084,41 +3219,44 @@
3084
3219
  }
3085
3220
  },
3086
3221
  "CreateVerificationRequestPayload": {
3087
- "type": "object",
3088
- "required": [
3089
- "termsAndConditionsAccepted",
3090
- "privacyPolicyAccepted",
3091
- "cookiesPolicyAccepted"
3092
- ],
3093
- "properties": {
3094
- "continueUrl": {
3095
- "type": "string",
3096
- "nullable": true
3097
- },
3098
- "cookiesPolicyAccepted": {
3099
- "type": "boolean"
3222
+ "allOf": [
3223
+ {
3224
+ "$ref": "#/components/schemas/VerificationIdentifier"
3100
3225
  },
3101
- "customData": {
3226
+ {
3102
3227
  "type": "object",
3103
- "additionalProperties": {},
3104
- "nullable": true
3105
- },
3106
- "email": {
3107
- "type": "string",
3108
- "nullable": true
3109
- },
3110
- "flowStepId": {
3111
- "type": "string",
3112
- "format": "uuid",
3113
- "nullable": true
3114
- },
3115
- "privacyPolicyAccepted": {
3116
- "type": "boolean"
3117
- },
3118
- "termsAndConditionsAccepted": {
3119
- "type": "boolean"
3228
+ "required": [
3229
+ "termsAndConditionsAccepted",
3230
+ "privacyPolicyAccepted",
3231
+ "cookiesPolicyAccepted"
3232
+ ],
3233
+ "properties": {
3234
+ "continueUrl": {
3235
+ "type": "string",
3236
+ "nullable": true
3237
+ },
3238
+ "cookiesPolicyAccepted": {
3239
+ "type": "boolean"
3240
+ },
3241
+ "customData": {
3242
+ "type": "object",
3243
+ "additionalProperties": {},
3244
+ "nullable": true
3245
+ },
3246
+ "flowStepId": {
3247
+ "type": "string",
3248
+ "format": "uuid",
3249
+ "nullable": true
3250
+ },
3251
+ "privacyPolicyAccepted": {
3252
+ "type": "boolean"
3253
+ },
3254
+ "termsAndConditionsAccepted": {
3255
+ "type": "boolean"
3256
+ }
3257
+ }
3120
3258
  }
3121
- }
3259
+ ]
3122
3260
  },
3123
3261
  "CreateVerificationRequestResponse": {
3124
3262
  "type": "object",
@@ -3131,6 +3269,17 @@
3131
3269
  }
3132
3270
  }
3133
3271
  },
3272
+ "CredentialType": {
3273
+ "type": "string",
3274
+ "enum": [
3275
+ "PASSWORD",
3276
+ "MAGIC_LINK",
3277
+ "PASSKEY",
3278
+ "BOT_TOKEN",
3279
+ "WALLET",
3280
+ "EXTERNAL_ID"
3281
+ ]
3282
+ },
3134
3283
  "CustomDocumentConfig": {
3135
3284
  "type": "object",
3136
3285
  "required": [
@@ -3354,6 +3503,14 @@
3354
3503
  "documentTypesFilter": {
3355
3504
  "$ref": "#/components/schemas/DocumentTypeFilter"
3356
3505
  },
3506
+ "documentTypesFilterPerCountry": {
3507
+ "type": "object",
3508
+ "description": "Optional per-country overrides for the document-type filter.\n\nKeys are ISO 3166-1 alpha-2 country codes. When a country is present here, its\n`DocumentTypeFilter` fully overrides `document_types_filter` for that country\n(no union/intersection). An explicit empty entry rejects the country entirely\n(the country gate fails, not just the document-type gate).\n\nThe custom deserializer validates each key via `CountryInfo::from_any_country_code`\nand normalises the stored key to its `iso_alpha_2` upper-case form.",
3509
+ "additionalProperties": {
3510
+ "$ref": "#/components/schemas/DocumentTypeFilter"
3511
+ },
3512
+ "nullable": true
3513
+ },
3357
3514
  "enabledGovernmentProviders": {
3358
3515
  "type": "object",
3359
3516
  "additionalProperties": {
@@ -3500,6 +3657,11 @@
3500
3657
  "DOCUMENT_ALREADY_USED_BY_ANOTHER_USER",
3501
3658
  "DOCUMENT_FINGERPRINT_COMPUTATION",
3502
3659
  "SECURITY_CHECK_FAILED",
3660
+ "DOCUMENT_ALTERATION_DETECTED",
3661
+ "DOCUMENT_TAMPERING_DETECTED",
3662
+ "FAKE_DOCUMENT_DETECTED",
3663
+ "SCREEN_REPLAY_ATTACK_DETECTED",
3664
+ "PAPER_COPY_DETECTED",
3503
3665
  "DOCUMENT_SCORE_BELOW_THRESHOLD",
3504
3666
  "DOCUMENT_TYPE_NOT_DEFINED",
3505
3667
  "DOCUMENT_NOT_FOUND",
@@ -4036,6 +4198,13 @@
4036
4198
  "$ref": "#/components/schemas/AmlResult"
4037
4199
  }
4038
4200
  },
4201
+ "assignedRiskTags": {
4202
+ "type": "array",
4203
+ "items": {
4204
+ "$ref": "#/components/schemas/AssignedRiskTag"
4205
+ },
4206
+ "description": "Custom risk tags conditionally assigned by the flow builder's AssignRiskTags action."
4207
+ },
4039
4208
  "createdAt": {
4040
4209
  "type": "string",
4041
4210
  "format": "date-time",
@@ -4867,39 +5036,240 @@
4867
5036
  "FlowStepConfig": {
4868
5037
  "oneOf": [
4869
5038
  {
4870
- "$ref": "#/components/schemas/AutoOneClickKycConfig"
5039
+ "allOf": [
5040
+ {
5041
+ "$ref": "#/components/schemas/AutoOneClickKycConfig"
5042
+ },
5043
+ {
5044
+ "type": "object",
5045
+ "required": [
5046
+ "stepType"
5047
+ ],
5048
+ "properties": {
5049
+ "stepType": {
5050
+ "type": "string",
5051
+ "enum": [
5052
+ "AUTO_ONE_CLICK_KYC"
5053
+ ]
5054
+ }
5055
+ }
5056
+ }
5057
+ ]
4871
5058
  },
4872
5059
  {
4873
- "$ref": "#/components/schemas/DvConfig"
5060
+ "allOf": [
5061
+ {
5062
+ "$ref": "#/components/schemas/DvConfig"
5063
+ },
5064
+ {
5065
+ "type": "object",
5066
+ "required": [
5067
+ "stepType"
5068
+ ],
5069
+ "properties": {
5070
+ "stepType": {
5071
+ "type": "string",
5072
+ "enum": [
5073
+ "DV"
5074
+ ]
5075
+ }
5076
+ }
5077
+ }
5078
+ ]
4874
5079
  },
4875
5080
  {
4876
- "$ref": "#/components/schemas/FormConfig"
5081
+ "allOf": [
5082
+ {
5083
+ "$ref": "#/components/schemas/FormConfig"
5084
+ },
5085
+ {
5086
+ "type": "object",
5087
+ "required": [
5088
+ "stepType"
5089
+ ],
5090
+ "properties": {
5091
+ "stepType": {
5092
+ "type": "string",
5093
+ "enum": [
5094
+ "FORM"
5095
+ ]
5096
+ }
5097
+ }
5098
+ }
5099
+ ]
4877
5100
  },
4878
5101
  {
4879
- "$ref": "#/components/schemas/PoaConfig"
5102
+ "allOf": [
5103
+ {
5104
+ "$ref": "#/components/schemas/PoaConfig"
5105
+ },
5106
+ {
5107
+ "type": "object",
5108
+ "required": [
5109
+ "stepType"
5110
+ ],
5111
+ "properties": {
5112
+ "stepType": {
5113
+ "type": "string",
5114
+ "enum": [
5115
+ "POA"
5116
+ ]
5117
+ }
5118
+ }
5119
+ }
5120
+ ]
4880
5121
  },
4881
5122
  {
4882
- "$ref": "#/components/schemas/KybConfig"
5123
+ "allOf": [
5124
+ {
5125
+ "$ref": "#/components/schemas/KybConfig"
5126
+ },
5127
+ {
5128
+ "type": "object",
5129
+ "required": [
5130
+ "stepType"
5131
+ ],
5132
+ "properties": {
5133
+ "stepType": {
5134
+ "type": "string",
5135
+ "enum": [
5136
+ "KYB"
5137
+ ]
5138
+ }
5139
+ }
5140
+ }
5141
+ ]
4883
5142
  },
4884
5143
  {
4885
- "$ref": "#/components/schemas/WalletConfig"
5144
+ "allOf": [
5145
+ {
5146
+ "$ref": "#/components/schemas/WalletConfig"
5147
+ },
5148
+ {
5149
+ "type": "object",
5150
+ "required": [
5151
+ "stepType"
5152
+ ],
5153
+ "properties": {
5154
+ "stepType": {
5155
+ "type": "string",
5156
+ "enum": [
5157
+ "WALLET"
5158
+ ]
5159
+ }
5160
+ }
5161
+ }
5162
+ ]
4886
5163
  },
4887
5164
  {
4888
- "$ref": "#/components/schemas/LivenessConfig"
5165
+ "allOf": [
5166
+ {
5167
+ "$ref": "#/components/schemas/LivenessConfig"
5168
+ },
5169
+ {
5170
+ "type": "object",
5171
+ "required": [
5172
+ "stepType"
5173
+ ],
5174
+ "properties": {
5175
+ "stepType": {
5176
+ "type": "string",
5177
+ "enum": [
5178
+ "LIVENESS"
5179
+ ]
5180
+ }
5181
+ }
5182
+ }
5183
+ ]
4889
5184
  },
4890
5185
  {
4891
- "$ref": "#/components/schemas/DocumentSelectionConfig"
5186
+ "allOf": [
5187
+ {
5188
+ "$ref": "#/components/schemas/DocumentSelectionConfig"
5189
+ },
5190
+ {
5191
+ "type": "object",
5192
+ "required": [
5193
+ "stepType"
5194
+ ],
5195
+ "properties": {
5196
+ "stepType": {
5197
+ "type": "string",
5198
+ "enum": [
5199
+ "DOCUMENT_SELECTION"
5200
+ ]
5201
+ }
5202
+ }
5203
+ }
5204
+ ]
4892
5205
  },
4893
5206
  {
4894
- "$ref": "#/components/schemas/GeolocationConfig"
5207
+ "allOf": [
5208
+ {
5209
+ "$ref": "#/components/schemas/GeolocationConfig"
5210
+ },
5211
+ {
5212
+ "type": "object",
5213
+ "required": [
5214
+ "stepType"
5215
+ ],
5216
+ "properties": {
5217
+ "stepType": {
5218
+ "type": "string",
5219
+ "enum": [
5220
+ "GEOLOCATION"
5221
+ ]
5222
+ }
5223
+ }
5224
+ }
5225
+ ]
4895
5226
  },
4896
5227
  {
4897
- "$ref": "#/components/schemas/SpidConfig"
5228
+ "allOf": [
5229
+ {
5230
+ "$ref": "#/components/schemas/SpidConfig"
5231
+ },
5232
+ {
5233
+ "type": "object",
5234
+ "required": [
5235
+ "stepType"
5236
+ ],
5237
+ "properties": {
5238
+ "stepType": {
5239
+ "type": "string",
5240
+ "enum": [
5241
+ "SPID"
5242
+ ]
5243
+ }
5244
+ }
5245
+ }
5246
+ ]
4898
5247
  },
4899
5248
  {
4900
- "$ref": "#/components/schemas/PhoneConfig"
5249
+ "allOf": [
5250
+ {
5251
+ "$ref": "#/components/schemas/PhoneConfig"
5252
+ },
5253
+ {
5254
+ "type": "object",
5255
+ "required": [
5256
+ "stepType"
5257
+ ],
5258
+ "properties": {
5259
+ "stepType": {
5260
+ "type": "string",
5261
+ "enum": [
5262
+ "PHONE"
5263
+ ]
5264
+ }
5265
+ }
5266
+ }
5267
+ ]
4901
5268
  }
4902
- ]
5269
+ ],
5270
+ "discriminator": {
5271
+ "propertyName": "stepType"
5272
+ }
4903
5273
  },
4904
5274
  "FlowStepInfo": {
4905
5275
  "type": "object",
@@ -5767,13 +6137,37 @@
5767
6137
  },
5768
6138
  "GetNextStepPayload": {
5769
6139
  "type": "object",
5770
- "required": [
5771
- "email"
5772
- ],
5773
6140
  "properties": {
6141
+ "address": {
6142
+ "type": "string",
6143
+ "description": "Wallet address. Required when `credentialType` is `WALLET`.",
6144
+ "nullable": true
6145
+ },
6146
+ "chain": {
6147
+ "allOf": [
6148
+ {
6149
+ "$ref": "#/components/schemas/SiwxChain"
6150
+ }
6151
+ ],
6152
+ "nullable": true
6153
+ },
6154
+ "credentialType": {
6155
+ "allOf": [
6156
+ {
6157
+ "$ref": "#/components/schemas/CredentialType"
6158
+ }
6159
+ ],
6160
+ "nullable": true
6161
+ },
5774
6162
  "email": {
5775
6163
  "type": "string",
5776
- "description": "Email address of the user whose verification progress should be queried."
6164
+ "description": "Email address of the user whose verification progress should be queried.",
6165
+ "nullable": true
6166
+ },
6167
+ "externalId": {
6168
+ "type": "string",
6169
+ "description": "External identifier. Required when `credentialType` is `EXTERNAL_ID`.",
6170
+ "nullable": true
5777
6171
  }
5778
6172
  }
5779
6173
  },
@@ -5823,6 +6217,11 @@
5823
6217
  "identity"
5824
6218
  ],
5825
6219
  "properties": {
6220
+ "externalId": {
6221
+ "type": "string",
6222
+ "description": "External ID credential configured for this identity, if any.",
6223
+ "nullable": true
6224
+ },
5826
6225
  "identity": {
5827
6226
  "$ref": "#/components/schemas/Identity"
5828
6227
  },
@@ -5836,6 +6235,14 @@
5836
6235
  },
5837
6236
  "verificationRequest": {
5838
6237
  "$ref": "#/components/schemas/VerificationRequest"
6238
+ },
6239
+ "wallet": {
6240
+ "allOf": [
6241
+ {
6242
+ "$ref": "#/components/schemas/WalletIdentifierPayload"
6243
+ }
6244
+ ],
6245
+ "nullable": true
5839
6246
  }
5840
6247
  }
5841
6248
  },
@@ -7691,6 +8098,11 @@
7691
8098
  "format": "date-time",
7692
8099
  "nullable": true
7693
8100
  },
8101
+ "documentId": {
8102
+ "type": "string",
8103
+ "format": "uuid",
8104
+ "nullable": true
8105
+ },
7694
8106
  "flowResultId": {
7695
8107
  "type": "string",
7696
8108
  "format": "uuid"
@@ -7712,6 +8124,10 @@
7712
8124
  "type": "string",
7713
8125
  "format": "uuid"
7714
8126
  },
8127
+ "phoneNumberE164": {
8128
+ "type": "string",
8129
+ "nullable": true
8130
+ },
7715
8131
  "phoneNumberLast4": {
7716
8132
  "type": "string"
7717
8133
  },
@@ -8443,28 +8859,23 @@
8443
8859
  }
8444
8860
  },
8445
8861
  "SdkCreateVerificationRequestPayload": {
8446
- "type": "object",
8447
- "required": [
8448
- "email",
8449
- "flowStepId"
8450
- ],
8451
- "properties": {
8452
- "customData": {
8453
- "type": "object",
8454
- "description": "Arbitrary key-value metadata to attach to this verification request.",
8455
- "additionalProperties": {},
8456
- "nullable": true
8457
- },
8458
- "email": {
8459
- "type": "string",
8460
- "description": "Email address of the user being verified."
8862
+ "allOf": [
8863
+ {
8864
+ "$ref": "#/components/schemas/VerificationIdentifier"
8461
8865
  },
8462
- "flowStepId": {
8463
- "type": "string",
8464
- "format": "uuid",
8465
- "description": "The ID of the flow step to start or resume for this user."
8866
+ {
8867
+ "type": "object",
8868
+ "properties": {
8869
+ "customData": {
8870
+ "type": "object",
8871
+ "description": "Arbitrary key-value metadata to attach to this verification request.",
8872
+ "additionalProperties": {},
8873
+ "nullable": true
8874
+ }
8875
+ }
8466
8876
  }
8467
- }
8877
+ ],
8878
+ "description": "SDK payload for creating or resuming a verification request on behalf of a user.\n\nAt least one of `email` or `wallet` must be provided (enforced by [`VerificationIdentifier`]\nvalidation). Both may be provided simultaneously: wallet takes priority for `zid`, email is\nstored as a contact address."
8468
8879
  },
8469
8880
  "SdkCreateVerificationRequestResponse": {
8470
8881
  "type": "object",
@@ -8537,6 +8948,10 @@
8537
8948
  "liveness",
8538
8949
  "electronic_device",
8539
8950
  "black_and_white_copy",
8951
+ "document_alteration",
8952
+ "document_tampering",
8953
+ "fake_document",
8954
+ "paper_copy",
8540
8955
  "unknown"
8541
8956
  ]
8542
8957
  },
@@ -8561,6 +8976,11 @@
8561
8976
  "Settings": {
8562
8977
  "type": "object",
8563
8978
  "properties": {
8979
+ "askPasskeyCreation": {
8980
+ "type": "boolean",
8981
+ "description": "When true (default), prompt users to create a passkey during the verification flow.\nWhen false, skip the passkey creation step.\nOptional so that patch requests only write this field when explicitly provided.",
8982
+ "nullable": true
8983
+ },
8564
8984
  "createdAt": {
8565
8985
  "type": "string",
8566
8986
  "format": "date-time",
@@ -8581,6 +9001,11 @@
8581
9001
  "type": "boolean",
8582
9002
  "nullable": true
8583
9003
  },
9004
+ "oneClickAlwaysRequestUnlockVault": {
9005
+ "type": "boolean",
9006
+ "description": "When true (default), always require vault unlock for one-click KYC even if a grant already exists.\nWhen false, skip vault unlock if an active KYC grant already exists for the organization.\nOptional so that patch requests only write this field when explicitly provided.",
9007
+ "nullable": true
9008
+ },
8584
9009
  "primaryColor": {
8585
9010
  "type": "string",
8586
9011
  "nullable": true
@@ -8640,6 +9065,11 @@
8640
9065
  "SpidConfig": {
8641
9066
  "type": "object",
8642
9067
  "properties": {
9068
+ "documentSelectionStepId": {
9069
+ "type": "string",
9070
+ "format": "uuid",
9071
+ "description": "The ID of the `DocumentSelection` step that precedes this SPID step.\nMirrors the same field on [`DvConfig`] — makes the step link explicit and\nindependent of step ordering."
9072
+ },
8643
9073
  "labels": {
8644
9074
  "type": "object",
8645
9075
  "additionalProperties": {
@@ -8918,6 +9348,7 @@
8918
9348
  "validation_kyb_config_match",
8919
9349
  "validation_kyb_config_already_uses_this_kyc_flow_id",
8920
9350
  "validation_kyb_moderation_status_wrong",
9351
+ "validation_kyb_missing_required_documents",
8921
9352
  "validation_form_name_exists",
8922
9353
  "validation_database_error",
8923
9354
  "validation_flow_name_invalid",
@@ -8939,6 +9370,7 @@
8939
9370
  "validation_invite_to_self",
8940
9371
  "validation_e164_format",
8941
9372
  "validation_flow_step_already_has_reference",
9373
+ "validation_flow_step_config_invalid",
8942
9374
  "validation_flow_not_found",
8943
9375
  "validation_empty_parameter",
8944
9376
  "validation_form_not_found",
@@ -8975,6 +9407,74 @@
8975
9407
  }
8976
9408
  }
8977
9409
  },
9410
+ "VerificationIdentifier": {
9411
+ "type": "object",
9412
+ "description": "Identity fields shared by all verification-request creation payloads.\n\nAt least one of `email` or a [`VerificationIdentifierCredential::Wallet`] inside\n`credentials` must be provided — a wallet is the only credential that can form a\n`zid` without an email address.\n\nFlatten this into your payload struct with `#[serde(flatten)]` to keep the fields at\nthe top level of the JSON object — backward-compatible with callers that only send\n`email`.\n\n`MagicLink` is provisioned automatically by [`VerificationIdentifier::resolve`] for\nany email-bearing identity and does not need to be listed in `credentials`.",
9413
+ "properties": {
9414
+ "credentials": {
9415
+ "type": "array",
9416
+ "items": {
9417
+ "$ref": "#/components/schemas/VerificationIdentifierCredential"
9418
+ },
9419
+ "description": "Credentials to enable for this identity (e.g. wallet, magic-link).\nThe first `Wallet` entry determines the `zid`; all entries are provisioned on\nidentity creation."
9420
+ },
9421
+ "email": {
9422
+ "type": "string",
9423
+ "description": "Email address of the user. Used for notifications and as the `zid` when no wallet\ncredential is provided.",
9424
+ "nullable": true
9425
+ }
9426
+ }
9427
+ },
9428
+ "VerificationIdentifierCredential": {
9429
+ "oneOf": [
9430
+ {
9431
+ "type": "object",
9432
+ "description": "Wallet credential. The `zid` is derived as `\"CHAIN:address\"` when this is the\nfirst (or only) credential and no email is provided.",
9433
+ "required": [
9434
+ "chain",
9435
+ "address",
9436
+ "type"
9437
+ ],
9438
+ "properties": {
9439
+ "address": {
9440
+ "type": "string"
9441
+ },
9442
+ "chain": {
9443
+ "$ref": "#/components/schemas/SiwxChain"
9444
+ },
9445
+ "type": {
9446
+ "type": "string",
9447
+ "enum": [
9448
+ "WALLET"
9449
+ ]
9450
+ }
9451
+ }
9452
+ },
9453
+ {
9454
+ "type": "object",
9455
+ "description": "External identifier scoped to the calling organization.\nThe `organization_id` is always populated server-side and must never be\naccepted from untrusted client input.",
9456
+ "required": [
9457
+ "externalId",
9458
+ "type"
9459
+ ],
9460
+ "properties": {
9461
+ "externalId": {
9462
+ "type": "string"
9463
+ },
9464
+ "type": {
9465
+ "type": "string",
9466
+ "enum": [
9467
+ "EXTERNAL_ID"
9468
+ ]
9469
+ }
9470
+ }
9471
+ }
9472
+ ],
9473
+ "description": "A credential that can be provisioned via a verification-request creation payload.\n\nTagged with the same `type` discriminant strings as [`CredentialType`] so that\n`\"WALLET\"` / `\"EXTERNAL_ID\"` are consistent across the whole API surface.\n\nOnly the variants that carry public-API meaning are included here; internal\ncredentials such as `PASSWORD`, `PASSKEY`, `BOT_TOKEN`, and `MAGIC_LINK` are not\nexposed — `MAGIC_LINK` is always provisioned automatically by [`VerificationIdentifier::resolve`]\nfor any email-bearing identity.",
9474
+ "discriminator": {
9475
+ "propertyName": "type"
9476
+ }
9477
+ },
8978
9478
  "VerificationRequest": {
8979
9479
  "type": "object",
8980
9480
  "required": [
@@ -9279,6 +9779,22 @@
9279
9779
  }
9280
9780
  }
9281
9781
  },
9782
+ "WalletIdentifierPayload": {
9783
+ "type": "object",
9784
+ "description": "Blockchain wallet used as (or alongside) an email to identify a user.",
9785
+ "required": [
9786
+ "chain",
9787
+ "address"
9788
+ ],
9789
+ "properties": {
9790
+ "address": {
9791
+ "type": "string"
9792
+ },
9793
+ "chain": {
9794
+ "$ref": "#/components/schemas/SiwxChain"
9795
+ }
9796
+ }
9797
+ },
9282
9798
  "WalletResult": {
9283
9799
  "type": "object",
9284
9800
  "required": [