@osdk/maker 0.9.0-beta.3 → 0.9.0-beta.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/CHANGELOG.md +258 -0
  2. package/build/browser/api/defineImportSpt.js +47 -0
  3. package/build/browser/api/defineImportSpt.js.map +1 -0
  4. package/build/browser/api/defineInterface.js +39 -11
  5. package/build/browser/api/defineInterface.js.map +1 -1
  6. package/build/browser/api/defineInterfaceLinkConstraint.js +3 -2
  7. package/build/browser/api/defineInterfaceLinkConstraint.js.map +1 -1
  8. package/build/browser/api/defineObject.js +57 -62
  9. package/build/browser/api/defineObject.js.map +1 -1
  10. package/build/browser/api/defineOntology.js +194 -23
  11. package/build/browser/api/defineOntology.js.map +1 -1
  12. package/build/browser/api/defineSpt.js +3 -1
  13. package/build/browser/api/defineSpt.js.map +1 -1
  14. package/build/browser/api/defineValueType.js +58 -11
  15. package/build/browser/api/defineValueType.js.map +1 -1
  16. package/build/browser/api/iconNames.js +0 -15
  17. package/build/browser/api/iconNames.js.map +1 -1
  18. package/build/browser/api/overall.test.js +704 -63
  19. package/build/browser/api/overall.test.js.map +1 -1
  20. package/build/browser/api/types.js +0 -15
  21. package/build/browser/api/types.js.map +1 -1
  22. package/build/browser/cli/main.js +5 -6
  23. package/build/browser/cli/main.js.map +1 -1
  24. package/build/browser/index.js +3 -0
  25. package/build/browser/index.js.map +1 -1
  26. package/build/cjs/index.cjs +716 -0
  27. package/build/cjs/index.cjs.map +1 -0
  28. package/build/cjs/index.d.cts +343 -0
  29. package/build/esm/api/defineImportSpt.js +47 -0
  30. package/build/esm/api/defineImportSpt.js.map +1 -0
  31. package/build/esm/api/defineInterface.js +39 -11
  32. package/build/esm/api/defineInterface.js.map +1 -1
  33. package/build/esm/api/defineInterfaceLinkConstraint.js +3 -2
  34. package/build/esm/api/defineInterfaceLinkConstraint.js.map +1 -1
  35. package/build/esm/api/defineObject.js +57 -62
  36. package/build/esm/api/defineObject.js.map +1 -1
  37. package/build/esm/api/defineOntology.js +194 -23
  38. package/build/esm/api/defineOntology.js.map +1 -1
  39. package/build/esm/api/defineSpt.js +3 -1
  40. package/build/esm/api/defineSpt.js.map +1 -1
  41. package/build/esm/api/defineValueType.js +58 -11
  42. package/build/esm/api/defineValueType.js.map +1 -1
  43. package/build/esm/api/iconNames.js +0 -15
  44. package/build/esm/api/iconNames.js.map +1 -1
  45. package/build/esm/api/overall.test.js +704 -63
  46. package/build/esm/api/overall.test.js.map +1 -1
  47. package/build/esm/api/types.js +0 -15
  48. package/build/esm/api/types.js.map +1 -1
  49. package/build/esm/cli/main.js +5 -6
  50. package/build/esm/cli/main.js.map +1 -1
  51. package/build/esm/index.js +3 -0
  52. package/build/esm/index.js.map +1 -1
  53. package/package.json +28 -13
  54. package/build/browser/api/defineInterface.d.ts +0 -14
  55. package/build/browser/api/defineInterface.d.ts.map +0 -1
  56. package/build/browser/api/defineInterfaceLinkConstraint.d.ts +0 -21
  57. package/build/browser/api/defineInterfaceLinkConstraint.d.ts.map +0 -1
  58. package/build/browser/api/defineLink.d.ts +0 -18
  59. package/build/browser/api/defineLink.d.ts.map +0 -1
  60. package/build/browser/api/defineLink.js +0 -37
  61. package/build/browser/api/defineLink.js.map +0 -1
  62. package/build/browser/api/defineObject.d.ts +0 -15
  63. package/build/browser/api/defineObject.d.ts.map +0 -1
  64. package/build/browser/api/defineOntology.d.ts +0 -10
  65. package/build/browser/api/defineOntology.d.ts.map +0 -1
  66. package/build/browser/api/defineSpt.d.ts +0 -13
  67. package/build/browser/api/defineSpt.d.ts.map +0 -1
  68. package/build/browser/api/defineValueType.d.ts +0 -26
  69. package/build/browser/api/defineValueType.d.ts.map +0 -1
  70. package/build/browser/api/iconNames.d.ts +0 -3
  71. package/build/browser/api/iconNames.d.ts.map +0 -1
  72. package/build/browser/api/overall.test.d.ts +0 -2
  73. package/build/browser/api/overall.test.d.ts.map +0 -1
  74. package/build/browser/api/types.d.ts +0 -38
  75. package/build/browser/api/types.d.ts.map +0 -1
  76. package/build/browser/cli/main.d.ts +0 -2
  77. package/build/browser/cli/main.d.ts.map +0 -1
  78. package/build/browser/index.d.ts +0 -6
  79. package/build/browser/index.d.ts.map +0 -1
  80. package/build/esm/api/defineInterface.d.ts +0 -14
  81. package/build/esm/api/defineInterface.d.ts.map +0 -1
  82. package/build/esm/api/defineInterfaceLinkConstraint.d.ts +0 -21
  83. package/build/esm/api/defineInterfaceLinkConstraint.d.ts.map +0 -1
  84. package/build/esm/api/defineLink.d.ts +0 -18
  85. package/build/esm/api/defineLink.d.ts.map +0 -1
  86. package/build/esm/api/defineLink.js +0 -37
  87. package/build/esm/api/defineLink.js.map +0 -1
  88. package/build/esm/api/defineObject.d.ts +0 -15
  89. package/build/esm/api/defineObject.d.ts.map +0 -1
  90. package/build/esm/api/defineOntology.d.ts +0 -10
  91. package/build/esm/api/defineOntology.d.ts.map +0 -1
  92. package/build/esm/api/defineSpt.d.ts +0 -13
  93. package/build/esm/api/defineSpt.d.ts.map +0 -1
  94. package/build/esm/api/defineValueType.d.ts +0 -26
  95. package/build/esm/api/defineValueType.d.ts.map +0 -1
  96. package/build/esm/api/iconNames.d.ts +0 -3
  97. package/build/esm/api/iconNames.d.ts.map +0 -1
  98. package/build/esm/api/overall.test.d.ts +0 -2
  99. package/build/esm/api/overall.test.d.ts.map +0 -1
  100. package/build/esm/api/types.d.ts +0 -38
  101. package/build/esm/api/types.d.ts.map +0 -1
  102. package/build/esm/cli/main.d.ts +0 -2
  103. package/build/esm/cli/main.d.ts.map +0 -1
  104. package/build/esm/index.d.ts +0 -6
  105. package/build/esm/index.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"defineOntology.js","names":["ontologyDefinition","namespace","defineOntology","ns","body","actionTypes","objectTypes","queryTypes","interfaceTypes","sharedPropertyTypes","valueTypes","e","console","error","ontology","convertToWireOntologyIr","valueType","convertOntologyToValueTypeIr","Object","values","map","definitions","metadata","apiName","displayMetadata","status","versions","definition","version","baseType","constraints","exampleValues","fromEntries","entries","spt","sharedPropertyType","convertSpt","interfaceType","convertInterface","blockPermissionInformation","linkTypes","properties","allExtendsInterfaces","allLinks","allProperties","dumpOntologyFullMetadata","dumpValueTypeWireType","type","array","description","displayName","gothamMapping","typeClasses","visibility","subtype","convertType","aliases","baseFormatter","undefined","dataConstraints","indexedForSearch","provenance","markingType","geohash","precision","scale","analyzerOverride","enableAsciiFolding","isLongText","supportsExactMatching","mediaReference","distributeTypeHelper"],"sources":["defineOntology.js"],"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/** @internal */\nexport let ontologyDefinition;\n/** @internal */\nexport let namespace;\nexport async function defineOntology(ns, body) {\n namespace = ns;\n ontologyDefinition = {\n actionTypes: {},\n objectTypes: {},\n queryTypes: {},\n interfaceTypes: {},\n sharedPropertyTypes: {},\n valueTypes: {},\n };\n try {\n await body();\n }\n catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Unexpected error while processing the body of the ontology\", e);\n throw e;\n }\n return {\n ontology: convertToWireOntologyIr(ontologyDefinition),\n valueType: convertOntologyToValueTypeIr(ontologyDefinition),\n };\n}\nfunction convertOntologyToValueTypeIr(ontology) {\n return {\n valueTypes: Object.values(ontology.valueTypes).map(definitions => ({\n metadata: {\n apiName: definitions[0].apiName,\n displayMetadata: definitions[0].displayMetadata,\n status: definitions[0].status,\n },\n versions: definitions.map(definition => ({\n version: definition.version,\n baseType: definition.baseType,\n constraints: definition.constraints,\n exampleValues: definition.exampleValues,\n })),\n })),\n };\n}\nfunction convertToWireOntologyIr(ontology) {\n return {\n sharedPropertyTypes: Object.fromEntries(Object.entries(ontology.sharedPropertyTypes)\n .map(([apiName, spt]) => [apiName, { sharedPropertyType: convertSpt(spt) }])),\n interfaceTypes: Object.fromEntries(Object.entries(ontology.interfaceTypes)\n .map(([apiName, interfaceType]) => {\n return [apiName, {\n interfaceType: convertInterface(interfaceType),\n }];\n })),\n blockPermissionInformation: {\n actionTypes: {},\n linkTypes: {},\n objectTypes: {},\n },\n };\n}\nfunction convertInterface(interfaceType) {\n return {\n ...interfaceType,\n properties: Object.values(interfaceType.properties)\n .map((spt) => convertSpt(spt)),\n // these are omitted from our internal types but we need to re-add them for the final json\n allExtendsInterfaces: [],\n allLinks: [],\n allProperties: [],\n };\n}\nexport function dumpOntologyFullMetadata() {\n return convertToWireOntologyIr(ontologyDefinition);\n}\nexport function dumpValueTypeWireType() {\n return convertOntologyToValueTypeIr(ontologyDefinition);\n}\nfunction convertSpt({ type, array, description, apiName, displayName, gothamMapping, typeClasses, valueType, }) {\n return {\n apiName,\n displayMetadata: {\n displayName: displayName ?? apiName,\n visibility: \"NORMAL\",\n description,\n },\n type: array\n ? {\n type: \"array\",\n array: {\n subtype: convertType(type),\n },\n }\n : convertType(type),\n aliases: [],\n baseFormatter: undefined,\n dataConstraints: undefined,\n gothamMapping: gothamMapping,\n indexedForSearch: true,\n provenance: undefined,\n typeClasses: typeClasses ?? [],\n valueType: valueType,\n };\n}\nfunction convertType(type) {\n switch (type) {\n case \"marking\":\n return { type, [type]: { markingType: \"MANDATORY\" } };\n case \"geopoint\":\n return { type: \"geohash\", geohash: {} };\n case \"decimal\":\n return { type, [type]: { precision: undefined, scale: undefined } };\n case \"string\":\n return {\n type,\n [type]: {\n analyzerOverride: undefined,\n enableAsciiFolding: undefined,\n isLongText: false,\n supportsExactMatching: true,\n },\n };\n case \"mediaReference\":\n return {\n type: type,\n mediaReference: {},\n };\n default:\n // use helper function to distribute `type` properly\n return distributeTypeHelper(type);\n }\n}\n/**\n * Helper function to avoid duplication. Makes the types match properly with the correct\n * behavior without needing to switch on type.\n * @param type\n * @returns\n */\nfunction distributeTypeHelper(type) {\n return { type, [type]: {} }; // any cast to match conditional return type\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAIA,kBAAkB;AAC7B;AACA,OAAO,IAAIC,SAAS;AACpB,OAAO,eAAeC,cAAcA,CAACC,EAAE,EAAEC,IAAI,EAAE;EAC3CH,SAAS,GAAGE,EAAE;EACdH,kBAAkB,GAAG;IACjBK,WAAW,EAAE,CAAC,CAAC;IACfC,WAAW,EAAE,CAAC,CAAC;IACfC,UAAU,EAAE,CAAC,CAAC;IACdC,cAAc,EAAE,CAAC,CAAC;IAClBC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,UAAU,EAAE,CAAC;EACjB,CAAC;EACD,IAAI;IACA,MAAMN,IAAI,CAAC,CAAC;EAChB,CAAC,CACD,OAAOO,CAAC,EAAE;IACN;IACAC,OAAO,CAACC,KAAK,CAAC,4DAA4D,EAAEF,CAAC,CAAC;IAC9E,MAAMA,CAAC;EACX;EACA,OAAO;IACHG,QAAQ,EAAEC,uBAAuB,CAACf,kBAAkB,CAAC;IACrDgB,SAAS,EAAEC,4BAA4B,CAACjB,kBAAkB;EAC9D,CAAC;AACL;AACA,SAASiB,4BAA4BA,CAACH,QAAQ,EAAE;EAC5C,OAAO;IACHJ,UAAU,EAAEQ,MAAM,CAACC,MAAM,CAACL,QAAQ,CAACJ,UAAU,CAAC,CAACU,GAAG,CAACC,WAAW,KAAK;MAC/DC,QAAQ,EAAE;QACNC,OAAO,EAAEF,WAAW,CAAC,CAAC,CAAC,CAACE,OAAO;QAC/BC,eAAe,EAAEH,WAAW,CAAC,CAAC,CAAC,CAACG,eAAe;QAC/CC,MAAM,EAAEJ,WAAW,CAAC,CAAC,CAAC,CAACI;MAC3B,CAAC;MACDC,QAA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O,KAAK,EAAEP;QAAU;MAAE,CAAC;IACvE,KAAK,QAAQ;MACT,OAAO;QACHX,IAAI;QACJ,CAACA,IAAI,GAAG;UACJmB,gBAAgB,EAAER,SAAS;UAC3BS,kBAAkB,EAAET,SAAS;UAC7BU,UAAU,EAAE,KAAK;UACjBC,qBAAqB,EAAE;QAC3B;MACJ,CAAC;IACL,KAAK,gBAAgB;MACjB,OAAO;QACHtB,IAAI,EAAEA,IAAI;QACVuB,cAAc,EAAE,CAAC;MACrB,CAAC;IACL;MACI;MACA,OAAOC,oBAAoB,CAACxB,IAAI,CAAC;EACzC;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASwB,oBAAoBA,CAACxB,IAAI,EAAE;EAChC,OAAO;IAAEA,IAAI;IAAE,CAACA,IAAI,GAAG,CAAC;EAAE,CAAC,CAAC,CAAC;AACjC","ignoreList":[]}
1
+ {"version":3,"file":"defineOntology.js","names":["ontologyDefinition","namespace","defineOntology","ns","body","actionTypes","objectTypes","queryTypes","interfaceTypes","sharedPropertyTypes","valueTypes","importedTypes","e","console","error","ontology","convertToWireOntologyIr","valueType","convertOntologyToValueTypeIr","Object","values","map","definitions","metadata","apiName","displayMetadata","status","versions","definition","version","baseType","constraints","exampleValues","blockData","fromEntries","entries","objectType","convertObject","spt","sharedPropertyType","convertSpt","interfaceType","convertInterface","blockPermissionInformation","linkTypes","propertyDatasource","properties","forEach","property","type","column","datasource","rid","concat","datasetV2","datasetRid","propertyMapping","editsConfiguration","onlyAllowPrivilegedEdits","redacted","implementations","implementsInterfaces","description","displayName","groupDisplayName","undefined","icon","blueprint","locator","color","pluralDisplayName","visibility","primaryKeys","propertyTypes","val","convertProperty","titlePropertyTypeRid","titlePropertyApiName","active","implementsInterfaces2","impl","interfaceTypeApiName","implements","mapping","interfaceProperty","propertyTypeRid","mapsTo","allImplementsInterfaces","datasources","entityMetadata","arePatchesEnabled","editsEnabled","output","sharedPropertyTypeApiName","indexedForSearch","ruleSetBinding","baseFormatter","convertType","typeClasses","inlineAction","dataConstraints","sharedPropertyTypeRid","allExtendsInterfaces","allLinks","allProperties","dumpOntologyFullMetadata","dumpValueTypeWireType","array","gothamMapping","dataConstraint","propertyTypeConstraints","nullability","nullabilityV2","noEmptyCollections","noNulls","subtype","aliases","provenance","marking","markingType","structFields","Array","key","structDefinition","fieldTypeDefinition","field","fieldType","push","struct","geohash","precision","scale","analyzerOverride","enableAsciiFolding","isLongText","supportsEfficientLeadingWildcard","supportsExactMatching","mediaReference","distributeTypeHelper"],"sources":["defineOntology.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * 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 OntologyIr,\n OntologyIrInterfaceType,\n OntologyIrInterfaceTypeBlockDataV2,\n OntologyIrObjectTypeBlockDataV2,\n OntologyIrObjectTypeDatasource,\n OntologyIrPropertyType,\n OntologyIrSharedPropertyType,\n OntologyIrSharedPropertyTypeBlockDataV2,\n OntologyIrStructFieldType,\n OntologyIrType,\n OntologyIrValueTypeBlockData,\n OntologyIrValueTypeBlockDataEntry,\n PropertyTypeMappingInfo,\n} from \"@osdk/client.unstable\";\nimport type {\n InterfaceType,\n ObjectPropertyType,\n ObjectType,\n Ontology,\n PropertyTypeType,\n SharedPropertyType,\n} from \"./types.js\";\n\n/** @internal */\nexport let ontologyDefinition: Ontology;\n\n/** @internal */\nexport let namespace: string;\n\ntype OntologyAndValueTypeIrs = {\n ontology: OntologyIr;\n valueType: OntologyIrValueTypeBlockData;\n};\n\nexport async function defineOntology(\n ns: string,\n body: () => void | Promise<void>,\n): Promise<OntologyAndValueTypeIrs> {\n namespace = ns;\n ontologyDefinition = {\n actionTypes: {},\n objectTypes: {},\n queryTypes: {},\n interfaceTypes: {},\n sharedPropertyTypes: {},\n valueTypes: {},\n importedTypes: {\n sharedPropertyTypes: [],\n },\n };\n\n try {\n await body();\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\n \"Unexpected error while processing the body of the ontology\",\n e,\n );\n throw e;\n }\n\n return {\n ontology: convertToWireOntologyIr(ontologyDefinition),\n valueType: convertOntologyToValueTypeIr(ontologyDefinition),\n };\n}\n\nfunction convertOntologyToValueTypeIr(\n ontology: Ontology,\n): OntologyIrValueTypeBlockData {\n return {\n valueTypes: Object.values(ontology.valueTypes).map<\n OntologyIrValueTypeBlockDataEntry\n >(definitions => ({\n metadata: {\n apiName: definitions[0].apiName,\n displayMetadata: definitions[0].displayMetadata,\n status: definitions[0].status,\n },\n versions: definitions.map(definition => ({\n version: definition.version,\n baseType: definition.baseType,\n constraints: definition.constraints,\n exampleValues: definition.exampleValues,\n })),\n })),\n };\n}\n\nfunction convertToWireOntologyIr(\n ontology: Ontology,\n): OntologyIr {\n return {\n blockData: {\n objectTypes: Object.fromEntries(\n Object.entries(ontology.objectTypes).map<\n [string, OntologyIrObjectTypeBlockDataV2]\n >(([apiName, objectType]) => {\n return [apiName, convertObject(objectType)];\n }),\n ),\n sharedPropertyTypes: Object.fromEntries(\n Object.entries(\n ontology.sharedPropertyTypes,\n )\n .map<[string, OntologyIrSharedPropertyTypeBlockDataV2]>((\n [apiName, spt],\n ) => [apiName, { sharedPropertyType: convertSpt(spt) }]),\n ),\n interfaceTypes: Object.fromEntries(\n Object.entries(\n ontology.interfaceTypes,\n )\n .map<[string, OntologyIrInterfaceTypeBlockDataV2]>(\n ([apiName, interfaceType]) => {\n return [apiName, {\n interfaceType: convertInterface(interfaceType),\n }];\n },\n ),\n ),\n blockPermissionInformation: {\n actionTypes: {},\n linkTypes: {},\n objectTypes: {},\n },\n },\n importedTypes: ontology.importedTypes,\n };\n}\n\nfunction convertObject(\n objectType: ObjectType,\n): OntologyIrObjectTypeBlockDataV2 {\n const propertyDatasource: Record<string, PropertyTypeMappingInfo> = {};\n (objectType.properties ?? []).forEach((property) => {\n propertyDatasource[property.apiName] = {\n type: \"column\",\n column: property.apiName,\n };\n });\n\n const datasource: OntologyIrObjectTypeDatasource = {\n rid: \"ri.ontology.main.datasource.\".concat(objectType.apiName),\n datasource: {\n type: \"datasetV2\",\n datasetV2: {\n datasetRid: objectType.apiName,\n propertyMapping: propertyDatasource,\n },\n },\n editsConfiguration: {\n onlyAllowPrivilegedEdits: false,\n },\n redacted: false,\n };\n\n const implementations = objectType.implementsInterfaces ?? [];\n\n return {\n objectType: {\n displayMetadata: {\n description: objectType.description,\n displayName: objectType.displayName,\n groupDisplayName: undefined,\n icon: {\n type: \"blueprint\",\n blueprint: objectType.icon ?? { locator: \"cube\", color: \"#2D72D2\" },\n },\n pluralDisplayName: objectType.pluralDisplayName,\n visibility: objectType.visibility ?? \"NORMAL\",\n },\n primaryKeys: objectType.primaryKeys,\n propertyTypes: Object.fromEntries(\n objectType.properties?.map<[string, OntologyIrPropertyType]>(\n val => [val.apiName, convertProperty(val)],\n ) ?? [],\n ),\n titlePropertyTypeRid: objectType.titlePropertyApiName,\n apiName: objectType.apiName,\n status: objectType.status ?? {\n type: \"active\",\n active: {},\n },\n redacted: false,\n implementsInterfaces2: implementations.map(impl => ({\n interfaceTypeApiName: impl.implements.apiName,\n properties: Object.fromEntries(\n impl.propertyMapping.map(\n mapping => [namespace + mapping.interfaceProperty, {\n propertyTypeRid: mapping.mapsTo,\n }],\n ),\n ),\n })),\n allImplementsInterfaces: {},\n },\n datasources: [datasource],\n entityMetadata: { arePatchesEnabled: objectType.editsEnabled ?? false },\n };\n}\n\nfunction convertProperty(property: ObjectPropertyType): OntologyIrPropertyType {\n const output: OntologyIrPropertyType = {\n apiName: property.apiName,\n sharedPropertyTypeApiName: property.sharedPropertyType?.apiName,\n displayMetadata: {\n displayName: property.displayName,\n description: property.description,\n visibility: property.visibility ?? \"NORMAL\",\n },\n indexedForSearch: property.indexedForSearch ?? true,\n ruleSetBinding: undefined,\n baseFormatter: property.baseFormatter,\n type: convertType(property.type),\n typeClasses: property.typeClasses ?? [],\n status: property.status ?? { type: \"active\", active: {} },\n inlineAction: undefined,\n dataConstraints: property.dataConstraints,\n sharedPropertyTypeRid: property.sharedPropertyType?.apiName,\n valueType: undefined,\n };\n return output;\n}\n\nfunction convertInterface(\n interfaceType: InterfaceType,\n): OntologyIrInterfaceType {\n return {\n ...interfaceType,\n properties: Object.values(interfaceType.properties)\n .map<OntologyIrSharedPropertyType>((spt) => convertSpt(spt)),\n // these are omitted from our internal types but we need to re-add them for the final json\n allExtendsInterfaces: [],\n allLinks: [],\n allProperties: [],\n };\n}\n\nexport function dumpOntologyFullMetadata(): OntologyIr {\n return convertToWireOntologyIr(ontologyDefinition);\n}\n\nexport function dumpValueTypeWireType(): OntologyIrValueTypeBlockData {\n return convertOntologyToValueTypeIr(ontologyDefinition);\n}\n\nfunction convertSpt(\n {\n type,\n array,\n description,\n apiName,\n displayName,\n gothamMapping,\n typeClasses,\n valueType,\n }: SharedPropertyType,\n): OntologyIrSharedPropertyType {\n const dataConstraint:\n | OntologyIrSharedPropertyType[\"dataConstraints\"]\n | undefined = (typeof type === \"object\" && type.type === \"marking\")\n ? {\n propertyTypeConstraints: [],\n nullability: undefined,\n nullabilityV2: { noEmptyCollections: true, noNulls: true },\n }\n : undefined;\n return {\n apiName,\n displayMetadata: {\n displayName: displayName ?? apiName,\n visibility: \"NORMAL\",\n description,\n },\n type: array\n ? {\n type: \"array\" as const,\n array: {\n subtype: convertType(type),\n },\n }\n : convertType(type),\n aliases: [],\n baseFormatter: undefined,\n dataConstraints: dataConstraint,\n gothamMapping: gothamMapping,\n indexedForSearch: true,\n provenance: undefined,\n typeClasses: typeClasses ?? [],\n valueType: valueType,\n };\n}\n\nfunction convertType(\n type: PropertyTypeType,\n): OntologyIrType {\n switch (true) {\n case (typeof type === \"object\" && \"markingType\" in type):\n return {\n \"type\": \"marking\",\n marking: { markingType: type.markingType },\n };\n\n case (typeof type === \"object\" && \"structDefinition\" in type):\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: convertType(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: convertType(fieldTypeDefinition.fieldType),\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: convertType(fieldTypeDefinition),\n };\n }\n }\n\n structFields.push(field);\n }\n\n return {\n type: \"struct\",\n struct: { structFields },\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 default:\n // use helper function to distribute `type` properly\n return distributeTypeHelper(type);\n }\n}\n\n/**\n * Helper function to avoid duplication. Makes the types match properly with the correct\n * behavior without needing to switch on type.\n * @param type\n * @returns\n */\nfunction distributeTypeHelper<T extends string>(\n type: T,\n): T extends any ? { type: T } & { [K in T]: {} } : never {\n return { type, [type]: {} } as any; // any cast to match conditional return type\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA;AACA,OAAO,IAAIA,kBAA4B;;AAEvC;AACA,OAAO,IAAIC,SAAiB;AAO5B,OAAO,eAAeC,cAAcA,CAClCC,EAAU,EACVC,IAAgC,EACE;EAClCH,SAAS,GAAGE,EAAE;EACdH,kBAAkB,GAAG;IACnBK,WAAW,EAAE,CAAC,CAAC;IACfC,WAAW,EAAE,CAAC,CAAC;IACfC,UAAU,EAAE,CAAC,CAAC;IACdC,cAAc,EAAE,CAAC,CAAC;IAClBC,mBAAmB,EAAE,CAAC,CAAC;IACvBC,UAAU,EAAE,CAAC,CAAC;IACdC,aAAa,EAAE;MACbF,mBAAmB,EAAE;IACvB;EACF,CAAC;EAED,IAAI;IACF,MAAML,IAAI,CAAC,CAAC;EACd,CAAC,CAAC,OAAOQ,CAAC,EAAE;IACV;IACAC,OAAO,CAACC,KAAK,CACX,4DAA4D,EAC5DF,CACF,CAAC;IACD,MAAMA,CAAC;EACT;EAEA,OAAO;IACLG,QAAQ,EAAEC,uBAAuB,CAAChB,kBAAkB,CAAC;IACrDiB,SAAS,EAAEC,4BAA4B,CAAClB,kBAAkB;EAC5D,CAAC;AACH;AAEA,SAASkB,4BAA4BA,CACnCH,QAAkB,EACY;EAC9B,OAAO;IACLL,UAAU,EAAES,MAAM,CAACC,MAAM,CAACL,QAA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EAAE,QAAQ;QACd+E,MAAM,EAAE;UAAER;QAAa;MACzB,CAAC;IAEH,KAAMvE,IAAI,KAAK,UAAU;MACvB,OAAO;QAAEA,IAAI,EAAE,SAAS;QAAEgF,OAAO,EAAE,CAAC;MAAE,CAAC;IAEzC,KAAMhF,IAAI,KAAK,SAAS;MACtB,OAAO;QAAEA,IAAI;QAAE,CAACA,IAAI,GAAG;UAAEiF,SAAS,EAAEjE,SAAS;UAAEkE,KAAK,EAAElE;QAAU;MAAE,CAAC;IAErE,KAAMhB,IAAI,KAAK,QAAQ;MACrB,OAAO;QACLA,IAAI;QACJ,CAACA,IAAI,GAAG;UACNmF,gBAAgB,EAAEnE,SAAS;UAC3BoE,kBAAkB,EAAEpE,SAAS;UAC7BqE,UAAU,EAAE,KAAK;UACjBC,gCAAgC,EAAE,KAAK;UACvCC,qBAAqB,EAAE;QACzB;MACF,CAAC;IAEH,KAAMvF,IAAI,KAAK,gBAAgB;MAC7B,OAAO;QACLA,IAAI,EAAEA,IAAI;QACVwF,cAAc,EAAE,CAAC;MACnB,CAAC;IAEH;MACE;MACA,OAAOC,oBAAoB,CAACzF,IAAI,CAAC;EACrC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAASyF,oBAAoBA,CAC3BzF,IAAO,EACiD;EACxD,OAAO;IAAEA,IAAI;IAAE,CAACA,IAAI,GAAG,CAAC;EAAE,CAAC,CAAQ,CAAC;AACtC","ignoreList":[]}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import invariant from "tiny-invariant";
17
18
  import { namespace, ontologyDefinition } from "./defineOntology.js";
18
19
  const defaultTypeClasses = [{
@@ -24,10 +25,11 @@ const defaultTypeClasses = [{
24
25
  }];
25
26
  export function defineSharedPropertyType(opts) {
26
27
  const apiName = namespace + opts.apiName;
27
- !(ontologyDefinition.sharedPropertyTypes[apiName] === undefined) ? invariant(false, `Shared property type ${apiName} already exists`) : void 0;
28
+ !(ontologyDefinition.sharedPropertyTypes[apiName] === undefined) ? process.env.NODE_ENV !== "production" ? invariant(false, `Shared property type ${apiName} already exists`) : invariant(false) : void 0;
28
29
  return ontologyDefinition.sharedPropertyTypes[apiName] = {
29
30
  ...opts,
30
31
  apiName,
32
+ nonNameSpacedApiName: opts.apiName,
31
33
  displayName: opts.displayName ?? opts.apiName,
32
34
  // This way the non-namespaced api name is the display name (maybe not ideal)
33
35
  typeClasses: opts.typeClasses ?? defaultTypeClasses
@@ -1 +1 @@
1
- {"version":3,"file":"defineSpt.js","names":["invariant","namespace","ontologyDefinition","defaultTypeClasses","kind","name","defineSharedPropertyType","opts","apiName","sharedPropertyTypes","undefined","displayName","typeClasses"],"sources":["defineSpt.js"],"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 */\nimport invariant from \"tiny-invariant\";\nimport { namespace, ontologyDefinition } from \"./defineOntology.js\";\nconst defaultTypeClasses = [{\n kind: \"render_hint\",\n name: \"SELECTABLE\",\n }, { kind: \"render_hint\", name: \"SORTABLE\" }];\nexport function defineSharedPropertyType(opts) {\n const apiName = namespace + opts.apiName;\n invariant(ontologyDefinition.sharedPropertyTypes[apiName] === undefined, `Shared property type ${apiName} already exists`);\n return ontologyDefinition.sharedPropertyTypes[apiName] = {\n ...opts,\n apiName,\n displayName: opts.displayName ?? opts.apiName, // This way the non-namespaced api name is the display name (maybe not ideal)\n typeClasses: opts.typeClasses ?? defaultTypeClasses,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,SAAS,EAAEC,kBAAkB,QAAQ,qBAAqB;AACnE,MAAMC,kBAAkB,GAAG,CAAC;EACpBC,IAAI,EAAE,aAAa;EACnBC,IAAI,EAAE;AACV,CAAC,EAAE;EAAED,IAAI,EAAE,aAAa;EAAEC,IAAI,EAAE;AAAW,CAAC,CAAC;AACjD,OAAO,SAASC,wBAAwBA,CAACC,IAAI,EAAE;EAC3C,MAAMC,OAAO,GAAGP,SAAS,GAAGM,IAAI,CAACC,OAAO;EACxC,EAAUN,kBAAkB,CAACO,mBAAmB,CAACD,OAAO,CAAC,KAAKE,SAAS,IAAvEV,SAAS,QAAgE,wBAAwBQ,OAAO,iBAAiB;EACzH,OAAON,kBAAkB,CAACO,mBAAmB,CAACD,OAAO,CAAC,GAAG;IACrD,GAAGD,IAAI;IACPC,OAAO;IACPG,WAAW,EAAEJ,IAAI,CAACI,WAAW,IAAIJ,IAAI,CAACC,OAAO;IAAE;IAC/CI,WAAW,EAAEL,IAAI,CAACK,WAAW,IAAIT;EACrC,CAAC;AACL","ignoreList":[]}
1
+ {"version":3,"file":"defineSpt.js","names":["invariant","namespace","ontologyDefinition","defaultTypeClasses","kind","name","defineSharedPropertyType","opts","apiName","sharedPropertyTypes","undefined","process","env","NODE_ENV","nonNameSpacedApiName","displayName","typeClasses"],"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 ApiNameValueTypeReference,\n SharedPropertyTypeGothamMapping,\n} from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { namespace, ontologyDefinition } from \"./defineOntology.js\";\nimport type { PropertyTypeType, SharedPropertyType } from \"./types.js\";\n\nconst defaultTypeClasses: SharedPropertyType[\"typeClasses\"] = [{\n kind: \"render_hint\",\n name: \"SELECTABLE\",\n}, { kind: \"render_hint\", name: \"SORTABLE\" }];\n\nexport function defineSharedPropertyType(\n opts: {\n apiName: string;\n type: PropertyTypeType;\n array?: boolean;\n description?: string;\n displayName?: string;\n valueType?: ApiNameValueTypeReference;\n typeClasses?: SharedPropertyType[\"typeClasses\"];\n gothamMapping?: SharedPropertyTypeGothamMapping;\n },\n): SharedPropertyType {\n const apiName = namespace + opts.apiName;\n invariant(\n ontologyDefinition.sharedPropertyTypes[apiName] === undefined,\n `Shared property type ${apiName} already exists`,\n );\n\n return ontologyDefinition.sharedPropertyTypes[apiName] = {\n ...opts,\n apiName,\n nonNameSpacedApiName: opts.apiName,\n displayName: opts.displayName ?? opts.apiName, // This way the non-namespaced api name is the display name (maybe not ideal)\n typeClasses: opts.typeClasses ?? defaultTypeClasses,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,SAAS,EAAEC,kBAAkB,QAAQ,qBAAqB;AAGnE,MAAMC,kBAAqD,GAAG,CAAC;EAC7DC,IAAI,EAAE,aAAa;EACnBC,IAAI,EAAE;AACR,CAAC,EAAE;EAAED,IAAI,EAAE,aAAa;EAAEC,IAAI,EAAE;AAAW,CAAC,CAAC;AAE7C,OAAO,SAASC,wBAAwBA,CACtCC,IASC,EACmB;EACpB,MAAMC,OAAO,GAAGP,SAAS,GAAGM,IAAI,CAACC,OAAO;EACxC,EACEN,kBAAkB,CAACO,mBAAmB,CAACD,OAAO,CAAC,KAAKE,SAAS,IAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAD/Db,SAAS,QAEP,wBAAwBQ,OAAO,iBAAiB,IAFlDR,SAAS;EAKT,OAAOE,kBAAkB,CAACO,mBAAmB,CAACD,OAAO,CAAC,GAAG;IACvD,GAAGD,IAAI;IACPC,OAAO;IACPM,oBAAoB,EAAEP,IAAI,CAACC,OAAO;IAClCO,WAAW,EAAER,IAAI,CAACQ,WAAW,IAAIR,IAAI,CAACC,OAAO;IAAE;IAC/CQ,WAAW,EAAET,IAAI,CAACS,WAAW,IAAIb;EACnC,CAAC;AACH","ignoreList":[]}
@@ -13,30 +13,77 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+
16
17
  import invariant from "tiny-invariant";
17
18
  import { ontologyDefinition } from "./defineOntology.js";
19
+ function convertValueTypeTypeToBaseType(valueType) {
20
+ if (typeof valueType === "string") {}
21
+ switch (true) {
22
+ case typeof valueType === "object" && valueType.type === "array":
23
+ return {
24
+ type: "array",
25
+ array: {
26
+ elementType: convertValueTypeTypeToBaseType(valueType.elementType)
27
+ }
28
+ };
29
+ case typeof valueType === "object" && valueType.type === "struct":
30
+ return {
31
+ type: "structV2",
32
+ structV2: {
33
+ fields: valueType.fields.map(field => ({
34
+ identifier: field.identifier,
35
+ baseType: convertValueTypeTypeToBaseType(field.baseType)
36
+ }))
37
+ }
38
+ };
39
+ case typeof valueType === "object" && valueType.type === "map":
40
+ return {
41
+ type: "map",
42
+ map: {
43
+ keyType: convertValueTypeTypeToBaseType(valueType.keyType),
44
+ valueType: convertValueTypeTypeToBaseType(valueType.valueType)
45
+ }
46
+ };
47
+ case typeof valueType === "object" && valueType.type === "optional":
48
+ return {
49
+ type: "optional",
50
+ optional: {
51
+ wrappedType: convertValueTypeTypeToBaseType(valueType.wrappedType)
52
+ }
53
+ };
54
+ case typeof valueType === "string":
55
+ return {
56
+ type: valueType,
57
+ [valueType]: {}
58
+ };
59
+ default:
60
+ throw new Error("Invalid ValueTypeType");
61
+ }
62
+ }
18
63
  export function defineValueType(opts) {
19
64
  const {
20
65
  apiName,
21
66
  displayName,
22
67
  description,
23
- typeAndConstraints,
68
+ type,
24
69
  version
25
70
  } = opts;
26
- !/^((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$/.test(version) ? invariant(false, "Version is not a valid semver") : void 0;
71
+ !/^((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$/.test(version) ? process.env.NODE_ENV !== "production" ? invariant(false, "Version is not a valid semver") : invariant(false) : void 0;
72
+ const typeName = typeof type.type === "string" ? type.type : type.type.type === "struct" ? "structV2" : type.type.type;
27
73
  // These suck but TS doesn't understand the relationship from the key of the base type to the type string
28
- const constraints = typeAndConstraints.constraints ? typeAndConstraints.constraints.map(constraint => {
29
- return {
74
+ const constraints = type.constraints ? type.constraints.map(constraint => {
75
+ const output = {
30
76
  constraint: {
31
- [Object.keys(constraint["constraint"])[0]]: Object.keys(constraint["constraint"])[0],
32
- ...constraint
33
- }
77
+ type: typeName,
78
+ [typeName]: constraint.constraint
79
+ },
80
+ failureMessage: constraint.failureMessage
81
+ };
82
+ return {
83
+ constraint: output
34
84
  };
35
85
  }) : [];
36
- const baseType = {
37
- [Object.keys(typeAndConstraints.baseType)[0]]: Object.keys(typeAndConstraints.baseType)[0],
38
- ...typeAndConstraints.baseType
39
- };
86
+ const baseType = convertValueTypeTypeToBaseType(type.type);
40
87
  const vt = {
41
88
  apiName,
42
89
  displayMetadata: {
@@ -1 +1 @@
1
- {"version":3,"file":"defineValueType.js","names":["invariant","ontologyDefinition","defineValueType","opts","apiName","displayName","description","typeAndConstraints","version","test","constraints","map","constraint","Object","keys","baseType","vt","displayMetadata","status","type","active","exampleValues","valueTypes","undefined","push"],"sources":["defineValueType.js"],"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 */\nimport invariant from \"tiny-invariant\";\nimport { ontologyDefinition } from \"./defineOntology.js\";\nexport function defineValueType(opts) {\n const { apiName, displayName, description, typeAndConstraints, version } = opts;\n const semverValidation = /^((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$/;\n invariant(semverValidation.test(version), \"Version is not a valid semver\");\n // These suck but TS doesn't understand the relationship from the key of the base type to the type string\n const constraints = typeAndConstraints.constraints\n ? typeAndConstraints.constraints.map(constraint => {\n return {\n constraint: {\n [Object.keys(constraint[\"constraint\"])[0]]: Object.keys(constraint[\"constraint\"])[0],\n ...constraint,\n },\n };\n })\n : [];\n const baseType = {\n [Object.keys(typeAndConstraints.baseType)[0]]: Object.keys(typeAndConstraints.baseType)[0],\n ...typeAndConstraints.baseType,\n };\n const vt = {\n apiName,\n displayMetadata: {\n displayName: displayName,\n description: description ?? \"\",\n },\n status: { type: \"active\", active: {} },\n version: version,\n baseType: baseType,\n constraints: constraints,\n exampleValues: [],\n };\n if (ontologyDefinition.valueTypes[apiName] === undefined) {\n ontologyDefinition.valueTypes[apiName] = [];\n }\n ontologyDefinition.valueTypes[apiName].push(vt);\n return vt;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AC;EACD,IAAIpB,kBAAkB,CAACqB,UAAU,CAAClB,OAAO,CAAC,KAAKmB,SAAS,EAAE;IACtDtB,kBAAkB,CAACqB,UAAU,CAAClB,OAAO,CAAC,GAAG,EAAE;EAC/C;EACAH,kBAAkB,CAACqB,UAAU,CAAClB,OAAO,CAAC,CAACoB,IAAI,CAACR,EAAE,CAAC;EAC/C,OAAOA,EAAE;AACb","ignoreList":[]}
1
+ {"version":3,"file":"defineValueType.js","names":["invariant","ontologyDefinition","convertValueTypeTypeToBaseType","valueType","type","array","elementType","structV2","fields","map","field","identifier","baseType","keyType","optional","wrappedType","Error","defineValueType","opts","apiName","displayName","description","version","test","process","env","NODE_ENV","typeName","constraints","constraint","output","failureMessage","vt","displayMetadata","status","active","exampleValues","valueTypes","undefined","push"],"sources":["defineValueType.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 BaseType,\n DataConstraint,\n DataConstraintWrapper,\n FailureMessage,\n ValueTypeDataConstraint,\n} from \"@osdk/client.unstable\";\nimport invariant from \"tiny-invariant\";\nimport { ontologyDefinition } from \"./defineOntology.js\";\nimport type { ValueTypeDefinitionVersion, ValueTypeType } from \"./types.js\";\n\ntype ZipBaseAndConstraint<Base, Constraint> = {\n [PropertyType in (BaseType[\"type\"] & DataConstraint[\"type\"])]: Base extends\n { type: PropertyType } ? {\n baseType: Omit<Base, \"type\">;\n constraints?: Constraint extends { type: PropertyType } ? {\n constraint: Omit<Constraint, \"type\">;\n failureMessage?: FailureMessage;\n }[]\n : undefined;\n }\n : never;\n};\n\ntype MappedZip = ZipBaseAndConstraint<BaseType, DataConstraint>;\n\ntype TypeNames = ValueTypeType[\"type\"];\n\ntype ValueTypeDefinitionBacking = {\n [Type in ValueTypeType[\"type\"] & DataConstraint[\"type\"]]: {\n baseType: { \"type\": Extract<ValueTypeType, { type: Type }>[\"value\"] } & {\n constraints: {\n constraint: Extract<\n DataConstraint,\n { type: Type }\n >[keyof Omit<Extract<DataConstraint, { type: Type }>, \"type\">];\n failureMessage?: FailureMessage;\n }[];\n };\n };\n};\n\ntype NewValueTypeDefinitionBacking = {\n [Type in ValueTypeType as Type[\"type\"]]: {\n type: Type[\"value\"];\n constraints?: Type[\"constraints\"];\n };\n};\ntype NewValueTypeDefinition =\n NewValueTypeDefinitionBacking[keyof NewValueTypeDefinitionBacking];\n\nfunction convertValueTypeTypeToBaseType(\n valueType: ValueTypeType[\"value\"],\n): BaseType {\n if (typeof valueType === \"string\") {\n }\n switch (true) {\n case (typeof valueType === \"object\" && valueType.type === \"array\"):\n return {\n type: \"array\",\n array: {\n elementType: convertValueTypeTypeToBaseType(valueType.elementType),\n },\n };\n case (typeof valueType === \"object\" && valueType.type === \"struct\"):\n return {\n type: \"structV2\",\n structV2: {\n fields: valueType.fields.map(field => ({\n identifier: field.identifier,\n baseType: convertValueTypeTypeToBaseType(field.baseType),\n })),\n },\n };\n case (typeof valueType === \"object\" && valueType.type === \"map\"):\n return {\n type: \"map\",\n map: {\n keyType: convertValueTypeTypeToBaseType(valueType.keyType),\n valueType: convertValueTypeTypeToBaseType(valueType.valueType),\n },\n };\n case (typeof valueType === \"object\" && valueType.type === \"optional\"):\n return {\n type: \"optional\",\n optional: {\n wrappedType: convertValueTypeTypeToBaseType(valueType.wrappedType),\n },\n };\n case (typeof valueType === \"string\"):\n return { type: valueType, [valueType]: {} } as any;\n default:\n throw new Error(\"Invalid ValueTypeType\");\n }\n}\n\nexport function defineValueType(\n opts: {\n apiName: string;\n displayName: string;\n description?: string;\n type: NewValueTypeDefinition;\n version: string;\n },\n): ValueTypeDefinitionVersion {\n const { apiName, displayName, description, type, version } = opts;\n const semverValidation =\n /^((([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$/;\n invariant(semverValidation.test(version), \"Version is not a valid semver\");\n\n const typeName: TypeNames = typeof type.type === \"string\"\n ? type.type\n : type.type.type === \"struct\"\n ? \"structV2\"\n : type.type.type;\n // These suck but TS doesn't understand the relationship from the key of the base type to the type string\n const constraints = type.constraints\n ? type.constraints.map<ValueTypeDataConstraint>(constraint => {\n const output: any = {\n constraint: { type: typeName, [typeName]: constraint.constraint },\n failureMessage: constraint.failureMessage,\n };\n return { constraint: output as DataConstraintWrapper };\n })\n : [];\n\n const baseType: BaseType = convertValueTypeTypeToBaseType(type.type);\n\n const vt: ValueTypeDefinitionVersion = {\n apiName,\n displayMetadata: {\n displayName: displayName,\n description: description ?? \"\",\n },\n status: { type: \"active\", active: {} },\n version: version,\n baseType: baseType,\n constraints: constraints,\n exampleValues: [],\n };\n if (ontologyDefinition.valueTypes[apiName] === undefined) {\n ontologyDefinition.valueTypes[apiName] = [];\n }\n ontologyDefinition.valueTypes[apiName].push(vt);\n return vt;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,kBAAkB,QAAQ,qBAAqB;AA2CxD,SAASC,8BAA8BA,CACrCC,SAAiC,EACvB;EACV,IAAI,OAAOA,SAAS,KAAK,QAAQ,EAAE,CACnC;EACA,QAAQ,IAAI;IACV,KAAM,OAAOA,SAAS,KAAK,QAAQ,IAAIA,SAAS,CAACC,IAAI,KAAK,OAAO;MAC/D,OAAO;QACLA,IAAI,EAAE,OAAO;QACbC,KAAK,EAAE;UACLC,WAAW,E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AAI,CAACP,EAAE,CAAC;EAC/C,OAAOA,EAAE;AACX","ignoreList":[]}
@@ -1,17 +1,2 @@
1
- /*
2
- * Copyright 2024 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
1
  export {};
17
2
  //# sourceMappingURL=iconNames.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"iconNames.js","names":[],"sources":["iconNames.js"],"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 */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"iconNames.js","names":[],"sources":["iconNames.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\n// This copy paste is bad but fine for now\nexport type BlueprintIcon =\n | \"add-clip\"\n | \"add-column-left\"\n | \"add-column-right\"\n | \"add-location\"\n | \"add-row-bottom\"\n | \"add-row-top\"\n | \"add-to-artifact\"\n | \"add-to-folder\"\n | \"add\"\n | \"aimpoints-target\"\n | \"airplane\"\n | \"align-center\"\n | \"align-justify\"\n | \"align-left\"\n | \"align-right\"\n | \"alignment-bottom\"\n | \"alignment-horizontal-center\"\n | \"alignment-left\"\n | \"alignment-right\"\n | \"alignment-top\"\n | \"alignment-vertical-center\"\n | \"ammunition\"\n | \"anchor\"\n | \"annotation\"\n | \"antenna\"\n | \"app-header\"\n | \"application\"\n | \"applications\"\n | \"archive\"\n | \"area-of-interest\"\n | \"array-boolean\"\n | \"array-date\"\n | \"array-floating-point\"\n | \"array-numeric\"\n | \"array-string\"\n | \"array-timestamp\"\n | \"array\"\n | \"arrow-bottom-left\"\n | \"arrow-bottom-right\"\n | \"arrow-down\"\n | \"arrow-left\"\n | \"arrow-right\"\n | \"arrow-top-left\"\n | \"arrow-top-right\"\n | \"arrow-up\"\n | \"arrows-horizontal\"\n | \"arrows-vertical\"\n | \"asterisk\"\n | \"at\"\n | \"automatic-updates\"\n | \"axle\"\n | \"backlink\"\n | \"backward-ten\"\n | \"badge\"\n | \"ban-circle\"\n | \"bank-account\"\n | \"barcode\"\n | \"binary-number\"\n | \"blank\"\n | \"blocked-person\"\n | \"bold\"\n | \"book\"\n | \"bookmark\"\n | \"box\"\n | \"briefcase\"\n | \"bring-data\"\n | \"bring-forward\"\n | \"bug\"\n | \"buggy\"\n | \"build\"\n | \"bullseye\"\n | \"calculator\"\n | \"calendar\"\n | \"camera\"\n | \"caret-down\"\n | \"caret-left\"\n | \"caret-right\"\n | \"caret-up\"\n | \"cargo-ship\"\n | \"cell-tower\"\n | \"changes\"\n | \"chart\"\n | \"chat\"\n | \"chevron-backward\"\n | \"chevron-down\"\n | \"chevron-forward\"\n | \"chevron-left\"\n | \"chevron-right\"\n | \"chevron-up\"\n | \"circle-arrow-down\"\n | \"circle-arrow-left\"\n | \"circle-arrow-right\"\n | \"circle-arrow-up\"\n | \"circle\"\n | \"citation\"\n | \"clean\"\n | \"clip\"\n | \"clipboard-file\"\n | \"clipboard\"\n | \"cloud-download\"\n | \"cloud-server\"\n | \"cloud-tick\"\n | \"cloud-upload\"\n | \"cloud\"\n | \"code-block\"\n | \"code\"\n | \"cog\"\n | \"collapse-all\"\n | \"color-fill\"\n | \"column-layout\"\n | \"comment\"\n | \"comparison\"\n | \"compass\"\n | \"compressed\"\n | \"confirm\"\n | \"console\"\n | \"contrast\"\n | \"control\"\n | \"credit-card\"\n | \"crop\"\n | \"cross-circle\"\n | \"cross\"\n | \"crown\"\n | \"css-style\"\n | \"cube-add\"\n | \"cube-remove\"\n | \"cube\"\n | \"curly-braces\"\n | \"curved-range-chart\"\n | \"cut\"\n | \"cycle\"\n | \"dashboard\"\n | \"data-connection\"\n | \"data-lineage\"\n | \"data-search\"\n | \"data-sync\"\n | \"database\"\n | \"delete\"\n | \"delta\"\n | \"derive-column\"\n | \"desktop\"\n | \"detection\"\n | \"diagnosis\"\n | \"diagram-tree\"\n | \"direction-left\"\n | \"direction-right\"\n | \"disable\"\n | \"divide\"\n | \"document-open\"\n | \"document-share\"\n | \"document\"\n | \"dollar\"\n | \"dot\"\n | \"double-caret-horizontal\"\n | \"double-caret-vertical\"\n | \"double-chevron-down\"\n | \"double-chevron-left\"\n | \"double-chevron-right\"\n | \"double-chevron-up\"\n | \"doughnut-chart\"\n | \"download\"\n | \"drag-handle-horizontal\"\n | \"drag-handle-vertical\"\n | \"draw\"\n | \"drawer-left-filled\"\n | \"drawer-left\"\n | \"drawer-right-filled\"\n | \"drawer-right\"\n | \"drive-time\"\n | \"duplicate\"\n | \"edit\"\n | \"eject\"\n | \"emoji\"\n | \"endnote\"\n | \"endorsed\"\n | \"envelope\"\n | \"equals\"\n | \"eraser\"\n | \"error\"\n | \"euro\"\n | \"excavator\"\n | \"exchange\"\n | \"exclude-row\"\n | \"expand-all\"\n | \"explain\"\n | \"export\"\n | \"eye-off\"\n | \"eye-on\"\n | \"eye-open\"\n | \"fast-backward\"\n | \"fast-forward\"\n | \"feed-subscribed\"\n | \"feed\"\n | \"film\"\n | \"filter-keep\"\n | \"filter-list\"\n | \"filter-open\"\n | \"filter-remove\"\n | \"filter\"\n | \"flag\"\n | \"flame\"\n | \"flash\"\n | \"floating-point\"\n | \"floppy-disk\"\n | \"flow-branch\"\n | \"flow-end\"\n | \"flow-linear\"\n | \"flow-review-branch\"\n | \"flow-review\"\n | \"flows\"\n | \"folder-close\"\n | \"folder-new\"\n | \"folder-open\"\n | \"folder-shared-open\"\n | \"folder-shared\"\n | \"follower\"\n | \"following\"\n | \"font\"\n | \"fork\"\n | \"form\"\n | \"forward-ten\"\n | \"fuel\"\n | \"full-circle\"\n | \"full-stacked-chart\"\n | \"fullscreen\"\n | \"function\"\n | \"gantt-chart\"\n | \"generate\"\n | \"geofence\"\n | \"geolocation\"\n | \"geosearch\"\n | \"geotime\"\n | \"git-branch\"\n | \"git-commit\"\n | \"git-merge\"\n | \"git-new-branch\"\n | \"git-pull\"\n | \"git-push\"\n | \"git-repo\"\n | \"glass\"\n | \"globe-network\"\n | \"globe\"\n | \"graph-remove\"\n | \"graph\"\n | \"greater-than-or-equal-to\"\n | \"greater-than\"\n | \"grid-view\"\n | \"grid\"\n | \"group-item\"\n | \"group-objects\"\n | \"grouped-bar-chart\"\n | \"hand-down\"\n | \"hand-left\"\n | \"hand-right\"\n | \"hand-up\"\n | \"hand\"\n | \"hat\"\n | \"header-one\"\n | \"header-three\"\n | \"header-two\"\n | \"header\"\n | \"headset\"\n | \"heart-broken\"\n | \"heart\"\n | \"heat-grid\"\n | \"heatmap\"\n | \"helicopter\"\n | \"help\"\n | \"helper-management\"\n | \"high-priority\"\n | \"high-voltage-pole\"\n | \"highlight\"\n | \"history\"\n | \"home\"\n | \"horizontal-bar-chart-asc\"\n | \"horizontal-bar-chart-desc\"\n | \"horizontal-bar-chart\"\n | \"horizontal-distribution\"\n | \"horizontal-inbetween\"\n | \"hurricane\"\n | \"id-number\"\n | \"image-rotate-left\"\n | \"image-rotate-right\"\n | \"import\"\n | \"inbox-filtered\"\n | \"inbox-geo\"\n | \"inbox-search\"\n | \"inbox-update\"\n | \"inbox\"\n | \"info-sign\"\n | \"inheritance\"\n | \"inherited-group\"\n | \"inner-join\"\n | \"input\"\n | \"insert\"\n | \"intelligence\"\n | \"intersection\"\n | \"ip-address\"\n | \"issue-closed\"\n | \"issue-new\"\n | \"issue\"\n | \"italic\"\n | \"join-table\"\n | \"key-backspace\"\n | \"key-command\"\n | \"key-control\"\n | \"key-delete\"\n | \"key-enter\"\n | \"key-escape\"\n | \"key-option\"\n | \"key-shift\"\n | \"key-tab\"\n | \"key\"\n | \"known-vehicle\"\n | \"lab-test\"\n | \"label\"\n | \"layer-outline\"\n | \"layer\"\n | \"layers\"\n | \"layout-auto\"\n | \"layout-balloon\"\n | \"layout-bottom-row-three-tiles\"\n | \"layout-bottom-row-two-tiles\"\n | \"layout-circle\"\n | \"layout-grid\"\n | \"layout-group-by\"\n | \"layout-hierarchy\"\n | \"layout-left-column-three-tiles\"\n | \"layout-left-column-two-tiles\"\n | \"layout-linear\"\n | \"layout-right-column-three-tiles\"\n | \"layout-right-column-two-tiles\"\n | \"layout-skew-grid\"\n | \"layout-sorted-clusters\"\n | \"layout-three-columns\"\n | \"layout-three-rows\"\n | \"layout-top-row-three-tiles\"\n | \"layout-top-row-two-tiles\"\n | \"layout-two-columns\"\n | \"layout-two-rows\"\n | \"layout\"\n | \"learning\"\n | \"left-join\"\n | \"lengthen-text\"\n | \"less-than-or-equal-to\"\n | \"less-than\"\n | \"lifesaver\"\n | \"lightbulb\"\n | \"lightning\"\n | \"link\"\n | \"list-columns\"\n | \"list-detail-view\"\n | \"list\"\n | \"locate\"\n | \"lock\"\n | \"locomotive\"\n | \"log-in\"\n | \"log-out\"\n | \"low-voltage-pole\"\n | \"manual\"\n | \"manually-entered-data\"\n | \"many-to-many\"\n | \"many-to-one\"\n | \"map-create\"\n | \"map-marker\"\n | \"map\"\n | \"maximize\"\n | \"media\"\n | \"menu-closed\"\n | \"menu-open\"\n | \"menu\"\n | \"merge-columns\"\n | \"merge-links\"\n | \"microphone\"\n | \"minimize\"\n | \"minus\"\n | \"mobile-phone\"\n | \"mobile-video\"\n | \"modal-filled\"\n | \"modal\"\n | \"model\"\n | \"moon\"\n | \"more\"\n | \"mountain\"\n | \"move\"\n | \"mugshot\"\n | \"multi-select\"\n | \"music\"\n | \"nest\"\n | \"new-drawing\"\n | \"new-grid-item\"\n | \"new-layer\"\n | \"new-layers\"\n | \"new-link\"\n | \"new-object\"\n | \"new-person\"\n | \"new-prescription\"\n | \"new-shield\"\n | \"new-text-box\"\n | \"ninja\"\n | \"not-equal-to\"\n | \"notifications-snooze\"\n | \"notifications-updated\"\n | \"notifications\"\n | \"numbered-list\"\n | \"numerical\"\n | \"office\"\n | \"offline\"\n | \"oil-field\"\n | \"one-column\"\n | \"one-to-many\"\n | \"one-to-one\"\n | \"open-application\"\n | \"outdated\"\n | \"output\"\n | \"page-layout\"\n | \"panel-stats\"\n | \"panel-table\"\n | \"paperclip\"\n | \"paragraph\"\n | \"paste-variable\"\n | \"path-search\"\n | \"path\"\n | \"pause\"\n | \"people\"\n | \"percentage\"\n | \"person\"\n | \"phone-call\"\n | \"phone-forward\"\n | \"phone\"\n | \"pie-chart\"\n | \"pin\"\n | \"pivot-table\"\n | \"pivot\"\n | \"play\"\n | \"playbook\"\n | \"plus\"\n | \"polygon-filter\"\n | \"power\"\n | \"predictive-analysis\"\n | \"prescription\"\n | \"presentation\"\n | \"print\"\n | \"projects\"\n | \"properties\"\n | \"property\"\n | \"publish-function\"\n | \"pulse\"\n | \"rain\"\n | \"random\"\n | \"range-ring\"\n | \"record\"\n | \"rect-height\"\n | \"rect-width\"\n | \"rectangle\"\n | \"redo\"\n | \"refresh\"\n | \"regex\"\n | \"regression-chart\"\n | \"remove-column-left\"\n | \"remove-column-right\"\n | \"remove-column\"\n | \"remove-row-bottom\"\n | \"remove-row-top\"\n | \"remove\"\n | \"repeat\"\n | \"reset\"\n | \"resolve\"\n | \"rig\"\n | \"right-join\"\n | \"ring\"\n | \"rocket-slant\"\n | \"rocket\"\n | \"rotate-document\"\n | \"rotate-page\"\n | \"route\"\n | \"satellite\"\n | \"saved\"\n | \"scatter-plot\"\n | \"search-around\"\n | \"search-template\"\n | \"search-text\"\n | \"search\"\n | \"segmented-control\"\n | \"select\"\n | \"selection\"\n | \"send-backward\"\n | \"send-message\"\n | \"send-to-graph\"\n | \"send-to-map\"\n | \"send-to\"\n | \"sensor\"\n | \"series-add\"\n | \"series-configuration\"\n | \"series-derived\"\n | \"series-filtered\"\n | \"series-search\"\n | \"settings\"\n | \"shapes\"\n | \"share\"\n | \"shared-filter\"\n | \"shield\"\n | \"ship\"\n | \"shop\"\n | \"shopping-cart\"\n | \"shorten-text\"\n | \"signal-search\"\n | \"sim-card\"\n | \"slash\"\n | \"small-cross\"\n | \"small-info-sign\"\n | \"small-minus\"\n | \"small-plus\"\n | \"small-square\"\n | \"small-tick\"\n | \"snowflake\"\n | \"soccer-ball\"\n | \"social-media\"\n | \"sort-alphabetical-desc\"\n | \"sort-alphabetical\"\n | \"sort-asc\"\n | \"sort-desc\"\n | \"sort-numerical-desc\"\n | \"sort-numerical\"\n | \"sort\"\n | \"spell-check\"\n | \"split-columns\"\n | \"sports-stadium\"\n | \"square\"\n | \"stacked-chart\"\n | \"stadium-geometry\"\n | \"star-empty\"\n | \"star\"\n | \"step-backward\"\n | \"step-chart\"\n | \"step-forward\"\n | \"stop\"\n | \"stopwatch\"\n | \"strikethrough\"\n | \"style\"\n | \"subscript\"\n | \"superscript\"\n | \"swap-horizontal\"\n | \"swap-vertical\"\n | \"switch\"\n | \"symbol-circle\"\n | \"symbol-cross\"\n | \"symbol-diamond\"\n | \"symbol-rectangle\"\n | \"symbol-square\"\n | \"symbol-triangle-down\"\n | \"symbol-triangle-up\"\n | \"syringe\"\n | \"table-sync\"\n | \"tag\"\n | \"take-action\"\n | \"tank\"\n | \"target\"\n | \"taxi\"\n | \"team\"\n | \"temperature\"\n | \"text-highlight\"\n | \"th-derived\"\n | \"th-disconnect\"\n | \"th-filtered\"\n | \"th-list\"\n | \"th\"\n | \"third-party\"\n | \"thumbs-down\"\n | \"thumbs-up\"\n | \"tick-circle\"\n | \"tick\"\n | \"time\"\n | \"timeline-area-chart\"\n | \"timeline-bar-chart\"\n | \"timeline-events\"\n | \"timeline-line-chart\"\n | \"tint\"\n | \"torch\"\n | \"tractor\"\n | \"train\"\n | \"translate\"\n | \"trash\"\n | \"tree\"\n | \"trending-down\"\n | \"trending-up\"\n | \"trophy\"\n | \"truck\"\n | \"two-columns\"\n | \"unarchive\"\n | \"underline\"\n | \"undo\"\n | \"ungroup-objects\"\n | \"unknown-vehicle\"\n | \"unlink\"\n | \"unlock\"\n | \"unpin\"\n | \"unresolve\"\n | \"updated\"\n | \"upload\"\n | \"user\"\n | \"variable\"\n | \"vector\"\n | \"vertical-bar-chart-asc\"\n | \"vertical-bar-chart-desc\"\n | \"vertical-distribution\"\n | \"vertical-inbetween\"\n | \"video\"\n | \"virus\"\n | \"volume-down\"\n | \"volume-off\"\n | \"volume-up\"\n | \"walk\"\n | \"warning-sign\"\n | \"waterfall-chart\"\n | \"waves\"\n | \"widget-button\"\n | \"widget-footer\"\n | \"widget-header\"\n | \"widget\"\n | \"wind\"\n | \"wrench\"\n | \"zoom-in\"\n | \"zoom-out\"\n | \"zoom-to-fit\";\n\nexport type BlueprintIcons_16Key =\n | \"AddClip\"\n | \"AddColumnLeft\"\n | \"AddColumnRight\"\n | \"AddLocation\"\n | \"AddRowBottom\"\n | \"AddRowTop\"\n | \"AddToArtifact\"\n | \"AddToFolder\"\n | \"Add\"\n | \"AimpointsTarget\"\n | \"Airplane\"\n | \"AlignCenter\"\n | \"AlignJustify\"\n | \"AlignLeft\"\n | \"AlignRight\"\n | \"AlignmentBottom\"\n | \"AlignmentHorizontalCenter\"\n | \"AlignmentLeft\"\n | \"AlignmentRight\"\n | \"AlignmentTop\"\n | \"AlignmentVerticalCenter\"\n | \"Ammunition\"\n | \"Anchor\"\n | \"Annotation\"\n | \"Antenna\"\n | \"AppHeader\"\n | \"Application\"\n | \"Applications\"\n | \"Archive\"\n | \"AreaOfInterest\"\n | \"ArrayBoolean\"\n | \"ArrayDate\"\n | \"ArrayFloatingPoint\"\n | \"ArrayNumeric\"\n | \"ArrayString\"\n | \"ArrayTimestamp\"\n | \"Array\"\n | \"ArrowBottomLeft\"\n | \"ArrowBottomRight\"\n | \"ArrowDown\"\n | \"ArrowLeft\"\n | \"ArrowRight\"\n | \"ArrowTopLeft\"\n | \"ArrowTopRight\"\n | \"ArrowUp\"\n | \"ArrowsHorizontal\"\n | \"ArrowsVertical\"\n | \"Asterisk\"\n | \"At\"\n | \"AutomaticUpdates\"\n | \"Axle\"\n | \"Backlink\"\n | \"BackwardTen\"\n | \"Badge\"\n | \"BanCircle\"\n | \"BankAccount\"\n | \"Barcode\"\n | \"BinaryNumber\"\n | \"Blank\"\n | \"BlockedPerson\"\n | \"Bold\"\n | \"Book\"\n | \"Bookmark\"\n | \"Box\"\n | \"Briefcase\"\n | \"BringData\"\n | \"BringForward\"\n | \"Bug\"\n | \"Buggy\"\n | \"Build\"\n | \"Bullseye\"\n | \"Calculator\"\n | \"Calendar\"\n | \"Camera\"\n | \"CaretDown\"\n | \"CaretLeft\"\n | \"CaretRight\"\n | \"CaretUp\"\n | \"CargoShip\"\n | \"CellTower\"\n | \"Changes\"\n | \"Chart\"\n | \"Chat\"\n | \"ChevronBackward\"\n | \"ChevronDown\"\n | \"ChevronForward\"\n | \"ChevronLeft\"\n | \"ChevronRight\"\n | \"ChevronUp\"\n | \"CircleArrowDown\"\n | \"CircleArrowLeft\"\n | \"CircleArrowRight\"\n | \"CircleArrowUp\"\n | \"Circle\"\n | \"Citation\"\n | \"Clean\"\n | \"Clip\"\n | \"ClipboardFile\"\n | \"Clipboard\"\n | \"CloudDownload\"\n | \"CloudServer\"\n | \"CloudTick\"\n | \"CloudUpload\"\n | \"Cloud\"\n | \"CodeBlock\"\n | \"Code\"\n | \"Cog\"\n | \"CollapseAll\"\n | \"ColorFill\"\n | \"ColumnLayout\"\n | \"Comment\"\n | \"Comparison\"\n | \"Compass\"\n | \"Compressed\"\n | \"Confirm\"\n | \"Console\"\n | \"Contrast\"\n | \"Control\"\n | \"CreditCard\"\n | \"Crop\"\n | \"CrossCircle\"\n | \"Cross\"\n | \"Crown\"\n | \"CssStyle\"\n | \"CubeAdd\"\n | \"CubeRemove\"\n | \"Cube\"\n | \"CurlyBraces\"\n | \"CurvedRangeChart\"\n | \"Cut\"\n | \"Cycle\"\n | \"Dashboard\"\n | \"DataConnection\"\n | \"DataLineage\"\n | \"DataSearch\"\n | \"DataSync\"\n | \"Database\"\n | \"Delete\"\n | \"Delta\"\n | \"DeriveColumn\"\n | \"Desktop\"\n | \"Detection\"\n | \"Diagnosis\"\n | \"DiagramTree\"\n | \"DirectionLeft\"\n | \"DirectionRight\"\n | \"Disable\"\n | \"Divide\"\n | \"DocumentOpen\"\n | \"DocumentShare\"\n | \"Document\"\n | \"Dollar\"\n | \"Dot\"\n | \"DoubleCaretHorizontal\"\n | \"DoubleCaretVertical\"\n | \"DoubleChevronDown\"\n | \"DoubleChevronLeft\"\n | \"DoubleChevronRight\"\n | \"DoubleChevronUp\"\n | \"DoughnutChart\"\n | \"Download\"\n | \"DragHandleHorizontal\"\n | \"DragHandleVertical\"\n | \"Draw\"\n | \"DrawerLeftFilled\"\n | \"DrawerLeft\"\n | \"DrawerRightFilled\"\n | \"DrawerRight\"\n | \"DriveTime\"\n | \"Duplicate\"\n | \"Edit\"\n | \"Eject\"\n | \"Emoji\"\n | \"Endnote\"\n | \"Endorsed\"\n | \"Envelope\"\n | \"Equals\"\n | \"Eraser\"\n | \"Error\"\n | \"Euro\"\n | \"Excavator\"\n | \"Exchange\"\n | \"ExcludeRow\"\n | \"ExpandAll\"\n | \"Explain\"\n | \"Export\"\n | \"EyeOff\"\n | \"EyeOn\"\n | \"EyeOpen\"\n | \"FastBackward\"\n | \"FastForward\"\n | \"FeedSubscribed\"\n | \"Feed\"\n | \"Film\"\n | \"FilterKeep\"\n | \"FilterList\"\n | \"FilterOpen\"\n | \"FilterRemove\"\n | \"Filter\"\n | \"Flag\"\n | \"Flame\"\n | \"Flash\"\n | \"FloatingPoint\"\n | \"FloppyDisk\"\n | \"FlowBranch\"\n | \"FlowEnd\"\n | \"FlowLinear\"\n | \"FlowReviewBranch\"\n | \"FlowReview\"\n | \"Flows\"\n | \"FolderClose\"\n | \"FolderNew\"\n | \"FolderOpen\"\n | \"FolderSharedOpen\"\n | \"FolderShared\"\n | \"Follower\"\n | \"Following\"\n | \"Font\"\n | \"Fork\"\n | \"Form\"\n | \"ForwardTen\"\n | \"Fuel\"\n | \"FullCircle\"\n | \"FullStackedChart\"\n | \"Fullscreen\"\n | \"Function\"\n | \"GanttChart\"\n | \"Generate\"\n | \"Geofence\"\n | \"Geolocation\"\n | \"Geosearch\"\n | \"Geotime\"\n | \"GitBranch\"\n | \"GitCommit\"\n | \"GitMerge\"\n | \"GitNewBranch\"\n | \"GitPull\"\n | \"GitPush\"\n | \"GitRepo\"\n | \"Glass\"\n | \"GlobeNetwork\"\n | \"Globe\"\n | \"GraphRemove\"\n | \"Graph\"\n | \"GreaterThanOrEqualTo\"\n | \"GreaterThan\"\n | \"GridView\"\n | \"Grid\"\n | \"GroupItem\"\n | \"GroupObjects\"\n | \"GroupedBarChart\"\n | \"HandDown\"\n | \"HandLeft\"\n | \"HandRight\"\n | \"HandUp\"\n | \"Hand\"\n | \"Hat\"\n | \"HeaderOne\"\n | \"HeaderThree\"\n | \"HeaderTwo\"\n | \"Header\"\n | \"Headset\"\n | \"HeartBroken\"\n | \"Heart\"\n | \"HeatGrid\"\n | \"Heatmap\"\n | \"Helicopter\"\n | \"Help\"\n | \"HelperManagement\"\n | \"HighPriority\"\n | \"HighVoltagePole\"\n | \"Highlight\"\n | \"History\"\n | \"Home\"\n | \"HorizontalBarChartAsc\"\n | \"HorizontalBarChartDesc\"\n | \"HorizontalBarChart\"\n | \"HorizontalDistribution\"\n | \"HorizontalInbetween\"\n | \"Hurricane\"\n | \"IdNumber\"\n | \"ImageRotateLeft\"\n | \"ImageRotateRight\"\n | \"Import\"\n | \"InboxFiltered\"\n | \"InboxGeo\"\n | \"InboxSearch\"\n | \"InboxUpdate\"\n | \"Inbox\"\n | \"InfoSign\"\n | \"Inheritance\"\n | \"InheritedGroup\"\n | \"InnerJoin\"\n | \"Input\"\n | \"Insert\"\n | \"Intelligence\"\n | \"Intersection\"\n | \"IpAddress\"\n | \"IssueClosed\"\n | \"IssueNew\"\n | \"Issue\"\n | \"Italic\"\n | \"JoinTable\"\n | \"KeyBackspace\"\n | \"KeyCommand\"\n | \"KeyControl\"\n | \"KeyDelete\"\n | \"KeyEnter\"\n | \"KeyEscape\"\n | \"KeyOption\"\n | \"KeyShift\"\n | \"KeyTab\"\n | \"Key\"\n | \"KnownVehicle\"\n | \"LabTest\"\n | \"Label\"\n | \"LayerOutline\"\n | \"Layer\"\n | \"Layers\"\n | \"LayoutAuto\"\n | \"LayoutBalloon\"\n | \"LayoutBottomRowThreeTiles\"\n | \"LayoutBottomRowTwoTiles\"\n | \"LayoutCircle\"\n | \"LayoutGrid\"\n | \"LayoutGroupBy\"\n | \"LayoutHierarchy\"\n | \"LayoutLeftColumnThreeTiles\"\n | \"LayoutLeftColumnTwoTiles\"\n | \"LayoutLinear\"\n | \"LayoutRightColumnThreeTiles\"\n | \"LayoutRightColumnTwoTiles\"\n | \"LayoutSkewGrid\"\n | \"LayoutSortedClusters\"\n | \"LayoutThreeColumns\"\n | \"LayoutThreeRows\"\n | \"LayoutTopRowThreeTiles\"\n | \"LayoutTopRowTwoTiles\"\n | \"LayoutTwoColumns\"\n | \"LayoutTwoRows\"\n | \"Layout\"\n | \"Learning\"\n | \"LeftJoin\"\n | \"LengthenText\"\n | \"LessThanOrEqualTo\"\n | \"LessThan\"\n | \"Lifesaver\"\n | \"Lightbulb\"\n | \"Lightning\"\n | \"Link\"\n | \"ListColumns\"\n | \"ListDetailView\"\n | \"List\"\n | \"Locate\"\n | \"Lock\"\n | \"Locomotive\"\n | \"LogIn\"\n | \"LogOut\"\n | \"LowVoltagePole\"\n | \"Manual\"\n | \"ManuallyEnteredData\"\n | \"ManyToMany\"\n | \"ManyToOne\"\n | \"MapCreate\"\n | \"MapMarker\"\n | \"Map\"\n | \"Maximize\"\n | \"Media\"\n | \"MenuClosed\"\n | \"MenuOpen\"\n | \"Menu\"\n | \"MergeColumns\"\n | \"MergeLinks\"\n | \"Microphone\"\n | \"Minimize\"\n | \"Minus\"\n | \"MobilePhone\"\n | \"MobileVideo\"\n | \"ModalFilled\"\n | \"Modal\"\n | \"Model\"\n | \"Moon\"\n | \"More\"\n | \"Mountain\"\n | \"Move\"\n | \"Mugshot\"\n | \"MultiSelect\"\n | \"Music\"\n | \"Nest\"\n | \"NewDrawing\"\n | \"NewGridItem\"\n | \"NewLayer\"\n | \"NewLayers\"\n | \"NewLink\"\n | \"NewObject\"\n | \"NewPerson\"\n | \"NewPrescription\"\n | \"NewShield\"\n | \"NewTextBox\"\n | \"Ninja\"\n | \"NotEqualTo\"\n | \"NotificationsSnooze\"\n | \"NotificationsUpdated\"\n | \"Notifications\"\n | \"NumberedList\"\n | \"Numerical\"\n | \"Office\"\n | \"Offline\"\n | \"OilField\"\n | \"OneColumn\"\n | \"OneToMany\"\n | \"OneToOne\"\n | \"OpenApplication\"\n | \"Outdated\"\n | \"Output\"\n | \"PageLayout\"\n | \"PanelStats\"\n | \"PanelTable\"\n | \"Paperclip\"\n | \"Paragraph\"\n | \"PasteVariable\"\n | \"PathSearch\"\n | \"Path\"\n | \"Pause\"\n | \"People\"\n | \"Percentage\"\n | \"Person\"\n | \"PhoneCall\"\n | \"PhoneForward\"\n | \"Phone\"\n | \"PieChart\"\n | \"Pin\"\n | \"PivotTable\"\n | \"Pivot\"\n | \"Play\"\n | \"Playbook\"\n | \"Plus\"\n | \"PolygonFilter\"\n | \"Power\"\n | \"PredictiveAnalysis\"\n | \"Prescription\"\n | \"Presentation\"\n | \"Print\"\n | \"Projects\"\n | \"Properties\"\n | \"Property\"\n | \"PublishFunction\"\n | \"Pulse\"\n | \"Rain\"\n | \"Random\"\n | \"RangeRing\"\n | \"Record\"\n | \"RectHeight\"\n | \"RectWidth\"\n | \"Rectangle\"\n | \"Redo\"\n | \"Refresh\"\n | \"Regex\"\n | \"RegressionChart\"\n | \"RemoveColumnLeft\"\n | \"RemoveColumnRight\"\n | \"RemoveColumn\"\n | \"RemoveRowBottom\"\n | \"RemoveRowTop\"\n | \"Remove\"\n | \"Repeat\"\n | \"Reset\"\n | \"Resolve\"\n | \"Rig\"\n | \"RightJoin\"\n | \"Ring\"\n | \"RocketSlant\"\n | \"Rocket\"\n | \"RotateDocument\"\n | \"RotatePage\"\n | \"Route\"\n | \"Satellite\"\n | \"Saved\"\n | \"ScatterPlot\"\n | \"SearchAround\"\n | \"SearchTemplate\"\n | \"SearchText\"\n | \"Search\"\n | \"SegmentedControl\"\n | \"Select\"\n | \"Selection\"\n | \"SendBackward\"\n | \"SendMessage\"\n | \"SendToGraph\"\n | \"SendToMap\"\n | \"SendTo\"\n | \"Sensor\"\n | \"SeriesAdd\"\n | \"SeriesConfiguration\"\n | \"SeriesDerived\"\n | \"SeriesFiltered\"\n | \"SeriesSearch\"\n | \"Settings\"\n | \"Shapes\"\n | \"Share\"\n | \"SharedFilter\"\n | \"Shield\"\n | \"Ship\"\n | \"Shop\"\n | \"ShoppingCart\"\n | \"ShortenText\"\n | \"SignalSearch\"\n | \"SimCard\"\n | \"Slash\"\n | \"SmallCross\"\n | \"SmallInfoSign\"\n | \"SmallMinus\"\n | \"SmallPlus\"\n | \"SmallSquare\"\n | \"SmallTick\"\n | \"Snowflake\"\n | \"SoccerBall\"\n | \"SocialMedia\"\n | \"SortAlphabeticalDesc\"\n | \"SortAlphabetical\"\n | \"SortAsc\"\n | \"SortDesc\"\n | \"SortNumericalDesc\"\n | \"SortNumerical\"\n | \"Sort\"\n | \"SpellCheck\"\n | \"SplitColumns\"\n | \"SportsStadium\"\n | \"Square\"\n | \"StackedChart\"\n | \"StadiumGeometry\"\n | \"StarEmpty\"\n | \"Star\"\n | \"StepBackward\"\n | \"StepChart\"\n | \"StepForward\"\n | \"Stop\"\n | \"Stopwatch\"\n | \"Strikethrough\"\n | \"Style\"\n | \"Subscript\"\n | \"Superscript\"\n | \"SwapHorizontal\"\n | \"SwapVertical\"\n | \"Switch\"\n | \"SymbolCircle\"\n | \"SymbolCross\"\n | \"SymbolDiamond\"\n | \"SymbolRectangle\"\n | \"SymbolSquare\"\n | \"SymbolTriangleDown\"\n | \"SymbolTriangleUp\"\n | \"Syringe\"\n | \"TableSync\"\n | \"Tag\"\n | \"TakeAction\"\n | \"Tank\"\n | \"Target\"\n | \"Taxi\"\n | \"Team\"\n | \"Temperature\"\n | \"TextHighlight\"\n | \"ThDerived\"\n | \"ThDisconnect\"\n | \"ThFiltered\"\n | \"ThList\"\n | \"Th\"\n | \"ThirdParty\"\n | \"ThumbsDown\"\n | \"ThumbsUp\"\n | \"TickCircle\"\n | \"Tick\"\n | \"Time\"\n | \"TimelineAreaChart\"\n | \"TimelineBarChart\"\n | \"TimelineEvents\"\n | \"TimelineLineChart\"\n | \"Tint\"\n | \"Torch\"\n | \"Tractor\"\n | \"Train\"\n | \"Translate\"\n | \"Trash\"\n | \"Tree\"\n | \"TrendingDown\"\n | \"TrendingUp\"\n | \"Trophy\"\n | \"Truck\"\n | \"TwoColumns\"\n | \"Unarchive\"\n | \"Underline\"\n | \"Undo\"\n | \"UngroupObjects\"\n | \"UnknownVehicle\"\n | \"Unlink\"\n | \"Unlock\"\n | \"Unpin\"\n | \"Unresolve\"\n | \"Updated\"\n | \"Upload\"\n | \"User\"\n | \"Variable\"\n | \"Vector\"\n | \"VerticalBarChartAsc\"\n | \"VerticalBarChartDesc\"\n | \"VerticalDistribution\"\n | \"VerticalInbetween\"\n | \"Video\"\n | \"Virus\"\n | \"VolumeDown\"\n | \"VolumeOff\"\n | \"VolumeUp\"\n | \"Walk\"\n | \"WarningSign\"\n | \"WaterfallChart\"\n | \"Waves\"\n | \"WidgetButton\"\n | \"WidgetFooter\"\n | \"WidgetHeader\"\n | \"Widget\"\n | \"Wind\"\n | \"Wrench\"\n | \"ZoomIn\"\n | \"ZoomOut\"\n | \"ZoomToFit\";\n"],"mappings":"","ignoreList":[]}