@osdk/client 2.6.0-beta.7 → 2.6.0-beta.8
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 +15 -0
- package/build/browser/index.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js +13 -15
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js +62 -0
- package/build/browser/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
- package/build/browser/object/mediaUpload.js +1 -1
- package/build/browser/object/mediaUpload.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/toDataValue.js +3 -2
- package/build/browser/util/toDataValue.js.map +1 -1
- package/build/browser/util/toDataValue.test.js +1 -1
- package/build/browser/util/toDataValue.test.js.map +1 -1
- package/build/cjs/{chunk-3LMKH6RS.cjs → chunk-HJV24UL2.cjs} +25 -35
- package/build/cjs/chunk-HJV24UL2.cjs.map +1 -0
- package/build/cjs/{chunk-4ZOXOCQX.cjs → chunk-PCNVSZXT.cjs} +133 -67
- package/build/cjs/chunk-PCNVSZXT.cjs.map +1 -0
- package/build/cjs/index.cjs +8 -8
- package/build/cjs/index.d.cts +1 -1
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +32 -32
- package/build/esm/index.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js +13 -15
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js +62 -0
- package/build/esm/internal/conversions/modernToLegacyWhereClause.test.js.map +1 -1
- package/build/esm/object/mediaUpload.js +1 -1
- package/build/esm/object/mediaUpload.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/toDataValue.js +3 -2
- package/build/esm/util/toDataValue.js.map +1 -1
- package/build/esm/util/toDataValue.test.js +1 -1
- package/build/esm/util/toDataValue.test.js.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/package.json +10 -9
- package/build/cjs/chunk-3LMKH6RS.cjs.map +0 -1
- package/build/cjs/chunk-4ZOXOCQX.cjs.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHJV24UL2_cjs = require('./chunk-HJV24UL2.cjs');
|
|
4
|
+
var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
|
|
4
5
|
var unstable = require('@osdk/api/unstable');
|
|
5
6
|
var client_unstable = require('@osdk/client.unstable');
|
|
6
7
|
var invariant = require('tiny-invariant');
|
|
@@ -391,12 +392,77 @@ function getPrimaryKeyOrThrow(ref) {
|
|
|
391
392
|
};
|
|
392
393
|
}
|
|
393
394
|
|
|
395
|
+
// ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.38.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js
|
|
396
|
+
var MediaSet_exports = {};
|
|
397
|
+
chunkQ7SFCCGT_cjs.__export(MediaSet_exports, {
|
|
398
|
+
abort: () => abort,
|
|
399
|
+
calculate: () => calculate,
|
|
400
|
+
commit: () => commit,
|
|
401
|
+
create: () => create,
|
|
402
|
+
getRidByPath: () => getRidByPath,
|
|
403
|
+
info: () => info,
|
|
404
|
+
read: () => read,
|
|
405
|
+
readOriginal: () => readOriginal,
|
|
406
|
+
reference: () => reference,
|
|
407
|
+
retrieve: () => retrieve,
|
|
408
|
+
upload: () => upload,
|
|
409
|
+
uploadMedia: () => uploadMedia
|
|
410
|
+
});
|
|
411
|
+
var _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort", 2];
|
|
412
|
+
function abort($ctx, ...args) {
|
|
413
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _abort, ...args);
|
|
414
|
+
}
|
|
415
|
+
var _calculate = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate", 6];
|
|
416
|
+
function calculate($ctx, ...args) {
|
|
417
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
|
|
418
|
+
}
|
|
419
|
+
var _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit", 2];
|
|
420
|
+
function commit($ctx, ...args) {
|
|
421
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _commit, ...args);
|
|
422
|
+
}
|
|
423
|
+
var _create = [1, "/v2/mediasets/{0}/transactions", 2];
|
|
424
|
+
function create($ctx, ...args) {
|
|
425
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _create, ...args);
|
|
426
|
+
}
|
|
427
|
+
var _info = [0, "/v2/mediasets/{0}/items/{1}", 6];
|
|
428
|
+
function info($ctx, ...args) {
|
|
429
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _info, ...args);
|
|
430
|
+
}
|
|
431
|
+
var _reference = [0, "/v2/mediasets/{0}/items/{1}/reference", 6];
|
|
432
|
+
function reference($ctx, ...args) {
|
|
433
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _reference, ...args);
|
|
434
|
+
}
|
|
435
|
+
var _getRidByPath = [0, "/v2/mediasets/{0}/items/getRidByPath", 2];
|
|
436
|
+
function getRidByPath($ctx, ...args) {
|
|
437
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
|
|
438
|
+
}
|
|
439
|
+
var _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
|
|
440
|
+
function upload($ctx, ...args) {
|
|
441
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _upload, ...args);
|
|
442
|
+
}
|
|
443
|
+
var _read = [0, "/v2/mediasets/{0}/items/{1}/content", 6, , "*/*"];
|
|
444
|
+
function read($ctx, ...args) {
|
|
445
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _read, ...args);
|
|
446
|
+
}
|
|
447
|
+
var _readOriginal = [0, "/v2/mediasets/{0}/items/{1}/original", 6, , "*/*"];
|
|
448
|
+
function readOriginal($ctx, ...args) {
|
|
449
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
|
|
450
|
+
}
|
|
451
|
+
var _retrieve = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve", 6, , "*/*"];
|
|
452
|
+
function retrieve($ctx, ...args) {
|
|
453
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
|
|
454
|
+
}
|
|
455
|
+
var _uploadMedia = [2, "/v2/mediasets/media/upload", 7, "*/*"];
|
|
456
|
+
function uploadMedia($ctx, ...args) {
|
|
457
|
+
return chunkHJV24UL2_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
|
|
458
|
+
}
|
|
459
|
+
|
|
394
460
|
// src/object/mediaUpload.ts
|
|
395
461
|
function isMediaReference(o) {
|
|
396
462
|
return typeof o === `object` && typeof o.mimeType === "string" && "reference" in o && typeof o.reference === "object" && o.reference.type === "mediaSetViewItem" && "mediaSetViewItem" in o.reference && typeof o.reference.mediaSetViewItem === "object" && typeof o.reference.mediaSetViewItem.mediaSetRid === "string" && typeof o.reference.mediaSetViewItem.mediaSetViewRid === "string" && typeof o.reference.mediaSetViewItem.mediaItemRid === "string";
|
|
397
463
|
}
|
|
398
464
|
function isMediaUpload(o) {
|
|
399
|
-
return typeof o === "object" && "
|
|
465
|
+
return typeof o === "object" && "fileName" in o && typeof o.fileName === "string" && "data" in o && typeof o.data === "object" && o.data instanceof Blob;
|
|
400
466
|
}
|
|
401
467
|
|
|
402
468
|
// src/util/interfaceUtils.ts
|
|
@@ -438,46 +504,46 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
438
504
|
if (values.some((dataValue) => isAttachmentUpload(dataValue) || isAttachmentFile(dataValue))) {
|
|
439
505
|
const converted = [];
|
|
440
506
|
for (const value2 of values) {
|
|
441
|
-
converted.push(await toDataValue(value2, client
|
|
507
|
+
converted.push(await toDataValue(value2, client));
|
|
442
508
|
}
|
|
443
509
|
return converted;
|
|
444
510
|
}
|
|
445
|
-
const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client
|
|
511
|
+
const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client));
|
|
446
512
|
return Promise.all(promiseArray);
|
|
447
513
|
}
|
|
448
514
|
if (isAttachmentUpload(value)) {
|
|
449
|
-
const attachment = await
|
|
515
|
+
const attachment = await chunkHJV24UL2_cjs.Attachment_exports.upload(client, value.data, {
|
|
450
516
|
filename: value.name
|
|
451
517
|
});
|
|
452
|
-
return await toDataValue(attachment.rid, client
|
|
518
|
+
return await toDataValue(attachment.rid, client);
|
|
453
519
|
}
|
|
454
520
|
if (isAttachmentFile(value)) {
|
|
455
|
-
const attachment = await
|
|
521
|
+
const attachment = await chunkHJV24UL2_cjs.Attachment_exports.upload(client, value, {
|
|
456
522
|
filename: value.name
|
|
457
523
|
});
|
|
458
|
-
return await toDataValue(attachment.rid, client
|
|
524
|
+
return await toDataValue(attachment.rid, client);
|
|
459
525
|
}
|
|
460
526
|
if (isMediaUpload(value)) {
|
|
461
|
-
const mediaRef = await
|
|
462
|
-
|
|
527
|
+
const mediaRef = await MediaSet_exports.uploadMedia(client, value.data, {
|
|
528
|
+
filename: value.fileName,
|
|
463
529
|
preview: true
|
|
464
530
|
});
|
|
465
|
-
return await toDataValue(mediaRef, client
|
|
531
|
+
return await toDataValue(mediaRef, client);
|
|
466
532
|
}
|
|
467
533
|
if (isOntologyObjectV2(value)) {
|
|
468
|
-
return await toDataValue(value.__primaryKey, client
|
|
534
|
+
return await toDataValue(value.__primaryKey, client);
|
|
469
535
|
}
|
|
470
536
|
if (isObjectSpecifiersObject(value)) {
|
|
471
|
-
return await toDataValue(value.$primaryKey, client
|
|
537
|
+
return await toDataValue(value.$primaryKey, client);
|
|
472
538
|
}
|
|
473
539
|
if (isPoint(value)) {
|
|
474
|
-
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client
|
|
540
|
+
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
|
|
475
541
|
}
|
|
476
|
-
if (
|
|
542
|
+
if (chunkHJV24UL2_cjs.isWireObjectSet(value)) {
|
|
477
543
|
return value;
|
|
478
544
|
}
|
|
479
|
-
if (
|
|
480
|
-
return
|
|
545
|
+
if (chunkHJV24UL2_cjs.isObjectSet(value)) {
|
|
546
|
+
return chunkHJV24UL2_cjs.getWireObjectSet(value);
|
|
481
547
|
}
|
|
482
548
|
if (isMediaReference(value)) {
|
|
483
549
|
return value;
|
|
@@ -491,7 +557,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
491
557
|
if (typeof value === "object") {
|
|
492
558
|
return Object.entries(value).reduce(async (promisedAcc, [key, structValue]) => {
|
|
493
559
|
const acc = await promisedAcc;
|
|
494
|
-
acc[key] = await toDataValue(structValue, client
|
|
560
|
+
acc[key] = await toDataValue(structValue, client);
|
|
495
561
|
return acc;
|
|
496
562
|
}, Promise.resolve({}));
|
|
497
563
|
}
|
|
@@ -500,11 +566,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
500
566
|
|
|
501
567
|
// src/actions/applyAction.ts
|
|
502
568
|
async function applyAction(client, action, parameters, options = {}) {
|
|
503
|
-
const clientWithHeaders =
|
|
569
|
+
const clientWithHeaders = chunkHJV24UL2_cjs.addUserAgentAndRequestContextHeaders(chunkHJV24UL2_cjs.augmentRequestContext(client, (_) => ({
|
|
504
570
|
finalMethodCall: "applyAction"
|
|
505
571
|
})), action);
|
|
506
572
|
if (Array.isArray(parameters)) {
|
|
507
|
-
const response = await
|
|
573
|
+
const response = await chunkHJV24UL2_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
508
574
|
requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
|
|
509
575
|
options: {
|
|
510
576
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
@@ -515,7 +581,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
515
581
|
const edits = response.edits;
|
|
516
582
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
517
583
|
} else {
|
|
518
|
-
const response = await
|
|
584
|
+
const response = await chunkHJV24UL2_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
519
585
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
520
586
|
options: {
|
|
521
587
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -541,14 +607,14 @@ async function remapActionParams(params, client, actionMetadata) {
|
|
|
541
607
|
}
|
|
542
608
|
const parameterMap = {};
|
|
543
609
|
for (const [key, value] of Object.entries(params)) {
|
|
544
|
-
parameterMap[key] = await toDataValue(value, client
|
|
610
|
+
parameterMap[key] = await toDataValue(value, client);
|
|
545
611
|
}
|
|
546
612
|
return parameterMap;
|
|
547
613
|
}
|
|
548
614
|
async function remapBatchActionParams(params, client, actionMetadata) {
|
|
549
615
|
const remappedParams = await Promise.all(params.map(async (param) => {
|
|
550
616
|
return {
|
|
551
|
-
parameters: await remapActionParams(param, client
|
|
617
|
+
parameters: await remapActionParams(param, client)
|
|
552
618
|
};
|
|
553
619
|
}));
|
|
554
620
|
return remappedParams;
|
|
@@ -722,7 +788,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
722
788
|
}
|
|
723
789
|
}
|
|
724
790
|
async getLatestValue() {
|
|
725
|
-
const latestPointPromise =
|
|
791
|
+
const latestPointPromise = chunkHJV24UL2_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
726
792
|
latestPointPromise.then(
|
|
727
793
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
728
794
|
// eslint-disable-next-line no-console
|
|
@@ -738,7 +804,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
738
804
|
return allPoints;
|
|
739
805
|
}
|
|
740
806
|
async *asyncIterValues(query) {
|
|
741
|
-
const streamPointsIterator = await
|
|
807
|
+
const streamPointsIterator = await chunkHJV24UL2_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
742
808
|
range: getTimeRange(query)
|
|
743
809
|
} : {});
|
|
744
810
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -765,13 +831,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
765
831
|
this.#mediaReference = mediaReference;
|
|
766
832
|
}
|
|
767
833
|
async fetchContents() {
|
|
768
|
-
return
|
|
834
|
+
return chunkHJV24UL2_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
769
835
|
preview: true
|
|
770
836
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
771
837
|
});
|
|
772
838
|
}
|
|
773
839
|
async fetchMetadata() {
|
|
774
|
-
const r = await
|
|
840
|
+
const r = await chunkHJV24UL2_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
775
841
|
preview: true
|
|
776
842
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
777
843
|
});
|
|
@@ -795,10 +861,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
795
861
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
796
862
|
}
|
|
797
863
|
async getFirstPoint() {
|
|
798
|
-
return
|
|
864
|
+
return chunkHJV24UL2_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
799
865
|
}
|
|
800
866
|
async getLastPoint() {
|
|
801
|
-
return
|
|
867
|
+
return chunkHJV24UL2_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
802
868
|
}
|
|
803
869
|
async getAllPoints(query) {
|
|
804
870
|
const allPoints = [];
|
|
@@ -808,7 +874,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
808
874
|
return allPoints;
|
|
809
875
|
}
|
|
810
876
|
async *asyncIterPoints(query) {
|
|
811
|
-
const streamPointsIterator = await
|
|
877
|
+
const streamPointsIterator = await chunkHJV24UL2_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
812
878
|
range: getTimeRange(query)
|
|
813
879
|
} : {});
|
|
814
880
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -1205,8 +1271,8 @@ function get$link(holder) {
|
|
|
1205
1271
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1206
1272
|
}).pivotTo(linkName);
|
|
1207
1273
|
const value = !linkDef.multiplicity ? {
|
|
1208
|
-
fetchOne: (options) =>
|
|
1209
|
-
fetchOneWithErrors: (options) =>
|
|
1274
|
+
fetchOne: (options) => chunkHJV24UL2_cjs.fetchSingle(client, objDef, options ?? {}, chunkHJV24UL2_cjs.getWireObjectSet(objectSet)),
|
|
1275
|
+
fetchOneWithErrors: (options) => chunkHJV24UL2_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkHJV24UL2_cjs.getWireObjectSet(objectSet))
|
|
1210
1276
|
} : objectSet;
|
|
1211
1277
|
return [linkName, value];
|
|
1212
1278
|
})));
|
|
@@ -1222,8 +1288,8 @@ function get$linkForInterface(holder) {
|
|
|
1222
1288
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1223
1289
|
})).pivotTo(linkName);
|
|
1224
1290
|
const value = !linkDef.multiplicity ? {
|
|
1225
|
-
fetchOne: (options) =>
|
|
1226
|
-
fetchOneWithErrors: (options) =>
|
|
1291
|
+
fetchOne: (options) => chunkHJV24UL2_cjs.fetchSingle(client, objDef, options ?? {}, chunkHJV24UL2_cjs.getWireObjectSet(objectSet)),
|
|
1292
|
+
fetchOneWithErrors: (options) => chunkHJV24UL2_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkHJV24UL2_cjs.getWireObjectSet(objectSet))
|
|
1227
1293
|
} : objectSet;
|
|
1228
1294
|
return [linkName, value];
|
|
1229
1295
|
})));
|
|
@@ -1231,7 +1297,7 @@ function get$linkForInterface(holder) {
|
|
|
1231
1297
|
|
|
1232
1298
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
1233
1299
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1234
|
-
const [objApiNamespace] =
|
|
1300
|
+
const [objApiNamespace] = chunkHJV24UL2_cjs.extractNamespace(interfaceDef.apiName);
|
|
1235
1301
|
return Object.freeze(Object.defineProperties({}, {
|
|
1236
1302
|
// first to minimize hidden classes
|
|
1237
1303
|
[UnderlyingOsdkObject]: {
|
|
@@ -1290,7 +1356,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1290
1356
|
},
|
|
1291
1357
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1292
1358
|
const objDef = underlying[ObjectDefRef];
|
|
1293
|
-
const [apiNamespace, apiName] =
|
|
1359
|
+
const [apiNamespace, apiName] = chunkHJV24UL2_cjs.extractNamespace(p);
|
|
1294
1360
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
1295
1361
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
1296
1362
|
enumerable: targetPropName in underlying,
|
|
@@ -1451,9 +1517,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1451
1517
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1452
1518
|
case "attachment":
|
|
1453
1519
|
if (Array.isArray(rawValue)) {
|
|
1454
|
-
return rawValue.map((a) =>
|
|
1520
|
+
return rawValue.map((a) => chunkHJV24UL2_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1455
1521
|
} else {
|
|
1456
|
-
return
|
|
1522
|
+
return chunkHJV24UL2_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1457
1523
|
}
|
|
1458
1524
|
default:
|
|
1459
1525
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1469,9 +1535,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1469
1535
|
}
|
|
1470
1536
|
if (propDef.type === "attachment") {
|
|
1471
1537
|
if (Array.isArray(rawValue)) {
|
|
1472
|
-
return rawValue.map((a) =>
|
|
1538
|
+
return rawValue.map((a) => chunkHJV24UL2_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1473
1539
|
}
|
|
1474
|
-
return
|
|
1540
|
+
return chunkHJV24UL2_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1475
1541
|
}
|
|
1476
1542
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1477
1543
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1695,13 +1761,13 @@ function deepFreeze(obj) {
|
|
|
1695
1761
|
return Object.freeze(obj);
|
|
1696
1762
|
}
|
|
1697
1763
|
async function loadActionMetadata(client, actionType) {
|
|
1698
|
-
const r = await
|
|
1764
|
+
const r = await chunkHJV24UL2_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
|
|
1699
1765
|
branch: client.branch
|
|
1700
1766
|
});
|
|
1701
1767
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1702
1768
|
}
|
|
1703
1769
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1704
|
-
const full = await
|
|
1770
|
+
const full = await chunkHJV24UL2_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1705
1771
|
preview: true,
|
|
1706
1772
|
branch: client.branch
|
|
1707
1773
|
});
|
|
@@ -1711,7 +1777,7 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1711
1777
|
};
|
|
1712
1778
|
}
|
|
1713
1779
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1714
|
-
const r = await
|
|
1780
|
+
const r = await chunkHJV24UL2_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1715
1781
|
preview: true,
|
|
1716
1782
|
branch: client.branch
|
|
1717
1783
|
});
|
|
@@ -1719,7 +1785,7 @@ async function loadInterfaceMetadata(client, objectType) {
|
|
|
1719
1785
|
}
|
|
1720
1786
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1721
1787
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1722
|
-
const r = await
|
|
1788
|
+
const r = await chunkHJV24UL2_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1723
1789
|
version
|
|
1724
1790
|
});
|
|
1725
1791
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1776,11 +1842,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1776
1842
|
};
|
|
1777
1843
|
|
|
1778
1844
|
// src/util/UserAgent.ts
|
|
1779
|
-
var USER_AGENT = `osdk-client/${"2.6.0-beta.
|
|
1780
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.6.0-beta.
|
|
1845
|
+
var USER_AGENT = `osdk-client/${"2.6.0-beta.8"}`;
|
|
1846
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.6.0-beta.8"}`;
|
|
1781
1847
|
|
|
1782
1848
|
// src/createMinimalClient.ts
|
|
1783
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1849
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkHJV24UL2_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1784
1850
|
if (process.env.NODE_ENV !== "production") {
|
|
1785
1851
|
try {
|
|
1786
1852
|
new URL(baseUrl);
|
|
@@ -1848,13 +1914,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1848
1914
|
switch (desiredType.type) {
|
|
1849
1915
|
case "attachment": {
|
|
1850
1916
|
if (isAttachmentUpload(value)) {
|
|
1851
|
-
const attachment = await
|
|
1917
|
+
const attachment = await chunkHJV24UL2_cjs.Attachment_exports.upload(client, value.data, {
|
|
1852
1918
|
filename: value.name
|
|
1853
1919
|
});
|
|
1854
1920
|
return attachment.rid;
|
|
1855
1921
|
}
|
|
1856
1922
|
if (isAttachmentFile(value)) {
|
|
1857
|
-
const attachment = await
|
|
1923
|
+
const attachment = await chunkHJV24UL2_cjs.Attachment_exports.upload(client, value, {
|
|
1858
1924
|
filename: value.name
|
|
1859
1925
|
});
|
|
1860
1926
|
return attachment.rid;
|
|
@@ -1894,11 +1960,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1894
1960
|
}
|
|
1895
1961
|
case "objectSet":
|
|
1896
1962
|
case "interfaceObjectSet": {
|
|
1897
|
-
if (
|
|
1963
|
+
if (chunkHJV24UL2_cjs.isWireObjectSet(value)) {
|
|
1898
1964
|
return value;
|
|
1899
1965
|
}
|
|
1900
|
-
if (
|
|
1901
|
-
return
|
|
1966
|
+
if (chunkHJV24UL2_cjs.isObjectSet(value)) {
|
|
1967
|
+
return chunkHJV24UL2_cjs.getWireObjectSet(value);
|
|
1902
1968
|
}
|
|
1903
1969
|
break;
|
|
1904
1970
|
}
|
|
@@ -1940,7 +2006,7 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1940
2006
|
// src/queries/applyQuery.ts
|
|
1941
2007
|
async function applyQuery(client, query, params) {
|
|
1942
2008
|
const qd = client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
|
|
1943
|
-
const response = await
|
|
2009
|
+
const response = await chunkHJV24UL2_cjs.Query_exports.execute(chunkHJV24UL2_cjs.addUserAgentAndRequestContextHeaders(chunkHJV24UL2_cjs.augmentRequestContext(client, (_) => ({
|
|
1944
2010
|
finalMethodCall: "applyQuery"
|
|
1945
2011
|
})), query), await client.ontologyRid, query.apiName, {
|
|
1946
2012
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
@@ -1987,7 +2053,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1987
2053
|
return responseValue;
|
|
1988
2054
|
}
|
|
1989
2055
|
case "attachment": {
|
|
1990
|
-
return
|
|
2056
|
+
return chunkHJV24UL2_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
1991
2057
|
}
|
|
1992
2058
|
case "object": {
|
|
1993
2059
|
const def = definitions.get(responseDataType.object);
|
|
@@ -2009,7 +2075,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2009
2075
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2010
2076
|
}
|
|
2011
2077
|
if (typeof responseValue === "string") {
|
|
2012
|
-
return
|
|
2078
|
+
return chunkHJV24UL2_cjs.createObjectSet(def, client, {
|
|
2013
2079
|
type: "intersect",
|
|
2014
2080
|
objectSets: [{
|
|
2015
2081
|
type: "base",
|
|
@@ -2020,7 +2086,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2020
2086
|
}]
|
|
2021
2087
|
});
|
|
2022
2088
|
}
|
|
2023
|
-
return
|
|
2089
|
+
return chunkHJV24UL2_cjs.createObjectSet(def, client, responseValue);
|
|
2024
2090
|
}
|
|
2025
2091
|
case "struct": {
|
|
2026
2092
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2206,7 +2272,7 @@ function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontolog
|
|
|
2206
2272
|
ontologyRid
|
|
2207
2273
|
}, baseUrl, tokenProvider, {
|
|
2208
2274
|
...options,
|
|
2209
|
-
logger: options?.logger ?? new
|
|
2275
|
+
logger: options?.logger ?? new chunkHJV24UL2_cjs.MinimalLogger(),
|
|
2210
2276
|
transactionRid,
|
|
2211
2277
|
branch: options?.branch
|
|
2212
2278
|
}, fetchFn, objectSetFactory);
|
|
@@ -2229,7 +2295,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2229
2295
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2230
2296
|
return {
|
|
2231
2297
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2232
|
-
return await
|
|
2298
|
+
return await chunkHJV24UL2_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2233
2299
|
}
|
|
2234
2300
|
};
|
|
2235
2301
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2241,7 +2307,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2241
2307
|
objectType,
|
|
2242
2308
|
propertyType
|
|
2243
2309
|
} = args;
|
|
2244
|
-
return await
|
|
2310
|
+
return await chunkHJV24UL2_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
2245
2311
|
mediaItemPath: fileName,
|
|
2246
2312
|
preview: true
|
|
2247
2313
|
});
|
|
@@ -2250,10 +2316,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2250
2316
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2251
2317
|
return {
|
|
2252
2318
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2253
|
-
return await
|
|
2319
|
+
return await chunkHJV24UL2_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2254
2320
|
},
|
|
2255
2321
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2256
|
-
return await
|
|
2322
|
+
return await chunkHJV24UL2_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2257
2323
|
}
|
|
2258
2324
|
};
|
|
2259
2325
|
}
|
|
@@ -2265,13 +2331,13 @@ function createClientFromContext(clientCtx) {
|
|
|
2265
2331
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
2266
2332
|
const symbolClientContext2 = "__osdkClientContext";
|
|
2267
2333
|
const client = Object.defineProperties(clientFn, {
|
|
2268
|
-
[
|
|
2334
|
+
[chunkHJV24UL2_cjs.symbolClientContext]: {
|
|
2269
2335
|
value: clientCtx
|
|
2270
2336
|
},
|
|
2271
2337
|
[symbolClientContext2]: {
|
|
2272
2338
|
value: clientCtx
|
|
2273
2339
|
},
|
|
2274
|
-
[
|
|
2340
|
+
[chunkHJV24UL2_cjs.additionalContext]: {
|
|
2275
2341
|
value: clientCtx
|
|
2276
2342
|
},
|
|
2277
2343
|
fetchMetadata: {
|
|
@@ -2280,8 +2346,8 @@ function createClientFromContext(clientCtx) {
|
|
|
2280
2346
|
});
|
|
2281
2347
|
return client;
|
|
2282
2348
|
}
|
|
2283
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2284
|
-
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(
|
|
2349
|
+
var createClient = createClientInternal.bind(void 0, chunkHJV24UL2_cjs.createObjectSet, void 0);
|
|
2350
|
+
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkHJV24UL2_cjs.createObjectSet, transactionRid, ...args);
|
|
2285
2351
|
function createWithRid(rids) {
|
|
2286
2352
|
const withRid = {
|
|
2287
2353
|
type: "static",
|
|
@@ -2301,5 +2367,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
2301
2367
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2302
2368
|
exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKey;
|
|
2303
2369
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
2304
|
-
//# sourceMappingURL=chunk-
|
|
2305
|
-
//# sourceMappingURL=chunk-
|
|
2370
|
+
//# sourceMappingURL=chunk-PCNVSZXT.cjs.map
|
|
2371
|
+
//# sourceMappingURL=chunk-PCNVSZXT.cjs.map
|