@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/dist/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AA, DataTypes,
|
|
1
|
+
import type { AA, CommonFields, DataTypes, Json, SchemaName, Urn } from "./raytio";
|
|
2
2
|
import type { WizardConfig } from "./wizard";
|
|
3
3
|
/** should be renamed since this applies to ConditionallyVerifiable */
|
|
4
4
|
export type ConditionallyRequired = {
|
|
@@ -7,8 +7,15 @@ export type ConditionallyRequired = {
|
|
|
7
7
|
[fieldName: string]: (string | number | boolean)[];
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
export type
|
|
10
|
+
/** Schema-level conditional tags, evaluated at runtime based on form values */
|
|
11
|
+
export type ConditionalTags = {
|
|
12
|
+
tags: string[];
|
|
13
|
+
if: {
|
|
14
|
+
[fieldName: string]: (string | number | boolean)[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
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}` | "display:content-block" | "display:info" | "display:warning" | "display:error" | "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:` | `action:timeout:${number}` | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:capture_geolocation" | "type:extract_required";
|
|
18
|
+
export type SchemaTag = "action:experimental_pass_object_store_id" | "action:verify" | `action:display_qr_code:${string}:${string}` | `action:display_global_idv_app_qr_code:${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" | "support_challenge" | "type:merchant" | "type:service_offer" | "type:marketplace" | "type:client_only" | "type:globally_unique_field" | "type:application_object";
|
|
12
19
|
export type SchemaField = {
|
|
13
20
|
/** @deprecated don't use, it's inconsistent */
|
|
14
21
|
$id?: string;
|
|
@@ -29,9 +36,9 @@ export type SchemaField = {
|
|
|
29
36
|
step?: number;
|
|
30
37
|
/** if true, the user must have encryption enabled to save this data, see #1324 */
|
|
31
38
|
encrypt_require?: boolean;
|
|
32
|
-
/**
|
|
39
|
+
/** for string inputs, the maximum character length. Also used to determine textarea rendering (maxLength > 30 renders a textarea) */
|
|
33
40
|
maxLength?: number;
|
|
34
|
-
/**
|
|
41
|
+
/** for string inputs, the minimum character length. Not currently used anywhere in the client */
|
|
35
42
|
minLength?: number;
|
|
36
43
|
/** the default value */
|
|
37
44
|
default?: unknown;
|
|
@@ -41,6 +48,20 @@ export type SchemaField = {
|
|
|
41
48
|
format?: "date" | "date-time" | "uri";
|
|
42
49
|
contentMediaType?: string;
|
|
43
50
|
contentEncoding?: "base64";
|
|
51
|
+
/**
|
|
52
|
+
* if this field is a foreign key, i.e. it is a primary key
|
|
53
|
+
* of a different schema, then that other's schema name should be listed here.
|
|
54
|
+
* e.g.
|
|
55
|
+
* ```json
|
|
56
|
+
* {
|
|
57
|
+
* "name": "ss_AA",
|
|
58
|
+
* "properties": {
|
|
59
|
+
* "org_id": { "foreign_key_of": "ss_Org" }
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
foreign_key_of?: SchemaName;
|
|
44
65
|
/** `items` is used for nested arrays, (while `properties` is used for nested objects) */
|
|
45
66
|
items?: {
|
|
46
67
|
type: DataTypes;
|
|
@@ -70,15 +91,45 @@ export type SchemaField = {
|
|
|
70
91
|
content?: string;
|
|
71
92
|
/** URL to a JSON file in the `Lookup` format */
|
|
72
93
|
lookup?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Transforms the lookup response into the expected `{ key, value }[]` format.
|
|
96
|
+
* Use when the API returns data in a different structure.
|
|
97
|
+
*
|
|
98
|
+
* Simple format (extract array from path, use values as both key and value):
|
|
99
|
+
* ```json
|
|
100
|
+
* "lookupTransform": "[0].scopes"
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* Object format (specify key/value mapping):
|
|
104
|
+
* ```json
|
|
105
|
+
* "lookupTransform": {
|
|
106
|
+
* "path": "[0].items",
|
|
107
|
+
* "key": "id",
|
|
108
|
+
* "value": "name"
|
|
109
|
+
* }
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
lookupTransform?: string | {
|
|
113
|
+
/** JSON path to extract the array (e.g., "[0].scopes", "data.items") */
|
|
114
|
+
path: string;
|
|
115
|
+
/** Property name to use as the lookup key (if omitted, uses the value itself) */
|
|
116
|
+
key?: string;
|
|
117
|
+
/** Property name to use as the lookup value (if omitted, uses the value itself) */
|
|
118
|
+
value?: string;
|
|
119
|
+
};
|
|
73
120
|
/** @internal the client adds this - it's the fieldName. */
|
|
74
121
|
$prop: string;
|
|
75
122
|
priority?: number;
|
|
76
123
|
/** @internal if supplied, it's the existing field values. Added by the client */
|
|
77
124
|
subObjectRef?: unknown[];
|
|
78
|
-
/**
|
|
125
|
+
/** @deprecated Markdown is now rendered by default for all descriptions. This property is no longer needed. */
|
|
79
126
|
description_decorator?: "md";
|
|
80
127
|
/** if a `pattern` is specified, this is the error message */
|
|
81
128
|
patternMessage?: string;
|
|
129
|
+
/** the input string for a platform_unique_id */
|
|
130
|
+
hash_inputs?: string;
|
|
131
|
+
/** determines where an image is sourced from */
|
|
132
|
+
content_source?: string;
|
|
82
133
|
override?: {
|
|
83
134
|
permissions: {
|
|
84
135
|
/**
|
|
@@ -106,12 +157,24 @@ export type SchemaField = {
|
|
|
106
157
|
};
|
|
107
158
|
/** the only difference between the client & server's definition is that the client adds `$prop` */
|
|
108
159
|
export type ServerSchemaField = Omit<SchemaField, "$prop">;
|
|
160
|
+
/** An i18n entry from the fnd_i18n_entries API endpoint */
|
|
161
|
+
export type FndI18nEntry = CommonFields<never> & {
|
|
162
|
+
i18n_key: string;
|
|
163
|
+
category: string;
|
|
164
|
+
translations: {
|
|
165
|
+
[locale: string]: {
|
|
166
|
+
title: string;
|
|
167
|
+
description?: string;
|
|
168
|
+
title_plural?: string;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
109
172
|
/** not exported. Attributes that are identical in both client schema & server schema */
|
|
110
173
|
export type CommonSchemaAttributes = {
|
|
111
174
|
/** these fields will always exist on schema */
|
|
112
175
|
title: string;
|
|
113
176
|
description: string;
|
|
114
|
-
/**
|
|
177
|
+
/** @deprecated Markdown is now rendered by default for all descriptions. This property is no longer needed. */
|
|
115
178
|
description_decorator?: "md";
|
|
116
179
|
schema_type?: SchemaType;
|
|
117
180
|
/** plural version of the title */
|
|
@@ -119,9 +182,17 @@ export type CommonSchemaAttributes = {
|
|
|
119
182
|
/**
|
|
120
183
|
* the group that a schema belongs to, such as "passports". This is useful for
|
|
121
184
|
* forms that accept different types of similar documents.
|
|
185
|
+
* Can be a single group (string) or multiple groups (string[]) to allow a schema
|
|
186
|
+
* to appear in multiple lists.
|
|
122
187
|
*/
|
|
123
|
-
schema_group?: string;
|
|
188
|
+
schema_group?: string | string[];
|
|
189
|
+
/** Additional search terms to help users find schemas (e.g., ["license", "passport", "drivers license"]) */
|
|
190
|
+
search_terms?: string[];
|
|
124
191
|
tags?: SchemaTag[];
|
|
192
|
+
/** if specified, suggests this onboarding scenario after creating a PO of this schema type */
|
|
193
|
+
suggest_post_create?: SchemaName;
|
|
194
|
+
/** Array of 2-character country codes that this schema is available for */
|
|
195
|
+
schema_country_codes?: string[];
|
|
125
196
|
i18n?: {
|
|
126
197
|
[locale: string]: {
|
|
127
198
|
$schema: {
|
|
@@ -212,38 +283,134 @@ export type CommonSchemaAttributes = {
|
|
|
212
283
|
fields: string[];
|
|
213
284
|
label: string;
|
|
214
285
|
}[];
|
|
286
|
+
/**
|
|
287
|
+
* By default, the admin dashboard shows columns for all fields
|
|
288
|
+
* in listed in `head_main`. In rare cases you can use this property
|
|
289
|
+
* to specify a different set of fields to show to admins by default.
|
|
290
|
+
*/
|
|
291
|
+
tabular?: {
|
|
292
|
+
fields: string[];
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* determines if profile pages should display using compacted 'MiniPO'
|
|
296
|
+
* view or deafult view
|
|
297
|
+
*/
|
|
298
|
+
compact_table?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* Pre-defined filter presets provided by the schema author.
|
|
301
|
+
* These appear as "Default filters" in the admin table UI and
|
|
302
|
+
* cannot be deleted by users (unlike user-saved filters).
|
|
303
|
+
*
|
|
304
|
+
* Each token's `propertyKey` must match a key in `properties`.
|
|
305
|
+
* Valid operators: `=`, `!=`, `:`, `!:`, `>`, `<`, `>=`, `<=`
|
|
306
|
+
*/
|
|
307
|
+
filters?: {
|
|
308
|
+
/** Display name for the filter preset */
|
|
309
|
+
name: string;
|
|
310
|
+
/** How tokens are combined: "and" = all must match, "or" = any must match */
|
|
311
|
+
operation: "and" | "or";
|
|
312
|
+
/** Filter conditions */
|
|
313
|
+
tokens: {
|
|
314
|
+
/** Must match a key in schema `properties` */
|
|
315
|
+
propertyKey: string;
|
|
316
|
+
/** Comparison operator */
|
|
317
|
+
operator: string;
|
|
318
|
+
/** Value to compare against */
|
|
319
|
+
value: string;
|
|
320
|
+
}[];
|
|
321
|
+
}[];
|
|
322
|
+
/** Kanban board configuration for admin dashboard */
|
|
323
|
+
kanban?: {
|
|
324
|
+
/** Field that determines which column a card belongs to */
|
|
325
|
+
column_field?: string;
|
|
326
|
+
/** Field displayed as the card title */
|
|
327
|
+
title_field?: string;
|
|
328
|
+
/** Additional fields displayed on each card */
|
|
329
|
+
card_fields?: string[];
|
|
330
|
+
};
|
|
215
331
|
};
|
|
216
332
|
/** only the schema used for the onboarding wizard have this property */
|
|
217
333
|
onboard_properties?: {
|
|
218
|
-
/** Profile Objects that should be created */
|
|
219
|
-
profile_objects?: {
|
|
220
|
-
schema_name: SchemaName;
|
|
221
|
-
properties: Record<string, unknown>;
|
|
222
|
-
}[];
|
|
223
|
-
/** Relationships that should be created */
|
|
224
|
-
relationships?: {
|
|
225
|
-
/** will normally look like `"{n_id:profile_objects[0]}"` */
|
|
226
|
-
from: string;
|
|
227
|
-
to: string;
|
|
228
|
-
type: string;
|
|
229
|
-
properties?: Record<string, string>;
|
|
230
|
-
}[];
|
|
231
334
|
/**
|
|
232
|
-
*
|
|
233
|
-
*
|
|
335
|
+
* High-level actions for complex workflows.
|
|
336
|
+
* create_organization: Single object for creating one organization
|
|
337
|
+
* create_access_application_link: Array for creating multiple links
|
|
234
338
|
*/
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
|
|
339
|
+
actions?: {
|
|
340
|
+
/** Creates a single organization. Use this instead of legacy 'organizations' array. */
|
|
341
|
+
create_organization?: Array<{
|
|
342
|
+
properties: Json;
|
|
343
|
+
store_as?: string;
|
|
344
|
+
}>;
|
|
345
|
+
/** Creates access application links (can be multiple) */
|
|
346
|
+
create_access_application_link?: Array<{
|
|
347
|
+
properties: Record<string, unknown>;
|
|
348
|
+
store_as?: string;
|
|
349
|
+
}>;
|
|
350
|
+
/** Other actions can be defined as needed */
|
|
351
|
+
[key: string]: any;
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* Execution order for entity creation. If not specified, uses default order.
|
|
355
|
+
* Examples: ["actions.create_organization", "db.v1.xrm_merchants", "db.v1.dsm_nodes"]
|
|
356
|
+
*/
|
|
357
|
+
execution_order?: string[];
|
|
358
|
+
/**
|
|
359
|
+
* Generic API endpoints organized by namespace and version.
|
|
360
|
+
*
|
|
361
|
+
* Structure: `{namespace}.{version}.{endpoint_name}` → `POST /{namespace}/{version}/{endpoint_name}`
|
|
362
|
+
*
|
|
363
|
+
* Examples:
|
|
364
|
+
* - `db.v1.xrm_merchants` → `POST /db/v1/xrm_merchants`
|
|
365
|
+
* - `db.v2.something` → `POST /db/v2/something`
|
|
366
|
+
* - `persist.v2.endpoint` → `POST /persist/v2/endpoint`
|
|
367
|
+
*
|
|
368
|
+
* Any namespace can be used. The `db` namespace is shown below as the primary example.
|
|
369
|
+
*/
|
|
370
|
+
db?: {
|
|
371
|
+
v1?: {
|
|
372
|
+
/** Profile objects - POST /db/v1/dsm_nodes */
|
|
373
|
+
dsm_nodes?: Array<{
|
|
374
|
+
labels?: string[];
|
|
375
|
+
properties: Record<string, unknown>;
|
|
376
|
+
schema_name?: SchemaName;
|
|
377
|
+
}>;
|
|
378
|
+
/** Merchants - POST /db/v1/xrm_merchants */
|
|
379
|
+
xrm_merchants?: Array<Record<string, unknown>>;
|
|
380
|
+
/** Access Applications - POST /db/v1/dsm_access_applications */
|
|
381
|
+
dsm_access_applications?: Array<Omit<AA, "org_id" | "a_id"> & {
|
|
382
|
+
org_id?: string;
|
|
383
|
+
links?: {
|
|
384
|
+
description: string;
|
|
385
|
+
wizardConfig: Omit<WizardConfig, "a_id">;
|
|
386
|
+
}[];
|
|
387
|
+
}>;
|
|
388
|
+
/** Relationships - POST /db/v1/dsm_node_relationships */
|
|
389
|
+
dsm_node_relationships?: Array<{
|
|
390
|
+
from: string;
|
|
391
|
+
to: string;
|
|
392
|
+
type: string;
|
|
393
|
+
properties?: Record<string, unknown>;
|
|
394
|
+
}>;
|
|
395
|
+
/** Extensible for any other endpoint */
|
|
396
|
+
[endpoint: string]: Array<Record<string, unknown>> | undefined;
|
|
397
|
+
};
|
|
398
|
+
v2?: {
|
|
399
|
+
[endpoint: string]: Array<Record<string, unknown>> | undefined;
|
|
400
|
+
};
|
|
401
|
+
[version: string]: {
|
|
402
|
+
[endpoint: string]: Array<Record<string, unknown>> | undefined;
|
|
403
|
+
} | undefined;
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* Additional namespaces can be added following the same structure as `db`.
|
|
407
|
+
* Example: persist?: { v2?: { [endpoint: string]: Array<Record<string, unknown>> } }
|
|
408
|
+
*/
|
|
409
|
+
[namespace: string]: {
|
|
410
|
+
[version: string]: {
|
|
411
|
+
[endpoint: string]: Array<Record<string, unknown>> | undefined;
|
|
412
|
+
} | undefined;
|
|
413
|
+
} | object | string[] | string | undefined;
|
|
247
414
|
/** The relative path in the client to redirect to once finished. May include variables */
|
|
248
415
|
return_to?: string;
|
|
249
416
|
};
|
|
@@ -257,6 +424,11 @@ export type Schema = CommonSchemaAttributes & {
|
|
|
257
424
|
name: SchemaName;
|
|
258
425
|
/** added by client */
|
|
259
426
|
type?: DataTypes;
|
|
427
|
+
/**
|
|
428
|
+
* Schema-level conditional tags, pre-processed for runtime evaluation.
|
|
429
|
+
* When form values match the `if` condition, the tags are added to the schema.
|
|
430
|
+
*/
|
|
431
|
+
conditionalTags?: ConditionalTags[];
|
|
260
432
|
/** the localized title of the `schema_group`. added by the client */
|
|
261
433
|
group_title?: string;
|
|
262
434
|
/** originally `string[]`, the client modifies this */
|
|
@@ -273,8 +445,49 @@ export type Schema = CommonSchemaAttributes & {
|
|
|
273
445
|
properties: {
|
|
274
446
|
[fieldName: string]: SchemaField;
|
|
275
447
|
};
|
|
448
|
+
/**
|
|
449
|
+
* Some schema's represent data that is not stored as a profile object.
|
|
450
|
+
* In this case, this attribute defines what database table we need to use
|
|
451
|
+
* to fetch the corresponding data, and which field is the primary_key of that
|
|
452
|
+
* table (e.g. `id`, `o_id` etc.)
|
|
453
|
+
*
|
|
454
|
+
* The `path` property specifies the complete API path to use. If not provided,
|
|
455
|
+
* defaults to `/db/v1/{table}`. When `path` is specified, it is used directly
|
|
456
|
+
* without appending the table name.
|
|
457
|
+
* Examples:
|
|
458
|
+
* - `path: "/db/v1/rpc/my_function"` for RPC endpoints
|
|
459
|
+
* - `path: "/api/v2/custom_endpoint"` for custom API paths
|
|
460
|
+
*
|
|
461
|
+
* The optional `select` parameter supports PostgREST select syntax for nested
|
|
462
|
+
* objects/arrays. For example:
|
|
463
|
+
* `select: "id,item_id,gpm_items(id,item_key)"`
|
|
464
|
+
* This will return nested objects in the response.
|
|
465
|
+
*/
|
|
466
|
+
database?: {
|
|
467
|
+
/** Table name (required when path is not specified to construct `/db/v1/{table}`) */
|
|
468
|
+
table?: string;
|
|
469
|
+
primary_key: string;
|
|
470
|
+
/** Complete API path. If specified, used directly instead of `/db/v1/{table}` */
|
|
471
|
+
path?: string;
|
|
472
|
+
select?: string;
|
|
473
|
+
/** Schema to redirect to after creating a record (for insert schemas) */
|
|
474
|
+
return_to?: SchemaName;
|
|
475
|
+
/** HTTP method override. If specified, uses this instead of the default (POST for create, PATCH for edit, DELETE for delete) */
|
|
476
|
+
method?: "POST" | "PATCH" | "DELETE";
|
|
477
|
+
/**
|
|
478
|
+
* PostgREST query parameters to include in requests.
|
|
479
|
+
* Supports variable substitution: {$context.organizationId}, {$context.userId}, {$context.tenantId}
|
|
480
|
+
* Example: "org_id=eq.{$context.organizationId}&active=eq.true"
|
|
481
|
+
* If this contains "select=", it takes precedence over the `select` property.
|
|
482
|
+
*/
|
|
483
|
+
query_parameters?: string;
|
|
484
|
+
};
|
|
276
485
|
/** the client adds this after processing the i18n property */
|
|
277
486
|
groupNames?: Record<string, string>;
|
|
487
|
+
/** specifies the order in which groups should be displayed */
|
|
488
|
+
groups?: {
|
|
489
|
+
order?: string[];
|
|
490
|
+
};
|
|
278
491
|
/** added by the client to inform downstream components which locale from schema.i18n was used */
|
|
279
492
|
clientLocale?: string;
|
|
280
493
|
/** added by the client, copied from {@link WrappedSchema} */
|
|
@@ -290,7 +503,7 @@ export type Schema = CommonSchemaAttributes & {
|
|
|
290
503
|
isSpSchema?: boolean;
|
|
291
504
|
};
|
|
292
505
|
/** Type Classification of a Schema returned by API */
|
|
293
|
-
export type SchemaType = "ss" | "ps" | "us";
|
|
506
|
+
export type SchemaType = "ss" | "ps" | "us" | "ms";
|
|
294
507
|
/** This is what's returned by the API */
|
|
295
508
|
export type WrappedSchema = {
|
|
296
509
|
active: true;
|
|
@@ -304,6 +517,8 @@ export type WrappedSchema = {
|
|
|
304
517
|
schema_version: string;
|
|
305
518
|
/** whether the \`version\` is the latest version */
|
|
306
519
|
version_current: boolean;
|
|
520
|
+
/** Country codes that this schema is available for */
|
|
521
|
+
schema_country_codes?: string[];
|
|
307
522
|
schema: CommonSchemaAttributes & {
|
|
308
523
|
/** @deprecated don't use this */
|
|
309
524
|
$id?: string;
|
|
@@ -0,0 +1,90 @@
|
|
|
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_timezone_offset_minutes: number | null;
|
|
51
|
+
subscription_name: string;
|
|
52
|
+
subscription_name_i18n: string | null;
|
|
53
|
+
current_billing_period_start: string;
|
|
54
|
+
current_billing_period_end: string | null;
|
|
55
|
+
cancellation_request_date: string | null;
|
|
56
|
+
cancellation_effective_date: string | null;
|
|
57
|
+
cancellation_request_reason: string | null;
|
|
58
|
+
cancellation_final_invoice_action: string;
|
|
59
|
+
};
|
|
60
|
+
export type SubscriptionLine = CommonFields<SLId> & {
|
|
61
|
+
billing_subscription_id: SId;
|
|
62
|
+
price_id: PRCId;
|
|
63
|
+
subscribed_qty: number;
|
|
64
|
+
metadata: string | null;
|
|
65
|
+
};
|
|
66
|
+
export type PaymentMethod = CommonFields<PMId> & {
|
|
67
|
+
customer_id: CId;
|
|
68
|
+
payer_payment_method_type: string;
|
|
69
|
+
primary_payment_method: boolean;
|
|
70
|
+
payment_processor_id: string;
|
|
71
|
+
payment_method_country_code: string | null;
|
|
72
|
+
payment_method_scheme: string;
|
|
73
|
+
payment_method_available_networks: string[] | string;
|
|
74
|
+
payment_method_preferred_network?: string | null;
|
|
75
|
+
card_expiry_month: number;
|
|
76
|
+
card_expiry_year: number;
|
|
77
|
+
card_funding_method: string;
|
|
78
|
+
card_last_4_digits: string;
|
|
79
|
+
card_fingerprint?: string | null;
|
|
80
|
+
payment_processor_payment_method_id: string;
|
|
81
|
+
address_line1_check?: string | null;
|
|
82
|
+
address_postal_code_check?: string | null;
|
|
83
|
+
cvc_check?: string | null;
|
|
84
|
+
three_d_secure_usage?: string | null;
|
|
85
|
+
};
|
|
86
|
+
export type PaymentProcessor = CommonFields<PTId> & {
|
|
87
|
+
party_id: PRid;
|
|
88
|
+
payment_processor_name: string;
|
|
89
|
+
payment_processor_system: string;
|
|
90
|
+
};
|
package/dist/tenant.d.ts
ADDED
package/dist/tenant.js
ADDED
package/dist/theme.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export type Colors = {
|
|
|
22
22
|
feelingHugged: string;
|
|
23
23
|
silverShell: string;
|
|
24
24
|
blank: string;
|
|
25
|
+
altColoursBgLight: string;
|
|
26
|
+
altColoursBgMedium: string;
|
|
27
|
+
elevatedSurface: string;
|
|
28
|
+
fillNeutral: string;
|
|
25
29
|
};
|
|
26
30
|
export type CustomFonts = {
|
|
27
31
|
header?: string;
|
package/dist/verification.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NId, ProfileObject, SchemaName } from "./raytio";
|
|
1
|
+
import type { CommonFields, GPMId, Json, MId, 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
|
|
@@ -35,12 +39,14 @@ export type VerificationPayload<WithValue extends boolean> = {
|
|
|
35
39
|
source_n_id?: NId;
|
|
36
40
|
/** like `source_n_id` */
|
|
37
41
|
source_hashed_n_id?: NId;
|
|
42
|
+
hashed_source_n_id?: NId;
|
|
38
43
|
type?: null;
|
|
39
44
|
v_id: string;
|
|
45
|
+
verification_type_id: GPMId;
|
|
40
46
|
verification_date: string;
|
|
41
|
-
verifier_id?:
|
|
42
|
-
verifier_source_id?:
|
|
43
|
-
verifier_service_id?:
|
|
47
|
+
verifier_id?: MId;
|
|
48
|
+
verifier_source_id?: MId;
|
|
49
|
+
verifier_service_id?: MId;
|
|
44
50
|
verifier_div: string;
|
|
45
51
|
} & (WithValue extends true ? {
|
|
46
52
|
value: string | number;
|
|
@@ -93,11 +99,12 @@ export declare enum POVerification {
|
|
|
93
99
|
Expired = 70006,
|
|
94
100
|
Loading = 70007
|
|
95
101
|
}
|
|
96
|
-
/** These
|
|
102
|
+
/** These IDs point to merchants (formerly service provider profile objects) */
|
|
97
103
|
export type VerificationProvider = {
|
|
98
|
-
verifierNId?:
|
|
99
|
-
dataSourceNId?:
|
|
100
|
-
serviceProviderNId?:
|
|
104
|
+
verifierNId?: MId;
|
|
105
|
+
dataSourceNId?: MId;
|
|
106
|
+
serviceProviderNId?: MId;
|
|
107
|
+
verificationTypeId?: GPMId;
|
|
101
108
|
/** the date which the verification was verified on, or last re-verified on */
|
|
102
109
|
date?: Date;
|
|
103
110
|
};
|
|
@@ -123,3 +130,35 @@ export type RealVer = {
|
|
|
123
130
|
/** If the verification has expired, it's the date that it expired on. Otherwise it's `false` */
|
|
124
131
|
expired: Date | false;
|
|
125
132
|
};
|
|
133
|
+
export type VerificationType = CommonFields<GPMId> & {
|
|
134
|
+
item_number: number;
|
|
135
|
+
org_number: number;
|
|
136
|
+
item_key: string;
|
|
137
|
+
item_key_01: string | null;
|
|
138
|
+
item_key_02: string | null;
|
|
139
|
+
item_key_03: string | null;
|
|
140
|
+
item_type: string | null;
|
|
141
|
+
item_name: string;
|
|
142
|
+
item_name_i18n: Json | null;
|
|
143
|
+
item_description: string;
|
|
144
|
+
item_description_i18n: Json | null;
|
|
145
|
+
primary_uom: string;
|
|
146
|
+
secondary_uom: string | null;
|
|
147
|
+
item_mass: number | null;
|
|
148
|
+
item_mass_uom: string | null;
|
|
149
|
+
item_volume: number | null;
|
|
150
|
+
item_volume_uom: string | null;
|
|
151
|
+
item_dimension_length: number | null;
|
|
152
|
+
item_dimension_width: number | null;
|
|
153
|
+
item_dimension_height: number | null;
|
|
154
|
+
item_dimension_uom: string | null;
|
|
155
|
+
purchased: boolean | null;
|
|
156
|
+
shipped: boolean | null;
|
|
157
|
+
stocked: boolean | null;
|
|
158
|
+
transacted: boolean | null;
|
|
159
|
+
asset: boolean | null;
|
|
160
|
+
returnable: boolean | null;
|
|
161
|
+
inventory_organization_number: number | null;
|
|
162
|
+
source_type: string | null;
|
|
163
|
+
source_organization_number: number | null;
|
|
164
|
+
};
|
package/dist/wizard.d.ts
CHANGED
|
@@ -6,19 +6,48 @@ export type WizardPage = {
|
|
|
6
6
|
name?: string | symbol;
|
|
7
7
|
filter: "oneOf" | "anyOf";
|
|
8
8
|
schemas: SchemaName[];
|
|
9
|
+
/**
|
|
10
|
+
* Page type: 'form' for data collection, 'message' for info/error display
|
|
11
|
+
* @default "form"
|
|
12
|
+
*/
|
|
13
|
+
page_type?: "form" | "message";
|
|
14
|
+
/**
|
|
15
|
+
* Content to display on message pages. Supports markdown if page_content_decorator is "md"
|
|
16
|
+
*/
|
|
17
|
+
page_content?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Set to "md" to render page_content as markdown
|
|
20
|
+
*/
|
|
21
|
+
page_content_decorator?: "md";
|
|
22
|
+
/**
|
|
23
|
+
* If true, user cannot proceed past this page (error/blocking behavior)
|
|
24
|
+
* If false, user can continue to next page (informational)
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
is_terminal?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Label for the exit button on terminal pages
|
|
30
|
+
* @default "Home"
|
|
31
|
+
*/
|
|
32
|
+
terminal_button_label?: string;
|
|
33
|
+
/**
|
|
34
|
+
* URL to redirect to when exit button is clicked on terminal pages
|
|
35
|
+
* @default "/" or return_to from WizardConfig
|
|
36
|
+
*/
|
|
37
|
+
terminal_button_url?: string;
|
|
9
38
|
/** the fallback description, if there isn't one for the specific situation */
|
|
10
39
|
description?: string;
|
|
11
40
|
description_select?: string;
|
|
12
41
|
description_create?: string;
|
|
13
42
|
description_update?: string;
|
|
14
|
-
/**
|
|
43
|
+
/** @deprecated - AO/PO classification is now done per-object using schema tags (type:application_object) instead of page-level profile property */
|
|
15
44
|
profile?: boolean;
|
|
16
45
|
/** if true this page can be skipped. The PageResult wil be undefined */
|
|
17
46
|
optional?: boolean;
|
|
18
47
|
/** if true mulitple POs can be shared */
|
|
19
48
|
multiple?: boolean;
|
|
20
49
|
/** see #463 */
|
|
21
|
-
|
|
50
|
+
merchant_link?: boolean;
|
|
22
51
|
/** custom text to display on the Create New button */
|
|
23
52
|
create_new_text?: string;
|
|
24
53
|
/** a URL to a preset for configuing NestedSchemaSelect. {@link DeepConfig} */
|
|
@@ -100,6 +129,12 @@ export type WizardConfig = {
|
|
|
100
129
|
* process will be used
|
|
101
130
|
*/
|
|
102
131
|
quick_onboard?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* If true, users must explicitly accept privacy terms during quick onboard.
|
|
134
|
+
* If false, the form auto-submits without user intervention.
|
|
135
|
+
* @default true
|
|
136
|
+
*/
|
|
137
|
+
quick_onboard_require_consent?: boolean;
|
|
103
138
|
/** the loading message to show next to the spinner after the review screen */
|
|
104
139
|
sharing_data_message?: string;
|
|
105
140
|
/** If this value is true, the form will display some data sharing information before the form (WizardPreview) */
|