diff --git a/codegen/layouts/partials/request-scalar-type.hbs b/codegen/layouts/partials/request-scalar-type.hbs index 9a22396a..d3850156 100644 --- a/codegen/layouts/partials/request-scalar-type.hbs +++ b/codegen/layouts/partials/request-scalar-type.hbs @@ -1,2 +1,2 @@ -{{#if (eq format "boolean")}}{{#if values}}{{#each values}}{{#unless @first}} | {{/unless}}{{json this}}{{/each}}{{else}}boolean{{/if}}{{else if (eq format "number")}}number{{else if (eq format "record")}}Record{{else if (eq format "enum")}}{{#each values}}{{#unless @first}} | {{/unless}}{{> doc}} +{{#if (eq format "boolean")}}{{#if values}}{{#each values}}{{#unless @first}} | {{/unless}}{{json this}}{{/each}}{{else}}boolean{{/if}}{{else if (eq format "number")}}number{{else if (eq format "record")}}Record{{else if (eq format "enum")}}{{#each values}}{{#unless @first}} | {{/unless}}{{> doc}} {{json name}}{{else}}string{{/each}}{{else}}string{{/if}} diff --git a/codegen/layouts/partials/resource-scalar-type.hbs b/codegen/layouts/partials/resource-scalar-type.hbs index 9a22396a..d3850156 100644 --- a/codegen/layouts/partials/resource-scalar-type.hbs +++ b/codegen/layouts/partials/resource-scalar-type.hbs @@ -1,2 +1,2 @@ -{{#if (eq format "boolean")}}{{#if values}}{{#each values}}{{#unless @first}} | {{/unless}}{{json this}}{{/each}}{{else}}boolean{{/if}}{{else if (eq format "number")}}number{{else if (eq format "record")}}Record{{else if (eq format "enum")}}{{#each values}}{{#unless @first}} | {{/unless}}{{> doc}} +{{#if (eq format "boolean")}}{{#if values}}{{#each values}}{{#unless @first}} | {{/unless}}{{json this}}{{/each}}{{else}}boolean{{/if}}{{else if (eq format "number")}}number{{else if (eq format "record")}}Record{{else if (eq format "enum")}}{{#each values}}{{#unless @first}} | {{/unless}}{{> doc}} {{json name}}{{else}}string{{/each}}{{else}}string{{/if}} diff --git a/codegen/lib/handlebars-helpers.ts b/codegen/lib/handlebars-helpers.ts index 48b191ff..493b8182 100644 --- a/codegen/lib/handlebars-helpers.ts +++ b/codegen/lib/handlebars-helpers.ts @@ -2,6 +2,23 @@ export const identity = (x: unknown): unknown => x export const json = (value: unknown): string => JSON.stringify(value) +export const jsonSchemaType = (type: string): string => { + switch (type) { + case 'string': + case 'boolean': + return type + case 'number': + case 'integer': + return 'number' + case 'object': + return 'Record' + case 'array': + return 'unknown[]' + default: + throw new Error(`Unsupported JSON Schema type: ${type}`) + } +} + export const replaceExtension = (fileName: string, extension: string): string => fileName.replace(/\.[^.]+$/, extension) diff --git a/package-lock.json b/package-lock.json index ff8f7ad7..60f2b0e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "axios-retry": "^4.4.2" }, "devDependencies": { - "@seamapi/blueprint": "^1.6.0", + "@seamapi/blueprint": "^1.7.0", "@seamapi/fake-seam-connect": "^2.0.4", "@seamapi/smith": "^1.1.0", "@seamapi/types": "1.1019.0", @@ -1025,9 +1025,9 @@ "license": "MIT" }, "node_modules/@seamapi/blueprint": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@seamapi/blueprint/-/blueprint-1.6.0.tgz", - "integrity": "sha512-+lIriSgog0E0pUjXz/tdRZiVECiSiBcnZ3uU4JRN45RTLs2BQVbR+Ris6/mXwBV1wkpMetdVD3CP1BB1agf6Lg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@seamapi/blueprint/-/blueprint-1.7.0.tgz", + "integrity": "sha512-on9pREQKyFgIaS99KLcck5K6AqLEO8Iy5h1heuJ2sEC2A7wXk5s/TL8iDOB3+4eeaAwuHRPgze9/Omo84KjJkw==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 05b73ea8..b2dde51b 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "axios-retry": "^4.4.2" }, "devDependencies": { - "@seamapi/blueprint": "^1.6.0", + "@seamapi/blueprint": "^1.7.0", "@seamapi/fake-seam-connect": "^2.0.4", "@seamapi/smith": "^1.1.0", "@seamapi/types": "1.1019.0", diff --git a/src/lib/resources/connect-webview.ts b/src/lib/resources/connect-webview.ts index 30f39076..737ac890 100644 --- a/src/lib/resources/connect-webview.ts +++ b/src/lib/resources/connect-webview.ts @@ -60,7 +60,7 @@ export type ConnectWebview = { /** * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. */ - custom_metadata: Record + custom_metadata: Record /** * URL to which the Connect Webview should redirect when an unexpected error occurs. diff --git a/src/lib/resources/connected-account.ts b/src/lib/resources/connected-account.ts index 56d586f1..ddaae9ae 100644 --- a/src/lib/resources/connected-account.ts +++ b/src/lib/resources/connected-account.ts @@ -40,7 +40,7 @@ export type ConnectedAccount = { /** * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. */ - custom_metadata: Record + custom_metadata: Record /** * Your unique key for the customer associated with this connected account. diff --git a/src/lib/resources/device.ts b/src/lib/resources/device.ts index 5b63d9ae..f9b48cb8 100644 --- a/src/lib/resources/device.ts +++ b/src/lib/resources/device.ts @@ -112,7 +112,7 @@ export type Device = { /** * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. */ - custom_metadata: Record + custom_metadata: Record /** * ID of the device. diff --git a/src/lib/resources/event.ts b/src/lib/resources/event.ts index b6368ba9..733552f0 100644 --- a/src/lib/resources/event.ts +++ b/src/lib/resources/event.ts @@ -16,7 +16,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -30,7 +31,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -90,7 +91,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -104,7 +106,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -140,7 +142,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -159,7 +162,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -215,7 +218,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -234,7 +238,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -290,7 +294,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -309,7 +314,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -373,7 +378,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -387,7 +393,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -453,7 +459,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -467,7 +474,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -508,7 +515,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -522,7 +530,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -558,7 +566,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -572,7 +581,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -648,7 +657,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -702,7 +712,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * Errors associated with the device. */ @@ -818,7 +828,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -872,7 +883,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * Errors associated with the device. */ @@ -952,7 +963,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -966,7 +978,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -1042,7 +1054,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -1096,7 +1109,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * Errors associated with the device. */ @@ -1212,7 +1225,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -1266,7 +1280,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * Errors associated with the device. */ @@ -1342,7 +1356,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -1356,7 +1371,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -1392,7 +1407,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -1406,7 +1422,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -1447,7 +1463,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -1461,7 +1478,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -1497,7 +1514,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -1511,7 +1529,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -1587,7 +1605,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -1641,7 +1660,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * Errors associated with the device. */ @@ -1717,7 +1736,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -1731,7 +1751,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -1767,7 +1787,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the affected access code. */ @@ -1781,7 +1802,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the device associated with the affected access code. */ @@ -3086,7 +3107,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the affected connected account. */ @@ -3131,7 +3153,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the affected connected account. */ @@ -3172,7 +3195,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the affected connected account. */ @@ -3208,7 +3232,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -3284,7 +3309,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the affected connected account. */ @@ -3320,7 +3346,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the affected connected account. */ @@ -3360,7 +3387,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the affected connected account. */ @@ -3396,7 +3424,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -3877,7 +3906,8 @@ export type SeamEvent = /** * Custom metadata of the connected account; present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -3949,7 +3979,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -3967,7 +3998,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -3998,7 +4029,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4016,7 +4048,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4047,7 +4079,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4065,7 +4098,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4096,7 +4129,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4114,7 +4148,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4145,7 +4179,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4163,7 +4198,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4194,7 +4229,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -4252,7 +4288,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * Errors associated with the device. */ @@ -4329,7 +4365,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -4387,7 +4424,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * Errors associated with the device. */ @@ -4464,7 +4501,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4482,7 +4520,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4518,7 +4556,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4536,7 +4575,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4577,7 +4616,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4595,7 +4635,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4626,7 +4666,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4644,7 +4685,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4675,7 +4716,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4693,7 +4735,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4728,7 +4770,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4746,7 +4789,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4777,7 +4820,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4795,7 +4839,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4826,7 +4870,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4844,7 +4889,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4875,7 +4920,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -4893,7 +4939,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -4924,7 +4970,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -4982,7 +5029,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * Errors associated with the device. */ @@ -5053,7 +5100,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5071,7 +5119,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -5102,7 +5150,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -5160,7 +5209,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * Errors associated with the device. */ @@ -5231,7 +5280,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5249,7 +5299,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -5280,7 +5330,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5298,7 +5349,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -5329,7 +5380,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * Errors associated with the connected account. */ @@ -5387,7 +5439,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * Errors associated with the device. */ @@ -5458,7 +5510,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5476,7 +5529,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -5547,7 +5600,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5565,7 +5619,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -5625,7 +5679,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5643,7 +5698,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -5690,7 +5745,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5708,7 +5764,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -5765,7 +5821,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5783,7 +5840,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -5823,7 +5880,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5849,7 +5907,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -5902,7 +5960,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5920,7 +5979,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -5977,7 +6036,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -5995,7 +6055,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -6052,7 +6112,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -6078,7 +6139,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -6119,7 +6180,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -6137,7 +6199,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -6178,7 +6240,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -6196,7 +6259,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -6237,7 +6300,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -6255,7 +6319,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -6298,7 +6362,8 @@ export type SeamEvent = /** * Custom metadata of the connected account, present when connected_account_id is provided. */ - connected_account_custom_metadata?: Record | undefined + connected_account_custom_metadata?: + Record | undefined /** * ID of the connected account associated with the event. */ @@ -6316,7 +6381,7 @@ export type SeamEvent = /** * Custom metadata of the device, present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected device. */ @@ -6360,7 +6425,7 @@ export type SeamEvent = /** * Custom metadata of the device; present when device_id is provided. */ - device_custom_metadata?: Record | undefined + device_custom_metadata?: Record | undefined /** * ID of the affected phone device. */ diff --git a/src/lib/resources/phone.ts b/src/lib/resources/phone.ts index f1b53516..02f081d8 100644 --- a/src/lib/resources/phone.ts +++ b/src/lib/resources/phone.ts @@ -15,7 +15,7 @@ export type Phone = { /** * Optional [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone. */ - custom_metadata: Record + custom_metadata: Record /** * ID of the phone. diff --git a/src/lib/resources/unmanaged-device.ts b/src/lib/resources/unmanaged-device.ts index cd87b65c..e63716db 100644 --- a/src/lib/resources/unmanaged-device.ts +++ b/src/lib/resources/unmanaged-device.ts @@ -112,7 +112,7 @@ export type UnmanagedDevice = { /** * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Keys set to `null` or to an empty string are omitted. */ - custom_metadata: Record + custom_metadata: Record /** * ID of the device. diff --git a/src/lib/routes/connect-webviews/connect-webviews.ts b/src/lib/routes/connect-webviews/connect-webviews.ts index ca2a5f9a..03316012 100644 --- a/src/lib/routes/connect-webviews/connect-webviews.ts +++ b/src/lib/routes/connect-webviews/connect-webviews.ts @@ -336,7 +336,7 @@ export type ConnectWebviewsCreateParameters = { /** * Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview) enables you to store custom information, like customer details or internal IDs from your application. The custom metadata is then transferred to any [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that were connected using the Connect Webview, making it easy to find and filter these resources in your [workspace](https://docs.seam.co/core-concepts/workspaces). You can also [filter Connect Webviews by custom metadata](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. */ - custom_metadata?: Record | undefined + custom_metadata?: Record | undefined /** * Alternative URL that you want to redirect the user to on an error. If you do not set this parameter, the Connect Webview falls back to the `custom_redirect_url`. */ @@ -424,7 +424,7 @@ export type ConnectWebviewsListParameters = { /** * Custom metadata pairs by which you want to [filter Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. */ - custom_metadata_has?: Record | undefined + custom_metadata_has?: Record | undefined /** * Customer key for which you want to list connect webviews. */ diff --git a/src/lib/routes/connected-accounts/connected-accounts.ts b/src/lib/routes/connected-accounts/connected-accounts.ts index 55012109..0a2e67b5 100644 --- a/src/lib/routes/connected-accounts/connected-accounts.ts +++ b/src/lib/routes/connected-accounts/connected-accounts.ts @@ -313,7 +313,7 @@ export type ConnectedAccountsListParameters = { /** * Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. */ - custom_metadata_has?: Record | undefined + custom_metadata_has?: Record | undefined /** * Customer key by which you want to filter connected accounts. */ @@ -391,7 +391,7 @@ export type ConnectedAccountsUpdateParameters = { /** * Custom metadata that you want to associate with the connected account. Entirely replaces the existing custom metadata object. If a new Connect Webview contains custom metadata and is used to reconnect a connected account, the custom metadata from the Connect Webview will entirely replace the entire custom metadata object on the connected account. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter connected accounts by the desired metadata](https://docs.seam.co/core-concepts/connected-accounts/filtering-connected-accounts-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. */ - custom_metadata?: Record | undefined + custom_metadata?: Record | undefined /** * The customer key to associate with this connected account. If provided, the connected account and all resources under the connected account will be moved to this customer. May only be provided if the connected account is not already associated with a customer. */ diff --git a/src/lib/routes/customers/customers.ts b/src/lib/routes/customers/customers.ts index 032de6b6..689aebbd 100644 --- a/src/lib/routes/customers/customers.ts +++ b/src/lib/routes/customers/customers.ts @@ -728,7 +728,7 @@ export type CustomersCreatePortalParameters = { /** * Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. */ - custom_metadata?: Record | undefined + custom_metadata?: Record | undefined /** * Your display name for this location resource. */ @@ -755,7 +755,7 @@ export type CustomersCreatePortalParameters = { /** * Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. */ - custom_metadata?: Record | undefined + custom_metadata?: Record | undefined /** * Ending date and time for the access grant. */ @@ -1469,7 +1469,7 @@ export type CustomersPushDataParameters = { /** * Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata. */ - custom_metadata?: Record | undefined + custom_metadata?: Record | undefined /** * Your display name for this location resource. */ @@ -1496,7 +1496,7 @@ export type CustomersPushDataParameters = { /** * Set key:value pairs for filtering reservations by custom criteria. Set a key to `null` or to an empty string to remove that key from the custom metadata. */ - custom_metadata?: Record | undefined + custom_metadata?: Record | undefined /** * Ending date and time for the access grant. */ diff --git a/src/lib/routes/devices/devices.ts b/src/lib/routes/devices/devices.ts index d228c1fd..c0b344d5 100644 --- a/src/lib/routes/devices/devices.ts +++ b/src/lib/routes/devices/devices.ts @@ -315,7 +315,7 @@ export type DevicesListParameters = { /** * Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. Key names cannot contain a period (.). Specify `null` to match a key that is unset. A key given an empty string is omitted from the filter. */ - custom_metadata_has?: Record | undefined + custom_metadata_has?: Record | undefined /** * Customer key for which you want to list devices. */ @@ -1899,7 +1899,7 @@ export type DevicesUpdateParameters = { /** * Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [Adding custom metadata to a device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter devices by the desired metadata](https://docs.seam.co/core-concepts/devices/filtering-devices-by-custom-metadata). Set a key to `null` or to an empty string to remove that key from the custom metadata. */ - custom_metadata?: Record | undefined + custom_metadata?: Record | undefined /** * ID of the device that you want to update. */ diff --git a/src/lib/routes/devices/unmanaged/unmanaged.ts b/src/lib/routes/devices/unmanaged/unmanaged.ts index d12a69e0..f8d908cb 100644 --- a/src/lib/routes/devices/unmanaged/unmanaged.ts +++ b/src/lib/routes/devices/unmanaged/unmanaged.ts @@ -458,7 +458,7 @@ export type DevicesUnmanagedUpdateParameters = { /** * Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). Set a key to `null` or to an empty string to remove that key from the custom metadata. */ - custom_metadata?: Record | undefined + custom_metadata?: Record | undefined /** * ID of the unmanaged device that you want to update. */ diff --git a/test/seam/connect/resource-types.test.ts b/test/seam/connect/resource-types.test.ts index 9cc859f7..5a8a1f1f 100644 --- a/test/seam/connect/resource-types.test.ts +++ b/test/seam/connect/resource-types.test.ts @@ -1,6 +1,10 @@ import test from 'ava' -import type { AccessCode, UnmanagedAccessCode } from '@seamapi/http/connect' +import type { + AccessCode, + Device, + UnmanagedAccessCode, +} from '@seamapi/http/connect' const expectType = (_value: Expected): void => {} @@ -24,3 +28,14 @@ const assertAccessCodeNarrowing = ( test('access code resources narrow on is_managed', (t) => { t.is(typeof assertAccessCodeNarrowing, 'function') }) + +const assertCustomMetadataValueTypes = (device: Device): void => { + expectType>(device.custom_metadata) + + // @ts-expect-error Custom metadata values cannot be arbitrary objects. + device.custom_metadata.example = {} +} + +test('record resources use their declared value types', (t) => { + t.is(typeof assertCustomMetadataValueTypes, 'function') +})