@osdk/maker 0.15.0-beta.6 → 0.15.0-beta.7

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 (154) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/build/browser/api/action/ActionParameter.js.map +1 -1
  3. package/build/browser/api/action/ActionParameterConfiguration.js.map +1 -1
  4. package/build/browser/api/defineAction.js +65 -22
  5. package/build/browser/api/defineAction.js.map +1 -1
  6. package/build/browser/api/defineCreateInterfaceObjectAction.js +28 -8
  7. package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -1
  8. package/build/browser/api/defineInterface.js +40 -34
  9. package/build/browser/api/defineInterface.js.map +1 -1
  10. package/build/browser/api/defineModifyInterfaceObjectAction.js +31 -8
  11. package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -1
  12. package/build/browser/api/defineObject.js +13 -9
  13. package/build/browser/api/defineObject.js.map +1 -1
  14. package/build/browser/api/defineSpt.js.map +1 -1
  15. package/build/browser/api/interface/InterfacePropertyType.js +22 -1
  16. package/build/browser/api/interface/InterfacePropertyType.js.map +1 -1
  17. package/build/browser/api/interface/InterfaceType.js.map +1 -1
  18. package/build/browser/api/interface/getFlattenedInterfaceProperties.js +9 -3
  19. package/build/browser/api/interface/getFlattenedInterfaceProperties.js.map +1 -1
  20. package/build/browser/api/object/ObjectType.js.map +1 -1
  21. package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -1
  22. package/build/browser/api/properties/PropertyTypeType.js +1 -1
  23. package/build/browser/api/properties/PropertyTypeType.js.map +1 -1
  24. package/build/browser/api/properties/SharedPropertyType.js.map +1 -1
  25. package/build/browser/api/test/actions.test.js +6105 -5850
  26. package/build/browser/api/test/actions.test.js.map +1 -1
  27. package/build/browser/api/test/interfaces.test.js +723 -470
  28. package/build/browser/api/test/interfaces.test.js.map +1 -1
  29. package/build/browser/api/test/links.test.js +1334 -1325
  30. package/build/browser/api/test/links.test.js.map +1 -1
  31. package/build/browser/api/test/misc.test.js +262 -11
  32. package/build/browser/api/test/misc.test.js.map +1 -1
  33. package/build/browser/api/test/objects.test.js +1019 -960
  34. package/build/browser/api/test/objects.test.js.map +1 -1
  35. package/build/browser/api/test/spt.test.js +250 -103
  36. package/build/browser/api/test/spt.test.js.map +1 -1
  37. package/build/browser/cli/main.js +1 -1
  38. package/build/browser/conversion/toMarketplace/convertActionValidation.js +1 -1
  39. package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -1
  40. package/build/browser/conversion/toMarketplace/convertInterface.js +2 -2
  41. package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -1
  42. package/build/browser/conversion/toMarketplace/convertInterfacePropertyType.js +66 -0
  43. package/build/browser/conversion/toMarketplace/convertInterfacePropertyType.js.map +1 -0
  44. package/build/browser/conversion/toMarketplace/convertMappingValue.js +35 -0
  45. package/build/browser/conversion/toMarketplace/convertMappingValue.js.map +1 -1
  46. package/build/browser/conversion/toMarketplace/convertObject.js +4 -2
  47. package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -1
  48. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js +2 -1
  49. package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -1
  50. package/build/browser/conversion/toMarketplace/convertSpt.js +4 -2
  51. package/build/browser/conversion/toMarketplace/convertSpt.js.map +1 -1
  52. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js +143 -0
  53. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js.map +1 -0
  54. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +4 -0
  55. package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -1
  56. package/build/browser/index.js.map +1 -1
  57. package/build/cjs/index.cjs +386 -109
  58. package/build/cjs/index.cjs.map +1 -1
  59. package/build/cjs/index.d.cts +28 -13
  60. package/build/esm/api/action/ActionParameter.js.map +1 -1
  61. package/build/esm/api/action/ActionParameterConfiguration.js.map +1 -1
  62. package/build/esm/api/defineAction.js +65 -22
  63. package/build/esm/api/defineAction.js.map +1 -1
  64. package/build/esm/api/defineCreateInterfaceObjectAction.js +28 -8
  65. package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -1
  66. package/build/esm/api/defineInterface.js +40 -34
  67. package/build/esm/api/defineInterface.js.map +1 -1
  68. package/build/esm/api/defineModifyInterfaceObjectAction.js +31 -8
  69. package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -1
  70. package/build/esm/api/defineObject.js +13 -9
  71. package/build/esm/api/defineObject.js.map +1 -1
  72. package/build/esm/api/defineSpt.js.map +1 -1
  73. package/build/esm/api/interface/InterfacePropertyType.js +22 -1
  74. package/build/esm/api/interface/InterfacePropertyType.js.map +1 -1
  75. package/build/esm/api/interface/InterfaceType.js.map +1 -1
  76. package/build/esm/api/interface/getFlattenedInterfaceProperties.js +9 -3
  77. package/build/esm/api/interface/getFlattenedInterfaceProperties.js.map +1 -1
  78. package/build/esm/api/object/ObjectType.js.map +1 -1
  79. package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -1
  80. package/build/esm/api/properties/PropertyTypeType.js +1 -1
  81. package/build/esm/api/properties/PropertyTypeType.js.map +1 -1
  82. package/build/esm/api/properties/SharedPropertyType.js.map +1 -1
  83. package/build/esm/api/test/actions.test.js +6105 -5850
  84. package/build/esm/api/test/actions.test.js.map +1 -1
  85. package/build/esm/api/test/interfaces.test.js +723 -470
  86. package/build/esm/api/test/interfaces.test.js.map +1 -1
  87. package/build/esm/api/test/links.test.js +1334 -1325
  88. package/build/esm/api/test/links.test.js.map +1 -1
  89. package/build/esm/api/test/misc.test.js +262 -11
  90. package/build/esm/api/test/misc.test.js.map +1 -1
  91. package/build/esm/api/test/objects.test.js +1019 -960
  92. package/build/esm/api/test/objects.test.js.map +1 -1
  93. package/build/esm/api/test/spt.test.js +250 -103
  94. package/build/esm/api/test/spt.test.js.map +1 -1
  95. package/build/esm/cli/main.js +1 -1
  96. package/build/esm/conversion/toMarketplace/convertActionValidation.js +1 -1
  97. package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -1
  98. package/build/esm/conversion/toMarketplace/convertInterface.js +2 -2
  99. package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -1
  100. package/build/esm/conversion/toMarketplace/convertInterfacePropertyType.js +66 -0
  101. package/build/esm/conversion/toMarketplace/convertInterfacePropertyType.js.map +1 -0
  102. package/build/esm/conversion/toMarketplace/convertMappingValue.js +35 -0
  103. package/build/esm/conversion/toMarketplace/convertMappingValue.js.map +1 -1
  104. package/build/esm/conversion/toMarketplace/convertObject.js +4 -2
  105. package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -1
  106. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js +2 -1
  107. package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -1
  108. package/build/esm/conversion/toMarketplace/convertSpt.js +4 -2
  109. package/build/esm/conversion/toMarketplace/convertSpt.js.map +1 -1
  110. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js +143 -0
  111. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js.map +1 -0
  112. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +4 -0
  113. package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -1
  114. package/build/esm/index.js.map +1 -1
  115. package/build/types/api/action/ActionParameter.d.ts +2 -1
  116. package/build/types/api/action/ActionParameter.d.ts.map +1 -1
  117. package/build/types/api/action/ActionParameterConfiguration.d.ts +2 -1
  118. package/build/types/api/action/ActionParameterConfiguration.d.ts.map +1 -1
  119. package/build/types/api/defineAction.d.ts +4 -3
  120. package/build/types/api/defineAction.d.ts.map +1 -1
  121. package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -1
  122. package/build/types/api/defineInterface.d.ts +5 -5
  123. package/build/types/api/defineInterface.d.ts.map +1 -1
  124. package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -1
  125. package/build/types/api/defineObject.d.ts.map +1 -1
  126. package/build/types/api/defineSpt.d.ts +3 -0
  127. package/build/types/api/defineSpt.d.ts.map +1 -1
  128. package/build/types/api/interface/InterfacePropertyType.d.ts +12 -2
  129. package/build/types/api/interface/InterfacePropertyType.d.ts.map +1 -1
  130. package/build/types/api/interface/InterfaceType.d.ts +3 -2
  131. package/build/types/api/interface/InterfaceType.d.ts.map +1 -1
  132. package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts +1 -1
  133. package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts.map +1 -1
  134. package/build/types/api/object/ObjectType.d.ts +1 -0
  135. package/build/types/api/object/ObjectType.d.ts.map +1 -1
  136. package/build/types/api/object/ObjectTypeDefinition.d.ts +1 -0
  137. package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -1
  138. package/build/types/api/properties/PropertyTypeType.d.ts +1 -0
  139. package/build/types/api/properties/PropertyTypeType.d.ts.map +1 -1
  140. package/build/types/api/properties/SharedPropertyType.d.ts +1 -0
  141. package/build/types/api/properties/SharedPropertyType.d.ts.map +1 -1
  142. package/build/types/conversion/toMarketplace/convertInterface.d.ts.map +1 -1
  143. package/build/types/conversion/toMarketplace/convertInterfacePropertyType.d.ts +3 -0
  144. package/build/types/conversion/toMarketplace/convertInterfacePropertyType.d.ts.map +1 -0
  145. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts +2 -1
  146. package/build/types/conversion/toMarketplace/convertMappingValue.d.ts.map +1 -1
  147. package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -1
  148. package/build/types/conversion/toMarketplace/convertSpt.d.ts +1 -1
  149. package/build/types/conversion/toMarketplace/convertSpt.d.ts.map +1 -1
  150. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.d.ts +3 -0
  151. package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.d.ts.map +1 -0
  152. package/build/types/index.d.ts +1 -0
  153. package/build/types/index.d.ts.map +1 -1
  154. package/package.json +4 -4
@@ -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, 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, OntologyIrLinkTypeStatus, DerivedPropertyLinkTypeSide, ObjectTypeFieldApiName, OntologyIrObjectType, OntologyIr, DataConstraint, FailureMessage, 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, ValidationRuleDisplayMetadata, ParameterRid, StructFieldType, OntologyIrValueTypeReferenceWithMetadata, Visibility, SharedPropertyTypeGothamMapping, OntologyIrBaseFormatter, OntologyIrMarketplaceInterfaceType, InterfaceTypeStatus, ValueTypeApiName, ValueTypeDisplayMetadata, ValueTypeStatus, ValueTypeVersion, BaseType, ValueTypeDataConstraint, ExampleValue, LinkTypeMetadata, OntologyIrLinkTypeStatus, DerivedPropertyLinkTypeSide, ObjectTypeFieldApiName, OntologyIrObjectType, OntologyIr, DataConstraint, FailureMessage, OntologyIrType } from '@osdk/client.unstable';
2
2
 
3
3
  declare function main(args?: string[]): Promise<void>;
4
4
 
@@ -120,6 +120,7 @@ interface ActionParameterConfiguration {
120
120
  defaultVisibility?: "editable" | "disabled" | "hidden";
121
121
  conditionalOverrides?: Array<ActionParameterConditionalOverride>;
122
122
  defaultValue?: OntologyIrParameterPrefill;
123
+ renderHint?: ParameterRenderHint;
123
124
  displayName?: string;
124
125
  description?: string;
125
126
  customParameterType?: ActionParameterType;
@@ -139,6 +140,7 @@ interface ActionParameter {
139
140
  description?: string;
140
141
  typeClasses?: Array<TypeClass>;
141
142
  defaultValue?: OntologyIrParameterPrefill;
143
+ renderHint?: ParameterRenderHint;
142
144
  }
143
145
  type ActionParameterValidation = Omit<ActionParameterConfiguration, "displayName" | "defaultValue">;
144
146
 
@@ -240,11 +242,6 @@ type TableConfiguration = {
240
242
  rowHeightInLines: number;
241
243
  };
242
244
 
243
- interface Nullability {
244
- noEmptyCollections: boolean;
245
- noNulls: boolean;
246
- }
247
-
248
245
  type PropertyTypeType = PropertyTypeTypePrimitive | PropertyTypeTypeExotic;
249
246
  type PropertyTypeTypePrimitive = "boolean" | "byte" | "date" | "decimal" | "double" | "float" | "integer" | "long" | "short" | "string" | "timestamp";
250
247
  type PropertyTypeTypeExotic = "geopoint" | "geoshape" | "mediaReference" | "geotimeSeries" | PropertyTypeTypeMarking | PropertyTypeTypeStruct | PropertyTypeTypeString | PropertyTypeTypeDecimal;
@@ -276,11 +273,18 @@ type PropertyTypeTypesWithoutStruct = Exclude<PropertyTypeType, PropertyTypeType
276
273
  type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
277
274
  interface StructPropertyType extends Optional<Omit<StructFieldType, "fieldType" | "structFieldRid" | "apiName">, "typeClasses" | "aliases"> {
278
275
  fieldType: PropertyTypeTypesWithoutStruct;
276
+ requireImplementation?: boolean;
277
+ }
278
+
279
+ interface Nullability {
280
+ noEmptyCollections: boolean;
281
+ noNulls: boolean;
279
282
  }
280
283
 
281
284
  interface SharedPropertyType extends OntologyEntityBase, PropertyType {
282
285
  apiName: string;
283
286
  nonNameSpacedApiName: string;
287
+ aliases?: Array<string>;
284
288
  gothamMapping?: SharedPropertyTypeGothamMapping;
285
289
  baseFormatter?: OntologyIrBaseFormatter;
286
290
  __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE;
@@ -296,13 +300,20 @@ interface PropertyType {
296
300
  nullability?: Nullability;
297
301
  }
298
302
 
299
- interface InterfacePropertyType {
303
+ type InterfacePropertyType = InterfaceSharedPropertyType | InterfaceDefinedProperty;
304
+ interface InterfaceDefinedProperty extends PropertyType {
305
+ required?: boolean;
306
+ primaryKeyConstraint?: "MUST_BE_PK" | "CANNOT_BE_PK" | "NO_RESTRICTION";
307
+ baseFormatter?: OntologyIrBaseFormatter;
308
+ }
309
+ interface InterfaceSharedPropertyType {
300
310
  sharedPropertyType: SharedPropertyType;
301
311
  required: boolean;
302
312
  }
303
313
 
304
314
  interface InterfaceType extends OntologyEntityBase, Omit<OntologyIrMarketplaceInterfaceType, "properties" | "propertiesV2" | "propertiesV3" | "extendsInterfaces"> {
305
- propertiesV2: Record<string, InterfacePropertyType>;
315
+ propertiesV2: Record<string, InterfaceSharedPropertyType>;
316
+ propertiesV3: Record<string, InterfacePropertyType>;
306
317
  extendsInterfaces: Array<InterfaceType>;
307
318
  status: InterfaceTypeStatus;
308
319
  __type: OntologyEntityTypeEnum.INTERFACE_TYPE;
@@ -520,6 +531,7 @@ type ObjectTypeDefinition = {
520
531
  editsEnabled?: boolean;
521
532
  status?: ObjectTypeStatus;
522
533
  datasources?: Array<ObjectTypeDatasourceDefinition>;
534
+ aliases?: Array<string>;
523
535
  };
524
536
 
525
537
  declare const MODIFY_OBJECT_PARAMETER: string;
@@ -593,10 +605,10 @@ type SimplifiedInterfaceTypeStatus = {
593
605
  } | {
594
606
  type: "experimental";
595
607
  };
596
- type PropertyBase = SharedPropertyType | PropertyTypeType;
597
- type PropertyWithOptional = {
608
+ type PropertyBase = SharedPropertyType | InterfaceDefinedProperty;
609
+ type SptWithOptional = {
598
610
  required: boolean;
599
- propertyDefinition: PropertyBase;
611
+ sharedPropertyType: SharedPropertyType;
600
612
  };
601
613
  type InterfaceTypeDefinition = {
602
614
  apiName: string;
@@ -607,7 +619,7 @@ type InterfaceTypeDefinition = {
607
619
  color: string;
608
620
  };
609
621
  status?: SimplifiedInterfaceTypeStatus;
610
- properties?: Record<string, PropertyBase | PropertyWithOptional>;
622
+ properties?: Record<string, PropertyBase | SptWithOptional>;
611
623
  extends?: InterfaceType | InterfaceType[];
612
624
  searchable?: boolean;
613
625
  };
@@ -663,6 +675,7 @@ interface ObjectTypeInner extends Omit<OntologyIrObjectType, "titlePropertyTypeR
663
675
  visibility: Visibility;
664
676
  editsEnabled: boolean;
665
677
  status?: ObjectTypeStatus;
678
+ aliases?: Array<string>;
666
679
  }
667
680
 
668
681
  declare function defineOntology(ns: string, body: () => void | Promise<void>, outputDir: string | undefined, dependencyFile?: string, codeSnippetFiles?: boolean, snippetPackageName?: string, snippetFileOutputDir?: string, randomnessKey?: string): Promise<OntologyIr>;
@@ -677,7 +690,9 @@ interface SharedPropertyTypeDefinition {
677
690
  displayName?: string;
678
691
  valueType?: OntologyIrValueTypeReferenceWithMetadata;
679
692
  visibility?: Visibility;
693
+ nullability?: Nullability;
680
694
  typeClasses?: SharedPropertyType["typeClasses"];
695
+ aliases?: Array<string>;
681
696
  gothamMapping?: SharedPropertyTypeGothamMapping;
682
697
  baseFormatter?: OntologyIrBaseFormatter;
683
698
  }
@@ -899,4 +914,4 @@ declare function wrapWithProxy<T extends OntologyEntityBase>(entity: T): T;
899
914
 
900
915
  declare function propertyTypeTypeToOntologyIrType(type: PropertyTypeType): OntologyIrType;
901
916
 
902
- 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 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 };
917
+ 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 };
@@ -1 +1 @@
1
- {"version":3,"file":"ActionParameter.js","names":[],"sources":["ActionParameter.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 OntologyIrParameterPrefill,\n ParameterId,\n} from \"@osdk/client.unstable\";\nimport type { TypeClass } from \"../common/TypeClass.js\";\nimport type { ActionParameterConfiguration } from \"./ActionParameterConfiguration.js\";\nimport type { ActionParameterType } from \"./ActionParameterType.js\";\n\nexport interface ActionParameter {\n id: ParameterId;\n displayName: string;\n type: ActionParameterType;\n validation: ActionParameterValidation;\n description?: string;\n typeClasses?: Array<TypeClass>;\n defaultValue?: OntologyIrParameterPrefill;\n}\nexport type ActionParameterValidation = Omit<\n ActionParameterConfiguration,\n \"displayName\" | \"defaultValue\"\n>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ActionParameter.js","names":[],"sources":["ActionParameter.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 OntologyIrParameterPrefill,\n ParameterId,\n ParameterRenderHint,\n} from \"@osdk/client.unstable\";\nimport type { TypeClass } from \"../common/TypeClass.js\";\nimport type { ActionParameterConfiguration } from \"./ActionParameterConfiguration.js\";\nimport type { ActionParameterType } from \"./ActionParameterType.js\";\n\nexport interface ActionParameter {\n id: ParameterId;\n displayName: string;\n type: ActionParameterType;\n validation: ActionParameterValidation;\n description?: string;\n typeClasses?: Array<TypeClass>;\n defaultValue?: OntologyIrParameterPrefill;\n renderHint?: ParameterRenderHint;\n}\nexport type ActionParameterValidation = Omit<\n ActionParameterConfiguration,\n \"displayName\" | \"defaultValue\"\n>;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionParameterConfiguration.js","names":[],"sources":["ActionParameterConfiguration.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 { OntologyIrParameterPrefill } from \"@osdk/client.unstable\";\nimport type { ActionParameterAllowedValues } from \"./ActionParameterAllowedValues.js\";\nimport type { ActionParameterConditionalOverride } from \"./ActionParameterConditionalOverride.js\";\nimport type { ActionParameterType } from \"./ActionParameterType.js\";\n\nexport interface ActionParameterConfiguration {\n allowedValues?: ActionParameterAllowedValues;\n required?: ActionParameterRequirementConstraint;\n defaultVisibility?: \"editable\" | \"disabled\" | \"hidden\";\n conditionalOverrides?: Array<ActionParameterConditionalOverride>;\n defaultValue?: OntologyIrParameterPrefill;\n displayName?: string;\n description?: string;\n // should only be used on non-property parameters\n customParameterType?: ActionParameterType;\n}\n\nexport type ActionParameterRequirementConstraint =\n | boolean\n | { listLength: { min?: number; max?: number } };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ActionParameterConfiguration.js","names":[],"sources":["ActionParameterConfiguration.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 OntologyIrParameterPrefill,\n ParameterRenderHint,\n} from \"@osdk/client.unstable\";\nimport type { ActionParameterAllowedValues } from \"./ActionParameterAllowedValues.js\";\nimport type { ActionParameterConditionalOverride } from \"./ActionParameterConditionalOverride.js\";\nimport type { ActionParameterType } from \"./ActionParameterType.js\";\n\nexport interface ActionParameterConfiguration {\n allowedValues?: ActionParameterAllowedValues;\n required?: ActionParameterRequirementConstraint;\n defaultVisibility?: \"editable\" | \"disabled\" | \"hidden\";\n conditionalOverrides?: Array<ActionParameterConditionalOverride>;\n defaultValue?: OntologyIrParameterPrefill;\n renderHint?: ParameterRenderHint;\n displayName?: string;\n description?: string;\n // should only be used on non-property parameters\n customParameterType?: ActionParameterType;\n}\n\nexport type ActionParameterRequirementConstraint =\n | boolean\n | { listLength: { min?: number; max?: number } };\n"],"mappings":"","ignoreList":[]}
@@ -19,8 +19,9 @@ import { convertConditionDefinition } from "../conversion/toMarketplace/convertC
19
19
  import { isActionParameterTypePrimitive } from "./action/ActionParameterType.js";
20
20
  import { OntologyEntityTypeEnum } from "./common/OntologyEntityTypeEnum.js";
21
21
  import { uppercaseFirstLetter } from "./defineObject.js";
22
- import { addNamespaceIfNone, importedTypes, namespace, ontologyDefinition, updateOntology } from "./defineOntology.js";
22
+ import { addNamespaceIfNone, importedTypes, namespace, ontologyDefinition, updateOntology, withoutNamespace } from "./defineOntology.js";
23
23
  import { getFlattenedInterfaceProperties } from "./interface/getFlattenedInterfaceProperties.js";
24
+ import { getInterfacePropertyTypeType, isInterfaceSharedPropertyType } from "./interface/InterfacePropertyType.js";
24
25
  import { isStruct } from "./properties/PropertyTypeType.js";
25
26
  export const MODIFY_OBJECT_PARAMETER = "objectToModifyParameter";
26
27
  export const CREATE_OR_MODIFY_OBJECT_PARAMETER = "objectToCreateOrModifyParameter";
@@ -89,29 +90,39 @@ export function defineAction(actionDef) {
89
90
  return fullAction;
90
91
  }
91
92
  export function isPropertyParameter(def, name, type) {
92
- return !Object.keys(def.nonParameterMappings ?? {}).includes(name) && !isStruct(type) && !def.excludedProperties?.includes(name);
93
+ if ("interfaceType" in def) {
94
+ return Object.keys(getFlattenedInterfaceProperties(def.interfaceType)).includes(name) && !Object.keys(def.nonParameterMappings ?? {}).includes(name) && !isStruct(type) && !def.excludedProperties?.includes(name);
95
+ }
96
+ return Object.keys(def.objectType.properties ?? {}).includes(name) && !Object.keys(def.nonParameterMappings ?? {}).includes(name) && !isStruct(type) && !def.excludedProperties?.includes(name);
93
97
  }
94
98
  export function createParameters(def, propertyMap, parameterSet, requiredMap) {
95
99
  const targetParams = getTargetParameters(def, parameterSet);
96
- return [...targetParams, ...Array.from(parameterSet).map(id => ({
97
- id,
98
- displayName: def.parameterConfiguration?.[id]?.displayName ?? propertyMap[id]?.displayName ?? uppercaseFirstLetter(id),
99
- type: def.parameterConfiguration?.[id]?.customParameterType ?? extractActionParameterType(propertyMap[id]),
100
- validation: def.parameterConfiguration?.[id] !== undefined ? {
101
- ...def.parameterConfiguration?.[id],
102
- allowedValues: def.parameterConfiguration?.[id].allowedValues ?? (def.parameterConfiguration?.[id].customParameterType ? extractAllowedValuesFromActionParameterType(def.parameterConfiguration?.[id].customParameterType) : extractAllowedValuesFromPropertyType(propertyMap[id]?.type)),
103
- required: def.parameterConfiguration?.[id].required ?? propertyMap[id]?.nullability?.noNulls ?? false
104
- } : {
105
- required: propertyMap[id]?.array ?? false ? {
106
- listLength: propertyMap[id]?.nullability?.noEmptyCollections ? {
107
- min: 1
108
- } : {}
109
- } : requiredMap?.[id] ?? propertyMap[id]?.nullability?.noNulls ?? false,
110
- allowedValues: extractAllowedValuesFromPropertyType(propertyMap[id]?.type)
111
- },
112
- defaultValue: def.parameterConfiguration?.[id]?.defaultValue,
113
- description: def.parameterConfiguration?.[id]?.description
114
- }))];
100
+ return [...targetParams, ...Array.from(parameterSet).map(id => {
101
+ let propertyMetadata = undefined;
102
+ if (id in propertyMap) {
103
+ propertyMetadata = "sharedPropertyType" in propertyMap[id] ? propertyMap[id].sharedPropertyType : propertyMap[id];
104
+ }
105
+ return {
106
+ id,
107
+ displayName: def.parameterConfiguration?.[id]?.displayName ?? propertyMetadata?.displayName ?? uppercaseFirstLetter(id),
108
+ type: def.parameterConfiguration?.[id]?.customParameterType ?? extractActionParameterType(propertyMetadata),
109
+ validation: def.parameterConfiguration?.[id] !== undefined ? {
110
+ ...def.parameterConfiguration?.[id],
111
+ allowedValues: def.parameterConfiguration?.[id].allowedValues ?? (def.parameterConfiguration?.[id].customParameterType ? extractAllowedValuesFromActionParameterType(def.parameterConfiguration?.[id].customParameterType) : extractAllowedValuesFromPropertyType(propertyMetadata.type)),
112
+ required: def.parameterConfiguration?.[id].required ?? propertyMetadata?.nullability?.noNulls ?? false
113
+ } : {
114
+ required: propertyMetadata.array ?? false ? {
115
+ listLength: propertyMetadata.nullability?.noEmptyCollections ? {
116
+ min: 1
117
+ } : {}
118
+ } : requiredMap?.[id] ?? propertyMetadata?.nullability?.noNulls ?? false,
119
+ allowedValues: extractAllowedValuesFromPropertyType(propertyMetadata?.type)
120
+ },
121
+ defaultValue: def.parameterConfiguration?.[id]?.defaultValue,
122
+ description: def.parameterConfiguration?.[id]?.description,
123
+ renderHint: def.parameterConfiguration?.[id]?.renderHint
124
+ };
125
+ })];
115
126
  }
116
127
  function getTargetParameters(def, parameterSet) {
117
128
  const targetParams = [];
@@ -675,7 +686,7 @@ export function validateActionParameters(def, properties, name) {
675
686
  !(properties.includes(id) || properties.includes(addNamespaceIfNone(id)) || def.parameterConfiguration?.[id].customParameterType !== undefined || isTargetParameter(id)) ? process.env.NODE_ENV !== "production" ? invariant(false, `Parameter ${id} does not exist as a property on ${name} and its type is not explicitly defined`) : invariant(false) : void 0;
676
687
  });
677
688
  [...Object.keys(def.nonParameterMappings ?? {}), ...(def.excludedProperties ?? [])].forEach(id => {
678
- !(properties.includes(id) || properties.includes(addNamespaceIfNone(id))) ? process.env.NODE_ENV !== "production" ? invariant(false, `Property ${id} does not exist as a property on ${name}`) : invariant(false) : void 0;
689
+ !(properties.includes(id) || properties.includes(addNamespaceIfNone(id)) || properties.includes(withoutNamespace(id))) ? process.env.NODE_ENV !== "production" ? invariant(false, `Property ${id} does not exist as a property on ${name}`) : invariant(false) : void 0;
679
690
  });
680
691
  }
681
692
 
@@ -713,4 +724,36 @@ export function getInterfaceParameterName(def, parameter) {
713
724
  export function getNonNamespacedParameterName(def, parameter) {
714
725
  return def.conflictingParameterOverrides?.[parameter] ?? (parameter.split(".").pop() || parameter);
715
726
  }
727
+ export function createInterfacePropertyLogicRuleValue(id, def, actionDef) {
728
+ const type = getInterfacePropertyTypeType(def);
729
+ const array = isInterfaceSharedPropertyType(def) ? def.sharedPropertyType.array : def.array;
730
+ const parameterId = actionDef.useNonNamespacedParameters ? getNonNamespacedParameterName(actionDef, id) : id;
731
+ if (isStruct(type)) {
732
+ return {
733
+ type: "structLogicRuleValue",
734
+ structLogicRuleValue: Object.fromEntries(Object.entries(type.structDefinition).map(([apiName, fieldValue]) => {
735
+ return [apiName, array ? {
736
+ type: "structListParameterFieldValue",
737
+ structListParameterFieldValue: {
738
+ parameterId: parameterId,
739
+ structFieldApiName: apiName
740
+ }
741
+ } : {
742
+ type: "structParameterFieldValue",
743
+ structParameterFieldValue: {
744
+ parameterId: parameterId,
745
+ structFieldApiName: apiName
746
+ }
747
+ }];
748
+ }))
749
+ };
750
+ }
751
+ return {
752
+ type: "logicRuleValue",
753
+ logicRuleValue: {
754
+ type: "parameterId",
755
+ parameterId: parameterId
756
+ }
757
+ };
758
+ }
716
759
  //# sourceMappingURL=defineAction.js.map