@osdk/maker 0.12.0-beta.9 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +172 -0
- package/README.md +1 -1
- package/build/browser/api/defineAction.js +373 -89
- package/build/browser/api/defineAction.js.map +1 -1
- package/build/browser/api/defineOntology.js +78 -33
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/defineSpt.js.map +1 -1
- package/build/browser/api/ontologyUtils.js +80 -0
- package/build/browser/api/ontologyUtils.js.map +1 -1
- package/build/browser/api/overall.test.js +4289 -2577
- package/build/browser/api/overall.test.js.map +1 -1
- package/build/browser/api/types.js +2 -0
- package/build/browser/api/types.js.map +1 -1
- package/build/browser/cli/main.js +2 -10
- package/build/browser/cli/main.js.map +1 -1
- package/build/browser/index.js +5 -4
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +537 -131
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +78 -9
- package/build/esm/api/defineAction.js +373 -89
- package/build/esm/api/defineAction.js.map +1 -1
- package/build/esm/api/defineOntology.js +78 -33
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/defineSpt.js.map +1 -1
- package/build/esm/api/ontologyUtils.js +80 -0
- package/build/esm/api/ontologyUtils.js.map +1 -1
- package/build/esm/api/overall.test.js +4289 -2577
- package/build/esm/api/overall.test.js.map +1 -1
- package/build/esm/api/types.js +2 -0
- package/build/esm/api/types.js.map +1 -1
- package/build/esm/cli/main.js +2 -10
- package/build/esm/cli/main.js.map +1 -1
- package/build/esm/index.js +5 -4
- package/build/esm/index.js.map +1 -1
- package/build/types/api/defineAction.d.ts +1 -0
- package/build/types/api/defineAction.d.ts.map +1 -1
- package/build/types/api/defineOntology.d.ts +3 -2
- package/build/types/api/defineOntology.d.ts.map +1 -1
- package/build/types/api/defineSpt.d.ts +2 -2
- package/build/types/api/defineSpt.d.ts.map +1 -1
- package/build/types/api/ontologyUtils.d.ts +5 -2
- package/build/types/api/ontologyUtils.d.ts.map +1 -1
- package/build/types/api/types.d.ts +69 -7
- package/build/types/api/types.d.ts.map +1 -1
- package/build/types/cli/main.d.ts.map +1 -1
- package/build/types/index.d.ts +6 -5
- package/build/types/index.d.ts.map +1 -1
- package/package.json +6 -6
package/build/cjs/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionTypeApiName, ParameterId, OntologyIrBaseParameterType_decimal, OntologyIrBaseParameterType_decimalList, OntologyIrBaseParameterType_timestamp, OntologyIrBaseParameterType_timestampList, OntologyIrBaseParameterType_objectReference, OntologyIrBaseParameterType_objectReferenceList, OntologyIrBaseParameterType_objectSetRid, OntologyIrBaseParameterType_objectTypeReference, OntologyIrBaseParameterType_interfaceReference, OntologyIrBaseParameterType_interfaceReferenceList, OntologyIrBaseParameterType_struct, OntologyIrBaseParameterType_structList, OntologyIrLabelledValue, OntologyIrConditionValue, OntologyIrParameterDateRangeValue, InterfaceTypeApiName, OntologyIrCondition, OntologyIrLogicRule, SectionId, ActionTypeStatus_deprecated, OntologyIrActionTypeEntities, OntologyIrFormContent, OntologyIrValidationRule, OntologyIrMarketplaceInterfaceType, StructFieldType,
|
|
1
|
+
import { ActionTypeApiName, ParameterId, OntologyIrBaseParameterType_decimal, OntologyIrBaseParameterType_decimalList, OntologyIrBaseParameterType_timestamp, OntologyIrBaseParameterType_timestampList, OntologyIrBaseParameterType_objectReference, OntologyIrBaseParameterType_objectReferenceList, OntologyIrBaseParameterType_objectSetRid, OntologyIrBaseParameterType_objectTypeReference, OntologyIrBaseParameterType_interfaceReference, OntologyIrBaseParameterType_interfaceReferenceList, OntologyIrBaseParameterType_struct, OntologyIrBaseParameterType_structList, OntologyIrLabelledValue, OntologyIrConditionValue, OntologyIrParameterDateRangeValue, InterfaceTypeApiName, OntologyIrCondition, OntologyIrParameterPrefill, OntologyIrLogicRule, SectionId, ActionTypeStatus_deprecated, OntologyIrActionTypeEntities, OntologyIrFormContent, OntologyIrValidationRule, DisplayMetadataConfigurationDefaultLayout, DisplayMetadataConfigurationDisplayAndFormat, ButtonDisplayMetadata, OntologyIrMarketplaceInterfaceType, StructFieldType, ValueTypeApiNameReference, Visibility, SharedPropertyTypeGothamMapping, InterfaceTypeStatus, OntologyIrPropertyType, ValueTypeApiName, ValueTypeDisplayMetadata, ValueTypeStatus, ValueTypeVersion, BaseType, ValueTypeDataConstraint, ExampleValue, ValidationRuleDisplayMetadata, OntologyIrLogicRuleValue_parameterId, OntologyIrLogicRuleValue_staticValue, OntologyIrLogicRuleValue_objectParameterPropertyValue, OntologyIrLogicRuleValue_interfaceParameterPropertyValue, OntologyIrLogicRuleValue_synchronousWebhookOutput, LinkTypeMetadata, OntologyIrLinkTypeStatus, DataConstraint, FailureMessage, OntologyIrObjectType, OntologyIr, OntologyIrValueTypeBlockData, OntologyIrType } from '@osdk/client.unstable';
|
|
2
2
|
|
|
3
3
|
declare function main(args?: string[]): Promise<void>;
|
|
4
4
|
|
|
@@ -27,10 +27,20 @@ type ActionTypeUserDefinition = {
|
|
|
27
27
|
apiName?: string;
|
|
28
28
|
displayName?: string;
|
|
29
29
|
status?: ActionStatus;
|
|
30
|
-
|
|
30
|
+
parameterConfiguration?: Record<string, ActionParameterConfiguration>;
|
|
31
|
+
nonParameterMappings?: Record<string, MappingValue>;
|
|
31
32
|
actionLevelValidation?: ActionLevelValidationDefinition;
|
|
32
33
|
excludedProperties?: Array<ParameterId>;
|
|
34
|
+
sections?: Array<ActionSection>;
|
|
35
|
+
defaultFormat?: DisplayMetadataConfigurationDefaultLayout;
|
|
36
|
+
enableLayoutSwitch?: boolean;
|
|
37
|
+
displayAndFormat?: DisplayMetadataConfigurationDisplayAndFormat;
|
|
38
|
+
parameterOrdering?: Array<string>;
|
|
39
|
+
submissionMetadata?: SubmissionMetadata;
|
|
40
|
+
primaryKeyOption?: "autoGenerated" | "userInput";
|
|
33
41
|
};
|
|
42
|
+
declare const MODIFY_OBJECT_PARAMETER: string;
|
|
43
|
+
declare const CREATE_OR_MODIFY_OBJECT_PARAMETER: string;
|
|
34
44
|
interface ActionParameter {
|
|
35
45
|
id: ParameterId;
|
|
36
46
|
displayName: string;
|
|
@@ -38,19 +48,55 @@ interface ActionParameter {
|
|
|
38
48
|
validation: ActionParameterValidation;
|
|
39
49
|
description?: string;
|
|
40
50
|
typeClasses?: Array<TypeClass>;
|
|
51
|
+
defaultValue?: OntologyIrParameterPrefill;
|
|
41
52
|
}
|
|
42
|
-
|
|
53
|
+
type ActionParameterValidation = Omit<ActionParameterConfiguration, "displayName" | "defaultValue">;
|
|
54
|
+
interface ActionParameterConfiguration {
|
|
43
55
|
allowedValues?: ActionParameterAllowedValues;
|
|
44
56
|
required?: ActionParameterRequirementConstraint;
|
|
45
57
|
defaultVisibility?: "editable" | "disabled" | "hidden";
|
|
46
58
|
conditionalOverrides?: Array<ActionParameterConditionalOverride>;
|
|
59
|
+
defaultValue?: OntologyIrParameterPrefill;
|
|
60
|
+
displayName?: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
customParameterType?: ActionParameterType;
|
|
47
63
|
}
|
|
64
|
+
type ActionSection = {
|
|
65
|
+
id: string;
|
|
66
|
+
displayName: string;
|
|
67
|
+
parameters: Array<string>;
|
|
68
|
+
defaultVisibility?: "visible" | "hidden";
|
|
69
|
+
description?: string;
|
|
70
|
+
columnCount?: 1 | 2;
|
|
71
|
+
showTitleBar?: boolean;
|
|
72
|
+
collapsedByDefault?: boolean;
|
|
73
|
+
style?: "box" | "minimal";
|
|
74
|
+
conditionalOverrides?: Array<SectionConditionalOverride>;
|
|
75
|
+
};
|
|
76
|
+
type SubmissionMetadata = {
|
|
77
|
+
submitButtonDisplayMetadata?: ButtonDisplayMetadata;
|
|
78
|
+
successMessage: string;
|
|
79
|
+
undoButtonConfiguration?: boolean;
|
|
80
|
+
};
|
|
81
|
+
type MappingValue = CustomMapping | UuidMappingValue | CurrentTimeMappingValue | CurrentUserMappingValue;
|
|
82
|
+
type UuidMappingValue = {
|
|
83
|
+
type: "uuid";
|
|
84
|
+
linkId?: string;
|
|
85
|
+
};
|
|
86
|
+
type CurrentTimeMappingValue = {
|
|
87
|
+
type: "currentTime";
|
|
88
|
+
};
|
|
89
|
+
type CurrentUserMappingValue = {
|
|
90
|
+
type: "currentUser";
|
|
91
|
+
};
|
|
92
|
+
type CustomMapping = OntologyIrLogicRuleValue_parameterId | OntologyIrLogicRuleValue_staticValue | OntologyIrLogicRuleValue_objectParameterPropertyValue | OntologyIrLogicRuleValue_interfaceParameterPropertyValue | OntologyIrLogicRuleValue_synchronousWebhookOutput;
|
|
48
93
|
type ConditionDefinition = UnionCondition | OntologyIrCondition | GroupValidationRule | ParameterValidationRule;
|
|
49
94
|
type UnionCondition = {
|
|
50
95
|
type: "and" | "or";
|
|
51
96
|
conditions: Array<ConditionDefinition>;
|
|
52
97
|
};
|
|
53
|
-
type ActionParameterConditionalOverride = VisibilityOverride | DisabledOverride | RequiredOverride;
|
|
98
|
+
type ActionParameterConditionalOverride = VisibilityOverride | DisabledOverride | RequiredOverride | DefaultValueOverride | ConstraintOverride;
|
|
99
|
+
type SectionConditionalOverride = VisibilityOverride;
|
|
54
100
|
type VisibilityOverride = {
|
|
55
101
|
type: "visibility";
|
|
56
102
|
condition: ConditionDefinition;
|
|
@@ -63,6 +109,16 @@ type RequiredOverride = {
|
|
|
63
109
|
type: "required";
|
|
64
110
|
condition: ConditionDefinition;
|
|
65
111
|
};
|
|
112
|
+
type DefaultValueOverride = {
|
|
113
|
+
type: "defaultValue";
|
|
114
|
+
condition: ConditionDefinition;
|
|
115
|
+
defaultValue: OntologyIrParameterPrefill;
|
|
116
|
+
};
|
|
117
|
+
type ConstraintOverride = {
|
|
118
|
+
type: "constraint";
|
|
119
|
+
condition: ConditionDefinition;
|
|
120
|
+
constraint: ActionParameterAllowedValues;
|
|
121
|
+
};
|
|
66
122
|
type ActionParameterRequirementConstraint = boolean | {
|
|
67
123
|
listLength: {
|
|
68
124
|
min?: number;
|
|
@@ -72,6 +128,7 @@ type ActionParameterRequirementConstraint = boolean | {
|
|
|
72
128
|
type ActionParameterAllowedValues = {
|
|
73
129
|
type: "oneOf";
|
|
74
130
|
oneOf: Array<OntologyIrLabelledValue>;
|
|
131
|
+
otherValueAllowed?: boolean;
|
|
75
132
|
} | {
|
|
76
133
|
type: "range";
|
|
77
134
|
min?: OntologyIrConditionValue;
|
|
@@ -127,12 +184,17 @@ interface ActionTypeInner {
|
|
|
127
184
|
};
|
|
128
185
|
parameters: Array<ActionParameter>;
|
|
129
186
|
rules: Array<OntologyIrLogicRule>;
|
|
130
|
-
sections: Record<SectionId,
|
|
187
|
+
sections: Record<SectionId, ActionSection>;
|
|
131
188
|
status: ActionStatus;
|
|
132
189
|
entities: OntologyIrActionTypeEntities;
|
|
190
|
+
parameterOrdering: Array<string>;
|
|
133
191
|
formContentOrdering: Array<OntologyIrFormContent>;
|
|
134
192
|
validation: Array<OntologyIrValidationRule>;
|
|
135
193
|
typeClasses: Array<TypeClass>;
|
|
194
|
+
defaultFormat: DisplayMetadataConfigurationDefaultLayout;
|
|
195
|
+
enableLayoutSwitch: boolean;
|
|
196
|
+
displayAndFormat: DisplayMetadataConfigurationDisplayAndFormat;
|
|
197
|
+
submissionMetadata: SubmissionMetadata;
|
|
136
198
|
}
|
|
137
199
|
type ActionLevelValidationDefinition = {
|
|
138
200
|
condition: ConditionDefinition;
|
|
@@ -231,7 +293,7 @@ interface PropertyType {
|
|
|
231
293
|
array?: boolean;
|
|
232
294
|
description?: string;
|
|
233
295
|
displayName?: string;
|
|
234
|
-
valueType?:
|
|
296
|
+
valueType?: ValueTypeApiNameReference;
|
|
235
297
|
visibility?: Visibility;
|
|
236
298
|
typeClasses?: TypeClass[];
|
|
237
299
|
nullability?: Nullability;
|
|
@@ -538,7 +600,7 @@ interface ObjectTypeDatasourceDefinition_restrictedView {
|
|
|
538
600
|
type: "restrictedView";
|
|
539
601
|
}
|
|
540
602
|
type ObjectTypeDatasourceDefinition = ObjectTypeDatasourceDefinition_stream | ObjectTypeDatasourceDefinition_dataset | ObjectTypeDatasourceDefinition_restrictedView;
|
|
541
|
-
type ActionParameterTypePrimitive = "boolean" | "booleanList" | "integer" | "integerList" | "long" | "longList" | "double" | "doubleList" | "string" | "stringList" | "decimal" | "decimalList" | "timestamp" | "timestampList" | "geohash" | "geohashList" | "geoshape" | "geoshapeList" | "timeSeriesReference" | "date" | "dateList" | "objectTypeReference" | "
|
|
603
|
+
type ActionParameterTypePrimitive = "boolean" | "booleanList" | "integer" | "integerList" | "long" | "longList" | "double" | "doubleList" | "string" | "stringList" | "decimal" | "decimalList" | "timestamp" | "timestampList" | "geohash" | "geohashList" | "geoshape" | "geoshapeList" | "timeSeriesReference" | "date" | "dateList" | "objectTypeReference" | "attachment" | "attachmentList" | "marking" | "markingList" | "mediaReference" | "mediaReferenceList" | "geotimeSeriesReference" | "geotimeSeriesReferenceList";
|
|
542
604
|
type ActionParameterTypeComplex = OntologyIrBaseParameterType_decimal | OntologyIrBaseParameterType_decimalList | OntologyIrBaseParameterType_timestamp | OntologyIrBaseParameterType_timestampList | OntologyIrBaseParameterType_objectReference | OntologyIrBaseParameterType_objectReferenceList | OntologyIrBaseParameterType_objectSetRid | OntologyIrBaseParameterType_objectTypeReference | OntologyIrBaseParameterType_objectReference | OntologyIrBaseParameterType_interfaceReference | OntologyIrBaseParameterType_interfaceReferenceList | OntologyIrBaseParameterType_struct | OntologyIrBaseParameterType_structList;
|
|
543
605
|
type ActionParameterType = ActionParameterTypePrimitive | ActionParameterTypeComplex;
|
|
544
606
|
|
|
@@ -547,6 +609,7 @@ declare function defineCreateObjectAction(def: ActionTypeUserDefinition): Action
|
|
|
547
609
|
declare function defineModifyInterfaceObjectAction(interfaceType: InterfaceType, objectType?: ObjectTypeDefinition, validation?: ActionLevelValidationDefinition): ActionType;
|
|
548
610
|
declare function defineModifyObjectAction(def: ActionTypeUserDefinition): ActionType;
|
|
549
611
|
declare function defineDeleteObjectAction(def: ActionTypeUserDefinition): ActionType;
|
|
612
|
+
declare function defineCreateOrModifyObjectAction(def: ActionTypeUserDefinition): ActionType;
|
|
550
613
|
declare function defineAction(actionDef: ActionTypeDefinition): ActionType;
|
|
551
614
|
|
|
552
615
|
/**
|
|
@@ -612,12 +675,16 @@ declare function defineInterfaceLinkConstraint(linkDef: One | Many): void;
|
|
|
612
675
|
declare function defineLink(linkDefinition: LinkTypeDefinition): LinkType;
|
|
613
676
|
|
|
614
677
|
declare function defineObject(objectDef: ObjectTypeDefinition): ObjectTypeDefinition;
|
|
678
|
+
declare function convertToDisplayName(s: string | undefined | null): string;
|
|
679
|
+
declare function convertToPluralDisplayName(s: string | undefined | null): string;
|
|
615
680
|
|
|
616
681
|
type OntologyAndValueTypeIrs = {
|
|
617
682
|
ontology: OntologyIr;
|
|
618
683
|
valueType: OntologyIrValueTypeBlockData;
|
|
619
684
|
};
|
|
620
685
|
declare function defineOntology(ns: string, body: () => void | Promise<void>, outputDir: string | undefined, dependencyFile?: string): Promise<OntologyAndValueTypeIrs>;
|
|
686
|
+
declare function dumpOntologyFullMetadata(): OntologyIr;
|
|
687
|
+
declare function addNamespaceIfNone(apiName: string): string;
|
|
621
688
|
|
|
622
689
|
interface SharedPropertyTypeDefinition {
|
|
623
690
|
apiName: string;
|
|
@@ -625,7 +692,7 @@ interface SharedPropertyTypeDefinition {
|
|
|
625
692
|
array?: boolean;
|
|
626
693
|
description?: string;
|
|
627
694
|
displayName?: string;
|
|
628
|
-
valueType?:
|
|
695
|
+
valueType?: ValueTypeApiNameReference;
|
|
629
696
|
visibility?: Visibility;
|
|
630
697
|
typeClasses?: SharedPropertyType["typeClasses"];
|
|
631
698
|
gothamMapping?: SharedPropertyTypeGothamMapping;
|
|
@@ -650,6 +717,8 @@ declare function defineValueType(valueTypeDef: ValueTypeDefinition): ValueTypeDe
|
|
|
650
717
|
|
|
651
718
|
declare function importOntologyEntity<T extends OntologyEntityBase>(e: T): void;
|
|
652
719
|
|
|
720
|
+
declare function convertType(type: PropertyTypeType): OntologyIrType;
|
|
721
|
+
|
|
653
722
|
/**
|
|
654
723
|
* Wraps an OntologyEntityType with a Proxy that calls importOntologyEntity when properties are accessed.
|
|
655
724
|
*
|
|
@@ -658,4 +727,4 @@ declare function importOntologyEntity<T extends OntologyEntityBase>(e: T): void;
|
|
|
658
727
|
*/
|
|
659
728
|
declare function wrapWithProxy<T extends OntologyEntityBase>(entity: T): T;
|
|
660
729
|
|
|
661
|
-
export { type ActionParameterConditionalOverride, type ActionParameterValidation, type ActionType, type ConditionDefinition, type InterfaceType, type LinkType, type ObjectType, OntologyEntityTypeEnum, type SharedPropertyType, type ValueTypeDefinitionVersion, addDependency, main as default, defineAction, defineCreateInterfaceObjectAction, defineCreateObjectAction, defineDeleteObjectAction, defineInterface, defineInterfaceLinkConstraint, defineLink, defineModifyInterfaceObjectAction, defineModifyObjectAction, defineObject, defineOntology, defineSharedPropertyType, defineValueType, importOntologyEntity, importSharedPropertyType, wrapWithProxy };
|
|
730
|
+
export { type ActionParameterAllowedValues, type ActionParameterConditionalOverride, type ActionParameterConfiguration, type ActionParameterValidation, type ActionSection, type ActionType, CREATE_OR_MODIFY_OBJECT_PARAMETER, type ConditionDefinition, type CurrentTimeMappingValue, type CurrentUserMappingValue, type CustomMapping, type InterfaceType, type LinkType, MODIFY_OBJECT_PARAMETER, type MappingValue, type ObjectPropertyType, type ObjectType, OntologyEntityTypeEnum, type PropertyTypeType, type SectionConditionalOverride, type SharedPropertyType, type SubmissionMetadata, type UuidMappingValue, type ValueTypeDefinitionVersion, addDependency, addNamespaceIfNone, convertToDisplayName, convertToPluralDisplayName, convertType, main as default, defineAction, defineCreateInterfaceObjectAction, defineCreateObjectAction, defineCreateOrModifyObjectAction, defineDeleteObjectAction, defineInterface, defineInterfaceLinkConstraint, defineLink, defineModifyInterfaceObjectAction, defineModifyObjectAction, defineObject, defineOntology, defineSharedPropertyType, defineValueType, dumpOntologyFullMetadata, importOntologyEntity, importSharedPropertyType, wrapWithProxy };
|