@osdk/generator-converters 2.1.0-beta.22 → 2.1.0-beta.24

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 +29 -0
  2. package/build/browser/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js +3 -1
  3. package/build/browser/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js.map +1 -1
  4. package/build/browser/empty.test.js +1 -0
  5. package/build/browser/empty.test.js.map +1 -1
  6. package/build/browser/getEditedEntities.js +1 -0
  7. package/build/browser/getEditedEntities.js.map +1 -1
  8. package/build/browser/index.js +1 -0
  9. package/build/browser/index.js.map +1 -1
  10. package/build/browser/isNullableQueryDataType.js +1 -0
  11. package/build/browser/isNullableQueryDataType.js.map +1 -1
  12. package/build/browser/wireActionTypeV2ToSdkActionMetadata.js +14 -0
  13. package/build/browser/wireActionTypeV2ToSdkActionMetadata.js.map +1 -1
  14. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.js +2 -0
  15. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.js.map +1 -1
  16. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js +4 -0
  17. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js.map +1 -1
  18. package/build/browser/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js +2 -0
  19. package/build/browser/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js.map +1 -1
  20. package/build/browser/wirePropertyV2ToSdkPropertyDefinition.js +4 -2
  21. package/build/browser/wirePropertyV2ToSdkPropertyDefinition.js.map +1 -1
  22. package/build/browser/wireQueryDataTypeToQueryDataTypeDefinition.js +3 -0
  23. package/build/browser/wireQueryDataTypeToQueryDataTypeDefinition.js.map +1 -1
  24. package/build/browser/wireQueryTypeV2ToSdkQueryMetadata.js +1 -0
  25. package/build/browser/wireQueryTypeV2ToSdkQueryMetadata.js.map +1 -1
  26. package/build/cjs/index.cjs +477 -0
  27. package/build/cjs/index.cjs.map +1 -0
  28. package/build/cjs/index.d.cts +33 -0
  29. package/build/esm/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js +3 -1
  30. package/build/esm/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js.map +1 -1
  31. package/build/esm/empty.test.js +1 -0
  32. package/build/esm/empty.test.js.map +1 -1
  33. package/build/esm/getEditedEntities.js +1 -0
  34. package/build/esm/getEditedEntities.js.map +1 -1
  35. package/build/esm/index.js +1 -0
  36. package/build/esm/index.js.map +1 -1
  37. package/build/esm/isNullableQueryDataType.js +1 -0
  38. package/build/esm/isNullableQueryDataType.js.map +1 -1
  39. package/build/esm/wireActionTypeV2ToSdkActionMetadata.js +14 -0
  40. package/build/esm/wireActionTypeV2ToSdkActionMetadata.js.map +1 -1
  41. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.js +2 -0
  42. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.js.map +1 -1
  43. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js +4 -0
  44. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js.map +1 -1
  45. package/build/esm/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js +2 -0
  46. package/build/esm/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js.map +1 -1
  47. package/build/esm/wirePropertyV2ToSdkPropertyDefinition.js +4 -2
  48. package/build/esm/wirePropertyV2ToSdkPropertyDefinition.js.map +1 -1
  49. package/build/esm/wireQueryDataTypeToQueryDataTypeDefinition.js +3 -0
  50. package/build/esm/wireQueryDataTypeToQueryDataTypeDefinition.js.map +1 -1
  51. package/build/esm/wireQueryTypeV2ToSdkQueryMetadata.js +1 -0
  52. package/build/esm/wireQueryTypeV2ToSdkQueryMetadata.js.map +1 -1
  53. package/build/{browser → types}/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.d.ts +0 -1
  54. package/build/types/empty.test.d.ts +1 -0
  55. package/build/{browser → types}/getEditedEntities.d.ts +2 -3
  56. package/build/{browser → types}/index.d.ts +0 -1
  57. package/build/{browser → types}/isNullableQueryDataType.d.ts +0 -1
  58. package/build/{browser → types}/wireActionTypeV2ToSdkActionMetadata.d.ts +0 -1
  59. package/build/types/wireObjectTypeFullMetadataToSdkObjectMetadata.d.ts +3 -0
  60. package/build/types/wireObjectTypeFullMetadataToSdkObjectMetadata.test.d.ts +1 -0
  61. package/build/{browser → types}/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.d.ts +0 -1
  62. package/build/types/wirePropertyV2ToSdkPropertyDefinition.d.ts +3 -0
  63. package/build/{browser → types}/wireQueryDataTypeToQueryDataTypeDefinition.d.ts +0 -1
  64. package/build/{browser → types}/wireQueryTypeV2ToSdkQueryMetadata.d.ts +6 -7
  65. package/package.json +22 -9
  66. package/build/browser/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.d.ts.map +0 -1
  67. package/build/browser/empty.test.d.ts +0 -2
  68. package/build/browser/empty.test.d.ts.map +0 -1
  69. package/build/browser/getEditedEntities.d.ts.map +0 -1
  70. package/build/browser/index.d.ts.map +0 -1
  71. package/build/browser/isNullableQueryDataType.d.ts.map +0 -1
  72. package/build/browser/wireActionTypeV2ToSdkActionMetadata.d.ts.map +0 -1
  73. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.d.ts +0 -10
  74. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.d.ts.map +0 -1
  75. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.d.ts +0 -2
  76. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.d.ts.map +0 -1
  77. package/build/browser/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.d.ts.map +0 -1
  78. package/build/browser/wirePropertyV2ToSdkPropertyDefinition.d.ts +0 -6
  79. package/build/browser/wirePropertyV2ToSdkPropertyDefinition.d.ts.map +0 -1
  80. package/build/browser/wireQueryDataTypeToQueryDataTypeDefinition.d.ts.map +0 -1
  81. package/build/browser/wireQueryTypeV2ToSdkQueryMetadata.d.ts.map +0 -1
  82. package/build/esm/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.d.ts +0 -4
  83. package/build/esm/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.d.ts.map +0 -1
  84. package/build/esm/empty.test.d.ts +0 -2
  85. package/build/esm/empty.test.d.ts.map +0 -1
  86. package/build/esm/getEditedEntities.d.ts +0 -7
  87. package/build/esm/getEditedEntities.d.ts.map +0 -1
  88. package/build/esm/index.d.ts +0 -9
  89. package/build/esm/index.d.ts.map +0 -1
  90. package/build/esm/isNullableQueryDataType.d.ts +0 -3
  91. package/build/esm/isNullableQueryDataType.d.ts.map +0 -1
  92. package/build/esm/wireActionTypeV2ToSdkActionMetadata.d.ts +0 -4
  93. package/build/esm/wireActionTypeV2ToSdkActionMetadata.d.ts.map +0 -1
  94. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.d.ts +0 -10
  95. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.d.ts.map +0 -1
  96. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.test.d.ts +0 -2
  97. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.test.d.ts.map +0 -1
  98. package/build/esm/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.d.ts +0 -4
  99. package/build/esm/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.d.ts.map +0 -1
  100. package/build/esm/wirePropertyV2ToSdkPropertyDefinition.d.ts +0 -6
  101. package/build/esm/wirePropertyV2ToSdkPropertyDefinition.d.ts.map +0 -1
  102. package/build/esm/wireQueryDataTypeToQueryDataTypeDefinition.d.ts +0 -4
  103. package/build/esm/wireQueryDataTypeToQueryDataTypeDefinition.d.ts.map +0 -1
  104. package/build/esm/wireQueryTypeV2ToSdkQueryMetadata.d.ts +0 -13
  105. package/build/esm/wireQueryTypeV2ToSdkQueryMetadata.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"wireQueryTypeV2ToSdkQueryMetadata.js","names":["wireQueryDataTypeToQueryDataTypeDefinition","wireQueryTypeV2ToSdkQueryMetadata","input","type","apiName","description","displayName","version","parameters","Object","fromEntries","entries","map","name","parameter","wireQueryParameterV2ToQueryParameterDefinition","output","rid","wireQueryTypeV2ToSdkQueryDefinitionNoParams","dataType"],"sources":["wireQueryTypeV2ToSdkQueryMetadata.js"],"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 */\nimport { wireQueryDataTypeToQueryDataTypeDefinition, } from \"./wireQueryDataTypeToQueryDataTypeDefinition.js\";\nexport function wireQueryTypeV2ToSdkQueryMetadata(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([name, parameter]) => [name, wireQueryParameterV2ToQueryParameterDefinition(parameter)])),\n output: wireQueryDataTypeToQueryDataTypeDefinition(input.output),\n rid: input.rid,\n };\n}\nexport function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n rid: input.rid,\n };\n}\nexport function wireQueryParameterV2ToQueryParameterDefinition(parameter) {\n return {\n description: parameter.description,\n ...wireQueryDataTypeToQueryDataTypeDefinition(parameter.dataType),\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,0CAA0C,QAAS,iDAAiD;AAC7G,OAAO,SAASC,iCAAiCA,CAACC,KAAK,EAAE;EACrD,OAAO;IACHC,IAAI,EAAE,OAAO;IACbC,OAAO,EAAEF,KAAK,CAACE,OAAO;IACtBC,WAAW,EAAEH,KAAK,CAACG,WAAW;IAC9BC,WAAW,EAAEJ,KAAK,CAACI,WAAW;IAC9BC,OAAO,EAAEL,KAAK,CAACK,OAAO;IACtBC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACT,KAAK,CAACM,UAAU,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,IAAI,EAAEC,SAAS,CAAC,KAAK,CAACD,IAAI,EAAEE,8CAA8C,CAACD,SAAS,CAAC,CAAC,CAAC,CAAC;IAC9JE,MAAM,EAAEhB,0CAA0C,CAACE,KAAK,CAACc,MAAM,CAAC;IAChEC,GAAG,EAAEf,KAAK,CAACe;EACf,CAAC;AACL;AACA,OAAO,SAASC,2CAA2CA,CAAChB,KAAK,EAAE;EAC/D,OAAO;IACHC,IAAI,EAAE,OAAO;IACbC,OAAO,EAAEF,KAAK,CAACE,OAAO;IACtBC,WAAW,EAAEH,KAAK,CAACG,WAAW;IAC9BC,WAAW,EAAEJ,KAAK,CAACI,WAAW;IAC9BC,OAAO,EAAEL,KAAK,CAACK,OAAO;IACtBU,GAAG,EAAEf,KAAK,CAACe;EACf,CAAC;AACL;AACA,OAAO,SAASF,8CAA8CA,CAACD,SAAS,EAAE;EACtE,OAAO;IACHT,WAAW,EAAES,SAAS,CAACT,WAAW;IAClC,GAAGL,0CAA0C,CAACc,SAAS,CAACK,QAAQ;EACpE,CAAC;AACL","ignoreList":[]}
1
+ {"version":3,"file":"wireQueryTypeV2ToSdkQueryMetadata.js","names":["wireQueryDataTypeToQueryDataTypeDefinition","wireQueryTypeV2ToSdkQueryMetadata","input","type","apiName","description","displayName","version","parameters","Object","fromEntries","entries","map","name","parameter","wireQueryParameterV2ToQueryParameterDefinition","output","rid","wireQueryTypeV2ToSdkQueryDefinitionNoParams","dataType"],"sources":["wireQueryTypeV2ToSdkQueryMetadata.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 { QueryMetadata, QueryParameterDefinition } from \"@osdk/api\";\nimport type {\n QueryParameterV2,\n QueryTypeV2,\n} from \"@osdk/internal.foundry.core\";\nimport {\n wireQueryDataTypeToQueryDataTypeDefinition,\n} from \"./wireQueryDataTypeToQueryDataTypeDefinition.js\";\n\nexport function wireQueryTypeV2ToSdkQueryMetadata(\n input: QueryTypeV2,\n): QueryMetadata {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n parameters: Object.fromEntries(\n Object.entries(input.parameters).map((\n [name, parameter],\n ) => [name, wireQueryParameterV2ToQueryParameterDefinition(parameter)]),\n ),\n output: wireQueryDataTypeToQueryDataTypeDefinition(input.output),\n rid: input.rid,\n };\n}\n\nexport function wireQueryTypeV2ToSdkQueryDefinitionNoParams(\n input: QueryTypeV2,\n): {\n type: string;\n apiName: string;\n description: string | undefined;\n displayName: string | undefined;\n version: string;\n rid: string;\n} {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n rid: input.rid,\n };\n}\n\nexport function wireQueryParameterV2ToQueryParameterDefinition(\n parameter: QueryParameterV2,\n): QueryParameterDefinition<any> {\n return {\n description: parameter.description,\n ...wireQueryDataTypeToQueryDataTypeDefinition(parameter.dataType),\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SACEA,0CAA0C,QACrC,iDAAiD;AAExD,OAAO,SAASC,iCAAiCA,CAC/CC,KAAkB,EACH;EACf,OAAO;IACLC,IAAI,EAAE,OAAO;IACbC,OAAO,EAAEF,KAAK,CAACE,OAAO;IACtBC,WAAW,EAAEH,KAAK,CAACG,WAAW;IAC9BC,WAAW,EAAEJ,KAAK,CAACI,WAAW;IAC9BC,OAAO,EAAEL,KAAK,CAACK,OAAO;IACtBC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAC5BD,MAAM,CAACE,OAAO,CAACT,KAAK,CAACM,UAAU,CAAC,CAACI,GAAG,CAAC,CACnC,CAACC,IAAI,EAAEC,SAAS,CAAC,KACd,CAACD,IAAI,EAAEE,8CAA8C,CAACD,SAAS,CAAC,CAAC,CACxE,CAAC;IACDE,MAAM,EAAEhB,0CAA0C,CAACE,KAAK,CAACc,MAAM,CAAC;IAChEC,GAAG,EAAEf,KAAK,CAACe;EACb,CAAC;AACH;AAEA,OAAO,SAASC,2CAA2CA,CACzDhB,KAAkB,EAQlB;EACA,OAAO;IACLC,IAAI,EAAE,OAAO;IACbC,OAAO,EAAEF,KAAK,CAACE,OAAO;IACtBC,WAAW,EAAEH,KAAK,CAACG,WAAW;IAC9BC,WAAW,EAAEJ,KAAK,CAACI,WAAW;IAC9BC,OAAO,EAAEL,KAAK,CAACK,OAAO;IACtBU,GAAG,EAAEf,KAAK,CAACe;EACb,CAAC;AACH;AAEA,OAAO,SAASF,8CAA8CA,CAC5DD,SAA2B,EACI;EAC/B,OAAO;IACLT,WAAW,EAAES,SAAS,CAACT,WAAW;IAClC,GAAGL,0CAA0C,CAACc,SAAS,CAACK,QAAQ;EAClE,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,477 @@
1
+ 'use strict';
2
+
3
+ var consola = require('consola');
4
+
5
+ // src/wirePropertyV2ToSdkPropertyDefinition.ts
6
+ function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {
7
+ const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(input.dataType);
8
+ if (sdkPropDefinition == null) {
9
+ return void 0;
10
+ }
11
+ switch (input.dataType.type) {
12
+ case "integer":
13
+ case "string":
14
+ case "byte":
15
+ case "cipherText":
16
+ case "decimal":
17
+ case "double":
18
+ case "float":
19
+ case "long":
20
+ case "short":
21
+ case "boolean":
22
+ case "date":
23
+ case "attachment":
24
+ case "mediaReference":
25
+ case "geopoint":
26
+ case "geoshape":
27
+ case "timestamp":
28
+ case "timeseries":
29
+ case "marking":
30
+ case "geotimeSeriesReference":
31
+ case "struct":
32
+ return {
33
+ displayName: input.displayName,
34
+ multiplicity: false,
35
+ description: input.description,
36
+ type: sdkPropDefinition,
37
+ nullable: input.nullable == null ? isNullable : input.nullable
38
+ };
39
+ case "array": {
40
+ return {
41
+ displayName: input.displayName,
42
+ multiplicity: true,
43
+ description: input.description,
44
+ type: sdkPropDefinition,
45
+ nullable: true
46
+ };
47
+ }
48
+ case "cipherText": {
49
+ consola.consola.info(`${JSON.stringify(input.dataType.type)} is not a supported dataType`);
50
+ return void 0;
51
+ }
52
+ default:
53
+ input.dataType;
54
+ consola.consola.info(`${JSON.stringify(input.dataType)} is not a supported dataType`);
55
+ return void 0;
56
+ }
57
+ }
58
+ function objectPropertyTypeToSdkPropertyDefinition(propertyType) {
59
+ switch (propertyType.type) {
60
+ case "integer":
61
+ case "string":
62
+ case "byte":
63
+ case "decimal":
64
+ case "double":
65
+ case "float":
66
+ case "long":
67
+ case "short":
68
+ case "boolean":
69
+ case "attachment":
70
+ case "geopoint":
71
+ case "geoshape":
72
+ case "timestamp":
73
+ case "marking":
74
+ case "geotimeSeriesReference":
75
+ case "mediaReference":
76
+ return propertyType.type;
77
+ case "date":
78
+ return "datetime";
79
+ case "array":
80
+ return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);
81
+ case "timeseries":
82
+ if (propertyType.itemType?.type === "string") {
83
+ return "stringTimeseries";
84
+ } else if (propertyType.itemType?.type === "double") {
85
+ return "numericTimeseries";
86
+ } else return "sensorTimeseries";
87
+ case "struct": {
88
+ return propertyType.structFieldTypes.reduce((structMap, structField) => {
89
+ structMap[structField.apiName] = objectPropertyTypeToSdkPropertyDefinition(structField.dataType);
90
+ return structMap;
91
+ }, {});
92
+ }
93
+ case "cipherText": {
94
+ consola.consola.info(`${JSON.stringify(propertyType.type)} is not a supported propertyType`);
95
+ return void 0;
96
+ }
97
+ default: {
98
+ consola.consola.info(`${JSON.stringify(propertyType)} is not a supported propertyType`);
99
+ return void 0;
100
+ }
101
+ }
102
+ }
103
+
104
+ // src/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.ts
105
+ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType, v2) {
106
+ return {
107
+ type: "interface",
108
+ rid: interfaceType.rid,
109
+ apiName: interfaceType.apiName,
110
+ displayName: interfaceType.displayName,
111
+ description: interfaceType.description,
112
+ implements: interfaceType.extendsInterfaces,
113
+ properties: Object.fromEntries(Object.entries(interfaceType.properties).map(([key, value]) => {
114
+ return [key, wirePropertyV2ToSdkPropertyDefinition(value, true)];
115
+ }).filter(([key, value]) => value != null)),
116
+ links: {},
117
+ implementedBy: interfaceType.implementedByObjectTypes
118
+ };
119
+ }
120
+
121
+ // src/getEditedEntities.ts
122
+ function getModifiedEntityTypes(action) {
123
+ const addedObjects = /* @__PURE__ */ new Set();
124
+ const modifiedObjects = /* @__PURE__ */ new Set();
125
+ for (const operation of action.operations) {
126
+ switch (operation.type) {
127
+ case "createObject":
128
+ addedObjects.add(operation.objectTypeApiName);
129
+ break;
130
+ case "modifyObject":
131
+ modifiedObjects.add(operation.objectTypeApiName);
132
+ break;
133
+ }
134
+ }
135
+ return {
136
+ addedObjects,
137
+ modifiedObjects
138
+ };
139
+ }
140
+
141
+ // src/wireActionTypeV2ToSdkActionMetadata.ts
142
+ function wireActionTypeV2ToSdkActionMetadata(input) {
143
+ const modifiedEntityTypes = getModifiedEntityTypes(input);
144
+ return {
145
+ type: "action",
146
+ apiName: input.apiName,
147
+ parameters: Object.fromEntries(Object.entries(input.parameters).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),
148
+ displayName: input.displayName,
149
+ description: input.description,
150
+ modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),
151
+ rid: input.rid,
152
+ status: input.status
153
+ };
154
+ }
155
+ function wireActionParameterV2ToSdkParameterDefinition(value) {
156
+ return {
157
+ multiplicity: value.dataType.type === "array",
158
+ type: actionPropertyToSdkPropertyDefinition(value.dataType.type === "array" ? value.dataType.subType : value.dataType),
159
+ nullable: !value.required,
160
+ description: value.description
161
+ };
162
+ }
163
+ function actionPropertyToSdkPropertyDefinition(parameterType) {
164
+ switch (parameterType.type) {
165
+ case "string":
166
+ case "boolean":
167
+ case "attachment":
168
+ case "double":
169
+ case "integer":
170
+ case "long":
171
+ case "timestamp":
172
+ case "marking":
173
+ return parameterType.type;
174
+ case "date":
175
+ return "datetime";
176
+ case "objectSet":
177
+ return {
178
+ type: "objectSet",
179
+ objectSet: parameterType.objectTypeApiName
180
+ };
181
+ case "object":
182
+ return {
183
+ type: "object",
184
+ object: parameterType.objectTypeApiName
185
+ };
186
+ case "array":
187
+ return actionPropertyToSdkPropertyDefinition(parameterType.subType);
188
+ case "interfaceObject":
189
+ return {
190
+ type: "interface",
191
+ interface: parameterType.interfaceTypeApiName
192
+ };
193
+ case "struct":
194
+ return {
195
+ type: "struct",
196
+ struct: parameterType.fields.reduce((structMap, structField) => {
197
+ structMap[structField.name] = actionPropertyToSdkPropertyDefinition(structField.fieldType);
198
+ return structMap;
199
+ }, {})
200
+ };
201
+ default:
202
+ throw new Error(`Unsupported action parameter type: ${parameterType.type}`);
203
+ }
204
+ }
205
+ function createModifiedEntities(addedObjects, modifiedObjects) {
206
+ const entities = {};
207
+ for (const key of addedObjects) {
208
+ entities[key] = {
209
+ created: true,
210
+ modified: false
211
+ };
212
+ }
213
+ for (const key of modifiedObjects) {
214
+ if (entities[key]) {
215
+ entities[key].modified = true;
216
+ } else {
217
+ entities[key] = {
218
+ created: false,
219
+ modified: true
220
+ };
221
+ }
222
+ }
223
+ return entities;
224
+ }
225
+
226
+ // src/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.ts
227
+ function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(input) {
228
+ switch (input.dataType.type) {
229
+ case "integer":
230
+ case "double":
231
+ case "string":
232
+ case "boolean":
233
+ case "byte":
234
+ case "long":
235
+ case "short": {
236
+ return input.dataType.type;
237
+ }
238
+ case "date": {
239
+ return "datetime";
240
+ }
241
+ case "timestamp": {
242
+ return "timestamp";
243
+ }
244
+ case "geopoint":
245
+ case "geoshape":
246
+ case "decimal":
247
+ case "attachment":
248
+ case "timeseries":
249
+ case "array":
250
+ case "marking":
251
+ case "float":
252
+ case "geotimeSeriesReference":
253
+ case "cipherText":
254
+ case "mediaReference":
255
+ case "struct":
256
+ case "cipherText":
257
+ throw new Error(`Type not supported for primaryKey: ${input.dataType.type}`);
258
+ default:
259
+ input.dataType;
260
+ throw new Error(`Unknown type encountered for primaryKey: ${input.dataType}`);
261
+ }
262
+ }
263
+
264
+ // src/wireObjectTypeFullMetadataToSdkObjectMetadata.ts
265
+ function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2) {
266
+ if (objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey] === void 0) {
267
+ throw new Error(`Primary key ${objectTypeWithLink.objectType.primaryKey} not found in ${objectTypeWithLink.objectType.apiName}`);
268
+ }
269
+ if (objectTypeWithLink.implementsInterfaces2 == null && objectTypeWithLink.implementsInterfaces != null) {
270
+ throw new Error("Your ontology.json file is missing the implementsInterfaces2 field. Please regenerate it.");
271
+ }
272
+ const interfaceMap = objectTypeWithLink.implementsInterfaces2 ? Object.fromEntries(Object.entries(objectTypeWithLink.implementsInterfaces2).map(([interfaceApiName, impl]) => [interfaceApiName, impl.properties])) : {};
273
+ return {
274
+ type: "object",
275
+ apiName: objectTypeWithLink.objectType.apiName,
276
+ description: objectTypeWithLink.objectType.description,
277
+ primaryKeyApiName: objectTypeWithLink.objectType.primaryKey,
278
+ primaryKeyType: wirePropertyV2ToSdkPrimaryKeyTypeDefinition(objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey]),
279
+ links: Object.fromEntries(objectTypeWithLink.linkTypes.map((linkType) => {
280
+ return [linkType.apiName, {
281
+ multiplicity: linkType.cardinality === "MANY",
282
+ targetType: linkType.objectTypeApiName
283
+ }];
284
+ })),
285
+ properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key, value]) => [key, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key))]).filter(([key, value]) => value != null)),
286
+ implements: objectTypeWithLink.implementsInterfaces,
287
+ interfaceMap,
288
+ inverseInterfaceMap: Object.fromEntries(Object.entries(interfaceMap).map(([interfaceApiName, props]) => [interfaceApiName, invertProps(props)])),
289
+ icon: supportedIconTypes.includes(objectTypeWithLink.objectType.icon.type) ? objectTypeWithLink.objectType.icon : void 0,
290
+ titleProperty: objectTypeWithLink.objectType.titleProperty,
291
+ displayName: objectTypeWithLink.objectType.displayName,
292
+ pluralDisplayName: objectTypeWithLink.objectType.pluralDisplayName,
293
+ status: objectTypeWithLink.objectType.status,
294
+ rid: objectTypeWithLink.objectType.rid,
295
+ visibility: objectTypeWithLink.objectType.visibility
296
+ };
297
+ }
298
+ function invertProps(a) {
299
+ return a ? Object.fromEntries(Object.entries(a).map(([k, v]) => [v, k])) : void 0;
300
+ }
301
+ var supportedIconTypes = ["blueprint"];
302
+
303
+ // src/isNullableQueryDataType.ts
304
+ function isNullableQueryDataType(input) {
305
+ if (input.type === "null") {
306
+ return true;
307
+ }
308
+ if (input.type === "union") {
309
+ return input.unionTypes.some((t) => isNullableQueryDataType(t));
310
+ }
311
+ return false;
312
+ }
313
+
314
+ // src/wireQueryDataTypeToQueryDataTypeDefinition.ts
315
+ function wireQueryDataTypeToQueryDataTypeDefinition(input) {
316
+ switch (input.type) {
317
+ case "double":
318
+ case "float":
319
+ case "integer":
320
+ case "long":
321
+ case "attachment":
322
+ case "boolean":
323
+ case "date":
324
+ case "string":
325
+ case "timestamp":
326
+ return {
327
+ type: input.type,
328
+ nullable: false
329
+ };
330
+ case "object":
331
+ return {
332
+ type: "object",
333
+ object: input.objectTypeApiName,
334
+ nullable: false
335
+ };
336
+ case "objectSet":
337
+ return {
338
+ type: "objectSet",
339
+ objectSet: input.objectTypeApiName,
340
+ nullable: false
341
+ };
342
+ case "array":
343
+ return {
344
+ ...wireQueryDataTypeToQueryDataTypeDefinition(input.subType),
345
+ multiplicity: true
346
+ };
347
+ case "set":
348
+ return {
349
+ type: "set",
350
+ set: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),
351
+ nullable: false
352
+ };
353
+ case "union":
354
+ const allowNulls = isNullableQueryDataType(input);
355
+ if (allowNulls && input.unionTypes.length === 2) {
356
+ const nonNull = input.unionTypes.find((t) => t.type != null);
357
+ if (nonNull) {
358
+ return {
359
+ ...wireQueryDataTypeToQueryDataTypeDefinition(nonNull),
360
+ nullable: true
361
+ };
362
+ }
363
+ }
364
+ return {
365
+ type: "union",
366
+ union: input.unionTypes.reduce((acc, t) => {
367
+ if (t.type === "null") {
368
+ return acc;
369
+ }
370
+ acc.push(wireQueryDataTypeToQueryDataTypeDefinition(t));
371
+ return acc;
372
+ }, []),
373
+ nullable: allowNulls
374
+ };
375
+ case "struct":
376
+ return {
377
+ type: "struct",
378
+ struct: Object.fromEntries(input.fields.map((f) => [f.name, wireQueryDataTypeToQueryDataTypeDefinition(f.fieldType)])),
379
+ nullable: false
380
+ };
381
+ case "twoDimensionalAggregation":
382
+ return {
383
+ type: "twoDimensionalAggregation",
384
+ twoDimensionalAggregation: get2DQueryAggregationProps(input),
385
+ nullable: false
386
+ };
387
+ case "threeDimensionalAggregation":
388
+ return {
389
+ type: "threeDimensionalAggregation",
390
+ threeDimensionalAggregation: get3DQueryAggregationProps(input),
391
+ nullable: false
392
+ };
393
+ case "null":
394
+ case "unsupported":
395
+ throw new Error(`Unable to process query because the server indicated an unsupported QueryDataType.type: ${input.type}. Please check that your query is using supported types.`);
396
+ default:
397
+ throw new Error(`Unsupported QueryDataType.type ${input.type}`);
398
+ }
399
+ }
400
+ function get2DQueryAggregationProps(input) {
401
+ if (input.keyType.type === "range") {
402
+ return {
403
+ keyType: input.keyType.type,
404
+ keySubtype: input.keyType.subType.type,
405
+ valueType: input.valueType.type
406
+ };
407
+ } else {
408
+ if (guardInvalidKeyTypes(input.keyType)) {
409
+ return {
410
+ keyType: input.keyType.type,
411
+ valueType: input.valueType.type
412
+ };
413
+ }
414
+ throw new Error(`Cannot create 2D aggregation with ${input.keyType.type} as its type`);
415
+ }
416
+ }
417
+ function get3DQueryAggregationProps(input) {
418
+ if (input.keyType.type === "range") {
419
+ return {
420
+ keyType: input.keyType.type,
421
+ keySubtype: input.keyType.subType.type,
422
+ valueType: get2DQueryAggregationProps(input.valueType)
423
+ };
424
+ } else {
425
+ if (guardInvalidKeyTypes(input.keyType)) {
426
+ return {
427
+ keyType: input.keyType.type,
428
+ valueType: get2DQueryAggregationProps(input.valueType)
429
+ };
430
+ }
431
+ throw new Error(`Cannot create 3D aggregation with ${input.keyType.type} as its type`);
432
+ }
433
+ }
434
+ function guardInvalidKeyTypes(key) {
435
+ return key.type === "string" || key.type === "boolean";
436
+ }
437
+
438
+ // src/wireQueryTypeV2ToSdkQueryMetadata.ts
439
+ function wireQueryTypeV2ToSdkQueryMetadata(input) {
440
+ return {
441
+ type: "query",
442
+ apiName: input.apiName,
443
+ description: input.description,
444
+ displayName: input.displayName,
445
+ version: input.version,
446
+ parameters: Object.fromEntries(Object.entries(input.parameters).map(([name, parameter]) => [name, wireQueryParameterV2ToQueryParameterDefinition(parameter)])),
447
+ output: wireQueryDataTypeToQueryDataTypeDefinition(input.output),
448
+ rid: input.rid
449
+ };
450
+ }
451
+ function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input) {
452
+ return {
453
+ type: "query",
454
+ apiName: input.apiName,
455
+ description: input.description,
456
+ displayName: input.displayName,
457
+ version: input.version,
458
+ rid: input.rid
459
+ };
460
+ }
461
+ function wireQueryParameterV2ToQueryParameterDefinition(parameter) {
462
+ return {
463
+ description: parameter.description,
464
+ ...wireQueryDataTypeToQueryDataTypeDefinition(parameter.dataType)
465
+ };
466
+ }
467
+
468
+ exports.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition = __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition;
469
+ exports.wireActionTypeV2ToSdkActionMetadata = wireActionTypeV2ToSdkActionMetadata;
470
+ exports.wireObjectTypeFullMetadataToSdkObjectMetadata = wireObjectTypeFullMetadataToSdkObjectMetadata;
471
+ exports.wirePropertyV2ToSdkPropertyDefinition = wirePropertyV2ToSdkPropertyDefinition;
472
+ exports.wireQueryDataTypeToQueryDataTypeDefinition = wireQueryDataTypeToQueryDataTypeDefinition;
473
+ exports.wireQueryParameterV2ToQueryParameterDefinition = wireQueryParameterV2ToQueryParameterDefinition;
474
+ exports.wireQueryTypeV2ToSdkQueryDefinitionNoParams = wireQueryTypeV2ToSdkQueryDefinitionNoParams;
475
+ exports.wireQueryTypeV2ToSdkQueryMetadata = wireQueryTypeV2ToSdkQueryMetadata;
476
+ //# sourceMappingURL=index.cjs.map
477
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/wirePropertyV2ToSdkPropertyDefinition.ts","../../src/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.ts","../../src/getEditedEntities.ts","../../src/wireActionTypeV2ToSdkActionMetadata.ts","../../src/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.ts","../../src/wireObjectTypeFullMetadataToSdkObjectMetadata.ts","../../src/isNullableQueryDataType.ts","../../src/wireQueryDataTypeToQueryDataTypeDefinition.ts","../../src/wireQueryTypeV2ToSdkQueryMetadata.ts"],"names":["consola"],"mappings":";;;;;AAiBO,SAAS,qCAAA,CAAsC,KAAO,EAAA,UAAA,GAAa,IAAM,EAAA;AAC9E,EAAM,MAAA,iBAAA,GAAoB,yCAA0C,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAClF,EAAA,IAAI,qBAAqB,IAAM,EAAA;AAC7B,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AACA,EAAQ,QAAA,KAAA,CAAM,SAAS,IAAM;AAAA,IAC3B,KAAK,SAAA,CAAA;AAAA,IACL,KAAK,QAAA,CAAA;AAAA,IACL,KAAK,MAAA,CAAA;AAAA,IACL,KAAK,YAAA,CAAA;AAAA,IACL,KAAK,SAAA,CAAA;AAAA,IACL,KAAK,QAAA,CAAA;AAAA,IACL,KAAK,OAAA,CAAA;AAAA,IACL,KAAK,MAAA,CAAA;AAAA,IACL,KAAK,OAAA,CAAA;AAAA,IACL,KAAK,SAAA,CAAA;AAAA,IACL,KAAK,MAAA,CAAA;AAAA,IACL,KAAK,YAAA,CAAA;AAAA,IACL,KAAK,gBAAA,CAAA;AAAA,IACL,KAAK,UAAA,CAAA;AAAA,IACL,KAAK,UAAA,CAAA;AAAA,IACL,KAAK,WAAA,CAAA;AAAA,IACL,KAAK,YAAA,CAAA;AAAA,IACL,KAAK,SAAA,CAAA;AAAA,IACL,KAAK,wBAAA,CAAA;AAAA,IACL,KAAK,QAAA;AACH,MAAO,OAAA;AAAA,QACL,aAAa,KAAM,CAAA,WAAA;AAAA,QACnB,YAAc,EAAA,KAAA;AAAA,QACd,aAAa,KAAM,CAAA,WAAA;AAAA,QACnB,IAAM,EAAA,iBAAA;AAAA,QACN,QAAU,EAAA,KAAA,CAAM,QAAY,IAAA,IAAA,GAAO,aAAa,KAAM,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AACjC,EAAA,OAAO,GAAI,CAAA,IAAA,KAAS,QAAY,IAAA,GAAA,CAAI,IAAS,KAAA,SAAA,CAAA;AAC/C,CAAA;;;AChIO,SAAS,kCAAkC,KAAO,EAAA;AACvD,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,OAAA;AAAA,IACN,SAAS,KAAM,CAAA,OAAA;AAAA,IACf,aAAa,KAAM,CAAA,WAAA;AAAA,IACnB,aAAa,KAAM,CAAA,WAAA;AAAA,IACnB,SAAS,KAAM,CAAA,OAAA;AAAA,IACf,UAAA,EAAY,OAAO,WAAY,CAAA,MAAA,CAAO,QAAQ,KAAM,CAAA,UAAU,EAAE,GAAI,CAAA,CAAC,CAAC,IAAM,EAAA,SAAS,MAAM,CAAC,IAAA,EAAM,+CAA+C,SAAS,CAAC,CAAC,CAAC,CAAA;AAAA,IAC7J,MAAA,EAAQ,0CAA2C,CAAA,KAAA,CAAM,MAAM,CAAA;AAAA,IAC/D,KAAK,KAAM,CAAA,GAAA;AAAA,GACb,CAAA;AACF,CAAA;AACO,SAAS,4CAA4C,KAAO,EAAA;AACjE,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,OAAA;AAAA,IACN,SAAS,KAAM,CAAA,OAAA;AAAA,IACf,aAAa,KAAM,CAAA,WAAA;AAAA,IACnB,aAAa,KAAM,CAAA,WAAA;AAAA,IACnB,SAAS,KAAM,CAAA,OAAA;AAAA,IACf,KAAK,KAAM,CAAA,GAAA;AAAA,GACb,CAAA;AACF,CAAA;AACO,SAAS,+CAA+C,SAAW,EAAA;AACxE,EAAO,OAAA;AAAA,IACL,aAAa,SAAU,CAAA,WAAA;AAAA,IACvB,GAAG,0CAA2C,CAAA,SAAA,CAAU,QAAQ,CAAA;AAAA,GAClE,CAAA;AACF","file":"index.cjs","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 { consola } from \"consola\";\nexport function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {\n const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(input.dataType);\n if (sdkPropDefinition == null) {\n return undefined;\n }\n switch (input.dataType.type) {\n case \"integer\":\n case \"string\":\n case \"byte\":\n case \"cipherText\":\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 return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: sdkPropDefinition,\n nullable: input.nullable == null ? isNullable : input.nullable\n };\n case \"array\":\n {\n return {\n displayName: input.displayName,\n multiplicity: true,\n description: input.description,\n type: sdkPropDefinition,\n nullable: true\n };\n }\n case \"cipherText\":\n {\n consola.info(`${JSON.stringify(input.dataType.type)} is not a supported dataType`);\n return undefined;\n }\n default:\n const _ = input.dataType;\n consola.info(`${JSON.stringify(input.dataType)} is not a supported dataType`);\n return undefined;\n }\n}\nfunction objectPropertyTypeToSdkPropertyDefinition(propertyType) {\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 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 {\n return propertyType.structFieldTypes.reduce((structMap, structField) => {\n structMap[structField.apiName] = objectPropertyTypeToSdkPropertyDefinition(structField.dataType);\n return structMap;\n }, {});\n }\n case \"cipherText\":\n {\n consola.info(`${JSON.stringify(propertyType.type)} is not a supported propertyType`);\n return undefined;\n }\n default:\n {\n const _ = propertyType;\n consola.info(`${JSON.stringify(propertyType)} is not a supported propertyType`);\n return undefined;\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 { wirePropertyV2ToSdkPropertyDefinition } from \"./wirePropertyV2ToSdkPropertyDefinition.js\";\nexport function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType, v2) {\n return {\n type: \"interface\",\n rid: interfaceType.rid,\n apiName: interfaceType.apiName,\n displayName: interfaceType.displayName,\n description: interfaceType.description,\n implements: interfaceType.extendsInterfaces,\n properties: Object.fromEntries(Object.entries(interfaceType.properties).map(([key, value]) => {\n return [key, wirePropertyV2ToSdkPropertyDefinition(value, true)];\n }).filter(([key, value]) => value != null)),\n links: {},\n implementedBy: interfaceType.implementedByObjectTypes\n };\n}","/*\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\nexport function getModifiedEntityTypes(action) {\n const addedObjects = new Set();\n const modifiedObjects = new Set();\n for (const operation of action.operations) {\n switch (operation.type) {\n case \"createObject\":\n addedObjects.add(operation.objectTypeApiName);\n break;\n case \"modifyObject\":\n modifiedObjects.add(operation.objectTypeApiName);\n break;\n case \"deleteObject\":\n case \"createLink\":\n case \"deleteLink\":\n case \"createInterfaceObject\":\n case \"modifyInterfaceObject\":\n case \"deleteInterfaceObject\":\n break;\n default:\n const _ = operation;\n }\n }\n return {\n addedObjects,\n modifiedObjects\n };\n}","/*\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 { getModifiedEntityTypes } from \"./getEditedEntities.js\";\nexport function wireActionTypeV2ToSdkActionMetadata(input) {\n const modifiedEntityTypes = getModifiedEntityTypes(input);\n return {\n type: \"action\",\n apiName: input.apiName,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),\n displayName: input.displayName,\n description: input.description,\n modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),\n rid: input.rid,\n status: input.status\n };\n}\nfunction wireActionParameterV2ToSdkParameterDefinition(value) {\n return {\n multiplicity: value.dataType.type === \"array\",\n type: actionPropertyToSdkPropertyDefinition(value.dataType.type === \"array\" ? value.dataType.subType : value.dataType),\n nullable: !value.required,\n description: value.description\n };\n}\nfunction actionPropertyToSdkPropertyDefinition(parameterType) {\n switch (parameterType.type) {\n case \"string\":\n case \"boolean\":\n case \"attachment\":\n case \"double\":\n case \"integer\":\n case \"long\":\n case \"timestamp\":\n case \"marking\":\n return parameterType.type;\n case \"date\":\n return \"datetime\";\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: parameterType.objectTypeApiName\n };\n case \"object\":\n return {\n type: \"object\",\n object: parameterType.objectTypeApiName\n };\n case \"array\":\n return actionPropertyToSdkPropertyDefinition(parameterType.subType);\n case \"interfaceObject\":\n return {\n type: \"interface\",\n interface: parameterType.interfaceTypeApiName\n };\n case \"struct\":\n return {\n type: \"struct\",\n struct: parameterType.fields.reduce((structMap, structField) => {\n structMap[structField.name] = actionPropertyToSdkPropertyDefinition(structField.fieldType);\n return structMap;\n }, {})\n };\n default:\n throw new Error(`Unsupported action parameter type: ${parameterType.type}`);\n }\n}\nfunction createModifiedEntities(addedObjects, modifiedObjects) {\n const entities = {};\n for (const key of addedObjects) {\n entities[key] = {\n created: true,\n modified: false\n };\n }\n for (const key of modifiedObjects) {\n if (entities[key]) {\n entities[key].modified = true;\n } else {\n entities[key] = {\n created: false,\n modified: true\n };\n }\n }\n return entities;\n}","/*\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\nexport function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(input) {\n switch (input.dataType.type) {\n case \"integer\":\n case \"double\":\n case \"string\":\n case \"boolean\":\n case \"byte\":\n case \"long\":\n case \"short\":\n {\n return input.dataType.type;\n }\n case \"date\":\n {\n return \"datetime\";\n }\n case \"timestamp\":\n {\n return \"timestamp\";\n }\n case \"geopoint\":\n case \"geoshape\":\n case \"decimal\":\n case \"attachment\":\n case \"timeseries\":\n case \"array\":\n case \"marking\":\n case \"float\":\n case \"geotimeSeriesReference\":\n case \"cipherText\":\n case \"mediaReference\":\n case \"struct\":\n case \"cipherText\":\n throw new Error(`Type not supported for primaryKey: ${input.dataType.type}`);\n default:\n const _ = input.dataType;\n throw new Error(`Unknown type encountered for primaryKey: ${input.dataType}`);\n }\n}","/*\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 { wirePropertyV2ToSdkPrimaryKeyTypeDefinition } from \"./wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js\";\nimport { wirePropertyV2ToSdkPropertyDefinition } from \"./wirePropertyV2ToSdkPropertyDefinition.js\";\nexport function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2) {\n if (objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey] === undefined) {\n throw new Error(`Primary key ${objectTypeWithLink.objectType.primaryKey} not found in ${objectTypeWithLink.objectType.apiName}`);\n }\n\n // saved ontology.json files may not have this implementsInterfaces2 so we need to handle\n if (objectTypeWithLink.implementsInterfaces2 == null && objectTypeWithLink.implementsInterfaces != null) {\n throw new Error(\"Your ontology.json file is missing the implementsInterfaces2 field. Please regenerate it.\");\n }\n const interfaceMap = objectTypeWithLink.implementsInterfaces2 ? Object.fromEntries(Object.entries(objectTypeWithLink.implementsInterfaces2).map(([interfaceApiName, impl]) => [interfaceApiName, impl.properties])) : {};\n return {\n type: \"object\",\n apiName: objectTypeWithLink.objectType.apiName,\n description: objectTypeWithLink.objectType.description,\n primaryKeyApiName: objectTypeWithLink.objectType.primaryKey,\n primaryKeyType: wirePropertyV2ToSdkPrimaryKeyTypeDefinition(objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey]),\n links: Object.fromEntries(objectTypeWithLink.linkTypes.map(linkType => {\n return [linkType.apiName, {\n multiplicity: linkType.cardinality === \"MANY\",\n targetType: linkType.objectTypeApiName\n }];\n })),\n properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key, value]) => [key, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key))]).filter(([key, value]) => value != null)),\n implements: objectTypeWithLink.implementsInterfaces,\n interfaceMap,\n inverseInterfaceMap: Object.fromEntries(Object.entries(interfaceMap).map(([interfaceApiName, props]) => [interfaceApiName, invertProps(props)])),\n icon: supportedIconTypes.includes(objectTypeWithLink.objectType.icon.type) ? objectTypeWithLink.objectType.icon : undefined,\n titleProperty: objectTypeWithLink.objectType.titleProperty,\n displayName: objectTypeWithLink.objectType.displayName,\n pluralDisplayName: objectTypeWithLink.objectType.pluralDisplayName,\n status: objectTypeWithLink.objectType.status,\n rid: objectTypeWithLink.objectType.rid,\n visibility: objectTypeWithLink.objectType.visibility\n };\n}\nfunction invertProps(a) {\n return a ? Object.fromEntries(Object.entries(a).map(([k, v]) => [v, k])) : undefined;\n}\nconst supportedIconTypes = [\"blueprint\"];","/*\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\nexport function isNullableQueryDataType(input) {\n if (input.type === \"null\") {\n return true;\n }\n if (input.type === \"union\") {\n return input.unionTypes.some(t => isNullableQueryDataType(t));\n }\n return false;\n}","/*\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 { isNullableQueryDataType } from \"./isNullableQueryDataType.js\";\nexport function wireQueryDataTypeToQueryDataTypeDefinition(input) {\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 case \"object\":\n return {\n type: \"object\",\n object: input.objectTypeApiName,\n nullable: false\n };\n case \"objectSet\":\n return {\n type: \"objectSet\",\n objectSet: input.objectTypeApiName,\n nullable: false\n };\n case \"array\":\n return {\n ...wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n multiplicity: true\n };\n case \"set\":\n return {\n type: \"set\",\n set: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),\n nullable: false\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 return {\n type: \"union\",\n union: input.unionTypes.reduce((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 case \"struct\":\n return {\n type: \"struct\",\n struct: Object.fromEntries(input.fields.map(f => [f.name, wireQueryDataTypeToQueryDataTypeDefinition(f.fieldType)])),\n nullable: false\n };\n case \"twoDimensionalAggregation\":\n return {\n type: \"twoDimensionalAggregation\",\n twoDimensionalAggregation: get2DQueryAggregationProps(input),\n nullable: false\n };\n case \"threeDimensionalAggregation\":\n return {\n type: \"threeDimensionalAggregation\",\n threeDimensionalAggregation: get3DQueryAggregationProps(input),\n nullable: false\n };\n case \"null\":\n case \"unsupported\":\n throw new Error(`Unable to process query because the server indicated an unsupported QueryDataType.type: ${input.type}. Please check that your query is using supported types.`);\n default:\n const _ = input;\n throw new Error(`Unsupported QueryDataType.type ${input.type}`);\n }\n}\nfunction get2DQueryAggregationProps(input) {\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(`Cannot create 2D aggregation with ${input.keyType.type} as its type`);\n }\n}\nfunction get3DQueryAggregationProps(input) {\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(`Cannot create 3D aggregation with ${input.keyType.type} as its type`);\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(key) {\n return key.type === \"string\" || key.type === \"boolean\";\n}","/*\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 { wireQueryDataTypeToQueryDataTypeDefinition } from \"./wireQueryDataTypeToQueryDataTypeDefinition.js\";\nexport function wireQueryTypeV2ToSdkQueryMetadata(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n parameters: Object.fromEntries(Object.entries(input.parameters).map(([name, parameter]) => [name, wireQueryParameterV2ToQueryParameterDefinition(parameter)])),\n output: wireQueryDataTypeToQueryDataTypeDefinition(input.output),\n rid: input.rid\n };\n}\nexport function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input) {\n return {\n type: \"query\",\n apiName: input.apiName,\n description: input.description,\n displayName: input.displayName,\n version: input.version,\n rid: input.rid\n };\n}\nexport function wireQueryParameterV2ToQueryParameterDefinition(parameter) {\n return {\n description: parameter.description,\n ...wireQueryDataTypeToQueryDataTypeDefinition(parameter.dataType)\n };\n}"]}
@@ -0,0 +1,33 @@
1
+ import { InterfaceMetadata, ActionMetadata, ObjectMetadata, QueryDataTypeDefinition, QueryMetadata, QueryParameterDefinition } from '@osdk/api';
2
+ import { InterfaceType, ActionTypeV2, ObjectTypeFullMetadata, PropertyApiName, PropertyV2, SharedPropertyType, QueryDataType, QueryTypeV2, QueryParameterV2 } from '@osdk/internal.foundry.core';
3
+
4
+ declare function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType: InterfaceType, v2: boolean): InterfaceMetadata;
5
+
6
+ declare function wireActionTypeV2ToSdkActionMetadata(input: ActionTypeV2): ActionMetadata;
7
+
8
+ declare function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink: ObjectTypeFullMetadata & {
9
+ objectType: {
10
+ properties: Record<PropertyApiName, PropertyV2 & {
11
+ nullable?: boolean;
12
+ }>;
13
+ };
14
+ }, v2: boolean): ObjectMetadata;
15
+
16
+ declare function wirePropertyV2ToSdkPropertyDefinition(input: (PropertyV2 | SharedPropertyType) & {
17
+ nullable?: boolean;
18
+ }, isNullable?: boolean): ObjectMetadata.Property | undefined;
19
+
20
+ declare function wireQueryDataTypeToQueryDataTypeDefinition<K extends string>(input: QueryDataType): QueryDataTypeDefinition;
21
+
22
+ declare function wireQueryTypeV2ToSdkQueryMetadata(input: QueryTypeV2): QueryMetadata;
23
+ declare function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input: QueryTypeV2): {
24
+ type: string;
25
+ apiName: string;
26
+ description: string | undefined;
27
+ displayName: string | undefined;
28
+ version: string;
29
+ rid: string;
30
+ };
31
+ declare function wireQueryParameterV2ToQueryParameterDefinition(parameter: QueryParameterV2): QueryParameterDefinition<any>;
32
+
33
+ export { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition, wireActionTypeV2ToSdkActionMetadata, wireObjectTypeFullMetadataToSdkObjectMetadata, wirePropertyV2ToSdkPropertyDefinition, wireQueryDataTypeToQueryDataTypeDefinition, wireQueryParameterV2ToQueryParameterDefinition, wireQueryTypeV2ToSdkQueryDefinitionNoParams, wireQueryTypeV2ToSdkQueryMetadata };
@@ -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 { wirePropertyV2ToSdkPropertyDefinition } from "./wirePropertyV2ToSdkPropertyDefinition.js";
17
18
  export function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType) {
18
19
  return {
@@ -25,7 +26,8 @@ export function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceTyp
25
26
  properties: Object.fromEntries(Object.entries(interfaceType.properties).map(([key, value]) => {
26
27
  return [key, wirePropertyV2ToSdkPropertyDefinition(value, true)];
27
28
  }).filter(([key, value]) => value != null)),
28
- links: {}
29
+ links: {},
30
+ implementedBy: interfaceType.implementedByObjectTypes
29
31
  };
30
32
  }
31
33
  //# sourceMappingURL=__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js","names":["wirePropertyV2ToSdkPropertyDefinition","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","interfaceType","type","rid","apiName","displayName","description","implements","extendsInterfaces","properties","Object","fromEntries","entries","map","key","value","filter","links"],"sources":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.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 { wirePropertyV2ToSdkPropertyDefinition } from \"./wirePropertyV2ToSdkPropertyDefinition.js\";\nexport function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType, v2) {\n return {\n type: \"interface\",\n rid: interfaceType.rid,\n apiName: interfaceType.apiName,\n displayName: interfaceType.displayName,\n description: interfaceType.description,\n implements: interfaceType.extendsInterfaces,\n properties: Object.fromEntries(Object.entries(interfaceType.properties).map(([key, value]) => {\n return [\n key,\n wirePropertyV2ToSdkPropertyDefinition(value, true),\n ];\n }).filter(([key, value]) => value != null)),\n links: {},\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,qCAAqC,QAAQ,4CAA4C;AAClG,OAAO,SAASC,mDAAmDA,CAACC,aAAa,EAAM;EACnF,OAAO;IACHC,IAAI,EAAE,WAAW;IACjBC,GAAG,EAAEF,aAAa,CAACE,GAAG;IACtBC,OAAO,EAAEH,aAAa,CAACG,OAAO;IAC9BC,WAAW,EAAEJ,aAAa,CAACI,WAAW;IACtCC,WAAW,EAAEL,aAAa,CAACK,WAAW;IACtCC,UAAU,EAAEN,aAAa,CAACO,iBAAiB;IAC3CC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAACD,MAAM,CAACE,OAAO,CAACX,aAAa,CAACQ,UAAU,CAAC,CAACI,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;MAC1F,OAAO,CACHD,GAAG,EACHf,qCAAqC,CAACgB,KAAK,EAAE,IAAI,CAAC,CACrD;IACL,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC,CAACF,GAAG,EAAEC,KAAK,CAAC,KAAKA,KAAK,IAAI,IAAI,CAAC,CAAC;IAC3CE,KAAK,EAAE,CAAC;EACZ,CAAC;AACL","ignoreList":[]}
1
+ {"version":3,"file":"__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js","names":["wirePropertyV2ToSdkPropertyDefinition","__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","interfaceType","type","rid","apiName","displayName","description","implements","extendsInterfaces","properties","Object","fromEntries","entries","map","key","value","filter","links","implementedBy","implementedByObjectTypes"],"sources":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.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 { InterfaceMetadata } from \"@osdk/api\";\nimport type { InterfaceType } from \"@osdk/internal.foundry.core\";\nimport { wirePropertyV2ToSdkPropertyDefinition } from \"./wirePropertyV2ToSdkPropertyDefinition.js\";\n\nexport function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(\n interfaceType: InterfaceType,\n v2: boolean,\n): InterfaceMetadata {\n return {\n type: \"interface\",\n rid: interfaceType.rid,\n apiName: interfaceType.apiName,\n displayName: interfaceType.displayName,\n description: interfaceType.description,\n implements: interfaceType.extendsInterfaces,\n properties: Object.fromEntries(\n Object.entries(interfaceType.properties).map((\n [key, value],\n ) => {\n return [\n key,\n wirePropertyV2ToSdkPropertyDefinition(\n value,\n true,\n ),\n ];\n }).filter(([key, value]) => value != null),\n ),\n links: {},\n implementedBy: interfaceType.implementedByObjectTypes,\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,qCAAqC,QAAQ,4CAA4C;AAElG,OAAO,SAASC,mDAAmDA,CACjEC,aAA4B,EAET;EACnB,OAAO;IACLC,IAAI,EAAE,WAAW;IACjBC,GAAG,EAAEF,aAAa,CAACE,GAAG;IACtBC,OAAO,EAAEH,aAAa,CAACG,OAAO;IAC9BC,WAAW,EAAEJ,aAAa,CAACI,WAAW;IACtCC,WAAW,EAAEL,aAAa,CAACK,WAAW;IACtCC,UAAU,EAAEN,aAAa,CAACO,iBAAiB;IAC3CC,UAAU,EAAEC,MAAM,CAACC,WAAW,CAC5BD,MAAM,CAACE,OAAO,CAACX,aAAa,CAACQ,UAAU,CAAC,CAACI,GAAG,CAAC,CAC3C,CAACC,GAAG,EAAEC,KAAK,CAAC,KACT;MACH,OAAO,CACLD,GAAG,EACHf,qCAAqC,CACnCgB,KAAK,EACL,IACF,CAAC,CACF;IACH,CAAC,CAAC,CAACC,MAAM,CAAC,CAAC,CAACF,GAAG,EAAEC,KAAK,CAAC,KAAKA,KAAK,IAAI,IAAI,CAC3C,CAAC;IACDE,KAAK,EAAE,CAAC,CAAC;IACTC,aAAa,EAAEjB,aAAa,CAACkB;EAC/B,CAAC;AACH","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 { describe, it } from "vitest";
17
18
  describe("nothing", () => {
18
19
  it("does nothing", () => {