@raytio/types 7.0.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/dist/crypto.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from "./schema";
4
4
  export * from "./theme";
5
5
  export * from "./verification";
6
6
  export * from "./wizard";
7
+ export * from "./orgs";
package/dist/index.js CHANGED
@@ -13,10 +13,11 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
13
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
- exports.__esModule = true;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./crypto"), exports);
18
18
  __exportStar(require("./raytio"), exports);
19
19
  __exportStar(require("./schema"), exports);
20
20
  __exportStar(require("./theme"), exports);
21
21
  __exportStar(require("./verification"), exports);
22
22
  __exportStar(require("./wizard"), exports);
23
+ __exportStar(require("./orgs"), exports);
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
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/raytio.d.ts CHANGED
@@ -6,22 +6,23 @@ export type StringWithIdentity<T> = string & {
6
6
  };
7
7
  /** @internal */
8
8
  type Json = Record<string, any>;
9
- /** A `p_id` is the ID of a @see Relationship */
9
+ /** A `p_id` is the ID of a {@link Relationship} */
10
10
  export type PId = StringWithIdentity<"PId">;
11
- /** An `i_id` is the ID of an @see Instance */
11
+ /** An `i_id` is the ID of an {@link Instance} */
12
12
  export type IId = StringWithIdentity<"IId">;
13
- /** An `n_id` is the ID of a @see ProfileObject */
13
+ /** An `n_id` is the ID of a {@link ProfileObject} */
14
14
  export type NId = StringWithIdentity<"NId">;
15
15
  /** A `g_id` is the ID of a group */
16
16
  export type GId = StringWithIdentity<"GId">;
17
17
  /** A `u_id` is the ID of a user */
18
18
  export type UId = StringWithIdentity<"UId">;
19
- /** An `a_id` is the ID of an @see AA */
19
+ /** An `a_id` is the ID of an {@link AA} */
20
20
  export type AId = StringWithIdentity<"AId">;
21
- /** An `o_id` is the ID of an @see Organization */
21
+ /** An `o_id` is the ID of an {@link Organization} */
22
22
  export type OId = StringWithIdentity<"OId">;
23
- /** A `wi_id` is the ID of a @see Webhook */
23
+ /** A `wi_id` is the ID of a {@link Webhook} */
24
24
  export type WId = StringWithIdentity<"WId">;
25
+ /** An `l_id` is the ID of any data stored in the KV-Store */ export type LId = StringWithIdentity<"LId">;
25
26
  export type DataTypes = "string" | "number" | "boolean" | "object" | "integer" | "array" | "null";
26
27
  export type SubmissionStatus = "Submitted" | "Processing" | "Rejected" | "Expired" | "Completed" | "DataChanged" | "Received" | "Accepted";
27
28
  /** You can supply an option type argument if you know exactly what the properties will be */
@@ -48,19 +49,9 @@ export type ProfileObjectForUpload<Properties = Json> = {
48
49
  schema?: string;
49
50
  n_id?: NId;
50
51
  };
51
- /**
52
- * arbitrary key-values pairs stored on a Profile Object.
53
- * May contain nested JSON and @see Encrypted properties.
54
- *
55
- * There are some limits to field names: they cannot be called
56
- * `__signature` nor can they include the character sequence `<=>`.
57
- */
58
- export type Properties = {
59
- [fieldName: string]: any;
60
- };
61
52
  export type UrnNodeType = "user" | "profile_object" | "instance" | "schema" | "temp_object" | "document";
62
53
  /** e.g. "urn:user:..." */
63
- export type Urn = `urn:${UrnNodeType}:${string}`;
54
+ export type Urn = `urn:user:${UId}` | `urn:profile_object:${NId}` | `urn:instance:${IId}` | `urn:temp_object:${LId}` | `urn:schema:${string}` | `urn:document:${NId}`;
64
55
  export type Relationship = {
65
56
  start: Urn;
66
57
  end: Urn;
@@ -82,18 +73,19 @@ export type Lookup = {
82
73
  /** used in AkahuDynamicSection only */
83
74
  requires_2FA?: boolean;
84
75
  };
85
- export type AATags = "type:client_only" | "type:share_with_new_user" | `related_service_provider:n_id:${NId}` | "ServiceProvider";
76
+ export type AATag = "type:client_only" | "type:share_with_new_user" | `related_service_provider:n_id:${NId}` | "ServiceProvider";
86
77
  export type AA = {
87
78
  a_id: AId;
88
79
  name: string;
89
80
  description?: string;
90
81
  /** If a user signs up while completing this form, this message will be sent in the sign up email. */
91
82
  aa_introduction?: string;
83
+ /** @deprecated see !2101 */
92
84
  picture?: Urn;
93
- /** Easy to use AA logo url for pasting inot emails */
85
+ /** Easy to use AA logo url for pasting into emails */
94
86
  picture_url?: string;
95
87
  scopes?: string[];
96
- tags?: AATags[];
88
+ tags?: AATag[];
97
89
  callback_uri?: string[];
98
90
  /** markdown or string help information including [phoneNumber || email] */
99
91
  aa_help?: string;
@@ -109,6 +101,14 @@ export type AA = {
109
101
  ruleset?: unknown;
110
102
  /** if true, only specific email addresses can submit the form */
111
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;
112
112
  /** @internal */
113
113
  transitions?: unknown[];
114
114
  };
@@ -132,10 +132,8 @@ export type Instance = {
132
132
  start_date: string;
133
133
  /** The status of a submission */
134
134
  state: SubmissionStatus;
135
- /** @depreacted The status of a submission */
135
+ /** @deprecated The status of a submission */
136
136
  _state?: SubmissionStatus;
137
- /** Previous status of the shared information */
138
- previous_state: SubmissionStatus;
139
137
  /** Hash of the Service Provider ID */
140
138
  sub_service_provider_hash?: string;
141
139
  /** Service provider ID */
@@ -143,7 +141,7 @@ export type Instance = {
143
141
  /** data associated is access application's instance */
144
142
  profile_objects: ProfileObject[];
145
143
  keys: {
146
- [nId: string]: {
144
+ [nId: NId]: {
147
145
  [fieldName: string]: {
148
146
  data: string;
149
147
  n_id: NId;
@@ -153,6 +151,26 @@ export type Instance = {
153
151
  relationships?: Relationship[];
154
152
  /** added by the client once it calculates the score */
155
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;
156
174
  };
157
175
  /**
158
176
  * An organization.
@@ -162,15 +180,8 @@ export type Organization = {
162
180
  id: OId;
163
181
  name: string;
164
182
  email: string;
165
- address: {
166
- locationType: string;
167
- street1: string;
168
- street2: string;
169
- city: string;
170
- region: string;
171
- country: string;
172
- };
173
- customer: Record<string, unknown>;
183
+ address: unknown;
184
+ customer: unknown;
174
185
  };
175
186
  /** @internal some APIs now return extra info */
176
187
  export type FullOrg = {
package/dist/raytio.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/schema.d.ts CHANGED
@@ -7,8 +7,8 @@ export type ConditionallyRequired = {
7
7
  [fieldName: string]: (string | number | boolean)[];
8
8
  };
9
9
  };
10
- export type SchemaFieldTag = "password" | `group:${string}` | `upload-group:${string}` | "display:stars" | "display:no_autofill" | "display:currency" | "display:cascade" | "display:survey" | "display:quoting" | "display:customModal" | "display:terms_conditions" | `display:main_media:${string}` | "date_component:day" | "date_component:month" | "date_component:year" | "action:client_upload" | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:capture_geolocation" | "type:extract_required";
11
- export type SchemaTag = "action:experimental_pass_object_store_id" | "action:verify" | "default_camera:rear" | "default_camera:front" | `oauth2_component:name:${string}` | `oauth2_component:redirect_url:${string}` | `link_to:${string}:${string}` | "type:service_provider" | "type:service_offer" | "type:marketplace" | "type:client_only" | "type:globally_unique_field";
10
+ export type SchemaFieldTag = "password" | `group:${string}` | `upload-group:${string}` | "display:stars" | "display:no_autofill" | "display:currency" | "display:cascade" | "display:survey" | "display:quoting" | "display:customModal" | `display:replace:'${string}':'${string}'` | "display:terms_conditions" | `display:main_media:${string}` | "date_component:day" | "date_component:month" | "date_component:year" | "action:client_upload" | "action:require_webauthn" | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:capture_geolocation" | "type:extract_required";
11
+ export type SchemaTag = "action:experimental_pass_object_store_id" | "action:verify" | "default_camera:rear" | "default_camera:front" | `oauth2_component:name:${string}` | `oauth2_component:redirect_url:${string}` | `time:${string}:${number}` | `link_to:${string}:${string}` | "type:service_provider" | "type:service_offer" | "type:marketplace" | "type:client_only" | "type:globally_unique_field";
12
12
  export type SchemaField = {
13
13
  /** @deprecated don't use, it's inconsistent */
14
14
  $id?: string;
@@ -21,8 +21,14 @@ export type SchemaField = {
21
21
  tags?: SchemaFieldTag[];
22
22
  type?: DataTypes;
23
23
  enum?: (string | number | boolean)[];
24
+ /** for number inputs, the maximum allowed value */
24
25
  maximum?: number;
26
+ /** for number inputs, the minimum allowed value */
25
27
  minimum?: number;
28
+ /** for number inputs, the step size used in the input or slider */
29
+ step?: number;
30
+ /** if true, the user must have encryption enabled to save this data, see #1324 */
31
+ encrypt_require?: boolean;
26
32
  /** @deprecated raytio's usage not documented */
27
33
  maxLength?: number;
28
34
  /** @deprecated raytio's usage not documented */
@@ -102,11 +108,12 @@ export type SchemaField = {
102
108
  export type ServerSchemaField = Omit<SchemaField, "$prop">;
103
109
  /** not exported. Attributes that are identical in both client schema & server schema */
104
110
  export type CommonSchemaAttributes = {
105
- type?: DataTypes;
106
111
  /** these fields will always exist on schema */
107
- name: string;
108
112
  title: string;
109
113
  description: string;
114
+ /** specifies that the description is formatted in markdown */
115
+ description_decorator?: "md";
116
+ schema_type?: SchemaType;
110
117
  /** plural version of the title */
111
118
  title_plural?: string;
112
119
  /**
@@ -152,6 +159,10 @@ export type CommonSchemaAttributes = {
152
159
  $loading_pending_ver_resubmit: {
153
160
  title: string;
154
161
  };
162
+ $loading_long_verification_message: {
163
+ title?: string;
164
+ description?: string;
165
+ };
155
166
  [fieldNameOrGroupName: string]: ServerSchemaField & {
156
167
  title_plural?: string;
157
168
  };
@@ -242,6 +253,10 @@ export type CommonSchemaAttributes = {
242
253
  * of what the API returns.
243
254
  */
244
255
  export type Schema = CommonSchemaAttributes & {
256
+ /** added by the client, copied from {@link WrappedSchema} */
257
+ name: string;
258
+ /** added by client */
259
+ type?: DataTypes;
245
260
  /** the localized title of the `schema_group`. added by the client */
246
261
  group_title?: string;
247
262
  /** originally `string[]`, the client modifies this */
@@ -250,9 +265,9 @@ export type Schema = CommonSchemaAttributes & {
250
265
  required?: (string | ConditionallyRequired)[];
251
266
  /** added by client */
252
267
  wasExpandedByClient?: boolean;
253
- /** ISO Date. Copied from @see WrappedSchema */
268
+ /** ISO Date. Copied from {@link WrappedSchema} */
254
269
  start_date?: string;
255
- /** ISO Date. Copied from @see WrappedSchema If this tag exists, the schema is deprecated */
270
+ /** ISO Date. Copied from {@link WrappedSchema} If this tag exists, the schema is deprecated */
256
271
  end_date?: string;
257
272
  /** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
258
273
  properties: {
@@ -262,7 +277,7 @@ export type Schema = CommonSchemaAttributes & {
262
277
  groupNames?: Record<string, string>;
263
278
  /** added by the client to inform downstream components which locale from schema.i18n was used */
264
279
  clientLocale?: string;
265
- /** added by the client, copied from @see WrappedSchema */
280
+ /** added by the client, copied from {@link WrappedSchema} */
266
281
  version: string;
267
282
  /**
268
283
  * the estimated loading times in seconds for various API calls. The client adds
@@ -274,6 +289,8 @@ export type Schema = CommonSchemaAttributes & {
274
289
  /** added by the client. If true, this schema somehow relates to legacy service providers */
275
290
  isSpSchema?: boolean;
276
291
  };
292
+ /** Type Classification of a Schema returned by API */
293
+ export type SchemaType = "ss" | "ps" | "us";
277
294
  /** This is what's returned by the API */
278
295
  export type WrappedSchema = {
279
296
  active: true;
@@ -281,9 +298,10 @@ export type WrappedSchema = {
281
298
  start_date: string;
282
299
  /** ISO Date. If this tag exists, the schema is deprecated. */
283
300
  end_date: string;
284
- name: string;
285
- type: "ss" | "ps" | "us";
286
- version: string;
301
+ /** Schema Name Type and Version Properties */
302
+ schema_name: string;
303
+ schema_type: SchemaType;
304
+ schema_version: string;
287
305
  /** whether the \`version\` is the latest version */
288
306
  version_current: boolean;
289
307
  schema: CommonSchemaAttributes & {
package/dist/schema.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/theme.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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?: Record<string, unknown>;
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 */
@@ -18,8 +42,6 @@ export type VerificationPayload<WithValue extends boolean> = {
18
42
  verifier_source_id?: NId;
19
43
  verifier_service_id?: NId;
20
44
  verifier_div: string;
21
- /** ISO Date */
22
- valid_until?: string;
23
45
  } & (WithValue extends true ? {
24
46
  value: string | number;
25
47
  } : {});
@@ -41,6 +63,14 @@ export type Verification<WithValue extends boolean = false> = ProfileObject<{
41
63
  {
42
64
  signature: string;
43
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";
44
74
  }
45
75
  ];
46
76
  }>;
@@ -71,7 +101,7 @@ export type VerificationProvider = {
71
101
  /** the date which the verification was verified on, or last re-verified on */
72
102
  date?: Date;
73
103
  };
74
- /** This is what @raytio/core exposes, which is more useable than @see Verification */
104
+ /** This is what @raytio/core exposes, which is more useable than {@link Verification} */
75
105
  export type RealVer = {
76
106
  fieldName: string;
77
107
  value: unknown;
@@ -83,7 +113,7 @@ export type RealVer = {
83
113
  */
84
114
  verified: boolean;
85
115
  /** arbitary metadata returned by the verifier */
86
- metadata?: Record<string, unknown>;
116
+ metadata?: VerificationPayload<false>["metadata"];
87
117
  /** nId of the verification */
88
118
  nID: NId;
89
119
  /** nId of the PO that the verification belongs to. Could be undefined */
@@ -1,6 +1,16 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- exports.POVerification = exports.FieldVerification = void 0;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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 = exports.FieldVerification || (exports.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 = exports.POVerification || (exports.POVerification = {}));
38
+ })(POVerification || (exports.POVerification = POVerification = {}));
package/dist/wizard.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AId } from "./raytio";
2
- /** configuration data for a single wizard page (@see WizardConfig) */
2
+ export type WizardPageTag = "action:require_chip";
3
+ /** configuration data for a single wizard page ({@link WizardConfig}) */
3
4
  export type WizardPage = {
4
5
  /** if undefined, the schema title will be used */
5
6
  name?: string | symbol;
@@ -20,7 +21,7 @@ export type WizardPage = {
20
21
  service_provider_link?: boolean;
21
22
  /** custom text to display on the Create New button */
22
23
  create_new_text?: string;
23
- /** a URL to a preset for configuing NestedSchemaSelect. @see DeepConfig */
24
+ /** a URL to a preset for configuing NestedSchemaSelect. {@link DeepConfig} */
24
25
  selection_hierarchy_json?: string;
25
26
  /** whether the schema description should be shown */
26
27
  display_schema_description?: boolean;
@@ -43,7 +44,12 @@ export type WizardPage = {
43
44
  extract_threshold_fail_action?: "capture" | "capture_review" | "recapture_or_next_step" | "review" | "next_step";
44
45
  /** for ImageDynamicSection, the action to take if the API returns no `validation: {}` object */
45
46
  extract_threshold_null_action?: WizardPage["extract_threshold_fail_action"];
46
- /** if `false`, ProfileObjects created while completing the form will not be verified. `undefined` implies `true` */
47
+ /**
48
+ * if `false`, ProfileObjects created while completing the form will not be verified.
49
+ * if `true`, you can only select ProfileObjects that are partially or fully verified.
50
+ * `undefined` implies `true`.
51
+ * @default true
52
+ */
47
53
  verify_data?: boolean;
48
54
  /** a list of fields that should not be required, even if the schema says they're required */
49
55
  optional_fields?: string[];
@@ -51,6 +57,12 @@ export type WizardPage = {
51
57
  share?: "profile" | "verification" | "both";
52
58
  /** can you force the colour theme to change for just one page (#1066, #1074). At the moment this on pages that use WebcamImageCapture */
53
59
  display_mode?: "light" | "dark" | "default";
60
+ tags?: WizardPageTag[];
61
+ /**
62
+ * If specified, this is is a "Conditional Wizard Page", which is only shown
63
+ * if the rule passed. This field contains the ID (not name) of the rule.
64
+ */
65
+ branching_rule_name?: string;
54
66
  };
55
67
  /**
56
68
  * when a form link is generated, this is what gets saved on the API.
@@ -90,6 +102,8 @@ export type WizardConfig = {
90
102
  quick_onboard?: boolean;
91
103
  /** the loading message to show next to the spinner after the review screen */
92
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;
93
107
  /** a list of relationships that should be created after the wizard completes (see #987) */
94
108
  relationships?: {
95
109
  /** schema name */
@@ -101,4 +115,6 @@ export type WizardConfig = {
101
115
  /** relationship properties */
102
116
  properties?: Record<string, any>;
103
117
  }[];
118
+ /** if specified, the user must validate their WebAuthN credential before they can submit the form */
119
+ webauthn_type?: ("usb" | "nfc" | "ble" | "internal")[];
104
120
  };
package/dist/wizard.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raytio/types",
3
- "version": "7.0.0",
3
+ "version": "7.2.0",
4
4
  "license": "MIT",
5
5
  "main": "index",
6
6
  "types": "index",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "docs": "sh ../../scripts/generate-docs.sh",
15
- "test": "npm run build",
15
+ "test": "npm run build && yarn docs",
16
16
  "build": "tsc && rimraf dist/__tests__"
17
17
  }
18
18
  }
@@ -0,0 +1,6 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ import { Urn, UrnNodeType } from "..";
3
+
4
+ // test that the definition of `Urn` only uses valid `UrnNodeType`s
5
+ const assertTrue: Urn extends `urn:${UrnNodeType}:${string}` ? true : false =
6
+ true;
@@ -1,4 +1,4 @@
1
- /* eslint-disable fp/no-let, @typescript-eslint/no-unused-vars */
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
2
  import { Schema, SchemaField, WrappedSchema } from "..";
3
3
 
4
4
  /**
package/src/index.ts CHANGED
@@ -4,3 +4,4 @@ export * from "./schema";
4
4
  export * from "./theme";
5
5
  export * from "./verification";
6
6
  export * from "./wizard";
7
+ export * from "./orgs";