@osdk/cli 0.30.0-beta.1 → 0.30.0-beta.3
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.
- package/CHANGELOG.md +4 -0
- package/build/esm/{chunk-EEVVG764.js → chunk-5RU3G6EM.js} +3 -3
- package/build/esm/{chunk-EEVVG764.js.map → chunk-5RU3G6EM.js.map} +1 -1
- package/build/esm/{handleGenerate-62KRK76V.js → handleGenerate-I5KZ7RQ3.js} +311 -67
- package/build/esm/handleGenerate-I5KZ7RQ3.js.map +1 -0
- package/build/esm/index.js +12 -12
- package/build/esm/index.js.map +1 -1
- package/build/esm/{siteDeployCommand-FU3JL5GR.js → siteDeployCommand-PPUUOOAX.js} +3 -3
- package/build/esm/{siteDeployCommand-FU3JL5GR.js.map → siteDeployCommand-PPUUOOAX.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-UMMPJ4SC.js → versionDeleteCommand-4B56WVU2.js} +3 -3
- package/build/esm/{versionDeleteCommand-UMMPJ4SC.js.map → versionDeleteCommand-4B56WVU2.js.map} +1 -1
- package/build/esm/{versionDeleteCommand-55E6COZR.js → versionDeleteCommand-W7R2DHZP.js} +3 -3
- package/build/esm/{versionDeleteCommand-55E6COZR.js.map → versionDeleteCommand-W7R2DHZP.js.map} +1 -1
- package/build/esm/{versionGetCommand-5U6PLYZZ.js → versionGetCommand-AGZJH5L4.js} +3 -3
- package/build/esm/{versionGetCommand-5U6PLYZZ.js.map → versionGetCommand-AGZJH5L4.js.map} +1 -1
- package/build/esm/{versionInfoCommand-O5OZNI2H.js → versionInfoCommand-ERX74PKC.js} +3 -3
- package/build/esm/{versionInfoCommand-O5OZNI2H.js.map → versionInfoCommand-ERX74PKC.js.map} +1 -1
- package/build/esm/{versionListCommand-EG4ISQPS.js → versionListCommand-4MZJOJSE.js} +3 -3
- package/build/esm/{versionListCommand-EG4ISQPS.js.map → versionListCommand-4MZJOJSE.js.map} +1 -1
- package/build/esm/{versionListCommand-ZUO4VTML.js → versionListCommand-YDCBK4GE.js} +3 -3
- package/build/esm/{versionListCommand-ZUO4VTML.js.map → versionListCommand-YDCBK4GE.js.map} +1 -1
- package/build/esm/{versionSetCommand-YJFQ6OXZ.js → versionSetCommand-JUU53YYZ.js} +3 -3
- package/build/esm/{versionSetCommand-YJFQ6OXZ.js.map → versionSetCommand-JUU53YYZ.js.map} +1 -1
- package/build/esm/{versionUnsetCommand-HJFTAD55.js → versionUnsetCommand-62S46K73.js} +3 -3
- package/build/esm/{versionUnsetCommand-HJFTAD55.js.map → versionUnsetCommand-62S46K73.js.map} +1 -1
- package/build/esm/{widgetSetDeployCommand-NJTEMACP.js → widgetSetDeployCommand-RMM5S65Q.js} +3 -3
- package/build/esm/{widgetSetDeployCommand-NJTEMACP.js.map → widgetSetDeployCommand-RMM5S65Q.js.map} +1 -1
- package/package.json +6 -6
- package/build/esm/handleGenerate-62KRK76V.js.map +0 -1
|
@@ -54,16 +54,16 @@ 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.
|
|
57
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/index.js
|
|
58
58
|
init_esm_shims();
|
|
59
59
|
|
|
60
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
60
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
61
61
|
init_esm_shims();
|
|
62
62
|
|
|
63
|
-
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.
|
|
63
|
+
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/index.js
|
|
64
64
|
init_esm_shims();
|
|
65
65
|
|
|
66
|
-
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.
|
|
66
|
+
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
|
|
67
67
|
init_esm_shims();
|
|
68
68
|
|
|
69
69
|
// ../../node_modules/.pnpm/@osdk+shared.client@1.0.1/node_modules/@osdk/shared.client/index.js
|
|
@@ -74,40 +74,34 @@ var symbolClientContext = Symbol("ClientContext");
|
|
|
74
74
|
init_esm_shims();
|
|
75
75
|
var symbolClientContext2 = "__osdkClientContext";
|
|
76
76
|
|
|
77
|
-
// ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.
|
|
77
|
+
// ../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/index.js
|
|
78
78
|
init_esm_shims();
|
|
79
79
|
|
|
80
|
-
// ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.
|
|
80
|
+
// ../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/PalantirApiError.js
|
|
81
81
|
init_esm_shims();
|
|
82
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) {
|
|
83
|
+
constructor(message, errorName, errorCode, errorDescription, statusCode, errorInstanceId, parameters) {
|
|
90
84
|
super(message);
|
|
91
85
|
this.message = message;
|
|
92
86
|
this.errorName = errorName;
|
|
93
87
|
this.errorCode = errorCode;
|
|
88
|
+
this.errorDescription = errorDescription;
|
|
94
89
|
this.statusCode = statusCode;
|
|
95
90
|
this.errorInstanceId = errorInstanceId;
|
|
96
91
|
this.parameters = parameters;
|
|
97
92
|
}
|
|
98
93
|
};
|
|
99
94
|
|
|
100
|
-
// ../../node_modules/.pnpm/@osdk+shared.net.errors@2.0.
|
|
95
|
+
// ../../node_modules/.pnpm/@osdk+shared.net.errors@2.5.0-beta.2/node_modules/@osdk/shared.net.errors/build/esm/UnknownError.js
|
|
101
96
|
init_esm_shims();
|
|
102
97
|
var UnknownError = class extends PalantirApiError2 {
|
|
103
|
-
originalError
|
|
104
|
-
|
|
105
|
-
super(message, errorType);
|
|
98
|
+
constructor(message, errorName, originalError, statusCode) {
|
|
99
|
+
super(message, errorName, void 0, void 0, statusCode);
|
|
106
100
|
this.originalError = originalError;
|
|
107
101
|
}
|
|
108
102
|
};
|
|
109
103
|
|
|
110
|
-
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.
|
|
104
|
+
// ../../node_modules/.pnpm/@osdk+shared.net.platformapi@1.5.0/node_modules/@osdk/shared.net.platformapi/build/esm/foundryPlatformFetch.js
|
|
111
105
|
async function foundryPlatformFetch(client, [httpMethodNum, origPath, flags, contentType, responseContentType], ...args) {
|
|
112
106
|
const path23 = origPath.replace(/\{([^}]+)\}/g, () => encodeURIComponent(args.shift()));
|
|
113
107
|
const body = flags & 1 ? args.shift() : void 0;
|
|
@@ -151,7 +145,7 @@ async function apiFetch(clientCtx, method, endpointPath, data, queryArguments, h
|
|
|
151
145
|
if (!response.ok) {
|
|
152
146
|
try {
|
|
153
147
|
const convertedError = await response.json();
|
|
154
|
-
return new PalantirApiError2(convertedError.message, convertedError.errorName, convertedError.errorCode, response.status, convertedError.errorInstanceId, convertedError.parameters);
|
|
148
|
+
return new PalantirApiError2(convertedError.message, convertedError.errorName, convertedError.errorCode, convertedError.errorDescription, response.status, convertedError.errorInstanceId, convertedError.parameters);
|
|
155
149
|
} catch (e) {
|
|
156
150
|
if (e instanceof Error) {
|
|
157
151
|
return new UnknownError(e.message, "UNKNOWN");
|
|
@@ -172,40 +166,43 @@ function parseUrl(baseUrl, endpointPath) {
|
|
|
172
166
|
return new URL(`api${endpointPath}`, baseUrl);
|
|
173
167
|
}
|
|
174
168
|
|
|
175
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
169
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeFullMetadata.js
|
|
176
170
|
init_esm_shims();
|
|
177
171
|
|
|
178
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
172
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
|
|
179
173
|
init_esm_shims();
|
|
180
174
|
|
|
181
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
175
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
|
|
182
176
|
init_esm_shims();
|
|
183
177
|
|
|
184
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
178
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/AttachmentPropertyV2.js
|
|
185
179
|
init_esm_shims();
|
|
186
180
|
|
|
187
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
181
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/CipherTextProperty.js
|
|
188
182
|
init_esm_shims();
|
|
189
183
|
|
|
190
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
184
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/LinkedObjectV2.js
|
|
191
185
|
init_esm_shims();
|
|
192
186
|
|
|
193
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
187
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
|
|
194
188
|
init_esm_shims();
|
|
195
189
|
|
|
196
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
190
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
|
|
197
191
|
init_esm_shims();
|
|
198
192
|
|
|
199
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
193
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
|
|
200
194
|
init_esm_shims();
|
|
201
195
|
|
|
202
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
196
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
|
|
203
197
|
init_esm_shims();
|
|
204
198
|
|
|
205
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
199
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectV2.js
|
|
206
200
|
init_esm_shims();
|
|
207
201
|
|
|
208
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
202
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyTransaction.js
|
|
203
|
+
init_esm_shims();
|
|
204
|
+
|
|
205
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyV2.js
|
|
209
206
|
var OntologyV2_exports = {};
|
|
210
207
|
__export(OntologyV2_exports, {
|
|
211
208
|
get: () => get,
|
|
@@ -231,19 +228,19 @@ function loadMetadata($ctx, ...args) {
|
|
|
231
228
|
return foundryPlatformFetch($ctx, _loadMetadata, ...args);
|
|
232
229
|
}
|
|
233
230
|
|
|
234
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
231
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyValueType.js
|
|
235
232
|
init_esm_shims();
|
|
236
233
|
|
|
237
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
234
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js
|
|
238
235
|
init_esm_shims();
|
|
239
236
|
|
|
240
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
237
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
|
|
241
238
|
init_esm_shims();
|
|
242
239
|
|
|
243
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
240
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
|
|
244
241
|
init_esm_shims();
|
|
245
242
|
|
|
246
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
243
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.38.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
|
|
247
244
|
init_esm_shims();
|
|
248
245
|
|
|
249
246
|
// ../generator/build/esm/index.js
|
|
@@ -343,6 +340,251 @@ init_esm_shims();
|
|
|
343
340
|
|
|
344
341
|
// ../generator-converters/build/esm/wirePropertyV2ToSdkPropertyDefinition.js
|
|
345
342
|
init_esm_shims();
|
|
343
|
+
|
|
344
|
+
// ../generator-converters/build/esm/wirePropertyFormattingToSdkFormatting.js
|
|
345
|
+
init_esm_shims();
|
|
346
|
+
|
|
347
|
+
// ../generator-converters/build/esm/valueFormatting/convertBooleanValueFormattingRule.js
|
|
348
|
+
init_esm_shims();
|
|
349
|
+
function convertBooleanFormattingRule(wireFormatting) {
|
|
350
|
+
return {
|
|
351
|
+
type: "boolean",
|
|
352
|
+
valueIfTrue: wireFormatting.valueIfTrue,
|
|
353
|
+
valueIfFalse: wireFormatting.valueIfFalse
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// ../generator-converters/build/esm/valueFormatting/convertDateAndTimestampValueFormattingRule.js
|
|
358
|
+
init_esm_shims();
|
|
359
|
+
|
|
360
|
+
// ../generator-converters/build/esm/valueFormatting/commonValueFormattingUtils.js
|
|
361
|
+
init_esm_shims();
|
|
362
|
+
function convertPropertyTypeReferenceOrStringConstant(value) {
|
|
363
|
+
switch (value.type) {
|
|
364
|
+
case "constant":
|
|
365
|
+
return {
|
|
366
|
+
type: "constant",
|
|
367
|
+
value: value.value
|
|
368
|
+
};
|
|
369
|
+
case "propertyType":
|
|
370
|
+
return {
|
|
371
|
+
type: "propertyType",
|
|
372
|
+
propertyApiName: value.propertyApiName
|
|
373
|
+
};
|
|
374
|
+
default:
|
|
375
|
+
throw new Error(`Unknown property reference type: ${value.type}`);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// ../generator-converters/build/esm/valueFormatting/convertDateAndTimestampValueFormattingRule.js
|
|
380
|
+
function convertDateFormattingRule(wireFormatting) {
|
|
381
|
+
return {
|
|
382
|
+
type: "date",
|
|
383
|
+
format: convertDatetimeFormat(wireFormatting.format)
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
function convertTimestampFormattingRule(wireFormatting) {
|
|
387
|
+
return {
|
|
388
|
+
type: "timestamp",
|
|
389
|
+
format: convertDatetimeFormat(wireFormatting.format),
|
|
390
|
+
displayTimezone: convertDatetimeTimezone(wireFormatting.displayTimezone)
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
function convertDatetimeFormat(wireFormat) {
|
|
394
|
+
switch (wireFormat.type) {
|
|
395
|
+
case "stringFormat":
|
|
396
|
+
return {
|
|
397
|
+
type: "stringFormat",
|
|
398
|
+
pattern: wireFormat.pattern
|
|
399
|
+
};
|
|
400
|
+
case "localizedFormat":
|
|
401
|
+
return {
|
|
402
|
+
type: "localizedFormat",
|
|
403
|
+
format: wireFormat.format
|
|
404
|
+
};
|
|
405
|
+
default:
|
|
406
|
+
throw new Error(`Unknown datetime format type: ${wireFormat.type}`);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
function convertDatetimeTimezone(wireTimezone) {
|
|
410
|
+
switch (wireTimezone.type) {
|
|
411
|
+
case "static":
|
|
412
|
+
return {
|
|
413
|
+
type: "static",
|
|
414
|
+
zoneId: convertPropertyTypeReferenceOrStringConstant(wireTimezone.zoneId)
|
|
415
|
+
};
|
|
416
|
+
case "user":
|
|
417
|
+
return {
|
|
418
|
+
type: "user"
|
|
419
|
+
};
|
|
420
|
+
default:
|
|
421
|
+
throw new Error(`Unknown timezone type: ${wireTimezone.type}`);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// ../generator-converters/build/esm/valueFormatting/convertKnownTypeValueFormattingRule.js
|
|
426
|
+
init_esm_shims();
|
|
427
|
+
function convertKnownTypeFormattingRule(wireFormatting) {
|
|
428
|
+
switch (wireFormatting.knownType) {
|
|
429
|
+
case "ARTIFACT_GID":
|
|
430
|
+
return {
|
|
431
|
+
type: "knownType",
|
|
432
|
+
knownType: "ARTIFACT_GID"
|
|
433
|
+
};
|
|
434
|
+
case "RESOURCE_RID":
|
|
435
|
+
return {
|
|
436
|
+
type: "knownType",
|
|
437
|
+
knownType: "RESOURCE_RID"
|
|
438
|
+
};
|
|
439
|
+
case "USER_OR_GROUP_ID":
|
|
440
|
+
return {
|
|
441
|
+
type: "knownType",
|
|
442
|
+
knownType: "USER_OR_GROUP_ID"
|
|
443
|
+
};
|
|
444
|
+
default:
|
|
445
|
+
wireFormatting.knownType;
|
|
446
|
+
return void 0;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// ../generator-converters/build/esm/valueFormatting/convertNumberValueFormattingRule.js
|
|
451
|
+
init_esm_shims();
|
|
452
|
+
function convertNumberFormattingRule(wireFormatting) {
|
|
453
|
+
const numberType = convertNumberFormattingType(wireFormatting.numberType);
|
|
454
|
+
if (!numberType) {
|
|
455
|
+
return void 0;
|
|
456
|
+
}
|
|
457
|
+
return {
|
|
458
|
+
type: "number",
|
|
459
|
+
numberType
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
function convertNumberFormatOptions(wireOptions) {
|
|
463
|
+
return {
|
|
464
|
+
useGrouping: wireOptions.useGrouping,
|
|
465
|
+
convertNegativeToParenthesis: wireOptions.convertNegativeToParenthesis,
|
|
466
|
+
minimumIntegerDigits: wireOptions.minimumIntegerDigits,
|
|
467
|
+
minimumFractionDigits: wireOptions.minimumFractionDigits,
|
|
468
|
+
maximumFractionDigits: wireOptions.maximumFractionDigits,
|
|
469
|
+
minimumSignificantDigits: wireOptions.minimumSignificantDigits,
|
|
470
|
+
maximumSignificantDigits: wireOptions.maximumSignificantDigits,
|
|
471
|
+
notation: wireOptions.notation,
|
|
472
|
+
roundingMode: wireOptions.roundingMode
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
function convertDurationFormatStyle(formatStyle) {
|
|
476
|
+
switch (formatStyle.type) {
|
|
477
|
+
case "humanReadable":
|
|
478
|
+
return {
|
|
479
|
+
type: "humanReadable",
|
|
480
|
+
showFullUnits: formatStyle.showFullUnits
|
|
481
|
+
};
|
|
482
|
+
case "timecode":
|
|
483
|
+
return {
|
|
484
|
+
type: "timecode"
|
|
485
|
+
};
|
|
486
|
+
default:
|
|
487
|
+
throw new Error(`Unknown duration format style: ${formatStyle.type}`);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
function convertNumberFormattingType(wireNumberType) {
|
|
491
|
+
switch (wireNumberType.type) {
|
|
492
|
+
case "standard":
|
|
493
|
+
return {
|
|
494
|
+
type: "standard",
|
|
495
|
+
baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)
|
|
496
|
+
};
|
|
497
|
+
case "fixedValues":
|
|
498
|
+
return {
|
|
499
|
+
type: "fixedValues",
|
|
500
|
+
values: wireNumberType.values
|
|
501
|
+
};
|
|
502
|
+
case "currency": {
|
|
503
|
+
return {
|
|
504
|
+
type: "currency",
|
|
505
|
+
baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),
|
|
506
|
+
style: wireNumberType.style,
|
|
507
|
+
currencyCode: convertPropertyTypeReferenceOrStringConstant(wireNumberType.currencyCode)
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
case "standardUnit": {
|
|
511
|
+
return {
|
|
512
|
+
type: "standardUnit",
|
|
513
|
+
baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),
|
|
514
|
+
unit: convertPropertyTypeReferenceOrStringConstant(wireNumberType.unit)
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
case "customUnit": {
|
|
518
|
+
return {
|
|
519
|
+
type: "customUnit",
|
|
520
|
+
baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),
|
|
521
|
+
unit: convertPropertyTypeReferenceOrStringConstant(wireNumberType.unit)
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
case "affix": {
|
|
525
|
+
return {
|
|
526
|
+
type: "affix",
|
|
527
|
+
baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions),
|
|
528
|
+
affix: {
|
|
529
|
+
prefix: wireNumberType.affix?.prefix != null ? convertPropertyTypeReferenceOrStringConstant(wireNumberType.affix.prefix) : void 0,
|
|
530
|
+
postfix: wireNumberType.affix?.postfix != null ? convertPropertyTypeReferenceOrStringConstant(wireNumberType.affix.postfix) : void 0
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
case "duration": {
|
|
535
|
+
return {
|
|
536
|
+
type: "duration",
|
|
537
|
+
formatStyle: convertDurationFormatStyle(wireNumberType.formatStyle),
|
|
538
|
+
precision: wireNumberType.precision,
|
|
539
|
+
baseValue: wireNumberType.baseValue
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
case "scale": {
|
|
543
|
+
return {
|
|
544
|
+
type: "scale",
|
|
545
|
+
scaleType: wireNumberType.scaleType,
|
|
546
|
+
baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
case "ratio": {
|
|
550
|
+
return {
|
|
551
|
+
type: "ratio",
|
|
552
|
+
ratioType: wireNumberType.ratioType,
|
|
553
|
+
baseFormatOptions: convertNumberFormatOptions(wireNumberType.baseFormatOptions)
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
default:
|
|
557
|
+
throw new Error(`Unknown number format type: ${wireNumberType.type}`);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// ../generator-converters/build/esm/wirePropertyFormattingToSdkFormatting.js
|
|
562
|
+
function wirePropertyFormattingToSdkFormatting(wireFormatting, log) {
|
|
563
|
+
try {
|
|
564
|
+
return convertPropertyFormattingInternal(wireFormatting);
|
|
565
|
+
} catch (error) {
|
|
566
|
+
log?.info(`Failed to convert property formatting rule: ${error}`);
|
|
567
|
+
return void 0;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
function convertPropertyFormattingInternal(wireFormatting) {
|
|
571
|
+
switch (wireFormatting.type) {
|
|
572
|
+
case "date":
|
|
573
|
+
return convertDateFormattingRule(wireFormatting);
|
|
574
|
+
case "timestamp":
|
|
575
|
+
return convertTimestampFormattingRule(wireFormatting);
|
|
576
|
+
case "boolean":
|
|
577
|
+
return convertBooleanFormattingRule(wireFormatting);
|
|
578
|
+
case "knownType":
|
|
579
|
+
return convertKnownTypeFormattingRule(wireFormatting);
|
|
580
|
+
case "number":
|
|
581
|
+
return convertNumberFormattingRule(wireFormatting);
|
|
582
|
+
default:
|
|
583
|
+
throw new Error(`Unknown formatting type: ${wireFormatting.type}`);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// ../generator-converters/build/esm/wirePropertyV2ToSdkPropertyDefinition.js
|
|
346
588
|
function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true, log) {
|
|
347
589
|
const sdkPropDefinition = objectPropertyTypeToSdkPropertyDefinition(input.dataType, log);
|
|
348
590
|
if (sdkPropDefinition == null) {
|
|
@@ -375,7 +617,8 @@ function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true, log) {
|
|
|
375
617
|
description: input.description,
|
|
376
618
|
type: sdkPropDefinition,
|
|
377
619
|
nullable: input.nullable == null ? isNullable : input.nullable,
|
|
378
|
-
valueTypeApiName: input.valueTypeApiName
|
|
620
|
+
valueTypeApiName: input.valueTypeApiName,
|
|
621
|
+
valueFormatting: input.valueFormatting != null ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log) : void 0
|
|
379
622
|
};
|
|
380
623
|
case "array": {
|
|
381
624
|
return {
|
|
@@ -384,7 +627,8 @@ function wirePropertyV2ToSdkPropertyDefinition(input, isNullable = true, log) {
|
|
|
384
627
|
description: input.description,
|
|
385
628
|
type: sdkPropDefinition,
|
|
386
629
|
nullable: true,
|
|
387
|
-
valueTypeApiName: input.valueTypeApiName
|
|
630
|
+
valueTypeApiName: input.valueTypeApiName,
|
|
631
|
+
valueFormatting: input.valueFormatting != null ? wirePropertyFormattingToSdkFormatting(input.valueFormatting, log) : void 0
|
|
388
632
|
};
|
|
389
633
|
}
|
|
390
634
|
case "cipherText": {
|
|
@@ -719,7 +963,9 @@ function wireQueryDataTypeToQueryDataTypeDefinition(input) {
|
|
|
719
963
|
};
|
|
720
964
|
case "array":
|
|
721
965
|
return {
|
|
722
|
-
|
|
966
|
+
array: wireQueryDataTypeToQueryDataTypeDefinition(input.subType),
|
|
967
|
+
type: "array",
|
|
968
|
+
nullable: isNullableQueryDataType(input.subType),
|
|
723
969
|
multiplicity: true
|
|
724
970
|
};
|
|
725
971
|
case "set":
|
|
@@ -773,7 +1019,7 @@ function wireQueryDataTypeToQueryDataTypeDefinition(input) {
|
|
|
773
1019
|
if (!validMapKeyTypes.includes(keyType.type)) {
|
|
774
1020
|
throw new Error("Map types with a key type of " + keyType.type + " are not supported" + validMapKeyTypes.toString());
|
|
775
1021
|
}
|
|
776
|
-
if (keyType.
|
|
1022
|
+
if (keyType.type === "array") {
|
|
777
1023
|
throw new Error("Map types cannot have keys as arrays");
|
|
778
1024
|
}
|
|
779
1025
|
return {
|
|
@@ -17458,7 +17704,7 @@ function formatTs(contents) {
|
|
|
17458
17704
|
}
|
|
17459
17705
|
|
|
17460
17706
|
// ../generator/build/esm/v2.0/generateMetadata.js
|
|
17461
|
-
var ExpectedOsdkVersion = "2.
|
|
17707
|
+
var ExpectedOsdkVersion = "2.6.0";
|
|
17462
17708
|
async function generateOntologyMetadataFile({
|
|
17463
17709
|
fs: fs6,
|
|
17464
17710
|
outDir,
|
|
@@ -18531,10 +18777,13 @@ function queryParamJsDoc(param, {
|
|
|
18531
18777
|
return ret;
|
|
18532
18778
|
}
|
|
18533
18779
|
function getQueryParamType(enhancedOntology, input, type, isMapKey = false) {
|
|
18534
|
-
let
|
|
18780
|
+
let paramType = `unknown /* ${input.type} */`;
|
|
18535
18781
|
switch (input.type) {
|
|
18782
|
+
case "array":
|
|
18783
|
+
paramType = `${type === "Param" ? "Readonly" : ""}Array<${getQueryParamType(enhancedOntology, input.array, type)}>`;
|
|
18784
|
+
break;
|
|
18536
18785
|
case "date":
|
|
18537
|
-
|
|
18786
|
+
paramType = `Query${type}.PrimitiveType<${JSON.stringify("datetime")}>`;
|
|
18538
18787
|
break;
|
|
18539
18788
|
case "attachment":
|
|
18540
18789
|
case "boolean":
|
|
@@ -18544,10 +18793,10 @@ function getQueryParamType(enhancedOntology, input, type, isMapKey = false) {
|
|
|
18544
18793
|
case "long":
|
|
18545
18794
|
case "string":
|
|
18546
18795
|
case "timestamp":
|
|
18547
|
-
|
|
18796
|
+
paramType = `Query${type}.PrimitiveType<${JSON.stringify(input.type)}>`;
|
|
18548
18797
|
break;
|
|
18549
18798
|
case "struct":
|
|
18550
|
-
|
|
18799
|
+
paramType = `{
|
|
18551
18800
|
${stringify(input.struct, {
|
|
18552
18801
|
"*": (p, formatter, apiName) => {
|
|
18553
18802
|
return [`
|
|
@@ -18557,43 +18806,38 @@ function getQueryParamType(enhancedOntology, input, type, isMapKey = false) {
|
|
|
18557
18806
|
}`;
|
|
18558
18807
|
break;
|
|
18559
18808
|
case "twoDimensionalAggregation":
|
|
18560
|
-
|
|
18809
|
+
paramType = `Query${type}.TwoDimensionalAggregationType<${input.twoDimensionalAggregation.keyType === "range" ? `Query${type}.RangeKey<"${input.twoDimensionalAggregation.keySubtype}">` : `"${input.twoDimensionalAggregation.keyType}"`}, "${input.twoDimensionalAggregation.valueType}">`;
|
|
18561
18810
|
break;
|
|
18562
18811
|
case "threeDimensionalAggregation":
|
|
18563
|
-
|
|
18812
|
+
paramType = `Query${type}.ThreeDimensionalAggregationType<${input.threeDimensionalAggregation.keyType === "range" ? `Query${type}.RangeKey<"${input.threeDimensionalAggregation.keySubtype}">` : `"${input.threeDimensionalAggregation.keyType}"`},${input.threeDimensionalAggregation.valueType.keyType === "range" ? `Query${type}.RangeKey<"${input.threeDimensionalAggregation.valueType.keySubtype}">` : `"${input.threeDimensionalAggregation.valueType.keyType}"`},
|
|
18564
18813
|
"${input.threeDimensionalAggregation.valueType.valueType}">`;
|
|
18565
18814
|
break;
|
|
18566
18815
|
case "object":
|
|
18567
18816
|
if (isMapKey) {
|
|
18568
|
-
|
|
18817
|
+
paramType = `ObjectSpecifier<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;
|
|
18569
18818
|
break;
|
|
18570
18819
|
}
|
|
18571
|
-
|
|
18820
|
+
paramType = `Query${type}.ObjectType<${enhancedOntology.requireObjectType(input.object).getImportedDefinitionIdentifier(true)}>`;
|
|
18572
18821
|
break;
|
|
18573
18822
|
case "interface":
|
|
18574
|
-
|
|
18823
|
+
paramType = `Query${type}.InterfaceType<${enhancedOntology.requireInterfaceType(input.interface).getImportedDefinitionIdentifier(true)}>`;
|
|
18575
18824
|
break;
|
|
18576
18825
|
case "objectSet":
|
|
18577
|
-
|
|
18826
|
+
paramType = `Query${type}.ObjectSetType<${enhancedOntology.requireObjectType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;
|
|
18578
18827
|
break;
|
|
18579
18828
|
case "interfaceObjectSet":
|
|
18580
|
-
|
|
18829
|
+
paramType = `Query${type}.ObjectSetType<${enhancedOntology.requireInterfaceType(input.objectSet).getImportedDefinitionIdentifier(true)}>`;
|
|
18581
18830
|
break;
|
|
18582
18831
|
case "set":
|
|
18583
|
-
|
|
18832
|
+
paramType = `${type === "Param" ? "Readonly" : ""}Set<${getQueryParamType(enhancedOntology, input.set, type)}>`;
|
|
18584
18833
|
break;
|
|
18585
18834
|
case "union":
|
|
18586
|
-
|
|
18835
|
+
paramType = input.union.map((u) => getQueryParamType(enhancedOntology, u, type)).join(" | ");
|
|
18587
18836
|
break;
|
|
18588
18837
|
case "map":
|
|
18589
|
-
|
|
18590
|
-
}
|
|
18591
|
-
if (input.multiplicity && type === "Param") {
|
|
18592
|
-
return `ReadonlyArray<${inner}>`;
|
|
18593
|
-
} else if (input.multiplicity) {
|
|
18594
|
-
return `Array<${inner}>`;
|
|
18838
|
+
paramType = `Partial<Record<${getQueryParamType(enhancedOntology, input.keyType, type, true)}, ${getQueryParamType(enhancedOntology, input.valueType, type)}>>`;
|
|
18595
18839
|
}
|
|
18596
|
-
return
|
|
18840
|
+
return paramType;
|
|
18597
18841
|
}
|
|
18598
18842
|
|
|
18599
18843
|
// ../generator/build/esm/v2.0/generateRootIndexTsFile.js
|
|
@@ -18791,7 +19035,7 @@ function createSharedClientContext(baseUrl, tokenProvider, userAgent, fetchFn =
|
|
|
18791
19035
|
|
|
18792
19036
|
// ../cli.cmd.typescript/build/esm/generate/handleGenerate.mjs
|
|
18793
19037
|
var import_fast_deep_equal2 = __toESM(require_fast_deep_equal(), 1);
|
|
18794
|
-
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.30.0-beta.
|
|
19038
|
+
var USER_AGENT = `osdk-cli.cmd.typescript/${"0.30.0-beta.3"}`;
|
|
18795
19039
|
async function handleGenerate(args) {
|
|
18796
19040
|
let success = false;
|
|
18797
19041
|
if (args.ontologyPath) {
|
|
@@ -18931,7 +19175,7 @@ async function generateClientSdk(ontology, args) {
|
|
|
18931
19175
|
}
|
|
18932
19176
|
return true;
|
|
18933
19177
|
}
|
|
18934
|
-
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.30.0-beta.
|
|
19178
|
+
await generateClientSdkPackage(args.packageName, args.version, args.beta ? "2.0" : "1.1", args.outDir, ontology, minimalFs, await getDependencyVersions(), "0.30.0-beta.3", args.externalObjects, args.externalInterfaces);
|
|
18935
19179
|
return true;
|
|
18936
19180
|
} catch (e) {
|
|
18937
19181
|
consola.error("OSDK generation failed", e.message, e.stack);
|
|
@@ -18958,8 +19202,8 @@ async function getDependencyVersions() {
|
|
|
18958
19202
|
typescriptVersion,
|
|
18959
19203
|
tslibVersion,
|
|
18960
19204
|
areTheTypesWrongVersion,
|
|
18961
|
-
osdkApiVersion: `^${"2.6.0-beta.
|
|
18962
|
-
osdkClientVersion: `^${"2.6.0-beta.
|
|
19205
|
+
osdkApiVersion: `^${"2.6.0-beta.8"}`,
|
|
19206
|
+
osdkClientVersion: `^${"2.6.0-beta.8"}`,
|
|
18963
19207
|
osdkLegacyClientVersion
|
|
18964
19208
|
};
|
|
18965
19209
|
}
|
|
@@ -18998,5 +19242,5 @@ function createNormalFs() {
|
|
|
18998
19242
|
}
|
|
18999
19243
|
|
|
19000
19244
|
export { getDependencyVersions, handleGenerate, updateVersionsIfTheyExist };
|
|
19001
|
-
//# sourceMappingURL=handleGenerate-
|
|
19002
|
-
//# sourceMappingURL=handleGenerate-
|
|
19245
|
+
//# sourceMappingURL=handleGenerate-I5KZ7RQ3.js.map
|
|
19246
|
+
//# sourceMappingURL=handleGenerate-I5KZ7RQ3.js.map
|