@raytio/types 7.3.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +556 -131
- package/dist/authz.d.ts +4 -0
- package/dist/authz.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/merchant.d.ts +20 -0
- package/dist/merchant.js +2 -0
- package/dist/orgs.d.ts +85 -31
- package/dist/raytio.d.ts +137 -55
- package/dist/schema.d.ts +251 -36
- package/dist/subscription.d.ts +90 -0
- package/dist/subscription.js +2 -0
- package/dist/tenant.d.ts +6 -0
- package/dist/tenant.js +2 -0
- package/dist/theme.d.ts +4 -0
- package/dist/verification.d.ts +48 -9
- package/dist/wizard.d.ts +37 -2
- package/package.json +2 -2
- package/src/authz.ts +13 -0
- package/src/index.ts +4 -0
- package/src/merchant.ts +22 -0
- package/src/orgs.ts +103 -31
- package/src/raytio.ts +156 -60
- package/src/schema.ts +308 -38
- package/src/subscription.ts +107 -0
- package/src/tenant.ts +7 -0
- package/src/theme.ts +4 -0
- package/src/verification.ts +60 -9
- package/src/wizard.ts +44 -2
package/src/verification.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
CommonFields,
|
|
3
|
+
GPMId,
|
|
4
|
+
Json,
|
|
5
|
+
MId,
|
|
6
|
+
NId,
|
|
7
|
+
ProfileObject,
|
|
8
|
+
SchemaName,
|
|
9
|
+
} from "./raytio";
|
|
2
10
|
|
|
3
11
|
// see #659
|
|
4
12
|
export enum SafeHarbourCode {
|
|
@@ -16,7 +24,11 @@ export type VerificationPayload<WithValue extends boolean> = {
|
|
|
16
24
|
schema?: SchemaName;
|
|
17
25
|
metadata?: {
|
|
18
26
|
safeHarbourScore?: SafeHarbourCode;
|
|
19
|
-
status?: "pending";
|
|
27
|
+
status?: "pending" | "approved";
|
|
28
|
+
validation?: {
|
|
29
|
+
id: string;
|
|
30
|
+
url: string;
|
|
31
|
+
};
|
|
20
32
|
pending_details?: {
|
|
21
33
|
/**
|
|
22
34
|
* for pending verifications - whether the verifier will complete fast enough that
|
|
@@ -40,12 +52,14 @@ export type VerificationPayload<WithValue extends boolean> = {
|
|
|
40
52
|
source_n_id?: NId;
|
|
41
53
|
/** like `source_n_id` */
|
|
42
54
|
source_hashed_n_id?: NId;
|
|
55
|
+
hashed_source_n_id?: NId;
|
|
43
56
|
type?: null;
|
|
44
57
|
v_id: string;
|
|
58
|
+
verification_type_id: GPMId;
|
|
45
59
|
verification_date: string;
|
|
46
|
-
verifier_id?:
|
|
47
|
-
verifier_source_id?:
|
|
48
|
-
verifier_service_id?:
|
|
60
|
+
verifier_id?: MId;
|
|
61
|
+
verifier_source_id?: MId;
|
|
62
|
+
verifier_service_id?: MId;
|
|
49
63
|
verifier_div: string;
|
|
50
64
|
// we are disabling the eslint rule because even tho `{}` acts illogically in typescript,
|
|
51
65
|
// in this case it's working as expected in the intersection type, see
|
|
@@ -110,11 +124,12 @@ export enum POVerification {
|
|
|
110
124
|
Loading,
|
|
111
125
|
}
|
|
112
126
|
|
|
113
|
-
/** These
|
|
127
|
+
/** These IDs point to merchants (formerly service provider profile objects) */
|
|
114
128
|
export type VerificationProvider = {
|
|
115
|
-
verifierNId?:
|
|
116
|
-
dataSourceNId?:
|
|
117
|
-
serviceProviderNId?:
|
|
129
|
+
verifierNId?: MId;
|
|
130
|
+
dataSourceNId?: MId;
|
|
131
|
+
serviceProviderNId?: MId;
|
|
132
|
+
verificationTypeId?: GPMId;
|
|
118
133
|
/** the date which the verification was verified on, or last re-verified on */
|
|
119
134
|
date?: Date;
|
|
120
135
|
};
|
|
@@ -141,3 +156,39 @@ export type RealVer = {
|
|
|
141
156
|
/** If the verification has expired, it's the date that it expired on. Otherwise it's `false` */
|
|
142
157
|
expired: Date | false;
|
|
143
158
|
};
|
|
159
|
+
|
|
160
|
+
export type VerificationType = CommonFields<GPMId> & {
|
|
161
|
+
item_number: number;
|
|
162
|
+
org_number: number;
|
|
163
|
+
item_key: string;
|
|
164
|
+
item_key_01: string | null;
|
|
165
|
+
item_key_02: string | null;
|
|
166
|
+
item_key_03: string | null;
|
|
167
|
+
item_type: string | null;
|
|
168
|
+
item_name: string;
|
|
169
|
+
item_name_i18n: Json | null;
|
|
170
|
+
item_description: string;
|
|
171
|
+
item_description_i18n: Json | null;
|
|
172
|
+
|
|
173
|
+
primary_uom: string;
|
|
174
|
+
secondary_uom: string | null;
|
|
175
|
+
item_mass: number | null;
|
|
176
|
+
item_mass_uom: string | null;
|
|
177
|
+
item_volume: number | null;
|
|
178
|
+
item_volume_uom: string | null;
|
|
179
|
+
item_dimension_length: number | null;
|
|
180
|
+
item_dimension_width: number | null;
|
|
181
|
+
item_dimension_height: number | null;
|
|
182
|
+
item_dimension_uom: string | null;
|
|
183
|
+
|
|
184
|
+
purchased: boolean | null;
|
|
185
|
+
shipped: boolean | null;
|
|
186
|
+
stocked: boolean | null;
|
|
187
|
+
transacted: boolean | null;
|
|
188
|
+
asset: boolean | null;
|
|
189
|
+
returnable: boolean | null;
|
|
190
|
+
|
|
191
|
+
inventory_organization_number: number | null;
|
|
192
|
+
source_type: string | null;
|
|
193
|
+
source_organization_number: number | null;
|
|
194
|
+
};
|
package/src/wizard.ts
CHANGED
|
@@ -11,20 +11,55 @@ export type WizardPage = {
|
|
|
11
11
|
filter: "oneOf" | "anyOf";
|
|
12
12
|
schemas: SchemaName[];
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Page type: 'form' for data collection, 'message' for info/error display
|
|
16
|
+
* @default "form"
|
|
17
|
+
*/
|
|
18
|
+
page_type?: "form" | "message";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Content to display on message pages. Supports markdown if page_content_decorator is "md"
|
|
22
|
+
*/
|
|
23
|
+
page_content?: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Set to "md" to render page_content as markdown
|
|
27
|
+
*/
|
|
28
|
+
page_content_decorator?: "md";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* If true, user cannot proceed past this page (error/blocking behavior)
|
|
32
|
+
* If false, user can continue to next page (informational)
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
is_terminal?: boolean;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Label for the exit button on terminal pages
|
|
39
|
+
* @default "Home"
|
|
40
|
+
*/
|
|
41
|
+
terminal_button_label?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* URL to redirect to when exit button is clicked on terminal pages
|
|
45
|
+
* @default "/" or return_to from WizardConfig
|
|
46
|
+
*/
|
|
47
|
+
terminal_button_url?: string;
|
|
48
|
+
|
|
14
49
|
/** the fallback description, if there isn't one for the specific situation */
|
|
15
50
|
description?: string;
|
|
16
51
|
description_select?: string;
|
|
17
52
|
description_create?: string;
|
|
18
53
|
description_update?: string;
|
|
19
54
|
|
|
20
|
-
/**
|
|
55
|
+
/** @deprecated - AO/PO classification is now done per-object using schema tags (type:application_object) instead of page-level profile property */
|
|
21
56
|
profile?: boolean;
|
|
22
57
|
/** if true this page can be skipped. The PageResult wil be undefined */
|
|
23
58
|
optional?: boolean;
|
|
24
59
|
/** if true mulitple POs can be shared */
|
|
25
60
|
multiple?: boolean;
|
|
26
61
|
/** see #463 */
|
|
27
|
-
|
|
62
|
+
merchant_link?: boolean;
|
|
28
63
|
/** custom text to display on the Create New button */
|
|
29
64
|
create_new_text?: string;
|
|
30
65
|
/** a URL to a preset for configuing NestedSchemaSelect. {@link DeepConfig} */
|
|
@@ -138,6 +173,13 @@ export type WizardConfig = {
|
|
|
138
173
|
*/
|
|
139
174
|
quick_onboard?: boolean;
|
|
140
175
|
|
|
176
|
+
/**
|
|
177
|
+
* If true, users must explicitly accept privacy terms during quick onboard.
|
|
178
|
+
* If false, the form auto-submits without user intervention.
|
|
179
|
+
* @default true
|
|
180
|
+
*/
|
|
181
|
+
quick_onboard_require_consent?: boolean;
|
|
182
|
+
|
|
141
183
|
/** the loading message to show next to the spinner after the review screen */
|
|
142
184
|
sharing_data_message?: string;
|
|
143
185
|
|