@palantir/pack.document-schema.type-gen 0.20.0 → 0.25.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.
Files changed (113) hide show
  1. package/README.md +14 -0
  2. package/build/esm/commands/ir/__tests__/irDeployFirstParty.test.js +237 -0
  3. package/build/esm/commands/ir/__tests__/irDeployFirstParty.test.js.map +1 -0
  4. package/build/esm/commands/ir/irDeployHandler.js +81 -41
  5. package/build/esm/commands/ir/irDeployHandler.js.map +1 -1
  6. package/build/esm/commands/ir/irGenAssetHandler.js +13 -0
  7. package/build/esm/commands/ir/irGenAssetHandler.js.map +1 -1
  8. package/build/esm/commands/ir/registerIrCommands.js +2 -2
  9. package/build/esm/commands/ir/registerIrCommands.js.map +1 -1
  10. package/build/esm/lib/pack-docschema-api/pack-docschema-api/index.js +1 -0
  11. package/build/esm/lib/pack-docschema-api/pack-docschema-api/index.js.map +1 -1
  12. package/build/esm/lib/pack-docschema-api/pack-docschema-api/resourceRid.js +2 -0
  13. package/build/esm/lib/pack-docschema-api/pack-docschema-api/resourceRid.js.map +1 -0
  14. package/build/esm/lib/pack-docschema-api/pack-docschema-ir/fieldValueResourceRef.js +2 -0
  15. package/build/esm/lib/pack-docschema-api/pack-docschema-ir/fieldValueResourceRef.js.map +1 -0
  16. package/build/esm/lib/pack-docschema-api/pack-docschema-ir/fieldValueUnion.js +14 -0
  17. package/build/esm/lib/pack-docschema-api/pack-docschema-ir/fieldValueUnion.js.map +1 -1
  18. package/build/esm/lib/pack-docschema-api/pack-docschema-ir/index.js +1 -0
  19. package/build/esm/lib/pack-docschema-api/pack-docschema-ir/index.js.map +1 -1
  20. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/custom-discriminant.js +1 -1
  21. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/custom-discriminant.js.map +1 -1
  22. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/external-refs.js +3 -2
  23. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/external-refs.js.map +1 -1
  24. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/simple-record.js +1 -1
  25. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/simple-record.js.map +1 -1
  26. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/union-types.js +1 -1
  27. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/union-types.js.map +1 -1
  28. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/array-and-map-types.js +1 -1
  29. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/array-and-map-types.js.map +1 -1
  30. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/boolean-fields.js +1 -1
  31. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/boolean-fields.js.map +1 -1
  32. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/custom-discriminant.js +1 -1
  33. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/custom-discriminant.js.map +1 -1
  34. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/datetime-fields.js +1 -1
  35. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/datetime-fields.js.map +1 -1
  36. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/simple-records.js +1 -1
  37. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/simple-records.js.map +1 -1
  38. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/union-before-records.js +1 -1
  39. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/union-before-records.js.map +1 -1
  40. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/union-types.js +1 -1
  41. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/union-types.js.map +1 -1
  42. package/build/esm/utils/ir/__tests__/convertIrToConjureSchema.test.js +185 -0
  43. package/build/esm/utils/ir/__tests__/convertIrToConjureSchema.test.js.map +1 -0
  44. package/build/esm/utils/ir/__tests__/convertIrToWireSchema.test.js +6 -0
  45. package/build/esm/utils/ir/__tests__/convertIrToWireSchema.test.js.map +1 -1
  46. package/build/esm/utils/ir/__tests__/generateModelsFromIr.test.js +17 -0
  47. package/build/esm/utils/ir/__tests__/generateModelsFromIr.test.js.map +1 -1
  48. package/build/esm/utils/ir/convertIrToConjureSchema.js +148 -0
  49. package/build/esm/utils/ir/convertIrToConjureSchema.js.map +1 -0
  50. package/build/esm/utils/ir/convertIrToWireSchema.js +7 -0
  51. package/build/esm/utils/ir/convertIrToWireSchema.js.map +1 -1
  52. package/build/esm/utils/ir/generateModelsFromIr.js +3 -1
  53. package/build/esm/utils/ir/generateModelsFromIr.js.map +1 -1
  54. package/build/esm/utils/ir/generateZodSchemasFromIr.js +1 -0
  55. package/build/esm/utils/ir/generateZodSchemasFromIr.js.map +1 -1
  56. package/build/esm/utils/ir/irFieldHelpers.js +24 -11
  57. package/build/esm/utils/ir/irFieldHelpers.js.map +1 -1
  58. package/build/esm/utils/schema/__tests__/__snapshots__/generateDocumentTypeFromSchema/with-name-and-description.js +1 -1
  59. package/build/esm/utils/schema/__tests__/__snapshots__/generateDocumentTypeFromSchema/with-name-and-description.js.map +1 -1
  60. package/build/esm/utils/schema/__tests__/__snapshots__/generateVersionsFromSchema/single-version.js.map +1 -1
  61. package/build/esm/utils/schema/__tests__/__snapshots__/generateVersionsFromSchema/three-version-chain.js.map +1 -1
  62. package/build/esm/utils/schema/__tests__/__snapshots__/generateVersionsFromSchema/two-version.js.map +1 -1
  63. package/build/esm/utils/schema/__tests__/fixtures.js +6 -2
  64. package/build/esm/utils/schema/__tests__/fixtures.js.map +1 -1
  65. package/build/esm/utils/schema/convertSchemaToSteps.js +2 -0
  66. package/build/esm/utils/schema/convertSchemaToSteps.js.map +1 -1
  67. package/build/esm/utils/schema/generateTypesFromSchema.js +13 -8
  68. package/build/esm/utils/schema/generateTypesFromSchema.js.map +1 -1
  69. package/build/esm/utils/steps/__tests__/__snapshots__/types/arrayFields.js.map +1 -1
  70. package/build/esm/utils/steps/__tests__/__snapshots__/types/customDiscriminant.js +1 -1
  71. package/build/esm/utils/steps/__tests__/__snapshots__/types/customDiscriminant.js.map +1 -1
  72. package/build/esm/utils/steps/__tests__/__snapshots__/types/generateTypeScriptInterfaces.js +1 -1
  73. package/build/esm/utils/steps/__tests__/__snapshots__/types/generateTypeScriptInterfaces.js.map +1 -1
  74. package/build/esm/utils/steps/__tests__/__snapshots__/types/refTypes.js.map +1 -1
  75. package/build/esm/utils/steps/__tests__/__snapshots__/types/simpleRecord.js.map +1 -1
  76. package/build/esm/utils/steps/__tests__/__snapshots__/types/simpleSteps.js +1 -1
  77. package/build/esm/utils/steps/__tests__/__snapshots__/types/simpleSteps.js.map +1 -1
  78. package/build/esm/utils/steps/__tests__/fixtures/stepSchemas/refTypes.js +15 -0
  79. package/build/esm/utils/steps/__tests__/fixtures/stepSchemas/refTypes.js.map +1 -1
  80. package/build/esm/utils/steps/convertStepsToIr.js +5 -0
  81. package/build/esm/utils/steps/convertStepsToIr.js.map +1 -1
  82. package/build/esm/utils/steps/convertStepsToSchema.js +5 -0
  83. package/build/esm/utils/steps/convertStepsToSchema.js.map +1 -1
  84. package/build/types/commands/ir/__tests__/irDeployFirstParty.test.d.ts +2 -0
  85. package/build/types/commands/ir/__tests__/irDeployFirstParty.test.d.ts.map +1 -0
  86. package/build/types/commands/ir/irDeployHandler.d.ts +20 -2
  87. package/build/types/commands/ir/irDeployHandler.d.ts.map +1 -1
  88. package/build/types/commands/ir/irGenAssetHandler.d.ts +5 -0
  89. package/build/types/commands/ir/irGenAssetHandler.d.ts.map +1 -1
  90. package/build/types/commands/ir/registerIrCommands.d.ts.map +1 -1
  91. package/build/types/lib/pack-docschema-api/pack-docschema-api/index.d.ts +1 -0
  92. package/build/types/lib/pack-docschema-api/pack-docschema-api/index.d.ts.map +1 -1
  93. package/build/types/lib/pack-docschema-api/pack-docschema-api/resourceRid.d.ts +5 -0
  94. package/build/types/lib/pack-docschema-api/pack-docschema-api/resourceRid.d.ts.map +1 -0
  95. package/build/types/lib/pack-docschema-api/pack-docschema-ir/fieldValueResourceRef.d.ts +5 -0
  96. package/build/types/lib/pack-docschema-api/pack-docschema-ir/fieldValueResourceRef.d.ts.map +1 -0
  97. package/build/types/lib/pack-docschema-api/pack-docschema-ir/fieldValueUnion.d.ts +11 -1
  98. package/build/types/lib/pack-docschema-api/pack-docschema-ir/fieldValueUnion.d.ts.map +1 -1
  99. package/build/types/lib/pack-docschema-api/pack-docschema-ir/index.d.ts +1 -0
  100. package/build/types/lib/pack-docschema-api/pack-docschema-ir/index.d.ts.map +1 -1
  101. package/build/types/utils/ir/__tests__/convertIrToConjureSchema.test.d.ts +2 -0
  102. package/build/types/utils/ir/__tests__/convertIrToConjureSchema.test.d.ts.map +1 -0
  103. package/build/types/utils/ir/convertIrToConjureSchema.d.ts +26 -0
  104. package/build/types/utils/ir/convertIrToConjureSchema.d.ts.map +1 -0
  105. package/build/types/utils/ir/generateModelsFromIr.d.ts.map +1 -1
  106. package/build/types/utils/ir/generateZodSchemasFromIr.d.ts.map +1 -1
  107. package/build/types/utils/ir/irFieldHelpers.d.ts +4 -3
  108. package/build/types/utils/ir/irFieldHelpers.d.ts.map +1 -1
  109. package/build/types/utils/schema/__tests__/fixtures.d.ts.map +1 -1
  110. package/build/types/utils/schema/convertSchemaToSteps.d.ts.map +1 -1
  111. package/build/types/utils/schema/generateTypesFromSchema.d.ts.map +1 -1
  112. package/build/types/utils/steps/convertStepsToIr.d.ts.map +1 -1
  113. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"registerIrCommands.js","names":["irDeployHandler","irGenAssetHandler","irGenModelsHandler","irGenTypesHandler","irGenZodHandler","irUpdateSchemaHandler","registerIrCommands","program","irCmd","command","description","requiredOption","action","option"],"sources":["registerIrCommands.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Command } from \"commander\";\nimport { irDeployHandler } from \"./irDeployHandler.js\";\nimport { irGenAssetHandler } from \"./irGenAssetHandler.js\";\nimport { irGenModelsHandler } from \"./irGenModelsHandler.js\";\nimport { irGenTypesHandler } from \"./irGenTypesHandler.js\";\nimport { irGenZodHandler } from \"./irGenZodHandler.js\";\nimport { irUpdateSchemaHandler } from \"./irUpdateSchemaHandler.js\";\n\nexport function registerIrCommands(program: Command): void {\n const irCmd = program\n .command(\"ir\")\n .description(\"IR (Intermediate Representation) based generation commands\");\n\n irCmd\n .command(\"gen-types\")\n .description(\n \"Generate versioned SDK files (types, schemas, internal/, models.ts, versions.ts, versionedDocRef.ts, index.ts) from a versioned IR chain JSON.\",\n )\n .requiredOption(\"-s, --schema <file>\", \"Path to versioned IR chain JSON file\")\n .requiredOption(\"-o, --output <dir>\", \"Output directory for generated SDK files\")\n .action(irGenTypesHandler);\n\n irCmd\n .command(\"zod\")\n .description(\"Generate Zod schemas from IR document schema definitions\")\n .requiredOption(\"-s, --schema <file>\", \"Path to schema JSON file\")\n .requiredOption(\"-o, --output <file>\", \"Output file path for generated Zod schemas\")\n .option(\n \"-t, --type-import-path <path>\",\n \"Path to import types from (enables satisfies operators)\",\n )\n .action(irGenZodHandler);\n\n irCmd\n .command(\"models\")\n .description(\"Generate Model constants from IR document schema definitions\")\n .requiredOption(\"-s, --schema <file>\", \"Path to schema JSON file\")\n .requiredOption(\"-o, --output <file>\", \"Output file path for generated Model constants\")\n .option(\n \"-t, --type-import-path <path>\",\n \"Path to import types from\",\n \"./types.js\",\n )\n .option(\n \"--schema-import-path <path>\",\n \"Path to import schemas from\",\n \"./schema.js\",\n )\n .action(irGenModelsHandler);\n\n irCmd\n .command(\"deploy\")\n .description(\n \"Create a document type on a Foundry stack using an IR document schema. Deploys via the general \"\n + \"(third-party) path by default, or the first-party path with --first-party.\",\n )\n .requiredOption(\n \"-i, --ir <file>\",\n \"Path to IR JSON file (chain payload from 'schema ir', or legacy single-version IR)\",\n )\n .requiredOption(\"-b, --base-url <url>\", \"Base URL for Foundry API\")\n .requiredOption(\"-a, --auth <token>\", \"Authentication token for Foundry API\")\n .option(\n \"-p, --parent-folder <rid>\",\n \"Parent folder RID for the document type (required for third-party deploys)\",\n )\n .option(\n \"--first-party\",\n \"Deploy as a first-party document type (uses the first-party endpoint; requires --ontology-rid)\",\n false,\n )\n .option(\n \"-o, --ontology-rid <rid>\",\n \"Target ontology RID (required for first-party deploys)\",\n )\n .option(\n \"-f, --file-system-type <type>\",\n \"File system type for the document type (ARTIFACTS or COMPASS)\",\n )\n .option(\n \"--first-party-prefix <path>\",\n \"Override the API prefix used for first-party requests (e.g. /api/gotham). Defaults to /api.\",\n )\n .action(irDeployHandler);\n\n irCmd\n .command(\"update-schema\")\n .description(\"Update the schema of an existing document type using an IR document schema\")\n .requiredOption(\n \"-i, --ir <file>\",\n \"Path to IR JSON file (chain payload from 'schema ir', or legacy single-version IR)\",\n )\n .requiredOption(\"-b, --base-url <url>\", \"Base URL for Foundry API\")\n .requiredOption(\"-a, --auth <token>\", \"Authentication token for Foundry API\")\n .requiredOption(\"-o, --ontology-rid <rid>\", \"Target ontology RID\")\n .option(\n \"--force-overwrite\",\n \"Skip backwards-compatibility validation when updating the schema\",\n false,\n )\n .option(\n \"--first-party-prefix <path>\",\n \"Override the API prefix used for first-party requests (e.g. /api/gotham). Defaults to /api.\",\n )\n .action(irUpdateSchemaHandler);\n\n irCmd\n .command(\"asset\")\n .description(\n \"Generate document type asset JSON and a sibling schema compatibility range JSON from an IR file (advanced — most users should use 'ir deploy' instead). The minimum supported schema version is sourced from the IR payload's 'minSupportedVersion' field (set by 'schema ir --config <pack-config.json>'); legacy single-IR inputs default to min == max.\",\n )\n .requiredOption(\n \"-i, --ir <file>\",\n \"Path to IR JSON file (chain payload from 'schema ir', or legacy single-version IR)\",\n )\n .requiredOption(\"-o, --output <file>\", \"Output file path for asset JSON\")\n .option(\n \"-f, --file-system-type <type>\",\n \"File system type (ARTIFACTS or COMPASS)\",\n \"ARTIFACTS\",\n )\n .option(\n \"--compatibility-range-output <file>\",\n \"Output path for the schema compatibility range JSON (defaults to a sibling of --output with '-schema-compatibility-range' suffix)\",\n )\n .action(irGenAssetHandler);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,eAAe,QAAQ,sBAAsB;AACtD,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,qBAAqB,QAAQ,4BAA4B;AAElE,OAAO,SAASC,kBAAkBA,CAACC,OAAgB,EAAQ;EACzD,MAAMC,KAAK,GAAGD,OAAO,CAClBE,OAAO,CAAC,IAAI,CAAC,CACbC,WAAW,CAAC,4DAA4D,CAAC;EAE5EF,KAAK,CACFC,OAAO,CAAC,WAAW,CAAC,CACpBC,WAAW,CACV,gJACF,CAAC,CACAC,cAAc,CAAC,qBAAqB,EAAE,sCAAsC,CAAC,CAC7EA,cAAc,CAAC,oBAAoB,EAAE,0CAA0C,CAAC,CAChFC,MAAM,CAACT,iBAAiB,CAAC;EAE5BK,KAAK,CACFC,OAAO,CAAC,KAAK,CAAC,CACdC,WAAW,CAAC,0DAA0D,CAAC,CACvEC,cAAc,CAAC,q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AqB,CAAC,CACjEE,MAAM,CACL,mBAAmB,EACnB,kEAAkE,EAClE,KACF,CAAC,CACAA,MAAM,CACL,6BAA6B,EAC7B,6FACF,CAAC,CACAD,MAAM,CAACP,qBAAqB,CAAC;EAEhCG,KAAK,CACFC,OAAO,CAAC,OAAO,CAAC,CAChBC,WAAW,CACV,4VACF,CAAC,CACAC,cAAc,CACb,iBAAiB,EACjB,oFACF,CAAC,CACAA,cAAc,CAAC,qBAAqB,EAAE,iCAAiC,CAAC,CACxEE,MAAM,CACL,+BAA+B,EAC/B,yCAAyC,EACzC,WACF,CAAC,CACAA,MAAM,CACL,qCAAqC,EACrC,mIACF,CAAC,CACAD,MAAM,CAACX,iBAAiB,CAAC;AAC9B","ignoreList":[]}
1
+ {"version":3,"file":"registerIrCommands.js","names":["irDeployHandler","irGenAssetHandler","irGenModelsHandler","irGenTypesHandler","irGenZodHandler","irUpdateSchemaHandler","registerIrCommands","program","irCmd","command","description","requiredOption","action","option"],"sources":["registerIrCommands.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Command } from \"commander\";\nimport { irDeployHandler } from \"./irDeployHandler.js\";\nimport { irGenAssetHandler } from \"./irGenAssetHandler.js\";\nimport { irGenModelsHandler } from \"./irGenModelsHandler.js\";\nimport { irGenTypesHandler } from \"./irGenTypesHandler.js\";\nimport { irGenZodHandler } from \"./irGenZodHandler.js\";\nimport { irUpdateSchemaHandler } from \"./irUpdateSchemaHandler.js\";\n\nexport function registerIrCommands(program: Command): void {\n const irCmd = program\n .command(\"ir\")\n .description(\"IR (Intermediate Representation) based generation commands\");\n\n irCmd\n .command(\"gen-types\")\n .description(\n \"Generate versioned SDK files (types, schemas, internal/, models.ts, versions.ts, versionedDocRef.ts, index.ts) from a versioned IR chain JSON.\",\n )\n .requiredOption(\"-s, --schema <file>\", \"Path to versioned IR chain JSON file\")\n .requiredOption(\"-o, --output <dir>\", \"Output directory for generated SDK files\")\n .action(irGenTypesHandler);\n\n irCmd\n .command(\"zod\")\n .description(\"Generate Zod schemas from IR document schema definitions\")\n .requiredOption(\"-s, --schema <file>\", \"Path to schema JSON file\")\n .requiredOption(\"-o, --output <file>\", \"Output file path for generated Zod schemas\")\n .option(\n \"-t, --type-import-path <path>\",\n \"Path to import types from (enables satisfies operators)\",\n )\n .action(irGenZodHandler);\n\n irCmd\n .command(\"models\")\n .description(\"Generate Model constants from IR document schema definitions\")\n .requiredOption(\"-s, --schema <file>\", \"Path to schema JSON file\")\n .requiredOption(\"-o, --output <file>\", \"Output file path for generated Model constants\")\n .option(\n \"-t, --type-import-path <path>\",\n \"Path to import types from\",\n \"./types.js\",\n )\n .option(\n \"--schema-import-path <path>\",\n \"Path to import schemas from\",\n \"./schema.js\",\n )\n .action(irGenModelsHandler);\n\n irCmd\n .command(\"deploy\")\n .description(\n \"Create a document type on a Foundry stack using an IR document schema. Deploys via the general \"\n + \"(third-party) path by default, or the first-party path with --first-party.\",\n )\n .requiredOption(\n \"-i, --ir <file>\",\n \"Path to IR JSON file (chain payload from 'schema ir', or legacy single-version IR)\",\n )\n .requiredOption(\"-b, --base-url <url>\", \"Base URL for Foundry API\")\n .requiredOption(\"-a, --auth <token>\", \"Authentication token for Foundry API\")\n .option(\n \"-p, --parent-folder <rid>\",\n \"Parent folder RID for the document type (required for third-party deploys)\",\n )\n .option(\n \"--first-party\",\n \"Publish a first-party document type in dev mode: schema is unversioned (version -1) and you \"\n + \"can re-run with the same name to iterate on it. Requires --first-party-api-url.\",\n false,\n )\n .option(\n \"-o, --ontology-rid <rid>\",\n \"[deprecated] Ignored for first-party deploys (publish has no ontology binding)\",\n )\n .option(\n \"-f, --file-system-type <type>\",\n \"File system type for the document type (ARTIFACTS or COMPASS)\",\n )\n .option(\n \"--first-party-api-url <url>\",\n \"First-party document type REST API base URL, required for first-party deploys (installation-dependent)\",\n )\n .option(\n \"--first-party-prefix <path>\",\n \"[deprecated] Ignored; use --first-party-api-url for first-party deploys\",\n )\n .action(irDeployHandler);\n\n irCmd\n .command(\"update-schema\")\n .description(\"Update the schema of an existing document type using an IR document schema\")\n .requiredOption(\n \"-i, --ir <file>\",\n \"Path to IR JSON file (chain payload from 'schema ir', or legacy single-version IR)\",\n )\n .requiredOption(\"-b, --base-url <url>\", \"Base URL for Foundry API\")\n .requiredOption(\"-a, --auth <token>\", \"Authentication token for Foundry API\")\n .requiredOption(\"-o, --ontology-rid <rid>\", \"Target ontology RID\")\n .option(\n \"--force-overwrite\",\n \"Skip backwards-compatibility validation when updating the schema\",\n false,\n )\n .option(\n \"--first-party-prefix <path>\",\n \"Override the API prefix used for first-party requests (e.g. /api/gotham). Defaults to /api.\",\n )\n .action(irUpdateSchemaHandler);\n\n irCmd\n .command(\"asset\")\n .description(\n \"Generate document type asset JSON and a sibling schema compatibility range JSON from an IR file (advanced — most users should use 'ir deploy' instead). The minimum supported schema version is sourced from the IR payload's 'minSupportedVersion' field (set by 'schema ir --config <pack-config.json>'); legacy single-IR inputs default to min == max.\",\n )\n .requiredOption(\n \"-i, --ir <file>\",\n \"Path to IR JSON file (chain payload from 'schema ir', or legacy single-version IR)\",\n )\n .requiredOption(\"-o, --output <file>\", \"Output file path for asset JSON\")\n .option(\n \"-f, --file-system-type <type>\",\n \"File system type (ARTIFACTS or COMPASS)\",\n \"ARTIFACTS\",\n )\n .option(\n \"--compatibility-range-output <file>\",\n \"Output path for the schema compatibility range JSON (defaults to a sibling of --output with '-schema-compatibility-range' suffix)\",\n )\n .option(\n \"--force-overwrite\",\n \"Mark the asset so backwards-compatibility validation is skipped when the platform processes it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qC,EACrC,mIACF,CAAC,CACAA,MAAM,CACL,mBAAmB,EACnB,gGAAgG,EAChG,KACF,CAAC,CACAD,MAAM,CAACX,iBAAiB,CAAC;AAC9B","ignoreList":[]}
@@ -19,6 +19,7 @@ export * from "./fieldKey.js";
19
19
  export * from "./interfaceTypeRid.js";
20
20
  export * from "./modelTypeKey.js";
21
21
  export * from "./objectTypeRid.js";
22
+ export * from "./resourceRid.js";
22
23
  export * from "./schemaVersion.js";
23
24
  export * from "./unionVariantKey.js";
24
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"./documentTypeRid.js\";\nexport * from \"./fieldKey.js\";\nexport * from \"./interfaceTypeRid.js\";\nexport * from \"./modelTypeKey.js\";\nexport * from \"./objectTypeRid.js\";\nexport * from \"./schemaVersion.js\";\nexport * from \"./unionVariantKey.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,uBAAuB;AACrC,cAAc,mBAAmB;AACjC,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,sBAAsB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"./documentTypeRid.js\";\nexport * from \"./fieldKey.js\";\nexport * from \"./interfaceTypeRid.js\";\nexport * from \"./modelTypeKey.js\";\nexport * from \"./objectTypeRid.js\";\nexport * from \"./resourceRid.js\";\nexport * from \"./schemaVersion.js\";\nexport * from \"./unionVariantKey.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,uBAAuB;AACrC,cAAc,mBAAmB;AACjC,cAAc,oBAAoB;AAClC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,sBAAsB","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=resourceRid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceRid.js","names":[],"sources":["resourceRid.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type IResourceRid = string & {\n __conjure_type?: \"ResourceRid\";\n __conjure_package?: \"com.palantir.pack.docschema.api\";\n};\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=fieldValueResourceRef.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldValueResourceRef.js","names":[],"sources":["fieldValueResourceRef.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { IResourceRid } from \"../pack-docschema-api/resourceRid.js\";\nexport interface IFieldValueResourceRef {\n readonly \"resourceRids\": ReadonlyArray<IResourceRid>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -86,6 +86,15 @@ function object(obj) {
86
86
  type: "object"
87
87
  };
88
88
  }
89
+ function isResourceRef(obj) {
90
+ return obj.type === "resourceRef";
91
+ }
92
+ function resourceRef(obj) {
93
+ return {
94
+ resourceRef: obj,
95
+ type: "resourceRef"
96
+ };
97
+ }
89
98
  function isString(obj) {
90
99
  return obj.type === "string";
91
100
  }
@@ -147,6 +156,9 @@ function visit(obj, visitor) {
147
156
  if (isObject(obj)) {
148
157
  return visitor.object(obj.object);
149
158
  }
159
+ if (isResourceRef(obj)) {
160
+ return visitor.resourceRef(obj.resourceRef);
161
+ }
150
162
  if (isString(obj)) {
151
163
  return visitor.string(obj.string);
152
164
  }
@@ -178,6 +190,8 @@ export const IFieldValueUnion = {
178
190
  modelRef: modelRef,
179
191
  isObject: isObject,
180
192
  object: object,
193
+ isResourceRef: isResourceRef,
194
+ resourceRef: resourceRef,
181
195
  isString: isString,
182
196
  string: string,
183
197
  isText: isText,
@@ -1 +1 @@
1
- {"version":3,"file":"fieldValueUnion.js","names":["isBoolean","obj","type","boolean","isDatetime","datetime","isDocRef","docRef","isDouble","double","isInteger","integer","isMediaRef","mediaRef","isModelRef","modelRef","isObject","object","isString","string","isText","text","isUnmanagedJson","unmanagedJson","isUserRef","userRef","visit","visitor","unknown","IFieldValueUnion"],"sources":["fieldValueUnion.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { IFieldValueBoolean } from \"./fieldValueBoolean.js\";\nimport type { IFieldValueDatetime } from \"./fieldValueDatetime.js\";\nimport type { IFieldValueDocumentRef } from \"./fieldValueDocumentRef.js\";\nimport type { IFieldValueDouble } from \"./fieldValueDouble.js\";\nimport type { IFieldValueInteger } from \"./fieldValueInteger.js\";\nimport type { IFieldValueMediaRef } from \"./fieldValueMediaRef.js\";\nimport type { IFieldValueModelRef } from \"./fieldValueModelRef.js\";\nimport type { IFieldValueObjectRef } from \"./fieldValueObjectRef.js\";\nimport type { IFieldValueString } from \"./fieldValueString.js\";\nimport type { IFieldValueText } from \"./fieldValueText.js\";\nimport type { IFieldValueUnmanagedJson } from \"./fieldValueUnmanagedJson.js\";\nimport type { IFieldValueUserRef } from \"./fieldValueUserRef.js\";\n\nexport interface IFieldValueUnion_Boolean {\n readonly \"boolean\": IFieldValueBoolean;\n readonly \"type\": \"boolean\";\n}\n\nexport interface IFieldValueUnion_Datetime {\n readonly \"datetime\": IFieldValueDatetime;\n readonly \"type\": \"datetime\";\n}\n\nexport interface IFieldValueUnion_DocRef {\n readonly \"docRef\": IFieldValueDocumentRef;\n readonly \"type\": \"docRef\";\n}\n\nexport interface IFieldValueUnion_Double {\n readonly \"double\": IFieldValueDouble;\n readonly \"type\": \"double\";\n}\n\nexport interface IFieldValueUnion_Integer {\n readonly \"integer\": IFieldValueInteger;\n readonly \"type\": \"integer\";\n}\n\nexport interface IFieldValueUnion_MediaRef {\n readonly \"mediaRef\": IFieldValueMediaRef;\n readonly \"type\": \"mediaRef\";\n}\n\nexport interface IFieldValueUnion_ModelRef {\n readonly \"modelRef\": IFieldValueModelRef;\n readonly \"type\": \"modelRef\";\n}\n\nexport interface IFieldValueUnion_Object {\n readonly \"object\": IFieldValueObjectRef;\n readonly \"type\": \"object\";\n}\n\nexport interface IFieldValueUnion_String {\n readonly \"string\": IFieldValueString;\n readonly \"type\": \"string\";\n}\n\nexport interface IFieldValueUnion_Text {\n readonly \"text\": IFieldValueText;\n readonly \"type\": \"text\";\n}\n\nexport interface IFieldValueUnion_UnmanagedJson {\n readonly \"unmanagedJson\": IFieldValueUnmanagedJson;\n readonly \"type\": \"unmanagedJson\";\n}\n\nexport interface IFieldValueUnion_UserRef {\n readonly \"userRef\": IFieldValueUserRef;\n readonly \"type\": \"userRef\";\n}\n\nexport type IFieldValueUnion =\n | IFieldValueUnion_Boolean\n | IFieldValueUnion_Datetime\n | IFieldValueUnion_DocRef\n | IFieldValueUnion_Double\n | IFieldValueUnion_Integer\n | IFieldValueUnion_MediaRef\n | IFieldValueUnion_ModelRef\n | IFieldValueUnion_Object\n | IFieldValueUnion_String\n | IFieldValueUnion_Text\n | IFieldValueUnion_UnmanagedJson\n | IFieldValueUnion_UserRef;\n\nexport interface IFieldValueUnionVisitor<T> {\n readonly \"boolean\": (obj: IFieldValueBoolean) => T;\n readonly \"datetime\": (obj: IFieldValueDatetime) => T;\n readonly \"docRef\": (obj: IFieldValueDocumentRef) => T;\n readonly \"double\": (obj: IFieldValueDouble) => T;\n readonly \"integer\": (obj: IFieldValueInteger) => T;\n readonly \"mediaRef\": (obj: IFieldValueMediaRef) => T;\n readonly \"modelRef\": (obj: IFieldValueModelRef) => T;\n readonly \"object\": (obj: IFieldValueObjectRef) => T;\n readonly \"string\": (obj: IFieldValueString) => T;\n readonly \"text\": (obj: IFieldValueText) => T;\n readonly \"unmanagedJson\": (obj: IFieldValueUnmanagedJson) => T;\n readonly \"userRef\": (obj: IFieldValueUserRef) => T;\n readonly \"unknown\": (obj: IFieldValueUnion) => T;\n}\n\nfunction isBoolean(obj: IFieldValueUnion): obj is IFieldValueUnion_Boolean {\n return (obj.type === \"boolean\");\n}\n\nfunction boolean(obj: IFieldValueBoolean): IFieldValueUnion_Boolean {\n return {\n boolean: obj,\n type: \"boolean\",\n };\n}\n\nfunction isDatetime(obj: IFieldValueUnion): obj is IFieldValueUnion_Datetime {\n return (obj.type === \"datetime\");\n}\n\nfunction datetime(obj: IFieldValueDatetime): IFieldValueUnion_Datetime {\n return {\n datetime: obj,\n type: \"datetime\",\n };\n}\n\nfunction isDocRef(obj: IFieldValueUnion): obj is IFieldValueUnion_DocRef {\n return (obj.type === \"docRef\");\n}\n\nfunction docRef(obj: IFieldValueDocumentRef): IFieldValueUnion_DocRef {\n return {\n docRef: obj,\n type: \"docRef\",\n };\n}\n\nfunction isDouble(obj: IFieldValueUnion): obj is IFieldValueUnion_Double {\n return (obj.type === \"double\");\n}\n\nfunction double(obj: IFieldValueDouble): IFieldValueUnion_Double {\n return {\n double: obj,\n type: \"double\",\n };\n}\n\nfunction isInteger(obj: IFieldValueUnion): obj is IFieldValueUnion_Integer {\n return (obj.type === \"integer\");\n}\n\nfunction integer(obj: IFieldValueInteger): IFieldValueUnion_Integer {\n return {\n integer: obj,\n type: \"integer\",\n };\n}\n\nfunction isMediaRef(obj: IFieldValueUnion): obj is IFieldValueUnion_MediaRef {\n return (obj.type === \"mediaRef\");\n}\n\nfunction mediaRef(obj: IFieldValueMediaRef): IFieldValueUnion_MediaRef {\n return {\n mediaRef: obj,\n type: \"mediaRef\",\n };\n}\n\nfunction isModelRef(obj: IFieldValueUnion): obj is IFieldValueUnion_ModelRef {\n return (obj.type === \"modelRef\");\n}\n\nfunction modelRef(obj: IFieldValueModelRef): IFieldValueUnion_ModelRef {\n return {\n modelRef: obj,\n type: \"modelRef\",\n };\n}\n\nfunction isObject(obj: IFieldValueUnion): obj is IFieldValueUnion_Object {\n return (obj.type === \"object\");\n}\n\nfunction object(obj: IFieldValueObjectRef): IFieldValueUnion_Object {\n return {\n object: obj,\n type: \"object\",\n };\n}\n\nfunction isString(obj: IFieldValueUnion): obj is IFieldValueUnion_String {\n return (obj.type === \"string\");\n}\n\nfunction string(obj: IFieldValueString): IFieldValueUnion_String {\n return {\n string: obj,\n type: \"string\",\n };\n}\n\nfunction isText(obj: IFieldValueUnion): obj is IFieldValueUnion_Text {\n return (obj.type === \"text\");\n}\n\nfunction text(obj: IFieldValueText): IFieldValueUnion_Text {\n return {\n text: obj,\n type: \"text\",\n };\n}\n\nfunction isUnmanagedJson(obj: IFieldValueUnion): obj is IFieldValueUnion_UnmanagedJson {\n return (obj.type === \"unmanagedJson\");\n}\n\nfunction unmanagedJson(obj: IFieldValueUnmanagedJson): IFieldValueUnion_UnmanagedJson {\n return {\n unmanagedJson: obj,\n type: \"unmanagedJson\",\n };\n}\n\nfunction isUserRef(obj: IFieldValueUnion): obj is IFieldValueUnion_UserRef {\n return (obj.type === \"userRef\");\n}\n\nfunction userRef(obj: IFieldValueUserRef): IFieldValueUnion_UserRef {\n return {\n userRef: obj,\n type: \"userRef\",\n };\n}\n\nfunction visit<T>(obj: IFieldValueUnion, visitor: IFieldValueUnionVisitor<T>): T {\n if (isBoolean(obj)) {\n return visitor.boolean(obj.boolean);\n }\n if (isDatetime(obj)) {\n return visitor.datetime(obj.datetime);\n }\n if (isDocRef(obj)) {\n return visitor.docRef(obj.docRef);\n }\n if (isDouble(obj)) {\n return visitor.double(obj.double);\n }\n if (isInteger(obj)) {\n return visitor.integer(obj.integer);\n }\n if (isMediaRef(obj)) {\n return visitor.mediaRef(obj.mediaRef);\n }\n if (isModelRef(obj)) {\n return visitor.modelRef(obj.modelRef);\n }\n if (isObject(obj)) {\n return visitor.object(obj.object);\n }\n if (isString(obj)) {\n return visitor.string(obj.string);\n }\n if (isText(obj)) {\n return visitor.text(obj.text);\n }\n if (isUnmanagedJson(obj)) {\n return visitor.unmanagedJson(obj.unmanagedJson);\n }\n if (isUserRef(obj)) {\n return visitor.userRef(obj.userRef);\n }\n return visitor.unknown(obj);\n}\n\nexport const IFieldValueUnion: {\n isBoolean: typeof isBoolean;\n boolean: typeof boolean;\n isDatetime: typeof isDatetime;\n datetime: typeof datetime;\n isDocRef: typeof isDocRef;\n docRef: typeof docRef;\n isDouble: typeof isDouble;\n double: typeof double;\n isInteger: typeof isInteger;\n integer: typeof integer;\n isMediaRef: typeof isMediaRef;\n mediaRef: typeof mediaRef;\n isModelRef: typeof isModelRef;\n modelRef: typeof modelRef;\n isObject: typeof isObject;\n object: typeof object;\n isString: typeof isString;\n string: typeof string;\n isText: typeof isText;\n text: typeof text;\n isUnmanagedJson: typeof isUnmanagedJson;\n unmanagedJson: typeof unmanagedJson;\n isUserRef: typeof isUserRef;\n userRef: typeof userRef;\n visit: typeof visit;\n} = {\n isBoolean: isBoolean,\n boolean: boolean,\n isDatetime: isDatetime,\n datetime: datetime,\n isDocRef: isDocRef,\n docRef: docRef,\n isDouble: isDouble,\n double: double,\n isInteger: isInteger,\n integer: integer,\n isMediaRef: isMediaRef,\n mediaRef: mediaRef,\n isModelRef: isModelRef,\n modelRef: modelRef,\n isObject: isObject,\n object: object,\n isString: isString,\n string: string,\n isText: isText,\n text: text,\n isUnmanagedJson: isUnmanagedJson,\n unmanagedJson: unmanagedJson,\n isUserRef: isUserRef,\n userRef: userRef,\n visit: visit,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyGA,SAASA,SAASA,CAACC,GAAqB,EAAmC;EACzE,OAAQA,GAAG,CAACC,IAAI,KAAK,SAAS;AAChC;AAEA,SAASC,OAAOA,C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EAAE;IAClB,OAAO0B,OAAO,CAACF,OAAO,CAACxB,GAAG,CAACwB,OAAO,CAAC;EACrC;EACA,OAAOE,OAAO,CAACC,OAAO,CAAC3B,GAAG,CAAC;AAC7B;AAEA,OAAO,MAAM4B,gBA0BZ,GAAG;EACF7B,SAAS,EAAEA,SAAS;EACpBG,OAAO,EAAEA,OAAO;EAChBC,UAAU,EAAEA,UAAU;EACtBC,QAAQ,EAAEA,QAAQ;EAClBC,QAAQ,EAAEA,QAAQ;EAClBC,MAAM,EAAEA,MAAM;EACdC,QAAQ,EAAEA,QAAQ;EAClBC,MAAM,EAAEA,MAAM;EACdC,SAAS,EAAEA,SAAS;EACpBC,OAAO,EAAEA,OAAO;EAChBC,UAAU,EAAEA,UAAU;EACtBC,QAAQ,EAAEA,QAAQ;EAClBC,UAAU,EAAEA,UAAU;EACtBC,QAAQ,EAAEA,QAAQ;EAClBC,QAAQ,EAAEA,QAAQ;EAClBC,MAAM,EAAEA,MAAM;EACdC,QAAQ,EAAEA,QAAQ;EAClBC,MAAM,EAAEA,MAAM;EACdC,MAAM,EAAEA,MAAM;EACdC,IAAI,EAAEA,IAAI;EACVC,eAAe,EAAEA,eAAe;EAChCC,aAAa,EAAEA,aAAa;EAC5BC,SAAS,EAAEA,SAAS;EACpBC,OAAO,EAAEA,OAAO;EAChBC,KAAK,EAAEA;AACT,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"fieldValueUnion.js","names":["isBoolean","obj","type","boolean","isDatetime","datetime","isDocRef","docRef","isDouble","double","isInteger","integer","isMediaRef","mediaRef","isModelRef","modelRef","isObject","object","isResourceRef","resourceRef","isString","string","isText","text","isUnmanagedJson","unmanagedJson","isUserRef","userRef","visit","visitor","unknown","IFieldValueUnion"],"sources":["fieldValueUnion.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { IFieldValueBoolean } from \"./fieldValueBoolean.js\";\nimport type { IFieldValueDatetime } from \"./fieldValueDatetime.js\";\nimport type { IFieldValueDocumentRef } from \"./fieldValueDocumentRef.js\";\nimport type { IFieldValueDouble } from \"./fieldValueDouble.js\";\nimport type { IFieldValueInteger } from \"./fieldValueInteger.js\";\nimport type { IFieldValueMediaRef } from \"./fieldValueMediaRef.js\";\nimport type { IFieldValueModelRef } from \"./fieldValueModelRef.js\";\nimport type { IFieldValueObjectRef } from \"./fieldValueObjectRef.js\";\nimport type { IFieldValueResourceRef } from \"./fieldValueResourceRef.js\";\nimport type { IFieldValueString } from \"./fieldValueString.js\";\nimport type { IFieldValueText } from \"./fieldValueText.js\";\nimport type { IFieldValueUnmanagedJson } from \"./fieldValueUnmanagedJson.js\";\nimport type { IFieldValueUserRef } from \"./fieldValueUserRef.js\";\n\nexport interface IFieldValueUnion_Boolean {\n readonly \"boolean\": IFieldValueBoolean;\n readonly \"type\": \"boolean\";\n}\n\nexport interface IFieldValueUnion_Datetime {\n readonly \"datetime\": IFieldValueDatetime;\n readonly \"type\": \"datetime\";\n}\n\nexport interface IFieldValueUnion_DocRef {\n readonly \"docRef\": IFieldValueDocumentRef;\n readonly \"type\": \"docRef\";\n}\n\nexport interface IFieldValueUnion_Double {\n readonly \"double\": IFieldValueDouble;\n readonly \"type\": \"double\";\n}\n\nexport interface IFieldValueUnion_Integer {\n readonly \"integer\": IFieldValueInteger;\n readonly \"type\": \"integer\";\n}\n\nexport interface IFieldValueUnion_MediaRef {\n readonly \"mediaRef\": IFieldValueMediaRef;\n readonly \"type\": \"mediaRef\";\n}\n\nexport interface IFieldValueUnion_ModelRef {\n readonly \"modelRef\": IFieldValueModelRef;\n readonly \"type\": \"modelRef\";\n}\n\nexport interface IFieldValueUnion_Object {\n readonly \"object\": IFieldValueObjectRef;\n readonly \"type\": \"object\";\n}\n\nexport interface IFieldValueUnion_ResourceRef {\n readonly \"resourceRef\": IFieldValueResourceRef;\n readonly \"type\": \"resourceRef\";\n}\n\nexport interface IFieldValueUnion_String {\n readonly \"string\": IFieldValueString;\n readonly \"type\": \"string\";\n}\n\nexport interface IFieldValueUnion_Text {\n readonly \"text\": IFieldValueText;\n readonly \"type\": \"text\";\n}\n\nexport interface IFieldValueUnion_UnmanagedJson {\n readonly \"unmanagedJson\": IFieldValueUnmanagedJson;\n readonly \"type\": \"unmanagedJson\";\n}\n\nexport interface IFieldValueUnion_UserRef {\n readonly \"userRef\": IFieldValueUserRef;\n readonly \"type\": \"userRef\";\n}\n\nexport type IFieldValueUnion =\n | IFieldValueUnion_Boolean\n | IFieldValueUnion_Datetime\n | IFieldValueUnion_DocRef\n | IFieldValueUnion_Double\n | IFieldValueUnion_Integer\n | IFieldValueUnion_MediaRef\n | IFieldValueUnion_ModelRef\n | IFieldValueUnion_Object\n | IFieldValueUnion_ResourceRef\n | IFieldValueUnion_String\n | IFieldValueUnion_Text\n | IFieldValueUnion_UnmanagedJson\n | IFieldValueUnion_UserRef;\n\nexport interface IFieldValueUnionVisitor<T> {\n readonly \"boolean\": (obj: IFieldValueBoolean) => T;\n readonly \"datetime\": (obj: IFieldValueDatetime) => T;\n readonly \"docRef\": (obj: IFieldValueDocumentRef) => T;\n readonly \"double\": (obj: IFieldValueDouble) => T;\n readonly \"integer\": (obj: IFieldValueInteger) => T;\n readonly \"mediaRef\": (obj: IFieldValueMediaRef) => T;\n readonly \"modelRef\": (obj: IFieldValueModelRef) => T;\n readonly \"object\": (obj: IFieldValueObjectRef) => T;\n readonly \"resourceRef\": (obj: IFieldValueResourceRef) => T;\n readonly \"string\": (obj: IFieldValueString) => T;\n readonly \"text\": (obj: IFieldValueText) => T;\n readonly \"unmanagedJson\": (obj: IFieldValueUnmanagedJson) => T;\n readonly \"userRef\": (obj: IFieldValueUserRef) => T;\n readonly \"unknown\": (obj: IFieldValueUnion) => T;\n}\n\nfunction isBoolean(obj: IFieldValueUnion): obj is IFieldValueUnion_Boolean {\n return (obj.type === \"boolean\");\n}\n\nfunction boolean(obj: IFieldValueBoolean): IFieldValueUnion_Boolean {\n return {\n boolean: obj,\n type: \"boolean\",\n };\n}\n\nfunction isDatetime(obj: IFieldValueUnion): obj is IFieldValueUnion_Datetime {\n return (obj.type === \"datetime\");\n}\n\nfunction datetime(obj: IFieldValueDatetime): IFieldValueUnion_Datetime {\n return {\n datetime: obj,\n type: \"datetime\",\n };\n}\n\nfunction isDocRef(obj: IFieldValueUnion): obj is IFieldValueUnion_DocRef {\n return (obj.type === \"docRef\");\n}\n\nfunction docRef(obj: IFieldValueDocumentRef): IFieldValueUnion_DocRef {\n return {\n docRef: obj,\n type: \"docRef\",\n };\n}\n\nfunction isDouble(obj: IFieldValueUnion): obj is IFieldValueUnion_Double {\n return (obj.type === \"double\");\n}\n\nfunction double(obj: IFieldValueDouble): IFieldValueUnion_Double {\n return {\n double: obj,\n type: \"double\",\n };\n}\n\nfunction isInteger(obj: IFieldValueUnion): obj is IFieldValueUnion_Integer {\n return (obj.type === \"integer\");\n}\n\nfunction integer(obj: IFieldValueInteger): IFieldValueUnion_Integer {\n return {\n integer: obj,\n type: \"integer\",\n };\n}\n\nfunction isMediaRef(obj: IFieldValueUnion): obj is IFieldValueUnion_MediaRef {\n return (obj.type === \"mediaRef\");\n}\n\nfunction mediaRef(obj: IFieldValueMediaRef): IFieldValueUnion_MediaRef {\n return {\n mediaRef: obj,\n type: \"mediaRef\",\n };\n}\n\nfunction isModelRef(obj: IFieldValueUnion): obj is IFieldValueUnion_ModelRef {\n return (obj.type === \"modelRef\");\n}\n\nfunction modelRef(obj: IFieldValueModelRef): IFieldValueUnion_ModelRef {\n return {\n modelRef: obj,\n type: \"modelRef\",\n };\n}\n\nfunction isObject(obj: IFieldValueUnion): obj is IFieldValueUnion_Object {\n return (obj.type === \"object\");\n}\n\nfunction object(obj: IFieldValueObjectRef): IFieldValueUnion_Object {\n return {\n object: obj,\n type: \"object\",\n };\n}\n\nfunction isResourceRef(obj: IFieldValueUnion): obj is IFieldValueUnion_ResourceRef {\n return (obj.type === \"resourceRef\");\n}\n\nfunction resourceRef(obj: IFieldValueResourceRef): IFieldValueUnion_ResourceRef {\n return {\n resourceRef: obj,\n type: \"resourceRef\",\n };\n}\n\nfunction isString(obj: IFieldValueUnion): obj is IFieldValueUnion_String {\n return (obj.type === \"string\");\n}\n\nfunction string(obj: IFieldValueString): IFieldValueUnion_String {\n return {\n string: obj,\n type: \"string\",\n };\n}\n\nfunction isText(obj: IFieldValueUnion): obj is IFieldValueUnion_Text {\n return (obj.type === \"text\");\n}\n\nfunction text(obj: IFieldValueText): IFieldValueUnion_Text {\n return {\n text: obj,\n type: \"text\",\n };\n}\n\nfunction isUnmanagedJson(obj: IFieldValueUnion): obj is IFieldValueUnion_UnmanagedJson {\n return (obj.type === \"unmanagedJson\");\n}\n\nfunction unmanagedJson(obj: IFieldValueUnmanagedJson): IFieldValueUnion_UnmanagedJson {\n return {\n unmanagedJson: obj,\n type: \"unmanagedJson\",\n };\n}\n\nfunction isUserRef(obj: IFieldValueUnion): obj is IFieldValueUnion_UserRef {\n return (obj.type === \"userRef\");\n}\n\nfunction userRef(obj: IFieldValueUserRef): IFieldValueUnion_UserRef {\n return {\n userRef: obj,\n type: \"userRef\",\n };\n}\n\nfunction visit<T>(obj: IFieldValueUnion, visitor: IFieldValueUnionVisitor<T>): T {\n if (isBoolean(obj)) {\n return visitor.boolean(obj.boolean);\n }\n if (isDatetime(obj)) {\n return visitor.datetime(obj.datetime);\n }\n if (isDocRef(obj)) {\n return visitor.docRef(obj.docRef);\n }\n if (isDouble(obj)) {\n return visitor.double(obj.double);\n }\n if (isInteger(obj)) {\n return visitor.integer(obj.integer);\n }\n if (isMediaRef(obj)) {\n return visitor.mediaRef(obj.mediaRef);\n }\n if (isModelRef(obj)) {\n return visitor.modelRef(obj.modelRef);\n }\n if (isObject(obj)) {\n return visitor.object(obj.object);\n }\n if (isResourceRef(obj)) {\n return visitor.resourceRef(obj.resourceRef);\n }\n if (isString(obj)) {\n return visitor.string(obj.string);\n }\n if (isText(obj)) {\n return visitor.text(obj.text);\n }\n if (isUnmanagedJson(obj)) {\n return visitor.unmanagedJson(obj.unmanagedJson);\n }\n if (isUserRef(obj)) {\n return visitor.userRef(obj.userRef);\n }\n return visitor.unknown(obj);\n}\n\nexport const IFieldValueUnion: {\n isBoolean: typeof isBoolean;\n boolean: typeof boolean;\n isDatetime: typeof isDatetime;\n datetime: typeof datetime;\n isDocRef: typeof isDocRef;\n docRef: typeof docRef;\n isDouble: typeof isDouble;\n double: typeof double;\n isInteger: typeof isInteger;\n integer: typeof integer;\n isMediaRef: typeof isMediaRef;\n mediaRef: typeof mediaRef;\n isModelRef: typeof isModelRef;\n modelRef: typeof modelRef;\n isObject: typeof isObject;\n object: typeof object;\n isResourceRef: typeof isResourceRef;\n resourceRef: typeof resourceRef;\n isString: typeof isString;\n string: typeof string;\n isText: typeof isText;\n text: typeof text;\n isUnmanagedJson: typeof isUnmanagedJson;\n unmanagedJson: typeof unmanagedJson;\n isUserRef: typeof isUserRef;\n userRef: typeof userRef;\n visit: typeof visit;\n} = {\n isBoolean: isBoolean,\n boolean: boolean,\n isDatetime: isDatetime,\n datetime: datetime,\n isDocRef: isDocRef,\n docRef: docRef,\n isDouble: isDouble,\n double: double,\n isInteger: isInteger,\n integer: integer,\n isMediaRef: isMediaRef,\n mediaRef: mediaRef,\n isModelRef: isModelRef,\n modelRef: modelRef,\n isObject: isObject,\n object: object,\n isResourceRef: isResourceRef,\n resourceRef: resourceRef,\n isString: isString,\n string: string,\n isText: isText,\n text: text,\n isUnmanagedJson: isUnmanagedJson,\n unmanagedJson: unmanagedJson,\n isUserRef: isUserRef,\n userRef: userRef,\n visit: visit,\n};\n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A,MAAM;EACdC,MAAM,EAAEA,MAAM;EACdC,IAAI,EAAEA,IAAI;EACVC,eAAe,EAAEA,eAAe;EAChCC,aAAa,EAAEA,aAAa;EAC5BC,SAAS,EAAEA,SAAS;EACpBC,OAAO,EAAEA,OAAO;EAChBC,KAAK,EAAEA;AACT,CAAC","ignoreList":[]}
@@ -25,6 +25,7 @@ export * from "./fieldValueInteger.js";
25
25
  export * from "./fieldValueMediaRef.js";
26
26
  export * from "./fieldValueModelRef.js";
27
27
  export * from "./fieldValueObjectRef.js";
28
+ export * from "./fieldValueResourceRef.js";
28
29
  export * from "./fieldValueString.js";
29
30
  export * from "./fieldValueText.js";
30
31
  export * from "./fieldValueUnion.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"./fieldDef.js\";\nexport * from \"./fieldTypeCollection.js\";\nexport * from \"./fieldTypeMap.js\";\nexport * from \"./fieldTypeUnion.js\";\nexport * from \"./fieldValueDatetime.js\";\nexport * from \"./fieldValueDocumentRef.js\";\nexport * from \"./fieldValueDouble.js\";\nexport * from \"./fieldValueInteger.js\";\nexport * from \"./fieldValueMediaRef.js\";\nexport * from \"./fieldValueModelRef.js\";\nexport * from \"./fieldValueObjectRef.js\";\nexport * from \"./fieldValueString.js\";\nexport * from \"./fieldValueText.js\";\nexport * from \"./fieldValueUnion.js\";\nexport * from \"./fieldValueUnmanagedJson.js\";\nexport * from \"./fieldValueUserRef.js\";\nexport * from \"./modelDef.js\";\nexport * from \"./realTimeDocumentSchema.js\";\nexport * from \"./recordDef.js\";\nexport * from \"./schemaMeta.js\";\nexport * from \"./unionDef.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,eAAe;AAC7B,cAAc,0BAA0B;AACxC,cAAc,mBAAmB;AACjC,cAAc,qBAAqB;AACnC,cAAc,yBAAyB;AACvC,cAAc,4BAA4B;AAC1C,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,0BAA0B;AACxC,cAAc,uBAAuB;AACrC,cAAc,qBAAqB;AACnC,cAAc,sBAAsB;AACpC,cAAc,8BAA8B;AAC5C,cAAc,wBAAwB;AACtC,cAAc,eAAe;AAC7B,cAAc,6BAA6B;AAC3C,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"./fieldDef.js\";\nexport * from \"./fieldTypeCollection.js\";\nexport * from \"./fieldTypeMap.js\";\nexport * from \"./fieldTypeUnion.js\";\nexport * from \"./fieldValueDatetime.js\";\nexport * from \"./fieldValueDocumentRef.js\";\nexport * from \"./fieldValueDouble.js\";\nexport * from \"./fieldValueInteger.js\";\nexport * from \"./fieldValueMediaRef.js\";\nexport * from \"./fieldValueModelRef.js\";\nexport * from \"./fieldValueObjectRef.js\";\nexport * from \"./fieldValueResourceRef.js\";\nexport * from \"./fieldValueString.js\";\nexport * from \"./fieldValueText.js\";\nexport * from \"./fieldValueUnion.js\";\nexport * from \"./fieldValueUnmanagedJson.js\";\nexport * from \"./fieldValueUserRef.js\";\nexport * from \"./modelDef.js\";\nexport * from \"./realTimeDocumentSchema.js\";\nexport * from \"./recordDef.js\";\nexport * from \"./schemaMeta.js\";\nexport * from \"./unionDef.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,eAAe;AAC7B,cAAc,0BAA0B;AACxC,cAAc,mBAAmB;AACjC,cAAc,qBAAqB;AACnC,cAAc,yBAAyB;AACvC,cAAc,4BAA4B;AAC1C,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,0BAA0B;AACxC,cAAc,4BAA4B;AAC1C,cAAc,uBAAuB;AACrC,cAAc,qBAAqB;AACnC,cAAc,sBAAsB;AACpC,cAAc,8BAA8B;AAC5C,cAAc,wBAAwB;AACtC,cAAc,eAAe;AAC7B,cAAc,6BAA6B;AAC3C,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,eAAe","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { Metadata } from '@palantir/pack.document-schema.model-types';
4
4
  import { AnimalCatSchema, AnimalDogSchema, AnimalSchema, CatSchema, DogSchema } from './schema.js';
@@ -1 +1 @@
1
- {"version":3,"file":"custom-discriminant.js","names":["Metadata","AnimalCatSchema","AnimalDogSchema","AnimalSchema","CatSchema","DogSchema","CatModel","__type","zodSchema","name","DogModel","AnimalModel","discriminant","AnimalCatModel","AnimalDogModel","DocumentModel","Cat","Dog","Animal","AnimalCat","AnimalDog","version"],"sources":["custom-discriminant.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport type {\n DocumentSchema,\n RecordModel,\n UnionModel,\n} from '@palantir/pack.document-schema.model-types';\nimport { Metadata } from '@palantir/pack.document-schema.model-types';\nimport type { Animal, AnimalCat, AnimalDog, Cat, Dog } from './types.js';\nimport {\n AnimalCatSchema,\n AnimalDogSchema,\n AnimalSchema,\n CatSchema,\n DogSchema,\n} from './schema.js';\n\nexport interface CatModel extends RecordModel<Cat, typeof CatSchema> {}\nexport const CatModel: CatModel = {\n __type: {} as Cat,\n zodSchema: CatSchema,\n [Metadata]: {\n name: 'Cat',\n },\n};\n\nexport interface DogModel extends RecordModel<Dog, typeof DogSchema> {}\nexport const DogModel: DogModel = {\n __type: {} as Dog,\n zodSchema: DogSchema,\n [Metadata]: {\n name: 'Dog',\n },\n};\n\nexport interface AnimalModel extends UnionModel<Animal, typeof AnimalSchema> {}\nexport const AnimalModel: AnimalModel = {\n __type: {} as Animal,\n zodSchema: AnimalSchema,\n [Metadata]: {\n discriminant: 'kind',\n name: 'Animal',\n },\n};\n\nexport interface AnimalCatModel extends UnionModel<\n AnimalCat,\n typeof AnimalCatSchema\n> {}\nexport const AnimalCatModel: AnimalCatModel = {\n __type: {} as AnimalCat,\n zodSchema: AnimalCatSchema,\n [Metadata]: {\n discriminant: 'kind',\n name: 'AnimalCat',\n },\n};\n\nexport interface AnimalDogModel extends UnionModel<\n AnimalDog,\n typeof AnimalDogSchema\n> {}\nexport const AnimalDogModel: AnimalDogModel = {\n __type: {} as AnimalDog,\n zodSchema: AnimalDogSchema,\n [Metadata]: {\n discriminant: 'kind',\n name: 'AnimalDog',\n },\n};\n\nexport const DocumentModel = {\n Cat: CatModel,\n Dog: DogModel,\n Animal: AnimalModel,\n AnimalCat: AnimalCatModel,\n AnimalDog: AnimalDogModel,\n [Metadata]: {\n version: 1,\n },\n} as const sat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C","ignoreList":[]}
1
+ {"version":3,"file":"custom-discriminant.js","names":["Metadata","AnimalCatSchema","AnimalDogSchema","AnimalSchema","CatSchema","DogSchema","CatModel","__type","zodSchema","name","DogModel","AnimalModel","discriminant","AnimalCatModel","AnimalDogModel","DocumentModel","Cat","Dog","Animal","AnimalCat","AnimalDog","version"],"sources":["custom-discriminant.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport type {\n DocumentSchema,\n RecordModel,\n UnionModel,\n} from '@palantir/pack.document-schema.model-types';\nimport { Metadata } from '@palantir/pack.document-schema.model-types';\nimport type { Animal, AnimalCat, AnimalDog, Cat, Dog } from './types.js';\nimport {\n AnimalCatSchema,\n AnimalDogSchema,\n AnimalSchema,\n CatSchema,\n DogSchema,\n} from './schema.js';\n\nexport interface CatModel extends RecordModel<Cat, typeof CatSchema> {}\nexport const CatModel: CatModel = {\n __type: {} as Cat,\n zodSchema: CatSchema,\n [Metadata]: {\n name: 'Cat',\n },\n};\n\nexport interface DogModel extends RecordModel<Dog, typeof DogSchema> {}\nexport const DogModel: DogModel = {\n __type: {} as Dog,\n zodSchema: DogSchema,\n [Metadata]: {\n name: 'Dog',\n },\n};\n\nexport interface AnimalModel extends UnionModel<Animal, typeof AnimalSchema> {}\nexport const AnimalModel: AnimalModel = {\n __type: {} as Animal,\n zodSchema: AnimalSchema,\n [Metadata]: {\n discriminant: 'kind',\n name: 'Animal',\n },\n};\n\nexport interface AnimalCatModel extends UnionModel<\n AnimalCat,\n typeof AnimalCatSchema\n> {}\nexport const AnimalCatModel: AnimalCatModel = {\n __type: {} as AnimalCat,\n zodSchema: AnimalCatSchema,\n [Metadata]: {\n discriminant: 'kind',\n name: 'AnimalCat',\n },\n};\n\nexport interface AnimalDogModel extends UnionModel<\n AnimalDog,\n typeof AnimalDogSchema\n> {}\nexport const AnimalDogModel: AnimalDogModel = {\n __type: {} as AnimalDog,\n zodSchema: AnimalDogSchema,\n [Metadata]: {\n discriminant: 'kind',\n name: 'AnimalDog',\n },\n};\n\nexport const DocumentModel = {\n Cat: CatModel,\n Dog: DogModel,\n Animal: AnimalModel,\n AnimalCat: AnimalCatModel,\n AnimalDog: AnimalDogModel,\n [Metadata]: {\n version: 1,\n },\n} as const satisfies DocumentSchema;\n\nexport type DocumentModel = typeof DocumentModel;\n"],"mappings":"AAAA;;AAOA,SAASA,QAAQ,QAAQ,4CAA4C;AAErE,SACEC,eAAe,EACfC,eAAe,EACfC,YAAY,EACZC,SAAS,EACTC,SAAS,QACJ,aAAa;AAGpB,OAAO,MAAMC,QAAkB,GAAG;EAChCC,MAAM,EAAE,CAAC,CAAQ;EACjBC,SAAS,EAAEJ,SAAS;EACpB,CAACJ,QAAQ,GAAG;IACVS,IAAI,EAAE;EACR;AACF,CAAC;AAGD,OAAO,MAAMC,QAAkB,GAAG;EAChCH,MAAM,EAAE,CAAC,CAAQ;EACjBC,SAAS,EAAEH,SAAS;EACpB,CAACL,QAAQ,GAAG;IACVS,IAAI,EAAE;EACR;AACF,CAAC;AAGD,OAAO,MAAME,WAAwB,GAAG;EACtCJ,MAAM,EAAE,CAAC,CAAW;EACpBC,SAAS,EAAEL,YAAY;EACvB,CAACH,QAAQ,GAAG;IACVY,YAAY,EAAE,MAAM;IACpBH,IAAI,EAAE;EACR;AACF,CAAC;AAMD,OAAO,MAAMI,cAA8B,GAAG;EAC5CN,MAAM,EAAE,CAAC,CAAc;EACvBC,SAAS,EAAEP,eAAe;EAC1B,CAACD,QAAQ,GAAG;IACVY,YAAY,EAAE,MAAM;IACpBH,IAAI,EAAE;EACR;AACF,CAAC;AAMD,OAAO,MAAMK,cAA8B,GAAG;EAC5CP,MAAM,EAAE,CAAC,CAAc;EACvBC,SAAS,EAAEN,eAAe;EAC1B,CAACF,QAAQ,GAAG;IACVY,YAAY,EAAE,MAAM;IACpBH,IAAI,EAAE;EACR;AACF,CAAC;AAED,OAAO,MAAMM,aAAa,GAAG;EAC3BC,GAAG,EAAEV,QAAQ;EACbW,GAAG,EAAEP,QAAQ;EACbQ,MAAM,EAAEP,WAAW;EACnBQ,SAAS,EAAEN,cAAc;EACzBO,SAAS,EAAEN,cAAc;EACzB,CAACd,QAAQ,GAAG;IACVqB,OAAO,EAAE;EACX;AACF,CAAmC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { Metadata } from '@palantir/pack.document-schema.model-types';
4
4
  import { EventSchema } from './schema.js';
@@ -8,7 +8,8 @@ export const EventModel = {
8
8
  [Metadata]: {
9
9
  externalRefFieldTypes: {
10
10
  documentRef: 'docRef',
11
- userRef: 'userRef'
11
+ userRef: 'userRef',
12
+ resourceRef: 'resourceRef'
12
13
  },
13
14
  name: 'Event'
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"external-refs.js","names":["Metadata","EventSchema","EventModel","__type","zodSchema","externalRefFieldTypes","documentRef","userRef","name","DocumentModel","Event","version"],"sources":["external-refs.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport type {\n DocumentSchema,\n RecordModel,\n UnionModel,\n} from '@palantir/pack.document-schema.model-types';\nimport { Metadata } from '@palantir/pack.document-schema.model-types';\nimport type { Event } from './types.js';\nimport { EventSchema } from './schema.js';\n\nexport interface EventModel extends RecordModel<Event, typeof EventSchema> {}\nexport const EventModel: EventModel = {\n __type: {} as Event,\n zodSchema: EventSchema,\n [Metadata]: {\n externalRefFieldTypes: {\n documentRef: 'docRef',\n userRef: 'userRef',\n },\n name: 'Event',\n },\n};\n\nexport const DocumentModel = {\n Event: EventModel,\n [Metadata]: {\n version: 1,\n },\n} as const satisfies DocumentSchema;\n\nexport type DocumentModel = typeof DocumentModel;\n"],"mappings":"AAAA;;AAOA,SAASA,QAAQ,QAAQ,4CAA4C;AAErE,SAASC,WAAW,QAAQ,aAAa;AAGzC,OAAO,MAAMC,UAAsB,GAAG;EACpCC,MAAM,EAAE,CAAC,CAAU;EACnBC,SAAS,EAAEH,WAAW;EACtB,CAACD,QAAQ,GAAG;IACVK,qBAAqB,EAAE;MACrBC,WAAW,EAAE,QAAQ;MACrBC,OAAO,EAAE;IACX,CAAC;IACDC,IAAI,EAAE;EACR;AACF,CAAC;AAED,OAAO,MAAMC,aAAa,GAAG;EAC3BC,KAAK,EAAER,UAAU;EACjB,CAACF,QAAQ,GAAG;IACVW,OAAO,EAAE;EACX;AACF,CAAmC","ignoreList":[]}
1
+ {"version":3,"file":"external-refs.js","names":["Metadata","EventSchema","EventModel","__type","zodSchema","externalRefFieldTypes","documentRef","userRef","resourceRef","name","DocumentModel","Event","version"],"sources":["external-refs.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport type {\n DocumentSchema,\n RecordModel,\n UnionModel,\n} from '@palantir/pack.document-schema.model-types';\nimport { Metadata } from '@palantir/pack.document-schema.model-types';\nimport type { Event } from './types.js';\nimport { EventSchema } from './schema.js';\n\nexport interface EventModel extends RecordModel<Event, typeof EventSchema> {}\nexport const EventModel: EventModel = {\n __type: {} as Event,\n zodSchema: EventSchema,\n [Metadata]: {\n externalRefFieldTypes: {\n documentRef: 'docRef',\n userRef: 'userRef',\n resourceRef: 'resourceRef',\n },\n name: 'Event',\n },\n};\n\nexport const DocumentModel = {\n Event: EventModel,\n [Metadata]: {\n version: 1,\n },\n} as const satisfies DocumentSchema;\n\nexport type DocumentModel = typeof DocumentModel;\n"],"mappings":"AAAA;;AAOA,SAASA,QAAQ,QAAQ,4CAA4C;AAErE,SAASC,WAAW,QAAQ,aAAa;AAGzC,OAAO,MAAMC,UAAsB,GAAG;EACpCC,MAAM,EAAE,CAAC,CAAU;EACnBC,SAAS,EAAEH,WAAW;EACtB,CAACD,QAAQ,GAAG;IACVK,qBAAqB,EAAE;MACrBC,WAAW,EAAE,QAAQ;MACrBC,OAAO,EAAE,SAAS;MAClBC,WAAW,EAAE;IACf,CAAC;IACDC,IAAI,EAAE;EACR;AACF,CAAC;AAED,OAAO,MAAMC,aAAa,GAAG;EAC3BC,KAAK,EAAET,UAAU;EACjB,CAACF,QAAQ,GAAG;IACVY,OAAO,EAAE;EACX;AACF,CAAmC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { Metadata } from '@palantir/pack.document-schema.model-types';
4
4
  import { PersonSchema } from './schema.js';
@@ -1 +1 @@
1
- {"version":3,"file":"simple-record.js","names":["Metadata","PersonSchema","PersonModel","__type","zodSchema","name","DocumentModel","Person","version"],"sources":["simple-record.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport type {\n DocumentSchema,\n RecordModel,\n UnionModel,\n} from '@palantir/pack.document-schema.model-types';\nimport { Metadata } from '@palantir/pack.document-schema.model-types';\nimport type { Person } from './types.js';\nimport { PersonSchema } from './schema.js';\n\nexport interface PersonModel extends RecordModel<Person, typeof PersonSchema> {}\nexport const PersonModel: PersonModel = {\n __type: {} as Person,\n zodSchema: PersonSchema,\n [Metadata]: {\n name: 'Person',\n },\n};\n\nexport const DocumentModel = {\n Person: PersonModel,\n [Metadata]: {\n version: 1,\n },\n} as const satisfies DocumentSchema;\n\nexport type DocumentModel = typeof DocumentModel;\n"],"mappings":"AAAA;;AAOA,SAASA,QAAQ,QAAQ,4CAA4C;AAErE,SAASC,YAAY,QAAQ,aAAa;AAG1C,OAAO,MAAMC,WAAwB,GAAG;EACtCC,MAAM,EAAE,CAAC,CAAW;EACpBC,SAAS,EAAEH,YAAY;EACvB,CAACD,QAAQ,GAAG;IACVK,IAAI,EAAE;EACR;AACF,CAAC;AAED,OAAO,MAAMC,aAAa,GAAG;EAC3BC,MAAM,EAAEL,WAAW;EACnB,CAACF,QAAQ,GAAG;IACVQ,OAAO,EAAE;EACX;AACF,CAAmC","ignoreList":[]}
1
+ {"version":3,"file":"simple-record.js","names":["Metadata","PersonSchema","PersonModel","__type","zodSchema","name","DocumentModel","Person","version"],"sources":["simple-record.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport type {\n DocumentSchema,\n RecordModel,\n UnionModel,\n} from '@palantir/pack.document-schema.model-types';\nimport { Metadata } from '@palantir/pack.document-schema.model-types';\nimport type { Person } from './types.js';\nimport { PersonSchema } from './schema.js';\n\nexport interface PersonModel extends RecordModel<Person, typeof PersonSchema> {}\nexport const PersonModel: PersonModel = {\n __type: {} as Person,\n zodSchema: PersonSchema,\n [Metadata]: {\n name: 'Person',\n },\n};\n\nexport const DocumentModel = {\n Person: PersonModel,\n [Metadata]: {\n version: 1,\n },\n} as const satisfies DocumentSchema;\n\nexport type DocumentModel = typeof DocumentModel;\n"],"mappings":"AAAA;;AAOA,SAASA,QAAQ,QAAQ,4CAA4C;AAErE,SAASC,YAAY,QAAQ,aAAa;AAG1C,OAAO,MAAMC,WAAwB,GAAG;EACtCC,MAAM,EAAE,CAAC,CAAW;EACpBC,SAAS,EAAEH,YAAY;EACvB,CAACD,QAAQ,GAAG;IACVK,IAAI,EAAE;EACR;AACF,CAAC;AAED,OAAO,MAAMC,aAAa,GAAG;EAC3BC,MAAM,EAAEL,WAAW;EACnB,CAACF,QAAQ,GAAG;IACVQ,OAAO,EAAE;EACX;AACF,CAAmC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { Metadata } from '@palantir/pack.document-schema.model-types';
4
4
  import { NodeObjectSchema, NodeSchema, NodeTextBoxSchema, ObjectNodeSchema, TextBoxSchema } from './schema.js';
@@ -1 +1 @@
1
- {"version":3,"file":"union-types.js","names":["Metadata","NodeObjectSchema","NodeSchema","NodeTextBoxSchema","ObjectNodeSchema","TextBoxSchema","ObjectNodeModel","__type","zodSchema","name","TextBoxModel","NodeModel","discriminant","NodeObjectModel","NodeTextBoxModel","DocumentModel","ObjectNode","TextBox","Node","NodeObject","NodeTextBox","version"],"sources":["union-types.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport type {\n DocumentSchema,\n RecordModel,\n UnionModel,\n} from '@palantir/pack.document-schema.model-types';\nimport { Metadata } from '@palantir/pack.document-schema.model-types';\nimport type {\n Node,\n NodeObject,\n NodeTextBox,\n ObjectNode,\n TextBox,\n} from './types.js';\nimport {\n NodeObjectSchema,\n NodeSchema,\n NodeTextBoxSchema,\n ObjectNodeSchema,\n TextBoxSchema,\n} from './schema.js';\n\nexport interface ObjectNodeModel extends RecordModel<\n ObjectNode,\n typeof ObjectNodeSchema\n> {}\nexport const ObjectNodeModel: ObjectNodeModel = {\n __type: {} as ObjectNode,\n zodSchema: ObjectNodeSchema,\n [Metadata]: {\n name: 'ObjectNode',\n },\n};\n\nexport interface TextBoxModel extends RecordModel<\n TextBox,\n typeof TextBoxSchema\n> {}\nexport const TextBoxModel: TextBoxModel = {\n __type: {} as TextBox,\n zodSchema: TextBoxSchema,\n [Metadata]: {\n name: 'TextBox',\n },\n};\n\nexport interface NodeModel extends UnionModel<Node, typeof NodeSchema> {}\nexport const NodeModel: NodeModel = {\n __type: {} as Node,\n zodSchema: NodeSchema,\n [Metadata]: {\n discriminant: 'type',\n name: 'Node',\n },\n};\n\nexport interface NodeObjectModel extends UnionModel<\n NodeObject,\n typeof NodeObjectSchema\n> {}\nexport const NodeObjectModel: NodeObjectModel = {\n __type: {} as NodeObject,\n zodSchema: NodeObjectSchema,\n [Metadata]: {\n discriminant: 'type',\n name: 'NodeObject',\n },\n};\n\nexport interface NodeTextBoxModel extends UnionModel<\n NodeTextBox,\n typeof NodeTextBoxSchema\n> {}\nexport const NodeTextBoxModel: NodeTextBoxModel = {\n __type: {} as NodeTextBox,\n zodSchema: NodeTextBoxSchema,\n [Metadata]: {\n discriminant: 'type',\n name: 'NodeTextBox',\n },\n};\n\nexport const DocumentModel = {\n ObjectNode: ObjectNodeModel,\n TextBox: TextBoxModel,\n Node: NodeModel,\n NodeObject: NodeObjectModel,\n NodeTextBox: NodeTextBoxModel,\n [Metadata]: {\n version: 1,\n },\n} as const satisfies DocumentSchema;\n\nexport type DocumentModel = typeof DocumentModel;\n"],"mappings":"AAAA;;AAOA,SAASA,QAAQ,QAAQ,4CAA4C;AAQrE,SACEC,gBAAgB,EAChBC,UAAU,EACVC,iBAAiB,EACjBC,gBAAgB,EAChBC,aAAa,QACR,aAAa;AAMpB,OAAO,MAAMC,eAAgC,GAAG;EAC9CC,MAAM,EAAE,CAAC,CAAe;EACxBC,SAAS,EAAEJ,gBAAgB;EAC3B,CAACJ,QAAQ,GAAG;IACVS,IAAI,EAAE;EACR;AACF,CAAC;AAMD,OAAO,MAAMC,YAA0B,GAAG;EACxCH,MAAM,EAAE,CAAC,CAAY;EACrBC,SAAS,EAAEH,aAAa;EACxB,CAACL,QAAQ,GAAG;IACVS,IAAI,EAAE;EACR;AACF,CAAC;AAGD,OAAO,MAAME,SAAoB,GAAG;EAClCJ,MAAM,EAAE,CAAC,CAAS;EAClBC,SAAS,EAAEN,UAAU;EACrB,CAACF,QAAQ,GAAG;IACVY,YAAY,EAAE,MAAM;IACpBH,IAAI,EAAE;EACR;AACF,CAAC;AAMD,OAAO,MAAMI,eAAgC,GAAG;EAC9CN,MAAM,EAAE,CAAC,CAAe;EACxBC,SAAS,EAAEP,gBAAgB;EAC3B,CAACD,QAAQ,GAAG;IACVY,YAAY,EAAE,MAAM;IACpBH,IAAI,EAAE;EACR;AACF,CAAC;AAMD,OAAO,MAAMK,gBAAkC,GAAG;EAChDP,MAAM,EAAE,CAAC,CAAgB;EACzBC,SAAS,EAAEL,iBAAiB;EAC5B,CAACH,QAAQ,GAAG;IACVY,YAAY,EAAE,MAAM;IACpBH,IAAI,EAAE;EACR;AACF,CAAC;AAED,OAAO,MAAMM,aAAa,GAAG;EAC3BC,UAAU,EAAEV,eAAe;EAC3BW,OAAO,EAAEP,YAAY;EACrBQ,IAAI,EAAEP,SAAS;EACfQ,UAAU,EAAEN,eAAe;EAC3BO,WAAW,EAAEN,gBAAgB;EAC7B,CAACd,QAAQ,GAAG;IACVqB,OAAO,EAAE;EACX;AACF,CAAmC","ignoreList":[]}
1
+ {"version":3,"file":"union-types.js","names":["Metadata","NodeObjectSchema","NodeSchema","NodeTextBoxSchema","ObjectNodeSchema","TextBoxSchema","ObjectNodeModel","__type","zodSchema","name","TextBoxModel","NodeModel","discriminant","NodeObjectModel","NodeTextBoxModel","DocumentModel","ObjectNode","TextBox","Node","NodeObject","NodeTextBox","version"],"sources":["union-types.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport type {\n DocumentSchema,\n RecordModel,\n UnionModel,\n} from '@palantir/pack.document-schema.model-types';\nimport { Metadata } from '@palantir/pack.document-schema.model-types';\nimport type {\n Node,\n NodeObject,\n NodeTextBox,\n ObjectNode,\n TextBox,\n} from './types.js';\nimport {\n NodeObjectSchema,\n NodeSchema,\n NodeTextBoxSchema,\n ObjectNodeSchema,\n TextBoxSchema,\n} from './schema.js';\n\nexport interface ObjectNodeModel extends RecordModel<\n ObjectNode,\n typeof ObjectNodeSchema\n> {}\nexport const ObjectNodeModel: ObjectNodeModel = {\n __type: {} as ObjectNode,\n zodSchema: ObjectNodeSchema,\n [Metadata]: {\n name: 'ObjectNode',\n },\n};\n\nexport interface TextBoxModel extends RecordModel<\n TextBox,\n typeof TextBoxSchema\n> {}\nexport const TextBoxModel: TextBoxModel = {\n __type: {} as TextBox,\n zodSchema: TextBoxSchema,\n [Metadata]: {\n name: 'TextBox',\n },\n};\n\nexport interface NodeModel extends UnionModel<Node, typeof NodeSchema> {}\nexport const NodeModel: NodeModel = {\n __type: {} as Node,\n zodSchema: NodeSchema,\n [Metadata]: {\n discriminant: 'type',\n name: 'Node',\n },\n};\n\nexport interface NodeObjectModel extends UnionModel<\n NodeObject,\n typeof NodeObjectSchema\n> {}\nexport const NodeObjectModel: NodeObjectModel = {\n __type: {} as NodeObject,\n zodSchema: NodeObjectSchema,\n [Metadata]: {\n discriminant: 'type',\n name: 'NodeObject',\n },\n};\n\nexport interface NodeTextBoxModel extends UnionModel<\n NodeTextBox,\n typeof NodeTextBoxSchema\n> {}\nexport const NodeTextBoxModel: NodeTextBoxModel = {\n __type: {} as NodeTextBox,\n zodSchema: NodeTextBoxSchema,\n [Metadata]: {\n discriminant: 'type',\n name: 'NodeTextBox',\n },\n};\n\nexport const DocumentModel = {\n ObjectNode: ObjectNodeModel,\n TextBox: TextBoxModel,\n Node: NodeModel,\n NodeObject: NodeObjectModel,\n NodeTextBox: NodeTextBoxModel,\n [Metadata]: {\n version: 1,\n },\n} as const satisfies DocumentSchema;\n\nexport type DocumentModel = typeof DocumentModel;\n"],"mappings":"AAAA;;AAOA,SAASA,QAAQ,QAAQ,4CAA4C;AAQrE,SACEC,gBAAgB,EAChBC,UAAU,EACVC,iBAAiB,EACjBC,gBAAgB,EAChBC,aAAa,QACR,aAAa;AAMpB,OAAO,MAAMC,eAAgC,GAAG;EAC9CC,MAAM,EAAE,CAAC,CAAe;EACxBC,SAAS,EAAEJ,gBAAgB;EAC3B,CAACJ,QAAQ,GAAG;IACVS,IAAI,EAAE;EACR;AACF,CAAC;AAMD,OAAO,MAAMC,YAA0B,GAAG;EACxCH,MAAM,EAAE,CAAC,CAAY;EACrBC,SAAS,EAAEH,aAAa;EACxB,CAACL,QAAQ,GAAG;IACVS,IAAI,EAAE;EACR;AACF,CAAC;AAGD,OAAO,MAAME,SAAoB,GAAG;EAClCJ,MAAM,EAAE,CAAC,CAAS;EAClBC,SAAS,EAAEN,UAAU;EACrB,CAACF,QAAQ,GAAG;IACVY,YAAY,EAAE,MAAM;IACpBH,IAAI,EAAE;EACR;AACF,CAAC;AAMD,OAAO,MAAMI,eAAgC,GAAG;EAC9CN,MAAM,EAAE,CAAC,CAAe;EACxBC,SAAS,EAAEP,gBAAgB;EAC3B,CAACD,QAAQ,GAAG;IACVY,YAAY,EAAE,MAAM;IACpBH,IAAI,EAAE;EACR;AACF,CAAC;AAMD,OAAO,MAAMK,gBAAkC,GAAG;EAChDP,MAAM,EAAE,CAAC,CAAgB;EACzBC,SAAS,EAAEL,iBAAiB;EAC5B,CAACH,QAAQ,GAAG;IACVY,YAAY,EAAE,MAAM;IACpBH,IAAI,EAAE;EACR;AACF,CAAC;AAED,OAAO,MAAMM,aAAa,GAAG;EAC3BC,UAAU,EAAEV,eAAe;EAC3BW,OAAO,EAAEP,YAAY;EACrBQ,IAAI,EAAEP,SAAS;EACfQ,UAAU,EAAEN,eAAe;EAC3BO,WAAW,EAAEN,gBAAgB;EAC7B,CAACd,QAAQ,GAAG;IACVqB,OAAO,EAAE;EACX;AACF,CAAmC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { z } from 'zod';
4
4
  export const ContainerSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"array-and-map-types.js","names":["z","ContainerSchema","object","tags","array","string","metadata","record","unknown"],"sources":["array-and-map-types.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport { z } from 'zod';\n\nexport const ContainerSchema = z.object({\n tags: z.array(z.string()),\n metadata: z.record(z.string(), z.unknown()),\n});\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,eAAe,GAAGD,CAAC,CAACE,MAAM,CAAC;EACtCC,IAAI,EAAEH,CAAC,CAACI,KAAK,CAACJ,CAAC,CAACK,MAAM,CAAC,CAAC,CAAC;EACzBC,QAAQ,EAAEN,CAAC,CAACO,MAAM,CAACP,CAAC,CAACK,MAAM,CAAC,CAAC,EAAEL,CAAC,CAACQ,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"array-and-map-types.js","names":["z","ContainerSchema","object","tags","array","string","metadata","record","unknown"],"sources":["array-and-map-types.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport { z } from 'zod';\n\nexport const ContainerSchema = z.object({\n tags: z.array(z.string()),\n metadata: z.record(z.string(), z.unknown()),\n});\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,eAAe,GAAGD,CAAC,CAACE,MAAM,CAAC;EACtCC,IAAI,EAAEH,CAAC,CAACI,KAAK,CAACJ,CAAC,CAACK,MAAM,CAAC,CAAC,CAAC;EACzBC,QAAQ,EAAEN,CAAC,CAACO,MAAM,CAACP,CAAC,CAACK,MAAM,CAAC,CAAC,EAAEL,CAAC,CAACQ,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { z } from 'zod';
4
4
  export const FeatureSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"boolean-fields.js","names":["z","FeatureSchema","object","enabled","boolean","isPublic","optional","flags","array"],"sources":["boolean-fields.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport { z } from 'zod';\n\nexport const FeatureSchema = z.object({\n enabled: z.boolean(),\n isPublic: z.boolean().optional(),\n flags: z.array(z.boolean()),\n});\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,aAAa,GAAGD,CAAC,CAACE,MAAM,CAAC;EACpCC,OAAO,EAAEH,CAAC,CAACI,OAAO,CAAC,CAAC;EACpBC,QAAQ,EAAEL,CAAC,CAACI,OAAO,CAAC,CAAC,CAACE,QAAQ,CAAC,CAAC;EAChCC,KAAK,EAAEP,CAAC,CAACQ,KAAK,CAACR,CAAC,CAACI,OAAO,CAAC,CAAC;AAC5B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"boolean-fields.js","names":["z","FeatureSchema","object","enabled","boolean","isPublic","optional","flags","array"],"sources":["boolean-fields.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport { z } from 'zod';\n\nexport const FeatureSchema = z.object({\n enabled: z.boolean(),\n isPublic: z.boolean().optional(),\n flags: z.array(z.boolean()),\n});\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,aAAa,GAAGD,CAAC,CAACE,MAAM,CAAC;EACpCC,OAAO,EAAEH,CAAC,CAACI,OAAO,CAAC,CAAC;EACpBC,QAAQ,EAAEL,CAAC,CAACI,OAAO,CAAC,CAAC,CAACE,QAAQ,CAAC,CAAC;EAChCC,KAAK,EAAEP,CAAC,CAACQ,KAAK,CAACR,CAAC,CAACI,OAAO,CAAC,CAAC;AAC5B,CAAC,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { z } from 'zod';
4
4
  export const CatSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"custom-discriminant.js","names":["z","CatSchema","object","meow","string","DogSchema","bark","AnimalCatSchema","extend","kind","literal","AnimalDogSchema","AnimalSchema","discriminatedUnion"],"sources":["custom-discriminant.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport { z } from 'zod';\n\nexport const CatSchema = z.object({\n meow: z.string(),\n});\n\nexport const DogSchema = z.object({\n bark: z.string(),\n});\n\nexport const AnimalCatSchema = CatSchema.extend({\n kind: z.literal('cat'),\n});\n\nexport const AnimalDogSchema = DogSchema.extend({\n kind: z.literal('dog'),\n});\n\nexport const AnimalSchema = z.discriminatedUnion('kind', [\n AnimalCatSchema,\n AnimalDogSchema,\n]);\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAChCC,IAAI,EAAEH,CAAC,CAACI,MAAM,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,MAAMC,SAAS,GAAGL,CAAC,CAACE,MAAM,CAAC;EAChCI,IAAI,EAAEN,CAAC,CAACI,MAAM,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,MAAMG,eAAe,GAAGN,SAAS,CAACO,MAAM,CAAC;EAC9CC,IAAI,EAAET,CAAC,CAACU,OAAO,CAAC,KAAK;AACvB,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAGN,SAAS,CAACG,MAAM,CAAC;EAC9CC,IAAI,EAAET,CAAC,CAACU,OAAO,CAAC,KAAK;AACvB,CAAC,CAAC;AAEF,OAAO,MAAME,YAAY,GAAGZ,CAAC,CAACa,kBAAkB,CAAC,MAAM,EAAE,CACvDN,eAAe,EACfI,eAAe,CAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"custom-discriminant.js","names":["z","CatSchema","object","meow","string","DogSchema","bark","AnimalCatSchema","extend","kind","literal","AnimalDogSchema","AnimalSchema","discriminatedUnion"],"sources":["custom-discriminant.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport { z } from 'zod';\n\nexport const CatSchema = z.object({\n meow: z.string(),\n});\n\nexport const DogSchema = z.object({\n bark: z.string(),\n});\n\nexport const AnimalCatSchema = CatSchema.extend({\n kind: z.literal('cat'),\n});\n\nexport const AnimalDogSchema = DogSchema.extend({\n kind: z.literal('dog'),\n});\n\nexport const AnimalSchema = z.discriminatedUnion('kind', [\n AnimalCatSchema,\n AnimalDogSchema,\n]);\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAChCC,IAAI,EAAEH,CAAC,CAACI,MAAM,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,MAAMC,SAAS,GAAGL,CAAC,CAACE,MAAM,CAAC;EAChCI,IAAI,EAAEN,CAAC,CAACI,MAAM,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,MAAMG,eAAe,GAAGN,SAAS,CAACO,MAAM,CAAC;EAC9CC,IAAI,EAAET,CAAC,CAACU,OAAO,CAAC,KAAK;AACvB,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAGN,SAAS,CAACG,MAAM,CAAC;EAC9CC,IAAI,EAAET,CAAC,CAACU,OAAO,CAAC,KAAK;AACvB,CAAC,CAAC;AAEF,OAAO,MAAME,YAAY,GAAGZ,CAAC,CAACa,kBAAkB,CAAC,MAAM,EAAE,CACvDN,eAAe,EACfI,eAAe,CAChB,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { z } from 'zod';
4
4
  export const EventSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"datetime-fields.js","names":["z","EventSchema","object","timestamp","string","datetime"],"sources":["datetime-fields.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport { z } from 'zod';\n\nexport const EventSchema = z.object({\n timestamp: z.string().datetime(),\n});\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,WAAW,GAAGD,CAAC,CAACE,MAAM,CAAC;EAClCC,SAAS,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"datetime-fields.js","names":["z","EventSchema","object","timestamp","string","datetime"],"sources":["datetime-fields.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport { z } from 'zod';\n\nexport const EventSchema = z.object({\n timestamp: z.string().datetime(),\n});\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,WAAW,GAAGD,CAAC,CAACE,MAAM,CAAC;EAClCC,SAAS,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { z } from 'zod';
4
4
  export const PersonSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"simple-records.js","names":["z","PersonSchema","object","name","string","min","max","age","number","int","email","optional"],"sources":["simple-records.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport { z } from 'zod';\n\nexport const PersonSchema = z.object({\n name: z.string().min(2).max(50),\n age: z.number().int().min(0).max(150),\n email: z.string().optional(),\n});\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,YAAY,GAAGD,CAAC,CAACE,MAAM,CAAC;EACnCC,IAAI,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,EAAE,CAAC;EAC/BC,GAAG,EAAEP,CAAC,CAACQ,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAACJ,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,GAAG,CAAC;EACrCI,KAAK,EAAEV,CAAC,CAACI,MAAM,CAAC,CAAC,CAACO,QAAQ,CAAC;AAC7B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"simple-records.js","names":["z","PersonSchema","object","name","string","min","max","age","number","int","email","optional"],"sources":["simple-records.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport { z } from 'zod';\n\nexport const PersonSchema = z.object({\n name: z.string().min(2).max(50),\n age: z.number().int().min(0).max(150),\n email: z.string().optional(),\n});\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,YAAY,GAAGD,CAAC,CAACE,MAAM,CAAC;EACnCC,IAAI,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,EAAE,CAAC;EAC/BC,GAAG,EAAEP,CAAC,CAACQ,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAACJ,GAAG,CAAC,CAAC,CAAC,CAACC,GAAG,CAAC,GAAG,CAAC;EACrCI,KAAK,EAAEV,CAAC,CAACI,MAAM,CAAC,CAAC,CAACO,QAAQ,CAAC;AAC7B,CAAC,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { z } from 'zod';
4
4
  export const FooSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"union-before-records.js","names":["z","FooSchema","object","value","string","BarSchema","count","number","int","FooBarFooSchema","extend","type","literal","FooBarBarSchema","FooBarSchema","discriminatedUnion"],"sources":["union-before-records.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport { z } from 'zod';\n\nexport const FooSchema = z.object({\n value: z.string(),\n});\n\nexport const BarSchema = z.object({\n count: z.number().int(),\n});\n\nexport const FooBarFooSchema = FooSchema.extend({\n type: z.literal('foo'),\n});\n\nexport const FooBarBarSchema = BarSchema.extend({\n type: z.literal('bar'),\n});\n\nexport const FooBarSchema = z.discriminatedUnion('type', [\n FooBarFooSchema,\n FooBarBarSchema,\n]);\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAChCC,KAAK,EAAEH,CAAC,CAACI,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,MAAMC,SAAS,GAAGL,CAAC,CAACE,MAAM,CAAC;EAChCI,KAAK,EAAEN,CAAC,CAACO,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC;AACxB,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAGR,SAAS,CAACS,MAAM,CAAC;EAC9CC,IAAI,EAAEX,CAAC,CAACY,OAAO,CAAC,KAAK;AACvB,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAGR,SAAS,CAACK,MAAM,CAAC;EAC9CC,IAAI,EAAEX,CAAC,CAACY,OAAO,CAAC,KAAK;AACvB,CAAC,CAAC;AAEF,OAAO,MAAME,YAAY,GAAGd,CAAC,CAACe,kBAAkB,CAAC,MAAM,EAAE,CACvDN,eAAe,EACfI,eAAe,CAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"union-before-records.js","names":["z","FooSchema","object","value","string","BarSchema","count","number","int","FooBarFooSchema","extend","type","literal","FooBarBarSchema","FooBarSchema","discriminatedUnion"],"sources":["union-before-records.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport { z } from 'zod';\n\nexport const FooSchema = z.object({\n value: z.string(),\n});\n\nexport const BarSchema = z.object({\n count: z.number().int(),\n});\n\nexport const FooBarFooSchema = FooSchema.extend({\n type: z.literal('foo'),\n});\n\nexport const FooBarBarSchema = BarSchema.extend({\n type: z.literal('bar'),\n});\n\nexport const FooBarSchema = z.discriminatedUnion('type', [\n FooBarFooSchema,\n FooBarBarSchema,\n]);\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAChCC,KAAK,EAAEH,CAAC,CAACI,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,MAAMC,SAAS,GAAGL,CAAC,CAACE,MAAM,CAAC;EAChCI,KAAK,EAAEN,CAAC,CAACO,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC;AACxB,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAGR,SAAS,CAACS,MAAM,CAAC;EAC9CC,IAAI,EAAEX,CAAC,CAACY,OAAO,CAAC,KAAK;AACvB,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAGR,SAAS,CAACK,MAAM,CAAC;EAC9CC,IAAI,EAAEX,CAAC,CAACY,OAAO,CAAC,KAAK;AACvB,CAAC,CAAC;AAEF,OAAO,MAAME,YAAY,GAAGd,CAAC,CAACe,kBAAkB,CAAC,MAAM,EAAE,CACvDN,eAAe,EACfI,eAAe,CAChB,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */
2
2
 
3
3
  import { z } from 'zod';
4
4
  export const ObjectNodeSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"union-types.js","names":["z","ObjectNodeSchema","object","x","number","y","label","string","optional","TextBoxSchema","text","NodeObjectSchema","extend","type","literal","NodeTextBoxSchema","NodeSchema","discriminatedUnion"],"sources":["union-types.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.20.0 */\n\nimport { z } from 'zod';\n\nexport const ObjectNodeSchema = z.object({\n x: z.number(),\n y: z.number(),\n label: z.string().optional(),\n});\n\nexport const TextBoxSchema = z.object({\n x: z.number(),\n y: z.number(),\n text: z.string(),\n});\n\nexport const NodeObjectSchema = ObjectNodeSchema.extend({\n type: z.literal('object'),\n});\n\nexport const NodeTextBoxSchema = TextBoxSchema.extend({\n type: z.literal('text-box'),\n});\n\nexport const NodeSchema = z.discriminatedUnion('type', [\n NodeObjectSchema,\n NodeTextBoxSchema,\n]);\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,gBAAgB,GAAGD,CAAC,CAACE,MAAM,CAAC;EACvCC,CAAC,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EACbC,CAAC,EAAEL,CAAC,CAACI,MAAM,CAAC,CAAC;EACbE,KAAK,EAAEN,CAAC,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,MAAMC,aAAa,GAAGT,CAAC,CAACE,MAAM,CAAC;EACpCC,CAAC,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EACbC,CAAC,EAAEL,CAAC,CAACI,MAAM,CAAC,CAAC;EACbM,IAAI,EAAEV,CAAC,CAACO,MAAM,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,MAAMI,gBAAgB,GAAGV,gBAAgB,CAACW,MAAM,CAAC;EACtDC,IAAI,EAAEb,CAAC,CAACc,OAAO,CAAC,QAAQ;AAC1B,CAAC,CAAC;AAEF,OAAO,MAAMC,iBAAiB,GAAGN,aAAa,CAACG,MAAM,CAAC;EACpDC,IAAI,EAAEb,CAAC,CAACc,OAAO,CAAC,UAAU;AAC5B,CAAC,CAAC;AAEF,OAAO,MAAME,UAAU,GAAGhB,CAAC,CAACiB,kBAAkB,CAAC,MAAM,EAAE,CACrDN,gBAAgB,EAChBI,iBAAiB,CAClB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"union-types.js","names":["z","ObjectNodeSchema","object","x","number","y","label","string","optional","TextBoxSchema","text","NodeObjectSchema","extend","type","literal","NodeTextBoxSchema","NodeSchema","discriminatedUnion"],"sources":["union-types.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.25.0 */\n\nimport { z } from 'zod';\n\nexport const ObjectNodeSchema = z.object({\n x: z.number(),\n y: z.number(),\n label: z.string().optional(),\n});\n\nexport const TextBoxSchema = z.object({\n x: z.number(),\n y: z.number(),\n text: z.string(),\n});\n\nexport const NodeObjectSchema = ObjectNodeSchema.extend({\n type: z.literal('object'),\n});\n\nexport const NodeTextBoxSchema = TextBoxSchema.extend({\n type: z.literal('text-box'),\n});\n\nexport const NodeSchema = z.discriminatedUnion('type', [\n NodeObjectSchema,\n NodeTextBoxSchema,\n]);\n"],"mappings":"AAAA;;AAEA,SAASA,CAAC,QAAQ,KAAK;AAEvB,OAAO,MAAMC,gBAAgB,GAAGD,CAAC,CAACE,MAAM,CAAC;EACvCC,CAAC,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EACbC,CAAC,EAAEL,CAAC,CAACI,MAAM,CAAC,CAAC;EACbE,KAAK,EAAEN,CAAC,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,MAAMC,aAAa,GAAGT,CAAC,CAACE,MAAM,CAAC;EACpCC,CAAC,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EACbC,CAAC,EAAEL,CAAC,CAACI,MAAM,CAAC,CAAC;EACbM,IAAI,EAAEV,CAAC,CAACO,MAAM,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,MAAMI,gBAAgB,GAAGV,gBAAgB,CAACW,MAAM,CAAC;EACtDC,IAAI,EAAEb,CAAC,CAACc,OAAO,CAAC,QAAQ;AAC1B,CAAC,CAAC;AAEF,OAAO,MAAMC,iBAAiB,GAAGN,aAAa,CAACG,MAAM,CAAC;EACpDC,IAAI,EAAEb,CAAC,CAACc,OAAO,CAAC,UAAU;AAC5B,CAAC,CAAC;AAEF,OAAO,MAAME,UAAU,GAAGhB,CAAC,CAACiB,kBAAkB,CAAC,MAAM,EAAE,CACrDN,gBAAgB,EAChBI,iBAAiB,CAClB,CAAC","ignoreList":[]}