@osdk/maker 0.15.0 → 0.16.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 (240) hide show
  1. package/CHANGELOG.md +89 -126
  2. package/README.md +18 -1
  3. package/build/browser/api/cloneDefinition.js +36 -0
  4. package/build/browser/api/cloneDefinition.js.map +1 -0
  5. package/build/browser/api/code-snippets/createCodeSnippets.js +1 -1
  6. package/build/browser/api/code-snippets/createCodeSnippets.js.map +1 -1
  7. package/build/browser/api/defineAction.js +9 -1
  8. package/build/browser/api/defineAction.js.map +1 -1
  9. package/build/browser/api/defineCreateInterfaceObjectAction.js +3 -1
  10. package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -1
  11. package/build/browser/api/defineCreateObjectAction.js +3 -1
  12. package/build/browser/api/defineCreateObjectAction.js.map +1 -1
  13. package/build/browser/api/defineCreateOrModifyObjectAction.js +3 -1
  14. package/build/browser/api/defineCreateOrModifyObjectAction.js.map +1 -1
  15. package/build/browser/api/defineDeleteInterfaceObjectAction.js +3 -1
  16. package/build/browser/api/defineDeleteInterfaceObjectAction.js.map +1 -1
  17. package/build/browser/api/defineDeleteObjectAction.js +3 -1
  18. package/build/browser/api/defineDeleteObjectAction.js.map +1 -1
  19. package/build/browser/api/defineFunction.js +61 -0
  20. package/build/browser/api/defineFunction.js.map +1 -0
  21. package/build/browser/api/defineInterface.js +3 -1
  22. package/build/browser/api/defineInterface.js.map +1 -1
  23. package/build/browser/api/defineInterfaceLinkConstraint.js +6 -2
  24. package/build/browser/api/defineInterfaceLinkConstraint.js.map +1 -1
  25. package/build/browser/api/defineLink.js +3 -1
  26. package/build/browser/api/defineLink.js.map +1 -1
  27. package/build/browser/api/defineModifyInterfaceObjectAction.js +3 -1
  28. package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -1
  29. package/build/browser/api/defineModifyObjectAction.js +3 -1
  30. package/build/browser/api/defineModifyObjectAction.js.map +1 -1
  31. package/build/browser/api/defineObject.js +29 -10
  32. package/build/browser/api/defineObject.js.map +1 -1
  33. package/build/browser/api/defineOntology.js +29 -0
  34. package/build/browser/api/defineOntology.js.map +1 -1
  35. package/build/browser/api/defineSpt.js +3 -1
  36. package/build/browser/api/defineSpt.js.map +1 -1
  37. package/build/browser/api/defineValueType.js +3 -1
  38. package/build/browser/api/defineValueType.js.map +1 -1
  39. package/build/browser/api/interface/InterfaceType.js.map +1 -1
  40. package/build/browser/api/object/ObjectPropertyType.js.map +1 -1
  41. package/build/browser/api/object/ObjectTypeDatasourceDefinition.js.map +1 -1
  42. package/build/browser/api/properties/PropertyTypeType.js.map +1 -1
  43. package/build/browser/api/properties/ReducerType.js +2 -0
  44. package/build/browser/api/properties/ReducerType.js.map +1 -0
  45. package/build/browser/api/properties/SharedPropertyType.js.map +1 -1
  46. package/build/browser/cli/main.js +1 -1
  47. package/build/browser/cli/main.js.map +1 -1
  48. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js +17 -6
  49. package/build/browser/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -1
  50. package/build/browser/conversion/toMarketplace/convertInterface.js +2 -1
  51. package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -1
  52. package/build/browser/conversion/toMarketplace/convertMainValue.js +36 -0
  53. package/build/browser/conversion/toMarketplace/convertMainValue.js.map +1 -0
  54. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js +4 -3
  55. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -1
  56. package/build/browser/conversion/toMarketplace/convertReducers.js +53 -0
  57. package/build/browser/conversion/toMarketplace/convertReducers.js.map +1 -0
  58. package/build/browser/conversion/toMarketplace/convertSpt.js +5 -3
  59. package/build/browser/conversion/toMarketplace/convertSpt.js.map +1 -1
  60. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +4 -2
  61. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -1
  62. package/build/browser/index.js +5 -2
  63. package/build/browser/index.js.map +1 -1
  64. package/build/cjs/index.cjs +267 -105
  65. package/build/cjs/index.cjs.map +1 -1
  66. package/build/cjs/index.d.cts +214 -164
  67. package/build/esm/api/cloneDefinition.js +36 -0
  68. package/build/esm/api/cloneDefinition.js.map +1 -0
  69. package/build/esm/api/code-snippets/createCodeSnippets.js +1 -1
  70. package/build/esm/api/code-snippets/createCodeSnippets.js.map +1 -1
  71. package/build/esm/api/defineAction.js +9 -1
  72. package/build/esm/api/defineAction.js.map +1 -1
  73. package/build/esm/api/defineCreateInterfaceObjectAction.js +3 -1
  74. package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -1
  75. package/build/esm/api/defineCreateObjectAction.js +3 -1
  76. package/build/esm/api/defineCreateObjectAction.js.map +1 -1
  77. package/build/esm/api/defineCreateOrModifyObjectAction.js +3 -1
  78. package/build/esm/api/defineCreateOrModifyObjectAction.js.map +1 -1
  79. package/build/esm/api/defineDeleteInterfaceObjectAction.js +3 -1
  80. package/build/esm/api/defineDeleteInterfaceObjectAction.js.map +1 -1
  81. package/build/esm/api/defineDeleteObjectAction.js +3 -1
  82. package/build/esm/api/defineDeleteObjectAction.js.map +1 -1
  83. package/build/esm/api/defineFunction.js +61 -0
  84. package/build/esm/api/defineFunction.js.map +1 -0
  85. package/build/esm/api/defineInterface.js +3 -1
  86. package/build/esm/api/defineInterface.js.map +1 -1
  87. package/build/esm/api/defineInterfaceLinkConstraint.js +6 -2
  88. package/build/esm/api/defineInterfaceLinkConstraint.js.map +1 -1
  89. package/build/esm/api/defineLink.js +3 -1
  90. package/build/esm/api/defineLink.js.map +1 -1
  91. package/build/esm/api/defineModifyInterfaceObjectAction.js +3 -1
  92. package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -1
  93. package/build/esm/api/defineModifyObjectAction.js +3 -1
  94. package/build/esm/api/defineModifyObjectAction.js.map +1 -1
  95. package/build/esm/api/defineObject.js +29 -10
  96. package/build/esm/api/defineObject.js.map +1 -1
  97. package/build/esm/api/defineOntology.js +29 -0
  98. package/build/esm/api/defineOntology.js.map +1 -1
  99. package/build/esm/api/defineSpt.js +3 -1
  100. package/build/esm/api/defineSpt.js.map +1 -1
  101. package/build/esm/api/defineValueType.js +3 -1
  102. package/build/esm/api/defineValueType.js.map +1 -1
  103. package/build/esm/api/interface/InterfaceType.js.map +1 -1
  104. package/build/esm/api/object/ObjectPropertyType.js.map +1 -1
  105. package/build/esm/api/object/ObjectTypeDatasourceDefinition.js.map +1 -1
  106. package/build/esm/api/properties/PropertyTypeType.js.map +1 -1
  107. package/build/esm/api/properties/ReducerType.js +2 -0
  108. package/build/esm/api/properties/ReducerType.js.map +1 -0
  109. package/build/esm/api/properties/SharedPropertyType.js.map +1 -1
  110. package/build/esm/cli/main.js +1 -1
  111. package/build/esm/cli/main.js.map +1 -1
  112. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js +17 -6
  113. package/build/esm/conversion/toMarketplace/convertDatasourceDefinition.js.map +1 -1
  114. package/build/esm/conversion/toMarketplace/convertInterface.js +2 -1
  115. package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -1
  116. package/build/esm/conversion/toMarketplace/convertMainValue.js +36 -0
  117. package/build/esm/conversion/toMarketplace/convertMainValue.js.map +1 -0
  118. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js +4 -3
  119. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -1
  120. package/build/esm/conversion/toMarketplace/convertReducers.js +53 -0
  121. package/build/esm/conversion/toMarketplace/convertReducers.js.map +1 -0
  122. package/build/esm/conversion/toMarketplace/convertSpt.js +5 -3
  123. package/build/esm/conversion/toMarketplace/convertSpt.js.map +1 -1
  124. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +4 -2
  125. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -1
  126. package/build/esm/index.js +5 -2
  127. package/build/esm/index.js.map +1 -1
  128. package/build/types/api/cloneDefinition.d.ts +9 -0
  129. package/build/types/api/cloneDefinition.d.ts.map +1 -0
  130. package/build/types/api/defineAction.d.ts +1 -1
  131. package/build/types/api/defineAction.d.ts.map +1 -1
  132. package/build/types/api/defineCreateInterfaceObjectAction.d.ts +1 -1
  133. package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -1
  134. package/build/types/api/defineCreateObjectAction.d.ts +1 -1
  135. package/build/types/api/defineCreateObjectAction.d.ts.map +1 -1
  136. package/build/types/api/defineCreateOrModifyObjectAction.d.ts +1 -1
  137. package/build/types/api/defineCreateOrModifyObjectAction.d.ts.map +1 -1
  138. package/build/types/api/defineDeleteInterfaceObjectAction.d.ts +1 -1
  139. package/build/types/api/defineDeleteInterfaceObjectAction.d.ts.map +1 -1
  140. package/build/types/api/defineDeleteObjectAction.d.ts +1 -1
  141. package/build/types/api/defineDeleteObjectAction.d.ts.map +1 -1
  142. package/build/types/api/defineFunction.d.ts +19 -0
  143. package/build/types/api/defineFunction.d.ts.map +1 -0
  144. package/build/types/api/defineInterface.d.ts +1 -1
  145. package/build/types/api/defineInterface.d.ts.map +1 -1
  146. package/build/types/api/defineInterfaceLinkConstraint.d.ts +1 -1
  147. package/build/types/api/defineInterfaceLinkConstraint.d.ts.map +1 -1
  148. package/build/types/api/defineLink.d.ts +1 -1
  149. package/build/types/api/defineLink.d.ts.map +1 -1
  150. package/build/types/api/defineModifyInterfaceObjectAction.d.ts +1 -1
  151. package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -1
  152. package/build/types/api/defineModifyObjectAction.d.ts +1 -1
  153. package/build/types/api/defineModifyObjectAction.d.ts.map +1 -1
  154. package/build/types/api/defineObject.d.ts +1 -1
  155. package/build/types/api/defineObject.d.ts.map +1 -1
  156. package/build/types/api/defineOntology.d.ts +5 -0
  157. package/build/types/api/defineOntology.d.ts.map +1 -1
  158. package/build/types/api/defineSpt.d.ts +3 -1
  159. package/build/types/api/defineSpt.d.ts.map +1 -1
  160. package/build/types/api/defineValueType.d.ts +1 -1
  161. package/build/types/api/defineValueType.d.ts.map +1 -1
  162. package/build/types/api/interface/InterfaceType.d.ts +1 -1
  163. package/build/types/api/interface/InterfaceType.d.ts.map +1 -1
  164. package/build/types/api/object/ObjectPropertyType.d.ts +2 -0
  165. package/build/types/api/object/ObjectPropertyType.d.ts.map +1 -1
  166. package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts +10 -3
  167. package/build/types/api/object/ObjectTypeDatasourceDefinition.d.ts.map +1 -1
  168. package/build/types/api/properties/PropertyTypeType.d.ts +4 -0
  169. package/build/types/api/properties/PropertyTypeType.d.ts.map +1 -1
  170. package/build/types/api/properties/ReducerType.d.ts +4 -0
  171. package/build/types/api/properties/ReducerType.d.ts.map +1 -0
  172. package/build/types/api/properties/SharedPropertyType.d.ts +2 -0
  173. package/build/types/api/properties/SharedPropertyType.d.ts.map +1 -1
  174. package/build/types/conversion/toMarketplace/convertDatasourceDefinition.d.ts.map +1 -1
  175. package/build/types/conversion/toMarketplace/convertMainValue.d.ts +4 -0
  176. package/build/types/conversion/toMarketplace/convertMainValue.d.ts.map +1 -0
  177. package/build/types/conversion/toMarketplace/convertObjectPropertyType.d.ts.map +1 -1
  178. package/build/types/conversion/toMarketplace/convertReducers.d.ts +6 -0
  179. package/build/types/conversion/toMarketplace/convertReducers.d.ts.map +1 -0
  180. package/build/types/conversion/toMarketplace/convertSpt.d.ts +1 -1
  181. package/build/types/conversion/toMarketplace/convertSpt.d.ts.map +1 -1
  182. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts +2 -1
  183. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.d.ts.map +1 -1
  184. package/build/types/index.d.ts +14 -6
  185. package/build/types/index.d.ts.map +1 -1
  186. package/package.json +6 -5
  187. package/build/browser/api/test/actions.test.js +0 -14397
  188. package/build/browser/api/test/actions.test.js.map +0 -1
  189. package/build/browser/api/test/interfaces.test.js +0 -1189
  190. package/build/browser/api/test/interfaces.test.js.map +0 -1
  191. package/build/browser/api/test/links.test.js +0 -2019
  192. package/build/browser/api/test/links.test.js.map +0 -1
  193. package/build/browser/api/test/markingconstraint.test.js +0 -134
  194. package/build/browser/api/test/markingconstraint.test.js.map +0 -1
  195. package/build/browser/api/test/misc.test.js +0 -1315
  196. package/build/browser/api/test/misc.test.js.map +0 -1
  197. package/build/browser/api/test/objectStatus.test.js +0 -160
  198. package/build/browser/api/test/objectStatus.test.js.map +0 -1
  199. package/build/browser/api/test/objects.test.js +0 -3856
  200. package/build/browser/api/test/objects.test.js.map +0 -1
  201. package/build/browser/api/test/spt.test.js +0 -722
  202. package/build/browser/api/test/spt.test.js.map +0 -1
  203. package/build/browser/api/test/valueTypes.test.js +0 -307
  204. package/build/browser/api/test/valueTypes.test.js.map +0 -1
  205. package/build/esm/api/test/actions.test.js +0 -14397
  206. package/build/esm/api/test/actions.test.js.map +0 -1
  207. package/build/esm/api/test/interfaces.test.js +0 -1189
  208. package/build/esm/api/test/interfaces.test.js.map +0 -1
  209. package/build/esm/api/test/links.test.js +0 -2019
  210. package/build/esm/api/test/links.test.js.map +0 -1
  211. package/build/esm/api/test/markingconstraint.test.js +0 -134
  212. package/build/esm/api/test/markingconstraint.test.js.map +0 -1
  213. package/build/esm/api/test/misc.test.js +0 -1315
  214. package/build/esm/api/test/misc.test.js.map +0 -1
  215. package/build/esm/api/test/objectStatus.test.js +0 -160
  216. package/build/esm/api/test/objectStatus.test.js.map +0 -1
  217. package/build/esm/api/test/objects.test.js +0 -3856
  218. package/build/esm/api/test/objects.test.js.map +0 -1
  219. package/build/esm/api/test/spt.test.js +0 -722
  220. package/build/esm/api/test/spt.test.js.map +0 -1
  221. package/build/esm/api/test/valueTypes.test.js +0 -307
  222. package/build/esm/api/test/valueTypes.test.js.map +0 -1
  223. package/build/types/api/test/actions.test.d.ts +0 -1
  224. package/build/types/api/test/actions.test.d.ts.map +0 -1
  225. package/build/types/api/test/interfaces.test.d.ts +0 -1
  226. package/build/types/api/test/interfaces.test.d.ts.map +0 -1
  227. package/build/types/api/test/links.test.d.ts +0 -1
  228. package/build/types/api/test/links.test.d.ts.map +0 -1
  229. package/build/types/api/test/markingconstraint.test.d.ts +0 -1
  230. package/build/types/api/test/markingconstraint.test.d.ts.map +0 -1
  231. package/build/types/api/test/misc.test.d.ts +0 -1
  232. package/build/types/api/test/misc.test.d.ts.map +0 -1
  233. package/build/types/api/test/objectStatus.test.d.ts +0 -1
  234. package/build/types/api/test/objectStatus.test.d.ts.map +0 -1
  235. package/build/types/api/test/objects.test.d.ts +0 -1
  236. package/build/types/api/test/objects.test.d.ts.map +0 -1
  237. package/build/types/api/test/spt.test.d.ts +0 -1
  238. package/build/types/api/test/spt.test.d.ts.map +0 -1
  239. package/build/types/api/test/valueTypes.test.d.ts +0 -1
  240. package/build/types/api/test/valueTypes.test.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import { OntologyIrLabelledValue, OntologyIrConditionValue, OntologyIrParameterDateRangeValue, InterfaceTypeApiName, OntologyIrCondition, OntologyIrParameterPrefill, OntologyIrBaseParameterType_decimal, OntologyIrBaseParameterType_decimalList, OntologyIrBaseParameterType_timestamp, OntologyIrBaseParameterType_timestampList, OntologyIrBaseParameterType_objectReference, OntologyIrBaseParameterType_objectReferenceList, OntologyIrBaseParameterType_objectSetRid, OntologyIrBaseParameterType_objectTypeReference, OntologyIrBaseParameterType_interfaceReference, OntologyIrBaseParameterType_interfaceReferenceList, OntologyIrBaseParameterType_struct, OntologyIrBaseParameterType_structList, ParameterRenderHint, ParameterId, ActionTypeStatus_deprecated, ButtonDisplayMetadata, ActionTypeApiName, OntologyIrLogicRule, SectionId, OntologyIrActionTypeEntities, OntologyIrFormContent, OntologyIrValidationRule, DisplayMetadataConfigurationDefaultLayout, DisplayMetadataConfigurationDisplayAndFormat, OntologyIrLogicRuleValue_parameterId, OntologyIrLogicRuleValue_staticValue, OntologyIrLogicRuleValue_objectParameterPropertyValue, OntologyIrLogicRuleValue_interfaceParameterPropertyValue, OntologyIrLogicRuleValue_synchronousWebhookOutput, ValidationRuleDisplayMetadata, ParameterRid, StructFieldType, OntologyIrValueTypeReferenceWithMetadata, Visibility, SharedPropertyTypeGothamMapping, OntologyIrBaseFormatter, OntologyIrMarketplaceInterfaceType, InterfaceTypeStatus, ValueTypeApiName, ValueTypeDisplayMetadata, ValueTypeStatus, ValueTypeVersion, BaseType, ValueTypeDataConstraint, ExampleValue, LinkTypeMetadata, LinkTypeId, OntologyIrSecurityGroupGranularCondition, MarkingType, DerivedPropertyLinkTypeSide, ObjectTypeFieldApiName, OntologyIrObjectType, OntologyIr, DataConstraint, FailureMessage, ValueTypeRid, OntologyIrType } from '@osdk/client.unstable';
1
+ import { OntologyIrLabelledValue, OntologyIrConditionValue, OntologyIrParameterDateRangeValue, InterfaceTypeApiName, OntologyIrCondition, OntologyIrParameterPrefill, OntologyIrBaseParameterType_decimal, OntologyIrBaseParameterType_decimalList, OntologyIrBaseParameterType_timestamp, OntologyIrBaseParameterType_timestampList, OntologyIrBaseParameterType_objectReference, OntologyIrBaseParameterType_objectReferenceList, OntologyIrBaseParameterType_objectSetRid, OntologyIrBaseParameterType_objectTypeReference, OntologyIrBaseParameterType_interfaceReference, OntologyIrBaseParameterType_interfaceReferenceList, OntologyIrBaseParameterType_struct, OntologyIrBaseParameterType_structList, ParameterRenderHint, ParameterId, ActionTypeStatus_deprecated, ButtonDisplayMetadata, ActionTypeApiName, OntologyIrLogicRule, SectionId, OntologyIrActionTypeEntities, OntologyIrFormContent, OntologyIrValidationRule, DisplayMetadataConfigurationDefaultLayout, DisplayMetadataConfigurationDisplayAndFormat, OntologyIrLogicRuleValue_parameterId, OntologyIrLogicRuleValue_staticValue, OntologyIrLogicRuleValue_objectParameterPropertyValue, OntologyIrLogicRuleValue_interfaceParameterPropertyValue, OntologyIrLogicRuleValue_synchronousWebhookOutput, ValueTypeApiName, ValueTypeDisplayMetadata, ValueTypeStatus, ValueTypeVersion, BaseType, ValueTypeDataConstraint, ExampleValue, StructFieldType, OntologyIrValueTypeReferenceWithMetadata, Visibility, SharedPropertyTypeGothamMapping, OntologyIrBaseFormatter, OntologyIrMarketplaceInterfaceType, InterfaceTypeStatus, OntologyIrSecurityGroupGranularCondition, MarkingType, DerivedPropertyLinkTypeSide, ObjectTypeFieldApiName, LinkTypeMetadata, LinkTypeId, OntologyIrObjectType, ValidationRuleDisplayMetadata, ParameterRid, OntologyIr, DataConstraint, FailureMessage, ValueTypeRid, OntologyIrType } from '@osdk/client.unstable';
2
2
 
3
3
  declare function main(args?: string[]): Promise<void>;
4
4
 
@@ -228,20 +228,16 @@ type CustomMapping = OntologyIrLogicRuleValue_parameterId | OntologyIrLogicRuleV
228
228
 
229
229
  declare function addDependency(namespaceNoDot: string, fileInPackage: string): void;
230
230
 
231
- type ActionLevelValidationDefinition = Array<ActionLevelValidationRule>;
232
- type ActionLevelValidationRule = {
233
- condition: ConditionDefinition;
234
- displayMetadata?: ValidationRuleDisplayMetadata;
235
- };
236
-
237
- type DefaultFormat = "FORM" | "TABLE";
238
-
239
- type TableConfiguration = {
240
- columnWidthByParameterRid: Record<ParameterRid, number>;
241
- enableFileImport: boolean;
242
- fitHorizontally: boolean;
243
- frozenColumnCount: number;
244
- rowHeightInLines: number;
231
+ type ValueTypeDefinitionVersion = OntologyEntityBase & {
232
+ apiName: ValueTypeApiName;
233
+ packageNamespace: string;
234
+ displayMetadata: ValueTypeDisplayMetadata;
235
+ status: ValueTypeStatus;
236
+ version: ValueTypeVersion;
237
+ baseType: BaseType;
238
+ constraints: ValueTypeDataConstraint[];
239
+ exampleValues: ExampleValue[];
240
+ __type: OntologyEntityTypeEnum.VALUE_TYPE;
245
241
  };
246
242
 
247
243
  type PropertyTypeType = PropertyTypeTypePrimitive | PropertyTypeTypeExotic;
@@ -257,6 +253,10 @@ type PropertyTypeTypeStruct = {
257
253
  structDefinition: {
258
254
  [api_name: string]: StructPropertyType | Exclude<PropertyTypeTypesWithoutStruct, PropertyTypeTypeMarking>;
259
255
  };
256
+ mainValue?: {
257
+ fields: string | Array<string>;
258
+ type: PropertyTypeType;
259
+ };
260
260
  };
261
261
  type PropertyTypeTypeString = {
262
262
  type: "string";
@@ -272,6 +272,7 @@ type PropertyTypeTypeDecimal = {
272
272
  scale?: number;
273
273
  };
274
274
  type PropertyTypeTypesWithoutStruct = Exclude<PropertyTypeType, PropertyTypeTypeStruct>;
275
+ declare function isExotic(type: PropertyTypeType | undefined): type is PropertyTypeTypeExotic;
275
276
  type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
276
277
  interface StructPropertyType extends Optional<Omit<StructFieldType, "fieldType" | "structFieldRid" | "apiName">, "typeClasses" | "aliases"> {
277
278
  fieldType: PropertyTypeTypesWithoutStruct;
@@ -283,6 +284,11 @@ interface Nullability {
283
284
  noNulls: boolean;
284
285
  }
285
286
 
287
+ type ReducerType = {
288
+ direction: "ascending" | "descending";
289
+ structField?: string;
290
+ };
291
+
286
292
  interface SharedPropertyType extends OntologyEntityBase, PropertyType {
287
293
  apiName: string;
288
294
  nonNameSpacedApiName: string;
@@ -294,6 +300,7 @@ interface SharedPropertyType extends OntologyEntityBase, PropertyType {
294
300
  interface PropertyType {
295
301
  type: PropertyTypeType;
296
302
  array?: boolean;
303
+ reducers?: Array<ReducerType>;
297
304
  description?: string;
298
305
  displayName?: string;
299
306
  valueType?: OntologyIrValueTypeReferenceWithMetadata;
@@ -312,8 +319,9 @@ interface InterfaceSharedPropertyType {
312
319
  sharedPropertyType: SharedPropertyType;
313
320
  required: boolean;
314
321
  }
322
+ declare function isInterfaceSharedPropertyType(interfacePropertyType: InterfacePropertyType): interfacePropertyType is InterfaceSharedPropertyType;
315
323
 
316
- interface InterfaceType extends OntologyEntityBase, Omit<OntologyIrMarketplaceInterfaceType, "properties" | "propertiesV2" | "propertiesV3" | "extendsInterfaces"> {
324
+ interface InterfaceType extends OntologyEntityBase, Omit<OntologyIrMarketplaceInterfaceType, "properties" | "propertiesV2" | "propertiesV3" | "extendsInterfaces" | "extendsInterfacesMetadata"> {
317
325
  propertiesV2: Record<string, InterfaceSharedPropertyType>;
318
326
  propertiesV3: Record<string, InterfacePropertyType>;
319
327
  extendsInterfaces: Array<InterfaceType>;
@@ -321,16 +329,12 @@ interface InterfaceType extends OntologyEntityBase, Omit<OntologyIrMarketplaceIn
321
329
  __type: OntologyEntityTypeEnum.INTERFACE_TYPE;
322
330
  }
323
331
 
324
- type ValueTypeDefinitionVersion = OntologyEntityBase & {
325
- apiName: ValueTypeApiName;
326
- packageNamespace: string;
327
- displayMetadata: ValueTypeDisplayMetadata;
328
- status: ValueTypeStatus;
329
- version: ValueTypeVersion;
330
- baseType: BaseType;
331
- constraints: ValueTypeDataConstraint[];
332
- exampleValues: ExampleValue[];
333
- __type: OntologyEntityTypeEnum.VALUE_TYPE;
332
+ type InterfaceImplementation = {
333
+ implements: InterfaceType;
334
+ propertyMapping: {
335
+ interfaceProperty: string;
336
+ mapsTo: string;
337
+ }[];
334
338
  };
335
339
 
336
340
  type ObjectTypeStatus = "active" | "experimental" | "example" | {
@@ -350,6 +354,7 @@ interface ObjectPropertyTypeInner {
350
354
  }>;
351
355
  type: PropertyTypeType;
352
356
  array?: boolean;
357
+ reducers?: Array<ReducerType>;
353
358
  valueType: ValueTypeDefinitionVersion;
354
359
  sharedPropertyType: SharedPropertyType;
355
360
  description: string | undefined;
@@ -362,12 +367,114 @@ interface ObjectPropertyTypeInner {
362
367
 
363
368
  type ObjectPropertyTypeUserDefinition = Omit<RequiredFields<Partial<ObjectPropertyTypeInner>, "type">, "apiName">;
364
369
 
365
- type InterfaceImplementation = {
366
- implements: InterfaceType;
367
- propertyMapping: {
368
- interfaceProperty: string;
369
- mapsTo: string;
370
- }[];
370
+ type SecurityConditionDefinition = SecurityUnionCondition | OntologyIrSecurityGroupGranularCondition | SecurityGroupValidationRule | SecurityGroupPropertyValidationRule | SecurityMarkingPropertyRule;
371
+ type SecurityUnionCondition = {
372
+ type: "and" | "or";
373
+ conditions: Array<SecurityConditionDefinition>;
374
+ };
375
+ type SecurityGroupValidationRule = {
376
+ type: "group";
377
+ name: string;
378
+ };
379
+ type SecurityGroupPropertyValidationRule = {
380
+ type: "groupProperty";
381
+ property: string;
382
+ };
383
+ type SecurityMarkingPropertyRule = {
384
+ type: "markingProperty";
385
+ property: string;
386
+ };
387
+
388
+ type ObjectTypeDatasourceDefinition = ObjectTypeDatasourceDefinition_stream | ObjectTypeDatasourceDefinition_dataset | ObjectTypeDatasourceDefinition_restrictedView | ObjectTypeDatasourceDefinition_derived | ObjectTypeDatasourceDefinition_direct;
389
+ interface ObjectTypeDatasourceDefinition_dataset {
390
+ type: "dataset";
391
+ objectSecurityPolicy?: ObjectSecurityPolicy;
392
+ propertySecurityGroups?: Array<PropertySecurityGroup>;
393
+ }
394
+ interface ObjectSecurityPolicy {
395
+ name: string;
396
+ granularPolicy?: SecurityConditionDefinition;
397
+ appliedMarkings?: Record<string, MarkingType>;
398
+ assumedMarkings?: Record<string, MarkingType>;
399
+ }
400
+ interface PropertySecurityGroup {
401
+ name: string;
402
+ properties: Array<string>;
403
+ granularPolicy?: SecurityConditionDefinition;
404
+ appliedMarkings?: Record<string, MarkingType>;
405
+ assumedMarkings?: Record<string, MarkingType>;
406
+ }
407
+ interface ObjectTypeDatasourceDefinition_stream {
408
+ type: "stream";
409
+ retentionPeriod?: string;
410
+ }
411
+ interface ObjectTypeDatasourceDefinition_restrictedView {
412
+ type: "restrictedView";
413
+ }
414
+ interface ObjectTypeDatasourceDefinition_derived {
415
+ type: "derived";
416
+ linkDefinition: Array<DerivedPropertiesLinkDefinition>;
417
+ propertyMapping: Record<ObjectTypeFieldApiName, ObjectTypeFieldApiName> | Record<ObjectTypeFieldApiName, DerivedPropertyAggregation>;
418
+ }
419
+ interface DerivedPropertiesLinkDefinition {
420
+ linkType: LinkType;
421
+ side?: DerivedPropertyLinkTypeSide;
422
+ }
423
+ type DerivedPropertyAggregation = {
424
+ type: "count";
425
+ } | {
426
+ type: "avg";
427
+ property: ObjectTypeFieldApiName;
428
+ } | {
429
+ type: "sum";
430
+ property: ObjectTypeFieldApiName;
431
+ } | {
432
+ type: "min";
433
+ property: ObjectTypeFieldApiName;
434
+ } | {
435
+ type: "max";
436
+ property: ObjectTypeFieldApiName;
437
+ } | {
438
+ type: "approximateCardinality";
439
+ property: ObjectTypeFieldApiName;
440
+ } | {
441
+ type: "exactCardinality";
442
+ property: ObjectTypeFieldApiName;
443
+ } | {
444
+ type: "collectList";
445
+ property: ObjectTypeFieldApiName;
446
+ limit: number;
447
+ } | {
448
+ type: "collectSet";
449
+ property: ObjectTypeFieldApiName;
450
+ limit: number;
451
+ };
452
+ interface ObjectTypeDatasourceDefinition_direct {
453
+ type: "direct";
454
+ objectSecurityPolicy?: ObjectSecurityPolicy;
455
+ propertySecurityGroups?: Array<PropertySecurityGroup>;
456
+ }
457
+
458
+ type ObjectTypeDefinition = {
459
+ apiName: string;
460
+ primaryKeyPropertyApiName: string;
461
+ displayName: string;
462
+ pluralDisplayName: string;
463
+ titlePropertyApiName: string;
464
+ properties?: {
465
+ [key: string]: ObjectPropertyTypeUserDefinition;
466
+ };
467
+ implementsInterfaces?: Array<InterfaceImplementation>;
468
+ description?: string;
469
+ icon?: {
470
+ locator: BlueprintIcon;
471
+ color: string;
472
+ };
473
+ visibility?: Visibility;
474
+ editsEnabled?: boolean;
475
+ status?: ObjectTypeStatus;
476
+ datasources?: Array<ObjectTypeDatasourceDefinition>;
477
+ aliases?: Array<string>;
371
478
  };
372
479
 
373
480
  type LinkType = (OntologyEntityBase & OneToManyLinkTypeDefinition & {
@@ -476,107 +583,57 @@ type UserLinkTypeStatus = "active" | "experimental" | "example" | {
476
583
  replacedBy?: LinkTypeId;
477
584
  };
478
585
 
479
- type SecurityConditionDefinition = SecurityUnionCondition | OntologyIrSecurityGroupGranularCondition | SecurityGroupValidationRule | SecurityGroupPropertyValidationRule | SecurityMarkingPropertyRule;
480
- type SecurityUnionCondition = {
481
- type: "and" | "or";
482
- conditions: Array<SecurityConditionDefinition>;
483
- };
484
- type SecurityGroupValidationRule = {
485
- type: "group";
486
- name: string;
487
- };
488
- type SecurityGroupPropertyValidationRule = {
489
- type: "groupProperty";
490
- property: string;
491
- };
492
- type SecurityMarkingPropertyRule = {
493
- type: "markingProperty";
494
- property: string;
495
- };
496
-
497
- type ObjectTypeDatasourceDefinition = ObjectTypeDatasourceDefinition_stream | ObjectTypeDatasourceDefinition_dataset | ObjectTypeDatasourceDefinition_restrictedView | ObjectTypeDatasourceDefinition_derived;
498
- interface ObjectTypeDatasourceDefinition_dataset {
499
- type: "dataset";
500
- objectSecurityPolicy?: ObjectSecurityPolicy;
501
- propertySecurityGroups?: Array<PropertySecurityGroup>;
502
- }
503
- interface ObjectSecurityPolicy {
504
- name: string;
505
- granularPolicy?: SecurityConditionDefinition;
506
- additionalMandatoryMarkings?: Record<string, MarkingType>;
507
- }
508
- interface PropertySecurityGroup {
509
- name: string;
510
- properties: Array<string>;
511
- granularPolicy?: SecurityConditionDefinition;
512
- additionalMandatoryMarkings?: Record<string, MarkingType>;
513
- }
514
- interface ObjectTypeDatasourceDefinition_stream {
515
- type: "stream";
516
- retentionPeriod?: string;
517
- }
518
- interface ObjectTypeDatasourceDefinition_restrictedView {
519
- type: "restrictedView";
520
- }
521
- interface ObjectTypeDatasourceDefinition_derived {
522
- type: "derived";
523
- linkDefinition: Array<DerivedPropertiesLinkDefinition>;
524
- propertyMapping: Record<ObjectTypeFieldApiName, ObjectTypeFieldApiName> | Record<ObjectTypeFieldApiName, DerivedPropertyAggregation>;
525
- }
526
- interface DerivedPropertiesLinkDefinition {
527
- linkType: LinkType;
528
- side?: DerivedPropertyLinkTypeSide;
529
- }
530
- type DerivedPropertyAggregation = {
531
- type: "count";
532
- } | {
533
- type: "avg";
534
- property: ObjectTypeFieldApiName;
535
- } | {
536
- type: "sum";
537
- property: ObjectTypeFieldApiName;
538
- } | {
539
- type: "min";
540
- property: ObjectTypeFieldApiName;
541
- } | {
542
- type: "max";
543
- property: ObjectTypeFieldApiName;
544
- } | {
545
- type: "approximateCardinality";
546
- property: ObjectTypeFieldApiName;
547
- } | {
548
- type: "exactCardinality";
549
- property: ObjectTypeFieldApiName;
550
- } | {
551
- type: "collectList";
552
- property: ObjectTypeFieldApiName;
553
- limit: number;
554
- } | {
555
- type: "collectSet";
556
- property: ObjectTypeFieldApiName;
557
- limit: number;
586
+ type ObjectType = OntologyEntityBase & RequiredFields<Partial<ObjectTypeInner>, "apiName" | "primaryKeyPropertyApiName" | "displayName" | "pluralDisplayName" | "titlePropertyApiName"> & {
587
+ datasources?: Array<ObjectTypeDatasourceDefinition>;
588
+ __type: OntologyEntityTypeEnum.OBJECT_TYPE;
558
589
  };
559
-
560
- type ObjectTypeDefinition = {
561
- apiName: string;
590
+ interface ObjectTypeInner extends Omit<OntologyIrObjectType, "titlePropertyTypeRid" | "propertyTypes" | "allImplementsInterfaces" | "implementsInterfaces2" | "displayMetadata" | "primaryKeys" | "status"> {
562
591
  primaryKeyPropertyApiName: string;
563
- displayName: string;
564
- pluralDisplayName: string;
592
+ properties: Array<ObjectPropertyType>;
565
593
  titlePropertyApiName: string;
566
- properties?: {
567
- [key: string]: ObjectPropertyTypeUserDefinition;
568
- };
569
- implementsInterfaces?: Array<InterfaceImplementation>;
570
- description?: string;
571
- icon?: {
594
+ implementsInterfaces: Array<InterfaceImplementation>;
595
+ description: string | undefined;
596
+ icon: {
572
597
  locator: BlueprintIcon;
573
598
  color: string;
574
- };
575
- visibility?: Visibility;
576
- editsEnabled?: boolean;
599
+ } | undefined;
600
+ displayName: string;
601
+ pluralDisplayName: string;
602
+ visibility: Visibility;
603
+ editsEnabled: boolean;
577
604
  status?: ObjectTypeStatus;
578
- datasources?: Array<ObjectTypeDatasourceDefinition>;
579
605
  aliases?: Array<string>;
606
+ }
607
+
608
+ interface OntologyEntityTypeMapping {
609
+ [OntologyEntityTypeEnum.OBJECT_TYPE]: ObjectType;
610
+ [OntologyEntityTypeEnum.ACTION_TYPE]: ActionType;
611
+ [OntologyEntityTypeEnum.LINK_TYPE]: LinkType;
612
+ [OntologyEntityTypeEnum.INTERFACE_TYPE]: InterfaceType;
613
+ [OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE]: SharedPropertyType;
614
+ [OntologyEntityTypeEnum.VALUE_TYPE]: ValueTypeDefinitionVersion;
615
+ }
616
+
617
+ type OntologyDefinition = {
618
+ [K in Exclude<OntologyEntityTypeEnum, "VALUE_TYPE">]: Record<string, OntologyEntityTypeMapping[K]>;
619
+ } & {
620
+ VALUE_TYPE: Record<string, ValueTypeDefinitionVersion[]>;
621
+ };
622
+
623
+ type ActionLevelValidationDefinition = Array<ActionLevelValidationRule>;
624
+ type ActionLevelValidationRule = {
625
+ condition: ConditionDefinition;
626
+ displayMetadata?: ValidationRuleDisplayMetadata;
627
+ };
628
+
629
+ type DefaultFormat = "FORM" | "TABLE";
630
+
631
+ type TableConfiguration = {
632
+ columnWidthByParameterRid: Record<ParameterRid, number>;
633
+ enableFileImport: boolean;
634
+ fitHorizontally: boolean;
635
+ frozenColumnCount: number;
636
+ rowHeightInLines: number;
580
637
  };
581
638
 
582
639
  declare const MODIFY_OBJECT_PARAMETER: string;
@@ -629,17 +686,17 @@ type InterfaceActionTypeUserDefinition = {
629
686
  color: string;
630
687
  };
631
688
  };
632
- declare function defineAction(actionDef: ActionTypeDefinition): ActionType;
689
+ declare function defineAction(actionDefInput: ActionTypeDefinition): ActionType;
633
690
 
634
- declare function defineCreateInterfaceObjectAction(def: InterfaceActionTypeUserDefinition): ActionType;
691
+ declare function defineCreateInterfaceObjectAction(defInput: InterfaceActionTypeUserDefinition): ActionType;
635
692
 
636
- declare function defineCreateObjectAction(def: ActionTypeUserDefinition): ActionType;
693
+ declare function defineCreateObjectAction(defInput: ActionTypeUserDefinition): ActionType;
637
694
 
638
- declare function defineCreateOrModifyObjectAction(def: ActionTypeUserDefinition): ActionType;
695
+ declare function defineCreateOrModifyObjectAction(defInput: ActionTypeUserDefinition): ActionType;
639
696
 
640
- declare function defineDeleteInterfaceObjectAction(def: InterfaceActionTypeUserDefinition): ActionType;
697
+ declare function defineDeleteInterfaceObjectAction(defInput: InterfaceActionTypeUserDefinition): ActionType;
641
698
 
642
- declare function defineDeleteObjectAction(def: ActionTypeUserDefinition): ActionType;
699
+ declare function defineDeleteObjectAction(defInput: ActionTypeUserDefinition): ActionType;
643
700
 
644
701
  type SimplifiedInterfaceTypeStatus = {
645
702
  type: "deprecated";
@@ -670,7 +727,7 @@ type InterfaceTypeDefinition = {
670
727
  extends?: InterfaceType | InterfaceType[];
671
728
  searchable?: boolean;
672
729
  };
673
- declare function defineInterface(interfaceDef: InterfaceTypeDefinition): InterfaceType;
730
+ declare function defineInterface(interfaceDefInput: InterfaceTypeDefinition): InterfaceType;
674
731
 
675
732
  type ApiNameOrInterfaceType = string | InterfaceType;
676
733
  type Many = {
@@ -691,48 +748,35 @@ type One = {
691
748
  description?: string;
692
749
  required?: boolean;
693
750
  };
694
- declare function defineInterfaceLinkConstraint(linkDef: One | Many): void;
751
+ declare function defineInterfaceLinkConstraint(linkDefInput: One | Many): void;
695
752
 
696
- declare function defineLink(linkDefinition: LinkTypeDefinition): LinkType;
753
+ declare function defineLink(linkDefinitionInput: LinkTypeDefinition): LinkType;
697
754
 
698
- declare function defineModifyInterfaceObjectAction(def: InterfaceActionTypeUserDefinition): ActionType;
755
+ declare function defineModifyInterfaceObjectAction(defInput: InterfaceActionTypeUserDefinition): ActionType;
699
756
 
700
- declare function defineModifyObjectAction(def: ActionTypeUserDefinition): ActionType;
757
+ declare function defineModifyObjectAction(defInput: ActionTypeUserDefinition): ActionType;
701
758
 
702
- declare function defineObject(objectDef: ObjectTypeDefinition): ObjectTypeDefinition;
759
+ declare function defineObject(objectDefInput: ObjectTypeDefinition): ObjectTypeDefinition;
703
760
  declare function uppercaseFirstLetter(s: string | undefined | null): string;
704
761
  declare function convertToPluralDisplayName(s: string | undefined | null): string;
705
762
 
706
- type ObjectType = OntologyEntityBase & RequiredFields<Partial<ObjectTypeInner>, "apiName" | "primaryKeyPropertyApiName" | "displayName" | "pluralDisplayName" | "titlePropertyApiName"> & {
707
- datasources?: Array<ObjectTypeDatasourceDefinition>;
708
- __type: OntologyEntityTypeEnum.OBJECT_TYPE;
709
- };
710
- interface ObjectTypeInner extends Omit<OntologyIrObjectType, "titlePropertyTypeRid" | "propertyTypes" | "allImplementsInterfaces" | "implementsInterfaces2" | "displayMetadata" | "primaryKeys" | "status"> {
711
- primaryKeyPropertyApiName: string;
712
- properties: Array<ObjectPropertyType>;
713
- titlePropertyApiName: string;
714
- implementsInterfaces: Array<InterfaceImplementation>;
715
- description: string | undefined;
716
- icon: {
717
- locator: BlueprintIcon;
718
- color: string;
719
- } | undefined;
720
- displayName: string;
721
- pluralDisplayName: string;
722
- visibility: Visibility;
723
- editsEnabled: boolean;
724
- status?: ObjectTypeStatus;
725
- aliases?: Array<string>;
726
- }
727
-
728
763
  declare function defineOntology(ns: string, body: () => void | Promise<void>, outputDir: string | undefined, dependencyFile?: string, codeSnippetFiles?: boolean, snippetPackageName?: string, snippetFileOutputDir?: string, randomnessKey?: string): Promise<OntologyIr>;
764
+ declare function cleanAndValidateLinkTypeId(apiName: string): string;
729
765
  declare function dumpOntologyFullMetadata(): OntologyIr;
766
+ declare function convertObjectStatus(status: any): any;
767
+ declare function extractNamespace(apiName: string): string;
768
+ declare function withoutNamespace(apiName: string): string;
730
769
  declare function addNamespaceIfNone(apiName: string): string;
770
+ declare function initializeOntologyState(ns: string): void;
771
+ declare function getOntologyDefinition(): OntologyDefinition;
772
+ declare function getImportedTypes(): OntologyDefinition;
773
+ declare function getNamespace(): string;
731
774
 
732
775
  interface SharedPropertyTypeDefinition {
733
776
  apiName: string;
734
777
  type: PropertyTypeType;
735
778
  array?: boolean;
779
+ reducers?: Array<ReducerType>;
736
780
  description?: string;
737
781
  displayName?: string;
738
782
  valueType?: OntologyIrValueTypeReferenceWithMetadata;
@@ -743,7 +787,7 @@ interface SharedPropertyTypeDefinition {
743
787
  gothamMapping?: SharedPropertyTypeGothamMapping;
744
788
  baseFormatter?: OntologyIrBaseFormatter;
745
789
  }
746
- declare function defineSharedPropertyType(sptDef: SharedPropertyTypeDefinition): SharedPropertyType;
790
+ declare function defineSharedPropertyType(sptDefInput: SharedPropertyTypeDefinition): SharedPropertyType;
747
791
 
748
792
  type ValueTypeType = ValueTypeType_array | ValueTypeType_boolean | ValueTypeType_binary | ValueTypeType_byte | ValueTypeType_date | ValueTypeType_decimal | ValueTypeType_double | ValueTypeType_float | ValueTypeType_integer | ValueTypeType_long | ValueTypeType_map | ValueTypeType_optional | ValueTypeType_short | ValueTypeType_string | ValueTypeType_structV2 | ValueTypeType_timestamp;
749
793
  interface ValueTypeType_array {
@@ -945,7 +989,7 @@ type UserValueTypeStatus = "active" | {
945
989
  deadline: string;
946
990
  replacedBy?: ValueTypeRid;
947
991
  };
948
- declare function defineValueType(valueTypeDef: ValueTypeDefinition): ValueTypeDefinitionVersion;
992
+ declare function defineValueType(valueTypeDefInput: ValueTypeDefinition): ValueTypeDefinitionVersion;
949
993
 
950
994
  declare function importOntologyEntity<T extends OntologyEntityBase>(e: T): void;
951
995
 
@@ -959,6 +1003,12 @@ declare function importSharedPropertyType(opts: {
959
1003
  array?: boolean;
960
1004
  }): SharedPropertyType;
961
1005
 
1006
+ declare const defaultTypeClasses: TypeClass[];
1007
+ declare function shouldNotHaveRenderHints(type: PropertyTypeType): boolean;
1008
+ declare function hasRenderHints(typeClasses: TypeClass[] | undefined): boolean;
1009
+ declare function getPropertyTypeName(type: PropertyTypeType): string;
1010
+ declare function shouldBeIndexedForSearch(type: PropertyTypeType): boolean;
1011
+
962
1012
  /**
963
1013
  * Wraps an OntologyEntityType with a Proxy that calls importOntologyEntity when properties are accessed.
964
1014
  *
@@ -967,6 +1017,6 @@ declare function importSharedPropertyType(opts: {
967
1017
  */
968
1018
  declare function wrapWithProxy<T extends OntologyEntityBase>(entity: T): T;
969
1019
 
970
- declare function propertyTypeTypeToOntologyIrType(type: PropertyTypeType): OntologyIrType;
1020
+ declare function propertyTypeTypeToOntologyIrType(type: PropertyTypeType, apiName?: string, sharedPropertyType?: SharedPropertyType): OntologyIrType;
971
1021
 
972
- export { type ActionParameterAllowedValues, type ActionParameterConditionalOverride, type ActionParameterConfiguration, type ActionParameterValidation, type ActionSection, type ActionType, CREATE_INTERFACE_OBJECT_PARAMETER, CREATE_OR_MODIFY_OBJECT_PARAMETER, type ConditionDefinition, type CurrentTimeMappingValue, type CurrentUserMappingValue, type CustomMapping, DELETE_OBJECT_PARAMETER, type InterfaceDefinedProperty, type InterfaceType, type LinkType, MODIFY_INTERFACE_OBJECT_PARAMETER, MODIFY_OBJECT_PARAMETER, type MappingValue, type ObjectPropertyType, type ObjectType, OntologyEntityTypeEnum, type PropertyTypeType, type SectionConditionalOverride, type SharedPropertyType, type SubmissionMetadata, type UuidMappingValue, type ValueTypeDefinitionVersion, addDependency, addNamespaceIfNone, uppercaseFirstLetter as convertToDisplayName, convertToPluralDisplayName, propertyTypeTypeToOntologyIrType as convertType, main as default, defineAction, defineCreateInterfaceObjectAction, defineCreateObjectAction, defineCreateOrModifyObjectAction, defineDeleteInterfaceObjectAction, defineDeleteObjectAction, defineInterface, defineInterfaceLinkConstraint, defineLink, defineModifyInterfaceObjectAction, defineModifyObjectAction, defineObject, defineOntology, defineSharedPropertyType, defineValueType, dumpOntologyFullMetadata, importOntologyEntity, importSharedPropertyType, wrapWithProxy };
1022
+ export { type ActionParameter, type ActionParameterAllowedValues, type ActionParameterConditionalOverride, type ActionParameterConfiguration, type ActionParameterRequirementConstraint, type ActionParameterValidation, type ActionSection, type ActionType, CREATE_INTERFACE_OBJECT_PARAMETER, CREATE_OR_MODIFY_OBJECT_PARAMETER, type ConditionDefinition, type CurrentTimeMappingValue, type CurrentUserMappingValue, type CustomMapping, DELETE_OBJECT_PARAMETER, type DerivedPropertyAggregation, type InterfaceDefinedProperty, type InterfacePropertyType, type InterfaceType, type LinkType, MODIFY_INTERFACE_OBJECT_PARAMETER, MODIFY_OBJECT_PARAMETER, type MappingValue, type Nullability, type ObjectPropertyType, type ObjectType, type ObjectTypeDatasourceDefinition_dataset, type ObjectTypeDatasourceDefinition_derived, type ObjectTypeDatasourceDefinition_direct, type ObjectTypeDefinition, type OneToManyLinkTypeDefinition, type OntologyDefinition, OntologyEntityTypeEnum, type PropertyTypeType, type SectionConditionalOverride, type SecurityConditionDefinition, type SharedPropertyType, type SubmissionMetadata, type UserLinkTypeStatus, type UuidMappingValue, type ValueTypeDefinitionVersion, addDependency, addNamespaceIfNone, cleanAndValidateLinkTypeId, convertObjectStatus, uppercaseFirstLetter as convertToDisplayName, convertToPluralDisplayName, propertyTypeTypeToOntologyIrType as convertType, main as default, defaultTypeClasses, defineAction, defineCreateInterfaceObjectAction, defineCreateObjectAction, defineCreateOrModifyObjectAction, defineDeleteInterfaceObjectAction, defineDeleteObjectAction, defineInterface, defineInterfaceLinkConstraint, defineLink, defineModifyInterfaceObjectAction, defineModifyObjectAction, defineObject, defineOntology, defineSharedPropertyType, defineValueType, dumpOntologyFullMetadata, extractNamespace, getImportedTypes, getNamespace, getOntologyDefinition, getPropertyTypeName, hasRenderHints, importOntologyEntity, importSharedPropertyType, initializeOntologyState, isExotic, isInterfaceSharedPropertyType, shouldBeIndexedForSearch, shouldNotHaveRenderHints, uppercaseFirstLetter, withoutNamespace, wrapWithProxy };
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /**
18
+ * Shallow-clones a definition object, copying any array-valued properties
19
+ * to prevent shared-array mutation bugs (e.g. when users pass the same
20
+ * datasources constant to multiple defineObject calls).
21
+ *
22
+ * Does NOT deep-clone nested objects so that entity references (interfaces,
23
+ * link types, etc.) preserve their identity for registry lookups.
24
+ */
25
+ export function cloneDefinition(input) {
26
+ const clone = {
27
+ ...input
28
+ };
29
+ for (const key in clone) {
30
+ if (Object.prototype.hasOwnProperty.call(clone, key) && Array.isArray(clone[key])) {
31
+ clone[key] = [...clone[key]];
32
+ }
33
+ }
34
+ return clone;
35
+ }
36
+ //# sourceMappingURL=cloneDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloneDefinition.js","names":["cloneDefinition","input","clone","key","Object","prototype","hasOwnProperty","call","Array","isArray"],"sources":["cloneDefinition.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\n/**\n * Shallow-clones a definition object, copying any array-valued properties\n * to prevent shared-array mutation bugs (e.g. when users pass the same\n * datasources constant to multiple defineObject calls).\n *\n * Does NOT deep-clone nested objects so that entity references (interfaces,\n * link types, etc.) preserve their identity for registry lookups.\n */\nexport function cloneDefinition<T extends object>(\n input: T,\n): T {\n const clone = { ...input };\n for (const key in clone) {\n if (\n Object.prototype.hasOwnProperty.call(clone, key)\n && Array.isArray(clone[key])\n ) {\n (clone as any)[key] = [...(clone[key] as unknown[])];\n }\n }\n return clone;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAC7BC,KAAQ,EACL;EACH,MAAMC,KAAK,GAAG;IAAE,GAAGD;EAAM,CAAC;EAC1B,KAAK,MAAME,GAAG,IAAID,KAAK,EAAE;IACvB,IACEE,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACL,KAAK,EAAEC,GAAG,CAAC,IAC7CK,KAAK,CAACC,OAAO,CAACP,KAAK,CAACC,GAAG,CAAC,CAAC,EAC5B;MACCD,KAAK,CAASC,GAAG,CAAC,GAAG,CAAC,GAAID,KAAK,CAACC,GAAG,CAAe,CAAC;IACtD;EACF;EACA,OAAOD,KAAK;AACd","ignoreList":[]}
@@ -60,7 +60,7 @@ function generateInterfaceSnippet(interfaceType, packageName) {
60
60
  "interfaceApiName": interfaceType.apiName,
61
61
  "packageName": packageName,
62
62
  "objectOrInterfaceApiName": interfaceType.apiName,
63
- "propertyNames": Object.keys(interfaceType.propertiesV2),
63
+ "propertyNames": Object.keys(interfaceType.propertiesV3),
64
64
  "interfaceName": interfaceType.displayMetadata.displayName
65
65
  };
66
66
  return getSnippets(interfaceSnippets, interfaceContext);
@@ -1 +1 @@
1
- {"version":3,"file":"createCodeSnippets.js","names":["TYPESCRIPT_OSDK_SNIPPETS","consola","fs","Mustache","path","OntologyEntityTypeEnum","actionSnippets","interfaceSnippets","objectSnippets","snippetNameMapping","createCodeSnippets","ontology","packageName","outputDir","undefined","existsSync","mkdirSync","recursive","info","type","Object","values","object","snippet","OBJECT_TYPE","generateObjectSnippet","ACTION_TYPE","generateActionSnippet","INTERFACE_TYPE","generateInterfaceSnippet","writeFileSync","join","apiName","JSON","stringify","interfaceType","interfaceContext","keys","propertiesV2","displayMetadata","displayName","getSnippets","objectType","objectContext","actionType","actionContext","snippetType","context","allSnippets","templateName","filter","key","isNaN","Number","versions","latestTemplate","slice","reverse","find","v","snippets","at","template","renderedTemplate","render","snippetName","get"],"sources":["createCodeSnippets.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 { TYPESCRIPT_OSDK_SNIPPETS } from \"@osdk/typescript-sdk-docs\";\nimport { consola } from \"consola\";\nimport * as fs from \"fs\";\nimport Mustache from \"mustache\";\nimport * as path from \"path\";\nimport type { ActionType } from \"../action/ActionType.js\";\nimport type { OntologyDefinition } from \"../common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\nimport type { InterfaceType } from \"../interface/InterfaceType.js\";\nimport type { ObjectType } from \"../object/ObjectType.js\";\nimport {\n actionSnippets,\n interfaceSnippets,\n objectSnippets,\n snippetNameMapping,\n} from \"./snippetTypes.js\";\n\nexport function createCodeSnippets(\n ontology: OntologyDefinition,\n packageName: string | undefined,\n outputDir: string | undefined,\n): void {\n if (outputDir === undefined) {\n outputDir = \"./code-snippets\";\n }\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n if (packageName === undefined) {\n packageName = \"\";\n }\n consola.info(\"Generating code snippets to \", outputDir);\n for (const type of Object.values(OntologyEntityTypeEnum)) {\n for (const object of Object.values(ontology[type])) {\n let snippet = {};\n switch (type) {\n case OntologyEntityTypeEnum.OBJECT_TYPE:\n snippet = generateObjectSnippet(object, packageName);\n break;\n case OntologyEntityTypeEnum.ACTION_TYPE:\n snippet = generateActionSnippet(object, packageName);\n break;\n case OntologyEntityTypeEnum.INTERFACE_TYPE:\n snippet = generateInterfaceSnippet(object, packageName);\n break;\n default:\n continue;\n }\n fs.writeFileSync(\n path.join(outputDir, object.apiName),\n JSON.stringify(snippet),\n );\n }\n }\n consola.info(\"Finished Code Snippet Generation\");\n}\n\nfunction generateInterfaceSnippet(\n interfaceType: InterfaceType,\n packageName: string,\n) {\n const interfaceContext = {\n \"interfaceApiName\": interfaceType.apiName,\n \"packageName\": packageName,\n \"objectOrInterfaceApiName\": interfaceType.apiName,\n \"propertyNames\": Object.keys(interfaceType.propertiesV2),\n \"interfaceName\": interfaceType.displayMetadata.displayName,\n };\n\n return getSnippets(interfaceSnippets, interfaceContext);\n}\n\nfunction generateObjectSnippet(objectType: ObjectType, packageName: string) {\n const objectContext = {\n \"objectType\": objectType.apiName,\n \"packageName\": packageName,\n \"objectOrInterfaceApiName\": objectType.apiName,\n };\n return getSnippets(objectSnippets, objectContext);\n}\n\nfunction generateActionSnippet(actionType: ActionType, packageName: string) {\n const actionContext = {\n \"actionApiName\": actionType.apiName,\n \"packageName\": packageName,\n };\n return getSnippets(actionSnippets, actionContext);\n}\n\nfunction getSnippets(\n snippetType:\n | typeof interfaceSnippets\n | typeof actionSnippets\n | typeof objectSnippets,\n context: {},\n) {\n const allSnippets = {};\n for (\n const templateName of Object.keys(snippetType).filter(key =>\n isNaN(Number(key))\n )\n ) {\n const versions = Object.values(TYPESCRIPT_OSDK_SNIPPETS.versions);\n const latestTemplate = versions\n .slice()\n .reverse()\n .find(v => v.snippets[templateName])\n ?.snippets[templateName]\n .at(-1)?.template ?? \"\";\n const renderedTemplate = Mustache.render(latestTemplate, context);\n const snippetName = snippetNameMapping.get(templateName);\n\n (allSnippets as any)[\n snippetName !== undefined\n ? Mustache.render(snippetName, context)\n : templateName\n ] = renderedTemplate;\n }\n return allSnippets;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,wBAAwB,QAAQ,2BAA2B;AACpE,SAASC,OAAO,QAAQ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AACC,MAAM,CAACF,GAAG,CAAC,CACnB,CAAC,EACD;IACA,MAAMG,QAAQ,GAAGlC,MAAM,CAACC,MAAM,CAACrB,wBAAwB,CAACsD,QAAQ,CAAC;IACjE,MAAMC,cAAc,GAAGD,QAAQ,CAC5BE,KAAK,CAAC,CAAC,CACPC,OAAO,CAAC,CAAC,CACTC,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,QAAQ,CAACX,YAAY,CAAC,CAAC,EAClCW,QAAQ,CAACX,YAAY,CAAC,CACvBY,EAAE,CAAC,CAAC,CAAC,CAAC,EAAEC,QAAQ,IAAI,EAAE;IACzB,MAAMC,gBAAgB,GAAG5D,QAAQ,CAAC6D,MAAM,CAACT,cAAc,EAAER,OAAO,CAAC;IACjE,MAAMkB,WAAW,GAAGxD,kBAAkB,CAACyD,GAAG,CAACjB,YAAY,CAAC;IAEvDD,WAAW,CACViB,WAAW,KAAKnD,SAAS,GACrBX,QAAQ,CAAC6D,MAAM,CAACC,WAAW,EAAElB,OAAO,CAAC,GACrCE,YAAY,CACjB,GAAGc,gBAAgB;EACtB;EACA,OAAOf,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"file":"createCodeSnippets.js","names":["TYPESCRIPT_OSDK_SNIPPETS","consola","fs","Mustache","path","OntologyEntityTypeEnum","actionSnippets","interfaceSnippets","objectSnippets","snippetNameMapping","createCodeSnippets","ontology","packageName","outputDir","undefined","existsSync","mkdirSync","recursive","info","type","Object","values","object","snippet","OBJECT_TYPE","generateObjectSnippet","ACTION_TYPE","generateActionSnippet","INTERFACE_TYPE","generateInterfaceSnippet","writeFileSync","join","apiName","JSON","stringify","interfaceType","interfaceContext","keys","propertiesV3","displayMetadata","displayName","getSnippets","objectType","objectContext","actionType","actionContext","snippetType","context","allSnippets","templateName","filter","key","isNaN","Number","versions","latestTemplate","slice","reverse","find","v","snippets","at","template","renderedTemplate","render","snippetName","get"],"sources":["createCodeSnippets.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 { TYPESCRIPT_OSDK_SNIPPETS } from \"@osdk/typescript-sdk-docs\";\nimport { consola } from \"consola\";\nimport * as fs from \"fs\";\nimport Mustache from \"mustache\";\nimport * as path from \"path\";\nimport type { ActionType } from \"../action/ActionType.js\";\nimport type { OntologyDefinition } from \"../common/OntologyDefinition.js\";\nimport { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\nimport type { InterfaceType } from \"../interface/InterfaceType.js\";\nimport type { ObjectType } from \"../object/ObjectType.js\";\nimport {\n actionSnippets,\n interfaceSnippets,\n objectSnippets,\n snippetNameMapping,\n} from \"./snippetTypes.js\";\n\nexport function createCodeSnippets(\n ontology: OntologyDefinition,\n packageName: string | undefined,\n outputDir: string | undefined,\n): void {\n if (outputDir === undefined) {\n outputDir = \"./code-snippets\";\n }\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n if (packageName === undefined) {\n packageName = \"\";\n }\n consola.info(\"Generating code snippets to \", outputDir);\n for (const type of Object.values(OntologyEntityTypeEnum)) {\n for (const object of Object.values(ontology[type])) {\n let snippet = {};\n switch (type) {\n case OntologyEntityTypeEnum.OBJECT_TYPE:\n snippet = generateObjectSnippet(object, packageName);\n break;\n case OntologyEntityTypeEnum.ACTION_TYPE:\n snippet = generateActionSnippet(object, packageName);\n break;\n case OntologyEntityTypeEnum.INTERFACE_TYPE:\n snippet = generateInterfaceSnippet(object, packageName);\n break;\n default:\n continue;\n }\n fs.writeFileSync(\n path.join(outputDir, object.apiName),\n JSON.stringify(snippet),\n );\n }\n }\n consola.info(\"Finished Code Snippet Generation\");\n}\n\nfunction generateInterfaceSnippet(\n interfaceType: InterfaceType,\n packageName: string,\n) {\n const interfaceContext = {\n \"interfaceApiName\": interfaceType.apiName,\n \"packageName\": packageName,\n \"objectOrInterfaceApiName\": interfaceType.apiName,\n \"propertyNames\": Object.keys(interfaceType.propertiesV3),\n \"interfaceName\": interfaceType.displayMetadata.displayName,\n };\n\n return getSnippets(interfaceSnippets, interfaceContext);\n}\n\nfunction generateObjectSnippet(objectType: ObjectType, packageName: string) {\n const objectContext = {\n \"objectType\": objectType.apiName,\n \"packageName\": packageName,\n \"objectOrInterfaceApiName\": objectType.apiName,\n };\n return getSnippets(objectSnippets, objectContext);\n}\n\nfunction generateActionSnippet(actionType: ActionType, packageName: string) {\n const actionContext = {\n \"actionApiName\": actionType.apiName,\n \"packageName\": packageName,\n };\n return getSnippets(actionSnippets, actionContext);\n}\n\nfunction getSnippets(\n snippetType:\n | typeof interfaceSnippets\n | typeof actionSnippets\n | typeof objectSnippets,\n context: {},\n) {\n const allSnippets = {};\n for (\n const templateName of Object.keys(snippetType).filter(key =>\n isNaN(Number(key))\n )\n ) {\n const versions = Object.values(TYPESCRIPT_OSDK_SNIPPETS.versions);\n const latestTemplate = versions\n .slice()\n .reverse()\n .find(v => v.snippets[templateName])\n ?.snippets[templateName]\n .at(-1)?.template ?? \"\";\n const renderedTemplate = Mustache.render(latestTemplate, context);\n const snippetName = snippetNameMapping.get(templateName);\n\n (allSnippets as any)[\n snippetName !== undefined\n ? Mustache.render(snippetName, context)\n : templateName\n ] = renderedTemplate;\n }\n return allSnippets;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,wBAAwB,QAAQ,2BAA2B;AACpE,SAASC,OAAO,QAAQ,SAAS;AACjC,OAAO,KAAKC,EAAE,MAAM,IAAI;AACxB,OAAOC,QAAQ,M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