@osdk/client 2.6.0-beta.7 → 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 +24 -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/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/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-6SCDLAU2.cjs +57 -0
- package/build/cjs/chunk-6SCDLAU2.cjs.map +1 -0
- package/build/cjs/{chunk-3LMKH6RS.cjs → chunk-DZE6IAUU.cjs} +145 -47
- package/build/cjs/chunk-DZE6IAUU.cjs.map +1 -0
- package/build/cjs/{chunk-4ZOXOCQX.cjs → chunk-S4JPAF56.cjs} +225 -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/index.d.cts +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/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/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/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/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 +21 -11
- package/build/cjs/chunk-3LMKH6RS.cjs.map +0 -1
- package/build/cjs/chunk-4ZOXOCQX.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,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDZE6IAUU_cjs = require('./chunk-DZE6IAUU.cjs');
|
|
4
|
+
var chunk6SCDLAU2_cjs = require('./chunk-6SCDLAU2.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');
|
|
@@ -13,6 +14,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
13
14
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
14
15
|
|
|
15
16
|
// src/actions/ActionValidationError.ts
|
|
17
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
16
18
|
var ActionValidationError = class extends Error {
|
|
17
19
|
constructor(validation) {
|
|
18
20
|
super("Validation Error: " + JSON.stringify(validation, null, 2));
|
|
@@ -21,6 +23,7 @@ var ActionValidationError = class extends Error {
|
|
|
21
23
|
};
|
|
22
24
|
|
|
23
25
|
// src/object/AttachmentUpload.ts
|
|
26
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
24
27
|
function isAttachmentUpload(o) {
|
|
25
28
|
return typeof o === `object` && "name" in o && "data" in o && o.data instanceof Blob;
|
|
26
29
|
}
|
|
@@ -35,6 +38,7 @@ function createAttachmentUpload(data, name) {
|
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
// src/util/objectSpecifierUtils.ts
|
|
41
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
38
42
|
function createObjectSpecifierFromPrimaryKey(objectDef, primaryKey) {
|
|
39
43
|
return `${objectDef.apiName}:${primaryKey}`;
|
|
40
44
|
}
|
|
@@ -45,7 +49,14 @@ function extractPrimaryKeyFromObjectSpecifier(ObjectSpecifier) {
|
|
|
45
49
|
return ObjectSpecifier.split(":")[1];
|
|
46
50
|
}
|
|
47
51
|
|
|
52
|
+
// src/createClient.ts
|
|
53
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
54
|
+
|
|
55
|
+
// src/__unstable/createBulkLinksAsyncIterFactory.ts
|
|
56
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
57
|
+
|
|
48
58
|
// src/objectSet/conjureUnionType.ts
|
|
59
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
49
60
|
function conjureUnionType(type, value) {
|
|
50
61
|
return {
|
|
51
62
|
type,
|
|
@@ -54,6 +65,7 @@ function conjureUnionType(type, value) {
|
|
|
54
65
|
}
|
|
55
66
|
|
|
56
67
|
// src/ontology/makeConjureContext.ts
|
|
68
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
57
69
|
function makeConjureContext({
|
|
58
70
|
baseUrl,
|
|
59
71
|
fetch: fetchFn,
|
|
@@ -68,6 +80,7 @@ function makeConjureContext({
|
|
|
68
80
|
}
|
|
69
81
|
|
|
70
82
|
// src/pageRequestAsAsyncIter.ts
|
|
83
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
71
84
|
function getResults(x) {
|
|
72
85
|
return x.results;
|
|
73
86
|
}
|
|
@@ -90,7 +103,11 @@ async function* pageRequestAsAsyncIter(call, values, nextArgs, initialPayload) {
|
|
|
90
103
|
}
|
|
91
104
|
}
|
|
92
105
|
|
|
106
|
+
// src/__unstable/ConjureSupport.ts
|
|
107
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
108
|
+
|
|
93
109
|
// src/object/SimpleCache.ts
|
|
110
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
94
111
|
function createSimpleCache(map = /* @__PURE__ */ new Map(), fn) {
|
|
95
112
|
function get(key) {
|
|
96
113
|
const r = map.get(key);
|
|
@@ -391,15 +408,92 @@ function getPrimaryKeyOrThrow(ref) {
|
|
|
391
408
|
};
|
|
392
409
|
}
|
|
393
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
|
+
|
|
420
|
+
// ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.38.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js
|
|
421
|
+
var MediaSet_exports = {};
|
|
422
|
+
chunk6SCDLAU2_cjs.__export(MediaSet_exports, {
|
|
423
|
+
abort: () => abort,
|
|
424
|
+
calculate: () => calculate,
|
|
425
|
+
commit: () => commit,
|
|
426
|
+
create: () => create,
|
|
427
|
+
getRidByPath: () => getRidByPath,
|
|
428
|
+
info: () => info,
|
|
429
|
+
read: () => read,
|
|
430
|
+
readOriginal: () => readOriginal,
|
|
431
|
+
reference: () => reference,
|
|
432
|
+
retrieve: () => retrieve,
|
|
433
|
+
upload: () => upload,
|
|
434
|
+
uploadMedia: () => uploadMedia
|
|
435
|
+
});
|
|
436
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
437
|
+
var _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort", 2];
|
|
438
|
+
function abort($ctx, ...args) {
|
|
439
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _abort, ...args);
|
|
440
|
+
}
|
|
441
|
+
var _calculate = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate", 6];
|
|
442
|
+
function calculate($ctx, ...args) {
|
|
443
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _calculate, ...args);
|
|
444
|
+
}
|
|
445
|
+
var _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit", 2];
|
|
446
|
+
function commit($ctx, ...args) {
|
|
447
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _commit, ...args);
|
|
448
|
+
}
|
|
449
|
+
var _create = [1, "/v2/mediasets/{0}/transactions", 2];
|
|
450
|
+
function create($ctx, ...args) {
|
|
451
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _create, ...args);
|
|
452
|
+
}
|
|
453
|
+
var _info = [0, "/v2/mediasets/{0}/items/{1}", 6];
|
|
454
|
+
function info($ctx, ...args) {
|
|
455
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _info, ...args);
|
|
456
|
+
}
|
|
457
|
+
var _reference = [0, "/v2/mediasets/{0}/items/{1}/reference", 6];
|
|
458
|
+
function reference($ctx, ...args) {
|
|
459
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _reference, ...args);
|
|
460
|
+
}
|
|
461
|
+
var _getRidByPath = [0, "/v2/mediasets/{0}/items/getRidByPath", 2];
|
|
462
|
+
function getRidByPath($ctx, ...args) {
|
|
463
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _getRidByPath, ...args);
|
|
464
|
+
}
|
|
465
|
+
var _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
|
|
466
|
+
function upload($ctx, ...args) {
|
|
467
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _upload, ...args);
|
|
468
|
+
}
|
|
469
|
+
var _read = [0, "/v2/mediasets/{0}/items/{1}/content", 6, , "*/*"];
|
|
470
|
+
function read($ctx, ...args) {
|
|
471
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _read, ...args);
|
|
472
|
+
}
|
|
473
|
+
var _readOriginal = [0, "/v2/mediasets/{0}/items/{1}/original", 6, , "*/*"];
|
|
474
|
+
function readOriginal($ctx, ...args) {
|
|
475
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _readOriginal, ...args);
|
|
476
|
+
}
|
|
477
|
+
var _retrieve = [0, "/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve", 6, , "*/*"];
|
|
478
|
+
function retrieve($ctx, ...args) {
|
|
479
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _retrieve, ...args);
|
|
480
|
+
}
|
|
481
|
+
var _uploadMedia = [2, "/v2/mediasets/media/upload", 7, "*/*"];
|
|
482
|
+
function uploadMedia($ctx, ...args) {
|
|
483
|
+
return chunkDZE6IAUU_cjs.foundryPlatformFetch($ctx, _uploadMedia, ...args);
|
|
484
|
+
}
|
|
485
|
+
|
|
394
486
|
// src/object/mediaUpload.ts
|
|
487
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
395
488
|
function isMediaReference(o) {
|
|
396
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";
|
|
397
490
|
}
|
|
398
491
|
function isMediaUpload(o) {
|
|
399
|
-
return typeof o === "object" && "
|
|
492
|
+
return typeof o === "object" && "fileName" in o && typeof o.fileName === "string" && "data" in o && typeof o.data === "object" && o.data instanceof Blob;
|
|
400
493
|
}
|
|
401
494
|
|
|
402
495
|
// src/util/interfaceUtils.ts
|
|
496
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
403
497
|
function isInterfaceActionParam(o) {
|
|
404
498
|
return o != null && typeof o === "object" && "$objectType" in o && "$primaryKey" in o;
|
|
405
499
|
}
|
|
@@ -411,16 +505,19 @@ function isInterfaceSpecifier(o) {
|
|
|
411
505
|
}
|
|
412
506
|
|
|
413
507
|
// src/util/isObjectSpecifiersObject.ts
|
|
508
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
414
509
|
function isObjectSpecifiersObject(o) {
|
|
415
510
|
return o && typeof o === "object" && typeof o.$apiName === "string" && o.$primaryKey != null;
|
|
416
511
|
}
|
|
417
512
|
|
|
418
513
|
// src/util/isOntologyObjectV2.ts
|
|
514
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
419
515
|
function isOntologyObjectV2(o) {
|
|
420
516
|
return o && typeof o === "object" && typeof o.__apiName === "string" && o.__primaryKey != null;
|
|
421
517
|
}
|
|
422
518
|
|
|
423
519
|
// src/util/isPoint.ts
|
|
520
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
424
521
|
function isPoint(o) {
|
|
425
522
|
return o && typeof o === "object" && "type" in o && o.type === "Point" && "coordinates" in o && o.coordinates.length === 2;
|
|
426
523
|
}
|
|
@@ -438,46 +535,46 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
438
535
|
if (values.some((dataValue) => isAttachmentUpload(dataValue) || isAttachmentFile(dataValue))) {
|
|
439
536
|
const converted = [];
|
|
440
537
|
for (const value2 of values) {
|
|
441
|
-
converted.push(await toDataValue(value2, client
|
|
538
|
+
converted.push(await toDataValue(value2, client));
|
|
442
539
|
}
|
|
443
540
|
return converted;
|
|
444
541
|
}
|
|
445
|
-
const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client
|
|
542
|
+
const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client));
|
|
446
543
|
return Promise.all(promiseArray);
|
|
447
544
|
}
|
|
448
545
|
if (isAttachmentUpload(value)) {
|
|
449
|
-
const attachment = await
|
|
546
|
+
const attachment = await chunkDZE6IAUU_cjs.Attachment_exports.upload(client, value.data, {
|
|
450
547
|
filename: value.name
|
|
451
548
|
});
|
|
452
|
-
return await toDataValue(attachment.rid, client
|
|
549
|
+
return await toDataValue(attachment.rid, client);
|
|
453
550
|
}
|
|
454
551
|
if (isAttachmentFile(value)) {
|
|
455
|
-
const attachment = await
|
|
552
|
+
const attachment = await chunkDZE6IAUU_cjs.Attachment_exports.upload(client, value, {
|
|
456
553
|
filename: value.name
|
|
457
554
|
});
|
|
458
|
-
return await toDataValue(attachment.rid, client
|
|
555
|
+
return await toDataValue(attachment.rid, client);
|
|
459
556
|
}
|
|
460
557
|
if (isMediaUpload(value)) {
|
|
461
|
-
const mediaRef = await
|
|
462
|
-
|
|
558
|
+
const mediaRef = await MediaSet_exports.uploadMedia(client, value.data, {
|
|
559
|
+
filename: value.fileName,
|
|
463
560
|
preview: true
|
|
464
561
|
});
|
|
465
|
-
return await toDataValue(mediaRef, client
|
|
562
|
+
return await toDataValue(mediaRef, client);
|
|
466
563
|
}
|
|
467
564
|
if (isOntologyObjectV2(value)) {
|
|
468
|
-
return await toDataValue(value.__primaryKey, client
|
|
565
|
+
return await toDataValue(value.__primaryKey, client);
|
|
469
566
|
}
|
|
470
567
|
if (isObjectSpecifiersObject(value)) {
|
|
471
|
-
return await toDataValue(value.$primaryKey, client
|
|
568
|
+
return await toDataValue(value.$primaryKey, client);
|
|
472
569
|
}
|
|
473
570
|
if (isPoint(value)) {
|
|
474
|
-
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client
|
|
571
|
+
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
|
|
475
572
|
}
|
|
476
|
-
if (
|
|
573
|
+
if (chunkDZE6IAUU_cjs.isWireObjectSet(value)) {
|
|
477
574
|
return value;
|
|
478
575
|
}
|
|
479
|
-
if (
|
|
480
|
-
return
|
|
576
|
+
if (chunkDZE6IAUU_cjs.isObjectSet(value)) {
|
|
577
|
+
return chunkDZE6IAUU_cjs.getWireObjectSet(value);
|
|
481
578
|
}
|
|
482
579
|
if (isMediaReference(value)) {
|
|
483
580
|
return value;
|
|
@@ -491,7 +588,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
491
588
|
if (typeof value === "object") {
|
|
492
589
|
return Object.entries(value).reduce(async (promisedAcc, [key, structValue]) => {
|
|
493
590
|
const acc = await promisedAcc;
|
|
494
|
-
acc[key] = await toDataValue(structValue, client
|
|
591
|
+
acc[key] = await toDataValue(structValue, client);
|
|
495
592
|
return acc;
|
|
496
593
|
}, Promise.resolve({}));
|
|
497
594
|
}
|
|
@@ -500,11 +597,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
500
597
|
|
|
501
598
|
// src/actions/applyAction.ts
|
|
502
599
|
async function applyAction(client, action, parameters, options = {}) {
|
|
503
|
-
const clientWithHeaders =
|
|
600
|
+
const clientWithHeaders = chunkDZE6IAUU_cjs.addUserAgentAndRequestContextHeaders(chunkDZE6IAUU_cjs.augmentRequestContext(client, (_) => ({
|
|
504
601
|
finalMethodCall: "applyAction"
|
|
505
602
|
})), action);
|
|
506
603
|
if (Array.isArray(parameters)) {
|
|
507
|
-
const response = await
|
|
604
|
+
const response = await chunkDZE6IAUU_cjs.Action_exports.applyBatch(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
508
605
|
requests: parameters ? await remapBatchActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)) : [],
|
|
509
606
|
options: {
|
|
510
607
|
returnEdits: options?.$returnEdits ? "ALL" : "NONE"
|
|
@@ -515,7 +612,7 @@ async function applyAction(client, action, parameters, options = {}) {
|
|
|
515
612
|
const edits = response.edits;
|
|
516
613
|
return options?.$returnEdits ? edits?.type === "edits" ? remapActionResponse(response) : edits : void 0;
|
|
517
614
|
} else {
|
|
518
|
-
const response = await
|
|
615
|
+
const response = await chunkDZE6IAUU_cjs.Action_exports.apply(clientWithHeaders, await client.ontologyRid, action.apiName, {
|
|
519
616
|
parameters: await remapActionParams(parameters, client, await client.ontologyProvider.getActionDefinition(action.apiName)),
|
|
520
617
|
options: {
|
|
521
618
|
mode: options?.$validateOnly ? "VALIDATE_ONLY" : "VALIDATE_AND_EXECUTE",
|
|
@@ -541,14 +638,14 @@ async function remapActionParams(params, client, actionMetadata) {
|
|
|
541
638
|
}
|
|
542
639
|
const parameterMap = {};
|
|
543
640
|
for (const [key, value] of Object.entries(params)) {
|
|
544
|
-
parameterMap[key] = await toDataValue(value, client
|
|
641
|
+
parameterMap[key] = await toDataValue(value, client);
|
|
545
642
|
}
|
|
546
643
|
return parameterMap;
|
|
547
644
|
}
|
|
548
645
|
async function remapBatchActionParams(params, client, actionMetadata) {
|
|
549
646
|
const remappedParams = await Promise.all(params.map(async (param) => {
|
|
550
647
|
return {
|
|
551
|
-
parameters: await remapActionParams(param, client
|
|
648
|
+
parameters: await remapActionParams(param, client)
|
|
552
649
|
};
|
|
553
650
|
}));
|
|
554
651
|
return remappedParams;
|
|
@@ -603,7 +700,23 @@ function remapActionResponse(response) {
|
|
|
603
700
|
}
|
|
604
701
|
}
|
|
605
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
|
+
|
|
606
718
|
// src/util/streamutils.ts
|
|
719
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
607
720
|
var START_TOKEN = new Uint8Array([123, 34, 100, 97, 116, 97, 34, 58, 91]);
|
|
608
721
|
var OBJECT_OPEN_CHAR_CODE = 123;
|
|
609
722
|
var OBJECT_CLOSE_CHAR_CODE = 125;
|
|
@@ -722,7 +835,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
722
835
|
}
|
|
723
836
|
}
|
|
724
837
|
async getLatestValue() {
|
|
725
|
-
const latestPointPromise =
|
|
838
|
+
const latestPointPromise = chunkDZE6IAUU_cjs.TimeSeriesValueBankProperty_exports.getLatestValue(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
726
839
|
latestPointPromise.then(
|
|
727
840
|
(latestPoint) => this.lastFetchedValue = latestPoint,
|
|
728
841
|
// eslint-disable-next-line no-console
|
|
@@ -738,7 +851,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
738
851
|
return allPoints;
|
|
739
852
|
}
|
|
740
853
|
async *asyncIterValues(query) {
|
|
741
|
-
const streamPointsIterator = await
|
|
854
|
+
const streamPointsIterator = await chunkDZE6IAUU_cjs.TimeSeriesValueBankProperty_exports.streamValues(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
742
855
|
range: getTimeRange(query)
|
|
743
856
|
} : {});
|
|
744
857
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -748,6 +861,7 @@ var GeotimeSeriesPropertyImpl = class {
|
|
|
748
861
|
};
|
|
749
862
|
|
|
750
863
|
// src/createMediaReferenceProperty.ts
|
|
864
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
751
865
|
var MediaReferencePropertyImpl = class {
|
|
752
866
|
#mediaReference;
|
|
753
867
|
#triplet;
|
|
@@ -765,13 +879,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
765
879
|
this.#mediaReference = mediaReference;
|
|
766
880
|
}
|
|
767
881
|
async fetchContents() {
|
|
768
|
-
return
|
|
882
|
+
return chunkDZE6IAUU_cjs.MediaReferenceProperty_exports.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
769
883
|
preview: true
|
|
770
884
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
771
885
|
});
|
|
772
886
|
}
|
|
773
887
|
async fetchMetadata() {
|
|
774
|
-
const r = await
|
|
888
|
+
const r = await chunkDZE6IAUU_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
775
889
|
preview: true
|
|
776
890
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
777
891
|
});
|
|
@@ -787,6 +901,7 @@ var MediaReferencePropertyImpl = class {
|
|
|
787
901
|
};
|
|
788
902
|
|
|
789
903
|
// src/createTimeseriesProperty.ts
|
|
904
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
790
905
|
var TimeSeriesPropertyImpl = class {
|
|
791
906
|
#triplet;
|
|
792
907
|
#client;
|
|
@@ -795,10 +910,10 @@ var TimeSeriesPropertyImpl = class {
|
|
|
795
910
|
this.#triplet = [objectApiName, primaryKey, propertyName];
|
|
796
911
|
}
|
|
797
912
|
async getFirstPoint() {
|
|
798
|
-
return
|
|
913
|
+
return chunkDZE6IAUU_cjs.TimeSeriesPropertyV2_exports.getFirstPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
799
914
|
}
|
|
800
915
|
async getLastPoint() {
|
|
801
|
-
return
|
|
916
|
+
return chunkDZE6IAUU_cjs.TimeSeriesPropertyV2_exports.getLastPoint(this.#client, await this.#client.ontologyRid, ...this.#triplet);
|
|
802
917
|
}
|
|
803
918
|
async getAllPoints(query) {
|
|
804
919
|
const allPoints = [];
|
|
@@ -808,7 +923,7 @@ var TimeSeriesPropertyImpl = class {
|
|
|
808
923
|
return allPoints;
|
|
809
924
|
}
|
|
810
925
|
async *asyncIterPoints(query) {
|
|
811
|
-
const streamPointsIterator = await
|
|
926
|
+
const streamPointsIterator = await chunkDZE6IAUU_cjs.TimeSeriesPropertyV2_exports.streamPoints(this.#client, await this.#client.ontologyRid, ...this.#triplet, query ? {
|
|
812
927
|
range: getTimeRange(query)
|
|
813
928
|
} : {});
|
|
814
929
|
for await (const timeseriesPoint of asyncIterPointsHelper(streamPointsIterator)) {
|
|
@@ -817,12 +932,20 @@ var TimeSeriesPropertyImpl = class {
|
|
|
817
932
|
}
|
|
818
933
|
};
|
|
819
934
|
|
|
935
|
+
// src/object/formatting/applyPropertyFormatter.ts
|
|
936
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
937
|
+
|
|
820
938
|
// src/object/formatting/formatBoolean.ts
|
|
939
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
821
940
|
function formatBoolean(value, rule) {
|
|
822
941
|
return value ? rule.valueIfTrue : rule.valueIfFalse;
|
|
823
942
|
}
|
|
824
943
|
|
|
944
|
+
// src/object/formatting/formatDateTime.ts
|
|
945
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
946
|
+
|
|
825
947
|
// src/object/formatting/propertyFormattingUtils.ts
|
|
948
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
826
949
|
function resolvePropertyReference(ref, objectData) {
|
|
827
950
|
if (ref.type === "constant") {
|
|
828
951
|
return ref.value;
|
|
@@ -972,6 +1095,7 @@ function formatRelativeToNow(date, locale, timezone) {
|
|
|
972
1095
|
}
|
|
973
1096
|
|
|
974
1097
|
// src/object/formatting/formatNumber.ts
|
|
1098
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
975
1099
|
function formatNumber(value, numberType, objectData, locale) {
|
|
976
1100
|
switch (numberType.type) {
|
|
977
1101
|
case "standard":
|
|
@@ -1185,10 +1309,21 @@ function formatPropertyValue(value, rule, objectData, options) {
|
|
|
1185
1309
|
}
|
|
1186
1310
|
}
|
|
1187
1311
|
|
|
1312
|
+
// src/object/convertWireToOsdkObjects/getDollarAs.ts
|
|
1313
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1314
|
+
|
|
1188
1315
|
// src/ontology/OntologyProvider.ts
|
|
1316
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1189
1317
|
var InterfaceDefinitions = Symbol("InterfaceDefinitions" );
|
|
1190
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
|
+
|
|
1191
1325
|
// src/object/convertWireToOsdkObjects/InternalSymbols.ts
|
|
1326
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1192
1327
|
var UnderlyingOsdkObject = Symbol("Underlying Object" );
|
|
1193
1328
|
var ObjectDefRef = Symbol("ObjectDefinition" );
|
|
1194
1329
|
var InterfaceDefRef = Symbol("InterfaceDefinition" );
|
|
@@ -1205,8 +1340,8 @@ function get$link(holder) {
|
|
|
1205
1340
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1206
1341
|
}).pivotTo(linkName);
|
|
1207
1342
|
const value = !linkDef.multiplicity ? {
|
|
1208
|
-
fetchOne: (options) =>
|
|
1209
|
-
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))
|
|
1210
1345
|
} : objectSet;
|
|
1211
1346
|
return [linkName, value];
|
|
1212
1347
|
})));
|
|
@@ -1222,8 +1357,8 @@ function get$linkForInterface(holder) {
|
|
|
1222
1357
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1223
1358
|
})).pivotTo(linkName);
|
|
1224
1359
|
const value = !linkDef.multiplicity ? {
|
|
1225
|
-
fetchOne: (options) =>
|
|
1226
|
-
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))
|
|
1227
1362
|
} : objectSet;
|
|
1228
1363
|
return [linkName, value];
|
|
1229
1364
|
})));
|
|
@@ -1231,7 +1366,7 @@ function get$linkForInterface(holder) {
|
|
|
1231
1366
|
|
|
1232
1367
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
1233
1368
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1234
|
-
const [objApiNamespace] =
|
|
1369
|
+
const [objApiNamespace] = chunkDZE6IAUU_cjs.extractNamespace(interfaceDef.apiName);
|
|
1235
1370
|
return Object.freeze(Object.defineProperties({}, {
|
|
1236
1371
|
// first to minimize hidden classes
|
|
1237
1372
|
[UnderlyingOsdkObject]: {
|
|
@@ -1290,7 +1425,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1290
1425
|
},
|
|
1291
1426
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1292
1427
|
const objDef = underlying[ObjectDefRef];
|
|
1293
|
-
const [apiNamespace, apiName] =
|
|
1428
|
+
const [apiNamespace, apiName] = chunkDZE6IAUU_cjs.extractNamespace(p);
|
|
1294
1429
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
1295
1430
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
1296
1431
|
enumerable: targetPropName in underlying,
|
|
@@ -1451,9 +1586,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1451
1586
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1452
1587
|
case "attachment":
|
|
1453
1588
|
if (Array.isArray(rawValue)) {
|
|
1454
|
-
return rawValue.map((a) =>
|
|
1589
|
+
return rawValue.map((a) => chunkDZE6IAUU_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1455
1590
|
} else {
|
|
1456
|
-
return
|
|
1591
|
+
return chunkDZE6IAUU_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1457
1592
|
}
|
|
1458
1593
|
default:
|
|
1459
1594
|
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 +1604,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1469
1604
|
}
|
|
1470
1605
|
if (propDef.type === "attachment") {
|
|
1471
1606
|
if (Array.isArray(rawValue)) {
|
|
1472
|
-
return rawValue.map((a) =>
|
|
1607
|
+
return rawValue.map((a) => chunkDZE6IAUU_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1473
1608
|
}
|
|
1474
|
-
return
|
|
1609
|
+
return chunkDZE6IAUU_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1475
1610
|
}
|
|
1476
1611
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1477
1612
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1628,7 +1763,11 @@ function fixObjectPropertiesInPlace(objs, forceRemoveRid) {
|
|
|
1628
1763
|
}
|
|
1629
1764
|
}
|
|
1630
1765
|
|
|
1766
|
+
// src/ontology/StandardOntologyProvider.ts
|
|
1767
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1768
|
+
|
|
1631
1769
|
// src/object/Cache.ts
|
|
1770
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1632
1771
|
function createClientCache(fn) {
|
|
1633
1772
|
const cache = /* @__PURE__ */ new WeakMap();
|
|
1634
1773
|
function get(client, key) {
|
|
@@ -1685,6 +1824,7 @@ function createAsyncClientCache(fn, createCacheLocal = createClientCache) {
|
|
|
1685
1824
|
}
|
|
1686
1825
|
|
|
1687
1826
|
// src/util/deepFreeze.ts
|
|
1827
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1688
1828
|
function deepFreeze(obj) {
|
|
1689
1829
|
Object.getOwnPropertyNames(obj).forEach((name) => {
|
|
1690
1830
|
const prop = obj[name];
|
|
@@ -1694,14 +1834,20 @@ function deepFreeze(obj) {
|
|
|
1694
1834
|
});
|
|
1695
1835
|
return Object.freeze(obj);
|
|
1696
1836
|
}
|
|
1837
|
+
|
|
1838
|
+
// src/ontology/loadActionMetadata.ts
|
|
1839
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1697
1840
|
async function loadActionMetadata(client, actionType) {
|
|
1698
|
-
const r = await
|
|
1841
|
+
const r = await chunkDZE6IAUU_cjs.ActionTypeV2_exports.get(client, await client.ontologyRid, actionType, {
|
|
1699
1842
|
branch: client.branch
|
|
1700
1843
|
});
|
|
1701
1844
|
return generatorConverters.wireActionTypeV2ToSdkActionMetadata(r);
|
|
1702
1845
|
}
|
|
1846
|
+
|
|
1847
|
+
// src/ontology/loadFullObjectMetadata.ts
|
|
1848
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1703
1849
|
async function loadFullObjectMetadata(client, objectType) {
|
|
1704
|
-
const full = await
|
|
1850
|
+
const full = await chunkDZE6IAUU_cjs.ObjectTypeV2_exports.getFullMetadata(client, await client.ontologyRid, objectType, {
|
|
1705
1851
|
preview: true,
|
|
1706
1852
|
branch: client.branch
|
|
1707
1853
|
});
|
|
@@ -1710,16 +1856,22 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1710
1856
|
...ret
|
|
1711
1857
|
};
|
|
1712
1858
|
}
|
|
1859
|
+
|
|
1860
|
+
// src/ontology/loadInterfaceMetadata.ts
|
|
1861
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1713
1862
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1714
|
-
const r = await
|
|
1863
|
+
const r = await chunkDZE6IAUU_cjs.OntologyInterface_exports.get(client, await client.ontologyRid, objectType, {
|
|
1715
1864
|
preview: true,
|
|
1716
1865
|
branch: client.branch
|
|
1717
1866
|
});
|
|
1718
1867
|
return generatorConverters.__UNSTABLE_wireInterfaceTypeV2ToSdkObjectDefinition(r, true);
|
|
1719
1868
|
}
|
|
1869
|
+
|
|
1870
|
+
// src/ontology/loadQueryMetadata.ts
|
|
1871
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1720
1872
|
async function loadQueryMetadata(client, queryTypeApiNameAndVersion) {
|
|
1721
1873
|
const [apiName, version] = queryTypeApiNameAndVersion.split(":");
|
|
1722
|
-
const r = await
|
|
1874
|
+
const r = await chunkDZE6IAUU_cjs.QueryType_exports.get(client, await client.ontologyRid, apiName, {
|
|
1723
1875
|
version
|
|
1724
1876
|
});
|
|
1725
1877
|
return generatorConverters.wireQueryTypeV2ToSdkQueryMetadata(r);
|
|
@@ -1776,11 +1928,12 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1776
1928
|
};
|
|
1777
1929
|
|
|
1778
1930
|
// src/util/UserAgent.ts
|
|
1779
|
-
|
|
1780
|
-
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"}`;
|
|
1781
1934
|
|
|
1782
1935
|
// src/createMinimalClient.ts
|
|
1783
|
-
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) {
|
|
1784
1937
|
if (process.env.NODE_ENV !== "production") {
|
|
1785
1938
|
try {
|
|
1786
1939
|
new URL(baseUrl);
|
|
@@ -1810,6 +1963,7 @@ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fet
|
|
|
1810
1963
|
}
|
|
1811
1964
|
|
|
1812
1965
|
// src/fetchMetadata.ts
|
|
1966
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1813
1967
|
var fetchMetadataInternal = async (client, definition) => {
|
|
1814
1968
|
if (definition.type === "object") {
|
|
1815
1969
|
const {
|
|
@@ -1828,7 +1982,11 @@ var fetchMetadataInternal = async (client, definition) => {
|
|
|
1828
1982
|
}
|
|
1829
1983
|
};
|
|
1830
1984
|
|
|
1985
|
+
// src/queries/applyQuery.ts
|
|
1986
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1987
|
+
|
|
1831
1988
|
// src/util/toDataValueQueries.ts
|
|
1989
|
+
chunk6SCDLAU2_cjs.init_cjs_shims();
|
|
1832
1990
|
async function toDataValueQueries(value, client, desiredType) {
|
|
1833
1991
|
if (value == null) {
|
|
1834
1992
|
return value;
|
|
@@ -1848,13 +2006,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1848
2006
|
switch (desiredType.type) {
|
|
1849
2007
|
case "attachment": {
|
|
1850
2008
|
if (isAttachmentUpload(value)) {
|
|
1851
|
-
const attachment = await
|
|
2009
|
+
const attachment = await chunkDZE6IAUU_cjs.Attachment_exports.upload(client, value.data, {
|
|
1852
2010
|
filename: value.name
|
|
1853
2011
|
});
|
|
1854
2012
|
return attachment.rid;
|
|
1855
2013
|
}
|
|
1856
2014
|
if (isAttachmentFile(value)) {
|
|
1857
|
-
const attachment = await
|
|
2015
|
+
const attachment = await chunkDZE6IAUU_cjs.Attachment_exports.upload(client, value, {
|
|
1858
2016
|
filename: value.name
|
|
1859
2017
|
});
|
|
1860
2018
|
return attachment.rid;
|
|
@@ -1894,11 +2052,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1894
2052
|
}
|
|
1895
2053
|
case "objectSet":
|
|
1896
2054
|
case "interfaceObjectSet": {
|
|
1897
|
-
if (
|
|
2055
|
+
if (chunkDZE6IAUU_cjs.isWireObjectSet(value)) {
|
|
1898
2056
|
return value;
|
|
1899
2057
|
}
|
|
1900
|
-
if (
|
|
1901
|
-
return
|
|
2058
|
+
if (chunkDZE6IAUU_cjs.isObjectSet(value)) {
|
|
2059
|
+
return chunkDZE6IAUU_cjs.getWireObjectSet(value);
|
|
1902
2060
|
}
|
|
1903
2061
|
break;
|
|
1904
2062
|
}
|
|
@@ -1940,7 +2098,7 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
1940
2098
|
// src/queries/applyQuery.ts
|
|
1941
2099
|
async function applyQuery(client, query, params) {
|
|
1942
2100
|
const qd = client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : void 0);
|
|
1943
|
-
const response = await
|
|
2101
|
+
const response = await chunkDZE6IAUU_cjs.Query_exports.execute(chunkDZE6IAUU_cjs.addUserAgentAndRequestContextHeaders(chunkDZE6IAUU_cjs.augmentRequestContext(client, (_) => ({
|
|
1944
2102
|
finalMethodCall: "applyQuery"
|
|
1945
2103
|
})), query), await client.ontologyRid, query.apiName, {
|
|
1946
2104
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
@@ -1987,7 +2145,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
1987
2145
|
return responseValue;
|
|
1988
2146
|
}
|
|
1989
2147
|
case "attachment": {
|
|
1990
|
-
return
|
|
2148
|
+
return chunkDZE6IAUU_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
1991
2149
|
}
|
|
1992
2150
|
case "object": {
|
|
1993
2151
|
const def = definitions.get(responseDataType.object);
|
|
@@ -2009,7 +2167,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2009
2167
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2010
2168
|
}
|
|
2011
2169
|
if (typeof responseValue === "string") {
|
|
2012
|
-
return
|
|
2170
|
+
return chunkDZE6IAUU_cjs.createObjectSet(def, client, {
|
|
2013
2171
|
type: "intersect",
|
|
2014
2172
|
objectSets: [{
|
|
2015
2173
|
type: "base",
|
|
@@ -2020,7 +2178,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2020
2178
|
}]
|
|
2021
2179
|
});
|
|
2022
2180
|
}
|
|
2023
|
-
return
|
|
2181
|
+
return chunkDZE6IAUU_cjs.createObjectSet(def, client, responseValue);
|
|
2024
2182
|
}
|
|
2025
2183
|
case "struct": {
|
|
2026
2184
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2206,7 +2364,7 @@ function createClientInternal(objectSetFactory, transactionRid, baseUrl, ontolog
|
|
|
2206
2364
|
ontologyRid
|
|
2207
2365
|
}, baseUrl, tokenProvider, {
|
|
2208
2366
|
...options,
|
|
2209
|
-
logger: options?.logger ?? new
|
|
2367
|
+
logger: options?.logger ?? new chunkDZE6IAUU_cjs.MinimalLogger(),
|
|
2210
2368
|
transactionRid,
|
|
2211
2369
|
branch: options?.branch
|
|
2212
2370
|
}, fetchFn, objectSetFactory);
|
|
@@ -2229,7 +2387,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2229
2387
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2230
2388
|
return {
|
|
2231
2389
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2232
|
-
return await
|
|
2390
|
+
return await chunkDZE6IAUU_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2233
2391
|
}
|
|
2234
2392
|
};
|
|
2235
2393
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2241,7 +2399,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2241
2399
|
objectType,
|
|
2242
2400
|
propertyType
|
|
2243
2401
|
} = args;
|
|
2244
|
-
return await
|
|
2402
|
+
return await chunkDZE6IAUU_cjs.MediaReferenceProperty_exports.upload(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
2245
2403
|
mediaItemPath: fileName,
|
|
2246
2404
|
preview: true
|
|
2247
2405
|
});
|
|
@@ -2250,10 +2408,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2250
2408
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2251
2409
|
return {
|
|
2252
2410
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2253
|
-
return await
|
|
2411
|
+
return await chunkDZE6IAUU_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2254
2412
|
},
|
|
2255
2413
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2256
|
-
return await
|
|
2414
|
+
return await chunkDZE6IAUU_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2257
2415
|
}
|
|
2258
2416
|
};
|
|
2259
2417
|
}
|
|
@@ -2265,13 +2423,13 @@ function createClientFromContext(clientCtx) {
|
|
|
2265
2423
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
2266
2424
|
const symbolClientContext2 = "__osdkClientContext";
|
|
2267
2425
|
const client = Object.defineProperties(clientFn, {
|
|
2268
|
-
[
|
|
2426
|
+
[chunkDZE6IAUU_cjs.symbolClientContext]: {
|
|
2269
2427
|
value: clientCtx
|
|
2270
2428
|
},
|
|
2271
2429
|
[symbolClientContext2]: {
|
|
2272
2430
|
value: clientCtx
|
|
2273
2431
|
},
|
|
2274
|
-
[
|
|
2432
|
+
[chunkDZE6IAUU_cjs.additionalContext]: {
|
|
2275
2433
|
value: clientCtx
|
|
2276
2434
|
},
|
|
2277
2435
|
fetchMetadata: {
|
|
@@ -2280,8 +2438,8 @@ function createClientFromContext(clientCtx) {
|
|
|
2280
2438
|
});
|
|
2281
2439
|
return client;
|
|
2282
2440
|
}
|
|
2283
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2284
|
-
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);
|
|
2285
2443
|
function createWithRid(rids) {
|
|
2286
2444
|
const withRid = {
|
|
2287
2445
|
type: "static",
|
|
@@ -2301,5 +2459,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
2301
2459
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2302
2460
|
exports.createObjectSpecifierFromPrimaryKey = createObjectSpecifierFromPrimaryKey;
|
|
2303
2461
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
2304
|
-
//# sourceMappingURL=chunk-
|
|
2305
|
-
//# sourceMappingURL=chunk-
|
|
2462
|
+
//# sourceMappingURL=chunk-S4JPAF56.cjs.map
|
|
2463
|
+
//# sourceMappingURL=chunk-S4JPAF56.cjs.map
|