@raytio/types 8.1.0 → 8.3.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 CHANGED
@@ -632,9 +632,11 @@ ___
632
632
  | :------ | :------ | :------ |
633
633
  | `children?` | [`Lookup`](#lookup)[] | - |
634
634
  | `description?` | `string` | - |
635
+ | `display_order?` | `number` | Sort order within a lookup set. NULL = unordered. |
635
636
  | `image_src?` | `string` | Icon source in format `icon:{AntDesignIconName}` (e.g., `icon:CameraOutlined`) |
636
637
  | `key` | `string` \| `number` | - |
637
638
  | `label?` | `string` \| `number` | Used in Antd Cascader |
639
+ | `lookup_group?` | `string` | Group heading for dropdown lists (e.g., "APAC", "EMEA"). NULL = ungrouped. |
638
640
  | `requires_2FA?` | `boolean` | used in AkahuDynamicSection only |
639
641
  | `value` | `string` \| `number` | - |
640
642
 
@@ -991,7 +993,7 @@ ___
991
993
 
992
994
  ### Schema
993
995
 
994
- Ƭ **Schema**: [`CommonSchemaAttributes`](#commonschemaattributes) & { `clientLocale?`: `string` ; `conditionalTags?`: [`ConditionalTags`](#conditionaltags)[] ; `database?`: { `method?`: ``"POST"`` \| ``"PATCH"`` \| ``"DELETE"`` ; `path?`: `string` ; `primary_key`: `string` ; `query_parameters?`: `string` ; `return_to?`: [`SchemaName`](#schemaname) ; `select?`: `string` ; `table?`: `string` } ; `end_date?`: `string` ; `groupNames?`: `Record`<`string`, `string`\> ; `group_title?`: `string` ; `groups?`: { `order?`: `string`[] } ; `isProfileSchema?`: `boolean` ; `isSpSchema?`: `boolean` ; `name`: [`SchemaName`](#schemaname) ; `properties`: { `[fieldName: string]`: [`SchemaField`](#schemafield); } ; `required?`: (`string` \| [`ConditionallyRequired`](#conditionallyrequired))[] ; `start_date?`: `string` ; `timing?`: `Record`<``"extract"`` \| ``"live_person"`` \| ``"verify_pending_delay"``, `number`\> ; `type?`: [`DataTypes`](#datatypes) ; `verified_fields?`: (`string` \| [`ConditionallyRequired`](#conditionallyrequired))[] ; `version`: `string` ; `wasExpandedByClient?`: `boolean` }
996
+ Ƭ **Schema**: [`CommonFields`](#commonfields)<`never`\> & [`CommonSchemaAttributes`](#commonschemaattributes) & { `clientLocale?`: `string` ; `conditionalTags?`: [`ConditionalTags`](#conditionaltags)[] ; `database?`: { `method?`: ``"POST"`` \| ``"PATCH"`` \| ``"DELETE"`` ; `path?`: `string` ; `primary_key`: `string` ; `query_parameters?`: `string` ; `return_to?`: [`SchemaName`](#schemaname) ; `select?`: `string` ; `table?`: `string` } ; `groupNames?`: `Record`<`string`, `string`\> ; `group_title?`: `string` ; `groups?`: { `order?`: `string`[] } ; `isProfileSchema?`: `boolean` ; `isSpSchema?`: `boolean` ; `name`: [`SchemaName`](#schemaname) ; `properties`: { `[fieldName: string]`: [`SchemaField`](#schemafield); } ; `required?`: (`string` \| [`ConditionallyRequired`](#conditionallyrequired))[] ; `timing?`: `Record`<``"extract"`` \| ``"live_person"`` \| ``"verify_pending_delay"``, `number`\> ; `type?`: [`DataTypes`](#datatypes) ; `verified_fields?`: (`string` \| [`ConditionallyRequired`](#conditionallyrequired))[] ; `version`: `string` ; `wasExpandedByClient?`: `boolean` }
995
997
 
996
998
  Raytio's variant of JSON Schema, as used by the client. It is a modified version
997
999
  of what the API returns.
@@ -1054,7 +1056,7 @@ ___
1054
1056
 
1055
1057
  ### SchemaFieldTag
1056
1058
 
1057
- Ƭ **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"``
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"``
1058
1060
 
1059
1061
  ___
1060
1062
 
@@ -1346,6 +1348,10 @@ This is what's returned by the API
1346
1348
  | :------ | :------ | :------ |
1347
1349
  | `active` | ``true`` | - |
1348
1350
  | `end_date` | `string` | ISO Date. If this tag exists, the schema is deprecated. |
1351
+ | `extends_schema_name?` | [`SchemaName`](#schemaname) \| ``null`` | Base schema to extend (same tenant). NULL = not an extension. |
1352
+ | `extends_schema_version?` | `string` \| ``null`` | Pin to specific base schema version. NULL = use version_current. |
1353
+ | `resource_group?` | `string` | CommonFields row metadata — the polymorphic entity this schema maps to. |
1354
+ | `resource_name?` | `string` | - |
1349
1355
  | `schema` | [`CommonSchemaAttributes`](#commonschemaattributes) & { `$id?`: `string` ; `$schema?`: `string` ; `allOf?`: { `$ref?`: `string` ; `if?`: `Partial`<[`WrappedSchema`](#wrappedschema)[``"schema"``]\> ; `then?`: `Partial`<[`WrappedSchema`](#wrappedschema)[``"schema"``]\> }[] ; `definitions?`: `Record`<`string`, { `$ref`: [`Urn`](#urn) }\> ; `properties`: { `[fieldName: string]`: [`ServerSchemaField`](#serverschemafield); } ; `required?`: `string`[] ; `verified_fields?`: `string`[] } | - |
1350
1356
  | `schema_country_codes?` | `string`[] | Country codes that this schema is available for |
1351
1357
  | `schema_name` | [`SchemaName`](#schemaname) | Schema Name Type and Version Properties |
package/dist/raytio.d.ts CHANGED
@@ -159,6 +159,10 @@ export type Lookup = {
159
159
  image_src?: string;
160
160
  /** used in AkahuDynamicSection only */
161
161
  requires_2FA?: boolean;
162
+ /** Sort order within a lookup set. NULL = unordered. */
163
+ display_order?: number;
164
+ /** Group heading for dropdown lists (e.g., "APAC", "EMEA"). NULL = ungrouped. */
165
+ lookup_group?: string;
162
166
  };
163
167
  export type AATag = "type:client_only" | "type:share_with_new_user" | "Merchant";
164
168
  export type AA = {
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: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";
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";
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 */
@@ -419,7 +419,7 @@ export type CommonSchemaAttributes = {
419
419
  * Raytio's variant of JSON Schema, as used by the client. It is a modified version
420
420
  * of what the API returns.
421
421
  */
422
- export type Schema = CommonSchemaAttributes & {
422
+ export type Schema = CommonFields<never> & CommonSchemaAttributes & {
423
423
  /** added by the client, copied from {@link WrappedSchema} */
424
424
  name: SchemaName;
425
425
  /** added by client */
@@ -437,10 +437,6 @@ export type Schema = CommonSchemaAttributes & {
437
437
  required?: (string | ConditionallyRequired)[];
438
438
  /** added by client */
439
439
  wasExpandedByClient?: boolean;
440
- /** ISO Date. Copied from {@link WrappedSchema} */
441
- start_date?: string;
442
- /** ISO Date. Copied from {@link WrappedSchema} If this tag exists, the schema is deprecated */
443
- end_date?: string;
444
440
  /** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
445
441
  properties: {
446
442
  [fieldName: string]: SchemaField;
@@ -511,6 +507,9 @@ export type WrappedSchema = {
511
507
  start_date: string;
512
508
  /** ISO Date. If this tag exists, the schema is deprecated. */
513
509
  end_date: string;
510
+ /** CommonFields row metadata — the polymorphic entity this schema maps to. */
511
+ resource_group?: string;
512
+ resource_name?: string;
514
513
  /** Schema Name Type and Version Properties */
515
514
  schema_name: SchemaName;
516
515
  schema_type: SchemaType;
@@ -519,6 +518,10 @@ export type WrappedSchema = {
519
518
  version_current: boolean;
520
519
  /** Country codes that this schema is available for */
521
520
  schema_country_codes?: string[];
521
+ /** Base schema to extend (same tenant). NULL = not an extension. */
522
+ extends_schema_name?: SchemaName | null;
523
+ /** Pin to specific base schema version. NULL = use version_current. */
524
+ extends_schema_version?: string | null;
522
525
  schema: CommonSchemaAttributes & {
523
526
  /** @deprecated don't use this */
524
527
  $id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raytio/types",
3
- "version": "8.1.0",
3
+ "version": "8.3.0",
4
4
  "license": "MIT",
5
5
  "main": "index",
6
6
  "types": "index",
package/src/raytio.ts CHANGED
@@ -207,6 +207,11 @@ export type Lookup = {
207
207
 
208
208
  /** used in AkahuDynamicSection only */
209
209
  requires_2FA?: boolean;
210
+
211
+ /** Sort order within a lookup set. NULL = unordered. */
212
+ display_order?: number;
213
+ /** Group heading for dropdown lists (e.g., "APAC", "EMEA"). NULL = ungrouped. */
214
+ lookup_group?: string;
210
215
  };
211
216
 
212
217
  export type AATag =
package/src/schema.ts CHANGED
@@ -44,6 +44,8 @@ export type SchemaFieldTag =
44
44
  | `display:replace:('${string}', '${string}')`
45
45
  | "display:terms_conditions"
46
46
  | `display:main_media:${string}` // property name to determine what image to display
47
+ // render the field value as markdown in Cloudscape detail views (#1902)
48
+ | "display:markdown"
47
49
  // content block variants (see ContentBlockField)
48
50
  | "display:content-block"
49
51
  | "display:info"
@@ -62,6 +64,7 @@ export type SchemaFieldTag =
62
64
  | "action:require_webauthn"
63
65
  | `action:generate_pepper:` // generates a pepper length 'n'
64
66
  | `action:timeout:${number}` // for a lookup field. Signifies it should expire after 'n' seconds
67
+ | `action:server-search:${string}` // for a lookup field. Enables server-side search on the specified column(s)
65
68
  | "verify:show_if_pending"
66
69
  | "special:hide_select_behind_button"
67
70
  | "type:capture_geolocation" // triggers the wizard's GeoLocationInput field
@@ -515,105 +518,101 @@ export type CommonSchemaAttributes = {
515
518
  * Raytio's variant of JSON Schema, as used by the client. It is a modified version
516
519
  * of what the API returns.
517
520
  */
518
- export type Schema = CommonSchemaAttributes & {
519
- /** added by the client, copied from {@link WrappedSchema} */
520
- name: SchemaName;
521
+ export type Schema = CommonFields<never> &
522
+ CommonSchemaAttributes & {
523
+ /** added by the client, copied from {@link WrappedSchema} */
524
+ name: SchemaName;
521
525
 
522
- /** added by client */
523
- type?: DataTypes;
524
-
525
- /**
526
- * Schema-level conditional tags, pre-processed for runtime evaluation.
527
- * When form values match the `if` condition, the tags are added to the schema.
528
- */
529
- conditionalTags?: ConditionalTags[];
526
+ /** added by client */
527
+ type?: DataTypes;
530
528
 
531
- /** the localized title of the `schema_group`. added by the client */
532
- group_title?: string;
529
+ /**
530
+ * Schema-level conditional tags, pre-processed for runtime evaluation.
531
+ * When form values match the `if` condition, the tags are added to the schema.
532
+ */
533
+ conditionalTags?: ConditionalTags[];
533
534
 
534
- /** originally `string[]`, the client modifies this */
535
- verified_fields?: (string | ConditionallyRequired)[];
535
+ /** the localized title of the `schema_group`. added by the client */
536
+ group_title?: string;
536
537
 
537
- /** originally `string[]`, the client modifies this */
538
- required?: (string | ConditionallyRequired)[];
538
+ /** originally `string[]`, the client modifies this */
539
+ verified_fields?: (string | ConditionallyRequired)[];
539
540
 
540
- /** added by client */
541
- wasExpandedByClient?: boolean;
541
+ /** originally `string[]`, the client modifies this */
542
+ required?: (string | ConditionallyRequired)[];
542
543
 
543
- /** ISO Date. Copied from {@link WrappedSchema} */
544
- start_date?: string;
545
- /** ISO Date. Copied from {@link WrappedSchema} If this tag exists, the schema is deprecated */
546
- end_date?: string;
544
+ /** added by client */
545
+ wasExpandedByClient?: boolean;
547
546
 
548
- /** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
549
- properties: {
550
- [fieldName: string]: SchemaField;
551
- };
547
+ /** 🚨 Note that there are cases where properties are undefined, e.g. if the schema is a sub-object */
548
+ properties: {
549
+ [fieldName: string]: SchemaField;
550
+ };
552
551
 
553
- /**
554
- * Some schema's represent data that is not stored as a profile object.
555
- * In this case, this attribute defines what database table we need to use
556
- * to fetch the corresponding data, and which field is the primary_key of that
557
- * table (e.g. `id`, `o_id` etc.)
558
- *
559
- * The `path` property specifies the complete API path to use. If not provided,
560
- * defaults to `/db/v1/{table}`. When `path` is specified, it is used directly
561
- * without appending the table name.
562
- * Examples:
563
- * - `path: "/db/v1/rpc/my_function"` for RPC endpoints
564
- * - `path: "/api/v2/custom_endpoint"` for custom API paths
565
- *
566
- * The optional `select` parameter supports PostgREST select syntax for nested
567
- * objects/arrays. For example:
568
- * `select: "id,item_id,gpm_items(id,item_key)"`
569
- * This will return nested objects in the response.
570
- */
571
- database?: {
572
- /** Table name (required when path is not specified to construct `/db/v1/{table}`) */
573
- table?: string;
574
- primary_key: string;
575
- /** Complete API path. If specified, used directly instead of `/db/v1/{table}` */
576
- path?: string;
577
- select?: string;
578
- /** Schema to redirect to after creating a record (for insert schemas) */
579
- return_to?: SchemaName;
580
- /** HTTP method override. If specified, uses this instead of the default (POST for create, PATCH for edit, DELETE for delete) */
581
- method?: "POST" | "PATCH" | "DELETE";
582
552
  /**
583
- * PostgREST query parameters to include in requests.
584
- * Supports variable substitution: {$context.organizationId}, {$context.userId}, {$context.tenantId}
585
- * Example: "org_id=eq.{$context.organizationId}&active=eq.true"
586
- * If this contains "select=", it takes precedence over the `select` property.
553
+ * Some schema's represent data that is not stored as a profile object.
554
+ * In this case, this attribute defines what database table we need to use
555
+ * to fetch the corresponding data, and which field is the primary_key of that
556
+ * table (e.g. `id`, `o_id` etc.)
557
+ *
558
+ * The `path` property specifies the complete API path to use. If not provided,
559
+ * defaults to `/db/v1/{table}`. When `path` is specified, it is used directly
560
+ * without appending the table name.
561
+ * Examples:
562
+ * - `path: "/db/v1/rpc/my_function"` for RPC endpoints
563
+ * - `path: "/api/v2/custom_endpoint"` for custom API paths
564
+ *
565
+ * The optional `select` parameter supports PostgREST select syntax for nested
566
+ * objects/arrays. For example:
567
+ * `select: "id,item_id,gpm_items(id,item_key)"`
568
+ * This will return nested objects in the response.
587
569
  */
588
- query_parameters?: string;
589
- };
570
+ database?: {
571
+ /** Table name (required when path is not specified to construct `/db/v1/{table}`) */
572
+ table?: string;
573
+ primary_key: string;
574
+ /** Complete API path. If specified, used directly instead of `/db/v1/{table}` */
575
+ path?: string;
576
+ select?: string;
577
+ /** Schema to redirect to after creating a record (for insert schemas) */
578
+ return_to?: SchemaName;
579
+ /** HTTP method override. If specified, uses this instead of the default (POST for create, PATCH for edit, DELETE for delete) */
580
+ method?: "POST" | "PATCH" | "DELETE";
581
+ /**
582
+ * PostgREST query parameters to include in requests.
583
+ * Supports variable substitution: {$context.organizationId}, {$context.userId}, {$context.tenantId}
584
+ * Example: "org_id=eq.{$context.organizationId}&active=eq.true"
585
+ * If this contains "select=", it takes precedence over the `select` property.
586
+ */
587
+ query_parameters?: string;
588
+ };
590
589
 
591
- /** the client adds this after processing the i18n property */
592
- groupNames?: Record<string, string>;
590
+ /** the client adds this after processing the i18n property */
591
+ groupNames?: Record<string, string>;
593
592
 
594
- /** specifies the order in which groups should be displayed */
595
- groups?: {
596
- order?: string[];
597
- };
593
+ /** specifies the order in which groups should be displayed */
594
+ groups?: {
595
+ order?: string[];
596
+ };
598
597
 
599
- /** added by the client to inform downstream components which locale from schema.i18n was used */
600
- clientLocale?: string;
598
+ /** added by the client to inform downstream components which locale from schema.i18n was used */
599
+ clientLocale?: string;
601
600
 
602
- /** added by the client, copied from {@link WrappedSchema} */
603
- version: string;
601
+ /** added by the client, copied from {@link WrappedSchema} */
602
+ version: string;
604
603
 
605
- /**
606
- * the estimated loading times in seconds for various API calls. The client adds
607
- * this field after processing the schema tags.
608
- */
609
- timing?: Record<"extract" | "live_person" | "verify_pending_delay", number>;
604
+ /**
605
+ * the estimated loading times in seconds for various API calls. The client adds
606
+ * this field after processing the schema tags.
607
+ */
608
+ timing?: Record<"extract" | "live_person" | "verify_pending_delay", number>;
610
609
 
611
- /** added by the client. If true, this should be shown to the client */
612
- isProfileSchema?: boolean;
610
+ /** added by the client. If true, this should be shown to the client */
611
+ isProfileSchema?: boolean;
613
612
 
614
- /** added by the client. If true, this schema somehow relates to legacy service providers */
615
- isSpSchema?: boolean;
616
- };
613
+ /** added by the client. If true, this schema somehow relates to legacy service providers */
614
+ isSpSchema?: boolean;
615
+ };
617
616
 
618
617
  /** Type Classification of a Schema returned by API */
619
618
  export type SchemaType = "ss" | "ps" | "us" | "ms";
@@ -626,6 +625,10 @@ export type WrappedSchema = {
626
625
  /** ISO Date. If this tag exists, the schema is deprecated. */
627
626
  end_date: string;
628
627
 
628
+ /** CommonFields row metadata — the polymorphic entity this schema maps to. */
629
+ resource_group?: string;
630
+ resource_name?: string;
631
+
629
632
  /** Schema Name Type and Version Properties */
630
633
  schema_name: SchemaName;
631
634
  schema_type: SchemaType;
@@ -637,6 +640,11 @@ export type WrappedSchema = {
637
640
  /** Country codes that this schema is available for */
638
641
  schema_country_codes?: string[];
639
642
 
643
+ /** Base schema to extend (same tenant). NULL = not an extension. */
644
+ extends_schema_name?: SchemaName | null;
645
+ /** Pin to specific base schema version. NULL = use version_current. */
646
+ extends_schema_version?: string | null;
647
+
640
648
  schema: CommonSchemaAttributes & {
641
649
  /** @deprecated don't use this */
642
650
  $id?: string;