@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.
- package/CHANGELOG.md +11 -0
- 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/defineSpt.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/object/ObjectType.js.map +1 -1
- package/build/browser/api/object/ObjectTypeDefinition.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 +723 -470
- 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/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/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 +386 -109
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +28 -13
- 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/defineSpt.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/object/ObjectType.js.map +1 -1
- package/build/esm/api/object/ObjectTypeDefinition.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 +723 -470
- 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/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/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 +5 -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/defineSpt.d.ts +3 -0
- package/build/types/api/defineSpt.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/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/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/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 +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineSpt.js","names":["invariant","OntologyEntityTypeEnum","namespace","ontologyDefinition","updateOntology","defaultTypeClasses","getPropertyTypeName","hasRenderHints","shouldNotHaveRenderHints","defineSharedPropertyType","sptDef","apiName","SHARED_PROPERTY_TYPE","undefined","process","env","NODE_ENV","type","typeClasses","fullSpt","nonNameSpacedApiName","displayName","__type"],"sources":["defineSpt.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\nimport type {\n OntologyIrBaseFormatter,\n OntologyIrValueTypeReferenceWithMetadata,\n SharedPropertyTypeGothamMapping,\n Visibility,\n} from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport {\n namespace,\n ontologyDefinition,\n updateOntology,\n} from \"./defineOntology.js\";\nimport { type PropertyTypeType } from \"./properties/PropertyTypeType.js\";\nimport { type SharedPropertyType } from \"./properties/SharedPropertyType.js\";\nimport {\n defaultTypeClasses,\n getPropertyTypeName,\n hasRenderHints,\n shouldNotHaveRenderHints,\n} from \"./propertyConversionUtils.js\";\n\nexport interface SharedPropertyTypeDefinition {\n apiName: string;\n type: PropertyTypeType;\n array?: boolean;\n description?: string;\n displayName?: string;\n valueType?: OntologyIrValueTypeReferenceWithMetadata;\n visibility?: Visibility;\n typeClasses?: SharedPropertyType[\"typeClasses\"];\n gothamMapping?: SharedPropertyTypeGothamMapping;\n baseFormatter?: OntologyIrBaseFormatter;\n}\n\nexport function defineSharedPropertyType(\n sptDef: SharedPropertyTypeDefinition,\n): SharedPropertyType {\n const apiName = namespace + sptDef.apiName;\n invariant(\n ontologyDefinition[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE][apiName]\n === undefined,\n `Shared property type ${apiName} already exists`,\n );\n\n invariant(\n !shouldNotHaveRenderHints(sptDef.type)\n || !hasRenderHints(sptDef.typeClasses),\n `Shared property type ${apiName} of type '${\n getPropertyTypeName(sptDef.type)\n }' should not have render hints`,\n );\n\n const fullSpt: SharedPropertyType = {\n ...sptDef,\n apiName,\n nonNameSpacedApiName: sptDef.apiName,\n displayName: sptDef.displayName ?? sptDef.apiName, // This way the non-namespaced api name is the display name (maybe not ideal)\n typeClasses: sptDef.typeClasses\n ?? (shouldNotHaveRenderHints(sptDef.type) ? [] : defaultTypeClasses),\n __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE,\n };\n updateOntology(fullSpt);\n return fullSpt;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,sBAAsB,QAAQ,oCAAoC;AAC3E,SACEC,SAAS,EACTC,kBAAkB,EAClBC,cAAc,QACT,qBAAqB;
|
|
1
|
+
{"version":3,"file":"defineSpt.js","names":["invariant","OntologyEntityTypeEnum","namespace","ontologyDefinition","updateOntology","defaultTypeClasses","getPropertyTypeName","hasRenderHints","shouldNotHaveRenderHints","defineSharedPropertyType","sptDef","apiName","SHARED_PROPERTY_TYPE","undefined","process","env","NODE_ENV","type","typeClasses","fullSpt","nonNameSpacedApiName","displayName","__type"],"sources":["defineSpt.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\nimport type {\n OntologyIrBaseFormatter,\n OntologyIrValueTypeReferenceWithMetadata,\n SharedPropertyTypeGothamMapping,\n Visibility,\n} from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { OntologyEntityTypeEnum } from \"./common/OntologyEntityTypeEnum.js\";\nimport {\n namespace,\n ontologyDefinition,\n updateOntology,\n} from \"./defineOntology.js\";\nimport type { Nullability } from \"./properties/Nullability.js\";\nimport { type PropertyTypeType } from \"./properties/PropertyTypeType.js\";\nimport { type SharedPropertyType } from \"./properties/SharedPropertyType.js\";\nimport {\n defaultTypeClasses,\n getPropertyTypeName,\n hasRenderHints,\n shouldNotHaveRenderHints,\n} from \"./propertyConversionUtils.js\";\n\nexport interface SharedPropertyTypeDefinition {\n apiName: string;\n type: PropertyTypeType;\n array?: boolean;\n description?: string;\n displayName?: string;\n valueType?: OntologyIrValueTypeReferenceWithMetadata;\n visibility?: Visibility;\n nullability?: Nullability;\n typeClasses?: SharedPropertyType[\"typeClasses\"];\n aliases?: Array<string>;\n gothamMapping?: SharedPropertyTypeGothamMapping;\n baseFormatter?: OntologyIrBaseFormatter;\n}\n\nexport function defineSharedPropertyType(\n sptDef: SharedPropertyTypeDefinition,\n): SharedPropertyType {\n const apiName = namespace + sptDef.apiName;\n invariant(\n ontologyDefinition[OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE][apiName]\n === undefined,\n `Shared property type ${apiName} already exists`,\n );\n\n invariant(\n !shouldNotHaveRenderHints(sptDef.type)\n || !hasRenderHints(sptDef.typeClasses),\n `Shared property type ${apiName} of type '${\n getPropertyTypeName(sptDef.type)\n }' should not have render hints`,\n );\n\n const fullSpt: SharedPropertyType = {\n ...sptDef,\n apiName,\n nonNameSpacedApiName: sptDef.apiName,\n displayName: sptDef.displayName ?? sptDef.apiName, // This way the non-namespaced api name is the display name (maybe not ideal)\n typeClasses: sptDef.typeClasses\n ?? (shouldNotHaveRenderHints(sptDef.type) ? [] : defaultTypeClasses),\n __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE,\n };\n updateOntology(fullSpt);\n return fullSpt;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,sBAAsB,QAAQ,oCAAoC;AAC3E,SACEC,SAAS,EACTC,kBAAkB,EAClBC,cAAc,QACT,qBAAqB;AAI5B,SACEC,kBAAkB,EAClBC,mBAAmB,EACnBC,cAAc,EACdC,wBAAwB,QACnB,8BAA8B;AAiBrC,OAAO,SAASC,wBAAwBA,CACtCC,MAAoC,EAChB;EACpB,MAAMC,OAAO,GAAGT,SAAS,GAAGQ,MAAM,CAACC,OAAO;EAC1C,EACER,kBAAkB,CAACF,sBAAsB,CAACW,oBAAoB,CAAC,CAACD,OAAO,CAAC,KAClEE,SAAS,IAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAFjBhB,SAAS,QAGP,wBAAwBW,OAAO,iBAAiB,IAHlDX,SAAS;EAMT,EACE,CAACQ,wBAAwB,CAACE,MAAM,CAACO,IAAI,CAAC,IACjC,CAACV,cAAc,CAACG,MAAM,CAACQ,WAAW,CAAC,IAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAF1ChB,SAAS,QAGP,wBAAwBW,OAAO,aAC7BL,mBAAmB,CAACI,MAAM,CAACO,IAAI,CAAC,gCACF,IALlCjB,SAAS;EAQT,MAAMmB,OAA2B,GAAG;IAClC,GAAGT,MAAM;IACTC,OAAO;IACPS,oBAAoB,EAAEV,MAAM,CAACC,OAAO;IACpCU,WAAW,EAAEX,MAAM,CAACW,WAAW,IAAIX,MAAM,CAACC,OAAO;IAAE;IACnDO,WAAW,EAAER,MAAM,CAACQ,WAAW,KACzBV,wBAAwB,CAACE,MAAM,CAACO,IAAI,CAAC,GAAG,EAAE,GAAGZ,kBAAkB,CAAC;IACtEiB,MAAM,EAAErB,sBAAsB,CAACW;EACjC,CAAC;EACDR,cAAc,CAACe,OAAO,CAAC;EACvB,OAAOA,OAAO;AAChB","ignoreList":[]}
|
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export function isInterfaceSharedPropertyType(interfacePropertyType) {
|
|
18
|
+
return "sharedPropertyType" in interfacePropertyType;
|
|
19
|
+
}
|
|
20
|
+
export function getInterfacePropertyTypeType(interfacePropertyType) {
|
|
21
|
+
return isInterfaceSharedPropertyType(interfacePropertyType) ? interfacePropertyType.sharedPropertyType.type : interfacePropertyType.type;
|
|
22
|
+
}
|
|
2
23
|
//# sourceMappingURL=InterfacePropertyType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InterfacePropertyType.js","names":[],"sources":["InterfacePropertyType.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 {
|
|
1
|
+
{"version":3,"file":"InterfacePropertyType.js","names":["isInterfaceSharedPropertyType","interfacePropertyType","getInterfacePropertyTypeType","sharedPropertyType","type"],"sources":["InterfacePropertyType.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 { OntologyIrBaseFormatter } from \"@osdk/client.unstable\";\nimport type { PropertyTypeType } from \"../properties/PropertyTypeType.js\";\nimport type {\n PropertyType,\n SharedPropertyType,\n} from \"../properties/SharedPropertyType.js\";\n\nexport type InterfacePropertyType =\n | InterfaceSharedPropertyType\n | InterfaceDefinedProperty;\n\nexport interface InterfaceDefinedProperty extends PropertyType {\n required?: boolean;\n primaryKeyConstraint?: \"MUST_BE_PK\" | \"CANNOT_BE_PK\" | \"NO_RESTRICTION\";\n baseFormatter?: OntologyIrBaseFormatter;\n}\n\nexport interface InterfaceSharedPropertyType {\n sharedPropertyType: SharedPropertyType;\n required: boolean;\n}\n\nexport function isInterfaceSharedPropertyType(\n interfacePropertyType: InterfacePropertyType,\n): interfacePropertyType is InterfaceSharedPropertyType {\n return \"sharedPropertyType\" in interfacePropertyType;\n}\n\nexport function getInterfacePropertyTypeType(\n interfacePropertyType: InterfacePropertyType,\n): PropertyTypeType {\n return isInterfaceSharedPropertyType(interfacePropertyType)\n ? interfacePropertyType.sharedPropertyType.type\n : interfacePropertyType.type;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAwBA,OAAO,SAASA,6BAA6BA,CAC3CC,qBAA4C,EACU;EACtD,OAAO,oBAAoB,IAAIA,qBAAqB;AACtD;AAEA,OAAO,SAASC,4BAA4BA,CAC1CD,qBAA4C,EAC1B;EAClB,OAAOD,6BAA6B,CAACC,qBAAqB,CAAC,GACvDA,qBAAqB,CAACE,kBAAkB,CAACC,IAAI,GAC7CH,qBAAqB,CAACG,IAAI;AAChC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InterfaceType.js","names":[],"sources":["InterfaceType.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 InterfaceTypeStatus,\n OntologyIrMarketplaceInterfaceType,\n} from \"@osdk/client.unstable\";\nimport type { OntologyEntityBase } from \"../common/OntologyEntityBase.js\";\nimport type { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\nimport type {
|
|
1
|
+
{"version":3,"file":"InterfaceType.js","names":[],"sources":["InterfaceType.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 InterfaceTypeStatus,\n OntologyIrMarketplaceInterfaceType,\n} from \"@osdk/client.unstable\";\nimport type { OntologyEntityBase } from \"../common/OntologyEntityBase.js\";\nimport type { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\nimport type {\n InterfacePropertyType,\n InterfaceSharedPropertyType,\n} from \"./InterfacePropertyType.js\";\n\nexport interface InterfaceType extends\n OntologyEntityBase,\n Omit<\n OntologyIrMarketplaceInterfaceType,\n // we want our simplified representation\n | \"properties\"\n // these things don't need to exist as the system works fine without them (I'm told)\n | \"propertiesV2\"\n | \"propertiesV3\"\n | \"extendsInterfaces\"\n >\n{\n propertiesV2: Record<string, InterfaceSharedPropertyType>;\n propertiesV3: Record<string, InterfacePropertyType>;\n extendsInterfaces: Array<InterfaceType>;\n status: InterfaceTypeStatus;\n __type: OntologyEntityTypeEnum.INTERFACE_TYPE;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -14,12 +14,18 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import { isInterfaceSharedPropertyType } from "./InterfacePropertyType.js";
|
|
17
18
|
export function getFlattenedInterfaceProperties(interfaceType) {
|
|
18
|
-
let properties = interfaceType.
|
|
19
|
+
let properties = Object.fromEntries(Object.entries(interfaceType.propertiesV3).map(([key, value]) => [isInterfaceSharedPropertyType(value) ? value.sharedPropertyType.apiName : key, value]));
|
|
20
|
+
Object.entries(interfaceType.propertiesV2).forEach(([apiName, spt]) => {
|
|
21
|
+
if (!(apiName in properties)) {
|
|
22
|
+
properties[apiName] = spt;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
19
25
|
interfaceType.extendsInterfaces.forEach(ext => {
|
|
20
26
|
properties = {
|
|
21
|
-
...
|
|
22
|
-
...
|
|
27
|
+
...getFlattenedInterfaceProperties(ext),
|
|
28
|
+
...properties
|
|
23
29
|
};
|
|
24
30
|
});
|
|
25
31
|
return properties;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFlattenedInterfaceProperties.js","names":["getFlattenedInterfaceProperties","interfaceType","properties","
|
|
1
|
+
{"version":3,"file":"getFlattenedInterfaceProperties.js","names":["isInterfaceSharedPropertyType","getFlattenedInterfaceProperties","interfaceType","properties","Object","fromEntries","entries","propertiesV3","map","key","value","sharedPropertyType","apiName","propertiesV2","forEach","spt","extendsInterfaces","ext"],"sources":["getFlattenedInterfaceProperties.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 {\n type InterfacePropertyType,\n isInterfaceSharedPropertyType,\n} from \"./InterfacePropertyType.js\";\nimport type { InterfaceType } from \"./InterfaceType.js\";\n\nexport function getFlattenedInterfaceProperties(\n interfaceType: InterfaceType,\n): Record<string, InterfacePropertyType> {\n let properties: Record<string, InterfacePropertyType> = Object.fromEntries(\n Object.entries(interfaceType.propertiesV3).map(([key, value]) => [\n isInterfaceSharedPropertyType(value)\n ? value.sharedPropertyType.apiName\n : key,\n value,\n ]),\n );\n Object.entries(interfaceType.propertiesV2).forEach(([apiName, spt]) => {\n if (!(apiName in properties)) {\n properties[apiName] = spt;\n }\n });\n interfaceType.extendsInterfaces.forEach(ext => {\n properties = {\n ...getFlattenedInterfaceProperties(ext),\n ...properties,\n };\n });\n return properties;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAEEA,6BAA6B,QACxB,4BAA4B;AAGnC,OAAO,SAASC,+BAA+BA,CAC7CC,aAA4B,EACW;EACvC,IAAIC,UAAiD,GAAGC,MAAM,CAACC,WAAW,CACxED,MAAM,CAACE,OAAO,CAACJ,aAAa,CAACK,YAAY,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK,CAC/DV,6BAA6B,CAACU,KAAK,CAAC,GAChCA,KAAK,CAACC,kBAAkB,CAACC,OAAO,GAChCH,GAAG,EACPC,KAAK,CACN,CACH,CAAC;EACDN,MAAM,CAACE,OAAO,CAACJ,aAAa,CAACW,YAAY,CAAC,CAACC,OAAO,CAAC,CAAC,CAACF,OAAO,EAAEG,GAAG,CAAC,KAAK;IACrE,IAAI,EAAEH,OAAO,IAAIT,UAAU,CAAC,EAAE;MAC5BA,UAAU,CAACS,OAAO,CAAC,GAAGG,GAAG;IAC3B;EACF,CAAC,CAAC;EACFb,aAAa,CAACc,iBAAiB,CAACF,OAAO,CAACG,GAAG,IAAI;IAC7Cd,UAAU,GAAG;MACX,GAAGF,+BAA+B,CAACgB,GAAG,CAAC;MACvC,GAAGd;IACL,CAAC;EACH,CAAC,CAAC;EACF,OAAOA,UAAU;AACnB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectType.js","names":[],"sources":["ObjectType.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 { OntologyIrObjectType, Visibility } from \"@osdk/client.unstable\";\nimport type { RequiredFields } from \"../../util/RequiredFields.js\";\nimport type { BlueprintIcon } from \"../common/BlueprintIcons.js\";\nimport type { OntologyEntityBase } from \"../common/OntologyEntityBase.js\";\nimport type { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\nimport type { InterfaceImplementation } from \"./InterfaceImplementation.js\";\nimport type { ObjectPropertyType } from \"./ObjectPropertyType.js\";\nimport type { ObjectTypeDatasourceDefinition } from \"./ObjectTypeDatasourceDefinition.js\";\nimport type { ObjectTypeStatus } from \"./ObjectTypeStatus.js\";\n\nexport type ObjectType =\n & OntologyEntityBase\n & RequiredFields<\n Partial<ObjectTypeInner>,\n | \"apiName\"\n | \"primaryKeyPropertyApiName\"\n | \"displayName\"\n | \"pluralDisplayName\"\n | \"titlePropertyApiName\"\n >\n & {\n datasources?: Array<ObjectTypeDatasourceDefinition>;\n __type: OntologyEntityTypeEnum.OBJECT_TYPE;\n };\n\nexport interface ObjectTypeInner extends\n Omit<\n OntologyIrObjectType,\n | \"titlePropertyTypeRid\"\n | \"propertyTypes\"\n | \"allImplementsInterfaces\"\n | \"implementsInterfaces2\"\n | \"displayMetadata\"\n | \"primaryKeys\"\n | \"status\"\n >\n{\n primaryKeyPropertyApiName: string;\n properties: Array<ObjectPropertyType>;\n titlePropertyApiName: string;\n implementsInterfaces: Array<InterfaceImplementation>;\n description: string | undefined;\n icon: { locator: BlueprintIcon; color: string } | undefined;\n displayName: string;\n pluralDisplayName: string;\n visibility: Visibility;\n editsEnabled: boolean;\n status?: ObjectTypeStatus;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ObjectType.js","names":[],"sources":["ObjectType.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 { OntologyIrObjectType, Visibility } from \"@osdk/client.unstable\";\nimport type { RequiredFields } from \"../../util/RequiredFields.js\";\nimport type { BlueprintIcon } from \"../common/BlueprintIcons.js\";\nimport type { OntologyEntityBase } from \"../common/OntologyEntityBase.js\";\nimport type { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\nimport type { InterfaceImplementation } from \"./InterfaceImplementation.js\";\nimport type { ObjectPropertyType } from \"./ObjectPropertyType.js\";\nimport type { ObjectTypeDatasourceDefinition } from \"./ObjectTypeDatasourceDefinition.js\";\nimport type { ObjectTypeStatus } from \"./ObjectTypeStatus.js\";\n\nexport type ObjectType =\n & OntologyEntityBase\n & RequiredFields<\n Partial<ObjectTypeInner>,\n | \"apiName\"\n | \"primaryKeyPropertyApiName\"\n | \"displayName\"\n | \"pluralDisplayName\"\n | \"titlePropertyApiName\"\n >\n & {\n datasources?: Array<ObjectTypeDatasourceDefinition>;\n __type: OntologyEntityTypeEnum.OBJECT_TYPE;\n };\n\nexport interface ObjectTypeInner extends\n Omit<\n OntologyIrObjectType,\n | \"titlePropertyTypeRid\"\n | \"propertyTypes\"\n | \"allImplementsInterfaces\"\n | \"implementsInterfaces2\"\n | \"displayMetadata\"\n | \"primaryKeys\"\n | \"status\"\n >\n{\n primaryKeyPropertyApiName: string;\n properties: Array<ObjectPropertyType>;\n titlePropertyApiName: string;\n implementsInterfaces: Array<InterfaceImplementation>;\n description: string | undefined;\n icon: { locator: BlueprintIcon; color: string } | undefined;\n displayName: string;\n pluralDisplayName: string;\n visibility: Visibility;\n editsEnabled: boolean;\n status?: ObjectTypeStatus;\n aliases?: Array<string>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectTypeDefinition.js","names":[],"sources":["ObjectTypeDefinition.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 { Visibility } from \"@osdk/client.unstable\";\nimport type { BlueprintIcon } from \"../common/BlueprintIcons.js\";\nimport type { InterfaceImplementation } from \"./InterfaceImplementation.js\";\nimport type { ObjectPropertyTypeUserDefinition } from \"./ObjectPropertyTypeUserDefinition.js\";\nimport type { ObjectTypeDatasourceDefinition } from \"./ObjectTypeDatasourceDefinition.js\";\nimport type { ObjectTypeStatus } from \"./ObjectTypeStatus.js\";\n\nexport type ObjectTypeDefinition = {\n apiName: string;\n primaryKeyPropertyApiName: string;\n displayName: string;\n pluralDisplayName: string;\n titlePropertyApiName: string;\n properties?: { [key: string]: ObjectPropertyTypeUserDefinition };\n implementsInterfaces?: Array<InterfaceImplementation>;\n description?: string;\n icon?: { locator: BlueprintIcon; color: string };\n visibility?: Visibility;\n editsEnabled?: boolean;\n status?: ObjectTypeStatus;\n datasources?: Array<ObjectTypeDatasourceDefinition>;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ObjectTypeDefinition.js","names":[],"sources":["ObjectTypeDefinition.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 { Visibility } from \"@osdk/client.unstable\";\nimport type { BlueprintIcon } from \"../common/BlueprintIcons.js\";\nimport type { InterfaceImplementation } from \"./InterfaceImplementation.js\";\nimport type { ObjectPropertyTypeUserDefinition } from \"./ObjectPropertyTypeUserDefinition.js\";\nimport type { ObjectTypeDatasourceDefinition } from \"./ObjectTypeDatasourceDefinition.js\";\nimport type { ObjectTypeStatus } from \"./ObjectTypeStatus.js\";\n\nexport type ObjectTypeDefinition = {\n apiName: string;\n primaryKeyPropertyApiName: string;\n displayName: string;\n pluralDisplayName: string;\n titlePropertyApiName: string;\n properties?: { [key: string]: ObjectPropertyTypeUserDefinition };\n implementsInterfaces?: Array<InterfaceImplementation>;\n description?: string;\n icon?: { locator: BlueprintIcon; color: string };\n visibility?: Visibility;\n editsEnabled?: boolean;\n status?: ObjectTypeStatus;\n datasources?: Array<ObjectTypeDatasourceDefinition>;\n aliases?: Array<string>;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -24,7 +24,7 @@ export function isExotic(type) {
|
|
|
24
24
|
if (typeof type === "string") {
|
|
25
25
|
return ["geopoint", "geoshape", "mediaReference", "geotimeSeries"].includes(type);
|
|
26
26
|
} else if (typeof type === "object" && type != null) {
|
|
27
|
-
return type.type === "marking" || type.type === "struct";
|
|
27
|
+
return type.type === "marking" || type.type === "struct" || type.type === "string" || type.type === "decimal";
|
|
28
28
|
}
|
|
29
29
|
return false;
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyTypeType.js","names":["isPropertyTypeType","v","type","isExotic","undefined","includes","isStruct"],"sources":["PropertyTypeType.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 { StructFieldType } from \"@osdk/client.unstable\";\n\nexport type PropertyTypeType =\n | PropertyTypeTypePrimitive\n | PropertyTypeTypeExotic;\n\nexport type PropertyTypeTypePrimitive =\n | \"boolean\"\n | \"byte\"\n | \"date\"\n | \"decimal\"\n | \"double\"\n | \"float\"\n | \"integer\"\n | \"long\"\n | \"short\"\n | \"string\"\n | \"timestamp\";\n\nexport type PropertyTypeTypeExotic =\n | \"geopoint\"\n | \"geoshape\"\n | \"mediaReference\"\n | \"geotimeSeries\"\n | PropertyTypeTypeMarking\n | PropertyTypeTypeStruct\n | PropertyTypeTypeString\n | PropertyTypeTypeDecimal;\n\ntype PropertyTypeTypeMarking = {\n type: \"marking\";\n markingType: \"MANDATORY\" | \"CBAC\";\n markingInputGroupName: string;\n};\n\nexport type PropertyTypeTypeStruct = {\n type: \"struct\";\n structDefinition: {\n [api_name: string]:\n | StructPropertyType\n | Exclude<PropertyTypeTypesWithoutStruct, PropertyTypeTypeMarking>;\n };\n};\n\ntype PropertyTypeTypeString = {\n type: \"string\";\n isLongText?: boolean;\n supportsEfficientLeadingWildcard?: boolean;\n supportsExactMatching?: boolean;\n supportsFullTextRegex?: boolean;\n enableAsciiFolding?: boolean;\n};\n\ntype PropertyTypeTypeDecimal = {\n type: \"decimal\";\n precision?: number;\n scale?: number;\n};\n\nexport type PropertyTypeTypesWithoutStruct = Exclude<\n PropertyTypeType,\n PropertyTypeTypeStruct\n>;\nexport function isPropertyTypeType(\n v: PropertyTypeType,\n): v is PropertyTypeType {\n return v === \"boolean\" || v === \"byte\"\n || v === \"date\" || v === \"decimal\" || v === \"double\"\n || v === \"float\" || v === \"geopoint\" || v === \"geoshape\"\n || v === \"integer\" || v === \"long\"\n || (typeof v === \"object\" && v.type === \"marking\")\n || v === \"short\" || v === \"string\"\n || v === \"timestamp\";\n}\nexport function isExotic(\n type: PropertyTypeType | undefined,\n): type is PropertyTypeTypeExotic {\n if (type === undefined) {\n return false;\n }\n if (typeof type === \"string\") {\n return [\"geopoint\", \"geoshape\", \"mediaReference\", \"geotimeSeries\"].includes(\n type,\n );\n } else if (typeof type === \"object\" && type != null) {\n return type.type === \"marking\" || type.type === \"struct\";\n }\n return false;\n}\nexport function isStruct(\n type: PropertyTypeType,\n): type is PropertyTypeTypeStruct {\n return typeof type === \"object\" && type.type === \"struct\";\n}\n\ntype Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;\n\nexport interface StructPropertyType extends\n Optional<\n Omit<\n StructFieldType,\n \"fieldType\" | \"structFieldRid\" | \"apiName\"\n >,\n \"typeClasses\" | \"aliases\"\n >\n{\n fieldType: PropertyTypeTypesWithoutStruct;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiEA,OAAO,SAASA,kBAAkBA,CAChCC,CAAmB,EACI;EACvB,OAAOA,CAAC,KAAK,SAAS,IAAIA,CAAC,KAAK,MAAM,IACjCA,CAAC,KAAK,MAAM,IAAIA,CAAC,KAAK,SAAS,IAAIA,CAAC,KAAK,QAAQ,IACjDA,CAAC,KAAK,OAAO,IAAIA,CAAC,KAAK,UAAU,IAAIA,CAAC,KAAK,UAAU,IACrDA,CAAC,KAAK,SAAS,IAAIA,CAAC,KAAK,MAAM,IAC9B,OAAOA,CAAC,KAAK,QAAQ,IAAIA,CAAC,CAACC,IAAI,KAAK,SAAU,IAC/CD,CAAC,KAAK,OAAO,IAAIA,CAAC,KAAK,QAAQ,IAC/BA,CAAC,KAAK,WAAW;AACxB;AACA,OAAO,SAASE,QAAQA,CACtBD,IAAkC,EACF;EAChC,IAAIA,IAAI,KAAKE,SAAS,EAAE;IACtB,OAAO,KAAK;EACd;EACA,IAAI,OAAOF,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAACG,QAAQ,CACzEH,IACF,CAAC;EACH,CAAC,MAAM,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,IAAI,IAAI,EAAE;IACnD,OAAOA,IAAI,CAACA,IAAI,KAAK,SAAS,IAAIA,IAAI,CAACA,IAAI,KAAK,QAAQ;
|
|
1
|
+
{"version":3,"file":"PropertyTypeType.js","names":["isPropertyTypeType","v","type","isExotic","undefined","includes","isStruct"],"sources":["PropertyTypeType.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 { StructFieldType } from \"@osdk/client.unstable\";\n\nexport type PropertyTypeType =\n | PropertyTypeTypePrimitive\n | PropertyTypeTypeExotic;\n\nexport type PropertyTypeTypePrimitive =\n | \"boolean\"\n | \"byte\"\n | \"date\"\n | \"decimal\"\n | \"double\"\n | \"float\"\n | \"integer\"\n | \"long\"\n | \"short\"\n | \"string\"\n | \"timestamp\";\n\nexport type PropertyTypeTypeExotic =\n | \"geopoint\"\n | \"geoshape\"\n | \"mediaReference\"\n | \"geotimeSeries\"\n | PropertyTypeTypeMarking\n | PropertyTypeTypeStruct\n | PropertyTypeTypeString\n | PropertyTypeTypeDecimal;\n\ntype PropertyTypeTypeMarking = {\n type: \"marking\";\n markingType: \"MANDATORY\" | \"CBAC\";\n markingInputGroupName: string;\n};\n\nexport type PropertyTypeTypeStruct = {\n type: \"struct\";\n structDefinition: {\n [api_name: string]:\n | StructPropertyType\n | Exclude<PropertyTypeTypesWithoutStruct, PropertyTypeTypeMarking>;\n };\n};\n\ntype PropertyTypeTypeString = {\n type: \"string\";\n isLongText?: boolean;\n supportsEfficientLeadingWildcard?: boolean;\n supportsExactMatching?: boolean;\n supportsFullTextRegex?: boolean;\n enableAsciiFolding?: boolean;\n};\n\ntype PropertyTypeTypeDecimal = {\n type: \"decimal\";\n precision?: number;\n scale?: number;\n};\n\nexport type PropertyTypeTypesWithoutStruct = Exclude<\n PropertyTypeType,\n PropertyTypeTypeStruct\n>;\nexport function isPropertyTypeType(\n v: PropertyTypeType,\n): v is PropertyTypeType {\n return v === \"boolean\" || v === \"byte\"\n || v === \"date\" || v === \"decimal\" || v === \"double\"\n || v === \"float\" || v === \"geopoint\" || v === \"geoshape\"\n || v === \"integer\" || v === \"long\"\n || (typeof v === \"object\" && v.type === \"marking\")\n || v === \"short\" || v === \"string\"\n || v === \"timestamp\";\n}\nexport function isExotic(\n type: PropertyTypeType | undefined,\n): type is PropertyTypeTypeExotic {\n if (type === undefined) {\n return false;\n }\n if (typeof type === \"string\") {\n return [\"geopoint\", \"geoshape\", \"mediaReference\", \"geotimeSeries\"].includes(\n type,\n );\n } else if (typeof type === \"object\" && type != null) {\n return type.type === \"marking\" || type.type === \"struct\"\n || type.type === \"string\"\n || type.type === \"decimal\";\n }\n return false;\n}\nexport function isStruct(\n type: PropertyTypeType,\n): type is PropertyTypeTypeStruct {\n return typeof type === \"object\" && type.type === \"struct\";\n}\n\ntype Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;\n\nexport interface StructPropertyType extends\n Optional<\n Omit<\n StructFieldType,\n \"fieldType\" | \"structFieldRid\" | \"apiName\"\n >,\n \"typeClasses\" | \"aliases\"\n >\n{\n fieldType: PropertyTypeTypesWithoutStruct;\n requireImplementation?: boolean;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiEA,OAAO,SAASA,kBAAkBA,CAChCC,CAAmB,EACI;EACvB,OAAOA,CAAC,KAAK,SAAS,IAAIA,CAAC,KAAK,MAAM,IACjCA,CAAC,KAAK,MAAM,IAAIA,CAAC,KAAK,SAAS,IAAIA,CAAC,KAAK,QAAQ,IACjDA,CAAC,KAAK,OAAO,IAAIA,CAAC,KAAK,UAAU,IAAIA,CAAC,KAAK,UAAU,IACrDA,CAAC,KAAK,SAAS,IAAIA,CAAC,KAAK,MAAM,IAC9B,OAAOA,CAAC,KAAK,QAAQ,IAAIA,CAAC,CAACC,IAAI,KAAK,SAAU,IAC/CD,CAAC,KAAK,OAAO,IAAIA,CAAC,KAAK,QAAQ,IAC/BA,CAAC,KAAK,WAAW;AACxB;AACA,OAAO,SAASE,QAAQA,CACtBD,IAAkC,EACF;EAChC,IAAIA,IAAI,KAAKE,SAAS,EAAE;IACtB,OAAO,KAAK;EACd;EACA,IAAI,OAAOF,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAACG,QAAQ,CACzEH,IACF,CAAC;EACH,CAAC,MAAM,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,IAAI,IAAI,EAAE;IACnD,OAAOA,IAAI,CAACA,IAAI,KAAK,SAAS,IAAIA,IAAI,CAACA,IAAI,KAAK,QAAQ,IACnDA,IAAI,CAACA,IAAI,KAAK,QAAQ,IACtBA,IAAI,CAACA,IAAI,KAAK,SAAS;EAC9B;EACA,OAAO,KAAK;AACd;AACA,OAAO,SAASI,QAAQA,CACtBJ,IAAsB,EACU;EAChC,OAAO,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACA,IAAI,KAAK,QAAQ;AAC3D","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SharedPropertyType.js","names":[],"sources":["SharedPropertyType.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 OntologyIrBaseFormatter,\n OntologyIrValueTypeReferenceWithMetadata,\n SharedPropertyTypeGothamMapping,\n Visibility,\n} from \"@osdk/client.unstable\";\nimport type { OntologyEntityBase } from \"../common/OntologyEntityBase.js\";\nimport type { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\nimport type { TypeClass } from \"../common/TypeClass.js\";\nimport type { Nullability } from \"./Nullability.js\";\nimport type { PropertyTypeType } from \"./PropertyTypeType.js\";\n\nexport interface SharedPropertyType extends OntologyEntityBase, PropertyType {\n apiName: string;\n nonNameSpacedApiName: string;\n gothamMapping?: SharedPropertyTypeGothamMapping;\n baseFormatter?: OntologyIrBaseFormatter;\n __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE;\n}\nexport interface PropertyType {\n type: PropertyTypeType;\n array?: boolean;\n description?: string;\n displayName?: string;\n valueType?: OntologyIrValueTypeReferenceWithMetadata;\n visibility?: Visibility;\n typeClasses?: TypeClass[];\n nullability?: Nullability;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"SharedPropertyType.js","names":[],"sources":["SharedPropertyType.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 OntologyIrBaseFormatter,\n OntologyIrValueTypeReferenceWithMetadata,\n SharedPropertyTypeGothamMapping,\n Visibility,\n} from \"@osdk/client.unstable\";\nimport type { OntologyEntityBase } from \"../common/OntologyEntityBase.js\";\nimport type { OntologyEntityTypeEnum } from \"../common/OntologyEntityTypeEnum.js\";\nimport type { TypeClass } from \"../common/TypeClass.js\";\nimport type { Nullability } from \"./Nullability.js\";\nimport type { PropertyTypeType } from \"./PropertyTypeType.js\";\n\nexport interface SharedPropertyType extends OntologyEntityBase, PropertyType {\n apiName: string;\n nonNameSpacedApiName: string;\n aliases?: Array<string>;\n gothamMapping?: SharedPropertyTypeGothamMapping;\n baseFormatter?: OntologyIrBaseFormatter;\n __type: OntologyEntityTypeEnum.SHARED_PROPERTY_TYPE;\n}\nexport interface PropertyType {\n type: PropertyTypeType;\n array?: boolean;\n description?: string;\n displayName?: string;\n valueType?: OntologyIrValueTypeReferenceWithMetadata;\n visibility?: Visibility;\n typeClasses?: TypeClass[];\n nullability?: Nullability;\n}\n"],"mappings":"","ignoreList":[]}
|