@osdk/generator-converters 2.0.0-beta.13 → 2.0.0-beta.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 (78) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/build/browser/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.d.ts +4 -0
  3. package/build/browser/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.d.ts.map +1 -0
  4. package/build/browser/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js +31 -0
  5. package/build/browser/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js.map +1 -0
  6. package/build/browser/empty.test.d.ts +2 -0
  7. package/build/browser/empty.test.d.ts.map +1 -0
  8. package/build/browser/empty.test.js +22 -0
  9. package/build/browser/empty.test.js.map +1 -0
  10. package/build/browser/getEditedEntities.d.ts +7 -0
  11. package/build/browser/getEditedEntities.d.ts.map +1 -0
  12. package/build/browser/getEditedEntities.js +41 -0
  13. package/build/browser/getEditedEntities.js.map +1 -0
  14. package/build/browser/index.d.ts +9 -0
  15. package/build/browser/index.d.ts.map +1 -0
  16. package/build/browser/index.js +23 -416
  17. package/build/browser/index.js.map +1 -1
  18. package/build/browser/isNullableQueryDataType.d.ts +3 -0
  19. package/build/browser/isNullableQueryDataType.d.ts.map +1 -0
  20. package/build/browser/isNullableQueryDataType.js +25 -0
  21. package/build/browser/isNullableQueryDataType.js.map +1 -0
  22. package/build/browser/wireActionTypeV2ToSdkActionMetadata.d.ts +4 -0
  23. package/build/browser/wireActionTypeV2ToSdkActionMetadata.d.ts.map +1 -0
  24. package/build/browser/wireActionTypeV2ToSdkActionMetadata.js +85 -0
  25. package/build/browser/wireActionTypeV2ToSdkActionMetadata.js.map +1 -0
  26. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.d.ts +10 -0
  27. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.d.ts.map +1 -0
  28. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.js +56 -0
  29. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.js.map +1 -0
  30. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.d.ts +2 -0
  31. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.d.ts.map +1 -0
  32. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js +67 -0
  33. package/build/browser/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js.map +1 -0
  34. package/build/browser/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.d.ts +4 -0
  35. package/build/browser/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.d.ts.map +1 -0
  36. package/build/browser/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js +51 -0
  37. package/build/browser/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js.map +1 -0
  38. package/build/browser/wirePropertyV2ToSdkPropertyDefinition.d.ts +6 -0
  39. package/build/browser/wirePropertyV2ToSdkPropertyDefinition.d.ts.map +1 -0
  40. package/build/browser/wirePropertyV2ToSdkPropertyDefinition.js +90 -0
  41. package/build/browser/wirePropertyV2ToSdkPropertyDefinition.js.map +1 -0
  42. package/build/browser/wireQueryDataTypeToQueryDataTypeDefinition.d.ts +4 -0
  43. package/build/browser/wireQueryDataTypeToQueryDataTypeDefinition.d.ts.map +1 -0
  44. package/build/browser/wireQueryDataTypeToQueryDataTypeDefinition.js +143 -0
  45. package/build/browser/wireQueryDataTypeToQueryDataTypeDefinition.js.map +1 -0
  46. package/build/browser/wireQueryTypeV2ToSdkQueryMetadata.d.ts +13 -0
  47. package/build/browser/wireQueryTypeV2ToSdkQueryMetadata.d.ts.map +1 -0
  48. package/build/browser/wireQueryTypeV2ToSdkQueryMetadata.js +45 -0
  49. package/build/browser/wireQueryTypeV2ToSdkQueryMetadata.js.map +1 -0
  50. package/build/esm/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js +31 -0
  51. package/build/esm/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js.map +1 -0
  52. package/build/esm/empty.test.js +22 -0
  53. package/build/esm/empty.test.js.map +1 -0
  54. package/build/esm/getEditedEntities.js +41 -0
  55. package/build/esm/getEditedEntities.js.map +1 -0
  56. package/build/esm/index.js +23 -416
  57. package/build/esm/index.js.map +1 -1
  58. package/build/esm/isNullableQueryDataType.js +25 -0
  59. package/build/esm/isNullableQueryDataType.js.map +1 -0
  60. package/build/esm/wireActionTypeV2ToSdkActionMetadata.d.ts +1 -1
  61. package/build/esm/wireActionTypeV2ToSdkActionMetadata.d.ts.map +1 -1
  62. package/build/esm/wireActionTypeV2ToSdkActionMetadata.js +85 -0
  63. package/build/esm/wireActionTypeV2ToSdkActionMetadata.js.map +1 -0
  64. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.js +56 -0
  65. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.js.map +1 -0
  66. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js +67 -0
  67. package/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.test.js.map +1 -0
  68. package/build/esm/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.d.ts.map +1 -1
  69. package/build/esm/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js +51 -0
  70. package/build/esm/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.js.map +1 -0
  71. package/build/esm/wirePropertyV2ToSdkPropertyDefinition.d.ts.map +1 -1
  72. package/build/esm/wirePropertyV2ToSdkPropertyDefinition.js +90 -0
  73. package/build/esm/wirePropertyV2ToSdkPropertyDefinition.js.map +1 -0
  74. package/build/esm/wireQueryDataTypeToQueryDataTypeDefinition.js +143 -0
  75. package/build/esm/wireQueryDataTypeToQueryDataTypeDefinition.js.map +1 -0
  76. package/build/esm/wireQueryTypeV2ToSdkQueryMetadata.js +45 -0
  77. package/build/esm/wireQueryTypeV2ToSdkQueryMetadata.js.map +1 -0
  78. package/package.json +5 -7
@@ -1,417 +1,24 @@
1
- // src/wirePropertyV2ToSdkPropertyDefinition.ts
2
- function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {
3
- switch (input.dataType.type) {
4
- case "integer":
5
- case "string":
6
- case "byte":
7
- case "decimal":
8
- case "double":
9
- case "float":
10
- case "long":
11
- case "short":
12
- case "boolean":
13
- case "date":
14
- case "attachment":
15
- case "geopoint":
16
- case "geoshape":
17
- case "timestamp":
18
- case "timeseries":
19
- case "marking":
20
- return {
21
- displayName: input.displayName,
22
- multiplicity: false,
23
- description: input.description,
24
- type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),
25
- nullable: input.nullable == null ? isNullable : input.nullable
26
- };
27
- case "array": {
28
- return {
29
- displayName: input.displayName,
30
- multiplicity: true,
31
- description: input.description,
32
- type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),
33
- nullable: true
34
- };
35
- }
36
- default:
37
- input.dataType;
38
- throw new Error(`Unexpected data type ${JSON.stringify(input.dataType)}`);
39
- }
40
- }
41
- function objectPropertyTypeToSdkPropertyDefinition(propertyType) {
42
- switch (propertyType.type) {
43
- case "integer":
44
- case "string":
45
- case "byte":
46
- case "decimal":
47
- case "double":
48
- case "float":
49
- case "long":
50
- case "short":
51
- case "boolean":
52
- case "attachment":
53
- case "geopoint":
54
- case "geoshape":
55
- case "timestamp":
56
- case "marking":
57
- return propertyType.type;
58
- case "date":
59
- return "datetime";
60
- case "array":
61
- return objectPropertyTypeToSdkPropertyDefinition(propertyType.subType);
62
- case "timeseries":
63
- if (propertyType.itemType.type === "string") {
64
- return "stringTimeseries";
65
- }
66
- return "numericTimeseries";
67
- default:
68
- throw new Error(`Unexpected data type ${JSON.stringify(propertyType)}`);
69
- }
70
- }
71
-
72
- // src/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.ts
73
- function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType, v2) {
74
- return {
75
- type: "interface",
76
- rid: interfaceType.rid,
77
- apiName: interfaceType.apiName,
78
- displayName: interfaceType.displayName,
79
- description: interfaceType.description,
80
- implements: interfaceType.extendsInterfaces,
81
- properties: Object.fromEntries(Object.entries(interfaceType.properties).map(([key, value]) => {
82
- return [key, wirePropertyV2ToSdkPropertyDefinition(value, true)];
83
- })),
84
- links: {}
85
- };
86
- }
87
-
88
- // src/getEditedEntities.ts
89
- function getModifiedEntityTypes(action) {
90
- const addedObjects = /* @__PURE__ */ new Set();
91
- const modifiedObjects = /* @__PURE__ */ new Set();
92
- for (const operation of action.operations) {
93
- switch (operation.type) {
94
- case "createObject":
95
- addedObjects.add(operation.objectTypeApiName);
96
- break;
97
- case "modifyObject":
98
- modifiedObjects.add(operation.objectTypeApiName);
99
- break;
100
- }
101
- }
102
- return {
103
- addedObjects,
104
- modifiedObjects
105
- };
106
- }
107
-
108
- // src/wireActionTypeV2ToSdkActionMetadata.ts
109
- function wireActionTypeV2ToSdkActionMetadata(input) {
110
- const modifiedEntityTypes = getModifiedEntityTypes(input);
111
- return {
112
- type: "action",
113
- apiName: input.apiName,
114
- parameters: Object.fromEntries(Object.entries(input.parameters).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),
115
- displayName: input.displayName,
116
- description: input.description,
117
- modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),
118
- rid: input.rid,
119
- status: input.status
120
- };
121
- }
122
- function wireActionParameterV2ToSdkParameterDefinition(value) {
123
- return {
124
- multiplicity: value.dataType.type === "array",
125
- type: actionPropertyToSdkPropertyDefinition(value.dataType.type === "array" ? value.dataType.subType : value.dataType),
126
- nullable: !value.required,
127
- description: value.description
128
- };
129
- }
130
- function actionPropertyToSdkPropertyDefinition(parameterType) {
131
- switch (parameterType.type) {
132
- case "string":
133
- case "boolean":
134
- case "attachment":
135
- case "double":
136
- case "integer":
137
- case "long":
138
- case "timestamp":
139
- case "marking":
140
- return parameterType.type;
141
- case "date":
142
- return "datetime";
143
- case "objectSet":
144
- return {
145
- type: "objectSet",
146
- objectSet: parameterType.objectTypeApiName
147
- };
148
- case "object":
149
- return {
150
- type: "object",
151
- object: parameterType.objectTypeApiName
152
- };
153
- case "array":
154
- return actionPropertyToSdkPropertyDefinition(parameterType.subType);
155
- }
156
- }
157
- function createModifiedEntities(addedObjects, modifiedObjects) {
158
- let entities = {};
159
- for (const key of addedObjects) {
160
- entities[key] = {
161
- created: true,
162
- modified: false
163
- };
164
- }
165
- for (const key of modifiedObjects) {
166
- if (entities[key]) {
167
- entities[key].modified = true;
168
- } else {
169
- entities[key] = {
170
- created: false,
171
- modified: true
172
- };
173
- }
174
- }
175
- return entities;
176
- }
177
-
178
- // src/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.ts
179
- function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(input) {
180
- switch (input.dataType.type) {
181
- case "integer":
182
- case "double":
183
- case "string":
184
- case "boolean":
185
- case "byte":
186
- case "long":
187
- case "short": {
188
- return input.dataType.type;
189
- }
190
- case "date": {
191
- return "datetime";
192
- }
193
- case "timestamp": {
194
- return "timestamp";
195
- }
196
- case "geopoint":
197
- case "geoshape":
198
- case "decimal":
199
- case "attachment":
200
- case "timeseries":
201
- case "array":
202
- case "marking":
203
- case "float":
204
- throw new Error(`Type not supported for primaryKey: ${input.dataType.type}`);
205
- default:
206
- input.dataType;
207
- throw new Error(`Unknown type encountered for primaryKey: ${input.dataType}`);
208
- }
209
- }
210
-
211
- // src/wireObjectTypeFullMetadataToSdkObjectMetadata.ts
212
- function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2) {
213
- if (objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey] === void 0) {
214
- throw new Error(`Primary key ${objectTypeWithLink.objectType.primaryKey} not found in ${objectTypeWithLink.objectType.apiName}`);
215
- }
216
- if (objectTypeWithLink.implementsInterfaces2 == null && objectTypeWithLink.implementsInterfaces != null) {
217
- throw new Error("Your ontology.json file is missing the implementsInterfaces2 field. Please regenerate it.");
218
- }
219
- const interfaceMap = objectTypeWithLink.implementsInterfaces2 ? Object.fromEntries(Object.entries(objectTypeWithLink.implementsInterfaces2).map(([interfaceApiName, impl]) => [interfaceApiName, impl.properties])) : {};
220
- return {
221
- type: "object",
222
- apiName: objectTypeWithLink.objectType.apiName,
223
- description: objectTypeWithLink.objectType.description,
224
- primaryKeyApiName: objectTypeWithLink.objectType.primaryKey,
225
- primaryKeyType: wirePropertyV2ToSdkPrimaryKeyTypeDefinition(objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey]),
226
- links: Object.fromEntries(objectTypeWithLink.linkTypes.map((linkType) => {
227
- return [linkType.apiName, {
228
- multiplicity: linkType.cardinality === "MANY",
229
- targetType: linkType.objectTypeApiName
230
- }];
231
- })),
232
- properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key, value]) => [key, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key))])),
233
- implements: objectTypeWithLink.implementsInterfaces,
234
- interfaceMap,
235
- inverseInterfaceMap: Object.fromEntries(Object.entries(interfaceMap).map(([interfaceApiName, props]) => [interfaceApiName, invertProps(props)])),
236
- icon: supportedIconTypes.includes(objectTypeWithLink.objectType.icon.type) ? objectTypeWithLink.objectType.icon : void 0,
237
- titleProperty: objectTypeWithLink.objectType.titleProperty,
238
- displayName: objectTypeWithLink.objectType.displayName,
239
- pluralDisplayName: objectTypeWithLink.objectType.pluralDisplayName,
240
- status: objectTypeWithLink.objectType.status,
241
- rid: objectTypeWithLink.objectType.rid,
242
- visibility: objectTypeWithLink.objectType.visibility
243
- };
244
- }
245
- function invertProps(a) {
246
- return a ? Object.fromEntries(Object.entries(a).map(([k, v]) => [v, k])) : void 0;
247
- }
248
- var supportedIconTypes = ["blueprint"];
249
-
250
- // src/isNullableQueryDataType.ts
251
- function isNullableQueryDataType(input) {
252
- if (input.type === "null") {
253
- return true;
254
- }
255
- if (input.type === "union") {
256
- return input.unionTypes.some((t) => isNullableQueryDataType(t));
257
- }
258
- return false;
259
- }
260
-
261
- // src/wireQueryDataTypeToQueryDataTypeDefinition.ts
262
- function wireQueryDataTypeToQueryDataTypeDefinition(input) {
263
- switch (input.type) {
264
- case "double":
265
- case "float":
266
- case "integer":
267
- case "long":
268
- case "attachment":
269
- case "boolean":
270
- case "date":
271
- case "string":
272
- case "timestamp":
273
- return {
274
- type: input.type,
275
- nullable: false
276
- };
277
- case "object":
278
- return {
279
- type: "object",
280
- object: input.objectTypeApiName,
281
- nullable: false
282
- };
283
- case "objectSet":
284
- return {
285
- type: "objectSet",
286
- objectSet: input.objectTypeApiName,
287
- nullable: false
288
- };
289
- case "array":
290
- return {
291
- ...wireQueryDataTypeToQueryDataTypeDefinition(input.subType),
292
- multiplicity: true
293
- };
294
- case "set":
295
- return {
296
- type: "set",
297
- set: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),
298
- nullable: false
299
- };
300
- case "union":
301
- const allowNulls = isNullableQueryDataType(input);
302
- if (allowNulls && input.unionTypes.length === 2) {
303
- const nonNull = input.unionTypes.find((t) => t.type != null);
304
- if (nonNull) {
305
- return {
306
- ...wireQueryDataTypeToQueryDataTypeDefinition(nonNull),
307
- nullable: true
308
- };
309
- }
310
- }
311
- return {
312
- type: "union",
313
- union: input.unionTypes.reduce((acc, t) => {
314
- if (t.type === "null") {
315
- return acc;
316
- }
317
- acc.push(wireQueryDataTypeToQueryDataTypeDefinition(t));
318
- return acc;
319
- }, []),
320
- nullable: allowNulls
321
- };
322
- case "struct":
323
- return {
324
- type: "struct",
325
- struct: Object.fromEntries(input.fields.map((f) => [f.name, wireQueryDataTypeToQueryDataTypeDefinition(f.fieldType)])),
326
- nullable: false
327
- };
328
- case "twoDimensionalAggregation":
329
- return {
330
- type: "twoDimensionalAggregation",
331
- twoDimensionalAggregation: get2DQueryAggregationProps(input),
332
- nullable: false
333
- };
334
- case "threeDimensionalAggregation":
335
- return {
336
- type: "threeDimensionalAggregation",
337
- threeDimensionalAggregation: get3DQueryAggregationProps(input),
338
- nullable: false
339
- };
340
- case "null":
341
- case "unsupported":
342
- throw new Error(`Accidentally tried to handle QueryDataType.type ${input.type}`);
343
- default:
344
- throw new Error(`Unsupported QueryDataType.type ${input.type}`);
345
- }
346
- }
347
- function get2DQueryAggregationProps(input) {
348
- if (input.keyType.type === "range") {
349
- return {
350
- keyType: input.keyType.type,
351
- keySubtype: input.keyType.subType.type,
352
- valueType: input.valueType.type
353
- };
354
- } else {
355
- if (guardInvalidKeyTypes(input.keyType)) {
356
- return {
357
- keyType: input.keyType.type,
358
- valueType: input.valueType.type
359
- };
360
- }
361
- throw new Error(`Cannot create 2D aggregation with ${input.keyType.type} as its type`);
362
- }
363
- }
364
- function get3DQueryAggregationProps(input) {
365
- if (input.keyType.type === "range") {
366
- return {
367
- keyType: input.keyType.type,
368
- keySubtype: input.keyType.subType.type,
369
- valueType: get2DQueryAggregationProps(input.valueType)
370
- };
371
- } else {
372
- if (guardInvalidKeyTypes(input.keyType)) {
373
- return {
374
- keyType: input.keyType.type,
375
- valueType: get2DQueryAggregationProps(input.valueType)
376
- };
377
- }
378
- throw new Error(`Cannot create 3D aggregation with ${input.keyType.type} as its type`);
379
- }
380
- }
381
- function guardInvalidKeyTypes(key) {
382
- return key.type === "string" || key.type === "boolean";
383
- }
384
-
385
- // src/wireQueryTypeV2ToSdkQueryMetadata.ts
386
- function wireQueryTypeV2ToSdkQueryMetadata(input) {
387
- return {
388
- type: "query",
389
- apiName: input.apiName,
390
- description: input.description,
391
- displayName: input.displayName,
392
- version: input.version,
393
- parameters: Object.fromEntries(Object.entries(input.parameters).map(([name, parameter]) => [name, wireQueryParameterV2ToQueryParameterDefinition(parameter)])),
394
- output: wireQueryDataTypeToQueryDataTypeDefinition(input.output),
395
- rid: input.rid
396
- };
397
- }
398
- function wireQueryTypeV2ToSdkQueryDefinitionNoParams(input) {
399
- return {
400
- type: "query",
401
- apiName: input.apiName,
402
- description: input.description,
403
- displayName: input.displayName,
404
- version: input.version,
405
- rid: input.rid
406
- };
407
- }
408
- function wireQueryParameterV2ToQueryParameterDefinition(parameter) {
409
- return {
410
- description: parameter.description,
411
- ...wireQueryDataTypeToQueryDataTypeDefinition(parameter.dataType)
412
- };
413
- }
414
-
415
- export { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition, wireActionTypeV2ToSdkActionMetadata, wireObjectTypeFullMetadataToSdkObjectMetadata, wirePropertyV2ToSdkPropertyDefinition, wireQueryDataTypeToQueryDataTypeDefinition, wireQueryParameterV2ToQueryParameterDefinition, wireQueryTypeV2ToSdkQueryDefinitionNoParams, wireQueryTypeV2ToSdkQueryMetadata };
416
- //# sourceMappingURL=index.js.map
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from "./__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js";
17
+ export { wireActionTypeV2ToSdkActionMetadata } from "./wireActionTypeV2ToSdkActionMetadata.js";
18
+ export { wireObjectTypeFullMetadataToSdkObjectMetadata } from "./wireObjectTypeFullMetadataToSdkObjectMetadata.js";
19
+ export { wirePropertyV2ToSdkPropertyDefinition } from "./wirePropertyV2ToSdkPropertyDefinition.js";
20
+ export { wireQueryDataTypeToQueryDataTypeDefinition } from "./wireQueryDataTypeToQueryDataTypeDefinition.js";
21
+ export { wireQueryTypeV2ToSdkQueryMetadata } from "./wireQueryTypeV2ToSdkQueryMetadata.js";
22
+ export { wireQueryParameterV2ToQueryParameterDefinition } from "./wireQueryTypeV2ToSdkQueryMetadata.js";
23
+ export { wireQueryTypeV2ToSdkQueryDefinitionNoParams } from "./wireQueryTypeV2ToSdkQueryMetadata.js";
417
24
  //# sourceMappingURL=index.js.map
@@ -1 +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":[],"mappings":";AAgBO,SAAS,qCAAA,CAAsC,KAAO,EAAA,UAAA,GAAa,IAAM,EAAA;AAC9E,EAAQ,QAAA,KAAA,CAAM,SAAS,IAAM;AAAA,IAC3B,KAAK,SAAA,CAAA;AAAA,IACL,KAAK,QAAA,CAAA;AAAA,IACL,KAAK,MAAA,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,UAAA,CAAA;AAAA,IACL,KAAK,UAAA,CAAA;AAAA,IACL,KAAK,WAAA,CAAA;AAAA,IACL,KAAK,YAAA,CAAA;AAAA,IACL,KAAK,SAAA;AACH,MAAO,OAAA;AAAA,QACL,aAAa,KAAM,CAAA,WAAA;AAAA,QACnB,YAAc,EAAA,KAAA;AAAA,QACd,aAAa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AAM,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.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 */\n\nexport function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {\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 \"geopoint\":\n case \"geoshape\":\n case \"timestamp\":\n case \"timeseries\":\n case \"marking\":\n return {\n displayName: input.displayName,\n multiplicity: false,\n description: input.description,\n type: objectPropertyTypeToSdkPropertyDefinition(input.dataType),\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: objectPropertyTypeToSdkPropertyDefinition(input.dataType),\n nullable: true\n };\n }\n default:\n const _ = input.dataType;\n throw new Error(`Unexpected data type ${JSON.stringify(input.dataType)}`);\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 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 }\n return \"numericTimeseries\";\n default:\n const _ = propertyType;\n throw new Error(`Unexpected data type ${JSON.stringify(propertyType)}`);\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 })),\n links: {}\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 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 }\n}\nfunction createModifiedEntities(addedObjects, modifiedObjects) {\n let 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 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))])),\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(`Accidentally tried to handle QueryDataType.type ${input.type}`);\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}"]}
1
+ {"version":3,"file":"index.js","names":["__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition","wireActionTypeV2ToSdkActionMetadata","wireObjectTypeFullMetadataToSdkObjectMetadata","wirePropertyV2ToSdkPropertyDefinition","wireQueryDataTypeToQueryDataTypeDefinition","wireQueryTypeV2ToSdkQueryMetadata","wireQueryParameterV2ToQueryParameterDefinition","wireQueryTypeV2ToSdkQueryDefinitionNoParams"],"sources":["index.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition } from \"./__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js\";\nexport { wireActionTypeV2ToSdkActionMetadata } from \"./wireActionTypeV2ToSdkActionMetadata.js\";\nexport { wireObjectTypeFullMetadataToSdkObjectMetadata } from \"./wireObjectTypeFullMetadataToSdkObjectMetadata.js\";\nexport { wirePropertyV2ToSdkPropertyDefinition } from \"./wirePropertyV2ToSdkPropertyDefinition.js\";\nexport { wireQueryDataTypeToQueryDataTypeDefinition } from \"./wireQueryDataTypeToQueryDataTypeDefinition.js\";\nexport { wireQueryTypeV2ToSdkQueryMetadata } from \"./wireQueryTypeV2ToSdkQueryMetadata.js\";\nexport { wireQueryParameterV2ToQueryParameterDefinition } from \"./wireQueryTypeV2ToSdkQueryMetadata.js\";\nexport { wireQueryTypeV2ToSdkQueryDefinitionNoParams } from \"./wireQueryTypeV2ToSdkQueryMetadata.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,mDAAmD,QAAQ,0DAA0D;AAC9H,SAASC,mCAAmC,QAAQ,0CAA0C;AAC9F,SAASC,6CAA6C,QAAQ,oDAAoD;AAClH,SAASC,qCAAqC,QAAQ,4CAA4C;AAClG,SAASC,0CAA0C,QAAQ,iDAAiD;AAC5G,SAASC,iCAAiC,QAAQ,wCAAwC;AAC1F,SAASC,8CAA8C,QAAQ,wCAAwC;AACvG,SAASC,2CAA2C,QAAQ,wCAAwC","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright 2023 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
+ export function isNullableQueryDataType(input) {
17
+ if (input.type === "null") {
18
+ return true;
19
+ }
20
+ if (input.type === "union") {
21
+ return input.unionTypes.some(t => isNullableQueryDataType(t));
22
+ }
23
+ return false;
24
+ }
25
+ //# sourceMappingURL=isNullableQueryDataType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNullableQueryDataType.js","names":["isNullableQueryDataType","input","type","unionTypes","some","t"],"sources":["isNullableQueryDataType.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 */\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,uBAAuBA,CAACC,KAAK,EAAE;EAC3C,IAAIA,KAAK,CAACC,IAAI,KAAK,MAAM,EAAE;IACvB,OAAO,IAAI;EACf;EACA,IAAID,KAAK,CAACC,IAAI,KAAK,OAAO,EAAE;IACxB,OAAOD,KAAK,CAACE,UAAU,CAACC,IAAI,CAACC,CAAC,IAAIL,uBAAuB,CAACK,CAAC,CAAC,CAAC;EACjE;EACA,OAAO,KAAK;AAChB","ignoreList":[]}
@@ -1,4 +1,4 @@
1
1
  import type { ActionMetadata } from "@osdk/api";
2
2
  import type { ActionTypeV2 } from "@osdk/internal.foundry.core";
3
- export declare function wireActionTypeV2ToSdkActionMetadata(input: ActionTypeV2): ActionMetadata<any, any>;
3
+ export declare function wireActionTypeV2ToSdkActionMetadata(input: ActionTypeV2): ActionMetadata;
4
4
  //# sourceMappingURL=wireActionTypeV2ToSdkActionMetadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wireActionTypeV2ToSdkActionMetadata.d.ts","sourceRoot":"","sources":["../../src/wireActionTypeV2ToSdkActionMetadata.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,6BAA6B,CAAC;AAGrC,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,YAAY,GAClB,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAmB1B"}
1
+ {"version":3,"file":"wireActionTypeV2ToSdkActionMetadata.d.ts","sourceRoot":"","sources":["../../src/wireActionTypeV2ToSdkActionMetadata.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,6BAA6B,CAAC;AAGrC,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,YAAY,GAClB,cAAc,CAmBhB"}
@@ -0,0 +1,85 @@
1
+ /*
2
+ * Copyright 2023 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
+ import { getModifiedEntityTypes } from "./getEditedEntities.js";
17
+ export function wireActionTypeV2ToSdkActionMetadata(input) {
18
+ const modifiedEntityTypes = getModifiedEntityTypes(input);
19
+ return {
20
+ type: "action",
21
+ apiName: input.apiName,
22
+ parameters: Object.fromEntries(Object.entries(input.parameters).map(([key, value]) => [key, wireActionParameterV2ToSdkParameterDefinition(value)])),
23
+ displayName: input.displayName,
24
+ description: input.description,
25
+ modifiedEntities: createModifiedEntities(modifiedEntityTypes.addedObjects, modifiedEntityTypes.modifiedObjects),
26
+ rid: input.rid,
27
+ status: input.status
28
+ };
29
+ }
30
+ function wireActionParameterV2ToSdkParameterDefinition(value) {
31
+ return {
32
+ multiplicity: value.dataType.type === "array",
33
+ type: actionPropertyToSdkPropertyDefinition(value.dataType.type === "array" ? value.dataType.subType : value.dataType),
34
+ nullable: !value.required,
35
+ description: value.description
36
+ };
37
+ }
38
+ function actionPropertyToSdkPropertyDefinition(parameterType) {
39
+ switch (parameterType.type) {
40
+ case "string":
41
+ case "boolean":
42
+ case "attachment":
43
+ case "double":
44
+ case "integer":
45
+ case "long":
46
+ case "timestamp":
47
+ case "marking":
48
+ return parameterType.type;
49
+ case "date":
50
+ return "datetime";
51
+ case "objectSet":
52
+ return {
53
+ type: "objectSet",
54
+ objectSet: parameterType.objectTypeApiName
55
+ };
56
+ case "object":
57
+ return {
58
+ type: "object",
59
+ object: parameterType.objectTypeApiName
60
+ };
61
+ case "array":
62
+ return actionPropertyToSdkPropertyDefinition(parameterType.subType);
63
+ }
64
+ }
65
+ function createModifiedEntities(addedObjects, modifiedObjects) {
66
+ let entities = {};
67
+ for (const key of addedObjects) {
68
+ entities[key] = {
69
+ created: true,
70
+ modified: false
71
+ };
72
+ }
73
+ for (const key of modifiedObjects) {
74
+ if (entities[key]) {
75
+ entities[key].modified = true;
76
+ } else {
77
+ entities[key] = {
78
+ created: false,
79
+ modified: true
80
+ };
81
+ }
82
+ }
83
+ return entities;
84
+ }
85
+ //# sourceMappingURL=wireActionTypeV2ToSdkActionMetadata.js.map