@osdk/generator-converters 2.23.0 → 2.23.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/build/browser/getEditedEntities.js +1 -0
- package/build/browser/getEditedEntities.js.map +1 -1
- package/build/browser/wireActionTypeV2ToSdkActionMetadata.js +2 -0
- package/build/browser/wireActionTypeV2ToSdkActionMetadata.js.map +1 -1
- package/build/cjs/index.cjs +2 -0
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/getEditedEntities.js +1 -0
- package/build/esm/getEditedEntities.js.map +1 -1
- package/build/esm/wireActionTypeV2ToSdkActionMetadata.js +2 -0
- package/build/esm/wireActionTypeV2ToSdkActionMetadata.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @osdk/generator-converters
|
|
2
2
|
|
|
3
|
+
## 2.23.1-beta.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 60aff19: Bump `@osdk/foundry.*` and `@osdk/internal.foundry.*` catalog entries from `2.57.0` to `2.61.0`. Includes type-fixups for the new `applyScenario` / `scenarioReference` discriminated-union variants and the now-required `QueryParameterV2.required` field.
|
|
8
|
+
- cdc73e0: Add end-to-end support for `scenarioReference` action parameters:
|
|
9
|
+
- `@osdk/api` adds `"scenarioReference"` to `ActionMetadata.DataType.BaseActionParameterTypes` and a matching `scenarioReference: ScenarioClient` entry in `DataValueClientToWire` (structurally typed as `{ getScenarioReference(): { scenarioRid } }` to avoid a circular dep on `@osdk/client`).
|
|
10
|
+
- `@osdk/generator-converters` maps the wire `scenarioReference` variant into the primitive type.
|
|
11
|
+
- Generated SDKs now emit `ActionParam.PrimitiveType<"scenarioReference">` (resolves to `ScenarioClient`) for scenarioReference parameters, instead of throwing at SDK build time.
|
|
12
|
+
- `@osdk/client`'s `toDataValue` accepts a `ScenarioClient` and serializes it to the rid string the platform expects.
|
|
13
|
+
- `@osdk/react-components`'s ActionForm renders scenarioReference parameters as `UNSUPPORTED` for now.
|
|
14
|
+
|
|
15
|
+
Enables `client(ScenarioMerge).applyAction({ scenario })` end-to-end in generated SDKs.
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [a492285]
|
|
18
|
+
- Updated dependencies [cdc73e0]
|
|
19
|
+
- @osdk/api@2.23.1-beta.2
|
|
20
|
+
|
|
3
21
|
## 2.23.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEditedEntities.js","names":["getModifiedEntityTypes","action","addedObjects","Set","modifiedObjects","operation","operations","type","add","objectTypeApiName"],"sources":["getEditedEntities.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { ActionTypeV2 } from \"@osdk/foundry.ontologies\";\n\nexport type ModifiedEntityTypes = {\n addedObjects: Set<string>;\n modifiedObjects: Set<string>;\n};\n\nexport function getModifiedEntityTypes(\n action: ActionTypeV2,\n): ModifiedEntityTypes {\n const addedObjects = new Set<string>();\n const modifiedObjects = new Set<string>();\n for (const operation of action.operations) {\n switch (operation.type) {\n case \"createObject\":\n addedObjects.add(operation.objectTypeApiName);\n break;\n case \"modifyObject\":\n modifiedObjects.add(operation.objectTypeApiName);\n break;\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n case \"createInterfaceObject\":\n case \"modifyInterfaceObject\":\n case \"deleteInterfaceObject\":\n break;\n default:\n const _: never = operation;\n }\n }\n return { addedObjects, modifiedObjects };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASA,sBAAsBA,CACpCC,MAAoB,EACC;EACrB,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAAS,CAAC;EACtC,MAAMC,eAAe,GAAG,IAAID,GAAG,CAAS,CAAC;EACzC,KAAK,MAAME,SAAS,IAAIJ,MAAM,CAACK,UAAU,EAAE;IACzC,QAAQD,SAAS,CAACE,IAAI;MACpB,KAAK,cAAc;QACjBL,YAAY,CAACM,GAAG,CAACH,SAAS,CAACI,iBAAiB,CAAC;QAC7C;MACF,KAAK,cAAc;QACjBL,eAAe,CAACI,GAAG,CAACH,SAAS,CAACI,iBAAiB,CAAC;QAChD;MACF,KAAK,cAAc;MACnB,KAAK,YAAY;MACjB,KAAK,YAAY;MACjB,KAAK,uBAAuB;MAC5B,KAAK,uBAAuB;MAC5B,KAAK,uBAAuB;
|
|
1
|
+
{"version":3,"file":"getEditedEntities.js","names":["getModifiedEntityTypes","action","addedObjects","Set","modifiedObjects","operation","operations","type","add","objectTypeApiName"],"sources":["getEditedEntities.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { ActionTypeV2 } from \"@osdk/foundry.ontologies\";\n\nexport type ModifiedEntityTypes = {\n addedObjects: Set<string>;\n modifiedObjects: Set<string>;\n};\n\nexport function getModifiedEntityTypes(\n action: ActionTypeV2,\n): ModifiedEntityTypes {\n const addedObjects = new Set<string>();\n const modifiedObjects = new Set<string>();\n for (const operation of action.operations) {\n switch (operation.type) {\n case \"createObject\":\n addedObjects.add(operation.objectTypeApiName);\n break;\n case \"modifyObject\":\n modifiedObjects.add(operation.objectTypeApiName);\n break;\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n case \"createInterfaceObject\":\n case \"modifyInterfaceObject\":\n case \"deleteInterfaceObject\":\n case \"applyScenario\":\n break;\n default:\n const _: never = operation;\n }\n }\n return { addedObjects, modifiedObjects };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASA,sBAAsBA,CACpCC,MAAoB,EACC;EACrB,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAAS,CAAC;EACtC,MAAMC,eAAe,GAAG,IAAID,GAAG,CAAS,CAAC;EACzC,KAAK,MAAME,SAAS,IAAIJ,MAAM,CAACK,UAAU,EAAE;IACzC,QAAQD,SAAS,CAACE,IAAI;MACpB,KAAK,cAAc;QACjBL,YAAY,CAACM,GAAG,CAACH,SAAS,CAACI,iBAAiB,CAAC;QAC7C;MACF,KAAK,cAAc;QACjBL,eAAe,CAACI,GAAG,CAACH,SAAS,CAACI,iBAAiB,CAAC;QAChD;MACF,KAAK,cAAc;MACnB,KAAK,YAAY;MACjB,KAAK,YAAY;MACjB,KAAK,uBAAuB;MAC5B,KAAK,uBAAuB;MAC5B,KAAK,uBAAuB;MAC5B,KAAK,eAAe;QAClB;MACF;IAEF;EACF;EACA,OAAO;IAAEP,YAAY;IAAEE;EAAgB,CAAC;AAC1C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wireActionTypeV2ToSdkActionMetadata.js","names":["GeneratorError","getModifiedEntityTypes","ensureStringEnumSupportedOrUndefined","supportedReleaseStatus","wireActionTypeV2ToSdkActionMetadata","input","unsanitizedApiName","modifiedEntityTypes","type","apiName","parameters","Object","fromEntries","entries","sort","a","b","localeCompare","map","key","value","wireActionParameterV2ToSdkParameterDefinition","displayName","description","modifiedEntities","createModifiedEntities","addedObjects","modifiedObjects","rid","status","multiplicity","dataType","actionPropertyToSdkPropertyDefinition","subType","nullable","required","parameterType","objectSet","objectTypeApiName","object","interface","interfaceTypeApiName","struct","fields","reduce","structMap","structField","name","fieldType","JSON","stringify","entities","created","modified"],"sources":["wireActionTypeV2ToSdkActionMetadata.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { ActionMetadata } from \"@osdk/api\";\nimport type {\n ActionParameterType,\n ActionParameterV2,\n ActionTypeV2,\n} from \"@osdk/foundry.ontologies\";\nimport { GeneratorError } from \"./GeneratorError.js\";\nimport { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nimport {\n ensureStringEnumSupportedOrUndefined,\n supportedReleaseStatus,\n} from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\n\nexport function wireActionTypeV2ToSdkActionMetadata(\n input: ActionTypeV2,\n unsanitizedApiName?: string,\n): ActionMetadata {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n unsanitizedApiName: unsanitizedApiName ?? input.apiName,\n parameters: Object.fromEntries(\n Object.entries(input.parameters).sort(\n ([a], [b]) => a.localeCompare(b),\n ).map((\n [key, value],\n ) => [key, wireActionParameterV2ToSdkParameterDefinition(value)]),\n ),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(\n modifiedEntityTypes.addedObjects,\n modifiedEntityTypes.modifiedObjects,\n ),\n rid: input.rid,\n status: ensureStringEnumSupportedOrUndefined(\n input.status,\n supportedReleaseStatus,\n ),\n };\n}\n\nfunction wireActionParameterV2ToSdkParameterDefinition(\n value: ActionParameterV2,\n): ActionMetadata.Parameter<any> {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(\n value.dataType.type === \"array\" ? value.dataType.subType : value.dataType,\n ),\n nullable: !value.required,\n description: value.description,\n };\n}\n\nfunction actionPropertyToSdkPropertyDefinition(\n parameterType: ActionParameterType,\n): ActionMetadata.Parameter[\"type\"] {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"mediaReference\":\n case \"marking\":\n case \"objectType\":\n case \"geohash\":\n case \"geoshape\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return { type: \"objectSet\", objectSet: parameterType.objectTypeApiName! };\n case \"object\":\n return { type: \"object\", object: parameterType.objectTypeApiName };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: parameterType.interfaceTypeApiName,\n };\n case \"struct\":\n return {\n type: \"struct\",\n struct: parameterType.fields.reduce(\n (\n structMap: Record<\n string,\n ActionMetadata.DataType.BaseActionParameterTypes\n >,\n structField,\n ) => {\n structMap[structField.name] = actionPropertyToSdkPropertyDefinition(\n structField.fieldType as ActionParameterType,\n ) as ActionMetadata.DataType.BaseActionParameterTypes;\n return structMap;\n },\n {},\n ),\n };\n default:\n throw new GeneratorError(\"Unsupported action parameter type\", {\n parameterType: JSON.stringify(parameterType),\n });\n }\n}\n\nfunction createModifiedEntities<K extends string>(\n addedObjects: Set<K>,\n modifiedObjects: Set<K>,\n): ActionMetadata[\"modifiedEntities\"] {\n const entities = {} as Record<\n K,\n {\n created: boolean;\n modified: boolean;\n }\n >;\n\n for (const key of addedObjects) {\n entities[key] = { created: true, modified: false };\n }\n\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n } else {\n entities[key] = { created: false, modified: true };\n }\n }\n\n return entities;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,cAAc,QAAQ,qBAAqB;AACpD,SAASC,sBAAsB,QAAQ,wBAAwB;AAC/D,SACEC,oCAAoC,EACpCC,sBAAsB,QACjB,oDAAoD;AAE3D,OAAO,SAASC,mCAAmCA,CACjDC,KAAmB,EACnBC,kBAA2B,EACX;EAChB,MAAMC,mBAAmB,GAAGN,sBAAsB,CAACI,KAAK,CAAC;EACzD,OAAO;IACLG,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAEJ,KAAK,CAACI,OAAO;IACtBH,kBAAkB,EAAEA,kBAAkB,IAAID,KAAK,CAACI,OAAO;IACvDC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAC5BD,MAAM,CAACE,OAAO,CAACR,KAAK,CAACK,UAAU,CAAC,CAACI,IAAI,CACnC,CAAC,CAACC,CAAC,CAAC,EAAE,CAACC,CAAC,CAAC,KAAKD,CAAC,CAACE,aAAa,CAACD,CAAC,CACjC,CAAC,CAACE,GAAG,CAAC,CACJ,CAACC,GAAG,EAAEC,KAAK,CAAC,KACT,CAACD,GAAG,EAAEE,6CAA6C,CAACD,KAAK,CAAC,CAAC,CAClE,CAAC;IACDE,WAAW,EAAEjB,KAAK,CAACiB,WAAW;IAC9BC,WAAW,EAAElB,KAAK,CAACkB,WAAW;IAC9BC,gBAAgB,EAAEC,sBAAsB,CACtClB,mBAAmB,CAACmB,YAAY,EAChCnB,mBAAmB,CAACoB,eACtB,CAAC;IACDC,GAAG,EAAEvB,KAAK,CAACuB,GAAG;IACdC,MAAM,EAAE3B,oCAAoC,CAC1CG,KAAK,CAACwB,MAAM,EACZ1B,sBACF;EACF,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C,SAGC,EACDC,WAAW,KACR;UACHD,SAAS,CAACC,WAAW,CAACC,IAAI,CAAC,GAAGf,qCAAqC,CACjEc,WAAW,CAACE,SACd,CAAqD;UACrD,OAAOH,SAAS;QAClB,CAAC,EACD,CAAC,CACH;MACF,CAAC;IACH;MACE,MAAM,IAAI7C,cAAc,CAAC,mCAAmC,EAAE;QAC5DoC,aAAa,EAAEa,IAAI,CAACC,SAAS,CAACd,aAAa;MAC7C,CAAC,CAAC;EACN;AACF;AAEA,SAASX,sBAAsBA,CAC7BC,YAAoB,EACpBC,eAAuB,EACa;EACpC,MAAMwB,QAAQ,GAAG,CAAC,CAMjB;EAED,KAAK,MAAMhC,GAAG,IAAIO,YAAY,EAAE;IAC9ByB,QAAQ,CAAChC,GAAG,CAAC,GAAG;MAAEiC,OAAO,EAAE,IAAI;MAAEC,QAAQ,EAAE;IAAM,CAAC;EACpD;EAEA,KAAK,MAAMlC,GAAG,IAAIQ,eAAe,EAAE;IACjC,IAAIwB,QAAQ,CAAChC,GAAG,CAAC,EAAE;MACjBgC,QAAQ,CAAChC,GAAG,CAAC,CAACkC,QAAQ,GAAG,IAAI;IAC/B,CAAC,MAAM;MACLF,QAAQ,CAAChC,GAAG,CAAC,GAAG;QAAEiC,OAAO,EAAE,KAAK;QAAEC,QAAQ,EAAE;MAAK,CAAC;IACpD;EACF;EAEA,OAAOF,QAAQ;AACjB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"wireActionTypeV2ToSdkActionMetadata.js","names":["GeneratorError","getModifiedEntityTypes","ensureStringEnumSupportedOrUndefined","supportedReleaseStatus","wireActionTypeV2ToSdkActionMetadata","input","unsanitizedApiName","modifiedEntityTypes","type","apiName","parameters","Object","fromEntries","entries","sort","a","b","localeCompare","map","key","value","wireActionParameterV2ToSdkParameterDefinition","displayName","description","modifiedEntities","createModifiedEntities","addedObjects","modifiedObjects","rid","status","multiplicity","dataType","actionPropertyToSdkPropertyDefinition","subType","nullable","required","parameterType","objectSet","objectTypeApiName","object","interface","interfaceTypeApiName","struct","fields","reduce","structMap","structField","name","fieldType","JSON","stringify","entities","created","modified"],"sources":["wireActionTypeV2ToSdkActionMetadata.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { ActionMetadata } from \"@osdk/api\";\nimport type {\n ActionParameterType,\n ActionParameterV2,\n ActionTypeV2,\n} from \"@osdk/foundry.ontologies\";\nimport { GeneratorError } from \"./GeneratorError.js\";\nimport { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nimport {\n ensureStringEnumSupportedOrUndefined,\n supportedReleaseStatus,\n} from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\n\nexport function wireActionTypeV2ToSdkActionMetadata(\n input: ActionTypeV2,\n unsanitizedApiName?: string,\n): ActionMetadata {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n unsanitizedApiName: unsanitizedApiName ?? input.apiName,\n parameters: Object.fromEntries(\n Object.entries(input.parameters).sort(\n ([a], [b]) => a.localeCompare(b),\n ).map((\n [key, value],\n ) => [key, wireActionParameterV2ToSdkParameterDefinition(value)]),\n ),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(\n modifiedEntityTypes.addedObjects,\n modifiedEntityTypes.modifiedObjects,\n ),\n rid: input.rid,\n status: ensureStringEnumSupportedOrUndefined(\n input.status,\n supportedReleaseStatus,\n ),\n };\n}\n\nfunction wireActionParameterV2ToSdkParameterDefinition(\n value: ActionParameterV2,\n): ActionMetadata.Parameter<any> {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(\n value.dataType.type === \"array\" ? value.dataType.subType : value.dataType,\n ),\n nullable: !value.required,\n description: value.description,\n };\n}\n\nfunction actionPropertyToSdkPropertyDefinition(\n parameterType: ActionParameterType,\n): ActionMetadata.Parameter[\"type\"] {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"mediaReference\":\n case \"marking\":\n case \"objectType\":\n case \"geohash\":\n case \"geoshape\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return { type: \"objectSet\", objectSet: parameterType.objectTypeApiName! };\n case \"object\":\n return { type: \"object\", object: parameterType.objectTypeApiName };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: parameterType.interfaceTypeApiName,\n };\n case \"scenarioReference\":\n return \"scenarioReference\";\n case \"struct\":\n return {\n type: \"struct\",\n struct: parameterType.fields.reduce(\n (\n structMap: Record<\n string,\n ActionMetadata.DataType.BaseActionParameterTypes\n >,\n structField,\n ) => {\n structMap[structField.name] = actionPropertyToSdkPropertyDefinition(\n structField.fieldType as ActionParameterType,\n ) as ActionMetadata.DataType.BaseActionParameterTypes;\n return structMap;\n },\n {},\n ),\n };\n default:\n throw new GeneratorError(\"Unsupported action parameter type\", {\n parameterType: JSON.stringify(parameterType),\n });\n }\n}\n\nfunction createModifiedEntities<K extends string>(\n addedObjects: Set<K>,\n modifiedObjects: Set<K>,\n): ActionMetadata[\"modifiedEntities\"] {\n const entities = {} as Record<\n K,\n {\n created: boolean;\n modified: boolean;\n }\n >;\n\n for (const key of addedObjects) {\n entities[key] = { created: true, modified: false };\n }\n\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n } else {\n entities[key] = { created: false, modified: true };\n }\n }\n\n return entities;\n}\n"],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AAqD;UACrD,OAAOH,SAAS;QAClB,CAAC,EACD,CAAC,CACH;MACF,CAAC;IACH;MACE,MAAM,IAAI7C,cAAc,CAAC,mCAAmC,EAAE;QAC5DoC,aAAa,EAAEa,IAAI,CAACC,SAAS,CAACd,aAAa;MAC7C,CAAC,CAAC;EACN;AACF;AAEA,SAASX,sBAAsBA,CAC7BC,YAAoB,EACpBC,eAAuB,EACa;EACpC,MAAMwB,QAAQ,GAAG,CAAC,CAMjB;EAED,KAAK,MAAMhC,GAAG,IAAIO,YAAY,EAAE;IAC9ByB,QAAQ,CAAChC,GAAG,CAAC,GAAG;MAAEiC,OAAO,EAAE,IAAI;MAAEC,QAAQ,EAAE;IAAM,CAAC;EACpD;EAEA,KAAK,MAAMlC,GAAG,IAAIQ,eAAe,EAAE;IACjC,IAAIwB,QAAQ,CAAChC,GAAG,CAAC,EAAE;MACjBgC,QAAQ,CAAChC,GAAG,CAAC,CAACkC,QAAQ,GAAG,IAAI;IAC/B,CAAC,MAAM;MACLF,QAAQ,CAAChC,GAAG,CAAC,GAAG;QAAEiC,OAAO,EAAE,KAAK;QAAEC,QAAQ,EAAE;MAAK,CAAC;IACpD;EACF;EAEA,OAAOF,QAAQ;AACjB","ignoreList":[]}
|
package/build/cjs/index.cjs
CHANGED
|
@@ -545,6 +545,8 @@ function actionPropertyToSdkPropertyDefinition(parameterType) {
|
|
|
545
545
|
type: "interface",
|
|
546
546
|
interface: parameterType.interfaceTypeApiName
|
|
547
547
|
};
|
|
548
|
+
case "scenarioReference":
|
|
549
|
+
return "scenarioReference";
|
|
548
550
|
case "struct":
|
|
549
551
|
return {
|
|
550
552
|
type: "struct",
|
package/build/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/GeneratorError.ts","../../src/getEditedEntities.ts","../../src/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.ts","../../src/valueFormatting/convertBooleanValueFormattingRule.ts","../../src/valueFormatting/commonValueFormattingUtils.ts","../../src/valueFormatting/convertDateAndTimestampValueFormattingRule.ts","../../src/valueFormatting/convertKnownTypeValueFormattingRule.ts","../../src/valueFormatting/convertNumberValueFormattingRule.ts","../../src/wirePropertyFormattingToSdkFormatting.ts","../../src/wirePropertyV2ToSdkPropertyDefinition.ts","../../src/wireObjectTypeFullMetadataToSdkObjectMetadata.ts","../../src/wireActionTypeV2ToSdkActionMetadata.ts","../../src/wireInterfaceTypeV2ToSdkObjectDefinition.ts","../../src/isNullableQueryDataType.ts","../../src/wireQueryDataTypeToQueryDataTypeDefinition.ts","../../src/wireQueryTypeV2ToSdkQueryMetadata.ts"],"names":[],"mappings":";;;AAqBO,IAAM,cAAA,GAAN,cAA6B,KAAA,CAAM;AAAA,EACxC,WAAA,CAAY,OAAA,EAAS,YAAA,EAAc,MAAA,EAAQ;AACzC,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,gBAAA;AACZ,IAAA,IAAA,CAAK,YAAA,GAAe,YAAA;AACpB,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AACF;;;ACZO,SAAS,uBAAuB,MAAA,EAAQ;AAC7C,EAAA,MAAM,YAAA,uBAAmB,GAAA,EAAI;AAC7B,EAAA,MAAM,eAAA,uBAAsB,GAAA,EAAI;AAChC,EAAA,KAAA,MAAW,SAAA,IAAa,OAAO,UAAA,EAAY;AACzC,IAAA,QAAQ,UAAU,IAAA;AAAM,MACtB,KAAK,cAAA;AACH,QAAA,YAAA,CAAa,GAAA,CAAI,UAAU,iBAAiB,CAAA;AAC5C,QAAA;AAAA,MACF,KAAK,cAAA;AACH,QAAA,eAAA,CAAgB,GAAA,CAAI,UAAU,iBAAiB,CAAA;AAC/C,QAAA;AASU;AACd,EACF;AACA,EAAA,OAAO;AAAA,IACL,YAAA;AAAA,IACA;AAAA,GACF;AACF;;;AC1BO,SAAS,4CAA4C,KAAA,EAAO;AACjE,EAAA,QAAQ,KAAA,CAA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AA,IACnB,SAAS,KAAA,CAAM,OAAA;AAAA,IACf,KAAK,KAAA,CAAM;AAAA,GACb;AACF;AACO,SAAS,+CAA+C,SAAA,EAAW;AACxE,EAAA,OAAO;AAAA,IACL,aAAa,SAAA,CAAU,WAAA;AAAA,IACvB,GAAG,0CAAA,CAA2C,SAAA,CAAU,QAAQ;AAAA,GAClE;AACF","file":"index.cjs","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\n/**\n * An error thrown during SDK generation whose message is safe to log directly.\n * User-controlled data (API names, display names, etc.) goes in `unsafeParams`;\n * safe diagnostic context (RIDs, counts, type identifiers) goes in `params`.\n */\nexport class GeneratorError extends Error {\n constructor(message, unsafeParams, params) {\n super(message);\n this.name = \"GeneratorError\";\n this.unsafeParams = unsafeParams;\n this.params = params;\n }\n}","/*\n * Copyright 2023 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 function getModifiedEntityTypes(action) {\n const addedObjects = new Set();\n const modifiedObjects = new Set();\n for (const operation of action.operations) {\n switch (operation.type) {\n case \"createObject\":\n addedObjects.add(operation.objectTypeApiName);\n break;\n case \"modifyObject\":\n modifiedObjects.add(operation.objectTypeApiName);\n break;\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n case \"createInterfaceObject\":\n case \"modifyInterfaceObject\":\n case \"deleteInterfaceObject\":\n break;\n default:\n const _ = operation;\n }\n }\n return {\n addedObjects,\n modifiedObjects\n };\n}","/*\n * Copyright 2023 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 function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(input) {\n switch (input.dataType.type) {\n case \"integer\":\n case \"double\":\n case \"string\":\n case \"byte\":\n case \"long\":\n case \"short\":\n case \"timestamp\":\n {\n return input.dataType.type;\n }\n case \"date\":\n {\n return \"datetime\";\n }\n case \"boolean\":\n case \"geopoint\":\n case \"geoshape\":\n case \"decimal\":\n case \"attachment\":\n case \"timeseries\":\n case \"array\":\n case \"marking\":\n case \"float\":\n case \"geotimeSeriesReference\":\n case \"mediaReference\":\n case \"struct\":\n case \"cipherText\":\n case \"vector\":\n throw new Error(`Primary key of type ${input.dataType.type} is not supported`);\n default:\n const _ = input.dataType;\n throw new Error(`Unknown type encountered for primaryKey: ${input.dataType}`);\n }\n}","/*\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 function convertBooleanFormattingRule(wireFormatting) {\n return {\n type: \"boolean\",\n valueIfTrue: wireFormatting.valueIfTrue,\n valueIfFalse: wireFormatting.valueIfFalse\n };\n}","/*\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 function convertPropertyTypeReferenceOrStringConstant(value) {\n switch (value.type) {\n case \"constant\":\n return {\n type: \"constant\",\n value: value.value\n };\n case \"propertyType\":\n return {\n type: \"propertyType\",\n propertyApiName: value.propertyApiName\n };\n default:\n value;\n throw new Error(`Unknown property reference type: ${value.type}`);\n }\n}","/*\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 { convertPropertyTypeReferenceOrStringConstant } from \"./commonValueFormattingUtils.js\";\nexport function convertDateFormattingRule(wireFormatting) {\n return {\n type: \"date\",\n format: convertDatetimeFormat(wireFormatting.format)\n };\n}\nexport function convertTimestampFormattingRule(wireFormatting) {\n return {\n type: \"timestamp\",\n format: convertDatetimeFormat(wireFormatting.format),\n displayTimezone: convertDatetimeTimezone(wireFormatting.displayTimezone)\n };\n}\nfunction convertDatetimeFormat(wireFormat) {\n switch (wireFormat.type) {\n case \"stringFormat\":\n return {\n type: \"stringFormat\",\n pattern: wireFormat.pattern\n };\n case \"localizedFormat\":\n return {\n type: \"localizedFormat\",\n format: wireFormat.format\n };\n default:\n wireFormat;\n throw new Error(`Unknown datetime format type: ${wireFormat.type}`);\n }\n}\nfunction convertDatetimeTimezone(wireTimezone) {\n switch (wireTimezone.type) {\n case \"static\":\n return {\n type: \"static\",\n zoneId: convertPropertyTypeReferenceOrStringConstant(wireTimezone.zoneId)\n };\n case \"user\":\n return {\n type: \"user\"\n };\n default:\n wireTimezone;\n throw new Error(`Unknown timezone type: ${wireTimezone.type}`);\n }\n}","/*\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 function convertKnownTypeFormattingRule(wireFormatting) {\n switch (wireFormatting.knownType) {\n case \"ARTIFACT_GID\":\n return {\n type: \"knownType\",\n knownType: \"ARTIFACT_GID\"\n };\n case \"RESOURCE_RID\":\n return {\n type: \"knownType\",\n knownType: \"RESOURCE_RID\"\n };\n case \"USER_OR_GROUP_ID\":\n return {\n type: \"knownType\",\n knownType: \"USER_OR_GROUP_ID\"\n };\n default:\n wireFormatting.knownType;\n return undefined;\n }\n}","/*\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 { convertPropertyTypeReferenceOrStringConstant } from \"./commonValueFormattingUtils.js\";\nexport function convertNumberFormattingRule(wireFormatting) {\n const numberType = convertNumberFormattingType(wireFormatting.numberType);\n if (!numberType) {\n return undefined;\n }\n return {\n type: \"number\",\n numberType\n };\n}\nfunction convertNumberFormatOptions(wireOptions) {\n return {\n useGrouping: wireOptions.useGrouping,\n convertNegativeToParenthesis: wireOptions.convertNegativeToParenthesis,\n minimumIntegerDigits: wireOptions.minimumIntegerDigits,\n minimumFractionDigits: wireOptions.minimumFractionDigits,\n maximumFractionDigits: wireOptions.maximumFractionDigits,\n minimumSignificantDigits: wireOptions.minimumSignificantDigits,\n maximumSignificantDigits: wireOptions.maximumSignificantDigits,\n notation: wireOptions.notation,\n roundingMode: wireOptions.roundingMode\n };\n}\nfunction convertDurationFormatStyle(formatStyle) {\n switch (formatStyle.type) {\n case \"humanReadable\":\n return {\n type: \"humanReadable\",\n showFullUnits: formatStyle.showFullUnits\n };\n case \"timecode\":\n return {\n type: \"timecode\"\n };\n default:\n formatStyle;\n throw new Error(`Unknown duration format style: ${formatStyle.type}`);\n }\n}\nfunction convertNumberFormattingType(wireNumberType) {\n switch (wireNumberType.type) {\n case \"standard\":\n return {\n type: \"standard\",\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)\n };\n case \"fixedValues\":\n return {\n type: \"fixedValues\",\n values: wireNumberType.values\n };\n case \"currency\":\n {\n return {\n type: \"currency\",\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),\n style: wireNumberType.style,\n currencyCode: convertPropertyTypeReferenceOrStringConstant(wireNumberType.currencyCode)\n };\n }\n case \"standardUnit\":\n {\n return {\n type: \"standardUnit\",\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),\n unit: convertPropertyTypeReferenceOrStringConstant(wireNumberType.unit)\n };\n }\n case \"customUnit\":\n {\n return {\n type: \"customUnit\",\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),\n unit: convertPropertyTypeReferenceOrStringConstant(wireNumberType.unit)\n };\n }\n case \"affix\":\n {\n return {\n type: \"affix\",\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),\n affix: {\n prefix: wireNumberType.affix?.prefix != null ? convertPropertyTypeReferenceOrStringConstant(wireNumberType.affix.prefix) : undefined,\n postfix: wireNumberType.affix?.postfix != null ? convertPropertyTypeReferenceOrStringConstant(wireNumberType.affix.postfix) : undefined\n }\n };\n }\n case \"duration\":\n {\n return {\n type: \"duration\",\n formatStyle: convertDurationFormatStyle(wireNumberType.formatStyle),\n precision: wireNumberType.precision,\n baseValue: wireNumberType.baseValue\n };\n }\n case \"scale\":\n {\n return {\n type: \"scale\",\n scaleType: wireNumberType.scaleType,\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)\n };\n }\n case \"ratio\":\n {\n return {\n type: \"ratio\",\n ratioType: wireNumberType.ratioType,\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)\n };\n }\n default:\n wireNumberType;\n throw new Error(`Unknown number format type: ${wireNumberType.type}`);\n }\n}","/*\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 { convertBooleanFormattingRule } from \"./valueFormatting/convertBooleanValueFormattingRule.js\";\nimport { convertDateFormattingRule, convertTimestampFormattingRule } from \"./valueFormatting/convertDateAndTimestampValueFormattingRule.js\";\nimport { convertKnownTypeFormattingRule } from \"./valueFormatting/convertKnownTypeValueFormattingRule.js\";\nimport { convertNumberFormattingRule } from \"./valueFormatting/convertNumberValueFormattingRule.js\";\n\n/**\n * Converts a PropertyValueFormattingRule from the ontologies format to the SDK format\n */\nexport function wirePropertyFormattingToSdkFormatting(wireFormatting, log) {\n try {\n return convertPropertyFormattingInternal(wireFormatting);\n } catch (error) {\n log?.info(`Failed to convert property formatting rule: ${error}`);\n return undefined;\n }\n}\nfunction convertPropertyFormattingInternal(wireFormatting) {\n switch (wireFormatting.type) {\n case \"date\":\n return convertDateFormattingRule(wireFormatting);\n case \"timestamp\":\n return convertTimestampFormattingRule(wireFormatting);\n case \"boolean\":\n return convertBooleanFormattingRule(wireFormatting);\n case \"knownType\":\n return convertKnownTypeFormattingRule(wireFormatting);\n case \"number\":\n return convertNumberFormattingRule(wireFormatting);\n default:\n wireFormatting;\n throw new Error(`Unknown formatting type: ${wireFormatting.type}`);\n }\n}","/*\n * Copyright 2023 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 { wirePropertyFormattingToSdkFormatting } from \"./wirePropertyFormattingToSdkFormatting.js\";\n\n/**\n * Extracts main value metadata from a struct property type.\n * Returns the fields array that comprise the main value.\n */\nfunction extractMainValue(dataType) {\n if (dataType.type === \"struct\" && dataType.mainValue) {\n const fields = dataType.mainValue.fields;\n if (fields && fields.length > 0) {\n return {\n fields\n };\n }\n }\n return undefined;\n}\n\n/**\n * Checks if an array property type has reducers.\n */\nfunction hasReducers(dataType) {\n return dataType.type === \"array\" && dataType.reducers != null && dataType.reducers.length > 0;\n}\nexport function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true, log) {\n const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(input.dataType, log);\n if (sdkPropDefinition == null) {\n return undefined;\n }\n switch (input.dataType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"date\":\n case \"attachment\":\n case \"mediaReference\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"timeseries\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n case \"vector\":\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: sdkPropDefinition,\n nullable: input.nullable == null ? isNullable : input.nullable,\n valueTypeApiName: input.valueTypeApiName,\n valueFormatting: input.valueFormatting != null ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log) : undefined\n };\n case \"struct\":\n {\n const mainValue = extractMainValue(input.dataType);\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: sdkPropDefinition,\n nullable: input.nullable == null ? isNullable : input.nullable,\n valueTypeApiName: input.valueTypeApiName,\n valueFormatting: input.valueFormatting != null ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log) : undefined,\n mainValue\n };\n }\n case \"array\":\n {\n return {\n displayName: input.displayName,\n multiplicity: true,\n description: input.description,\n type: sdkPropDefinition,\n nullable: true,\n valueTypeApiName: input.valueTypeApiName,\n valueFormatting: input.valueFormatting != null ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log) : undefined,\n hasReducers: hasReducers(input.dataType)\n };\n }\n case \"cipherText\":\n {\n log?.info(`${JSON.stringify(input.dataType.type)} is not a supported dataType`);\n return undefined;\n }\n default:\n const _ = input.dataType;\n log?.info(`${JSON.stringify(input.dataType)} is not a supported dataType`);\n return undefined;\n }\n}\nfunction objectPropertyTypeToSdkPropertyDefinition(propertyType, log) {\n switch (propertyType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n case \"mediaReference\":\n case \"vector\":\n return propertyType.type;\n case \"date\":\n return \"datetime\";\n case \"array\":\n return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);\n case \"timeseries\":\n if (propertyType.itemType?.type === \"string\") {\n return \"stringTimeseries\";\n } else if (propertyType.itemType?.type === \"double\") {\n return \"numericTimeseries\";\n } else return \"sensorTimeseries\";\n case \"struct\":\n {\n return propertyType.structFieldTypes.reduce((structMap, structField) => {\n structMap[structField.apiName] = objectPropertyTypeToSdkPropertyDefinition(structField.dataType);\n return structMap;\n }, {});\n }\n case \"cipherText\":\n {\n log?.info(`${JSON.stringify(propertyType.type)} is not a supported propertyType`);\n return undefined;\n }\n default:\n {\n const _ = propertyType;\n log?.info(`${JSON.stringify(propertyType)} is not a supported propertyType`);\n return undefined;\n }\n }\n}","/*\n * Copyright 2023 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 { GeneratorError } from \"./GeneratorError.js\";\nimport { wirePropertyV2ToSdkPrimaryKeyTypeDefinition } from \"./wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js\";\nimport { wirePropertyV2ToSdkPropertyDefinition } from \"./wirePropertyV2ToSdkPropertyDefinition.js\";\nexport function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2, log) {\n if (objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey] === undefined) {\n throw new GeneratorError(\"Primary key not found in object type\", {\n primaryKey: objectTypeWithLink.objectType.primaryKey,\n objectTypeApiName: objectTypeWithLink.objectType.apiName\n });\n }\n\n // saved ontology.json files may not have this implementsInterfaces2 so we need to handle\n if (objectTypeWithLink.implementsInterfaces2 == null && objectTypeWithLink.implementsInterfaces != null) {\n throw new Error(\"Your ontology.json file is missing the implementsInterfaces2 field. Please regenerate it.\");\n }\n const interfaceMap = objectTypeWithLink.implementsInterfaces2 ? Object.fromEntries(Object.entries(objectTypeWithLink.implementsInterfaces2).sort(([a], [b]) => a.localeCompare(b)).map(([interfaceApiName, impl]) => {\n // prefer V2 if available and non-empty\n if (impl.propertiesV2 && Object.keys(impl.propertiesV2).length > 0) {\n const propMap = {};\n for (const [iptApiName, implementation] of Object.entries(impl.propertiesV2)) {\n if (implementation.type === \"localPropertyImplementation\") {\n propMap[iptApiName] = implementation.propertyApiName;\n }\n }\n return [interfaceApiName, propMap];\n }\n // fall back to V1\n return [interfaceApiName, impl.properties];\n })) : {};\n return {\n type: \"object\",\n apiName: objectTypeWithLink.objectType.apiName,\n description: objectTypeWithLink.objectType.description,\n primaryKeyApiName: objectTypeWithLink.objectType.primaryKey,\n primaryKeyType: wirePropertyV2ToSdkPrimaryKeyTypeDefinition(objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey]),\n links: Object.fromEntries([...objectTypeWithLink.linkTypes].sort((a, b) => a.apiName.localeCompare(b.apiName)).map(linkType => {\n return [linkType.apiName, {\n multiplicity: linkType.cardinality === \"MANY\",\n targetType: linkType.objectTypeApiName\n }];\n })),\n properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key, value]) => [key, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key), log)]).filter(([_, value]) => value != null).sort(([a], [b]) => a.localeCompare(b))),\n implements: objectTypeWithLink.implementsInterfaces ? [...objectTypeWithLink.implementsInterfaces].sort((a, b) => a.localeCompare(b)) : objectTypeWithLink.implementsInterfaces,\n interfaceMap,\n inverseInterfaceMap: Object.fromEntries(Object.entries(interfaceMap).map(([interfaceApiName, props]) => [interfaceApiName, invertProps(props)])),\n icon: supportedIconTypes.includes(objectTypeWithLink.objectType.icon.type) ? objectTypeWithLink.objectType.icon : undefined,\n titleProperty: objectTypeWithLink.objectType.titleProperty,\n displayName: objectTypeWithLink.objectType.displayName,\n pluralDisplayName: objectTypeWithLink.objectType.pluralDisplayName,\n status: ensureStringEnumSupportedOrUndefined(objectTypeWithLink.objectType.status, supportedReleaseStatus),\n rid: objectTypeWithLink.objectType.rid,\n visibility: ensureStringEnumSupportedOrUndefined(objectTypeWithLink.objectType.visibility, supportedObjectTypeVisibility)\n };\n}\nfunction invertProps(a) {\n return a ? Object.fromEntries(Object.entries(a).map(([k, v]) => [v, k])) : undefined;\n}\nexport const supportedIconTypes = [\"blueprint\"];\nexport const supportedReleaseStatus = [\"ACTIVE\", \"EXPERIMENTAL\", \"DEPRECATED\", \"ENDORSED\"];\nexport const supportedObjectTypeVisibility = [\"NORMAL\", \"PROMINENT\", \"HIDDEN\"];\nexport function ensureStringEnumSupportedOrUndefined(value, supportedValues) {\n return value && supportedValues.includes(value) ? value : undefined;\n}","/*\n * Copyright 2023 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 { GeneratorError } from \"./GeneratorError.js\";\nimport { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nimport { ensureStringEnumSupportedOrUndefined, supportedReleaseStatus } from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\nexport function wireActionTypeV2ToSdkActionMetadata(input, unsanitizedApiName) {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n unsanitizedApiName: unsanitizedApiName ?? input.apiName,\n parameters: Object.fromEntries(Object.entries(input.parameters).sort(([a], [b]) => a.localeCompare(b)).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),\n rid: input.rid,\n status: ensureStringEnumSupportedOrUndefined(input.status, supportedReleaseStatus)\n };\n}\nfunction wireActionParameterV2ToSdkParameterDefinition(value) {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(value.dataType.type === \"array\" ? value.dataType.subType : value.dataType),\n nullable: !value.required,\n description: value.description\n };\n}\nfunction actionPropertyToSdkPropertyDefinition(parameterType) {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"mediaReference\":\n case \"marking\":\n case \"objectType\":\n case \"geohash\":\n case \"geoshape\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: parameterType.objectTypeApiName\n };\n case \"object\":\n return {\n type: \"object\",\n object: parameterType.objectTypeApiName\n };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: parameterType.interfaceTypeApiName\n };\n case \"struct\":\n return {\n type: \"struct\",\n struct: parameterType.fields.reduce((structMap, structField) => {\n structMap[structField.name] = actionPropertyToSdkPropertyDefinition(structField.fieldType);\n return structMap;\n }, {})\n };\n default:\n throw new GeneratorError(\"Unsupported action parameter type\", {\n parameterType: JSON.stringify(parameterType)\n });\n }\n}\nfunction createModifiedEntities(addedObjects, modifiedObjects) {\n const entities = {};\n for (const key of addedObjects) {\n entities[key] = {\n created: true,\n modified: false\n };\n }\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n } else {\n entities[key] = {\n created: false,\n modified: true\n };\n }\n }\n return entities;\n}","/*\n * Copyright 2024 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 { wirePropertyV2ToSdkPropertyDefinition } from \"./wirePropertyV2ToSdkPropertyDefinition.js\";\nexport { wireInterfaceTypeV2ToSdkObjectDefinition as __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition };\nexport function wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType, v2, log) {\n return {\n type: \"interface\",\n rid: interfaceType.rid,\n apiName: interfaceType.apiName,\n displayName: interfaceType.displayName,\n description: interfaceType.description,\n implements: interfaceType.allExtendsInterfaces ? [...interfaceType.allExtendsInterfaces].sort((a, b) => a.localeCompare(b)) : interfaceType.extendsInterfaces ? [...interfaceType.extendsInterfaces].sort((a, b) => a.localeCompare(b)) : undefined,\n properties: Object.fromEntries(Object.entries(\n // prefer V2 if available and non-empty, otherwise fall back to V1\n interfaceType.allPropertiesV2 && Object.keys(interfaceType.allPropertiesV2).length > 0 ? interfaceType.allPropertiesV2 : interfaceType.allProperties ?? interfaceType.properties).map(([key, value]) => {\n return [key, wirePropertyV2ToSdkPropertyDefinition(value, true, log)];\n }).filter(([_, value]) => value != null).sort(([a], [b]) => a.localeCompare(b))),\n links: Object.fromEntries(Object.entries(interfaceType.allLinks ?? interfaceType.links ?? {}).sort(([a], [b]) => a.localeCompare(b)).map(([linkApiName, linkType]) => [linkApiName, {\n multiplicity: linkType.cardinality === \"MANY\",\n targetTypeApiName: linkType.linkedEntityApiName.apiName,\n targetType: linkType.linkedEntityApiName.type === \"objectTypeApiName\" ? \"object\" : \"interface\"\n }])),\n implementedBy: interfaceType.implementedByObjectTypes ? [...interfaceType.implementedByObjectTypes].sort((a, b) => a.localeCompare(b)) : interfaceType.implementedByObjectTypes\n };\n}","/*\n * Copyright 2023 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 function isNullableQueryDataType(input) {\n if (input.type === \"null\") {\n return true;\n }\n if (input.type === \"union\") {\n return input.unionTypes.some(t => isNullableQueryDataType(t));\n }\n return false;\n}","/*\n * Copyright 2023 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 { isNullableQueryDataType } from \"./isNullableQueryDataType.js\";\nexport function wireQueryDataTypeToQueryDataTypeDefinition(input) {\n switch (input.type) {\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"string\":\n case \"timestamp\":\n case \"mediaReference\":\n return {\n type: input.type,\n nullable: false\n };\n case \"object\":\n return {\n type: \"object\",\n object: input.objectTypeApiName,\n nullable: false\n };\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: input.objectTypeApiName,\n nullable: false\n };\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: input.interfaceTypeApiName,\n nullable: false\n };\n case \"interfaceObjectSet\":\n return {\n type: \"interfaceObjectSet\",\n objectSet: input.interfaceTypeApiName,\n nullable: false\n };\n case \"array\":\n return {\n array: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n type: \"array\",\n nullable: isNullableQueryDataType(input.subType)\n };\n case \"set\":\n return {\n type: \"set\",\n set: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n nullable: false\n };\n case \"union\":\n const allowNulls = isNullableQueryDataType(input);\n\n // special case for a union where one half is nullable to skip the union step and just allow nulls directly\n if (allowNulls && input.unionTypes.length === 2) {\n const nonNull = input.unionTypes.find(t => t.type != null);\n if (nonNull) {\n return {\n ...wireQueryDataTypeToQueryDataTypeDefinition(nonNull),\n nullable: true\n };\n }\n }\n return {\n type: \"union\",\n union: input.unionTypes.reduce((acc, t) => {\n if (t.type === \"null\") {\n return acc;\n }\n acc.push(wireQueryDataTypeToQueryDataTypeDefinition(t));\n return acc;\n }, []),\n nullable: allowNulls\n };\n case \"struct\":\n return {\n type: \"struct\",\n struct: Object.fromEntries(input.fields.map(f => [f.name, wireQueryDataTypeToQueryDataTypeDefinition(f.fieldType)])),\n nullable: false\n };\n case \"twoDimensionalAggregation\":\n return {\n type: \"twoDimensionalAggregation\",\n twoDimensionalAggregation: get2DQueryAggregationProps(input),\n nullable: false\n };\n case \"threeDimensionalAggregation\":\n return {\n type: \"threeDimensionalAggregation\",\n threeDimensionalAggregation: get3DQueryAggregationProps(input),\n nullable: false\n };\n case \"entrySet\":\n const keyType = wireQueryDataTypeToQueryDataTypeDefinition(input.keyType);\n if (!validMapKeyTypes.includes(keyType.type)) {\n throw new Error(\"Map types with a key type of \" + keyType.type + \" are not supported\" + validMapKeyTypes.toString());\n }\n if (keyType.type === \"array\") {\n throw new Error(\"Map types cannot have keys as arrays\");\n }\n return {\n type: \"map\",\n nullable: false,\n keyType,\n valueType: wireQueryDataTypeToQueryDataTypeDefinition(input.valueType)\n };\n case \"typeReference\":\n return {\n type: \"typeReference\",\n typeId: input.typeId,\n nullable: false\n };\n case \"null\":\n case \"unsupported\":\n case \"void\":\n throw new Error(`Unable to process query because the server indicated an unsupported QueryDataType.type: ${input.type}. Please check that your query is using supported types.`);\n default:\n const _ = input;\n throw new Error(`Unsupported QueryDataType.type ${input.type}`);\n }\n}\nfunction get2DQueryAggregationProps(input) {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: input.valueType.type\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: input.valueType.type\n };\n }\n throw new Error(`Cannot create 2D aggregation with ${input.keyType.type} as its type`);\n }\n}\nfunction get3DQueryAggregationProps(input) {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: get2DQueryAggregationProps(input.valueType)\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: get2DQueryAggregationProps(input.valueType)\n };\n }\n throw new Error(`Cannot create 3D aggregation with ${input.keyType.type} as its type`);\n }\n}\n\n/**\n * Guard against aggregation key types that are allowed by the backend types but are illegal to actually use\n */\nfunction guardInvalidKeyTypes(key) {\n return key.type === \"string\" || key.type === \"boolean\";\n}\n\n/**\n * The set of all valid key types for maps. This includes all types that are represented by strings or numbers in the OSDK, and Ontology Objects.\n */\nconst validMapKeyTypes = [\"string\", \"object\", \"double\", \"float\", \"integer\", \"long\", \"date\", \"timestamp\", \"byte\", \"datetime\", \"decimal\", \"marking\", \"short\", \"objectType\"];","/*\n * Copyright 2023 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 { wireQueryDataTypeToQueryDataTypeDefinition } from \"./wireQueryDataTypeToQueryDataTypeDefinition.js\";\nexport function wireQueryTypeV2ToSdkQueryMetadata(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n parameters: Object.fromEntries(Object.entries(input.parameters).sort(([a], [b]) => a.localeCompare(b)).map(([name, parameter]) => [name, wireQueryParameterV2ToQueryParameterDefinition(parameter)])),\n output: wireQueryDataTypeToQueryDataTypeDefinition(input.output),\n rid: input.rid,\n typeReferences: input.typeReferences && Object.keys(input.typeReferences).length > 0 ? Object.fromEntries(Object.entries(input.typeReferences).map(([typeId, dataType]) => [typeId, wireQueryDataTypeToQueryDataTypeDefinition(dataType)])) : undefined\n };\n}\nexport function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n rid: input.rid\n };\n}\nexport function wireQueryParameterV2ToQueryParameterDefinition(parameter) {\n return {\n description: parameter.description,\n ...wireQueryDataTypeToQueryDataTypeDefinition(parameter.dataType)\n };\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/GeneratorError.ts","../../src/getEditedEntities.ts","../../src/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.ts","../../src/valueFormatting/convertBooleanValueFormattingRule.ts","../../src/valueFormatting/commonValueFormattingUtils.ts","../../src/valueFormatting/convertDateAndTimestampValueFormattingRule.ts","../../src/valueFormatting/convertKnownTypeValueFormattingRule.ts","../../src/valueFormatting/convertNumberValueFormattingRule.ts","../../src/wirePropertyFormattingToSdkFormatting.ts","../../src/wirePropertyV2ToSdkPropertyDefinition.ts","../../src/wireObjectTypeFullMetadataToSdkObjectMetadata.ts","../../src/wireActionTypeV2ToSdkActionMetadata.ts","../../src/wireInterfaceTypeV2ToSdkObjectDefinition.ts","../../src/isNullableQueryDataType.ts","../../src/wireQueryDataTypeToQueryDataTypeDefinition.ts","../../src/wireQueryTypeV2ToSdkQueryMetadata.ts"],"names":[],"mappings":";;;AAqBO,IAAM,cAAA,GAAN,cAA6B,KAAA,CAAM;AAAA,EACxC,WAAA,CAAY,OAAA,EAAS,YAAA,EAAc,MAAA,EAAQ;AACzC,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,gBAAA;AACZ,IAAA,IAAA,CAAK,YAAA,GAAe,YAAA;AACpB,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AACF;;;ACZO,SAAS,uBAAuB,MAAA,EAAQ;AAC7C,EAAA,MAAM,YAAA,uBAAmB,GAAA,EAAI;AAC7B,EAAA,MAAM,eAAA,uBAAsB,GAAA,EAAI;AAChC,EAAA,KAAA,MAAW,SAAA,IAAa,OAAO,UAAA,EAAY;AACzC,IAAA,QAAQ,UAAU,IAAA;AAAM,MACtB,KAAK,cAAA;AACH,QAAA,YAAA,CAAa,GAAA,CAAI,UAAU,iBAAiB,CAAA;AAC5C,QAAA;AAAA,MACF,KAAK,cAAA;AACH,QAAA,eAAA,CAAgB,GAAA,CAAI,UAAU,iBAAiB,CAAA;AAC/C,QAAA;AAUU;AACd,EACF;AACA,EAAA,OAAO;AAAA,IACL,YAAA;AAAA,IACA;AAAA,GACF;AACF;;;AC3BO,SAAS,4CAA4C,KAAA,EAAO;AACjE,EAAA,QAAQ,KAAA,CAAM,SAAS,IAAA;AAAM,IAC3B,KAAK,SAAA;AAAA,IACL,KAAK,QAAA;AAAA,IACL,KAAK,QAAA;AAAA,IACL,KAAK,MAAA;AAAA,IACL,KAAK,MAAA;AAAA,IACL,KAAK,OAAA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AAW;AACxE,EAAA,OAAO;AAAA,IACL,aAAa,SAAA,CAAU,WAAA;AAAA,IACvB,GAAG,0CAAA,CAA2C,SAAA,CAAU,QAAQ;AAAA,GAClE;AACF","file":"index.cjs","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\n/**\n * An error thrown during SDK generation whose message is safe to log directly.\n * User-controlled data (API names, display names, etc.) goes in `unsafeParams`;\n * safe diagnostic context (RIDs, counts, type identifiers) goes in `params`.\n */\nexport class GeneratorError extends Error {\n constructor(message, unsafeParams, params) {\n super(message);\n this.name = \"GeneratorError\";\n this.unsafeParams = unsafeParams;\n this.params = params;\n }\n}","/*\n * Copyright 2023 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 function getModifiedEntityTypes(action) {\n const addedObjects = new Set();\n const modifiedObjects = new Set();\n for (const operation of action.operations) {\n switch (operation.type) {\n case \"createObject\":\n addedObjects.add(operation.objectTypeApiName);\n break;\n case \"modifyObject\":\n modifiedObjects.add(operation.objectTypeApiName);\n break;\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n case \"createInterfaceObject\":\n case \"modifyInterfaceObject\":\n case \"deleteInterfaceObject\":\n case \"applyScenario\":\n break;\n default:\n const _ = operation;\n }\n }\n return {\n addedObjects,\n modifiedObjects\n };\n}","/*\n * Copyright 2023 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 function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(input) {\n switch (input.dataType.type) {\n case \"integer\":\n case \"double\":\n case \"string\":\n case \"byte\":\n case \"long\":\n case \"short\":\n case \"timestamp\":\n {\n return input.dataType.type;\n }\n case \"date\":\n {\n return \"datetime\";\n }\n case \"boolean\":\n case \"geopoint\":\n case \"geoshape\":\n case \"decimal\":\n case \"attachment\":\n case \"timeseries\":\n case \"array\":\n case \"marking\":\n case \"float\":\n case \"geotimeSeriesReference\":\n case \"mediaReference\":\n case \"struct\":\n case \"cipherText\":\n case \"vector\":\n throw new Error(`Primary key of type ${input.dataType.type} is not supported`);\n default:\n const _ = input.dataType;\n throw new Error(`Unknown type encountered for primaryKey: ${input.dataType}`);\n }\n}","/*\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 function convertBooleanFormattingRule(wireFormatting) {\n return {\n type: \"boolean\",\n valueIfTrue: wireFormatting.valueIfTrue,\n valueIfFalse: wireFormatting.valueIfFalse\n };\n}","/*\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 function convertPropertyTypeReferenceOrStringConstant(value) {\n switch (value.type) {\n case \"constant\":\n return {\n type: \"constant\",\n value: value.value\n };\n case \"propertyType\":\n return {\n type: \"propertyType\",\n propertyApiName: value.propertyApiName\n };\n default:\n value;\n throw new Error(`Unknown property reference type: ${value.type}`);\n }\n}","/*\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 { convertPropertyTypeReferenceOrStringConstant } from \"./commonValueFormattingUtils.js\";\nexport function convertDateFormattingRule(wireFormatting) {\n return {\n type: \"date\",\n format: convertDatetimeFormat(wireFormatting.format)\n };\n}\nexport function convertTimestampFormattingRule(wireFormatting) {\n return {\n type: \"timestamp\",\n format: convertDatetimeFormat(wireFormatting.format),\n displayTimezone: convertDatetimeTimezone(wireFormatting.displayTimezone)\n };\n}\nfunction convertDatetimeFormat(wireFormat) {\n switch (wireFormat.type) {\n case \"stringFormat\":\n return {\n type: \"stringFormat\",\n pattern: wireFormat.pattern\n };\n case \"localizedFormat\":\n return {\n type: \"localizedFormat\",\n format: wireFormat.format\n };\n default:\n wireFormat;\n throw new Error(`Unknown datetime format type: ${wireFormat.type}`);\n }\n}\nfunction convertDatetimeTimezone(wireTimezone) {\n switch (wireTimezone.type) {\n case \"static\":\n return {\n type: \"static\",\n zoneId: convertPropertyTypeReferenceOrStringConstant(wireTimezone.zoneId)\n };\n case \"user\":\n return {\n type: \"user\"\n };\n default:\n wireTimezone;\n throw new Error(`Unknown timezone type: ${wireTimezone.type}`);\n }\n}","/*\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 function convertKnownTypeFormattingRule(wireFormatting) {\n switch (wireFormatting.knownType) {\n case \"ARTIFACT_GID\":\n return {\n type: \"knownType\",\n knownType: \"ARTIFACT_GID\"\n };\n case \"RESOURCE_RID\":\n return {\n type: \"knownType\",\n knownType: \"RESOURCE_RID\"\n };\n case \"USER_OR_GROUP_ID\":\n return {\n type: \"knownType\",\n knownType: \"USER_OR_GROUP_ID\"\n };\n default:\n wireFormatting.knownType;\n return undefined;\n }\n}","/*\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 { convertPropertyTypeReferenceOrStringConstant } from \"./commonValueFormattingUtils.js\";\nexport function convertNumberFormattingRule(wireFormatting) {\n const numberType = convertNumberFormattingType(wireFormatting.numberType);\n if (!numberType) {\n return undefined;\n }\n return {\n type: \"number\",\n numberType\n };\n}\nfunction convertNumberFormatOptions(wireOptions) {\n return {\n useGrouping: wireOptions.useGrouping,\n convertNegativeToParenthesis: wireOptions.convertNegativeToParenthesis,\n minimumIntegerDigits: wireOptions.minimumIntegerDigits,\n minimumFractionDigits: wireOptions.minimumFractionDigits,\n maximumFractionDigits: wireOptions.maximumFractionDigits,\n minimumSignificantDigits: wireOptions.minimumSignificantDigits,\n maximumSignificantDigits: wireOptions.maximumSignificantDigits,\n notation: wireOptions.notation,\n roundingMode: wireOptions.roundingMode\n };\n}\nfunction convertDurationFormatStyle(formatStyle) {\n switch (formatStyle.type) {\n case \"humanReadable\":\n return {\n type: \"humanReadable\",\n showFullUnits: formatStyle.showFullUnits\n };\n case \"timecode\":\n return {\n type: \"timecode\"\n };\n default:\n formatStyle;\n throw new Error(`Unknown duration format style: ${formatStyle.type}`);\n }\n}\nfunction convertNumberFormattingType(wireNumberType) {\n switch (wireNumberType.type) {\n case \"standard\":\n return {\n type: \"standard\",\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)\n };\n case \"fixedValues\":\n return {\n type: \"fixedValues\",\n values: wireNumberType.values\n };\n case \"currency\":\n {\n return {\n type: \"currency\",\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),\n style: wireNumberType.style,\n currencyCode: convertPropertyTypeReferenceOrStringConstant(wireNumberType.currencyCode)\n };\n }\n case \"standardUnit\":\n {\n return {\n type: \"standardUnit\",\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),\n unit: convertPropertyTypeReferenceOrStringConstant(wireNumberType.unit)\n };\n }\n case \"customUnit\":\n {\n return {\n type: \"customUnit\",\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),\n unit: convertPropertyTypeReferenceOrStringConstant(wireNumberType.unit)\n };\n }\n case \"affix\":\n {\n return {\n type: \"affix\",\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),\n affix: {\n prefix: wireNumberType.affix?.prefix != null ? convertPropertyTypeReferenceOrStringConstant(wireNumberType.affix.prefix) : undefined,\n postfix: wireNumberType.affix?.postfix != null ? convertPropertyTypeReferenceOrStringConstant(wireNumberType.affix.postfix) : undefined\n }\n };\n }\n case \"duration\":\n {\n return {\n type: \"duration\",\n formatStyle: convertDurationFormatStyle(wireNumberType.formatStyle),\n precision: wireNumberType.precision,\n baseValue: wireNumberType.baseValue\n };\n }\n case \"scale\":\n {\n return {\n type: \"scale\",\n scaleType: wireNumberType.scaleType,\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)\n };\n }\n case \"ratio\":\n {\n return {\n type: \"ratio\",\n ratioType: wireNumberType.ratioType,\n baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)\n };\n }\n default:\n wireNumberType;\n throw new Error(`Unknown number format type: ${wireNumberType.type}`);\n }\n}","/*\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 { convertBooleanFormattingRule } from \"./valueFormatting/convertBooleanValueFormattingRule.js\";\nimport { convertDateFormattingRule, convertTimestampFormattingRule } from \"./valueFormatting/convertDateAndTimestampValueFormattingRule.js\";\nimport { convertKnownTypeFormattingRule } from \"./valueFormatting/convertKnownTypeValueFormattingRule.js\";\nimport { convertNumberFormattingRule } from \"./valueFormatting/convertNumberValueFormattingRule.js\";\n\n/**\n * Converts a PropertyValueFormattingRule from the ontologies format to the SDK format\n */\nexport function wirePropertyFormattingToSdkFormatting(wireFormatting, log) {\n try {\n return convertPropertyFormattingInternal(wireFormatting);\n } catch (error) {\n log?.info(`Failed to convert property formatting rule: ${error}`);\n return undefined;\n }\n}\nfunction convertPropertyFormattingInternal(wireFormatting) {\n switch (wireFormatting.type) {\n case \"date\":\n return convertDateFormattingRule(wireFormatting);\n case \"timestamp\":\n return convertTimestampFormattingRule(wireFormatting);\n case \"boolean\":\n return convertBooleanFormattingRule(wireFormatting);\n case \"knownType\":\n return convertKnownTypeFormattingRule(wireFormatting);\n case \"number\":\n return convertNumberFormattingRule(wireFormatting);\n default:\n wireFormatting;\n throw new Error(`Unknown formatting type: ${wireFormatting.type}`);\n }\n}","/*\n * Copyright 2023 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 { wirePropertyFormattingToSdkFormatting } from \"./wirePropertyFormattingToSdkFormatting.js\";\n\n/**\n * Extracts main value metadata from a struct property type.\n * Returns the fields array that comprise the main value.\n */\nfunction extractMainValue(dataType) {\n if (dataType.type === \"struct\" && dataType.mainValue) {\n const fields = dataType.mainValue.fields;\n if (fields && fields.length > 0) {\n return {\n fields\n };\n }\n }\n return undefined;\n}\n\n/**\n * Checks if an array property type has reducers.\n */\nfunction hasReducers(dataType) {\n return dataType.type === \"array\" && dataType.reducers != null && dataType.reducers.length > 0;\n}\nexport function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true, log) {\n const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(input.dataType, log);\n if (sdkPropDefinition == null) {\n return undefined;\n }\n switch (input.dataType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"date\":\n case \"attachment\":\n case \"mediaReference\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"timeseries\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n case \"vector\":\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: sdkPropDefinition,\n nullable: input.nullable == null ? isNullable : input.nullable,\n valueTypeApiName: input.valueTypeApiName,\n valueFormatting: input.valueFormatting != null ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log) : undefined\n };\n case \"struct\":\n {\n const mainValue = extractMainValue(input.dataType);\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: sdkPropDefinition,\n nullable: input.nullable == null ? isNullable : input.nullable,\n valueTypeApiName: input.valueTypeApiName,\n valueFormatting: input.valueFormatting != null ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log) : undefined,\n mainValue\n };\n }\n case \"array\":\n {\n return {\n displayName: input.displayName,\n multiplicity: true,\n description: input.description,\n type: sdkPropDefinition,\n nullable: true,\n valueTypeApiName: input.valueTypeApiName,\n valueFormatting: input.valueFormatting != null ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log) : undefined,\n hasReducers: hasReducers(input.dataType)\n };\n }\n case \"cipherText\":\n {\n log?.info(`${JSON.stringify(input.dataType.type)} is not a supported dataType`);\n return undefined;\n }\n default:\n const _ = input.dataType;\n log?.info(`${JSON.stringify(input.dataType)} is not a supported dataType`);\n return undefined;\n }\n}\nfunction objectPropertyTypeToSdkPropertyDefinition(propertyType, log) {\n switch (propertyType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n case \"mediaReference\":\n case \"vector\":\n return propertyType.type;\n case \"date\":\n return \"datetime\";\n case \"array\":\n return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);\n case \"timeseries\":\n if (propertyType.itemType?.type === \"string\") {\n return \"stringTimeseries\";\n } else if (propertyType.itemType?.type === \"double\") {\n return \"numericTimeseries\";\n } else return \"sensorTimeseries\";\n case \"struct\":\n {\n return propertyType.structFieldTypes.reduce((structMap, structField) => {\n structMap[structField.apiName] = objectPropertyTypeToSdkPropertyDefinition(structField.dataType);\n return structMap;\n }, {});\n }\n case \"cipherText\":\n {\n log?.info(`${JSON.stringify(propertyType.type)} is not a supported propertyType`);\n return undefined;\n }\n default:\n {\n const _ = propertyType;\n log?.info(`${JSON.stringify(propertyType)} is not a supported propertyType`);\n return undefined;\n }\n }\n}","/*\n * Copyright 2023 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 { GeneratorError } from \"./GeneratorError.js\";\nimport { wirePropertyV2ToSdkPrimaryKeyTypeDefinition } from \"./wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js\";\nimport { wirePropertyV2ToSdkPropertyDefinition } from \"./wirePropertyV2ToSdkPropertyDefinition.js\";\nexport function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2, log) {\n if (objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey] === undefined) {\n throw new GeneratorError(\"Primary key not found in object type\", {\n primaryKey: objectTypeWithLink.objectType.primaryKey,\n objectTypeApiName: objectTypeWithLink.objectType.apiName\n });\n }\n\n // saved ontology.json files may not have this implementsInterfaces2 so we need to handle\n if (objectTypeWithLink.implementsInterfaces2 == null && objectTypeWithLink.implementsInterfaces != null) {\n throw new Error(\"Your ontology.json file is missing the implementsInterfaces2 field. Please regenerate it.\");\n }\n const interfaceMap = objectTypeWithLink.implementsInterfaces2 ? Object.fromEntries(Object.entries(objectTypeWithLink.implementsInterfaces2).sort(([a], [b]) => a.localeCompare(b)).map(([interfaceApiName, impl]) => {\n // prefer V2 if available and non-empty\n if (impl.propertiesV2 && Object.keys(impl.propertiesV2).length > 0) {\n const propMap = {};\n for (const [iptApiName, implementation] of Object.entries(impl.propertiesV2)) {\n if (implementation.type === \"localPropertyImplementation\") {\n propMap[iptApiName] = implementation.propertyApiName;\n }\n }\n return [interfaceApiName, propMap];\n }\n // fall back to V1\n return [interfaceApiName, impl.properties];\n })) : {};\n return {\n type: \"object\",\n apiName: objectTypeWithLink.objectType.apiName,\n description: objectTypeWithLink.objectType.description,\n primaryKeyApiName: objectTypeWithLink.objectType.primaryKey,\n primaryKeyType: wirePropertyV2ToSdkPrimaryKeyTypeDefinition(objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey]),\n links: Object.fromEntries([...objectTypeWithLink.linkTypes].sort((a, b) => a.apiName.localeCompare(b.apiName)).map(linkType => {\n return [linkType.apiName, {\n multiplicity: linkType.cardinality === \"MANY\",\n targetType: linkType.objectTypeApiName\n }];\n })),\n properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key, value]) => [key, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key), log)]).filter(([_, value]) => value != null).sort(([a], [b]) => a.localeCompare(b))),\n implements: objectTypeWithLink.implementsInterfaces ? [...objectTypeWithLink.implementsInterfaces].sort((a, b) => a.localeCompare(b)) : objectTypeWithLink.implementsInterfaces,\n interfaceMap,\n inverseInterfaceMap: Object.fromEntries(Object.entries(interfaceMap).map(([interfaceApiName, props]) => [interfaceApiName, invertProps(props)])),\n icon: supportedIconTypes.includes(objectTypeWithLink.objectType.icon.type) ? objectTypeWithLink.objectType.icon : undefined,\n titleProperty: objectTypeWithLink.objectType.titleProperty,\n displayName: objectTypeWithLink.objectType.displayName,\n pluralDisplayName: objectTypeWithLink.objectType.pluralDisplayName,\n status: ensureStringEnumSupportedOrUndefined(objectTypeWithLink.objectType.status, supportedReleaseStatus),\n rid: objectTypeWithLink.objectType.rid,\n visibility: ensureStringEnumSupportedOrUndefined(objectTypeWithLink.objectType.visibility, supportedObjectTypeVisibility)\n };\n}\nfunction invertProps(a) {\n return a ? Object.fromEntries(Object.entries(a).map(([k, v]) => [v, k])) : undefined;\n}\nexport const supportedIconTypes = [\"blueprint\"];\nexport const supportedReleaseStatus = [\"ACTIVE\", \"EXPERIMENTAL\", \"DEPRECATED\", \"ENDORSED\"];\nexport const supportedObjectTypeVisibility = [\"NORMAL\", \"PROMINENT\", \"HIDDEN\"];\nexport function ensureStringEnumSupportedOrUndefined(value, supportedValues) {\n return value && supportedValues.includes(value) ? value : undefined;\n}","/*\n * Copyright 2023 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 { GeneratorError } from \"./GeneratorError.js\";\nimport { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nimport { ensureStringEnumSupportedOrUndefined, supportedReleaseStatus } from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\nexport function wireActionTypeV2ToSdkActionMetadata(input, unsanitizedApiName) {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n unsanitizedApiName: unsanitizedApiName ?? input.apiName,\n parameters: Object.fromEntries(Object.entries(input.parameters).sort(([a], [b]) => a.localeCompare(b)).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),\n rid: input.rid,\n status: ensureStringEnumSupportedOrUndefined(input.status, supportedReleaseStatus)\n };\n}\nfunction wireActionParameterV2ToSdkParameterDefinition(value) {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(value.dataType.type === \"array\" ? value.dataType.subType : value.dataType),\n nullable: !value.required,\n description: value.description\n };\n}\nfunction actionPropertyToSdkPropertyDefinition(parameterType) {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"mediaReference\":\n case \"marking\":\n case \"objectType\":\n case \"geohash\":\n case \"geoshape\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: parameterType.objectTypeApiName\n };\n case \"object\":\n return {\n type: \"object\",\n object: parameterType.objectTypeApiName\n };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: parameterType.interfaceTypeApiName\n };\n case \"scenarioReference\":\n return \"scenarioReference\";\n case \"struct\":\n return {\n type: \"struct\",\n struct: parameterType.fields.reduce((structMap, structField) => {\n structMap[structField.name] = actionPropertyToSdkPropertyDefinition(structField.fieldType);\n return structMap;\n }, {})\n };\n default:\n throw new GeneratorError(\"Unsupported action parameter type\", {\n parameterType: JSON.stringify(parameterType)\n });\n }\n}\nfunction createModifiedEntities(addedObjects, modifiedObjects) {\n const entities = {};\n for (const key of addedObjects) {\n entities[key] = {\n created: true,\n modified: false\n };\n }\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n } else {\n entities[key] = {\n created: false,\n modified: true\n };\n }\n }\n return entities;\n}","/*\n * Copyright 2024 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 { wirePropertyV2ToSdkPropertyDefinition } from \"./wirePropertyV2ToSdkPropertyDefinition.js\";\nexport { wireInterfaceTypeV2ToSdkObjectDefinition as __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition };\nexport function wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType, v2, log) {\n return {\n type: \"interface\",\n rid: interfaceType.rid,\n apiName: interfaceType.apiName,\n displayName: interfaceType.displayName,\n description: interfaceType.description,\n implements: interfaceType.allExtendsInterfaces ? [...interfaceType.allExtendsInterfaces].sort((a, b) => a.localeCompare(b)) : interfaceType.extendsInterfaces ? [...interfaceType.extendsInterfaces].sort((a, b) => a.localeCompare(b)) : undefined,\n properties: Object.fromEntries(Object.entries(\n // prefer V2 if available and non-empty, otherwise fall back to V1\n interfaceType.allPropertiesV2 && Object.keys(interfaceType.allPropertiesV2).length > 0 ? interfaceType.allPropertiesV2 : interfaceType.allProperties ?? interfaceType.properties).map(([key, value]) => {\n return [key, wirePropertyV2ToSdkPropertyDefinition(value, true, log)];\n }).filter(([_, value]) => value != null).sort(([a], [b]) => a.localeCompare(b))),\n links: Object.fromEntries(Object.entries(interfaceType.allLinks ?? interfaceType.links ?? {}).sort(([a], [b]) => a.localeCompare(b)).map(([linkApiName, linkType]) => [linkApiName, {\n multiplicity: linkType.cardinality === \"MANY\",\n targetTypeApiName: linkType.linkedEntityApiName.apiName,\n targetType: linkType.linkedEntityApiName.type === \"objectTypeApiName\" ? \"object\" : \"interface\"\n }])),\n implementedBy: interfaceType.implementedByObjectTypes ? [...interfaceType.implementedByObjectTypes].sort((a, b) => a.localeCompare(b)) : interfaceType.implementedByObjectTypes\n };\n}","/*\n * Copyright 2023 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 function isNullableQueryDataType(input) {\n if (input.type === \"null\") {\n return true;\n }\n if (input.type === \"union\") {\n return input.unionTypes.some(t => isNullableQueryDataType(t));\n }\n return false;\n}","/*\n * Copyright 2023 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 { isNullableQueryDataType } from \"./isNullableQueryDataType.js\";\nexport function wireQueryDataTypeToQueryDataTypeDefinition(input) {\n switch (input.type) {\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"string\":\n case \"timestamp\":\n case \"mediaReference\":\n return {\n type: input.type,\n nullable: false\n };\n case \"object\":\n return {\n type: \"object\",\n object: input.objectTypeApiName,\n nullable: false\n };\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: input.objectTypeApiName,\n nullable: false\n };\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: input.interfaceTypeApiName,\n nullable: false\n };\n case \"interfaceObjectSet\":\n return {\n type: \"interfaceObjectSet\",\n objectSet: input.interfaceTypeApiName,\n nullable: false\n };\n case \"array\":\n return {\n array: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n type: \"array\",\n nullable: isNullableQueryDataType(input.subType)\n };\n case \"set\":\n return {\n type: \"set\",\n set: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n nullable: false\n };\n case \"union\":\n const allowNulls = isNullableQueryDataType(input);\n\n // special case for a union where one half is nullable to skip the union step and just allow nulls directly\n if (allowNulls && input.unionTypes.length === 2) {\n const nonNull = input.unionTypes.find(t => t.type != null);\n if (nonNull) {\n return {\n ...wireQueryDataTypeToQueryDataTypeDefinition(nonNull),\n nullable: true\n };\n }\n }\n return {\n type: \"union\",\n union: input.unionTypes.reduce((acc, t) => {\n if (t.type === \"null\") {\n return acc;\n }\n acc.push(wireQueryDataTypeToQueryDataTypeDefinition(t));\n return acc;\n }, []),\n nullable: allowNulls\n };\n case \"struct\":\n return {\n type: \"struct\",\n struct: Object.fromEntries(input.fields.map(f => [f.name, wireQueryDataTypeToQueryDataTypeDefinition(f.fieldType)])),\n nullable: false\n };\n case \"twoDimensionalAggregation\":\n return {\n type: \"twoDimensionalAggregation\",\n twoDimensionalAggregation: get2DQueryAggregationProps(input),\n nullable: false\n };\n case \"threeDimensionalAggregation\":\n return {\n type: \"threeDimensionalAggregation\",\n threeDimensionalAggregation: get3DQueryAggregationProps(input),\n nullable: false\n };\n case \"entrySet\":\n const keyType = wireQueryDataTypeToQueryDataTypeDefinition(input.keyType);\n if (!validMapKeyTypes.includes(keyType.type)) {\n throw new Error(\"Map types with a key type of \" + keyType.type + \" are not supported\" + validMapKeyTypes.toString());\n }\n if (keyType.type === \"array\") {\n throw new Error(\"Map types cannot have keys as arrays\");\n }\n return {\n type: \"map\",\n nullable: false,\n keyType,\n valueType: wireQueryDataTypeToQueryDataTypeDefinition(input.valueType)\n };\n case \"typeReference\":\n return {\n type: \"typeReference\",\n typeId: input.typeId,\n nullable: false\n };\n case \"null\":\n case \"unsupported\":\n case \"void\":\n throw new Error(`Unable to process query because the server indicated an unsupported QueryDataType.type: ${input.type}. Please check that your query is using supported types.`);\n default:\n const _ = input;\n throw new Error(`Unsupported QueryDataType.type ${input.type}`);\n }\n}\nfunction get2DQueryAggregationProps(input) {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: input.valueType.type\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: input.valueType.type\n };\n }\n throw new Error(`Cannot create 2D aggregation with ${input.keyType.type} as its type`);\n }\n}\nfunction get3DQueryAggregationProps(input) {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: get2DQueryAggregationProps(input.valueType)\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: get2DQueryAggregationProps(input.valueType)\n };\n }\n throw new Error(`Cannot create 3D aggregation with ${input.keyType.type} as its type`);\n }\n}\n\n/**\n * Guard against aggregation key types that are allowed by the backend types but are illegal to actually use\n */\nfunction guardInvalidKeyTypes(key) {\n return key.type === \"string\" || key.type === \"boolean\";\n}\n\n/**\n * The set of all valid key types for maps. This includes all types that are represented by strings or numbers in the OSDK, and Ontology Objects.\n */\nconst validMapKeyTypes = [\"string\", \"object\", \"double\", \"float\", \"integer\", \"long\", \"date\", \"timestamp\", \"byte\", \"datetime\", \"decimal\", \"marking\", \"short\", \"objectType\"];","/*\n * Copyright 2023 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 { wireQueryDataTypeToQueryDataTypeDefinition } from \"./wireQueryDataTypeToQueryDataTypeDefinition.js\";\nexport function wireQueryTypeV2ToSdkQueryMetadata(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n parameters: Object.fromEntries(Object.entries(input.parameters).sort(([a], [b]) => a.localeCompare(b)).map(([name, parameter]) => [name, wireQueryParameterV2ToQueryParameterDefinition(parameter)])),\n output: wireQueryDataTypeToQueryDataTypeDefinition(input.output),\n rid: input.rid,\n typeReferences: input.typeReferences && Object.keys(input.typeReferences).length > 0 ? Object.fromEntries(Object.entries(input.typeReferences).map(([typeId, dataType]) => [typeId, wireQueryDataTypeToQueryDataTypeDefinition(dataType)])) : undefined\n };\n}\nexport function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n rid: input.rid\n };\n}\nexport function wireQueryParameterV2ToQueryParameterDefinition(parameter) {\n return {\n description: parameter.description,\n ...wireQueryDataTypeToQueryDataTypeDefinition(parameter.dataType)\n };\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEditedEntities.js","names":["getModifiedEntityTypes","action","addedObjects","Set","modifiedObjects","operation","operations","type","add","objectTypeApiName"],"sources":["getEditedEntities.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { ActionTypeV2 } from \"@osdk/foundry.ontologies\";\n\nexport type ModifiedEntityTypes = {\n addedObjects: Set<string>;\n modifiedObjects: Set<string>;\n};\n\nexport function getModifiedEntityTypes(\n action: ActionTypeV2,\n): ModifiedEntityTypes {\n const addedObjects = new Set<string>();\n const modifiedObjects = new Set<string>();\n for (const operation of action.operations) {\n switch (operation.type) {\n case \"createObject\":\n addedObjects.add(operation.objectTypeApiName);\n break;\n case \"modifyObject\":\n modifiedObjects.add(operation.objectTypeApiName);\n break;\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n case \"createInterfaceObject\":\n case \"modifyInterfaceObject\":\n case \"deleteInterfaceObject\":\n break;\n default:\n const _: never = operation;\n }\n }\n return { addedObjects, modifiedObjects };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASA,sBAAsBA,CACpCC,MAAoB,EACC;EACrB,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAAS,CAAC;EACtC,MAAMC,eAAe,GAAG,IAAID,GAAG,CAAS,CAAC;EACzC,KAAK,MAAME,SAAS,IAAIJ,MAAM,CAACK,UAAU,EAAE;IACzC,QAAQD,SAAS,CAACE,IAAI;MACpB,KAAK,cAAc;QACjBL,YAAY,CAACM,GAAG,CAACH,SAAS,CAACI,iBAAiB,CAAC;QAC7C;MACF,KAAK,cAAc;QACjBL,eAAe,CAACI,GAAG,CAACH,SAAS,CAACI,iBAAiB,CAAC;QAChD;MACF,KAAK,cAAc;MACnB,KAAK,YAAY;MACjB,KAAK,YAAY;MACjB,KAAK,uBAAuB;MAC5B,KAAK,uBAAuB;MAC5B,KAAK,uBAAuB;
|
|
1
|
+
{"version":3,"file":"getEditedEntities.js","names":["getModifiedEntityTypes","action","addedObjects","Set","modifiedObjects","operation","operations","type","add","objectTypeApiName"],"sources":["getEditedEntities.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { ActionTypeV2 } from \"@osdk/foundry.ontologies\";\n\nexport type ModifiedEntityTypes = {\n addedObjects: Set<string>;\n modifiedObjects: Set<string>;\n};\n\nexport function getModifiedEntityTypes(\n action: ActionTypeV2,\n): ModifiedEntityTypes {\n const addedObjects = new Set<string>();\n const modifiedObjects = new Set<string>();\n for (const operation of action.operations) {\n switch (operation.type) {\n case \"createObject\":\n addedObjects.add(operation.objectTypeApiName);\n break;\n case \"modifyObject\":\n modifiedObjects.add(operation.objectTypeApiName);\n break;\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n case \"createInterfaceObject\":\n case \"modifyInterfaceObject\":\n case \"deleteInterfaceObject\":\n case \"applyScenario\":\n break;\n default:\n const _: never = operation;\n }\n }\n return { addedObjects, modifiedObjects };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAO,SAASA,sBAAsBA,CACpCC,MAAoB,EACC;EACrB,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAAS,CAAC;EACtC,MAAMC,eAAe,GAAG,IAAID,GAAG,CAAS,CAAC;EACzC,KAAK,MAAME,SAAS,IAAIJ,MAAM,CAACK,UAAU,EAAE;IACzC,QAAQD,SAAS,CAACE,IAAI;MACpB,KAAK,cAAc;QACjBL,YAAY,CAACM,GAAG,CAACH,SAAS,CAACI,iBAAiB,CAAC;QAC7C;MACF,KAAK,cAAc;QACjBL,eAAe,CAACI,GAAG,CAACH,SAAS,CAACI,iBAAiB,CAAC;QAChD;MACF,KAAK,cAAc;MACnB,KAAK,YAAY;MACjB,KAAK,YAAY;MACjB,KAAK,uBAAuB;MAC5B,KAAK,uBAAuB;MAC5B,KAAK,uBAAuB;MAC5B,KAAK,eAAe;QAClB;MACF;IAEF;EACF;EACA,OAAO;IAAEP,YAAY;IAAEE;EAAgB,CAAC;AAC1C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wireActionTypeV2ToSdkActionMetadata.js","names":["GeneratorError","getModifiedEntityTypes","ensureStringEnumSupportedOrUndefined","supportedReleaseStatus","wireActionTypeV2ToSdkActionMetadata","input","unsanitizedApiName","modifiedEntityTypes","type","apiName","parameters","Object","fromEntries","entries","sort","a","b","localeCompare","map","key","value","wireActionParameterV2ToSdkParameterDefinition","displayName","description","modifiedEntities","createModifiedEntities","addedObjects","modifiedObjects","rid","status","multiplicity","dataType","actionPropertyToSdkPropertyDefinition","subType","nullable","required","parameterType","objectSet","objectTypeApiName","object","interface","interfaceTypeApiName","struct","fields","reduce","structMap","structField","name","fieldType","JSON","stringify","entities","created","modified"],"sources":["wireActionTypeV2ToSdkActionMetadata.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { ActionMetadata } from \"@osdk/api\";\nimport type {\n ActionParameterType,\n ActionParameterV2,\n ActionTypeV2,\n} from \"@osdk/foundry.ontologies\";\nimport { GeneratorError } from \"./GeneratorError.js\";\nimport { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nimport {\n ensureStringEnumSupportedOrUndefined,\n supportedReleaseStatus,\n} from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\n\nexport function wireActionTypeV2ToSdkActionMetadata(\n input: ActionTypeV2,\n unsanitizedApiName?: string,\n): ActionMetadata {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n unsanitizedApiName: unsanitizedApiName ?? input.apiName,\n parameters: Object.fromEntries(\n Object.entries(input.parameters).sort(\n ([a], [b]) => a.localeCompare(b),\n ).map((\n [key, value],\n ) => [key, wireActionParameterV2ToSdkParameterDefinition(value)]),\n ),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(\n modifiedEntityTypes.addedObjects,\n modifiedEntityTypes.modifiedObjects,\n ),\n rid: input.rid,\n status: ensureStringEnumSupportedOrUndefined(\n input.status,\n supportedReleaseStatus,\n ),\n };\n}\n\nfunction wireActionParameterV2ToSdkParameterDefinition(\n value: ActionParameterV2,\n): ActionMetadata.Parameter<any> {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(\n value.dataType.type === \"array\" ? value.dataType.subType : value.dataType,\n ),\n nullable: !value.required,\n description: value.description,\n };\n}\n\nfunction actionPropertyToSdkPropertyDefinition(\n parameterType: ActionParameterType,\n): ActionMetadata.Parameter[\"type\"] {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"mediaReference\":\n case \"marking\":\n case \"objectType\":\n case \"geohash\":\n case \"geoshape\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return { type: \"objectSet\", objectSet: parameterType.objectTypeApiName! };\n case \"object\":\n return { type: \"object\", object: parameterType.objectTypeApiName };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: parameterType.interfaceTypeApiName,\n };\n case \"struct\":\n return {\n type: \"struct\",\n struct: parameterType.fields.reduce(\n (\n structMap: Record<\n string,\n ActionMetadata.DataType.BaseActionParameterTypes\n >,\n structField,\n ) => {\n structMap[structField.name] = actionPropertyToSdkPropertyDefinition(\n structField.fieldType as ActionParameterType,\n ) as ActionMetadata.DataType.BaseActionParameterTypes;\n return structMap;\n },\n {},\n ),\n };\n default:\n throw new GeneratorError(\"Unsupported action parameter type\", {\n parameterType: JSON.stringify(parameterType),\n });\n }\n}\n\nfunction createModifiedEntities<K extends string>(\n addedObjects: Set<K>,\n modifiedObjects: Set<K>,\n): ActionMetadata[\"modifiedEntities\"] {\n const entities = {} as Record<\n K,\n {\n created: boolean;\n modified: boolean;\n }\n >;\n\n for (const key of addedObjects) {\n entities[key] = { created: true, modified: false };\n }\n\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n } else {\n entities[key] = { created: false, modified: true };\n }\n }\n\n return entities;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,cAAc,QAAQ,qBAAqB;AACpD,SAASC,sBAAsB,QAAQ,wBAAwB;AAC/D,SACEC,oCAAoC,EACpCC,sBAAsB,QACjB,oDAAoD;AAE3D,OAAO,SAASC,mCAAmCA,CACjDC,KAAmB,EACnBC,kBAA2B,EACX;EAChB,MAAMC,mBAAmB,GAAGN,sBAAsB,CAACI,KAAK,CAAC;EACzD,OAAO;IACLG,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAEJ,KAAK,CAACI,OAAO;IACtBH,kBAAkB,EAAEA,kBAAkB,IAAID,KAAK,CAACI,OAAO;IACvDC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAC5BD,MAAM,CAACE,OAAO,CAACR,KAAK,CAACK,UAAU,CAAC,CAACI,IAA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IAC/B,CAAC,MAAM;MACLF,QAAQ,CAAChC,GAAG,CAAC,GAAG;QAAEiC,OAAO,EAAE,KAAK;QAAEC,QAAQ,EAAE;MAAK,CAAC;IACpD;EACF;EAEA,OAAOF,QAAQ;AACjB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"wireActionTypeV2ToSdkActionMetadata.js","names":["GeneratorError","getModifiedEntityTypes","ensureStringEnumSupportedOrUndefined","supportedReleaseStatus","wireActionTypeV2ToSdkActionMetadata","input","unsanitizedApiName","modifiedEntityTypes","type","apiName","parameters","Object","fromEntries","entries","sort","a","b","localeCompare","map","key","value","wireActionParameterV2ToSdkParameterDefinition","displayName","description","modifiedEntities","createModifiedEntities","addedObjects","modifiedObjects","rid","status","multiplicity","dataType","actionPropertyToSdkPropertyDefinition","subType","nullable","required","parameterType","objectSet","objectTypeApiName","object","interface","interfaceTypeApiName","struct","fields","reduce","structMap","structField","name","fieldType","JSON","stringify","entities","created","modified"],"sources":["wireActionTypeV2ToSdkActionMetadata.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { ActionMetadata } from \"@osdk/api\";\nimport type {\n ActionParameterType,\n ActionParameterV2,\n ActionTypeV2,\n} from \"@osdk/foundry.ontologies\";\nimport { GeneratorError } from \"./GeneratorError.js\";\nimport { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nimport {\n ensureStringEnumSupportedOrUndefined,\n supportedReleaseStatus,\n} from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\n\nexport function wireActionTypeV2ToSdkActionMetadata(\n input: ActionTypeV2,\n unsanitizedApiName?: string,\n): ActionMetadata {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n unsanitizedApiName: unsanitizedApiName ?? input.apiName,\n parameters: Object.fromEntries(\n Object.entries(input.parameters).sort(\n ([a], [b]) => a.localeCompare(b),\n ).map((\n [key, value],\n ) => [key, wireActionParameterV2ToSdkParameterDefinition(value)]),\n ),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(\n modifiedEntityTypes.addedObjects,\n modifiedEntityTypes.modifiedObjects,\n ),\n rid: input.rid,\n status: ensureStringEnumSupportedOrUndefined(\n input.status,\n supportedReleaseStatus,\n ),\n };\n}\n\nfunction wireActionParameterV2ToSdkParameterDefinition(\n value: ActionParameterV2,\n): ActionMetadata.Parameter<any> {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(\n value.dataType.type === \"array\" ? value.dataType.subType : value.dataType,\n ),\n nullable: !value.required,\n description: value.description,\n };\n}\n\nfunction actionPropertyToSdkPropertyDefinition(\n parameterType: ActionParameterType,\n): ActionMetadata.Parameter[\"type\"] {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"mediaReference\":\n case \"marking\":\n case \"objectType\":\n case \"geohash\":\n case \"geoshape\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return { type: \"objectSet\", objectSet: parameterType.objectTypeApiName! };\n case \"object\":\n return { type: \"object\", object: parameterType.objectTypeApiName };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: parameterType.interfaceTypeApiName,\n };\n case \"scenarioReference\":\n return \"scenarioReference\";\n case \"struct\":\n return {\n type: \"struct\",\n struct: parameterType.fields.reduce(\n (\n structMap: Record<\n string,\n ActionMetadata.DataType.BaseActionParameterTypes\n >,\n structField,\n ) => {\n structMap[structField.name] = actionPropertyToSdkPropertyDefinition(\n structField.fieldType as ActionParameterType,\n ) as ActionMetadata.DataType.BaseActionParameterTypes;\n return structMap;\n },\n {},\n ),\n };\n default:\n throw new GeneratorError(\"Unsupported action parameter type\", {\n parameterType: JSON.stringify(parameterType),\n });\n }\n}\n\nfunction createModifiedEntities<K extends string>(\n addedObjects: Set<K>,\n modifiedObjects: Set<K>,\n): ActionMetadata[\"modifiedEntities\"] {\n const entities = {} as Record<\n K,\n {\n created: boolean;\n modified: boolean;\n }\n >;\n\n for (const key of addedObjects) {\n entities[key] = { created: true, modified: false };\n }\n\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n } else {\n entities[key] = { created: false, modified: true };\n }\n }\n\n return entities;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,cAAc,QAAQ,qBAAqB;AACpD,SAASC,sBAAsB,QAAQ,wBAAwB;AAC/D,SACEC,oCAAoC,EACpCC,sBAAsB,QACjB,oDAAoD;AAE3D,OAAO,SAASC,mCAAmCA,CACjDC,KAAmB,EACnBC,kBAA2B,EACX;EAChB,MAAMC,mBAAmB,GAAGN,sBAAsB,CAACI,KAAK,CAAC;EACzD,OAAO;IACLG,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAEJ,KAAK,CAACI,OAAO;IACtBH,kBAAkB,EAAEA,kBAAkB,IAAID,KAAK,CAACI,OAAO;IACvDC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAC5BD,MAAM,CAACE,OAAO,CAACR,KAAK,CAACK,UAAU,CAAC,CAACI,IAAI,CACnC,CAAC,CAACC,CAAC,CAAC,EAAE,CAACC,CAAC,CAAC,KAAKD,CAAC,CAACE,aAAa,CAACD,CAAC,CACjC,CAAC,CAACE,GAAG,CAAC,CACJ,CAACC,GAAG,EAAEC,K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K,CAAC;IACpD;EACF;EAEA,OAAOF,QAAQ;AACjB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/generator-converters",
|
|
3
|
-
"version": "2.23.
|
|
3
|
+
"version": "2.23.1-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@osdk/foundry.ontologies": "2.
|
|
33
|
-
"@osdk/api": "~2.23.
|
|
32
|
+
"@osdk/foundry.ontologies": "2.61.0",
|
|
33
|
+
"@osdk/api": "~2.23.1-beta.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"ts-expect": "^1.3.0",
|