@osdk/maker 0.15.0-beta.6 → 0.15.0-beta.8
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 +22 -0
- package/README.md +26 -22
- package/build/browser/api/action/ActionParameter.js.map +1 -1
- package/build/browser/api/action/ActionParameterConfiguration.js.map +1 -1
- package/build/browser/api/defineAction.js +65 -22
- package/build/browser/api/defineAction.js.map +1 -1
- package/build/browser/api/defineCreateInterfaceObjectAction.js +28 -8
- package/build/browser/api/defineCreateInterfaceObjectAction.js.map +1 -1
- package/build/browser/api/defineInterface.js +40 -34
- package/build/browser/api/defineInterface.js.map +1 -1
- package/build/browser/api/defineModifyInterfaceObjectAction.js +31 -8
- package/build/browser/api/defineModifyInterfaceObjectAction.js.map +1 -1
- package/build/browser/api/defineObject.js +13 -9
- package/build/browser/api/defineObject.js.map +1 -1
- package/build/browser/api/defineOntology.js +6 -0
- package/build/browser/api/defineOntology.js.map +1 -1
- package/build/browser/api/defineSpt.js.map +1 -1
- package/build/browser/api/defineValueType.js +17 -4
- package/build/browser/api/defineValueType.js.map +1 -1
- package/build/browser/api/interface/InterfacePropertyType.js +22 -1
- package/build/browser/api/interface/InterfacePropertyType.js.map +1 -1
- package/build/browser/api/interface/InterfaceType.js.map +1 -1
- package/build/browser/api/interface/getFlattenedInterfaceProperties.js +9 -3
- package/build/browser/api/interface/getFlattenedInterfaceProperties.js.map +1 -1
- package/build/browser/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js +5 -0
- package/build/browser/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js.map +1 -1
- package/build/browser/api/links/LinkType.js.map +1 -1
- package/build/browser/api/object/ObjectType.js.map +1 -1
- package/build/browser/api/object/ObjectTypeDefinition.js.map +1 -1
- package/build/browser/api/object/ObjectTypeStatus.js.map +1 -1
- package/build/browser/api/properties/PropertyTypeType.js +1 -1
- package/build/browser/api/properties/PropertyTypeType.js.map +1 -1
- package/build/browser/api/properties/SharedPropertyType.js.map +1 -1
- package/build/browser/api/test/actions.test.js +6105 -5850
- package/build/browser/api/test/actions.test.js.map +1 -1
- package/build/browser/api/test/interfaces.test.js +757 -492
- package/build/browser/api/test/interfaces.test.js.map +1 -1
- package/build/browser/api/test/links.test.js +1334 -1325
- package/build/browser/api/test/links.test.js.map +1 -1
- package/build/browser/api/test/misc.test.js +262 -11
- package/build/browser/api/test/misc.test.js.map +1 -1
- package/build/browser/api/test/objects.test.js +1019 -960
- package/build/browser/api/test/objects.test.js.map +1 -1
- package/build/browser/api/test/spt.test.js +250 -103
- package/build/browser/api/test/spt.test.js.map +1 -1
- package/build/browser/api/test/valueTypes.test.js +69 -0
- package/build/browser/api/test/valueTypes.test.js.map +1 -1
- package/build/browser/cli/main.js +1 -1
- package/build/browser/conversion/toMarketplace/convertActionValidation.js +1 -1
- package/build/browser/conversion/toMarketplace/convertActionValidation.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertInterface.js +2 -2
- package/build/browser/conversion/toMarketplace/convertInterface.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertInterfacePropertyType.js +66 -0
- package/build/browser/conversion/toMarketplace/convertInterfacePropertyType.js.map +1 -0
- package/build/browser/conversion/toMarketplace/convertLink.js +30 -4
- package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertMappingValue.js +35 -0
- package/build/browser/conversion/toMarketplace/convertMappingValue.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertObject.js +4 -2
- package/build/browser/conversion/toMarketplace/convertObject.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js +2 -1
- package/build/browser/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertSpt.js +4 -2
- package/build/browser/conversion/toMarketplace/convertSpt.js.map +1 -1
- package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js +143 -0
- package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js.map +1 -0
- package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +4 -0
- package/build/browser/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -1
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +444 -117
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +53 -17
- package/build/esm/api/action/ActionParameter.js.map +1 -1
- package/build/esm/api/action/ActionParameterConfiguration.js.map +1 -1
- package/build/esm/api/defineAction.js +65 -22
- package/build/esm/api/defineAction.js.map +1 -1
- package/build/esm/api/defineCreateInterfaceObjectAction.js +28 -8
- package/build/esm/api/defineCreateInterfaceObjectAction.js.map +1 -1
- package/build/esm/api/defineInterface.js +40 -34
- package/build/esm/api/defineInterface.js.map +1 -1
- package/build/esm/api/defineModifyInterfaceObjectAction.js +31 -8
- package/build/esm/api/defineModifyInterfaceObjectAction.js.map +1 -1
- package/build/esm/api/defineObject.js +13 -9
- package/build/esm/api/defineObject.js.map +1 -1
- package/build/esm/api/defineOntology.js +6 -0
- package/build/esm/api/defineOntology.js.map +1 -1
- package/build/esm/api/defineSpt.js.map +1 -1
- package/build/esm/api/defineValueType.js +17 -4
- package/build/esm/api/defineValueType.js.map +1 -1
- package/build/esm/api/interface/InterfacePropertyType.js +22 -1
- package/build/esm/api/interface/InterfacePropertyType.js.map +1 -1
- package/build/esm/api/interface/InterfaceType.js.map +1 -1
- package/build/esm/api/interface/getFlattenedInterfaceProperties.js +9 -3
- package/build/esm/api/interface/getFlattenedInterfaceProperties.js.map +1 -1
- package/build/esm/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js +5 -0
- package/build/esm/api/interface/mapSimplifiedStatusToInterfaceTypeStatus.js.map +1 -1
- package/build/esm/api/links/LinkType.js.map +1 -1
- package/build/esm/api/object/ObjectType.js.map +1 -1
- package/build/esm/api/object/ObjectTypeDefinition.js.map +1 -1
- package/build/esm/api/object/ObjectTypeStatus.js.map +1 -1
- package/build/esm/api/properties/PropertyTypeType.js +1 -1
- package/build/esm/api/properties/PropertyTypeType.js.map +1 -1
- package/build/esm/api/properties/SharedPropertyType.js.map +1 -1
- package/build/esm/api/test/actions.test.js +6105 -5850
- package/build/esm/api/test/actions.test.js.map +1 -1
- package/build/esm/api/test/interfaces.test.js +757 -492
- package/build/esm/api/test/interfaces.test.js.map +1 -1
- package/build/esm/api/test/links.test.js +1334 -1325
- package/build/esm/api/test/links.test.js.map +1 -1
- package/build/esm/api/test/misc.test.js +262 -11
- package/build/esm/api/test/misc.test.js.map +1 -1
- package/build/esm/api/test/objects.test.js +1019 -960
- package/build/esm/api/test/objects.test.js.map +1 -1
- package/build/esm/api/test/spt.test.js +250 -103
- package/build/esm/api/test/spt.test.js.map +1 -1
- package/build/esm/api/test/valueTypes.test.js +69 -0
- package/build/esm/api/test/valueTypes.test.js.map +1 -1
- package/build/esm/cli/main.js +1 -1
- package/build/esm/conversion/toMarketplace/convertActionValidation.js +1 -1
- package/build/esm/conversion/toMarketplace/convertActionValidation.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertInterface.js +2 -2
- package/build/esm/conversion/toMarketplace/convertInterface.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertInterfacePropertyType.js +66 -0
- package/build/esm/conversion/toMarketplace/convertInterfacePropertyType.js.map +1 -0
- package/build/esm/conversion/toMarketplace/convertLink.js +30 -4
- package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertMappingValue.js +35 -0
- package/build/esm/conversion/toMarketplace/convertMappingValue.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertObject.js +4 -2
- package/build/esm/conversion/toMarketplace/convertObject.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js +2 -1
- package/build/esm/conversion/toMarketplace/convertObjectPropertyType.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertSpt.js +4 -2
- package/build/esm/conversion/toMarketplace/convertSpt.js.map +1 -1
- package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js +143 -0
- package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.js.map +1 -0
- package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js +4 -0
- package/build/esm/conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/types/api/action/ActionParameter.d.ts +2 -1
- package/build/types/api/action/ActionParameter.d.ts.map +1 -1
- package/build/types/api/action/ActionParameterConfiguration.d.ts +2 -1
- package/build/types/api/action/ActionParameterConfiguration.d.ts.map +1 -1
- package/build/types/api/defineAction.d.ts +4 -3
- package/build/types/api/defineAction.d.ts.map +1 -1
- package/build/types/api/defineCreateInterfaceObjectAction.d.ts.map +1 -1
- package/build/types/api/defineInterface.d.ts +7 -5
- package/build/types/api/defineInterface.d.ts.map +1 -1
- package/build/types/api/defineModifyInterfaceObjectAction.d.ts.map +1 -1
- package/build/types/api/defineObject.d.ts.map +1 -1
- package/build/types/api/defineOntology.d.ts.map +1 -1
- package/build/types/api/defineSpt.d.ts +3 -0
- package/build/types/api/defineSpt.d.ts.map +1 -1
- package/build/types/api/defineValueType.d.ts +9 -0
- package/build/types/api/defineValueType.d.ts.map +1 -1
- package/build/types/api/interface/InterfacePropertyType.d.ts +12 -2
- package/build/types/api/interface/InterfacePropertyType.d.ts.map +1 -1
- package/build/types/api/interface/InterfaceType.d.ts +3 -2
- package/build/types/api/interface/InterfaceType.d.ts.map +1 -1
- package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts +1 -1
- package/build/types/api/interface/getFlattenedInterfaceProperties.d.ts.map +1 -1
- package/build/types/api/links/LinkType.d.ts +16 -4
- package/build/types/api/links/LinkType.d.ts.map +1 -1
- package/build/types/api/object/ObjectType.d.ts +1 -0
- package/build/types/api/object/ObjectType.d.ts.map +1 -1
- package/build/types/api/object/ObjectTypeDefinition.d.ts +1 -0
- package/build/types/api/object/ObjectTypeDefinition.d.ts.map +1 -1
- package/build/types/api/object/ObjectTypeStatus.d.ts +1 -1
- package/build/types/api/object/ObjectTypeStatus.d.ts.map +1 -1
- package/build/types/api/properties/PropertyTypeType.d.ts +1 -0
- package/build/types/api/properties/PropertyTypeType.d.ts.map +1 -1
- package/build/types/api/properties/SharedPropertyType.d.ts +1 -0
- package/build/types/api/properties/SharedPropertyType.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertInterface.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertInterfacePropertyType.d.ts +3 -0
- package/build/types/conversion/toMarketplace/convertInterfacePropertyType.d.ts.map +1 -0
- package/build/types/conversion/toMarketplace/convertLink.d.ts +3 -2
- package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertMappingValue.d.ts +2 -1
- package/build/types/conversion/toMarketplace/convertMappingValue.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertObject.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertSpt.d.ts +1 -1
- package/build/types/conversion/toMarketplace/convertSpt.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.d.ts +3 -0
- package/build/types/conversion/toMarketplace/propertyTypeTypeToOntologyIrInterfaceType.d.ts.map +1 -0
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -25,6 +25,7 @@ export function convertSpt({
|
|
|
25
25
|
visibility,
|
|
26
26
|
gothamMapping,
|
|
27
27
|
typeClasses,
|
|
28
|
+
aliases,
|
|
28
29
|
valueType,
|
|
29
30
|
nullability,
|
|
30
31
|
baseFormatter
|
|
@@ -43,10 +44,11 @@ export function convertSpt({
|
|
|
43
44
|
type: array ? {
|
|
44
45
|
type: "array",
|
|
45
46
|
array: {
|
|
46
|
-
subtype: propertyTypeTypeToOntologyIrType(type)
|
|
47
|
+
subtype: propertyTypeTypeToOntologyIrType(type),
|
|
48
|
+
reducers: []
|
|
47
49
|
}
|
|
48
50
|
} : propertyTypeTypeToOntologyIrType(type),
|
|
49
|
-
aliases: [],
|
|
51
|
+
aliases: aliases ?? [],
|
|
50
52
|
baseFormatter,
|
|
51
53
|
dataConstraints: dataConstraint,
|
|
52
54
|
gothamMapping: gothamMapping,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertSpt.js","names":["convertNullabilityToDataConstraint","propertyTypeTypeToOntologyIrType","convertSpt","type","array","description","apiName","displayName","visibility","gothamMapping","typeClasses","valueType","nullability","baseFormatter","dataConstraint","displayMetadata","subtype","
|
|
1
|
+
{"version":3,"file":"convertSpt.js","names":["convertNullabilityToDataConstraint","propertyTypeTypeToOntologyIrType","convertSpt","type","array","description","apiName","displayName","visibility","gothamMapping","typeClasses","aliases","valueType","nullability","baseFormatter","dataConstraint","displayMetadata","subtype","reducers","dataConstraints","indexedForSearch","undefined","version","packageNamespace"],"sources":["convertSpt.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 { OntologyIrSharedPropertyType } from \"@osdk/client.unstable\";\nimport type { SharedPropertyType } from \"../../api/properties/SharedPropertyType.js\";\nimport { convertNullabilityToDataConstraint } from \"./convertNullabilityToDataConstraint.js\";\nimport { propertyTypeTypeToOntologyIrType } from \"./propertyTypeTypeToOntologyIrType.js\";\n\nexport function convertSpt(\n {\n type,\n array,\n description,\n apiName,\n displayName,\n visibility,\n gothamMapping,\n typeClasses,\n aliases,\n valueType,\n nullability,\n baseFormatter,\n }: SharedPropertyType,\n): OntologyIrSharedPropertyType {\n const dataConstraint:\n | OntologyIrSharedPropertyType[\"dataConstraints\"]\n | undefined = convertNullabilityToDataConstraint({ type, nullability });\n return {\n apiName,\n displayMetadata: {\n displayName: displayName ?? apiName,\n visibility: visibility ?? \"NORMAL\",\n description,\n },\n type: array\n ? {\n type: \"array\" as const,\n array: {\n subtype: propertyTypeTypeToOntologyIrType(type),\n reducers: [],\n },\n }\n : propertyTypeTypeToOntologyIrType(type),\n aliases: aliases ?? [],\n baseFormatter,\n dataConstraints: dataConstraint,\n gothamMapping: gothamMapping,\n indexedForSearch: true,\n typeClasses: typeClasses ?? [],\n valueType: valueType === undefined ? undefined : {\n apiName: valueType.apiName,\n version: valueType.version,\n packageNamespace: valueType.packageNamespace,\n displayMetadata: valueType.displayMetadata,\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,kCAAkC,QAAQ,yCAAyC;AAC5F,SAASC,gCAAgC,QAAQ,uCAAuC;AAExF,OAAO,SAASC,UAAUA,CACxB;EACEC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC,OAAO;EACPC,WAAW;EACXC,UAAU;EACVC,aAAa;EACbC,WAAW;EACXC,OAAO;EACPC,SAAS;EACTC,WAAW;EACXC;AACkB,CAAC,EACS;EAC9B,MAAMC,cAEO,GAAGf,kCAAkC,CAAC;IAAEG,IAAI;IAAEU;EAAY,CAAC,CAAC;EACzE,OAAO;IACLP,OAAO;IACPU,eAAe,EAAE;MACfT,WAAW,EAAEA,WAAW,IAAID,OAAO;MACnCE,UAAU,EAAEA,UAAU,IAAI,QAAQ;MAClCH;IACF,CAAC;IACDF,IAAI,EAAEC,KAAK,GACP;MACAD,IAAI,EAAE,OAAgB;MACtBC,KAAK,EAAE;QACLa,OAAO,EAAEhB,gCAAgC,CAACE,IAAI,CAAC;QAC/Ce,QAAQ,EAAE;MACZ;IACF,CAAC,GACCjB,gCAAgC,CAACE,IAAI,CAAC;IAC1CQ,OAAO,EAAEA,OAAO,IAAI,EAAE;IACtBG,aAAa;IACbK,eAAe,EAAEJ,cAAc;IAC/BN,aAAa,EAAEA,aAAa;IAC5BW,gBAAgB,EAAE,IAAI;IACtBV,WAAW,EAAEA,WAAW,IAAI,EAAE;IAC9BE,SAAS,EAAEA,SAAS,KAAKS,SAAS,GAAGA,SAAS,GAAG;MAC/Cf,OAAO,EAAEM,SAAS,CAACN,OAAO;MAC1BgB,OAAO,EAAEV,SAAS,CAACU,OAAO;MAC1BC,gBAAgB,EAAEX,SAAS,CAACW,gBAAgB;MAC5CP,eAAe,EAAEJ,SAAS,CAACI;IAC7B;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 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
|
+
import { distributeTypeHelper } from "../toConjure/distributeTypeHelper.js";
|
|
18
|
+
export function propertyTypeTypeToOntologyIrInterfaceType(type) {
|
|
19
|
+
switch (true) {
|
|
20
|
+
case typeof type === "object" && type.type === "marking":
|
|
21
|
+
return {
|
|
22
|
+
"type": "marking",
|
|
23
|
+
marking: {
|
|
24
|
+
markingType: type.markingType
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
case typeof type === "object" && type.type === "struct":
|
|
28
|
+
const structFields = new Array();
|
|
29
|
+
for (const key in type.structDefinition) {
|
|
30
|
+
const fieldTypeDefinition = type.structDefinition[key];
|
|
31
|
+
let field;
|
|
32
|
+
if (typeof fieldTypeDefinition === "string") {
|
|
33
|
+
field = {
|
|
34
|
+
apiName: key,
|
|
35
|
+
displayMetadata: {
|
|
36
|
+
displayName: key,
|
|
37
|
+
description: undefined
|
|
38
|
+
},
|
|
39
|
+
typeClasses: [],
|
|
40
|
+
aliases: [],
|
|
41
|
+
fieldType: propertyTypeTypeToOntologyIrInterfaceType(fieldTypeDefinition),
|
|
42
|
+
requireImplementation: true
|
|
43
|
+
};
|
|
44
|
+
} else {
|
|
45
|
+
// If it is a full form type definition then process it as such
|
|
46
|
+
if (typeof fieldTypeDefinition === "object" && "fieldType" in fieldTypeDefinition) {
|
|
47
|
+
field = {
|
|
48
|
+
...fieldTypeDefinition,
|
|
49
|
+
apiName: key,
|
|
50
|
+
fieldType: propertyTypeTypeToOntologyIrInterfaceType(fieldTypeDefinition.fieldType),
|
|
51
|
+
displayMetadata: fieldTypeDefinition.displayMetadata ?? {
|
|
52
|
+
displayName: key,
|
|
53
|
+
description: undefined
|
|
54
|
+
},
|
|
55
|
+
typeClasses: fieldTypeDefinition.typeClasses ?? [],
|
|
56
|
+
aliases: fieldTypeDefinition.aliases ?? [],
|
|
57
|
+
requireImplementation: fieldTypeDefinition.requireImplementation ?? true
|
|
58
|
+
};
|
|
59
|
+
} else {
|
|
60
|
+
field = {
|
|
61
|
+
apiName: key,
|
|
62
|
+
displayMetadata: {
|
|
63
|
+
displayName: key,
|
|
64
|
+
description: undefined
|
|
65
|
+
},
|
|
66
|
+
typeClasses: [],
|
|
67
|
+
aliases: [],
|
|
68
|
+
fieldType: propertyTypeTypeToOntologyIrInterfaceType(fieldTypeDefinition),
|
|
69
|
+
requireImplementation: true
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
structFields.push(field);
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
type: "struct",
|
|
77
|
+
struct: {
|
|
78
|
+
structFields
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
case typeof type === "object" && type.type === "string":
|
|
82
|
+
return {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"string": {
|
|
85
|
+
analyzerOverride: undefined,
|
|
86
|
+
enableAsciiFolding: type.enableAsciiFolding,
|
|
87
|
+
isLongText: type.isLongText ?? false,
|
|
88
|
+
supportsEfficientLeadingWildcard: type.supportsEfficientLeadingWildcard ?? false,
|
|
89
|
+
supportsExactMatching: type.supportsExactMatching ?? true,
|
|
90
|
+
supportsFullTextRegex: type.supportsFullTextRegex
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
case typeof type === "object" && type.type === "decimal":
|
|
94
|
+
return {
|
|
95
|
+
"type": "decimal",
|
|
96
|
+
"decimal": {
|
|
97
|
+
precision: type.precision,
|
|
98
|
+
scale: type.scale
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
case type === "geopoint":
|
|
102
|
+
return {
|
|
103
|
+
type: "geohash",
|
|
104
|
+
geohash: {}
|
|
105
|
+
};
|
|
106
|
+
case type === "decimal":
|
|
107
|
+
return {
|
|
108
|
+
type,
|
|
109
|
+
[type]: {
|
|
110
|
+
precision: undefined,
|
|
111
|
+
scale: undefined
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
case type === "string":
|
|
115
|
+
return {
|
|
116
|
+
type,
|
|
117
|
+
[type]: {
|
|
118
|
+
analyzerOverride: undefined,
|
|
119
|
+
enableAsciiFolding: undefined,
|
|
120
|
+
isLongText: false,
|
|
121
|
+
supportsEfficientLeadingWildcard: false,
|
|
122
|
+
supportsExactMatching: true
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
case type === "mediaReference":
|
|
126
|
+
return {
|
|
127
|
+
type: type,
|
|
128
|
+
mediaReference: {}
|
|
129
|
+
};
|
|
130
|
+
case type === "geotimeSeries":
|
|
131
|
+
return {
|
|
132
|
+
type: "geotimeSeriesReference",
|
|
133
|
+
geotimeSeriesReference: {}
|
|
134
|
+
};
|
|
135
|
+
default:
|
|
136
|
+
// use helper function to distribute `type` properly
|
|
137
|
+
if (typeof type === "object") {
|
|
138
|
+
throw new Error(`Unhandled exotic type: ${JSON.stringify(type)}`);
|
|
139
|
+
}
|
|
140
|
+
return distributeTypeHelper(type);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=propertyTypeTypeToOntologyIrInterfaceType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propertyTypeTypeToOntologyIrInterfaceType.js","names":["distributeTypeHelper","propertyTypeTypeToOntologyIrInterfaceType","type","marking","markingType","structFields","Array","key","structDefinition","fieldTypeDefinition","field","apiName","displayMetadata","displayName","description","undefined","typeClasses","aliases","fieldType","requireImplementation","push","struct","analyzerOverride","enableAsciiFolding","isLongText","supportsEfficientLeadingWildcard","supportsExactMatching","supportsFullTextRegex","precision","scale","geohash","mediaReference","geotimeSeriesReference","Error","JSON","stringify"],"sources":["propertyTypeTypeToOntologyIrInterfaceType.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n OntologyIrInterfacePropertyTypeType,\n OntologyIrInterfaceStructFieldType,\n} from \"@osdk/client.unstable\";\nimport type {\n PropertyTypeType,\n} from \"../../api/properties/PropertyTypeType.js\";\nimport { distributeTypeHelper } from \"../toConjure/distributeTypeHelper.js\";\n\nexport function propertyTypeTypeToOntologyIrInterfaceType(\n type: PropertyTypeType,\n): OntologyIrInterfacePropertyTypeType {\n switch (true) {\n case (typeof type === \"object\" && type.type === \"marking\"):\n return {\n \"type\": \"marking\",\n marking: { markingType: type.markingType },\n };\n\n case (typeof type === \"object\" && type.type === \"struct\"):\n const structFields: Array<OntologyIrInterfaceStructFieldType> =\n new Array();\n for (const key in type.structDefinition) {\n const fieldTypeDefinition = type.structDefinition[key];\n let field: OntologyIrInterfaceStructFieldType;\n if (typeof fieldTypeDefinition === \"string\") {\n field = {\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrInterfaceType(\n fieldTypeDefinition,\n ),\n requireImplementation: true,\n };\n } else {\n // If it is a full form type definition then process it as such\n if (\n typeof fieldTypeDefinition === \"object\"\n && \"fieldType\" in fieldTypeDefinition\n ) {\n field = {\n ...fieldTypeDefinition,\n apiName: key,\n fieldType: propertyTypeTypeToOntologyIrInterfaceType(\n fieldTypeDefinition.fieldType,\n ),\n displayMetadata: fieldTypeDefinition.displayMetadata\n ?? { displayName: key, description: undefined },\n typeClasses: fieldTypeDefinition.typeClasses ?? [],\n aliases: fieldTypeDefinition.aliases ?? [],\n requireImplementation: fieldTypeDefinition.requireImplementation\n ?? true,\n };\n } else {\n field = {\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrInterfaceType(\n fieldTypeDefinition,\n ),\n requireImplementation: true,\n };\n }\n }\n\n structFields.push(field);\n }\n\n return {\n type: \"struct\",\n struct: { structFields },\n };\n\n case (typeof type === \"object\" && type.type === \"string\"):\n return {\n \"type\": \"string\",\n \"string\": {\n analyzerOverride: undefined,\n enableAsciiFolding: type.enableAsciiFolding,\n isLongText: type.isLongText ?? false,\n supportsEfficientLeadingWildcard:\n type.supportsEfficientLeadingWildcard ?? false,\n supportsExactMatching: type.supportsExactMatching ?? true,\n supportsFullTextRegex: type.supportsFullTextRegex,\n },\n };\n\n case (typeof type === \"object\" && type.type === \"decimal\"):\n return {\n \"type\": \"decimal\",\n \"decimal\": {\n precision: type.precision,\n scale: type.scale,\n },\n };\n\n case (type === \"geopoint\"):\n return { type: \"geohash\", geohash: {} };\n\n case (type === \"decimal\"):\n return { type, [type]: { precision: undefined, scale: undefined } };\n\n case (type === \"string\"):\n return {\n type,\n [type]: {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: false,\n supportsEfficientLeadingWildcard: false,\n supportsExactMatching: true,\n },\n };\n\n case (type === \"mediaReference\"):\n return {\n type: type,\n mediaReference: {},\n };\n\n case (type === \"geotimeSeries\"):\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {},\n };\n\n default:\n // use helper function to distribute `type` properly\n if (typeof type === \"object\") {\n throw new Error(`Unhandled exotic type: ${JSON.stringify(type)}`);\n }\n return distributeTypeHelper(type);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,SAASA,oBAAoB,QAAQ,sCAAsC;AAE3E,OAAO,SAASC,yCAAyCA,CACvDC,IAAsB,EACe;EACrC,QAAQ,IAAI;IACV,KAAM,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACA,IAAI,KAAK,SAAS;MACvD,OAAO;QACL,MAAM,EAAE,SAAS;QACjBC,OAAO,EAAE;UAAEC,WAAW,EAAEF,IAAI,CAACE;QAAY;MAC3C,CAAC;IAEH,KAAM,OAAOF,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACA,IAAI,KAAK,QAAQ;MACtD,MAAMG,YAAuD,GAC3D,IAAIC,KAAK,CAAC,CAAC;MACb,KAAK,MAAMC,GAAG,IAAIL,IAAI,CAACM,gBAAgB,EAAE;QACvC,MAAMC,mBAAmB,GAAGP,I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AC7B,OAAO;QACLA,IAAI,EAAEA,IAAI;QACV6B,cAAc,EAAE,CAAC;MACnB,CAAC;IAEH,KAAM7B,IAAI,KAAK,eAAe;MAC5B,OAAO;QACLA,IAAI,EAAE,wBAAwB;QAC9B8B,sBAAsB,EAAE,CAAC;MAC3B,CAAC;IAEH;MACE;MACA,IAAI,OAAO9B,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAI+B,KAAK,CAAC,0BAA0BC,IAAI,CAACC,SAAS,CAACjC,IAAI,CAAC,EAAE,CAAC;MACnE;MACA,OAAOF,oBAAoB,CAACE,IAAI,CAAC;EACrC;AACF","ignoreList":[]}
|
|
@@ -47,6 +47,10 @@ export function propertyTypeTypeToOntologyIrType(type) {
|
|
|
47
47
|
...fieldTypeDefinition,
|
|
48
48
|
apiName: key,
|
|
49
49
|
fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition.fieldType),
|
|
50
|
+
displayMetadata: fieldTypeDefinition.displayMetadata ?? {
|
|
51
|
+
displayName: key,
|
|
52
|
+
description: undefined
|
|
53
|
+
},
|
|
50
54
|
typeClasses: fieldTypeDefinition.typeClasses ?? [],
|
|
51
55
|
aliases: fieldTypeDefinition.aliases ?? []
|
|
52
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propertyTypeTypeToOntologyIrType.js","names":["distributeTypeHelper","propertyTypeTypeToOntologyIrType","type","marking","markingType","structFields","Array","key","structDefinition","fieldTypeDefinition","field","apiName","displayMetadata","displayName","description","undefined","typeClasses","aliases","fieldType","push","struct","analyzerOverride","enableAsciiFolding","isLongText","supportsEfficientLeadingWildcard","supportsExactMatching","supportsFullTextRegex","precision","scale","geohash","mediaReference","geotimeSeriesReference","Error","JSON","stringify"],"sources":["propertyTypeTypeToOntologyIrType.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 OntologyIrStructFieldType,\n OntologyIrType,\n} from \"@osdk/client.unstable\";\nimport type { PropertyTypeType } from \"../../api/properties/PropertyTypeType.js\";\nimport { distributeTypeHelper } from \"../toConjure/distributeTypeHelper.js\";\n\nexport function propertyTypeTypeToOntologyIrType(\n type: PropertyTypeType,\n): OntologyIrType {\n switch (true) {\n case (typeof type === \"object\" && type.type === \"marking\"):\n return {\n \"type\": \"marking\",\n marking: { markingType: type.markingType },\n };\n\n case (typeof type === \"object\" && type.type === \"struct\"):\n const structFields: Array<OntologyIrStructFieldType> = new Array();\n for (const key in type.structDefinition) {\n const fieldTypeDefinition = type.structDefinition[key];\n let field: OntologyIrStructFieldType;\n if (typeof fieldTypeDefinition === \"string\") {\n field = {\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition),\n };\n } else {\n // If it is a full form type definition then process it as such\n if (\"fieldType\" in fieldTypeDefinition) {\n field = {\n ...fieldTypeDefinition,\n apiName: key,\n fieldType: propertyTypeTypeToOntologyIrType(\n fieldTypeDefinition.fieldType,\n ),\n typeClasses: fieldTypeDefinition.typeClasses ?? [],\n aliases: fieldTypeDefinition.aliases ?? [],\n };\n } else {\n field = {\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition),\n };\n }\n }\n\n structFields.push(field);\n }\n\n return {\n type: \"struct\",\n struct: { structFields },\n };\n\n case (typeof type === \"object\" && type.type === \"string\"):\n return {\n \"type\": \"string\",\n \"string\": {\n analyzerOverride: undefined,\n enableAsciiFolding: type.enableAsciiFolding,\n isLongText: type.isLongText ?? false,\n supportsEfficientLeadingWildcard:\n type.supportsEfficientLeadingWildcard ?? false,\n supportsExactMatching: type.supportsExactMatching ?? true,\n supportsFullTextRegex: type.supportsFullTextRegex,\n },\n };\n\n case (typeof type === \"object\" && type.type === \"decimal\"):\n return {\n \"type\": \"decimal\",\n \"decimal\": {\n precision: type.precision,\n scale: type.scale,\n },\n };\n\n case (type === \"geopoint\"):\n return { type: \"geohash\", geohash: {} };\n\n case (type === \"decimal\"):\n return { type, [type]: { precision: undefined, scale: undefined } };\n\n case (type === \"string\"):\n return {\n type,\n [type]: {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: false,\n supportsEfficientLeadingWildcard: false,\n supportsExactMatching: true,\n },\n };\n\n case (type === \"mediaReference\"):\n return {\n type: type,\n mediaReference: {},\n };\n\n case (type === \"geotimeSeries\"):\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {},\n };\n\n default:\n // use helper function to distribute `type` properly\n if (typeof type === \"object\") {\n throw new Error(`Unhandled exotic type: ${JSON.stringify(type)}`);\n }\n return distributeTypeHelper(type);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,oBAAoB,QAAQ,sCAAsC;AAE3E,OAAO,SAASC,gCAAgCA,CAC9CC,IAAsB,EACN;EAChB,QAAQ,IAAI;IACV,KAAM,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACA,IAAI,KAAK,SAAS;MACvD,OAAO;QACL,MAAM,EAAE,SAAS;QACjBC,OAAO,EAAE;UAAEC,WAAW,EAAEF,IAAI,CAACE;QAAY;MAC3C,CAAC;IAEH,KAAM,OAAOF,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACA,IAAI,KAAK,QAAQ;MACtD,MAAMG,YAA8C,GAAG,IAAIC,KAAK,CAAC,CAAC;MAClE,KAAK,MAAMC,GAAG,IAAIL,IAAI,CAACM,gBAAgB,EAAE;QACvC,MAAMC,mBAAmB,GAAGP,IAAI,CAACM,gBAAgB,CAACD,GAAG,CAAC;QACtD,IAAIG,KAAgC;QACpC,IAAI,OAAOD,mBAAmB,KAAK,QAAQ,EAAE;UAC3CC,KAAK,GAAG;YACNC,OAAO,EAAEJ,GAAG;YACZK,eAAe,EAAE;cAAEC,WAAW,EAAEN,GAAG;cAAEO,WAAW,EAAEC;YAAU,CAAC;YAC7DC,WAAW,EAAE,EAAE;YACfC,OAAO,EAAE,EAAE;YACXC,SAAS,EAAEjB,gCAAgC,CAACQ,mBAAmB;UACjE,CAAC;QACH,CAAC,MAAM;UACL;UACA,IAAI,WAAW,IAAIA,mBAAmB,EAAE;YACtCC,KAAK,GAAG;cACN,GAAGD,mBAAmB;cACtBE,OAAO,EAAEJ,GAAG;cACZW,SAAS,EAAEjB,gCAAgC,CACzCQ,mBAAmB,CAACS,SACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"propertyTypeTypeToOntologyIrType.js","names":["distributeTypeHelper","propertyTypeTypeToOntologyIrType","type","marking","markingType","structFields","Array","key","structDefinition","fieldTypeDefinition","field","apiName","displayMetadata","displayName","description","undefined","typeClasses","aliases","fieldType","push","struct","analyzerOverride","enableAsciiFolding","isLongText","supportsEfficientLeadingWildcard","supportsExactMatching","supportsFullTextRegex","precision","scale","geohash","mediaReference","geotimeSeriesReference","Error","JSON","stringify"],"sources":["propertyTypeTypeToOntologyIrType.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 OntologyIrStructFieldType,\n OntologyIrType,\n} from \"@osdk/client.unstable\";\nimport type { PropertyTypeType } from \"../../api/properties/PropertyTypeType.js\";\nimport { distributeTypeHelper } from \"../toConjure/distributeTypeHelper.js\";\n\nexport function propertyTypeTypeToOntologyIrType(\n type: PropertyTypeType,\n): OntologyIrType {\n switch (true) {\n case (typeof type === \"object\" && type.type === \"marking\"):\n return {\n \"type\": \"marking\",\n marking: { markingType: type.markingType },\n };\n\n case (typeof type === \"object\" && type.type === \"struct\"):\n const structFields: Array<OntologyIrStructFieldType> = new Array();\n for (const key in type.structDefinition) {\n const fieldTypeDefinition = type.structDefinition[key];\n let field: OntologyIrStructFieldType;\n if (typeof fieldTypeDefinition === \"string\") {\n field = {\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition),\n };\n } else {\n // If it is a full form type definition then process it as such\n if (\"fieldType\" in fieldTypeDefinition) {\n field = {\n ...fieldTypeDefinition,\n apiName: key,\n fieldType: propertyTypeTypeToOntologyIrType(\n fieldTypeDefinition.fieldType,\n ),\n displayMetadata: fieldTypeDefinition.displayMetadata\n ?? { displayName: key, description: undefined },\n typeClasses: fieldTypeDefinition.typeClasses ?? [],\n aliases: fieldTypeDefinition.aliases ?? [],\n };\n } else {\n field = {\n apiName: key,\n displayMetadata: { displayName: key, description: undefined },\n typeClasses: [],\n aliases: [],\n fieldType: propertyTypeTypeToOntologyIrType(fieldTypeDefinition),\n };\n }\n }\n\n structFields.push(field);\n }\n\n return {\n type: \"struct\",\n struct: { structFields },\n };\n\n case (typeof type === \"object\" && type.type === \"string\"):\n return {\n \"type\": \"string\",\n \"string\": {\n analyzerOverride: undefined,\n enableAsciiFolding: type.enableAsciiFolding,\n isLongText: type.isLongText ?? false,\n supportsEfficientLeadingWildcard:\n type.supportsEfficientLeadingWildcard ?? false,\n supportsExactMatching: type.supportsExactMatching ?? true,\n supportsFullTextRegex: type.supportsFullTextRegex,\n },\n };\n\n case (typeof type === \"object\" && type.type === \"decimal\"):\n return {\n \"type\": \"decimal\",\n \"decimal\": {\n precision: type.precision,\n scale: type.scale,\n },\n };\n\n case (type === \"geopoint\"):\n return { type: \"geohash\", geohash: {} };\n\n case (type === \"decimal\"):\n return { type, [type]: { precision: undefined, scale: undefined } };\n\n case (type === \"string\"):\n return {\n type,\n [type]: {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: false,\n supportsEfficientLeadingWildcard: false,\n supportsExactMatching: true,\n },\n };\n\n case (type === \"mediaReference\"):\n return {\n type: type,\n mediaReference: {},\n };\n\n case (type === \"geotimeSeries\"):\n return {\n type: \"geotimeSeriesReference\",\n geotimeSeriesReference: {},\n };\n\n default:\n // use helper function to distribute `type` properly\n if (typeof type === \"object\") {\n throw new Error(`Unhandled exotic type: ${JSON.stringify(type)}`);\n }\n return distributeTypeHelper(type);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,oBAAoB,QAAQ,sCAAsC;AAE3E,OAAO,SAASC,gCAAgCA,CAC9CC,IAAsB,EACN;EAChB,QAAQ,IAAI;IACV,KAAM,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACA,IAAI,KAAK,SAAS;MACvD,OAAO;QACL,MAAM,EAAE,SAAS;QACjBC,OAAO,EAAE;UAAEC,WAAW,EAAEF,IAAI,CAACE;QAAY;MAC3C,CAAC;IAEH,KAAM,OAAOF,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACA,IAAI,KAAK,QAAQ;MACtD,MAAMG,YAA8C,GAAG,IAAIC,KAAK,CAAC,CAAC;MAClE,KAAK,MAAMC,GAAG,IAAIL,IAAI,CAACM,gBAAgB,EAAE;QACvC,MAAMC,mBAAmB,GAAGP,IAAI,CAACM,gBAAgB,C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B,EAAE,CAAC;MAC3B,CAAC;IAEH;MACE;MACA,IAAI,OAAO7B,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAI8B,KAAK,CAAC,0BAA0BC,IAAI,CAACC,SAAS,CAAChC,IAAI,CAAC,EAAE,CAAC;MACnE;MACA,OAAOF,oBAAoB,CAACE,IAAI,CAAC;EACrC;AACF","ignoreList":[]}
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","addDependency","OntologyEntityTypeEnum","CREATE_INTERFACE_OBJECT_PARAMETER","CREATE_OR_MODIFY_OBJECT_PARAMETER","defineAction","DELETE_OBJECT_PARAMETER","MODIFY_INTERFACE_OBJECT_PARAMETER","MODIFY_OBJECT_PARAMETER","defineCreateInterfaceObjectAction","defineCreateObjectAction","defineCreateOrModifyObjectAction","defineDeleteInterfaceObjectAction","defineDeleteObjectAction","defineInterface","defineInterfaceLinkConstraint","defineLink","defineModifyInterfaceObjectAction","defineModifyObjectAction","convertToPluralDisplayName","defineObject","uppercaseFirstLetter","convertToDisplayName","addNamespaceIfNone","defineOntology","dumpOntologyFullMetadata","defineSharedPropertyType","defineValueType","importOntologyEntity","importSharedPropertyType","wrapWithProxy","propertyTypeTypeToOntologyIrType","convertType"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { default as default } from \"./cli/main.js\";\n\nexport type { ActionParameterValidation } from \"./api/action/ActionParameter.js\";\nexport type {\n ActionParameterAllowedValues,\n} from \"./api/action/ActionParameterAllowedValues.js\";\nexport type { ActionParameterConditionalOverride } from \"./api/action/ActionParameterConditionalOverride.js\";\nexport type { ActionParameterConfiguration } from \"./api/action/ActionParameterConfiguration.js\";\nexport type { ActionSection } from \"./api/action/ActionSection.js\";\nexport type { ActionType } from \"./api/action/ActionType.js\";\nexport type { ConditionDefinition } from \"./api/action/ConditionDefinition.js\";\nexport type {\n CurrentTimeMappingValue,\n CurrentUserMappingValue,\n CustomMapping,\n MappingValue,\n UuidMappingValue,\n} from \"./api/action/MappingValue.js\";\nexport type { SectionConditionalOverride } from \"./api/action/SectionConditionalOverride.js\";\nexport type { SubmissionMetadata } from \"./api/action/SubmissionMetadata.js\";\nexport { addDependency } from \"./api/addDependency.js\";\nexport { OntologyEntityTypeEnum } from \"./api/common/OntologyEntityTypeEnum.js\";\nexport {\n CREATE_INTERFACE_OBJECT_PARAMETER,\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n defineAction,\n DELETE_OBJECT_PARAMETER,\n MODIFY_INTERFACE_OBJECT_PARAMETER,\n MODIFY_OBJECT_PARAMETER,\n} from \"./api/defineAction.js\";\nexport { defineCreateInterfaceObjectAction } from \"./api/defineCreateInterfaceObjectAction.js\";\nexport { defineCreateObjectAction } from \"./api/defineCreateObjectAction.js\";\nexport { defineCreateOrModifyObjectAction } from \"./api/defineCreateOrModifyObjectAction.js\";\nexport { defineDeleteInterfaceObjectAction } from \"./api/defineDeleteInterfaceObjectAction.js\";\nexport { defineDeleteObjectAction } from \"./api/defineDeleteObjectAction.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineLink } from \"./api/defineLink.js\";\nexport { defineModifyInterfaceObjectAction } from \"./api/defineModifyInterfaceObjectAction.js\";\nexport { defineModifyObjectAction } from \"./api/defineModifyObjectAction.js\";\nexport {\n convertToPluralDisplayName,\n defineObject,\n uppercaseFirstLetter as convertToDisplayName,\n} from \"./api/defineObject.js\";\nexport {\n addNamespaceIfNone,\n defineOntology,\n dumpOntologyFullMetadata,\n} from \"./api/defineOntology.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\nexport { importOntologyEntity } from \"./api/importOntologyEntity.js\";\nexport { importSharedPropertyType } from \"./api/importSharedPropertyType.js\";\nexport type { InterfaceType } from \"./api/interface/InterfaceType.js\";\nexport type { LinkType } from \"./api/links/LinkType.js\";\nexport type { ObjectPropertyType } from \"./api/object/ObjectPropertyType.js\";\nexport type { ObjectType } from \"./api/object/ObjectType.js\";\nexport type { PropertyTypeType } from \"./api/properties/PropertyTypeType.js\";\nexport type { SharedPropertyType } from \"./api/properties/SharedPropertyType.js\";\nexport type { ValueTypeDefinitionVersion } from \"./api/values/ValueTypeDefinitionVersion.js\";\nexport { wrapWithProxy } from \"./api/wrapWithProxy.js\";\nexport { propertyTypeTypeToOntologyIrType as convertType } from \"./conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAkB,QAAQ,eAAe;AAoBlD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SACEC,iCAAiC,EACjCC,iCAAiC,EACjCC,YAAY,EACZC,uBAAuB,EACvBC,iCAAiC,EACjCC,uBAAuB,QAClB,uBAAuB;AAC9B,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,gCAAgC,QAAQ,2CAA2C;AAC5F,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SACEC,0BAA0B,EAC1BC,YAAY,EACZC,oBAAoB,IAAIC,oBAAoB,QACvC,uBAAuB;AAC9B,SACEC,kBAAkB,EAClBC,cAAc,EACdC,wBAAwB,QACnB,yBAAyB;AAChC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,wBAAwB,QAAQ,mCAAmC;
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","addDependency","OntologyEntityTypeEnum","CREATE_INTERFACE_OBJECT_PARAMETER","CREATE_OR_MODIFY_OBJECT_PARAMETER","defineAction","DELETE_OBJECT_PARAMETER","MODIFY_INTERFACE_OBJECT_PARAMETER","MODIFY_OBJECT_PARAMETER","defineCreateInterfaceObjectAction","defineCreateObjectAction","defineCreateOrModifyObjectAction","defineDeleteInterfaceObjectAction","defineDeleteObjectAction","defineInterface","defineInterfaceLinkConstraint","defineLink","defineModifyInterfaceObjectAction","defineModifyObjectAction","convertToPluralDisplayName","defineObject","uppercaseFirstLetter","convertToDisplayName","addNamespaceIfNone","defineOntology","dumpOntologyFullMetadata","defineSharedPropertyType","defineValueType","importOntologyEntity","importSharedPropertyType","wrapWithProxy","propertyTypeTypeToOntologyIrType","convertType"],"sources":["index.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { default as default } from \"./cli/main.js\";\n\nexport type { ActionParameterValidation } from \"./api/action/ActionParameter.js\";\nexport type {\n ActionParameterAllowedValues,\n} from \"./api/action/ActionParameterAllowedValues.js\";\nexport type { ActionParameterConditionalOverride } from \"./api/action/ActionParameterConditionalOverride.js\";\nexport type { ActionParameterConfiguration } from \"./api/action/ActionParameterConfiguration.js\";\nexport type { ActionSection } from \"./api/action/ActionSection.js\";\nexport type { ActionType } from \"./api/action/ActionType.js\";\nexport type { ConditionDefinition } from \"./api/action/ConditionDefinition.js\";\nexport type {\n CurrentTimeMappingValue,\n CurrentUserMappingValue,\n CustomMapping,\n MappingValue,\n UuidMappingValue,\n} from \"./api/action/MappingValue.js\";\nexport type { SectionConditionalOverride } from \"./api/action/SectionConditionalOverride.js\";\nexport type { SubmissionMetadata } from \"./api/action/SubmissionMetadata.js\";\nexport { addDependency } from \"./api/addDependency.js\";\nexport { OntologyEntityTypeEnum } from \"./api/common/OntologyEntityTypeEnum.js\";\nexport {\n CREATE_INTERFACE_OBJECT_PARAMETER,\n CREATE_OR_MODIFY_OBJECT_PARAMETER,\n defineAction,\n DELETE_OBJECT_PARAMETER,\n MODIFY_INTERFACE_OBJECT_PARAMETER,\n MODIFY_OBJECT_PARAMETER,\n} from \"./api/defineAction.js\";\nexport { defineCreateInterfaceObjectAction } from \"./api/defineCreateInterfaceObjectAction.js\";\nexport { defineCreateObjectAction } from \"./api/defineCreateObjectAction.js\";\nexport { defineCreateOrModifyObjectAction } from \"./api/defineCreateOrModifyObjectAction.js\";\nexport { defineDeleteInterfaceObjectAction } from \"./api/defineDeleteInterfaceObjectAction.js\";\nexport { defineDeleteObjectAction } from \"./api/defineDeleteObjectAction.js\";\nexport { defineInterface } from \"./api/defineInterface.js\";\nexport { defineInterfaceLinkConstraint } from \"./api/defineInterfaceLinkConstraint.js\";\nexport { defineLink } from \"./api/defineLink.js\";\nexport { defineModifyInterfaceObjectAction } from \"./api/defineModifyInterfaceObjectAction.js\";\nexport { defineModifyObjectAction } from \"./api/defineModifyObjectAction.js\";\nexport {\n convertToPluralDisplayName,\n defineObject,\n uppercaseFirstLetter as convertToDisplayName,\n} from \"./api/defineObject.js\";\nexport {\n addNamespaceIfNone,\n defineOntology,\n dumpOntologyFullMetadata,\n} from \"./api/defineOntology.js\";\nexport { defineSharedPropertyType } from \"./api/defineSpt.js\";\nexport { defineValueType } from \"./api/defineValueType.js\";\nexport { importOntologyEntity } from \"./api/importOntologyEntity.js\";\nexport { importSharedPropertyType } from \"./api/importSharedPropertyType.js\";\nexport type { InterfaceDefinedProperty } from \"./api/interface/InterfacePropertyType.js\";\nexport type { InterfaceType } from \"./api/interface/InterfaceType.js\";\nexport type { LinkType } from \"./api/links/LinkType.js\";\nexport type { ObjectPropertyType } from \"./api/object/ObjectPropertyType.js\";\nexport type { ObjectType } from \"./api/object/ObjectType.js\";\nexport type { PropertyTypeType } from \"./api/properties/PropertyTypeType.js\";\nexport type { SharedPropertyType } from \"./api/properties/SharedPropertyType.js\";\nexport type { ValueTypeDefinitionVersion } from \"./api/values/ValueTypeDefinitionVersion.js\";\nexport { wrapWithProxy } from \"./api/wrapWithProxy.js\";\nexport { propertyTypeTypeToOntologyIrType as convertType } from \"./conversion/toMarketplace/propertyTypeTypeToOntologyIrType.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAkB,QAAQ,eAAe;AAoBlD,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SACEC,iCAAiC,EACjCC,iCAAiC,EACjCC,YAAY,EACZC,uBAAuB,EACvBC,iCAAiC,EACjCC,uBAAuB,QAClB,uBAAuB;AAC9B,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,gCAAgC,QAAQ,2CAA2C;AAC5F,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,6BAA6B,QAAQ,wCAAwC;AACtF,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,iCAAiC,QAAQ,4CAA4C;AAC9F,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SACEC,0BAA0B,EAC1BC,YAAY,EACZC,oBAAoB,IAAIC,oBAAoB,QACvC,uBAAuB;AAC9B,SACEC,kBAAkB,EAClBC,cAAc,EACdC,wBAAwB,QACnB,yBAAyB;AAChC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,oBAAoB,QAAQ,+BAA+B;AACpE,SAASC,wBAAwB,QAAQ,mCAAmC;AAS5E,SAASC,aAAa,QAAQ,wBAAwB;AACtD,SAASC,gCAAgC,IAAIC,WAAW,QAAQ,gEAAgE","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OntologyIrParameterPrefill, ParameterId } from "@osdk/client.unstable";
|
|
1
|
+
import type { OntologyIrParameterPrefill, ParameterId, ParameterRenderHint } from "@osdk/client.unstable";
|
|
2
2
|
import type { TypeClass } from "../common/TypeClass.js";
|
|
3
3
|
import type { ActionParameterConfiguration } from "./ActionParameterConfiguration.js";
|
|
4
4
|
import type { ActionParameterType } from "./ActionParameterType.js";
|
|
@@ -10,5 +10,6 @@ export interface ActionParameter {
|
|
|
10
10
|
description?: string;
|
|
11
11
|
typeClasses?: Array<TypeClass>;
|
|
12
12
|
defaultValue?: OntologyIrParameterPrefill;
|
|
13
|
+
renderHint?: ParameterRenderHint;
|
|
13
14
|
}
|
|
14
15
|
export type ActionParameterValidation = Omit<ActionParameterConfiguration, "displayName" | "defaultValue">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,4BACA,
|
|
1
|
+
{"mappings":"AAgBA,cACE,4BACA,aACA,2BACK,uBAAwB;AAC/B,cAAc,iBAAiB,wBAAyB;AACxD,cAAc,oCAAoC,mCAAoC;AACtF,cAAc,2BAA2B,0BAA2B;AAEpE,iBAAiB,gBAAgB;CAC/B,IAAI;CACJ;CACA,MAAM;CACN,YAAY;CACZ;CACA,cAAc,MAAM;CACpB,eAAe;CACf,aAAa;AACd;AACD,YAAY,4BAA4B,KACtC,8BACA,gBAAgB","names":[],"sources":["../../../../src/api/action/ActionParameter.ts"],"version":3,"file":"ActionParameter.d.ts"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OntologyIrParameterPrefill } from "@osdk/client.unstable";
|
|
1
|
+
import type { OntologyIrParameterPrefill, ParameterRenderHint } from "@osdk/client.unstable";
|
|
2
2
|
import type { ActionParameterAllowedValues } from "./ActionParameterAllowedValues.js";
|
|
3
3
|
import type { ActionParameterConditionalOverride } from "./ActionParameterConditionalOverride.js";
|
|
4
4
|
import type { ActionParameterType } from "./ActionParameterType.js";
|
|
@@ -8,6 +8,7 @@ export interface ActionParameterConfiguration {
|
|
|
8
8
|
defaultVisibility?: "editable" | "disabled" | "hidden";
|
|
9
9
|
conditionalOverrides?: Array<ActionParameterConditionalOverride>;
|
|
10
10
|
defaultValue?: OntologyIrParameterPrefill;
|
|
11
|
+
renderHint?: ParameterRenderHint;
|
|
11
12
|
displayName?: string;
|
|
12
13
|
description?: string;
|
|
13
14
|
customParameterType?: ActionParameterType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,
|
|
1
|
+
{"mappings":"AAgBA,cACE,4BACA,2BACK,uBAAwB;AAC/B,cAAc,oCAAoC,mCAAoC;AACtF,cAAc,0CAA0C,yCAA0C;AAClG,cAAc,2BAA2B,0BAA2B;AAEpE,iBAAiB,6BAA6B;CAC5C,gBAAgB;CAChB,WAAW;CACX,oBAAoB,aAAa,aAAa;CAC9C,uBAAuB,MAAM;CAC7B,eAAe;CACf,aAAa;CACb;CACA;CAEA,sBAAsB;AACvB;AAED,YAAY,iDAER;CAAE,YAAY;EAAE;EAAc;CAAc;AAAE","names":[],"sources":["../../../../src/api/action/ActionParameterConfiguration.ts"],"version":3,"file":"ActionParameterConfiguration.d.ts"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ParameterId } from "@osdk/client.unstable";
|
|
1
|
+
import type { OntologyIrInterfacePropertyLogicRuleValue, ParameterId } from "@osdk/client.unstable";
|
|
2
2
|
import type { ActionLevelValidationDefinition } from "./action/ActionLevelValidationDefinition.js";
|
|
3
3
|
import { type ActionParameter } from "./action/ActionParameter.js";
|
|
4
4
|
import type { ActionParameterConfiguration } from "./action/ActionParameterConfiguration.js";
|
|
@@ -11,11 +11,11 @@ import type { MappingValue } from "./action/MappingValue.js";
|
|
|
11
11
|
import type { SubmissionMetadata } from "./action/SubmissionMetadata.js";
|
|
12
12
|
import type { TableConfiguration } from "./action/TableConfiguration.js";
|
|
13
13
|
import type { BlueprintIcon } from "./common/BlueprintIcons.js";
|
|
14
|
+
import { type InterfacePropertyType } from "./interface/InterfacePropertyType.js";
|
|
14
15
|
import type { InterfaceType } from "./interface/InterfaceType.js";
|
|
15
16
|
import type { ObjectPropertyTypeUserDefinition } from "./object/ObjectPropertyTypeUserDefinition.js";
|
|
16
17
|
import type { ObjectTypeDefinition } from "./object/ObjectTypeDefinition.js";
|
|
17
18
|
import { type PropertyTypeType } from "./properties/PropertyTypeType.js";
|
|
18
|
-
import type { SharedPropertyType } from "./properties/SharedPropertyType.js";
|
|
19
19
|
export declare const MODIFY_OBJECT_PARAMETER: string;
|
|
20
20
|
export declare const CREATE_OR_MODIFY_OBJECT_PARAMETER: string;
|
|
21
21
|
export declare const DELETE_OBJECT_PARAMETER: string;
|
|
@@ -68,7 +68,7 @@ export type InterfaceActionTypeUserDefinition = {
|
|
|
68
68
|
};
|
|
69
69
|
export declare function defineAction(actionDef: ActionTypeDefinition): ActionType;
|
|
70
70
|
export declare function isPropertyParameter(def: ActionTypeUserDefinition | InterfaceActionTypeUserDefinition, name: string, type: PropertyTypeType): boolean;
|
|
71
|
-
export declare function createParameters(def: ActionTypeUserDefinition | InterfaceActionTypeUserDefinition, propertyMap: Record<string, ObjectPropertyTypeUserDefinition> | Record<string,
|
|
71
|
+
export declare function createParameters(def: ActionTypeUserDefinition | InterfaceActionTypeUserDefinition, propertyMap: Record<string, ObjectPropertyTypeUserDefinition> | Record<string, InterfacePropertyType>, parameterSet: Set<string>, requiredMap?: Record<string, boolean>): Array<ActionParameter>;
|
|
72
72
|
export declare function kebab(s: string): string;
|
|
73
73
|
export declare function convertValidationRule(actionValidation: ActionLevelValidationDefinition, actionParameters?: ActionParameter[]): Array<ActionValidationRule>;
|
|
74
74
|
export declare function validateActionParameters(def: ActionTypeUserDefinition | InterfaceActionTypeUserDefinition, properties: Array<string>, name: string): void;
|
|
@@ -78,3 +78,4 @@ export declare function isTargetParameter(parameterId: string): boolean;
|
|
|
78
78
|
export declare function addNamespaceToActionDefinition(def: InterfaceActionTypeUserDefinition): void;
|
|
79
79
|
export declare function getInterfaceParameterName(def: InterfaceActionTypeUserDefinition, parameter: string): string;
|
|
80
80
|
export declare function getNonNamespacedParameterName(def: InterfaceActionTypeUserDefinition, parameter: string): string;
|
|
81
|
+
export declare function createInterfacePropertyLogicRuleValue(id: string, def: InterfacePropertyType, actionDef: InterfaceActionTypeUserDefinition): OntologyIrInterfacePropertyLogicRuleValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,
|
|
1
|
+
{"mappings":"AAgBA,cACE,2CAEA,mBACK,uBAAwB;AAG/B,cAAc,uCAAuC,6CAA8C;AACnG,cAAc,uBAAuB,6BAA8B;AAEnE,cAAc,oCAAoC,0CAA2C;AAM7F,cAAc,qBAAqB,2BAA4B;AAC/D,cAAc,oBAAoB,0BAA2B;AAC7D,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,4BAA4B,kCAAmC;AAE7E,cAAc,qBAAqB,2BAA4B;AAC/D,cAAc,oBAAoB,0BAA2B;A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O,iBAAS,yBACdR,KAAK,2BAA2B,mCAChCS,YAAY,eACZR;AA6BF,OAAO,iBAAS,+BACdD,KAAK,2BAA2B,mCAChCS,YAAY,eACZC,YAAY,mBACZC;AAaF,OAAO,iBAAS,0BACdC,6BACAR,cAAc,aACdS;AAgBF,OAAO,iBAAS,kBAAkBC;AAOlC,OAAO,iBAAS,+BACdC,KAAK;AAqBP,OAAO,iBAAS,0BACdA,KAAK,mCACLC;AAaF,OAAO,iBAAS,8BACdD,KAAK,mCACLC;AAMF,OAAO,iBAAS,sCACdC,YACAC,KAAK,uBACLC,WAAW,oCACV","names":["MODIFY_OBJECT_PARAMETER: string","CREATE_OR_MODIFY_OBJECT_PARAMETER: string","DELETE_OBJECT_PARAMETER: string","CREATE_INTERFACE_OBJECT_PARAMETER: string","MODIFY_INTERFACE_OBJECT_PARAMETER: string","actionDef: ActionTypeDefinition","def: ActionTypeUserDefinition | InterfaceActionTypeUserDefinition","name: string","type: PropertyTypeType","propertyMap:\n | Record<string, ObjectPropertyTypeUserDefinition>\n | Record<string, InterfacePropertyType>","parameterSet: Set<string>","requiredMap?: Record<string, boolean>","s: string","actionValidation: ActionLevelValidationDefinition","actionParameters?: ActionParameter[]","properties: Array<string>","parameters: ActionParameter[]","priorityId?: string","parameterOrdering: string[]","actionApiName: string","parameterId: string","def: InterfaceActionTypeUserDefinition","parameter: string","id: string","def: InterfacePropertyType","actionDef: InterfaceActionTypeUserDefinition"],"sources":["../../../src/api/defineAction.ts"],"version":3,"file":"defineAction.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AAoBA,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,yCAAyC,mBAAoB;AAoB3E,OAAO,iBAAS,kCACdA,KAAK,oCACJ","names":["def: InterfaceActionTypeUserDefinition"],"sources":["../../../src/api/defineCreateInterfaceObjectAction.ts"],"version":3,"file":"defineCreateInterfaceObjectAction.d.ts"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BlueprintIcon } from "./common/BlueprintIcons.js";
|
|
2
|
+
import { type InterfaceDefinedProperty } from "./interface/InterfacePropertyType.js";
|
|
2
3
|
import { type InterfaceType } from "./interface/InterfaceType.js";
|
|
3
|
-
import { type PropertyTypeType } from "./properties/PropertyTypeType.js";
|
|
4
4
|
import { type SharedPropertyType } from "./properties/SharedPropertyType.js";
|
|
5
5
|
export type SimplifiedInterfaceTypeStatus = {
|
|
6
6
|
type: "deprecated"
|
|
@@ -10,11 +10,13 @@ export type SimplifiedInterfaceTypeStatus = {
|
|
|
10
10
|
type: "active"
|
|
11
11
|
} | {
|
|
12
12
|
type: "experimental"
|
|
13
|
+
} | {
|
|
14
|
+
type: "example"
|
|
13
15
|
};
|
|
14
|
-
type PropertyBase = SharedPropertyType |
|
|
15
|
-
type
|
|
16
|
+
type PropertyBase = SharedPropertyType | InterfaceDefinedProperty;
|
|
17
|
+
type SptWithOptional = {
|
|
16
18
|
required: boolean
|
|
17
|
-
|
|
19
|
+
sharedPropertyType: SharedPropertyType
|
|
18
20
|
};
|
|
19
21
|
export type InterfaceTypeDefinition = {
|
|
20
22
|
apiName: string
|
|
@@ -25,7 +27,7 @@ export type InterfaceTypeDefinition = {
|
|
|
25
27
|
color: string
|
|
26
28
|
}
|
|
27
29
|
status?: SimplifiedInterfaceTypeStatus
|
|
28
|
-
properties?: Record<string, PropertyBase |
|
|
30
|
+
properties?: Record<string, PropertyBase | SptWithOptional>
|
|
29
31
|
extends?: InterfaceType | InterfaceType[]
|
|
30
32
|
searchable?: boolean
|
|
31
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAkBA,cAAc,qBAAqB,4BAA6B;
|
|
1
|
+
{"mappings":"AAkBA,cAAc,qBAAqB,4BAA6B;AAQhE,cACO,gCAGA,sCAAuC;AAC9C,cAAc,qBAAqB,8BAA+B;AAIlE,cAAc,0BAA0B,oCAAqC;AAE7E,YAAY,gCACR;CAAE,MAAM;CAAc;CAAiB;AAAkB,IACzD;CAAE,MAAM;AAAU,IAClB;CAAE,MAAM;AAAgB,IACxB;CAAE,MAAM;AAAW;KAElB,eACD,qBACA;KACC,kBAAkB;CACrB;CACA,oBAAoB;AACrB;AAED,YAAY,0BAA0B;CACpC;CACA;CACA;CACA,OAAO;EAAE,SAAS;EAAe;CAAe;CAChD,SAAS;CACT,aAAa,eAEX,eAAe;CAEjB,UAAU,gBAAgB;CAC1B;AACD;AAED,OAAO,iBAAS,gBACdA,cAAc,0BACb","names":["interfaceDef: InterfaceTypeDefinition"],"sources":["../../../src/api/defineInterface.ts"],"version":3,"file":"defineInterface.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AAoBA,cAAc,kBAAkB,wBAAyB;AACzD,cAAc,yCAAyC,mBAAoB;AAoB3E,OAAO,iBAAS,kCACdA,KAAK,oCACJ","names":["def: InterfaceActionTypeUserDefinition"],"sources":["../../../src/api/defineModifyInterfaceObjectAction.ts"],"version":3,"file":"defineModifyInterfaceObjectAction.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AAyCA,cAAc,4BAA4B,kCAAmC;AAc7E,OAAO,iBAAS,aACdA,WAAW,uBACV;AA+MH,OAAO,iBAAS,qBAAqBC;AAOrC,OAAO,iBAAS,2BACdA","names":["objectDef: ObjectTypeDefinition","s: string | undefined | null"],"sources":["../../../src/api/defineObject.ts"],"version":3,"file":"defineObject.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAEE,YACA,iCACA,kCACA,gCACA,0CAGA,8BAEA,2BAEK,uBAAwB;AAS/B,cACE,iBACA,iCACK,6BAA8B;AACrC,cAAc,oCAAoC,0CAA2C;AAC7F,cAAc,kBAAkB,wBAAyB;AAIzD,cAAc,0BAA0B,uCAAwC;AAiBhF,OAAO,iBAAS,eACd,UAAU,oBAEVA,QAAQ;AAiBV,OAAO,iBAAe,eACpBC,YACAC,mBAAmB,eACnBC,+BACAC,yBACAC,4BACAC,6BACAC,+BACAC,yBACC,QAAQ;AA8CX,OAAO,iBAAS,mBAAmBC;AAgFnC,OAAO,iBAAS,gBACdC,iBACAC,YAAY,0CACZC,yCACAC,qCACC;AA6BH,OAAO,iBAAS,2BAA2BH;AAkB3C,OAAO,iBAAS,4BAA4B;AAI5C,OAAO,iBAAS,yBAAyB;AAIzC,OAAO,iBAAS,oBAAoBI;
|
|
1
|
+
{"mappings":"AAgBA,cAEE,YACA,iCACA,kCACA,gCACA,0CAGA,8BAEA,2BAEK,uBAAwB;AAS/B,cACE,iBACA,iCACK,6BAA8B;AACrC,cAAc,oCAAoC,0CAA2C;AAC7F,cAAc,kBAAkB,wBAAyB;AAIzD,cAAc,0BAA0B,uCAAwC;AAiBhF,OAAO,iBAAS,eACd,UAAU,oBAEVA,QAAQ;AAiBV,OAAO,iBAAe,eACpBC,YACAC,mBAAmB,eACnBC,+BACAC,yBACAC,4BACAC,6BACAC,+BACAC,yBACC,QAAQ;AA8CX,OAAO,iBAAS,mBAAmBC;AAgFnC,OAAO,iBAAS,gBACdC,iBACAC,YAAY,0CACZC,yCACAC,qCACC;AA6BH,OAAO,iBAAS,2BAA2BH;AAkB3C,OAAO,iBAAS,4BAA4B;AAI5C,OAAO,iBAAS,yBAAyB;AAIzC,OAAO,iBAAS,oBAAoBI;AA2CpC,OAAO,iBAAS,cACdC,QAAQ,aACP;AAwEH,OAAO,iBAAS,qBACdC,eAAe,+BACd;AAwIH,OAAO,iBAAS,uBACdC,WAAW,iBACXC,aAAa,4BACZ;AAsEH,OAAO,iBAAS,iBAAiBR;AAIjC,OAAO,iBAAS,iBAAiBA;AA8CjC,OAAO,iBAAS,mBAAmBA","names":["entity: T","ns: string","body: () => void | Promise<void>","outputDir: string | undefined","dependencyFile?: string","codeSnippetFiles?: boolean","snippetPackageName?: string","snippetFileOutputDir?: string","randomnessKey?: string","outputDir: string","apiName: string","definition: OntologyIrObjectTypeDatasourceDefinition","classificationMarkingGroupName?: string","mandatoryMarkingGroupName?: string","status: any","action: ActionType","allowedValues: ActionParameterAllowedValues","parameter: ActionParameter","validation?: ActionParameterValidation"],"sources":["../../../src/api/defineOntology.ts"],"version":3,"file":"defineOntology.d.ts"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OntologyIrBaseFormatter, OntologyIrValueTypeReferenceWithMetadata, SharedPropertyTypeGothamMapping, Visibility } from "@osdk/client.unstable";
|
|
2
|
+
import type { Nullability } from "./properties/Nullability.js";
|
|
2
3
|
import { type PropertyTypeType } from "./properties/PropertyTypeType.js";
|
|
3
4
|
import { type SharedPropertyType } from "./properties/SharedPropertyType.js";
|
|
4
5
|
export interface SharedPropertyTypeDefinition {
|
|
@@ -9,7 +10,9 @@ export interface SharedPropertyTypeDefinition {
|
|
|
9
10
|
displayName?: string;
|
|
10
11
|
valueType?: OntologyIrValueTypeReferenceWithMetadata;
|
|
11
12
|
visibility?: Visibility;
|
|
13
|
+
nullability?: Nullability;
|
|
12
14
|
typeClasses?: SharedPropertyType["typeClasses"];
|
|
15
|
+
aliases?: Array<string>;
|
|
13
16
|
gothamMapping?: SharedPropertyTypeGothamMapping;
|
|
14
17
|
baseFormatter?: OntologyIrBaseFormatter;
|
|
15
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,yBACA,0CACA,iCACA,kBACK,uBAAwB;AAQ/B,cAAc,wBAAwB,kCAAmC;AACzE,cAAc,0BAA0B,oCAAqC;AAQ7E,iBAAiB,6BAA6B;CAC5C;CACA,MAAM;CACN;CACA;CACA;CACA,YAAY;CACZ,aAAa;CACb,cAAc,mBAAmB;CACjC,gBAAgB;CAChB,gBAAgB;AACjB;AAED,OAAO,iBAAS,yBACdA,QAAQ,+BACP","names":["sptDef: SharedPropertyTypeDefinition"],"sources":["../../../src/api/defineSpt.ts"],"version":3,"file":"defineSpt.d.ts"}
|
|
1
|
+
{"mappings":"AAgBA,cACE,yBACA,0CACA,iCACA,kBACK,uBAAwB;AAQ/B,cAAc,mBAAmB,6BAA8B;AAC/D,cAAc,wBAAwB,kCAAmC;AACzE,cAAc,0BAA0B,oCAAqC;AAQ7E,iBAAiB,6BAA6B;CAC5C;CACA,MAAM;CACN;CACA;CACA;CACA,YAAY;CACZ,aAAa;CACb,cAAc;CACd,cAAc,mBAAmB;CACjC,UAAU;CACV,gBAAgB;CAChB,gBAAgB;AACjB;AAED,OAAO,iBAAS,yBACdA,QAAQ,+BACP","names":["sptDef: SharedPropertyTypeDefinition"],"sources":["../../../src/api/defineSpt.ts"],"version":3,"file":"defineSpt.d.ts"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ValueTypeRid, ValueTypeStatus } from "@osdk/client.unstable";
|
|
1
2
|
import { type ValueTypeDefinitionVersion } from "./values/ValueTypeDefinitionVersion.js";
|
|
2
3
|
import { type ValueTypeType } from "./values/ValueTypeType.js";
|
|
3
4
|
type NewValueTypeDefinitionBacking = { [Type in ValueTypeType as Type["type"]] : {
|
|
@@ -11,6 +12,14 @@ export type ValueTypeDefinition = {
|
|
|
11
12
|
description?: string
|
|
12
13
|
type: NewValueTypeDefinition
|
|
13
14
|
version: string
|
|
15
|
+
status?: UserValueTypeStatus
|
|
16
|
+
};
|
|
17
|
+
export type UserValueTypeStatus = "active" | {
|
|
18
|
+
type: "deprecated"
|
|
19
|
+
message: string
|
|
20
|
+
deadline: string
|
|
21
|
+
replacedBy?: ValueTypeRid
|
|
14
22
|
};
|
|
15
23
|
export declare function defineValueType(valueTypeDef: ValueTypeDefinition): ValueTypeDefinitionVersion;
|
|
24
|
+
export declare function convertUserValueTypeStatusToValueTypeStatus(status: UserValueTypeStatus | undefined): ValueTypeStatus;
|
|
16
25
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AAgBA,cAME,cACA,uBACK,uBAAwB;AAI/B,cAAc,kCAAkC,wCAAyC;AACzF,cAAc,qBAAqB,2BAA4B;KAiC1D,mCACF,QAAQ,iBAAiB,KAAK,WAAU;CACvC,MAAM,KAAK;CACX,cAAc,KAAK;AACpB;KAEE,yBACH,oCAAoC;AA+CtC,YAAY,sBAAsB;CAChC;CACA;CACA;CACA,MAAM;CACN;CACA,SAAS;AACV;AAED,YAAY,sBAAsB,WAAW;CAC3C,MAAM;CACN;CACA;CACA,aAAa;AACd;AAED,OAAO,iBAAS,gBACdA,cAAc,sBACb;AA0CH,OAAO,iBAAS,4CACdC,QAAQ,kCACP","names":["valueTypeDef: ValueTypeDefinition","status: UserValueTypeStatus | undefined"],"sources":["../../../src/api/defineValueType.ts"],"version":3,"file":"defineValueType.d.ts"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { OntologyIrBaseFormatter } from "@osdk/client.unstable";
|
|
2
|
+
import type { PropertyTypeType } from "../properties/PropertyTypeType.js";
|
|
3
|
+
import type { PropertyType, SharedPropertyType } from "../properties/SharedPropertyType.js";
|
|
4
|
+
export type InterfacePropertyType = InterfaceSharedPropertyType | InterfaceDefinedProperty;
|
|
5
|
+
export interface InterfaceDefinedProperty extends PropertyType {
|
|
6
|
+
required?: boolean;
|
|
7
|
+
primaryKeyConstraint?: "MUST_BE_PK" | "CANNOT_BE_PK" | "NO_RESTRICTION";
|
|
8
|
+
baseFormatter?: OntologyIrBaseFormatter;
|
|
9
|
+
}
|
|
10
|
+
export interface InterfaceSharedPropertyType {
|
|
3
11
|
sharedPropertyType: SharedPropertyType;
|
|
4
12
|
required: boolean;
|
|
5
13
|
}
|
|
14
|
+
export declare function isInterfaceSharedPropertyType(interfacePropertyType: InterfacePropertyType): interfacePropertyType is InterfaceSharedPropertyType;
|
|
15
|
+
export declare function getInterfacePropertyTypeType(interfacePropertyType: InterfacePropertyType): PropertyTypeType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,
|
|
1
|
+
{"mappings":"AAgBA,cAAc,+BAA+B,uBAAwB;AACrE,cAAc,wBAAwB,mCAAoC;AAC1E,cACE,cACA,0BACK,qCAAsC;AAE7C,YAAY,wBACR,8BACA;AAEJ,iBAAiB,iCAAiC,aAAa;CAC7D;CACA,uBAAuB,eAAe,iBAAiB;CACvD,gBAAgB;AACjB;AAED,iBAAiB,4BAA4B;CAC3C,oBAAoB;CACpB;AACD;AAED,OAAO,iBAAS,8BACdA,uBAAuB,wBACtB,yBAAyB;AAI5B,OAAO,iBAAS,6BACdA,uBAAuB,wBACtB","names":["interfacePropertyType: InterfacePropertyType"],"sources":["../../../../src/api/interface/InterfacePropertyType.ts"],"version":3,"file":"InterfacePropertyType.d.ts"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { InterfaceTypeStatus, OntologyIrMarketplaceInterfaceType } from "@osdk/client.unstable";
|
|
2
2
|
import type { OntologyEntityBase } from "../common/OntologyEntityBase.js";
|
|
3
3
|
import type { OntologyEntityTypeEnum } from "../common/OntologyEntityTypeEnum.js";
|
|
4
|
-
import type { InterfacePropertyType } from "./InterfacePropertyType.js";
|
|
4
|
+
import type { InterfacePropertyType, InterfaceSharedPropertyType } from "./InterfacePropertyType.js";
|
|
5
5
|
export interface InterfaceType extends OntologyEntityBase, Omit<OntologyIrMarketplaceInterfaceType, "properties" | "propertiesV2" | "propertiesV3" | "extendsInterfaces"> {
|
|
6
|
-
propertiesV2: Record<string,
|
|
6
|
+
propertiesV2: Record<string, InterfaceSharedPropertyType>;
|
|
7
|
+
propertiesV3: Record<string, InterfacePropertyType>;
|
|
7
8
|
extendsInterfaces: Array<InterfaceType>;
|
|
8
9
|
status: InterfaceTypeStatus;
|
|
9
10
|
__type: OntologyEntityTypeEnum.INTERFACE_TYPE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,qBACA,0CACK,uBAAwB;AAC/B,cAAc,0BAA0B,iCAAkC;AAC1E,cAAc,8BAA8B,qCAAsC;AAClF,
|
|
1
|
+
{"mappings":"AAgBA,cACE,qBACA,0CACK,uBAAwB;AAC/B,cAAc,0BAA0B,iCAAkC;AAC1E,cAAc,8BAA8B,qCAAsC;AAClF,cACE,uBACA,mCACK,4BAA6B;AAEpC,iBAAiB,sBACf,oBACA,KACE,oCAEE,eAEA,iBACA,iBACA,qBAEN;CACE,cAAc,eAAe;CAC7B,cAAc,eAAe;CAC7B,mBAAmB,MAAM;CACzB,QAAQ;CACR,QAAQ,uBAAuB;AAChC","names":[],"sources":["../../../../src/api/interface/InterfaceType.ts"],"version":3,"file":"InterfaceType.d.ts"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type InterfacePropertyType } from "./InterfacePropertyType.js";
|
|
2
2
|
import type { InterfaceType } from "./InterfaceType.js";
|
|
3
3
|
export declare function getFlattenedInterfaceProperties(interfaceType: InterfaceType): Record<string, InterfacePropertyType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,
|
|
1
|
+
{"mappings":"AAgBA,cACO,6BAEA,4BAA6B;AACpC,cAAc,qBAAqB,oBAAqB;AAExD,OAAO,iBAAS,gCACdA,eAAe,gBACd,eAAe","names":["interfaceType: InterfaceType"],"sources":["../../../../src/api/interface/getFlattenedInterfaceProperties.ts"],"version":3,"file":"getFlattenedInterfaceProperties.d.ts"}
|