@osdk/client 2.26.0 → 2.27.0
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 +13 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/scenarios/ScenarioClient.js +10 -4
- package/build/browser/scenarios/ScenarioClient.js.map +1 -1
- package/build/browser/scenarios/createScenario.js +3 -1
- package/build/browser/scenarios/createScenario.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/MediaReferenceProperty-SYUA2YYQ.cjs +22 -0
- package/build/cjs/{MediaReferenceProperty-CBPMMD73.cjs.map → MediaReferenceProperty-SYUA2YYQ.cjs.map} +1 -1
- package/build/cjs/{applyStreamingQuery-US6OU3WN.cjs → applyStreamingQuery-ZUGQCOWE.cjs} +13 -13
- package/build/cjs/{applyStreamingQuery-US6OU3WN.cjs.map → applyStreamingQuery-ZUGQCOWE.cjs.map} +1 -1
- package/build/cjs/{chunk-GVKJAORH.cjs → chunk-5QXHJGSL.cjs} +75 -75
- package/build/cjs/{chunk-GVKJAORH.cjs.map → chunk-5QXHJGSL.cjs.map} +1 -1
- package/build/cjs/{chunk-YP43NHIA.cjs → chunk-AN2R7X5W.cjs} +7 -7
- package/build/cjs/{chunk-YP43NHIA.cjs.map → chunk-AN2R7X5W.cjs.map} +1 -1
- package/build/cjs/{chunk-D26YLHTV.cjs → chunk-H6PXPU6F.cjs} +2 -2
- package/build/cjs/{chunk-D26YLHTV.cjs.map → chunk-H6PXPU6F.cjs.map} +1 -1
- package/build/cjs/{chunk-ZFNHWPQA.cjs → chunk-HRWHTCP3.cjs} +23 -23
- package/build/cjs/{chunk-ZFNHWPQA.cjs.map → chunk-HRWHTCP3.cjs.map} +1 -1
- package/build/cjs/{chunk-W2AWD4AH.cjs → chunk-SVB5K454.cjs} +93 -87
- package/build/cjs/chunk-SVB5K454.cjs.map +1 -0
- package/build/cjs/{chunk-CAUXOFUO.cjs → chunk-YLVUONG3.cjs} +16 -16
- package/build/cjs/chunk-YLVUONG3.cjs.map +1 -0
- package/build/cjs/{chunk-42JVCEPG.cjs → chunk-YRGYLMU5.cjs} +18 -18
- package/build/cjs/{chunk-42JVCEPG.cjs.map → chunk-YRGYLMU5.cjs.map} +1 -1
- package/build/cjs/index.cjs +14 -14
- package/build/cjs/public/experimental.cjs +9 -9
- package/build/cjs/public/internal.cjs +9 -9
- package/build/cjs/public/observable.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +20 -18
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/{transformAndWaitInternal-2GORZXPK.cjs → transformAndWaitInternal-JGUDGNDJ.cjs} +7 -7
- package/build/cjs/{transformAndWaitInternal-2GORZXPK.cjs.map → transformAndWaitInternal-JGUDGNDJ.cjs.map} +1 -1
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/scenarios/ScenarioClient.js +10 -4
- package/build/esm/scenarios/ScenarioClient.js.map +1 -1
- package/build/esm/scenarios/createScenario.js +3 -1
- package/build/esm/scenarios/createScenario.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/Client.d.ts +1 -1
- package/package.json +12 -12
- package/build/cjs/MediaReferenceProperty-CBPMMD73.cjs +0 -22
- package/build/cjs/chunk-CAUXOFUO.cjs.map +0 -1
- package/build/cjs/chunk-W2AWD4AH.cjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYRGYLMU5_cjs = require('./chunk-YRGYLMU5.cjs');
|
|
4
4
|
var chunkYJG67XL4_cjs = require('./chunk-YJG67XL4.cjs');
|
|
5
5
|
var chunkTQUNF2DZ_cjs = require('./chunk-TQUNF2DZ.cjs');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var chunkYLVUONG3_cjs = require('./chunk-YLVUONG3.cjs');
|
|
7
|
+
var chunkHRWHTCP3_cjs = require('./chunk-HRWHTCP3.cjs');
|
|
8
8
|
var chunkCEBSLQQC_cjs = require('./chunk-CEBSLQQC.cjs');
|
|
9
|
-
var
|
|
10
|
-
var
|
|
9
|
+
var chunkAN2R7X5W_cjs = require('./chunk-AN2R7X5W.cjs');
|
|
10
|
+
var chunkH6PXPU6F_cjs = require('./chunk-H6PXPU6F.cjs');
|
|
11
11
|
var chunk74HV6NQQ_cjs = require('./chunk-74HV6NQQ.cjs');
|
|
12
12
|
var unstable = require('@osdk/api/unstable');
|
|
13
13
|
var invariant2 = require('tiny-invariant');
|
|
@@ -26,35 +26,35 @@ var ActionValidationError = class extends Error {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
29
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Action.js
|
|
30
30
|
var _apply = [1, "/v2/ontologies/{0}/actions/{1}/apply", 7];
|
|
31
31
|
function apply($ctx, ...args) {
|
|
32
|
-
return
|
|
32
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _apply, ...args);
|
|
33
33
|
}
|
|
34
34
|
var _applyBatch = [1, "/v2/ontologies/{0}/actions/{1}/applyBatch", 3];
|
|
35
35
|
function applyBatch($ctx, ...args) {
|
|
36
|
-
return
|
|
36
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _applyBatch, ...args);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
39
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ActionTypeV2.js
|
|
40
40
|
var _get = [0, "/v2/ontologies/{0}/actionTypes/{1}", 2];
|
|
41
41
|
function get($ctx, ...args) {
|
|
42
|
-
return
|
|
42
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _get, ...args);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
45
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/ObjectTypeV2.js
|
|
46
46
|
var _getFullMetadata = [0, "/v2/ontologies/{0}/objectTypes/{1}/fullMetadata", 2];
|
|
47
47
|
function getFullMetadata($ctx, ...args) {
|
|
48
|
-
return
|
|
48
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _getFullMetadata, ...args);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
51
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyInterface.js
|
|
52
52
|
var _get2 = [0, "/v2/ontologies/{0}/interfaceTypes/{1}", 2];
|
|
53
53
|
function get2($ctx, ...args) {
|
|
54
|
-
return
|
|
54
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _get2, ...args);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
57
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyScenario.js
|
|
58
58
|
var OntologyScenario_exports = {};
|
|
59
59
|
chunk74HV6NQQ_cjs.__export(OntologyScenario_exports, {
|
|
60
60
|
createScenario: () => createScenario,
|
|
@@ -64,59 +64,59 @@ chunk74HV6NQQ_cjs.__export(OntologyScenario_exports, {
|
|
|
64
64
|
listScenarioEditedObjectTypes: () => listScenarioEditedObjectTypes,
|
|
65
65
|
listScenarioEditedObjects: () => listScenarioEditedObjects
|
|
66
66
|
});
|
|
67
|
-
var _createScenario = [1, "/v2/ontologies/{0}/scenarios/create",
|
|
67
|
+
var _createScenario = [1, "/v2/ontologies/{0}/scenarios/create", 3];
|
|
68
68
|
function createScenario($ctx, ...args) {
|
|
69
|
-
return
|
|
69
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _createScenario, ...args);
|
|
70
70
|
}
|
|
71
|
-
var _listScenarioEditedObjectTypes = [0, "/v2/ontologies/{0}/scenarios/{1}/objectTypes/edited"];
|
|
71
|
+
var _listScenarioEditedObjectTypes = [0, "/v2/ontologies/{0}/scenarios/{1}/objectTypes/edited", 2];
|
|
72
72
|
function listScenarioEditedObjectTypes($ctx, ...args) {
|
|
73
|
-
return
|
|
73
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _listScenarioEditedObjectTypes, ...args);
|
|
74
74
|
}
|
|
75
|
-
var _listScenarioEditedLinkTypes = [0, "/v2/ontologies/{0}/scenarios/{1}/objectTypes/{2}/outgoingLinkTypes/edited"];
|
|
75
|
+
var _listScenarioEditedLinkTypes = [0, "/v2/ontologies/{0}/scenarios/{1}/objectTypes/{2}/outgoingLinkTypes/edited", 2];
|
|
76
76
|
function listScenarioEditedLinkTypes($ctx, ...args) {
|
|
77
|
-
return
|
|
77
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _listScenarioEditedLinkTypes, ...args);
|
|
78
78
|
}
|
|
79
|
-
var _listScenarioEditedEntityTypes = [0, "/v2/ontologies/{0}/scenarios/{1}/editedEntityTypes"];
|
|
79
|
+
var _listScenarioEditedEntityTypes = [0, "/v2/ontologies/{0}/scenarios/{1}/editedEntityTypes", 2];
|
|
80
80
|
function listScenarioEditedEntityTypes($ctx, ...args) {
|
|
81
|
-
return
|
|
81
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _listScenarioEditedEntityTypes, ...args);
|
|
82
82
|
}
|
|
83
83
|
var _listScenarioEditedObjects = [0, "/v2/ontologies/{0}/scenarios/{1}/objects/{2}/edited", 2];
|
|
84
84
|
function listScenarioEditedObjects($ctx, ...args) {
|
|
85
|
-
return
|
|
85
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _listScenarioEditedObjects, ...args);
|
|
86
86
|
}
|
|
87
87
|
var _listScenarioEditedLinks = [0, "/v2/ontologies/{0}/scenarios/{1}/objects/{2}/links/{3}/edited", 2];
|
|
88
88
|
function listScenarioEditedLinks($ctx, ...args) {
|
|
89
|
-
return
|
|
89
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _listScenarioEditedLinks, ...args);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
92
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/QueryType.js
|
|
93
93
|
var _get3 = [0, "/v2/ontologies/{0}/queryTypes/{1}", 2];
|
|
94
94
|
function get3($ctx, ...args) {
|
|
95
|
-
return
|
|
95
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _get3, ...args);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
98
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesPropertyV2.js
|
|
99
99
|
var _getFirstPoint = [0, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/firstPoint", 2];
|
|
100
100
|
function getFirstPoint($ctx, ...args) {
|
|
101
|
-
return
|
|
101
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _getFirstPoint, ...args);
|
|
102
102
|
}
|
|
103
103
|
var _getLastPoint = [0, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/lastPoint", 2];
|
|
104
104
|
function getLastPoint($ctx, ...args) {
|
|
105
|
-
return
|
|
105
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _getLastPoint, ...args);
|
|
106
106
|
}
|
|
107
107
|
var _streamPoints = [1, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamPoints", 3, , "*/*"];
|
|
108
108
|
function streamPoints($ctx, ...args) {
|
|
109
|
-
return
|
|
109
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _streamPoints, ...args);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
112
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/TimeSeriesValueBankProperty.js
|
|
113
113
|
var _getLatestValue = [0, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/latestValue", 2];
|
|
114
114
|
function getLatestValue($ctx, ...args) {
|
|
115
|
-
return
|
|
115
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _getLatestValue, ...args);
|
|
116
116
|
}
|
|
117
117
|
var _streamValues = [1, "/v2/ontologies/{0}/objects/{1}/{2}/timeseries/{3}/streamValues", 3, , "*/*"];
|
|
118
118
|
function streamValues($ctx, ...args) {
|
|
119
|
-
return
|
|
119
|
+
return chunkH6PXPU6F_cjs.foundryPlatformFetch($ctx, _streamValues, ...args);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// src/scenarios/ScenarioClient.ts
|
|
@@ -124,7 +124,7 @@ function isScenarioClient(value) {
|
|
|
124
124
|
return value != null && (typeof value === "object" || typeof value === "function") && typeof value.getScenarioReference === "function";
|
|
125
125
|
}
|
|
126
126
|
function buildScenarioClient(parent, scenarioRid) {
|
|
127
|
-
const ctx = parent[
|
|
127
|
+
const ctx = parent[chunkYLVUONG3_cjs.additionalContext];
|
|
128
128
|
if (ctx.transactionId != null) {
|
|
129
129
|
throw new Error("withScenario / createScenario: the supplied client already has an active transaction. Scenarios cannot be nested on transactions.");
|
|
130
130
|
}
|
|
@@ -135,10 +135,12 @@ function buildScenarioClient(parent, scenarioRid) {
|
|
|
135
135
|
logger: ctx.logger,
|
|
136
136
|
UNSTABLE_DO_NOT_USE_BRANCH: ctx.branch
|
|
137
137
|
}, ctx.fetch);
|
|
138
|
-
const innerCtx = inner[
|
|
138
|
+
const innerCtx = inner[chunkYLVUONG3_cjs.additionalContext];
|
|
139
139
|
async function getEditedEntityTypes() {
|
|
140
140
|
const ontologyRid = await innerCtx.ontologyRid;
|
|
141
|
-
const response = await OntologyScenario_exports.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid
|
|
141
|
+
const response = await OntologyScenario_exports.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid, {
|
|
142
|
+
preview: true
|
|
143
|
+
});
|
|
142
144
|
return {
|
|
143
145
|
objectTypes: response.objectTypes,
|
|
144
146
|
linkTypes: response.linkTypes
|
|
@@ -148,7 +150,8 @@ function buildScenarioClient(parent, scenarioRid) {
|
|
|
148
150
|
const ontologyRid = await innerCtx.ontologyRid;
|
|
149
151
|
const response = await OntologyScenario_exports.listScenarioEditedObjects(innerCtx, ontologyRid, scenarioRid, objectType.apiName, {
|
|
150
152
|
pageSize: options?.pageSize,
|
|
151
|
-
pageToken: options?.pageToken
|
|
153
|
+
pageToken: options?.pageToken,
|
|
154
|
+
preview: true
|
|
152
155
|
});
|
|
153
156
|
const data = response.data.map((entry) => {
|
|
154
157
|
const wire = entry;
|
|
@@ -181,14 +184,17 @@ function buildScenarioClient(parent, scenarioRid) {
|
|
|
181
184
|
}
|
|
182
185
|
async function getEditedLinkTypes(sourceObjectType) {
|
|
183
186
|
const ontologyRid = await innerCtx.ontologyRid;
|
|
184
|
-
const response = await OntologyScenario_exports.listScenarioEditedLinkTypes(innerCtx, ontologyRid, scenarioRid, sourceObjectType.apiName
|
|
187
|
+
const response = await OntologyScenario_exports.listScenarioEditedLinkTypes(innerCtx, ontologyRid, scenarioRid, sourceObjectType.apiName, {
|
|
188
|
+
preview: true
|
|
189
|
+
});
|
|
185
190
|
return response.data;
|
|
186
191
|
}
|
|
187
192
|
async function getEditedLinks(sourceObjectType, linkType, options) {
|
|
188
193
|
const ontologyRid = await innerCtx.ontologyRid;
|
|
189
194
|
const response = await OntologyScenario_exports.listScenarioEditedLinks(innerCtx, ontologyRid, scenarioRid, sourceObjectType.apiName, linkType, {
|
|
190
195
|
pageSize: options?.pageSize,
|
|
191
|
-
pageToken: options?.pageToken
|
|
196
|
+
pageToken: options?.pageToken,
|
|
197
|
+
preview: true
|
|
192
198
|
});
|
|
193
199
|
const data = [];
|
|
194
200
|
for (const entry of response.data) {
|
|
@@ -276,7 +282,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
276
282
|
}
|
|
277
283
|
if (Array.isArray(value) || value instanceof Set) {
|
|
278
284
|
const values = Array.from(value);
|
|
279
|
-
if (values.some((dataValue) =>
|
|
285
|
+
if (values.some((dataValue) => chunkYRGYLMU5_cjs.isAttachmentUpload(dataValue) || chunkYRGYLMU5_cjs.isAttachmentFile(dataValue))) {
|
|
280
286
|
const converted = [];
|
|
281
287
|
for (const value2 of values) {
|
|
282
288
|
converted.push(await toDataValue(value2, client));
|
|
@@ -286,47 +292,47 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
286
292
|
const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client));
|
|
287
293
|
return Promise.all(promiseArray);
|
|
288
294
|
}
|
|
289
|
-
if (
|
|
290
|
-
const attachment = await
|
|
295
|
+
if (chunkYRGYLMU5_cjs.isAttachmentUpload(value)) {
|
|
296
|
+
const attachment = await chunkYLVUONG3_cjs.upload(client, value.data, {
|
|
291
297
|
filename: value.name
|
|
292
298
|
});
|
|
293
299
|
return await toDataValue(attachment.rid, client);
|
|
294
300
|
}
|
|
295
|
-
if (
|
|
296
|
-
const attachment = await
|
|
301
|
+
if (chunkYRGYLMU5_cjs.isAttachmentFile(value)) {
|
|
302
|
+
const attachment = await chunkYLVUONG3_cjs.upload(client, value, {
|
|
297
303
|
filename: value.name
|
|
298
304
|
});
|
|
299
305
|
return await toDataValue(attachment.rid, client);
|
|
300
306
|
}
|
|
301
|
-
if (
|
|
302
|
-
const mediaRef = await
|
|
307
|
+
if (chunkYRGYLMU5_cjs.isMediaUpload(value)) {
|
|
308
|
+
const mediaRef = await chunkHRWHTCP3_cjs.MediaSet_exports.uploadMedia(client, value.data, {
|
|
303
309
|
filename: value.fileName,
|
|
304
310
|
preview: true
|
|
305
311
|
});
|
|
306
312
|
return await toDataValue(mediaRef, client);
|
|
307
313
|
}
|
|
308
|
-
if (
|
|
314
|
+
if (chunkYRGYLMU5_cjs.isMedia(value)) {
|
|
309
315
|
return value.getMediaReference();
|
|
310
316
|
}
|
|
311
|
-
if (
|
|
317
|
+
if (chunkYRGYLMU5_cjs.isMediaReference(value)) {
|
|
312
318
|
return value;
|
|
313
319
|
}
|
|
314
320
|
if (isOntologyObjectV2(value)) {
|
|
315
321
|
return await toDataValue(value.__primaryKey, client);
|
|
316
322
|
}
|
|
317
|
-
if (
|
|
323
|
+
if (chunkYRGYLMU5_cjs.isObjectSpecifiersObject(value)) {
|
|
318
324
|
return await toDataValue(value.$primaryKey, client);
|
|
319
325
|
}
|
|
320
326
|
if (isPoint(value)) {
|
|
321
327
|
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
|
|
322
328
|
}
|
|
323
|
-
if (
|
|
329
|
+
if (chunkYLVUONG3_cjs.isWireObjectSet(value)) {
|
|
324
330
|
return value;
|
|
325
331
|
}
|
|
326
|
-
if (
|
|
327
|
-
return
|
|
332
|
+
if (chunkYLVUONG3_cjs.isObjectSet(value)) {
|
|
333
|
+
return chunkYLVUONG3_cjs.getWireObjectSet(value);
|
|
328
334
|
}
|
|
329
|
-
if (
|
|
335
|
+
if (chunkYRGYLMU5_cjs.isInterfaceActionParam(value)) {
|
|
330
336
|
return {
|
|
331
337
|
objectTypeApiName: value.$objectType,
|
|
332
338
|
primaryKeyValue: value.$primaryKey
|
|
@@ -347,7 +353,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
347
353
|
|
|
348
354
|
// src/actions/applyAction.ts
|
|
349
355
|
async function applyAction(client, action, parameters, options = {}) {
|
|
350
|
-
const clientWithHeaders =
|
|
356
|
+
const clientWithHeaders = chunkYLVUONG3_cjs.addUserAgentAndRequestContextHeaders(chunkYLVUONG3_cjs.augmentRequestContext(client, (_) => ({
|
|
351
357
|
finalMethodCall: "applyAction"
|
|
352
358
|
})), action);
|
|
353
359
|
if (Array.isArray(parameters)) {
|
|
@@ -479,7 +485,7 @@ function getTimeRange(body) {
|
|
|
479
485
|
}
|
|
480
486
|
async function* asyncIterPointsHelper(iterator) {
|
|
481
487
|
const reader = iterator.body?.getReader();
|
|
482
|
-
for await (const point of
|
|
488
|
+
for await (const point of chunkYRGYLMU5_cjs.parseStreamedResponse(chunkYRGYLMU5_cjs.iterateReadableStream(reader))) {
|
|
483
489
|
yield {
|
|
484
490
|
time: point.time,
|
|
485
491
|
value: point.value
|
|
@@ -542,13 +548,13 @@ var MediaReferencePropertyImpl = class {
|
|
|
542
548
|
this.#mediaReference = mediaReference;
|
|
543
549
|
}
|
|
544
550
|
async fetchContents() {
|
|
545
|
-
return
|
|
551
|
+
return chunkAN2R7X5W_cjs.getMediaContent(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
546
552
|
preview: true
|
|
547
553
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
548
554
|
});
|
|
549
555
|
}
|
|
550
556
|
async fetchMetadata() {
|
|
551
|
-
const r = await
|
|
557
|
+
const r = await chunkAN2R7X5W_cjs.getMediaMetadata(this.#client, await this.#client.ontologyRid, ...this.#triplet, {
|
|
552
558
|
preview: true
|
|
553
559
|
// TODO: Can turn this back off when backend is no longer in beta.
|
|
554
560
|
});
|
|
@@ -983,8 +989,8 @@ function get$link(holder) {
|
|
|
983
989
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
984
990
|
}).pivotTo(linkName);
|
|
985
991
|
const value = !linkDef.multiplicity ? {
|
|
986
|
-
fetchOne: (options) =>
|
|
987
|
-
fetchOneWithErrors: (options) =>
|
|
992
|
+
fetchOne: (options) => chunkYLVUONG3_cjs.fetchSingle(client, objDef, options ?? {}, chunkYLVUONG3_cjs.getWireObjectSet(objectSet)),
|
|
993
|
+
fetchOneWithErrors: (options) => chunkYLVUONG3_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkYLVUONG3_cjs.getWireObjectSet(objectSet))
|
|
988
994
|
} : objectSet;
|
|
989
995
|
return [linkName, value];
|
|
990
996
|
})));
|
|
@@ -1007,8 +1013,8 @@ function get$linkForInterface(holder) {
|
|
|
1007
1013
|
apiName: linkDef.targetTypeApiName
|
|
1008
1014
|
};
|
|
1009
1015
|
const value = !linkDef.multiplicity ? {
|
|
1010
|
-
fetchOne: (options) =>
|
|
1011
|
-
fetchOneWithErrors: (options) =>
|
|
1016
|
+
fetchOne: (options) => chunkYLVUONG3_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkYLVUONG3_cjs.getWireObjectSet(objectSet)),
|
|
1017
|
+
fetchOneWithErrors: (options) => chunkYLVUONG3_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkYLVUONG3_cjs.getWireObjectSet(objectSet))
|
|
1012
1018
|
} : objectSet;
|
|
1013
1019
|
return [linkName, value];
|
|
1014
1020
|
})));
|
|
@@ -1016,7 +1022,7 @@ function get$linkForInterface(holder) {
|
|
|
1016
1022
|
|
|
1017
1023
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
1018
1024
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1019
|
-
const [objApiNamespace] =
|
|
1025
|
+
const [objApiNamespace] = chunkYLVUONG3_cjs.extractNamespace(interfaceDef.apiName);
|
|
1020
1026
|
return Object.freeze(Object.defineProperties({}, {
|
|
1021
1027
|
// first to minimize hidden classes
|
|
1022
1028
|
[UnderlyingOsdkObject]: {
|
|
@@ -1079,7 +1085,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1079
1085
|
},
|
|
1080
1086
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1081
1087
|
const objDef = underlying[ObjectDefRef];
|
|
1082
|
-
const [apiNamespace, apiName] =
|
|
1088
|
+
const [apiNamespace, apiName] = chunkYLVUONG3_cjs.extractNamespace(p);
|
|
1083
1089
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
1084
1090
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
1085
1091
|
enumerable: targetPropName in underlying,
|
|
@@ -1119,7 +1125,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
|
|
|
1119
1125
|
}
|
|
1120
1126
|
const interfacePropName = inverseMap[objPropName];
|
|
1121
1127
|
if (interfacePropName == null) continue;
|
|
1122
|
-
const [apiNamespace, apiName] =
|
|
1128
|
+
const [apiNamespace, apiName] = chunkYLVUONG3_cjs.extractNamespace(interfacePropName);
|
|
1123
1129
|
const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
|
|
1124
1130
|
remapped[key] = underlyingSecurities[objPropName];
|
|
1125
1131
|
}
|
|
@@ -1200,7 +1206,7 @@ var basePropDefs = {
|
|
|
1200
1206
|
"$objectSpecifier": {
|
|
1201
1207
|
get() {
|
|
1202
1208
|
const rawObj = this[UnderlyingOsdkObject];
|
|
1203
|
-
return
|
|
1209
|
+
return chunkYRGYLMU5_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
|
|
1204
1210
|
},
|
|
1205
1211
|
enumerable: true
|
|
1206
1212
|
},
|
|
@@ -1272,9 +1278,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1272
1278
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1273
1279
|
case "attachment":
|
|
1274
1280
|
if (Array.isArray(rawValue)) {
|
|
1275
|
-
return rawValue.map((a) =>
|
|
1281
|
+
return rawValue.map((a) => chunkYLVUONG3_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1276
1282
|
} else {
|
|
1277
|
-
return
|
|
1283
|
+
return chunkYLVUONG3_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1278
1284
|
}
|
|
1279
1285
|
default:
|
|
1280
1286
|
process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant2__default.default(false) ;
|
|
@@ -1290,9 +1296,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1290
1296
|
}
|
|
1291
1297
|
if (propDef.type === "attachment") {
|
|
1292
1298
|
if (Array.isArray(rawValue)) {
|
|
1293
|
-
return rawValue.map((a) =>
|
|
1299
|
+
return rawValue.map((a) => chunkYLVUONG3_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1294
1300
|
}
|
|
1295
|
-
return
|
|
1301
|
+
return chunkYLVUONG3_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1296
1302
|
}
|
|
1297
1303
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1298
1304
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1635,11 +1641,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1635
1641
|
};
|
|
1636
1642
|
|
|
1637
1643
|
// src/util/UserAgent.ts
|
|
1638
|
-
var USER_AGENT = `osdk-client/${"2.
|
|
1639
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.
|
|
1644
|
+
var USER_AGENT = `osdk-client/${"2.27.0"}`;
|
|
1645
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.27.0"}`;
|
|
1640
1646
|
|
|
1641
1647
|
// src/createMinimalClient.ts
|
|
1642
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1648
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkYLVUONG3_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1643
1649
|
if (process.env.NODE_ENV !== "production") {
|
|
1644
1650
|
try {
|
|
1645
1651
|
new URL(baseUrl);
|
|
@@ -2230,7 +2236,7 @@ var ActionInvoker = class {
|
|
|
2230
2236
|
};
|
|
2231
2237
|
var QueryInvoker = class {
|
|
2232
2238
|
constructor(clientCtx, queryDef) {
|
|
2233
|
-
this.executeFunction =
|
|
2239
|
+
this.executeFunction = chunkYRGYLMU5_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
|
|
2234
2240
|
}
|
|
2235
2241
|
};
|
|
2236
2242
|
function createClientInternal(objectSetFactory, transactionRid, flushEdits, scenarioRid, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
@@ -2272,7 +2278,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2272
2278
|
async *executeStreamingFunction(query, params) {
|
|
2273
2279
|
const {
|
|
2274
2280
|
applyStreamingQuery
|
|
2275
|
-
} = await import('./applyStreamingQuery-
|
|
2281
|
+
} = await import('./applyStreamingQuery-ZUGQCOWE.cjs');
|
|
2276
2282
|
yield* applyStreamingQuery(clientCtx, query, params);
|
|
2277
2283
|
}
|
|
2278
2284
|
};
|
|
@@ -2288,7 +2294,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2288
2294
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2289
2295
|
return {
|
|
2290
2296
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2291
|
-
return await
|
|
2297
|
+
return await chunkYLVUONG3_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2292
2298
|
}
|
|
2293
2299
|
};
|
|
2294
2300
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2302,7 +2308,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2302
2308
|
} = args;
|
|
2303
2309
|
const {
|
|
2304
2310
|
upload: upload2
|
|
2305
|
-
} = await import('./MediaReferenceProperty-
|
|
2311
|
+
} = await import('./MediaReferenceProperty-SYUA2YYQ.cjs');
|
|
2306
2312
|
return await upload2(clientCtx, await clientCtx.ontologyRid, objectType.apiName, propertyType, data, {
|
|
2307
2313
|
mediaItemPath: fileName,
|
|
2308
2314
|
preview: true
|
|
@@ -2312,10 +2318,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2312
2318
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2313
2319
|
return {
|
|
2314
2320
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2315
|
-
return await
|
|
2321
|
+
return await chunkYLVUONG3_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2316
2322
|
},
|
|
2317
2323
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2318
|
-
return await
|
|
2324
|
+
return await chunkYLVUONG3_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2319
2325
|
}
|
|
2320
2326
|
};
|
|
2321
2327
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
|
|
@@ -2335,7 +2341,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2335
2341
|
transformAndWait: async (args) => {
|
|
2336
2342
|
const {
|
|
2337
2343
|
transformAndWaitInternal
|
|
2338
|
-
} = await import('./transformAndWaitInternal-
|
|
2344
|
+
} = await import('./transformAndWaitInternal-JGUDGNDJ.cjs');
|
|
2339
2345
|
const {
|
|
2340
2346
|
mediaSetRid,
|
|
2341
2347
|
mediaItemRid,
|
|
@@ -2353,13 +2359,13 @@ function createClientFromContext(clientCtx) {
|
|
|
2353
2359
|
const fetchMetadata = fetchMetadataInternal.bind(void 0, clientCtx);
|
|
2354
2360
|
const symbolClientContext2 = "__osdkClientContext";
|
|
2355
2361
|
const client = Object.defineProperties(clientFn, {
|
|
2356
|
-
[
|
|
2362
|
+
[chunkH6PXPU6F_cjs.symbolClientContext]: {
|
|
2357
2363
|
value: clientCtx
|
|
2358
2364
|
},
|
|
2359
2365
|
[symbolClientContext2]: {
|
|
2360
2366
|
value: clientCtx
|
|
2361
2367
|
},
|
|
2362
|
-
[
|
|
2368
|
+
[chunkYLVUONG3_cjs.additionalContext]: {
|
|
2363
2369
|
value: clientCtx
|
|
2364
2370
|
},
|
|
2365
2371
|
fetchMetadata: {
|
|
@@ -2368,9 +2374,9 @@ function createClientFromContext(clientCtx) {
|
|
|
2368
2374
|
});
|
|
2369
2375
|
return client;
|
|
2370
2376
|
}
|
|
2371
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2372
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
2373
|
-
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(
|
|
2377
|
+
var createClient = createClientInternal.bind(void 0, chunkYLVUONG3_cjs.createObjectSet, void 0, void 0, void 0);
|
|
2378
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkYLVUONG3_cjs.createObjectSet, transactionRid, flushEdits, void 0, ...args);
|
|
2379
|
+
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkYLVUONG3_cjs.createObjectSet, void 0, void 0, scenarioRid, ...args);
|
|
2374
2380
|
function createWithRid(rids) {
|
|
2375
2381
|
const withRid = {
|
|
2376
2382
|
type: "static",
|
|
@@ -2391,5 +2397,5 @@ exports.createClient = createClient;
|
|
|
2391
2397
|
exports.createClientFromContext = createClientFromContext;
|
|
2392
2398
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2393
2399
|
exports.createOsdkObject = createOsdkObject;
|
|
2394
|
-
//# sourceMappingURL=chunk-
|
|
2395
|
-
//# sourceMappingURL=chunk-
|
|
2400
|
+
//# sourceMappingURL=chunk-SVB5K454.cjs.map
|
|
2401
|
+
//# sourceMappingURL=chunk-SVB5K454.cjs.map
|