@raytio/types 7.1.0 → 7.3.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 +250 -80
- 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 +79 -48
- package/dist/schema.d.ts +24 -12
- package/dist/verification.d.ts +36 -4
- package/dist/verification.js +13 -3
- package/dist/wizard.d.ts +8 -4
- package/package.json +1 -1
- package/src/__tests__/raytio.typetest.ts +6 -0
- package/src/__tests__/{schema.ts → schema.typetest.ts} +1 -1
- package/src/index.ts +1 -0
- package/src/orgs.ts +86 -0
- package/src/raytio.ts +95 -54
- package/src/schema.ts +32 -12
- package/src/verification.ts +40 -4
- package/src/wizard.ts +10 -4
package/README.md
CHANGED
|
@@ -30,36 +30,46 @@ 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
|
+
- [CommonFields](#commonfields)
|
|
41
42
|
- [CommonSchemaAttributes](#commonschemaattributes)
|
|
42
43
|
- [ConditionallyRequired](#conditionallyrequired)
|
|
44
|
+
- [ContactPoint](#contactpoint)
|
|
43
45
|
- [CustomFonts](#customfonts)
|
|
44
46
|
- [DataTypes](#datatypes)
|
|
45
47
|
- [Encrypted](#encrypted)
|
|
46
48
|
- [GId](#gid)
|
|
47
49
|
- [IId](#iid)
|
|
48
50
|
- [Instance](#instance)
|
|
51
|
+
- [InstanceWithoutData](#instancewithoutdata)
|
|
52
|
+
- [KId](#kid)
|
|
49
53
|
- [LId](#lid)
|
|
54
|
+
- [Location](#location)
|
|
50
55
|
- [Lookup](#lookup)
|
|
51
56
|
- [NId](#nid)
|
|
57
|
+
- [NId2](#nid2)
|
|
52
58
|
- [OId](#oid)
|
|
53
59
|
- [Organization](#organization)
|
|
54
60
|
- [PId](#pid)
|
|
61
|
+
- [Party](#party)
|
|
62
|
+
- [PartyMetadata](#partymetadata)
|
|
63
|
+
- [PartySite](#partysite)
|
|
55
64
|
- [ProfileObject](#profileobject)
|
|
56
|
-
- [Properties](#properties)
|
|
57
65
|
- [RealVer](#realver)
|
|
58
66
|
- [Relationship](#relationship)
|
|
59
67
|
- [Schema](#schema)
|
|
60
68
|
- [SchemaField](#schemafield)
|
|
61
69
|
- [SchemaFieldTag](#schemafieldtag)
|
|
70
|
+
- [SchemaName](#schemaname)
|
|
62
71
|
- [SchemaTag](#schematag)
|
|
72
|
+
- [SchemaType](#schematype)
|
|
63
73
|
- [ServerSchemaField](#serverschemafield)
|
|
64
74
|
- [SubmissionStatus](#submissionstatus)
|
|
65
75
|
- [UId](#uid)
|
|
@@ -90,18 +100,25 @@ Hovering over the type in VSCode will display documentation and available proper
|
|
|
90
100
|
| `a_id` | [`AId`](#aid) | - |
|
|
91
101
|
| `aa_help?` | `string` | markdown or string help information including [phoneNumber \|\| email] |
|
|
92
102
|
| `aa_introduction?` | `string` | If a user signs up while completing this form, this message will be sent in the sign up email. |
|
|
103
|
+
| `active?` | `boolean` | - |
|
|
93
104
|
| `auth_list_enabled?` | `boolean` | if true, only specific email addresses can submit the form |
|
|
94
105
|
| `callback_uri?` | `string`[] | - |
|
|
95
106
|
| `description?` | `string` | - |
|
|
107
|
+
| `end_date?` | `Date` | - |
|
|
108
|
+
| `key?` | `string` | - |
|
|
109
|
+
| `logout_uri?` | `string`[] | - |
|
|
110
|
+
| `metadata?` | `unknown` | - |
|
|
96
111
|
| `name` | `string` | - |
|
|
97
112
|
| `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
|
|
113
|
+
| `picture?` | [`Urn`](#urn) | **`Deprecated`** see !2101 |
|
|
114
|
+
| `picture_url?` | `string` | Easy to use AA logo url for pasting into emails |
|
|
100
115
|
| `ruleset?` | `unknown` | configuration for the submission rules |
|
|
101
116
|
| `scopes?` | `string`[] | - |
|
|
117
|
+
| `secret?` | `unknown` | - |
|
|
102
118
|
| `service_provider_n_id?` | [`NId`](#nid) | the n_id of the associated service provider |
|
|
119
|
+
| `start_date?` | `Date` | Currently Unused Attributes |
|
|
103
120
|
| `tags?` | [`AATag`](#aatag)[] | - |
|
|
104
|
-
| `theme?` | { `colors?`: [`Colors`](#colors) ; `font?`: [`CustomFonts`](
|
|
121
|
+
| `theme?` | { `colors?`: [`Colors`](#colors) ; `font?`: [`CustomFonts`](#customfonts) } | - |
|
|
105
122
|
| `theme.colors?` | [`Colors`](#colors) | - |
|
|
106
123
|
| `theme.font?` | [`CustomFonts`](#customfonts) | - |
|
|
107
124
|
|
|
@@ -121,12 +138,6 @@ An `a_id` is the ID of an [AA](#aa)
|
|
|
121
138
|
|
|
122
139
|
___
|
|
123
140
|
|
|
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
141
|
### Colors
|
|
131
142
|
|
|
132
143
|
Ƭ **Colors**: `Object`
|
|
@@ -160,6 +171,40 @@ ___
|
|
|
160
171
|
|
|
161
172
|
___
|
|
162
173
|
|
|
174
|
+
### CommonFields
|
|
175
|
+
|
|
176
|
+
Ƭ **CommonFields**<`IdType`, `Metadata`\>: `Object`
|
|
177
|
+
|
|
178
|
+
Every object in the new database has these fields. In the
|
|
179
|
+
interest of type-safety, the `id` should be one of the
|
|
180
|
+
well-known IDs that extend StringWithIdentity (e.g.
|
|
181
|
+
[NId](#nid) or [AId](#aid)). If the ID is irrelevant, then
|
|
182
|
+
use `CommonFields<never>` rather than `CommonFields<string>`.
|
|
183
|
+
This will deliberately prevent you from utilising the `id`
|
|
184
|
+
field until you define a special type for that ID.
|
|
185
|
+
|
|
186
|
+
This is especially important with the new API where it is much
|
|
187
|
+
easier to mix up the different types of IDs.
|
|
188
|
+
|
|
189
|
+
#### Type parameters
|
|
190
|
+
|
|
191
|
+
| Name | Type |
|
|
192
|
+
| :------ | :------ |
|
|
193
|
+
| `IdType` | extends `StringWithIdentity`<`string`\> |
|
|
194
|
+
| `Metadata` | `unknown` |
|
|
195
|
+
|
|
196
|
+
#### Type declaration
|
|
197
|
+
|
|
198
|
+
| Name | Type | Description |
|
|
199
|
+
| :------ | :------ | :------ |
|
|
200
|
+
| `active` | `boolean` | - |
|
|
201
|
+
| `end_date` | `string` | ISO Date |
|
|
202
|
+
| `id` | `IdType` | - |
|
|
203
|
+
| `metadata` | `Metadata` \| `undefined` | - |
|
|
204
|
+
| `start_date` | `string` | ISO Date |
|
|
205
|
+
|
|
206
|
+
___
|
|
207
|
+
|
|
163
208
|
### CommonSchemaAttributes
|
|
164
209
|
|
|
165
210
|
Ƭ **CommonSchemaAttributes**: `Object`
|
|
@@ -171,6 +216,7 @@ not exported. Attributes that are identical in both client schema & server schem
|
|
|
171
216
|
| Name | Type | Description |
|
|
172
217
|
| :------ | :------ | :------ |
|
|
173
218
|
| `description` | `string` | - |
|
|
219
|
+
| `description_decorator?` | ``"md"`` | specifies that the description is formatted in markdown |
|
|
174
220
|
| `display?` | { `expand?`: { `fields`: `string`[] ; `label`: `string` }[] ; `head_main?`: { `fields`: `string`[] ; `format?`: `string` } ; `head_sub?`: { `fields`: `string`[] ; `format?`: `string` } } | - |
|
|
175
221
|
| `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
222
|
| `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,19 +225,18 @@ not exported. Attributes that are identical in both client schema & server schem
|
|
|
179
225
|
| `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
226
|
| `display.head_sub.fields` | `string`[] | - |
|
|
181
227
|
| `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
|
-
| `
|
|
184
|
-
| `onboard_properties?` | { `
|
|
185
|
-
| `onboard_properties.
|
|
186
|
-
| `onboard_properties.profile_objects?` | { `properties`: `Record`<`string`, `unknown`\> ; `schema_name`: `string` }[] | Profile Objects that should be created |
|
|
228
|
+
| `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` } }; } | - |
|
|
229
|
+
| `onboard_properties?` | { `organizations?`: { `access_applications?`: { `links?`: { `description`: `string` ; `wizardConfig`: `Omit`<[`WizardConfig`](#wizardconfig), ``"a_id"``\> }[] ; `properties`: `Omit`<[`AA`](#aa), ``"org_id"``\> }[] ; `properties`: [`Organization`](#organization) }[] ; `profile_objects?`: { `properties`: `Record`<`string`, `unknown`\> ; `schema_name`: [`SchemaName`](#schemaname) }[] ; `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 |
|
|
230
|
+
| `onboard_properties.organizations?` | { `access_applications?`: { `links?`: { `description`: `string` ; `wizardConfig`: `Omit`<[`WizardConfig`](#wizardconfig), ``"a_id"``\> }[] ; `properties`: `Omit`<[`AA`](#aa), ``"org_id"``\> }[] ; `properties`: [`Organization`](#organization) }[] | Organizations that should be created. NOTE: if multiple are specified, when the wizard completes, the _first one_ will be selected |
|
|
231
|
+
| `onboard_properties.profile_objects?` | { `properties`: `Record`<`string`, `unknown`\> ; `schema_name`: [`SchemaName`](#schemaname) }[] | Profile Objects that should be created |
|
|
187
232
|
| `onboard_properties.relationships?` | { `from`: `string` ; `properties?`: `Record`<`string`, `string`\> ; `to`: `string` ; `type`: `string` }[] | Relationships that should be created |
|
|
188
233
|
| `onboard_properties.return_to?` | `string` | The relative path in the client to redirect to once finished. May include variables |
|
|
189
|
-
| `relationships?` | { `anyOf?`: `
|
|
234
|
+
| `relationships?` | { `anyOf?`: [`SchemaName`](#schemaname)[] ; `direction`: ``"from"`` ; `multiple?`: `boolean` ; `oneOf?`: ([`SchemaName`](#schemaname) \| ``"instance"``)[] ; `properties?`: { `[fieldName: string]`: [`SchemaField`](#schemafield); } ; `relationship_name`: `string` ; `required?`: `string`[] ; `required_relationship?`: `boolean` ; `type`: `string` }[] | - |
|
|
190
235
|
| `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. |
|
|
236
|
+
| `schema_type?` | [`SchemaType`](#schematype) | - |
|
|
191
237
|
| `tags?` | [`SchemaTag`](#schematag)[] | - |
|
|
192
|
-
| `title` | `string` |
|
|
238
|
+
| `title` | `string` | these fields will always exist on schema |
|
|
193
239
|
| `title_plural?` | `string` | plural version of the title |
|
|
194
|
-
| `type?` | [`DataTypes`](#datatypes) | - |
|
|
195
240
|
|
|
196
241
|
___
|
|
197
242
|
|
|
@@ -210,6 +255,35 @@ should be renamed since this applies to ConditionallyVerifiable
|
|
|
210
255
|
|
|
211
256
|
___
|
|
212
257
|
|
|
258
|
+
### ContactPoint
|
|
259
|
+
|
|
260
|
+
Ƭ **ContactPoint**: `Object`
|
|
261
|
+
|
|
262
|
+
A Contact Point for an Organization
|
|
263
|
+
|
|
264
|
+
#### Type declaration
|
|
265
|
+
|
|
266
|
+
| Name | Type |
|
|
267
|
+
| :------ | :------ |
|
|
268
|
+
| `active` | `boolean` |
|
|
269
|
+
| `contact_point_purpose` | `string` |
|
|
270
|
+
| `contact_point_type` | `string` |
|
|
271
|
+
| `e164` | `string` \| ``null`` |
|
|
272
|
+
| `e164_suffix` | `string` \| ``null`` |
|
|
273
|
+
| `e164_type` | `string` \| ``null`` |
|
|
274
|
+
| `email_address` | `string` |
|
|
275
|
+
| `email_address_preferred_format` | `string` |
|
|
276
|
+
| `end_date` | `string` |
|
|
277
|
+
| `id` | `string` |
|
|
278
|
+
| `metadata` | `unknown` |
|
|
279
|
+
| `start_date` | `string` |
|
|
280
|
+
| `to_table` | `string` |
|
|
281
|
+
| `url` | `string` \| ``null`` |
|
|
282
|
+
| `url_type` | `string` \| ``null`` |
|
|
283
|
+
| `uuid` | `string` \| `undefined` |
|
|
284
|
+
|
|
285
|
+
___
|
|
286
|
+
|
|
213
287
|
### CustomFonts
|
|
214
288
|
|
|
215
289
|
Ƭ **CustomFonts**: `Object`
|
|
@@ -270,30 +344,24 @@ ___
|
|
|
270
344
|
|
|
271
345
|
### Instance
|
|
272
346
|
|
|
273
|
-
Ƭ **Instance**: `
|
|
347
|
+
Ƭ **Instance**: [`InstanceWithoutData`](#instancewithoutdata) & { `keys`: { `[nId2: NId2]`: { `[fieldName: string]`: { `data`: `string` }; }; } ; `profile_objects`: [`ProfileObject`](#profileobject)[] ; `relationships`: [`Relationship`](#relationship)[] }
|
|
274
348
|
|
|
275
|
-
|
|
349
|
+
The API used to store data in this format, but it no
|
|
350
|
+
longer does :( so `@raytio/core` reconstructs this object.
|
|
276
351
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
| `relationships?` | [`Relationship`](#relationship)[] | - |
|
|
291
|
-
| `score?` | `unknown` | added by the client once it calculates the score |
|
|
292
|
-
| `service_provider_n_id?` | [`NId`](#nid) | Service provider ID |
|
|
293
|
-
| `start_date` | `string` | Earliest date on which the shared information was available |
|
|
294
|
-
| `state` | [`SubmissionStatus`](#submissionstatus) | The status of a submission |
|
|
295
|
-
| `sub_service_provider_hash?` | `string` | Hash of the Service Provider ID |
|
|
296
|
-
| `thread` | `string` | - |
|
|
352
|
+
___
|
|
353
|
+
|
|
354
|
+
### InstanceWithoutData
|
|
355
|
+
|
|
356
|
+
Ƭ **InstanceWithoutData**: [`CommonFields`](#commonfields)<[`IId`](#iid), { `message?`: `string` }\> & { `aa_id`: [`AId`](#aid) ; `aack_id`: [`KId`](#kid) ; `confirmation_code`: `string` ; `data_provider_email`: `string` ; `device_id?`: `unknown` ; `instance_version?`: `unknown` ; `platform_footer_html?`: `unknown` ; `previous_state?`: [`SubmissionStatus`](#submissionstatus) ; `reference`: `string` ; `related_offers?`: `unknown` ; `related_service_types?`: `unknown` ; `score?`: `unknown` ; `service_provider_n_id`: [`NId`](#nid) ; `source_ip?`: `unknown` ; `state`: [`SubmissionStatus`](#submissionstatus) ; `sub_service_provider_hash`: `string` ; `thread`: `string` }
|
|
357
|
+
|
|
358
|
+
___
|
|
359
|
+
|
|
360
|
+
### KId
|
|
361
|
+
|
|
362
|
+
Ƭ **KId**: `StringWithIdentity`<``"KId"``\>
|
|
363
|
+
|
|
364
|
+
A `k_id` (also called a `aack_id` or a `publicKeyId`) is the ID of an AA's public key
|
|
297
365
|
|
|
298
366
|
___
|
|
299
367
|
|
|
@@ -305,6 +373,45 @@ An `l_id` is the ID of any data stored in the KV-Store
|
|
|
305
373
|
|
|
306
374
|
___
|
|
307
375
|
|
|
376
|
+
### Location
|
|
377
|
+
|
|
378
|
+
Ƭ **Location**: `Object`
|
|
379
|
+
|
|
380
|
+
An Organization Location
|
|
381
|
+
|
|
382
|
+
#### Type declaration
|
|
383
|
+
|
|
384
|
+
| Name | Type |
|
|
385
|
+
| :------ | :------ |
|
|
386
|
+
| `active` | `boolean` |
|
|
387
|
+
| `address_line_1` | `string` \| ``null`` |
|
|
388
|
+
| `address_line_2` | `string` \| ``null`` |
|
|
389
|
+
| `address_line_3` | `string` \| ``null`` |
|
|
390
|
+
| `address_line_4` | `string` \| ``null`` |
|
|
391
|
+
| `administrative_area_level_1` | `string` \| ``null`` |
|
|
392
|
+
| `administrative_area_level_2` | `string` \| ``null`` |
|
|
393
|
+
| `administrative_area_level_3` | `string` \| ``null`` |
|
|
394
|
+
| `city` | `string` \| ``null`` |
|
|
395
|
+
| `country` | `string` \| ``null`` |
|
|
396
|
+
| `end_date` | `string` |
|
|
397
|
+
| `geolocation` | `string` \| ``null`` |
|
|
398
|
+
| `geolocation_outline` | `string` \| ``null`` |
|
|
399
|
+
| `id` | `string` |
|
|
400
|
+
| `locality` | `string` \| ``null`` |
|
|
401
|
+
| `location_description` | `string` \| ``null`` |
|
|
402
|
+
| `location_name` | `string` |
|
|
403
|
+
| `metadata` | `unknown` |
|
|
404
|
+
| `postal_code` | `string` |
|
|
405
|
+
| `postal_code_suffix` | `string` \| ``null`` |
|
|
406
|
+
| `premise` | `string` \| ``null`` |
|
|
407
|
+
| `region` | `string` \| ``null`` |
|
|
408
|
+
| `route` | `string` \| ``null`` |
|
|
409
|
+
| `start_date` | `string` |
|
|
410
|
+
| `street_number` | `string` \| ``null`` |
|
|
411
|
+
| `subpremise` | `string` \| ``null`` |
|
|
412
|
+
|
|
413
|
+
___
|
|
414
|
+
|
|
308
415
|
### Lookup
|
|
309
416
|
|
|
310
417
|
Ƭ **Lookup**: `Object`
|
|
@@ -330,6 +437,14 @@ An `n_id` is the ID of a [ProfileObject](#profileobject)
|
|
|
330
437
|
|
|
331
438
|
___
|
|
332
439
|
|
|
440
|
+
### NId2
|
|
441
|
+
|
|
442
|
+
Ƭ **NId2**: `StringWithIdentity`<``"NId2"``\>
|
|
443
|
+
|
|
444
|
+
⚠️ This ID duplicates the [NId](#nid) and should only be used in exceptional circumstances
|
|
445
|
+
|
|
446
|
+
___
|
|
447
|
+
|
|
333
448
|
### OId
|
|
334
449
|
|
|
335
450
|
Ƭ **OId**: `StringWithIdentity`<``"OId"``\>
|
|
@@ -349,14 +464,8 @@ NOTE: this is different to how the schema defines an Organization. **The schema
|
|
|
349
464
|
|
|
350
465
|
| Name | Type |
|
|
351
466
|
| :------ | :------ |
|
|
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`\> |
|
|
467
|
+
| `address` | `unknown` |
|
|
468
|
+
| `customer` | `unknown` |
|
|
360
469
|
| `email` | `string` |
|
|
361
470
|
| `id` | [`OId`](#oid) |
|
|
362
471
|
| `name` | `string` |
|
|
@@ -371,41 +480,81 @@ A `p_id` is the ID of a [Relationship](#relationship)
|
|
|
371
480
|
|
|
372
481
|
___
|
|
373
482
|
|
|
374
|
-
###
|
|
483
|
+
### Party
|
|
375
484
|
|
|
376
|
-
Ƭ **
|
|
485
|
+
Ƭ **Party**: `Object`
|
|
377
486
|
|
|
378
|
-
|
|
487
|
+
An Organisation
|
|
379
488
|
|
|
380
|
-
#### Type
|
|
489
|
+
#### Type declaration
|
|
381
490
|
|
|
382
491
|
| Name | Type |
|
|
383
492
|
| :------ | :------ |
|
|
384
|
-
| `
|
|
493
|
+
| `active` | `boolean` |
|
|
494
|
+
| `end_date` | `string` |
|
|
495
|
+
| `id` | `string` |
|
|
496
|
+
| `metadata` | [`PartyMetadata`](#partymetadata) |
|
|
497
|
+
| `party_description` | `string` |
|
|
498
|
+
| `party_name` | `string` |
|
|
499
|
+
| `party_number` | `number` |
|
|
500
|
+
| `party_type` | `string` |
|
|
501
|
+
| `start_date` | `string` |
|
|
502
|
+
|
|
503
|
+
___
|
|
504
|
+
|
|
505
|
+
### PartyMetadata
|
|
506
|
+
|
|
507
|
+
Ƭ **PartyMetadata**: `Object`
|
|
508
|
+
|
|
509
|
+
An Organizations credentials
|
|
385
510
|
|
|
386
511
|
#### Type declaration
|
|
387
512
|
|
|
388
513
|
| Name | Type |
|
|
389
514
|
| :------ | :------ |
|
|
390
|
-
| `
|
|
391
|
-
| `
|
|
392
|
-
| `
|
|
515
|
+
| `centrix_credentials` | `unknown` |
|
|
516
|
+
| `gandalf` | `unknown` |
|
|
517
|
+
| `stripe` | { `customer`: `unknown` } |
|
|
518
|
+
| `stripe.customer` | `unknown` |
|
|
393
519
|
|
|
394
520
|
___
|
|
395
521
|
|
|
396
|
-
###
|
|
522
|
+
### PartySite
|
|
397
523
|
|
|
398
|
-
Ƭ **
|
|
524
|
+
Ƭ **PartySite**: `Object`
|
|
399
525
|
|
|
400
|
-
|
|
401
|
-
May contain nested JSON and [Encrypted](#encrypted) properties.
|
|
526
|
+
An Organization Site
|
|
402
527
|
|
|
403
|
-
|
|
404
|
-
`__signature` nor can they include the character sequence `<=>`.
|
|
528
|
+
#### Type declaration
|
|
405
529
|
|
|
406
|
-
|
|
530
|
+
| Name | Type |
|
|
531
|
+
| :------ | :------ |
|
|
532
|
+
| `active` | `boolean` |
|
|
533
|
+
| `end_date` | `string` |
|
|
534
|
+
| `id` | `string` |
|
|
535
|
+
| `location_number` | `number` |
|
|
536
|
+
| `metadata` | `unknown` |
|
|
537
|
+
| `party_id` | `string` |
|
|
538
|
+
| `party_site_description` | `string` \| ``null`` |
|
|
539
|
+
| `party_site_name` | `string` |
|
|
540
|
+
| `party_site_number` | `string` \| ``null`` |
|
|
541
|
+
| `party_use_primary` | `string` |
|
|
542
|
+
| `party_uses` | `string`[] |
|
|
543
|
+
| `start_date` | `string` |
|
|
407
544
|
|
|
408
|
-
|
|
545
|
+
___
|
|
546
|
+
|
|
547
|
+
### ProfileObject
|
|
548
|
+
|
|
549
|
+
Ƭ **ProfileObject**<`Properties`\>: `Partial`<[`CommonFields`](#commonfields)<[`NId2`](#nid2)\>\> & { `labels`: `string`[] ; `n_id`: [`NId`](#nid) ; `properties`: `Properties` }
|
|
550
|
+
|
|
551
|
+
You can supply an option type argument if you know exactly what the properties will be
|
|
552
|
+
|
|
553
|
+
#### Type parameters
|
|
554
|
+
|
|
555
|
+
| Name | Type |
|
|
556
|
+
| :------ | :------ |
|
|
557
|
+
| `Properties` | `Json` |
|
|
409
558
|
|
|
410
559
|
___
|
|
411
560
|
|
|
@@ -422,7 +571,7 @@ This is what @raytio/core exposes, which is more useable than [Verification](#ve
|
|
|
422
571
|
| `belongsToNId?` | [`NId`](#nid) | nId of the PO that the verification belongs to. Could be undefined |
|
|
423
572
|
| `expired` | `Date` \| ``false`` | If the verification has expired, it's the date that it expired on. Otherwise it's `false` |
|
|
424
573
|
| `fieldName` | `string` | - |
|
|
425
|
-
| `metadata?` | `
|
|
574
|
+
| `metadata?` | [`VerificationPayload`](#verificationpayload)<``false``\>[``"metadata"``] | arbitary metadata returned by the verifier |
|
|
426
575
|
| `nID` | [`NId`](#nid) | nId of the verification |
|
|
427
576
|
| `provider` | [`VerificationProvider`](#verificationprovider) | - |
|
|
428
577
|
| `signature` | `string` | - |
|
|
@@ -440,19 +589,22 @@ ___
|
|
|
440
589
|
|
|
441
590
|
| Name | Type |
|
|
442
591
|
| :------ | :------ |
|
|
592
|
+
| `active?` | `boolean` |
|
|
443
593
|
| `end` | [`Urn`](#urn) |
|
|
594
|
+
| `end_date?` | `string` |
|
|
444
595
|
| `p_id` | [`PId`](#pid) |
|
|
445
596
|
| `properties?` | { `[fieldName: string]`: `unknown`; `name?`: `string` ; `p_id`: [`PId`](#pid) } |
|
|
446
597
|
| `properties.name?` | `string` |
|
|
447
598
|
| `properties.p_id` | [`PId`](#pid) |
|
|
448
599
|
| `start` | [`Urn`](#urn) |
|
|
600
|
+
| `start_date?` | `string` |
|
|
449
601
|
| `type` | `string` |
|
|
450
602
|
|
|
451
603
|
___
|
|
452
604
|
|
|
453
605
|
### Schema
|
|
454
606
|
|
|
455
|
-
Ƭ **Schema**: [`CommonSchemaAttributes`](#commonschemaattributes) & { `clientLocale?`: `string` ; `end_date?`: `string` ; `groupNames?`: `Record`<`string`, `string`\> ; `group_title?`: `string` ; `isProfileSchema?`: `boolean` ; `isSpSchema?`: `boolean` ; `properties`: { `[fieldName: string]`: [`SchemaField`](
|
|
607
|
+
Ƭ **Schema**: [`CommonSchemaAttributes`](#commonschemaattributes) & { `clientLocale?`: `string` ; `end_date?`: `string` ; `groupNames?`: `Record`<`string`, `string`\> ; `group_title?`: `string` ; `isProfileSchema?`: `boolean` ; `isSpSchema?`: `boolean` ; `name`: [`SchemaName`](#schemaname) ; `properties`: { `[fieldName: string]`: [`SchemaField`](#schemafield); } ; `required?`: (`string` \| [`ConditionallyRequired`](#conditionallyrequired))[] ; `start_date?`: `string` ; `timing?`: `Record`<``"extract"`` \| ``"live_person"`` \| ``"verify_pending_delay"``, `number`\> ; `type?`: [`DataTypes`](#datatypes) ; `verified_fields?`: (`string` \| [`ConditionallyRequired`](#conditionallyrequired))[] ; `version`: `string` ; `wasExpandedByClient?`: `boolean` }
|
|
456
608
|
|
|
457
609
|
Raytio's variant of JSON Schema, as used by the client. It is a modified version
|
|
458
610
|
of what the API returns.
|
|
@@ -468,7 +620,7 @@ ___
|
|
|
468
620
|
| Name | Type | Description |
|
|
469
621
|
| :------ | :------ | :------ |
|
|
470
622
|
| `$id?` | `string` | **`Deprecated`** don't use, it's inconsistent |
|
|
471
|
-
| `$ref?` | `
|
|
623
|
+
| `$ref?` | [`SchemaName`](#schemaname) | If this field refers to a sub-object |
|
|
472
624
|
| `add_row_btn_label?` | `string` | if this field is a table input, this determines the text to show on the "Add Row" btn |
|
|
473
625
|
| `allOf?` | [{ `$ref`: `string` }, [`ServerSchemaField`](#serverschemafield)] | - |
|
|
474
626
|
| `content?` | `string` | only checkbox uses this prop |
|
|
@@ -484,7 +636,7 @@ ___
|
|
|
484
636
|
| `examples?` | `unknown`[] | - |
|
|
485
637
|
| `format?` | ``"date"`` \| ``"date-time"`` \| ``"uri"`` | - |
|
|
486
638
|
| `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 |
|
|
487
|
-
| `items?` | { `properties`: { `[subFieldName: string]`: [`SchemaField`](#schemafield); } ; `type`: [`DataTypes`](
|
|
639
|
+
| `items?` | { `properties`: { `[subFieldName: string]`: [`SchemaField`](#schemafield); } ; `type`: [`DataTypes`](#datatypes) } | `items` is used for nested arrays, (while `properties` is used for nested objects) |
|
|
488
640
|
| `items.properties` | { `[subFieldName: string]`: [`SchemaField`](#schemafield); } | - |
|
|
489
641
|
| `items.type` | [`DataTypes`](#datatypes) | - |
|
|
490
642
|
| `lookup?` | `string` | URL to a JSON file in the `Lookup` format |
|
|
@@ -511,7 +663,15 @@ ___
|
|
|
511
663
|
|
|
512
664
|
### SchemaFieldTag
|
|
513
665
|
|
|
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"``
|
|
666
|
+
Ƭ **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"``
|
|
667
|
+
|
|
668
|
+
___
|
|
669
|
+
|
|
670
|
+
### SchemaName
|
|
671
|
+
|
|
672
|
+
Ƭ **SchemaName**: `StringWithIdentity`<``"SchemaName"``\>
|
|
673
|
+
|
|
674
|
+
A `SchemaName` is the ID of a [Schema](#schema)
|
|
515
675
|
|
|
516
676
|
___
|
|
517
677
|
|
|
@@ -521,6 +681,14 @@ ___
|
|
|
521
681
|
|
|
522
682
|
___
|
|
523
683
|
|
|
684
|
+
### SchemaType
|
|
685
|
+
|
|
686
|
+
Ƭ **SchemaType**: ``"ss"`` \| ``"ps"`` \| ``"us"``
|
|
687
|
+
|
|
688
|
+
Type Classification of a Schema returned by API
|
|
689
|
+
|
|
690
|
+
___
|
|
691
|
+
|
|
524
692
|
### ServerSchemaField
|
|
525
693
|
|
|
526
694
|
Ƭ **ServerSchemaField**: `Omit`<[`SchemaField`](#schemafield), ``"$prop"``\>
|
|
@@ -545,7 +713,7 @@ ___
|
|
|
545
713
|
|
|
546
714
|
### Urn
|
|
547
715
|
|
|
548
|
-
Ƭ **Urn**: \`urn:${
|
|
716
|
+
Ƭ **Urn**: \`urn:user:${UId}\` \| \`urn:profile\_object:${NId}\` \| \`urn:instance:${IId}\` \| \`urn:temp\_object:${LId}\` \| \`urn:schema:${SchemaName}\` \| \`urn:document:${NId}\`
|
|
549
717
|
|
|
550
718
|
e.g. "urn:user:..."
|
|
551
719
|
|
|
@@ -575,7 +743,7 @@ ___
|
|
|
575
743
|
|
|
576
744
|
### Verification
|
|
577
745
|
|
|
578
|
-
Ƭ **Verification**<`WithValue`\>: [`ProfileObject`](#profileobject)<{ `field`: `string` ; `n_id`: [`NId`](
|
|
746
|
+
Ƭ **Verification**<`WithValue`\>: [`ProfileObject`](#profileobject)<{ `field`: `string` ; `n_id`: [`NId`](#nid) ; `valid_until?`: `string` ; `verifications`: [{ `data`: [`VerificationPayload`](#verificationpayload)<`WithValue`\> ; `hashing_algorithm?`: ``"SHA512"`` ; `key_id?`: `string` ; `key_urn?`: `string` ; `signature`: `string` ; `signing_algorithm?`: ``"RSASSA_PSS_SHA_512"`` }] }\>
|
|
579
747
|
|
|
580
748
|
Different APIs inconsistently include the `value` prop. If you know it exists,
|
|
581
749
|
use `Verification<true>`, otherwise just `Verification`. Verifications from
|
|
@@ -591,7 +759,7 @@ ___
|
|
|
591
759
|
|
|
592
760
|
### VerificationPayload
|
|
593
761
|
|
|
594
|
-
Ƭ **VerificationPayload**<`WithValue`\>: { `field`: `string` ; `metadata?`: `
|
|
762
|
+
Ƭ **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?`: [`SchemaName`](#schemaname) ; `source`: `string` ; `source_hashed_n_id?`: [`NId`](#nid) ; `source_n_id?`: [`NId`](#nid) ; `type?`: ``null`` ; `v_id`: `string` ; `verification_date`: `string` ; `verifier_div`: `string` ; `verifier_id?`: [`NId`](#nid) ; `verifier_service_id?`: [`NId`](#nid) ; `verifier_source_id?`: [`NId`](#nid) } & `WithValue` extends ``true`` ? { `value`: `string` \| `number` } : {}
|
|
595
763
|
|
|
596
764
|
#### Type parameters
|
|
597
765
|
|
|
@@ -674,6 +842,7 @@ in the query parameters, it needs to be base64 and/or url encoded.
|
|
|
674
842
|
| Name | Type | Description |
|
|
675
843
|
| :------ | :------ | :------ |
|
|
676
844
|
| `a_id` | [`AId`](#aid) | - |
|
|
845
|
+
| `display_sharing_preview?` | `boolean` | If this value is true, the form will display some data sharing information before the form (WizardPreview) |
|
|
677
846
|
| `emails?` | `string`[] | if specified, the email addresses that a submission should be sent to |
|
|
678
847
|
| `expiry_date?` | `number` | number of days in the future |
|
|
679
848
|
| `pages` | [`WizardPage`](#wizardpage)[] | - |
|
|
@@ -683,11 +852,12 @@ in the query parameters, it needs to be base64 and/or url encoded.
|
|
|
683
852
|
| `return_to?` | `string` | the callback url to redirect to once complete. Must be in the AA's list of authorized callback urls |
|
|
684
853
|
| `review_text?` | `string` | the text on the WizardReview page |
|
|
685
854
|
| `sharing_data_message?` | `string` | the loading message to show next to the spinner after the review screen |
|
|
686
|
-
| `signature_schema?` | `
|
|
855
|
+
| `signature_schema?` | [`SchemaName`](#schemaname) | if specified, a Wizard will be shown on the review page with this schema |
|
|
687
856
|
| `skip_share?` | `boolean` | **`Deprecated`** added in !244 but never used |
|
|
688
857
|
| `submit_text?` | `string` | the submit button label |
|
|
689
|
-
| `terms_schema?` | `
|
|
858
|
+
| `terms_schema?` | [`SchemaName`](#schemaname) | if specified, a Wizard will be shown on the review page with this schema |
|
|
690
859
|
| `update_reference?` | `boolean` | whether the user can change the reference, if there is one in the QP |
|
|
860
|
+
| `webauthn_type?` | (``"usb"`` \| ``"nfc"`` \| ``"ble"`` \| ``"internal"``)[] | if specified, the user must validate their WebAuthN credential before they can submit the form |
|
|
691
861
|
|
|
692
862
|
___
|
|
693
863
|
|
|
@@ -725,7 +895,7 @@ configuration data for a single wizard page ([WizardConfig](#wizardconfig))
|
|
|
725
895
|
| `profile?` | `boolean` | if explictly == false, then it's an AO (not a PO), in which case there can only be one schema |
|
|
726
896
|
| `reverify_header?` | `string` | custom text & header that's displayed on reverfication modal for expired PO |
|
|
727
897
|
| `reverify_text?` | `string` | - |
|
|
728
|
-
| `schemas` | `
|
|
898
|
+
| `schemas` | [`SchemaName`](#schemaname)[] | - |
|
|
729
899
|
| `selection_hierarchy_json?` | `string` | a URL to a preset for configuing NestedSchemaSelect. DeepConfig |
|
|
730
900
|
| `service_provider_link?` | `boolean` | see #463 |
|
|
731
901
|
| `share?` | ``"profile"`` \| ``"verification"`` \| ``"both"`` | the information to share. undefined implies both. |
|
|
@@ -752,9 +922,9 @@ This is what's returned by the API
|
|
|
752
922
|
| :------ | :------ | :------ |
|
|
753
923
|
| `active` | ``true`` | - |
|
|
754
924
|
| `end_date` | `string` | ISO Date. If this tag exists, the schema is deprecated. |
|
|
755
|
-
| `
|
|
756
|
-
| `
|
|
925
|
+
| `schema` | [`CommonSchemaAttributes`](#commonschemaattributes) & { `$id?`: `string` ; `$schema?`: `string` ; `allOf?`: { `$ref?`: `string` ; `if?`: `Partial`<[`WrappedSchema`](#wrappedschema)[``"schema"``]\> ; `then?`: `Partial`<[`WrappedSchema`](#wrappedschema)[``"schema"``]\> }[] ; `definitions?`: `Record`<`string`, { `$ref`: [`Urn`](#urn) }\> ; `properties`: { `[fieldName: string]`: [`ServerSchemaField`](#serverschemafield); } ; `required?`: `string`[] ; `verified_fields?`: `string`[] } | - |
|
|
926
|
+
| `schema_name` | [`SchemaName`](#schemaname) | Schema Name Type and Version Properties |
|
|
927
|
+
| `schema_type` | [`SchemaType`](#schematype) | - |
|
|
928
|
+
| `schema_version` | `string` | - |
|
|
757
929
|
| `start_date` | `string` | ISO Date |
|
|
758
|
-
| `type` | ``"ss"`` \| ``"ps"`` \| ``"us"`` | - |
|
|
759
|
-
| `version` | `string` | - |
|
|
760
930
|
| `version_current` | `boolean` | whether the `version` is the latest version |
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED