@osdk/client 2.41.0 → 2.41.1-main-e39a72892d538f3130e2cd51cee05d83d11fa493

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,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6BO5YHRX_cjs = require('./chunk-6BO5YHRX.cjs');
3
+ var chunkJMM4ZAQJ_cjs = require('./chunk-JMM4ZAQJ.cjs');
4
4
  var chunkROJIXXGF_cjs = require('./chunk-ROJIXXGF.cjs');
5
5
  var chunkH6PXPU6F_cjs = require('./chunk-H6PXPU6F.cjs');
6
6
  var invariant = require('tiny-invariant');
@@ -184,13 +184,13 @@ async function toDataValueQueries(value, client, desiredType) {
184
184
  switch (desiredType.type) {
185
185
  case "attachment": {
186
186
  if (isAttachmentUpload(value)) {
187
- const attachment = await chunk6BO5YHRX_cjs.upload(client, value.data, {
187
+ const attachment = await chunkJMM4ZAQJ_cjs.upload(client, value.data, {
188
188
  filename: value.name
189
189
  });
190
190
  return attachment.rid;
191
191
  }
192
192
  if (isAttachmentFile(value)) {
193
- const attachment = await chunk6BO5YHRX_cjs.upload(client, value, {
193
+ const attachment = await chunkJMM4ZAQJ_cjs.upload(client, value, {
194
194
  filename: value.name
195
195
  });
196
196
  return attachment.rid;
@@ -246,11 +246,11 @@ async function toDataValueQueries(value, client, desiredType) {
246
246
  }
247
247
  case "objectSet":
248
248
  case "interfaceObjectSet": {
249
- if (chunk6BO5YHRX_cjs.isWireObjectSet(value)) {
249
+ if (chunkJMM4ZAQJ_cjs.isWireObjectSet(value)) {
250
250
  return value;
251
251
  }
252
- if (chunk6BO5YHRX_cjs.isObjectSet(value)) {
253
- return chunk6BO5YHRX_cjs.getWireObjectSet(value);
252
+ if (chunkJMM4ZAQJ_cjs.isObjectSet(value)) {
253
+ return chunkJMM4ZAQJ_cjs.getWireObjectSet(value);
254
254
  }
255
255
  break;
256
256
  }
@@ -295,7 +295,7 @@ async function applyQuery(client, query, params) {
295
295
  if (client.flushEdits != null) {
296
296
  await client.flushEdits();
297
297
  }
298
- const response = await execute(chunk6BO5YHRX_cjs.addUserAgentAndRequestContextHeaders(chunk6BO5YHRX_cjs.augmentRequestContext(client, (_) => ({
298
+ const response = await execute(chunkJMM4ZAQJ_cjs.addUserAgentAndRequestContextHeaders(chunkJMM4ZAQJ_cjs.augmentRequestContext(client, (_) => ({
299
299
  finalMethodCall: "applyQuery"
300
300
  })), query), await client.ontologyRid, query.apiName, {
301
301
  parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
@@ -341,10 +341,10 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
341
341
  return responseValue;
342
342
  }
343
343
  case "attachment": {
344
- return chunk6BO5YHRX_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
344
+ return chunkJMM4ZAQJ_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
345
345
  }
346
346
  case "mediaReference": {
347
- return chunk6BO5YHRX_cjs.createMediaFromReferenceInternal(client, responseValue);
347
+ return chunkJMM4ZAQJ_cjs.createMediaFromReferenceInternal(client, responseValue);
348
348
  }
349
349
  case "object": {
350
350
  const def = definitions.get(responseDataType.object);
@@ -366,7 +366,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
366
366
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
367
367
  }
368
368
  if (typeof responseValue === "string") {
369
- return chunk6BO5YHRX_cjs.createObjectSet(def, client, {
369
+ return chunkJMM4ZAQJ_cjs.createObjectSet(def, client, {
370
370
  type: "intersect",
371
371
  objectSets: [{
372
372
  type: "base",
@@ -377,7 +377,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
377
377
  }]
378
378
  });
379
379
  }
380
- return chunk6BO5YHRX_cjs.createObjectSet(def, client, responseValue);
380
+ return chunkJMM4ZAQJ_cjs.createObjectSet(def, client, responseValue);
381
381
  }
382
382
  case "struct": {
383
383
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
@@ -562,5 +562,5 @@ exports.parseNdjsonStream = parseNdjsonStream;
562
562
  exports.parseStreamedResponse = parseStreamedResponse;
563
563
  exports.remapQueryParams = remapQueryParams;
564
564
  exports.remapQueryResponse = remapQueryResponse;
565
- //# sourceMappingURL=chunk-VUQAQMDE.cjs.map
566
- //# sourceMappingURL=chunk-VUQAQMDE.cjs.map
565
+ //# sourceMappingURL=chunk-RAA62TNS.cjs.map
566
+ //# sourceMappingURL=chunk-RAA62TNS.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/object/AttachmentUpload.ts","../../src/util/streamutils.ts","../../src/util/objectSpecifierUtils.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js","../../src/object/mediaUpload.ts","../../src/util/interfaceUtils.ts","../../src/util/isObjectSpecifiersObject.ts","../../src/util/toDataValueQueries.ts","../../src/queries/applyQuery.ts"],"names":["foundryPlatformFetch","value","upload","MediaSet_exports","isWireObjectSet","isObjectSet","getWireObjectSet","addUserAgentAndRequestContextHeaders","augmentRequestContext","hydrateAttachmentFromRidInternal","createMediaFromReferenceInternal","createObjectSet","invariant"],"mappings":";;;;;;;;;;;;AAgBO,SAAS,mBAAmB,CAAA,EAAG;AACpC,EAAA,OAAO,OAAO,CAAA,KAAM,QAAA,IAAY,CAAA,IAAK,IAAA,IAAQ,UAAU,CAAA,IAAK,OAAO,CAAA,CAAE,IAAA,KAAS,YAAY,MAAA,IAAU,CAAA,IAAK,EAAE,IAAA,YAAgB,IAAA,IAAQ,EAAE,UAAA,IAAc,CAAA,CAAA;AACrJ;AACO,SAAS,iBAAiB,CAAA,EAAG;AAClC,EAAA,OAAO,OAAO,CAAA,KAAM,QAAA,IAAY,CAAA,YAAa,QAAQ,MAAA,IAAU,CAAA;AACjE;AACO,SAAS,sBAAA,CAAuB,MAAM,IAAA,EAAM;AACjD,EAAA,OAAO;AAAA,IACL,IAAA;AAAA,IACA;AAAA,GACF;AACF;;;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AAAA,IACpB,MAAA,EAAQ,MAAA;AAAA,IACR,aAAa,SAAA,CAAU,OAAA;AAAA,IACvB,WAAA,EAAa,UAAA;AAAA,IACb,gBAAA,EAAkB,mCAAA,CAAoC,SAAA,EAAW,UAAU;AAAA,GAC7E;AACF;AACO,SAAS,4BAAA,CAA6B,oBAAoB,YAAA,EAAc;AAC7E,EAAA,OAAO;AAAA,IACL,UAAU,YAAA,CAAa,OAAA;AAAA,IACvB,MAAA,EAAQ,MAAA;AAAA,IACR,aAAa,kBAAA,CAAmB,iBAAA;AAAA,IAChC,aAAa,kBAAA,CAAmB,eAAA;AAAA,IAChC,gBAAA,EAAkB,2CAAA,CAA4C,YAAA,EAAc,kBAAkB;AAAA,GAChG;AACF","file":"chunk-VUQAQMDE.cjs","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isAttachmentUpload(o) {\n return typeof o === \"object\" && o != null && \"name\" in o && typeof o.name === \"string\" && \"data\" in o && o.data instanceof Blob && !(\"fileName\" in o);\n}\nexport function isAttachmentFile(o) {\n return typeof o === \"object\" && o instanceof Blob && \"name\" in o;\n}\nexport function createAttachmentUpload(data, name) {\n return {\n data,\n name\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst START_TOKEN = new Uint8Array([123, 34, 100, 97, 116, 97, 34, 58, 91]); // `{\"data\":[`\nconst OBJECT_OPEN_CHAR_CODE = 123; // '{'\nconst OBJECT_CLOSE_CHAR_CODE = 125; // '}'\n\nexport async function* parseStreamedResponse(asyncIterable) {\n const utf8decoder = new TextDecoder(\"utf-8\");\n let parsedStart = false;\n let prevChunks = [];\n let openBracesCount = 0;\n for await (const chunk of asyncIterable) {\n // on the first chunk, skip the expected START_TOKEN if we see it\n let i = 0;\n if (!parsedStart) {\n parsedStart = true;\n if (startsWith(chunk, START_TOKEN)) {\n i = START_TOKEN.length;\n }\n }\n for (; i < chunk.length; i++) {\n // if we aren't currently parsing an object, skip until we find the next object start\n while (openBracesCount === 0 && chunk[i] !== OBJECT_OPEN_CHAR_CODE && i < chunk.length) {\n i++;\n }\n\n // iterate through the chunk looking for the end of the current top level object\n let j = i;\n for (; j < chunk.length; j++) {\n const c = chunk[j];\n if (c === OBJECT_OPEN_CHAR_CODE) {\n openBracesCount++;\n } else if (c === OBJECT_CLOSE_CHAR_CODE) {\n openBracesCount--;\n\n // found a complete top level object, emit it\n if (0 === openBracesCount) {\n yield combineAndParse(utf8decoder, prevChunks, chunk.subarray(i, j + 1));\n\n // if there was a prevChunk, we've consumed it now\n prevChunks = [];\n\n // advance the start index to the final '}' of the current object,\n // which lets us start seeking the beginning of the next object\n i = j;\n break;\n }\n }\n }\n\n // if we reached the end of our chunk before finding the end of the object\n // store off the relevant remainder of our current chunk and go grab the next one\n if (j === chunk.length) {\n prevChunks.push(chunk.subarray(i));\n break;\n }\n }\n }\n}\nfunction startsWith(a, b) {\n if (a.length < b.length) {\n return false;\n }\n for (let i = 0; i < b.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\nfunction combineAndParse(utf8decoder, prev, curr) {\n let str = \"\";\n for (const chunk of prev) {\n str += utf8decoder.decode(chunk, {\n stream: true\n });\n }\n str += utf8decoder.decode(curr);\n return JSON.parse(str);\n}\nexport async function* iterateReadableStream(readableStream) {\n let res = await readableStream.read();\n while (!res.done) {\n yield res.value;\n res = await readableStream.read();\n }\n}\nexport async function* parseNdjsonStream(asyncIterable) {\n const decoder = new TextDecoder(\"utf-8\");\n let buffer = \"\";\n for await (const chunk of asyncIterable) {\n buffer += decoder.decode(chunk, {\n stream: true\n });\n let newlineIdx;\n while ((newlineIdx = buffer.indexOf(\"\\n\")) !== -1) {\n const line = buffer.slice(0, newlineIdx);\n buffer = buffer.slice(newlineIdx + 1);\n if (line.length > 0) {\n yield JSON.parse(line);\n }\n }\n }\n buffer += decoder.decode();\n const trailing = buffer.trim();\n if (trailing.length > 0) {\n yield JSON.parse(trailing);\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Creates an Object Specifier. An ObjectSpecifier is a string that uniquely identifies an object in the system,\n * even when loading an interface object where primary key uniqueness is not guaranteed.\n *\n * @param objectDef - An Object Type Definition\n * @param primaryKey - The value you want to use as the primary key\n * @returns An Object Specifier\n */\nexport function createObjectSpecifierFromPrimaryKey(objectDef, primaryKey) {\n return `${objectDef.apiName}:${primaryKey}`;\n}\n\n/**\n * Creates an Object Specifier. An ObjectSpecifier is a string that uniquely identifies an object in the system,\n * even when loading an interface object where primary key uniqueness is not guaranteed.\n *\n * @param objectDef - An Object Type Definition\n * @param primaryKey - The value you want to use as the primary key\n * @returns An Object Specifier\n */\nexport function createObjectSpecifierFromInterfaceSpecifier(interfaceDef, interfaceSpecifier) {\n return `${interfaceSpecifier.objectTypeApiName}:${interfaceSpecifier.primaryKeyValue}`;\n}\n\n/**\n * Extracts the primary key from an ObjectSpecifier on an OSDK object.\n *\n * @returns A string representing the primary key\n */\nexport function extractPrimaryKeyFromObjectSpecifier(ObjectSpecifier) {\n return ObjectSpecifier.split(\":\")[1];\n}\n\n/**\n * Extracts the object type from an ObjectSpecifier on an OSDK object.\n *\n * @returns The object type extracted from the ObjectSpecifier\n */\nexport function extractObjectTypeFromObjectSpecifier(ObjectSpecifier) {\n return ObjectSpecifier.split(\":\")[0];\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _execute = [1, \"/v2/ontologies/{0}/queries/{1}/execute\", 7];\n/**\n * Executes a Query using the given parameters. By default, the latest version of the Query is executed.\n *\n * Optional parameters do not need to be supplied.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isMedia(o) {\n return typeof o === \"object\" && o != null && typeof o.fetchMetadata === \"function\" && typeof o.fetchContents === \"function\" && typeof o.getMediaReference === \"function\";\n}\nexport function isMediaReference(o) {\n 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\";\n}\nexport function isMediaUpload(o) {\n return typeof o === \"object\" && o != null && \"fileName\" in o && typeof o.fileName === \"string\" && \"data\" in o && typeof o.data === \"object\" && o.data instanceof Blob;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** Type representing whether a definition is an object or interface */\n\n/** @internal */\nexport function getDefType(apiNameOrDef) {\n return typeof apiNameOrDef === \"string\" ? \"object\" : apiNameOrDef.type;\n}\n\n/** @internal */\nexport function isInterfaceActionParam(o) {\n return o != null && typeof o === \"object\" && \"$objectType\" in o && \"$primaryKey\" in o;\n}\n\n/** @internal */\nexport function isInterfaceQueryParam(o) {\n return o != null && typeof o === \"object\" && \"$objectType\" in o && \"$primaryKey\" in o;\n}\n\n/** @internal */\nexport function isInterfaceSpecifier(o) {\n return o != null && typeof o === \"object\" && \"$objectType\" in o && \"$primaryKey\" in o && o.$objectType !== o.$apiName;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isObjectSpecifiersObject(o) {\n return o && typeof o === \"object\" && typeof o.$apiName === \"string\" && o.$primaryKey != null;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { MediaSets } from \"@osdk/foundry.mediasets\";\nimport * as Attachments from \"@osdk/foundry.ontologies/Attachment\";\nimport { isAttachmentFile, isAttachmentUpload } from \"../object/AttachmentUpload.js\";\nimport { isMedia, isMediaReference, isMediaUpload } from \"../object/mediaUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { isInterfaceQueryParam, isInterfaceSpecifier } from \"./interfaceUtils.js\";\nimport { isObjectSpecifiersObject } from \"./isObjectSpecifiersObject.js\";\nimport { extractPrimaryKeyFromObjectSpecifier } from \"./objectSpecifierUtils.js\";\nimport { isWireObjectSet } from \"./WireObjectSet.js\";\n\n/**\n * Marshall user-facing data into the wire DataValue type\n *\n * @see DataValue for the expected payloads\n * @internal\n */\nexport async function toDataValueQueries(value, client, desiredType) {\n if (value == null) {\n return value;\n }\n if (Array.isArray(value) && desiredType.type === \"array\") {\n const values = Array.from(value);\n if (values.some(dataValue => isAttachmentUpload(dataValue) || isAttachmentFile(dataValue))) {\n const converted = [];\n for (const value of values) {\n converted.push(await toDataValueQueries(value, client, desiredType));\n }\n return converted;\n }\n const promiseArray = Array.from(value, async innerValue => await toDataValueQueries(innerValue, client, desiredType.array));\n return Promise.all(promiseArray);\n }\n switch (desiredType.type) {\n case \"attachment\":\n {\n if (isAttachmentUpload(value)) {\n const attachment = await Attachments.upload(client, value.data, {\n filename: value.name\n });\n return attachment.rid;\n }\n if (isAttachmentFile(value)) {\n const attachment = await Attachments.upload(client, value, {\n filename: value.name\n });\n return attachment.rid;\n }\n\n // If it's not an upload, it's just an attachment rid string which we can pass through\n return value;\n }\n case \"twoDimensionalAggregation\":\n {\n return {\n groups: value\n };\n }\n case \"threeDimensionalAggregation\":\n {\n return {\n groups: value\n };\n }\n case \"mediaReference\":\n {\n if (isMediaUpload(value)) {\n const mediaRef = await MediaSets.uploadMedia(client, value.data, {\n filename: value.fileName,\n preview: true\n });\n return mediaRef;\n }\n if (isMedia(value)) {\n return value.getMediaReference();\n }\n if (isMediaReference(value)) {\n return value;\n }\n throw new Error(\"Expected media reference type but got value that is not a MediaReference or MediaUpload\");\n }\n case \"set\":\n {\n if (value instanceof Set) {\n const promiseArray = Array.from(value, async innerValue => await toDataValueQueries(innerValue, client, desiredType.set));\n return Promise.all(promiseArray);\n }\n break;\n }\n case \"object\":\n {\n if (isObjectSpecifiersObject(value)) {\n return value.$primaryKey;\n }\n break;\n }\n case \"interface\":\n {\n if (isInterfaceSpecifier(value) || isInterfaceQueryParam(value)) {\n return {\n objectTypeApiName: value.$objectType,\n primaryKeyValue: value.$primaryKey\n };\n }\n }\n case \"objectSet\":\n case \"interfaceObjectSet\":\n {\n // object set (the rid as a string (passes through the last return), or the ObjectSet definition directly)\n if (isWireObjectSet(value)) {\n return value;\n }\n if (isObjectSet(value)) {\n return getWireObjectSet(value);\n }\n break;\n }\n case \"map\":\n {\n if (typeof value === \"object\") {\n const entrySet = [];\n for (const [key, mapValue] of Object.entries(value)) {\n entrySet.push({\n key: desiredType.keyType.type === \"object\" ? extractPrimaryKeyFromObjectSpecifier(key) : await toDataValueQueries(key, client, desiredType.keyType),\n value: await toDataValueQueries(mapValue, client, desiredType.valueType)\n });\n }\n return entrySet;\n }\n break;\n }\n case \"struct\":\n {\n if (typeof value === \"object\") {\n const structMap = {};\n for (const [key, structValue] of Object.entries(value)) {\n structMap[key] = await toDataValueQueries(structValue, client, desiredType.struct[key]);\n }\n return structMap;\n }\n }\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"timestamp\":\n return value;\n }\n return value;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Queries from \"@osdk/foundry.ontologies/Query\";\nimport invariant from \"tiny-invariant\";\nimport { createMediaFromReferenceInternal } from \"../createMediaFromReference.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { hydrateAttachmentFromRidInternal } from \"../public-utils/hydrateAttachmentFromRid.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { createObjectSpecifierFromInterfaceSpecifier, createObjectSpecifierFromPrimaryKey } from \"../util/objectSpecifierUtils.js\";\nimport { toDataValueQueries } from \"../util/toDataValueQueries.js\";\nexport async function applyQuery(client, query, params) {\n // We fire and forget so if a function has no parameters we don't unnecessarily load all metadata\n const qd = client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const response = await Queries.execute(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyQuery\"\n })), query), await client.ontologyRid, query.apiName, {\n parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}\n }, {\n version: query.isFixedVersion ? query.version : undefined,\n transactionId: client.transactionId,\n scenarioRid: client.scenarioRid,\n branch: client.branch\n });\n const objectOutputDefs = await getRequiredDefinitions((await qd).output, client);\n const remappedResponse = await remapQueryResponse(client, (await qd).output, response.value, objectOutputDefs);\n return remappedResponse;\n}\nexport async function remapQueryParams(params, client, paramTypes) {\n const parameterMap = {};\n for (const [key, value] of Object.entries(params)) {\n parameterMap[key] = await toDataValueQueries(value, client, paramTypes[key]);\n }\n return parameterMap;\n}\nexport async function remapQueryResponse(client, responseDataType, responseValue, definitions) {\n // handle null responses\n if (responseValue == null) {\n if (responseDataType.nullable) {\n return undefined;\n } else {\n throw new Error(\"Got null response when nullable was not allowed\");\n }\n }\n switch (responseDataType.type) {\n case \"union\":\n {\n throw new Error(\"Union return types are not yet supported\");\n }\n case \"array\":\n {\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(client, responseDataType.array, responseValue[i], definitions);\n }\n return responseValue;\n }\n case \"set\":\n {\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(client, responseDataType.set, responseValue[i], definitions);\n }\n return responseValue;\n }\n case \"attachment\":\n {\n return hydrateAttachmentFromRidInternal(client, responseValue);\n }\n case \"mediaReference\":\n {\n return createMediaFromReferenceInternal(client, responseValue);\n }\n case \"object\":\n {\n const def = definitions.get(responseDataType.object);\n if (!def || def.type !== \"object\") {\n throw new Error(`Missing definition for ${responseDataType.object}`);\n }\n return createQueryObjectResponse(responseValue, def);\n }\n case \"interface\":\n {\n const def = definitions.get(responseDataType.interface);\n if (!def || def.type !== \"interface\") {\n throw new Error(`Missing definition for ${responseDataType.interface}`);\n }\n return createQueryInterfaceResponse(responseValue, def);\n }\n case \"objectSet\":\n {\n const def = definitions.get(responseDataType.objectSet);\n if (!def) {\n throw new Error(`Missing definition for ${responseDataType.objectSet}`);\n }\n if (typeof responseValue === \"string\") {\n return createObjectSet(def, client, {\n type: \"intersect\",\n objectSets: [{\n type: \"base\",\n objectType: responseDataType.objectSet\n }, {\n type: \"reference\",\n reference: responseValue\n }]\n });\n }\n return createObjectSet(def, client, responseValue);\n }\n case \"struct\":\n {\n // figure out what keys need to be fixed up\n for (const [key, subtype] of Object.entries(responseDataType.struct)) {\n if (requiresConversion(subtype) || responseValue[key] == null) {\n responseValue[key] = await remapQueryResponse(client, subtype, responseValue[key], definitions);\n }\n }\n return responseValue;\n }\n case \"map\":\n {\n const map = {};\n !Array.isArray(responseValue) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected array entry\") : invariant(false) : void 0;\n for (const entry of responseValue) {\n !(entry.key != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected key\") : invariant(false) : void 0;\n !(responseDataType.valueType.nullable || entry.value != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected value\") : invariant(false) : void 0;\n const key = responseDataType.keyType.type === \"object\" ? getObjectSpecifier(entry.key, responseDataType.keyType.object, definitions) : entry.key;\n const value = await remapQueryResponse(client, responseDataType.valueType, entry.value, definitions);\n map[key] = value;\n }\n return map;\n }\n case \"twoDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n value\n } of responseValue.groups) {\n result.push({\n key,\n value\n });\n }\n return result;\n }\n case \"threeDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n groups\n } of responseValue.groups) {\n const subResult = [];\n for (const {\n key: subKey,\n value\n } of groups) {\n subResult.push({\n key: subKey,\n value\n });\n }\n result.push({\n key,\n groups: subResult\n });\n }\n return result;\n }\n }\n return responseValue;\n}\nexport async function getRequiredDefinitions(dataType, client) {\n const result = new Map();\n switch (dataType.type) {\n case \"objectSet\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.objectSet);\n result.set(dataType.objectSet, objectDef);\n break;\n }\n case \"interfaceObjectSet\":\n {\n const interfaceDef = await client.ontologyProvider.getInterfaceDefinition(dataType.objectSet);\n result.set(dataType.objectSet, interfaceDef);\n break;\n }\n case \"object\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.object);\n result.set(dataType.object, objectDef);\n break;\n }\n case \"interface\":\n {\n const interfaceDef = await client.ontologyProvider.getInterfaceDefinition(dataType.interface);\n result.set(dataType.interface, interfaceDef);\n break;\n }\n case \"set\":\n {\n return getRequiredDefinitions(dataType.set, client);\n }\n case \"array\":\n {\n return getRequiredDefinitions(dataType.array, client);\n }\n case \"map\":\n {\n const types = [dataType.keyType, dataType.valueType];\n const allDefs = await Promise.all(types.map(value => getRequiredDefinitions(value, client)));\n for (const defs of allDefs) {\n for (const [type, objectDef] of defs) {\n result.set(type, objectDef);\n }\n }\n break;\n }\n case \"struct\":\n {\n const structValues = Object.values(dataType.struct);\n const allDefs = await Promise.all(structValues.map(value => getRequiredDefinitions(value, client)));\n for (const defs of allDefs) {\n for (const [type, objectDef] of defs) {\n result.set(type, objectDef);\n }\n }\n break;\n }\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"mediaReference\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"typeReference\":\n case \"union\":\n break;\n default:\n {\n const _ = dataType;\n break;\n }\n }\n return result;\n}\nfunction requiresConversion(dataType) {\n switch (dataType.type) {\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"timestamp\":\n return false;\n case \"union\":\n return true;\n case \"struct\":\n return Object.values(dataType.struct).some(requiresConversion);\n case \"set\":\n return requiresConversion(dataType.set);\n case \"attachment\":\n case \"mediaReference\":\n case \"objectSet\":\n case \"twoDimensionalAggregation\":\n case \"threeDimensionalAggregation\":\n case \"object\":\n return true;\n default:\n return false;\n }\n}\nfunction getObjectSpecifier(primaryKey, objectTypeApiName, definitions) {\n const def = definitions.get(objectTypeApiName);\n if (!def || def.type !== \"object\") {\n throw new Error(`Missing definition for ${objectTypeApiName}`);\n }\n return createObjectSpecifierFromPrimaryKey(def, primaryKey);\n}\nexport function createQueryObjectResponse(primaryKey, objectDef) {\n return {\n $apiName: objectDef.apiName,\n $title: undefined,\n $objectType: objectDef.apiName,\n $primaryKey: primaryKey,\n $objectSpecifier: createObjectSpecifierFromPrimaryKey(objectDef, primaryKey)\n };\n}\nexport function createQueryInterfaceResponse(interfaceSpecifier, interfaceDef) {\n return {\n $apiName: interfaceDef.apiName,\n $title: undefined,\n $objectType: interfaceSpecifier.objectTypeApiName,\n $primaryKey: interfaceSpecifier.primaryKeyValue,\n $objectSpecifier: createObjectSpecifierFromInterfaceSpecifier(interfaceDef, interfaceSpecifier)\n };\n}"]}
1
+ {"version":3,"sources":["../../src/object/AttachmentUpload.ts","../../src/util/streamutils.ts","../../src/util/objectSpecifierUtils.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.63.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Query.js","../../src/object/mediaUpload.ts","../../src/util/interfaceUtils.ts","../../src/util/isObjectSpecifiersObject.ts","../../src/util/toDataValueQueries.ts","../../src/queries/applyQuery.ts"],"names":["foundryPlatformFetch","value","upload","MediaSet_exports","isWireObjectSet","isObjectSet","getWireObjectSet","addUserAgentAndRequestContextHeaders","augmentRequestContext","hydrateAttachmentFromRidInternal","createMediaFromReferenceInternal","createObjectSet","invariant"],"mappings":";;;;;;;;;;;;AAgBO,SAAS,mBAAmB,CAAA,EAAG;AACpC,EAAA,OAAO,OAAO,CAAA,KAAM,QAAA,IAAY,CAAA,IAAK,I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tE,EAAA,MAAM,GAAA,GAAM,WAAA,CAAY,GAAA,CAAI,iBAAiB,CAAA;AAC7C,EAAA,IAAI,CAAC,GAAA,IAAO,GAAA,CAAI,IAAA,KAAS,QAAA,EAAU;AACjC,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,uBAAA,EAA0B,iBAAiB,CAAA,CAAE,CAAA;AAAA,EAC/D;AACA,EAAA,OAAO,mCAAA,CAAoC,KAAK,UAAU,CAAA;AAC5D;AACO,SAAS,yBAAA,CAA0B,YAAY,SAAA,EAAW;AAC/D,EAAA,OAAO;AAAA,IACL,UAAU,SAAA,CAAU,OAAA;AAAA,IACpB,MAAA,EAAQ,MAAA;AAAA,IACR,aAAa,SAAA,CAAU,OAAA;AAAA,IACvB,WAAA,EAAa,UAAA;AAAA,IACb,gBAAA,EAAkB,mCAAA,CAAoC,SAAA,EAAW,UAAU;AAAA,GAC7E;AACF;AACO,SAAS,4BAAA,CAA6B,oBAAoB,YAAA,EAAc;AAC7E,EAAA,OAAO;AAAA,IACL,UAAU,YAAA,CAAa,OAAA;AAAA,IACvB,MAAA,EAAQ,MAAA;AAAA,IACR,aAAa,kBAAA,CAAmB,iBAAA;AAAA,IAChC,aAAa,kBAAA,CAAmB,eAAA;AAAA,IAChC,gBAAA,EAAkB,2CAAA,CAA4C,YAAA,EAAc,kBAAkB;AAAA,GAChG;AACF","file":"chunk-RAA62TNS.cjs","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isAttachmentUpload(o) {\n return typeof o === \"object\" && o != null && \"name\" in o && typeof o.name === \"string\" && \"data\" in o && o.data instanceof Blob && !(\"fileName\" in o);\n}\nexport function isAttachmentFile(o) {\n return typeof o === \"object\" && o instanceof Blob && \"name\" in o;\n}\nexport function createAttachmentUpload(data, name) {\n return {\n data,\n name\n };\n}","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst START_TOKEN = new Uint8Array([123, 34, 100, 97, 116, 97, 34, 58, 91]); // `{\"data\":[`\nconst OBJECT_OPEN_CHAR_CODE = 123; // '{'\nconst OBJECT_CLOSE_CHAR_CODE = 125; // '}'\n\nexport async function* parseStreamedResponse(asyncIterable) {\n const utf8decoder = new TextDecoder(\"utf-8\");\n let parsedStart = false;\n let prevChunks = [];\n let openBracesCount = 0;\n for await (const chunk of asyncIterable) {\n // on the first chunk, skip the expected START_TOKEN if we see it\n let i = 0;\n if (!parsedStart) {\n parsedStart = true;\n if (startsWith(chunk, START_TOKEN)) {\n i = START_TOKEN.length;\n }\n }\n for (; i < chunk.length; i++) {\n // if we aren't currently parsing an object, skip until we find the next object start\n while (openBracesCount === 0 && chunk[i] !== OBJECT_OPEN_CHAR_CODE && i < chunk.length) {\n i++;\n }\n\n // iterate through the chunk looking for the end of the current top level object\n let j = i;\n for (; j < chunk.length; j++) {\n const c = chunk[j];\n if (c === OBJECT_OPEN_CHAR_CODE) {\n openBracesCount++;\n } else if (c === OBJECT_CLOSE_CHAR_CODE) {\n openBracesCount--;\n\n // found a complete top level object, emit it\n if (0 === openBracesCount) {\n yield combineAndParse(utf8decoder, prevChunks, chunk.subarray(i, j + 1));\n\n // if there was a prevChunk, we've consumed it now\n prevChunks = [];\n\n // advance the start index to the final '}' of the current object,\n // which lets us start seeking the beginning of the next object\n i = j;\n break;\n }\n }\n }\n\n // if we reached the end of our chunk before finding the end of the object\n // store off the relevant remainder of our current chunk and go grab the next one\n if (j === chunk.length) {\n prevChunks.push(chunk.subarray(i));\n break;\n }\n }\n }\n}\nfunction startsWith(a, b) {\n if (a.length < b.length) {\n return false;\n }\n for (let i = 0; i < b.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\nfunction combineAndParse(utf8decoder, prev, curr) {\n let str = \"\";\n for (const chunk of prev) {\n str += utf8decoder.decode(chunk, {\n stream: true\n });\n }\n str += utf8decoder.decode(curr);\n return JSON.parse(str);\n}\nexport async function* iterateReadableStream(readableStream) {\n let res = await readableStream.read();\n while (!res.done) {\n yield res.value;\n res = await readableStream.read();\n }\n}\nexport async function* parseNdjsonStream(asyncIterable) {\n const decoder = new TextDecoder(\"utf-8\");\n let buffer = \"\";\n for await (const chunk of asyncIterable) {\n buffer += decoder.decode(chunk, {\n stream: true\n });\n let newlineIdx;\n while ((newlineIdx = buffer.indexOf(\"\\n\")) !== -1) {\n const line = buffer.slice(0, newlineIdx);\n buffer = buffer.slice(newlineIdx + 1);\n if (line.length > 0) {\n yield JSON.parse(line);\n }\n }\n }\n buffer += decoder.decode();\n const trailing = buffer.trim();\n if (trailing.length > 0) {\n yield JSON.parse(trailing);\n }\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Creates an Object Specifier. An ObjectSpecifier is a string that uniquely identifies an object in the system,\n * even when loading an interface object where primary key uniqueness is not guaranteed.\n *\n * @param objectDef - An Object Type Definition\n * @param primaryKey - The value you want to use as the primary key\n * @returns An Object Specifier\n */\nexport function createObjectSpecifierFromPrimaryKey(objectDef, primaryKey) {\n return `${objectDef.apiName}:${primaryKey}`;\n}\n\n/**\n * Creates an Object Specifier. An ObjectSpecifier is a string that uniquely identifies an object in the system,\n * even when loading an interface object where primary key uniqueness is not guaranteed.\n *\n * @param objectDef - An Object Type Definition\n * @param primaryKey - The value you want to use as the primary key\n * @returns An Object Specifier\n */\nexport function createObjectSpecifierFromInterfaceSpecifier(interfaceDef, interfaceSpecifier) {\n return `${interfaceSpecifier.objectTypeApiName}:${interfaceSpecifier.primaryKeyValue}`;\n}\n\n/**\n * Extracts the primary key from an ObjectSpecifier on an OSDK object.\n *\n * @returns A string representing the primary key\n */\nexport function extractPrimaryKeyFromObjectSpecifier(ObjectSpecifier) {\n return ObjectSpecifier.split(\":\")[1];\n}\n\n/**\n * Extracts the object type from an ObjectSpecifier on an OSDK object.\n *\n * @returns The object type extracted from the ObjectSpecifier\n */\nexport function extractObjectTypeFromObjectSpecifier(ObjectSpecifier) {\n return ObjectSpecifier.split(\":\")[0];\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _execute = [1, \"/v2/ontologies/{0}/queries/{1}/execute\", 7];\n/**\n * Executes a Query using the given parameters. By default, the latest version of the Query is executed.\n *\n * Optional parameters do not need to be supplied.\n *\n * @public\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isMedia(o) {\n return typeof o === \"object\" && o != null && typeof o.fetchMetadata === \"function\" && typeof o.fetchContents === \"function\" && typeof o.getMediaReference === \"function\";\n}\nexport function isMediaReference(o) {\n 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\";\n}\nexport function isMediaUpload(o) {\n return typeof o === \"object\" && o != null && \"fileName\" in o && typeof o.fileName === \"string\" && \"data\" in o && typeof o.data === \"object\" && o.data instanceof Blob;\n}","/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** Type representing whether a definition is an object or interface */\n\n/** @internal */\nexport function getDefType(apiNameOrDef) {\n return typeof apiNameOrDef === \"string\" ? \"object\" : apiNameOrDef.type;\n}\n\n/** @internal */\nexport function isInterfaceActionParam(o) {\n return o != null && typeof o === \"object\" && \"$objectType\" in o && \"$primaryKey\" in o;\n}\n\n/** @internal */\nexport function isInterfaceQueryParam(o) {\n return o != null && typeof o === \"object\" && \"$objectType\" in o && \"$primaryKey\" in o;\n}\n\n/** @internal */\nexport function isInterfaceSpecifier(o) {\n return o != null && typeof o === \"object\" && \"$objectType\" in o && \"$primaryKey\" in o && o.$objectType !== o.$apiName;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isObjectSpecifiersObject(o) {\n return o && typeof o === \"object\" && typeof o.$apiName === \"string\" && o.$primaryKey != null;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { MediaSets } from \"@osdk/foundry.mediasets\";\nimport * as Attachments from \"@osdk/foundry.ontologies/Attachment\";\nimport { isAttachmentFile, isAttachmentUpload } from \"../object/AttachmentUpload.js\";\nimport { isMedia, isMediaReference, isMediaUpload } from \"../object/mediaUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { isInterfaceQueryParam, isInterfaceSpecifier } from \"./interfaceUtils.js\";\nimport { isObjectSpecifiersObject } from \"./isObjectSpecifiersObject.js\";\nimport { extractPrimaryKeyFromObjectSpecifier } from \"./objectSpecifierUtils.js\";\nimport { isWireObjectSet } from \"./WireObjectSet.js\";\n\n/**\n * Marshall user-facing data into the wire DataValue type\n *\n * @see DataValue for the expected payloads\n * @internal\n */\nexport async function toDataValueQueries(value, client, desiredType) {\n if (value == null) {\n return value;\n }\n if (Array.isArray(value) && desiredType.type === \"array\") {\n const values = Array.from(value);\n if (values.some(dataValue => isAttachmentUpload(dataValue) || isAttachmentFile(dataValue))) {\n const converted = [];\n for (const value of values) {\n converted.push(await toDataValueQueries(value, client, desiredType));\n }\n return converted;\n }\n const promiseArray = Array.from(value, async innerValue => await toDataValueQueries(innerValue, client, desiredType.array));\n return Promise.all(promiseArray);\n }\n switch (desiredType.type) {\n case \"attachment\":\n {\n if (isAttachmentUpload(value)) {\n const attachment = await Attachments.upload(client, value.data, {\n filename: value.name\n });\n return attachment.rid;\n }\n if (isAttachmentFile(value)) {\n const attachment = await Attachments.upload(client, value, {\n filename: value.name\n });\n return attachment.rid;\n }\n\n // If it's not an upload, it's just an attachment rid string which we can pass through\n return value;\n }\n case \"twoDimensionalAggregation\":\n {\n return {\n groups: value\n };\n }\n case \"threeDimensionalAggregation\":\n {\n return {\n groups: value\n };\n }\n case \"mediaReference\":\n {\n if (isMediaUpload(value)) {\n const mediaRef = await MediaSets.uploadMedia(client, value.data, {\n filename: value.fileName,\n preview: true\n });\n return mediaRef;\n }\n if (isMedia(value)) {\n return value.getMediaReference();\n }\n if (isMediaReference(value)) {\n return value;\n }\n throw new Error(\"Expected media reference type but got value that is not a MediaReference or MediaUpload\");\n }\n case \"set\":\n {\n if (value instanceof Set) {\n const promiseArray = Array.from(value, async innerValue => await toDataValueQueries(innerValue, client, desiredType.set));\n return Promise.all(promiseArray);\n }\n break;\n }\n case \"object\":\n {\n if (isObjectSpecifiersObject(value)) {\n return value.$primaryKey;\n }\n break;\n }\n case \"interface\":\n {\n if (isInterfaceSpecifier(value) || isInterfaceQueryParam(value)) {\n return {\n objectTypeApiName: value.$objectType,\n primaryKeyValue: value.$primaryKey\n };\n }\n }\n case \"objectSet\":\n case \"interfaceObjectSet\":\n {\n // object set (the rid as a string (passes through the last return), or the ObjectSet definition directly)\n if (isWireObjectSet(value)) {\n return value;\n }\n if (isObjectSet(value)) {\n return getWireObjectSet(value);\n }\n break;\n }\n case \"map\":\n {\n if (typeof value === \"object\") {\n const entrySet = [];\n for (const [key, mapValue] of Object.entries(value)) {\n entrySet.push({\n key: desiredType.keyType.type === \"object\" ? extractPrimaryKeyFromObjectSpecifier(key) : await toDataValueQueries(key, client, desiredType.keyType),\n value: await toDataValueQueries(mapValue, client, desiredType.valueType)\n });\n }\n return entrySet;\n }\n break;\n }\n case \"struct\":\n {\n if (typeof value === \"object\") {\n const structMap = {};\n for (const [key, structValue] of Object.entries(value)) {\n structMap[key] = await toDataValueQueries(structValue, client, desiredType.struct[key]);\n }\n return structMap;\n }\n }\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"timestamp\":\n return value;\n }\n return value;\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Queries from \"@osdk/foundry.ontologies/Query\";\nimport invariant from \"tiny-invariant\";\nimport { createMediaFromReferenceInternal } from \"../createMediaFromReference.js\";\nimport { createObjectSet } from \"../objectSet/createObjectSet.js\";\nimport { hydrateAttachmentFromRidInternal } from \"../public-utils/hydrateAttachmentFromRid.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { createObjectSpecifierFromInterfaceSpecifier, createObjectSpecifierFromPrimaryKey } from \"../util/objectSpecifierUtils.js\";\nimport { toDataValueQueries } from \"../util/toDataValueQueries.js\";\nexport async function applyQuery(client, query, params) {\n // We fire and forget so if a function has no parameters we don't unnecessarily load all metadata\n const qd = client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const response = await Queries.execute(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyQuery\"\n })), query), await client.ontologyRid, query.apiName, {\n parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}\n }, {\n version: query.isFixedVersion ? query.version : undefined,\n transactionId: client.transactionId,\n scenarioRid: client.scenarioRid,\n branch: client.branch\n });\n const objectOutputDefs = await getRequiredDefinitions((await qd).output, client);\n const remappedResponse = await remapQueryResponse(client, (await qd).output, response.value, objectOutputDefs);\n return remappedResponse;\n}\nexport async function remapQueryParams(params, client, paramTypes) {\n const parameterMap = {};\n for (const [key, value] of Object.entries(params)) {\n parameterMap[key] = await toDataValueQueries(value, client, paramTypes[key]);\n }\n return parameterMap;\n}\nexport async function remapQueryResponse(client, responseDataType, responseValue, definitions) {\n // handle null responses\n if (responseValue == null) {\n if (responseDataType.nullable) {\n return undefined;\n } else {\n throw new Error(\"Got null response when nullable was not allowed\");\n }\n }\n switch (responseDataType.type) {\n case \"union\":\n {\n throw new Error(\"Union return types are not yet supported\");\n }\n case \"array\":\n {\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(client, responseDataType.array, responseValue[i], definitions);\n }\n return responseValue;\n }\n case \"set\":\n {\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(client, responseDataType.set, responseValue[i], definitions);\n }\n return responseValue;\n }\n case \"attachment\":\n {\n return hydrateAttachmentFromRidInternal(client, responseValue);\n }\n case \"mediaReference\":\n {\n return createMediaFromReferenceInternal(client, responseValue);\n }\n case \"object\":\n {\n const def = definitions.get(responseDataType.object);\n if (!def || def.type !== \"object\") {\n throw new Error(`Missing definition for ${responseDataType.object}`);\n }\n return createQueryObjectResponse(responseValue, def);\n }\n case \"interface\":\n {\n const def = definitions.get(responseDataType.interface);\n if (!def || def.type !== \"interface\") {\n throw new Error(`Missing definition for ${responseDataType.interface}`);\n }\n return createQueryInterfaceResponse(responseValue, def);\n }\n case \"objectSet\":\n {\n const def = definitions.get(responseDataType.objectSet);\n if (!def) {\n throw new Error(`Missing definition for ${responseDataType.objectSet}`);\n }\n if (typeof responseValue === \"string\") {\n return createObjectSet(def, client, {\n type: \"intersect\",\n objectSets: [{\n type: \"base\",\n objectType: responseDataType.objectSet\n }, {\n type: \"reference\",\n reference: responseValue\n }]\n });\n }\n return createObjectSet(def, client, responseValue);\n }\n case \"struct\":\n {\n // figure out what keys need to be fixed up\n for (const [key, subtype] of Object.entries(responseDataType.struct)) {\n if (requiresConversion(subtype) || responseValue[key] == null) {\n responseValue[key] = await remapQueryResponse(client, subtype, responseValue[key], definitions);\n }\n }\n return responseValue;\n }\n case \"map\":\n {\n const map = {};\n !Array.isArray(responseValue) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected array entry\") : invariant(false) : void 0;\n for (const entry of responseValue) {\n !(entry.key != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected key\") : invariant(false) : void 0;\n !(responseDataType.valueType.nullable || entry.value != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected value\") : invariant(false) : void 0;\n const key = responseDataType.keyType.type === \"object\" ? getObjectSpecifier(entry.key, responseDataType.keyType.object, definitions) : entry.key;\n const value = await remapQueryResponse(client, responseDataType.valueType, entry.value, definitions);\n map[key] = value;\n }\n return map;\n }\n case \"twoDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n value\n } of responseValue.groups) {\n result.push({\n key,\n value\n });\n }\n return result;\n }\n case \"threeDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n groups\n } of responseValue.groups) {\n const subResult = [];\n for (const {\n key: subKey,\n value\n } of groups) {\n subResult.push({\n key: subKey,\n value\n });\n }\n result.push({\n key,\n groups: subResult\n });\n }\n return result;\n }\n }\n return responseValue;\n}\nexport async function getRequiredDefinitions(dataType, client) {\n const result = new Map();\n switch (dataType.type) {\n case \"objectSet\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.objectSet);\n result.set(dataType.objectSet, objectDef);\n break;\n }\n case \"interfaceObjectSet\":\n {\n const interfaceDef = await client.ontologyProvider.getInterfaceDefinition(dataType.objectSet);\n result.set(dataType.objectSet, interfaceDef);\n break;\n }\n case \"object\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.object);\n result.set(dataType.object, objectDef);\n break;\n }\n case \"interface\":\n {\n const interfaceDef = await client.ontologyProvider.getInterfaceDefinition(dataType.interface);\n result.set(dataType.interface, interfaceDef);\n break;\n }\n case \"set\":\n {\n return getRequiredDefinitions(dataType.set, client);\n }\n case \"array\":\n {\n return getRequiredDefinitions(dataType.array, client);\n }\n case \"map\":\n {\n const types = [dataType.keyType, dataType.valueType];\n const allDefs = await Promise.all(types.map(value => getRequiredDefinitions(value, client)));\n for (const defs of allDefs) {\n for (const [type, objectDef] of defs) {\n result.set(type, objectDef);\n }\n }\n break;\n }\n case \"struct\":\n {\n const structValues = Object.values(dataType.struct);\n const allDefs = await Promise.all(structValues.map(value => getRequiredDefinitions(value, client)));\n for (const defs of allDefs) {\n for (const [type, objectDef] of defs) {\n result.set(type, objectDef);\n }\n }\n break;\n }\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"mediaReference\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"typeReference\":\n case \"union\":\n break;\n default:\n {\n const _ = dataType;\n break;\n }\n }\n return result;\n}\nfunction requiresConversion(dataType) {\n switch (dataType.type) {\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"timestamp\":\n return false;\n case \"union\":\n return true;\n case \"struct\":\n return Object.values(dataType.struct).some(requiresConversion);\n case \"set\":\n return requiresConversion(dataType.set);\n case \"attachment\":\n case \"mediaReference\":\n case \"objectSet\":\n case \"twoDimensionalAggregation\":\n case \"threeDimensionalAggregation\":\n case \"object\":\n return true;\n default:\n return false;\n }\n}\nfunction getObjectSpecifier(primaryKey, objectTypeApiName, definitions) {\n const def = definitions.get(objectTypeApiName);\n if (!def || def.type !== \"object\") {\n throw new Error(`Missing definition for ${objectTypeApiName}`);\n }\n return createObjectSpecifierFromPrimaryKey(def, primaryKey);\n}\nexport function createQueryObjectResponse(primaryKey, objectDef) {\n return {\n $apiName: objectDef.apiName,\n $title: undefined,\n $objectType: objectDef.apiName,\n $primaryKey: primaryKey,\n $objectSpecifier: createObjectSpecifierFromPrimaryKey(objectDef, primaryKey)\n };\n}\nexport function createQueryInterfaceResponse(interfaceSpecifier, interfaceDef) {\n return {\n $apiName: interfaceDef.apiName,\n $title: undefined,\n $objectType: interfaceSpecifier.objectTypeApiName,\n $primaryKey: interfaceSpecifier.primaryKeyValue,\n $objectSpecifier: createObjectSpecifierFromInterfaceSpecifier(interfaceDef, interfaceSpecifier)\n };\n}"]}
@@ -4,8 +4,8 @@ var chunkYJG67XL4_cjs = require('./chunk-YJG67XL4.cjs');
4
4
  var chunkTQUNF2DZ_cjs = require('./chunk-TQUNF2DZ.cjs');
5
5
  var chunkPIWGMK3H_cjs = require('./chunk-PIWGMK3H.cjs');
6
6
  var chunkCEBSLQQC_cjs = require('./chunk-CEBSLQQC.cjs');
7
- var chunkVUQAQMDE_cjs = require('./chunk-VUQAQMDE.cjs');
8
- var chunk6BO5YHRX_cjs = require('./chunk-6BO5YHRX.cjs');
7
+ var chunkRAA62TNS_cjs = require('./chunk-RAA62TNS.cjs');
8
+ var chunkJMM4ZAQJ_cjs = require('./chunk-JMM4ZAQJ.cjs');
9
9
  var chunkROJIXXGF_cjs = require('./chunk-ROJIXXGF.cjs');
10
10
  var chunkH6PXPU6F_cjs = require('./chunk-H6PXPU6F.cjs');
11
11
  var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
@@ -130,7 +130,7 @@ function isScenarioClient(value) {
130
130
  return value != null && (typeof value === "object" || typeof value === "function") && typeof value.getScenarioReference === "function";
131
131
  }
132
132
  function buildScenarioClient(parent, scenarioRid) {
133
- const ctx = parent[chunk6BO5YHRX_cjs.additionalContext];
133
+ const ctx = parent[chunkJMM4ZAQJ_cjs.additionalContext];
134
134
  if (ctx.transactionId != null) {
135
135
  console.warn("withScenario / createScenario: the supplied client has an active transaction. Ignoring the transaction and scoping to the scenario instead.");
136
136
  }
@@ -141,7 +141,7 @@ function buildScenarioClient(parent, scenarioRid) {
141
141
  logger: ctx.logger,
142
142
  UNSTABLE_DO_NOT_USE_BRANCH: ctx.branch
143
143
  }, ctx.fetch);
144
- const innerCtx = inner[chunk6BO5YHRX_cjs.additionalContext];
144
+ const innerCtx = inner[chunkJMM4ZAQJ_cjs.additionalContext];
145
145
  async function getEditedEntityTypes() {
146
146
  const ontologyRid = await innerCtx.ontologyRid;
147
147
  const response = await OntologyScenario_exports.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid, {
@@ -283,7 +283,7 @@ async function toDataValue(value, client, actionMetadata) {
283
283
  }
284
284
  if (Array.isArray(value) || value instanceof Set) {
285
285
  const values = Array.from(value);
286
- if (values.some((dataValue) => chunkVUQAQMDE_cjs.isAttachmentUpload(dataValue) || chunkVUQAQMDE_cjs.isAttachmentFile(dataValue))) {
286
+ if (values.some((dataValue) => chunkRAA62TNS_cjs.isAttachmentUpload(dataValue) || chunkRAA62TNS_cjs.isAttachmentFile(dataValue))) {
287
287
  const converted = [];
288
288
  for (const value2 of values) {
289
289
  converted.push(await toDataValue(value2, client));
@@ -293,44 +293,44 @@ async function toDataValue(value, client, actionMetadata) {
293
293
  const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client));
294
294
  return Promise.all(promiseArray);
295
295
  }
296
- if (chunkVUQAQMDE_cjs.isAttachmentUpload(value)) {
297
- const attachment = await chunk6BO5YHRX_cjs.upload(client, value.data, {
296
+ if (chunkRAA62TNS_cjs.isAttachmentUpload(value)) {
297
+ const attachment = await chunkJMM4ZAQJ_cjs.upload(client, value.data, {
298
298
  filename: value.name
299
299
  });
300
300
  return await toDataValue(attachment.rid, client);
301
301
  }
302
- if (chunkVUQAQMDE_cjs.isAttachmentFile(value)) {
303
- const attachment = await chunk6BO5YHRX_cjs.upload(client, value, {
302
+ if (chunkRAA62TNS_cjs.isAttachmentFile(value)) {
303
+ const attachment = await chunkJMM4ZAQJ_cjs.upload(client, value, {
304
304
  filename: value.name
305
305
  });
306
306
  return await toDataValue(attachment.rid, client);
307
307
  }
308
- if (chunkVUQAQMDE_cjs.isMediaUpload(value)) {
308
+ if (chunkRAA62TNS_cjs.isMediaUpload(value)) {
309
309
  const mediaRef = await chunkROJIXXGF_cjs.MediaSet_exports.uploadMedia(client, value.data, {
310
310
  filename: value.fileName,
311
311
  preview: true
312
312
  });
313
313
  return await toDataValue(mediaRef, client);
314
314
  }
315
- if (chunkVUQAQMDE_cjs.isMedia(value)) {
315
+ if (chunkRAA62TNS_cjs.isMedia(value)) {
316
316
  return value.getMediaReference();
317
317
  }
318
- if (chunkVUQAQMDE_cjs.isMediaReference(value)) {
318
+ if (chunkRAA62TNS_cjs.isMediaReference(value)) {
319
319
  return value;
320
320
  }
321
321
  if (isOntologyObjectV2(value)) {
322
322
  return await toDataValue(value.__primaryKey, client);
323
323
  }
324
- if (chunkVUQAQMDE_cjs.isObjectSpecifiersObject(value)) {
324
+ if (chunkRAA62TNS_cjs.isObjectSpecifiersObject(value)) {
325
325
  return await toDataValue(value.$primaryKey, client);
326
326
  }
327
- if (chunk6BO5YHRX_cjs.isWireObjectSet(value)) {
327
+ if (chunkJMM4ZAQJ_cjs.isWireObjectSet(value)) {
328
328
  return value;
329
329
  }
330
- if (chunk6BO5YHRX_cjs.isObjectSet(value)) {
331
- return chunk6BO5YHRX_cjs.getWireObjectSet(value);
330
+ if (chunkJMM4ZAQJ_cjs.isObjectSet(value)) {
331
+ return chunkJMM4ZAQJ_cjs.getWireObjectSet(value);
332
332
  }
333
- if (chunkVUQAQMDE_cjs.isInterfaceActionParam(value)) {
333
+ if (chunkRAA62TNS_cjs.isInterfaceActionParam(value)) {
334
334
  return {
335
335
  objectTypeApiName: value.$objectType,
336
336
  primaryKeyValue: value.$primaryKey
@@ -351,7 +351,7 @@ async function toDataValue(value, client, actionMetadata) {
351
351
 
352
352
  // src/actions/applyAction.ts
353
353
  async function applyAction(client, action, parameters, options = {}) {
354
- const clientWithHeaders = chunk6BO5YHRX_cjs.addUserAgentAndRequestContextHeaders(chunk6BO5YHRX_cjs.augmentRequestContext(client, (_) => ({
354
+ const clientWithHeaders = chunkJMM4ZAQJ_cjs.addUserAgentAndRequestContextHeaders(chunkJMM4ZAQJ_cjs.augmentRequestContext(client, (_) => ({
355
355
  finalMethodCall: "applyAction"
356
356
  })), action);
357
357
  if (Array.isArray(parameters)) {
@@ -503,7 +503,7 @@ function getTimeRange(body) {
503
503
  }
504
504
  async function* asyncIterPointsHelper(iterator) {
505
505
  const reader = iterator.body?.getReader();
506
- for await (const point of chunkVUQAQMDE_cjs.parseStreamedResponse(chunkVUQAQMDE_cjs.iterateReadableStream(reader))) {
506
+ for await (const point of chunkRAA62TNS_cjs.parseStreamedResponse(chunkRAA62TNS_cjs.iterateReadableStream(reader))) {
507
507
  yield {
508
508
  time: point.time,
509
509
  value: point.value
@@ -599,7 +599,7 @@ var MediaReferencePropertyImpl = class {
599
599
  ReadToken: token
600
600
  } : void 0);
601
601
  return {
602
- itemMetadata: chunk6BO5YHRX_cjs.validateMediaItemMetadata(raw)
602
+ itemMetadata: chunkJMM4ZAQJ_cjs.validateMediaItemMetadata(raw)
603
603
  };
604
604
  }
605
605
  getMediaReference() {
@@ -1027,8 +1027,8 @@ function get$link(holder) {
1027
1027
  [objDef.primaryKeyApiName]: rawObj.$primaryKey
1028
1028
  }).pivotTo(linkName);
1029
1029
  const value = !linkDef.multiplicity ? {
1030
- fetchOne: (options) => chunk6BO5YHRX_cjs.fetchSingle(client, objDef, options ?? {}, chunk6BO5YHRX_cjs.getWireObjectSet(objectSet)),
1031
- fetchOneWithErrors: (options) => chunk6BO5YHRX_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunk6BO5YHRX_cjs.getWireObjectSet(objectSet))
1030
+ fetchOne: (options) => chunkJMM4ZAQJ_cjs.fetchSingle(client, objDef, options ?? {}, chunkJMM4ZAQJ_cjs.getWireObjectSet(objectSet)),
1031
+ fetchOneWithErrors: (options) => chunkJMM4ZAQJ_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkJMM4ZAQJ_cjs.getWireObjectSet(objectSet))
1032
1032
  } : objectSet;
1033
1033
  return [linkName, value];
1034
1034
  })));
@@ -1051,8 +1051,8 @@ function get$linkForInterface(holder) {
1051
1051
  apiName: linkDef.targetTypeApiName
1052
1052
  };
1053
1053
  const value = !linkDef.multiplicity ? {
1054
- fetchOne: (options) => chunk6BO5YHRX_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunk6BO5YHRX_cjs.getWireObjectSet(objectSet)),
1055
- fetchOneWithErrors: (options) => chunk6BO5YHRX_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunk6BO5YHRX_cjs.getWireObjectSet(objectSet))
1054
+ fetchOne: (options) => chunkJMM4ZAQJ_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkJMM4ZAQJ_cjs.getWireObjectSet(objectSet)),
1055
+ fetchOneWithErrors: (options) => chunkJMM4ZAQJ_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkJMM4ZAQJ_cjs.getWireObjectSet(objectSet))
1056
1056
  } : objectSet;
1057
1057
  return [linkName, value];
1058
1058
  })));
@@ -1080,7 +1080,7 @@ function extractValueByImplementation(underlying, impl) {
1080
1080
  }
1081
1081
  }
1082
1082
  function createOsdkInterface(underlying, interfaceDef) {
1083
- const [objApiNamespace] = chunk6BO5YHRX_cjs.extractNamespace(interfaceDef.apiName);
1083
+ const [objApiNamespace] = chunkJMM4ZAQJ_cjs.extractNamespace(interfaceDef.apiName);
1084
1084
  const objDef = underlying[ObjectDefRef];
1085
1085
  return Object.freeze(Object.defineProperties({}, {
1086
1086
  // first to minimize hidden classes
@@ -1143,7 +1143,7 @@ function createOsdkInterface(underlying, interfaceDef) {
1143
1143
  value: interfaceDef
1144
1144
  },
1145
1145
  ...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
1146
- const [apiNamespace, apiName] = chunk6BO5YHRX_cjs.extractNamespace(p);
1146
+ const [apiNamespace, apiName] = chunkJMM4ZAQJ_cjs.extractNamespace(p);
1147
1147
  const exposedName = apiNamespace === objApiNamespace ? apiName : p;
1148
1148
  const impl = objDef.interfaceImplementations?.[interfaceDef.apiName]?.[p];
1149
1149
  if (impl != null) {
@@ -1192,7 +1192,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
1192
1192
  }
1193
1193
  const interfacePropName = inverseMap[objPropName];
1194
1194
  if (interfacePropName == null) continue;
1195
- const [apiNamespace, apiName] = chunk6BO5YHRX_cjs.extractNamespace(interfacePropName);
1195
+ const [apiNamespace, apiName] = chunkJMM4ZAQJ_cjs.extractNamespace(interfacePropName);
1196
1196
  const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
1197
1197
  remapped[key] = underlyingSecurities[objPropName];
1198
1198
  }
@@ -1285,7 +1285,7 @@ var basePropDefs = {
1285
1285
  "$objectSpecifier": {
1286
1286
  get() {
1287
1287
  const rawObj = this[UnderlyingOsdkObject];
1288
- return chunkVUQAQMDE_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
1288
+ return chunkRAA62TNS_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
1289
1289
  },
1290
1290
  enumerable: true
1291
1291
  },
@@ -1357,9 +1357,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
1357
1357
  switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
1358
1358
  case "attachment":
1359
1359
  if (Array.isArray(rawValue)) {
1360
- return rawValue.map((a) => chunk6BO5YHRX_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1360
+ return rawValue.map((a) => chunkJMM4ZAQJ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1361
1361
  } else {
1362
- return chunk6BO5YHRX_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1362
+ return chunkJMM4ZAQJ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1363
1363
  }
1364
1364
  default:
1365
1365
  process.env.NODE_ENV !== "production" ? invariant3__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant3__default.default(false) ;
@@ -1375,9 +1375,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
1375
1375
  }
1376
1376
  if (propDef.type === "attachment") {
1377
1377
  if (Array.isArray(rawValue)) {
1378
- return rawValue.map((a) => chunk6BO5YHRX_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1378
+ return rawValue.map((a) => chunkJMM4ZAQJ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
1379
1379
  }
1380
- return chunk6BO5YHRX_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1380
+ return chunkJMM4ZAQJ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
1381
1381
  }
1382
1382
  if (propDef.type === "cipherText") {
1383
1383
  return new CipherTextPropertyImpl({
@@ -1728,11 +1728,11 @@ var createStandardOntologyProviderFactory = (client) => {
1728
1728
  };
1729
1729
 
1730
1730
  // src/util/UserAgent.ts
1731
- var USER_AGENT = `osdk-client/${"2.41.0"}`;
1732
- var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.41.0"}`;
1731
+ var USER_AGENT = `osdk-client/${"2.41.1-main-e39a72892d538f3130e2cd51cee05d83d11fa493"}`;
1732
+ var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.41.1-main-e39a72892d538f3130e2cd51cee05d83d11fa493"}`;
1733
1733
 
1734
1734
  // src/createMinimalClient.ts
1735
- function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunk6BO5YHRX_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1735
+ function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkJMM4ZAQJ_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
1736
1736
  if (process.env.NODE_ENV !== "production") {
1737
1737
  try {
1738
1738
  new URL(baseUrl);
@@ -2327,7 +2327,7 @@ var ActionInvoker = class {
2327
2327
  };
2328
2328
  var QueryInvoker = class {
2329
2329
  constructor(clientCtx, queryDef) {
2330
- this.executeFunction = chunkVUQAQMDE_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
2330
+ this.executeFunction = chunkRAA62TNS_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
2331
2331
  }
2332
2332
  };
2333
2333
  function createClientInternal(objectSetFactory, transactionRid, flushEdits, scenarioRid, subscribeFn, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
@@ -2370,7 +2370,7 @@ function createClientFromContext(clientCtx) {
2370
2370
  async *executeStreamingFunction(query, params) {
2371
2371
  const {
2372
2372
  applyStreamingQuery
2373
- } = await import('./applyStreamingQuery-RBPTQJXT.cjs');
2373
+ } = await import('./applyStreamingQuery-SO4HDCZR.cjs');
2374
2374
  yield* applyStreamingQuery(clientCtx, query, params);
2375
2375
  }
2376
2376
  };
@@ -2386,7 +2386,7 @@ function createClientFromContext(clientCtx) {
2386
2386
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
2387
2387
  return {
2388
2388
  fetchOneByRid: async (objectType, rid, options) => {
2389
- return await chunk6BO5YHRX_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2389
+ return await chunkJMM4ZAQJ_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
2390
2390
  }
2391
2391
  };
2392
2392
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
@@ -2410,10 +2410,10 @@ function createClientFromContext(clientCtx) {
2410
2410
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
2411
2411
  return {
2412
2412
  fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
2413
- return await chunk6BO5YHRX_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2413
+ return await chunkJMM4ZAQJ_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
2414
2414
  },
2415
2415
  fetchPageByRidNoType: async (rids, options) => {
2416
- return await chunk6BO5YHRX_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2416
+ return await chunkJMM4ZAQJ_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
2417
2417
  }
2418
2418
  };
2419
2419
  case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
@@ -2457,7 +2457,7 @@ function createClientFromContext(clientCtx) {
2457
2457
  [symbolClientContext2]: {
2458
2458
  value: clientCtx
2459
2459
  },
2460
- [chunk6BO5YHRX_cjs.additionalContext]: {
2460
+ [chunkJMM4ZAQJ_cjs.additionalContext]: {
2461
2461
  value: clientCtx
2462
2462
  },
2463
2463
  fetchMetadata: {
@@ -2466,10 +2466,10 @@ function createClientFromContext(clientCtx) {
2466
2466
  });
2467
2467
  return client;
2468
2468
  }
2469
- var createClient = createClientInternal.bind(void 0, chunk6BO5YHRX_cjs.createObjectSet, void 0, void 0, void 0, void 0);
2470
- var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunk6BO5YHRX_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
2471
- var createClientWithSubscribe = (subscribeFn, ...args) => createClientInternal(chunk6BO5YHRX_cjs.createObjectSet, void 0, void 0, void 0, subscribeFn, ...args);
2472
- var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunk6BO5YHRX_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
2469
+ var createClient = createClientInternal.bind(void 0, chunkJMM4ZAQJ_cjs.createObjectSet, void 0, void 0, void 0, void 0);
2470
+ var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkJMM4ZAQJ_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
2471
+ var createClientWithSubscribe = (subscribeFn, ...args) => createClientInternal(chunkJMM4ZAQJ_cjs.createObjectSet, void 0, void 0, void 0, subscribeFn, ...args);
2472
+ var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkJMM4ZAQJ_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
2473
2473
  function createWithRid(rids) {
2474
2474
  const withRid = {
2475
2475
  type: "static",
@@ -2492,5 +2492,5 @@ exports.createClientFromContext = createClientFromContext;
2492
2492
  exports.createClientWithSubscribe = createClientWithSubscribe;
2493
2493
  exports.createClientWithTransaction = createClientWithTransaction;
2494
2494
  exports.createOsdkObject = createOsdkObject;
2495
- //# sourceMappingURL=chunk-YBWIE5CJ.cjs.map
2496
- //# sourceMappingURL=chunk-YBWIE5CJ.cjs.map
2495
+ //# sourceMappingURL=chunk-WD4DPREM.cjs.map
2496
+ //# sourceMappingURL=chunk-WD4DPREM.cjs.map