@raytio/types 7.3.0 → 8.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/README.md +350 -87
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -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 +61 -27
- package/dist/schema.d.ts +45 -3
- package/dist/subscription.d.ts +89 -0
- package/dist/subscription.js +2 -0
- package/dist/verification.d.ts +40 -2
- package/package.json +2 -2
- package/src/index.ts +2 -0
- package/src/merchant.ts +22 -0
- package/src/orgs.ts +103 -31
- package/src/raytio.ts +64 -26
- package/src/schema.ts +51 -2
- package/src/subscription.ts +106 -0
- package/src/verification.ts +51 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -21,3 +21,5 @@ __exportStar(require("./theme"), exports);
|
|
|
21
21
|
__exportStar(require("./verification"), exports);
|
|
22
22
|
__exportStar(require("./wizard"), exports);
|
|
23
23
|
__exportStar(require("./orgs"), exports);
|
|
24
|
+
__exportStar(require("./subscription"), exports);
|
|
25
|
+
__exportStar(require("./merchant"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CommonFields, Json, MId, PRid } from "./raytio";
|
|
2
|
+
export type MerchantTypeCode = "TYPE_1" | "TYPE_2";
|
|
3
|
+
export type MerchantClassCode = "CLASS_1" | "CLASS_2";
|
|
4
|
+
export type MerchantStatusCode = "ACTIVE" | "INACTIVE";
|
|
5
|
+
export type MerchantApprovalStatusCode = "PENDING" | "APPROVED";
|
|
6
|
+
export type Merchant = CommonFields<MId> & {
|
|
7
|
+
party_id: PRid;
|
|
8
|
+
merchant_name: string | null;
|
|
9
|
+
merchant_name_i18n: Json | null;
|
|
10
|
+
merchant_common_name: string | null;
|
|
11
|
+
merchant_common_name_i18n: Json | null;
|
|
12
|
+
merchant_description: string | null;
|
|
13
|
+
merchant_description_i18n: Json | null;
|
|
14
|
+
merchant_image_url_logo: string | null;
|
|
15
|
+
merchant_image_url_thumbnail: string | null;
|
|
16
|
+
merchant_type_code: MerchantTypeCode | null;
|
|
17
|
+
merchant_class_code: MerchantClassCode | null;
|
|
18
|
+
merchant_status_code: MerchantStatusCode | null;
|
|
19
|
+
merchant_approval_status_code: MerchantApprovalStatusCode | null;
|
|
20
|
+
};
|
package/dist/merchant.js
ADDED
package/dist/orgs.d.ts
CHANGED
|
@@ -1,15 +1,70 @@
|
|
|
1
|
+
import type { CId, CommonFields, LOCId, Lookup, OId, PCId, PRid, PermissionType, UId } from "./raytio";
|
|
1
2
|
/** Types Used for Organization Related API Responses */
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
/**
|
|
4
|
+
* An organization.
|
|
5
|
+
* NOTE: this is different to how the schema defines an Organization. **The schema is wrong (see #468)**
|
|
6
|
+
*/
|
|
7
|
+
export type Organization = {
|
|
8
|
+
id: CId;
|
|
9
|
+
orgId: OId;
|
|
10
|
+
name: string;
|
|
11
|
+
contact_point?: Pick<ContactPoint, "email_address" | "id">;
|
|
12
|
+
address?: unknown;
|
|
13
|
+
customerUsers: CustomerUser[];
|
|
14
|
+
};
|
|
15
|
+
/** @internal some APIs now return extra info. this is what gets passed around in the client. */
|
|
16
|
+
export type FullOrg = {
|
|
17
|
+
id: CId;
|
|
18
|
+
organization: Omit<Organization, "id">;
|
|
19
|
+
/** 🧙♂️ */
|
|
20
|
+
gandalf?: unknown;
|
|
21
|
+
stripe?: {
|
|
22
|
+
customer: unknown;
|
|
23
|
+
};
|
|
24
|
+
centrix_credentials?: unknown;
|
|
25
|
+
};
|
|
26
|
+
/** An organization/customer, directly returned by the API */
|
|
27
|
+
export type Customer = CommonFields<CId> & {
|
|
28
|
+
customer_code: string;
|
|
29
|
+
party_id: PRid;
|
|
30
|
+
party_description: OId;
|
|
31
|
+
permission_type: PermissionType | null;
|
|
32
|
+
user_id: UId | null;
|
|
33
|
+
owner_email: string;
|
|
34
|
+
user_email: string;
|
|
35
|
+
prm_parties?: Party;
|
|
36
|
+
};
|
|
37
|
+
/** Organization Customer / User, Returned directly by the API */
|
|
38
|
+
export type CustomerUser = CommonFields<CId> & {
|
|
39
|
+
customer_code: string;
|
|
40
|
+
party_id: PRid;
|
|
8
41
|
party_name: string;
|
|
9
|
-
party_description:
|
|
42
|
+
party_description: OId;
|
|
43
|
+
owner_id: UId;
|
|
44
|
+
owner_email: string;
|
|
45
|
+
permission_type: PermissionType | null;
|
|
46
|
+
user_id: UId | null;
|
|
47
|
+
user_email: string | null;
|
|
48
|
+
group_name: string | null;
|
|
49
|
+
};
|
|
50
|
+
export type Party = CommonFields<PRid, PartyMetadata> & {
|
|
51
|
+
party_name: string;
|
|
52
|
+
party_description: OId;
|
|
10
53
|
party_type: string;
|
|
11
|
-
|
|
12
|
-
|
|
54
|
+
party_image_url_logo: string | null;
|
|
55
|
+
far_customers: CommonFields<CId> & {
|
|
56
|
+
freight_term_code: string;
|
|
57
|
+
customer_type_code: string;
|
|
58
|
+
customer_class_code: string;
|
|
59
|
+
customer_status_code: string;
|
|
60
|
+
price_list_version_id: string | null;
|
|
61
|
+
customer_approval_status_code: string;
|
|
62
|
+
far_customers_customer_type_lookup: Lookup;
|
|
63
|
+
far_customers_freight_terms_lookup: Lookup;
|
|
64
|
+
far_customers_customer_class_lookup: Lookup;
|
|
65
|
+
far_customers_customer_status_lookup: Lookup;
|
|
66
|
+
far_customers_customer_approval_status_lookup: Lookup;
|
|
67
|
+
}[];
|
|
13
68
|
};
|
|
14
69
|
/** An Organizations credentials */
|
|
15
70
|
export type PartyMetadata = {
|
|
@@ -20,26 +75,31 @@ export type PartyMetadata = {
|
|
|
20
75
|
centrix_credentials: unknown;
|
|
21
76
|
};
|
|
22
77
|
/** An Organization Site */
|
|
23
|
-
export type PartySite = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
end_date: string;
|
|
27
|
-
active: boolean;
|
|
28
|
-
party_id: string;
|
|
29
|
-
location_number: number;
|
|
78
|
+
export type PartySite = CommonFields<never> & {
|
|
79
|
+
party_id: PRid;
|
|
80
|
+
location_id: number;
|
|
30
81
|
party_site_name: string;
|
|
31
82
|
party_site_description: string | null;
|
|
32
|
-
party_site_number: string | null;
|
|
33
83
|
party_uses: string[];
|
|
34
84
|
party_use_primary: string;
|
|
35
|
-
|
|
85
|
+
};
|
|
86
|
+
export type CustomerSite = CommonFields<never> & {
|
|
87
|
+
org_id: OId;
|
|
88
|
+
party_site_id: string;
|
|
89
|
+
customer_site_code: string;
|
|
90
|
+
customer_site_status_code: string;
|
|
91
|
+
};
|
|
92
|
+
export type CustomerSiteUse = CommonFields<never> & {
|
|
93
|
+
org_id: OId;
|
|
94
|
+
customer_site_id: string;
|
|
95
|
+
customer_site_use_purpose_code: string;
|
|
96
|
+
customer_site_use_name: string;
|
|
97
|
+
freight_term_code: string | null;
|
|
98
|
+
payment_term_id: string;
|
|
99
|
+
price_list_version_id: string | null;
|
|
36
100
|
};
|
|
37
101
|
/** An Organization Location */
|
|
38
|
-
export type Location = {
|
|
39
|
-
id: string;
|
|
40
|
-
start_date: string;
|
|
41
|
-
end_date: string;
|
|
42
|
-
active: boolean;
|
|
102
|
+
export type Location = CommonFields<LOCId> & {
|
|
43
103
|
location_name: string;
|
|
44
104
|
location_description: string | null;
|
|
45
105
|
address_line_1: string | null;
|
|
@@ -61,15 +121,10 @@ export type Location = {
|
|
|
61
121
|
country: string | null;
|
|
62
122
|
geolocation: string | null;
|
|
63
123
|
geolocation_outline: string | null;
|
|
64
|
-
metadata: unknown;
|
|
65
124
|
};
|
|
66
125
|
/** A Contact Point for an Organization */
|
|
67
|
-
export type ContactPoint = {
|
|
68
|
-
|
|
69
|
-
start_date: string;
|
|
70
|
-
end_date: string;
|
|
71
|
-
active: boolean;
|
|
72
|
-
to_table: string;
|
|
126
|
+
export type ContactPoint = CommonFields<PCId> & {
|
|
127
|
+
party_id: PRid;
|
|
73
128
|
uuid: string | undefined;
|
|
74
129
|
contact_point_purpose: string;
|
|
75
130
|
contact_point_type: string;
|
|
@@ -80,5 +135,4 @@ export type ContactPoint = {
|
|
|
80
135
|
url_type: string | null;
|
|
81
136
|
email_address: string;
|
|
82
137
|
email_address_preferred_format: string;
|
|
83
|
-
metadata: unknown;
|
|
84
138
|
};
|
package/dist/raytio.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type StringWithIdentity<T> = string & {
|
|
|
5
5
|
$$typeof$$: T;
|
|
6
6
|
};
|
|
7
7
|
/** @internal */
|
|
8
|
-
type Json = Record<string, any>;
|
|
8
|
+
export type Json = Record<string, any>;
|
|
9
9
|
/** A `p_id` is the ID of a {@link Relationship} */
|
|
10
10
|
export type PId = StringWithIdentity<"PId">;
|
|
11
11
|
/** An `i_id` is the ID of an {@link Instance} */
|
|
@@ -20,15 +20,51 @@ export type GId = StringWithIdentity<"GId">;
|
|
|
20
20
|
export type UId = StringWithIdentity<"UId">;
|
|
21
21
|
/** An `a_id` is the ID of an {@link AA} */
|
|
22
22
|
export type AId = StringWithIdentity<"AId">;
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* An `o_id` is the ID of an {@link Organization}
|
|
25
|
+
*
|
|
26
|
+
* NOTE: Will be deprecated soon. Use CId instead.
|
|
27
|
+
* */
|
|
24
28
|
export type OId = StringWithIdentity<"OId">;
|
|
29
|
+
/** A `pr_id` is the ID of a {@link Party} */
|
|
30
|
+
export type PRid = StringWithIdentity<"PRid">;
|
|
31
|
+
/** A `pc_id` is the ID of a Party Contact Point */
|
|
32
|
+
export type PCId = StringWithIdentity<"PCId">;
|
|
25
33
|
/** A `wi_id` is the ID of a {@link Webhook} */
|
|
26
34
|
export type WId = StringWithIdentity<"WId">;
|
|
27
35
|
/** An `l_id` is the ID of any data stored in the KV-Store */ export type LId = StringWithIdentity<"LId">;
|
|
28
36
|
/** A `k_id` (also called a `aack_id` or a `publicKeyId`) is the ID of an AA's public key */
|
|
29
37
|
export type KId = StringWithIdentity<"KId">;
|
|
38
|
+
/** A `pk_id` is the ID of an AA's private key */
|
|
39
|
+
export type PKId = StringWithIdentity<"PKId">;
|
|
40
|
+
/** A `c_id` is the ID of a {@link Customer}, (will eventually replace org_id) */
|
|
41
|
+
export type CId = StringWithIdentity<"CId">;
|
|
42
|
+
/** A `t_id` is the ID of a transaction */
|
|
43
|
+
export type TId = StringWithIdentity<"TId">;
|
|
44
|
+
/** A `ws_id` is the ID of a transition */
|
|
45
|
+
export type WSId = StringWithIdentity<"WSId">;
|
|
30
46
|
/** A `SchemaName` is the ID of a {@link Schema} */
|
|
31
47
|
export type SchemaName = StringWithIdentity<"SchemaName">;
|
|
48
|
+
/** A `loc_id` is the ID of a location */
|
|
49
|
+
export type LOCId = StringWithIdentity<"LOCId">;
|
|
50
|
+
/** A `pl_id` is the ID of a PriceList */
|
|
51
|
+
export type PLId = StringWithIdentity<"PLId">;
|
|
52
|
+
/** A `prc_id` is the ID of a Price */
|
|
53
|
+
export type PRCId = StringWithIdentity<"PRCId">;
|
|
54
|
+
/** A `pll_id` is the ID of a PriceListLine/Plan */
|
|
55
|
+
export type PLLId = StringWithIdentity<"PLLId">;
|
|
56
|
+
/** A `s_id` is the ID of a Subscription */
|
|
57
|
+
export type SId = StringWithIdentity<"SId">;
|
|
58
|
+
/** A `sl_id` is the ID of a SubscriptionLine */
|
|
59
|
+
export type SLId = StringWithIdentity<"SLId">;
|
|
60
|
+
/** A `pm_id` is the ID of a PaymentMethod */
|
|
61
|
+
export type PMId = StringWithIdentity<"PMId">;
|
|
62
|
+
/** A `pt_id` is the ID of a PaymentProcessor */
|
|
63
|
+
export type PTId = StringWithIdentity<"PTId">;
|
|
64
|
+
/** A `m_id` is the ID of a Merchant */
|
|
65
|
+
export type MId = StringWithIdentity<"MId">;
|
|
66
|
+
/** A `gpm_id` is the ID of a Verification Type */
|
|
67
|
+
export type GPMId = StringWithIdentity<"GPMId">;
|
|
32
68
|
export type DataTypes = "string" | "number" | "boolean" | "object" | "integer" | "array" | "null";
|
|
33
69
|
export type SubmissionStatus = "Submitted" | "Processing" | "Rejected" | "Expired" | "Completed" | "DataChanged" | "Received" | "Accepted";
|
|
34
70
|
/**
|
|
@@ -51,7 +87,13 @@ export type CommonFields<IdType extends StringWithIdentity<string>, Metadata = u
|
|
|
51
87
|
end_date: string;
|
|
52
88
|
active: boolean;
|
|
53
89
|
metadata: Metadata | undefined;
|
|
90
|
+
row_version?: number;
|
|
91
|
+
resource_group?: string;
|
|
92
|
+
resource_name?: string;
|
|
93
|
+
resource_url?: string;
|
|
94
|
+
tenant_id?: string;
|
|
54
95
|
};
|
|
96
|
+
export type PermissionType = "ADMINS" | "VIEWS" | "EDITS" | "OWNS";
|
|
55
97
|
/** You can supply an option type argument if you know exactly what the properties will be */
|
|
56
98
|
export type ProfileObject<Properties = Json> = Partial<CommonFields<NId2>> & {
|
|
57
99
|
n_id: NId;
|
|
@@ -79,6 +121,7 @@ export type ProfileObjectForUpload<Properties = Json> = {
|
|
|
79
121
|
export type UrnNodeType = "user" | "profile_object" | "instance" | "schema" | "temp_object" | "document";
|
|
80
122
|
/** e.g. "urn:user:..." */
|
|
81
123
|
export type Urn = `urn:user:${UId}` | `urn:profile_object:${NId}` | `urn:instance:${IId}` | `urn:temp_object:${LId}` | `urn:schema:${SchemaName}` | `urn:document:${NId}`;
|
|
124
|
+
export type ContentUrl = `url:${string}`;
|
|
82
125
|
export type Relationship = {
|
|
83
126
|
start: Urn;
|
|
84
127
|
end: Urn;
|
|
@@ -126,7 +169,8 @@ export type AA = {
|
|
|
126
169
|
/** the n_id of the associated service provider */
|
|
127
170
|
service_provider_n_id?: NId;
|
|
128
171
|
/** the id of the associated organization */
|
|
129
|
-
org_id
|
|
172
|
+
org_id?: OId;
|
|
173
|
+
customer_id: CId;
|
|
130
174
|
/** configuration for the submission rules */
|
|
131
175
|
ruleset?: unknown;
|
|
132
176
|
/** if true, only specific email addresses can submit the form */
|
|
@@ -139,7 +183,7 @@ export type AA = {
|
|
|
139
183
|
logout_uri?: string[];
|
|
140
184
|
metadata?: unknown;
|
|
141
185
|
secret?: unknown;
|
|
142
|
-
/** @internal */
|
|
186
|
+
/** @internal fetched separately (see #1511) */
|
|
143
187
|
transitions?: unknown[];
|
|
144
188
|
};
|
|
145
189
|
export type InstanceWithoutData = CommonFields<IId, {
|
|
@@ -194,28 +238,6 @@ export type Instance = InstanceWithoutData & {
|
|
|
194
238
|
};
|
|
195
239
|
relationships: Relationship[];
|
|
196
240
|
};
|
|
197
|
-
/**
|
|
198
|
-
* An organization.
|
|
199
|
-
* NOTE: this is different to how the schema defines an Organization. **The schema is wrong (see #468)**
|
|
200
|
-
*/
|
|
201
|
-
export type Organization = {
|
|
202
|
-
id: OId;
|
|
203
|
-
name: string;
|
|
204
|
-
email: string;
|
|
205
|
-
address: unknown;
|
|
206
|
-
customer: unknown;
|
|
207
|
-
};
|
|
208
|
-
/** @internal some APIs now return extra info */
|
|
209
|
-
export type FullOrg = {
|
|
210
|
-
id: OId;
|
|
211
|
-
organization: Omit<Organization, "id">;
|
|
212
|
-
/** 🧙♂️ */
|
|
213
|
-
gandalf: unknown;
|
|
214
|
-
stripe: {
|
|
215
|
-
customer: unknown;
|
|
216
|
-
};
|
|
217
|
-
centrix_credentials: unknown;
|
|
218
|
-
};
|
|
219
241
|
/** validation data returned by preVerify (part of the extract&map API) */
|
|
220
242
|
export type Validation = {
|
|
221
243
|
score: number;
|
|
@@ -266,4 +288,16 @@ export type Webhook = {
|
|
|
266
288
|
response_payload: Json;
|
|
267
289
|
}[];
|
|
268
290
|
};
|
|
269
|
-
|
|
291
|
+
/**
|
|
292
|
+
* Link used for an Access Application, including all additional information
|
|
293
|
+
*/
|
|
294
|
+
export type Link = {
|
|
295
|
+
id: NId;
|
|
296
|
+
a_id: AId;
|
|
297
|
+
name: string;
|
|
298
|
+
subtitle: string;
|
|
299
|
+
code: LId;
|
|
300
|
+
url: string;
|
|
301
|
+
details?: AA;
|
|
302
|
+
isDefault?: boolean;
|
|
303
|
+
};
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AA, DataTypes,
|
|
1
|
+
import type { AA, DataTypes, SchemaName, Urn } from "./raytio";
|
|
2
|
+
import type { Organization } from "./orgs";
|
|
2
3
|
import type { WizardConfig } from "./wizard";
|
|
3
4
|
/** should be renamed since this applies to ConditionallyVerifiable */
|
|
4
5
|
export type ConditionallyRequired = {
|
|
@@ -7,8 +8,8 @@ export type ConditionallyRequired = {
|
|
|
7
8
|
[fieldName: string]: (string | number | boolean)[];
|
|
8
9
|
};
|
|
9
10
|
};
|
|
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}'
|
|
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";
|
|
11
|
+
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:mask" | `display:replace:('${string}', '${string}')` | "display:terms_conditions" | `display:main_media:${string}` | "date_component:day" | "date_component:month" | "date_component:year" | "action:allow_copy" | "action:allow_unreplace" | "action:allow_password_compromise_check" | "action:client_upload" | "action:hash" | "action:require_webauthn" | `action:generate_pepper:` | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:capture_geolocation" | "type:extract_required";
|
|
12
|
+
export type SchemaTag = "action:experimental_pass_object_store_id" | "action:verify" | `action:display_qr_code:${string}:${string}` | "default_camera:rear" | "default_camera:front" | `oauth2_component:name:${string}` | `oauth2_component:redirect_url:${string}` | `time:${string}:${number}` | `link_to:${string}:${string}` | "display:default_view:edit" | "type:service_provider" | "type:service_offer" | "type:marketplace" | "type:client_only" | "type:globally_unique_field";
|
|
12
13
|
export type SchemaField = {
|
|
13
14
|
/** @deprecated don't use, it's inconsistent */
|
|
14
15
|
$id?: string;
|
|
@@ -41,6 +42,20 @@ export type SchemaField = {
|
|
|
41
42
|
format?: "date" | "date-time" | "uri";
|
|
42
43
|
contentMediaType?: string;
|
|
43
44
|
contentEncoding?: "base64";
|
|
45
|
+
/**
|
|
46
|
+
* if this field is a foreign key, i.e. it is a primary key
|
|
47
|
+
* of a different schema, then that other's schema name should be listed here.
|
|
48
|
+
* e.g.
|
|
49
|
+
* ```json
|
|
50
|
+
* {
|
|
51
|
+
* "name": "ss_AA",
|
|
52
|
+
* "properties": {
|
|
53
|
+
* "org_id": { "foreign_key_of": "ss_Org" }
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
foreign_key_of?: SchemaName;
|
|
44
59
|
/** `items` is used for nested arrays, (while `properties` is used for nested objects) */
|
|
45
60
|
items?: {
|
|
46
61
|
type: DataTypes;
|
|
@@ -79,6 +94,10 @@ export type SchemaField = {
|
|
|
79
94
|
description_decorator?: "md";
|
|
80
95
|
/** if a `pattern` is specified, this is the error message */
|
|
81
96
|
patternMessage?: string;
|
|
97
|
+
/** the input string for a platform_unique_id */
|
|
98
|
+
hash_inputs?: string;
|
|
99
|
+
/** determines where an image is sourced from */
|
|
100
|
+
content_source?: string;
|
|
82
101
|
override?: {
|
|
83
102
|
permissions: {
|
|
84
103
|
/**
|
|
@@ -212,6 +231,19 @@ export type CommonSchemaAttributes = {
|
|
|
212
231
|
fields: string[];
|
|
213
232
|
label: string;
|
|
214
233
|
}[];
|
|
234
|
+
/**
|
|
235
|
+
* By default, the admin dashboard shows columns for all fields
|
|
236
|
+
* in listed in `head_main`. In rare cases you can use this property
|
|
237
|
+
* to specify a different set of fields to show to admins by default.
|
|
238
|
+
*/
|
|
239
|
+
tabular?: {
|
|
240
|
+
fields: string[];
|
|
241
|
+
};
|
|
242
|
+
/**
|
|
243
|
+
* determines if profile pages should display using compacted 'MiniPO'
|
|
244
|
+
* view or deafult view
|
|
245
|
+
*/
|
|
246
|
+
compact_table?: boolean;
|
|
215
247
|
};
|
|
216
248
|
/** only the schema used for the onboarding wizard have this property */
|
|
217
249
|
onboard_properties?: {
|
|
@@ -273,6 +305,16 @@ export type Schema = CommonSchemaAttributes & {
|
|
|
273
305
|
properties: {
|
|
274
306
|
[fieldName: string]: SchemaField;
|
|
275
307
|
};
|
|
308
|
+
/**
|
|
309
|
+
* Some schema's represent data that is not stored as a profile object.
|
|
310
|
+
* In this case, this attribute defines what database table we need to use
|
|
311
|
+
* to fetch the corresponding data, and which field is the primary_key of that
|
|
312
|
+
* table (e.g. `id`, `o_id` etc.)
|
|
313
|
+
*/
|
|
314
|
+
database?: {
|
|
315
|
+
table: string;
|
|
316
|
+
primary_key: string;
|
|
317
|
+
};
|
|
276
318
|
/** the client adds this after processing the i18n property */
|
|
277
319
|
groupNames?: Record<string, string>;
|
|
278
320
|
/** added by the client to inform downstream components which locale from schema.i18n was used */
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { CId, CommonFields, PLId, PLLId, PMId, PRCId, PRid, PTId, SId, SLId } from "./raytio";
|
|
2
|
+
export type PriceList = {
|
|
3
|
+
id: PLId;
|
|
4
|
+
price_list_type: string;
|
|
5
|
+
price_list_currency: string;
|
|
6
|
+
price_list_name: string;
|
|
7
|
+
price_list_name_i18n?: string;
|
|
8
|
+
price_list_description?: string;
|
|
9
|
+
price_list_description_i18n?: string;
|
|
10
|
+
pcm_price_list_versions?: [
|
|
11
|
+
{
|
|
12
|
+
id: string;
|
|
13
|
+
price_list_version_name: string;
|
|
14
|
+
pcm_price_list_lines: PriceListLine[];
|
|
15
|
+
}
|
|
16
|
+
];
|
|
17
|
+
};
|
|
18
|
+
export type PriceListLine = {
|
|
19
|
+
id: PLLId;
|
|
20
|
+
pcm_prices: {
|
|
21
|
+
id: PRCId;
|
|
22
|
+
amount: number;
|
|
23
|
+
gpm_items: {
|
|
24
|
+
id: string;
|
|
25
|
+
item_key: string;
|
|
26
|
+
item_name: string;
|
|
27
|
+
primary_uom: string;
|
|
28
|
+
item_name_i18n: string | null;
|
|
29
|
+
item_description: string;
|
|
30
|
+
item_description_i18n: string | null;
|
|
31
|
+
};
|
|
32
|
+
price_currency: string;
|
|
33
|
+
billing_recurrence: string;
|
|
34
|
+
recurring_billing_scheme: string;
|
|
35
|
+
recurring_billing_interval: string | null;
|
|
36
|
+
recurring_billing_usage_type: string;
|
|
37
|
+
recurring_billing_interval_count: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export type Subscription = CommonFields<SId> & {
|
|
41
|
+
subscribed_to_customer_id: string;
|
|
42
|
+
subscribed_to_customer_site_id: string | null;
|
|
43
|
+
subscribed_to_party_contact_point_id: string;
|
|
44
|
+
billing_cycle_month: number | null;
|
|
45
|
+
billing_cycle_day_of_month: number | null;
|
|
46
|
+
billing_cycle_day_of_week: number | null;
|
|
47
|
+
billing_cycle_hour: number | null;
|
|
48
|
+
billing_cycle_minute: number | null;
|
|
49
|
+
billing_cycle_second: number | null;
|
|
50
|
+
subscription_name: string;
|
|
51
|
+
subscription_name_i18n: string | null;
|
|
52
|
+
current_billing_period_start: string;
|
|
53
|
+
current_billing_period_end: string | null;
|
|
54
|
+
cancellation_request_date: string | null;
|
|
55
|
+
cancellation_effective_date: string | null;
|
|
56
|
+
cancellation_request_reason: string | null;
|
|
57
|
+
cancellation_final_invoice_action: string;
|
|
58
|
+
};
|
|
59
|
+
export type SubscriptionLine = CommonFields<SLId> & {
|
|
60
|
+
billing_subscription_id: SId;
|
|
61
|
+
price_id: PRCId;
|
|
62
|
+
subscribed_qty: number;
|
|
63
|
+
metadata: string | null;
|
|
64
|
+
};
|
|
65
|
+
export type PaymentMethod = CommonFields<PMId> & {
|
|
66
|
+
customer_id: CId;
|
|
67
|
+
payer_payment_method_type: string;
|
|
68
|
+
primary_payment_method: boolean;
|
|
69
|
+
payment_processor_id: string;
|
|
70
|
+
payment_method_country_code: string | null;
|
|
71
|
+
payment_method_scheme: string;
|
|
72
|
+
payment_method_available_networks: string[] | string;
|
|
73
|
+
payment_method_preferred_network?: string | null;
|
|
74
|
+
card_expiry_month: number;
|
|
75
|
+
card_expiry_year: number;
|
|
76
|
+
card_funding_method: string;
|
|
77
|
+
card_last_4_digits: string;
|
|
78
|
+
card_fingerprint?: string | null;
|
|
79
|
+
payment_processor_payment_method_id: string;
|
|
80
|
+
address_line1_check?: string | null;
|
|
81
|
+
address_postal_code_check?: string | null;
|
|
82
|
+
cvc_check?: string | null;
|
|
83
|
+
three_d_secure_usage?: string | null;
|
|
84
|
+
};
|
|
85
|
+
export type PaymentProcessor = CommonFields<PTId> & {
|
|
86
|
+
party_id: PRid;
|
|
87
|
+
payment_processor_name: string;
|
|
88
|
+
payment_processor_system: string;
|
|
89
|
+
};
|
package/dist/verification.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NId, ProfileObject, SchemaName } from "./raytio";
|
|
1
|
+
import type { CommonFields, GPMId, Json, NId, ProfileObject, SchemaName } from "./raytio";
|
|
2
2
|
export declare enum SafeHarbourCode {
|
|
3
3
|
/** “a match has been made on each the Full Name, Address and Date of Birth” */
|
|
4
4
|
M1 = "M1",
|
|
@@ -12,7 +12,11 @@ export type VerificationPayload<WithValue extends boolean> = {
|
|
|
12
12
|
schema?: SchemaName;
|
|
13
13
|
metadata?: {
|
|
14
14
|
safeHarbourScore?: SafeHarbourCode;
|
|
15
|
-
status?: "pending";
|
|
15
|
+
status?: "pending" | "approved";
|
|
16
|
+
validation?: {
|
|
17
|
+
id: string;
|
|
18
|
+
url: string;
|
|
19
|
+
};
|
|
16
20
|
pending_details?: {
|
|
17
21
|
/**
|
|
18
22
|
* for pending verifications - whether the verifier will complete fast enough that
|
|
@@ -37,6 +41,7 @@ export type VerificationPayload<WithValue extends boolean> = {
|
|
|
37
41
|
source_hashed_n_id?: NId;
|
|
38
42
|
type?: null;
|
|
39
43
|
v_id: string;
|
|
44
|
+
verification_type_id: GPMId;
|
|
40
45
|
verification_date: string;
|
|
41
46
|
verifier_id?: NId;
|
|
42
47
|
verifier_source_id?: NId;
|
|
@@ -98,6 +103,7 @@ export type VerificationProvider = {
|
|
|
98
103
|
verifierNId?: NId;
|
|
99
104
|
dataSourceNId?: NId;
|
|
100
105
|
serviceProviderNId?: NId;
|
|
106
|
+
verificationTypeId?: GPMId;
|
|
101
107
|
/** the date which the verification was verified on, or last re-verified on */
|
|
102
108
|
date?: Date;
|
|
103
109
|
};
|
|
@@ -123,3 +129,35 @@ export type RealVer = {
|
|
|
123
129
|
/** If the verification has expired, it's the date that it expired on. Otherwise it's `false` */
|
|
124
130
|
expired: Date | false;
|
|
125
131
|
};
|
|
132
|
+
export type VerificationType = CommonFields<GPMId> & {
|
|
133
|
+
item_number: number;
|
|
134
|
+
org_number: number;
|
|
135
|
+
item_key: string;
|
|
136
|
+
item_key_01: string | null;
|
|
137
|
+
item_key_02: string | null;
|
|
138
|
+
item_key_03: string | null;
|
|
139
|
+
item_type: string | null;
|
|
140
|
+
item_name: string;
|
|
141
|
+
item_name_i18n: Json | null;
|
|
142
|
+
item_description: string;
|
|
143
|
+
item_description_i18n: Json | null;
|
|
144
|
+
primary_uom: string;
|
|
145
|
+
secondary_uom: string | null;
|
|
146
|
+
item_mass: number | null;
|
|
147
|
+
item_mass_uom: string | null;
|
|
148
|
+
item_volume: number | null;
|
|
149
|
+
item_volume_uom: string | null;
|
|
150
|
+
item_dimension_length: number | null;
|
|
151
|
+
item_dimension_width: number | null;
|
|
152
|
+
item_dimension_height: number | null;
|
|
153
|
+
item_dimension_uom: string | null;
|
|
154
|
+
purchased: boolean | null;
|
|
155
|
+
shipped: boolean | null;
|
|
156
|
+
stocked: boolean | null;
|
|
157
|
+
transacted: boolean | null;
|
|
158
|
+
asset: boolean | null;
|
|
159
|
+
returnable: boolean | null;
|
|
160
|
+
inventory_organization_number: number | null;
|
|
161
|
+
source_type: string | null;
|
|
162
|
+
source_organization_number: number | null;
|
|
163
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raytio/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"types": "index",
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"docs": "sh ../../scripts/generate-docs.sh",
|
|
15
15
|
"test": "npm run build && yarn docs",
|
|
16
|
-
"build": "tsc &&
|
|
16
|
+
"build": "tsc && rm -rf dist/__tests__"
|
|
17
17
|
}
|
|
18
18
|
}
|
package/src/index.ts
CHANGED
package/src/merchant.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CommonFields, Json, MId, PRid } from "./raytio";
|
|
2
|
+
|
|
3
|
+
export type MerchantTypeCode = "TYPE_1" | "TYPE_2";
|
|
4
|
+
export type MerchantClassCode = "CLASS_1" | "CLASS_2";
|
|
5
|
+
export type MerchantStatusCode = "ACTIVE" | "INACTIVE";
|
|
6
|
+
export type MerchantApprovalStatusCode = "PENDING" | "APPROVED";
|
|
7
|
+
|
|
8
|
+
export type Merchant = CommonFields<MId> & {
|
|
9
|
+
party_id: PRid;
|
|
10
|
+
merchant_name: string | null;
|
|
11
|
+
merchant_name_i18n: Json | null;
|
|
12
|
+
merchant_common_name: string | null;
|
|
13
|
+
merchant_common_name_i18n: Json | null;
|
|
14
|
+
merchant_description: string | null;
|
|
15
|
+
merchant_description_i18n: Json | null;
|
|
16
|
+
merchant_image_url_logo: string | null;
|
|
17
|
+
merchant_image_url_thumbnail: string | null;
|
|
18
|
+
merchant_type_code: MerchantTypeCode | null;
|
|
19
|
+
merchant_class_code: MerchantClassCode | null;
|
|
20
|
+
merchant_status_code: MerchantStatusCode | null;
|
|
21
|
+
merchant_approval_status_code: MerchantApprovalStatusCode | null;
|
|
22
|
+
};
|