@osdk/client 2.21.1-main-1f635101dcdf13bf3201bcaa21c641715744dbb6 → 2.22.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.
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkDCTMCTB5_cjs = require('./chunk-DCTMCTB5.cjs');
3
+ var chunkTDQU3KC2_cjs = require('./chunk-TDQU3KC2.cjs');
4
4
  var chunkYJG67XL4_cjs = require('./chunk-YJG67XL4.cjs');
5
5
  var chunkTQUNF2DZ_cjs = require('./chunk-TQUNF2DZ.cjs');
6
- var chunkEBIMOR5S_cjs = require('./chunk-EBIMOR5S.cjs');
6
+ var chunkCNVWYZKL_cjs = require('./chunk-CNVWYZKL.cjs');
7
7
  var chunkZPLXXOU6_cjs = require('./chunk-ZPLXXOU6.cjs');
8
8
  var chunkCEBSLQQC_cjs = require('./chunk-CEBSLQQC.cjs');
9
9
  var chunkDOXHU27E_cjs = require('./chunk-DOXHU27E.cjs');
@@ -52,7 +52,7 @@ async function toDataValue(value, client, actionMetadata) {
52
52
  }
53
53
  if (Array.isArray(value) || value instanceof Set) {
54
54
  const values = Array.from(value);
55
- if (values.some((dataValue) => chunkDCTMCTB5_cjs.isAttachmentUpload(dataValue) || chunkDCTMCTB5_cjs.isAttachmentFile(dataValue))) {
55
+ if (values.some((dataValue) => chunkTDQU3KC2_cjs.isAttachmentUpload(dataValue) || chunkTDQU3KC2_cjs.isAttachmentFile(dataValue))) {
56
56
  const converted = [];
57
57
  for (const value2 of values) {
58
58
  converted.push(await toDataValue(value2, client));
@@ -62,47 +62,47 @@ async function toDataValue(value, client, actionMetadata) {
62
62
  const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client));
63
63
  return Promise.all(promiseArray);
64
64
  }
65
- if (chunkDCTMCTB5_cjs.isAttachmentUpload(value)) {
66
- const attachment = await chunkEBIMOR5S_cjs.upload(client, value.data, {
65
+ if (chunkTDQU3KC2_cjs.isAttachmentUpload(value)) {
66
+ const attachment = await chunkCNVWYZKL_cjs.upload(client, value.data, {
67
67
  filename: value.name
68
68
  });
69
69
  return await toDataValue(attachment.rid, client);
70
70
  }
71
- if (chunkDCTMCTB5_cjs.isAttachmentFile(value)) {
72
- const attachment = await chunkEBIMOR5S_cjs.upload(client, value, {
71
+ if (chunkTDQU3KC2_cjs.isAttachmentFile(value)) {
72
+ const attachment = await chunkCNVWYZKL_cjs.upload(client, value, {
73
73
  filename: value.name
74
74
  });
75
75
  return await toDataValue(attachment.rid, client);
76
76
  }
77
- if (chunkDCTMCTB5_cjs.isMediaUpload(value)) {
77
+ if (chunkTDQU3KC2_cjs.isMediaUpload(value)) {
78
78
  const mediaRef = await chunkZPLXXOU6_cjs.MediaSet_exports.uploadMedia(client, value.data, {
79
79
  filename: value.fileName,
80
80
  preview: true
81
81
  });
82
82
  return await toDataValue(mediaRef, client);
83
83
  }
84
- if (chunkDCTMCTB5_cjs.isMedia(value)) {
84
+ if (chunkTDQU3KC2_cjs.isMedia(value)) {
85
85
  return value.getMediaReference();
86
86
  }
87
- if (chunkDCTMCTB5_cjs.isMediaReference(value)) {
87
+ if (chunkTDQU3KC2_cjs.isMediaReference(value)) {
88
88
  return value;
89
89
  }
90
90
  if (isOntologyObjectV2(value)) {
91
91
  return await toDataValue(value.__primaryKey, client);
92
92
  }
93
- if (chunkDCTMCTB5_cjs.isObjectSpecifiersObject(value)) {
93
+ if (chunkTDQU3KC2_cjs.isObjectSpecifiersObject(value)) {
94
94
  return await toDataValue(value.$primaryKey, client);
95
95
  }
96
96
  if (isPoint(value)) {
97
97
  return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
98
98
  }
99
- if (chunkEBIMOR5S_cjs.isWireObjectSet(value)) {
99
+ if (chunkCNVWYZKL_cjs.isWireObjectSet(value)) {
100
100
  return value;
101
101
  }
102
- if (chunkEBIMOR5S_cjs.isObjectSet(value)) {
103
- return chunkEBIMOR5S_cjs.getWireObjectSet(value);
102
+ if (chunkCNVWYZKL_cjs.isObjectSet(value)) {
103
+ return chunkCNVWYZKL_cjs.getWireObjectSet(value);
104
104
  }
105
- if (chunkDCTMCTB5_cjs.isInterfaceActionParam(value)) {
105
+ if (chunkTDQU3KC2_cjs.isInterfaceActionParam(value)) {
106
106
  return {
107
107
  objectTypeApiName: value.$objectType,
108
108
  primaryKeyValue: value.$primaryKey
@@ -120,7 +120,7 @@ async function toDataValue(value, client, actionMetadata) {
120
120
 
121
121
  // src/actions/applyAction.ts
122
122
  async function applyAction(client, action, parameters, options = {}) {
123
- const clientWithHeaders = chunkEBIMOR5S_cjs.addUserAgentAndRequestContextHeaders(chunkEBIMOR5S_cjs.augmentRequestContext(client, (_) => ({
123
+ const clientWithHeaders = chunkCNVWYZKL_cjs.addUserAgentAndRequestContextHeaders(chunkCNVWYZKL_cjs.augmentRequestContext(client, (_) => ({
124
124
  finalMethodCall: "applyAction"
125
125
  })), action);
126
126
  if (Array.isArray(parameters)) {
@@ -260,7 +260,7 @@ function getTimeRange(body) {
260
260
  }
261
261
  async function* asyncIterPointsHelper(iterator) {
262
262
  const reader = iterator.body?.getReader();
263
- for await (const point of chunkDCTMCTB5_cjs.parseStreamedResponse(chunkDCTMCTB5_cjs.iterateReadableStream(reader))) {
263
+ for await (const point of chunkTDQU3KC2_cjs.parseStreamedResponse(chunkTDQU3KC2_cjs.iterateReadableStream(reader))) {
264
264
  yield {
265
265
  time: point.time,
266
266
  value: point.value
@@ -778,8 +778,8 @@ function get$link(holder) {
778
778
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
779
779
  }).pivotTo(linkName);
780
780
  const value = !linkDef.multiplicity ? {
781
- fetchOne: (options) => chunkEBIMOR5S_cjs.fetchSingle(client, objDef, options ?? {}, chunkEBIMOR5S_cjs.getWireObjectSet(objectSet)),
782
- fetchOneWithErrors: (options) => chunkEBIMOR5S_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkEBIMOR5S_cjs.getWireObjectSet(objectSet))
781
+ fetchOne: (options) => chunkCNVWYZKL_cjs.fetchSingle(client, objDef, options ?? {}, chunkCNVWYZKL_cjs.getWireObjectSet(objectSet)),
782
+ fetchOneWithErrors: (options) => chunkCNVWYZKL_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkCNVWYZKL_cjs.getWireObjectSet(objectSet))
783
783
  } : objectSet;
784
784
  return [linkName, value];
785
785
  })));
@@ -802,8 +802,8 @@ function get$linkForInterface(holder) {
802
802
  apiName: linkDef.targetTypeApiName
803
803
  };
804
804
  const value = !linkDef.multiplicity ? {
805
- fetchOne: (options) => chunkEBIMOR5S_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkEBIMOR5S_cjs.getWireObjectSet(objectSet)),
806
- fetchOneWithErrors: (options) => chunkEBIMOR5S_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkEBIMOR5S_cjs.getWireObjectSet(objectSet))
805
+ fetchOne: (options) => chunkCNVWYZKL_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkCNVWYZKL_cjs.getWireObjectSet(objectSet)),
806
+ fetchOneWithErrors: (options) => chunkCNVWYZKL_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkCNVWYZKL_cjs.getWireObjectSet(objectSet))
807
807
  } : objectSet;
808
808
  return [linkName, value];
809
809
  })));
@@ -811,7 +811,7 @@ function get$linkForInterface(holder) {
811
811
 
812
812
  // src/object/convertWireToOsdkObjects/createOsdkInterface.ts
813
813
  function createOsdkInterface(underlying, interfaceDef) {
814
- const [objApiNamespace] = chunkEBIMOR5S_cjs.extractNamespace(interfaceDef.apiName);
814
+ const [objApiNamespace] = chunkCNVWYZKL_cjs.extractNamespace(interfaceDef.apiName);
815
815
  return Object.freeze(Object.defineProperties({}, {
816
816
  // first to minimize hidden classes
817
817
  [UnderlyingOsdkObject]: {
@@ -874,7 +874,7 @@ function createOsdkInterface(underlying, interfaceDef) {
874
874
  },
875
875
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
876
876
  const objDef = underlying[ObjectDefRef];
877
- const [apiNamespace, apiName] = chunkEBIMOR5S_cjs.extractNamespace(p);
877
+ const [apiNamespace, apiName] = chunkCNVWYZKL_cjs.extractNamespace(p);
878
878
  const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
879
879
  return [apiNamespace === objApiNamespace ? apiName : p, {
880
880
  enumerable: targetPropName in underlying,
@@ -910,7 +910,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
910
910
  for (const objPropName of Object.keys(underlyingSecurities)) {
911
911
  const interfacePropName = inverseMap[objPropName];
912
912
  if (interfacePropName == null) continue;
913
- const [apiNamespace, apiName] = chunkEBIMOR5S_cjs.extractNamespace(interfacePropName);
913
+ const [apiNamespace, apiName] = chunkCNVWYZKL_cjs.extractNamespace(interfacePropName);
914
914
  const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
915
915
  remapped[key] = underlyingSecurities[objPropName];
916
916
  }
@@ -990,7 +990,7 @@ var basePropDefs = {
990
990
  "$objectSpecifier": {
991
991
  get() {
992
992
  const rawObj = this[UnderlyingOsdkObject];
993
- return chunkDCTMCTB5_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
993
+ return chunkTDQU3KC2_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
994
994
  },
995
995
  enumerable: true
996
996
  },
@@ -1062,9 +1062,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
1062
1062
  switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
1063
1063
  case "attachment":
1064
1064
  if (Array.isArray(rawValue)) {
1065
- return rawValue.map((a) => chunkEBIMOR5S_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1065
+ return rawValue.map((a) => chunkCNVWYZKL_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1066
1066
  } else {
1067
- return chunkEBIMOR5S_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1067
+ return chunkCNVWYZKL_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1068
1068
  }
1069
1069
  default:
1070
1070
  process.env.NODE_ENV !== "production" ? invariant2__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant2__default.default(false) ;
@@ -1080,9 +1080,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
1080
1080
  }
1081
1081
  if (propDef.type === "attachment") {
1082
1082
  if (Array.isArray(rawValue)) {
1083
- return rawValue.map((a) => chunkEBIMOR5S_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1083
+ return rawValue.map((a) => chunkCNVWYZKL_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1084
1084
  }
1085
- return chunkEBIMOR5S_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1085
+ return chunkCNVWYZKL_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1086
1086
  }
1087
1087
  if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
1088
1088
  return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
@@ -1449,11 +1449,11 @@ var createStandardOntologyProviderFactory = (client) => {
1449
1449
  };
1450
1450
 
1451
1451
  // src/util/UserAgent.ts
1452
- var USER_AGENT = `osdk-client/${"2.21.1-main-1f635101dcdf13bf3201bcaa21c641715744dbb6"}`;
1453
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.21.1-main-1f635101dcdf13bf3201bcaa21c641715744dbb6"}`;
1452
+ var USER_AGENT = `osdk-client/${"2.22.0"}`;
1453
+ var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.22.0"}`;
1454
1454
 
1455
1455
  // src/createMinimalClient.ts
1456
- function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkEBIMOR5S_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1456
+ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkCNVWYZKL_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1457
1457
  if (process.env.NODE_ENV !== "production") {
1458
1458
  try {
1459
1459
  new URL(baseUrl);
@@ -2043,7 +2043,7 @@ var ActionInvoker = class {
2043
2043
  };
2044
2044
  var QueryInvoker = class {
2045
2045
  constructor(clientCtx, queryDef) {
2046
- this.executeFunction = chunkDCTMCTB5_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
2046
+ this.executeFunction = chunkTDQU3KC2_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
2047
2047
  }
2048
2048
  };
2049
2049
  function createClientInternal(objectSetFactory, transactionRid, flushEdits, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
@@ -2084,7 +2084,7 @@ function createClientFromContext(clientCtx) {
2084
2084
  async *executeStreamingFunction(query, params) {
2085
2085
  const {
2086
2086
  applyStreamingQuery
2087
- } = await import('./applyStreamingQuery-GMRW7AZR.cjs');
2087
+ } = await import('./applyStreamingQuery-QLINJ5HQ.cjs');
2088
2088
  yield* applyStreamingQuery(clientCtx, query, params);
2089
2089
  }
2090
2090
  };
@@ -2100,7 +2100,7 @@ function createClientFromContext(clientCtx) {
2100
2100
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
2101
2101
  return {
2102
2102
  fetchOneByRid: async (objectType, rid, options) => {
2103
- return await chunkEBIMOR5S_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2103
+ return await chunkCNVWYZKL_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2104
2104
  }
2105
2105
  };
2106
2106
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
@@ -2124,10 +2124,10 @@ function createClientFromContext(clientCtx) {
2124
2124
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
2125
2125
  return {
2126
2126
  fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
2127
- return await chunkEBIMOR5S_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2127
+ return await chunkCNVWYZKL_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2128
2128
  },
2129
2129
  fetchPageByRidNoType: async (rids, options) => {
2130
- return await chunkEBIMOR5S_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2130
+ return await chunkCNVWYZKL_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2131
2131
  }
2132
2132
  };
2133
2133
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
@@ -2171,7 +2171,7 @@ function createClientFromContext(clientCtx) {
2171
2171
  [symbolClientContext2]: {
2172
2172
  value: clientCtx
2173
2173
  },
2174
- [chunkEBIMOR5S_cjs.additionalContext]: {
2174
+ [chunkCNVWYZKL_cjs.additionalContext]: {
2175
2175
  value: clientCtx
2176
2176
  },
2177
2177
  fetchMetadata: {
@@ -2180,8 +2180,8 @@ function createClientFromContext(clientCtx) {
2180
2180
  });
2181
2181
  return client;
2182
2182
  }
2183
- var createClient = createClientInternal.bind(void 0, chunkEBIMOR5S_cjs.createObjectSet, void 0, void 0);
2184
- var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkEBIMOR5S_cjs.createObjectSet, transactionRid, flushEdits, ...args);
2183
+ var createClient = createClientInternal.bind(void 0, chunkCNVWYZKL_cjs.createObjectSet, void 0, void 0);
2184
+ var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkCNVWYZKL_cjs.createObjectSet, transactionRid, flushEdits, ...args);
2185
2185
  function createWithRid(rids) {
2186
2186
  const withRid = {
2187
2187
  type: "static",
@@ -2200,5 +2200,5 @@ exports.createClient = createClient;
2200
2200
  exports.createClientFromContext = createClientFromContext;
2201
2201
  exports.createClientWithTransaction = createClientWithTransaction;
2202
2202
  exports.createOsdkObject = createOsdkObject;
2203
- //# sourceMappingURL=chunk-IZVYD4TQ.cjs.map
2204
- //# sourceMappingURL=chunk-IZVYD4TQ.cjs.map
2203
+ //# sourceMappingURL=chunk-NRPYHQFF.cjs.map
2204
+ //# sourceMappingURL=chunk-NRPYHQFF.cjs.map