@osdk/client 2.6.0-beta.8 → 2.6.0-beta.9
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 +9 -0
- package/build/browser/observable/ObservableClient.js.map +1 -1
- package/build/browser/observable/internal/Changes.js.map +1 -1
- package/build/browser/observable/internal/IntersectCanonicalizer.js +35 -0
- package/build/browser/observable/internal/IntersectCanonicalizer.js.map +1 -0
- package/build/browser/observable/internal/KnownCacheKey.js.map +1 -1
- package/build/browser/observable/internal/ObservableClientImpl.js +3 -0
- package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/browser/observable/internal/PivotCanonicalizer.js +33 -0
- package/build/browser/observable/internal/PivotCanonicalizer.js.map +1 -0
- package/build/browser/observable/internal/Store.js +14 -2
- package/build/browser/observable/internal/Store.js.map +1 -1
- package/build/browser/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
- package/build/browser/observable/internal/aggregation/AggregationCacheKey.js +22 -0
- package/build/browser/observable/internal/aggregation/AggregationCacheKey.js.map +1 -0
- package/build/browser/observable/internal/aggregation/AggregationQuery.js +77 -0
- package/build/browser/observable/internal/aggregation/AggregationQuery.js.map +1 -0
- package/build/browser/observable/internal/aggregation/AggregationsHelper.js +54 -0
- package/build/browser/observable/internal/aggregation/AggregationsHelper.js.map +1 -0
- package/build/browser/observable/internal/aggregation/ObjectAggregationQuery.js +33 -0
- package/build/browser/observable/internal/aggregation/ObjectAggregationQuery.js.map +1 -0
- package/build/browser/observable/internal/links/LinksHelper.js +0 -3
- package/build/browser/observable/internal/links/LinksHelper.js.map +1 -1
- package/build/browser/observable/internal/list/ListCacheKey.js +2 -0
- package/build/browser/observable/internal/list/ListCacheKey.js.map +1 -1
- package/build/browser/observable/internal/list/ListQuery.js +12 -2
- package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
- package/build/browser/observable/internal/list/ListQueryOptions.js.map +1 -1
- package/build/browser/observable/internal/list/ListsHelper.js +9 -3
- package/build/browser/observable/internal/list/ListsHelper.js.map +1 -1
- package/build/browser/observable/internal/list/ObjectListQuery.js +48 -9
- package/build/browser/observable/internal/list/ObjectListQuery.js.map +1 -1
- package/build/browser/observable/internal/testUtils/invalidateList.js +6 -1
- package/build/browser/observable/internal/testUtils/invalidateList.js.map +1 -1
- package/build/browser/observable/internal/testUtils.js.map +1 -1
- package/build/browser/public/internal-node.js +18 -0
- package/build/browser/public/internal-node.js.map +1 -0
- package/build/browser/public/unstable-do-not-use.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/chunk-6SCDLAU2.cjs +57 -0
- package/build/cjs/chunk-6SCDLAU2.cjs.map +1 -0
- package/build/cjs/{chunk-HJV24UL2.cjs → chunk-DZE6IAUU.cjs} +122 -14
- package/build/cjs/chunk-DZE6IAUU.cjs.map +1 -0
- package/build/cjs/{chunk-PCNVSZXT.cjs → chunk-S4JPAF56.cjs} +159 -67
- package/build/cjs/chunk-S4JPAF56.cjs.map +1 -0
- package/build/cjs/{delay-QK4T7RVX.cjs → delay-KIUUJ5NJ.cjs} +4 -3
- package/build/cjs/delay-KIUUJ5NJ.cjs.map +1 -0
- package/build/cjs/index.cjs +17 -9
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/public/internal-node.cjs +193767 -0
- package/build/cjs/public/internal-node.cjs.map +1 -0
- package/build/cjs/public/internal-node.d.cts +29 -0
- package/build/cjs/public/internal.cjs +16 -9
- package/build/cjs/public/internal.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.cjs +1050 -706
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +36 -2
- package/build/esm/observable/ObservableClient.js.map +1 -1
- package/build/esm/observable/internal/Changes.js.map +1 -1
- package/build/esm/observable/internal/IntersectCanonicalizer.js +35 -0
- package/build/esm/observable/internal/IntersectCanonicalizer.js.map +1 -0
- package/build/esm/observable/internal/KnownCacheKey.js.map +1 -1
- package/build/esm/observable/internal/ObservableClientImpl.js +3 -0
- package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/esm/observable/internal/PivotCanonicalizer.js +33 -0
- package/build/esm/observable/internal/PivotCanonicalizer.js.map +1 -0
- package/build/esm/observable/internal/Store.js +14 -2
- package/build/esm/observable/internal/Store.js.map +1 -1
- package/build/esm/observable/internal/WhereClauseCanonicalizer.js.map +1 -1
- package/build/esm/observable/internal/aggregation/AggregationCacheKey.js +22 -0
- package/build/esm/observable/internal/aggregation/AggregationCacheKey.js.map +1 -0
- package/build/esm/observable/internal/aggregation/AggregationQuery.js +77 -0
- package/build/esm/observable/internal/aggregation/AggregationQuery.js.map +1 -0
- package/build/esm/observable/internal/aggregation/AggregationsHelper.js +54 -0
- package/build/esm/observable/internal/aggregation/AggregationsHelper.js.map +1 -0
- package/build/esm/observable/internal/aggregation/ObjectAggregationQuery.js +33 -0
- package/build/esm/observable/internal/aggregation/ObjectAggregationQuery.js.map +1 -0
- package/build/esm/observable/internal/links/LinksHelper.js +0 -3
- package/build/esm/observable/internal/links/LinksHelper.js.map +1 -1
- package/build/esm/observable/internal/list/ListCacheKey.js +2 -0
- package/build/esm/observable/internal/list/ListCacheKey.js.map +1 -1
- package/build/esm/observable/internal/list/ListQuery.js +12 -2
- package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
- package/build/esm/observable/internal/list/ListQueryOptions.js.map +1 -1
- package/build/esm/observable/internal/list/ListsHelper.js +9 -3
- package/build/esm/observable/internal/list/ListsHelper.js.map +1 -1
- package/build/esm/observable/internal/list/ObjectListQuery.js +48 -9
- package/build/esm/observable/internal/list/ObjectListQuery.js.map +1 -1
- package/build/esm/observable/internal/testUtils/invalidateList.js +6 -1
- package/build/esm/observable/internal/testUtils/invalidateList.js.map +1 -1
- package/build/esm/observable/internal/testUtils.js.map +1 -1
- package/build/esm/public/internal-node.js +18 -0
- package/build/esm/public/internal-node.js.map +1 -0
- package/build/esm/public/unstable-do-not-use.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/observable/ObservableClient.d.ts +46 -1
- package/build/types/observable/ObservableClient.d.ts.map +1 -1
- package/build/types/observable/internal/Changes.d.ts +4 -3
- package/build/types/observable/internal/Changes.d.ts.map +1 -1
- package/build/types/observable/internal/IntersectCanonicalizer.d.ts +18 -0
- package/build/types/observable/internal/IntersectCanonicalizer.d.ts.map +1 -0
- package/build/types/observable/internal/KnownCacheKey.d.ts +2 -1
- package/build/types/observable/internal/KnownCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/PivotCanonicalizer.d.ts +10 -0
- package/build/types/observable/internal/PivotCanonicalizer.d.ts.map +1 -0
- package/build/types/observable/internal/Store.d.ts +6 -0
- package/build/types/observable/internal/Store.d.ts.map +1 -1
- package/build/types/observable/internal/WhereClauseCanonicalizer.d.ts.map +1 -1
- package/build/types/observable/internal/aggregation/AggregationCacheKey.d.ts +12 -0
- package/build/types/observable/internal/aggregation/AggregationCacheKey.d.ts.map +1 -0
- package/build/types/observable/internal/aggregation/AggregationQuery.d.ts +49 -0
- package/build/types/observable/internal/aggregation/AggregationQuery.d.ts.map +1 -0
- package/build/types/observable/internal/aggregation/AggregationsHelper.d.ts +37 -0
- package/build/types/observable/internal/aggregation/AggregationsHelper.d.ts.map +1 -0
- package/build/types/observable/internal/aggregation/ObjectAggregationQuery.d.ts +5 -0
- package/build/types/observable/internal/aggregation/ObjectAggregationQuery.d.ts.map +1 -0
- package/build/types/observable/internal/links/LinksHelper.d.ts +0 -4
- package/build/types/observable/internal/links/LinksHelper.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListCacheKey.d.ts +4 -1
- package/build/types/observable/internal/list/ListCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListQuery.d.ts +4 -1
- package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListQueryOptions.d.ts +9 -1
- package/build/types/observable/internal/list/ListQueryOptions.d.ts.map +1 -1
- package/build/types/observable/internal/list/ListsHelper.d.ts +5 -1
- package/build/types/observable/internal/list/ListsHelper.d.ts.map +1 -1
- package/build/types/observable/internal/list/ObjectListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/testUtils.d.ts +1 -1
- package/build/types/observable/internal/testUtils.d.ts.map +1 -1
- package/build/types/public/internal-node.d.ts +2 -0
- package/build/types/public/internal-node.d.ts.map +1 -0
- package/build/types/public/unstable-do-not-use.d.ts +1 -1
- package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
- package/internal-node.d.ts +17 -0
- package/package.json +18 -9
- package/build/cjs/chunk-HJV24UL2.cjs.map +0 -1
- package/build/cjs/chunk-PCNVSZXT.cjs.map +0 -1
- package/build/cjs/chunk-Q7SFCCGT.cjs +0 -11
- package/build/cjs/chunk-Q7SFCCGT.cjs.map +0 -1
- package/build/cjs/delay-QK4T7RVX.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkDZE6IAUU_cjs = require('./chunk-DZE6IAUU.cjs');
|
|
4
|
+
var chunk6SCDLAU2_cjs = require('./chunk-6SCDLAU2.cjs');
|
|
5
5
|
var unstable = require('@osdk/api/unstable');
|
|
6
6
|
var client_unstable = require('@osdk/client.unstable');
|
|
7
7
|
var invariant = require('tiny-invariant');
|
|
@@ -14,6 +14,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
14
14
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
15
15
|
|
|
16
16
|
// src/actions/ActionValidationError.ts
|
|
17
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
17
18
|
var ActionValidationError = class extends Error {
|
|
18
19
|
constructor(validation) {
|
|
19
20
|
super("Validation Error: " + JSON.stringify(validation, null, 2));
|
|
@@ -22,6 +23,7 @@ var ActionValidationError = class extends Error {
|
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
// src/object/AttachmentUpload.ts
|
|
26
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
25
27
|
function isAttachmentUpload(o) {
|
|
26
28
|
return typeof o === `object` && "name" in o && "data" in o && o.data instanceof Blob;
|
|
27
29
|
}
|
|
@@ -36,6 +38,7 @@ function createAttachmentUpload(data, name) {
|
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
// src/util/objectSpecifierUtils.ts
|
|
41
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
39
42
|
function createObjectSpecifierFromPrimaryKey(objectDef, primaryKey) {
|
|
40
43
|
return `${objectDef.apiName}:${primaryKey}`;
|
|
41
44
|
}
|
|
@@ -46,7 +49,14 @@ function extractPrimaryKeyFromObjectSpecifier(ObjectSpecifier) {
|
|
|
46
49
|
return ObjectSpecifier.split(":")[1];
|
|
47
50
|
}
|
|
48
51
|
|
|
52
|
+
// src/createClient.ts
|
|
53
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
54
|
+
|
|
55
|
+
// src/__unstable/createBulkLinksAsyncIterFactory.ts
|
|
56
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
57
|
+
|
|
49
58
|
// src/objectSet/conjureUnionType.ts
|
|
59
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
50
60
|
function conjureUnionType(type, value) {
|
|
51
61
|
return {
|
|
52
62
|
type,
|
|
@@ -55,6 +65,7 @@ function conjureUnionType(type, value) {
|
|
|
55
65
|
}
|
|
56
66
|
|
|
57
67
|
// src/ontology/makeConjureContext.ts
|
|
68
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
58
69
|
function makeConjureContext({
|
|
59
70
|
baseUrl,
|
|
60
71
|
fetch: fetchFn,
|
|
@@ -69,6 +80,7 @@ function makeConjureContext({
|
|
|
69
80
|
}
|
|
70
81
|
|
|
71
82
|
// src/pageRequestAsAsyncIter.ts
|
|
83
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
72
84
|
function getResults(x) {
|
|
73
85
|
return x.results;
|
|
74
86
|
}
|
|
@@ -91,7 +103,11 @@ async function* pageRequestAsAsyncIter(call, values, nextArgs, initialPayload) {
|
|
|
91
103
|
}
|
|
92
104
|
}
|
|
93
105
|
|
|
106
|
+
// src/__unstable/ConjureSupport.ts
|
|
107
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
108
|
+
|
|
94
109
|
// src/object/SimpleCache.ts
|
|
110
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
95
111
|
function createSimpleCache(map = /* @__PURE__ */ new Map(), fn) {
|
|
96
112
|
function get(key) {
|
|
97
113
|
const r = map.get(key);
|
|
@@ -392,9 +408,18 @@ function getPrimaryKeyOrThrow(ref) {
|
|
|
392
408
|
};
|
|
393
409
|
}
|
|
394
410
|
|
|
411
|
+
// src/actions/applyAction.ts
|
|
412
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
413
|
+
|
|
414
|
+
// src/util/toDataValue.ts
|
|
415
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
416
|
+
|
|
417
|
+
// ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.38.0/node_modules/@osdk/foundry.mediasets/build/esm/index.js
|
|
418
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
419
|
+
|
|
395
420
|
// ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.38.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js
|
|
396
421
|
var MediaSet_exports = {};
|
|
397
|
-
|
|
422
|
+
chunk6SCDLAU2_cjs.__export(MediaSet_exports, {
|
|
398
423
|
abort: () => abort,
|
|
399
424
|
calculate: () => calculate,
|
|
400
425
|
commit: () => commit,
|
|
@@ -408,56 +433,58 @@ chunkQ7SFCCGT_cjs.__export(MediaSet_exports, {
|
|
|
408
433
|
upload: () => upload,
|
|
409
434
|
uploadMedia: () => uploadMedia
|
|
410
435
|
});
|
|
436
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
411
437
|
var _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort", 2];
|
|
412
438
|
function abort($ctx, ...args) {
|
|
413
|
-
return
|
|
439
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _abort, ...args);
|
|
414
440
|
}
|
|
415
441
|
var _calculate = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate", 6];
|
|
416
442
|
function calculate($ctx, ...args) {
|
|
417
|
-
return
|
|
443
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
|
|
418
444
|
}
|
|
419
445
|
var _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit", 2];
|
|
420
446
|
function commit($ctx, ...args) {
|
|
421
|
-
return
|
|
447
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _commit, ...args);
|
|
422
448
|
}
|
|
423
449
|
var _create = [1, "/v2/mediasets/{0}/transactions", 2];
|
|
424
450
|
function create($ctx, ...args) {
|
|
425
|
-
return
|
|
451
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _create, ...args);
|
|
426
452
|
}
|
|
427
453
|
var _info = [0, "/v2/mediasets/{0}/items/{1}", 6];
|
|
428
454
|
function info($ctx, ...args) {
|
|
429
|
-
return
|
|
455
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _info, ...args);
|
|
430
456
|
}
|
|
431
457
|
var _reference = [0, "/v2/mediasets/{0}/items/{1}/reference", 6];
|
|
432
458
|
function reference($ctx, ...args) {
|
|
433
|
-
return
|
|
459
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _reference, ...args);
|
|
434
460
|
}
|
|
435
461
|
var _getRidByPath = [0, "/v2/mediasets/{0}/items/getRidByPath", 2];
|
|
436
462
|
function getRidByPath($ctx, ...args) {
|
|
437
|
-
return
|
|
463
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
|
|
438
464
|
}
|
|
439
465
|
var _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
|
|
440
466
|
function upload($ctx, ...args) {
|
|
441
|
-
return
|
|
467
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _upload, ...args);
|
|
442
468
|
}
|
|
443
469
|
var _read = [0, "/v2/mediasets/{0}/items/{1}/content", 6, , "*/*"];
|
|
444
470
|
function read($ctx, ...args) {
|
|
445
|
-
return
|
|
471
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _read, ...args);
|
|
446
472
|
}
|
|
447
473
|
var _readOriginal = [0, "/v2/mediasets/{0}/items/{1}/original", 6, , "*/*"];
|
|
448
474
|
function readOriginal($ctx, ...args) {
|
|
449
|
-
return
|
|
475
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
|
|
450
476
|
}
|
|
451
477
|
var _retrieve = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve", 6, , "*/*"];
|
|
452
478
|
function retrieve($ctx, ...args) {
|
|
453
|
-
return
|
|
479
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
|
|
454
480
|
}
|
|
455
481
|
var _uploadMedia = [2, "/v2/mediasets/media/upload", 7, "*/*"];
|
|
456
482
|
function uploadMedia($ctx, ...args) {
|
|
457
|
-
return
|
|
483
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
|
|
458
484
|
}
|
|
459
485
|
|
|
460
486
|
// src/object/mediaUpload.ts
|
|
487
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
461
488
|
function isMediaReference(o) {
|
|
462
489
|
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";
|
|
463
490
|
}
|
|
@@ -466,6 +493,7 @@ function isMediaUpload(o) {
|
|
|
466
493
|
}
|
|
467
494
|
|
|
468
495
|
// src/util/interfaceUtils.ts
|
|
496
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
469
497
|
function isInterfaceActionParam(o) {
|
|
470
498
|
return o != null && typeof o === "object" && "$objectType" in o && "$primaryKey" in o;
|
|
471
499
|
}
|
|
@@ -477,16 +505,19 @@ function isInterfaceSpecifier(o) {
|
|
|
477
505
|
}
|
|
478
506
|
|
|
479
507
|
// src/util/isObjectSpecifiersObject.ts
|
|
508
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
480
509
|
function isObjectSpecifiersObject(o) {
|
|
481
510
|
return o && typeof o === "object" && typeof o.$apiName === "string" && o.$primaryKey != null;
|
|
482
511
|
}
|
|
483
512
|
|
|
484
513
|
// src/util/isOntologyObjectV2.ts
|
|
514
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
485
515
|
function isOntologyObjectV2(o) {
|
|
486
516
|
return o && typeof o === "object" && typeof o.__apiName === "string" && o.__primaryKey != null;
|
|
487
517
|
}
|
|
488
518
|
|
|
489
519
|
// src/util/isPoint.ts
|
|
520
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
490
521
|
function isPoint(o) {
|
|
491
522
|
return o && typeof o === "object" && "type" in o && o.type === "Point" && "coordinates" in o && o.coordinates.length === 2;
|
|
492
523
|
}
|
|
@@ -512,13 +543,13 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
512
543
|
return Promise.all(promiseArray);
|
|
513
544
|
}
|
|
514
545
|
if (isAttachmentUpload(value)) {
|
|
515
|
-
const attachment = await
|
|
546
|
+
const attachment = await chunkDZE6IAUU_cjs.Attachment_exports.upload(client, value.data, {
|
|
516
547
|
filename: value.name
|
|
517
548
|
});
|
|
518
549
|
return await toDataValue(attachment.rid, client);
|
|
519
550
|
}
|
|
520
551
|
if (isAttachmentFile(value)) {
|
|
521
|
-
const attachment = await
|
|
552
|
+
const attachment = await chunkDZE6IAUU_cjs.Attachment_exports.upload(client, value, {
|
|
522
553
|
filename: value.name
|
|
523
554
|
});
|
|
524
555
|
return await toDataValue(attachment.rid, client);
|
|
@@ -539,11 +570,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
539
570
|
if (isPoint(value)) {
|
|
540
571
|
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
|
|
541
572
|
}
|
|
542
|
-
if (
|
|
573
|
+
if (chunkDZE6IAUU_cjs.isWireObjectSet(value)) {
|
|
543
574
|
return value;
|
|
544
575
|
}
|
|
545
|
-
if (
|
|
546
|
-
return
|
|
576
|
+
if (chunkDZE6IAUU_cjs.isObjectSet(value)) {
|
|
577
|
+
return chunkDZE6IAUU_cjs.getWireObjectSet(value);
|
|
547
578
|
}
|
|
548
579
|
if (isMediaReference(value)) {
|
|
549
580
|
return value;
|
|
@@ -566,11 +597,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
566
597
|
|
|
567
598
|
// src/actions/applyAction.ts
|
|
568
599
|
async function applyAction(client, action, parameters, options = {}) {
|
|
569
|
-
const clientWithHeaders =
|
|
600
|
+
const clientWithHeaders = chunkDZE6IAUU_cjs.addUserAgentAndRequestContextHeaders(chunkDZE6IAUU_cjs.augmentRequestContext(client, (_) => ({
|
|
570
601
|
finalMethodCall: "applyAction"
|
|
571
602
|
})), action);
|
|
572
603
|
if (Array.isArray(parameters)) {
|
|
573
|
-
const response = await
|
|
604
|
+
const response = await chunkDZE6IAUU_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
574
605
|
requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
|
|
575
606
|
options: {
|
|
576
607
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
@@ -581,7 +612,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
581
612
|
const edits = response.edits;
|
|
582
613
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
583
614
|
} else {
|
|
584
|
-
const response = await
|
|
615
|
+
const response = await chunkDZE6IAUU_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
585
616
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
586
617
|
options: {
|
|
587
618
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -669,7 +700,23 @@ function remapActionResponse(response) {
|
|
|
669
700
|
}
|
|
670
701
|
}
|
|
671
702
|
|
|
703
|
+
// src/createMinimalClient.ts
|
|
704
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
705
|
+
|
|
706
|
+
// src/object/convertWireToOsdkObjects.ts
|
|
707
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
708
|
+
|
|
709
|
+
// src/object/convertWireToOsdkObjects/createOsdkObject.ts
|
|
710
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
711
|
+
|
|
712
|
+
// src/createGeotimeSeriesProperty.ts
|
|
713
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
714
|
+
|
|
715
|
+
// src/util/timeseriesUtils.ts
|
|
716
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
717
|
+
|
|
672
718
|
// src/util/streamutils.ts
|
|
719
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
673
720
|
var START_TOKEN = new Uint8Array([123, 34, 100, 97, 116, 97, 34, 58, 91]);
|
|
674
721
|
var OBJECT_OPEN_CHAR_CODE = 123;
|
|
675
722
|
var OBJECT_CLOSE_CHAR_CODE = 125;
|
|
@@ -788,7 +835,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
788
835
|
}
|
|
789
836
|
}
|
|
790
837
|
async getLatestValue() {
|
|
791
|
-
const latestPointPromise =
|
|
838
|
+
const latestPointPromise = chunkDZE6IAUU_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
792
839
|
latestPointPromise.then(
|
|
793
840
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
794
841
|
// eslint-disable-next-line no-console
|
|
@@ -804,7 +851,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
804
851
|
return allPoints;
|
|
805
852
|
}
|
|
806
853
|
async *asyncIterValues(query) {
|
|
807
|
-
const streamPointsIterator = await
|
|
854
|
+
const streamPointsIterator = await chunkDZE6IAUU_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
808
855
|
range: getTimeRange(query)
|
|
809
856
|
} : {});
|
|
810
857
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -814,6 +861,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
814
861
|
};
|
|
815
862
|
|
|
816
863
|
// src/createMediaReferenceProperty.ts
|
|
864
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
817
865
|
var MediaReferencePropertyImpl = class {
|
|
818
866
|
#mediaReference;
|
|
819
867
|
#triplet;
|
|
@@ -831,13 +879,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
831
879
|
this.#mediaReference = mediaReference;
|
|
832
880
|
}
|
|
833
881
|
async fetchContents() {
|
|
834
|
-
return
|
|
882
|
+
return chunkDZE6IAUU_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
835
883
|
preview: true
|
|
836
884
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
837
885
|
});
|
|
838
886
|
}
|
|
839
887
|
async fetchMetadata() {
|
|
840
|
-
const r = await
|
|
888
|
+
const r = await chunkDZE6IAUU_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
841
889
|
preview: true
|
|
842
890
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
843
891
|
});
|
|
@@ -853,6 +901,7 @@ var MediaReferencePropertyImpl = class {
|
|
|
853
901
|
};
|
|
854
902
|
|
|
855
903
|
// src/createTimeseriesProperty.ts
|
|
904
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
856
905
|
var TimeSeriesPropertyImpl = class {
|
|
857
906
|
#triplet;
|
|
858
907
|
#client;
|
|
@@ -861,10 +910,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
861
910
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
862
911
|
}
|
|
863
912
|
async getFirstPoint() {
|
|
864
|
-
return
|
|
913
|
+
return chunkDZE6IAUU_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
865
914
|
}
|
|
866
915
|
async getLastPoint() {
|
|
867
|
-
return
|
|
916
|
+
return chunkDZE6IAUU_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
868
917
|
}
|
|
869
918
|
async getAllPoints(query) {
|
|
870
919
|
const allPoints = [];
|
|
@@ -874,7 +923,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
874
923
|
return allPoints;
|
|
875
924
|
}
|
|
876
925
|
async *asyncIterPoints(query) {
|
|
877
|
-
const streamPointsIterator = await
|
|
926
|
+
const streamPointsIterator = await chunkDZE6IAUU_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
878
927
|
range: getTimeRange(query)
|
|
879
928
|
} : {});
|
|
880
929
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -883,12 +932,20 @@ var TimeSeriesPropertyImpl = class {
|
|
|
883
932
|
}
|
|
884
933
|
};
|
|
885
934
|
|
|
935
|
+
// src/object/formatting/applyPropertyFormatter.ts
|
|
936
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
937
|
+
|
|
886
938
|
// src/object/formatting/formatBoolean.ts
|
|
939
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
887
940
|
function formatBoolean(value, rule) {
|
|
888
941
|
return value ? rule.valueIfTrue : rule.valueIfFalse;
|
|
889
942
|
}
|
|
890
943
|
|
|
944
|
+
// src/object/formatting/formatDateTime.ts
|
|
945
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
946
|
+
|
|
891
947
|
// src/object/formatting/propertyFormattingUtils.ts
|
|
948
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
892
949
|
function resolvePropertyReference(ref, objectData) {
|
|
893
950
|
if (ref.type === "constant") {
|
|
894
951
|
return ref.value;
|
|
@@ -1038,6 +1095,7 @@ function formatRelativeToNow(date, locale, timezone) {
|
|
|
1038
1095
|
}
|
|
1039
1096
|
|
|
1040
1097
|
// src/object/formatting/formatNumber.ts
|
|
1098
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1041
1099
|
function formatNumber(value, numberType, objectData, locale) {
|
|
1042
1100
|
switch (numberType.type) {
|
|
1043
1101
|
case "standard":
|
|
@@ -1251,10 +1309,21 @@ function formatPropertyValue(value, rule, objectData, options) {
|
|
|
1251
1309
|
}
|
|
1252
1310
|
}
|
|
1253
1311
|
|
|
1312
|
+
// src/object/convertWireToOsdkObjects/getDollarAs.ts
|
|
1313
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1314
|
+
|
|
1254
1315
|
// src/ontology/OntologyProvider.ts
|
|
1316
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1255
1317
|
var InterfaceDefinitions = Symbol("InterfaceDefinitions" );
|
|
1256
1318
|
|
|
1319
|
+
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
1320
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1321
|
+
|
|
1322
|
+
// src/object/convertWireToOsdkObjects/getDollarLink.ts
|
|
1323
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1324
|
+
|
|
1257
1325
|
// src/object/convertWireToOsdkObjects/InternalSymbols.ts
|
|
1326
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1258
1327
|
var UnderlyingOsdkObject = Symbol("Underlying Object" );
|
|
1259
1328
|
var ObjectDefRef = Symbol("ObjectDefinition" );
|
|
1260
1329
|
var InterfaceDefRef = Symbol("InterfaceDefinition" );
|
|
@@ -1271,8 +1340,8 @@ function get$link(holder) {
|
|
|
1271
1340
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1272
1341
|
}).pivotTo(linkName);
|
|
1273
1342
|
const value = !linkDef.multiplicity ? {
|
|
1274
|
-
fetchOne: (options) =>
|
|
1275
|
-
fetchOneWithErrors: (options) =>
|
|
1343
|
+
fetchOne: (options) => chunkDZE6IAUU_cjs.fetchSingle(client, objDef, options ?? {}, chunkDZE6IAUU_cjs.getWireObjectSet(objectSet)),
|
|
1344
|
+
fetchOneWithErrors: (options) => chunkDZE6IAUU_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkDZE6IAUU_cjs.getWireObjectSet(objectSet))
|
|
1276
1345
|
} : objectSet;
|
|
1277
1346
|
return [linkName, value];
|
|
1278
1347
|
})));
|
|
@@ -1288,8 +1357,8 @@ function get$linkForInterface(holder) {
|
|
|
1288
1357
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1289
1358
|
})).pivotTo(linkName);
|
|
1290
1359
|
const value = !linkDef.multiplicity ? {
|
|
1291
|
-
fetchOne: (options) =>
|
|
1292
|
-
fetchOneWithErrors: (options) =>
|
|
1360
|
+
fetchOne: (options) => chunkDZE6IAUU_cjs.fetchSingle(client, objDef, options ?? {}, chunkDZE6IAUU_cjs.getWireObjectSet(objectSet)),
|
|
1361
|
+
fetchOneWithErrors: (options) => chunkDZE6IAUU_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkDZE6IAUU_cjs.getWireObjectSet(objectSet))
|
|
1293
1362
|
} : objectSet;
|
|
1294
1363
|
return [linkName, value];
|
|
1295
1364
|
})));
|
|
@@ -1297,7 +1366,7 @@ function get$linkForInterface(holder) {
|
|
|
1297
1366
|
|
|
1298
1367
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
1299
1368
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1300
|
-
const [objApiNamespace] =
|
|
1369
|
+
const [objApiNamespace] = chunkDZE6IAUU_cjs.extractNamespace(interfaceDef.apiName);
|
|
1301
1370
|
return Object.freeze(Object.defineProperties({}, {
|
|
1302
1371
|
// first to minimize hidden classes
|
|
1303
1372
|
[UnderlyingOsdkObject]: {
|
|
@@ -1356,7 +1425,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1356
1425
|
},
|
|
1357
1426
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1358
1427
|
const objDef = underlying[ObjectDefRef];
|
|
1359
|
-
const [apiNamespace, apiName] =
|
|
1428
|
+
const [apiNamespace, apiName] = chunkDZE6IAUU_cjs.extractNamespace(p);
|
|
1360
1429
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
1361
1430
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
1362
1431
|
enumerable: targetPropName in underlying,
|
|
@@ -1517,9 +1586,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1517
1586
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1518
1587
|
case "attachment":
|
|
1519
1588
|
if (Array.isArray(rawValue)) {
|
|
1520
|
-
return rawValue.map((a) =>
|
|
1589
|
+
return rawValue.map((a) => chunkDZE6IAUU_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1521
1590
|
} else {
|
|
1522
|
-
return
|
|
1591
|
+
return chunkDZE6IAUU_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1523
1592
|
}
|
|
1524
1593
|
default:
|
|
1525
1594
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1535,9 +1604,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1535
1604
|
}
|
|
1536
1605
|
if (propDef.type === "attachment") {
|
|
1537
1606
|
if (Array.isArray(rawValue)) {
|
|
1538
|
-
return rawValue.map((a) =>
|
|
1607
|
+
return rawValue.map((a) => chunkDZE6IAUU_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1539
1608
|
}
|
|
1540
|
-
return
|
|
1609
|
+
return chunkDZE6IAUU_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1541
1610
|
}
|
|
1542
1611
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1543
1612
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1694,7 +1763,11 @@ function fixObjectPropertiesInPlace(objs, forceRemoveRid) {
|
|
|
1694
1763
|
}
|
|
1695
1764
|
}
|
|
1696
1765
|
|
|
1766
|
+
// src/ontology/StandardOntologyProvider.ts
|
|
1767
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1768
|
+
|
|
1697
1769
|
// src/object/Cache.ts
|
|
1770
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1698
1771
|
function createClientCache(fn) {
|
|
1699
1772
|
const cache = /* @__PURE__ */ new WeakMap();
|
|
1700
1773
|
function get(client, key) {
|
|
@@ -1751,6 +1824,7 @@ function createAsyncClientCache(fn, createCacheLocal = createClientCache) {
|
|
|
1751
1824
|
}
|
|
1752
1825
|
|
|
1753
1826
|
// src/util/deepFreeze.ts
|
|
1827
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1754
1828
|
function deepFreeze(obj) {
|
|
1755
1829
|
Object.getOwnPropertyNames(obj).forEach((name) => {
|
|
1756
1830
|
const prop = obj[name];
|
|
@@ -1760,14 +1834,20 @@ function deepFreeze(obj) {
|
|
|
1760
1834
|
});
|
|
1761
1835
|
return Object.freeze(obj);
|
|
1762
1836
|
}
|
|
1837
|
+
|
|
1838
|
+
// src/ontology/loadActionMetadata.ts
|
|
1839
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1763
1840
|
async function loadActionMetadata(client, actionType) {
|
|
1764
|
-
const r = await
|
|
1841
|
+
const r = await chunkDZE6IAUU_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
|
|
1765
1842
|
branch: client.branch
|
|
1766
1843
|
});
|
|
1767
1844
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1768
1845
|
}
|
|
1846
|
+
|
|
1847
|
+
// src/ontology/loadFullObjectMetadata.ts
|
|
1848
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1769
1849
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1770
|
-
const full = await
|
|
1850
|
+
const full = await chunkDZE6IAUU_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1771
1851
|
preview: true,
|
|
1772
1852
|
branch: client.branch
|
|
1773
1853
|
});
|
|
@@ -1776,16 +1856,22 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1776
1856
|
...ret
|
|
1777
1857
|
};
|
|
1778
1858
|
}
|
|
1859
|
+
|
|
1860
|
+
// src/ontology/loadInterfaceMetadata.ts
|
|
1861
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1779
1862
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1780
|
-
const r = await
|
|
1863
|
+
const r = await chunkDZE6IAUU_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1781
1864
|
preview: true,
|
|
1782
1865
|
branch: client.branch
|
|
1783
1866
|
});
|
|
1784
1867
|
return generatorConverters.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
|
|
1785
1868
|
}
|
|
1869
|
+
|
|
1870
|
+
// src/ontology/loadQueryMetadata.ts
|
|
1871
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1786
1872
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1787
1873
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1788
|
-
const r = await
|
|
1874
|
+
const r = await chunkDZE6IAUU_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1789
1875
|
version
|
|
1790
1876
|
});
|
|
1791
1877
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1842,11 +1928,12 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1842
1928
|
};
|
|
1843
1929
|
|
|
1844
1930
|
// src/util/UserAgent.ts
|
|
1845
|
-
|
|
1846
|
-
var
|
|
1931
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1932
|
+
var USER_AGENT = `osdk-client/${"2.6.0-beta.9"}`;
|
|
1933
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.6.0-beta.9"}`;
|
|
1847
1934
|
|
|
1848
1935
|
// src/createMinimalClient.ts
|
|
1849
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1936
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkDZE6IAUU_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1850
1937
|
if (process.env.NODE_ENV !== "production") {
|
|
1851
1938
|
try {
|
|
1852
1939
|
new URL(baseUrl);
|
|
@@ -1876,6 +1963,7 @@ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fet
|
|
|
1876
1963
|
}
|
|
1877
1964
|
|
|
1878
1965
|
// src/fetchMetadata.ts
|
|
1966
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1879
1967
|
var fetchMetadataInternal = async (client, definition) => {
|
|
1880
1968
|
if (definition.type === "object") {
|
|
1881
1969
|
const {
|
|
@@ -1894,7 +1982,11 @@ var fetchMetadataInternal = async (client, definition) => {
|
|
|
1894
1982
|
}
|
|
1895
1983
|
};
|
|
1896
1984
|
|
|
1985
|
+
// src/queries/applyQuery.ts
|
|
1986
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1987
|
+
|
|
1897
1988
|
// src/util/toDataValueQueries.ts
|
|
1989
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1898
1990
|
async function toDataValueQueries(value, client, desiredType) {
|
|
1899
1991
|
if (value == null) {
|
|
1900
1992
|
return value;
|
|
@@ -1914,13 +2006,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1914
2006
|
switch (desiredType.type) {
|
|
1915
2007
|
case "attachment": {
|
|
1916
2008
|
if (isAttachmentUpload(value)) {
|
|
1917
|
-
const attachment = await
|
|
2009
|
+
const attachment = await chunkDZE6IAUU_cjs.Attachment_exports.upload(client, value.data, {
|
|
1918
2010
|
filename: value.name
|
|
1919
2011
|
});
|
|
1920
2012
|
return attachment.rid;
|
|
1921
2013
|
}
|
|
1922
2014
|
if (isAttachmentFile(value)) {
|
|
1923
|
-
const attachment = await
|
|
2015
|
+
const attachment = await chunkDZE6IAUU_cjs.Attachment_exports.upload(client, value, {
|
|
1924
2016
|
filename: value.name
|
|
1925
2017
|
});
|
|
1926
2018
|
return attachment.rid;
|
|
@@ -1960,11 +2052,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1960
2052
|
}
|
|
1961
2053
|
case "objectSet":
|
|
1962
2054
|
case "interfaceObjectSet": {
|
|
1963
|
-
if (
|
|
2055
|
+
if (chunkDZE6IAUU_cjs.isWireObjectSet(value)) {
|
|
1964
2056
|
return value;
|
|
1965
2057
|
}
|
|
1966
|
-
if (
|
|
1967
|
-
return
|
|
2058
|
+
if (chunkDZE6IAUU_cjs.isObjectSet(value)) {
|
|
2059
|
+
return chunkDZE6IAUU_cjs.getWireObjectSet(value);
|
|
1968
2060
|
}
|
|
1969
2061
|
break;
|
|
1970
2062
|
}
|
|
@@ -2006,7 +2098,7 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2006
2098
|
// src/queries/applyQuery.ts
|
|
2007
2099
|
async function applyQuery(client, query, params) {
|
|
2008
2100
|
const qd = client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
|
|
2009
|
-
const response = await
|
|
2101
|
+
const response = await chunkDZE6IAUU_cjs.Query_exports.execute(chunkDZE6IAUU_cjs.addUserAgentAndRequestContextHeaders(chunkDZE6IAUU_cjs.augmentRequestContext(client, (_) => ({
|
|
2010
2102
|
finalMethodCall: "applyQuery"
|
|
2011
2103
|
})), query), await client.ontologyRid, query.apiName, {
|
|
2012
2104
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
@@ -2053,7 +2145,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2053
2145
|
return responseValue;
|
|
2054
2146
|
}
|
|
2055
2147
|
case "attachment": {
|
|
2056
|
-
return
|
|
2148
|
+
return chunkDZE6IAUU_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
2057
2149
|
}
|
|
2058
2150
|
case "object": {
|
|
2059
2151
|
const def = definitions.get(responseDataType.object);
|
|
@@ -2075,7 +2167,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2075
2167
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2076
2168
|
}
|
|
2077
2169
|
if (typeof responseValue === "string") {
|
|
2078
|
-
return
|
|
2170
|
+
return chunkDZE6IAUU_cjs.createObjectSet(def, client, {
|
|
2079
2171
|
type: "intersect",
|
|
2080
2172
|
objectSets: [{
|
|
2081
2173
|
type: "base",
|
|
@@ -2086,7 +2178,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2086
2178
|
}]
|
|
2087
2179
|
});
|
|
2088
2180
|
}
|
|
2089
|
-
return
|
|
2181
|
+
return chunkDZE6IAUU_cjs.createObjectSet(def, client, responseValue);
|
|
2090
2182
|
}
|
|
2091
2183
|
case "struct": {
|
|
2092
2184
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2272,7 +2364,7 @@ function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontolog
|
|
|
2272
2364
|
ontologyRid
|
|
2273
2365
|
}, baseUrl, tokenProvider, {
|
|
2274
2366
|
...options,
|
|
2275
|
-
logger: options?.logger ?? new
|
|
2367
|
+
logger: options?.logger ?? new chunkDZE6IAUU_cjs.MinimalLogger(),
|
|
2276
2368
|
transactionRid,
|
|
2277
2369
|
branch: options?.branch
|
|
2278
2370
|
}, fetchFn, objectSetFactory);
|
|
@@ -2295,7 +2387,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2295
2387
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2296
2388
|
return {
|
|
2297
2389
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2298
|
-
return await
|
|
2390
|
+
return await chunkDZE6IAUU_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2299
2391
|
}
|
|
2300
2392
|
};
|
|
2301
2393
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2307,7 +2399,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2307
2399
|
objectType,
|
|
2308
2400
|
propertyType
|
|
2309
2401
|
} = args;
|
|
2310
|
-
return await
|
|
2402
|
+
return await chunkDZE6IAUU_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
2311
2403
|
mediaItemPath: fileName,
|
|
2312
2404
|
preview: true
|
|
2313
2405
|
});
|
|
@@ -2316,10 +2408,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2316
2408
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2317
2409
|
return {
|
|
2318
2410
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2319
|
-
return await
|
|
2411
|
+
return await chunkDZE6IAUU_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2320
2412
|
},
|
|
2321
2413
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2322
|
-
return await
|
|
2414
|
+
return await chunkDZE6IAUU_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2323
2415
|
}
|
|
2324
2416
|
};
|
|
2325
2417
|
}
|
|
@@ -2331,13 +2423,13 @@ function createClientFromContext(clientCtx) {
|
|
|
2331
2423
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
2332
2424
|
const symbolClientContext2 = "__osdkClientContext";
|
|
2333
2425
|
const client = Object.defineProperties(clientFn, {
|
|
2334
|
-
[
|
|
2426
|
+
[chunkDZE6IAUU_cjs.symbolClientContext]: {
|
|
2335
2427
|
value: clientCtx
|
|
2336
2428
|
},
|
|
2337
2429
|
[symbolClientContext2]: {
|
|
2338
2430
|
value: clientCtx
|
|
2339
2431
|
},
|
|
2340
|
-
[
|
|
2432
|
+
[chunkDZE6IAUU_cjs.additionalContext]: {
|
|
2341
2433
|
value: clientCtx
|
|
2342
2434
|
},
|
|
2343
2435
|
fetchMetadata: {
|
|
@@ -2346,8 +2438,8 @@ function createClientFromContext(clientCtx) {
|
|
|
2346
2438
|
});
|
|
2347
2439
|
return client;
|
|
2348
2440
|
}
|
|
2349
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2350
|
-
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(
|
|
2441
|
+
var createClient = createClientInternal.bind(void 0, chunkDZE6IAUU_cjs.createObjectSet, void 0);
|
|
2442
|
+
var createClientWithTransaction = (transactionRid, ...args) => createClientInternal(chunkDZE6IAUU_cjs.createObjectSet, transactionRid, ...args);
|
|
2351
2443
|
function createWithRid(rids) {
|
|
2352
2444
|
const withRid = {
|
|
2353
2445
|
type: "static",
|
|
@@ -2367,5 +2459,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
2367
2459
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2368
2460
|
exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKey;
|
|
2369
2461
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
2370
|
-
//# sourceMappingURL=chunk-
|
|
2371
|
-
//# sourceMappingURL=chunk-
|
|
2462
|
+
//# sourceMappingURL=chunk-S4JPAF56.cjs.map
|
|
2463
|
+
//# sourceMappingURL=chunk-S4JPAF56.cjs.map
|