@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,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkEBIMOR5S_cjs = require('./chunk-EBIMOR5S.cjs');
3
+ var chunkCNVWYZKL_cjs = require('./chunk-CNVWYZKL.cjs');
4
4
  var chunkZPLXXOU6_cjs = require('./chunk-ZPLXXOU6.cjs');
5
5
  var chunkD26YLHTV_cjs = require('./chunk-D26YLHTV.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 chunkEBIMOR5S_cjs.upload(client, value.data, {
187
+ const attachment = await chunkCNVWYZKL_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 chunkEBIMOR5S_cjs.upload(client, value, {
193
+ const attachment = await chunkCNVWYZKL_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 (chunkEBIMOR5S_cjs.isWireObjectSet(value)) {
249
+ if (chunkCNVWYZKL_cjs.isWireObjectSet(value)) {
250
250
  return value;
251
251
  }
252
- if (chunkEBIMOR5S_cjs.isObjectSet(value)) {
253
- return chunkEBIMOR5S_cjs.getWireObjectSet(value);
252
+ if (chunkCNVWYZKL_cjs.isObjectSet(value)) {
253
+ return chunkCNVWYZKL_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(chunkEBIMOR5S_cjs.addUserAgentAndRequestContextHeaders(chunkEBIMOR5S_cjs.augmentRequestContext(client, (_) => ({
298
+ const response = await execute(chunkCNVWYZKL_cjs.addUserAgentAndRequestContextHeaders(chunkCNVWYZKL_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) : {}
@@ -340,10 +340,10 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
340
340
  return responseValue;
341
341
  }
342
342
  case "attachment": {
343
- return chunkEBIMOR5S_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
343
+ return chunkCNVWYZKL_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
344
344
  }
345
345
  case "mediaReference": {
346
- return chunkEBIMOR5S_cjs.createMediaFromReferenceInternal(client, responseValue);
346
+ return chunkCNVWYZKL_cjs.createMediaFromReferenceInternal(client, responseValue);
347
347
  }
348
348
  case "object": {
349
349
  const def = definitions.get(responseDataType.object);
@@ -365,7 +365,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
365
365
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
366
366
  }
367
367
  if (typeof responseValue === "string") {
368
- return chunkEBIMOR5S_cjs.createObjectSet(def, client, {
368
+ return chunkCNVWYZKL_cjs.createObjectSet(def, client, {
369
369
  type: "intersect",
370
370
  objectSets: [{
371
371
  type: "base",
@@ -376,7 +376,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
376
376
  }]
377
377
  });
378
378
  }
379
- return chunkEBIMOR5S_cjs.createObjectSet(def, client, responseValue);
379
+ return chunkCNVWYZKL_cjs.createObjectSet(def, client, responseValue);
380
380
  }
381
381
  case "struct": {
382
382
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
@@ -561,5 +561,5 @@ exports.parseNdjsonStream = parseNdjsonStream;
561
561
  exports.parseStreamedResponse = parseStreamedResponse;
562
562
  exports.remapQueryParams = remapQueryParams;
563
563
  exports.remapQueryResponse = remapQueryResponse;
564
- //# sourceMappingURL=chunk-DCTMCTB5.cjs.map
565
- //# sourceMappingURL=chunk-DCTMCTB5.cjs.map
564
+ //# sourceMappingURL=chunk-TDQU3KC2.cjs.map
565
+ //# sourceMappingURL=chunk-TDQU3KC2.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.57.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;;;ACXA,IAAM,WAAA,GAAc,IAA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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-DCTMCTB5.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 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.57.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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AC7C,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-TDQU3KC2.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 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,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkIZVYD4TQ_cjs = require('./chunk-IZVYD4TQ.cjs');
4
- var chunkDCTMCTB5_cjs = require('./chunk-DCTMCTB5.cjs');
3
+ var chunkNRPYHQFF_cjs = require('./chunk-NRPYHQFF.cjs');
4
+ var chunkTDQU3KC2_cjs = require('./chunk-TDQU3KC2.cjs');
5
5
  require('./chunk-YJG67XL4.cjs');
6
6
  require('./chunk-TQUNF2DZ.cjs');
7
- var chunkEBIMOR5S_cjs = require('./chunk-EBIMOR5S.cjs');
7
+ var chunkCNVWYZKL_cjs = require('./chunk-CNVWYZKL.cjs');
8
8
  require('./chunk-ZPLXXOU6.cjs');
9
9
  require('./chunk-CEBSLQQC.cjs');
10
10
  require('./chunk-DOXHU27E.cjs');
@@ -20,7 +20,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
20
20
  var invariant__default = /*#__PURE__*/_interopDefault(invariant);
21
21
 
22
22
  function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
23
- return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkIZVYD4TQ_cjs.USER_AGENT, fetchFn);
23
+ return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkNRPYHQFF_cjs.USER_AGENT, fetchFn);
24
24
  }
25
25
  var isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
26
26
  var extractDate = (dateTime) => {
@@ -44,31 +44,31 @@ var extractDateFromIsoString = (dateTime) => {
44
44
 
45
45
  Object.defineProperty(exports, "ActionValidationError", {
46
46
  enumerable: true,
47
- get: function () { return chunkIZVYD4TQ_cjs.ActionValidationError; }
47
+ get: function () { return chunkNRPYHQFF_cjs.ActionValidationError; }
48
48
  });
49
49
  Object.defineProperty(exports, "createClient", {
50
50
  enumerable: true,
51
- get: function () { return chunkIZVYD4TQ_cjs.createClient; }
51
+ get: function () { return chunkNRPYHQFF_cjs.createClient; }
52
52
  });
53
53
  Object.defineProperty(exports, "createAttachmentUpload", {
54
54
  enumerable: true,
55
- get: function () { return chunkDCTMCTB5_cjs.createAttachmentUpload; }
55
+ get: function () { return chunkTDQU3KC2_cjs.createAttachmentUpload; }
56
56
  });
57
57
  Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
58
58
  enumerable: true,
59
- get: function () { return chunkDCTMCTB5_cjs.createObjectSpecifierFromPrimaryKey; }
59
+ get: function () { return chunkTDQU3KC2_cjs.createObjectSpecifierFromPrimaryKey; }
60
60
  });
61
61
  Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
62
62
  enumerable: true,
63
- get: function () { return chunkDCTMCTB5_cjs.extractPrimaryKeyFromObjectSpecifier; }
63
+ get: function () { return chunkTDQU3KC2_cjs.extractPrimaryKeyFromObjectSpecifier; }
64
64
  });
65
65
  Object.defineProperty(exports, "getWireObjectSet", {
66
66
  enumerable: true,
67
- get: function () { return chunkEBIMOR5S_cjs.getWireObjectSet; }
67
+ get: function () { return chunkCNVWYZKL_cjs.getWireObjectSet; }
68
68
  });
69
69
  Object.defineProperty(exports, "isObjectSet", {
70
70
  enumerable: true,
71
- get: function () { return chunkEBIMOR5S_cjs.isObjectSet; }
71
+ get: function () { return chunkCNVWYZKL_cjs.isObjectSet; }
72
72
  });
73
73
  Object.defineProperty(exports, "isOk", {
74
74
  enumerable: true,
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkIZVYD4TQ_cjs = require('../chunk-IZVYD4TQ.cjs');
4
- require('../chunk-DCTMCTB5.cjs');
3
+ var chunkNRPYHQFF_cjs = require('../chunk-NRPYHQFF.cjs');
4
+ require('../chunk-TDQU3KC2.cjs');
5
5
  require('../chunk-YJG67XL4.cjs');
6
6
  require('../chunk-TQUNF2DZ.cjs');
7
- var chunkEBIMOR5S_cjs = require('../chunk-EBIMOR5S.cjs');
7
+ var chunkCNVWYZKL_cjs = require('../chunk-CNVWYZKL.cjs');
8
8
  require('../chunk-ZPLXXOU6.cjs');
9
9
  require('../chunk-CEBSLQQC.cjs');
10
10
  require('../chunk-DOXHU27E.cjs');
@@ -13,16 +13,16 @@ require('../chunk-74HV6NQQ.cjs');
13
13
 
14
14
  // src/createClientFromWriteableClient.ts
15
15
  function createClientFromWriteableClient(writeableClient, options) {
16
- const ctx = writeableClient[chunkEBIMOR5S_cjs.additionalContext];
16
+ const ctx = writeableClient[chunkCNVWYZKL_cjs.additionalContext];
17
17
  if (ctx.transactionId === void 0 || ctx.flushEdits === void 0) {
18
18
  throw new Error("createClientFromWriteableClient: provided client has no active transaction");
19
19
  }
20
- return chunkIZVYD4TQ_cjs.createClientWithTransaction(options?.transactionId ?? ctx.transactionId, ctx.flushEdits, options?.baseUrl ?? ctx.baseUrl, options?.ontologyRid ?? ctx.ontologyRid, options?.tokenProvider ?? ctx.tokenProvider);
20
+ return chunkNRPYHQFF_cjs.createClientWithTransaction(options?.transactionId ?? ctx.transactionId, ctx.flushEdits, options?.baseUrl ?? ctx.baseUrl, options?.ontologyRid ?? ctx.ontologyRid, options?.tokenProvider ?? ctx.tokenProvider);
21
21
  }
22
22
 
23
23
  Object.defineProperty(exports, "createClientWithTransaction", {
24
24
  enumerable: true,
25
- get: function () { return chunkIZVYD4TQ_cjs.createClientWithTransaction; }
25
+ get: function () { return chunkNRPYHQFF_cjs.createClientWithTransaction; }
26
26
  });
27
27
  exports.createClientFromWriteableClient = createClientFromWriteableClient;
28
28
  //# sourceMappingURL=experimental.cjs.map
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkTQUNF2DZ_cjs = require('../chunk-TQUNF2DZ.cjs');
4
- var chunkEBIMOR5S_cjs = require('../chunk-EBIMOR5S.cjs');
4
+ var chunkCNVWYZKL_cjs = require('../chunk-CNVWYZKL.cjs');
5
5
  require('../chunk-ZPLXXOU6.cjs');
6
6
  require('../chunk-D26YLHTV.cjs');
7
7
  require('../chunk-74HV6NQQ.cjs');
8
8
 
9
9
  // src/public-utils/createAndFetchTempObjectSetRid.ts
10
10
  async function createAndFetchTempObjectSetRid(client, objectSet) {
11
- const response = await chunkEBIMOR5S_cjs.createTemporary(client, await client[chunkEBIMOR5S_cjs.additionalContext].ontologyRid, {
12
- objectSet: chunkEBIMOR5S_cjs.getWireObjectSet(objectSet)
11
+ const response = await chunkCNVWYZKL_cjs.createTemporary(client, await client[chunkCNVWYZKL_cjs.additionalContext].ontologyRid, {
12
+ objectSet: chunkCNVWYZKL_cjs.getWireObjectSet(objectSet)
13
13
  });
14
14
  return response.objectSetRid;
15
15
  }
16
16
 
17
17
  // src/public-utils/hydrateObjectSetFromObjectRids.ts
18
18
  function hydrateObjectSetFromObjectRids(client, definition, rids) {
19
- return chunkEBIMOR5S_cjs.createObjectSet(definition, client[chunkEBIMOR5S_cjs.additionalContext], {
19
+ return chunkCNVWYZKL_cjs.createObjectSet(definition, client[chunkCNVWYZKL_cjs.additionalContext], {
20
20
  type: "intersect",
21
21
  objectSets: [definition.type === "interface" ? {
22
22
  type: "interfaceBase",
@@ -36,7 +36,7 @@ function asMutableArray(array) {
36
36
 
37
37
  // src/public-utils/hydrateObjectSetFromRid.ts
38
38
  function hydrateObjectSetFromRid(client, definition, rid) {
39
- return chunkEBIMOR5S_cjs.createObjectSet(definition, client[chunkEBIMOR5S_cjs.additionalContext], {
39
+ return chunkCNVWYZKL_cjs.createObjectSet(definition, client[chunkCNVWYZKL_cjs.additionalContext], {
40
40
  type: "intersect",
41
41
  objectSets: [definition.type === "interface" ? {
42
42
  type: "interfaceBase",
@@ -107,11 +107,11 @@ Object.defineProperty(exports, "MinimalLogger", {
107
107
  });
108
108
  Object.defineProperty(exports, "createMediaFromReference", {
109
109
  enumerable: true,
110
- get: function () { return chunkEBIMOR5S_cjs.createMediaFromReference; }
110
+ get: function () { return chunkCNVWYZKL_cjs.createMediaFromReference; }
111
111
  });
112
112
  Object.defineProperty(exports, "hydrateAttachmentFromRid", {
113
113
  enumerable: true,
114
- get: function () { return chunkEBIMOR5S_cjs.hydrateAttachmentFromRid; }
114
+ get: function () { return chunkCNVWYZKL_cjs.hydrateAttachmentFromRid; }
115
115
  });
116
116
  exports.BrowserLogger = BrowserLogger;
117
117
  exports.createAndFetchTempObjectSetRid = createAndFetchTempObjectSetRid;
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkTITZ237V_cjs = require('../chunk-TITZ237V.cjs');
4
- require('../chunk-IZVYD4TQ.cjs');
5
- require('../chunk-DCTMCTB5.cjs');
3
+ var chunk77XXXUGJ_cjs = require('../chunk-77XXXUGJ.cjs');
4
+ require('../chunk-NRPYHQFF.cjs');
5
+ require('../chunk-TDQU3KC2.cjs');
6
6
  require('../chunk-YJG67XL4.cjs');
7
7
  require('../chunk-TQUNF2DZ.cjs');
8
- require('../chunk-EBIMOR5S.cjs');
8
+ require('../chunk-CNVWYZKL.cjs');
9
9
  require('../chunk-ZPLXXOU6.cjs');
10
10
  require('../chunk-CEBSLQQC.cjs');
11
11
  require('../chunk-DOXHU27E.cjs');
@@ -16,7 +16,7 @@ require('../chunk-74HV6NQQ.cjs');
16
16
 
17
17
  Object.defineProperty(exports, "createObservableClient", {
18
18
  enumerable: true,
19
- get: function () { return chunkTITZ237V_cjs.createObservableClient; }
19
+ get: function () { return chunk77XXXUGJ_cjs.createObservableClient; }
20
20
  });
21
21
  //# sourceMappingURL=observable.cjs.map
22
22
  //# sourceMappingURL=observable.cjs.map
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkTITZ237V_cjs = require('../chunk-TITZ237V.cjs');
4
- var chunkIZVYD4TQ_cjs = require('../chunk-IZVYD4TQ.cjs');
5
- require('../chunk-DCTMCTB5.cjs');
3
+ var chunk77XXXUGJ_cjs = require('../chunk-77XXXUGJ.cjs');
4
+ var chunkNRPYHQFF_cjs = require('../chunk-NRPYHQFF.cjs');
5
+ require('../chunk-TDQU3KC2.cjs');
6
6
  require('../chunk-YJG67XL4.cjs');
7
7
  require('../chunk-TQUNF2DZ.cjs');
8
- var chunkEBIMOR5S_cjs = require('../chunk-EBIMOR5S.cjs');
8
+ var chunkCNVWYZKL_cjs = require('../chunk-CNVWYZKL.cjs');
9
9
  require('../chunk-ZPLXXOU6.cjs');
10
10
  require('../chunk-CEBSLQQC.cjs');
11
11
  require('../chunk-DOXHU27E.cjs');
@@ -170,7 +170,7 @@ function getLinkQueryOptions(linkDef, sourceObject, pageSize) {
170
170
  return options;
171
171
  }
172
172
  async function buildObjectSetFromLinkDefByType(client, sourceType, sourcePrimaryKey, linkDef) {
173
- const metadata = await client[chunkEBIMOR5S_cjs.additionalContext].ontologyProvider.getObjectDefinition(sourceType.apiName);
173
+ const metadata = await client[chunkCNVWYZKL_cjs.additionalContext].ontologyProvider.getObjectDefinition(sourceType.apiName);
174
174
  const pkFieldName = metadata.primaryKeyApiName;
175
175
  let objectSet = client(sourceType).where({
176
176
  [pkFieldName]: sourcePrimaryKey
@@ -229,23 +229,23 @@ function resolveSymbolBindings(value, sourcePrimaryKey) {
229
229
 
230
230
  Object.defineProperty(exports, "createObservableClient", {
231
231
  enumerable: true,
232
- get: function () { return chunkTITZ237V_cjs.createObservableClient; }
232
+ get: function () { return chunk77XXXUGJ_cjs.createObservableClient; }
233
233
  });
234
234
  Object.defineProperty(exports, "createClientWithTransaction", {
235
235
  enumerable: true,
236
- get: function () { return chunkIZVYD4TQ_cjs.createClientWithTransaction; }
236
+ get: function () { return chunkNRPYHQFF_cjs.createClientWithTransaction; }
237
237
  });
238
238
  Object.defineProperty(exports, "augment", {
239
239
  enumerable: true,
240
- get: function () { return chunkEBIMOR5S_cjs.augment; }
240
+ get: function () { return chunkCNVWYZKL_cjs.augment; }
241
241
  });
242
242
  Object.defineProperty(exports, "getWireObjectSet", {
243
243
  enumerable: true,
244
- get: function () { return chunkEBIMOR5S_cjs.getWireObjectSet; }
244
+ get: function () { return chunkCNVWYZKL_cjs.getWireObjectSet; }
245
245
  });
246
246
  Object.defineProperty(exports, "isObjectSet", {
247
247
  enumerable: true,
248
- get: function () { return chunkEBIMOR5S_cjs.isObjectSet; }
248
+ get: function () { return chunkCNVWYZKL_cjs.isObjectSet; }
249
249
  });
250
250
  exports.applyShapeTransformations = applyShapeTransformations;
251
251
  exports.applyShapeTransformationsToArray = applyShapeTransformationsToArray;
@@ -21,7 +21,7 @@
21
21
  export const additionalContext = Symbol("additionalContext");
22
22
 
23
23
  // BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
24
- const MaxOsdkVersion = "2.21.1";
24
+ const MaxOsdkVersion = "2.22.0";
25
25
  // END: THIS IS GENERATED CODE. DO NOT EDIT.
26
26
 
27
27
  const ErrorMessage = Symbol("ErrorMessage");
@@ -1 +1 @@
1
- {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.ts"],"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\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n )\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n /**\n * Returns the operation surface for the given ontology definition. The shape of the\n * returned value is dispatched on what kind of definition is passed:\n * - object type → the object set type for that ontology object (typically a generated extension of {@link ObjectSet})\n * - interface → a {@link MinimalObjectSet} for the interface\n * - action → a callable with `applyAction` / `batchApplyAction`\n * - query → a callable with `executeFunction`\n * - experiment → the unstable feature surface for that experiment\n *\n * @param o - The object type definition to wrap.\n * @example\n * ```ts\n * const employees = await client(Employee).fetchPage({ $pageSize: 30 });\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns an object set scoped to all objects of this type.\n */\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The interface definition to wrap.\n * @example\n * ```ts\n * const page = await client(MyInterface).fetchPage({ $pageSize: 30 });\n * ```\n * @returns a minimal object set over all objects implementing the interface.\n */\n <Q extends (InterfaceDefinition)>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The action definition to invoke.\n * @example\n * ```ts\n * const result = await client(createEmployee).applyAction(\n * { name: \"Jane\", department: \"Engineering\" },\n * { $returnEdits: true },\n * );\n * ```\n * @returns a callable for applying (or batch-applying) the action.\n */\n <Q extends ActionDefinition<any>>(\n o: Q,\n ): ActionSignatureFromDef<Q>;\n\n /**\n * @param o - The query definition to invoke.\n * @example\n * ```ts\n * const result = await client(getEmployeeCount).executeFunction({ department: \"Engineering\" });\n * ```\n * @returns a callable for executing the query function.\n */\n <Q extends QueryDefinition<any>>(\n o: Q,\n ): QuerySignatureFromDef<Q>;\n\n /**\n * @param experiment - The experiment marker that gates an unstable feature.\n * @example\n * ```ts\n * const ref = await client(__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference)\n * .createMediaReference({ data: blob, fileName: \"media.mp4\", objectType: Employee, propertyType: \"photo\" });\n * ```\n * @returns the experiment-specific function surface.\n */\n <\n Q extends\n | Experiment<\"2.0.8\">\n | Experiment<\"2.1.0\">\n | Experiment<\"2.2.0\">\n | Experiment<\"2.8.0\">\n | Experiment<\"2.19.0\">,\n >(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n /**\n * Fetches runtime metadata for the given ontology definition. The returned shape\n * is dispatched on the kind of definition passed: {@link ObjectMetadata},\n * {@link InterfaceMetadata}, {@link ActionMetadata}, or {@link QueryMetadata}.\n * @param o - The object type, interface, action, or query definition to look up.\n * @example\n * ```ts\n * const meta = await client.fetchMetadata(Employee);\n * console.log(meta.displayName, meta.description);\n * ```\n * @returns a promise resolving to the metadata for the given definition.\n */\n fetchMetadata<\n Q extends (\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>\n ),\n >(o: Q): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.21.1\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\nexport type MaxOsdkVersion = typeof MaxOsdkVersion;\nconst ErrorMessage: unique symbol = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA;;AA8HA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.ts"],"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\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n )\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n /**\n * Returns the operation surface for the given ontology definition. The shape of the\n * returned value is dispatched on what kind of definition is passed:\n * - object type → the object set type for that ontology object (typically a generated extension of {@link ObjectSet})\n * - interface → a {@link MinimalObjectSet} for the interface\n * - action → a callable with `applyAction` / `batchApplyAction`\n * - query → a callable with `executeFunction`\n * - experiment → the unstable feature surface for that experiment\n *\n * @param o - The object type definition to wrap.\n * @example\n * ```ts\n * const employees = await client(Employee).fetchPage({ $pageSize: 30 });\n * const employee = await client(Employee).fetchOne(12345);\n * ```\n * @returns an object set scoped to all objects of this type.\n */\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The interface definition to wrap.\n * @example\n * ```ts\n * const page = await client(MyInterface).fetchPage({ $pageSize: 30 });\n * ```\n * @returns a minimal object set over all objects implementing the interface.\n */\n <Q extends (InterfaceDefinition)>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n /**\n * @param o - The action definition to invoke.\n * @example\n * ```ts\n * const result = await client(createEmployee).applyAction(\n * { name: \"Jane\", department: \"Engineering\" },\n * { $returnEdits: true },\n * );\n * ```\n * @returns a callable for applying (or batch-applying) the action.\n */\n <Q extends ActionDefinition<any>>(\n o: Q,\n ): ActionSignatureFromDef<Q>;\n\n /**\n * @param o - The query definition to invoke.\n * @example\n * ```ts\n * const result = await client(getEmployeeCount).executeFunction({ department: \"Engineering\" });\n * ```\n * @returns a callable for executing the query function.\n */\n <Q extends QueryDefinition<any>>(\n o: Q,\n ): QuerySignatureFromDef<Q>;\n\n /**\n * @param experiment - The experiment marker that gates an unstable feature.\n * @example\n * ```ts\n * const ref = await client(__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference)\n * .createMediaReference({ data: blob, fileName: \"media.mp4\", objectType: Employee, propertyType: \"photo\" });\n * ```\n * @returns the experiment-specific function surface.\n */\n <\n Q extends\n | Experiment<\"2.0.8\">\n | Experiment<\"2.1.0\">\n | Experiment<\"2.2.0\">\n | Experiment<\"2.8.0\">\n | Experiment<\"2.19.0\">,\n >(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n /**\n * Fetches runtime metadata for the given ontology definition. The returned shape\n * is dispatched on the kind of definition passed: {@link ObjectMetadata},\n * {@link InterfaceMetadata}, {@link ActionMetadata}, or {@link QueryMetadata}.\n * @param o - The object type, interface, action, or query definition to look up.\n * @example\n * ```ts\n * const meta = await client.fetchMetadata(Employee);\n * console.log(meta.displayName, meta.description);\n * ```\n * @returns a promise resolving to the metadata for the given definition.\n */\n fetchMetadata<\n Q extends (\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>\n ),\n >(o: Q): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? QueryMetadata\n : never\n >;\n\n /** @internal */\n [additionalContext]: MinimalClient;\n}\n\n// DO NOT EXPORT FROM PACKAGE\n/** @internal */\nexport const additionalContext: unique symbol = Symbol(\"additionalContext\");\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.22.0\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\nexport type MaxOsdkVersion = typeof MaxOsdkVersion;\nconst ErrorMessage: unique symbol = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA0BA;;AA8HA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export const USER_AGENT = `osdk-client/${"2.21.1-main-1f635101dcdf13bf3201bcaa21c641715744dbb6"}`;
18
- export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.21.1-main-1f635101dcdf13bf3201bcaa21c641715744dbb6"}`;
17
+ export const USER_AGENT = `osdk-client/${"2.22.0"}`;
18
+ export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.22.0"}`;
19
19
  //# sourceMappingURL=UserAgent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserAgent.js","names":["USER_AGENT","OBSERVABLE_USER_AGENT"],"sources":["UserAgent.ts"],"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 const USER_AGENT: string = `osdk-client/${process.env.PACKAGE_VERSION}`;\nexport const OBSERVABLE_USER_AGENT: string =\n `osdk-observable-client/${process.env.PACKAGE_VERSION}`;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,UAAkB,GAAG,uEAA4C;AAC9E,OAAO,MAAMC,qBAA6B,GACxC,kFAAuD","ignoreList":[]}
1
+ {"version":3,"file":"UserAgent.js","names":["USER_AGENT","OBSERVABLE_USER_AGENT"],"sources":["UserAgent.ts"],"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 const USER_AGENT: string = `osdk-client/${process.env.PACKAGE_VERSION}`;\nexport const OBSERVABLE_USER_AGENT: string =\n `osdk-observable-client/${process.env.PACKAGE_VERSION}`;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,UAAkB,GAAG,yBAA4C;AAC9E,OAAO,MAAMC,qBAA6B,GACxC,oCAAuD","ignoreList":[]}