@osdk/cli 0.25.0-beta.30 → 0.25.0-beta.31

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 (29) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/esm/{chunk-TUUXETG3.js → chunk-6M6VA3Q6.js} +3 -3
  3. package/build/esm/{chunk-TUUXETG3.js.map → chunk-6M6VA3Q6.js.map} +1 -1
  4. package/build/esm/{handleGenerate-JRNKYU5I.js → handleGenerate-G365N2VT.js} +212 -202
  5. package/build/esm/handleGenerate-G365N2VT.js.map +1 -0
  6. package/build/esm/index.js +12 -12
  7. package/build/esm/index.js.map +1 -1
  8. package/build/esm/{siteDeployCommand-2KKJQBZR.js → siteDeployCommand-XBXBTL4X.js} +3 -3
  9. package/build/esm/{siteDeployCommand-2KKJQBZR.js.map → siteDeployCommand-XBXBTL4X.js.map} +1 -1
  10. package/build/esm/{versionDeleteCommand-TFRZQLWE.js → versionDeleteCommand-3ROMMPPE.js} +3 -3
  11. package/build/esm/{versionDeleteCommand-TFRZQLWE.js.map → versionDeleteCommand-3ROMMPPE.js.map} +1 -1
  12. package/build/esm/{versionDeleteCommand-IW32RYPI.js → versionDeleteCommand-W5DB2O5O.js} +3 -3
  13. package/build/esm/{versionDeleteCommand-IW32RYPI.js.map → versionDeleteCommand-W5DB2O5O.js.map} +1 -1
  14. package/build/esm/{versionGetCommand-H5PRBSF2.js → versionGetCommand-S6Z7WBEW.js} +3 -3
  15. package/build/esm/{versionGetCommand-H5PRBSF2.js.map → versionGetCommand-S6Z7WBEW.js.map} +1 -1
  16. package/build/esm/{versionInfoCommand-BYREWVBR.js → versionInfoCommand-TQN4GYGM.js} +3 -3
  17. package/build/esm/{versionInfoCommand-BYREWVBR.js.map → versionInfoCommand-TQN4GYGM.js.map} +1 -1
  18. package/build/esm/{versionListCommand-ZB6CYO34.js → versionListCommand-E7TZMYL2.js} +3 -3
  19. package/build/esm/{versionListCommand-ZB6CYO34.js.map → versionListCommand-E7TZMYL2.js.map} +1 -1
  20. package/build/esm/{versionListCommand-WCPX5X33.js → versionListCommand-TKZFQTUE.js} +3 -3
  21. package/build/esm/{versionListCommand-WCPX5X33.js.map → versionListCommand-TKZFQTUE.js.map} +1 -1
  22. package/build/esm/{versionSetCommand-7ZVOM7DU.js → versionSetCommand-4EUKYH7S.js} +3 -3
  23. package/build/esm/{versionSetCommand-7ZVOM7DU.js.map → versionSetCommand-4EUKYH7S.js.map} +1 -1
  24. package/build/esm/{versionUnsetCommand-YP7FNKZM.js → versionUnsetCommand-DYJQJ6JI.js} +3 -3
  25. package/build/esm/{versionUnsetCommand-YP7FNKZM.js.map → versionUnsetCommand-DYJQJ6JI.js.map} +1 -1
  26. package/build/esm/{widgetSetDeployCommand-JX3P6H4Y.js → widgetSetDeployCommand-T5R63R3N.js} +3 -3
  27. package/build/esm/{widgetSetDeployCommand-JX3P6H4Y.js.map → widgetSetDeployCommand-T5R63R3N.js.map} +1 -1
  28. package/package.json +4 -4
  29. package/build/esm/handleGenerate-JRNKYU5I.js.map +0 -1
@@ -7,7 +7,6 @@ import * as fs8 from 'fs';
7
7
  import fs8__default, { realpathSync, statSync, Stats } from 'fs';
8
8
  import * as path9 from 'path';
9
9
  import path9__default, { dirname } from 'path';
10
- import { consola } from 'consola';
11
10
  import { createRequire, builtinModules } from 'module';
12
11
  import url, { fileURLToPath, pathToFileURL, URL as URL$1 } from 'url';
13
12
  import process3 from 'process';
@@ -17,6 +16,7 @@ import fs from 'fs/promises';
17
16
  import assert2 from 'assert';
18
17
  import v8 from 'v8';
19
18
  import { format, inspect } from 'util';
19
+ import consola$1, { consola } from 'consola';
20
20
 
21
21
  // ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
22
22
  var require_fast_deep_equal = __commonJS({
@@ -54,6 +54,180 @@ var require_fast_deep_equal = __commonJS({
54
54
  // ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
55
55
  init_esm_shims();
56
56
 
57
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/index.js
58
+ init_esm_shims();
59
+
60
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
61
+ init_esm_shims();
62
+
63
+ // ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.3.0/node_modules/@osdk/shared.net.platformapi/build/esm/index.js
64
+ init_esm_shims();
65
+
66
+ // ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.3.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
67
+ init_esm_shims();
68
+
69
+ // ../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js
70
+ init_esm_shims();
71
+ var symbolClientContext = Symbol("ClientContext");
72
+
73
+ // ../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js
74
+ init_esm_shims();
75
+ var symbolClientContext2 = "__osdkClientContext";
76
+
77
+ // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.1/node_modules/@osdk/shared.net.errors/build/esm/index.js
78
+ init_esm_shims();
79
+
80
+ // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.1/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js
81
+ init_esm_shims();
82
+ var PalantirApiError2 = class extends Error {
83
+ message;
84
+ errorName;
85
+ errorCode;
86
+ statusCode;
87
+ errorInstanceId;
88
+ parameters;
89
+ constructor(message, errorName, errorCode, statusCode, errorInstanceId, parameters) {
90
+ super(message);
91
+ this.message = message;
92
+ this.errorName = errorName;
93
+ this.errorCode = errorCode;
94
+ this.statusCode = statusCode;
95
+ this.errorInstanceId = errorInstanceId;
96
+ this.parameters = parameters;
97
+ }
98
+ };
99
+
100
+ // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.1/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js
101
+ init_esm_shims();
102
+ var UnknownError = class extends PalantirApiError2 {
103
+ originalError;
104
+ constructor(message, errorType, originalError) {
105
+ super(message, errorType);
106
+ this.originalError = originalError;
107
+ }
108
+ };
109
+
110
+ // ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.3.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
111
+ async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {
112
+ const path21 = origPath.replace(/\{([^}]+)\}/g, () => encodeURIComponent(args.shift()));
113
+ const body = flags & 1 ? args.shift() : undefined;
114
+ const queryArgs = flags & 2 ? args.shift() : undefined;
115
+ const headerArgs = flags & 4 ? args.shift() : undefined;
116
+ const method = ["GET", "POST", "PUT", "DELETE", "PATCH"][httpMethodNum];
117
+ return await apiFetch(client[symbolClientContext2] ?? client[symbolClientContext] ?? client, method, path21, body, queryArgs, headerArgs, contentType, responseContentType);
118
+ }
119
+ async function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {
120
+ const url2 = parseUrl(clientCtx.baseUrl, endpointPath);
121
+ for (const [key2, value] of Object.entries(queryArguments || {})) {
122
+ if (value == null) {
123
+ continue;
124
+ }
125
+ if (Array.isArray(value)) {
126
+ for (const item of value) {
127
+ url2.searchParams.append(key2, item);
128
+ }
129
+ } else {
130
+ url2.searchParams.append(key2, value);
131
+ }
132
+ }
133
+ const headersInit = new Headers();
134
+ headersInit.set("Content-Type", requestMediaType ?? "application/json");
135
+ headersInit.set("Accept", responseMediaType ?? "application/json");
136
+ Object.entries(headers || {}).forEach(([key2, value]) => {
137
+ if (value != null) {
138
+ headersInit.append(key2, value.toString());
139
+ }
140
+ });
141
+ const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);
142
+ const response = await clientCtx.fetch(url2.toString(), {
143
+ body,
144
+ method,
145
+ headers: headersInit
146
+ });
147
+ if (!response.ok) {
148
+ try {
149
+ const convertedError = await response.json();
150
+ return new PalantirApiError2(convertedError.message, convertedError.errorName, convertedError.errorCode, response.status, convertedError.errorInstanceId, convertedError.parameters);
151
+ } catch (e) {
152
+ if (e instanceof Error) {
153
+ return new UnknownError(e.message, "UNKNOWN");
154
+ }
155
+ return new UnknownError("Unable to parse error response", "UNKNOWN");
156
+ }
157
+ }
158
+ if (response.status === 204) {
159
+ return;
160
+ }
161
+ if (responseMediaType == null || responseMediaType === "application/json") {
162
+ return await response.json();
163
+ }
164
+ return response;
165
+ }
166
+ function parseUrl(baseUrl, endpointPath) {
167
+ baseUrl += baseUrl.endsWith("/") ? "" : "/";
168
+ return new URL(`api${endpointPath}`, baseUrl);
169
+ }
170
+
171
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
172
+ init_esm_shims();
173
+
174
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
175
+ init_esm_shims();
176
+
177
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js
178
+ init_esm_shims();
179
+
180
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js
181
+ init_esm_shims();
182
+
183
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
184
+ init_esm_shims();
185
+
186
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
187
+ init_esm_shims();
188
+
189
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
190
+ init_esm_shims();
191
+
192
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
193
+ init_esm_shims();
194
+
195
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js
196
+ init_esm_shims();
197
+
198
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js
199
+ var OntologyV2_exports = {};
200
+ __export(OntologyV2_exports, {
201
+ get: () => get,
202
+ getFullMetadata: () => getFullMetadata,
203
+ list: () => list
204
+ });
205
+ init_esm_shims();
206
+ var _list = [0, "/v2/ontologies"];
207
+ function list($ctx, ...args) {
208
+ return foundryPlatformFetch($ctx, _list, ...args);
209
+ }
210
+ var _get = [0, "/v2/ontologies/{0}"];
211
+ function get($ctx, ...args) {
212
+ return foundryPlatformFetch($ctx, _get, ...args);
213
+ }
214
+ var _getFullMetadata = [0, "/v2/ontologies/{0}/fullMetadata"];
215
+ function getFullMetadata($ctx, ...args) {
216
+ return foundryPlatformFetch($ctx, _getFullMetadata, ...args);
217
+ }
218
+
219
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
220
+ init_esm_shims();
221
+
222
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
223
+ init_esm_shims();
224
+
225
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
226
+ init_esm_shims();
227
+
228
+ // ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.13.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
229
+ init_esm_shims();
230
+
57
231
  // ../generator/build/esm/index.js
58
232
  init_esm_shims();
59
233
 
@@ -151,8 +325,8 @@ init_esm_shims();
151
325
 
152
326
  // ../generator-converters/build/esm/wirePropertyV2ToSdkPropertyDefinition.js
153
327
  init_esm_shims();
154
- function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {
155
- const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(input.dataType);
328
+ function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true, log) {
329
+ const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(input.dataType, log);
156
330
  if (sdkPropDefinition == null) {
157
331
  return undefined;
158
332
  }
@@ -160,7 +334,6 @@ function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {
160
334
  case "integer":
161
335
  case "string":
162
336
  case "byte":
163
- case "cipherText":
164
337
  case "decimal":
165
338
  case "double":
166
339
  case "float":
@@ -193,17 +366,18 @@ function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true) {
193
366
  nullable: true
194
367
  };
195
368
  }
196
- case "cipherText": {
197
- consola.info(`${JSON.stringify(input.dataType.type)} is not a supported dataType`);
369
+ case "cipherText":
370
+ case "vector": {
371
+ log?.info(`${JSON.stringify(input.dataType.type)} is not a supported dataType`);
198
372
  return undefined;
199
373
  }
200
374
  default:
201
375
  input.dataType;
202
- consola.info(`${JSON.stringify(input.dataType)} is not a supported dataType`);
376
+ log?.info(`${JSON.stringify(input.dataType)} is not a supported dataType`);
203
377
  return undefined;
204
378
  }
205
379
  }
206
- function objectPropertyTypeToSdkPropertyDefinition(propertyType) {
380
+ function objectPropertyTypeToSdkPropertyDefinition(propertyType, log) {
207
381
  switch (propertyType.type) {
208
382
  case "integer":
209
383
  case "string":
@@ -238,19 +412,20 @@ function objectPropertyTypeToSdkPropertyDefinition(propertyType) {
238
412
  return structMap;
239
413
  }, {});
240
414
  }
241
- case "cipherText": {
242
- consola.info(`${JSON.stringify(propertyType.type)} is not a supported propertyType`);
415
+ case "cipherText":
416
+ case "vector": {
417
+ log?.info(`${JSON.stringify(propertyType.type)} is not a supported propertyType`);
243
418
  return undefined;
244
419
  }
245
420
  default: {
246
- consola.info(`${JSON.stringify(propertyType)} is not a supported propertyType`);
421
+ log?.info(`${JSON.stringify(propertyType)} is not a supported propertyType`);
247
422
  return undefined;
248
423
  }
249
424
  }
250
425
  }
251
426
 
252
427
  // ../generator-converters/build/esm/__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition.js
253
- function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType) {
428
+ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType, v2, log) {
254
429
  return {
255
430
  type: "interface",
256
431
  rid: interfaceType.rid,
@@ -259,7 +434,7 @@ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(interfaceType) {
259
434
  description: interfaceType.description,
260
435
  implements: interfaceType.extendsInterfaces,
261
436
  properties: Object.fromEntries(Object.entries(interfaceType.properties).map(([key2, value]) => {
262
- return [key2, wirePropertyV2ToSdkPropertyDefinition(value, true)];
437
+ return [key2, wirePropertyV2ToSdkPropertyDefinition(value, true, log)];
263
438
  }).filter(([key2, value]) => value != null)),
264
439
  links: {},
265
440
  implementedBy: interfaceType.implementedByObjectTypes
@@ -408,10 +583,10 @@ function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(input) {
408
583
  case "marking":
409
584
  case "float":
410
585
  case "geotimeSeriesReference":
411
- case "cipherText":
412
586
  case "mediaReference":
413
587
  case "struct":
414
588
  case "cipherText":
589
+ case "vector":
415
590
  throw new Error(`Type not supported for primaryKey: ${input.dataType.type}`);
416
591
  default:
417
592
  input.dataType;
@@ -420,7 +595,7 @@ function wirePropertyV2ToSdkPrimaryKeyTypeDefinition(input) {
420
595
  }
421
596
 
422
597
  // ../generator-converters/build/esm/wireObjectTypeFullMetadataToSdkObjectMetadata.js
423
- function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2) {
598
+ function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2, log) {
424
599
  if (objectTypeWithLink.objectType.properties[objectTypeWithLink.objectType.primaryKey] === undefined) {
425
600
  throw new Error(`Primary key ${objectTypeWithLink.objectType.primaryKey} not found in ${objectTypeWithLink.objectType.apiName}`);
426
601
  }
@@ -440,7 +615,7 @@ function wireObjectTypeFullMetadataToSdkObjectMetadata(objectTypeWithLink, v2) {
440
615
  targetType: linkType.objectTypeApiName
441
616
  }];
442
617
  })),
443
- properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key2, value]) => [key2, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key2))]).filter(([key2, value]) => value != null)),
618
+ properties: Object.fromEntries(Object.entries(objectTypeWithLink.objectType.properties).map(([key2, value]) => [key2, wirePropertyV2ToSdkPropertyDefinition(value, !(v2 && objectTypeWithLink.objectType.primaryKey === key2), log)]).filter(([key2, value]) => value != null)),
444
619
  implements: objectTypeWithLink.implementsInterfaces,
445
620
  interfaceMap,
446
621
  inverseInterfaceMap: Object.fromEntries(Object.entries(interfaceMap).map(([interfaceApiName, props]) => [interfaceApiName, invertProps(props)])),
@@ -650,7 +825,7 @@ var EnhancedObjectType = class extends EnhancedBase {
650
825
  this.raw = raw;
651
826
  }
652
827
  getDefinitionIdentifier(v2) {
653
- return v2 ? `${this.shortApiName}` : `${this.shortApiName}Def`;
828
+ return v2 ? this.shortApiName : `${this.shortApiName}Def`;
654
829
  }
655
830
  getImportedDefinitionIdentifier(v2) {
656
831
  return this.getDefinitionIdentifier(v2);
@@ -680,7 +855,7 @@ var EnhancedQuery = class extends EnhancedBase {
680
855
  return `${this.shortApiName}.Parameters`;
681
856
  }
682
857
  get definitionIdentifier() {
683
- return `${this.shortApiName}`;
858
+ return this.shortApiName;
684
859
  }
685
860
  get definitionParamsIdentifier() {
686
861
  return `${this.definitionIdentifier}$Params`;
@@ -21526,7 +21701,7 @@ function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {
21526
21701
  throw new Error("Should not be generating types for an external type");
21527
21702
  }
21528
21703
  const uniqueLinkTargetTypes = new Set(wireObject.linkTypes.map((a) => ontology.requireObjectType(a.objectTypeApiName, false)));
21529
- const definition = deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectMetadata(object.raw, true));
21704
+ const definition = deleteUndefineds(wireObjectTypeFullMetadataToSdkObjectMetadata(object.raw, true, consola$1));
21530
21705
  const objectDefIdentifier = object.getDefinitionIdentifier(true);
21531
21706
  const objectSetIdentifier = `${object.shortApiName}.ObjectSet`;
21532
21707
  const propertyKeysIdentifier = `${object.shortApiName}.PropertyKeys`;
@@ -21535,7 +21710,7 @@ function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {
21535
21710
  const osdkObjectLinksIdentifier = `${object.shortApiName}.Links`;
21536
21711
  const osdkObjectIdentifier = `${object.shortApiName}.OsdkObject`;
21537
21712
  const identifiers = {
21538
- objectDefIdentifier: `${object.shortApiName}`,
21713
+ objectDefIdentifier: object.shortApiName,
21539
21714
  osdkObjectLinksIdentifier,
21540
21715
  osdkObjectPropsIdentifier,
21541
21716
  osdkObjectStrictPropsIdentifier,
@@ -21648,7 +21823,7 @@ ${stringify(definition.properties, {
21648
21823
  "*": (propertyDefinition, _, apiName) => {
21649
21824
  return [`readonly "${maybeStripNamespace(type2, apiName)}"${// after we convert everything over we can do this:
21650
21825
  // !strict || propertyDefinition.nullable ? "?" : ""
21651
- ""}`, (typeof propertyDefinition.type === "object" ? `${remapStructType(propertyDefinition.type)}` : `$PropType[${JSON.stringify(propertyDefinition.type)}]`) + `${propertyDefinition.multiplicity ? "[]" : ""}${propertyDefinition.nullable || !strict && !(definition.type === "object" && definition.primaryKeyApiName === apiName) ? `| undefined` : ""}`];
21826
+ ""}`, (typeof propertyDefinition.type === "object" ? remapStructType(propertyDefinition.type) : `$PropType[${JSON.stringify(propertyDefinition.type)}]`) + `${propertyDefinition.multiplicity ? "[]" : ""}${propertyDefinition.nullable || !strict && !(definition.type === "object" && definition.primaryKeyApiName === apiName) ? `| undefined` : ""}`];
21652
21827
  }
21653
21828
  })}
21654
21829
  }`;
@@ -21722,7 +21897,7 @@ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology,
21722
21897
  const parents = definition.implements?.map((p) => {
21723
21898
  const parent = ontology.requireInterfaceType(p, true);
21724
21899
  if (parent instanceof EnhancedInterfaceType) {
21725
- const it = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(parent.raw));
21900
+ const it = deleteUndefineds(__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(parent.raw, v2, consola$1));
21726
21901
  return it;
21727
21902
  }
21728
21903
  }) ?? [];
@@ -21977,7 +22152,7 @@ async function generateV2QueryFile(fs9, outDir, relOutDir, query, importExt, ont
21977
22152
  return [`
21978
22153
  ${queryParamJsDoc(wireQueryParameterV2ToQueryParameterDefinition(parameter), {
21979
22154
  apiName
21980
- })}readonly "${apiName}"${q.nullable ? "?" : ""}`, `${getQueryParamType(ontology, q, "Param")}`];
22155
+ })}readonly "${apiName}"${q.nullable ? "?" : ""}`, getQueryParamType(ontology, q, "Param")];
21981
22156
  }
21982
22157
  })}
21983
22158
  }` : ""}
@@ -22075,9 +22250,7 @@ function getQueryParamType(enhancedOntology, input, type2) {
22075
22250
  case "integer":
22076
22251
  case "long":
22077
22252
  case "string":
22078
- case "threeDimensionalAggregation":
22079
22253
  case "timestamp":
22080
- case "twoDimensionalAggregation":
22081
22254
  inner = `Query${type2}.PrimitiveType<${JSON.stringify(input.type)}>`;
22082
22255
  break;
22083
22256
  case "struct":
@@ -22085,11 +22258,18 @@ function getQueryParamType(enhancedOntology, input, type2) {
22085
22258
  ${stringify(input.struct, {
22086
22259
  "*": (p, formatter, apiName) => {
22087
22260
  return [`
22088
- ${type2 === "Param" ? "readonly " : ""}"${apiName}"${p.nullable ? "?" : ""}`, `${getQueryParamType(enhancedOntology, p, type2)}`];
22261
+ ${type2 === "Param" ? "readonly " : ""}"${apiName}"${p.nullable ? "?" : ""}`, getQueryParamType(enhancedOntology, p, type2)];
22089
22262
  }
22090
22263
  })}
22091
22264
  }`;
22092
22265
  break;
22266
+ case "twoDimensionalAggregation":
22267
+ inner = `Query${type2}.TwoDimensionalAggregationType<${input.twoDimensionalAggregation.keyType === "range" ? `Query${type2}.RangeKey<"${input.twoDimensionalAggregation.keySubtype}">` : `"${input.twoDimensionalAggregation.keyType}"`}, "${input.twoDimensionalAggregation.valueType}">`;
22268
+ break;
22269
+ case "threeDimensionalAggregation":
22270
+ inner = `Query${type2}.ThreeDimensionalAggregationType<${input.threeDimensionalAggregation.keyType === "range" ? `Query${type2}.RangeKey<"${input.threeDimensionalAggregation.keySubtype}">` : `"${input.threeDimensionalAggregation.keyType}"`},${input.threeDimensionalAggregation.valueType.keyType === "range" ? `Query${type2}.RangeKey<"${input.threeDimensionalAggregation.valueType.keySubtype}">` : `"${input.threeDimensionalAggregation.valueType.keyType}"`},
22271
+ "${input.threeDimensionalAggregation.valueType.valueType}">`;
22272
+ break;
22093
22273
  case "object":
22094
22274
  inner = `Query${type2}.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;
22095
22275
  break;
@@ -22273,176 +22453,6 @@ async function writeJson(minimalFs, filePath, body) {
22273
22453
  return void await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + "\n");
22274
22454
  }
22275
22455
 
22276
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/index.js
22277
- init_esm_shims();
22278
-
22279
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/Action.js
22280
- init_esm_shims();
22281
-
22282
- // ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.2.0/node_modules/@osdk/shared.net.platformapi/build/esm/index.js
22283
- init_esm_shims();
22284
-
22285
- // ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.2.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
22286
- init_esm_shims();
22287
-
22288
- // ../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js
22289
- init_esm_shims();
22290
- var symbolClientContext = Symbol("ClientContext");
22291
-
22292
- // ../../node_modules/.pnpm/@osdk+shared.client2@1.0.0/node_modules/@osdk/shared.client2/index.js
22293
- init_esm_shims();
22294
- var symbolClientContext2 = "__osdkClientContext";
22295
-
22296
- // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.1/node_modules/@osdk/shared.net.errors/build/esm/index.js
22297
- init_esm_shims();
22298
-
22299
- // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.1/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js
22300
- init_esm_shims();
22301
- var PalantirApiError2 = class extends Error {
22302
- message;
22303
- errorName;
22304
- errorCode;
22305
- statusCode;
22306
- errorInstanceId;
22307
- parameters;
22308
- constructor(message, errorName, errorCode, statusCode, errorInstanceId, parameters) {
22309
- super(message);
22310
- this.message = message;
22311
- this.errorName = errorName;
22312
- this.errorCode = errorCode;
22313
- this.statusCode = statusCode;
22314
- this.errorInstanceId = errorInstanceId;
22315
- this.parameters = parameters;
22316
- }
22317
- };
22318
-
22319
- // ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.1/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js
22320
- init_esm_shims();
22321
- var UnknownError = class extends PalantirApiError2 {
22322
- originalError;
22323
- constructor(message, errorType, originalError) {
22324
- super(message, errorType);
22325
- this.originalError = originalError;
22326
- }
22327
- };
22328
-
22329
- // ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.2.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
22330
- async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {
22331
- const path21 = origPath.replace(/\{([^}]+)\}/g, () => encodeURIComponent(args.shift()));
22332
- const body = flags & 1 ? args.shift() : undefined;
22333
- const queryArgs = flags & 2 ? args.shift() : undefined;
22334
- const headerArgs = flags & 4 ? args.shift() : undefined;
22335
- const method = ["GET", "POST", "PUT", "DELETE", "PATCH"][httpMethodNum];
22336
- return await apiFetch(client[symbolClientContext2] ?? client[symbolClientContext] ?? client, method, path21, body, queryArgs, headerArgs, contentType, responseContentType);
22337
- }
22338
- async function apiFetch(clientCtx, method, endpointPath, data, queryArguments, headers, requestMediaType, responseMediaType) {
22339
- const url2 = new URL(`api${endpointPath}`, clientCtx.baseUrl);
22340
- for (const [key2, value] of Object.entries(queryArguments || {})) {
22341
- if (value == null) {
22342
- continue;
22343
- }
22344
- if (Array.isArray(value)) {
22345
- for (const item of value) {
22346
- url2.searchParams.append(key2, item);
22347
- }
22348
- } else {
22349
- url2.searchParams.append(key2, value);
22350
- }
22351
- }
22352
- const headersInit = new Headers();
22353
- headersInit.set("Content-Type", requestMediaType ?? "application/json");
22354
- headersInit.set("Accept", responseMediaType ?? "application/json");
22355
- Object.entries(headers || {}).forEach(([key2, value]) => {
22356
- if (value != null) {
22357
- headersInit.append(key2, value.toString());
22358
- }
22359
- });
22360
- const body = data == null || data instanceof globalThis.Blob ? data : JSON.stringify(data);
22361
- const response = await clientCtx.fetch(url2.toString(), {
22362
- body,
22363
- method,
22364
- headers: headersInit
22365
- });
22366
- if (!response.ok) {
22367
- try {
22368
- const convertedError = await response.json();
22369
- return new PalantirApiError2(convertedError.message, convertedError.errorName, convertedError.errorCode, response.status, convertedError.errorInstanceId, convertedError.parameters);
22370
- } catch (e) {
22371
- if (e instanceof Error) {
22372
- return new UnknownError(e.message, "UNKNOWN");
22373
- }
22374
- return new UnknownError("Unable to parse error response", "UNKNOWN");
22375
- }
22376
- }
22377
- if (response.status === 204) {
22378
- return;
22379
- }
22380
- if (responseMediaType == null || responseMediaType === "application/json") {
22381
- return await response.json();
22382
- }
22383
- return response;
22384
- }
22385
-
22386
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/ActionTypeV2.js
22387
- init_esm_shims();
22388
-
22389
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/Attachment.js
22390
- init_esm_shims();
22391
-
22392
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/AttachmentPropertyV2.js
22393
- init_esm_shims();
22394
-
22395
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/LinkedObjectV2.js
22396
- init_esm_shims();
22397
-
22398
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/MediaReferenceProperty.js
22399
- init_esm_shims();
22400
-
22401
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/ObjectTypeV2.js
22402
- init_esm_shims();
22403
-
22404
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/OntologyInterface.js
22405
- init_esm_shims();
22406
-
22407
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/OntologyObjectSet.js
22408
- init_esm_shims();
22409
-
22410
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/OntologyObjectV2.js
22411
- init_esm_shims();
22412
-
22413
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/OntologyV2.js
22414
- var OntologyV2_exports = {};
22415
- __export(OntologyV2_exports, {
22416
- get: () => get,
22417
- getFullMetadata: () => getFullMetadata,
22418
- list: () => list
22419
- });
22420
- init_esm_shims();
22421
- var _list = [0, "/v2/ontologies"];
22422
- function list($ctx, ...args) {
22423
- return foundryPlatformFetch($ctx, _list, ...args);
22424
- }
22425
- var _get = [0, "/v2/ontologies/{0}"];
22426
- function get($ctx, ...args) {
22427
- return foundryPlatformFetch($ctx, _get, ...args);
22428
- }
22429
- var _getFullMetadata = [0, "/v2/ontologies/{0}/fullMetadata"];
22430
- function getFullMetadata($ctx, ...args) {
22431
- return foundryPlatformFetch($ctx, _getFullMetadata, ...args);
22432
- }
22433
-
22434
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/Query.js
22435
- init_esm_shims();
22436
-
22437
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/QueryType.js
22438
- init_esm_shims();
22439
-
22440
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/TimeSeriesPropertyV2.js
22441
- init_esm_shims();
22442
-
22443
- // ../../node_modules/.pnpm/@osdk+internal.foundry.ontologiesv2@2.10.0/node_modules/@osdk/internal.foundry.ontologiesv2/build/esm/public/TimeSeriesValueBankProperty.js
22444
- init_esm_shims();
22445
-
22446
22456
  // ../shared.client.impl/build/esm/index.js
22447
22457
  init_esm_shims();
22448
22458
 
@@ -22475,7 +22485,7 @@ function createSharedClientContext(baseUrl, tokenProvider, userAgent, fetchFn =
22475
22485
 
22476
22486
  // ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
22477
22487
  var import_fast_deep_equal2 = __toESM(require_fast_deep_equal(), 1);
22478
- var USER_AGENT = `osdk-cli.cmd.typescript/${"0.25.0-beta.30"}`;
22488
+ var USER_AGENT = `osdk-cli.cmd.typescript/${"0.25.0-beta.31"}`;
22479
22489
  async function handleGenerate(args) {
22480
22490
  let success = false;
22481
22491
  if (args.ontologyPath) {
@@ -22611,7 +22621,7 @@ async function generateClientSdk(ontology, args) {
22611
22621
  }
22612
22622
  return true;
22613
22623
  }
22614
- await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.25.0-beta.30", args.externalObjects, args.externalInterfaces);
22624
+ await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.25.0-beta.31", args.externalObjects, args.externalInterfaces);
22615
22625
  return true;
22616
22626
  } catch (e) {
22617
22627
  consola.error("OSDK generation failed", e.message, e.stack);
@@ -22638,8 +22648,8 @@ async function getDependencyVersions() {
22638
22648
  typescriptVersion,
22639
22649
  tslibVersion,
22640
22650
  areTheTypesWrongVersion,
22641
- osdkApiVersion: `^${"2.1.0-beta.30"}`,
22642
- osdkClientVersion: `^${"2.1.0-beta.30"}`,
22651
+ osdkApiVersion: `^${"2.1.0-beta.31"}`,
22652
+ osdkClientVersion: `^${"2.1.0-beta.31"}`,
22643
22653
  osdkLegacyClientVersion
22644
22654
  };
22645
22655
  }
@@ -22678,5 +22688,5 @@ function createNormalFs() {
22678
22688
  }
22679
22689
 
22680
22690
  export { getDependencyVersions, handleGenerate, updateVersionsIfTheyExist };
22681
- //# sourceMappingURL=handleGenerate-JRNKYU5I.js.map
22682
- //# sourceMappingURL=handleGenerate-JRNKYU5I.js.map
22691
+ //# sourceMappingURL=handleGenerate-G365N2VT.js.map
22692
+ //# sourceMappingURL=handleGenerate-G365N2VT.js.map