@raytio/types 7.0.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,6 +18,10 @@ import type { Schema } from "@raytio/types";
18
18
 
19
19
  Hovering over the type in VSCode will display documentation and available properties.
20
20
 
21
+ # Versioning
22
+
23
+ ⚠️ This package does not strictly follow semver, since every change to the type definitions is a breaking change.
24
+
21
25
  # Documentation
22
26
 
23
27
  ## Table of contents
@@ -27,11 +31,12 @@ Hovering over the type in VSCode will display documentation and available proper
27
31
  - [FieldVerification](enums/FieldVerification.md)
28
32
  - [POVerification](enums/POVerification.md)
29
33
 
30
- ### Type aliases
34
+ ### Type Aliases
31
35
 
32
36
  - [AA](#aa)
33
- - [AATags](#aatags)
37
+ - [AATag](#aatag)
34
38
  - [AId](#aid)
39
+ - [AnyId](#anyid)
35
40
  - [Colors](#colors)
36
41
  - [CommonSchemaAttributes](#commonschemaattributes)
37
42
  - [ConditionallyRequired](#conditionallyrequired)
@@ -41,6 +46,7 @@ Hovering over the type in VSCode will display documentation and available proper
41
46
  - [GId](#gid)
42
47
  - [IId](#iid)
43
48
  - [Instance](#instance)
49
+ - [LId](#lid)
44
50
  - [Lookup](#lookup)
45
51
  - [NId](#nid)
46
52
  - [OId](#oid)
@@ -68,9 +74,10 @@ Hovering over the type in VSCode will display documentation and available proper
68
74
  - [WebhookStatus](#webhookstatus)
69
75
  - [WizardConfig](#wizardconfig)
70
76
  - [WizardPage](#wizardpage)
77
+ - [WizardPageTag](#wizardpagetag)
71
78
  - [WrappedSchema](#wrappedschema)
72
79
 
73
- ## Type aliases
80
+ ## Type Aliases
74
81
 
75
82
  ### AA
76
83
 
@@ -81,7 +88,7 @@ Hovering over the type in VSCode will display documentation and available proper
81
88
  | Name | Type | Description |
82
89
  | :------ | :------ | :------ |
83
90
  | `a_id` | [`AId`](#aid) | - |
84
- | `aa_help?` | `string` | markdown or string help information including [phoneNumber || email] |
91
+ | `aa_help?` | `string` | markdown or string help information including [phoneNumber \|\| email] |
85
92
  | `aa_introduction?` | `string` | If a user signs up while completing this form, this message will be sent in the sign up email. |
86
93
  | `auth_list_enabled?` | `boolean` | if true, only specific email addresses can submit the form |
87
94
  | `callback_uri?` | `string`[] | - |
@@ -93,16 +100,16 @@ Hovering over the type in VSCode will display documentation and available proper
93
100
  | `ruleset?` | `unknown` | configuration for the submission rules |
94
101
  | `scopes?` | `string`[] | - |
95
102
  | `service_provider_n_id?` | [`NId`](#nid) | the n_id of the associated service provider |
96
- | `tags?` | [`AATags`](#aatags)[] | - |
97
- | `theme?` | `Object` | - |
103
+ | `tags?` | [`AATag`](#aatag)[] | - |
104
+ | `theme?` | { `colors?`: [`Colors`](#colors) ; `font?`: [`CustomFonts`](modules.md#customfonts) } | - |
98
105
  | `theme.colors?` | [`Colors`](#colors) | - |
99
106
  | `theme.font?` | [`CustomFonts`](#customfonts) | - |
100
107
 
101
108
  ___
102
109
 
103
- ### AATags
110
+ ### AATag
104
111
 
105
- Ƭ **AATags**: ``"type:client_only"`` \| ``"type:share_with_new_user"`` \| \`related\_service\_provider:n\_id:${NId}\` \| ``"ServiceProvider"``
112
+ Ƭ **AATag**: ``"type:client_only"`` \| ``"type:share_with_new_user"`` \| \`related\_service\_provider:n\_id:${NId}\` \| ``"ServiceProvider"``
106
113
 
107
114
  ___
108
115
 
@@ -110,7 +117,13 @@ ___
110
117
 
111
118
  Ƭ **AId**: `StringWithIdentity`<``"AId"``\>
112
119
 
113
- An `a_id` is the ID of an @see AA
120
+ An `a_id` is the ID of an [AA](#aa)
121
+
122
+ ___
123
+
124
+ ### AnyId
125
+
126
+ Ƭ **AnyId**: [`PId`](#pid) \| [`IId`](modules.md#iid) \| [`NId`](modules.md#nid) \| [`GId`](modules.md#gid) \| [`UId`](modules.md#uid) \| [`AId`](modules.md#aid) \| [`OId`](modules.md#oid) \| [`WId`](modules.md#wid)
114
127
 
115
128
  ___
116
129
 
@@ -158,22 +171,22 @@ not exported. Attributes that are identical in both client schema & server schem
158
171
  | Name | Type | Description |
159
172
  | :------ | :------ | :------ |
160
173
  | `description` | `string` | - |
161
- | `display?` | `Object` | - |
174
+ | `display?` | { `expand?`: { `fields`: `string`[] ; `label`: `string` }[] ; `head_main?`: { `fields`: `string`[] ; `format?`: `string` } ; `head_sub?`: { `fields`: `string`[] ; `format?`: `string` } } | - |
162
175
  | `display.expand?` | { `fields`: `string`[] ; `label`: `string` }[] | list of fields that should not be shown by default, unless you expand a collpase section which has a name from the label property. Array because there could be multiple expand groups |
163
- | `display.head_main?` | `Object` | list of fields to be considered the header/name of the PO fields joined with a space unless `format` format string is supplied |
176
+ | `display.head_main?` | { `fields`: `string`[] ; `format?`: `string` } | list of fields to be considered the header/name of the PO fields joined with a space unless `format` format string is supplied |
164
177
  | `display.head_main.fields` | `string`[] | - |
165
178
  | `display.head_main.format?` | `string` | - |
166
- | `display.head_sub?` | `Object` | list of fields to be considered the subheader of the PO fields joined with a space unless `format` format string is supplied |
179
+ | `display.head_sub?` | { `fields`: `string`[] ; `format?`: `string` } | list of fields to be considered the subheader of the PO fields joined with a space unless `format` format string is supplied |
167
180
  | `display.head_sub.fields` | `string`[] | - |
168
181
  | `display.head_sub.format?` | `string` | - |
169
- | `i18n?` | `Object` | - |
182
+ | `i18n?` | { `[locale: string]`: { `[fieldNameOrGroupName: string]`: [`ServerSchemaField`](#serverschemafield) & { `title_plural?`: `string` }; `$loading_create_sub_obj`: { `title`: `string` } ; `$loading_delete_pending_ver`: { `title`: `string` } ; `$loading_extract`: { `title`: `string` } ; `$loading_link_to_person`: { `title`: `string` } ; `$loading_pending_ver_resubmit`: { `title`: `string` } ; `$loading_permission`: { `title`: `string` } ; `$loading_save`: { `title`: `string` } ; `$loading_update`: { `title`: `string` } ; `$loading_upload`: { `title`: `string` } ; `$loading_verify`: { `title`: `string` } ; `$schema`: { `description?`: `string` ; `title`: `string` ; `title_plural?`: `string` } }; } | - |
170
183
  | `name` | `string` | these fields will always exist on schema |
171
- | `onboard_properties?` | `Object` | only the schema used for the onboarding wizard have this property |
184
+ | `onboard_properties?` | { `organizations?`: { `access_applications?`: { `links?`: { `description`: `string` ; `wizardConfig`: `Omit`<[`WizardConfig`](#wizardconfig), ``"a_id"``\> }[] ; `properties`: `Omit`<[`AA`](modules.md#aa), ``"org_id"``\> }[] ; `properties`: [`Organization`](modules.md#organization) }[] ; `profile_objects?`: { `properties`: `Record`<`string`, `unknown`\> ; `schema_name`: `string` }[] ; `relationships?`: { `from`: `string` ; `properties?`: `Record`<`string`, `string`\> ; `to`: `string` ; `type`: `string` }[] ; `return_to?`: `string` } | only the schema used for the onboarding wizard have this property |
172
185
  | `onboard_properties.organizations?` | { `access_applications?`: { `links?`: { `description`: `string` ; `wizardConfig`: `Omit`<[`WizardConfig`](#wizardconfig), ``"a_id"``\> }[] ; `properties`: `Omit`<[`AA`](modules.md#aa), ``"org_id"``\> }[] ; `properties`: [`Organization`](modules.md#organization) }[] | Organizations that should be created. NOTE: if multiple are specified, when the wizard completes, the _first one_ will be selected |
173
186
  | `onboard_properties.profile_objects?` | { `properties`: `Record`<`string`, `unknown`\> ; `schema_name`: `string` }[] | Profile Objects that should be created |
174
187
  | `onboard_properties.relationships?` | { `from`: `string` ; `properties?`: `Record`<`string`, `string`\> ; `to`: `string` ; `type`: `string` }[] | Relationships that should be created |
175
188
  | `onboard_properties.return_to?` | `string` | The relative path in the client to redirect to once finished. May include variables |
176
- | `relationships?` | { `anyOf?`: `string`[] ; `direction`: ``"from"`` ; `multiple?`: `boolean` ; `oneOf?`: `string`[] ; `properties?`: { [fieldName: string]: [`SchemaField`](#schemafield); } ; `relationship_name`: `string` ; `required?`: `string`[] ; `required_relationship?`: `boolean` ; `type`: `string` }[] | - |
189
+ | `relationships?` | { `anyOf?`: `string`[] ; `direction`: ``"from"`` ; `multiple?`: `boolean` ; `oneOf?`: `string`[] ; `properties?`: { `[fieldName: string]`: [`SchemaField`](#schemafield); } ; `relationship_name`: `string` ; `required?`: `string`[] ; `required_relationship?`: `boolean` ; `type`: `string` }[] | - |
177
190
  | `schema_group?` | `string` | the group that a schema belongs to, such as "passports". This is useful for forms that accept different types of similar documents. |
178
191
  | `tags?` | [`SchemaTag`](#schematag)[] | - |
179
192
  | `title` | `string` | - |
@@ -193,7 +206,7 @@ should be renamed since this applies to ConditionallyVerifiable
193
206
  | Name | Type |
194
207
  | :------ | :------ |
195
208
  | `field` | `string` |
196
- | `if` | `Object` |
209
+ | `if` | { `[fieldName: string]`: (`string` \| `number` \| `boolean`)[]; } |
197
210
 
198
211
  ___
199
212
 
@@ -230,11 +243,11 @@ ___
230
243
 
231
244
  | Name | Type |
232
245
  | :------ | :------ |
233
- | `encrypted_data` | `Object` |
246
+ | `encrypted_data` | { `algorithm`: `AesKeyAlgorithm` ; `data`: `string` ; `iv`: `string` } |
234
247
  | `encrypted_data.algorithm` | `AesKeyAlgorithm` |
235
248
  | `encrypted_data.data` | `string` |
236
249
  | `encrypted_data.iv` | `string` |
237
- | `encrypted_key` | `Object` |
250
+ | `encrypted_key` | { `encrypted_key`: `string` } |
238
251
  | `encrypted_key.encrypted_key` | `string` |
239
252
 
240
253
  ___
@@ -251,7 +264,7 @@ ___
251
264
 
252
265
  Ƭ **IId**: `StringWithIdentity`<``"IId"``\>
253
266
 
254
- An `i_id` is the ID of an @see Instance
267
+ An `i_id` is the ID of an [Instance](#instance)
255
268
 
256
269
  ___
257
270
 
@@ -263,14 +276,14 @@ ___
263
276
 
264
277
  | Name | Type | Description |
265
278
  | :------ | :------ | :------ |
266
- | `_state?` | [`SubmissionStatus`](#submissionstatus) | **`depreacted`** The status of a submission |
279
+ | `_state?` | [`SubmissionStatus`](#submissionstatus) | **`Deprecated`** The status of a submission |
267
280
  | `a_id` | [`AId`](#aid) | ID of the access application this submission was made to |
268
281
  | `aa_name` | `string` | name of the access application this submission was made to |
269
282
  | `confirmation_code` | `string` | Code that validates information has been shared |
270
283
  | `data_provider_email` | `string` | Email of user who shared the data |
271
284
  | `end_date` | `string` | Latest date in which the shared information was available |
272
285
  | `i_id` | [`IId`](#iid) | Access application instance ID |
273
- | `keys` | `Object` | - |
286
+ | `keys` | { `[nId: NId]`: { `[fieldName: string]`: { `data`: `string` ; `n_id`: [`NId`](#nid) }; }; } | - |
274
287
  | `previous_state` | [`SubmissionStatus`](#submissionstatus) | Previous status of the shared information |
275
288
  | `profile_objects` | [`ProfileObject`](#profileobject)[] | data associated is access application's instance |
276
289
  | `reference` | `string` | reference provided by the user who shared the data |
@@ -284,6 +297,14 @@ ___
284
297
 
285
298
  ___
286
299
 
300
+ ### LId
301
+
302
+ Ƭ **LId**: `StringWithIdentity`<``"LId"``\>
303
+
304
+ An `l_id` is the ID of any data stored in the KV-Store
305
+
306
+ ___
307
+
287
308
  ### Lookup
288
309
 
289
310
  Ƭ **Lookup**: `Object`
@@ -305,7 +326,7 @@ ___
305
326
 
306
327
  Ƭ **NId**: `StringWithIdentity`<``"NId"``\>
307
328
 
308
- An `n_id` is the ID of a @see ProfileObject
329
+ An `n_id` is the ID of a [ProfileObject](#profileobject)
309
330
 
310
331
  ___
311
332
 
@@ -313,7 +334,7 @@ ___
313
334
 
314
335
  Ƭ **OId**: `StringWithIdentity`<``"OId"``\>
315
336
 
316
- An `o_id` is the ID of an @see Organization
337
+ An `o_id` is the ID of an [Organization](#organization)
317
338
 
318
339
  ___
319
340
 
@@ -328,7 +349,7 @@ NOTE: this is different to how the schema defines an Organization. **The schema
328
349
 
329
350
  | Name | Type |
330
351
  | :------ | :------ |
331
- | `address` | `Object` |
352
+ | `address` | { `city`: `string` ; `country`: `string` ; `locationType`: `string` ; `region`: `string` ; `street1`: `string` ; `street2`: `string` } |
332
353
  | `address.city` | `string` |
333
354
  | `address.country` | `string` |
334
355
  | `address.locationType` | `string` |
@@ -346,7 +367,7 @@ ___
346
367
 
347
368
  Ƭ **PId**: `StringWithIdentity`<``"PId"``\>
348
369
 
349
- A `p_id` is the ID of a @see Relationship
370
+ A `p_id` is the ID of a [Relationship](#relationship)
350
371
 
351
372
  ___
352
373
 
@@ -374,17 +395,17 @@ ___
374
395
 
375
396
  ### Properties
376
397
 
377
- Ƭ **Properties**: `Object`
398
+ Ƭ **Properties**: `Json`
378
399
 
379
400
  arbitrary key-values pairs stored on a Profile Object.
380
- May contain nested JSON and @see Encrypted properties.
401
+ May contain nested JSON and [Encrypted](#encrypted) properties.
381
402
 
382
403
  There are some limits to field names: they cannot be called
383
404
  `__signature` nor can they include the character sequence `<=>`.
384
405
 
385
- #### Index signature
406
+ **`Deprecated`**
386
407
 
387
- [fieldName: `string`]: `any`
408
+ - use Json
388
409
 
389
410
  ___
390
411
 
@@ -392,7 +413,7 @@ ___
392
413
 
393
414
  Ƭ **RealVer**: `Object`
394
415
 
395
- This is what @raytio/core exposes, which is more useable than @see Verification
416
+ This is what @raytio/core exposes, which is more useable than [Verification](#verification)
396
417
 
397
418
  #### Type declaration
398
419
 
@@ -421,7 +442,7 @@ ___
421
442
  | :------ | :------ |
422
443
  | `end` | [`Urn`](#urn) |
423
444
  | `p_id` | [`PId`](#pid) |
424
- | `properties?` | `Object` |
445
+ | `properties?` | { `[fieldName: string]`: `unknown`; `name?`: `string` ; `p_id`: [`PId`](#pid) } |
425
446
  | `properties.name?` | `string` |
426
447
  | `properties.p_id` | [`PId`](#pid) |
427
448
  | `start` | [`Urn`](#urn) |
@@ -431,7 +452,7 @@ ___
431
452
 
432
453
  ### Schema
433
454
 
434
- Ƭ **Schema**: [`CommonSchemaAttributes`](#commonschemaattributes) & { `clientLocale?`: `string` ; `end_date?`: `string` ; `groupNames?`: `Record`<`string`, `string`\> ; `group_title?`: `string` ; `isProfileSchema?`: `boolean` ; `isSpSchema?`: `boolean` ; `properties`: { [fieldName: string]: [`SchemaField`](modules.md#schemafield); } ; `required?`: (`string` \| [`ConditionallyRequired`](modules.md#conditionallyrequired))[] ; `start_date?`: `string` ; `timing?`: `Record`<``"extract"`` \| ``"live_person"`` \| ``"verify_pending_delay"``, `number`\> ; `verified_fields?`: (`string` \| [`ConditionallyRequired`](modules.md#conditionallyrequired))[] ; `version`: `string` ; `wasExpandedByClient?`: `boolean` }
455
+ Ƭ **Schema**: [`CommonSchemaAttributes`](#commonschemaattributes) & { `clientLocale?`: `string` ; `end_date?`: `string` ; `groupNames?`: `Record`<`string`, `string`\> ; `group_title?`: `string` ; `isProfileSchema?`: `boolean` ; `isSpSchema?`: `boolean` ; `properties`: { `[fieldName: string]`: [`SchemaField`](modules.md#schemafield); } ; `required?`: (`string` \| [`ConditionallyRequired`](modules.md#conditionallyrequired))[] ; `start_date?`: `string` ; `timing?`: `Record`<``"extract"`` \| ``"live_person"`` \| ``"verify_pending_delay"``, `number`\> ; `verified_fields?`: (`string` \| [`ConditionallyRequired`](modules.md#conditionallyrequired))[] ; `version`: `string` ; `wasExpandedByClient?`: `boolean` }
435
456
 
436
457
  Raytio's variant of JSON Schema, as used by the client. It is a modified version
437
458
  of what the API returns.
@@ -446,7 +467,7 @@ ___
446
467
 
447
468
  | Name | Type | Description |
448
469
  | :------ | :------ | :------ |
449
- | `$id?` | `string` | **`deprecated`** don't use, it's inconsistent |
470
+ | `$id?` | `string` | **`Deprecated`** don't use, it's inconsistent |
450
471
  | `$ref?` | `string` | If this field refers to a sub-object |
451
472
  | `add_row_btn_label?` | `string` | if this field is a table input, this determines the text to show on the "Add Row" btn |
452
473
  | `allOf?` | [{ `$ref`: `string` }, [`ServerSchemaField`](#serverschemafield)] | - |
@@ -458,26 +479,28 @@ ___
458
479
  | `description?` | `string` | - |
459
480
  | `description_decorator?` | ``"md"`` | specifies that the description is formatted in markdown |
460
481
  | `encrypt?` | `boolean` | whether the field should be encrypted |
482
+ | `encrypt_require?` | `boolean` | if true, the user must have encryption enabled to save this data, see #1324 |
461
483
  | `enum?` | (`string` \| `number` \| `boolean`)[] | - |
462
484
  | `examples?` | `unknown`[] | - |
463
485
  | `format?` | ``"date"`` \| ``"date-time"`` \| ``"uri"`` | - |
464
486
  | `image_silhouette?` | `string` | If this schema requires a photo of a document, you can specify a URL to a silhouette image which will be overlaid on top of the camera. For best results, the image should have a transparent background + minimal white foreground |
465
- | `items?` | `Object` | `items` is used for nested arrays, (while `properties` is used for nested objects) |
466
- | `items.properties` | `Object` | - |
487
+ | `items?` | { `properties`: { `[subFieldName: string]`: [`SchemaField`](#schemafield); } ; `type`: [`DataTypes`](modules.md#datatypes) } | `items` is used for nested arrays, (while `properties` is used for nested objects) |
488
+ | `items.properties` | { `[subFieldName: string]`: [`SchemaField`](#schemafield); } | - |
467
489
  | `items.type` | [`DataTypes`](#datatypes) | - |
468
490
  | `lookup?` | `string` | URL to a JSON file in the `Lookup` format |
469
- | `maxLength?` | `number` | **`deprecated`** raytio's usage not documented |
470
- | `maximum?` | `number` | - |
471
- | `minLength?` | `number` | **`deprecated`** raytio's usage not documented |
472
- | `minimum?` | `number` | - |
473
- | `override?` | `Object` | - |
474
- | `override.permissions` | `Object` | - |
491
+ | `maxLength?` | `number` | **`Deprecated`** raytio's usage not documented |
492
+ | `maximum?` | `number` | for number inputs, the maximum allowed value |
493
+ | `minLength?` | `number` | **`Deprecated`** raytio's usage not documented |
494
+ | `minimum?` | `number` | for number inputs, the minimum allowed value |
495
+ | `override?` | { `permissions`: { `default`: `string` } } | - |
496
+ | `override.permissions` | { `default`: `string` } | - |
475
497
  | `override.permissions.default` | `string` | ideally this could be typed as `keyof typeof GROUPS` but the schemas aren't consistent and we have to assume it could be invalid. |
476
498
  | `pattern?` | `string` | - |
477
499
  | `patternMessage?` | `string` | if a `pattern` is specified, this is the error message |
478
500
  | `priority?` | `number` | - |
479
- | `properties?` | `Object` | `properties` is used for nested objects, (while `items` is used for nested arrays) |
501
+ | `properties?` | { `[subFieldName: string]`: [`SchemaField`](#schemafield); } | `properties` is used for nested objects, (while `items` is used for nested arrays) |
480
502
  | `readOnly?` | `boolean` | readOnly means the Wizard won't show this field |
503
+ | `step?` | `number` | for number inputs, the step size used in the input or slider |
481
504
  | `table_empty_message?` | `string` | if this field is a table input, this determines the text to show if the table is empty |
482
505
  | `tags?` | [`SchemaFieldTag`](#schemafieldtag)[] | - |
483
506
  | `title?` | `string` | - |
@@ -488,13 +511,13 @@ ___
488
511
 
489
512
  ### SchemaFieldTag
490
513
 
491
- Ƭ **SchemaFieldTag**: ``"password"`` \| \`group:${string}\` \| \`upload-group:${string}\` \| ``"display:stars"`` \| ``"display:no_autofill"`` \| ``"display:currency"`` \| ``"display:cascade"`` \| ``"display:survey"`` \| ``"display:quoting"`` \| ``"display:customModal"`` \| ``"display:terms_conditions"`` \| \`display:main\_media:${string}\` \| ``"date_component:day"`` \| ``"date_component:month"`` \| ``"date_component:year"`` \| ``"action:client_upload"`` \| ``"verify:show_if_pending"`` \| ``"special:hide_select_behind_button"`` \| ``"type:capture_geolocation"`` \| ``"type:extract_required"``
514
+ Ƭ **SchemaFieldTag**: ``"password"`` \| \`group:${string}\` \| \`upload-group:${string}\` \| ``"display:stars"`` \| ``"display:no_autofill"`` \| ``"display:currency"`` \| ``"display:cascade"`` \| ``"display:survey"`` \| ``"display:quoting"`` \| ``"display:customModal"`` \| \`display:replace:'${string}':'${string}'\` \| ``"display:terms_conditions"`` \| \`display:main\_media:${string}\` \| ``"date_component:day"`` \| ``"date_component:month"`` \| ``"date_component:year"`` \| ``"action:client_upload"`` \| ``"verify:show_if_pending"`` \| ``"special:hide_select_behind_button"`` \| ``"type:capture_geolocation"`` \| ``"type:extract_required"``
492
515
 
493
516
  ___
494
517
 
495
518
  ### SchemaTag
496
519
 
497
- Ƭ **SchemaTag**: ``"action:experimental_pass_object_store_id"`` \| ``"action:verify"`` \| ``"default_camera:rear"`` \| ``"default_camera:front"`` \| \`oauth2\_component:name:${string}\` \| \`oauth2\_component:redirect\_url:${string}\` \| \`link\_to:${string}:${string}\` \| ``"type:service_provider"`` \| ``"type:service_offer"`` \| ``"type:marketplace"`` \| ``"type:client_only"`` \| ``"type:globally_unique_field"``
520
+ Ƭ **SchemaTag**: ``"action:experimental_pass_object_store_id"`` \| ``"action:verify"`` \| ``"default_camera:rear"`` \| ``"default_camera:front"`` \| \`oauth2\_component:name:${string}\` \| \`oauth2\_component:redirect\_url:${string}\` \| \`time:${string}:${number}\` \| \`link\_to:${string}:${string}\` \| ``"type:service_provider"`` \| ``"type:service_offer"`` \| ``"type:marketplace"`` \| ``"type:client_only"`` \| ``"type:globally_unique_field"``
498
521
 
499
522
  ___
500
523
 
@@ -522,7 +545,7 @@ ___
522
545
 
523
546
  ### Urn
524
547
 
525
- Ƭ **Urn**: \`urn:${UrnNodeType}:${string}\`
548
+ Ƭ **Urn**: \`urn:${UrnNodeType}:${AnyId}\`
526
549
 
527
550
  e.g. "urn:user:..."
528
551
 
@@ -544,7 +567,7 @@ validation data returned by preVerify (part of the extract&map API)
544
567
 
545
568
  | Name | Type |
546
569
  | :------ | :------ |
547
- | `breakdown` | `Object` |
570
+ | `breakdown` | { `[category: string]`: { `code?`: `number` ; `passed`: `boolean` ; `reason?`: `string` ; `severity?`: ``"low"`` \| ``"medium"`` \| ``"high"`` }; } |
548
571
  | `score` | `number` |
549
572
  | `warning?` | `string`[] |
550
573
 
@@ -552,7 +575,7 @@ ___
552
575
 
553
576
  ### Verification
554
577
 
555
- Ƭ **Verification**<`WithValue`\>: [`ProfileObject`](#profileobject)<`Object`\>
578
+ Ƭ **Verification**<`WithValue`\>: [`ProfileObject`](#profileobject)<{ `field`: `string` ; `n_id`: [`NId`](modules.md#nid) ; `valid_until?`: `string` ; `verifications`: [{ `data`: [`VerificationPayload`](modules.md#verificationpayload)<`WithValue`\> ; `signature`: `string` }] }\>
556
579
 
557
580
  Different APIs inconsistently include the `value` prop. If you know it exists,
558
581
  use `Verification<true>`, otherwise just `Verification`. Verifications from
@@ -562,13 +585,13 @@ the DataContext don't have the value.
562
585
 
563
586
  | Name | Type |
564
587
  | :------ | :------ |
565
- | `WithValue` | extends `boolean```false`` |
588
+ | `WithValue` | extends `boolean` = ``false`` |
566
589
 
567
590
  ___
568
591
 
569
592
  ### VerificationPayload
570
593
 
571
- Ƭ **VerificationPayload**<`WithValue`\>: { `field`: `string` ; `metadata?`: `Record`<`string`, `unknown`\> ; `passed`: `boolean` ; `request_div`: `string` ; `schema?`: `string` ; `source`: `string` ; `source_hashed_n_id?`: [`NId`](#nid) ; `source_n_id?`: [`NId`](modules.md#nid) ; `type?`: ``null`` ; `v_id`: `string` ; `valid_until?`: `string` ; `verification_date`: `string` ; `verifier_div`: `string` ; `verifier_id?`: [`NId`](modules.md#nid) ; `verifier_service_id?`: [`NId`](modules.md#nid) ; `verifier_source_id?`: [`NId`](modules.md#nid) } & `WithValue` extends ``true`` ? { `value`: `string` \| `number` } : {}
594
+ Ƭ **VerificationPayload**<`WithValue`\>: { `field`: `string` ; `metadata?`: `Record`<`string`, `unknown`\> ; `passed`: `boolean` ; `request_div`: `string` ; `schema?`: `string` ; `source`: `string` ; `source_hashed_n_id?`: [`NId`](#nid) ; `source_n_id?`: [`NId`](modules.md#nid) ; `type?`: ``null`` ; `v_id`: `string` ; `verification_date`: `string` ; `verifier_div`: `string` ; `verifier_id?`: [`NId`](modules.md#nid) ; `verifier_service_id?`: [`NId`](modules.md#nid) ; `verifier_source_id?`: [`NId`](modules.md#nid) } & `WithValue` extends ``true`` ? { `value`: `string` \| `number` } : {}
572
595
 
573
596
  #### Type parameters
574
597
 
@@ -599,7 +622,7 @@ ___
599
622
 
600
623
  Ƭ **WId**: `StringWithIdentity`<``"WId"``\>
601
624
 
602
- A `wi_id` is the ID of a @see Webhook
625
+ A `wi_id` is the ID of a [Webhook](#webhook)
603
626
 
604
627
  ___
605
628
 
@@ -621,8 +644,8 @@ ___
621
644
  | `status` | [`WebhookStatus`](#webhookstatus) | - |
622
645
  | `subscribe_log?` | { `date`: `string` ; `response_payload`: `Json` ; `response_status_code`: `number` }[] | - |
623
646
  | `webhook_action` | { `webhook_action_type`: `string` }[] | - |
624
- | `webhook_field_mapping_schema` | `Object` | - |
625
- | `webhook_filter_schema` | `Object` | - |
647
+ | `webhook_field_mapping_schema` | { `[key: string]`: `string`; } | - |
648
+ | `webhook_filter_schema` | { `field_name`: `string` ; `field_value`: `string` ; `operator`: `string` } | - |
626
649
  | `webhook_filter_schema.field_name` | `string` | - |
627
650
  | `webhook_filter_schema.field_value` | `string` | - |
628
651
  | `webhook_filter_schema.operator` | `string` | - |
@@ -661,7 +684,7 @@ in the query parameters, it needs to be base64 and/or url encoded.
661
684
  | `review_text?` | `string` | the text on the WizardReview page |
662
685
  | `sharing_data_message?` | `string` | the loading message to show next to the spinner after the review screen |
663
686
  | `signature_schema?` | `string` | if specified, a Wizard will be shown on the review page with this schema |
664
- | `skip_share?` | `boolean` | **`deprecated`** added in !244 but never used |
687
+ | `skip_share?` | `boolean` | **`Deprecated`** added in !244 but never used |
665
688
  | `submit_text?` | `string` | the submit button label |
666
689
  | `terms_schema?` | `string` | if specified, a Wizard will be shown on the review page with this schema |
667
690
  | `update_reference?` | `boolean` | whether the user can change the reference, if there is one in the QP |
@@ -672,13 +695,14 @@ ___
672
695
 
673
696
  Ƭ **WizardPage**: `Object`
674
697
 
675
- configuration data for a single wizard page (@see WizardConfig)
698
+ configuration data for a single wizard page ([WizardConfig](#wizardconfig))
676
699
 
677
700
  #### Type declaration
678
701
 
679
702
  | Name | Type | Description |
680
703
  | :------ | :------ | :------ |
681
704
  | `allow_upload?` | `boolean` | do not allow uploading in ImageDynamicSection if this is explictly false |
705
+ | `branching_rule_name?` | `string` | If specified, this is is a "Conditional Wizard Page", which is only shown if the rule passed. This field contains the ID (not name) of the rule. |
682
706
  | `create_new_text?` | `string` | custom text to display on the Create New button |
683
707
  | `description?` | `string` | the fallback description, if there isn't one for the specific situation |
684
708
  | `description_create?` | `string` | - |
@@ -702,10 +726,17 @@ configuration data for a single wizard page (@see WizardConfig)
702
726
  | `reverify_header?` | `string` | custom text & header that's displayed on reverfication modal for expired PO |
703
727
  | `reverify_text?` | `string` | - |
704
728
  | `schemas` | `string`[] | - |
705
- | `selection_hierarchy_json?` | `string` | a URL to a preset for configuing NestedSchemaSelect. @see DeepConfig |
729
+ | `selection_hierarchy_json?` | `string` | a URL to a preset for configuing NestedSchemaSelect. DeepConfig |
706
730
  | `service_provider_link?` | `boolean` | see #463 |
707
731
  | `share?` | ``"profile"`` \| ``"verification"`` \| ``"both"`` | the information to share. undefined implies both. |
708
- | `verify_data?` | `boolean` | if `false`, ProfileObjects created while completing the form will not be verified. `undefined` implies `true` |
732
+ | `tags?` | [`WizardPageTag`](#wizardpagetag)[] | - |
733
+ | `verify_data?` | `boolean` | if `false`, ProfileObjects created while completing the form will not be verified. if `true`, you can only select ProfileObjects that are partially or fully verified. `undefined` implies `true`. **`Default`** ```ts true ``` |
734
+
735
+ ___
736
+
737
+ ### WizardPageTag
738
+
739
+ Ƭ **WizardPageTag**: ``"action:require_chip"``
709
740
 
710
741
  ___
711
742
 
@@ -722,8 +753,8 @@ This is what's returned by the API
722
753
  | `active` | ``true`` | - |
723
754
  | `end_date` | `string` | ISO Date. If this tag exists, the schema is deprecated. |
724
755
  | `name` | `string` | - |
725
- | `schema` | [`CommonSchemaAttributes`](#commonschemaattributes) & { `$id?`: `string` ; `$schema?`: `string` ; `allOf?`: { `$ref?`: `string` ; `if?`: `Partial`<[`WrappedSchema`](modules.md#wrappedschema)[``"schema"``]\> ; `then?`: `Partial`<[`WrappedSchema`](modules.md#wrappedschema)[``"schema"``]\> }[] ; `definitions?`: `Record`<`string`, `Object`\> ; `properties`: { [fieldName: string]: [`ServerSchemaField`](modules.md#serverschemafield); } ; `required?`: `string`[] ; `verified_fields?`: `string`[] } | - |
756
+ | `schema` | [`CommonSchemaAttributes`](#commonschemaattributes) & { `$id?`: `string` ; `$schema?`: `string` ; `allOf?`: { `$ref?`: `string` ; `if?`: `Partial`<[`WrappedSchema`](modules.md#wrappedschema)[``"schema"``]\> ; `then?`: `Partial`<[`WrappedSchema`](modules.md#wrappedschema)[``"schema"``]\> }[] ; `definitions?`: `Record`<`string`, { `$ref`: [`Urn`](modules.md#urn) }\> ; `properties`: { `[fieldName: string]`: [`ServerSchemaField`](modules.md#serverschemafield); } ; `required?`: `string`[] ; `verified_fields?`: `string`[] } | - |
726
757
  | `start_date` | `string` | ISO Date |
727
758
  | `type` | ``"ss"`` \| ``"ps"`` \| ``"us"`` | - |
728
759
  | `version` | `string` | - |
729
- | `version_current` | `boolean` | whether the \`version\` is the latest version |
760
+ | `version_current` | `boolean` | whether the `version` is the latest version |
package/dist/crypto.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
13
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
- exports.__esModule = true;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./crypto"), exports);
18
18
  __exportStar(require("./raytio"), exports);
19
19
  __exportStar(require("./schema"), exports);
package/dist/raytio.d.ts CHANGED
@@ -6,22 +6,24 @@ export type StringWithIdentity<T> = string & {
6
6
  };
7
7
  /** @internal */
8
8
  type Json = Record<string, any>;
9
- /** A `p_id` is the ID of a @see Relationship */
9
+ /** A `p_id` is the ID of a {@link Relationship} */
10
10
  export type PId = StringWithIdentity<"PId">;
11
- /** An `i_id` is the ID of an @see Instance */
11
+ /** An `i_id` is the ID of an {@link Instance} */
12
12
  export type IId = StringWithIdentity<"IId">;
13
- /** An `n_id` is the ID of a @see ProfileObject */
13
+ /** An `n_id` is the ID of a {@link ProfileObject} */
14
14
  export type NId = StringWithIdentity<"NId">;
15
15
  /** A `g_id` is the ID of a group */
16
16
  export type GId = StringWithIdentity<"GId">;
17
17
  /** A `u_id` is the ID of a user */
18
18
  export type UId = StringWithIdentity<"UId">;
19
- /** An `a_id` is the ID of an @see AA */
19
+ /** An `a_id` is the ID of an {@link AA} */
20
20
  export type AId = StringWithIdentity<"AId">;
21
- /** An `o_id` is the ID of an @see Organization */
21
+ /** An `o_id` is the ID of an {@link Organization} */
22
22
  export type OId = StringWithIdentity<"OId">;
23
- /** A `wi_id` is the ID of a @see Webhook */
23
+ /** A `wi_id` is the ID of a {@link Webhook} */
24
24
  export type WId = StringWithIdentity<"WId">;
25
+ /** An `l_id` is the ID of any data stored in the KV-Store */ export type LId = StringWithIdentity<"LId">;
26
+ export type AnyId = PId | IId | NId | GId | UId | AId | OId | WId;
25
27
  export type DataTypes = "string" | "number" | "boolean" | "object" | "integer" | "array" | "null";
26
28
  export type SubmissionStatus = "Submitted" | "Processing" | "Rejected" | "Expired" | "Completed" | "DataChanged" | "Received" | "Accepted";
27
29
  /** You can supply an option type argument if you know exactly what the properties will be */
@@ -50,17 +52,17 @@ export type ProfileObjectForUpload<Properties = Json> = {
50
52
  };
51
53
  /**
52
54
  * arbitrary key-values pairs stored on a Profile Object.
53
- * May contain nested JSON and @see Encrypted properties.
55
+ * May contain nested JSON and {@link Encrypted} properties.
54
56
  *
55
57
  * There are some limits to field names: they cannot be called
56
58
  * `__signature` nor can they include the character sequence `<=>`.
59
+ *
60
+ * @deprecated - use {@link Json}
57
61
  */
58
- export type Properties = {
59
- [fieldName: string]: any;
60
- };
62
+ export type Properties = Json;
61
63
  export type UrnNodeType = "user" | "profile_object" | "instance" | "schema" | "temp_object" | "document";
62
64
  /** e.g. "urn:user:..." */
63
- export type Urn = `urn:${UrnNodeType}:${string}`;
65
+ export type Urn = `urn:${UrnNodeType}:${AnyId}`;
64
66
  export type Relationship = {
65
67
  start: Urn;
66
68
  end: Urn;
@@ -82,7 +84,7 @@ export type Lookup = {
82
84
  /** used in AkahuDynamicSection only */
83
85
  requires_2FA?: boolean;
84
86
  };
85
- export type AATags = "type:client_only" | "type:share_with_new_user" | `related_service_provider:n_id:${NId}` | "ServiceProvider";
87
+ export type AATag = "type:client_only" | "type:share_with_new_user" | `related_service_provider:n_id:${NId}` | "ServiceProvider";
86
88
  export type AA = {
87
89
  a_id: AId;
88
90
  name: string;
@@ -93,7 +95,7 @@ export type AA = {
93
95
  /** Easy to use AA logo url for pasting inot emails */
94
96
  picture_url?: string;
95
97
  scopes?: string[];
96
- tags?: AATags[];
98
+ tags?: AATag[];
97
99
  callback_uri?: string[];
98
100
  /** markdown or string help information including [phoneNumber || email] */
99
101
  aa_help?: string;
@@ -132,7 +134,7 @@ export type Instance = {
132
134
  start_date: string;
133
135
  /** The status of a submission */
134
136
  state: SubmissionStatus;
135
- /** @depreacted The status of a submission */
137
+ /** @deprecated The status of a submission */
136
138
  _state?: SubmissionStatus;
137
139
  /** Previous status of the shared information */
138
140
  previous_state: SubmissionStatus;
@@ -143,7 +145,7 @@ export type Instance = {
143
145
  /** data associated is access application's instance */
144
146
  profile_objects: ProfileObject[];
145
147
  keys: {
146
- [nId: string]: {
148
+ [nId: NId]: {
147
149
  [fieldName: string]: {
148
150
  data: string;
149
151
  n_id: NId;
package/dist/raytio.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/schema.d.ts CHANGED
@@ -7,8 +7,8 @@ export type ConditionallyRequired = {
7
7
  [fieldName: string]: (string | number | boolean)[];
8
8
  };
9
9
  };
10
- export type SchemaFieldTag = "password" | `group:${string}` | `upload-group:${string}` | "display:stars" | "display:no_autofill" | "display:currency" | "display:cascade" | "display:survey" | "display:quoting" | "display:customModal" | "display:terms_conditions" | `display:main_media:${string}` | "date_component:day" | "date_component:month" | "date_component:year" | "action:client_upload" | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:capture_geolocation" | "type:extract_required";
11
- export type SchemaTag = "action:experimental_pass_object_store_id" | "action:verify" | "default_camera:rear" | "default_camera:front" | `oauth2_component:name:${string}` | `oauth2_component:redirect_url:${string}` | `link_to:${string}:${string}` | "type:service_provider" | "type:service_offer" | "type:marketplace" | "type:client_only" | "type:globally_unique_field";
10
+ export type SchemaFieldTag = "password" | `group:${string}` | `upload-group:${string}` | "display:stars" | "display:no_autofill" | "display:currency" | "display:cascade" | "display:survey" | "display:quoting" | "display:customModal" | `display:replace:'${string}':'${string}'` | "display:terms_conditions" | `display:main_media:${string}` | "date_component:day" | "date_component:month" | "date_component:year" | "action:client_upload" | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:capture_geolocation" | "type:extract_required";
11
+ export type SchemaTag = "action:experimental_pass_object_store_id" | "action:verify" | "default_camera:rear" | "default_camera:front" | `oauth2_component:name:${string}` | `oauth2_component:redirect_url:${string}` | `time:${string}:${number}` | `link_to:${string}:${string}` | "type:service_provider" | "type:service_offer" | "type:marketplace" | "type:client_only" | "type:globally_unique_field";
12
12
  export type SchemaField = {
13
13
  /** @deprecated don't use, it's inconsistent */
14
14
  $id?: string;
@@ -21,8 +21,14 @@ export type SchemaField = {
21
21
  tags?: SchemaFieldTag[];
22
22
  type?: DataTypes;
23
23
  enum?: (string | number | boolean)[];
24
+ /** for number inputs, the maximum allowed value */
24
25
  maximum?: number;
26
+ /** for number inputs, the minimum allowed value */
25
27
  minimum?: number;
28
+ /** for number inputs, the step size used in the input or slider */
29
+ step?: number;
30
+ /** if true, the user must have encryption enabled to save this data, see #1324 */
31
+ encrypt_require?: boolean;
26
32
  /** @deprecated raytio's usage not documented */
27
33
  maxLength?: number;
28
34
  /** @deprecated raytio's usage not documented */
@@ -250,9 +256,9 @@ export type Schema = CommonSchemaAttributes & {
250
256
  required?: (string | ConditionallyRequired)[];
251
257
  /** added by client */
252
258
  wasExpandedByClient?: boolean;
253
- /** ISO Date. Copied from @see WrappedSchema */
259
+ /** ISO Date. Copied from {@link WrappedSchema} */
254
260
  start_date?: string;
255
- /** ISO Date. Copied from @see WrappedSchema If this tag exists, the schema is deprecated */
261
+ /** ISO Date. Copied from {@link WrappedSchema} If this tag exists, the schema is deprecated */
256
262
  end_date?: string;
257
263
  /** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
258
264
  properties: {
@@ -262,7 +268,7 @@ export type Schema = CommonSchemaAttributes & {
262
268
  groupNames?: Record<string, string>;
263
269
  /** added by the client to inform downstream components which locale from schema.i18n was used */
264
270
  clientLocale?: string;
265
- /** added by the client, copied from @see WrappedSchema */
271
+ /** added by the client, copied from {@link WrappedSchema} */
266
272
  version: string;
267
273
  /**
268
274
  * the estimated loading times in seconds for various API calls. The client adds
package/dist/schema.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/theme.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -18,8 +18,6 @@ export type VerificationPayload<WithValue extends boolean> = {
18
18
  verifier_source_id?: NId;
19
19
  verifier_service_id?: NId;
20
20
  verifier_div: string;
21
- /** ISO Date */
22
- valid_until?: string;
23
21
  } & (WithValue extends true ? {
24
22
  value: string | number;
25
23
  } : {});
@@ -71,7 +69,7 @@ export type VerificationProvider = {
71
69
  /** the date which the verification was verified on, or last re-verified on */
72
70
  date?: Date;
73
71
  };
74
- /** This is what @raytio/core exposes, which is more useable than @see Verification */
72
+ /** This is what @raytio/core exposes, which is more useable than {@link Verification} */
75
73
  export type RealVer = {
76
74
  fieldName: string;
77
75
  value: unknown;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.POVerification = exports.FieldVerification = void 0;
4
4
  /**
5
5
  * "Not Verified" means show no badge, cf. "Verified False" means the
package/dist/wizard.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AId } from "./raytio";
2
- /** configuration data for a single wizard page (@see WizardConfig) */
2
+ export type WizardPageTag = "action:require_chip";
3
+ /** configuration data for a single wizard page ({@link WizardConfig}) */
3
4
  export type WizardPage = {
4
5
  /** if undefined, the schema title will be used */
5
6
  name?: string | symbol;
@@ -20,7 +21,7 @@ export type WizardPage = {
20
21
  service_provider_link?: boolean;
21
22
  /** custom text to display on the Create New button */
22
23
  create_new_text?: string;
23
- /** a URL to a preset for configuing NestedSchemaSelect. @see DeepConfig */
24
+ /** a URL to a preset for configuing NestedSchemaSelect. {@link DeepConfig} */
24
25
  selection_hierarchy_json?: string;
25
26
  /** whether the schema description should be shown */
26
27
  display_schema_description?: boolean;
@@ -43,7 +44,12 @@ export type WizardPage = {
43
44
  extract_threshold_fail_action?: "capture" | "capture_review" | "recapture_or_next_step" | "review" | "next_step";
44
45
  /** for ImageDynamicSection, the action to take if the API returns no `validation: {}` object */
45
46
  extract_threshold_null_action?: WizardPage["extract_threshold_fail_action"];
46
- /** if `false`, ProfileObjects created while completing the form will not be verified. `undefined` implies `true` */
47
+ /**
48
+ * if `false`, ProfileObjects created while completing the form will not be verified.
49
+ * if `true`, you can only select ProfileObjects that are partially or fully verified.
50
+ * `undefined` implies `true`.
51
+ * @default true
52
+ */
47
53
  verify_data?: boolean;
48
54
  /** a list of fields that should not be required, even if the schema says they're required */
49
55
  optional_fields?: string[];
@@ -51,6 +57,12 @@ export type WizardPage = {
51
57
  share?: "profile" | "verification" | "both";
52
58
  /** can you force the colour theme to change for just one page (#1066, #1074). At the moment this on pages that use WebcamImageCapture */
53
59
  display_mode?: "light" | "dark" | "default";
60
+ tags?: WizardPageTag[];
61
+ /**
62
+ * If specified, this is is a "Conditional Wizard Page", which is only shown
63
+ * if the rule passed. This field contains the ID (not name) of the rule.
64
+ */
65
+ branching_rule_name?: string;
54
66
  };
55
67
  /**
56
68
  * when a form link is generated, this is what gets saved on the API.
package/dist/wizard.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raytio/types",
3
- "version": "7.0.0",
3
+ "version": "7.1.0",
4
4
  "license": "MIT",
5
5
  "main": "index",
6
6
  "types": "index",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "docs": "sh ../../scripts/generate-docs.sh",
15
- "test": "npm run build",
15
+ "test": "npm run build && yarn docs",
16
16
  "build": "tsc && rimraf dist/__tests__"
17
17
  }
18
18
  }
@@ -1,4 +1,4 @@
1
- /* eslint-disable fp/no-let, @typescript-eslint/no-unused-vars */
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
2
  import { Schema, SchemaField, WrappedSchema } from "..";
3
3
 
4
4
  /**
package/src/raytio.ts CHANGED
@@ -7,22 +7,26 @@ export type StringWithIdentity<T> = string & { $$typeof$$: T };
7
7
  /** @internal */
8
8
  type Json = Record<string, any>; // TODO: (semver breaking) unknown
9
9
 
10
- /** A `p_id` is the ID of a @see Relationship */
10
+ /** A `p_id` is the ID of a {@link Relationship} */
11
11
  export type PId = StringWithIdentity<"PId">;
12
- /** An `i_id` is the ID of an @see Instance */
12
+ /** An `i_id` is the ID of an {@link Instance} */
13
13
  export type IId = StringWithIdentity<"IId">;
14
- /** An `n_id` is the ID of a @see ProfileObject */
14
+ /** An `n_id` is the ID of a {@link ProfileObject} */
15
15
  export type NId = StringWithIdentity<"NId">;
16
16
  /** A `g_id` is the ID of a group */
17
17
  export type GId = StringWithIdentity<"GId">;
18
18
  /** A `u_id` is the ID of a user */
19
19
  export type UId = StringWithIdentity<"UId">;
20
- /** An `a_id` is the ID of an @see AA */
20
+ /** An `a_id` is the ID of an {@link AA} */
21
21
  export type AId = StringWithIdentity<"AId">;
22
- /** An `o_id` is the ID of an @see Organization */
22
+ /** An `o_id` is the ID of an {@link Organization} */
23
23
  export type OId = StringWithIdentity<"OId">;
24
- /** A `wi_id` is the ID of a @see Webhook */
24
+ /** A `wi_id` is the ID of a {@link Webhook} */
25
25
  export type WId = StringWithIdentity<"WId">;
26
+ /** An `l_id` is the ID of any data stored in the KV-Store */ // e.g. StoredWizardConfig and VerBundleMetadata
27
+ export type LId = StringWithIdentity<"LId">;
28
+
29
+ export type AnyId = PId | IId | NId | GId | UId | AId | OId | WId;
26
30
 
27
31
  export type DataTypes =
28
32
  | "string"
@@ -74,14 +78,14 @@ export type ProfileObjectForUpload<Properties = Json> = {
74
78
 
75
79
  /**
76
80
  * arbitrary key-values pairs stored on a Profile Object.
77
- * May contain nested JSON and @see Encrypted properties.
81
+ * May contain nested JSON and {@link Encrypted} properties.
78
82
  *
79
83
  * There are some limits to field names: they cannot be called
80
84
  * `__signature` nor can they include the character sequence `<=>`.
85
+ *
86
+ * @deprecated - use {@link Json}
81
87
  */
82
- export type Properties = {
83
- [fieldName: string]: any; // TODO: (semver breaking) unknown
84
- };
88
+ export type Properties = Json;
85
89
 
86
90
  export type UrnNodeType =
87
91
  | "user"
@@ -92,7 +96,7 @@ export type UrnNodeType =
92
96
  | "document";
93
97
 
94
98
  /** e.g. "urn:user:..." */
95
- export type Urn = `urn:${UrnNodeType}:${string}`; // TODO: TS4.3 replace `string` with `IId | NId | GId | UId | AId`
99
+ export type Urn = `urn:${UrnNodeType}:${AnyId}`;
96
100
 
97
101
  export type Relationship = {
98
102
  start: Urn;
@@ -118,7 +122,7 @@ export type Lookup = {
118
122
  requires_2FA?: boolean;
119
123
  };
120
124
 
121
- export type AATags =
125
+ export type AATag =
122
126
  | "type:client_only"
123
127
  | "type:share_with_new_user"
124
128
  // heritage
@@ -135,7 +139,7 @@ export type AA = {
135
139
  /** Easy to use AA logo url for pasting inot emails */
136
140
  picture_url?: string;
137
141
  scopes?: string[];
138
- tags?: AATags[];
142
+ tags?: AATag[];
139
143
  callback_uri?: string[];
140
144
  /** markdown or string help information including [phoneNumber || email] */
141
145
  aa_help?: string;
@@ -179,7 +183,7 @@ export type Instance = {
179
183
  start_date: string;
180
184
  /** The status of a submission */
181
185
  state: SubmissionStatus;
182
- /** @depreacted The status of a submission */
186
+ /** @deprecated The status of a submission */
183
187
  _state?: SubmissionStatus;
184
188
  /** Previous status of the shared information */
185
189
  previous_state: SubmissionStatus;
@@ -191,8 +195,7 @@ export type Instance = {
191
195
  profile_objects: ProfileObject[];
192
196
  // TODO: (semver breaking) mark as optional since the get-shared-data API doesn't return keys
193
197
  keys: {
194
- // TODO: TS4.3 use `NId` instead of `string`
195
- [nId: string]: {
198
+ [nId: NId]: {
196
199
  [fieldName: string]: {
197
200
  data: string;
198
201
  n_id: NId;
package/src/schema.ts CHANGED
@@ -24,6 +24,7 @@ export type SchemaFieldTag =
24
24
  | "display:survey"
25
25
  | "display:quoting"
26
26
  | "display:customModal"
27
+ | `display:replace:'${string}':'${string}'`
27
28
  | "display:terms_conditions"
28
29
  | `display:main_media:${string}` // property name to determine what image to display
29
30
  // date picker components
@@ -48,6 +49,7 @@ export type SchemaTag =
48
49
  | `oauth2_component:name:${string}`
49
50
  | `oauth2_component:redirect_url:${string}`
50
51
  // misc
52
+ | `time:${/* type */ string}:${/* seconds */ number}`
51
53
  | `link_to:${/* schemaName */ string}:${/* relationshipType */ string}`
52
54
  // type
53
55
  | "type:service_provider"
@@ -68,8 +70,14 @@ export type SchemaField = {
68
70
  tags?: SchemaFieldTag[];
69
71
  type?: DataTypes;
70
72
  enum?: (string | number | boolean)[];
73
+ /** for number inputs, the maximum allowed value */
71
74
  maximum?: number;
75
+ /** for number inputs, the minimum allowed value */
72
76
  minimum?: number;
77
+ /** for number inputs, the step size used in the input or slider */
78
+ step?: number;
79
+ /** if true, the user must have encryption enabled to save this data, see #1324 */
80
+ encrypt_require?: boolean;
73
81
  /** @deprecated raytio's usage not documented */
74
82
  maxLength?: number;
75
83
  /** @deprecated raytio's usage not documented */
@@ -296,9 +304,9 @@ export type Schema = CommonSchemaAttributes & {
296
304
  /** added by client */
297
305
  wasExpandedByClient?: boolean;
298
306
 
299
- /** ISO Date. Copied from @see WrappedSchema */
307
+ /** ISO Date. Copied from {@link WrappedSchema} */
300
308
  start_date?: string;
301
- /** ISO Date. Copied from @see WrappedSchema If this tag exists, the schema is deprecated */
309
+ /** ISO Date. Copied from {@link WrappedSchema} If this tag exists, the schema is deprecated */
302
310
  end_date?: string;
303
311
 
304
312
  /** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
@@ -312,7 +320,7 @@ export type Schema = CommonSchemaAttributes & {
312
320
  /** added by the client to inform downstream components which locale from schema.i18n was used */
313
321
  clientLocale?: string;
314
322
 
315
- /** added by the client, copied from @see WrappedSchema */
323
+ /** added by the client, copied from {@link WrappedSchema} */
316
324
  version: string;
317
325
 
318
326
  /**
@@ -20,9 +20,7 @@ export type VerificationPayload<WithValue extends boolean> = {
20
20
  verifier_source_id?: NId;
21
21
  verifier_service_id?: NId;
22
22
  verifier_div: string;
23
- /** ISO Date */
24
- valid_until?: string;
25
- // we are disabling the eslint rule beacuse even tho `{}` acts illogically in typescript,
23
+ // we are disabling the eslint rule because even tho `{}` acts illogically in typescript,
26
24
  // in this case it's working as expected in the intersection type, see
27
25
  // https://github.com/typescript-eslint/typescript-eslint/issues/2063#issuecomment-632833366
28
26
  // and https://github.com/typescript-eslint/typescript-eslint/issues/2063#issuecomment-645510515
@@ -85,7 +83,7 @@ export type VerificationProvider = {
85
83
  date?: Date;
86
84
  };
87
85
 
88
- /** This is what @raytio/core exposes, which is more useable than @see Verification */
86
+ /** This is what @raytio/core exposes, which is more useable than {@link Verification} */
89
87
  export type RealVer = {
90
88
  fieldName: string;
91
89
  value: unknown;
package/src/wizard.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  import { AId } from "./raytio";
2
2
 
3
- /** configuration data for a single wizard page (@see WizardConfig) */
3
+ export type WizardPageTag =
4
+ // actions
5
+ "action:require_chip";
6
+
7
+ /** configuration data for a single wizard page ({@link WizardConfig}) */
4
8
  export type WizardPage = {
5
9
  /** if undefined, the schema title will be used */
6
10
  name?: string | symbol;
@@ -23,7 +27,7 @@ export type WizardPage = {
23
27
  service_provider_link?: boolean;
24
28
  /** custom text to display on the Create New button */
25
29
  create_new_text?: string;
26
- /** a URL to a preset for configuing NestedSchemaSelect. @see DeepConfig */
30
+ /** a URL to a preset for configuing NestedSchemaSelect. {@link DeepConfig} */
27
31
  selection_hierarchy_json?: string;
28
32
 
29
33
  /** whether the schema description should be shown */
@@ -60,7 +64,12 @@ export type WizardPage = {
60
64
  /** for ImageDynamicSection, the action to take if the API returns no `validation: {}` object */
61
65
  extract_threshold_null_action?: WizardPage["extract_threshold_fail_action"];
62
66
 
63
- /** if `false`, ProfileObjects created while completing the form will not be verified. `undefined` implies `true` */
67
+ /**
68
+ * if `false`, ProfileObjects created while completing the form will not be verified.
69
+ * if `true`, you can only select ProfileObjects that are partially or fully verified.
70
+ * `undefined` implies `true`.
71
+ * @default true
72
+ */
64
73
  verify_data?: boolean;
65
74
 
66
75
  /** a list of fields that should not be required, even if the schema says they're required */
@@ -72,6 +81,14 @@ export type WizardPage = {
72
81
 
73
82
  /** can you force the colour theme to change for just one page (#1066, #1074). At the moment this on pages that use WebcamImageCapture */
74
83
  display_mode?: "light" | "dark" | "default";
84
+
85
+ tags?: WizardPageTag[];
86
+
87
+ /**
88
+ * If specified, this is is a "Conditional Wizard Page", which is only shown
89
+ * if the rule passed. This field contains the ID (not name) of the rule.
90
+ */
91
+ branching_rule_name?: string;
75
92
  };
76
93
 
77
94
  /**