@osdk/generator-converters 2.6.0-beta.8 → 2.6.0-rc.14

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 (63) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/build/browser/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.test.js +6 -0
  3. package/build/browser/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.test.js.map +1 -1
  4. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js +3 -0
  5. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js.map +1 -1
  6. package/build/browser/wirePropertyV2ToSdkPropertyDefinition.js +2 -5
  7. package/build/browser/wirePropertyV2ToSdkPropertyDefinition.js.map +1 -1
  8. package/build/browser/wireQueryDataTypeToQueryDataTypeDefinition.js +1 -2
  9. package/build/browser/wireQueryDataTypeToQueryDataTypeDefinition.js.map +1 -1
  10. package/build/cjs/index.cjs +3 -239
  11. package/build/cjs/index.cjs.map +1 -1
  12. package/build/esm/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.test.js +6 -0
  13. package/build/esm/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.test.js.map +1 -1
  14. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js +3 -0
  15. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js.map +1 -1
  16. package/build/esm/wirePropertyV2ToSdkPropertyDefinition.js +2 -5
  17. package/build/esm/wirePropertyV2ToSdkPropertyDefinition.js.map +1 -1
  18. package/build/esm/wireQueryDataTypeToQueryDataTypeDefinition.js +1 -2
  19. package/build/esm/wireQueryDataTypeToQueryDataTypeDefinition.js.map +1 -1
  20. package/build/types/wirePropertyV2ToSdkPropertyDefinition.d.ts.map +1 -1
  21. package/package.json +5 -5
  22. package/build/browser/valueFormatting/commonValueFormattingUtils.js +0 -33
  23. package/build/browser/valueFormatting/commonValueFormattingUtils.js.map +0 -1
  24. package/build/browser/valueFormatting/convertBooleanValueFormattingRule.js +0 -24
  25. package/build/browser/valueFormatting/convertBooleanValueFormattingRule.js.map +0 -1
  26. package/build/browser/valueFormatting/convertDateAndTimestampValueFormattingRule.js +0 -62
  27. package/build/browser/valueFormatting/convertDateAndTimestampValueFormattingRule.js.map +0 -1
  28. package/build/browser/valueFormatting/convertKnownTypeValueFormattingRule.js +0 -39
  29. package/build/browser/valueFormatting/convertKnownTypeValueFormattingRule.js.map +0 -1
  30. package/build/browser/valueFormatting/convertNumberValueFormattingRule.js +0 -133
  31. package/build/browser/valueFormatting/convertNumberValueFormattingRule.js.map +0 -1
  32. package/build/browser/wirePropertyFormattingToSdkFormatting.js +0 -49
  33. package/build/browser/wirePropertyFormattingToSdkFormatting.js.map +0 -1
  34. package/build/browser/wirePropertyFormattingToSdkFormatting.test.js +0 -344
  35. package/build/browser/wirePropertyFormattingToSdkFormatting.test.js.map +0 -1
  36. package/build/esm/valueFormatting/commonValueFormattingUtils.js +0 -33
  37. package/build/esm/valueFormatting/commonValueFormattingUtils.js.map +0 -1
  38. package/build/esm/valueFormatting/convertBooleanValueFormattingRule.js +0 -24
  39. package/build/esm/valueFormatting/convertBooleanValueFormattingRule.js.map +0 -1
  40. package/build/esm/valueFormatting/convertDateAndTimestampValueFormattingRule.js +0 -62
  41. package/build/esm/valueFormatting/convertDateAndTimestampValueFormattingRule.js.map +0 -1
  42. package/build/esm/valueFormatting/convertKnownTypeValueFormattingRule.js +0 -39
  43. package/build/esm/valueFormatting/convertKnownTypeValueFormattingRule.js.map +0 -1
  44. package/build/esm/valueFormatting/convertNumberValueFormattingRule.js +0 -133
  45. package/build/esm/valueFormatting/convertNumberValueFormattingRule.js.map +0 -1
  46. package/build/esm/wirePropertyFormattingToSdkFormatting.js +0 -49
  47. package/build/esm/wirePropertyFormattingToSdkFormatting.js.map +0 -1
  48. package/build/esm/wirePropertyFormattingToSdkFormatting.test.js +0 -344
  49. package/build/esm/wirePropertyFormattingToSdkFormatting.test.js.map +0 -1
  50. package/build/types/valueFormatting/commonValueFormattingUtils.d.ts +0 -3
  51. package/build/types/valueFormatting/commonValueFormattingUtils.d.ts.map +0 -1
  52. package/build/types/valueFormatting/convertBooleanValueFormattingRule.d.ts +0 -3
  53. package/build/types/valueFormatting/convertBooleanValueFormattingRule.d.ts.map +0 -1
  54. package/build/types/valueFormatting/convertDateAndTimestampValueFormattingRule.d.ts +0 -4
  55. package/build/types/valueFormatting/convertDateAndTimestampValueFormattingRule.d.ts.map +0 -1
  56. package/build/types/valueFormatting/convertKnownTypeValueFormattingRule.d.ts +0 -3
  57. package/build/types/valueFormatting/convertKnownTypeValueFormattingRule.d.ts.map +0 -1
  58. package/build/types/valueFormatting/convertNumberValueFormattingRule.d.ts +0 -3
  59. package/build/types/valueFormatting/convertNumberValueFormattingRule.d.ts.map +0 -1
  60. package/build/types/wirePropertyFormattingToSdkFormatting.d.ts +0 -8
  61. package/build/types/wirePropertyFormattingToSdkFormatting.d.ts.map +0 -1
  62. package/build/types/wirePropertyFormattingToSdkFormatting.test.d.ts +0 -1
  63. package/build/types/wirePropertyFormattingToSdkFormatting.test.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"wireObjectTypeFullMetadataToSdkObjectMetadata.test.js","names":["describe","expect","expectTypeOf","it","wireObjectTypeFullMetadataToSdkObjectMetadata","result","implementsInterfaces","implementsInterfaces2","linkTypes","objectType","apiName","description","displayName","pluralDisplayName","icon","type","name","color","primaryKey","properties","dataType","otherKey","nullable","rid","defaulted","status","titleProperty","sharedPropertyTypeMapping","toBe","toEqualTypeOf","visibility","toBeUndefined","links","implements","toEqual","cardinality","objectTypeApiName","linkTypeRid","linkKeys","Object","keys"],"sources":["wireObjectTypeFullMetadataToSdkObjectMetadata.test.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 { ObjectMetadata } from \"@osdk/api\";\nimport { describe, expect, expectTypeOf, it } from \"vitest\";\nimport type {\n supportedIconTypes,\n supportedObjectTypeVisibility,\n supportedReleaseStatus,\n} from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\nimport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\n\ndescribe(wireObjectTypeFullMetadataToSdkObjectMetadata, () => {\n it(\"handles magic nullable properties\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: { type: \"blueprint\", name: \"blueprint\", color: \"blue\" },\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n otherKey: {\n nullable: false,\n dataType: { type: \"string\" },\n rid: \"rid\",\n },\n defaulted: { dataType: { type: \"string\" }, rid: \"rid\" },\n },\n rid: \"rid\",\n status: \"ACTIVE\",\n titleProperty: \"otherKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n\n // PK is never nullable\n expect(result.properties[\"primaryKey\"].nullable).toBe(false);\n\n // was specified above\n expect(result.properties[\"otherKey\"].nullable).toBe(false);\n\n // was unspecified, so should be nullable\n expect(result.properties[\"defaulted\"].nullable).toBe(true);\n });\n\n it(\"Is up to date with the enums from API\", () => {\n type excludedStatuses = \"\";\n expectTypeOf<\n Exclude<\n typeof supportedReleaseStatus[number],\n excludedStatuses\n >\n >()\n .toEqualTypeOf<\n NonNullable<ObjectMetadata[\"status\"]>\n >();\n\n type excludedVisibility = \"\";\n expectTypeOf<\n Exclude<typeof supportedObjectTypeVisibility[number], excludedVisibility>\n >().toEqualTypeOf<\n NonNullable<ObjectMetadata[\"visibility\"]>\n >();\n\n type excludedIconTypes = \"\";\n expectTypeOf<\n Exclude<typeof supportedIconTypes[number], excludedIconTypes>\n >()\n .toEqualTypeOf<\n NonNullable<NonNullable<ObjectMetadata[\"icon\"]>[\"type\"]>\n >();\n });\n\n it(\"does not throw when enums don't match\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: {\n type: \"INVALID_NOT_IN_API\",\n name: \"blueprint\",\n color: \"blue\",\n } as any,\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n otherKey: {\n nullable: false,\n dataType: { type: \"string\" },\n rid: \"rid\",\n },\n defaulted: { dataType: { type: \"string\" }, rid: \"rid\" },\n },\n rid: \"rid\",\n status: \"INVALID_NOT_IN_API\" as any,\n visibility: \"INVALID_NOT_IN_API\" as any,\n titleProperty: \"otherKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n\n expect(result.status).toBeUndefined();\n expect(result.visibility).toBeUndefined();\n expect(result.icon).toBeUndefined();\n });\n\n it(\"sorts the implements array for stable output\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [\"InterfaceZ\", \"InterfaceA\", \"InterfaceC\"],\n implementsInterfaces2: {\n \"InterfaceZ\": { properties: {}, links: {} },\n \"InterfaceA\": { properties: {}, links: {} },\n \"InterfaceC\": { properties: {}, links: {} },\n },\n linkTypes: [],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: { type: \"blueprint\", name: \"blueprint\", color: \"blue\" },\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n },\n rid: \"rid\",\n status: \"ACTIVE\",\n titleProperty: \"primaryKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n\n // Check that the array is sorted alphabetically\n expect(result.implements).toEqual([\n \"InterfaceA\",\n \"InterfaceC\",\n \"InterfaceZ\",\n ]);\n });\n\n it(\"sorts the linkTypes array for stable output\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [\n {\n apiName: \"linkZ\",\n cardinality: \"ONE\",\n objectTypeApiName: \"TargetZ\",\n displayName: \"LinkZ\",\n status: \"ACTIVE\",\n linkTypeRid: \"ridZ\",\n },\n {\n apiName: \"linkA\",\n cardinality: \"MANY\",\n objectTypeApiName: \"TargetA\",\n displayName: \"LinkA\",\n status: \"ACTIVE\",\n linkTypeRid: \"ridA\",\n },\n {\n apiName: \"linkC\",\n cardinality: \"ONE\",\n objectTypeApiName: \"TargetC\",\n displayName: \"LinkC\",\n status: \"ACTIVE\",\n linkTypeRid: \"ridC\",\n },\n ],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: { type: \"blueprint\", name: \"blueprint\", color: \"blue\" },\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n },\n rid: \"rid\",\n status: \"ACTIVE\",\n titleProperty: \"primaryKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n\n // Get the link keys in the order they appear in the result\n const linkKeys = Object.keys(result.links);\n\n // Check that the links are sorted alphabetically by apiName\n expect(linkKeys).toEqual([\"linkA\", \"linkC\", \"linkZ\"]);\n });\n\n it(\"preserves empty arrays\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: { type: \"blueprint\", name: \"blueprint\", color: \"blue\" },\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n },\n rid: \"rid\",\n status: \"ACTIVE\",\n titleProperty: \"primaryKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n\n // Check that empty array is preserved\n expect(result.implements).toEqual([]);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAM3D,SAASC,6CAA6C,QAAQ,oDAAoD;AAElHJ,QAAQ,CAACI,6CAA6C,EAAE,MAAM;EAC5DD,EAAE,CAAC,mCAAmC,EAAE,MAAM;IAC5C,MAAME,MAAM,GAAGD,6CAA6C,CAAC;MAC3DE,oBAAoB,EAAE,EAAE;MACxBC,qBAAqB,EAAE,CAAC,CAAC;MACzBC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE;QACVC,OAAO,EAAE,SAAS;QAClBC,WAAW,EAAE,aAAa;QAC1BC,WAAW,EAAE,aAAa;QAC1BC,iBAAiB,EAAE,cAAc;QACjCC,IAAI,EAAE;UAAEC,IAAI,EAAE,WAAW;UAAEC,IAAI,EAAE,WAAW;UAAEC,KAAK,EAAE;QAAO,CAAC;QAC7DC,UAAU,EAAE,YAAY;QACxBC,UAAU,EAAE;UACVD,UAAU,EAAE;YAAEE,QAAQ,EAAE;cAAEL,IAAI,EAAE;YAAS,CAAC;YAAE,KAAK,EAAE;UAAM,CAAC;UAC1DM,QAAQ,EAAE;YACRC,QAAQ,EAAE,KAAK;YACfF,QAAQ,EAAE;cAAEL,IAAI,EAAE;YA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O,CAAC;QAC7DC,UAAU,EAAE,YAAY;QACxBC,UAAU,EAAE;UACVD,UAAU,EAAE;YAAEE,QAAQ,EAAE;cAAEL,IAAI,EAAE;YAAS,CAAC;YAAE,KAAK,EAAE;UAAM;QAC3D,CAAC;QACDQ,GAAG,EAAE,KAAK;QACVE,MAAM,EAAE,QAAQ;QAChBC,aAAa,EAAE;MACjB,CAAC;MACDC,yBAAyB,EAAE,CAAC;IAC9B,CAAC,EAAE,IAAI,CAAC;;IAER;IACA1B,MAAM,CAACI,MAAM,CAAC4B,UAAU,CAAC,CAACC,OAAO,CAAC,EAAE,CAAC;EACvC,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"wireObjectTypeFullMetadataToSdkObjectMetadata.test.js","names":["describe","expect","expectTypeOf","it","wireObjectTypeFullMetadataToSdkObjectMetadata","result","implementsInterfaces","implementsInterfaces2","linkTypes","objectType","apiName","description","displayName","pluralDisplayName","icon","type","name","color","primaryKey","properties","dataType","otherKey","nullable","rid","defaulted","status","titleProperty","sharedPropertyTypeMapping","toBe","toEqualTypeOf","visibility","toBeUndefined","propertiesV2","links","implements","toEqual","cardinality","objectTypeApiName","linkTypeRid","linkKeys","Object","keys"],"sources":["wireObjectTypeFullMetadataToSdkObjectMetadata.test.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 { ObjectMetadata } from \"@osdk/api\";\nimport { describe, expect, expectTypeOf, it } from \"vitest\";\nimport type {\n supportedIconTypes,\n supportedObjectTypeVisibility,\n supportedReleaseStatus,\n} from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\nimport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\n\ndescribe(wireObjectTypeFullMetadataToSdkObjectMetadata, () => {\n it(\"handles magic nullable properties\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: { type: \"blueprint\", name: \"blueprint\", color: \"blue\" },\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n otherKey: {\n nullable: false,\n dataType: { type: \"string\" },\n rid: \"rid\",\n },\n defaulted: { dataType: { type: \"string\" }, rid: \"rid\" },\n },\n rid: \"rid\",\n status: \"ACTIVE\",\n titleProperty: \"otherKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n\n // PK is never nullable\n expect(result.properties[\"primaryKey\"].nullable).toBe(false);\n\n // was specified above\n expect(result.properties[\"otherKey\"].nullable).toBe(false);\n\n // was unspecified, so should be nullable\n expect(result.properties[\"defaulted\"].nullable).toBe(true);\n });\n\n it(\"Is up to date with the enums from API\", () => {\n type excludedStatuses = \"\";\n expectTypeOf<\n Exclude<\n typeof supportedReleaseStatus[number],\n excludedStatuses\n >\n >()\n .toEqualTypeOf<\n NonNullable<ObjectMetadata[\"status\"]>\n >();\n\n type excludedVisibility = \"\";\n expectTypeOf<\n Exclude<typeof supportedObjectTypeVisibility[number], excludedVisibility>\n >().toEqualTypeOf<\n NonNullable<ObjectMetadata[\"visibility\"]>\n >();\n\n type excludedIconTypes = \"\";\n expectTypeOf<\n Exclude<typeof supportedIconTypes[number], excludedIconTypes>\n >()\n .toEqualTypeOf<\n NonNullable<NonNullable<ObjectMetadata[\"icon\"]>[\"type\"]>\n >();\n });\n\n it(\"does not throw when enums don't match\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: {\n type: \"INVALID_NOT_IN_API\",\n name: \"blueprint\",\n color: \"blue\",\n } as any,\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n otherKey: {\n nullable: false,\n dataType: { type: \"string\" },\n rid: \"rid\",\n },\n defaulted: { dataType: { type: \"string\" }, rid: \"rid\" },\n },\n rid: \"rid\",\n status: \"INVALID_NOT_IN_API\" as any,\n visibility: \"INVALID_NOT_IN_API\" as any,\n titleProperty: \"otherKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n\n expect(result.status).toBeUndefined();\n expect(result.visibility).toBeUndefined();\n expect(result.icon).toBeUndefined();\n });\n\n it(\"sorts the implements array for stable output\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [\"InterfaceZ\", \"InterfaceA\", \"InterfaceC\"],\n implementsInterfaces2: {\n \"InterfaceZ\": { properties: {}, propertiesV2: {}, links: {} },\n \"InterfaceA\": { properties: {}, propertiesV2: {}, links: {} },\n \"InterfaceC\": { properties: {}, propertiesV2: {}, links: {} },\n },\n linkTypes: [],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: { type: \"blueprint\", name: \"blueprint\", color: \"blue\" },\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n },\n rid: \"rid\",\n status: \"ACTIVE\",\n titleProperty: \"primaryKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n\n // Check that the array is sorted alphabetically\n expect(result.implements).toEqual([\n \"InterfaceA\",\n \"InterfaceC\",\n \"InterfaceZ\",\n ]);\n });\n\n it(\"sorts the linkTypes array for stable output\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [\n {\n apiName: \"linkZ\",\n cardinality: \"ONE\",\n objectTypeApiName: \"TargetZ\",\n displayName: \"LinkZ\",\n status: \"ACTIVE\",\n linkTypeRid: \"ridZ\",\n },\n {\n apiName: \"linkA\",\n cardinality: \"MANY\",\n objectTypeApiName: \"TargetA\",\n displayName: \"LinkA\",\n status: \"ACTIVE\",\n linkTypeRid: \"ridA\",\n },\n {\n apiName: \"linkC\",\n cardinality: \"ONE\",\n objectTypeApiName: \"TargetC\",\n displayName: \"LinkC\",\n status: \"ACTIVE\",\n linkTypeRid: \"ridC\",\n },\n ],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: { type: \"blueprint\", name: \"blueprint\", color: \"blue\" },\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n },\n rid: \"rid\",\n status: \"ACTIVE\",\n titleProperty: \"primaryKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n\n // Get the link keys in the order they appear in the result\n const linkKeys = Object.keys(result.links);\n\n // Check that the links are sorted alphabetically by apiName\n expect(linkKeys).toEqual([\"linkA\", \"linkC\", \"linkZ\"]);\n });\n\n it(\"preserves empty arrays\", () => {\n const result = wireObjectTypeFullMetadataToSdkObjectMetadata({\n implementsInterfaces: [],\n implementsInterfaces2: {},\n linkTypes: [],\n objectType: {\n apiName: \"apiName\",\n description: \"description\",\n displayName: \"displayName\",\n pluralDisplayName: \"displayNames\",\n icon: { type: \"blueprint\", name: \"blueprint\", color: \"blue\" },\n primaryKey: \"primaryKey\",\n properties: {\n primaryKey: { dataType: { type: \"string\" }, \"rid\": \"rid\" },\n },\n rid: \"rid\",\n status: \"ACTIVE\",\n titleProperty: \"primaryKey\",\n },\n sharedPropertyTypeMapping: {},\n }, true);\n\n // Check that empty array is preserved\n expect(result.implements).toEqual([]);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAM3D,SAASC,6CAA6C,QAAQ,oDAAoD;AAElHJ,QAAQ,CAACI,6CAA6C,EAAE,MAAM;EAC5DD,EAAE,CAAC,mCAAmC,EAAE,MAAM;IAC5C,MAAME,MAAM,GAAGD,6CAA6C,CAAC;MAC3DE,oBAAoB,EAAE,EAAE;MACxBC,qBAAqB,EAAE,CAAC,CAAC;MACzBC,SAAS,EAAE,EAAE;MACbC,UAAU,EAAE;QACVC,OAAO,EAAE,SAAS;QAClBC,WAAW,EAAE,aAAa;QAC1BC,WAAW,EAAE,aAAa;QAC1BC,iBAAiB,EAAE,cAAc;QACjCC,IAAI,EAAE;UAAEC,IAAI,EAAE,WAAW;UAAEC,IAAI,EAAE,WAAW;UAAEC,KAAK,EAAE;QAAO,CAAC;QAC7DC,UAAU,EAAE,YAAY;QACxBC,UAAU,EAAE;UACVD,UAAU,EAAE;YAAEE,QAAQ,EAAE;cAAEL,IAAI,EAAE;YAAS,CAAC;YAAE,KAAK,EAAE;UAAM,CAAC;UAC1DM,QAAQ,EAAE;YACRC,QAAQ,EAAE,KAAK;YACfF,QAAQ,EAAE;cAAEL,IAAI,EAAE;YAAS,CAAC;YAC5BQ,GAAG,EAAE;UACP,CAAC;UACDC,SAAS,EAAE;YAAEJ,QAAQ,EAAE;cAAEL,IAAI,EAAE;YAAS,CAAC;YAAEQ,GAAG,EAAE;UAAM;QACxD,CAAC;QACDA,GAAG,EAAE,KAAK;QACVE,MAAM,EAAE,QAAQ;QAChBC,aAAa,EAAE;MACjB,CAAC;MACDC,yBAAyB,EAAE,CAAC;IAC9B,CAAC,EAAE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,KAAK;QACVE,MAAM,EAAE,QAAQ;QAChBC,aAAa,EAAE;MACjB,CAAC;MACDC,yBAAyB,EAAE,CAAC;IAC9B,CAAC,EAAE,IAAI,CAAC;;IAER;IACA1B,MAAM,CAACI,MAAM,CAAC6B,UAAU,CAAC,CAACC,OAAO,CAAC,EAAE,CAAC;EACvC,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -14,7 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { wirePropertyFormattingToSdkFormatting } from "./wirePropertyFormattingToSdkFormatting.js";
18
17
  export function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true, log) {
19
18
  const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(input.dataType, log);
20
19
  if (sdkPropDefinition == null) {
@@ -47,8 +46,7 @@ export function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true,
47
46
  description: input.description,
48
47
  type: sdkPropDefinition,
49
48
  nullable: input.nullable == null ? isNullable : input.nullable,
50
- valueTypeApiName: input.valueTypeApiName,
51
- valueFormatting: input.valueFormatting != null ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log) : undefined
49
+ valueTypeApiName: input.valueTypeApiName
52
50
  };
53
51
  case "array":
54
52
  {
@@ -58,8 +56,7 @@ export function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true,
58
56
  description: input.description,
59
57
  type: sdkPropDefinition,
60
58
  nullable: true,
61
- valueTypeApiName: input.valueTypeApiName,
62
- valueFormatting: input.valueFormatting != null ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log) : undefined
59
+ valueTypeApiName: input.valueTypeApiName
63
60
  };
64
61
  }
65
62
  case "cipherText":
@@ -1 +1 @@
1
- {"version":3,"file":"wirePropertyV2ToSdkPropertyDefinition.js","names":["wirePropertyFormattingToSdkFormatting","wirePropertyV2ToSdkPropertyDefinition","input","isNullable","log","sdkPropDefinition","objectPropertyTypeToSdkPropertyDefinition","dataType","undefined","type","displayName","multiplicity","description","nullable","valueTypeApiName","valueFormatting","info","JSON","stringify","propertyType","subType","itemType","structFieldTypes","reduce","structMap","structField","apiName"],"sources":["wirePropertyV2ToSdkPropertyDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 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 BaseWirePropertyTypes,\n ObjectMetadata,\n WirePropertyTypes,\n} from \"@osdk/api\";\nimport type {\n ObjectPropertyType,\n PropertyV2,\n SharedPropertyType,\n} from \"@osdk/foundry.ontologies\";\nimport { wirePropertyFormattingToSdkFormatting } from \"./wirePropertyFormattingToSdkFormatting.js\";\n\nexport function wirePropertyV2ToSdkPropertyDefinition(\n input: (PropertyV2 | SharedPropertyType) & { nullable?: boolean },\n isNullable: boolean = true,\n log?: { info: (msg: string) => void },\n): ObjectMetadata.Property | undefined {\n const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(\n input.dataType,\n log,\n );\n if (sdkPropDefinition == null) {\n return undefined;\n }\n switch (input.dataType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"date\":\n case \"attachment\":\n case \"mediaReference\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"timeseries\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n case \"struct\":\n case \"vector\":\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: sdkPropDefinition,\n nullable: input.nullable == null ? isNullable : input.nullable,\n valueTypeApiName: input.valueTypeApiName,\n valueFormatting: input.valueFormatting != null\n ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log)\n : undefined,\n };\n case \"array\": {\n return {\n displayName: input.displayName,\n multiplicity: true,\n description: input.description,\n type: sdkPropDefinition,\n nullable: true,\n valueTypeApiName: input.valueTypeApiName,\n valueFormatting: input.valueFormatting != null\n ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log)\n : undefined,\n };\n }\n case \"cipherText\": {\n log?.info(\n `${JSON.stringify(input.dataType.type)} is not a supported dataType`,\n );\n\n return undefined;\n }\n\n default:\n const _: never = input.dataType;\n log?.info(\n `${JSON.stringify(input.dataType)} is not a supported dataType`,\n );\n\n return undefined;\n }\n}\n\nfunction objectPropertyTypeToSdkPropertyDefinition(\n propertyType: ObjectPropertyType,\n log?: { info: (msg: string) => void },\n): WirePropertyTypes | undefined {\n switch (propertyType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n case \"mediaReference\":\n case \"vector\":\n return propertyType.type;\n case \"date\":\n return \"datetime\";\n case \"array\":\n return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);\n case \"timeseries\":\n if (propertyType.itemType?.type === \"string\") {\n return \"stringTimeseries\";\n } else if (propertyType.itemType?.type === \"double\") {\n return \"numericTimeseries\";\n } else return \"sensorTimeseries\";\n case \"struct\": {\n return propertyType.structFieldTypes.reduce(\n (structMap: Record<string, BaseWirePropertyTypes>, structField) => {\n structMap[structField.apiName] =\n objectPropertyTypeToSdkPropertyDefinition(\n structField.dataType,\n ) as BaseWirePropertyTypes;\n return structMap;\n },\n {},\n );\n }\n case \"cipherText\": {\n log?.info(\n `${JSON.stringify(propertyType.type)} is not a supported propertyType`,\n );\n\n return undefined;\n }\n default: {\n const _: never = propertyType;\n log?.info(\n `${JSON.stringify(propertyType)} is not a supported propertyType`,\n );\n\n return undefined;\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SAASA,qCAAqC,QAAQ,4CAA4C;AAElG,OAAO,SAASC,qCAAqCA,CACnDC,KAAiE,EACjEC,UAAmB,GAAG,IAAI,EAC1BC,GAAqC,EACA;EACrC,MAAMC,iBAAiB,GAAGC,yCAAyC,CACjEJ,KAAK,CAACK,QAAQ,EACdH,GACF,CAAC;EACD,IAAIC,iBAAiB,IAAI,IAAI,EAAE;IAC7B,OAAOG,SAAS;EAClB;EACA,QAAQN,KAAK,CAACK,QAAQ,CAACE,IAAI;IACzB,KAAK,SAAS;IACd,KAAK,QAAQ;IACb,KAAK,MAAM;IACX,KAAK,SAAS;IACd,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,KAAK,MAAM;IACX,KAAK,OAAO;IACZ,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,YAAY;IACjB,KAAK,gBAAgB;IACrB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,WAAW;IAChB,KAAK,YAAY;IACjB,KAAK,SAAS;IACd,KAAK,wBAAwB;IAC7B,KAAK,QAAQ;IACb,KAAK,QAAQ;MACX,OAAO;QACLC,WAAW,EAAER,KAAK,CAACQ,WAAW;QAC9BC,YAAY,EAAE,KAAK;QACnBC,WAAW,EAAEV,KAAK,CAACU,WAAW;QAC9BH,IAAI,EAAEJ,iBAAiB;QACvBQ,QAAQ,EAAEX,KAAK,CAACW,QAAQ,IAAI,IAAI,GAAGV,UAAU,GAAGD,KAAK,CAACW,QAAQ;QAC9DC,gBAAgB,EAAEZ,KAAK,CAACY,gBAAgB;QACxCC,eAAe,EAAEb,KAAK,CAACa,eAAe,IAAI,IAAI,GAC1Cf,qCAAqC,CAACE,KAAK,CAACa,eAAe,EAAEX,GAAG,CAAC,GACjEI;MACN,CAAC;IACH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AAK,YAAY;MACf,IAAID,YAAY,CAACE,QAAQ,EAAEZ,IAAI,KAAK,QAAQ,EAAE;QAC5C,OAAO,kBAAkB;MAC3B,CAAC,MAAM,IAAIU,YAAY,CAACE,QAAQ,EAAEZ,IAAI,KAAK,QAAQ,EAAE;QACnD,OAAO,mBAAmB;MAC5B,CAAC,MAAM,OAAO,kBAAkB;IAClC,KAAK,QAAQ;MAAE;QACb,OAAOU,YAAY,CAACG,gBAAgB,CAACC,MAAM,CACzC,CAACC,SAAgD,EAAEC,WAAW,KAAK;UACjED,SAAS,CAACC,WAAW,CAACC,OAAO,CAAC,GAC5BpB,yCAAyC,CACvCmB,WAAW,CAAClB,QACd,CAA0B;UAC5B,OAAOiB,SAAS;QAClB,CAAC,EACD,CAAC,CACH,CAAC;MACH;IACA,KAAK,YAAY;MAAE;QACjBpB,GAAG,EAAEY,IAAI,CACP,GAAGC,IAAI,CAACC,SAAS,CAACC,YAAY,CAACV,IAAI,CAAC,kCACtC,CAAC;QAED,OAAOD,SAAS;MAClB;IACA;MAAS;QAEPJ,GAAG,EAAEY,IAAI,CACP,GAAGC,IAAI,CAACC,SAAS,CAACC,YAAY,CAAC,kCACjC,CAAC;QAED,OAAOX,SAAS;MAClB;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"wirePropertyV2ToSdkPropertyDefinition.js","names":["wirePropertyV2ToSdkPropertyDefinition","input","isNullable","log","sdkPropDefinition","objectPropertyTypeToSdkPropertyDefinition","dataType","undefined","type","displayName","multiplicity","description","nullable","valueTypeApiName","info","JSON","stringify","propertyType","subType","itemType","structFieldTypes","reduce","structMap","structField","apiName"],"sources":["wirePropertyV2ToSdkPropertyDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 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 BaseWirePropertyTypes,\n ObjectMetadata,\n WirePropertyTypes,\n} from \"@osdk/api\";\nimport type {\n ObjectPropertyType,\n PropertyV2,\n SharedPropertyType,\n} from \"@osdk/foundry.ontologies\";\n\nexport function wirePropertyV2ToSdkPropertyDefinition(\n input: (PropertyV2 | SharedPropertyType) & { nullable?: boolean },\n isNullable: boolean = true,\n log?: { info: (msg: string) => void },\n): ObjectMetadata.Property | undefined {\n const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(\n input.dataType,\n log,\n );\n if (sdkPropDefinition == null) {\n return undefined;\n }\n switch (input.dataType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"date\":\n case \"attachment\":\n case \"mediaReference\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"timeseries\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n case \"struct\":\n case \"vector\":\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: sdkPropDefinition,\n nullable: input.nullable == null ? isNullable : input.nullable,\n valueTypeApiName: input.valueTypeApiName,\n };\n case \"array\": {\n return {\n displayName: input.displayName,\n multiplicity: true,\n description: input.description,\n type: sdkPropDefinition,\n nullable: true,\n valueTypeApiName: input.valueTypeApiName,\n };\n }\n case \"cipherText\": {\n log?.info(\n `${JSON.stringify(input.dataType.type)} is not a supported dataType`,\n );\n\n return undefined;\n }\n\n default:\n const _: never = input.dataType;\n log?.info(\n `${JSON.stringify(input.dataType)} is not a supported dataType`,\n );\n\n return undefined;\n }\n}\n\nfunction objectPropertyTypeToSdkPropertyDefinition(\n propertyType: ObjectPropertyType,\n log?: { info: (msg: string) => void },\n): WirePropertyTypes | undefined {\n switch (propertyType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"decimal\":\n case \"double\":\n case \"float\":\n case \"long\":\n case \"short\":\n case \"boolean\":\n case \"attachment\":\n case \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"marking\":\n case \"geotimeSeriesReference\":\n case \"mediaReference\":\n case \"vector\":\n return propertyType.type;\n case \"date\":\n return \"datetime\";\n case \"array\":\n return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);\n case \"timeseries\":\n if (propertyType.itemType?.type === \"string\") {\n return \"stringTimeseries\";\n } else if (propertyType.itemType?.type === \"double\") {\n return \"numericTimeseries\";\n } else return \"sensorTimeseries\";\n case \"struct\": {\n return propertyType.structFieldTypes.reduce(\n (structMap: Record<string, BaseWirePropertyTypes>, structField) => {\n structMap[structField.apiName] =\n objectPropertyTypeToSdkPropertyDefinition(\n structField.dataType,\n ) as BaseWirePropertyTypes;\n return structMap;\n },\n {},\n );\n }\n case \"cipherText\": {\n log?.info(\n `${JSON.stringify(propertyType.type)} is not a supported propertyType`,\n );\n\n return undefined;\n }\n default: {\n const _: never = propertyType;\n log?.info(\n `${JSON.stringify(propertyType)} is not a supported propertyType`,\n );\n\n return undefined;\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA,OAAO,SAASA,qCAAqCA,CACnDC,KAAiE,EACjEC,UAAmB,GAAG,IAAI,EAC1BC,GAAqC,EACA;EACrC,MAAMC,iBAAiB,GAAGC,yCAAyC,CACjEJ,KAAK,CAACK,QAAQ,EACdH,GACF,CAAC;EACD,IAAIC,iBAAiB,IAAI,IAAI,EAAE;IAC7B,OAAOG,SAAS;EAClB;EACA,QAAQN,KAAK,CAACK,QAAQ,CAACE,IAAI;IACzB,KAAK,SAAS;IACd,KAAK,QAAQ;IACb,KAAK,MAAM;IACX,KAAK,SAAS;IACd,KAAK,QAAQ;IACb,K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function wireQueryDataTypeToQueryDataTypeDefinition(input) {
58
58
  return {
59
59
  array: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),
60
60
  type: "array",
61
- nullable: isNullableQueryDataType(input.subType),
62
- multiplicity: true
61
+ nullable: isNullableQueryDataType(input.subType)
63
62
  };
64
63
  case "set":
65
64
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"wireQueryDataTypeToQueryDataTypeDefinition.js","names":["isNullableQueryDataType","wireQueryDataTypeToQueryDataTypeDefinition","input","type","nullable","object","objectTypeApiName","objectSet","interface","interfaceTypeApiName","array","subType","multiplicity","set","allowNulls","unionTypes","length","nonNull","find","t","union","reduce","acc","push","struct","Object","fromEntries","fields","map","f","name","fieldType","twoDimensionalAggregation","get2DQueryAggregationProps","threeDimensionalAggregation","get3DQueryAggregationProps","keyType","validMapKeyTypes","includes","Error","toString","valueType","keySubtype","guardInvalidKeyTypes","key"],"sources":["wireQueryDataTypeToQueryDataTypeDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 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 QueryDataTypeDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"@osdk/api\";\nimport type {\n QueryAggregationKeyType,\n QueryDataType,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"@osdk/foundry.ontologies\";\nimport { isNullableQueryDataType } from \"./isNullableQueryDataType.js\";\n\nexport function wireQueryDataTypeToQueryDataTypeDefinition<\n K extends string,\n>(\n input: QueryDataType,\n): QueryDataTypeDefinition {\n switch (input.type) {\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"string\":\n case \"timestamp\":\n return {\n type: input.type,\n nullable: false,\n };\n\n case \"object\":\n return {\n type: \"object\",\n object: input.objectTypeApiName as K,\n nullable: false,\n };\n\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: input.objectTypeApiName as K,\n nullable: false,\n };\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: input.interfaceTypeApiName as K,\n nullable: false,\n };\n case \"interfaceObjectSet\":\n return {\n type: \"interfaceObjectSet\",\n objectSet: input.interfaceTypeApiName as K,\n nullable: false,\n };\n case \"array\":\n return {\n array: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n type: \"array\",\n nullable: isNullableQueryDataType(input.subType),\n multiplicity: true,\n };\n\n case \"set\":\n return {\n type: \"set\",\n set: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n nullable: false,\n };\n\n case \"union\":\n const allowNulls = isNullableQueryDataType(input);\n\n // special case for a union where one half is nullable to skip the union step and just allow nulls directly\n if (allowNulls && input.unionTypes.length === 2) {\n const nonNull = input.unionTypes.find(t => t.type != null);\n if (nonNull) {\n return {\n ...wireQueryDataTypeToQueryDataTypeDefinition(nonNull),\n nullable: true,\n };\n }\n }\n\n return {\n type: \"union\",\n union: input.unionTypes.reduce<QueryDataTypeDefinition[]>((acc, t) => {\n if (t.type === \"null\") {\n return acc;\n }\n acc.push(wireQueryDataTypeToQueryDataTypeDefinition(t));\n return acc;\n }, []),\n nullable: allowNulls,\n };\n\n case \"struct\":\n return {\n type: \"struct\",\n struct: Object.fromEntries(input.fields.map(f => [\n f.name,\n wireQueryDataTypeToQueryDataTypeDefinition(f.fieldType),\n ])),\n nullable: false,\n };\n\n case \"twoDimensionalAggregation\":\n return {\n type: \"twoDimensionalAggregation\",\n twoDimensionalAggregation: get2DQueryAggregationProps(input),\n nullable: false,\n };\n\n case \"threeDimensionalAggregation\":\n return {\n type: \"threeDimensionalAggregation\",\n threeDimensionalAggregation: get3DQueryAggregationProps(input),\n nullable: false,\n };\n\n case \"entrySet\":\n const keyType = wireQueryDataTypeToQueryDataTypeDefinition(input.keyType);\n\n if (!validMapKeyTypes.includes(keyType.type)) {\n throw new Error(\n \"Map types with a key type of \" + keyType.type + \" are not supported\"\n + validMapKeyTypes.toString(),\n );\n }\n\n if (keyType.type === \"array\") {\n throw new Error(\n \"Map types cannot have keys as arrays\",\n );\n }\n\n return {\n type: \"map\",\n nullable: false,\n keyType,\n valueType: wireQueryDataTypeToQueryDataTypeDefinition(input.valueType),\n };\n\n case \"null\":\n case \"unsupported\":\n throw new Error(\n `Unable to process query because the server indicated an unsupported QueryDataType.type: ${input.type}. Please check that your query is using supported types.`,\n );\n\n default:\n const _: never = input;\n throw new Error(`Unsupported QueryDataType.type ${(input as any).type}`);\n }\n}\n\nfunction get2DQueryAggregationProps(\n input: TwoDimensionalAggregation,\n): TwoDimensionalQueryAggregationDefinition {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: input.valueType.type,\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: input.valueType.type,\n };\n }\n throw new Error(\n `Cannot create 2D aggregation with ${input.keyType.type} as its type`,\n );\n }\n}\n\nfunction get3DQueryAggregationProps(\n input: ThreeDimensionalAggregation,\n): ThreeDimensionalQueryAggregationDefinition {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: get2DQueryAggregationProps(input.valueType),\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: get2DQueryAggregationProps(input.valueType),\n };\n }\n throw new Error(\n `Cannot create 3D aggregation with ${input.keyType.type} as its type`,\n );\n }\n}\n\n/**\n * Guard against aggregation key types that are allowed by the backend types but are illegal to actually use\n */\nfunction guardInvalidKeyTypes(\n key: QueryAggregationKeyType,\n): key is QueryAggregationKeyType & ({ type: \"string\" | \"boolean\" }) {\n return key.type === \"string\" || key.type === \"boolean\";\n}\n\n/**\n * The set of all valid key types for maps. This includes all types that are represented by strings or numbers in the OSDK, and Ontology Objects.\n */\nconst validMapKeyTypes = [\n \"string\",\n \"object\",\n \"double\",\n \"float\",\n \"integer\",\n \"long\",\n \"date\",\n \"timestamp\",\n \"byte\",\n \"datetime\",\n \"decimal\",\n \"marking\",\n \"short\",\n \"objectType\",\n];\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA,SAASA,uBAAuB,QAAQ,8BAA8B;AAEtE,OAAO,SAASC,0CAA0CA,CAGxDC,KAAoB,EACK;EACzB,QAAQA,KAAK,CAACC,IAAI;IAChB,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,YAAY;IACjB,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,WAAW;MACd,OAAO;QACLA,IAAI,EAAED,KAAK,CAACC,IAAI;QAChBC,QAAQ,EAAE;MACZ,CAAC;IAEH,KAAK,QAAQ;MACX,OAAO;QACLD,IAAI,EAAE,QAAQ;QACdE,MAAM,EAAEH,KAAK,CAACI,iBAAsB;QACpCF,QAAQ,EAAE;MACZ,CAAC;IAEH,KAAK,WAAW;MACd,OAAO;QACLD,IAAI,EAAE,WAAW;QACjBI,SAAS,EAAEL,KAAK,CAACI,iBAAsB;QACvCF,QAAQ,EAAE;MACZ,CAAC;IACH,KAAK,iBAAiB;MACpB,OAAO;QACLD,IAAI,EAAE,WAAW;QACjBK,SAAS,EAAEN,KAAK,CAACO,oBAAyB;QAC1CL,QAAQ,EAAE;MACZ,CAAC;IACH,KAAK,oBAAoB;MACvB,OAAO;QACLD,IAAI,EAAE,oBAAoB;QAC1BI,S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;AACA,SAASwC,oBAAoBA,CAC3BC,GAA4B,EACuC;EACnE,OAAOA,GAAG,CAACzC,IAAI,KAAK,QAAQ,IAAIyC,GAAG,CAACzC,IAAI,KAAK,SAAS;AACxD;;AAEA;AACA;AACA;AACA,MAAMkC,gBAAgB,GAAG,CACvB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,MAAM,EACN,MAAM,EACN,WAAW,EACX,MAAM,EACN,UAAU,EACV,SAAS,EACT,SAAS,EACT,OAAO,EACP,YAAY,CACb","ignoreList":[]}
1
+ {"version":3,"file":"wireQueryDataTypeToQueryDataTypeDefinition.js","names":["isNullableQueryDataType","wireQueryDataTypeToQueryDataTypeDefinition","input","type","nullable","object","objectTypeApiName","objectSet","interface","interfaceTypeApiName","array","subType","set","allowNulls","unionTypes","length","nonNull","find","t","union","reduce","acc","push","struct","Object","fromEntries","fields","map","f","name","fieldType","twoDimensionalAggregation","get2DQueryAggregationProps","threeDimensionalAggregation","get3DQueryAggregationProps","keyType","validMapKeyTypes","includes","Error","toString","valueType","keySubtype","guardInvalidKeyTypes","key"],"sources":["wireQueryDataTypeToQueryDataTypeDefinition.ts"],"sourcesContent":["/*\n * Copyright 2023 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 QueryDataTypeDefinition,\n ThreeDimensionalQueryAggregationDefinition,\n TwoDimensionalQueryAggregationDefinition,\n} from \"@osdk/api\";\nimport type {\n QueryAggregationKeyType,\n QueryDataType,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n} from \"@osdk/foundry.ontologies\";\nimport { isNullableQueryDataType } from \"./isNullableQueryDataType.js\";\n\nexport function wireQueryDataTypeToQueryDataTypeDefinition<\n K extends string,\n>(\n input: QueryDataType,\n): QueryDataTypeDefinition {\n switch (input.type) {\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"string\":\n case \"timestamp\":\n return {\n type: input.type,\n nullable: false,\n };\n\n case \"object\":\n return {\n type: \"object\",\n object: input.objectTypeApiName as K,\n nullable: false,\n };\n\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: input.objectTypeApiName as K,\n nullable: false,\n };\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: input.interfaceTypeApiName as K,\n nullable: false,\n };\n case \"interfaceObjectSet\":\n return {\n type: \"interfaceObjectSet\",\n objectSet: input.interfaceTypeApiName as K,\n nullable: false,\n };\n case \"array\":\n return {\n array: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n type: \"array\",\n nullable: isNullableQueryDataType(input.subType),\n };\n\n case \"set\":\n return {\n type: \"set\",\n set: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n nullable: false,\n };\n\n case \"union\":\n const allowNulls = isNullableQueryDataType(input);\n\n // special case for a union where one half is nullable to skip the union step and just allow nulls directly\n if (allowNulls && input.unionTypes.length === 2) {\n const nonNull = input.unionTypes.find(t => t.type != null);\n if (nonNull) {\n return {\n ...wireQueryDataTypeToQueryDataTypeDefinition(nonNull),\n nullable: true,\n };\n }\n }\n\n return {\n type: \"union\",\n union: input.unionTypes.reduce<QueryDataTypeDefinition[]>((acc, t) => {\n if (t.type === \"null\") {\n return acc;\n }\n acc.push(wireQueryDataTypeToQueryDataTypeDefinition(t));\n return acc;\n }, []),\n nullable: allowNulls,\n };\n\n case \"struct\":\n return {\n type: \"struct\",\n struct: Object.fromEntries(input.fields.map(f => [\n f.name,\n wireQueryDataTypeToQueryDataTypeDefinition(f.fieldType),\n ])),\n nullable: false,\n };\n\n case \"twoDimensionalAggregation\":\n return {\n type: \"twoDimensionalAggregation\",\n twoDimensionalAggregation: get2DQueryAggregationProps(input),\n nullable: false,\n };\n\n case \"threeDimensionalAggregation\":\n return {\n type: \"threeDimensionalAggregation\",\n threeDimensionalAggregation: get3DQueryAggregationProps(input),\n nullable: false,\n };\n\n case \"entrySet\":\n const keyType = wireQueryDataTypeToQueryDataTypeDefinition(input.keyType);\n\n if (!validMapKeyTypes.includes(keyType.type)) {\n throw new Error(\n \"Map types with a key type of \" + keyType.type + \" are not supported\"\n + validMapKeyTypes.toString(),\n );\n }\n\n if (keyType.type === \"array\") {\n throw new Error(\n \"Map types cannot have keys as arrays\",\n );\n }\n\n return {\n type: \"map\",\n nullable: false,\n keyType,\n valueType: wireQueryDataTypeToQueryDataTypeDefinition(input.valueType),\n };\n\n case \"null\":\n case \"unsupported\":\n throw new Error(\n `Unable to process query because the server indicated an unsupported QueryDataType.type: ${input.type}. Please check that your query is using supported types.`,\n );\n\n default:\n const _: never = input;\n throw new Error(`Unsupported QueryDataType.type ${(input as any).type}`);\n }\n}\n\nfunction get2DQueryAggregationProps(\n input: TwoDimensionalAggregation,\n): TwoDimensionalQueryAggregationDefinition {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: input.valueType.type,\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: input.valueType.type,\n };\n }\n throw new Error(\n `Cannot create 2D aggregation with ${input.keyType.type} as its type`,\n );\n }\n}\n\nfunction get3DQueryAggregationProps(\n input: ThreeDimensionalAggregation,\n): ThreeDimensionalQueryAggregationDefinition {\n if (input.keyType.type === \"range\") {\n return {\n keyType: input.keyType.type,\n keySubtype: input.keyType.subType.type,\n valueType: get2DQueryAggregationProps(input.valueType),\n };\n } else {\n if (guardInvalidKeyTypes(input.keyType)) {\n return {\n keyType: input.keyType.type,\n valueType: get2DQueryAggregationProps(input.valueType),\n };\n }\n throw new Error(\n `Cannot create 3D aggregation with ${input.keyType.type} as its type`,\n );\n }\n}\n\n/**\n * Guard against aggregation key types that are allowed by the backend types but are illegal to actually use\n */\nfunction guardInvalidKeyTypes(\n key: QueryAggregationKeyType,\n): key is QueryAggregationKeyType & ({ type: \"string\" | \"boolean\" }) {\n return key.type === \"string\" || key.type === \"boolean\";\n}\n\n/**\n * The set of all valid key types for maps. This includes all types that are represented by strings or numbers in the OSDK, and Ontology Objects.\n */\nconst validMapKeyTypes = [\n \"string\",\n \"object\",\n \"double\",\n \"float\",\n \"integer\",\n \"long\",\n \"date\",\n \"timestamp\",\n \"byte\",\n \"datetime\",\n \"decimal\",\n \"marking\",\n \"short\",\n \"objectType\",\n];\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA,SAASA,uBAAuB,QAAQ,8BAA8B;AAEtE,OAAO,SAASC,0CAA0CA,CAGxDC,KAAoB,EACK;EACzB,QAAQA,KAAK,CAACC,IAAI;IAChB,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,YAAY;IACjB,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,WAAW;MACd,OAAO;QACLA,IAAI,EAAED,KAAK,CAACC,IAAI;QAChBC,QAAQ,EAAE;MACZ,CAAC;IAEH,KAAK,QAAQ;MACX,OAAO;QACLD,IAAI,EAAE,QAAQ;QACdE,MAAM,EAAEH,KAAK,CAACI,iBAAsB;QACpCF,QAAQ,EAAE;MACZ,CAAC;IAEH,KAAK,WAAW;MACd,OAAO;QACLD,IAAI,EAAE,WAAW;QACjBI,SAAS,EAAEL,KAAK,CAACI,iBAAsB;QACvCF,QAAQ,EAAE;MACZ,CAAC;IACH,KAAK,iBAAiB;MACpB,OAAO;QACLD,IAAI,EAAE,WAAW;QACjBK,SAAS,EAAEN,KAAK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AK,CACb,qCAAqCpC,KAAK,CAACiC,OAAO,CAAChC,IAAI,cACzD,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA,SAASuC,oBAAoBA,CAC3BC,GAA4B,EACuC;EACnE,OAAOA,GAAG,CAACxC,IAAI,KAAK,QAAQ,IAAIwC,GAAG,CAACxC,IAAI,KAAK,SAAS;AACxD;;AAEA;AACA;AACA;AACA,MAAMiC,gBAAgB,GAAG,CACvB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,MAAM,EACN,MAAM,EACN,WAAW,EACX,MAAM,EACN,UAAU,EACV,SAAS,EACT,SAAS,EACT,OAAO,EACP,YAAY,CACb","ignoreList":[]}
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAEE,sBAEK,WAAY;AACnB,cAEE,YACA,0BACK,0BAA2B;AAGlC,OAAO,iBAAS,sCACdA,QAAQ,aAAa,sBAAsB;CAAE;AAAoB,GACjEC,sBACAC,MAAM;CAAE,OAAOC;AAAsB,IACpC,eAAe","names":["input: (PropertyV2 | SharedPropertyType) & { nullable?: boolean }","isNullable: boolean","log?: { info: (msg: string) => void }","msg: string"],"sources":["../../src/wirePropertyV2ToSdkPropertyDefinition.ts"],"version":3,"file":"wirePropertyV2ToSdkPropertyDefinition.d.ts"}
1
+ {"mappings":"AAgBA,cAEE,sBAEK,WAAY;AACnB,cAEE,YACA,0BACK,0BAA2B;AAElC,OAAO,iBAAS,sCACdA,QAAQ,aAAa,sBAAsB;CAAE;AAAoB,GACjEC,sBACAC,MAAM;CAAE,OAAOC;AAAsB,IACpC,eAAe","names":["input: (PropertyV2 | SharedPropertyType) & { nullable?: boolean }","isNullable: boolean","log?: { info: (msg: string) => void }","msg: string"],"sources":["../../src/wirePropertyV2ToSdkPropertyDefinition.ts"],"version":3,"file":"wirePropertyV2ToSdkPropertyDefinition.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/generator-converters",
3
- "version": "2.6.0-beta.8",
3
+ "version": "2.6.0-rc.14",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -29,15 +29,15 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@osdk/foundry.ontologies": "2.38.0",
33
- "@osdk/api": "~2.6.0-beta.8"
32
+ "@osdk/foundry.ontologies": "2.42.0",
33
+ "@osdk/api": "~2.6.0-rc.14"
34
34
  },
35
35
  "devDependencies": {
36
36
  "ts-expect": "^1.3.0",
37
37
  "typescript": "~5.5.4",
38
38
  "vitest": "^3.2.4",
39
- "@osdk/monorepo.api-extractor": "~0.5.0-beta.1",
40
- "@osdk/monorepo.tsconfig": "~0.5.0-beta.1"
39
+ "@osdk/monorepo.tsconfig": "~0.5.0-beta.1",
40
+ "@osdk/monorepo.api-extractor": "~0.5.0-beta.1"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"
@@ -1,33 +0,0 @@
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 convertPropertyTypeReferenceOrStringConstant(value) {
18
- switch (value.type) {
19
- case "constant":
20
- return {
21
- type: "constant",
22
- value: value.value
23
- };
24
- case "propertyType":
25
- return {
26
- type: "propertyType",
27
- propertyApiName: value.propertyApiName
28
- };
29
- default:
30
- throw new Error(`Unknown property reference type: ${value.type}`);
31
- }
32
- }
33
- //# sourceMappingURL=commonValueFormattingUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commonValueFormattingUtils.js","names":["convertPropertyTypeReferenceOrStringConstant","value","type","propertyApiName","Error"],"sources":["commonValueFormattingUtils.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 { PropertyTypeReferenceOrStringConstant } from \"@osdk/api\";\nimport type * as Ontologies from \"@osdk/foundry.ontologies\";\n\nexport function convertPropertyTypeReferenceOrStringConstant(\n value: Ontologies.PropertyTypeReferenceOrStringConstant,\n): PropertyTypeReferenceOrStringConstant {\n switch (value.type) {\n case \"constant\":\n return {\n type: \"constant\",\n value: value.value,\n };\n case \"propertyType\":\n return {\n type: \"propertyType\",\n propertyApiName: value.propertyApiName,\n };\n default:\n value satisfies never;\n throw new Error(\n `Unknown property reference type: ${(value as any).type}`,\n );\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,SAASA,4CAA4CA,CAC1DC,KAAuD,EAChB;EACvC,QAAQA,KAAK,CAACC,IAAI;IAChB,KAAK,UAAU;MACb,OAAO;QACLA,IAAI,EAAE,UAAU;QAChBD,KAAK,EAAEA,KAAK,CAACA;MACf,CAAC;IACH,KAAK,cAAc;MACjB,OAAO;QACLC,IAAI,EAAE,cAAc;QACpBC,eAAe,EAAEF,KAAK,CAACE;MACzB,CAAC;IACH;MAEE,MAAM,IAAIC,KAAK,CACb,oCAAqCH,KAAK,CAASC,IAAI,EACzD,CAAC;EACL;AACF","ignoreList":[]}
@@ -1,24 +0,0 @@
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 convertBooleanFormattingRule(wireFormatting) {
18
- return {
19
- type: "boolean",
20
- valueIfTrue: wireFormatting.valueIfTrue,
21
- valueIfFalse: wireFormatting.valueIfFalse
22
- };
23
- }
24
- //# sourceMappingURL=convertBooleanValueFormattingRule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convertBooleanValueFormattingRule.js","names":["convertBooleanFormattingRule","wireFormatting","type","valueIfTrue","valueIfFalse"],"sources":["convertBooleanValueFormattingRule.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 { PropertyBooleanFormattingRule } from \"@osdk/api\";\nimport type * as Ontologies from \"@osdk/foundry.ontologies\";\n\nexport function convertBooleanFormattingRule(\n wireFormatting: Ontologies.PropertyBooleanFormattingRule,\n): PropertyBooleanFormattingRule {\n return {\n type: \"boolean\",\n valueIfTrue: wireFormatting.valueIfTrue,\n valueIfFalse: wireFormatting.valueIfFalse,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,SAASA,4BAA4BA,CAC1CC,cAAwD,EACzB;EAC/B,OAAO;IACLC,IAAI,EAAE,SAAS;IACfC,WAAW,EAAEF,cAAc,CAACE,WAAW;IACvCC,YAAY,EAAEH,cAAc,CAACG;EAC/B,CAAC;AACH","ignoreList":[]}
@@ -1,62 +0,0 @@
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
- import { convertPropertyTypeReferenceOrStringConstant } from "./commonValueFormattingUtils.js";
18
- export function convertDateFormattingRule(wireFormatting) {
19
- return {
20
- type: "date",
21
- format: convertDatetimeFormat(wireFormatting.format)
22
- };
23
- }
24
- export function convertTimestampFormattingRule(wireFormatting) {
25
- return {
26
- type: "timestamp",
27
- format: convertDatetimeFormat(wireFormatting.format),
28
- displayTimezone: convertDatetimeTimezone(wireFormatting.displayTimezone)
29
- };
30
- }
31
- function convertDatetimeFormat(wireFormat) {
32
- switch (wireFormat.type) {
33
- case "stringFormat":
34
- return {
35
- type: "stringFormat",
36
- pattern: wireFormat.pattern
37
- };
38
- case "localizedFormat":
39
- return {
40
- type: "localizedFormat",
41
- format: wireFormat.format
42
- };
43
- default:
44
- throw new Error(`Unknown datetime format type: ${wireFormat.type}`);
45
- }
46
- }
47
- function convertDatetimeTimezone(wireTimezone) {
48
- switch (wireTimezone.type) {
49
- case "static":
50
- return {
51
- type: "static",
52
- zoneId: convertPropertyTypeReferenceOrStringConstant(wireTimezone.zoneId)
53
- };
54
- case "user":
55
- return {
56
- type: "user"
57
- };
58
- default:
59
- throw new Error(`Unknown timezone type: ${wireTimezone.type}`);
60
- }
61
- }
62
- //# sourceMappingURL=convertDateAndTimestampValueFormattingRule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convertDateAndTimestampValueFormattingRule.js","names":["convertPropertyTypeReferenceOrStringConstant","convertDateFormattingRule","wireFormatting","type","format","convertDatetimeFormat","convertTimestampFormattingRule","displayTimezone","convertDatetimeTimezone","wireFormat","pattern","Error","wireTimezone","zoneId"],"sources":["convertDateAndTimestampValueFormattingRule.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 DatetimeFormat,\n DatetimeTimezone,\n PropertyDateFormattingRule,\n PropertyTimestampFormattingRule,\n} from \"@osdk/api\";\nimport type * as Ontologies from \"@osdk/foundry.ontologies\";\nimport { convertPropertyTypeReferenceOrStringConstant } from \"./commonValueFormattingUtils.js\";\n\nexport function convertDateFormattingRule(\n wireFormatting: Ontologies.PropertyDateFormattingRule,\n): PropertyDateFormattingRule {\n return {\n type: \"date\",\n format: convertDatetimeFormat(wireFormatting.format),\n };\n}\n\nexport function convertTimestampFormattingRule(\n wireFormatting: Ontologies.PropertyTimestampFormattingRule,\n): PropertyTimestampFormattingRule {\n return {\n type: \"timestamp\",\n format: convertDatetimeFormat(wireFormatting.format),\n displayTimezone: convertDatetimeTimezone(\n wireFormatting.displayTimezone,\n ),\n };\n}\n\nfunction convertDatetimeFormat(\n wireFormat: Ontologies.DatetimeFormat,\n): DatetimeFormat {\n switch (wireFormat.type) {\n case \"stringFormat\":\n return {\n type: \"stringFormat\",\n pattern: wireFormat.pattern,\n };\n case \"localizedFormat\":\n return {\n type: \"localizedFormat\",\n format: wireFormat.format,\n };\n default:\n wireFormat satisfies never;\n throw new Error(\n `Unknown datetime format type: ${(wireFormat as any).type}`,\n );\n }\n}\n\nfunction convertDatetimeTimezone(\n wireTimezone: Ontologies.DatetimeTimezone,\n): DatetimeTimezone {\n switch (wireTimezone.type) {\n case \"static\":\n return {\n type: \"static\",\n zoneId: convertPropertyTypeReferenceOrStringConstant(\n wireTimezone.zoneId,\n ),\n };\n case \"user\":\n return { type: \"user\" };\n default:\n wireTimezone satisfies never;\n throw new Error(`Unknown timezone type: ${(wireTimezone as any).type}`);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,SAASA,4CAA4C,QAAQ,iCAAiC;AAE9F,OAAO,SAASC,yBAAyBA,CACvCC,cAAqD,EACzB;EAC5B,OAAO;IACLC,IAAI,EAAE,MAAM;IACZC,MAAM,EAAEC,qBAAqB,CAACH,cAAc,CAACE,MAAM;EACrD,CAAC;AACH;AAEA,OAAO,SAASE,8BAA8BA,CAC5CJ,cAA0D,EACzB;EACjC,OAAO;IACLC,IAAI,EAAE,WAAW;IACjBC,MAAM,EAAEC,qBAAqB,CAACH,cAAc,CAACE,MAAM,CAAC;IACpDG,eAAe,EAAEC,uBAAuB,CACtCN,cAAc,CAACK,eACjB;EACF,CAAC;AACH;AAEA,SAASF,qBAAqBA,CAC5BI,UAAqC,EACrB;EAChB,QAAQA,UAAU,CAACN,IAAI;IACrB,KAAK,cAAc;MACjB,OAAO;QACLA,IAAI,EAAE,cAAc;QACpBO,OAAO,EAAED,UAAU,CAACC;MACtB,CAAC;IACH,KAAK,iBAAiB;MACpB,OAAO;QACLP,IAAI,EAAE,iBAAiB;QACvBC,MAAM,EAAEK,UAAU,CAACL;MACrB,CAAC;IACH;MAEE,MAAM,IAAIO,KAAK,CACb,iCAAkCF,UAAU,CAASN,IAAI,EAC3D,CAAC;EACL;AACF;AAEA,SAASK,uBAAuBA,CAC9BI,YAAyC,EACvB;EAClB,QAAQA,YAAY,CAACT,IAAI;IACvB,KAAK,QAAQ;MACX,OAAO;QACLA,IAAI,EAAE,QAAQ;QACdU,MAAM,EAAEb,4CAA4C,CAClDY,YAAY,CAACC,MACf;MACF,CAAC;IACH,KAAK,MAAM;MACT,OAAO;QAAEV,IAAI,EAAE;MAAO,CAAC;IACzB;MAEE,MAAM,IAAIQ,KAAK,CAAC,0BAA2BC,YAAY,CAAST,IAAI,EAAE,CAAC;EAC3E;AACF","ignoreList":[]}
@@ -1,39 +0,0 @@
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 convertKnownTypeFormattingRule(wireFormatting) {
18
- switch (wireFormatting.knownType) {
19
- case "ARTIFACT_GID":
20
- return {
21
- type: "knownType",
22
- knownType: "ARTIFACT_GID"
23
- };
24
- case "RESOURCE_RID":
25
- return {
26
- type: "knownType",
27
- knownType: "RESOURCE_RID"
28
- };
29
- case "USER_OR_GROUP_ID":
30
- return {
31
- type: "knownType",
32
- knownType: "USER_OR_GROUP_ID"
33
- };
34
- default:
35
- wireFormatting.knownType;
36
- return undefined;
37
- }
38
- }
39
- //# sourceMappingURL=convertKnownTypeValueFormattingRule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convertKnownTypeValueFormattingRule.js","names":["convertKnownTypeFormattingRule","wireFormatting","knownType","type","undefined"],"sources":["convertKnownTypeValueFormattingRule.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 { PropertyKnownTypeFormattingRule } from \"@osdk/api\";\nimport type * as Ontologies from \"@osdk/foundry.ontologies\";\n\nexport function convertKnownTypeFormattingRule(\n wireFormatting: Ontologies.PropertyKnownTypeFormattingRule,\n): PropertyKnownTypeFormattingRule | undefined {\n switch (wireFormatting.knownType) {\n case \"ARTIFACT_GID\":\n return {\n type: \"knownType\",\n knownType: \"ARTIFACT_GID\",\n };\n case \"RESOURCE_RID\":\n return {\n type: \"knownType\",\n knownType: \"RESOURCE_RID\",\n };\n case \"USER_OR_GROUP_ID\":\n return {\n type: \"knownType\",\n knownType: \"USER_OR_GROUP_ID\",\n };\n default:\n wireFormatting.knownType satisfies never;\n return undefined;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,SAASA,8BAA8BA,CAC5CC,cAA0D,EACb;EAC7C,QAAQA,cAAc,CAACC,SAAS;IAC9B,KAAK,cAAc;MACjB,OAAO;QACLC,IAAI,EAAE,WAAW;QACjBD,SAAS,EAAE;MACb,CAAC;IACH,KAAK,cAAc;MACjB,OAAO;QACLC,IAAI,EAAE,WAAW;QACjBD,SAAS,EAAE;MACb,CAAC;IACH,KAAK,kBAAkB;MACrB,OAAO;QACLC,IAAI,EAAE,WAAW;QACjBD,SAAS,EAAE;MACb,CAAC;IACH;MACED,cAAc,CAACC,SAAS;MACxB,OAAOE,SAAS;EACpB;AACF","ignoreList":[]}
@@ -1,133 +0,0 @@
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
- import { convertPropertyTypeReferenceOrStringConstant } from "./commonValueFormattingUtils.js";
18
- export function convertNumberFormattingRule(wireFormatting) {
19
- const numberType = convertNumberFormattingType(wireFormatting.numberType);
20
- if (!numberType) {
21
- return undefined;
22
- }
23
- return {
24
- type: "number",
25
- numberType
26
- };
27
- }
28
- function convertNumberFormatOptions(wireOptions) {
29
- return {
30
- useGrouping: wireOptions.useGrouping,
31
- convertNegativeToParenthesis: wireOptions.convertNegativeToParenthesis,
32
- minimumIntegerDigits: wireOptions.minimumIntegerDigits,
33
- minimumFractionDigits: wireOptions.minimumFractionDigits,
34
- maximumFractionDigits: wireOptions.maximumFractionDigits,
35
- minimumSignificantDigits: wireOptions.minimumSignificantDigits,
36
- maximumSignificantDigits: wireOptions.maximumSignificantDigits,
37
- notation: wireOptions.notation,
38
- roundingMode: wireOptions.roundingMode
39
- };
40
- }
41
- function convertDurationFormatStyle(formatStyle) {
42
- switch (formatStyle.type) {
43
- case "humanReadable":
44
- return {
45
- type: "humanReadable",
46
- showFullUnits: formatStyle.showFullUnits
47
- };
48
- case "timecode":
49
- return {
50
- type: "timecode"
51
- };
52
- default:
53
- throw new Error(`Unknown duration format style: ${formatStyle.type}`);
54
- }
55
- }
56
- function convertNumberFormattingType(wireNumberType) {
57
- switch (wireNumberType.type) {
58
- case "standard":
59
- return {
60
- type: "standard",
61
- baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)
62
- };
63
- case "fixedValues":
64
- return {
65
- type: "fixedValues",
66
- values: wireNumberType.values
67
- };
68
- case "currency":
69
- {
70
- return {
71
- type: "currency",
72
- baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),
73
- style: wireNumberType.style,
74
- currencyCode: convertPropertyTypeReferenceOrStringConstant(wireNumberType.currencyCode)
75
- };
76
- }
77
- case "standardUnit":
78
- {
79
- return {
80
- type: "standardUnit",
81
- baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),
82
- unit: convertPropertyTypeReferenceOrStringConstant(wireNumberType.unit)
83
- };
84
- }
85
- case "customUnit":
86
- {
87
- return {
88
- type: "customUnit",
89
- baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),
90
- unit: convertPropertyTypeReferenceOrStringConstant(wireNumberType.unit)
91
- };
92
- }
93
- case "affix":
94
- {
95
- return {
96
- type: "affix",
97
- baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),
98
- affix: {
99
- prefix: wireNumberType.affix?.prefix != null ? convertPropertyTypeReferenceOrStringConstant(wireNumberType.affix.prefix) : undefined,
100
- postfix: wireNumberType.affix?.postfix != null ? convertPropertyTypeReferenceOrStringConstant(wireNumberType.affix.postfix) : undefined
101
- }
102
- };
103
- }
104
- case "duration":
105
- {
106
- return {
107
- type: "duration",
108
- formatStyle: convertDurationFormatStyle(wireNumberType.formatStyle),
109
- precision: wireNumberType.precision,
110
- baseValue: wireNumberType.baseValue
111
- };
112
- }
113
- case "scale":
114
- {
115
- return {
116
- type: "scale",
117
- scaleType: wireNumberType.scaleType,
118
- baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)
119
- };
120
- }
121
- case "ratio":
122
- {
123
- return {
124
- type: "ratio",
125
- ratioType: wireNumberType.ratioType,
126
- baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)
127
- };
128
- }
129
- default:
130
- throw new Error(`Unknown number format type: ${wireNumberType.type}`);
131
- }
132
- }
133
- //# sourceMappingURL=convertNumberValueFormattingRule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convertNumberValueFormattingRule.js","names":["convertPropertyTypeReferenceOrStringConstant","convertNumberFormattingRule","wireFormatting","numberType","convertNumberFormattingType","undefined","type","convertNumberFormatOptions","wireOptions","useGrouping","convertNegativeToParenthesis","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","notation","roundingMode","convertDurationFormatStyle","formatStyle","showFullUnits","Error","wireNumberType","baseFormatOptions","values","style","currencyCode","unit","affix","prefix","postfix","precision","baseValue","scaleType","ratioType"],"sources":["convertNumberValueFormattingRule.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 DurationFormatStyle,\n NumberFormatOptions,\n PropertyNumberFormattingRule,\n PropertyNumberFormattingRuleType,\n} from \"@osdk/api\";\nimport type * as Ontologies from \"@osdk/foundry.ontologies\";\nimport { convertPropertyTypeReferenceOrStringConstant } from \"./commonValueFormattingUtils.js\";\n\nexport function convertNumberFormattingRule(\n wireFormatting: Ontologies.PropertyNumberFormattingRule,\n): PropertyNumberFormattingRule | undefined {\n const numberType = convertNumberFormattingType(wireFormatting.numberType);\n if (!numberType) {\n return undefined;\n }\n return {\n type: \"number\",\n numberType,\n };\n}\n\nfunction convertNumberFormatOptions(\n wireOptions: Ontologies.NumberFormatOptions,\n): NumberFormatOptions {\n return {\n useGrouping: wireOptions.useGrouping,\n convertNegativeToParenthesis: wireOptions.convertNegativeToParenthesis,\n minimumIntegerDigits: wireOptions.minimumIntegerDigits,\n minimumFractionDigits: wireOptions.minimumFractionDigits,\n maximumFractionDigits: wireOptions.maximumFractionDigits,\n minimumSignificantDigits: wireOptions.minimumSignificantDigits,\n maximumSignificantDigits: wireOptions.maximumSignificantDigits,\n notation: wireOptions.notation,\n roundingMode: wireOptions.roundingMode,\n };\n}\n\nfunction convertDurationFormatStyle(\n formatStyle: Ontologies.DurationFormatStyle,\n): DurationFormatStyle {\n switch (formatStyle.type) {\n case \"humanReadable\":\n return {\n type: \"humanReadable\",\n showFullUnits: formatStyle.showFullUnits,\n };\n case \"timecode\":\n return {\n type: \"timecode\",\n };\n default:\n formatStyle satisfies never;\n throw new Error(\n `Unknown duration format style: ${(formatStyle as any).type}`,\n );\n }\n}\n\nfunction convertNumberFormattingType(\n wireNumberType: Ontologies.PropertyNumberFormattingRuleType,\n): PropertyNumberFormattingRuleType | undefined {\n switch (wireNumberType.type) {\n case \"standard\":\n return {\n type: \"standard\",\n baseFormatOptions: convertNumberFormatOptions(\n wireNumberType.baseFormatOptions,\n ),\n };\n\n case \"fixedValues\":\n return {\n type: \"fixedValues\",\n values: wireNumberType.values,\n };\n\n case \"currency\": {\n return {\n type: \"currency\",\n baseFormatOptions: convertNumberFormatOptions(\n wireNumberType.baseFormatOptions,\n ),\n style: wireNumberType.style,\n currencyCode: convertPropertyTypeReferenceOrStringConstant(\n wireNumberType.currencyCode,\n ),\n };\n }\n\n case \"standardUnit\": {\n return {\n type: \"standardUnit\",\n baseFormatOptions: convertNumberFormatOptions(\n wireNumberType.baseFormatOptions,\n ),\n unit: convertPropertyTypeReferenceOrStringConstant(wireNumberType.unit),\n };\n }\n\n case \"customUnit\": {\n return {\n type: \"customUnit\",\n baseFormatOptions: convertNumberFormatOptions(\n wireNumberType.baseFormatOptions,\n ),\n unit: convertPropertyTypeReferenceOrStringConstant(wireNumberType.unit),\n };\n }\n\n case \"affix\": {\n return {\n type: \"affix\",\n baseFormatOptions: convertNumberFormatOptions(\n wireNumberType.baseFormatOptions,\n ),\n affix: {\n prefix: wireNumberType.affix?.prefix != null\n ? convertPropertyTypeReferenceOrStringConstant(\n wireNumberType.affix.prefix,\n )\n : undefined,\n postfix: wireNumberType.affix?.postfix != null\n ? convertPropertyTypeReferenceOrStringConstant(\n wireNumberType.affix.postfix,\n )\n : undefined,\n },\n };\n }\n\n case \"duration\": {\n return {\n type: \"duration\",\n formatStyle: convertDurationFormatStyle(wireNumberType.formatStyle),\n precision: wireNumberType.precision,\n baseValue: wireNumberType.baseValue,\n };\n }\n\n case \"scale\": {\n return {\n type: \"scale\",\n scaleType: wireNumberType.scaleType,\n baseFormatOptions: convertNumberFormatOptions(\n wireNumberType.baseFormatOptions,\n ),\n };\n }\n\n case \"ratio\": {\n return {\n type: \"ratio\",\n ratioType: wireNumberType.ratioType,\n baseFormatOptions: convertNumberFormatOptions(\n wireNumberType.baseFormatOptions,\n ),\n };\n }\n\n default:\n wireNumberType satisfies never;\n throw new Error(\n `Unknown number format type: ${(wireNumberType as any).type}`,\n );\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,SAASA,4CAA4C,QAAQ,iCAAiC;AAE9F,OAAO,SAASC,2BAA2BA,CACzCC,cAAuD,EACb;EAC1C,MAAMC,UAAU,GAAGC,2BAA2B,CAACF,cAAc,CAACC,UAAU,CAAC;EACzE,IAAI,CAACA,UAAU,EAAE;IACf,OAAOE,SAAS;EAClB;EACA,OAAO;IACLC,IAAI,EAAE,QAAQ;IACdH;EACF,CAAC;AACH;AAEA,SAASI,0BAA0BA,CACjCC,WAA2C,EACtB;EACrB,OAAO;IACLC,WAAW,EAAED,WAAW,CAACC,WAAW;IACpCC,4BAA4B,EAAEF,WAAW,CAACE,4BAA4B;IACtEC,oBAAoB,EAAEH,WAAW,C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