@raytio/types 7.1.0 → 7.2.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 +183 -48
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/orgs.d.ts +84 -0
- package/dist/orgs.js +2 -0
- package/dist/raytio.d.ts +33 -24
- package/dist/schema.d.ts +18 -6
- package/dist/verification.d.ts +34 -2
- package/dist/verification.js +13 -3
- package/dist/wizard.d.ts +4 -0
- package/package.json +1 -1
- package/src/__tests__/raytio.typetest.ts +6 -0
- package/src/index.ts +1 -0
- package/src/orgs.ts +86 -0
- package/src/raytio.ts +43 -26
- package/src/schema.ts +26 -6
- package/src/verification.ts +38 -2
- package/src/wizard.ts +6 -0
- /package/src/__tests__/{schema.ts → schema.typetest.ts} +0 -0
package/README.md
CHANGED
|
@@ -30,16 +30,17 @@ Hovering over the type in VSCode will display documentation and available proper
|
|
|
30
30
|
|
|
31
31
|
- [FieldVerification](enums/FieldVerification.md)
|
|
32
32
|
- [POVerification](enums/POVerification.md)
|
|
33
|
+
- [SafeHarbourCode](enums/SafeHarbourCode.md)
|
|
33
34
|
|
|
34
35
|
### Type Aliases
|
|
35
36
|
|
|
36
37
|
- [AA](#aa)
|
|
37
38
|
- [AATag](#aatag)
|
|
38
39
|
- [AId](#aid)
|
|
39
|
-
- [AnyId](#anyid)
|
|
40
40
|
- [Colors](#colors)
|
|
41
41
|
- [CommonSchemaAttributes](#commonschemaattributes)
|
|
42
42
|
- [ConditionallyRequired](#conditionallyrequired)
|
|
43
|
+
- [ContactPoint](#contactpoint)
|
|
43
44
|
- [CustomFonts](#customfonts)
|
|
44
45
|
- [DataTypes](#datatypes)
|
|
45
46
|
- [Encrypted](#encrypted)
|
|
@@ -47,19 +48,23 @@ Hovering over the type in VSCode will display documentation and available proper
|
|
|
47
48
|
- [IId](#iid)
|
|
48
49
|
- [Instance](#instance)
|
|
49
50
|
- [LId](#lid)
|
|
51
|
+
- [Location](#location)
|
|
50
52
|
- [Lookup](#lookup)
|
|
51
53
|
- [NId](#nid)
|
|
52
54
|
- [OId](#oid)
|
|
53
55
|
- [Organization](#organization)
|
|
54
56
|
- [PId](#pid)
|
|
57
|
+
- [Party](#party)
|
|
58
|
+
- [PartyMetadata](#partymetadata)
|
|
59
|
+
- [PartySite](#partysite)
|
|
55
60
|
- [ProfileObject](#profileobject)
|
|
56
|
-
- [Properties](#properties)
|
|
57
61
|
- [RealVer](#realver)
|
|
58
62
|
- [Relationship](#relationship)
|
|
59
63
|
- [Schema](#schema)
|
|
60
64
|
- [SchemaField](#schemafield)
|
|
61
65
|
- [SchemaFieldTag](#schemafieldtag)
|
|
62
66
|
- [SchemaTag](#schematag)
|
|
67
|
+
- [SchemaType](#schematype)
|
|
63
68
|
- [ServerSchemaField](#serverschemafield)
|
|
64
69
|
- [SubmissionStatus](#submissionstatus)
|
|
65
70
|
- [UId](#uid)
|
|
@@ -90,16 +95,23 @@ Hovering over the type in VSCode will display documentation and available proper
|
|
|
90
95
|
| `a_id` | [`AId`](#aid) | - |
|
|
91
96
|
| `aa_help?` | `string` | markdown or string help information including [phoneNumber \|\| email] |
|
|
92
97
|
| `aa_introduction?` | `string` | If a user signs up while completing this form, this message will be sent in the sign up email. |
|
|
98
|
+
| `active?` | `boolean` | - |
|
|
93
99
|
| `auth_list_enabled?` | `boolean` | if true, only specific email addresses can submit the form |
|
|
94
100
|
| `callback_uri?` | `string`[] | - |
|
|
95
101
|
| `description?` | `string` | - |
|
|
102
|
+
| `end_date?` | `Date` | - |
|
|
103
|
+
| `key?` | `string` | - |
|
|
104
|
+
| `logout_uri?` | `string`[] | - |
|
|
105
|
+
| `metadata?` | `unknown` | - |
|
|
96
106
|
| `name` | `string` | - |
|
|
97
107
|
| `org_id` | [`OId`](#oid) | the id of the associated organization |
|
|
98
|
-
| `picture?` | [`Urn`](#urn) |
|
|
99
|
-
| `picture_url?` | `string` | Easy to use AA logo url for pasting
|
|
108
|
+
| `picture?` | [`Urn`](#urn) | **`Deprecated`** see !2101 |
|
|
109
|
+
| `picture_url?` | `string` | Easy to use AA logo url for pasting into emails |
|
|
100
110
|
| `ruleset?` | `unknown` | configuration for the submission rules |
|
|
101
111
|
| `scopes?` | `string`[] | - |
|
|
112
|
+
| `secret?` | `unknown` | - |
|
|
102
113
|
| `service_provider_n_id?` | [`NId`](#nid) | the n_id of the associated service provider |
|
|
114
|
+
| `start_date?` | `Date` | Currently Unused Attributes |
|
|
103
115
|
| `tags?` | [`AATag`](#aatag)[] | - |
|
|
104
116
|
| `theme?` | { `colors?`: [`Colors`](#colors) ; `font?`: [`CustomFonts`](modules.md#customfonts) } | - |
|
|
105
117
|
| `theme.colors?` | [`Colors`](#colors) | - |
|
|
@@ -121,12 +133,6 @@ An `a_id` is the ID of an [AA](#aa)
|
|
|
121
133
|
|
|
122
134
|
___
|
|
123
135
|
|
|
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)
|
|
127
|
-
|
|
128
|
-
___
|
|
129
|
-
|
|
130
136
|
### Colors
|
|
131
137
|
|
|
132
138
|
Ƭ **Colors**: `Object`
|
|
@@ -171,6 +177,7 @@ not exported. Attributes that are identical in both client schema & server schem
|
|
|
171
177
|
| Name | Type | Description |
|
|
172
178
|
| :------ | :------ | :------ |
|
|
173
179
|
| `description` | `string` | - |
|
|
180
|
+
| `description_decorator?` | ``"md"`` | specifies that the description is formatted in markdown |
|
|
174
181
|
| `display?` | { `expand?`: { `fields`: `string`[] ; `label`: `string` }[] ; `head_main?`: { `fields`: `string`[] ; `format?`: `string` } ; `head_sub?`: { `fields`: `string`[] ; `format?`: `string` } } | - |
|
|
175
182
|
| `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 |
|
|
176
183
|
| `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 |
|
|
@@ -179,8 +186,7 @@ not exported. Attributes that are identical in both client schema & server schem
|
|
|
179
186
|
| `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 |
|
|
180
187
|
| `display.head_sub.fields` | `string`[] | - |
|
|
181
188
|
| `display.head_sub.format?` | `string` | - |
|
|
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` } }; } | - |
|
|
183
|
-
| `name` | `string` | these fields will always exist on schema |
|
|
189
|
+
| `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_long_verification_message`: { `description?`: `string` ; `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` } }; } | - |
|
|
184
190
|
| `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 |
|
|
185
191
|
| `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 |
|
|
186
192
|
| `onboard_properties.profile_objects?` | { `properties`: `Record`<`string`, `unknown`\> ; `schema_name`: `string` }[] | Profile Objects that should be created |
|
|
@@ -188,10 +194,10 @@ not exported. Attributes that are identical in both client schema & server schem
|
|
|
188
194
|
| `onboard_properties.return_to?` | `string` | The relative path in the client to redirect to once finished. May include variables |
|
|
189
195
|
| `relationships?` | { `anyOf?`: `string`[] ; `direction`: ``"from"`` ; `multiple?`: `boolean` ; `oneOf?`: `string`[] ; `properties?`: { `[fieldName: string]`: [`SchemaField`](#schemafield); } ; `relationship_name`: `string` ; `required?`: `string`[] ; `required_relationship?`: `boolean` ; `type`: `string` }[] | - |
|
|
190
196
|
| `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. |
|
|
197
|
+
| `schema_type?` | [`SchemaType`](#schematype) | - |
|
|
191
198
|
| `tags?` | [`SchemaTag`](#schematag)[] | - |
|
|
192
|
-
| `title` | `string` |
|
|
199
|
+
| `title` | `string` | these fields will always exist on schema |
|
|
193
200
|
| `title_plural?` | `string` | plural version of the title |
|
|
194
|
-
| `type?` | [`DataTypes`](#datatypes) | - |
|
|
195
201
|
|
|
196
202
|
___
|
|
197
203
|
|
|
@@ -210,6 +216,35 @@ should be renamed since this applies to ConditionallyVerifiable
|
|
|
210
216
|
|
|
211
217
|
___
|
|
212
218
|
|
|
219
|
+
### ContactPoint
|
|
220
|
+
|
|
221
|
+
Ƭ **ContactPoint**: `Object`
|
|
222
|
+
|
|
223
|
+
A Contact Point for an Organization
|
|
224
|
+
|
|
225
|
+
#### Type declaration
|
|
226
|
+
|
|
227
|
+
| Name | Type |
|
|
228
|
+
| :------ | :------ |
|
|
229
|
+
| `active` | `boolean` |
|
|
230
|
+
| `contact_point_purpose` | `string` |
|
|
231
|
+
| `contact_point_type` | `string` |
|
|
232
|
+
| `e164` | `string` \| ``null`` |
|
|
233
|
+
| `e164_suffix` | `string` \| ``null`` |
|
|
234
|
+
| `e164_type` | `string` \| ``null`` |
|
|
235
|
+
| `email_address` | `string` |
|
|
236
|
+
| `email_address_preferred_format` | `string` |
|
|
237
|
+
| `end_date` | `string` |
|
|
238
|
+
| `id` | `string` |
|
|
239
|
+
| `metadata` | `unknown` |
|
|
240
|
+
| `start_date` | `string` |
|
|
241
|
+
| `to_table` | `string` |
|
|
242
|
+
| `url` | `string` \| ``null`` |
|
|
243
|
+
| `url_type` | `string` \| ``null`` |
|
|
244
|
+
| `uuid` | `string` \| `undefined` |
|
|
245
|
+
|
|
246
|
+
___
|
|
247
|
+
|
|
213
248
|
### CustomFonts
|
|
214
249
|
|
|
215
250
|
Ƭ **CustomFonts**: `Object`
|
|
@@ -279,17 +314,26 @@ ___
|
|
|
279
314
|
| `_state?` | [`SubmissionStatus`](#submissionstatus) | **`Deprecated`** The status of a submission |
|
|
280
315
|
| `a_id` | [`AId`](#aid) | ID of the access application this submission was made to |
|
|
281
316
|
| `aa_name` | `string` | name of the access application this submission was made to |
|
|
317
|
+
| `aack_id?` | `string` | Key (Can be used to retrieve instance) |
|
|
318
|
+
| `active?` | `boolean` | Activity Status |
|
|
282
319
|
| `confirmation_code` | `string` | Code that validates information has been shared |
|
|
283
320
|
| `data_provider_email` | `string` | Email of user who shared the data |
|
|
321
|
+
| `device_id?` | `unknown` | Device Id |
|
|
284
322
|
| `end_date` | `string` | Latest date in which the shared information was available |
|
|
285
323
|
| `i_id` | [`IId`](#iid) | Access application instance ID |
|
|
324
|
+
| `instance_version?` | `unknown` | Instance Version |
|
|
286
325
|
| `keys` | { `[nId: NId]`: { `[fieldName: string]`: { `data`: `string` ; `n_id`: [`NId`](#nid) }; }; } | - |
|
|
287
|
-
| `
|
|
326
|
+
| `metadata?` | `unknown` | Metadata |
|
|
327
|
+
| `platform_footer_html?` | `unknown` | Footer Html |
|
|
328
|
+
| `previous_state?` | [`SubmissionStatus`](#submissionstatus) | Previous status of the shared information |
|
|
288
329
|
| `profile_objects` | [`ProfileObject`](#profileobject)[] | data associated is access application's instance |
|
|
289
330
|
| `reference` | `string` | reference provided by the user who shared the data |
|
|
331
|
+
| `related_offers?` | `unknown` | Related Offers |
|
|
332
|
+
| `related_service_types?` | `unknown` | Related Service Types |
|
|
290
333
|
| `relationships?` | [`Relationship`](#relationship)[] | - |
|
|
291
334
|
| `score?` | `unknown` | added by the client once it calculates the score |
|
|
292
335
|
| `service_provider_n_id?` | [`NId`](#nid) | Service provider ID |
|
|
336
|
+
| `source_ip?` | `unknown` | Source IP |
|
|
293
337
|
| `start_date` | `string` | Earliest date on which the shared information was available |
|
|
294
338
|
| `state` | [`SubmissionStatus`](#submissionstatus) | The status of a submission |
|
|
295
339
|
| `sub_service_provider_hash?` | `string` | Hash of the Service Provider ID |
|
|
@@ -305,6 +349,45 @@ An `l_id` is the ID of any data stored in the KV-Store
|
|
|
305
349
|
|
|
306
350
|
___
|
|
307
351
|
|
|
352
|
+
### Location
|
|
353
|
+
|
|
354
|
+
Ƭ **Location**: `Object`
|
|
355
|
+
|
|
356
|
+
An Organization Location
|
|
357
|
+
|
|
358
|
+
#### Type declaration
|
|
359
|
+
|
|
360
|
+
| Name | Type |
|
|
361
|
+
| :------ | :------ |
|
|
362
|
+
| `active` | `boolean` |
|
|
363
|
+
| `address_line_1` | `string` \| ``null`` |
|
|
364
|
+
| `address_line_2` | `string` \| ``null`` |
|
|
365
|
+
| `address_line_3` | `string` \| ``null`` |
|
|
366
|
+
| `address_line_4` | `string` \| ``null`` |
|
|
367
|
+
| `administrative_area_level_1` | `string` \| ``null`` |
|
|
368
|
+
| `administrative_area_level_2` | `string` \| ``null`` |
|
|
369
|
+
| `administrative_area_level_3` | `string` \| ``null`` |
|
|
370
|
+
| `city` | `string` \| ``null`` |
|
|
371
|
+
| `country` | `string` \| ``null`` |
|
|
372
|
+
| `end_date` | `string` |
|
|
373
|
+
| `geolocation` | `string` \| ``null`` |
|
|
374
|
+
| `geolocation_outline` | `string` \| ``null`` |
|
|
375
|
+
| `id` | `string` |
|
|
376
|
+
| `locality` | `string` \| ``null`` |
|
|
377
|
+
| `location_description` | `string` \| ``null`` |
|
|
378
|
+
| `location_name` | `string` |
|
|
379
|
+
| `metadata` | `unknown` |
|
|
380
|
+
| `postal_code` | `string` |
|
|
381
|
+
| `postal_code_suffix` | `string` \| ``null`` |
|
|
382
|
+
| `premise` | `string` \| ``null`` |
|
|
383
|
+
| `region` | `string` \| ``null`` |
|
|
384
|
+
| `route` | `string` \| ``null`` |
|
|
385
|
+
| `start_date` | `string` |
|
|
386
|
+
| `street_number` | `string` \| ``null`` |
|
|
387
|
+
| `subpremise` | `string` \| ``null`` |
|
|
388
|
+
|
|
389
|
+
___
|
|
390
|
+
|
|
308
391
|
### Lookup
|
|
309
392
|
|
|
310
393
|
Ƭ **Lookup**: `Object`
|
|
@@ -349,14 +432,8 @@ NOTE: this is different to how the schema defines an Organization. **The schema
|
|
|
349
432
|
|
|
350
433
|
| Name | Type |
|
|
351
434
|
| :------ | :------ |
|
|
352
|
-
| `address` |
|
|
353
|
-
| `
|
|
354
|
-
| `address.country` | `string` |
|
|
355
|
-
| `address.locationType` | `string` |
|
|
356
|
-
| `address.region` | `string` |
|
|
357
|
-
| `address.street1` | `string` |
|
|
358
|
-
| `address.street2` | `string` |
|
|
359
|
-
| `customer` | `Record`<`string`, `unknown`\> |
|
|
435
|
+
| `address` | `unknown` |
|
|
436
|
+
| `customer` | `unknown` |
|
|
360
437
|
| `email` | `string` |
|
|
361
438
|
| `id` | [`OId`](#oid) |
|
|
362
439
|
| `name` | `string` |
|
|
@@ -371,41 +448,89 @@ A `p_id` is the ID of a [Relationship](#relationship)
|
|
|
371
448
|
|
|
372
449
|
___
|
|
373
450
|
|
|
374
|
-
###
|
|
451
|
+
### Party
|
|
375
452
|
|
|
376
|
-
Ƭ **
|
|
453
|
+
Ƭ **Party**: `Object`
|
|
377
454
|
|
|
378
|
-
|
|
455
|
+
An Organisation
|
|
379
456
|
|
|
380
|
-
#### Type
|
|
457
|
+
#### Type declaration
|
|
381
458
|
|
|
382
459
|
| Name | Type |
|
|
383
460
|
| :------ | :------ |
|
|
384
|
-
| `
|
|
461
|
+
| `active` | `boolean` |
|
|
462
|
+
| `end_date` | `string` |
|
|
463
|
+
| `id` | `string` |
|
|
464
|
+
| `metadata` | [`PartyMetadata`](#partymetadata) |
|
|
465
|
+
| `party_description` | `string` |
|
|
466
|
+
| `party_name` | `string` |
|
|
467
|
+
| `party_number` | `number` |
|
|
468
|
+
| `party_type` | `string` |
|
|
469
|
+
| `start_date` | `string` |
|
|
470
|
+
|
|
471
|
+
___
|
|
472
|
+
|
|
473
|
+
### PartyMetadata
|
|
474
|
+
|
|
475
|
+
Ƭ **PartyMetadata**: `Object`
|
|
476
|
+
|
|
477
|
+
An Organizations credentials
|
|
385
478
|
|
|
386
479
|
#### Type declaration
|
|
387
480
|
|
|
388
481
|
| Name | Type |
|
|
389
482
|
| :------ | :------ |
|
|
390
|
-
| `
|
|
391
|
-
| `
|
|
392
|
-
| `
|
|
483
|
+
| `centrix_credentials` | `unknown` |
|
|
484
|
+
| `gandalf` | `unknown` |
|
|
485
|
+
| `stripe` | { `customer`: `unknown` } |
|
|
486
|
+
| `stripe.customer` | `unknown` |
|
|
393
487
|
|
|
394
488
|
___
|
|
395
489
|
|
|
396
|
-
###
|
|
490
|
+
### PartySite
|
|
491
|
+
|
|
492
|
+
Ƭ **PartySite**: `Object`
|
|
493
|
+
|
|
494
|
+
An Organization Site
|
|
495
|
+
|
|
496
|
+
#### Type declaration
|
|
497
|
+
|
|
498
|
+
| Name | Type |
|
|
499
|
+
| :------ | :------ |
|
|
500
|
+
| `active` | `boolean` |
|
|
501
|
+
| `end_date` | `string` |
|
|
502
|
+
| `id` | `string` |
|
|
503
|
+
| `location_number` | `number` |
|
|
504
|
+
| `metadata` | `unknown` |
|
|
505
|
+
| `party_id` | `string` |
|
|
506
|
+
| `party_site_description` | `string` \| ``null`` |
|
|
507
|
+
| `party_site_name` | `string` |
|
|
508
|
+
| `party_site_number` | `string` \| ``null`` |
|
|
509
|
+
| `party_use_primary` | `string` |
|
|
510
|
+
| `party_uses` | `string`[] |
|
|
511
|
+
| `start_date` | `string` |
|
|
397
512
|
|
|
398
|
-
|
|
513
|
+
___
|
|
399
514
|
|
|
400
|
-
|
|
401
|
-
May contain nested JSON and [Encrypted](#encrypted) properties.
|
|
515
|
+
### ProfileObject
|
|
402
516
|
|
|
403
|
-
|
|
404
|
-
`__signature` nor can they include the character sequence `<=>`.
|
|
517
|
+
Ƭ **ProfileObject**<`Properties`\>: `Object`
|
|
405
518
|
|
|
406
|
-
|
|
519
|
+
You can supply an option type argument if you know exactly what the properties will be
|
|
407
520
|
|
|
408
|
-
|
|
521
|
+
#### Type parameters
|
|
522
|
+
|
|
523
|
+
| Name | Type |
|
|
524
|
+
| :------ | :------ |
|
|
525
|
+
| `Properties` | `Json` |
|
|
526
|
+
|
|
527
|
+
#### Type declaration
|
|
528
|
+
|
|
529
|
+
| Name | Type |
|
|
530
|
+
| :------ | :------ |
|
|
531
|
+
| `labels` | `string`[] |
|
|
532
|
+
| `n_id` | [`NId`](#nid) |
|
|
533
|
+
| `properties` | `Properties` |
|
|
409
534
|
|
|
410
535
|
___
|
|
411
536
|
|
|
@@ -422,7 +547,7 @@ This is what @raytio/core exposes, which is more useable than [Verification](#ve
|
|
|
422
547
|
| `belongsToNId?` | [`NId`](#nid) | nId of the PO that the verification belongs to. Could be undefined |
|
|
423
548
|
| `expired` | `Date` \| ``false`` | If the verification has expired, it's the date that it expired on. Otherwise it's `false` |
|
|
424
549
|
| `fieldName` | `string` | - |
|
|
425
|
-
| `metadata?` | `
|
|
550
|
+
| `metadata?` | [`VerificationPayload`](#verificationpayload)<``false``\>[``"metadata"``] | arbitary metadata returned by the verifier |
|
|
426
551
|
| `nID` | [`NId`](#nid) | nId of the verification |
|
|
427
552
|
| `provider` | [`VerificationProvider`](#verificationprovider) | - |
|
|
428
553
|
| `signature` | `string` | - |
|
|
@@ -452,7 +577,7 @@ ___
|
|
|
452
577
|
|
|
453
578
|
### Schema
|
|
454
579
|
|
|
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` }
|
|
580
|
+
Ƭ **Schema**: [`CommonSchemaAttributes`](#commonschemaattributes) & { `clientLocale?`: `string` ; `end_date?`: `string` ; `groupNames?`: `Record`<`string`, `string`\> ; `group_title?`: `string` ; `isProfileSchema?`: `boolean` ; `isSpSchema?`: `boolean` ; `name`: `string` ; `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`\> ; `type?`: [`DataTypes`](modules.md#datatypes) ; `verified_fields?`: (`string` \| [`ConditionallyRequired`](modules.md#conditionallyrequired))[] ; `version`: `string` ; `wasExpandedByClient?`: `boolean` }
|
|
456
581
|
|
|
457
582
|
Raytio's variant of JSON Schema, as used by the client. It is a modified version
|
|
458
583
|
of what the API returns.
|
|
@@ -511,7 +636,7 @@ ___
|
|
|
511
636
|
|
|
512
637
|
### SchemaFieldTag
|
|
513
638
|
|
|
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"``
|
|
639
|
+
Ƭ **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"`` \| ``"action:require_webauthn"`` \| ``"verify:show_if_pending"`` \| ``"special:hide_select_behind_button"`` \| ``"type:capture_geolocation"`` \| ``"type:extract_required"``
|
|
515
640
|
|
|
516
641
|
___
|
|
517
642
|
|
|
@@ -521,6 +646,14 @@ ___
|
|
|
521
646
|
|
|
522
647
|
___
|
|
523
648
|
|
|
649
|
+
### SchemaType
|
|
650
|
+
|
|
651
|
+
Ƭ **SchemaType**: ``"ss"`` \| ``"ps"`` \| ``"us"``
|
|
652
|
+
|
|
653
|
+
Type Classification of a Schema returned by API
|
|
654
|
+
|
|
655
|
+
___
|
|
656
|
+
|
|
524
657
|
### ServerSchemaField
|
|
525
658
|
|
|
526
659
|
Ƭ **ServerSchemaField**: `Omit`<[`SchemaField`](#schemafield), ``"$prop"``\>
|
|
@@ -545,7 +678,7 @@ ___
|
|
|
545
678
|
|
|
546
679
|
### Urn
|
|
547
680
|
|
|
548
|
-
Ƭ **Urn**: \`urn:${
|
|
681
|
+
Ƭ **Urn**: \`urn:user:${UId}\` \| \`urn:profile\_object:${NId}\` \| \`urn:instance:${IId}\` \| \`urn:temp\_object:${LId}\` \| \`urn:schema:${string}\` \| \`urn:document:${NId}\`
|
|
549
682
|
|
|
550
683
|
e.g. "urn:user:..."
|
|
551
684
|
|
|
@@ -575,7 +708,7 @@ ___
|
|
|
575
708
|
|
|
576
709
|
### Verification
|
|
577
710
|
|
|
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` }] }\>
|
|
711
|
+
Ƭ **Verification**<`WithValue`\>: [`ProfileObject`](#profileobject)<{ `field`: `string` ; `n_id`: [`NId`](modules.md#nid) ; `valid_until?`: `string` ; `verifications`: [{ `data`: [`VerificationPayload`](modules.md#verificationpayload)<`WithValue`\> ; `hashing_algorithm?`: ``"SHA512"`` ; `key_id?`: `string` ; `key_urn?`: `string` ; `signature`: `string` ; `signing_algorithm?`: ``"RSASSA_PSS_SHA_512"`` }] }\>
|
|
579
712
|
|
|
580
713
|
Different APIs inconsistently include the `value` prop. If you know it exists,
|
|
581
714
|
use `Verification<true>`, otherwise just `Verification`. Verifications from
|
|
@@ -591,7 +724,7 @@ ___
|
|
|
591
724
|
|
|
592
725
|
### VerificationPayload
|
|
593
726
|
|
|
594
|
-
Ƭ **VerificationPayload**<`WithValue`\>: { `field`: `string` ; `metadata?`: `
|
|
727
|
+
Ƭ **VerificationPayload**<`WithValue`\>: { `field`: `string` ; `metadata?`: { `[otherAttributes: string]`: `unknown`; `pending_details?`: { `pending_time`: ``"short"`` \| ``"long"`` ; `pending_type`: ``"time"`` \| ``"user"`` } ; `safeHarbourScore?`: [`SafeHarbourCode`](enums/SafeHarbourCode.md) ; `status?`: ``"pending"`` } ; `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` } : {}
|
|
595
728
|
|
|
596
729
|
#### Type parameters
|
|
597
730
|
|
|
@@ -674,6 +807,7 @@ in the query parameters, it needs to be base64 and/or url encoded.
|
|
|
674
807
|
| Name | Type | Description |
|
|
675
808
|
| :------ | :------ | :------ |
|
|
676
809
|
| `a_id` | [`AId`](#aid) | - |
|
|
810
|
+
| `display_sharing_preview?` | `boolean` | If this value is true, the form will display some data sharing information before the form (WizardPreview) |
|
|
677
811
|
| `emails?` | `string`[] | if specified, the email addresses that a submission should be sent to |
|
|
678
812
|
| `expiry_date?` | `number` | number of days in the future |
|
|
679
813
|
| `pages` | [`WizardPage`](#wizardpage)[] | - |
|
|
@@ -688,6 +822,7 @@ in the query parameters, it needs to be base64 and/or url encoded.
|
|
|
688
822
|
| `submit_text?` | `string` | the submit button label |
|
|
689
823
|
| `terms_schema?` | `string` | if specified, a Wizard will be shown on the review page with this schema |
|
|
690
824
|
| `update_reference?` | `boolean` | whether the user can change the reference, if there is one in the QP |
|
|
825
|
+
| `webauthn_type?` | (``"usb"`` \| ``"nfc"`` \| ``"ble"`` \| ``"internal"``)[] | if specified, the user must validate their WebAuthN credential before they can submit the form |
|
|
691
826
|
|
|
692
827
|
___
|
|
693
828
|
|
|
@@ -752,9 +887,9 @@ This is what's returned by the API
|
|
|
752
887
|
| :------ | :------ | :------ |
|
|
753
888
|
| `active` | ``true`` | - |
|
|
754
889
|
| `end_date` | `string` | ISO Date. If this tag exists, the schema is deprecated. |
|
|
755
|
-
| `name` | `string` | - |
|
|
756
890
|
| `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`[] } | - |
|
|
891
|
+
| `schema_name` | `string` | Schema Name Type and Version Properties |
|
|
892
|
+
| `schema_type` | [`SchemaType`](#schematype) | - |
|
|
893
|
+
| `schema_version` | `string` | - |
|
|
757
894
|
| `start_date` | `string` | ISO Date |
|
|
758
|
-
| `type` | ``"ss"`` \| ``"ps"`` \| ``"us"`` | - |
|
|
759
|
-
| `version` | `string` | - |
|
|
760
895
|
| `version_current` | `boolean` | whether the `version` is the latest version |
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/orgs.d.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/** Types Used for Organization Related API Responses */
|
|
2
|
+
/** An Organisation */
|
|
3
|
+
export type Party = {
|
|
4
|
+
id: string;
|
|
5
|
+
start_date: string;
|
|
6
|
+
end_date: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
party_name: string;
|
|
9
|
+
party_description: string;
|
|
10
|
+
party_type: string;
|
|
11
|
+
metadata: PartyMetadata;
|
|
12
|
+
party_number: number;
|
|
13
|
+
};
|
|
14
|
+
/** An Organizations credentials */
|
|
15
|
+
export type PartyMetadata = {
|
|
16
|
+
gandalf: unknown;
|
|
17
|
+
stripe: {
|
|
18
|
+
customer: unknown;
|
|
19
|
+
};
|
|
20
|
+
centrix_credentials: unknown;
|
|
21
|
+
};
|
|
22
|
+
/** An Organization Site */
|
|
23
|
+
export type PartySite = {
|
|
24
|
+
id: string;
|
|
25
|
+
start_date: string;
|
|
26
|
+
end_date: string;
|
|
27
|
+
active: boolean;
|
|
28
|
+
party_id: string;
|
|
29
|
+
location_number: number;
|
|
30
|
+
party_site_name: string;
|
|
31
|
+
party_site_description: string | null;
|
|
32
|
+
party_site_number: string | null;
|
|
33
|
+
party_uses: string[];
|
|
34
|
+
party_use_primary: string;
|
|
35
|
+
metadata: unknown;
|
|
36
|
+
};
|
|
37
|
+
/** An Organization Location */
|
|
38
|
+
export type Location = {
|
|
39
|
+
id: string;
|
|
40
|
+
start_date: string;
|
|
41
|
+
end_date: string;
|
|
42
|
+
active: boolean;
|
|
43
|
+
location_name: string;
|
|
44
|
+
location_description: string | null;
|
|
45
|
+
address_line_1: string | null;
|
|
46
|
+
address_line_2: string | null;
|
|
47
|
+
address_line_3: string | null;
|
|
48
|
+
address_line_4: string | null;
|
|
49
|
+
premise: string | null;
|
|
50
|
+
subpremise: string | null;
|
|
51
|
+
street_number: string | null;
|
|
52
|
+
administrative_area_level_1: string | null;
|
|
53
|
+
administrative_area_level_2: string | null;
|
|
54
|
+
administrative_area_level_3: string | null;
|
|
55
|
+
route: string | null;
|
|
56
|
+
locality: string | null;
|
|
57
|
+
postal_code: string;
|
|
58
|
+
postal_code_suffix: string | null;
|
|
59
|
+
city: string | null;
|
|
60
|
+
region: string | null;
|
|
61
|
+
country: string | null;
|
|
62
|
+
geolocation: string | null;
|
|
63
|
+
geolocation_outline: string | null;
|
|
64
|
+
metadata: unknown;
|
|
65
|
+
};
|
|
66
|
+
/** A Contact Point for an Organization */
|
|
67
|
+
export type ContactPoint = {
|
|
68
|
+
id: string;
|
|
69
|
+
start_date: string;
|
|
70
|
+
end_date: string;
|
|
71
|
+
active: boolean;
|
|
72
|
+
to_table: string;
|
|
73
|
+
uuid: string | undefined;
|
|
74
|
+
contact_point_purpose: string;
|
|
75
|
+
contact_point_type: string;
|
|
76
|
+
e164: string | null;
|
|
77
|
+
e164_suffix: string | null;
|
|
78
|
+
e164_type: string | null;
|
|
79
|
+
url: string | null;
|
|
80
|
+
url_type: string | null;
|
|
81
|
+
email_address: string;
|
|
82
|
+
email_address_preferred_format: string;
|
|
83
|
+
metadata: unknown;
|
|
84
|
+
};
|
package/dist/orgs.js
ADDED
package/dist/raytio.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ export type OId = StringWithIdentity<"OId">;
|
|
|
23
23
|
/** A `wi_id` is the ID of a {@link Webhook} */
|
|
24
24
|
export type WId = StringWithIdentity<"WId">;
|
|
25
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;
|
|
27
26
|
export type DataTypes = "string" | "number" | "boolean" | "object" | "integer" | "array" | "null";
|
|
28
27
|
export type SubmissionStatus = "Submitted" | "Processing" | "Rejected" | "Expired" | "Completed" | "DataChanged" | "Received" | "Accepted";
|
|
29
28
|
/** You can supply an option type argument if you know exactly what the properties will be */
|
|
@@ -50,19 +49,9 @@ export type ProfileObjectForUpload<Properties = Json> = {
|
|
|
50
49
|
schema?: string;
|
|
51
50
|
n_id?: NId;
|
|
52
51
|
};
|
|
53
|
-
/**
|
|
54
|
-
* arbitrary key-values pairs stored on a Profile Object.
|
|
55
|
-
* May contain nested JSON and {@link Encrypted} properties.
|
|
56
|
-
*
|
|
57
|
-
* There are some limits to field names: they cannot be called
|
|
58
|
-
* `__signature` nor can they include the character sequence `<=>`.
|
|
59
|
-
*
|
|
60
|
-
* @deprecated - use {@link Json}
|
|
61
|
-
*/
|
|
62
|
-
export type Properties = Json;
|
|
63
52
|
export type UrnNodeType = "user" | "profile_object" | "instance" | "schema" | "temp_object" | "document";
|
|
64
53
|
/** e.g. "urn:user:..." */
|
|
65
|
-
export type Urn = `urn:${
|
|
54
|
+
export type Urn = `urn:user:${UId}` | `urn:profile_object:${NId}` | `urn:instance:${IId}` | `urn:temp_object:${LId}` | `urn:schema:${string}` | `urn:document:${NId}`;
|
|
66
55
|
export type Relationship = {
|
|
67
56
|
start: Urn;
|
|
68
57
|
end: Urn;
|
|
@@ -91,8 +80,9 @@ export type AA = {
|
|
|
91
80
|
description?: string;
|
|
92
81
|
/** If a user signs up while completing this form, this message will be sent in the sign up email. */
|
|
93
82
|
aa_introduction?: string;
|
|
83
|
+
/** @deprecated see !2101 */
|
|
94
84
|
picture?: Urn;
|
|
95
|
-
/** Easy to use AA logo url for pasting
|
|
85
|
+
/** Easy to use AA logo url for pasting into emails */
|
|
96
86
|
picture_url?: string;
|
|
97
87
|
scopes?: string[];
|
|
98
88
|
tags?: AATag[];
|
|
@@ -111,6 +101,14 @@ export type AA = {
|
|
|
111
101
|
ruleset?: unknown;
|
|
112
102
|
/** if true, only specific email addresses can submit the form */
|
|
113
103
|
auth_list_enabled?: boolean;
|
|
104
|
+
/** Currently Unused Attributes */
|
|
105
|
+
start_date?: Date;
|
|
106
|
+
end_date?: Date;
|
|
107
|
+
active?: boolean;
|
|
108
|
+
key?: string;
|
|
109
|
+
logout_uri?: string[];
|
|
110
|
+
metadata?: unknown;
|
|
111
|
+
secret?: unknown;
|
|
114
112
|
/** @internal */
|
|
115
113
|
transitions?: unknown[];
|
|
116
114
|
};
|
|
@@ -136,8 +134,6 @@ export type Instance = {
|
|
|
136
134
|
state: SubmissionStatus;
|
|
137
135
|
/** @deprecated The status of a submission */
|
|
138
136
|
_state?: SubmissionStatus;
|
|
139
|
-
/** Previous status of the shared information */
|
|
140
|
-
previous_state: SubmissionStatus;
|
|
141
137
|
/** Hash of the Service Provider ID */
|
|
142
138
|
sub_service_provider_hash?: string;
|
|
143
139
|
/** Service provider ID */
|
|
@@ -155,6 +151,26 @@ export type Instance = {
|
|
|
155
151
|
relationships?: Relationship[];
|
|
156
152
|
/** added by the client once it calculates the score */
|
|
157
153
|
score?: unknown;
|
|
154
|
+
/** Previous status of the shared information */
|
|
155
|
+
previous_state?: SubmissionStatus;
|
|
156
|
+
/** Device Id */
|
|
157
|
+
device_id?: unknown;
|
|
158
|
+
/** Source IP */
|
|
159
|
+
source_ip?: unknown;
|
|
160
|
+
/** Related Offers */
|
|
161
|
+
related_offers?: unknown;
|
|
162
|
+
/** Instance Version */
|
|
163
|
+
instance_version?: unknown;
|
|
164
|
+
/** Footer Html */
|
|
165
|
+
platform_footer_html?: unknown;
|
|
166
|
+
/** Related Service Types */
|
|
167
|
+
related_service_types?: unknown;
|
|
168
|
+
/** Activity Status */
|
|
169
|
+
active?: boolean;
|
|
170
|
+
/** Key (Can be used to retrieve instance) */
|
|
171
|
+
aack_id?: string;
|
|
172
|
+
/** Metadata */
|
|
173
|
+
metadata?: unknown;
|
|
158
174
|
};
|
|
159
175
|
/**
|
|
160
176
|
* An organization.
|
|
@@ -164,15 +180,8 @@ export type Organization = {
|
|
|
164
180
|
id: OId;
|
|
165
181
|
name: string;
|
|
166
182
|
email: string;
|
|
167
|
-
address:
|
|
168
|
-
|
|
169
|
-
street1: string;
|
|
170
|
-
street2: string;
|
|
171
|
-
city: string;
|
|
172
|
-
region: string;
|
|
173
|
-
country: string;
|
|
174
|
-
};
|
|
175
|
-
customer: Record<string, unknown>;
|
|
183
|
+
address: unknown;
|
|
184
|
+
customer: unknown;
|
|
176
185
|
};
|
|
177
186
|
/** @internal some APIs now return extra info */
|
|
178
187
|
export type FullOrg = {
|
package/dist/schema.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ 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: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";
|
|
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" | "action:require_webauthn" | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:capture_geolocation" | "type:extract_required";
|
|
11
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 */
|
|
@@ -108,11 +108,12 @@ export type SchemaField = {
|
|
|
108
108
|
export type ServerSchemaField = Omit<SchemaField, "$prop">;
|
|
109
109
|
/** not exported. Attributes that are identical in both client schema & server schema */
|
|
110
110
|
export type CommonSchemaAttributes = {
|
|
111
|
-
type?: DataTypes;
|
|
112
111
|
/** these fields will always exist on schema */
|
|
113
|
-
name: string;
|
|
114
112
|
title: string;
|
|
115
113
|
description: string;
|
|
114
|
+
/** specifies that the description is formatted in markdown */
|
|
115
|
+
description_decorator?: "md";
|
|
116
|
+
schema_type?: SchemaType;
|
|
116
117
|
/** plural version of the title */
|
|
117
118
|
title_plural?: string;
|
|
118
119
|
/**
|
|
@@ -158,6 +159,10 @@ export type CommonSchemaAttributes = {
|
|
|
158
159
|
$loading_pending_ver_resubmit: {
|
|
159
160
|
title: string;
|
|
160
161
|
};
|
|
162
|
+
$loading_long_verification_message: {
|
|
163
|
+
title?: string;
|
|
164
|
+
description?: string;
|
|
165
|
+
};
|
|
161
166
|
[fieldNameOrGroupName: string]: ServerSchemaField & {
|
|
162
167
|
title_plural?: string;
|
|
163
168
|
};
|
|
@@ -248,6 +253,10 @@ export type CommonSchemaAttributes = {
|
|
|
248
253
|
* of what the API returns.
|
|
249
254
|
*/
|
|
250
255
|
export type Schema = CommonSchemaAttributes & {
|
|
256
|
+
/** added by the client, copied from {@link WrappedSchema} */
|
|
257
|
+
name: string;
|
|
258
|
+
/** added by client */
|
|
259
|
+
type?: DataTypes;
|
|
251
260
|
/** the localized title of the `schema_group`. added by the client */
|
|
252
261
|
group_title?: string;
|
|
253
262
|
/** originally `string[]`, the client modifies this */
|
|
@@ -280,6 +289,8 @@ export type Schema = CommonSchemaAttributes & {
|
|
|
280
289
|
/** added by the client. If true, this schema somehow relates to legacy service providers */
|
|
281
290
|
isSpSchema?: boolean;
|
|
282
291
|
};
|
|
292
|
+
/** Type Classification of a Schema returned by API */
|
|
293
|
+
export type SchemaType = "ss" | "ps" | "us";
|
|
283
294
|
/** This is what's returned by the API */
|
|
284
295
|
export type WrappedSchema = {
|
|
285
296
|
active: true;
|
|
@@ -287,9 +298,10 @@ export type WrappedSchema = {
|
|
|
287
298
|
start_date: string;
|
|
288
299
|
/** ISO Date. If this tag exists, the schema is deprecated. */
|
|
289
300
|
end_date: string;
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
301
|
+
/** Schema Name Type and Version Properties */
|
|
302
|
+
schema_name: string;
|
|
303
|
+
schema_type: SchemaType;
|
|
304
|
+
schema_version: string;
|
|
293
305
|
/** whether the \`version\` is the latest version */
|
|
294
306
|
version_current: boolean;
|
|
295
307
|
schema: CommonSchemaAttributes & {
|
package/dist/verification.d.ts
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
import { NId, ProfileObject } from "./raytio";
|
|
2
|
+
export declare enum SafeHarbourCode {
|
|
3
|
+
/** “a match has been made on each the Full Name, Address and Date of Birth” */
|
|
4
|
+
M1 = "M1",
|
|
5
|
+
/** “a match has been made on both Full Name and Date of Birth (but not Address)” */
|
|
6
|
+
M2 = "M2",
|
|
7
|
+
/** “a match has been made on both Full Name and Address (but not Date of Birth)” */
|
|
8
|
+
N1 = "N1"
|
|
9
|
+
}
|
|
2
10
|
export type VerificationPayload<WithValue extends boolean> = {
|
|
3
11
|
field: string;
|
|
4
12
|
schema?: string;
|
|
5
|
-
metadata?:
|
|
13
|
+
metadata?: {
|
|
14
|
+
safeHarbourScore?: SafeHarbourCode;
|
|
15
|
+
status?: "pending";
|
|
16
|
+
pending_details?: {
|
|
17
|
+
/**
|
|
18
|
+
* for pending verifications - whether the verifier will complete fast enough that
|
|
19
|
+
* we can show a loading indicator. If not, the user has to come back another day.
|
|
20
|
+
*/
|
|
21
|
+
pending_time: "short" | "long";
|
|
22
|
+
/**
|
|
23
|
+
* for pending verifications - whether further user interaction is required to
|
|
24
|
+
* complete the verification, or if it will complete silently in the background.
|
|
25
|
+
*/
|
|
26
|
+
pending_type: "time" | "user";
|
|
27
|
+
};
|
|
28
|
+
[otherAttributes: string]: unknown;
|
|
29
|
+
};
|
|
6
30
|
passed: boolean;
|
|
7
31
|
request_div: string;
|
|
8
32
|
/** @deprecated don't use this, it looks like the schema name but it's not */
|
|
@@ -39,6 +63,14 @@ export type Verification<WithValue extends boolean = false> = ProfileObject<{
|
|
|
39
63
|
{
|
|
40
64
|
signature: string;
|
|
41
65
|
data: VerificationPayload<WithValue>;
|
|
66
|
+
/** undefined for data created before July 2023 */
|
|
67
|
+
key_id?: string;
|
|
68
|
+
/** undefined for data created before July 2023 */
|
|
69
|
+
key_urn?: string;
|
|
70
|
+
/** undefined for data created before July 2023 */
|
|
71
|
+
signing_algorithm?: "RSASSA_PSS_SHA_512";
|
|
72
|
+
/** undefined for data created before July 2023 */
|
|
73
|
+
hashing_algorithm?: "SHA512";
|
|
42
74
|
}
|
|
43
75
|
];
|
|
44
76
|
}>;
|
|
@@ -81,7 +113,7 @@ export type RealVer = {
|
|
|
81
113
|
*/
|
|
82
114
|
verified: boolean;
|
|
83
115
|
/** arbitary metadata returned by the verifier */
|
|
84
|
-
metadata?:
|
|
116
|
+
metadata?: VerificationPayload<false>["metadata"];
|
|
85
117
|
/** nId of the verification */
|
|
86
118
|
nID: NId;
|
|
87
119
|
/** nId of the PO that the verification belongs to. Could be undefined */
|
package/dist/verification.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.POVerification = exports.FieldVerification = void 0;
|
|
3
|
+
exports.POVerification = exports.FieldVerification = exports.SafeHarbourCode = void 0;
|
|
4
|
+
// see #659
|
|
5
|
+
var SafeHarbourCode;
|
|
6
|
+
(function (SafeHarbourCode) {
|
|
7
|
+
/** “a match has been made on each the Full Name, Address and Date of Birth” */
|
|
8
|
+
SafeHarbourCode["M1"] = "M1";
|
|
9
|
+
/** “a match has been made on both Full Name and Date of Birth (but not Address)” */
|
|
10
|
+
SafeHarbourCode["M2"] = "M2";
|
|
11
|
+
/** “a match has been made on both Full Name and Address (but not Date of Birth)” */
|
|
12
|
+
SafeHarbourCode["N1"] = "N1";
|
|
13
|
+
})(SafeHarbourCode || (exports.SafeHarbourCode = SafeHarbourCode = {}));
|
|
4
14
|
/**
|
|
5
15
|
* "Not Verified" means show no badge, cf. "Verified False" means the
|
|
6
16
|
* verifier revealed that the data was wrong. So show a ❌
|
|
@@ -13,7 +23,7 @@ var FieldVerification;
|
|
|
13
23
|
FieldVerification[FieldVerification["NotVerified"] = 60002] = "NotVerified";
|
|
14
24
|
FieldVerification[FieldVerification["VerifiedFalse"] = 60003] = "VerifiedFalse";
|
|
15
25
|
FieldVerification[FieldVerification["Expired"] = 60004] = "Expired";
|
|
16
|
-
})(FieldVerification
|
|
26
|
+
})(FieldVerification || (exports.FieldVerification = FieldVerification = {}));
|
|
17
27
|
// We cannot change the enum values, since ScoreRules have been generated
|
|
18
28
|
// with the enum values hardcoded.
|
|
19
29
|
var POVerification;
|
|
@@ -25,4 +35,4 @@ var POVerification;
|
|
|
25
35
|
POVerification[POVerification["NotVerified"] = 70005] = "NotVerified";
|
|
26
36
|
POVerification[POVerification["Expired"] = 70006] = "Expired";
|
|
27
37
|
POVerification[POVerification["Loading"] = 70007] = "Loading";
|
|
28
|
-
})(POVerification
|
|
38
|
+
})(POVerification || (exports.POVerification = POVerification = {}));
|
package/dist/wizard.d.ts
CHANGED
|
@@ -102,6 +102,8 @@ export type WizardConfig = {
|
|
|
102
102
|
quick_onboard?: boolean;
|
|
103
103
|
/** the loading message to show next to the spinner after the review screen */
|
|
104
104
|
sharing_data_message?: string;
|
|
105
|
+
/** If this value is true, the form will display some data sharing information before the form (WizardPreview) */
|
|
106
|
+
display_sharing_preview?: boolean;
|
|
105
107
|
/** a list of relationships that should be created after the wizard completes (see #987) */
|
|
106
108
|
relationships?: {
|
|
107
109
|
/** schema name */
|
|
@@ -113,4 +115,6 @@ export type WizardConfig = {
|
|
|
113
115
|
/** relationship properties */
|
|
114
116
|
properties?: Record<string, any>;
|
|
115
117
|
}[];
|
|
118
|
+
/** if specified, the user must validate their WebAuthN credential before they can submit the form */
|
|
119
|
+
webauthn_type?: ("usb" | "nfc" | "ble" | "internal")[];
|
|
116
120
|
};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/orgs.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/** Types Used for Organization Related API Responses */
|
|
2
|
+
/** An Organisation */
|
|
3
|
+
export type Party = {
|
|
4
|
+
id: string;
|
|
5
|
+
start_date: string;
|
|
6
|
+
end_date: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
party_name: string;
|
|
9
|
+
party_description: string;
|
|
10
|
+
party_type: string;
|
|
11
|
+
metadata: PartyMetadata;
|
|
12
|
+
party_number: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** An Organizations credentials */
|
|
16
|
+
export type PartyMetadata = {
|
|
17
|
+
gandalf: unknown;
|
|
18
|
+
stripe: { customer: unknown };
|
|
19
|
+
centrix_credentials: unknown;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** An Organization Site */
|
|
23
|
+
export type PartySite = {
|
|
24
|
+
id: string;
|
|
25
|
+
start_date: string;
|
|
26
|
+
end_date: string;
|
|
27
|
+
active: boolean;
|
|
28
|
+
party_id: string;
|
|
29
|
+
location_number: number;
|
|
30
|
+
party_site_name: string;
|
|
31
|
+
party_site_description: string | null;
|
|
32
|
+
party_site_number: string | null;
|
|
33
|
+
party_uses: string[];
|
|
34
|
+
party_use_primary: string;
|
|
35
|
+
metadata: unknown;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** An Organization Location */
|
|
39
|
+
export type Location = {
|
|
40
|
+
id: string;
|
|
41
|
+
start_date: string;
|
|
42
|
+
end_date: string;
|
|
43
|
+
active: boolean;
|
|
44
|
+
location_name: string;
|
|
45
|
+
location_description: string | null;
|
|
46
|
+
address_line_1: string | null;
|
|
47
|
+
address_line_2: string | null;
|
|
48
|
+
address_line_3: string | null;
|
|
49
|
+
address_line_4: string | null;
|
|
50
|
+
premise: string | null;
|
|
51
|
+
subpremise: string | null;
|
|
52
|
+
street_number: string | null;
|
|
53
|
+
administrative_area_level_1: string | null;
|
|
54
|
+
administrative_area_level_2: string | null;
|
|
55
|
+
administrative_area_level_3: string | null;
|
|
56
|
+
route: string | null;
|
|
57
|
+
locality: string | null;
|
|
58
|
+
postal_code: string;
|
|
59
|
+
postal_code_suffix: string | null;
|
|
60
|
+
city: string | null;
|
|
61
|
+
region: string | null;
|
|
62
|
+
country: string | null;
|
|
63
|
+
geolocation: string | null;
|
|
64
|
+
geolocation_outline: string | null;
|
|
65
|
+
metadata: unknown;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** A Contact Point for an Organization */
|
|
69
|
+
export type ContactPoint = {
|
|
70
|
+
id: string;
|
|
71
|
+
start_date: string;
|
|
72
|
+
end_date: string;
|
|
73
|
+
active: boolean;
|
|
74
|
+
to_table: string;
|
|
75
|
+
uuid: string | undefined;
|
|
76
|
+
contact_point_purpose: string;
|
|
77
|
+
contact_point_type: string;
|
|
78
|
+
e164: string | null;
|
|
79
|
+
e164_suffix: string | null;
|
|
80
|
+
e164_type: string | null;
|
|
81
|
+
url: string | null;
|
|
82
|
+
url_type: string | null;
|
|
83
|
+
email_address: string;
|
|
84
|
+
email_address_preferred_format: string;
|
|
85
|
+
metadata: unknown;
|
|
86
|
+
};
|
package/src/raytio.ts
CHANGED
|
@@ -26,8 +26,6 @@ export type WId = StringWithIdentity<"WId">;
|
|
|
26
26
|
/** An `l_id` is the ID of any data stored in the KV-Store */ // e.g. StoredWizardConfig and VerBundleMetadata
|
|
27
27
|
export type LId = StringWithIdentity<"LId">;
|
|
28
28
|
|
|
29
|
-
export type AnyId = PId | IId | NId | GId | UId | AId | OId | WId;
|
|
30
|
-
|
|
31
29
|
export type DataTypes =
|
|
32
30
|
| "string"
|
|
33
31
|
| "number"
|
|
@@ -76,17 +74,6 @@ export type ProfileObjectForUpload<Properties = Json> = {
|
|
|
76
74
|
n_id?: NId; // only if editing an existing PO
|
|
77
75
|
};
|
|
78
76
|
|
|
79
|
-
/**
|
|
80
|
-
* arbitrary key-values pairs stored on a Profile Object.
|
|
81
|
-
* May contain nested JSON and {@link Encrypted} properties.
|
|
82
|
-
*
|
|
83
|
-
* There are some limits to field names: they cannot be called
|
|
84
|
-
* `__signature` nor can they include the character sequence `<=>`.
|
|
85
|
-
*
|
|
86
|
-
* @deprecated - use {@link Json}
|
|
87
|
-
*/
|
|
88
|
-
export type Properties = Json;
|
|
89
|
-
|
|
90
77
|
export type UrnNodeType =
|
|
91
78
|
| "user"
|
|
92
79
|
| "profile_object"
|
|
@@ -96,7 +83,13 @@ export type UrnNodeType =
|
|
|
96
83
|
| "document";
|
|
97
84
|
|
|
98
85
|
/** e.g. "urn:user:..." */
|
|
99
|
-
export type Urn =
|
|
86
|
+
export type Urn =
|
|
87
|
+
| `urn:user:${UId}`
|
|
88
|
+
| `urn:profile_object:${NId}`
|
|
89
|
+
| `urn:instance:${IId}`
|
|
90
|
+
| `urn:temp_object:${LId}`
|
|
91
|
+
| `urn:schema:${/* schemaName */ string}`
|
|
92
|
+
| `urn:document:${NId}`;
|
|
100
93
|
|
|
101
94
|
export type Relationship = {
|
|
102
95
|
start: Urn;
|
|
@@ -135,8 +128,9 @@ export type AA = {
|
|
|
135
128
|
description?: string;
|
|
136
129
|
/** If a user signs up while completing this form, this message will be sent in the sign up email. */
|
|
137
130
|
aa_introduction?: string;
|
|
131
|
+
/** @deprecated see !2101 */
|
|
138
132
|
picture?: Urn;
|
|
139
|
-
/** Easy to use AA logo url for pasting
|
|
133
|
+
/** Easy to use AA logo url for pasting into emails */
|
|
140
134
|
picture_url?: string;
|
|
141
135
|
scopes?: string[];
|
|
142
136
|
tags?: AATag[];
|
|
@@ -159,6 +153,15 @@ export type AA = {
|
|
|
159
153
|
/** if true, only specific email addresses can submit the form */
|
|
160
154
|
auth_list_enabled?: boolean;
|
|
161
155
|
|
|
156
|
+
/** Currently Unused Attributes */
|
|
157
|
+
start_date?: Date;
|
|
158
|
+
end_date?: Date;
|
|
159
|
+
active?: boolean;
|
|
160
|
+
key?: string;
|
|
161
|
+
logout_uri?: string[];
|
|
162
|
+
metadata?: unknown;
|
|
163
|
+
secret?: unknown;
|
|
164
|
+
|
|
162
165
|
/** @internal */
|
|
163
166
|
transitions?: unknown[];
|
|
164
167
|
};
|
|
@@ -185,8 +188,7 @@ export type Instance = {
|
|
|
185
188
|
state: SubmissionStatus;
|
|
186
189
|
/** @deprecated The status of a submission */
|
|
187
190
|
_state?: SubmissionStatus;
|
|
188
|
-
|
|
189
|
-
previous_state: SubmissionStatus;
|
|
191
|
+
|
|
190
192
|
/** Hash of the Service Provider ID */
|
|
191
193
|
sub_service_provider_hash?: string;
|
|
192
194
|
/** Service provider ID */
|
|
@@ -208,6 +210,28 @@ export type Instance = {
|
|
|
208
210
|
// Defined as `unknown` instead of `ScoreResult` because it could be nonsense,
|
|
209
211
|
// or a deprected version of `ScoreResult`.
|
|
210
212
|
score?: unknown;
|
|
213
|
+
|
|
214
|
+
// Currently Unused properties
|
|
215
|
+
/** Previous status of the shared information */
|
|
216
|
+
previous_state?: SubmissionStatus;
|
|
217
|
+
/** Device Id */
|
|
218
|
+
device_id?: unknown;
|
|
219
|
+
/** Source IP */
|
|
220
|
+
source_ip?: unknown;
|
|
221
|
+
/** Related Offers */
|
|
222
|
+
related_offers?: unknown;
|
|
223
|
+
/** Instance Version */
|
|
224
|
+
instance_version?: unknown;
|
|
225
|
+
/** Footer Html */
|
|
226
|
+
platform_footer_html?: unknown;
|
|
227
|
+
/** Related Service Types */
|
|
228
|
+
related_service_types?: unknown;
|
|
229
|
+
/** Activity Status */
|
|
230
|
+
active?: boolean;
|
|
231
|
+
/** Key (Can be used to retrieve instance) */
|
|
232
|
+
aack_id?: string;
|
|
233
|
+
/** Metadata */
|
|
234
|
+
metadata?: unknown;
|
|
211
235
|
};
|
|
212
236
|
|
|
213
237
|
/**
|
|
@@ -218,15 +242,8 @@ export type Organization = {
|
|
|
218
242
|
id: OId;
|
|
219
243
|
name: string;
|
|
220
244
|
email: string;
|
|
221
|
-
address:
|
|
222
|
-
|
|
223
|
-
street1: string;
|
|
224
|
-
street2: string;
|
|
225
|
-
city: string;
|
|
226
|
-
region: string;
|
|
227
|
-
country: string;
|
|
228
|
-
};
|
|
229
|
-
customer: Record<string, unknown>;
|
|
245
|
+
address: unknown; // Waiting on Backend Progress Before being properly updated (as of #1361)
|
|
246
|
+
customer: unknown; // Waiting on Backend Progress Before being properly updated (as of #1361) (was previously Record<string, unknown>)
|
|
230
247
|
};
|
|
231
248
|
|
|
232
249
|
/** @internal some APIs now return extra info */
|
package/src/schema.ts
CHANGED
|
@@ -33,6 +33,7 @@ export type SchemaFieldTag =
|
|
|
33
33
|
| "date_component:year"
|
|
34
34
|
// other
|
|
35
35
|
| "action:client_upload"
|
|
36
|
+
| "action:require_webauthn"
|
|
36
37
|
| "verify:show_if_pending"
|
|
37
38
|
| "special:hide_select_behind_button"
|
|
38
39
|
| "type:capture_geolocation" // triggers the wizard's GeoLocationInput field
|
|
@@ -164,15 +165,17 @@ export type ServerSchemaField = Omit<SchemaField, "$prop">;
|
|
|
164
165
|
|
|
165
166
|
/** not exported. Attributes that are identical in both client schema & server schema */
|
|
166
167
|
export type CommonSchemaAttributes = {
|
|
167
|
-
type?: DataTypes;
|
|
168
|
-
|
|
169
168
|
/** these fields will always exist on schema */
|
|
170
|
-
name: string;
|
|
171
169
|
title: string;
|
|
172
170
|
description: string;
|
|
171
|
+
/** specifies that the description is formatted in markdown */
|
|
172
|
+
description_decorator?: "md";
|
|
173
|
+
|
|
174
|
+
schema_type?: SchemaType;
|
|
173
175
|
|
|
174
176
|
/** plural version of the title */
|
|
175
177
|
title_plural?: string;
|
|
178
|
+
|
|
176
179
|
/**
|
|
177
180
|
* the group that a schema belongs to, such as "passports". This is useful for
|
|
178
181
|
* forms that accept different types of similar documents.
|
|
@@ -200,6 +203,10 @@ export type CommonSchemaAttributes = {
|
|
|
200
203
|
$loading_link_to_person: { title: string };
|
|
201
204
|
$loading_delete_pending_ver: { title: string };
|
|
202
205
|
$loading_pending_ver_resubmit: { title: string };
|
|
206
|
+
$loading_long_verification_message: {
|
|
207
|
+
title?: string;
|
|
208
|
+
description?: string;
|
|
209
|
+
};
|
|
203
210
|
|
|
204
211
|
[fieldNameOrGroupName: string]: ServerSchemaField & {
|
|
205
212
|
title_plural?: string;
|
|
@@ -292,6 +299,12 @@ export type CommonSchemaAttributes = {
|
|
|
292
299
|
* of what the API returns.
|
|
293
300
|
*/
|
|
294
301
|
export type Schema = CommonSchemaAttributes & {
|
|
302
|
+
/** added by the client, copied from {@link WrappedSchema} */
|
|
303
|
+
name: string; // Will always exist on schema
|
|
304
|
+
|
|
305
|
+
/** added by client */
|
|
306
|
+
type?: DataTypes;
|
|
307
|
+
|
|
295
308
|
/** the localized title of the `schema_group`. added by the client */
|
|
296
309
|
group_title?: string;
|
|
297
310
|
|
|
@@ -336,6 +349,9 @@ export type Schema = CommonSchemaAttributes & {
|
|
|
336
349
|
isSpSchema?: boolean;
|
|
337
350
|
};
|
|
338
351
|
|
|
352
|
+
/** Type Classification of a Schema returned by API */
|
|
353
|
+
export type SchemaType = "ss" | "ps" | "us";
|
|
354
|
+
|
|
339
355
|
/** This is what's returned by the API */
|
|
340
356
|
export type WrappedSchema = {
|
|
341
357
|
active: true;
|
|
@@ -343,9 +359,12 @@ export type WrappedSchema = {
|
|
|
343
359
|
start_date: string;
|
|
344
360
|
/** ISO Date. If this tag exists, the schema is deprecated. */
|
|
345
361
|
end_date: string;
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
362
|
+
|
|
363
|
+
/** Schema Name Type and Version Properties */
|
|
364
|
+
schema_name: string;
|
|
365
|
+
schema_type: SchemaType;
|
|
366
|
+
schema_version: string;
|
|
367
|
+
|
|
349
368
|
/** whether the \`version\` is the latest version */
|
|
350
369
|
version_current: boolean;
|
|
351
370
|
schema: CommonSchemaAttributes & {
|
|
@@ -355,6 +374,7 @@ export type WrappedSchema = {
|
|
|
355
374
|
$schema?: string;
|
|
356
375
|
|
|
357
376
|
definitions?: Record<string, { $ref: Urn }>;
|
|
377
|
+
|
|
358
378
|
allOf?: {
|
|
359
379
|
$ref?: string;
|
|
360
380
|
if?: Partial<WrappedSchema["schema"]>;
|
package/src/verification.ts
CHANGED
|
@@ -1,10 +1,37 @@
|
|
|
1
1
|
import { NId, ProfileObject } from "./raytio";
|
|
2
2
|
|
|
3
|
+
// see #659
|
|
4
|
+
export enum SafeHarbourCode {
|
|
5
|
+
/** “a match has been made on each the Full Name, Address and Date of Birth” */
|
|
6
|
+
M1 = "M1",
|
|
7
|
+
/** “a match has been made on both Full Name and Date of Birth (but not Address)” */
|
|
8
|
+
M2 = "M2",
|
|
9
|
+
/** “a match has been made on both Full Name and Address (but not Date of Birth)” */
|
|
10
|
+
N1 = "N1",
|
|
11
|
+
}
|
|
12
|
+
|
|
3
13
|
export type VerificationPayload<WithValue extends boolean> = {
|
|
4
14
|
// we deliberately haven't defined 'sub'
|
|
5
15
|
field: string;
|
|
6
16
|
schema?: string;
|
|
7
|
-
metadata?:
|
|
17
|
+
metadata?: {
|
|
18
|
+
safeHarbourScore?: SafeHarbourCode;
|
|
19
|
+
status?: "pending";
|
|
20
|
+
pending_details?: {
|
|
21
|
+
/**
|
|
22
|
+
* for pending verifications - whether the verifier will complete fast enough that
|
|
23
|
+
* we can show a loading indicator. If not, the user has to come back another day.
|
|
24
|
+
*/
|
|
25
|
+
pending_time: "short" | "long";
|
|
26
|
+
/**
|
|
27
|
+
* for pending verifications - whether further user interaction is required to
|
|
28
|
+
* complete the verification, or if it will complete silently in the background.
|
|
29
|
+
*/
|
|
30
|
+
pending_type: "time" | "user";
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
[otherAttributes: string]: unknown;
|
|
34
|
+
};
|
|
8
35
|
passed: boolean;
|
|
9
36
|
request_div: string;
|
|
10
37
|
/** @deprecated don't use this, it looks like the schema name but it's not */
|
|
@@ -45,6 +72,15 @@ export type Verification<WithValue extends boolean = false> = ProfileObject<{
|
|
|
45
72
|
{
|
|
46
73
|
signature: string;
|
|
47
74
|
data: VerificationPayload<WithValue>;
|
|
75
|
+
|
|
76
|
+
/** undefined for data created before July 2023 */
|
|
77
|
+
key_id?: string;
|
|
78
|
+
/** undefined for data created before July 2023 */
|
|
79
|
+
key_urn?: string;
|
|
80
|
+
/** undefined for data created before July 2023 */
|
|
81
|
+
signing_algorithm?: "RSASSA_PSS_SHA_512";
|
|
82
|
+
/** undefined for data created before July 2023 */
|
|
83
|
+
hashing_algorithm?: "SHA512";
|
|
48
84
|
},
|
|
49
85
|
];
|
|
50
86
|
}>;
|
|
@@ -95,7 +131,7 @@ export type RealVer = {
|
|
|
95
131
|
*/
|
|
96
132
|
verified: boolean;
|
|
97
133
|
/** arbitary metadata returned by the verifier */
|
|
98
|
-
metadata?:
|
|
134
|
+
metadata?: VerificationPayload<false>["metadata"];
|
|
99
135
|
/** nId of the verification */
|
|
100
136
|
nID: NId;
|
|
101
137
|
/** nId of the PO that the verification belongs to. Could be undefined */
|
package/src/wizard.ts
CHANGED
|
@@ -141,6 +141,9 @@ export type WizardConfig = {
|
|
|
141
141
|
/** the loading message to show next to the spinner after the review screen */
|
|
142
142
|
sharing_data_message?: string;
|
|
143
143
|
|
|
144
|
+
/** If this value is true, the form will display some data sharing information before the form (WizardPreview) */
|
|
145
|
+
display_sharing_preview?: boolean;
|
|
146
|
+
|
|
144
147
|
/** a list of relationships that should be created after the wizard completes (see #987) */
|
|
145
148
|
relationships?: {
|
|
146
149
|
/** schema name */
|
|
@@ -152,4 +155,7 @@ export type WizardConfig = {
|
|
|
152
155
|
/** relationship properties */
|
|
153
156
|
properties?: Record<string, any>;
|
|
154
157
|
}[];
|
|
158
|
+
|
|
159
|
+
/** if specified, the user must validate their WebAuthN credential before they can submit the form */
|
|
160
|
+
webauthn_type?: ("usb" | "nfc" | "ble" | "internal")[];
|
|
155
161
|
};
|
|
File without changes
|