@raytio/types 5.2.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +638 -0
- package/dist/crypto.d.ts +2 -2
- package/dist/index.js +5 -1
- package/dist/raytio.d.ts +20 -10
- package/dist/schema.d.ts +39 -19
- package/dist/theme.d.ts +4 -0
- package/dist/verification.d.ts +27 -20
- package/dist/verification.js +4 -0
- package/dist/wizard.d.ts +13 -5
- package/package.json +3 -2
- package/src/__tests__/schema.ts +23 -0
- package/src/crypto.ts +3 -2
- package/src/raytio.ts +26 -11
- package/src/schema.ts +72 -18
- package/src/theme.ts +2 -0
- package/src/verification.ts +36 -23
- package/src/wizard.ts +16 -5
package/README.md
CHANGED
|
@@ -19,3 +19,641 @@ import type { Schema } from "@raytio/types";
|
|
|
19
19
|
Hovering over the type in VSCode will display documentation and available properties.
|
|
20
20
|
|
|
21
21
|
# Documentation
|
|
22
|
+
|
|
23
|
+
## Table of contents
|
|
24
|
+
|
|
25
|
+
### Enumerations
|
|
26
|
+
|
|
27
|
+
- [FieldVerification](enums/FieldVerification.md)
|
|
28
|
+
- [POVerification](enums/POVerification.md)
|
|
29
|
+
|
|
30
|
+
### Type aliases
|
|
31
|
+
|
|
32
|
+
- [AA](#aa)
|
|
33
|
+
- [AId](#aid)
|
|
34
|
+
- [Colors](#colors)
|
|
35
|
+
- [ConditionallyRequired](#conditionallyrequired)
|
|
36
|
+
- [CustomFonts](#customfonts)
|
|
37
|
+
- [DataTypes](#datatypes)
|
|
38
|
+
- [Encrypted](#encrypted)
|
|
39
|
+
- [GId](#gid)
|
|
40
|
+
- [IId](#iid)
|
|
41
|
+
- [Instance](#instance)
|
|
42
|
+
- [Lookup](#lookup)
|
|
43
|
+
- [NId](#nid)
|
|
44
|
+
- [OId](#oid)
|
|
45
|
+
- [Organization](#organization)
|
|
46
|
+
- [PId](#pid)
|
|
47
|
+
- [ProfileObject](#profileobject)
|
|
48
|
+
- [Properties](#properties)
|
|
49
|
+
- [RealVer](#realver)
|
|
50
|
+
- [Relationship](#relationship)
|
|
51
|
+
- [Schema](#schema)
|
|
52
|
+
- [SchemaField](#schemafield)
|
|
53
|
+
- [SchemaFieldTag](#schemafieldtag)
|
|
54
|
+
- [SchemaMetadata](#schemametadata)
|
|
55
|
+
- [SchemaTag](#schematag)
|
|
56
|
+
- [SubmissionStatus](#submissionstatus)
|
|
57
|
+
- [UId](#uid)
|
|
58
|
+
- [Urn](#urn)
|
|
59
|
+
- [UrnNodeType](#urnnodetype)
|
|
60
|
+
- [Validation](#validation)
|
|
61
|
+
- [Verification](#verification)
|
|
62
|
+
- [VerificationPayload](#verificationpayload)
|
|
63
|
+
- [VerificationProvider](#verificationprovider)
|
|
64
|
+
- [WizardConfig](#wizardconfig)
|
|
65
|
+
- [WizardPage](#wizardpage)
|
|
66
|
+
|
|
67
|
+
## Type aliases
|
|
68
|
+
|
|
69
|
+
### AA
|
|
70
|
+
|
|
71
|
+
Ƭ **AA**: `Object`
|
|
72
|
+
|
|
73
|
+
#### Type declaration
|
|
74
|
+
|
|
75
|
+
| Name | Type | Description |
|
|
76
|
+
| :------ | :------ | :------ |
|
|
77
|
+
| `a_id` | [`AId`](#aid) | - |
|
|
78
|
+
| `aa_help?` | `string` | markdown or string help information including [phoneNumber || email] |
|
|
79
|
+
| `aa_introduction?` | `string` | If a user signs up while completing this form, this message will be sent in the sign up email. |
|
|
80
|
+
| `auth_list_enabled?` | `boolean` | if true, only specific email addresses can submit the form |
|
|
81
|
+
| `callback_uri?` | `string`[] | - |
|
|
82
|
+
| `description?` | `string` | - |
|
|
83
|
+
| `name` | `string` | - |
|
|
84
|
+
| `org_id` | [`OId`](#oid) | the id of the associated organisation |
|
|
85
|
+
| `picture?` | [`Urn`](#urn) | - |
|
|
86
|
+
| `picture_url?` | `string` | Easy to use AA logo url for pasting inot emails |
|
|
87
|
+
| `ruleset?` | `unknown` | configuration for the submission rules |
|
|
88
|
+
| `scopes?` | `string`[] | - |
|
|
89
|
+
| `service_provider_n_id?` | [`NId`](#nid) | the n_id of the associated service provider |
|
|
90
|
+
| `tags?` | `string`[] | - |
|
|
91
|
+
| `theme?` | `Object` | - |
|
|
92
|
+
| `theme.colors?` | [`Colors`](#colors) | - |
|
|
93
|
+
| `theme.font?` | [`CustomFonts`](#customfonts) | - |
|
|
94
|
+
|
|
95
|
+
___
|
|
96
|
+
|
|
97
|
+
### AId
|
|
98
|
+
|
|
99
|
+
Ƭ **AId**: `StringWithIdentity`<``"AId"``\>
|
|
100
|
+
|
|
101
|
+
An `a_id` is the ID of an @see AA
|
|
102
|
+
|
|
103
|
+
___
|
|
104
|
+
|
|
105
|
+
### Colors
|
|
106
|
+
|
|
107
|
+
Ƭ **Colors**: `Object`
|
|
108
|
+
|
|
109
|
+
#### Type declaration
|
|
110
|
+
|
|
111
|
+
| Name | Type | Description |
|
|
112
|
+
| :------ | :------ | :------ |
|
|
113
|
+
| `blank` | `string` | - |
|
|
114
|
+
| `blankBackground` | `string` | - |
|
|
115
|
+
| `climaterolText` | `string` | - |
|
|
116
|
+
| `climaterolUi` | `string` | - |
|
|
117
|
+
| `errorRed` | `string` | - |
|
|
118
|
+
| `feelingHugged` | `string` | - |
|
|
119
|
+
| `loadingYellow` | `string` | - |
|
|
120
|
+
| `poolblueText` | `string` | - |
|
|
121
|
+
| `poolblueUi` | `string` | - |
|
|
122
|
+
| `raytioOrangeHover` | `string` | - |
|
|
123
|
+
| `raytioOrangeShade` | `string` | only used by the fancy layout on the login screen |
|
|
124
|
+
| `raytioOrangeText` | `string` | - |
|
|
125
|
+
| `raytioOrangeUi` | `string` | - |
|
|
126
|
+
| `sariShade` | `string` | - |
|
|
127
|
+
| `silverShell` | `string` | - |
|
|
128
|
+
| `sirPinklyText` | `string` | - |
|
|
129
|
+
| `sirPinklyUi` | `string` | - |
|
|
130
|
+
| `successGreen` | `string` | - |
|
|
131
|
+
| `textFull` | `string` | - |
|
|
132
|
+
| `textLight` | `string` | - |
|
|
133
|
+
| `textMedium` | `string` | - |
|
|
134
|
+
| `violaPerpetuoText` | `string` | - |
|
|
135
|
+
| `violaPerpetuoUi` | `string` | - |
|
|
136
|
+
|
|
137
|
+
___
|
|
138
|
+
|
|
139
|
+
### ConditionallyRequired
|
|
140
|
+
|
|
141
|
+
Ƭ **ConditionallyRequired**: `Object`
|
|
142
|
+
|
|
143
|
+
should be renamed since this applies to ConditionallyVerifiable
|
|
144
|
+
|
|
145
|
+
#### Type declaration
|
|
146
|
+
|
|
147
|
+
| Name | Type |
|
|
148
|
+
| :------ | :------ |
|
|
149
|
+
| `field` | `string` |
|
|
150
|
+
| `if` | `Object` |
|
|
151
|
+
|
|
152
|
+
___
|
|
153
|
+
|
|
154
|
+
### CustomFonts
|
|
155
|
+
|
|
156
|
+
Ƭ **CustomFonts**: `Object`
|
|
157
|
+
|
|
158
|
+
#### Type declaration
|
|
159
|
+
|
|
160
|
+
| Name | Type |
|
|
161
|
+
| :------ | :------ |
|
|
162
|
+
| `body?` | `string` |
|
|
163
|
+
| `header?` | `string` |
|
|
164
|
+
|
|
165
|
+
___
|
|
166
|
+
|
|
167
|
+
### DataTypes
|
|
168
|
+
|
|
169
|
+
Ƭ **DataTypes**: ``"string"`` \| ``"number"`` \| ``"boolean"`` \| ``"object"`` \| ``"integer"`` \| ``"array"`` \| ``"null"``
|
|
170
|
+
|
|
171
|
+
___
|
|
172
|
+
|
|
173
|
+
### Encrypted
|
|
174
|
+
|
|
175
|
+
Ƭ **Encrypted**<`_Data`\>: `Object`
|
|
176
|
+
|
|
177
|
+
#### Type parameters
|
|
178
|
+
|
|
179
|
+
| Name | Type |
|
|
180
|
+
| :------ | :------ |
|
|
181
|
+
| `_Data` | `string` |
|
|
182
|
+
|
|
183
|
+
#### Type declaration
|
|
184
|
+
|
|
185
|
+
| Name | Type |
|
|
186
|
+
| :------ | :------ |
|
|
187
|
+
| `encrypted_data` | `Object` |
|
|
188
|
+
| `encrypted_data.algorithm` | `AesKeyAlgorithm` |
|
|
189
|
+
| `encrypted_data.data` | `string` |
|
|
190
|
+
| `encrypted_data.iv` | `string` |
|
|
191
|
+
| `encrypted_key` | `Object` |
|
|
192
|
+
| `encrypted_key.encrypted_key` | `string` |
|
|
193
|
+
|
|
194
|
+
___
|
|
195
|
+
|
|
196
|
+
### GId
|
|
197
|
+
|
|
198
|
+
Ƭ **GId**: `StringWithIdentity`<``"GId"``\>
|
|
199
|
+
|
|
200
|
+
A `g_id` is the ID of a group
|
|
201
|
+
|
|
202
|
+
___
|
|
203
|
+
|
|
204
|
+
### IId
|
|
205
|
+
|
|
206
|
+
Ƭ **IId**: `StringWithIdentity`<``"IId"``\>
|
|
207
|
+
|
|
208
|
+
An `i_id` is the ID of an @see Instance
|
|
209
|
+
|
|
210
|
+
___
|
|
211
|
+
|
|
212
|
+
### Instance
|
|
213
|
+
|
|
214
|
+
Ƭ **Instance**: `Object`
|
|
215
|
+
|
|
216
|
+
#### Type declaration
|
|
217
|
+
|
|
218
|
+
| Name | Type | Description |
|
|
219
|
+
| :------ | :------ | :------ |
|
|
220
|
+
| `_state?` | [`SubmissionStatus`](#submissionstatus) | **`depreacted`** The status of a submission |
|
|
221
|
+
| `a_id` | [`AId`](#aid) | ID of the access application this submission was made to |
|
|
222
|
+
| `aa_name` | `string` | name of the access application this submission was made to |
|
|
223
|
+
| `confirmation_code` | `string` | Code that validates information has been shared |
|
|
224
|
+
| `data_provider_email` | `string` | Email of user who shared the data |
|
|
225
|
+
| `end_date` | `string` | Latest date in which the shared information was available |
|
|
226
|
+
| `i_id` | [`IId`](#iid) | Access application instance ID |
|
|
227
|
+
| `keys` | `Object` | - |
|
|
228
|
+
| `previous_state` | [`SubmissionStatus`](#submissionstatus) | Previous status of the shared information |
|
|
229
|
+
| `profile_objects` | [`ProfileObject`](#profileobject)[] | data associated is access application's instance |
|
|
230
|
+
| `reference` | `string` | reference provided by the user who shared the data |
|
|
231
|
+
| `relationships?` | [`Relationship`](#relationship)[] | - |
|
|
232
|
+
| `service_provider_n_id?` | [`NId`](#nid) | Service provider ID |
|
|
233
|
+
| `start_date` | `string` | Earliest date on which the shared information was available |
|
|
234
|
+
| `state` | [`SubmissionStatus`](#submissionstatus) | The status of a submission |
|
|
235
|
+
| `sub_service_provider_hash?` | `string` | Hash of the Service Provider ID |
|
|
236
|
+
| `thread` | `string` | - |
|
|
237
|
+
|
|
238
|
+
___
|
|
239
|
+
|
|
240
|
+
### Lookup
|
|
241
|
+
|
|
242
|
+
Ƭ **Lookup**: `Object`
|
|
243
|
+
|
|
244
|
+
#### Type declaration
|
|
245
|
+
|
|
246
|
+
| Name | Type | Description |
|
|
247
|
+
| :------ | :------ | :------ |
|
|
248
|
+
| `children?` | [`Lookup`](#lookup)[] | - |
|
|
249
|
+
| `description?` | `string` | - |
|
|
250
|
+
| `key` | `string` \| `number` | - |
|
|
251
|
+
| `label?` | `string` \| `number` | Used in Antd Cascader |
|
|
252
|
+
| `requires_2FA?` | `boolean` | used in AkahuDynamicSection only |
|
|
253
|
+
| `value` | `string` \| `number` | - |
|
|
254
|
+
|
|
255
|
+
___
|
|
256
|
+
|
|
257
|
+
### NId
|
|
258
|
+
|
|
259
|
+
Ƭ **NId**: `StringWithIdentity`<``"NId"``\>
|
|
260
|
+
|
|
261
|
+
An `n_id` is the ID of a @see ProfileObject
|
|
262
|
+
|
|
263
|
+
___
|
|
264
|
+
|
|
265
|
+
### OId
|
|
266
|
+
|
|
267
|
+
Ƭ **OId**: `StringWithIdentity`<``"OId"``\>
|
|
268
|
+
|
|
269
|
+
An `o_id` is the ID of an @see Organization
|
|
270
|
+
|
|
271
|
+
___
|
|
272
|
+
|
|
273
|
+
### Organization
|
|
274
|
+
|
|
275
|
+
Ƭ **Organization**: `Object`
|
|
276
|
+
|
|
277
|
+
An organization.
|
|
278
|
+
NOTE: this is different to how the schema defines an Organization. **The schema is wrong (see #468)**
|
|
279
|
+
|
|
280
|
+
#### Type declaration
|
|
281
|
+
|
|
282
|
+
| Name | Type |
|
|
283
|
+
| :------ | :------ |
|
|
284
|
+
| `address` | `Object` |
|
|
285
|
+
| `address.city` | `string` |
|
|
286
|
+
| `address.country` | `string` |
|
|
287
|
+
| `address.locationType` | `string` |
|
|
288
|
+
| `address.region` | `string` |
|
|
289
|
+
| `address.street1` | `string` |
|
|
290
|
+
| `address.street2` | `string` |
|
|
291
|
+
| `customer` | `Record`<`string`, `unknown`\> |
|
|
292
|
+
| `email` | `string` |
|
|
293
|
+
| `id` | [`OId`](#oid) |
|
|
294
|
+
| `name` | `string` |
|
|
295
|
+
|
|
296
|
+
___
|
|
297
|
+
|
|
298
|
+
### PId
|
|
299
|
+
|
|
300
|
+
Ƭ **PId**: `StringWithIdentity`<``"PId"``\>
|
|
301
|
+
|
|
302
|
+
A `p_id` is the ID of a @see Relationship
|
|
303
|
+
|
|
304
|
+
___
|
|
305
|
+
|
|
306
|
+
### ProfileObject
|
|
307
|
+
|
|
308
|
+
Ƭ **ProfileObject**<`Properties`\>: `Object`
|
|
309
|
+
|
|
310
|
+
You can supply an option type argument if you know exactly what the properties will be
|
|
311
|
+
|
|
312
|
+
#### Type parameters
|
|
313
|
+
|
|
314
|
+
| Name | Type |
|
|
315
|
+
| :------ | :------ |
|
|
316
|
+
| `Properties` | `Json` |
|
|
317
|
+
|
|
318
|
+
#### Type declaration
|
|
319
|
+
|
|
320
|
+
| Name | Type |
|
|
321
|
+
| :------ | :------ |
|
|
322
|
+
| `labels` | `string`[] |
|
|
323
|
+
| `n_id` | [`NId`](#nid) |
|
|
324
|
+
| `properties` | `Properties` |
|
|
325
|
+
|
|
326
|
+
___
|
|
327
|
+
|
|
328
|
+
### Properties
|
|
329
|
+
|
|
330
|
+
Ƭ **Properties**: `Object`
|
|
331
|
+
|
|
332
|
+
arbitrary key-values pairs stored on a Profile Object.
|
|
333
|
+
May contain nested JSON and @see Encrypted properties.
|
|
334
|
+
|
|
335
|
+
There are some limits to field names: they cannot be called
|
|
336
|
+
`__signature` nor can they include the character sequence `<=>`.
|
|
337
|
+
|
|
338
|
+
#### Index signature
|
|
339
|
+
|
|
340
|
+
▪ [fieldName: `string`]: `any`
|
|
341
|
+
|
|
342
|
+
___
|
|
343
|
+
|
|
344
|
+
### RealVer
|
|
345
|
+
|
|
346
|
+
Ƭ **RealVer**: `Object`
|
|
347
|
+
|
|
348
|
+
This is what @raytio/core exposes, which is more useable than @see Verification
|
|
349
|
+
|
|
350
|
+
#### Type declaration
|
|
351
|
+
|
|
352
|
+
| Name | Type | Description |
|
|
353
|
+
| :------ | :------ | :------ |
|
|
354
|
+
| `belongsToNId?` | [`NId`](#nid) | nId of the PO that the verification belongs to. Could be undefined |
|
|
355
|
+
| `expired` | `Date` \| ``false`` | If the verification has expired, it's the date that it expired on. Otherwise it's `false` |
|
|
356
|
+
| `fieldName` | `string` | - |
|
|
357
|
+
| `metadata?` | `Record`<`string`, `unknown`\> | arbitary metadata returned by the verifier |
|
|
358
|
+
| `nID` | [`NId`](#nid) | nId of the verification |
|
|
359
|
+
| `provider` | [`VerificationProvider`](#verificationprovider) | - |
|
|
360
|
+
| `signature` | `string` | - |
|
|
361
|
+
| `value` | `unknown` | - |
|
|
362
|
+
| `verified` | `boolean` | whether the `fieldName`/`value` pair is verified, as confirmed by the API. This should be the single source of truth. |
|
|
363
|
+
| `xId` | `string` | this will be a unique id to group verifications from the same PO. Doesn't work yet |
|
|
364
|
+
|
|
365
|
+
___
|
|
366
|
+
|
|
367
|
+
### Relationship
|
|
368
|
+
|
|
369
|
+
Ƭ **Relationship**: `Object`
|
|
370
|
+
|
|
371
|
+
#### Type declaration
|
|
372
|
+
|
|
373
|
+
| Name | Type |
|
|
374
|
+
| :------ | :------ |
|
|
375
|
+
| `end` | [`Urn`](#urn) |
|
|
376
|
+
| `p_id` | [`PId`](#pid) |
|
|
377
|
+
| `properties?` | `Object` |
|
|
378
|
+
| `properties.name?` | `string` |
|
|
379
|
+
| `properties.p_id` | [`PId`](#pid) |
|
|
380
|
+
| `start` | [`Urn`](#urn) |
|
|
381
|
+
| `type` | `string` |
|
|
382
|
+
|
|
383
|
+
___
|
|
384
|
+
|
|
385
|
+
### Schema
|
|
386
|
+
|
|
387
|
+
Ƭ **Schema**: `Object`
|
|
388
|
+
|
|
389
|
+
Raytio's variant of JSON Schema. All props marked as optional except
|
|
390
|
+
`name`. This type can be used for both the schema and for individual fields.
|
|
391
|
+
|
|
392
|
+
#### Type declaration
|
|
393
|
+
|
|
394
|
+
| Name | Type | Description |
|
|
395
|
+
| :------ | :------ | :------ |
|
|
396
|
+
| `$id?` | `string` | **`deprecated`** don't use this |
|
|
397
|
+
| `$ref?` | `string` | **`deprecated`** not sure why a schema would have this, only fields should |
|
|
398
|
+
| `$schema?` | `string` | - |
|
|
399
|
+
| `allOf?` | { `$ref?`: `string` ; `if?`: [`Schema`](#schema) ; `then?`: [`Schema`](modules.md#schema) }[] | - |
|
|
400
|
+
| `definitions?` | `Record`<`string`, `Object`\> | - |
|
|
401
|
+
| `description` | `string` | - |
|
|
402
|
+
| `display?` | `Object` | - |
|
|
403
|
+
| `display.expand?` | { `fields`: `string`[] ; `label`: `string` }[] | list of fields that should not be shown by default, unless you expand a collpase section which has a name from the label property. Array because there could be multiple expand groups |
|
|
404
|
+
| `display.head_main?` | `Object` | list of fields to be considered the header/name of the PO fields joined with a space unless `format` format string is supplied |
|
|
405
|
+
| `display.head_main.fields` | `string`[] | - |
|
|
406
|
+
| `display.head_main.format?` | `string` | - |
|
|
407
|
+
| `display.head_sub?` | `Object` | list of fields to be considered the subheader of the PO fields joined with a space unless `format` format string is supplied |
|
|
408
|
+
| `display.head_sub.fields` | `string`[] | - |
|
|
409
|
+
| `display.head_sub.format?` | `string` | - |
|
|
410
|
+
| `end_date?` | `string` | If this tag exists, the schema is deprecated. ISO Date. |
|
|
411
|
+
| `group_title?` | `string` | the localized title of the `schema_group`. added by the client |
|
|
412
|
+
| `i18n?` | `Object` | - |
|
|
413
|
+
| `n_id?` | [`NId`](#nid) | - |
|
|
414
|
+
| `name` | `string` | these fields will always exist on schema |
|
|
415
|
+
| `onboard_properties?` | `Object` | only the schema used for the onboarding wizard have this property |
|
|
416
|
+
| `onboard_properties.organizations?` | { `access_applications?`: { `links?`: { `description`: `string` ; `wizardConfig`: `Omit`<[`WizardConfig`](#wizardconfig), ``"a_id"``\> }[] ; `properties`: `Omit`<[`AA`](modules.md#aa), ``"org_id"``\> }[] ; `properties`: [`Organization`](modules.md#organization) }[] | Organizations that should be created. NOTE: if multiple are specified, when the wizard completes, the _first one_ will be selected |
|
|
417
|
+
| `onboard_properties.profile_objects?` | { `properties`: `Record`<`string`, `unknown`\> ; `schema_name`: `string` }[] | Profile Objects that should be created |
|
|
418
|
+
| `onboard_properties.relationships?` | { `from`: `string` ; `properties?`: `Record`<`string`, `string`\> ; `to`: `string` ; `type`: `string` }[] | Relationships that should be created |
|
|
419
|
+
| `onboard_properties.return_to?` | `string` | The relative path in the client to redirect to once finished. May include variables |
|
|
420
|
+
| `properties` | `Object` | 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object |
|
|
421
|
+
| `relationships?` | { `anyOf?`: `string`[] ; `direction`: ``"from"`` ; `multiple?`: `boolean` ; `oneOf?`: `string`[] ; `properties?`: { [fieldName: string]: [`SchemaField`](#schemafield); } ; `relationship_name`: `string` ; `required?`: `string`[] ; `required_relationship?`: `boolean` ; `type`: `string` }[] | - |
|
|
422
|
+
| `required?` | (`string` \| [`ConditionallyRequired`](#conditionallyrequired))[] | added by client |
|
|
423
|
+
| `schema_group?` | `string` | the group that a schema belongs to, such as "passports". This is useful for forms that accept different types of similar documents. |
|
|
424
|
+
| `tags?` | [`SchemaTag`](#schematag)[] | - |
|
|
425
|
+
| `title` | `string` | - |
|
|
426
|
+
| `title_plural?` | `string` | plural version of the title |
|
|
427
|
+
| `type?` | [`DataTypes`](#datatypes) | - |
|
|
428
|
+
| `verified_fields?` | (`string` \| [`ConditionallyRequired`](#conditionallyrequired))[] | originally `string[]`, the client modifies this |
|
|
429
|
+
| `version?` | `string` | - |
|
|
430
|
+
| `version_current?` | `boolean` | whether the `version` is the latest version |
|
|
431
|
+
| `wasExpandedByClient?` | `boolean` | - |
|
|
432
|
+
|
|
433
|
+
___
|
|
434
|
+
|
|
435
|
+
### SchemaField
|
|
436
|
+
|
|
437
|
+
Ƭ **SchemaField**: `Object`
|
|
438
|
+
|
|
439
|
+
#### Type declaration
|
|
440
|
+
|
|
441
|
+
| Name | Type | Description |
|
|
442
|
+
| :------ | :------ | :------ |
|
|
443
|
+
| `$id?` | `string` | **`deprecated`** don't use, it's inconsistent |
|
|
444
|
+
| `$ref?` | `string` | If this field refers to a sub-object |
|
|
445
|
+
| `add_row_btn_label?` | `string` | if this field is a table input, this determines the text to show on the "Add Row" btn |
|
|
446
|
+
| `allOf?` | [{ `$ref`: `string` }, [`SchemaField`](#schemafield)] | - |
|
|
447
|
+
| `content?` | `string` | only checkbox uses this prop |
|
|
448
|
+
| `contentEncoding?` | ``"base64"`` | - |
|
|
449
|
+
| `contentMediaType?` | `string` | - |
|
|
450
|
+
| `default?` | `unknown` | the default value |
|
|
451
|
+
| `default_signature_name?` | `string` | used on fields that are a signature file picker, see !849 also used to determine if the MediaPicker should be shown inline |
|
|
452
|
+
| `description?` | `string` | - |
|
|
453
|
+
| `description_decorator?` | ``"md"`` | specifies that the description is formatted in markdown |
|
|
454
|
+
| `encrypt?` | `boolean` | whether the field should be encrypted |
|
|
455
|
+
| `enum?` | `string`[] | - |
|
|
456
|
+
| `examples?` | `unknown`[] | - |
|
|
457
|
+
| `format?` | ``"date"`` \| ``"date-time"`` | - |
|
|
458
|
+
| `image_silhouette?` | `string` | If this schema requires a photo of a document, you can specify a URL to a silhouette image which will be overlaid on top of the camera. For best results, the image should have a transparent background + minimal white foreground |
|
|
459
|
+
| `items?` | `Object` | `items` is used for nested arrays, (while `properties` is used for nested objects) |
|
|
460
|
+
| `items.properties` | `Object` | - |
|
|
461
|
+
| `items.type` | [`DataTypes`](#datatypes) | - |
|
|
462
|
+
| `lookup?` | `string` | URL to a JSON file in the `Lookup` format |
|
|
463
|
+
| `maxLength?` | `number` | **`deprecated`** raytio's usage not documented |
|
|
464
|
+
| `maximum?` | `number` | - |
|
|
465
|
+
| `minLength?` | `number` | **`deprecated`** raytio's usage not documented |
|
|
466
|
+
| `minimum?` | `number` | - |
|
|
467
|
+
| `override?` | `Object` | - |
|
|
468
|
+
| `override.permissions` | `Object` | - |
|
|
469
|
+
| `override.permissions.default` | `string` | ideally this could be typed as `keyof typeof GROUPS` but the schemas aren't consistent and we have to assume it could be invalid. |
|
|
470
|
+
| `pattern?` | `string` | - |
|
|
471
|
+
| `patternMessage?` | `string` | if a `pattern` is specified, this is the error message |
|
|
472
|
+
| `priority?` | `number` | - |
|
|
473
|
+
| `properties?` | `Object` | `properties` is used for nested objects, (while `items` is used for nested arrays) |
|
|
474
|
+
| `readOnly?` | `boolean` | readOnly means the Wizard won't show this field |
|
|
475
|
+
| `table_empty_message?` | `string` | if this field is a table input, this determines the text to show if the table is empty |
|
|
476
|
+
| `tags?` | [`SchemaFieldTag`](#schemafieldtag)[] | - |
|
|
477
|
+
| `title?` | `string` | - |
|
|
478
|
+
| `title_plural?` | `string` | - |
|
|
479
|
+
| `type?` | [`DataTypes`](#datatypes) | - |
|
|
480
|
+
|
|
481
|
+
___
|
|
482
|
+
|
|
483
|
+
### SchemaFieldTag
|
|
484
|
+
|
|
485
|
+
Ƭ **SchemaFieldTag**: ``"password"`` \| \`group:${string}\` \| \`upload-group:${string}\` \| ``"display:stars"`` \| ``"display:no_autofill"`` \| ``"display:currency"`` \| ``"display:cascade"`` \| ``"display:survey"`` \| ``"display:quoting"`` \| ``"display:customModal"`` \| ``"display:terms_conditions"`` \| ``"display:showOnWizard"`` \| \`display:main\_media:${string}\` \| ``"date_component:day"`` \| ``"date_component:month"`` \| ``"date_component:year"`` \| ``"action:client_upload"`` \| ``"verify:show_if_pending"`` \| ``"special:hide_select_behind_button"`` \| ``"type:capture_geolocation"`` \| ``"type:extract_required"``
|
|
486
|
+
|
|
487
|
+
___
|
|
488
|
+
|
|
489
|
+
### SchemaMetadata
|
|
490
|
+
|
|
491
|
+
Ƭ **SchemaMetadata**: `Pick`<[`Schema`](#schema), ``"name"`` \| ``"title"`` \| ``"description"`` \| ``"schema_group"`` \| ``"end_date"`` \| ``"i18n"`` \| ``"display"`` \| ``"tags"`` \| ``"clientLocale"`` \| ``"groupNames"`` \| ``"title_plural"`` \| ``"group_title"``\> & { `__typeof__`: ``"You cannot supply SchemaMetadata to a function that expects Schema"`` ; `isProfileSchema`: `boolean` ; `isSpSchema`: `boolean` }
|
|
492
|
+
|
|
493
|
+
Only certain properties from the schema
|
|
494
|
+
|
|
495
|
+
___
|
|
496
|
+
|
|
497
|
+
### SchemaTag
|
|
498
|
+
|
|
499
|
+
Ƭ **SchemaTag**: ``"action:experimental_pass_object_store_id"`` \| ``"action:verify"`` \| ``"default_camera:rear"`` \| ``"default_camera:front"`` \| \`oauth2\_component:name:${string}\` \| \`oauth2\_component:redirect\_url:${string}\` \| \`link\_to:${string}:${string}\` \| ``"type:service_provider"`` \| ``"type:service_offer"`` \| ``"type:marketplace"`` \| ``"type:client_only"`` \| ``"type:globally_unique_field"``
|
|
500
|
+
|
|
501
|
+
___
|
|
502
|
+
|
|
503
|
+
### SubmissionStatus
|
|
504
|
+
|
|
505
|
+
Ƭ **SubmissionStatus**: ``"Submitted"`` \| ``"Processing"`` \| ``"Rejected"`` \| ``"Expired"`` \| ``"Completed"`` \| ``"DataChanged"`` \| ``"Received"`` \| ``"Accepted"``
|
|
506
|
+
|
|
507
|
+
___
|
|
508
|
+
|
|
509
|
+
### UId
|
|
510
|
+
|
|
511
|
+
Ƭ **UId**: `StringWithIdentity`<``"UId"``\>
|
|
512
|
+
|
|
513
|
+
A `u_id` is the ID of a user
|
|
514
|
+
|
|
515
|
+
___
|
|
516
|
+
|
|
517
|
+
### Urn
|
|
518
|
+
|
|
519
|
+
Ƭ **Urn**: \`urn:${UrnNodeType}:${string}\`
|
|
520
|
+
|
|
521
|
+
e.g. "urn:user:..."
|
|
522
|
+
|
|
523
|
+
___
|
|
524
|
+
|
|
525
|
+
### UrnNodeType
|
|
526
|
+
|
|
527
|
+
Ƭ **UrnNodeType**: ``"user"`` \| ``"profile_object"`` \| ``"instance"`` \| ``"temp_object"`` \| ``"document"``
|
|
528
|
+
|
|
529
|
+
___
|
|
530
|
+
|
|
531
|
+
### Validation
|
|
532
|
+
|
|
533
|
+
Ƭ **Validation**: `Object`
|
|
534
|
+
|
|
535
|
+
validation data returned by preVerify (part of the extract&map API)
|
|
536
|
+
|
|
537
|
+
#### Type declaration
|
|
538
|
+
|
|
539
|
+
| Name | Type |
|
|
540
|
+
| :------ | :------ |
|
|
541
|
+
| `breakdown` | `Object` |
|
|
542
|
+
| `score` | `number` |
|
|
543
|
+
| `warning?` | `string`[] |
|
|
544
|
+
|
|
545
|
+
___
|
|
546
|
+
|
|
547
|
+
### Verification
|
|
548
|
+
|
|
549
|
+
Ƭ **Verification**<`WithValue`\>: [`ProfileObject`](#profileobject)<`Object`\>
|
|
550
|
+
|
|
551
|
+
Different APIs inconsistently include the `value` prop. If you know it exists,
|
|
552
|
+
use `Verification<true>`, otherwise just `Verification`. Verifications from
|
|
553
|
+
the DataContext don't have the value.
|
|
554
|
+
|
|
555
|
+
#### Type parameters
|
|
556
|
+
|
|
557
|
+
| Name | Type |
|
|
558
|
+
| :------ | :------ |
|
|
559
|
+
| `WithValue` | extends `boolean```false`` |
|
|
560
|
+
|
|
561
|
+
___
|
|
562
|
+
|
|
563
|
+
### VerificationPayload
|
|
564
|
+
|
|
565
|
+
Ƭ **VerificationPayload**<`WithValue`\>: { `field`: `string` ; `metadata?`: `Record`<`string`, `unknown`\> ; `passed`: `boolean` ; `request_div`: `string` ; `schema?`: `string` ; `source`: `string` ; `source_hashed_n_id?`: [`NId`](#nid) ; `source_n_id?`: [`NId`](modules.md#nid) ; `type?`: ``null`` ; `v_id`: `string` ; `valid_until?`: `string` ; `verification_date`: `string` ; `verifier_div`: `string` ; `verifier_id?`: [`NId`](modules.md#nid) ; `verifier_service_id?`: [`NId`](modules.md#nid) ; `verifier_source_id?`: [`NId`](modules.md#nid) } & `WithValue` extends ``true`` ? { `value`: `string` \| `number` } : {}
|
|
566
|
+
|
|
567
|
+
#### Type parameters
|
|
568
|
+
|
|
569
|
+
| Name | Type |
|
|
570
|
+
| :------ | :------ |
|
|
571
|
+
| `WithValue` | extends `boolean` |
|
|
572
|
+
|
|
573
|
+
___
|
|
574
|
+
|
|
575
|
+
### VerificationProvider
|
|
576
|
+
|
|
577
|
+
Ƭ **VerificationProvider**: `Object`
|
|
578
|
+
|
|
579
|
+
These `n_id`s point to service provider profile objects
|
|
580
|
+
|
|
581
|
+
#### Type declaration
|
|
582
|
+
|
|
583
|
+
| Name | Type | Description |
|
|
584
|
+
| :------ | :------ | :------ |
|
|
585
|
+
| `dataSourceNId?` | [`NId`](#nid) | - |
|
|
586
|
+
| `date?` | `Date` | the date which the verification was verified on, or last re-verified on |
|
|
587
|
+
| `serviceProviderNId?` | [`NId`](#nid) | - |
|
|
588
|
+
| `verifierNId?` | [`NId`](#nid) | - |
|
|
589
|
+
|
|
590
|
+
___
|
|
591
|
+
|
|
592
|
+
### WizardConfig
|
|
593
|
+
|
|
594
|
+
Ƭ **WizardConfig**: `Object`
|
|
595
|
+
|
|
596
|
+
when a form link is generated, this is what gets saved on the API.
|
|
597
|
+
Each value can be overriden in the query parameters. If specified
|
|
598
|
+
in the query parameters, it needs to be base64 and/or url encoded.
|
|
599
|
+
|
|
600
|
+
#### Type declaration
|
|
601
|
+
|
|
602
|
+
| Name | Type | Description |
|
|
603
|
+
| :------ | :------ | :------ |
|
|
604
|
+
| `a_id` | [`AId`](#aid) | - |
|
|
605
|
+
| `emails?` | `string`[] | if specified, the email addresses that a submission should be sent to |
|
|
606
|
+
| `expiry_date?` | `number` | number of days in the future |
|
|
607
|
+
| `pages` | [`WizardPage`](#wizardpage)[] | - |
|
|
608
|
+
| `quick_onboard?` | `boolean` | whether the passwordless-signup process should be used if the user visits this form, and they are not logged in. If false, the standard sign-up process will be used |
|
|
609
|
+
| `reference?` | `string` | - |
|
|
610
|
+
| `relationships?` | { `from`: `string` ; `properties?`: `Record`<`string`, `any`\> ; `to`: `string` ; `type`: `string` }[] | a list of relationships that should be created after the wizard completes (see #987) |
|
|
611
|
+
| `return_to?` | `string` | the callback url to redirect to once complete. Must be in the AA's list of authorized callback urls |
|
|
612
|
+
| `review_text?` | `string` | the text on the WizardReview page |
|
|
613
|
+
| `sharing_data_message?` | `string` | the loading message to show next to the spinner after the review screen |
|
|
614
|
+
| `signature_schema?` | `string` | if specified, a Wizard will be shown on the review page with this schema |
|
|
615
|
+
| `skip_share?` | `boolean` | **`deprecated`** added in !244 but never used |
|
|
616
|
+
| `submit_text?` | `string` | the submit button label |
|
|
617
|
+
| `terms_schema?` | `string` | if specified, a Wizard will be shown on the review page with this schema |
|
|
618
|
+
| `update_reference?` | `boolean` | whether the user can change the reference, if there is one in the QP |
|
|
619
|
+
|
|
620
|
+
___
|
|
621
|
+
|
|
622
|
+
### WizardPage
|
|
623
|
+
|
|
624
|
+
Ƭ **WizardPage**: `Object`
|
|
625
|
+
|
|
626
|
+
configuration data for a single wizard page (@see WizardConfig)
|
|
627
|
+
|
|
628
|
+
#### Type declaration
|
|
629
|
+
|
|
630
|
+
| Name | Type | Description |
|
|
631
|
+
| :------ | :------ | :------ |
|
|
632
|
+
| `allow_upload?` | `boolean` | do not allow uploading in ImageDynamicSection if this is explictly false |
|
|
633
|
+
| `create_new_text?` | `string` | custom text to display on the Create New button |
|
|
634
|
+
| `description?` | `string` | the fallback description, if there isn't one for the specific situation |
|
|
635
|
+
| `description_create?` | `string` | - |
|
|
636
|
+
| `description_select?` | `string` | - |
|
|
637
|
+
| `description_update?` | `string` | - |
|
|
638
|
+
| `display_field_description?` | `boolean` | whether the field descriptions should be shown |
|
|
639
|
+
| `display_field_title?` | `boolean` | whether the field titles should be shown |
|
|
640
|
+
| `display_mode?` | ``"light"`` \| ``"dark"`` \| ``"default"`` | can you force the colour theme to change for just one page (#1066, #1074). At the moment this on pages that use WebcamImageCapture |
|
|
641
|
+
| `display_schema_description?` | `boolean` | whether the schema description should be shown |
|
|
642
|
+
| `extract_threshold?` | `number` | for ImageDynamicSection, the minimum score to be treated as a pass |
|
|
643
|
+
| `extract_threshold_fail_action?` | ``"capture"`` \| ``"capture_review"`` \| ``"recapture_or_next_step"`` \| ``"review"`` \| ``"next_step"`` | for ImageDynamicSection, the action to take if pre-verify fails |
|
|
644
|
+
| `extract_threshold_null_action?` | [`WizardPage`](#wizardpage)[``"extract_threshold_fail_action"``] | for ImageDynamicSection, the action to take if the API returns no `validation: {}` object |
|
|
645
|
+
| `extract_threshold_pass_action?` | ``"review"`` \| ``"next_step"`` | for ImageDynamicSection, the action to take if pre-verify passes |
|
|
646
|
+
| `field_list?` | `string`[] | if supplied, only the fields that are listed should be shared (#520, #1024) |
|
|
647
|
+
| `filter` | ``"oneOf"`` \| ``"anyOf"`` | - |
|
|
648
|
+
| `multiple?` | `boolean` | if true mulitple POs can be shared |
|
|
649
|
+
| `name?` | `string` \| `symbol` | if undefined, the schema title will be used |
|
|
650
|
+
| `optional?` | `boolean` | if true this page can be skipped. The PageResult wil be undefined |
|
|
651
|
+
| `optional_fields?` | `string`[] | a list of fields that should not be required, even if the schema says they're required |
|
|
652
|
+
| `profile?` | `boolean` | if explictly == false, then it's an AO (not a PO), in which case there can only be one schema |
|
|
653
|
+
| `reverify_header?` | `string` | custom text & header that's displayed on reverfication modal for expired PO |
|
|
654
|
+
| `reverify_text?` | `string` | - |
|
|
655
|
+
| `schemas` | `string`[] | - |
|
|
656
|
+
| `selection_hierarchy_json?` | `string` | a URL to a preset for configuing NestedSchemaSelect. @see DeepConfig |
|
|
657
|
+
| `service_provider_link?` | `boolean` | see #463 |
|
|
658
|
+
| `share?` | ``"profile"`` \| ``"verification"`` \| ``"both"`` | the information to share. undefined implies both. |
|
|
659
|
+
| `verify_data?` | `boolean` | if `false`, ProfileObjects created while completing the form will not be verified. `undefined` implies `true` |
|
package/dist/crypto.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|