diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5ab0496..0390f39 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,24 +1,24 @@ lockVersion: 2.0.0 id: cce51212-9f48-488d-9ded-b8a6fac39957 management: - docChecksum: cf1dd98292170ae86b9dd82603a00442 - docVersion: 0.5.0 - speakeasyVersion: 1.761.10 - generationVersion: 2.881.16 - releaseVersion: 0.5.0 - configChecksum: 6a4b83610c89a26954d3eebd6a40b1a7 + docChecksum: 188eb722bb93f4242ac79e556474fefe + docVersion: 0.5.5 + speakeasyVersion: 1.768.2 + generationVersion: 2.889.1 + releaseVersion: 0.5.1 + configChecksum: 1cd76aa4a44099cdd3eeccf21ecb9995 repoURL: https://github.com/cloudinary/structured-metadata-mcp.git installationURL: https://github.com/cloudinary/structured-metadata-mcp published: true persistentEdits: - generation_id: 858a4ad8-b668-4a29-9401-094d4d7af020 - pristine_commit_hash: c93f6d139ecdb52d1de1d3d0a453f55d82a3044c - pristine_tree_hash: 82e6bc27979dce6bcbd5bf0e144b6020d1de7ee6 + generation_id: 59626dbc-415b-467d-961b-308da00cdf16 + pristine_commit_hash: d9234d735156aeb3ffcdc2959a0f1414fb4996ff + pristine_tree_hash: e94a69269269b3c2294c08d485ab42f9603599e9 features: mcp-typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.2 - core: 1.2.27 + core: 1.2.29 customSecuritySchemes: 0.1.1 defaultEnabledRetries: 0.1.0 enumUnions: 0.1.0 @@ -52,12 +52,12 @@ trackedFiles: pristine_git_object: 4f9e60a9462fc4def738d60c3aaadf8232ef185f manifest.json: id: ca642a226869 - last_write_checksum: sha1:91f6a72db84046bc1d5af60381f169d1bf5b449a - pristine_git_object: ff8cb4008e30eda000903e55866679ae11925358 + last_write_checksum: sha1:f211d897e3c7008a76e079d2db2a298c2d7542f4 + pristine_git_object: 49a8f7196390fcd175deec20f2c0d8bdf24a0986 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:b84df8d6f925fbf0fddc1567b67af0c0b295b854 - pristine_git_object: 84448549c30ea25880a1ed27a303b803b82f5c84 + last_write_checksum: sha1:2539380d78f09d1789e5d2540999fa0093f5e5fd + pristine_git_object: cf656622c00a385017990cf97de3cb361ea110fa src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:c3eb278d60e337fa723f4dea4358394b5e39e0fa @@ -140,16 +140,16 @@ trackedFiles: pristine_git_object: 9c36bf01332084f735909a71036c3544cc4c7e3a src/landing-page.ts: id: ef64a6ee46d7 - last_write_checksum: sha1:368bf559e70601b5ec5c5b65abe2366fb47176e6 - pristine_git_object: d6c164dda3dd1fe95b12001d004a9b7bc8b4c29d + last_write_checksum: sha1:73d2363457cc5bd0c493112c23e8274b6c60e406 + pristine_git_object: 88e733e41b7372edae45756923ad71e709b918c0 src/lib/base64.ts: id: "598522066688" last_write_checksum: sha1:e9f04a037018040361043104960982f7c22db52d pristine_git_object: d4bd8b341290e7a828a171d840bd0b0fff7c7cd7 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:4efe9f8eb4afc26ef4c02781b3883ff6bb600755 - pristine_git_object: 81816e8b0a80add3f50e6c23adb2c928ad77dc7c + last_write_checksum: sha1:702216f665f63cf2a6253e8c3894e839fee93fea + pristine_git_object: c4a5a1cd9625f17f232507cb670e9a53d4db1282 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:1dd3e3fbb4550c4bf31f5ef997faff355d6f3250 @@ -244,8 +244,8 @@ trackedFiles: pristine_git_object: 441c1ce08678d15726f06f8692d00bd4f8daa5c0 src/mcp-server/mcp-server.ts: id: aabbc4ab07c1 - last_write_checksum: sha1:e39022de05b5a9abe737a429cdc9c1b4b5352c1e - pristine_git_object: d4af9d46cc8782e68b775591fe1d7aa7a6df84b6 + last_write_checksum: sha1:2b438ca1d665437ff3e87743dd433f06ac7a735a + pristine_git_object: 15c4a031953fc2cf70b2edcdfb8d0b89ba1e7d6c src/mcp-server/prompts.ts: id: 26f3d73cbf31 last_write_checksum: sha1:5ebf7a729762b1cd90afccecc101663b9905d181 @@ -260,8 +260,8 @@ trackedFiles: pristine_git_object: bc628748008f07f8d0fd75220d5015c46817b946 src/mcp-server/server.ts: id: 2784dd48e82a - last_write_checksum: sha1:1e6cc742152400161883d2961472ba835fef98c6 - pristine_git_object: 7be0d25a927526f804a88d0d2fbdb3a1b26fef7a + last_write_checksum: sha1:99cfc826f3b30d0f99d86bde8b7a2bc41b9f9aee + pristine_git_object: 4628afb45c8dbba8744099dde3cfb7dbfb8bc8b0 src/mcp-server/shared.ts: id: 074e80d4be1e last_write_checksum: sha1:19c9034032819a14f15c430de4350c8aba99d725 @@ -328,8 +328,8 @@ trackedFiles: pristine_git_object: cc0f4506eda169011bb7419ce94f30c88cbd2b90 src/models/createmetadatafieldop.ts: id: 22e1b361a5ea - last_write_checksum: sha1:9832344c0f1a84b7c7d5358ec42968170ab59a4f - pristine_git_object: ade6697e33635a8f149fc991c511b8b12c779945 + last_write_checksum: sha1:a0e134c96f8c9ba56104372984ff8a0a1a34f596 + pristine_git_object: f2564387535e1d2a6b857771f27d337609fd76c3 src/models/createmetadataruleop.ts: id: a04504005165 last_write_checksum: sha1:6de29a09fe04e3bcaf86b4eb574d818662c6c712 @@ -404,8 +404,8 @@ trackedFiles: pristine_git_object: ff1413093657cd37b449eb4c693f7a7ae30dc707 src/models/metadatafield.ts: id: 23e37dbac746 - last_write_checksum: sha1:4c56ce67ea772c9158332dc234eecd38628dd801 - pristine_git_object: ddda27ac3a9b84d483c136a713deba7d066d0bb7 + last_write_checksum: sha1:1113e639fb7e84699f53dd22e93d8ca1ff90fffa + pristine_git_object: e0b8a4e9541dda0e800e941d1c92976173697e3f src/models/metadatafielddatasourcevalue.ts: id: 51c7e4cb8022 last_write_checksum: sha1:f1d755b14d1a7fc4c22c971b94a928904976c743 @@ -516,8 +516,8 @@ trackedFiles: pristine_git_object: 689dba5de50e8769e5f3bb913e3f42a146d15bc1 src/types/bigint.ts: id: 3ca6e3280e43 - last_write_checksum: sha1:58178437a7d38f022b5d9bef691ba5539fad4655 - pristine_git_object: f32ee5fe6a2dbf82bd2d1ec7c17cd2987bcff1d6 + last_write_checksum: sha1:ebf6d4b27fc3aa7ff76dbedae9a19fb7f39e5dc7 + pristine_git_object: 91c22c4052617269c44ed145d678d39d8eb24a4d src/types/blobs.ts: id: f8ab9b326c86 last_write_checksum: sha1:9cc86e0e9420999afb48d53c57d71584be745fd7 @@ -549,10 +549,10 @@ examples: path: cloud_name: "" requestBody: - application/json: {"type": "set", "label": ""} + application/json: {"type": "set", "label": "", "alphabetically_sorted": true} responses: "200": - application/json: {} + application/json: {"alphabetically_sorted": true} "400": application/json: {"error": {"message": ""}} listMetadataFields: @@ -562,7 +562,7 @@ examples: cloud_name: "" responses: "200": - application/json: {} + application/json: {"metadata_fields": [{"alphabetically_sorted": true}]} "401": application/json: {"error": {"message": ""}} getMetadataField: @@ -573,7 +573,7 @@ examples: cloud_name: "" responses: "200": - application/json: {} + application/json: {"alphabetically_sorted": true} "401": application/json: {"error": {"message": ""}} updateMetadataField: @@ -583,10 +583,10 @@ examples: external_id: "" cloud_name: "" requestBody: - application/json: {} + application/json: {"alphabetically_sorted": true} responses: "200": - application/json: {} + application/json: {"alphabetically_sorted": true} "400": application/json: {"error": {"message": ""}} deleteMetadataField: @@ -621,7 +621,7 @@ examples: application/json: {"order_by": "external_id"} responses: "200": - application/json: {} + application/json: {"metadata_fields": [{"alphabetically_sorted": true}]} "400": application/json: {"error": {"message": ""}} reorderMetadataField: @@ -634,7 +634,7 @@ examples: application/json: {"position": 33651} responses: "200": - application/json: {} + application/json: {"metadata_fields": [{"alphabetically_sorted": true}]} "400": application/json: {"error": {"message": ""}} updateMetadataFieldDatasource: @@ -698,10 +698,10 @@ examples: path: cloud_name: "" requestBody: - application/json: {"metadata_field_id": "smd-field-1", "name": "My Rule", "condition": {"metadata_field_id": "smd-field-2", "populated": true}, "result": {"apply_value": {"value": "my value", "mode": "default"}}, "state": "active", "position": 1} + application/json: {"metadata_field_id": "smd-field-1", "name": "Disable field when other field is populated", "condition": {"metadata_field_id": "smd-field-2", "populated": true}, "result": {}, "state": "active", "position": 1} responses: "200": - application/json: {"metadata_field_id": "smd-field-1", "name": "My Rule", "condition": {"metadata_field_id": "smd-field-2", "populated": true}, "result": {"apply_value": {"value": "my value", "mode": "default"}}, "state": "active", "position": 1, "external_id": "1234567890", "condition_signature": "dGhlIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2c"} + application/json: {"metadata_field_id": "smd-field-1", "name": "Disable field when other field is populated", "condition": {"metadata_field_id": "smd-field-2", "populated": true}, "result": {}, "state": "active", "position": 1, "external_id": "1234567890", "condition_signature": "dGhlIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2c"} "400": application/json: {"error": {"message": ""}} listMetadataRules: @@ -721,10 +721,10 @@ examples: external_id: "" cloud_name: "" requestBody: - application/json: {"metadata_field_id": "smd-field-1", "name": "My Rule", "condition": {"metadata_field_id": "smd-field-2", "populated": true}, "result": {"apply_value": {"value": "my value", "mode": "default"}}, "state": "active", "position": 1} + application/json: {"metadata_field_id": "smd-field-1", "name": "Disable field when other field is populated", "condition": {"metadata_field_id": "smd-field-2", "populated": true}, "result": {}, "state": "active", "position": 1} responses: "200": - application/json: {"metadata_field_id": "smd-field-1", "name": "My Rule", "condition": {"metadata_field_id": "smd-field-2", "populated": true}, "result": {"apply_value": {"value": "my value", "mode": "default"}}, "state": "active", "position": 1, "external_id": "1234567890", "condition_signature": "dGhlIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2c"} + application/json: {"metadata_field_id": "smd-field-1", "name": "Disable field when other field is populated", "condition": {"metadata_field_id": "smd-field-2", "populated": true}, "result": {}, "state": "active", "position": 1, "external_id": "1234567890", "condition_signature": "dGhlIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2c"} "400": application/json: {"error": {"message": ""}} deleteMetadataRule: @@ -739,7 +739,7 @@ examples: "400": application/json: {"error": {"message": ""}} examplesVersion: 1.0.2 -releaseNotes: "## Mcp-typescript SDK Changes:\n* `CloudinarySMD.metadata_fields.createMetadataField()`: \n * `request.validation` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `CloudinarySMD.metadata_fields.listMetadataFields()`: `response.metadata_fields[]` **Changed** (Breaking ⚠️)\n* `CloudinarySMD.metadata_fields.getMetadataField()`: `response` **Changed** (Breaking ⚠️)\n* `CloudinarySMD.metadata_fields.updateMetadataField()`: \n * `request.metadata_field` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `CloudinarySMD.metadata_fields.updateMetadataFieldDatasource()`: `request` **Changed** (Breaking ⚠️)\n* `CloudinarySMD.metadata_fields.deleteMetadataFieldDatasource()`: `request` **Changed** (Breaking ⚠️)\n" +releaseNotes: "## Mcp-typescript SDK Changes:\n* `CloudinarySMD.metadata_fields.createMetadataField()`: \n * `request` **Changed**\n * `response` **Changed**\n* `CloudinarySMD.metadata_fields.listMetadataFields()`: `response.metadata_fields[]` **Changed**\n* `CloudinarySMD.metadata_fields.getMetadataField()`: `response` **Changed**\n* `CloudinarySMD.metadata_fields.updateMetadataField()`: \n * `request.metadata_field` **Changed**\n * `response` **Changed**\n" generatedFiles: - .dxtignore - .gitattributes diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e29d55b..1d428fa 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false mcp-typescript: - version: 0.5.0 + version: 0.5.1 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 24ae071..012bd41 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,18 +1,18 @@ -speakeasyVersion: 1.761.10 +speakeasyVersion: 1.768.2 sources: CloudinarySMD-MCP-OAS: sourceNamespace: cloudinary-structured-metadata-mcp-oas - sourceRevisionDigest: sha256:85c63199be6e15b3d6b3d16a16e2c33690a4dc147f2e48dc453b20a5fbf5ec43 - sourceBlobDigest: sha256:eb5e17fde26cf563d32221dfa8dc025a27f13caf100005f1871c0891263f45e8 + sourceRevisionDigest: sha256:e25ad4799e6ada489fce32cd999f079d17586dad645c4f8c5c8dd7dc59b1ef62 + sourceBlobDigest: sha256:2850d6673f3b81a913e24d1b675a8ee2bde4c0e265d01b94cf47fb608cb3f308 tags: - latest - - 0.5.0 + - 0.5.5 targets: cloudinary-structured-metadata-mcp: source: CloudinarySMD-MCP-OAS sourceNamespace: cloudinary-structured-metadata-mcp-oas - sourceRevisionDigest: sha256:85c63199be6e15b3d6b3d16a16e2c33690a4dc147f2e48dc453b20a5fbf5ec43 - sourceBlobDigest: sha256:eb5e17fde26cf563d32221dfa8dc025a27f13caf100005f1871c0891263f45e8 + sourceRevisionDigest: sha256:e25ad4799e6ada489fce32cd999f079d17586dad645c4f8c5c8dd7dc59b1ef62 + sourceBlobDigest: sha256:2850d6673f3b81a913e24d1b675a8ee2bde4c0e265d01b94cf47fb608cb3f308 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 0b5a8e3..5ef9300 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@
Claude Desktop -Install the MCP server as a Desktop Extension using the pre-built [`mcp-server.mcpb`](https://github.com/cloudinary/structured-metadata-mcp/releases/download/v0.5.0/mcp-server.mcpb) file: +Install the MCP server as a Desktop Extension using the pre-built [`mcp-server.mcpb`](https://github.com/cloudinary/structured-metadata-mcp/releases/download/v0.5.1/mcp-server.mcpb) file: -Simply drag and drop the [`mcp-server.mcpb`](https://github.com/cloudinary/structured-metadata-mcp/releases/download/v0.5.0/mcp-server.mcpb) file onto Claude Desktop to install the extension. +Simply drag and drop the [`mcp-server.mcpb`](https://github.com/cloudinary/structured-metadata-mcp/releases/download/v0.5.1/mcp-server.mcpb) file onto Claude Desktop to install the extension. The MCP bundle package includes the MCP server and all necessary configuration. Once installed, the server will be available without additional setup. diff --git a/RELEASES.md b/RELEASES.md index 6a92089..d8e28d2 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -22,4 +22,12 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.761.10 (2.881.16) https://github.com/speakeasy-api/speakeasy ### Generated -- [mcp-typescript v0.5.0] . \ No newline at end of file +- [mcp-typescript v0.5.0] . + +## 2026-05-30 00:23:16 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.768.2 (2.889.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [mcp-typescript v0.5.1] . \ No newline at end of file diff --git a/manifest.json b/manifest.json index ff8cb40..49a8f71 100644 --- a/manifest.json +++ b/manifest.json @@ -69,7 +69,7 @@ "type": "string" } }, - "version": "0.5.0", + "version": "0.5.1", "tools": [ { "name": "create-metadata-field", diff --git a/package-lock.json b/package-lock.json index ab85960..3cb1ab7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cloudinary/structured-metadata-mcp", - "version": "0.5.0", + "version": "0.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cloudinary/structured-metadata-mcp", - "version": "0.5.0", + "version": "0.5.1", "dependencies": { "@modelcontextprotocol/sdk": "1.26.0", "@stricli/core": "^1.1.2", diff --git a/package.json b/package.json index 8444854..cf65662 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cloudinary/structured-metadata-mcp", - "version": "0.5.0", + "version": "0.5.1", "author": "Cloudinary", "type": "module", "sideEffects": false, diff --git a/src/landing-page.ts b/src/landing-page.ts index d6c164d..88e733e 100644 --- a/src/landing-page.ts +++ b/src/landing-page.ts @@ -938,7 +938,7 @@ http_headers = { "api-key" = "YOUR_API_KEY", "api-secret" = "YOUR_API_SECRET", "

Instructions

One-click installation for Claude Desktop users

diff --git a/src/lib/config.ts b/src/lib/config.ts index 81816e8..c4a5a1c 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -111,9 +111,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", - openapiDocVersion: "0.5.0", - sdkVersion: "0.5.0", - genVersion: "2.881.16", + openapiDocVersion: "0.5.5", + sdkVersion: "0.5.1", + genVersion: "2.889.1", userAgent: - "speakeasy-sdk/mcp-typescript 0.5.0 2.881.16 0.5.0 @cloudinary/structured-metadata-mcp", + "speakeasy-sdk/mcp-typescript 0.5.1 2.889.1 0.5.5 @cloudinary/structured-metadata-mcp", } as const; diff --git a/src/mcp-server/mcp-server.ts b/src/mcp-server/mcp-server.ts index d4af9d4..15c4a03 100644 --- a/src/mcp-server/mcp-server.ts +++ b/src/mcp-server/mcp-server.ts @@ -21,7 +21,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "0.5.0", + currentVersion: "0.5.1", }, }); diff --git a/src/mcp-server/server.ts b/src/mcp-server/server.ts index 7be0d25..4628afb 100644 --- a/src/mcp-server/server.ts +++ b/src/mcp-server/server.ts @@ -45,7 +45,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "CloudinarySMD", - version: "0.5.0", + version: "0.5.1", }); const getClient = deps.getSDK || (() => diff --git a/src/models/createmetadatafieldop.ts b/src/models/createmetadatafieldop.ts index ade6697..f256438 100644 --- a/src/models/createmetadatafieldop.ts +++ b/src/models/createmetadatafieldop.ts @@ -55,19 +55,31 @@ export const CreateMetadataFieldDefaultValue$zodSchema: z.ZodType< ]).describe("The default value of the metadata field."); /** - * The restrictions defined for the metadata field. + * Controls UI visibility and editability of the field. All three keys are always returned; any omitted key on input defaults to false. + * + * @remarks */ export type CreateMetadataFieldRestrictions = { readonly_ui?: boolean | undefined; + hidden_ui?: boolean | undefined; + excluded_from_search?: boolean | undefined; }; export const CreateMetadataFieldRestrictions$zodSchema: z.ZodType< CreateMetadataFieldRestrictions > = z.object({ + excluded_from_search: z.boolean().optional().describe( + "Whether the field is excluded from UI search by default.", + ), + hidden_ui: z.boolean().optional().describe( + "Whether the field is hidden in the UI by default.", + ), readonly_ui: z.boolean().optional().describe( - "Whether the metadata field is read-only in the UI. when true, the metadata field can only be updated via the API.", + "Whether the field is read-only in the UI. When true, the field can only be updated via the API.", ), -}).describe("The restrictions defined for the metadata field."); +}).describe( + "Controls UI visibility and editability of the field. All three keys are always returned; any omitted key on input defaults to false.\n", +); export type CreateMetadataFieldValue = { external_id?: string | undefined; @@ -114,6 +126,7 @@ export type CreateMetadataFieldRequest = { restrictions?: CreateMetadataFieldRestrictions | null | undefined; datasource?: CreateMetadataFieldDatasource | null | undefined; allow_dynamic_list_values?: boolean | null | undefined; + alphabetically_sorted?: boolean | undefined; }; export const CreateMetadataFieldRequest$zodSchema: z.ZodType< @@ -122,10 +135,13 @@ export const CreateMetadataFieldRequest$zodSchema: z.ZodType< allow_dynamic_list_values: z.boolean().nullable().optional().describe( "Whether the metadata field allows adding new options to the datasource dynamically.", ), + alphabetically_sorted: z.boolean().optional().describe( + "Whether datasource values are maintained in case-insensitive alphabetical order. When true, values are automatically sorted on insert and update. Default false.", + ), datasource: z.lazy(() => CreateMetadataFieldDatasource$zodSchema).nullable() .optional().describe("The datasource defined for the metadata field."), default_disabled: z.boolean().nullable().optional().describe( - "Whether the default value is disabled.", + "Whether the field is disabled in the UI by default.", ), default_value: z.union([ z.string(), @@ -140,7 +156,7 @@ export const CreateMetadataFieldRequest$zodSchema: z.ZodType< ), restrictions: z.lazy(() => CreateMetadataFieldRestrictions$zodSchema) .nullable().optional().describe( - "The restrictions defined for the metadata field.", + "Controls UI visibility and editability of the field. All three keys are always returned; any omitted key on input defaults to false.\n", ), type: CreateMetadataFieldType$zodSchema.describe( "The type of the metadata field.", diff --git a/src/models/metadatafield.ts b/src/models/metadatafield.ts index ddda27a..e0b8a4e 100644 --- a/src/models/metadatafield.ts +++ b/src/models/metadatafield.ts @@ -40,15 +40,29 @@ export const DefaultValue$zodSchema: z.ZodType = z.union([ ]).describe("The default value of the metadata field."); /** - * The restrictions defined for the metadata field. + * Controls UI visibility and editability of the field. All three keys are always returned; any omitted key on input defaults to false. + * + * @remarks */ -export type Restrictions = { readonly_ui?: boolean | undefined }; +export type Restrictions = { + readonly_ui?: boolean | undefined; + hidden_ui?: boolean | undefined; + excluded_from_search?: boolean | undefined; +}; export const Restrictions$zodSchema: z.ZodType = z.object({ + excluded_from_search: z.boolean().optional().describe( + "Whether the field is excluded from UI search by default.", + ), + hidden_ui: z.boolean().optional().describe( + "Whether the field is hidden in the UI by default.", + ), readonly_ui: z.boolean().optional().describe( - "Whether the metadata field is read-only in the UI. when true, the metadata field can only be updated via the API.", + "Whether the field is read-only in the UI. When true, the field can only be updated via the API.", ), -}).describe("The restrictions defined for the metadata field."); +}).describe( + "Controls UI visibility and editability of the field. All three keys are always returned; any omitted key on input defaults to false.\n", +); export type MetadataFieldValue = { external_id?: string | undefined; @@ -89,17 +103,21 @@ export type MetadataField = { restrictions?: Restrictions | null | undefined; datasource?: Datasource | null | undefined; allow_dynamic_list_values?: boolean | null | undefined; + alphabetically_sorted?: boolean | undefined; }; export const MetadataField$zodSchema: z.ZodType = z.object({ allow_dynamic_list_values: z.boolean().nullable().optional().describe( "Whether the metadata field allows adding new options to the datasource dynamically.", ), + alphabetically_sorted: z.boolean().optional().describe( + "Whether datasource values are maintained in case-insensitive alphabetical order. When true, values are automatically sorted on insert and update. Default false.", + ), datasource: z.lazy(() => Datasource$zodSchema).nullable().optional().describe( "The datasource defined for the metadata field.", ), default_disabled: z.boolean().nullable().optional().describe( - "Whether the default value is disabled.", + "Whether the field is disabled in the UI by default.", ), default_value: z.union([ z.string(), @@ -113,7 +131,9 @@ export const MetadataField$zodSchema: z.ZodType = z.object({ "Whether the metadata field is mandatory.", ), restrictions: z.lazy(() => Restrictions$zodSchema).nullable().optional() - .describe("The restrictions defined for the metadata field."), + .describe( + "Controls UI visibility and editability of the field. All three keys are always returned; any omitted key on input defaults to false.\n", + ), type: Type$zodSchema.optional().describe("The type of the metadata field."), validation: z.record(z.string(), z.any()).nullable().optional().describe( "The validation defined for the metadata field.", diff --git a/src/types/bigint.ts b/src/types/bigint.ts index f32ee5f..91c22c4 100644 --- a/src/types/bigint.ts +++ b/src/types/bigint.ts @@ -24,23 +24,24 @@ export function bigint(): z.ZodType { } export function bigintOptional(): z.ZodType { - return z.union([ - z.bigint().transform((v) => String(v)), - z.string().transform((v, ctx) => { - try { - return BigInt(v); - } catch { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Invalid bigint value", - }); - return z.NEVER; - } - }), - z.number().transform((v) => BigInt(Math.trunc(v))), - z.undefined(), - z.null().transform(() => undefined), - ]); + return z + .union([ + z.bigint().transform((v) => String(v)), + z.string().transform((v, ctx) => { + try { + return BigInt(v); + } catch { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Invalid bigint value", + }); + return z.NEVER; + } + }), + z.number().transform((v) => BigInt(Math.trunc(v))), + z.null().transform(() => undefined), + ]) + .optional(); } export function bigintNullable(): z.ZodType {