@raytio/types 6.0.1 → 7.0.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 +131 -61
- package/dist/crypto.d.ts +1 -1
- package/dist/raytio.d.ts +75 -25
- package/dist/schema.d.ts +87 -69
- package/dist/theme.d.ts +3 -4
- package/dist/verification.d.ts +4 -4
- package/dist/wizard.d.ts +3 -3
- package/package.json +2 -2
- package/src/__tests__/schema.ts +6 -6
- package/src/raytio.ts +65 -3
- package/src/schema.ts +94 -91
- package/src/theme.ts +1 -2
- package/src/wizard.ts +1 -1
package/README.md
CHANGED
|
@@ -30,8 +30,10 @@ Hovering over the type in VSCode will display documentation and available proper
|
|
|
30
30
|
### Type aliases
|
|
31
31
|
|
|
32
32
|
- [AA](#aa)
|
|
33
|
+
- [AATags](#aatags)
|
|
33
34
|
- [AId](#aid)
|
|
34
35
|
- [Colors](#colors)
|
|
36
|
+
- [CommonSchemaAttributes](#commonschemaattributes)
|
|
35
37
|
- [ConditionallyRequired](#conditionallyrequired)
|
|
36
38
|
- [CustomFonts](#customfonts)
|
|
37
39
|
- [DataTypes](#datatypes)
|
|
@@ -51,8 +53,8 @@ Hovering over the type in VSCode will display documentation and available proper
|
|
|
51
53
|
- [Schema](#schema)
|
|
52
54
|
- [SchemaField](#schemafield)
|
|
53
55
|
- [SchemaFieldTag](#schemafieldtag)
|
|
54
|
-
- [SchemaMetadata](#schemametadata)
|
|
55
56
|
- [SchemaTag](#schematag)
|
|
57
|
+
- [ServerSchemaField](#serverschemafield)
|
|
56
58
|
- [SubmissionStatus](#submissionstatus)
|
|
57
59
|
- [UId](#uid)
|
|
58
60
|
- [Urn](#urn)
|
|
@@ -61,8 +63,12 @@ Hovering over the type in VSCode will display documentation and available proper
|
|
|
61
63
|
- [Verification](#verification)
|
|
62
64
|
- [VerificationPayload](#verificationpayload)
|
|
63
65
|
- [VerificationProvider](#verificationprovider)
|
|
66
|
+
- [WId](#wid)
|
|
67
|
+
- [Webhook](#webhook)
|
|
68
|
+
- [WebhookStatus](#webhookstatus)
|
|
64
69
|
- [WizardConfig](#wizardconfig)
|
|
65
70
|
- [WizardPage](#wizardpage)
|
|
71
|
+
- [WrappedSchema](#wrappedschema)
|
|
66
72
|
|
|
67
73
|
## Type aliases
|
|
68
74
|
|
|
@@ -81,19 +87,25 @@ Hovering over the type in VSCode will display documentation and available proper
|
|
|
81
87
|
| `callback_uri?` | `string`[] | - |
|
|
82
88
|
| `description?` | `string` | - |
|
|
83
89
|
| `name` | `string` | - |
|
|
84
|
-
| `org_id` | [`OId`](#oid) | the id of the associated
|
|
90
|
+
| `org_id` | [`OId`](#oid) | the id of the associated organization |
|
|
85
91
|
| `picture?` | [`Urn`](#urn) | - |
|
|
86
92
|
| `picture_url?` | `string` | Easy to use AA logo url for pasting inot emails |
|
|
87
93
|
| `ruleset?` | `unknown` | configuration for the submission rules |
|
|
88
94
|
| `scopes?` | `string`[] | - |
|
|
89
95
|
| `service_provider_n_id?` | [`NId`](#nid) | the n_id of the associated service provider |
|
|
90
|
-
| `tags?` | `
|
|
96
|
+
| `tags?` | [`AATags`](#aatags)[] | - |
|
|
91
97
|
| `theme?` | `Object` | - |
|
|
92
98
|
| `theme.colors?` | [`Colors`](#colors) | - |
|
|
93
99
|
| `theme.font?` | [`CustomFonts`](#customfonts) | - |
|
|
94
100
|
|
|
95
101
|
___
|
|
96
102
|
|
|
103
|
+
### AATags
|
|
104
|
+
|
|
105
|
+
Ƭ **AATags**: ``"type:client_only"`` \| ``"type:share_with_new_user"`` \| \`related\_service\_provider:n\_id:${NId}\` \| ``"ServiceProvider"``
|
|
106
|
+
|
|
107
|
+
___
|
|
108
|
+
|
|
97
109
|
### AId
|
|
98
110
|
|
|
99
111
|
Ƭ **AId**: `StringWithIdentity`<``"AId"``\>
|
|
@@ -111,7 +123,6 @@ ___
|
|
|
111
123
|
| Name | Type | Description |
|
|
112
124
|
| :------ | :------ | :------ |
|
|
113
125
|
| `blank` | `string` | - |
|
|
114
|
-
| `blankBackground` | `string` | - |
|
|
115
126
|
| `climaterolText` | `string` | - |
|
|
116
127
|
| `climaterolUi` | `string` | - |
|
|
117
128
|
| `errorRed` | `string` | - |
|
|
@@ -120,7 +131,7 @@ ___
|
|
|
120
131
|
| `poolblueText` | `string` | - |
|
|
121
132
|
| `poolblueUi` | `string` | - |
|
|
122
133
|
| `raytioOrangeHover` | `string` | - |
|
|
123
|
-
| `raytioOrangeShade` | `string` |
|
|
134
|
+
| `raytioOrangeShade` | `string` | ✨ |
|
|
124
135
|
| `raytioOrangeText` | `string` | - |
|
|
125
136
|
| `raytioOrangeUi` | `string` | - |
|
|
126
137
|
| `sariShade` | `string` | - |
|
|
@@ -136,6 +147,41 @@ ___
|
|
|
136
147
|
|
|
137
148
|
___
|
|
138
149
|
|
|
150
|
+
### CommonSchemaAttributes
|
|
151
|
+
|
|
152
|
+
Ƭ **CommonSchemaAttributes**: `Object`
|
|
153
|
+
|
|
154
|
+
not exported. Attributes that are identical in both client schema & server schema
|
|
155
|
+
|
|
156
|
+
#### Type declaration
|
|
157
|
+
|
|
158
|
+
| Name | Type | Description |
|
|
159
|
+
| :------ | :------ | :------ |
|
|
160
|
+
| `description` | `string` | - |
|
|
161
|
+
| `display?` | `Object` | - |
|
|
162
|
+
| `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 |
|
|
164
|
+
| `display.head_main.fields` | `string`[] | - |
|
|
165
|
+
| `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 |
|
|
167
|
+
| `display.head_sub.fields` | `string`[] | - |
|
|
168
|
+
| `display.head_sub.format?` | `string` | - |
|
|
169
|
+
| `i18n?` | `Object` | - |
|
|
170
|
+
| `name` | `string` | these fields will always exist on schema |
|
|
171
|
+
| `onboard_properties?` | `Object` | only the schema used for the onboarding wizard have this property |
|
|
172
|
+
| `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
|
+
| `onboard_properties.profile_objects?` | { `properties`: `Record`<`string`, `unknown`\> ; `schema_name`: `string` }[] | Profile Objects that should be created |
|
|
174
|
+
| `onboard_properties.relationships?` | { `from`: `string` ; `properties?`: `Record`<`string`, `string`\> ; `to`: `string` ; `type`: `string` }[] | Relationships that should be created |
|
|
175
|
+
| `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` }[] | - |
|
|
177
|
+
| `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
|
+
| `tags?` | [`SchemaTag`](#schematag)[] | - |
|
|
179
|
+
| `title` | `string` | - |
|
|
180
|
+
| `title_plural?` | `string` | plural version of the title |
|
|
181
|
+
| `type?` | [`DataTypes`](#datatypes) | - |
|
|
182
|
+
|
|
183
|
+
___
|
|
184
|
+
|
|
139
185
|
### ConditionallyRequired
|
|
140
186
|
|
|
141
187
|
Ƭ **ConditionallyRequired**: `Object`
|
|
@@ -229,6 +275,7 @@ ___
|
|
|
229
275
|
| `profile_objects` | [`ProfileObject`](#profileobject)[] | data associated is access application's instance |
|
|
230
276
|
| `reference` | `string` | reference provided by the user who shared the data |
|
|
231
277
|
| `relationships?` | [`Relationship`](#relationship)[] | - |
|
|
278
|
+
| `score?` | `unknown` | added by the client once it calculates the score |
|
|
232
279
|
| `service_provider_n_id?` | [`NId`](#nid) | Service provider ID |
|
|
233
280
|
| `start_date` | `string` | Earliest date on which the shared information was available |
|
|
234
281
|
| `state` | [`SubmissionStatus`](#submissionstatus) | The status of a submission |
|
|
@@ -384,51 +431,10 @@ ___
|
|
|
384
431
|
|
|
385
432
|
### Schema
|
|
386
433
|
|
|
387
|
-
Ƭ **Schema**: `
|
|
388
|
-
|
|
389
|
-
Raytio's variant of JSON Schema. All props marked as optional except
|
|
390
|
-
`name`. This type can be used for both the schema and for individual fields.
|
|
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` }
|
|
391
435
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
| Name | Type | Description |
|
|
395
|
-
| :------ | :------ | :------ |
|
|
396
|
-
| `$id?` | `string` | **`deprecated`** don't use this |
|
|
397
|
-
| `$ref?` | `string` | **`deprecated`** not sure why a schema would have this, only fields should |
|
|
398
|
-
| `$schema?` | `string` | - |
|
|
399
|
-
| `allOf?` | { `$ref?`: `string` ; `if?`: [`Schema`](#schema) ; `then?`: [`Schema`](modules.md#schema) }[] | - |
|
|
400
|
-
| `definitions?` | `Record`<`string`, `Object`\> | - |
|
|
401
|
-
| `description` | `string` | - |
|
|
402
|
-
| `display?` | `Object` | - |
|
|
403
|
-
| `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 |
|
|
404
|
-
| `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 |
|
|
405
|
-
| `display.head_main.fields` | `string`[] | - |
|
|
406
|
-
| `display.head_main.format?` | `string` | - |
|
|
407
|
-
| `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 |
|
|
408
|
-
| `display.head_sub.fields` | `string`[] | - |
|
|
409
|
-
| `display.head_sub.format?` | `string` | - |
|
|
410
|
-
| `end_date?` | `string` | If this tag exists, the schema is deprecated. ISO Date. |
|
|
411
|
-
| `group_title?` | `string` | the localized title of the `schema_group`. added by the client |
|
|
412
|
-
| `i18n?` | `Object` | - |
|
|
413
|
-
| `n_id?` | [`NId`](#nid) | - |
|
|
414
|
-
| `name` | `string` | these fields will always exist on schema |
|
|
415
|
-
| `onboard_properties?` | `Object` | only the schema used for the onboarding wizard have this property |
|
|
416
|
-
| `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 |
|
|
417
|
-
| `onboard_properties.profile_objects?` | { `properties`: `Record`<`string`, `unknown`\> ; `schema_name`: `string` }[] | Profile Objects that should be created |
|
|
418
|
-
| `onboard_properties.relationships?` | { `from`: `string` ; `properties?`: `Record`<`string`, `string`\> ; `to`: `string` ; `type`: `string` }[] | Relationships that should be created |
|
|
419
|
-
| `onboard_properties.return_to?` | `string` | The relative path in the client to redirect to once finished. May include variables |
|
|
420
|
-
| `properties` | `Object` | 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object |
|
|
421
|
-
| `relationships?` | { `anyOf?`: `string`[] ; `direction`: ``"from"`` ; `multiple?`: `boolean` ; `oneOf?`: `string`[] ; `properties?`: { [fieldName: string]: [`SchemaField`](#schemafield); } ; `relationship_name`: `string` ; `required?`: `string`[] ; `required_relationship?`: `boolean` ; `type`: `string` }[] | - |
|
|
422
|
-
| `required?` | (`string` \| [`ConditionallyRequired`](#conditionallyrequired))[] | added by client |
|
|
423
|
-
| `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. |
|
|
424
|
-
| `tags?` | [`SchemaTag`](#schematag)[] | - |
|
|
425
|
-
| `title` | `string` | - |
|
|
426
|
-
| `title_plural?` | `string` | plural version of the title |
|
|
427
|
-
| `type?` | [`DataTypes`](#datatypes) | - |
|
|
428
|
-
| `verified_fields?` | (`string` \| [`ConditionallyRequired`](#conditionallyrequired))[] | originally `string[]`, the client modifies this |
|
|
429
|
-
| `version?` | `string` | - |
|
|
430
|
-
| `version_current?` | `boolean` | whether the `version` is the latest version |
|
|
431
|
-
| `wasExpandedByClient?` | `boolean` | - |
|
|
436
|
+
Raytio's variant of JSON Schema, as used by the client. It is a modified version
|
|
437
|
+
of what the API returns.
|
|
432
438
|
|
|
433
439
|
___
|
|
434
440
|
|
|
@@ -443,7 +449,7 @@ ___
|
|
|
443
449
|
| `$id?` | `string` | **`deprecated`** don't use, it's inconsistent |
|
|
444
450
|
| `$ref?` | `string` | If this field refers to a sub-object |
|
|
445
451
|
| `add_row_btn_label?` | `string` | if this field is a table input, this determines the text to show on the "Add Row" btn |
|
|
446
|
-
| `allOf?` | [{ `$ref`: `string` }, [`
|
|
452
|
+
| `allOf?` | [{ `$ref`: `string` }, [`ServerSchemaField`](#serverschemafield)] | - |
|
|
447
453
|
| `content?` | `string` | only checkbox uses this prop |
|
|
448
454
|
| `contentEncoding?` | ``"base64"`` | - |
|
|
449
455
|
| `contentMediaType?` | `string` | - |
|
|
@@ -452,9 +458,9 @@ ___
|
|
|
452
458
|
| `description?` | `string` | - |
|
|
453
459
|
| `description_decorator?` | ``"md"`` | specifies that the description is formatted in markdown |
|
|
454
460
|
| `encrypt?` | `boolean` | whether the field should be encrypted |
|
|
455
|
-
| `enum?` | `string`[] | - |
|
|
461
|
+
| `enum?` | (`string` \| `number` \| `boolean`)[] | - |
|
|
456
462
|
| `examples?` | `unknown`[] | - |
|
|
457
|
-
| `format?` | ``"date"`` \| ``"date-time"`` | - |
|
|
463
|
+
| `format?` | ``"date"`` \| ``"date-time"`` \| ``"uri"`` | - |
|
|
458
464
|
| `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 |
|
|
459
465
|
| `items?` | `Object` | `items` is used for nested arrays, (while `properties` is used for nested objects) |
|
|
460
466
|
| `items.properties` | `Object` | - |
|
|
@@ -482,21 +488,21 @@ ___
|
|
|
482
488
|
|
|
483
489
|
### SchemaFieldTag
|
|
484
490
|
|
|
485
|
-
Ƭ **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"`` \|
|
|
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"``
|
|
486
492
|
|
|
487
493
|
___
|
|
488
494
|
|
|
489
|
-
###
|
|
490
|
-
|
|
491
|
-
Ƭ **SchemaMetadata**: `Pick`<[`Schema`](#schema), ``"name"`` \| ``"title"`` \| ``"description"`` \| ``"schema_group"`` \| ``"end_date"`` \| ``"i18n"`` \| ``"display"`` \| ``"tags"`` \| ``"clientLocale"`` \| ``"groupNames"`` \| ``"title_plural"`` \| ``"group_title"``\> & { `__typeof__`: ``"You cannot supply SchemaMetadata to a function that expects Schema"`` ; `isProfileSchema`: `boolean` ; `isSpSchema`: `boolean` }
|
|
495
|
+
### SchemaTag
|
|
492
496
|
|
|
493
|
-
|
|
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"``
|
|
494
498
|
|
|
495
499
|
___
|
|
496
500
|
|
|
497
|
-
###
|
|
501
|
+
### ServerSchemaField
|
|
498
502
|
|
|
499
|
-
Ƭ **
|
|
503
|
+
Ƭ **ServerSchemaField**: `Omit`<[`SchemaField`](#schemafield), ``"$prop"``\>
|
|
504
|
+
|
|
505
|
+
the only difference between the client & server's definition is that the client adds `$prop`
|
|
500
506
|
|
|
501
507
|
___
|
|
502
508
|
|
|
@@ -524,7 +530,7 @@ ___
|
|
|
524
530
|
|
|
525
531
|
### UrnNodeType
|
|
526
532
|
|
|
527
|
-
Ƭ **UrnNodeType**: ``"user"`` \| ``"profile_object"`` \| ``"instance"`` \| ``"temp_object"`` \| ``"document"``
|
|
533
|
+
Ƭ **UrnNodeType**: ``"user"`` \| ``"profile_object"`` \| ``"instance"`` \| ``"schema"`` \| ``"temp_object"`` \| ``"document"``
|
|
528
534
|
|
|
529
535
|
___
|
|
530
536
|
|
|
@@ -589,12 +595,55 @@ These `n_id`s point to service provider profile objects
|
|
|
589
595
|
|
|
590
596
|
___
|
|
591
597
|
|
|
598
|
+
### WId
|
|
599
|
+
|
|
600
|
+
Ƭ **WId**: `StringWithIdentity`<``"WId"``\>
|
|
601
|
+
|
|
602
|
+
A `wi_id` is the ID of a @see Webhook
|
|
603
|
+
|
|
604
|
+
___
|
|
605
|
+
|
|
606
|
+
### Webhook
|
|
607
|
+
|
|
608
|
+
Ƭ **Webhook**: `Object`
|
|
609
|
+
|
|
610
|
+
#### Type declaration
|
|
611
|
+
|
|
612
|
+
| Name | Type | Description |
|
|
613
|
+
| :------ | :------ | :------ |
|
|
614
|
+
| `date_created` | `string` | ISO Date |
|
|
615
|
+
| `date_updated` | `string` | ISO Date |
|
|
616
|
+
| `provider_signature_check_enabled` | `boolean` | - |
|
|
617
|
+
| `provider_signature_credentials` | `unknown` | - |
|
|
618
|
+
| `provider_subscription_credentials` | `unknown` | - |
|
|
619
|
+
| `provider_webhook_id` | [`NId`](#nid) | n_id of "the webhook provider which can be set up against a service provider" |
|
|
620
|
+
| `provider_webhook_subscription_id` | [`NId`](#nid) | not sure what this is |
|
|
621
|
+
| `status` | [`WebhookStatus`](#webhookstatus) | - |
|
|
622
|
+
| `subscribe_log?` | { `date`: `string` ; `response_payload`: `Json` ; `response_status_code`: `number` }[] | - |
|
|
623
|
+
| `webhook_action` | { `webhook_action_type`: `string` }[] | - |
|
|
624
|
+
| `webhook_field_mapping_schema` | `Object` | - |
|
|
625
|
+
| `webhook_filter_schema` | `Object` | - |
|
|
626
|
+
| `webhook_filter_schema.field_name` | `string` | - |
|
|
627
|
+
| `webhook_filter_schema.field_value` | `string` | - |
|
|
628
|
+
| `webhook_filter_schema.operator` | `string` | - |
|
|
629
|
+
| `webhook_filter_source` | `string` | - |
|
|
630
|
+
| `webhook_processing_rules` | `unknown` | - |
|
|
631
|
+
| `wi_id` | [`WId`](#wid) | - |
|
|
632
|
+
|
|
633
|
+
___
|
|
634
|
+
|
|
635
|
+
### WebhookStatus
|
|
636
|
+
|
|
637
|
+
Ƭ **WebhookStatus**: ``"subscribed"`` \| ``"pending"`` \| ``"unsubscribe_failed"``
|
|
638
|
+
|
|
639
|
+
___
|
|
640
|
+
|
|
592
641
|
### WizardConfig
|
|
593
642
|
|
|
594
643
|
Ƭ **WizardConfig**: `Object`
|
|
595
644
|
|
|
596
645
|
when a form link is generated, this is what gets saved on the API.
|
|
597
|
-
Each value can be
|
|
646
|
+
Each value can be overridden in the query parameters. If specified
|
|
598
647
|
in the query parameters, it needs to be base64 and/or url encoded.
|
|
599
648
|
|
|
600
649
|
#### Type declaration
|
|
@@ -657,3 +706,24 @@ configuration data for a single wizard page (@see WizardConfig)
|
|
|
657
706
|
| `service_provider_link?` | `boolean` | see #463 |
|
|
658
707
|
| `share?` | ``"profile"`` \| ``"verification"`` \| ``"both"`` | the information to share. undefined implies both. |
|
|
659
708
|
| `verify_data?` | `boolean` | if `false`, ProfileObjects created while completing the form will not be verified. `undefined` implies `true` |
|
|
709
|
+
|
|
710
|
+
___
|
|
711
|
+
|
|
712
|
+
### WrappedSchema
|
|
713
|
+
|
|
714
|
+
Ƭ **WrappedSchema**: `Object`
|
|
715
|
+
|
|
716
|
+
This is what's returned by the API
|
|
717
|
+
|
|
718
|
+
#### Type declaration
|
|
719
|
+
|
|
720
|
+
| Name | Type | Description |
|
|
721
|
+
| :------ | :------ | :------ |
|
|
722
|
+
| `active` | ``true`` | - |
|
|
723
|
+
| `end_date` | `string` | ISO Date. If this tag exists, the schema is deprecated. |
|
|
724
|
+
| `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`[] } | - |
|
|
726
|
+
| `start_date` | `string` | ISO Date |
|
|
727
|
+
| `type` | ``"ss"`` \| ``"ps"`` \| ``"us"`` | - |
|
|
728
|
+
| `version` | `string` | - |
|
|
729
|
+
| `version_current` | `boolean` | whether the \`version\` is the latest version |
|
package/dist/crypto.d.ts
CHANGED
package/dist/raytio.d.ts
CHANGED
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import { Encrypted } from "./crypto";
|
|
2
2
|
import { Colors, CustomFonts } from "./theme";
|
|
3
3
|
/** @internal see Microsoft/TypeScript#202 */
|
|
4
|
-
export
|
|
4
|
+
export type StringWithIdentity<T> = string & {
|
|
5
5
|
$$typeof$$: T;
|
|
6
6
|
};
|
|
7
7
|
/** @internal */
|
|
8
|
-
|
|
8
|
+
type Json = Record<string, any>;
|
|
9
9
|
/** A `p_id` is the ID of a @see Relationship */
|
|
10
|
-
export
|
|
10
|
+
export type PId = StringWithIdentity<"PId">;
|
|
11
11
|
/** An `i_id` is the ID of an @see Instance */
|
|
12
|
-
export
|
|
12
|
+
export type IId = StringWithIdentity<"IId">;
|
|
13
13
|
/** An `n_id` is the ID of a @see ProfileObject */
|
|
14
|
-
export
|
|
14
|
+
export type NId = StringWithIdentity<"NId">;
|
|
15
15
|
/** A `g_id` is the ID of a group */
|
|
16
|
-
export
|
|
16
|
+
export type GId = StringWithIdentity<"GId">;
|
|
17
17
|
/** A `u_id` is the ID of a user */
|
|
18
|
-
export
|
|
18
|
+
export type UId = StringWithIdentity<"UId">;
|
|
19
19
|
/** An `a_id` is the ID of an @see AA */
|
|
20
|
-
export
|
|
20
|
+
export type AId = StringWithIdentity<"AId">;
|
|
21
21
|
/** An `o_id` is the ID of an @see Organization */
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
export
|
|
22
|
+
export type OId = StringWithIdentity<"OId">;
|
|
23
|
+
/** A `wi_id` is the ID of a @see Webhook */
|
|
24
|
+
export type WId = StringWithIdentity<"WId">;
|
|
25
|
+
export type DataTypes = "string" | "number" | "boolean" | "object" | "integer" | "array" | "null";
|
|
26
|
+
export type SubmissionStatus = "Submitted" | "Processing" | "Rejected" | "Expired" | "Completed" | "DataChanged" | "Received" | "Accepted";
|
|
25
27
|
/** You can supply an option type argument if you know exactly what the properties will be */
|
|
26
|
-
export
|
|
28
|
+
export type ProfileObject<Properties = Json> = {
|
|
27
29
|
n_id: NId;
|
|
28
30
|
properties: Properties;
|
|
29
31
|
labels: string[];
|
|
@@ -36,7 +38,7 @@ export declare type ProfileObject<Properties = Json> = {
|
|
|
36
38
|
isFromSubmission?: [aId: AId, iId: IId];
|
|
37
39
|
};
|
|
38
40
|
/** @internal This is what we send the API */
|
|
39
|
-
export
|
|
41
|
+
export type ProfileObjectForUpload<Properties = Json> = {
|
|
40
42
|
properties: Properties;
|
|
41
43
|
document?: {
|
|
42
44
|
content?: string | Encrypted;
|
|
@@ -53,13 +55,13 @@ export declare type ProfileObjectForUpload<Properties = Json> = {
|
|
|
53
55
|
* There are some limits to field names: they cannot be called
|
|
54
56
|
* `__signature` nor can they include the character sequence `<=>`.
|
|
55
57
|
*/
|
|
56
|
-
export
|
|
58
|
+
export type Properties = {
|
|
57
59
|
[fieldName: string]: any;
|
|
58
60
|
};
|
|
59
|
-
export
|
|
61
|
+
export type UrnNodeType = "user" | "profile_object" | "instance" | "schema" | "temp_object" | "document";
|
|
60
62
|
/** e.g. "urn:user:..." */
|
|
61
|
-
export
|
|
62
|
-
export
|
|
63
|
+
export type Urn = `urn:${UrnNodeType}:${string}`;
|
|
64
|
+
export type Relationship = {
|
|
63
65
|
start: Urn;
|
|
64
66
|
end: Urn;
|
|
65
67
|
p_id: PId;
|
|
@@ -70,7 +72,7 @@ export declare type Relationship = {
|
|
|
70
72
|
[fieldName: string]: unknown;
|
|
71
73
|
};
|
|
72
74
|
};
|
|
73
|
-
export
|
|
75
|
+
export type Lookup = {
|
|
74
76
|
key: string | number;
|
|
75
77
|
value: string | number;
|
|
76
78
|
/** Used in Antd Cascader */
|
|
@@ -80,7 +82,8 @@ export declare type Lookup = {
|
|
|
80
82
|
/** used in AkahuDynamicSection only */
|
|
81
83
|
requires_2FA?: boolean;
|
|
82
84
|
};
|
|
83
|
-
export
|
|
85
|
+
export type AATags = "type:client_only" | "type:share_with_new_user" | `related_service_provider:n_id:${NId}` | "ServiceProvider";
|
|
86
|
+
export type AA = {
|
|
84
87
|
a_id: AId;
|
|
85
88
|
name: string;
|
|
86
89
|
description?: string;
|
|
@@ -90,7 +93,7 @@ export declare type AA = {
|
|
|
90
93
|
/** Easy to use AA logo url for pasting inot emails */
|
|
91
94
|
picture_url?: string;
|
|
92
95
|
scopes?: string[];
|
|
93
|
-
tags?:
|
|
96
|
+
tags?: AATags[];
|
|
94
97
|
callback_uri?: string[];
|
|
95
98
|
/** markdown or string help information including [phoneNumber || email] */
|
|
96
99
|
aa_help?: string;
|
|
@@ -100,16 +103,16 @@ export declare type AA = {
|
|
|
100
103
|
};
|
|
101
104
|
/** the n_id of the associated service provider */
|
|
102
105
|
service_provider_n_id?: NId;
|
|
103
|
-
/** the id of the associated
|
|
106
|
+
/** the id of the associated organization */
|
|
104
107
|
org_id: OId;
|
|
105
108
|
/** configuration for the submission rules */
|
|
106
109
|
ruleset?: unknown;
|
|
107
110
|
/** if true, only specific email addresses can submit the form */
|
|
108
111
|
auth_list_enabled?: boolean;
|
|
109
112
|
/** @internal */
|
|
110
|
-
|
|
113
|
+
transitions?: unknown[];
|
|
111
114
|
};
|
|
112
|
-
export
|
|
115
|
+
export type Instance = {
|
|
113
116
|
/** Access application instance ID */
|
|
114
117
|
i_id: IId;
|
|
115
118
|
/** ID of the access application this submission was made to */
|
|
@@ -148,12 +151,14 @@ export declare type Instance = {
|
|
|
148
151
|
};
|
|
149
152
|
};
|
|
150
153
|
relationships?: Relationship[];
|
|
154
|
+
/** added by the client once it calculates the score */
|
|
155
|
+
score?: unknown;
|
|
151
156
|
};
|
|
152
157
|
/**
|
|
153
158
|
* An organization.
|
|
154
159
|
* NOTE: this is different to how the schema defines an Organization. **The schema is wrong (see #468)**
|
|
155
160
|
*/
|
|
156
|
-
export
|
|
161
|
+
export type Organization = {
|
|
157
162
|
id: OId;
|
|
158
163
|
name: string;
|
|
159
164
|
email: string;
|
|
@@ -167,8 +172,19 @@ export declare type Organization = {
|
|
|
167
172
|
};
|
|
168
173
|
customer: Record<string, unknown>;
|
|
169
174
|
};
|
|
175
|
+
/** @internal some APIs now return extra info */
|
|
176
|
+
export type FullOrg = {
|
|
177
|
+
id: OId;
|
|
178
|
+
organization: Omit<Organization, "id">;
|
|
179
|
+
/** 🧙♂️ */
|
|
180
|
+
gandalf: unknown;
|
|
181
|
+
stripe: {
|
|
182
|
+
customer: unknown;
|
|
183
|
+
};
|
|
184
|
+
centrix_credentials: unknown;
|
|
185
|
+
};
|
|
170
186
|
/** validation data returned by preVerify (part of the extract&map API) */
|
|
171
|
-
export
|
|
187
|
+
export type Validation = {
|
|
172
188
|
score: number;
|
|
173
189
|
warning?: string[];
|
|
174
190
|
breakdown: {
|
|
@@ -183,4 +199,38 @@ export declare type Validation = {
|
|
|
183
199
|
};
|
|
184
200
|
};
|
|
185
201
|
};
|
|
202
|
+
export type WebhookStatus = "subscribed" | "pending" | "unsubscribe_failed";
|
|
203
|
+
export type Webhook = {
|
|
204
|
+
wi_id: WId;
|
|
205
|
+
/** n_id of "the webhook provider which can be set up against a service provider" */
|
|
206
|
+
provider_webhook_id: NId;
|
|
207
|
+
/** not sure what this is */
|
|
208
|
+
provider_webhook_subscription_id: NId;
|
|
209
|
+
status: WebhookStatus;
|
|
210
|
+
/** ISO Date */
|
|
211
|
+
date_created: string;
|
|
212
|
+
/** ISO Date */
|
|
213
|
+
date_updated: string;
|
|
214
|
+
webhook_filter_schema: {
|
|
215
|
+
operator: string;
|
|
216
|
+
field_value: string;
|
|
217
|
+
field_name: string;
|
|
218
|
+
};
|
|
219
|
+
webhook_action: {
|
|
220
|
+
webhook_action_type: string;
|
|
221
|
+
}[];
|
|
222
|
+
webhook_filter_source: string;
|
|
223
|
+
webhook_field_mapping_schema: {
|
|
224
|
+
[key: string]: string;
|
|
225
|
+
};
|
|
226
|
+
webhook_processing_rules: unknown;
|
|
227
|
+
provider_subscription_credentials: unknown;
|
|
228
|
+
provider_signature_check_enabled: boolean;
|
|
229
|
+
provider_signature_credentials: unknown;
|
|
230
|
+
subscribe_log?: {
|
|
231
|
+
date: string;
|
|
232
|
+
response_status_code: number;
|
|
233
|
+
response_payload: Json;
|
|
234
|
+
}[];
|
|
235
|
+
};
|
|
186
236
|
export {};
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { AA, DataTypes,
|
|
1
|
+
import { AA, DataTypes, Organization, Urn } from "./raytio";
|
|
2
2
|
import { WizardConfig } from "./wizard";
|
|
3
3
|
/** should be renamed since this applies to ConditionallyVerifiable */
|
|
4
|
-
export
|
|
4
|
+
export type ConditionallyRequired = {
|
|
5
5
|
field: string;
|
|
6
6
|
if: {
|
|
7
|
-
[fieldName: string]: string[];
|
|
7
|
+
[fieldName: string]: (string | number | boolean)[];
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
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";
|
|
12
|
+
export type SchemaField = {
|
|
13
13
|
/** @deprecated don't use, it's inconsistent */
|
|
14
14
|
$id?: string;
|
|
15
15
|
title?: string;
|
|
@@ -20,7 +20,7 @@ export declare type SchemaField = {
|
|
|
20
20
|
examples?: unknown[];
|
|
21
21
|
tags?: SchemaFieldTag[];
|
|
22
22
|
type?: DataTypes;
|
|
23
|
-
enum?: string[];
|
|
23
|
+
enum?: (string | number | boolean)[];
|
|
24
24
|
maximum?: number;
|
|
25
25
|
minimum?: number;
|
|
26
26
|
/** @deprecated raytio's usage not documented */
|
|
@@ -32,7 +32,7 @@ export declare type SchemaField = {
|
|
|
32
32
|
pattern?: string;
|
|
33
33
|
/** whether the field should be encrypted */
|
|
34
34
|
encrypt?: boolean;
|
|
35
|
-
format?: "date" | "date-time";
|
|
35
|
+
format?: "date" | "date-time" | "uri";
|
|
36
36
|
contentMediaType?: string;
|
|
37
37
|
contentEncoding?: "base64";
|
|
38
38
|
/** `items` is used for nested arrays, (while `properties` is used for nested objects) */
|
|
@@ -59,7 +59,7 @@ export declare type SchemaField = {
|
|
|
59
59
|
};
|
|
60
60
|
allOf?: [{
|
|
61
61
|
$ref: string;
|
|
62
|
-
},
|
|
62
|
+
}, ServerSchemaField];
|
|
63
63
|
/** only checkbox uses this prop */
|
|
64
64
|
content?: string;
|
|
65
65
|
/** URL to a JSON file in the `Lookup` format */
|
|
@@ -98,15 +98,11 @@ export declare type SchemaField = {
|
|
|
98
98
|
*/
|
|
99
99
|
image_silhouette?: string;
|
|
100
100
|
};
|
|
101
|
-
/**
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/** @deprecated don't use this */
|
|
107
|
-
$id?: string;
|
|
108
|
-
$schema?: string;
|
|
109
|
-
n_id?: NId;
|
|
101
|
+
/** the only difference between the client & server's definition is that the client adds `$prop` */
|
|
102
|
+
export type ServerSchemaField = Omit<SchemaField, "$prop">;
|
|
103
|
+
/** not exported. Attributes that are identical in both client schema & server schema */
|
|
104
|
+
export type CommonSchemaAttributes = {
|
|
105
|
+
type?: DataTypes;
|
|
110
106
|
/** these fields will always exist on schema */
|
|
111
107
|
name: string;
|
|
112
108
|
title: string;
|
|
@@ -118,37 +114,14 @@ export declare type Schema = {
|
|
|
118
114
|
* forms that accept different types of similar documents.
|
|
119
115
|
*/
|
|
120
116
|
schema_group?: string;
|
|
121
|
-
/** the localized title of the `schema_group`. added by the client */
|
|
122
|
-
group_title?: string;
|
|
123
|
-
/** @deprecated not sure why a schema would have this, only fields should */
|
|
124
|
-
$ref?: string;
|
|
125
|
-
version?: string;
|
|
126
|
-
/** whether the `version` is the latest version */
|
|
127
|
-
version_current?: boolean;
|
|
128
117
|
tags?: SchemaTag[];
|
|
129
|
-
/** originally `string[]`, the client modifies this */
|
|
130
|
-
verified_fields?: (string | ConditionallyRequired)[];
|
|
131
|
-
wasExpandedByClient?: boolean;
|
|
132
|
-
/** added by client */
|
|
133
|
-
required?: (string | ConditionallyRequired)[];
|
|
134
|
-
type?: DataTypes;
|
|
135
|
-
definitions?: Record<string, {
|
|
136
|
-
$ref: Urn;
|
|
137
|
-
}>;
|
|
138
|
-
allOf?: {
|
|
139
|
-
$ref?: string;
|
|
140
|
-
if?: Schema;
|
|
141
|
-
then?: Schema;
|
|
142
|
-
}[];
|
|
143
|
-
/** If this tag exists, the schema is deprecated. ISO Date. */
|
|
144
|
-
end_date?: string;
|
|
145
|
-
/** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
|
|
146
|
-
properties: {
|
|
147
|
-
[fieldName: string]: SchemaField;
|
|
148
|
-
};
|
|
149
118
|
i18n?: {
|
|
150
119
|
[locale: string]: {
|
|
151
|
-
$schema:
|
|
120
|
+
$schema: {
|
|
121
|
+
title: string;
|
|
122
|
+
title_plural?: string;
|
|
123
|
+
description?: string;
|
|
124
|
+
};
|
|
152
125
|
$loading_extract: {
|
|
153
126
|
title: string;
|
|
154
127
|
};
|
|
@@ -179,21 +152,11 @@ export declare type Schema = {
|
|
|
179
152
|
$loading_pending_ver_resubmit: {
|
|
180
153
|
title: string;
|
|
181
154
|
};
|
|
182
|
-
[fieldNameOrGroupName: string]:
|
|
155
|
+
[fieldNameOrGroupName: string]: ServerSchemaField & {
|
|
183
156
|
title_plural?: string;
|
|
184
157
|
};
|
|
185
158
|
};
|
|
186
159
|
};
|
|
187
|
-
/** @internal the client adds this after processing the i18n property */
|
|
188
|
-
groupNames?: Record<string, string>;
|
|
189
|
-
/** @internal added by the client to inform downstream components which locale from schema.i18n was used */
|
|
190
|
-
clientLocale?: string;
|
|
191
|
-
/**
|
|
192
|
-
* @internal
|
|
193
|
-
* the estimated loading times in seconds for various API calls. The client adds
|
|
194
|
-
* this field after processing the schema tags.
|
|
195
|
-
*/
|
|
196
|
-
timing?: Record<"extract" | "live_person" | "verify_pending_delay", number>;
|
|
197
160
|
relationships?: {
|
|
198
161
|
relationship_name: string;
|
|
199
162
|
direction: "from";
|
|
@@ -239,10 +202,6 @@ export declare type Schema = {
|
|
|
239
202
|
label: string;
|
|
240
203
|
}[];
|
|
241
204
|
};
|
|
242
|
-
/** @internal @deprecated do not use */
|
|
243
|
-
unexpanded_allOf?: never;
|
|
244
|
-
/** @internal @deprecated do not use */
|
|
245
|
-
unexpanded_properties?: never;
|
|
246
205
|
/** only the schema used for the onboarding wizard have this property */
|
|
247
206
|
onboard_properties?: {
|
|
248
207
|
/** Profile Objects that should be created */
|
|
@@ -278,15 +237,74 @@ export declare type Schema = {
|
|
|
278
237
|
return_to?: string;
|
|
279
238
|
};
|
|
280
239
|
};
|
|
281
|
-
/**
|
|
282
|
-
|
|
240
|
+
/**
|
|
241
|
+
* Raytio's variant of JSON Schema, as used by the client. It is a modified version
|
|
242
|
+
* of what the API returns.
|
|
243
|
+
*/
|
|
244
|
+
export type Schema = CommonSchemaAttributes & {
|
|
245
|
+
/** the localized title of the `schema_group`. added by the client */
|
|
246
|
+
group_title?: string;
|
|
247
|
+
/** originally `string[]`, the client modifies this */
|
|
248
|
+
verified_fields?: (string | ConditionallyRequired)[];
|
|
249
|
+
/** originally `string[]`, the client modifies this */
|
|
250
|
+
required?: (string | ConditionallyRequired)[];
|
|
251
|
+
/** added by client */
|
|
252
|
+
wasExpandedByClient?: boolean;
|
|
253
|
+
/** ISO Date. Copied from @see WrappedSchema */
|
|
254
|
+
start_date?: string;
|
|
255
|
+
/** ISO Date. Copied from @see WrappedSchema If this tag exists, the schema is deprecated */
|
|
256
|
+
end_date?: string;
|
|
257
|
+
/** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
|
|
258
|
+
properties: {
|
|
259
|
+
[fieldName: string]: SchemaField;
|
|
260
|
+
};
|
|
261
|
+
/** the client adds this after processing the i18n property */
|
|
262
|
+
groupNames?: Record<string, string>;
|
|
263
|
+
/** added by the client to inform downstream components which locale from schema.i18n was used */
|
|
264
|
+
clientLocale?: string;
|
|
265
|
+
/** added by the client, copied from @see WrappedSchema */
|
|
266
|
+
version: string;
|
|
283
267
|
/**
|
|
284
|
-
*
|
|
285
|
-
*
|
|
268
|
+
* the estimated loading times in seconds for various API calls. The client adds
|
|
269
|
+
* this field after processing the schema tags.
|
|
286
270
|
*/
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
271
|
+
timing?: Record<"extract" | "live_person" | "verify_pending_delay", number>;
|
|
272
|
+
/** added by the client. If true, this should be shown to the client */
|
|
273
|
+
isProfileSchema?: boolean;
|
|
274
|
+
/** added by the client. If true, this schema somehow relates to legacy service providers */
|
|
275
|
+
isSpSchema?: boolean;
|
|
276
|
+
};
|
|
277
|
+
/** This is what's returned by the API */
|
|
278
|
+
export type WrappedSchema = {
|
|
279
|
+
active: true;
|
|
280
|
+
/** ISO Date */
|
|
281
|
+
start_date: string;
|
|
282
|
+
/** ISO Date. If this tag exists, the schema is deprecated. */
|
|
283
|
+
end_date: string;
|
|
284
|
+
name: string;
|
|
285
|
+
type: "ss" | "ps" | "us";
|
|
286
|
+
version: string;
|
|
287
|
+
/** whether the \`version\` is the latest version */
|
|
288
|
+
version_current: boolean;
|
|
289
|
+
schema: CommonSchemaAttributes & {
|
|
290
|
+
/** @deprecated don't use this */
|
|
291
|
+
$id?: string;
|
|
292
|
+
/** @deprecated don't use this */
|
|
293
|
+
$schema?: string;
|
|
294
|
+
definitions?: Record<string, {
|
|
295
|
+
$ref: Urn;
|
|
296
|
+
}>;
|
|
297
|
+
allOf?: {
|
|
298
|
+
$ref?: string;
|
|
299
|
+
if?: Partial<WrappedSchema["schema"]>;
|
|
300
|
+
then?: Partial<WrappedSchema["schema"]>;
|
|
301
|
+
}[];
|
|
302
|
+
properties: {
|
|
303
|
+
[fieldName: string]: ServerSchemaField;
|
|
304
|
+
};
|
|
305
|
+
required?: string[];
|
|
306
|
+
verified_fields?: string[];
|
|
307
|
+
};
|
|
290
308
|
};
|
|
291
309
|
/** @ignore */
|
|
292
|
-
export
|
|
310
|
+
export type RelationDefinition = NonNullable<Schema["relationships"]>[number];
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Colors = {
|
|
2
2
|
sirPinklyText: string;
|
|
3
3
|
sirPinklyUi: string;
|
|
4
4
|
violaPerpetuoText: string;
|
|
@@ -10,7 +10,7 @@ export declare type Colors = {
|
|
|
10
10
|
raytioOrangeText: string;
|
|
11
11
|
raytioOrangeUi: string;
|
|
12
12
|
raytioOrangeHover: string;
|
|
13
|
-
/**
|
|
13
|
+
/** ✨ */
|
|
14
14
|
raytioOrangeShade: string;
|
|
15
15
|
successGreen: string;
|
|
16
16
|
loadingYellow: string;
|
|
@@ -21,10 +21,9 @@ export declare type Colors = {
|
|
|
21
21
|
sariShade: string;
|
|
22
22
|
feelingHugged: string;
|
|
23
23
|
silverShell: string;
|
|
24
|
-
blankBackground: string;
|
|
25
24
|
blank: string;
|
|
26
25
|
};
|
|
27
|
-
export
|
|
26
|
+
export type CustomFonts = {
|
|
28
27
|
header?: string;
|
|
29
28
|
body?: string;
|
|
30
29
|
};
|
package/dist/verification.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NId, ProfileObject } from "./raytio";
|
|
2
|
-
export
|
|
2
|
+
export type VerificationPayload<WithValue extends boolean> = {
|
|
3
3
|
field: string;
|
|
4
4
|
schema?: string;
|
|
5
5
|
metadata?: Record<string, unknown>;
|
|
@@ -28,7 +28,7 @@ export declare type VerificationPayload<WithValue extends boolean> = {
|
|
|
28
28
|
* use `Verification<true>`, otherwise just `Verification`. Verifications from
|
|
29
29
|
* the DataContext don't have the value.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export type Verification<WithValue extends boolean = false> = ProfileObject<{
|
|
32
32
|
field: string;
|
|
33
33
|
n_id: NId;
|
|
34
34
|
/**
|
|
@@ -64,7 +64,7 @@ export declare enum POVerification {
|
|
|
64
64
|
Loading = 70007
|
|
65
65
|
}
|
|
66
66
|
/** These `n_id`s point to service provider profile objects */
|
|
67
|
-
export
|
|
67
|
+
export type VerificationProvider = {
|
|
68
68
|
verifierNId?: NId;
|
|
69
69
|
dataSourceNId?: NId;
|
|
70
70
|
serviceProviderNId?: NId;
|
|
@@ -72,7 +72,7 @@ export declare type VerificationProvider = {
|
|
|
72
72
|
date?: Date;
|
|
73
73
|
};
|
|
74
74
|
/** This is what @raytio/core exposes, which is more useable than @see Verification */
|
|
75
|
-
export
|
|
75
|
+
export type RealVer = {
|
|
76
76
|
fieldName: string;
|
|
77
77
|
value: unknown;
|
|
78
78
|
provider: VerificationProvider;
|
package/dist/wizard.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AId } from "./raytio";
|
|
2
2
|
/** configuration data for a single wizard page (@see WizardConfig) */
|
|
3
|
-
export
|
|
3
|
+
export type WizardPage = {
|
|
4
4
|
/** if undefined, the schema title will be used */
|
|
5
5
|
name?: string | symbol;
|
|
6
6
|
filter: "oneOf" | "anyOf";
|
|
@@ -54,10 +54,10 @@ export declare type WizardPage = {
|
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
56
56
|
* when a form link is generated, this is what gets saved on the API.
|
|
57
|
-
* Each value can be
|
|
57
|
+
* Each value can be overridden in the query parameters. If specified
|
|
58
58
|
* in the query parameters, it needs to be base64 and/or url encoded.
|
|
59
59
|
*/
|
|
60
|
-
export
|
|
60
|
+
export type WizardConfig = {
|
|
61
61
|
a_id: AId;
|
|
62
62
|
pages: WizardPage[];
|
|
63
63
|
/** whether the user can change the reference, if there is one in the QP */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raytio/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"types": "index",
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"docs": "sh ../../scripts/generate-docs.sh",
|
|
15
15
|
"test": "npm run build",
|
|
16
|
-
"build": "tsc &&
|
|
16
|
+
"build": "tsc && rimraf dist/__tests__"
|
|
17
17
|
}
|
|
18
18
|
}
|
package/src/__tests__/schema.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable fp/no-let, @typescript-eslint/no-unused-vars */
|
|
2
|
-
import { Schema, SchemaField,
|
|
2
|
+
import { Schema, SchemaField, WrappedSchema } from "..";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* this file is not run, it is just compiled by tsc
|
|
@@ -8,7 +8,7 @@ import { Schema, SchemaField, SchemaMetadata } from "..";
|
|
|
8
8
|
|
|
9
9
|
let schema: Schema;
|
|
10
10
|
let schemaField: SchemaField;
|
|
11
|
-
let
|
|
11
|
+
let wrappedSchema: WrappedSchema;
|
|
12
12
|
|
|
13
13
|
function f() {
|
|
14
14
|
// @ts-expect-error SchemaField should not extend Schema
|
|
@@ -16,8 +16,8 @@ function f() {
|
|
|
16
16
|
// @ts-expect-error Schema should not extend SchemaField
|
|
17
17
|
const test2: Schema = schemaField;
|
|
18
18
|
|
|
19
|
-
// @ts-expect-error
|
|
20
|
-
const test3:
|
|
21
|
-
// @ts-expect-error Schema should not extend
|
|
22
|
-
const test4: Schema =
|
|
19
|
+
// @ts-expect-error WrappedSchema should not extend Schema
|
|
20
|
+
const test3: WrappedSchema = schema;
|
|
21
|
+
// @ts-expect-error Schema should not extend WrappedSchema
|
|
22
|
+
const test4: Schema = wrappedSchema;
|
|
23
23
|
}
|
package/src/raytio.ts
CHANGED
|
@@ -21,6 +21,8 @@ export type UId = StringWithIdentity<"UId">;
|
|
|
21
21
|
export type AId = StringWithIdentity<"AId">;
|
|
22
22
|
/** An `o_id` is the ID of an @see Organization */
|
|
23
23
|
export type OId = StringWithIdentity<"OId">;
|
|
24
|
+
/** A `wi_id` is the ID of a @see Webhook */
|
|
25
|
+
export type WId = StringWithIdentity<"WId">;
|
|
24
26
|
|
|
25
27
|
export type DataTypes =
|
|
26
28
|
| "string"
|
|
@@ -85,6 +87,7 @@ export type UrnNodeType =
|
|
|
85
87
|
| "user"
|
|
86
88
|
| "profile_object"
|
|
87
89
|
| "instance"
|
|
90
|
+
| "schema"
|
|
88
91
|
| "temp_object" // this will only be encountered in backend environments which lack access to an applicationDecryptor, or from RapidShare
|
|
89
92
|
| "document";
|
|
90
93
|
|
|
@@ -115,6 +118,13 @@ export type Lookup = {
|
|
|
115
118
|
requires_2FA?: boolean;
|
|
116
119
|
};
|
|
117
120
|
|
|
121
|
+
export type AATags =
|
|
122
|
+
| "type:client_only"
|
|
123
|
+
| "type:share_with_new_user"
|
|
124
|
+
// heritage
|
|
125
|
+
| `related_service_provider:n_id:${NId}`
|
|
126
|
+
| "ServiceProvider"; // TODO: document or delete
|
|
127
|
+
|
|
118
128
|
export type AA = {
|
|
119
129
|
a_id: AId;
|
|
120
130
|
name: string;
|
|
@@ -125,7 +135,7 @@ export type AA = {
|
|
|
125
135
|
/** Easy to use AA logo url for pasting inot emails */
|
|
126
136
|
picture_url?: string;
|
|
127
137
|
scopes?: string[];
|
|
128
|
-
tags?:
|
|
138
|
+
tags?: AATags[];
|
|
129
139
|
callback_uri?: string[];
|
|
130
140
|
/** markdown or string help information including [phoneNumber || email] */
|
|
131
141
|
aa_help?: string;
|
|
@@ -135,7 +145,7 @@ export type AA = {
|
|
|
135
145
|
};
|
|
136
146
|
/** the n_id of the associated service provider */
|
|
137
147
|
service_provider_n_id?: NId;
|
|
138
|
-
/** the id of the associated
|
|
148
|
+
/** the id of the associated organization */
|
|
139
149
|
org_id: OId;
|
|
140
150
|
|
|
141
151
|
/** configuration for the submission rules */
|
|
@@ -146,7 +156,7 @@ export type AA = {
|
|
|
146
156
|
auth_list_enabled?: boolean;
|
|
147
157
|
|
|
148
158
|
/** @internal */
|
|
149
|
-
|
|
159
|
+
transitions?: unknown[];
|
|
150
160
|
};
|
|
151
161
|
|
|
152
162
|
export type Instance = {
|
|
@@ -190,6 +200,11 @@ export type Instance = {
|
|
|
190
200
|
};
|
|
191
201
|
};
|
|
192
202
|
relationships?: Relationship[];
|
|
203
|
+
|
|
204
|
+
/** added by the client once it calculates the score */
|
|
205
|
+
// Defined as `unknown` instead of `ScoreResult` because it could be nonsense,
|
|
206
|
+
// or a deprected version of `ScoreResult`.
|
|
207
|
+
score?: unknown;
|
|
193
208
|
};
|
|
194
209
|
|
|
195
210
|
/**
|
|
@@ -211,6 +226,16 @@ export type Organization = {
|
|
|
211
226
|
customer: Record<string, unknown>;
|
|
212
227
|
};
|
|
213
228
|
|
|
229
|
+
/** @internal some APIs now return extra info */
|
|
230
|
+
export type FullOrg = {
|
|
231
|
+
id: OId;
|
|
232
|
+
organization: Omit<Organization, "id">;
|
|
233
|
+
/** 🧙♂️ */
|
|
234
|
+
gandalf: unknown;
|
|
235
|
+
stripe: { customer: unknown };
|
|
236
|
+
centrix_credentials: unknown;
|
|
237
|
+
};
|
|
238
|
+
|
|
214
239
|
/** validation data returned by preVerify (part of the extract&map API) */
|
|
215
240
|
export type Validation = {
|
|
216
241
|
score: number;
|
|
@@ -227,3 +252,40 @@ export type Validation = {
|
|
|
227
252
|
};
|
|
228
253
|
};
|
|
229
254
|
};
|
|
255
|
+
|
|
256
|
+
export type WebhookStatus = "subscribed" | "pending" | "unsubscribe_failed";
|
|
257
|
+
|
|
258
|
+
export type Webhook = {
|
|
259
|
+
wi_id: WId;
|
|
260
|
+
/** n_id of "the webhook provider which can be set up against a service provider" */
|
|
261
|
+
provider_webhook_id: NId;
|
|
262
|
+
/** not sure what this is */
|
|
263
|
+
provider_webhook_subscription_id: NId;
|
|
264
|
+
status: WebhookStatus;
|
|
265
|
+
/** ISO Date */
|
|
266
|
+
date_created: string;
|
|
267
|
+
/** ISO Date */
|
|
268
|
+
date_updated: string;
|
|
269
|
+
|
|
270
|
+
webhook_filter_schema: {
|
|
271
|
+
operator: string;
|
|
272
|
+
field_value: string;
|
|
273
|
+
field_name: string;
|
|
274
|
+
};
|
|
275
|
+
webhook_action: { webhook_action_type: string }[];
|
|
276
|
+
webhook_filter_source: string;
|
|
277
|
+
webhook_field_mapping_schema: {
|
|
278
|
+
[key: string]: string;
|
|
279
|
+
};
|
|
280
|
+
webhook_processing_rules: unknown;
|
|
281
|
+
|
|
282
|
+
provider_subscription_credentials: unknown;
|
|
283
|
+
provider_signature_check_enabled: boolean;
|
|
284
|
+
provider_signature_credentials: unknown;
|
|
285
|
+
|
|
286
|
+
subscribe_log?: {
|
|
287
|
+
date: string;
|
|
288
|
+
response_status_code: number;
|
|
289
|
+
response_payload: Json;
|
|
290
|
+
}[];
|
|
291
|
+
};
|
package/src/schema.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { AA, DataTypes,
|
|
1
|
+
import { AA, DataTypes, Organization, Urn } from "./raytio";
|
|
2
2
|
import { WizardConfig } from "./wizard";
|
|
3
3
|
|
|
4
4
|
/** should be renamed since this applies to ConditionallyVerifiable */
|
|
5
5
|
export type ConditionallyRequired = {
|
|
6
6
|
field: string;
|
|
7
|
+
// see `isConditionMet` for how this syntax works
|
|
7
8
|
if: {
|
|
8
|
-
[fieldName: string]: string[];
|
|
9
|
+
[fieldName: string]: (string | number | boolean)[];
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -24,7 +25,6 @@ export type SchemaFieldTag =
|
|
|
24
25
|
| "display:quoting"
|
|
25
26
|
| "display:customModal"
|
|
26
27
|
| "display:terms_conditions"
|
|
27
|
-
| "display:showOnWizard" // added by #837, TODO: document
|
|
28
28
|
| `display:main_media:${string}` // property name to determine what image to display
|
|
29
29
|
// date picker components
|
|
30
30
|
| "date_component:day"
|
|
@@ -67,7 +67,7 @@ export type SchemaField = {
|
|
|
67
67
|
examples?: unknown[];
|
|
68
68
|
tags?: SchemaFieldTag[];
|
|
69
69
|
type?: DataTypes;
|
|
70
|
-
enum?: string[];
|
|
70
|
+
enum?: (string | number | boolean)[];
|
|
71
71
|
maximum?: number;
|
|
72
72
|
minimum?: number;
|
|
73
73
|
/** @deprecated raytio's usage not documented */
|
|
@@ -79,7 +79,7 @@ export type SchemaField = {
|
|
|
79
79
|
pattern?: string;
|
|
80
80
|
/** whether the field should be encrypted */
|
|
81
81
|
encrypt?: boolean;
|
|
82
|
-
format?: "date" | "date-time";
|
|
82
|
+
format?: "date" | "date-time" | "uri";
|
|
83
83
|
contentMediaType?: string;
|
|
84
84
|
contentEncoding?: "base64";
|
|
85
85
|
/** `items` is used for nested arrays, (while `properties` is used for nested objects) */
|
|
@@ -107,7 +107,7 @@ export type SchemaField = {
|
|
|
107
107
|
[fieldName: string]: string[];
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
allOf?: [{ $ref: string },
|
|
110
|
+
allOf?: [{ $ref: string }, ServerSchemaField];
|
|
111
111
|
|
|
112
112
|
/** only checkbox uses this prop */
|
|
113
113
|
content?: string;
|
|
@@ -151,15 +151,12 @@ export type SchemaField = {
|
|
|
151
151
|
image_silhouette?: string;
|
|
152
152
|
};
|
|
153
153
|
|
|
154
|
-
/**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
*/
|
|
158
|
-
export type
|
|
159
|
-
|
|
160
|
-
$id?: string;
|
|
161
|
-
$schema?: string;
|
|
162
|
-
n_id?: NId;
|
|
154
|
+
/** the only difference between the client & server's definition is that the client adds `$prop` */
|
|
155
|
+
export type ServerSchemaField = Omit<SchemaField, "$prop">;
|
|
156
|
+
|
|
157
|
+
/** not exported. Attributes that are identical in both client schema & server schema */
|
|
158
|
+
export type CommonSchemaAttributes = {
|
|
159
|
+
type?: DataTypes;
|
|
163
160
|
|
|
164
161
|
/** these fields will always exist on schema */
|
|
165
162
|
name: string;
|
|
@@ -173,47 +170,14 @@ export type Schema = {
|
|
|
173
170
|
* forms that accept different types of similar documents.
|
|
174
171
|
*/
|
|
175
172
|
schema_group?: string;
|
|
176
|
-
/** the localized title of the `schema_group`. added by the client */
|
|
177
|
-
group_title?: string;
|
|
178
|
-
|
|
179
|
-
/** @deprecated not sure why a schema would have this, only fields should */
|
|
180
|
-
$ref?: string;
|
|
181
|
-
|
|
182
|
-
version?: string;
|
|
183
|
-
/** whether the `version` is the latest version */
|
|
184
|
-
version_current?: boolean;
|
|
185
173
|
|
|
186
174
|
tags?: SchemaTag[];
|
|
187
|
-
/** originally `string[]`, the client modifies this */
|
|
188
|
-
verified_fields?: (string | ConditionallyRequired)[];
|
|
189
|
-
|
|
190
|
-
wasExpandedByClient?: boolean;
|
|
191
|
-
/** added by client */
|
|
192
|
-
required?: (string | ConditionallyRequired)[];
|
|
193
|
-
|
|
194
|
-
type?: DataTypes;
|
|
195
|
-
definitions?: Record<string, { $ref: Urn }>;
|
|
196
|
-
allOf?: {
|
|
197
|
-
$ref?: string;
|
|
198
|
-
if?: Schema;
|
|
199
|
-
// we don't suport else (yet)
|
|
200
|
-
then?: Schema;
|
|
201
|
-
}[];
|
|
202
|
-
|
|
203
|
-
/** If this tag exists, the schema is deprecated. ISO Date. */
|
|
204
|
-
end_date?: string;
|
|
205
|
-
|
|
206
|
-
/** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
|
|
207
|
-
properties: {
|
|
208
|
-
[fieldName: string]: SchemaField;
|
|
209
|
-
};
|
|
210
175
|
|
|
211
176
|
/* any overrides can be specfied per field or for the whole schema */
|
|
212
177
|
i18n?: {
|
|
213
178
|
[locale: string]: {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
// not that for entries that start in "group:" or $loading_, only the title field will be used.
|
|
179
|
+
$schema: { title: string; title_plural?: string; description?: string };
|
|
180
|
+
// note that for entries that start in "group:" or $loading_, only the title field will be used.
|
|
217
181
|
// ^ the exception is `group:{GROUP_NAME}:{SUB_GROUP}.field` which is used for the combined field title/desc
|
|
218
182
|
// normal fields can specify any field attributes to override.
|
|
219
183
|
|
|
@@ -229,22 +193,11 @@ export type Schema = {
|
|
|
229
193
|
$loading_delete_pending_ver: { title: string };
|
|
230
194
|
$loading_pending_ver_resubmit: { title: string };
|
|
231
195
|
|
|
232
|
-
[fieldNameOrGroupName: string]:
|
|
196
|
+
[fieldNameOrGroupName: string]: ServerSchemaField & {
|
|
233
197
|
title_plural?: string;
|
|
234
198
|
};
|
|
235
199
|
};
|
|
236
200
|
};
|
|
237
|
-
/** @internal the client adds this after processing the i18n property */
|
|
238
|
-
groupNames?: Record<string, string>;
|
|
239
|
-
/** @internal added by the client to inform downstream components which locale from schema.i18n was used */
|
|
240
|
-
clientLocale?: string;
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* @internal
|
|
244
|
-
* the estimated loading times in seconds for various API calls. The client adds
|
|
245
|
-
* this field after processing the schema tags.
|
|
246
|
-
*/
|
|
247
|
-
timing?: Record<"extract" | "live_person" | "verify_pending_delay", number>;
|
|
248
201
|
|
|
249
202
|
relationships?: {
|
|
250
203
|
relationship_name: string;
|
|
@@ -287,12 +240,6 @@ export type Schema = {
|
|
|
287
240
|
expand?: { fields: string[]; label: string }[];
|
|
288
241
|
};
|
|
289
242
|
|
|
290
|
-
/** @internal @deprecated do not use */
|
|
291
|
-
unexpanded_allOf?: never;
|
|
292
|
-
|
|
293
|
-
/** @internal @deprecated do not use */
|
|
294
|
-
unexpanded_properties?: never;
|
|
295
|
-
|
|
296
243
|
/** only the schema used for the onboarding wizard have this property */
|
|
297
244
|
onboard_properties?: {
|
|
298
245
|
/** Profile Objects that should be created */
|
|
@@ -332,32 +279,88 @@ export type Schema = {
|
|
|
332
279
|
};
|
|
333
280
|
};
|
|
334
281
|
|
|
335
|
-
/**
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
282
|
+
/**
|
|
283
|
+
* Raytio's variant of JSON Schema, as used by the client. It is a modified version
|
|
284
|
+
* of what the API returns.
|
|
285
|
+
*/
|
|
286
|
+
export type Schema = CommonSchemaAttributes & {
|
|
287
|
+
/** the localized title of the `schema_group`. added by the client */
|
|
288
|
+
group_title?: string;
|
|
289
|
+
|
|
290
|
+
/** originally `string[]`, the client modifies this */
|
|
291
|
+
verified_fields?: (string | ConditionallyRequired)[];
|
|
292
|
+
|
|
293
|
+
/** originally `string[]`, the client modifies this */
|
|
294
|
+
required?: (string | ConditionallyRequired)[];
|
|
295
|
+
|
|
296
|
+
/** added by client */
|
|
297
|
+
wasExpandedByClient?: boolean;
|
|
298
|
+
|
|
299
|
+
/** ISO Date. Copied from @see WrappedSchema */
|
|
300
|
+
start_date?: string;
|
|
301
|
+
/** ISO Date. Copied from @see WrappedSchema If this tag exists, the schema is deprecated */
|
|
302
|
+
end_date?: string;
|
|
303
|
+
|
|
304
|
+
/** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
|
|
305
|
+
properties: {
|
|
306
|
+
[fieldName: string]: SchemaField;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
/** the client adds this after processing the i18n property */
|
|
310
|
+
groupNames?: Record<string, string>;
|
|
311
|
+
|
|
312
|
+
/** added by the client to inform downstream components which locale from schema.i18n was used */
|
|
313
|
+
clientLocale?: string;
|
|
314
|
+
|
|
315
|
+
/** added by the client, copied from @see WrappedSchema */
|
|
316
|
+
version: string;
|
|
317
|
+
|
|
353
318
|
/**
|
|
354
|
-
*
|
|
355
|
-
*
|
|
319
|
+
* the estimated loading times in seconds for various API calls. The client adds
|
|
320
|
+
* this field after processing the schema tags.
|
|
356
321
|
*/
|
|
357
|
-
|
|
322
|
+
timing?: Record<"extract" | "live_person" | "verify_pending_delay", number>;
|
|
358
323
|
|
|
359
|
-
|
|
360
|
-
|
|
324
|
+
/** added by the client. If true, this should be shown to the client */
|
|
325
|
+
isProfileSchema?: boolean;
|
|
326
|
+
|
|
327
|
+
/** added by the client. If true, this schema somehow relates to legacy service providers */
|
|
328
|
+
isSpSchema?: boolean;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
/** This is what's returned by the API */
|
|
332
|
+
export type WrappedSchema = {
|
|
333
|
+
active: true;
|
|
334
|
+
/** ISO Date */
|
|
335
|
+
start_date: string;
|
|
336
|
+
/** ISO Date. If this tag exists, the schema is deprecated. */
|
|
337
|
+
end_date: string;
|
|
338
|
+
name: string;
|
|
339
|
+
type: "ss" | "ps" | "us";
|
|
340
|
+
version: string;
|
|
341
|
+
/** whether the \`version\` is the latest version */
|
|
342
|
+
version_current: boolean;
|
|
343
|
+
schema: CommonSchemaAttributes & {
|
|
344
|
+
/** @deprecated don't use this */
|
|
345
|
+
$id?: string;
|
|
346
|
+
/** @deprecated don't use this */
|
|
347
|
+
$schema?: string;
|
|
348
|
+
|
|
349
|
+
definitions?: Record<string, { $ref: Urn }>;
|
|
350
|
+
allOf?: {
|
|
351
|
+
$ref?: string;
|
|
352
|
+
if?: Partial<WrappedSchema["schema"]>;
|
|
353
|
+
// we don't suport else (yet)
|
|
354
|
+
then?: Partial<WrappedSchema["schema"]>;
|
|
355
|
+
}[];
|
|
356
|
+
|
|
357
|
+
properties: {
|
|
358
|
+
[fieldName: string]: ServerSchemaField;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
required?: string[];
|
|
362
|
+
verified_fields?: string[];
|
|
363
|
+
};
|
|
361
364
|
};
|
|
362
365
|
|
|
363
366
|
/** @ignore */
|
package/src/theme.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type Colors = {
|
|
|
10
10
|
raytioOrangeText: string;
|
|
11
11
|
raytioOrangeUi: string;
|
|
12
12
|
raytioOrangeHover: string;
|
|
13
|
-
/**
|
|
13
|
+
/** ✨ */
|
|
14
14
|
raytioOrangeShade: string;
|
|
15
15
|
successGreen: string;
|
|
16
16
|
loadingYellow: string;
|
|
@@ -21,7 +21,6 @@ export type Colors = {
|
|
|
21
21
|
sariShade: string;
|
|
22
22
|
feelingHugged: string;
|
|
23
23
|
silverShell: string;
|
|
24
|
-
blankBackground: string;
|
|
25
24
|
blank: string;
|
|
26
25
|
};
|
|
27
26
|
|
package/src/wizard.ts
CHANGED
|
@@ -76,7 +76,7 @@ export type WizardPage = {
|
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* when a form link is generated, this is what gets saved on the API.
|
|
79
|
-
* Each value can be
|
|
79
|
+
* Each value can be overridden in the query parameters. If specified
|
|
80
80
|
* in the query parameters, it needs to be base64 and/or url encoded.
|
|
81
81
|
*/
|
|
82
82
|
export type WizardConfig = {
|