@osdk/client 2.25.0 → 2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95

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.
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkSVE3DMG5_cjs = require('./chunk-SVE3DMG5.cjs');
3
+ var chunk26AZ3LMH_cjs = require('./chunk-26AZ3LMH.cjs');
4
4
  var chunkYJG67XL4_cjs = require('./chunk-YJG67XL4.cjs');
5
5
  var chunkTQUNF2DZ_cjs = require('./chunk-TQUNF2DZ.cjs');
6
- var chunkWOPBEGWL_cjs = require('./chunk-WOPBEGWL.cjs');
6
+ var chunkPCJDAUL2_cjs = require('./chunk-PCJDAUL2.cjs');
7
7
  var chunkZFNHWPQA_cjs = require('./chunk-ZFNHWPQA.cjs');
8
8
  var chunkCEBSLQQC_cjs = require('./chunk-CEBSLQQC.cjs');
9
9
  var chunkYP43NHIA_cjs = require('./chunk-YP43NHIA.cjs');
@@ -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[chunkWOPBEGWL_cjs.additionalContext];
127
+ const ctx = parent[chunkPCJDAUL2_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,7 +135,7 @@ 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[chunkWOPBEGWL_cjs.additionalContext];
138
+ const innerCtx = inner[chunkPCJDAUL2_cjs.additionalContext];
139
139
  async function getEditedEntityTypes() {
140
140
  const ontologyRid = await innerCtx.ontologyRid;
141
141
  const response = await OntologyScenario_exports.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid);
@@ -276,7 +276,7 @@ async function toDataValue(value, client, actionMetadata) {
276
276
  }
277
277
  if (Array.isArray(value) || value instanceof Set) {
278
278
  const values = Array.from(value);
279
- if (values.some((dataValue) => chunkSVE3DMG5_cjs.isAttachmentUpload(dataValue) || chunkSVE3DMG5_cjs.isAttachmentFile(dataValue))) {
279
+ if (values.some((dataValue) => chunk26AZ3LMH_cjs.isAttachmentUpload(dataValue) || chunk26AZ3LMH_cjs.isAttachmentFile(dataValue))) {
280
280
  const converted = [];
281
281
  for (const value2 of values) {
282
282
  converted.push(await toDataValue(value2, client));
@@ -286,47 +286,47 @@ async function toDataValue(value, client, actionMetadata) {
286
286
  const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client));
287
287
  return Promise.all(promiseArray);
288
288
  }
289
- if (chunkSVE3DMG5_cjs.isAttachmentUpload(value)) {
290
- const attachment = await chunkWOPBEGWL_cjs.upload(client, value.data, {
289
+ if (chunk26AZ3LMH_cjs.isAttachmentUpload(value)) {
290
+ const attachment = await chunkPCJDAUL2_cjs.upload(client, value.data, {
291
291
  filename: value.name
292
292
  });
293
293
  return await toDataValue(attachment.rid, client);
294
294
  }
295
- if (chunkSVE3DMG5_cjs.isAttachmentFile(value)) {
296
- const attachment = await chunkWOPBEGWL_cjs.upload(client, value, {
295
+ if (chunk26AZ3LMH_cjs.isAttachmentFile(value)) {
296
+ const attachment = await chunkPCJDAUL2_cjs.upload(client, value, {
297
297
  filename: value.name
298
298
  });
299
299
  return await toDataValue(attachment.rid, client);
300
300
  }
301
- if (chunkSVE3DMG5_cjs.isMediaUpload(value)) {
301
+ if (chunk26AZ3LMH_cjs.isMediaUpload(value)) {
302
302
  const mediaRef = await chunkZFNHWPQA_cjs.MediaSet_exports.uploadMedia(client, value.data, {
303
303
  filename: value.fileName,
304
304
  preview: true
305
305
  });
306
306
  return await toDataValue(mediaRef, client);
307
307
  }
308
- if (chunkSVE3DMG5_cjs.isMedia(value)) {
308
+ if (chunk26AZ3LMH_cjs.isMedia(value)) {
309
309
  return value.getMediaReference();
310
310
  }
311
- if (chunkSVE3DMG5_cjs.isMediaReference(value)) {
311
+ if (chunk26AZ3LMH_cjs.isMediaReference(value)) {
312
312
  return value;
313
313
  }
314
314
  if (isOntologyObjectV2(value)) {
315
315
  return await toDataValue(value.__primaryKey, client);
316
316
  }
317
- if (chunkSVE3DMG5_cjs.isObjectSpecifiersObject(value)) {
317
+ if (chunk26AZ3LMH_cjs.isObjectSpecifiersObject(value)) {
318
318
  return await toDataValue(value.$primaryKey, client);
319
319
  }
320
320
  if (isPoint(value)) {
321
321
  return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
322
322
  }
323
- if (chunkWOPBEGWL_cjs.isWireObjectSet(value)) {
323
+ if (chunkPCJDAUL2_cjs.isWireObjectSet(value)) {
324
324
  return value;
325
325
  }
326
- if (chunkWOPBEGWL_cjs.isObjectSet(value)) {
327
- return chunkWOPBEGWL_cjs.getWireObjectSet(value);
326
+ if (chunkPCJDAUL2_cjs.isObjectSet(value)) {
327
+ return chunkPCJDAUL2_cjs.getWireObjectSet(value);
328
328
  }
329
- if (chunkSVE3DMG5_cjs.isInterfaceActionParam(value)) {
329
+ if (chunk26AZ3LMH_cjs.isInterfaceActionParam(value)) {
330
330
  return {
331
331
  objectTypeApiName: value.$objectType,
332
332
  primaryKeyValue: value.$primaryKey
@@ -347,7 +347,7 @@ async function toDataValue(value, client, actionMetadata) {
347
347
 
348
348
  // src/actions/applyAction.ts
349
349
  async function applyAction(client, action, parameters, options = {}) {
350
- const clientWithHeaders = chunkWOPBEGWL_cjs.addUserAgentAndRequestContextHeaders(chunkWOPBEGWL_cjs.augmentRequestContext(client, (_) => ({
350
+ const clientWithHeaders = chunkPCJDAUL2_cjs.addUserAgentAndRequestContextHeaders(chunkPCJDAUL2_cjs.augmentRequestContext(client, (_) => ({
351
351
  finalMethodCall: "applyAction"
352
352
  })), action);
353
353
  if (Array.isArray(parameters)) {
@@ -479,7 +479,7 @@ function getTimeRange(body) {
479
479
  }
480
480
  async function* asyncIterPointsHelper(iterator) {
481
481
  const reader = iterator.body?.getReader();
482
- for await (const point of chunkSVE3DMG5_cjs.parseStreamedResponse(chunkSVE3DMG5_cjs.iterateReadableStream(reader))) {
482
+ for await (const point of chunk26AZ3LMH_cjs.parseStreamedResponse(chunk26AZ3LMH_cjs.iterateReadableStream(reader))) {
483
483
  yield {
484
484
  time: point.time,
485
485
  value: point.value
@@ -983,8 +983,8 @@ function get$link(holder) {
983
983
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
984
984
  }).pivotTo(linkName);
985
985
  const value = !linkDef.multiplicity ? {
986
- fetchOne: (options) => chunkWOPBEGWL_cjs.fetchSingle(client, objDef, options ?? {}, chunkWOPBEGWL_cjs.getWireObjectSet(objectSet)),
987
- fetchOneWithErrors: (options) => chunkWOPBEGWL_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkWOPBEGWL_cjs.getWireObjectSet(objectSet))
986
+ fetchOne: (options) => chunkPCJDAUL2_cjs.fetchSingle(client, objDef, options ?? {}, chunkPCJDAUL2_cjs.getWireObjectSet(objectSet)),
987
+ fetchOneWithErrors: (options) => chunkPCJDAUL2_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkPCJDAUL2_cjs.getWireObjectSet(objectSet))
988
988
  } : objectSet;
989
989
  return [linkName, value];
990
990
  })));
@@ -1007,8 +1007,8 @@ function get$linkForInterface(holder) {
1007
1007
  apiName: linkDef.targetTypeApiName
1008
1008
  };
1009
1009
  const value = !linkDef.multiplicity ? {
1010
- fetchOne: (options) => chunkWOPBEGWL_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkWOPBEGWL_cjs.getWireObjectSet(objectSet)),
1011
- fetchOneWithErrors: (options) => chunkWOPBEGWL_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkWOPBEGWL_cjs.getWireObjectSet(objectSet))
1010
+ fetchOne: (options) => chunkPCJDAUL2_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkPCJDAUL2_cjs.getWireObjectSet(objectSet)),
1011
+ fetchOneWithErrors: (options) => chunkPCJDAUL2_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkPCJDAUL2_cjs.getWireObjectSet(objectSet))
1012
1012
  } : objectSet;
1013
1013
  return [linkName, value];
1014
1014
  })));
@@ -1016,7 +1016,7 @@ function get$linkForInterface(holder) {
1016
1016
 
1017
1017
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
1018
1018
  function createOsdkInterface(underlying, interfaceDef) {
1019
- const [objApiNamespace] = chunkWOPBEGWL_cjs.extractNamespace(interfaceDef.apiName);
1019
+ const [objApiNamespace] = chunkPCJDAUL2_cjs.extractNamespace(interfaceDef.apiName);
1020
1020
  return Object.freeze(Object.defineProperties({}, {
1021
1021
  // first to minimize hidden classes
1022
1022
  [UnderlyingOsdkObject]: {
@@ -1079,7 +1079,7 @@ function createOsdkInterface(underlying, interfaceDef) {
1079
1079
  },
1080
1080
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
1081
1081
  const objDef = underlying[ObjectDefRef];
1082
- const [apiNamespace, apiName] = chunkWOPBEGWL_cjs.extractNamespace(p);
1082
+ const [apiNamespace, apiName] = chunkPCJDAUL2_cjs.extractNamespace(p);
1083
1083
  const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
1084
1084
  return [apiNamespace === objApiNamespace ? apiName : p, {
1085
1085
  enumerable: targetPropName in underlying,
@@ -1119,7 +1119,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
1119
1119
  }
1120
1120
  const interfacePropName = inverseMap[objPropName];
1121
1121
  if (interfacePropName == null) continue;
1122
- const [apiNamespace, apiName] = chunkWOPBEGWL_cjs.extractNamespace(interfacePropName);
1122
+ const [apiNamespace, apiName] = chunkPCJDAUL2_cjs.extractNamespace(interfacePropName);
1123
1123
  const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
1124
1124
  remapped[key] = underlyingSecurities[objPropName];
1125
1125
  }
@@ -1200,7 +1200,7 @@ var basePropDefs = {
1200
1200
  "$objectSpecifier": {
1201
1201
  get() {
1202
1202
  const rawObj = this[UnderlyingOsdkObject];
1203
- return chunkSVE3DMG5_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
1203
+ return chunk26AZ3LMH_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
1204
1204
  },
1205
1205
  enumerable: true
1206
1206
  },
@@ -1272,9 +1272,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
1272
1272
  switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
1273
1273
  case "attachment":
1274
1274
  if (Array.isArray(rawValue)) {
1275
- return rawValue.map((a) => chunkWOPBEGWL_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1275
+ return rawValue.map((a) => chunkPCJDAUL2_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1276
1276
  } else {
1277
- return chunkWOPBEGWL_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1277
+ return chunkPCJDAUL2_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1278
1278
  }
1279
1279
  default:
1280
1280
  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 +1290,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
1290
1290
  }
1291
1291
  if (propDef.type === "attachment") {
1292
1292
  if (Array.isArray(rawValue)) {
1293
- return rawValue.map((a) => chunkWOPBEGWL_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1293
+ return rawValue.map((a) => chunkPCJDAUL2_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1294
1294
  }
1295
- return chunkWOPBEGWL_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1295
+ return chunkPCJDAUL2_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1296
1296
  }
1297
1297
  if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
1298
1298
  return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
@@ -1635,11 +1635,11 @@ var createStandardOntologyProviderFactory = (client) => {
1635
1635
  };
1636
1636
 
1637
1637
  // src/util/UserAgent.ts
1638
- var USER_AGENT = `osdk-client/${"2.25.0"}`;
1639
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.25.0"}`;
1638
+ var USER_AGENT = `osdk-client/${"2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95"}`;
1639
+ var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95"}`;
1640
1640
 
1641
1641
  // src/createMinimalClient.ts
1642
- function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkWOPBEGWL_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1642
+ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkPCJDAUL2_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1643
1643
  if (process.env.NODE_ENV !== "production") {
1644
1644
  try {
1645
1645
  new URL(baseUrl);
@@ -2230,7 +2230,7 @@ var ActionInvoker = class {
2230
2230
  };
2231
2231
  var QueryInvoker = class {
2232
2232
  constructor(clientCtx, queryDef) {
2233
- this.executeFunction = chunkSVE3DMG5_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
2233
+ this.executeFunction = chunk26AZ3LMH_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
2234
2234
  }
2235
2235
  };
2236
2236
  function createClientInternal(objectSetFactory, transactionRid, flushEdits, scenarioRid, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
@@ -2272,7 +2272,7 @@ function createClientFromContext(clientCtx) {
2272
2272
  async *executeStreamingFunction(query, params) {
2273
2273
  const {
2274
2274
  applyStreamingQuery
2275
- } = await import('./applyStreamingQuery-6T4TZT2J.cjs');
2275
+ } = await import('./applyStreamingQuery-HYPSPLFN.cjs');
2276
2276
  yield* applyStreamingQuery(clientCtx, query, params);
2277
2277
  }
2278
2278
  };
@@ -2288,7 +2288,7 @@ function createClientFromContext(clientCtx) {
2288
2288
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
2289
2289
  return {
2290
2290
  fetchOneByRid: async (objectType, rid, options) => {
2291
- return await chunkWOPBEGWL_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2291
+ return await chunkPCJDAUL2_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2292
2292
  }
2293
2293
  };
2294
2294
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
@@ -2312,10 +2312,10 @@ function createClientFromContext(clientCtx) {
2312
2312
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
2313
2313
  return {
2314
2314
  fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
2315
- return await chunkWOPBEGWL_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2315
+ return await chunkPCJDAUL2_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2316
2316
  },
2317
2317
  fetchPageByRidNoType: async (rids, options) => {
2318
- return await chunkWOPBEGWL_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2318
+ return await chunkPCJDAUL2_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2319
2319
  }
2320
2320
  };
2321
2321
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
@@ -2359,7 +2359,7 @@ function createClientFromContext(clientCtx) {
2359
2359
  [symbolClientContext2]: {
2360
2360
  value: clientCtx
2361
2361
  },
2362
- [chunkWOPBEGWL_cjs.additionalContext]: {
2362
+ [chunkPCJDAUL2_cjs.additionalContext]: {
2363
2363
  value: clientCtx
2364
2364
  },
2365
2365
  fetchMetadata: {
@@ -2368,9 +2368,9 @@ function createClientFromContext(clientCtx) {
2368
2368
  });
2369
2369
  return client;
2370
2370
  }
2371
- var createClient = createClientInternal.bind(void 0, chunkWOPBEGWL_cjs.createObjectSet, void 0, void 0, void 0);
2372
- var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkWOPBEGWL_cjs.createObjectSet, transactionRid, flushEdits, void 0, ...args);
2373
- var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkWOPBEGWL_cjs.createObjectSet, void 0, void 0, scenarioRid, ...args);
2371
+ var createClient = createClientInternal.bind(void 0, chunkPCJDAUL2_cjs.createObjectSet, void 0, void 0, void 0);
2372
+ var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkPCJDAUL2_cjs.createObjectSet, transactionRid, flushEdits, void 0, ...args);
2373
+ var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkPCJDAUL2_cjs.createObjectSet, void 0, void 0, scenarioRid, ...args);
2374
2374
  function createWithRid(rids) {
2375
2375
  const withRid = {
2376
2376
  type: "static",
@@ -2391,5 +2391,5 @@ exports.createClient = createClient;
2391
2391
  exports.createClientFromContext = createClientFromContext;
2392
2392
  exports.createClientWithTransaction = createClientWithTransaction;
2393
2393
  exports.createOsdkObject = createOsdkObject;
2394
- //# sourceMappingURL=chunk-6ZFTHAN6.cjs.map
2395
- //# sourceMappingURL=chunk-6ZFTHAN6.cjs.map
2394
+ //# sourceMappingURL=chunk-HBCI3QZV.cjs.map
2395
+ //# sourceMappingURL=chunk-HBCI3QZV.cjs.map