@osdk/maker 0.14.0-beta.1 → 0.14.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +86 -22
  3. package/build/browser/api/action/DefaultFormat.js +2 -0
  4. package/build/browser/api/action/DefaultFormat.js.map +1 -0
  5. package/build/browser/api/action/TableConfiguration.js +2 -0
  6. package/build/browser/api/action/TableConfiguration.js.map +1 -0
  7. package/build/browser/api/code-snippets/createCodeSnippets.js +91 -0
  8. package/build/browser/api/code-snippets/createCodeSnippets.js.map +1 -0
  9. package/build/browser/api/code-snippets/snippetTypes.js +60 -0
  10. package/build/browser/api/code-snippets/snippetTypes.js.map +1 -0
  11. package/build/browser/api/defineAction.js +131 -414
  12. package/build/browser/api/defineAction.js.map +1 -1
  13. package/build/browser/api/defineCreateInterfaceObjectAction.js +85 -0
  14. package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -0
  15. package/build/browser/api/defineCreateObjectAction.js +80 -0
  16. package/build/browser/api/defineCreateObjectAction.js.map +1 -0
  17. package/build/browser/api/defineCreateOrModifyObjectAction.js +95 -0
  18. package/build/browser/api/defineCreateOrModifyObjectAction.js.map +1 -0
  19. package/build/browser/api/defineDeleteInterfaceObjectAction.js +53 -0
  20. package/build/browser/api/defineDeleteInterfaceObjectAction.js.map +1 -0
  21. package/build/browser/api/defineDeleteObjectAction.js +56 -0
  22. package/build/browser/api/defineDeleteObjectAction.js.map +1 -0
  23. package/build/browser/api/defineLink.js +5 -13
  24. package/build/browser/api/defineLink.js.map +1 -1
  25. package/build/browser/api/defineModifyInterfaceObjectAction.js +84 -0
  26. package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -0
  27. package/build/browser/api/defineModifyObjectAction.js +93 -0
  28. package/build/browser/api/defineModifyObjectAction.js.map +1 -0
  29. package/build/browser/api/defineObject.js +94 -3
  30. package/build/browser/api/defineObject.js.map +1 -1
  31. package/build/browser/api/defineOntology.js +5 -1
  32. package/build/browser/api/defineOntology.js.map +1 -1
  33. package/build/browser/api/links/LinkType.js.map +1 -1
  34. package/build/browser/api/object/ObjectType.js.map +1 -1
  35. package/build/browser/api/object/ObjectTypeDatasourceDefinition.js.map +1 -1
  36. package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -1
  37. package/build/browser/api/test/actions.test.js +12034 -0
  38. package/build/browser/api/test/actions.test.js.map +1 -0
  39. package/build/browser/api/test/interfaces.test.js +924 -0
  40. package/build/browser/api/test/interfaces.test.js.map +1 -0
  41. package/build/browser/api/test/links.test.js +1974 -0
  42. package/build/browser/api/test/links.test.js.map +1 -0
  43. package/build/browser/api/{markingconstraint.test.js → test/markingconstraint.test.js} +28 -2
  44. package/build/browser/api/test/markingconstraint.test.js.map +1 -0
  45. package/build/browser/api/test/misc.test.js +1058 -0
  46. package/build/browser/api/test/misc.test.js.map +1 -0
  47. package/build/browser/api/{objectStatus.test.js → test/objectStatus.test.js} +2 -2
  48. package/build/browser/api/test/objectStatus.test.js.map +1 -0
  49. package/build/browser/api/test/objects.test.js +2591 -0
  50. package/build/browser/api/test/objects.test.js.map +1 -0
  51. package/build/browser/api/test/spt.test.js +387 -0
  52. package/build/browser/api/test/spt.test.js.map +1 -0
  53. package/build/browser/api/test/valueTypes.test.js +156 -0
  54. package/build/browser/api/test/valueTypes.test.js.map +1 -0
  55. package/build/browser/cli/main.js +23 -4
  56. package/build/browser/cli/main.js.map +1 -1
  57. package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js +2 -2
  58. package/build/browser/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -1
  59. package/build/browser/conversion/toMarketplace/convertActionValidation.js +2 -16
  60. package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -1
  61. package/build/browser/conversion/toMarketplace/convertConditionDefinition.js +4 -4
  62. package/build/browser/conversion/toMarketplace/convertConditionDefinition.js.map +1 -1
  63. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js +3 -2
  64. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -1
  65. package/build/browser/conversion/toMarketplace/convertLink.js +109 -24
  66. package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -1
  67. package/build/browser/conversion/toMarketplace/convertObject.js +81 -4
  68. package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -1
  69. package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js +2 -2
  70. package/build/browser/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -1
  71. package/build/browser/index.js +8 -1
  72. package/build/browser/index.js.map +1 -1
  73. package/build/cjs/index.cjs +1711 -806
  74. package/build/cjs/index.cjs.map +1 -1
  75. package/build/cjs/index.d.cts +184 -115
  76. package/build/esm/api/action/DefaultFormat.js +2 -0
  77. package/build/esm/api/action/DefaultFormat.js.map +1 -0
  78. package/build/esm/api/action/TableConfiguration.js +2 -0
  79. package/build/esm/api/action/TableConfiguration.js.map +1 -0
  80. package/build/esm/api/code-snippets/createCodeSnippets.js +91 -0
  81. package/build/esm/api/code-snippets/createCodeSnippets.js.map +1 -0
  82. package/build/esm/api/code-snippets/snippetTypes.js +60 -0
  83. package/build/esm/api/code-snippets/snippetTypes.js.map +1 -0
  84. package/build/esm/api/defineAction.js +131 -414
  85. package/build/esm/api/defineAction.js.map +1 -1
  86. package/build/esm/api/defineCreateInterfaceObjectAction.js +85 -0
  87. package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -0
  88. package/build/esm/api/defineCreateObjectAction.js +80 -0
  89. package/build/esm/api/defineCreateObjectAction.js.map +1 -0
  90. package/build/esm/api/defineCreateOrModifyObjectAction.js +95 -0
  91. package/build/esm/api/defineCreateOrModifyObjectAction.js.map +1 -0
  92. package/build/esm/api/defineDeleteInterfaceObjectAction.js +53 -0
  93. package/build/esm/api/defineDeleteInterfaceObjectAction.js.map +1 -0
  94. package/build/esm/api/defineDeleteObjectAction.js +56 -0
  95. package/build/esm/api/defineDeleteObjectAction.js.map +1 -0
  96. package/build/esm/api/defineLink.js +5 -13
  97. package/build/esm/api/defineLink.js.map +1 -1
  98. package/build/esm/api/defineModifyInterfaceObjectAction.js +84 -0
  99. package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -0
  100. package/build/esm/api/defineModifyObjectAction.js +93 -0
  101. package/build/esm/api/defineModifyObjectAction.js.map +1 -0
  102. package/build/esm/api/defineObject.js +94 -3
  103. package/build/esm/api/defineObject.js.map +1 -1
  104. package/build/esm/api/defineOntology.js +5 -1
  105. package/build/esm/api/defineOntology.js.map +1 -1
  106. package/build/esm/api/links/LinkType.js.map +1 -1
  107. package/build/esm/api/object/ObjectType.js.map +1 -1
  108. package/build/esm/api/object/ObjectTypeDatasourceDefinition.js.map +1 -1
  109. package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -1
  110. package/build/esm/api/test/actions.test.js +12034 -0
  111. package/build/esm/api/test/actions.test.js.map +1 -0
  112. package/build/esm/api/test/interfaces.test.js +924 -0
  113. package/build/esm/api/test/interfaces.test.js.map +1 -0
  114. package/build/esm/api/test/links.test.js +1974 -0
  115. package/build/esm/api/test/links.test.js.map +1 -0
  116. package/build/esm/api/{markingconstraint.test.js → test/markingconstraint.test.js} +28 -2
  117. package/build/esm/api/test/markingconstraint.test.js.map +1 -0
  118. package/build/esm/api/test/misc.test.js +1058 -0
  119. package/build/esm/api/test/misc.test.js.map +1 -0
  120. package/build/esm/api/{objectStatus.test.js → test/objectStatus.test.js} +2 -2
  121. package/build/esm/api/test/objectStatus.test.js.map +1 -0
  122. package/build/esm/api/test/objects.test.js +2591 -0
  123. package/build/esm/api/test/objects.test.js.map +1 -0
  124. package/build/esm/api/test/spt.test.js +387 -0
  125. package/build/esm/api/test/spt.test.js.map +1 -0
  126. package/build/esm/api/test/valueTypes.test.js +156 -0
  127. package/build/esm/api/test/valueTypes.test.js.map +1 -0
  128. package/build/esm/cli/main.js +23 -4
  129. package/build/esm/cli/main.js.map +1 -1
  130. package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js +2 -2
  131. package/build/esm/conversion/toMarketplace/convertActionParameterConditionalOverride.js.map +1 -1
  132. package/build/esm/conversion/toMarketplace/convertActionValidation.js +2 -16
  133. package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -1
  134. package/build/esm/conversion/toMarketplace/convertConditionDefinition.js +4 -4
  135. package/build/esm/conversion/toMarketplace/convertConditionDefinition.js.map +1 -1
  136. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js +3 -2
  137. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -1
  138. package/build/esm/conversion/toMarketplace/convertLink.js +109 -24
  139. package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -1
  140. package/build/esm/conversion/toMarketplace/convertObject.js +81 -4
  141. package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -1
  142. package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js +2 -2
  143. package/build/esm/conversion/toMarketplace/convertSectionConditionalOverride.js.map +1 -1
  144. package/build/esm/index.js +8 -1
  145. package/build/esm/index.js.map +1 -1
  146. package/build/types/api/action/DefaultFormat.d.ts +1 -0
  147. package/build/types/api/action/DefaultFormat.d.ts.map +1 -0
  148. package/build/types/api/action/TableConfiguration.d.ts +8 -0
  149. package/build/types/api/action/TableConfiguration.d.ts.map +1 -0
  150. package/build/types/api/code-snippets/createCodeSnippets.d.ts +2 -0
  151. package/build/types/api/code-snippets/createCodeSnippets.d.ts.map +1 -0
  152. package/build/types/api/code-snippets/snippetTypes.d.ts +23 -0
  153. package/build/types/api/code-snippets/snippetTypes.d.ts.map +1 -0
  154. package/build/types/api/defineAction.d.ts +34 -10
  155. package/build/types/api/defineAction.d.ts.map +1 -1
  156. package/build/types/api/defineCreateInterfaceObjectAction.d.ts +3 -0
  157. package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -0
  158. package/build/types/api/defineCreateObjectAction.d.ts +3 -0
  159. package/build/types/api/defineCreateObjectAction.d.ts.map +1 -0
  160. package/build/types/api/defineCreateOrModifyObjectAction.d.ts +3 -0
  161. package/build/types/api/defineCreateOrModifyObjectAction.d.ts.map +1 -0
  162. package/build/types/api/defineDeleteInterfaceObjectAction.d.ts +3 -0
  163. package/build/types/api/defineDeleteInterfaceObjectAction.d.ts.map +1 -0
  164. package/build/types/api/defineDeleteObjectAction.d.ts +3 -0
  165. package/build/types/api/defineDeleteObjectAction.d.ts.map +1 -0
  166. package/build/types/api/defineLink.d.ts.map +1 -1
  167. package/build/types/api/defineModifyInterfaceObjectAction.d.ts +3 -0
  168. package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -0
  169. package/build/types/api/defineModifyObjectAction.d.ts +3 -0
  170. package/build/types/api/defineModifyObjectAction.d.ts.map +1 -0
  171. package/build/types/api/defineObject.d.ts.map +1 -1
  172. package/build/types/api/defineOntology.d.ts +1 -1
  173. package/build/types/api/defineOntology.d.ts.map +1 -1
  174. package/build/types/api/links/LinkType.d.ts +7 -7
  175. package/build/types/api/object/ObjectType.d.ts +1 -1
  176. package/build/types/api/object/ObjectType.d.ts.map +1 -1
  177. package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts +41 -1
  178. package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts.map +1 -1
  179. package/build/types/api/object/ObjectTypeDefinition.d.ts +1 -1
  180. package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -1
  181. package/build/types/api/test/actions.test.d.ts.map +1 -0
  182. package/build/types/api/test/interfaces.test.d.ts.map +1 -0
  183. package/build/types/api/test/links.test.d.ts.map +1 -0
  184. package/build/types/api/test/markingconstraint.test.d.ts +1 -0
  185. package/build/types/api/test/markingconstraint.test.d.ts.map +1 -0
  186. package/build/types/api/test/misc.test.d.ts +1 -0
  187. package/build/types/api/test/misc.test.d.ts.map +1 -0
  188. package/build/types/api/test/objectStatus.test.d.ts +1 -0
  189. package/build/types/api/test/objectStatus.test.d.ts.map +1 -0
  190. package/build/types/api/test/objects.test.d.ts +1 -0
  191. package/build/types/api/test/objects.test.d.ts.map +1 -0
  192. package/build/types/api/test/spt.test.d.ts +1 -0
  193. package/build/types/api/test/spt.test.d.ts.map +1 -0
  194. package/build/types/api/test/valueTypes.test.d.ts +1 -0
  195. package/build/types/api/test/valueTypes.test.d.ts.map +1 -0
  196. package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts +2 -2
  197. package/build/types/conversion/toMarketplace/convertActionParameterConditionalOverride.d.ts.map +1 -1
  198. package/build/types/conversion/toMarketplace/convertActionValidation.d.ts +0 -1
  199. package/build/types/conversion/toMarketplace/convertActionValidation.d.ts.map +1 -1
  200. package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts +2 -1
  201. package/build/types/conversion/toMarketplace/convertConditionDefinition.d.ts.map +1 -1
  202. package/build/types/conversion/toMarketplace/convertLink.d.ts +6 -0
  203. package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -1
  204. package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -1
  205. package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts +2 -1
  206. package/build/types/conversion/toMarketplace/convertSectionConditionalOverride.d.ts.map +1 -1
  207. package/build/types/index.d.ts +8 -1
  208. package/build/types/index.d.ts.map +1 -1
  209. package/package.json +4 -3
  210. package/build/browser/api/markingconstraint.test.js.map +0 -1
  211. package/build/browser/api/objectStatus.test.js.map +0 -1
  212. package/build/browser/api/overall.test.js +0 -14002
  213. package/build/browser/api/overall.test.js.map +0 -1
  214. package/build/esm/api/markingconstraint.test.js.map +0 -1
  215. package/build/esm/api/objectStatus.test.js.map +0 -1
  216. package/build/esm/api/overall.test.js +0 -14002
  217. package/build/esm/api/overall.test.js.map +0 -1
  218. package/build/types/api/markingconstraint.test.d.ts.map +0 -1
  219. package/build/types/api/objectStatus.test.d.ts.map +0 -1
  220. package/build/types/api/overall.test.d.ts.map +0 -1
  221. /package/build/types/api/{markingconstraint.test.d.ts → test/actions.test.d.ts} +0 -0
  222. /package/build/types/api/{objectStatus.test.d.ts → test/interfaces.test.d.ts} +0 -0
  223. /package/build/types/api/{overall.test.d.ts → test/links.test.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"convertLink.js","names":["cleanAndValidateLinkTypeId","convertCardinality","convertLink","linkType","definition","datasource","undefined","type","oneToMany","cardinalityHint","cardinality","manyToOneLinkMetadata","toMany","metadata","objectTypeRidManySide","object","apiName","objectTypeRidOneSide","one","oneToManyLinkMetadata","oneSidePrimaryKeyToManySidePropertyMapping","from","primaryKeyPropertyApiName","to","manyForeignKeyProperty","intermediary","objectTypeAToBLinkMetadata","many","objectTypeBToALinkMetadata","objectTypeRidA","objectTypeRidB","intermediaryObjectTypeRid","intermediaryObjectType","aToIntermediaryLinkTypeRid","linkToIntermediary","intermediaryToBLinkTypeRid","manyToMany","peeringMetadata","objectTypeAPrimaryKeyPropertyMapping","objectTypeBPrimaryKeyPropertyMapping","datasourceName","dataset","datasetRid","concat","writebackDatasetRid","objectTypeAPrimaryKeyMapping","property","column","objectTypeBPrimaryKeyMapping","editsConfiguration","onlyAllowPrivilegedEdits","redacted","id","status","active","datasources","entityMetadata","arePatchesEnabled","editsEnabled"],"sources":["convertLink.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrLinkDefinition,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrManyToManyLinkTypeDatasource,\n} from \"@osdk/client.unstable\";\nimport { cleanAndValidateLinkTypeId } from \"../../api/defineOntology.js\";\nimport type { LinkType } from \"../../api/links/LinkType.js\";\nimport { convertCardinality } from \"./convertCardinality.js\";\n\nexport function convertLink(\n linkType: LinkType,\n): OntologyIrLinkTypeBlockDataV2 {\n let definition: OntologyIrLinkDefinition;\n let datasource: OntologyIrManyToManyLinkTypeDatasource | undefined =\n undefined;\n if (\"one\" in linkType) {\n definition = {\n type: \"oneToMany\",\n oneToMany: {\n cardinalityHint: convertCardinality(linkType.cardinality),\n manyToOneLinkMetadata: linkType.toMany.metadata,\n objectTypeRidManySide: linkType.toMany.object.apiName,\n objectTypeRidOneSide: linkType.one.object.apiName,\n oneToManyLinkMetadata: linkType.one.metadata,\n oneSidePrimaryKeyToManySidePropertyMapping: [{\n from: {\n apiName: linkType.one.object.primaryKeyPropertyApiName,\n object: linkType.one.object.apiName,\n },\n to: {\n apiName: linkType.manyForeignKeyProperty,\n object: linkType.toMany.object.apiName,\n },\n }],\n },\n };\n } else if (\"intermediaryObjectType\" in linkType) {\n definition = {\n type: \"intermediary\",\n intermediary: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,\n aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.many.linkToIntermediary.apiName,\n ),\n intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.toMany.linkToIntermediary.apiName,\n ),\n },\n };\n } else {\n definition = {\n type: \"manyToMany\",\n manyToMany: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: linkType.many.object.apiName,\n objectTypeRidB: linkType.toMany.object.apiName,\n peeringMetadata: undefined,\n objectTypeAPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n to: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n }],\n objectTypeBPrimaryKeyPropertyMapping: [{\n from: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n to: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n }],\n },\n };\n\n datasource = {\n datasourceName: linkType.apiName,\n datasource: {\n type: \"dataset\",\n dataset: {\n datasetRid: \"link-\".concat(linkType.apiName),\n writebackDatasetRid: undefined,\n objectTypeAPrimaryKeyMapping: [{\n property: {\n apiName: linkType.many.object.primaryKeyPropertyApiName,\n object: linkType.many.object.apiName,\n },\n column: linkType.many.object.primaryKeyPropertyApiName,\n }],\n objectTypeBPrimaryKeyMapping: [{\n property: {\n apiName: linkType.toMany.object.primaryKeyPropertyApiName,\n object: linkType.toMany.object.apiName,\n },\n column: linkType.toMany.object.primaryKeyPropertyApiName,\n }],\n },\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: linkType.redacted,\n };\n }\n\n return {\n linkType: {\n definition: definition,\n id: cleanAndValidateLinkTypeId(linkType.apiName),\n status: linkType.status ?? { type: \"active\", active: {} },\n redacted: linkType.redacted ?? false,\n },\n datasources: datasource !== undefined ? [datasource] : [],\n entityMetadata: {\n arePatchesEnabled: linkType.editsEnabled ?? false,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,0BAA0B,QAAQ,6BAA6B;AAExE,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,OAAO,SAASC,WAAWA,CACzBC,QAAkB,EACa;EAC/B,IAAIC,UAAoC;EACxC,IAAIC,UAA8D,GAChEC,SAAS;EACX,IAAI,KAAK,IAAIH,QAAQ,EAAE;IACrBC,UAAU,GAAG;MACXG,IAAI,EAAE,WAAW;MAC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ACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"convertLink.js","names":["invariant","OntologyEntityTypeEnum","cleanAndValidateLinkTypeId","ontologyDefinition","convertCardinality","convertLink","linkType","validateLink","definition","datasource","undefined","apiName","oneObjectApiName","object","oneObject","getObject","one","toManyObjectApiName","toManyObject","toMany","type","oneToMany","cardinalityHint","cardinality","manyToOneLinkMetadata","metadata","objectTypeRidManySide","objectTypeRidOneSide","oneToManyLinkMetadata","oneSidePrimaryKeyToManySidePropertyMapping","from","primaryKeyPropertyApiName","to","manyForeignKeyProperty","manyObjectApiName","manyObject","many","intermediary","objectTypeAToBLinkMetadata","objectTypeBToALinkMetadata","objectTypeRidA","objectTypeRidB","intermediaryObjectTypeRid","intermediaryObjectType","aToIntermediaryLinkTypeRid","linkToIntermediary","intermediaryToBLinkTypeRid","manyToMany","peeringMetadata","objectTypeAPrimaryKeyPropertyMapping","objectTypeBPrimaryKeyPropertyMapping","datasourceName","dataset","datasetRid","concat","writebackDatasetRid","objectTypeAPrimaryKeyMapping","property","column","objectTypeBPrimaryKeyMapping","editsConfiguration","onlyAllowPrivilegedEdits","redacted","id","status","active","datasources","entityMetadata","arePatchesEnabled","editsEnabled","linkDefinition","foreignKey","properties","find","p","process","env","NODE_ENV","test","typesMatch","intermediaryObjectTypeApiName","manyIntermediaryOneObjectApiName","manyIntermediaryOneObject","manyIntermediaryToManyObjectApiName","manyIntermediaryToManyObject","toManyIntermediaryOneObjectApiName","toManyIntermediaryOneObject","toManyIntermediaryToManyObjectApiName","toManyIntermediaryToManyObject","objectApiName","fullObject","OBJECT_TYPE"],"sources":["convertLink.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrLinkDefinition,\n OntologyIrLinkTypeBlockDataV2,\n OntologyIrManyToManyLinkTypeDatasource,\n} from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"../../api/common/OntologyEntityTypeEnum.js\";\nimport {\n cleanAndValidateLinkTypeId,\n ontologyDefinition,\n} from \"../../api/defineOntology.js\";\nimport type { LinkType } from \"../../api/links/LinkType.js\";\nimport type { ObjectType } from \"../../api/object/ObjectType.js\";\nimport type { ObjectTypeDefinition } from \"../../api/object/ObjectTypeDefinition.js\";\nimport { convertCardinality } from \"./convertCardinality.js\";\n\nexport function convertLink(\n linkType: LinkType,\n): OntologyIrLinkTypeBlockDataV2 {\n validateLink(linkType);\n let definition: OntologyIrLinkDefinition;\n let datasource: OntologyIrManyToManyLinkTypeDatasource | undefined =\n undefined;\n if (\"one\" in linkType) {\n const { apiName: oneObjectApiName, object: oneObject } = getObject(\n linkType.one.object,\n );\n const { apiName: toManyObjectApiName, object: toManyObject } = getObject(\n linkType.toMany.object,\n );\n definition = {\n type: \"oneToMany\",\n oneToMany: {\n cardinalityHint: convertCardinality(linkType.cardinality),\n manyToOneLinkMetadata: linkType.toMany.metadata,\n objectTypeRidManySide: toManyObjectApiName,\n objectTypeRidOneSide: oneObjectApiName,\n oneToManyLinkMetadata: linkType.one.metadata,\n oneSidePrimaryKeyToManySidePropertyMapping: [{\n from: {\n apiName: oneObject.primaryKeyPropertyApiName,\n object: oneObjectApiName,\n },\n to: {\n apiName: linkType.manyForeignKeyProperty,\n object: toManyObjectApiName,\n },\n }],\n },\n };\n } else if (\"intermediaryObjectType\" in linkType) {\n const { apiName: manyObjectApiName, object: manyObject } = getObject(\n linkType.many.object,\n );\n const { apiName: toManyObjectApiName, object: toManyObject } = getObject(\n linkType.toMany.object,\n );\n definition = {\n type: \"intermediary\",\n intermediary: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: manyObjectApiName,\n objectTypeRidB: toManyObjectApiName,\n intermediaryObjectTypeRid: linkType.intermediaryObjectType.apiName,\n aToIntermediaryLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.many.linkToIntermediary.apiName,\n ),\n intermediaryToBLinkTypeRid: cleanAndValidateLinkTypeId(\n linkType.toMany.linkToIntermediary.apiName,\n ),\n },\n };\n } else {\n const { apiName: manyObjectApiName, object: manyObject } = getObject(\n linkType.many.object,\n );\n const { apiName: toManyObjectApiName, object: toManyObject } = getObject(\n linkType.toMany.object,\n );\n definition = {\n type: \"manyToMany\",\n manyToMany: {\n objectTypeAToBLinkMetadata: linkType.many.metadata,\n objectTypeBToALinkMetadata: linkType.toMany.metadata,\n objectTypeRidA: manyObjectApiName,\n objectTypeRidB: toManyObjectApiName,\n peeringMetadata: undefined,\n objectTypeAPrimaryKeyPropertyMapping: [{\n from: {\n apiName: manyObject.primaryKeyPropertyApiName,\n object: manyObjectApiName,\n },\n to: {\n apiName: manyObject.primaryKeyPropertyApiName,\n object: manyObjectApiName,\n },\n }],\n objectTypeBPrimaryKeyPropertyMapping: [{\n from: {\n apiName: toManyObject.primaryKeyPropertyApiName,\n object: toManyObjectApiName,\n },\n to: {\n apiName: toManyObject.primaryKeyPropertyApiName,\n object: toManyObjectApiName,\n },\n }],\n },\n };\n\n datasource = {\n datasourceName: linkType.apiName,\n datasource: {\n type: \"dataset\",\n dataset: {\n datasetRid: \"link-\".concat(linkType.apiName),\n writebackDatasetRid: undefined,\n objectTypeAPrimaryKeyMapping: [{\n property: {\n apiName: manyObject.primaryKeyPropertyApiName,\n object: manyObjectApiName,\n },\n column: manyObject.primaryKeyPropertyApiName,\n }],\n objectTypeBPrimaryKeyMapping: [{\n property: {\n apiName: toManyObject.primaryKeyPropertyApiName,\n object: toManyObjectApiName,\n },\n column: toManyObject.primaryKeyPropertyApiName,\n }],\n },\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: linkType.redacted,\n };\n }\n\n return {\n linkType: {\n definition: definition,\n id: cleanAndValidateLinkTypeId(linkType.apiName),\n status: linkType.status ?? { type: \"active\", active: {} },\n redacted: linkType.redacted ?? false,\n },\n datasources: datasource !== undefined ? [datasource] : [],\n entityMetadata: {\n arePatchesEnabled: linkType.editsEnabled ?? false,\n },\n };\n}\nfunction validateLink(linkDefinition: LinkType) {\n if (\"one\" in linkDefinition) {\n const { apiName: oneObjectApiName, object: oneObject } = getObject(\n linkDefinition.one.object,\n );\n const { apiName: toManyObjectApiName, object: toManyObject } = getObject(\n linkDefinition.toMany.object,\n );\n const foreignKey = toManyObject.properties?.find(p =>\n p.apiName === linkDefinition.manyForeignKeyProperty\n );\n invariant(\n foreignKey !== undefined,\n `Foreign key ${linkDefinition.manyForeignKeyProperty} on link ${linkDefinition.apiName} does not exist on object ${toManyObjectApiName}`,\n );\n\n invariant(\n /([a-z][a-z0-9\\\\-]*)/.test(linkDefinition.apiName),\n `Top level link api names are expected to match the regex pattern ([a-z][a-z0-9\\\\-]*) ${linkDefinition.apiName} does not match`,\n );\n\n const typesMatch = foreignKey.type\n === oneObject.properties?.find(p =>\n p.apiName === oneObject.primaryKeyPropertyApiName\n )?.type;\n invariant(\n typesMatch,\n `Link ${linkDefinition.apiName} has type mismatch between the one side's primary key and the foreign key on the many side`,\n );\n }\n if (\"intermediaryObjectType\" in linkDefinition) {\n const {\n apiName: intermediaryObjectTypeApiName,\n object: intermediaryObjectType,\n } = getObject(linkDefinition.intermediaryObjectType);\n const { apiName: manyObjectApiName, object: manyObject } = getObject(\n linkDefinition.many.object,\n );\n const { apiName: toManyObjectApiName, object: toManyObject } = getObject(\n linkDefinition.toMany.object,\n );\n\n const {\n apiName: manyIntermediaryOneObjectApiName,\n object: manyIntermediaryOneObject,\n } = getObject((linkDefinition.many.linkToIntermediary as any).one.object);\n const {\n apiName: manyIntermediaryToManyObjectApiName,\n object: manyIntermediaryToManyObject,\n } = getObject(linkDefinition.many.linkToIntermediary.toMany.object);\n invariant(\n \"one\" in linkDefinition.many.linkToIntermediary\n && manyIntermediaryOneObjectApiName\n === manyObject.apiName\n && manyIntermediaryToManyObjectApiName\n === intermediaryObjectTypeApiName,\n `LinkTypeA ${linkDefinition.many.linkToIntermediary.apiName} must be a many to one link from intermediary object ${intermediaryObjectTypeApiName} to objectA ${manyObjectApiName}`,\n );\n\n const {\n apiName: toManyIntermediaryOneObjectApiName,\n object: toManyIntermediaryOneObject,\n } = getObject((linkDefinition.toMany.linkToIntermediary as any).one.object);\n const {\n apiName: toManyIntermediaryToManyObjectApiName,\n object: toManyIntermediaryToManyObject,\n } = getObject(linkDefinition.toMany.linkToIntermediary.toMany.object);\n invariant(\n \"one\" in linkDefinition.toMany.linkToIntermediary\n && toManyIntermediaryOneObjectApiName\n === toManyObjectApiName\n && toManyIntermediaryToManyObjectApiName\n === intermediaryObjectTypeApiName,\n `LinkTypeB ${linkDefinition.toMany.linkToIntermediary.apiName} must be a many to one link from intermediary object ${intermediaryObjectTypeApiName} to objectB ${toManyObjectApiName}`,\n );\n }\n}\n\nexport function getObject(\n object: string | ObjectTypeDefinition,\n): { apiName: string; object: ObjectType } {\n const objectApiName = typeof object === \"string\" ? object : object.apiName;\n const fullObject =\n ontologyDefinition[OntologyEntityTypeEnum.OBJECT_TYPE][objectApiName];\n invariant(\n fullObject !== undefined,\n `Object ${objectApiName} is not defined`,\n );\n return { apiName: objectApiName, object: fullObject };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,sBAAsB,QAAQ,4CAA4C;AACnF,SACEC,0BAA0B,EAC1BC,kBAAkB,QACb,6BAA6B;AAIpC,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D,OA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asource, convertObjectStatus } from "../../api/defineOntology.js";
17
+ import { addNamespaceIfNone, buildDatasource, cleanAndValidateLinkTypeId, convertObjectStatus } from "../../api/defineOntology.js";
18
18
  import { isExotic } from "../../api/properties/PropertyTypeType.js";
19
19
  import { convertDatasourceDefinition } from "./convertDatasourceDefinition.js";
20
20
  import { convertObjectPropertyType } from "./convertObjectPropertyType.js";
21
21
  export function convertObject(objectType) {
22
- const propertyDatasources = (objectType.properties ?? []).flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));
22
+ const {
23
+ derivedDatasources,
24
+ derivedPropertyNames
25
+ } = extractDerivedDatasources(objectType);
26
+ const propertyDatasources = (objectType.properties ?? []).filter(prop => !derivedPropertyNames.includes(prop.apiName)).flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));
23
27
  const classificationGroupMarkingNames = extractMarkingGroups(objectType.properties ?? [], "CBAC");
24
28
  const mandatoryMarkingNames = extractMarkingGroups(objectType.properties ?? [], "MANDATORY");
25
29
  const classificationInputGroup = classificationGroupMarkingNames.length > 0 ? classificationGroupMarkingNames.reduce((l, r) => l + "/" + r) : undefined;
26
30
  const mandatoryInputGroup = mandatoryMarkingNames.length > 0 ? mandatoryMarkingNames.reduce((l, r) => l + "/" + r) : undefined;
27
- const objectDatasource = buildDatasource(objectType.apiName, convertDatasourceDefinition(objectType, objectType.properties ?? []), classificationInputGroup, mandatoryInputGroup);
31
+ const objectDatasource = buildDatasource(objectType.apiName, convertDatasourceDefinition(objectType, (objectType.properties ?? []).filter(prop => !derivedPropertyNames.includes(prop.apiName))), classificationInputGroup, mandatoryInputGroup);
28
32
  const implementations = objectType.implementsInterfaces ?? [];
29
33
  return {
30
34
  objectType: {
@@ -58,7 +62,7 @@ export function convertObject(objectType) {
58
62
  })),
59
63
  allImplementsInterfaces: {}
60
64
  },
61
- datasources: [...propertyDatasources, objectDatasource],
65
+ datasources: [...propertyDatasources, ...derivedDatasources, objectDatasource],
62
66
  entityMetadata: {
63
67
  arePatchesEnabled: objectType.editsEnabled ?? false
64
68
  }
@@ -105,4 +109,77 @@ export function extractPropertyDatasource(property, objectTypeApiName) {
105
109
  return [];
106
110
  }
107
111
  }
112
+ function extractDerivedDatasources(objectType) {
113
+ const inputDerivedDatasources = (objectType.datasources ?? []).filter(ds => ds.type === "derived");
114
+ const derivedDatasources = inputDerivedDatasources.map((ds, i) => buildDerivedDatasource(ds, i, objectType.apiName));
115
+ const derivedPropertyNames = inputDerivedDatasources.flatMap(ds => Object.keys(ds.propertyMapping));
116
+ return {
117
+ derivedDatasources,
118
+ derivedPropertyNames
119
+ };
120
+ }
121
+ function buildDerivedDatasource(datasource, index, objectTypeApiName) {
122
+ const linkDefinition = {
123
+ type: "multiHopLink",
124
+ multiHopLink: {
125
+ steps: datasource.linkDefinition.map(step => ({
126
+ type: "searchAround",
127
+ searchAround: {
128
+ linkTypeIdentifier: {
129
+ type: "linkType",
130
+ linkType: cleanAndValidateLinkTypeId(step.linkType.apiName)
131
+ },
132
+ linkTypeSide: step.side ?? "SOURCE"
133
+ }
134
+ }))
135
+ }
136
+ };
137
+ const isLinkedProperties = typeof Object.values(datasource.propertyMapping)[0] === "string";
138
+ const derivedDefinition = isLinkedProperties ? {
139
+ type: "linkedProperties",
140
+ linkedProperties: {
141
+ linkDefinition,
142
+ propertyTypeMapping: Object.fromEntries(Object.entries(datasource.propertyMapping).map(([sourceProp, targetProp]) => [sourceProp, {
143
+ type: "propertyType",
144
+ propertyType: targetProp
145
+ }]))
146
+ }
147
+ } : {
148
+ type: "aggregatedProperties",
149
+ aggregatedProperties: {
150
+ linkDefinition,
151
+ propertyTypeMapping: Object.fromEntries(Object.entries(datasource.propertyMapping).map(([sourceProp, agg]) => [sourceProp, buildAggregation(agg)]))
152
+ }
153
+ };
154
+ return buildDatasource(objectTypeApiName + ".derived." + index.toString(), {
155
+ type: "derived",
156
+ derived: {
157
+ definition: derivedDefinition
158
+ }
159
+ });
160
+ }
161
+ function buildAggregation(agg) {
162
+ const type = agg.type;
163
+ const limit = "limit" in agg ? agg.limit : undefined;
164
+ const foreignProperty = "property" in agg ? agg.property : undefined;
165
+ const innerDef = {};
166
+ if (type !== "count") {
167
+ if (["collectList", "collectSet"].includes(type)) {
168
+ innerDef["linkedProperty"] = {
169
+ type: "propertyType",
170
+ propertyType: foreignProperty
171
+ };
172
+ innerDef["limit"] = limit;
173
+ } else {
174
+ innerDef["property"] = {
175
+ type: "propertyType",
176
+ propertyType: foreignProperty
177
+ };
178
+ }
179
+ }
180
+ return {
181
+ type,
182
+ [type]: innerDef
183
+ };
184
+ }
108
185
  //# sourceMappingURL=convertObject.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"convertObject.js","names":["addNamespaceIfNone","buildDatasource","convertObjectStatus","isExotic","convertDatasourceDefinition","convertObjectPropertyType","convertObject","objectType","propertyDatasources","properties","flatMap","prop","extractPropertyDatasource","apiName","classificationGroupMarkingNames","extractMarkingGroups","mandatoryMarkingNames","classificationInputGroup","length","reduce","l","r","undefined","mandatoryInputGroup","objectDatasource","implementations","implementsInterfaces","displayMetadata","description","displayName","groupDisplayName","icon","type","blueprint","locator","color","pluralDisplayName","visibility","primaryKeys","primaryKeyPropertyApiName","propertyTypes","Object","fromEntries","map","val","titlePropertyTypeRid","titlePropertyApiName","status","redacted","implementsInterfaces2","impl","interfaceTypeApiName","implements","linksV2","propertiesV2","propertyMapping","mapping","interfaceProperty","propertyTypeRid","mapsTo","allImplementsInterfaces","datasources","entityMetadata","arePatchesEnabled","editsEnabled","markingType","markingInputGroupName","filter","property","objectTypeApiName","identifier","geotimeDefinition","geotimeSeries","geotimeSeriesIntegrationRid","mediaSetDefinition","mediaSetView","assumedMarkings","mediaSetViewLocator"],"sources":["convertObject.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrObjectTypeDatasource,\n OntologyIrObjectTypeDatasourceDefinition,\n OntologyIrPropertyType,\n} from \"@osdk/client.unstable\";\nimport {\n addNamespaceIfNone,\n buildDatasource,\n convertObjectStatus,\n} from \"../../api/defineOntology.js\";\nimport type { ObjectPropertyType } from \"../../api/object/ObjectPropertyType.js\";\nimport type { ObjectType } from \"../../api/object/ObjectType.js\";\nimport { isExotic } from \"../../api/properties/PropertyTypeType.js\";\nimport { convertDatasourceDefinition } from \"./convertDatasourceDefinition.js\";\nimport { convertObjectPropertyType } from \"./convertObjectPropertyType.js\";\n\nexport function convertObject(\n objectType: ObjectType,\n): OntologyIrObjectTypeBlockDataV2 {\n const propertyDatasources: OntologyIrObjectTypeDatasource[] =\n (objectType.properties ?? [])\n .flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));\n\n const classificationGroupMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"CBAC\",\n );\n\n const mandatoryMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"MANDATORY\",\n );\n\n const classificationInputGroup = classificationGroupMarkingNames.length > 0\n ? classificationGroupMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const mandatoryInputGroup = mandatoryMarkingNames.length > 0\n ? mandatoryMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const objectDatasource = buildDatasource(\n objectType.apiName,\n convertDatasourceDefinition(\n objectType,\n objectType.properties ?? [],\n ),\n classificationInputGroup,\n mandatoryInputGroup,\n );\n\n const implementations = objectType.implementsInterfaces ?? [];\n\n return {\n objectType: {\n displayMetadata: {\n description: objectType.description,\n displayName: objectType.displayName,\n groupDisplayName: undefined,\n icon: {\n type: \"blueprint\",\n blueprint: objectType.icon ?? { locator: \"cube\", color: \"#2D72D2\" },\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\",\n },\n primaryKeys: [objectType.primaryKeyPropertyApiName],\n propertyTypes: Object.fromEntries(\n objectType.properties?.map<[string, OntologyIrPropertyType]>(\n val => [val.apiName, convertObjectPropertyType(val)],\n ) ?? [],\n ),\n titlePropertyTypeRid: objectType.titlePropertyApiName,\n apiName: objectType.apiName,\n status: convertObjectStatus(objectType.status),\n redacted: false,\n implementsInterfaces2: implementations.map(impl => ({\n interfaceTypeApiName: impl.implements.apiName,\n linksV2: {},\n propertiesV2: {},\n properties: Object.fromEntries(\n impl.propertyMapping.map(\n mapping => [addNamespaceIfNone(mapping.interfaceProperty), {\n propertyTypeRid: mapping.mapsTo,\n }],\n ),\n ),\n })),\n allImplementsInterfaces: {},\n },\n datasources: [...propertyDatasources, objectDatasource],\n entityMetadata: { arePatchesEnabled: objectType.editsEnabled ?? false },\n };\n}\n\n/**\n * Extracts marking group names of a specific type from object properties\n */\nexport function extractMarkingGroups(\n properties: ObjectPropertyType[],\n markingType: \"CBAC\" | \"MANDATORY\",\n): string[] {\n return properties\n .map(prop => {\n if (\n typeof prop.type === \"object\"\n && prop.type.type === \"marking\"\n && prop.type.markingType === markingType\n ) {\n return prop.type.markingInputGroupName;\n }\n return undefined;\n })\n .filter((val): val is string => val !== undefined);\n}\nexport function extractPropertyDatasource(\n property: ObjectPropertyType,\n objectTypeApiName: string,\n): OntologyIrObjectTypeDatasource[] {\n if (!isExotic(property.type)) {\n return [];\n }\n const identifier = objectTypeApiName + \".\" + property.apiName;\n switch (property.type as string) {\n case \"geotimeSeries\":\n const geotimeDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"geotimeSeries\",\n geotimeSeries: {\n geotimeSeriesIntegrationRid: identifier,\n properties: [property.apiName],\n },\n };\n return [buildDatasource(property.apiName, geotimeDefinition)];\n case \"mediaReference\":\n const mediaSetDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"mediaSetView\",\n mediaSetView: {\n assumedMarkings: [],\n mediaSetViewLocator: identifier,\n properties: [property.apiName],\n },\n };\n return [buildDatasource(property.apiName, mediaSetDefinition)];\n default:\n return [];\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,kBAAkB,EAClBC,eAAe,EACfC,mBAAmB,QACd,6BAA6B;AAGpC,SAASC,QAAQ,QAAQ,0CAA0C;AACnE,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,yBAAyB,QAAQ,gCAAgC;AAE1E,OAAO,SAASC,aAAaA,CAC3BC,UAAsB,EACW;EACjC,MAAMC,mBAAqD,GACzD,CAACD,UAAU,CAACE,UAAU,IAAI,EAAE,EACzBC,OAAO,CAACC,IAAI,IAAIC,yBAAyB,CAACD,IAAI,EAAEJ,UAAU,CAACM,OAAO,CAAC,CAAC;EAEzE,MAAMC,+BAA+B,GAAGC,oBAAoB,CAC1DR,UAAU,CAACE,UAAU,IAAI,EAAE,EAC3B,MACF,CAAC;EAED,MAAMO,qBAAqB,GAAGD,oBAAoB,CAChDR,UAAU,CAACE,UAAU,IAAI,EAAE,EAC3B,WACF,CAAC;EAED,MAAMQ,wBAAwB,GAAGH,+BAA+B,CAACI,MAAM,GAAG,CAAC,GACvEJ,+BAA+B,CAACK,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAG,GAAG,GAAGC,CAAC,CAAC,GAC7DC,SAAS;EAEb,MAAMC,mBAAmB,GAAGP,qBAAqB,CAACE,MAAM,GAAG,CAAC,GACxDF,qBAAqB,CAACG,MAAM,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAG,GAAG,GAAGC,CAAC,CAAC,GACnDC,SAAS;EAEb,MAAME,gBAAgB,GAAGvB,eAAe,CACtCM,UAAU,CAACM,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D,UAAU,EAAE,CAAC2D,QAAQ,CAACvD,OAAO;QAC/B;MACF,CAAC;MACD,OAAO,CAACZ,eAAe,CAACmE,QAAQ,CAACvD,OAAO,EAAE0D,iBAAiB,CAAC,CAAC;IAC/D,KAAK,gBAAgB;MACnB,MAAMG,kBAA4D,GAAG;QACnE1C,IAAI,EAAE,cAAc;QACpB2C,YAAY,EAAE;UACZC,eAAe,EAAE,EAAE;UACnBC,mBAAmB,EAAEP,UAAU;UAC/B7D,UAAU,EAAE,CAAC2D,QAAQ,CAACvD,OAAO;QAC/B;MACF,CAAC;MACD,OAAO,CAACZ,eAAe,CAACmE,QAAQ,CAACvD,OAAO,EAAE6D,kBAAkB,CAAC,CAAC;IAChE;MACE,OAAO,EAAE;EACb;AACF","ignoreList":[]}
1
+ {"version":3,"file":"convertObject.js","names":["addNamespaceIfNone","buildDatasource","cleanAndValidateLinkTypeId","convertObjectStatus","isExotic","convertDatasourceDefinition","convertObjectPropertyType","convertObject","objectType","derivedDatasources","derivedPropertyNames","extractDerivedDatasources","propertyDatasources","properties","filter","prop","includes","apiName","flatMap","extractPropertyDatasource","classificationGroupMarkingNames","extractMarkingGroups","mandatoryMarkingNames","classificationInputGroup","length","reduce","l","r","undefined","mandatoryInputGroup","objectDatasource","implementations","implementsInterfaces","displayMetadata","description","displayName","groupDisplayName","icon","type","blueprint","locator","color","pluralDisplayName","visibility","primaryKeys","primaryKeyPropertyApiName","propertyTypes","Object","fromEntries","map","val","titlePropertyTypeRid","titlePropertyApiName","status","redacted","implementsInterfaces2","impl","interfaceTypeApiName","implements","linksV2","propertiesV2","propertyMapping","mapping","interfaceProperty","propertyTypeRid","mapsTo","allImplementsInterfaces","datasources","entityMetadata","arePatchesEnabled","editsEnabled","markingType","markingInputGroupName","property","objectTypeApiName","identifier","geotimeDefinition","geotimeSeries","geotimeSeriesIntegrationRid","mediaSetDefinition","mediaSetView","assumedMarkings","mediaSetViewLocator","inputDerivedDatasources","ds","i","buildDerivedDatasource","keys","datasource","index","linkDefinition","multiHopLink","steps","step","searchAround","linkTypeIdentifier","linkType","linkTypeSide","side","isLinkedProperties","values","derivedDefinition","linkedProperties","propertyTypeMapping","entries","sourceProp","targetProp","propertyType","aggregatedProperties","agg","buildAggregation","toString","derived","definition","limit","foreignProperty","innerDef"],"sources":["convertObject.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrDerivedPropertiesDefinition,\n OntologyIrDerivedPropertyAggregation,\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrObjectTypeDatasource,\n OntologyIrObjectTypeDatasourceDefinition,\n OntologyIrPropertyType,\n} from \"@osdk/client.unstable\";\nimport {\n addNamespaceIfNone,\n buildDatasource,\n cleanAndValidateLinkTypeId,\n convertObjectStatus,\n} from \"../../api/defineOntology.js\";\nimport type { ObjectPropertyType } from \"../../api/object/ObjectPropertyType.js\";\nimport type { ObjectType } from \"../../api/object/ObjectType.js\";\nimport type {\n DerivedPropertyAggregation,\n ObjectTypeDatasourceDefinition_derived,\n} from \"../../api/object/ObjectTypeDatasourceDefinition.js\";\nimport { isExotic } from \"../../api/properties/PropertyTypeType.js\";\nimport { convertDatasourceDefinition } from \"./convertDatasourceDefinition.js\";\nimport { convertObjectPropertyType } from \"./convertObjectPropertyType.js\";\n\nexport function convertObject(\n objectType: ObjectType,\n): OntologyIrObjectTypeBlockDataV2 {\n const { derivedDatasources, derivedPropertyNames } =\n extractDerivedDatasources(objectType);\n\n const propertyDatasources: OntologyIrObjectTypeDatasource[] =\n (objectType.properties ?? [])\n .filter(prop => !derivedPropertyNames.includes(prop.apiName))\n .flatMap(prop => extractPropertyDatasource(prop, objectType.apiName));\n\n const classificationGroupMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"CBAC\",\n );\n\n const mandatoryMarkingNames = extractMarkingGroups(\n objectType.properties ?? [],\n \"MANDATORY\",\n );\n\n const classificationInputGroup = classificationGroupMarkingNames.length > 0\n ? classificationGroupMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const mandatoryInputGroup = mandatoryMarkingNames.length > 0\n ? mandatoryMarkingNames.reduce((l, r) => l + \"/\" + r)\n : undefined;\n\n const objectDatasource = buildDatasource(\n objectType.apiName,\n convertDatasourceDefinition(\n objectType,\n (objectType.properties ?? []).filter(prop =>\n !derivedPropertyNames.includes(prop.apiName)\n ),\n ),\n classificationInputGroup,\n mandatoryInputGroup,\n );\n\n const implementations = objectType.implementsInterfaces ?? [];\n\n return {\n objectType: {\n displayMetadata: {\n description: objectType.description,\n displayName: objectType.displayName,\n groupDisplayName: undefined,\n icon: {\n type: \"blueprint\",\n blueprint: objectType.icon ?? { locator: \"cube\", color: \"#2D72D2\" },\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\",\n },\n primaryKeys: [objectType.primaryKeyPropertyApiName],\n propertyTypes: Object.fromEntries(\n objectType.properties?.map<[string, OntologyIrPropertyType]>(\n val => [val.apiName, convertObjectPropertyType(val)],\n ) ?? [],\n ),\n titlePropertyTypeRid: objectType.titlePropertyApiName,\n apiName: objectType.apiName,\n status: convertObjectStatus(objectType.status),\n redacted: false,\n implementsInterfaces2: implementations.map(impl => ({\n interfaceTypeApiName: impl.implements.apiName,\n linksV2: {},\n propertiesV2: {},\n properties: Object.fromEntries(\n impl.propertyMapping.map(\n mapping => [addNamespaceIfNone(mapping.interfaceProperty), {\n propertyTypeRid: mapping.mapsTo,\n }],\n ),\n ),\n })),\n allImplementsInterfaces: {},\n },\n datasources: [\n ...propertyDatasources,\n ...derivedDatasources,\n objectDatasource,\n ],\n entityMetadata: { arePatchesEnabled: objectType.editsEnabled ?? false },\n };\n}\n\n/**\n * Extracts marking group names of a specific type from object properties\n */\nexport function extractMarkingGroups(\n properties: ObjectPropertyType[],\n markingType: \"CBAC\" | \"MANDATORY\",\n): string[] {\n return properties\n .map(prop => {\n if (\n typeof prop.type === \"object\"\n && prop.type.type === \"marking\"\n && prop.type.markingType === markingType\n ) {\n return prop.type.markingInputGroupName;\n }\n return undefined;\n })\n .filter((val): val is string => val !== undefined);\n}\nexport function extractPropertyDatasource(\n property: ObjectPropertyType,\n objectTypeApiName: string,\n): OntologyIrObjectTypeDatasource[] {\n if (!isExotic(property.type)) {\n return [];\n }\n const identifier = objectTypeApiName + \".\" + property.apiName;\n switch (property.type as string) {\n case \"geotimeSeries\":\n const geotimeDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"geotimeSeries\",\n geotimeSeries: {\n geotimeSeriesIntegrationRid: identifier,\n properties: [property.apiName],\n },\n };\n return [buildDatasource(property.apiName, geotimeDefinition)];\n case \"mediaReference\":\n const mediaSetDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"mediaSetView\",\n mediaSetView: {\n assumedMarkings: [],\n mediaSetViewLocator: identifier,\n properties: [property.apiName],\n },\n };\n return [buildDatasource(property.apiName, mediaSetDefinition)];\n default:\n return [];\n }\n}\n\nfunction extractDerivedDatasources(\n objectType: ObjectType,\n): {\n derivedDatasources: OntologyIrObjectTypeDatasource[];\n derivedPropertyNames: string[];\n} {\n const inputDerivedDatasources = (objectType.datasources ?? []).filter(ds =>\n ds.type === \"derived\"\n );\n const derivedDatasources = inputDerivedDatasources.map((ds, i) =>\n buildDerivedDatasource(ds, i, objectType.apiName)\n );\n const derivedPropertyNames = inputDerivedDatasources.flatMap(ds =>\n Object.keys(ds.propertyMapping)\n );\n return { derivedDatasources, derivedPropertyNames };\n}\n\nfunction buildDerivedDatasource(\n datasource: ObjectTypeDatasourceDefinition_derived,\n index: number,\n objectTypeApiName: string,\n): OntologyIrObjectTypeDatasource {\n const linkDefinition = {\n type: \"multiHopLink\",\n multiHopLink: {\n steps: datasource.linkDefinition.map(step => ({\n type: \"searchAround\",\n searchAround: {\n linkTypeIdentifier: {\n type: \"linkType\",\n linkType: cleanAndValidateLinkTypeId(step.linkType.apiName),\n },\n linkTypeSide: step.side ?? \"SOURCE\",\n },\n })),\n },\n };\n\n const isLinkedProperties =\n typeof Object.values(datasource.propertyMapping)[0] === \"string\";\n const derivedDefinition = isLinkedProperties\n ? {\n type: \"linkedProperties\",\n linkedProperties: {\n linkDefinition,\n propertyTypeMapping: Object.fromEntries(\n Object.entries(datasource.propertyMapping).map((\n [sourceProp, targetProp],\n ) => [sourceProp, {\n type: \"propertyType\",\n propertyType: targetProp,\n }]),\n ),\n },\n }\n : {\n type: \"aggregatedProperties\",\n aggregatedProperties: {\n linkDefinition,\n propertyTypeMapping: Object.fromEntries(\n Object.entries(datasource.propertyMapping).map((\n [sourceProp, agg],\n ) => [sourceProp, buildAggregation(agg)]),\n ),\n },\n };\n const fullDefinition: OntologyIrObjectTypeDatasourceDefinition = {\n type: \"derived\",\n derived: {\n definition: derivedDefinition as OntologyIrDerivedPropertiesDefinition,\n },\n };\n return buildDatasource(\n objectTypeApiName + \".derived.\" + index.toString(),\n fullDefinition,\n );\n}\n\nfunction buildAggregation(\n agg: DerivedPropertyAggregation,\n): OntologyIrDerivedPropertyAggregation {\n const type = agg.type;\n const limit = \"limit\" in agg ? agg.limit : undefined;\n const foreignProperty = \"property\" in agg ? agg.property : undefined;\n const innerDef: any = {};\n if (type !== \"count\") {\n if ([\"collectList\", \"collectSet\"].includes(type)) {\n innerDef[\"linkedProperty\"] = {\n type: \"propertyType\",\n propertyType: foreignProperty,\n };\n innerDef[\"limit\"] = limit;\n } else {\n innerDef[\"property\"] = {\n type: \"propertyType\",\n propertyType: foreignProperty,\n };\n }\n }\n return {\n type,\n [type]: innerDef,\n } as unknown as OntologyIr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H,OAAO5G,eAAe,CACpByE,iBAAiB,GAAG,WAAW,GAAGe,KAAK,CAACsB,QAAQ,CAAC,CAAC,EAPa;IAC/DzE,IAAI,EAAE,SAAS;IACf0E,OAAO,EAAE;MACPC,UAAU,EAAEZ;IACd;EACF,CAIA,CAAC;AACH;AAEA,SAASS,gBAAgBA,CACvBD,GAA+B,EACO;EACtC,MAAMvE,IAAI,GAAGuE,GAAG,CAACvE,IAAI;EACrB,MAAM4E,KAAK,GAAG,OAAO,IAAIL,GAAG,GAAGA,GAAG,CAACK,KAAK,GAAGtF,SAAS;EACpD,MAAMuF,eAAe,GAAG,UAAU,IAAIN,GAAG,GAAGA,GAAG,CAACpC,QAAQ,GAAG7C,SAAS;EACpE,MAAMwF,QAAa,GAAG,CAAC,CAAC;EACxB,IAAI9E,IAAI,KAAK,OAAO,EAAE;IACpB,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAACtB,QAAQ,CAACsB,IAAI,CAAC,EAAE;MAChD8E,QAAQ,CAAC,gBAAgB,CAAC,GAAG;QAC3B9E,IAAI,EAAE,cAAc;QACpBqE,YAAY,EAAEQ;MAChB,CAAC;MACDC,QAAQ,CAAC,OAAO,CAAC,GAAGF,KAAK;IAC3B,CAAC,MAAM;MACLE,QAAQ,CAAC,UAAU,CAAC,GAAG;QACrB9E,IAAI,EAAE,cAAc;QACpBqE,YAAY,EAAEQ;MAChB,CAAC;IACH;EACF;EACA,OAAO;IACL7E,IAAI;IACJ,CAACA,IAAI,GAAG8E;EACV,CAAC;AACH","ignoreList":[]}
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  import { convertConditionDefinition } from "./convertConditionDefinition.js";
18
- export function convertSectionConditionalOverride(override, defaultVisibility, objectProperties) {
18
+ export function convertSectionConditionalOverride(override, defaultVisibility, actionParameters) {
19
19
  return {
20
- condition: convertConditionDefinition(override.condition, objectProperties),
20
+ condition: convertConditionDefinition(override.condition, actionParameters),
21
21
  sectionBlockOverrides: [{
22
22
  type: "visibility",
23
23
  visibility: {
@@ -1 +1 @@
1
- {"version":3,"file":"convertSectionConditionalOverride.js","names":["convertConditionDefinition","convertSectionConditionalOverride","override","defaultVisibility","objectProperties","condition","sectionBlockOverrides","type","visibility","hidden","visible"],"sources":["convertSectionConditionalOverride.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OntologyIrSectionConditionalOverride } from \"@osdk/client.unstable\";\nimport type { SectionConditionalOverride } from \"../../api/action/SectionConditionalOverride.js\";\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\n\nexport function convertSectionConditionalOverride(\n override: SectionConditionalOverride,\n defaultVisibility: \"visible\" | \"hidden\",\n objectProperties?: Array<String>,\n): OntologyIrSectionConditionalOverride {\n return {\n condition: convertConditionDefinition(override.condition, objectProperties),\n sectionBlockOverrides: [\n {\n type: \"visibility\",\n visibility: {\n visibility: defaultVisibility === \"visible\"\n ? {\n type: \"hidden\",\n hidden: {},\n }\n : {\n type: \"visible\",\n visible: {},\n },\n },\n },\n ],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,0BAA0B,QAAQ,iCAAiC;AAE5E,OAAO,SAASC,iCAAiCA,CAC/CC,QAAoC,EACpCC,iBAAuC,EACvCC,gBAAgC,EACM;EACtC,OAAO;IACLC,SAAS,EAAEL,0BAA0B,CAACE,QAAQ,CAACG,SAAS,EAAED,gBAAgB,CAAC;IAC3EE,qBAAqB,EAAE,CACrB;MACEC,IAAI,EAAE,YAAY;MAClBC,UAAU,EAAE;QACVA,UAAU,EAAEL,iBAAiB,KAAK,SAAS,GACvC;UACAI,IAAI,EAAE,QAAQ;UACdE,MAAM,EAAE,CAAC;QACX,CAAC,GACC;UACAF,IAAI,EAAE,SAAS;UACfG,OAAO,EAAE,CAAC;QACZ;MACJ;IACF,CAAC;EAEL,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"convertSectionConditionalOverride.js","names":["convertConditionDefinition","convertSectionConditionalOverride","override","defaultVisibility","actionParameters","condition","sectionBlockOverrides","type","visibility","hidden","visible"],"sources":["convertSectionConditionalOverride.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OntologyIrSectionConditionalOverride } from \"@osdk/client.unstable\";\nimport type { ActionParameter } from \"../../api/action/ActionParameter.js\";\nimport type { SectionConditionalOverride } from \"../../api/action/SectionConditionalOverride.js\";\nimport { convertConditionDefinition } from \"./convertConditionDefinition.js\";\n\nexport function convertSectionConditionalOverride(\n override: SectionConditionalOverride,\n defaultVisibility: \"visible\" | \"hidden\",\n actionParameters?: ActionParameter[],\n): OntologyIrSectionConditionalOverride {\n return {\n condition: convertConditionDefinition(override.condition, actionParameters),\n sectionBlockOverrides: [\n {\n type: \"visibility\",\n visibility: {\n visibility: defaultVisibility === \"visible\"\n ? {\n type: \"hidden\",\n hidden: {},\n }\n : {\n type: \"visible\",\n visible: {},\n },\n },\n },\n ],\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,SAASA,0BAA0B,QAAQ,iCAAiC;AAE5E,OAAO,SAASC,iCAAiCA,CAC/CC,QAAoC,EACpCC,iBAAuC,EACvCC,gBAAoC,EACE;EACtC,OAAO;IACLC,SAAS,EAAEL,0BAA0B,CAACE,QAAQ,CAACG,SAAS,EAAED,gBAAgB,CAAC;IAC3EE,qBAAqB,EAAE,CACrB;MACEC,IAAI,EAAE,YAAY;MAClBC,UAAU,EAAE;QACVA,UAAU,EAAEL,iBAAiB,KAAK,SAAS,GACvC;UACAI,IAAI,EAAE,QAAQ;UACdE,MAAM,EAAE,CAAC;QACX,CAAC,GACC;UACAF,IAAI,EAAE,SAAS;UACfG,OAAO,EAAE,CAAC;QACZ;MACJ;IACF,CAAC;EAEL,CAAC;AACH","ignoreList":[]}
@@ -17,10 +17,17 @@
17
17
  export { default } from "./cli/main.js";
18
18
  export { addDependency } from "./api/addDependency.js";
19
19
  export { OntologyEntityTypeEnum } from "./api/common/OntologyEntityTypeEnum.js";
20
- export { CREATE_OR_MODIFY_OBJECT_PARAMETER, defineAction, defineCreateInterfaceObjectAction, defineCreateObjectAction, defineCreateOrModifyObjectAction, defineDeleteObjectAction, defineModifyInterfaceObjectAction, defineModifyObjectAction, MODIFY_OBJECT_PARAMETER } from "./api/defineAction.js";
20
+ export { CREATE_INTERFACE_OBJECT_PARAMETER, CREATE_OR_MODIFY_OBJECT_PARAMETER, defineAction, MODIFY_INTERFACE_OBJECT_PARAMETER, MODIFY_OBJECT_PARAMETER } from "./api/defineAction.js";
21
+ export { defineCreateInterfaceObjectAction } from "./api/defineCreateInterfaceObjectAction.js";
22
+ export { defineCreateObjectAction } from "./api/defineCreateObjectAction.js";
23
+ export { defineCreateOrModifyObjectAction } from "./api/defineCreateOrModifyObjectAction.js";
24
+ export { defineDeleteInterfaceObjectAction } from "./api/defineDeleteInterfaceObjectAction.js";
25
+ export { defineDeleteObjectAction } from "./api/defineDeleteObjectAction.js";
21
26
  export { defineInterface } from "./api/defineInterface.js";
22
27
  export { defineInterfaceLinkConstraint } from "./api/defineInterfaceLinkConstraint.js";
23
28
  export { defineLink } from "./api/defineLink.js";
29
+ export { defineModifyInterfaceObjectAction } from "./api/defineModifyInterfaceObjectAction.js";
30
+ export { defineModifyObjectAction } from "./api/defineModifyObjectAction.js";
24
31
  export { convertToPluralDisplayName, defineObject, uppercaseFirstLetter as convertToDisplayName } from "./api/defineObject.js";
25
32
  export { addNamespaceIfNone, defineOntology, dumpOntologyFullMetadata } from "./api/defineOntology.js";
26
33
  export { defineSharedPropertyType } from "./api/defineSpt.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","addDependency","OntologyEntityTypeEnum","CREATE_OR_MODIFY_OBJECT_PARAMETER","defineAction","defineCreateInterfaceObjectAction","defineCreateObjectAction","defineCreateOrModifyObjectAction","defineDeleteObjectAction","defineModifyInterfaceObjectAction","defineModifyObjectAction","MODIFY_OBJECT_PARAMETER","defineInterface","defineInterfaceLinkConstraint","defineLink","convertToPluralDisplayName","defineObject","uppercaseFirstLetter","convertToDisplayName","addNamespaceIfNone","defineOntology","dumpOntologyFullMetadata","defineSharedPropertyType","defineValueType","importOntologyEntity","importSharedPropertyType","wrapWithProxy","propertyTypeTypeToOntologyIrType","convertType"],"sources":["index.ts"],"sourcesContent":["/*\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\nexport { default as default } from \"./cli/main.js\";\n\nexport type { ActionParameterValidation } from \"./api/action/ActionParameter.js\";\nexport type {\n ActionParameterAllowedValues,\n} from \"./api/action/ActionParameterAllowedValues.js\";\nexport type { ActionParameterConditionalOverride } from \"./api/action/ActionParameterConditionalOverride.js\";\nexport type { ActionParameterConfiguration } from \"./api/action/ActionParameterConfiguration.js\";\nexport type { ActionSection } from \"./api/action/ActionSection.js\";\nexport type { ActionType } from \"./api/action/ActionType.js\";\nexport type { ConditionDefinition } from \"./api/action/ConditionDefinition.js\";\nexport type {\n CurrentTimeMappingValue,\n CurrentUserMappingValue,\n CustomMapping,\n MappingValue,\n UuidMappingValue,\n} from \"./api/action/MappingValue.js\";\nexport type { SectionConditionalOverride } from \"./api/action/SectionConditionalOverride.js\";\nexport type { SubmissionMetadata } from \"./api/action/SubmissionMetadata.js\";\nexport { addDependency } from \"./api/addDependency.js\";\nexport { OntologyEntityTypeEnum } from \"./api/common/OntologyEntityTypeEnum.js\";\nexport {\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n defineAction,\n defineCreateInterfaceObjectAction,\n defineCreateObjectAction,\n defineCreateOrModifyObjectAction,\n defineDeleteObjectAction,\n defineModifyInterfaceObjectAction,\n defineModifyObjectAction,\n MODIFY_OBJECT_PARAMETER,\n} from \"./api/defineAction.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineLink } from \"./api/defineLink.js\";\nexport {\n convertToPluralDisplayName,\n defineObject,\n uppercaseFirstLetter as convertToDisplayName,\n} from \"./api/defineObject.js\";\nexport {\n addNamespaceIfNone,\n defineOntology,\n dumpOntologyFullMetadata,\n} from \"./api/defineOntology.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\nexport { importOntologyEntity } from \"./api/importOntologyEntity.js\";\nexport { importSharedPropertyType } from \"./api/importSharedPropertyType.js\";\nexport type { InterfaceType } from \"./api/interface/InterfaceType.js\";\nexport type { LinkType } from \"./api/links/LinkType.js\";\nexport type { ObjectPropertyType } from \"./api/object/ObjectPropertyType.js\";\nexport type { ObjectType } from \"./api/object/ObjectType.js\";\nexport type { PropertyTypeType } from \"./api/properties/PropertyTypeType.js\";\nexport type { SharedPropertyType } from \"./api/properties/SharedPropertyType.js\";\nexport type { ValueTypeDefinitionVersion } from \"./api/values/ValueTypeDefinitionVersion.js\";\nexport { wrapWithProxy } from \"./api/wrapWithProxy.js\";\nexport { propertyTypeTypeToOntologyIrType as convertType } from \"./conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAkB,QAAQ,eAAe;AAoBlD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SACEC,iCAAiC,EACjCC,YAAY,EACZC,iCAAiC,EACjCC,wBAAwB,EACxBC,gCAAgC,EAChCC,wBAAwB,EACxBC,iCAAiC,EACjCC,wBAAwB,EACxBC,uBAAuB,QAClB,uBAAuB;AAC9B,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SACEC,0BAA0B,EAC1BC,YAAY,EACZC,oBAAoB,IAAIC,oBAAoB,QACvC,uBAAuB;AAC9B,SACEC,kBAAkB,EAClBC,cAAc,EACdC,wBAAwB,QACnB,yBAAyB;AAChC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,wBAAwB,QAAQ,mCAAmC;AAQ5E,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,gCAAgC,IAAIC,WAAW,QAAQ,gEAAgE","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["default","addDependency","OntologyEntityTypeEnum","CREATE_INTERFACE_OBJECT_PARAMETER","CREATE_OR_MODIFY_OBJECT_PARAMETER","defineAction","MODIFY_INTERFACE_OBJECT_PARAMETER","MODIFY_OBJECT_PARAMETER","defineCreateInterfaceObjectAction","defineCreateObjectAction","defineCreateOrModifyObjectAction","defineDeleteInterfaceObjectAction","defineDeleteObjectAction","defineInterface","defineInterfaceLinkConstraint","defineLink","defineModifyInterfaceObjectAction","defineModifyObjectAction","convertToPluralDisplayName","defineObject","uppercaseFirstLetter","convertToDisplayName","addNamespaceIfNone","defineOntology","dumpOntologyFullMetadata","defineSharedPropertyType","defineValueType","importOntologyEntity","importSharedPropertyType","wrapWithProxy","propertyTypeTypeToOntologyIrType","convertType"],"sources":["index.ts"],"sourcesContent":["/*\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\nexport { default as default } from \"./cli/main.js\";\n\nexport type { ActionParameterValidation } from \"./api/action/ActionParameter.js\";\nexport type {\n ActionParameterAllowedValues,\n} from \"./api/action/ActionParameterAllowedValues.js\";\nexport type { ActionParameterConditionalOverride } from \"./api/action/ActionParameterConditionalOverride.js\";\nexport type { ActionParameterConfiguration } from \"./api/action/ActionParameterConfiguration.js\";\nexport type { ActionSection } from \"./api/action/ActionSection.js\";\nexport type { ActionType } from \"./api/action/ActionType.js\";\nexport type { ConditionDefinition } from \"./api/action/ConditionDefinition.js\";\nexport type {\n CurrentTimeMappingValue,\n CurrentUserMappingValue,\n CustomMapping,\n MappingValue,\n UuidMappingValue,\n} from \"./api/action/MappingValue.js\";\nexport type { SectionConditionalOverride } from \"./api/action/SectionConditionalOverride.js\";\nexport type { SubmissionMetadata } from \"./api/action/SubmissionMetadata.js\";\nexport { addDependency } from \"./api/addDependency.js\";\nexport { OntologyEntityTypeEnum } from \"./api/common/OntologyEntityTypeEnum.js\";\nexport {\n CREATE_INTERFACE_OBJECT_PARAMETER,\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n defineAction,\n MODIFY_INTERFACE_OBJECT_PARAMETER,\n MODIFY_OBJECT_PARAMETER,\n} from \"./api/defineAction.js\";\nexport { defineCreateInterfaceObjectAction } from \"./api/defineCreateInterfaceObjectAction.js\";\nexport { defineCreateObjectAction } from \"./api/defineCreateObjectAction.js\";\nexport { defineCreateOrModifyObjectAction } from \"./api/defineCreateOrModifyObjectAction.js\";\nexport { defineDeleteInterfaceObjectAction } from \"./api/defineDeleteInterfaceObjectAction.js\";\nexport { defineDeleteObjectAction } from \"./api/defineDeleteObjectAction.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineLink } from \"./api/defineLink.js\";\nexport { defineModifyInterfaceObjectAction } from \"./api/defineModifyInterfaceObjectAction.js\";\nexport { defineModifyObjectAction } from \"./api/defineModifyObjectAction.js\";\nexport {\n convertToPluralDisplayName,\n defineObject,\n uppercaseFirstLetter as convertToDisplayName,\n} from \"./api/defineObject.js\";\nexport {\n addNamespaceIfNone,\n defineOntology,\n dumpOntologyFullMetadata,\n} from \"./api/defineOntology.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\nexport { importOntologyEntity } from \"./api/importOntologyEntity.js\";\nexport { importSharedPropertyType } from \"./api/importSharedPropertyType.js\";\nexport type { InterfaceType } from \"./api/interface/InterfaceType.js\";\nexport type { LinkType } from \"./api/links/LinkType.js\";\nexport type { ObjectPropertyType } from \"./api/object/ObjectPropertyType.js\";\nexport type { ObjectType } from \"./api/object/ObjectType.js\";\nexport type { PropertyTypeType } from \"./api/properties/PropertyTypeType.js\";\nexport type { SharedPropertyType } from \"./api/properties/SharedPropertyType.js\";\nexport type { ValueTypeDefinitionVersion } from \"./api/values/ValueTypeDefinitionVersion.js\";\nexport { wrapWithProxy } from \"./api/wrapWithProxy.js\";\nexport { propertyTypeTypeToOntologyIrType as convertType } from \"./conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAkB,QAAQ,eAAe;AAoBlD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SACEC,iCAAiC,EACjCC,iCAAiC,EACjCC,YAAY,EACZC,iCAAiC,EACjCC,uBAAuB,QAClB,uBAAuB;AAC9B,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,gCAAgC,QAAQ,2CAA2C;AAC5F,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SACEC,0BAA0B,EAC1BC,YAAY,EACZC,oBAAoB,IAAIC,oBAAoB,QACvC,uBAAuB;AAC9B,SACEC,kBAAkB,EAClBC,cAAc,EACdC,wBAAwB,QACnB,yBAAyB;AAChC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,wBAAwB,QAAQ,mCAAmC;AAQ5E,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,gCAAgC,IAAIC,WAAW,QAAQ,gEAAgE","ignoreList":[]}