@raytio/types 8.3.0 → 8.3.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 +3 -2
- package/dist/schema.d.ts +53 -1
- package/package.json +1 -1
- package/src/schema.ts +52 -0
package/README.md
CHANGED
|
@@ -346,7 +346,7 @@ not exported. Attributes that are identical in both client schema & server schem
|
|
|
346
346
|
| :------ | :------ | :------ |
|
|
347
347
|
| `description` | `string` | - |
|
|
348
348
|
| `description_decorator?` | ``"md"`` | **`Deprecated`** Markdown is now rendered by default for all descriptions. This property is no longer needed. |
|
|
349
|
-
| `display?` | { `compact_table?`: `boolean` ; `expand?`: { `fields`: `string`[] ; `label`: `string` }[] ; `filters?`: { `name`: `string` ; `operation`: ``"and"`` \| ``"or"`` ; `tokens`: { `operator`: `string` ; `propertyKey`: `string` ; `value`: `string` }[] }[] ; `head_main?`: { `fields`: `string`[] ; `format?`: `string` } ; `head_sub?`: { `fields`: `string`[] ; `format?`: `string` } ; `kanban?`: { `card_fields?`: `string`[] ; `column_field?`: `string` ; `title_field?`: `string` } ; `tabular?`: { `fields`: `string`[] } } | - |
|
|
349
|
+
| `display?` | { `compact_table?`: `boolean` ; `expand?`: { `fields`: `string`[] ; `label`: `string` }[] ; `filters?`: { `name`: `string` ; `operation`: ``"and"`` \| ``"or"`` ; `tokens`: { `operator`: `string` ; `propertyKey`: `string` ; `value`: `string` }[] }[] ; `head_main?`: { `fields`: `string`[] ; `format?`: `string` } ; `head_sub?`: { `fields`: `string`[] ; `format?`: `string` } ; `kanban?`: { `card_fields?`: `string`[] ; `column_field?`: `string` ; `title_field?`: `string` } ; `tabular?`: { `fields`: `string`[] } ; `views?`: { `columnPrefs?`: { `id`: `string` ; `visible`: `boolean` }[] ; `contentDensity?`: ``"comfortable"`` \| ``"compact"`` ; `filter?`: { `operation`: ``"and"`` \| ``"or"`` ; `tokens`: { `operator`: `string` ; `propertyKey`: `string` ; `value`: `string` }[] } ; `name`: `string` ; `pageSize?`: `number` ; `sorting?`: { `isDescending`: `boolean` ; `sortingColumn`: `string` } \| ``null`` ; `stickyColumns?`: { `first`: `number` ; `last`: `number` } ; `stripedRows?`: `boolean` ; `wrapLines?`: `boolean` }[] } | - |
|
|
350
350
|
| `display.compact_table?` | `boolean` | determines if profile pages should display using compacted 'MiniPO' view or deafult view |
|
|
351
351
|
| `display.expand?` | { `fields`: `string`[] ; `label`: `string` }[] | list of fields that should not be shown by default, unless you expand a collpase section which has a name from the label property. Array because there could be multiple expand groups |
|
|
352
352
|
| `display.filters?` | { `name`: `string` ; `operation`: ``"and"`` \| ``"or"`` ; `tokens`: { `operator`: `string` ; `propertyKey`: `string` ; `value`: `string` }[] }[] | Pre-defined filter presets provided by the schema author. These appear as "Default filters" in the admin table UI and cannot be deleted by users (unlike user-saved filters). Each token's `propertyKey` must match a key in `properties`. Valid operators: `=`, `!=`, `:`, `!:`, `>`, `<`, `>=`, `<=` |
|
|
@@ -362,6 +362,7 @@ not exported. Attributes that are identical in both client schema & server schem
|
|
|
362
362
|
| `display.kanban.title_field?` | `string` | Field displayed as the card title |
|
|
363
363
|
| `display.tabular?` | { `fields`: `string`[] } | By default, the admin dashboard shows columns for all fields in listed in `head_main`. In rare cases you can use this property to specify a different set of fields to show to admins by default. |
|
|
364
364
|
| `display.tabular.fields` | `string`[] | - |
|
|
365
|
+
| `display.views?` | { `columnPrefs?`: { `id`: `string` ; `visible`: `boolean` }[] ; `contentDensity?`: ``"comfortable"`` \| ``"compact"`` ; `filter?`: { `operation`: ``"and"`` \| ``"or"`` ; `tokens`: { `operator`: `string` ; `propertyKey`: `string` ; `value`: `string` }[] } ; `name`: `string` ; `pageSize?`: `number` ; `sorting?`: { `isDescending`: `boolean` ; `sortingColumn`: `string` } \| ``null`` ; `stickyColumns?`: { `first`: `number` ; `last`: `number` } ; `stripedRows?`: `boolean` ; `wrapLines?`: `boolean` }[] | Pre-defined view presets provided by the schema author. A view bundles filter, sorting, column visibility/order, and display settings (page size, density, etc.) into a named configuration. These appear as "Default views" in the admin table UI and cannot be deleted by users (unlike user-saved views). Every field except `name` is optional. When applied, fields the view does not specify leave the user's current preference untouched. This lets a schema author define partial views (e.g. just sorting + columns). |
|
|
365
366
|
| `i18n?` | { `[locale: string]`: { `[fieldNameOrGroupName: string]`: [`ServerSchemaField`](#serverschemafield) & { `title_plural?`: `string` }; `$loading_create_sub_obj`: { `title`: `string` } ; `$loading_delete_pending_ver`: { `title`: `string` } ; `$loading_extract`: { `title`: `string` } ; `$loading_link_to_person`: { `title`: `string` } ; `$loading_long_verification_message`: { `description?`: `string` ; `title?`: `string` } ; `$loading_pending_ver_resubmit`: { `title`: `string` } ; `$loading_permission`: { `title`: `string` } ; `$loading_save`: { `title`: `string` } ; `$loading_update`: { `title`: `string` } ; `$loading_upload`: { `title`: `string` } ; `$loading_verify`: { `title`: `string` } ; `$schema`: { `description?`: `string` ; `title`: `string` ; `title_plural?`: `string` } }; } | - |
|
|
366
367
|
| `onboard_properties?` | { `[namespace: string]`: { `[version: string]`: { `[endpoint: string]`: `Record`<`string`, `unknown`\>[] \| `undefined`; } \| `undefined`; } \| `object` \| `string`[] \| `string` \| `undefined`; `actions?`: { `[key: string]`: `any`; `create_access_application_link?`: { `properties`: `Record`<`string`, `unknown`\> ; `store_as?`: `string` }[] ; `create_organization?`: { `properties`: `Json` ; `store_as?`: `string` }[] } ; `db?`: { `[version: string]`: { `[endpoint: string]`: `Record`<`string`, `unknown`\>[] \| `undefined`; } \| `undefined`; `v1?`: { `[endpoint: string]`: `Record`<`string`, `unknown`\>[] \| `undefined`; `dsm_access_applications?`: `Omit`<[`AA`](#aa), ``"org_id"`` \| ``"a_id"``\> & { `links?`: { `description`: `string` ; `wizardConfig`: `Omit`<[`WizardConfig`](#wizardconfig), ``"a_id"``\> }[] ; `org_id?`: `string` }[] ; `dsm_node_relationships?`: { `from`: `string` ; `properties?`: `Record`<`string`, `unknown`\> ; `to`: `string` ; `type`: `string` }[] ; `dsm_nodes?`: { `labels?`: `string`[] ; `properties`: `Record`<`string`, `unknown`\> ; `schema_name?`: [`SchemaName`](#schemaname) }[] ; `xrm_merchants?`: `Record`<`string`, `unknown`\>[] } ; `v2?`: { `[endpoint: string]`: `Record`<`string`, `unknown`\>[] \| `undefined`; } } ; `execution_order?`: `string`[] ; `return_to?`: `string` } | only the schema used for the onboarding wizard have this property |
|
|
367
368
|
| `onboard_properties.actions?` | { `[key: string]`: `any`; `create_access_application_link?`: { `properties`: `Record`<`string`, `unknown`\> ; `store_as?`: `string` }[] ; `create_organization?`: { `properties`: `Json` ; `store_as?`: `string` }[] } | High-level actions for complex workflows. create_organization: Single object for creating one organization create_access_application_link: Array for creating multiple links |
|
|
@@ -1056,7 +1057,7 @@ ___
|
|
|
1056
1057
|
|
|
1057
1058
|
### SchemaFieldTag
|
|
1058
1059
|
|
|
1059
|
-
Ƭ **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:markdown"`` \| ``"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}\` \| \`action:server-search:${string}\` \| ``"verify:show_if_pending"`` \| ``"special:hide_select_behind_button"`` \| ``"type:capture_geolocation"`` \| ``"type:extract_required"``
|
|
1060
|
+
Ƭ **SchemaFieldTag**: ``"password"`` \| \`group:${string}\` \| \`upload-group:${string}\` \| ``"display:stars"`` \| ``"display:no_autofill"`` \| ``"display:currency"`` \| \`display:currency:${string}\` \| ``"display:checkbox"`` \| ``"display:radio"`` \| ``"display:cascade"`` \| ``"display:survey"`` \| ``"display:quoting"`` \| ``"display:customModal"`` \| ``"display:mask"`` \| \`display:replace:('${string}', '${string}')\` \| ``"display:terms_conditions"`` \| \`display:main\_media:${string}\` \| ``"display:markdown"`` \| ``"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}\` \| \`action:server-search:${string}\` \| ``"verify:show_if_pending"`` \| ``"special:hide_select_behind_button"`` \| ``"type:capture_geolocation"`` \| ``"type:extract_required"``
|
|
1060
1061
|
|
|
1061
1062
|
___
|
|
1062
1063
|
|
package/dist/schema.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type ConditionalTags = {
|
|
|
14
14
|
[fieldName: string]: (string | number | boolean)[];
|
|
15
15
|
};
|
|
16
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:markdown" | "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}` | `action:server-search:${string}` | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:capture_geolocation" | "type:extract_required";
|
|
17
|
+
export type SchemaFieldTag = "password" | `group:${string}` | `upload-group:${string}` | "display:stars" | "display:no_autofill" | "display:currency" | `display:currency:${string}` | "display:checkbox" | "display:radio" | "display:cascade" | "display:survey" | "display:quoting" | "display:customModal" | "display:mask" | `display:replace:('${string}', '${string}')` | "display:terms_conditions" | `display:main_media:${string}` | "display:markdown" | "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}` | `action:server-search:${string}` | "verify:show_if_pending" | "special:hide_select_behind_button" | "type:capture_geolocation" | "type:extract_required";
|
|
18
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";
|
|
19
19
|
export type SchemaField = {
|
|
20
20
|
/** @deprecated don't use, it's inconsistent */
|
|
@@ -319,6 +319,58 @@ export type CommonSchemaAttributes = {
|
|
|
319
319
|
value: string;
|
|
320
320
|
}[];
|
|
321
321
|
}[];
|
|
322
|
+
/**
|
|
323
|
+
* Pre-defined view presets provided by the schema author.
|
|
324
|
+
* A view bundles filter, sorting, column visibility/order, and display
|
|
325
|
+
* settings (page size, density, etc.) into a named configuration.
|
|
326
|
+
* These appear as "Default views" in the admin table UI and cannot be
|
|
327
|
+
* deleted by users (unlike user-saved views).
|
|
328
|
+
*
|
|
329
|
+
* Every field except `name` is optional. When applied, fields the view
|
|
330
|
+
* does not specify leave the user's current preference untouched. This
|
|
331
|
+
* lets a schema author define partial views (e.g. just sorting + columns).
|
|
332
|
+
*/
|
|
333
|
+
views?: {
|
|
334
|
+
/** Display name for the view preset */
|
|
335
|
+
name: string;
|
|
336
|
+
/** Filter to apply (PropertyFilter tokens + operation) */
|
|
337
|
+
filter?: {
|
|
338
|
+
/** How tokens are combined: "and" = all must match, "or" = any must match */
|
|
339
|
+
operation: "and" | "or";
|
|
340
|
+
/** Filter conditions */
|
|
341
|
+
tokens: {
|
|
342
|
+
/** Must match a key in schema `properties` */
|
|
343
|
+
propertyKey: string;
|
|
344
|
+
/** Comparison operator */
|
|
345
|
+
operator: string;
|
|
346
|
+
/** Value to compare against */
|
|
347
|
+
value: string;
|
|
348
|
+
}[];
|
|
349
|
+
};
|
|
350
|
+
/** Server-side sorting state, or `null` to explicitly clear sorting */
|
|
351
|
+
sorting?: {
|
|
352
|
+
sortingColumn: string;
|
|
353
|
+
isDescending: boolean;
|
|
354
|
+
} | null;
|
|
355
|
+
/** Column visibility + order. `id` must match a key in `properties`. */
|
|
356
|
+
columnPrefs?: {
|
|
357
|
+
id: string;
|
|
358
|
+
visible: boolean;
|
|
359
|
+
}[];
|
|
360
|
+
/** Page size (rows per page) */
|
|
361
|
+
pageSize?: number;
|
|
362
|
+
/** Whether to wrap cell content onto multiple lines */
|
|
363
|
+
wrapLines?: boolean;
|
|
364
|
+
/** Whether alternating rows are striped */
|
|
365
|
+
stripedRows?: boolean;
|
|
366
|
+
/** Density of the table content */
|
|
367
|
+
contentDensity?: "comfortable" | "compact";
|
|
368
|
+
/** Number of sticky columns pinned to the start/end of the table */
|
|
369
|
+
stickyColumns?: {
|
|
370
|
+
first: number;
|
|
371
|
+
last: number;
|
|
372
|
+
};
|
|
373
|
+
}[];
|
|
322
374
|
/** Kanban board configuration for admin dashboard */
|
|
323
375
|
kanban?: {
|
|
324
376
|
/** Field that determines which column a card belongs to */
|
package/package.json
CHANGED
package/src/schema.ts
CHANGED
|
@@ -36,6 +36,14 @@ export type SchemaFieldTag =
|
|
|
36
36
|
| "display:stars"
|
|
37
37
|
| "display:no_autofill"
|
|
38
38
|
| "display:currency"
|
|
39
|
+
// currency with an explicit ISO 4217 code, e.g. `display:currency:usd`.
|
|
40
|
+
// The code is case-insensitive; a malformed code falls back to the bare behaviour.
|
|
41
|
+
| `display:currency:${string}`
|
|
42
|
+
// renders a fixed-option (enum) multi-select array as a checkbox group
|
|
43
|
+
| "display:checkbox"
|
|
44
|
+
// forces radio rendering for string + (enum|lookup) fields regardless of
|
|
45
|
+
// list size; the automatic ≤ 7 behaviour is handled by the rules directly
|
|
46
|
+
| "display:radio"
|
|
39
47
|
| "display:cascade"
|
|
40
48
|
| "display:survey"
|
|
41
49
|
| "display:quoting"
|
|
@@ -399,6 +407,50 @@ export type CommonSchemaAttributes = {
|
|
|
399
407
|
}[];
|
|
400
408
|
}[];
|
|
401
409
|
|
|
410
|
+
/**
|
|
411
|
+
* Pre-defined view presets provided by the schema author.
|
|
412
|
+
* A view bundles filter, sorting, column visibility/order, and display
|
|
413
|
+
* settings (page size, density, etc.) into a named configuration.
|
|
414
|
+
* These appear as "Default views" in the admin table UI and cannot be
|
|
415
|
+
* deleted by users (unlike user-saved views).
|
|
416
|
+
*
|
|
417
|
+
* Every field except `name` is optional. When applied, fields the view
|
|
418
|
+
* does not specify leave the user's current preference untouched. This
|
|
419
|
+
* lets a schema author define partial views (e.g. just sorting + columns).
|
|
420
|
+
*/
|
|
421
|
+
views?: {
|
|
422
|
+
/** Display name for the view preset */
|
|
423
|
+
name: string;
|
|
424
|
+
/** Filter to apply (PropertyFilter tokens + operation) */
|
|
425
|
+
filter?: {
|
|
426
|
+
/** How tokens are combined: "and" = all must match, "or" = any must match */
|
|
427
|
+
operation: "and" | "or";
|
|
428
|
+
/** Filter conditions */
|
|
429
|
+
tokens: {
|
|
430
|
+
/** Must match a key in schema `properties` */
|
|
431
|
+
propertyKey: string;
|
|
432
|
+
/** Comparison operator */
|
|
433
|
+
operator: string;
|
|
434
|
+
/** Value to compare against */
|
|
435
|
+
value: string;
|
|
436
|
+
}[];
|
|
437
|
+
};
|
|
438
|
+
/** Server-side sorting state, or `null` to explicitly clear sorting */
|
|
439
|
+
sorting?: { sortingColumn: string; isDescending: boolean } | null;
|
|
440
|
+
/** Column visibility + order. `id` must match a key in `properties`. */
|
|
441
|
+
columnPrefs?: { id: string; visible: boolean }[];
|
|
442
|
+
/** Page size (rows per page) */
|
|
443
|
+
pageSize?: number;
|
|
444
|
+
/** Whether to wrap cell content onto multiple lines */
|
|
445
|
+
wrapLines?: boolean;
|
|
446
|
+
/** Whether alternating rows are striped */
|
|
447
|
+
stripedRows?: boolean;
|
|
448
|
+
/** Density of the table content */
|
|
449
|
+
contentDensity?: "comfortable" | "compact";
|
|
450
|
+
/** Number of sticky columns pinned to the start/end of the table */
|
|
451
|
+
stickyColumns?: { first: number; last: number };
|
|
452
|
+
}[];
|
|
453
|
+
|
|
402
454
|
/** Kanban board configuration for admin dashboard */
|
|
403
455
|
kanban?: {
|
|
404
456
|
/** Field that determines which column a card belongs to */
|