@raytio/types 6.0.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 CHANGED
@@ -41,6 +41,7 @@ Hovering over the type in VSCode will display documentation and available proper
41
41
  - [Instance](#instance)
42
42
  - [Lookup](#lookup)
43
43
  - [NId](#nid)
44
+ - [OId](#oid)
44
45
  - [Organization](#organization)
45
46
  - [PId](#pid)
46
47
  - [ProfileObject](#profileobject)
@@ -76,10 +77,11 @@ Hovering over the type in VSCode will display documentation and available proper
76
77
  | `a_id` | [`AId`](#aid) | - |
77
78
  | `aa_help?` | `string` | markdown or string help information including [phoneNumber || email] |
78
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 |
79
81
  | `callback_uri?` | `string`[] | - |
80
82
  | `description?` | `string` | - |
81
83
  | `name` | `string` | - |
82
- | `org_id` | `string` | the id of the associated organisation |
84
+ | `org_id` | [`OId`](#oid) | the id of the associated organisation |
83
85
  | `picture?` | [`Urn`](#urn) | - |
84
86
  | `picture_url?` | `string` | Easy to use AA logo url for pasting inot emails |
85
87
  | `ruleset?` | `unknown` | configuration for the submission rules |
@@ -260,6 +262,14 @@ An `n_id` is the ID of a @see ProfileObject
260
262
 
261
263
  ___
262
264
 
265
+ ### OId
266
+
267
+ Ƭ **OId**: `StringWithIdentity`<``"OId"``\>
268
+
269
+ An `o_id` is the ID of an @see Organization
270
+
271
+ ___
272
+
263
273
  ### Organization
264
274
 
265
275
  Ƭ **Organization**: `Object`
@@ -280,7 +290,7 @@ NOTE: this is different to how the schema defines an Organization. **The schema
280
290
  | `address.street2` | `string` |
281
291
  | `customer` | `Record`<`string`, `unknown`\> |
282
292
  | `email` | `string` |
283
- | `id` | `string` |
293
+ | `id` | [`OId`](#oid) |
284
294
  | `name` | `string` |
285
295
 
286
296
  ___
@@ -416,6 +426,8 @@ Raytio's variant of JSON Schema. All props marked as optional except
416
426
  | `title_plural?` | `string` | plural version of the title |
417
427
  | `type?` | [`DataTypes`](#datatypes) | - |
418
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 |
419
431
  | `wasExpandedByClient?` | `boolean` | - |
420
432
 
421
433
  ___
@@ -470,7 +482,7 @@ ___
470
482
 
471
483
  ### SchemaFieldTag
472
484
 
473
- Ƭ **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"``
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"``
474
486
 
475
487
  ___
476
488
 
@@ -484,7 +496,7 @@ ___
484
496
 
485
497
  ### SchemaTag
486
498
 
487
- Ƭ **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"``
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"``
488
500
 
489
501
  ___
490
502
 
@@ -571,7 +583,7 @@ These `n_id`s point to service provider profile objects
571
583
  | Name | Type | Description |
572
584
  | :------ | :------ | :------ |
573
585
  | `dataSourceNId?` | [`NId`](#nid) | - |
574
- | `date` | `Date` | the date which the verification was verified on, or last re-verified on |
586
+ | `date?` | `Date` | the date which the verification was verified on, or last re-verified on |
575
587
  | `serviceProviderNId?` | [`NId`](#nid) | - |
576
588
  | `verifierNId?` | [`NId`](#nid) | - |
577
589
 
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.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
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];
package/dist/raytio.d.ts CHANGED
@@ -18,6 +18,8 @@ export declare type GId = StringWithIdentity<"GId">;
18
18
  export declare type UId = StringWithIdentity<"UId">;
19
19
  /** An `a_id` is the ID of an @see AA */
20
20
  export declare type AId = StringWithIdentity<"AId">;
21
+ /** An `o_id` is the ID of an @see Organization */
22
+ export declare type OId = StringWithIdentity<"OId">;
21
23
  export declare type DataTypes = "string" | "number" | "boolean" | "object" | "integer" | "array" | "null";
22
24
  export declare type SubmissionStatus = "Submitted" | "Processing" | "Rejected" | "Expired" | "Completed" | "DataChanged" | "Received" | "Accepted";
23
25
  /** You can supply an option type argument if you know exactly what the properties will be */
@@ -99,9 +101,11 @@ export declare type AA = {
99
101
  /** the n_id of the associated service provider */
100
102
  service_provider_n_id?: NId;
101
103
  /** the id of the associated organisation */
102
- org_id: string;
104
+ org_id: OId;
103
105
  /** configuration for the submission rules */
104
106
  ruleset?: unknown;
107
+ /** if true, only specific email addresses can submit the form */
108
+ auth_list_enabled?: boolean;
105
109
  /** @internal */
106
110
  _transitions?: unknown[];
107
111
  };
@@ -150,7 +154,7 @@ export declare type Instance = {
150
154
  * NOTE: this is different to how the schema defines an Organization. **The schema is wrong (see #468)**
151
155
  */
152
156
  export declare type Organization = {
153
- id: string;
157
+ id: OId;
154
158
  name: string;
155
159
  email: string;
156
160
  address: {
package/dist/schema.d.ts CHANGED
@@ -7,8 +7,8 @@ export declare type ConditionallyRequired = {
7
7
  [fieldName: string]: string[];
8
8
  };
9
9
  };
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";
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}` | "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 declare 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";
12
12
  export declare type SchemaField = {
13
13
  /** @deprecated don't use, it's inconsistent */
14
14
  $id?: string;
@@ -122,6 +122,9 @@ export declare type Schema = {
122
122
  group_title?: string;
123
123
  /** @deprecated not sure why a schema would have this, only fields should */
124
124
  $ref?: string;
125
+ version?: string;
126
+ /** whether the `version` is the latest version */
127
+ version_current?: boolean;
125
128
  tags?: SchemaTag[];
126
129
  /** originally `string[]`, the client modifies this */
127
130
  verified_fields?: (string | ConditionallyRequired)[];
@@ -69,7 +69,7 @@ export declare type VerificationProvider = {
69
69
  dataSourceNId?: NId;
70
70
  serviceProviderNId?: NId;
71
71
  /** the date which the verification was verified on, or last re-verified on */
72
- date: Date;
72
+ date?: Date;
73
73
  };
74
74
  /** This is what @raytio/core exposes, which is more useable than @see Verification */
75
75
  export declare type RealVer = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raytio/types",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "license": "MIT",
5
5
  "main": "index",
6
6
  "types": "index",
package/src/raytio.ts CHANGED
@@ -19,6 +19,8 @@ export type GId = StringWithIdentity<"GId">;
19
19
  export type UId = StringWithIdentity<"UId">;
20
20
  /** An `a_id` is the ID of an @see AA */
21
21
  export type AId = StringWithIdentity<"AId">;
22
+ /** An `o_id` is the ID of an @see Organization */
23
+ export type OId = StringWithIdentity<"OId">;
22
24
 
23
25
  export type DataTypes =
24
26
  | "string"
@@ -134,12 +136,15 @@ export type AA = {
134
136
  /** the n_id of the associated service provider */
135
137
  service_provider_n_id?: NId;
136
138
  /** the id of the associated organisation */
137
- org_id: string;
139
+ org_id: OId;
138
140
 
139
141
  /** configuration for the submission rules */
140
142
  // we know the type should be `ScoreConfig`, but we can't rely that it's valid, or the right version
141
143
  ruleset?: unknown;
142
144
 
145
+ /** if true, only specific email addresses can submit the form */
146
+ auth_list_enabled?: boolean;
147
+
143
148
  /** @internal */
144
149
  _transitions?: unknown[];
145
150
  };
@@ -192,7 +197,7 @@ export type Instance = {
192
197
  * NOTE: this is different to how the schema defines an Organization. **The schema is wrong (see #468)**
193
198
  */
194
199
  export type Organization = {
195
- id: string;
200
+ id: OId;
196
201
  name: string;
197
202
  email: string;
198
203
  address: {
package/src/schema.ts CHANGED
@@ -26,10 +26,15 @@ export type SchemaFieldTag =
26
26
  | "display:terms_conditions"
27
27
  | "display:showOnWizard" // added by #837, TODO: document
28
28
  | `display:main_media:${string}` // property name to determine what image to display
29
+ // date picker components
30
+ | "date_component:day"
31
+ | "date_component:month"
32
+ | "date_component:year"
29
33
  // other
30
34
  | "action:client_upload"
31
35
  | "verify:show_if_pending"
32
36
  | "special:hide_select_behind_button"
37
+ | "type:capture_geolocation" // triggers the wizard's GeoLocationInput field
33
38
  | "type:extract_required";
34
39
 
35
40
  export type SchemaTag =
@@ -39,6 +44,9 @@ export type SchemaTag =
39
44
  // camera
40
45
  | "default_camera:rear"
41
46
  | "default_camera:front"
47
+ // oauth group rule
48
+ | `oauth2_component:name:${string}`
49
+ | `oauth2_component:redirect_url:${string}`
42
50
  // misc
43
51
  | `link_to:${/* schemaName */ string}:${/* relationshipType */ string}`
44
52
  // type
@@ -171,6 +179,10 @@ export type Schema = {
171
179
  /** @deprecated not sure why a schema would have this, only fields should */
172
180
  $ref?: string;
173
181
 
182
+ version?: string;
183
+ /** whether the `version` is the latest version */
184
+ version_current?: boolean;
185
+
174
186
  tags?: SchemaTag[];
175
187
  /** originally `string[]`, the client modifies this */
176
188
  verified_fields?: (string | ConditionallyRequired)[];
@@ -82,7 +82,7 @@ export type VerificationProvider = {
82
82
  dataSourceNId?: NId;
83
83
  serviceProviderNId?: NId;
84
84
  /** the date which the verification was verified on, or last re-verified on */
85
- date: Date;
85
+ date?: Date;
86
86
  };
87
87
 
88
88
  /** This is what @raytio/core exposes, which is more useable than @see Verification */