@raytio/types 5.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/crypto.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare type Encrypted = {
1
+ export declare type Encrypted<_Data = string> = {
2
2
  encrypted_key: {
3
3
  encrypted_key: string;
4
4
  };
package/dist/raytio.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import { Encrypted } from "./crypto";
2
- import { Colors } from "./theme";
2
+ import { Colors, CustomFonts } from "./theme";
3
3
  /** @internal see Microsoft/TypeScript#202 */
4
4
  export declare type StringWithIdentity<T> = string & {
5
5
  $$typeof$$: T;
6
6
  };
7
+ /** @internal */
8
+ declare type Json = Record<string, any>;
7
9
  /** A `p_id` is the ID of a @see Relationship */
8
10
  export declare type PId = StringWithIdentity<"PId">;
9
11
  /** An `i_id` is the ID of an @see Instance */
@@ -16,12 +18,10 @@ export declare type GId = StringWithIdentity<"GId">;
16
18
  export declare type UId = StringWithIdentity<"UId">;
17
19
  /** An `a_id` is the ID of an @see AA */
18
20
  export declare type AId = StringWithIdentity<"AId">;
19
- /** @internal */
20
21
  export declare type DataTypes = "string" | "number" | "boolean" | "object" | "integer" | "array" | "null";
21
- /** @internal */
22
22
  export declare type SubmissionStatus = "Submitted" | "Processing" | "Rejected" | "Expired" | "Completed" | "DataChanged" | "Received" | "Accepted";
23
23
  /** You can supply an option type argument if you know exactly what the properties will be */
24
- export declare type ProfileObject<Properties = any> = {
24
+ export declare type ProfileObject<Properties = Json> = {
25
25
  n_id: NId;
26
26
  properties: Properties;
27
27
  labels: string[];
@@ -31,10 +31,10 @@ export declare type ProfileObject<Properties = any> = {
31
31
  * @internal the client adds this, if this PO doesn't actually belong to the current user,
32
32
  * i.e. it's actually from a submission. If truthy, it's the `[aId, iId]` of the submission.
33
33
  */
34
- isFromSubmission?: [aId: string, iId: string];
34
+ isFromSubmission?: [aId: AId, iId: IId];
35
35
  };
36
36
  /** @internal This is what we send the API */
37
- export declare type ProfileObjectForUpload<Properties = any> = {
37
+ export declare type ProfileObjectForUpload<Properties = Json> = {
38
38
  properties: Properties;
39
39
  document?: {
40
40
  content?: string | Encrypted;
@@ -75,6 +75,8 @@ export declare type Lookup = {
75
75
  label?: string | number;
76
76
  children?: Lookup[];
77
77
  description?: string;
78
+ /** used in AkahuDynamicSection only */
79
+ requires_2FA?: boolean;
78
80
  };
79
81
  export declare type AA = {
80
82
  a_id: AId;
@@ -82,19 +84,24 @@ export declare type AA = {
82
84
  description?: string;
83
85
  /** If a user signs up while completing this form, this message will be sent in the sign up email. */
84
86
  aa_introduction?: string;
85
- picture?: string;
87
+ picture?: Urn;
86
88
  /** Easy to use AA logo url for pasting inot emails */
87
89
  picture_url?: string;
88
90
  scopes?: string[];
89
91
  tags?: string[];
90
92
  callback_uri?: string[];
93
+ /** markdown or string help information including [phoneNumber || email] */
94
+ aa_help?: string;
91
95
  theme?: {
92
- colors: Colors;
96
+ font?: CustomFonts;
97
+ colors?: Colors;
93
98
  };
94
99
  /** the n_id of the associated service provider */
95
100
  service_provider_n_id?: NId;
96
101
  /** the id of the associated organisation */
97
102
  org_id: string;
103
+ /** configuration for the submission rules */
104
+ ruleset?: unknown;
98
105
  /** @internal */
99
106
  _transitions?: unknown[];
100
107
  };
@@ -121,7 +128,7 @@ export declare type Instance = {
121
128
  /** @depreacted The status of a submission */
122
129
  _state?: SubmissionStatus;
123
130
  /** Previous status of the shared information */
124
- previous_state: string;
131
+ previous_state: SubmissionStatus;
125
132
  /** Hash of the Service Provider ID */
126
133
  sub_service_provider_hash?: string;
127
134
  /** Service provider ID */
@@ -136,6 +143,7 @@ export declare type Instance = {
136
143
  };
137
144
  };
138
145
  };
146
+ relationships?: Relationship[];
139
147
  };
140
148
  /**
141
149
  * An organization.
@@ -155,3 +163,20 @@ export declare type Organization = {
155
163
  };
156
164
  customer: Record<string, unknown>;
157
165
  };
166
+ /** validation data returned by preVerify (part of the extract&map API) */
167
+ export declare type Validation = {
168
+ score: number;
169
+ warning?: string[];
170
+ breakdown: {
171
+ [category: string]: {
172
+ passed: boolean;
173
+ /** only present if passed=false */
174
+ code?: number;
175
+ /** only present if passed=false */
176
+ reason?: string;
177
+ /** only present if passed=false */
178
+ severity?: "low" | "medium" | "high";
179
+ };
180
+ };
181
+ };
182
+ export {};
package/dist/schema.d.ts CHANGED
@@ -1,32 +1,33 @@
1
- import { AA, DataTypes, Organization, Urn } from "./raytio";
1
+ import { AA, DataTypes, NId, Organization, Urn } from "./raytio";
2
2
  import { WizardConfig } from "./wizard";
3
+ /** should be renamed since this applies to ConditionallyVerifiable */
3
4
  export declare type ConditionallyRequired = {
4
5
  field: string;
5
6
  if: {
6
7
  [fieldName: string]: string[];
7
8
  };
8
9
  };
9
- export declare type SchemaFieldTag = "password" | `group:${string}` | `upload-group:${string}` | "display:stars" | "display:no_autofill" | "display:currency" | "display:cascade" | "display:survey" | "display:quoting" | "display:customModal" | `display:main_media:${string}` | "action:client_upload" | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:extract_required";
10
- export declare type SchemaTag = "type:provider_profile" | "type:service_offer" | "client_only" | "globally_unique_field" | "action:verify" | "action:experimental_pass_urn" | "type:service_provider" | "type:marketplace" | "type:client_only" | "type:globally_unique_field";
10
+ export declare 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:showOnWizard" | `display:main_media:${string}` | "action:client_upload" | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:extract_required";
11
+ export declare type SchemaTag = "action:experimental_pass_object_store_id" | "action:verify" | "default_camera:rear" | "default_camera:front" | `link_to:${string}:${string}` | "type:service_provider" | "type:service_offer" | "type:marketplace" | "type:client_only" | "type:globally_unique_field";
11
12
  export declare type SchemaField = {
12
13
  /** @deprecated don't use, it's inconsistent */
13
14
  $id?: string;
14
15
  title?: string;
16
+ title_plural?: string;
15
17
  description?: string;
16
18
  /** readOnly means the Wizard won't show this field */
17
19
  readOnly?: boolean;
18
20
  examples?: unknown[];
19
21
  tags?: SchemaFieldTag[];
20
22
  type?: DataTypes;
21
- enum?: unknown[];
23
+ enum?: string[];
22
24
  maximum?: number;
23
25
  minimum?: number;
24
26
  /** @deprecated raytio's usage not documented */
25
27
  maxLength?: number;
26
28
  /** @deprecated raytio's usage not documented */
27
29
  minLength?: number;
28
- /** @internal added by the client. It's the default value based on the existing values from subschema on their profile */
29
- defaultValue?: unknown;
30
+ /** the default value */
30
31
  default?: unknown;
31
32
  pattern?: string;
32
33
  /** whether the field should be encrypted */
@@ -34,13 +35,17 @@ export declare type SchemaField = {
34
35
  format?: "date" | "date-time";
35
36
  contentMediaType?: string;
36
37
  contentEncoding?: "base64";
37
- /** for nested JSON */
38
+ /** `items` is used for nested arrays, (while `properties` is used for nested objects) */
38
39
  items?: {
39
40
  type: DataTypes;
40
41
  properties: {
41
42
  [subFieldName: string]: SchemaField;
42
43
  };
43
44
  };
45
+ /** `properties` is used for nested objects, (while `items` is used for nested arrays) */
46
+ properties?: {
47
+ [subFieldName: string]: SchemaField;
48
+ };
44
49
  /** If this field refers to a sub-object */
45
50
  $ref?: string;
46
51
  /**
@@ -60,10 +65,10 @@ export declare type SchemaField = {
60
65
  /** URL to a JSON file in the `Lookup` format */
61
66
  lookup?: string;
62
67
  /** @internal the client adds this - it's the fieldName. */
63
- $prop?: string;
68
+ $prop: string;
64
69
  priority?: number;
65
70
  /** @internal if supplied, it's the existing field values. Added by the client */
66
- subObjectRef?: (string | number)[];
71
+ subObjectRef?: unknown[];
67
72
  /** specifies that the description is formatted in markdown */
68
73
  description_decorator?: "md";
69
74
  /** if a `pattern` is specified, this is the error message */
@@ -79,6 +84,8 @@ export declare type SchemaField = {
79
84
  };
80
85
  /** if this field is a table input, this determines the text to show on the "Add Row" btn */
81
86
  add_row_btn_label?: string;
87
+ /** if this field is a table input, this determines the text to show if the table is empty */
88
+ table_empty_message?: string;
82
89
  /**
83
90
  * used on fields that are a signature file picker, see !849
84
91
  * also used to determine if the MediaPicker should be shown inline
@@ -96,21 +103,28 @@ export declare type SchemaField = {
96
103
  * `name`. This type can be used for both the schema and for individual fields.
97
104
  */
98
105
  export declare type Schema = {
106
+ /** @deprecated don't use this */
99
107
  $id?: string;
100
108
  $schema?: string;
101
- /** name will always exist on schema */
109
+ n_id?: NId;
110
+ /** these fields will always exist on schema */
102
111
  name: string;
112
+ title: string;
113
+ description: string;
114
+ /** plural version of the title */
115
+ title_plural?: string;
103
116
  /**
104
117
  * the group that a schema belongs to, such as "passports". This is useful for
105
118
  * forms that accept different types of similar documents.
106
119
  */
107
120
  schema_group?: string;
108
- title?: string;
109
- description?: string;
121
+ /** the localized title of the `schema_group`. added by the client */
122
+ group_title?: string;
110
123
  /** @deprecated not sure why a schema would have this, only fields should */
111
124
  $ref?: string;
112
125
  tags?: SchemaTag[];
113
- verified_fields?: string[];
126
+ /** originally `string[]`, the client modifies this */
127
+ verified_fields?: (string | ConditionallyRequired)[];
114
128
  wasExpandedByClient?: boolean;
115
129
  /** added by client */
116
130
  required?: (string | ConditionallyRequired)[];
@@ -123,19 +137,46 @@ export declare type Schema = {
123
137
  if?: Schema;
124
138
  then?: Schema;
125
139
  }[];
126
- /**
127
- * this is deliberately an optional prop, there are cases where properties are
128
- * undefined, e.g.
129
- * - from get-all-schema API
130
- * - if the schema is a sub-object
131
- */
132
- properties?: {
140
+ /** If this tag exists, the schema is deprecated. ISO Date. */
141
+ end_date?: string;
142
+ /** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
143
+ properties: {
133
144
  [fieldName: string]: SchemaField;
134
145
  };
135
146
  i18n?: {
136
147
  [locale: string]: {
137
148
  $schema: Schema;
138
- [fieldNameOrGroupName: string]: SchemaField & {
149
+ $loading_extract: {
150
+ title: string;
151
+ };
152
+ $loading_verify: {
153
+ title: string;
154
+ };
155
+ $loading_save: {
156
+ title: string;
157
+ };
158
+ $loading_update: {
159
+ title: string;
160
+ };
161
+ $loading_upload: {
162
+ title: string;
163
+ };
164
+ $loading_create_sub_obj: {
165
+ title: string;
166
+ };
167
+ $loading_permission: {
168
+ title: string;
169
+ };
170
+ $loading_link_to_person: {
171
+ title: string;
172
+ };
173
+ $loading_delete_pending_ver: {
174
+ title: string;
175
+ };
176
+ $loading_pending_ver_resubmit: {
177
+ title: string;
178
+ };
179
+ [fieldNameOrGroupName: string]: Omit<SchemaField, "$prop"> & {
139
180
  title_plural?: string;
140
181
  };
141
182
  };
@@ -149,11 +190,13 @@ export declare type Schema = {
149
190
  * the estimated loading times in seconds for various API calls. The client adds
150
191
  * this field after processing the schema tags.
151
192
  */
152
- timing?: Record<"extract" | "verify" | "persist" | "persist_verify", number>;
193
+ timing?: Record<"extract" | "live_person" | "verify_pending_delay", number>;
153
194
  relationships?: {
154
195
  relationship_name: string;
155
196
  direction: "from";
156
197
  type: string;
198
+ /** if required_relationship then use will be alerted in relationship menu and won't be able to share PO unless filled out */
199
+ required_relationship?: boolean;
157
200
  /** Specify `oneOf` XOR `anyOf`. It's a list of schema names, or `"instance"` (see #784) */
158
201
  oneOf?: string[];
159
202
  /** Specify `oneOf` XOR `anyOf` It's a list of schema names. */
@@ -204,6 +247,14 @@ export declare type Schema = {
204
247
  schema_name: string;
205
248
  properties: Record<string, unknown>;
206
249
  }[];
250
+ /** Relationships that should be created */
251
+ relationships?: {
252
+ /** will normally look like `"{n_id:profile_objects[0]}"` */
253
+ from: string;
254
+ to: string;
255
+ type: string;
256
+ properties?: Record<string, string>;
257
+ }[];
207
258
  /**
208
259
  * Organizations that should be created. NOTE: if multiple are specified, when the wizard
209
260
  * completes, the _first one_ will be selected
@@ -220,5 +271,19 @@ export declare type Schema = {
220
271
  }[];
221
272
  }[];
222
273
  }[];
274
+ /** The relative path in the client to redirect to once finished. May include variables */
275
+ return_to?: string;
223
276
  };
224
277
  };
278
+ /** Only certain properties from the schema */
279
+ export declare type SchemaMetadata = Pick<Schema, "name" | "title" | "description" | "schema_group" | "end_date" | "i18n" | "display" | "tags" | "clientLocale" | "groupNames" | "title_plural" | "group_title"> & {
280
+ /**
281
+ * @deprecated this prop exists so that SchemaMetadata does not extend Schema.
282
+ * use `getSchema(schemaName)` to fetch the full schema
283
+ */
284
+ __typeof__: "You cannot supply SchemaMetadata to a function that expects Schema";
285
+ isProfileSchema: boolean;
286
+ isSpSchema: boolean;
287
+ };
288
+ /** @ignore */
289
+ export declare type RelationDefinition = NonNullable<Schema["relationships"]>[number];
package/dist/theme.d.ts CHANGED
@@ -13,6 +13,7 @@ export declare type Colors = {
13
13
  /** only used by the fancy layout on the login screen */
14
14
  raytioOrangeShade: string;
15
15
  successGreen: string;
16
+ loadingYellow: string;
16
17
  errorRed: string;
17
18
  textLight: string;
18
19
  textMedium: string;
@@ -23,3 +24,7 @@ export declare type Colors = {
23
24
  blankBackground: string;
24
25
  blank: string;
25
26
  };
27
+ export declare type CustomFonts = {
28
+ header?: string;
29
+ body?: string;
30
+ };
@@ -1,4 +1,28 @@
1
1
  import { NId, ProfileObject } from "./raytio";
2
+ export declare type VerificationPayload<WithValue extends boolean> = {
3
+ field: string;
4
+ schema?: string;
5
+ metadata?: Record<string, unknown>;
6
+ passed: boolean;
7
+ request_div: string;
8
+ /** @deprecated don't use this, it looks like the schema name but it's not */
9
+ source: string;
10
+ /** the n_id of the parent profile object that this ver belongs (NOT the n_id of the field) */
11
+ source_n_id?: NId;
12
+ /** like `source_n_id` */
13
+ source_hashed_n_id?: NId;
14
+ type?: null;
15
+ v_id: string;
16
+ verification_date: string;
17
+ verifier_id?: NId;
18
+ verifier_source_id?: NId;
19
+ verifier_service_id?: NId;
20
+ verifier_div: string;
21
+ /** ISO Date */
22
+ valid_until?: string;
23
+ } & (WithValue extends true ? {
24
+ value: string | number;
25
+ } : {});
2
26
  /**
3
27
  * Different APIs inconsistently include the `value` prop. If you know it exists,
4
28
  * use `Verification<true>`, otherwise just `Verification`. Verifications from
@@ -16,24 +40,7 @@ export declare type Verification<WithValue extends boolean = false> = ProfileObj
16
40
  verifications: [
17
41
  {
18
42
  signature: string;
19
- data: {
20
- field: string;
21
- metadata?: Record<string, unknown>;
22
- passed: boolean;
23
- request_div: string;
24
- /** @deprecated don't use this, it looks like the schema name but it's not */
25
- source: string;
26
- /** the n_id of the parent profile object that this ver belongs (NOT the n_id of the field) */
27
- source_n_id: NId;
28
- v_id: string;
29
- verification_date: string;
30
- verifier_id?: NId;
31
- verifier_source_id?: NId;
32
- verifier_service_id?: NId;
33
- verifier_div: string;
34
- } & (WithValue extends true ? {
35
- value: string | number;
36
- } : {});
43
+ data: VerificationPayload<WithValue>;
37
44
  }
38
45
  ];
39
46
  }>;
@@ -67,7 +74,7 @@ export declare type VerificationProvider = {
67
74
  /** This is what @raytio/core exposes, which is more useable than @see Verification */
68
75
  export declare type RealVer = {
69
76
  fieldName: string;
70
- value: string | number;
77
+ value: unknown;
71
78
  provider: VerificationProvider;
72
79
  signature: string;
73
80
  /**
@@ -5,6 +5,8 @@ exports.POVerification = exports.FieldVerification = void 0;
5
5
  * "Not Verified" means show no badge, cf. "Verified False" means the
6
6
  * verifier revealed that the data was wrong. So show a ❌
7
7
  */
8
+ // We cannot change the enum values, since ScoreRules have been generated
9
+ // with the enum values hardcoded. The enum value are also used to find the "best" or "worst" verification (lower=better)
8
10
  var FieldVerification;
9
11
  (function (FieldVerification) {
10
12
  FieldVerification[FieldVerification["Verified"] = 60001] = "Verified";
@@ -12,6 +14,8 @@ var FieldVerification;
12
14
  FieldVerification[FieldVerification["VerifiedFalse"] = 60003] = "VerifiedFalse";
13
15
  FieldVerification[FieldVerification["Expired"] = 60004] = "Expired";
14
16
  })(FieldVerification = exports.FieldVerification || (exports.FieldVerification = {}));
17
+ // We cannot change the enum values, since ScoreRules have been generated
18
+ // with the enum values hardcoded.
15
19
  var POVerification;
16
20
  (function (POVerification) {
17
21
  POVerification[POVerification["FullyVerified"] = 70001] = "FullyVerified";
package/dist/wizard.d.ts CHANGED
@@ -1,11 +1,15 @@
1
1
  import { AId } from "./raytio";
2
2
  /** configuration data for a single wizard page (@see WizardConfig) */
3
- export interface WizardPage {
3
+ export declare type WizardPage = {
4
4
  /** if undefined, the schema title will be used */
5
- name?: string;
5
+ name?: string | symbol;
6
6
  filter: "oneOf" | "anyOf";
7
7
  schemas: string[];
8
+ /** the fallback description, if there isn't one for the specific situation */
8
9
  description?: string;
10
+ description_select?: string;
11
+ description_create?: string;
12
+ description_update?: string;
9
13
  /** if explictly == false, then it's an AO (not a PO), in which case there can only be one schema */
10
14
  profile?: boolean;
11
15
  /** if true this page can be skipped. The PageResult wil be undefined */
@@ -24,12 +28,30 @@ export interface WizardPage {
24
28
  display_field_title?: boolean;
25
29
  /** whether the field descriptions should be shown */
26
30
  display_field_description?: boolean;
27
- /** if supplied, only the fields that are listed should be shared */
28
- fields_to_share?: string[];
31
+ /** if supplied, only the fields that are listed should be shared (#520, #1024) */
32
+ field_list?: string[];
29
33
  /** custom text & header that's displayed on reverfication modal for expired PO */
30
34
  reverify_header?: string;
31
35
  reverify_text?: string;
32
- }
36
+ /** do not allow uploading in ImageDynamicSection if this is explictly false */
37
+ allow_upload?: boolean;
38
+ /** for ImageDynamicSection, the minimum score to be treated as a pass */
39
+ extract_threshold?: number;
40
+ /** for ImageDynamicSection, the action to take if pre-verify passes */
41
+ extract_threshold_pass_action?: "review" | "next_step";
42
+ /** for ImageDynamicSection, the action to take if pre-verify fails */
43
+ extract_threshold_fail_action?: "capture" | "capture_review" | "recapture_or_next_step" | "review" | "next_step";
44
+ /** for ImageDynamicSection, the action to take if the API returns no `validation: {}` object */
45
+ 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
+ verify_data?: boolean;
48
+ /** a list of fields that should not be required, even if the schema says they're required */
49
+ optional_fields?: string[];
50
+ /** the information to share. undefined implies both. */
51
+ share?: "profile" | "verification" | "both";
52
+ /** can you force the colour theme to change for just one page (#1066, #1074). At the moment this on pages that use WebcamImageCapture */
53
+ display_mode?: "light" | "dark" | "default";
54
+ };
33
55
  /**
34
56
  * when a form link is generated, this is what gets saved on the API.
35
57
  * Each value can be overriden in the query parameters. If specified
@@ -60,4 +82,23 @@ export declare type WizardConfig = {
60
82
  skip_share?: boolean;
61
83
  /** if specified, the email addresses that a submission should be sent to */
62
84
  emails?: string[];
85
+ /**
86
+ * whether the passwordless-signup process should be used if the user visits
87
+ * this form, and they are not logged in. If false, the standard sign-up
88
+ * process will be used
89
+ */
90
+ quick_onboard?: boolean;
91
+ /** the loading message to show next to the spinner after the review screen */
92
+ sharing_data_message?: string;
93
+ /** a list of relationships that should be created after the wizard completes (see #987) */
94
+ relationships?: {
95
+ /** schema name */
96
+ from: string;
97
+ /** schema name */
98
+ to: string;
99
+ /** relationship type */
100
+ type: string;
101
+ /** relationship properties */
102
+ properties?: Record<string, any>;
103
+ }[];
63
104
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raytio/types",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "license": "MIT",
5
5
  "main": "index",
6
6
  "types": "index",
@@ -12,6 +12,7 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "docs": "sh ../../scripts/generate-docs.sh",
15
- "build": "tsc"
15
+ "test": "npm run build",
16
+ "build": "tsc && rm -rf dist/__tests__"
16
17
  }
17
18
  }
@@ -0,0 +1,23 @@
1
+ /* eslint-disable fp/no-let, @typescript-eslint/no-unused-vars */
2
+ import { Schema, SchemaField, SchemaMetadata } from "..";
3
+
4
+ /**
5
+ * this file is not run, it is just compiled by tsc
6
+ * If compilation suceeds, then the test passes.
7
+ */
8
+
9
+ let schema: Schema;
10
+ let schemaField: SchemaField;
11
+ let schemaMetadata: SchemaMetadata;
12
+
13
+ function f() {
14
+ // @ts-expect-error SchemaField should not extend Schema
15
+ const test1: SchemaField = schema;
16
+ // @ts-expect-error Schema should not extend SchemaField
17
+ const test2: Schema = schemaField;
18
+
19
+ // @ts-expect-error SchemaMetadata should not extend Schema
20
+ const test3: SchemaMetadata = schema;
21
+ // @ts-expect-error Schema should not extend SchemaMetadata
22
+ const test4: Schema = schemaMetadata;
23
+ }
package/src/crypto.ts CHANGED
@@ -1,4 +1,5 @@
1
- export type Encrypted = {
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ export type Encrypted<_Data = string> = {
2
3
  encrypted_key: {
3
4
  encrypted_key: string;
4
5
  };