@osdk/client 2.34.0-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0 → 2.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,18 +1,20 @@
1
1
  # @osdk/client
2
2
 
3
- ## 2.34.0-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0
3
+ ## 2.34.0
4
4
 
5
5
  ### Minor Changes
6
6
 
7
+ - db028a0: Add optional struct param support for actions.
7
8
  - ab19740: Add `Media.fetchFullMetadata()` returning a `MediaFullMetadata` wrapper around the type-specific `MediaItemMetadata` discriminated union (parity with python-osdk's `get_media_full_metadata`).
8
9
 
9
10
  ### Patch Changes
10
11
 
12
+ - Updated dependencies [db028a0]
11
13
  - Updated dependencies [ab19740]
12
- - @osdk/api@2.34.0-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0
13
- - @osdk/generator-converters@2.34.0-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0
14
- - @osdk/shared.test@2.24.1-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0
15
- - @osdk/client.unstable@2.34.0-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0
14
+ - @osdk/generator-converters@2.34.0
15
+ - @osdk/shared.test@2.25.0
16
+ - @osdk/api@2.34.0
17
+ - @osdk/client.unstable@2.34.0
16
18
 
17
19
  ## 2.33.0
18
20
 
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export const USER_AGENT = `osdk-client/${"2.34.0-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0"}`;
18
- export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.34.0-main-ab19740efadf1d55f31d2cf7e6e9206d459ef7e0"}`;
17
+ export const USER_AGENT = `osdk-client/${"2.34.0"}`;
18
+ export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.34.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":[]}
@@ -97,7 +97,7 @@ export async function toDataValueQueries(value, client, desiredType) {
97
97
  case "set":
98
98
  {
99
99
  if (value instanceof Set) {
100
- const promiseArray = Array.from(value, async innerValue => await toDataValueQueries(innerValue, client, desiredType["set"]));
100
+ const promiseArray = Array.from(value, async innerValue => await toDataValueQueries(innerValue, client, desiredType.set));
101
101
  return Promise.all(promiseArray);
102
102
  }
103
103
  break;
@@ -149,7 +149,7 @@ export async function toDataValueQueries(value, client, desiredType) {
149
149
  if (typeof value === "object") {
150
150
  const structMap = {};
151
151
  for (const [key, structValue] of Object.entries(value)) {
152
- structMap[key] = await toDataValueQueries(structValue, client, desiredType["struct"][key]);
152
+ structMap[key] = await toDataValueQueries(structValue, client, desiredType.struct[key]);
153
153
  }
154
154
  return structMap;
155
155
  }
@@ -1 +1 @@
1
- {"version":3,"file":"toDataValueQueries.js","names":["MediaSets","Attachments","isAttachmentFile","isAttachmentUpload","isMedia","isMediaReference","isMediaUpload","getWireObjectSet","isObjectSet","isInterfaceQueryParam","isInterfaceSpecifier","isObjectSpecifiersObject","extractPrimaryKeyFromObjectSpecifier","isWireObjectSet","toDataValueQueries","value","client","desiredType","Array","isArray","type","values","from","some","dataValue","converted","push","promiseArray","innerValue","array","Promise","all","attachment","upload","data","filename","name","rid","groups","mediaRef","uploadMedia","fileName","preview","getMediaReference","Error","Set","$primaryKey","objectTypeApiName","$objectType","primaryKeyValue","entrySet","key","mapValue","Object","entries","keyType","valueType","structMap","structValue"],"sources":["toDataValueQueries.ts"],"sourcesContent":["/*\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 type { QueryDataTypeDefinition } from \"@osdk/api\";\nimport { MediaSets } from \"@osdk/foundry.mediasets\";\nimport { type DataValue } from \"@osdk/foundry.ontologies\";\nimport * as Attachments from \"@osdk/foundry.ontologies/Attachment\";\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport {\n isAttachmentFile,\n isAttachmentUpload,\n} from \"../object/AttachmentUpload.js\";\nimport {\n isMedia,\n isMediaReference,\n isMediaUpload,\n} from \"../object/mediaUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport {\n isInterfaceQueryParam,\n isInterfaceSpecifier,\n} 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(\n value: unknown,\n client: MinimalClient,\n desiredType: QueryDataTypeDefinition,\n): Promise<DataValue> {\n if (value == null) {\n return value;\n }\n\n if (Array.isArray(value) && desiredType.type === \"array\") {\n const values = Array.from(value);\n if (\n values.some((dataValue) =>\n isAttachmentUpload(dataValue) || isAttachmentFile(dataValue)\n )\n ) {\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(\n value,\n async (innerValue) =>\n await toDataValueQueries(innerValue, client, desiredType.array),\n );\n return Promise.all(promiseArray);\n }\n\n switch (desiredType.type) {\n case \"attachment\": {\n if (isAttachmentUpload(value)) {\n const attachment = await Attachments.upload(\n client,\n value.data,\n {\n filename: value.name,\n },\n );\n return attachment.rid;\n }\n\n if (\n isAttachmentFile(value)\n ) {\n const attachment = await Attachments.upload(\n client,\n value,\n {\n filename: value.name as string,\n },\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 return {\n groups: value,\n };\n }\n case \"threeDimensionalAggregation\": {\n return {\n groups: value,\n };\n }\n\n case \"mediaReference\": {\n if (isMediaUpload(value)) {\n const mediaRef = await MediaSets.uploadMedia(\n client,\n value.data,\n {\n filename: value.fileName,\n preview: true,\n },\n );\n return mediaRef;\n }\n\n if (isMedia(value)) {\n return value.getMediaReference();\n }\n\n if (isMediaReference(value)) {\n return value;\n }\n\n throw new Error(\n \"Expected media reference type but got value that is not a MediaReference or MediaUpload\",\n );\n }\n\n case \"set\": {\n if (value instanceof Set) {\n const promiseArray = Array.from(\n value,\n async (innerValue) =>\n await toDataValueQueries(innerValue, client, desiredType[\"set\"]),\n );\n return Promise.all(promiseArray);\n }\n break;\n }\n case \"object\": {\n if (isObjectSpecifiersObject(value)) {\n return value.$primaryKey;\n }\n break;\n }\n case \"interface\": {\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 // 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\n case \"map\": {\n if (typeof value === \"object\") {\n const entrySet: Array<{ key: any; value: any }> = [];\n for (const [key, mapValue] of Object.entries(value)) {\n entrySet.push({\n key: desiredType.keyType.type === \"object\"\n ? extractPrimaryKeyFromObjectSpecifier(key as any)\n : await toDataValueQueries(\n key,\n client,\n desiredType.keyType,\n ),\n value: await toDataValueQueries(\n mapValue,\n client,\n desiredType.valueType,\n ),\n });\n }\n return entrySet;\n }\n break;\n }\n\n case \"struct\": {\n if (typeof value === \"object\") {\n const structMap: { [key: string]: unknown } = {};\n for (const [key, structValue] of Object.entries(value)) {\n structMap[key] = await toDataValueQueries(\n structValue,\n client,\n desiredType[\"struct\"][key],\n );\n }\n return structMap;\n }\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,SAAS,QAAQ,yBAAyB;AAEnD,OAAO,KAAKC,WAAW,MAAM,qCAAqC;AAElE,SACEC,gBAAgB,EAChBC,kBAAkB,QACb,+BAA+B;AACtC,SACEC,OAAO,EACPC,gBAAgB,EAChBC,aAAa,QACR,0BAA0B;AACjC,SAASC,gBAAgB,EAAEC,WAAW,QAAQ,iCAAiC;AAC/E,SACEC,qBAAqB,EACrBC,oBAAoB,QACf,qBAAqB;AAC5B,SAASC,wBAAwB,QAAQ,+BAA+B;AACxE,SAASC,oCAAoC,QAAQ,2BAA2B;AAChF,SAASC,eAAe,QAAQ,oBAAoB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,kBAAkBA,CACtCC,KAAc,EACdC,MAAqB,EACrBC,WAAoC,EAChB;EACpB,IAAIF,KAAK,IAAI,IAAI,EAAE;IACjB,OAAOA,KAAK;EACd;EAEA,IAAIG,KAAK,CAACC,OAAO,CAACJ,KAAK,CAAC,IAAIE,WAAW,CAACG,IAAI,KAAK,OAAO,EAAE;IACxD,MAAMC,MAAM,GAAGH,KAAK,CAACI,IAAI,CAACP,KAAK,CAAC;IAChC,IACEM,MAAM,CAACE,IAAI,CAAEC,SAAS,IACpBrB,kBAAkB,CAACqB,SAAS,CAAC,IAAItB,gBAAgB,CAACsB,SAAS,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ACF;IAEA,KAAK,KAAK;MAAE;QACV,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;UAC7B,MAAMmC,QAAyC,GAAG,EAAE;UACpD,KAAK,MAAM,CAACC,GAAG,EAAEC,QAAQ,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACvC,KAAK,CAAC,EAAE;YACnDmC,QAAQ,CAACxB,IAAI,CAAC;cACZyB,GAAG,EAAElC,WAAW,CAACsC,OAAO,CAACnC,IAAI,KAAK,QAAQ,GACtCR,oCAAoC,CAACuC,GAAU,CAAC,GAChD,MAAMrC,kBAAkB,CACxBqC,GAAG,EACHnC,MAAM,EACNC,WAAW,CAACsC,OACd,CAAC;cACHxC,KAAK,EAAE,MAAMD,kBAAkB,CAC7BsC,QAAQ,EACRpC,MAAM,EACNC,WAAW,CAACuC,SACd;YACF,CAAC,CAAC;UACJ;UACA,OAAON,QAAQ;QACjB;QACA;MACF;IAEA,KAAK,QAAQ;MAAE;QACb,IAAI,OAAOnC,KAAK,KAAK,QAAQ,EAAE;UAC7B,MAAM0C,SAAqC,GAAG,CAAC,CAAC;UAChD,KAAK,MAAM,CAACN,GAAG,EAAEO,WAAW,CAAC,IAAIL,MAAM,CAACC,OAAO,CAACvC,KAAK,CAAC,EAAE;YACtD0C,SAAS,CAACN,GAAG,CAAC,GAAG,MAAMrC,kBAAkB,CACvC4C,WAAW,EACX1C,MAAM,EACNC,WAAW,CAAC,QAAQ,CAAC,CAACkC,GAAG,CAC3B,CAAC;UACH;UACA,OAAOM,SAAS;QAClB;MACF;IAEA,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,WAAW;MACd,OAAO1C,KAAK;EAChB;EACA,OAAOA,KAAK;AACd","ignoreList":[]}
1
+ {"version":3,"file":"toDataValueQueries.js","names":["MediaSets","Attachments","isAttachmentFile","isAttachmentUpload","isMedia","isMediaReference","isMediaUpload","getWireObjectSet","isObjectSet","isInterfaceQueryParam","isInterfaceSpecifier","isObjectSpecifiersObject","extractPrimaryKeyFromObjectSpecifier","isWireObjectSet","toDataValueQueries","value","client","desiredType","Array","isArray","type","values","from","some","dataValue","converted","push","promiseArray","innerValue","array","Promise","all","attachment","upload","data","filename","name","rid","groups","mediaRef","uploadMedia","fileName","preview","getMediaReference","Error","Set","set","$primaryKey","objectTypeApiName","$objectType","primaryKeyValue","entrySet","key","mapValue","Object","entries","keyType","valueType","structMap","structValue","struct"],"sources":["toDataValueQueries.ts"],"sourcesContent":["/*\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 type { QueryDataTypeDefinition } from \"@osdk/api\";\nimport { MediaSets } from \"@osdk/foundry.mediasets\";\nimport { type DataValue } from \"@osdk/foundry.ontologies\";\nimport * as Attachments from \"@osdk/foundry.ontologies/Attachment\";\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport {\n isAttachmentFile,\n isAttachmentUpload,\n} from \"../object/AttachmentUpload.js\";\nimport {\n isMedia,\n isMediaReference,\n isMediaUpload,\n} from \"../object/mediaUpload.js\";\nimport { getWireObjectSet, isObjectSet } from \"../objectSet/createObjectSet.js\";\nimport {\n isInterfaceQueryParam,\n isInterfaceSpecifier,\n} 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(\n value: unknown,\n client: MinimalClient,\n desiredType: QueryDataTypeDefinition,\n): Promise<DataValue> {\n if (value == null) {\n return value;\n }\n\n if (Array.isArray(value) && desiredType.type === \"array\") {\n const values = Array.from(value);\n if (\n values.some((dataValue) =>\n isAttachmentUpload(dataValue) || isAttachmentFile(dataValue)\n )\n ) {\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(\n value,\n async (innerValue) =>\n await toDataValueQueries(innerValue, client, desiredType.array),\n );\n return Promise.all(promiseArray);\n }\n\n switch (desiredType.type) {\n case \"attachment\": {\n if (isAttachmentUpload(value)) {\n const attachment = await Attachments.upload(\n client,\n value.data,\n {\n filename: value.name,\n },\n );\n return attachment.rid;\n }\n\n if (\n isAttachmentFile(value)\n ) {\n const attachment = await Attachments.upload(\n client,\n value,\n {\n filename: value.name as string,\n },\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 return {\n groups: value,\n };\n }\n case \"threeDimensionalAggregation\": {\n return {\n groups: value,\n };\n }\n\n case \"mediaReference\": {\n if (isMediaUpload(value)) {\n const mediaRef = await MediaSets.uploadMedia(\n client,\n value.data,\n {\n filename: value.fileName,\n preview: true,\n },\n );\n return mediaRef;\n }\n\n if (isMedia(value)) {\n return value.getMediaReference();\n }\n\n if (isMediaReference(value)) {\n return value;\n }\n\n throw new Error(\n \"Expected media reference type but got value that is not a MediaReference or MediaUpload\",\n );\n }\n\n case \"set\": {\n if (value instanceof Set) {\n const promiseArray = Array.from(\n value,\n async (innerValue) =>\n await toDataValueQueries(innerValue, client, desiredType.set),\n );\n return Promise.all(promiseArray);\n }\n break;\n }\n case \"object\": {\n if (isObjectSpecifiersObject(value)) {\n return value.$primaryKey;\n }\n break;\n }\n case \"interface\": {\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 // 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\n case \"map\": {\n if (typeof value === \"object\") {\n const entrySet: Array<{ key: any; value: any }> = [];\n for (const [key, mapValue] of Object.entries(value)) {\n entrySet.push({\n key: desiredType.keyType.type === \"object\"\n ? extractPrimaryKeyFromObjectSpecifier(key as any)\n : await toDataValueQueries(\n key,\n client,\n desiredType.keyType,\n ),\n value: await toDataValueQueries(\n mapValue,\n client,\n desiredType.valueType,\n ),\n });\n }\n return entrySet;\n }\n break;\n }\n\n case \"struct\": {\n if (typeof value === \"object\") {\n const structMap: { [key: string]: unknown } = {};\n for (const [key, structValue] of Object.entries(value)) {\n structMap[key] = await toDataValueQueries(\n structValue,\n client,\n desiredType.struct[key],\n );\n }\n return structMap;\n }\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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,SAAS,QAAQ,yBAAyB;AAEnD,OAAO,KAAKC,WAAW,MAAM,qCAAqC;AAElE,SACEC,gBAAgB,EAChBC,kBAAkB,QACb,+BAA+B;AACtC,SACEC,OAAO,EACPC,gBAAgB,EAChBC,aAAa,QACR,0BAA0B;AACjC,SAASC,gBAAgB,EAAEC,WAAW,QAAQ,iCAAiC;AAC/E,SACEC,qBAAqB,EACrBC,oBAAoB,QACf,qBAAqB;AAC5B,SAASC,wBAAwB,QAAQ,+BAA+B;AACxE,SAASC,oCAAoC,QAAQ,2BAA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AAK,CAAC,EAAE;YACtD2C,SAAS,CAACN,GAAG,CAAC,GAAG,MAAMtC,kBAAkB,CACvC6C,WAAW,EACX3C,MAAM,EACNC,WAAW,CAAC2C,MAAM,CAACR,GAAG,CACxB,CAAC;UACH;UACA,OAAOM,SAAS;QAClB;MACF;IAEA,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,WAAW;MACd,OAAO3C,KAAK;EAChB;EACA,OAAOA,KAAK;AACd","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkOQTWRF7T_cjs = require('./chunk-OQTWRF7T.cjs');
3
+ var chunkGYBMRI77_cjs = require('./chunk-GYBMRI77.cjs');
4
4
  var chunkRFHOXACX_cjs = require('./chunk-RFHOXACX.cjs');
5
5
  require('./chunk-ROJIXXGF.cjs');
6
6
  var chunkH6PXPU6F_cjs = require('./chunk-H6PXPU6F.cjs');
@@ -22,7 +22,7 @@ async function* applyStreamingQuery(client, query, params) {
22
22
  finalMethodCall: "applyStreamingQuery"
23
23
  })), query), query.apiName, {
24
24
  ontology: await client.ontologyRid,
25
- parameters: params ? await chunkOQTWRF7T_cjs.remapQueryParams(params, client, qd.parameters) : {},
25
+ parameters: params ? await chunkGYBMRI77_cjs.remapQueryParams(params, client, qd.parameters) : {},
26
26
  version: query.isFixedVersion ? query.version : void 0,
27
27
  branch: client.branch
28
28
  }, {
@@ -32,15 +32,15 @@ async function* applyStreamingQuery(client, query, params) {
32
32
  if (response.body == null) {
33
33
  throw new Error("streamingExecute returned no response body");
34
34
  }
35
- const definitions = await chunkOQTWRF7T_cjs.getRequiredDefinitions(qd.output, client);
35
+ const definitions = await chunkGYBMRI77_cjs.getRequiredDefinitions(qd.output, client);
36
36
  const reader = response.body.getReader();
37
- for await (const line of chunkOQTWRF7T_cjs.parseNdjsonStream(chunkOQTWRF7T_cjs.iterateReadableStream(reader))) {
37
+ for await (const line of chunkGYBMRI77_cjs.parseNdjsonStream(chunkGYBMRI77_cjs.iterateReadableStream(reader))) {
38
38
  if (line.type === "error") {
39
39
  const err = new Error(`${line.errorName} (${line.errorCode}) [${line.errorInstanceId}]: ${line.errorDescription ?? ""}`);
40
40
  Object.assign(err, line);
41
41
  throw err;
42
42
  }
43
- const remapped = await chunkOQTWRF7T_cjs.remapQueryResponse(client, qd.output, line.value, definitions);
43
+ const remapped = await chunkGYBMRI77_cjs.remapQueryResponse(client, qd.output, line.value, definitions);
44
44
  if (qd.output.type === "array" && Array.isArray(remapped)) {
45
45
  for (const item of remapped) {
46
46
  yield item;
@@ -52,5 +52,5 @@ async function* applyStreamingQuery(client, query, params) {
52
52
  }
53
53
 
54
54
  exports.applyStreamingQuery = applyStreamingQuery;
55
- //# sourceMappingURL=applyStreamingQuery-DJGZR6JG.cjs.map
56
- //# sourceMappingURL=applyStreamingQuery-DJGZR6JG.cjs.map
55
+ //# sourceMappingURL=applyStreamingQuery-MZSY37NF.cjs.map
56
+ //# sourceMappingURL=applyStreamingQuery-MZSY37NF.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.functions@2.63.0/node_modules/@osdk/foundry.functions/build/esm/public/Query.js","../../src/queries/applyStreamingQuery.ts"],"names":["foundryPlatformFetch","addUserAgentAndRequestContextHeaders","augmentRequestContext","remapQueryParams","getRequiredDefinitions","parseNdjsonStream","iterateReadableStream","remapQueryResponse"],"mappings":";;;;;;;;;AA2EA,IAAM,oBAAoB,CAAC,CAAA,EAAG,4CAAA,EAA8C,CAAA,IAAI,0BAA0B,CAAA;AAiCnG,SAAS,gBAAA,CAAiB,SAAS,IAAA,EAAM;AAC9C,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,iBAAA,EAAmB,GAAG,IAAI,CAAA;AAC/D;;;ACzFA,gBAAuB,mBAAA,CAAoB,MAAA,EAAQ,KAAA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;AACzB,MAAA,MAAM,MAAM,IAAI,KAAA,CAAM,CAAA,EAAG,IAAA,CAAK,SAAS,CAAA,EAAA,EAAK,IAAA,CAAK,SAAS,CAAA,GAAA,EAAM,KAAK,eAAe,CAAA,GAAA,EAAM,IAAA,CAAK,gBAAA,IAAoB,EAAE,CAAA,CAAE,CAAA;AACvH,MAAA,MAAA,CAAO,MAAA,CAAO,KAAK,IAAI,CAAA;AACvB,MAAA,MAAM,GAAA;AAAA,IACR;AACA,IAAA,MAAM,QAAA,GAAW,MAAMC,oCAAA,CAAmB,MAAA,EAAQ,GAAG,MAAA,EAAQ,IAAA,CAAK,OAAO,WAAW,CAAA;AACpF,IAAA,IAAI,GAAG,MAAA,CAAO,IAAA,KAAS,WAAW,KAAA,CAAM,OAAA,CAAQ,QAAQ,CAAA,EAAG;AACzD,MAAA,KAAA,MAAW,QAAQ,QAAA,EAAU;AAC3B,QAAA,MAAM,IAAA;AAAA,MACR;AAAA,IACF,CAAA,MAAO;AACL,MAAA,MAAM,QAAA;AAAA,IACR;AAAA,EACF;AACF","file":"applyStreamingQuery-DJGZR6JG.cjs","sourcesContent":["/*\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 _get = [0, \"/v2/functions/queries/{0}\", 2];\n/**\n * Gets a specific query type with the given API name. By default, this gets the latest version of the query.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRid = [0, \"/v2/functions/queries/getByRid\", 2];\n/**\n * Gets a specific query type with the given RID. By default, this gets the latest version of the query.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRid\n */\nexport function getByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRid, ...args);\n}\nconst _getByRidBatch = [1, \"/v2/functions/queries/getByRidBatch\", 3];\n/**\n * Gets a list of query types by RID in bulk. By default, this gets the latest version of each query.\n *\n * Queries are filtered from the response if they don't exist or the requesting token lacks the required\n * permissions.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRidBatch\n */\nexport function getByRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRidBatch, ...args);\n}\nconst _execute = [1, \"/v2/functions/queries/{0}/execute\", 7];\n/**\n * Executes a Query using the given parameters. By default, this executes the latest version of the query.\n *\n * This endpoint is maintained for backward compatibility only.\n *\n * For all new implementations, use the `streamingExecute` endpoint, which supports all function types\n * and provides enhanced functionality.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}\nconst _streamingExecute = [1, \"/v2/functions/queries/{0}/streamingExecute\", 7,, \"application/octet-stream\"];\n/**\n * Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query.\n *\n * This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON\n * streaming response format. Both streaming and non-streaming functions can use this endpoint.\n * Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses.\n * This is the recommended endpoint for all query execution.\n *\n * The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line\n * is a StreamingExecuteQueryResponse containing either a data batch or an error.\n *\n * For a function returning a list of 5 records with a batch size of 3, the response stream would contain\n * two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items:\n *\n * ```\n * {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99},{\"productId\":\"SKU-002\",\"price\":49.99},{\"productId\":\"SKU-003\",\"price\":19.99}]}\n * {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-004\",\"price\":39.99},{\"productId\":\"SKU-005\",\"price\":59.99}]}\n * ```\n *\n * Each line is a separate JSON object followed by a newline character. Clients should parse the stream\n * line-by-line to process results as they arrive. If an error occurs during execution, the stream will\n * contain an error line:\n *\n * ```\n * {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n * ```\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecute\n */\nexport function streamingExecute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecute, ...args);\n}\nconst _executeAsync = [1, \"/v2/functions/queries/{0}/executeAsync\", 7];\n/**\n * Submits a Query for asynchronous execution. Returns either an execution ID\n * for polling, or the complete result if execution finished immediately.\n *\n * Use the Execution resource's getResult endpoint to poll for the\n * result of a submitted execution.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/executeAsync\n */\nexport function executeAsync($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _executeAsync, ...args);\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 Functions from \"@osdk/foundry.functions/Query\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { iterateReadableStream, parseNdjsonStream } from \"../util/streamutils.js\";\nimport { getRequiredDefinitions, remapQueryParams, remapQueryResponse } from \"./applyQuery.js\";\nexport async function* applyStreamingQuery(client, query, params) {\n const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const response = await Functions.streamingExecute(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyStreamingQuery\"\n })), query), query.apiName, {\n ontology: await client.ontologyRid,\n parameters: params ? await remapQueryParams(params, client, qd.parameters) : {},\n version: query.isFixedVersion ? query.version : undefined,\n branch: client.branch\n }, {\n transactionId: client.transactionId,\n preview: true\n });\n if (response.body == null) {\n throw new Error(\"streamingExecute returned no response body\");\n }\n const definitions = await getRequiredDefinitions(qd.output, client);\n const reader = response.body.getReader();\n for await (const line of parseNdjsonStream(iterateReadableStream(reader))) {\n if (line.type === \"error\") {\n const err = new Error(`${line.errorName} (${line.errorCode}) [${line.errorInstanceId}]: ${line.errorDescription ?? \"\"}`);\n Object.assign(err, line);\n throw err;\n }\n const remapped = await remapQueryResponse(client, qd.output, line.value, definitions);\n if (qd.output.type === \"array\" && Array.isArray(remapped)) {\n for (const item of remapped) {\n yield item;\n }\n } else {\n yield remapped;\n }\n }\n}"]}
1
+ {"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.functions@2.63.0/node_modules/@osdk/foundry.functions/build/esm/public/Query.js","../../src/queries/applyStreamingQuery.ts"],"names":["foundryPlatformFetch","addUserAgentAndRequestContextHeaders","augmentRequestContext","remapQueryParams","getRequiredDefinitions","parseNdjsonStream","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AA;AAAA,EAC9D;AACA,EAAA,MAAM,WAAA,GAAc,MAAMC,wCAAA,CAAuB,EAAA,CAAG,QAAQ,MAAM,CAAA;AAClE,EAAA,MAAM,MAAA,GAAS,QAAA,CAAS,IAAA,CAAK,SAAA,EAAU;AACvC,EAAA,WAAA,MAAiB,IAAA,IAAQC,mCAAA,CAAkBC,uCAAA,CAAsB,MAAM,CAAC,CAAA,EAAG;AACzE,IAAA,IAAI,IAAA,CAAK,SAAS,OAAA,EAAS;AACzB,MAAA,MAAM,MAAM,IAAI,KAAA,CAAM,CAAA,EAAG,IAAA,CAAK,SAAS,CAAA,EAAA,EAAK,IAAA,CAAK,SAAS,CAAA,GAAA,EAAM,KAAK,eAAe,CAAA,GAAA,EAAM,IAAA,CAAK,gBAAA,IAAoB,EAAE,CAAA,CAAE,CAAA;AACvH,MAAA,MAAA,CAAO,MAAA,CAAO,KAAK,IAAI,CAAA;AACvB,MAAA,MAAM,GAAA;AAAA,IACR;AACA,IAAA,MAAM,QAAA,GAAW,MAAMC,oCAAA,CAAmB,MAAA,EAAQ,GAAG,MAAA,EAAQ,IAAA,CAAK,OAAO,WAAW,CAAA;AACpF,IAAA,IAAI,GAAG,MAAA,CAAO,IAAA,KAAS,WAAW,KAAA,CAAM,OAAA,CAAQ,QAAQ,CAAA,EAAG;AACzD,MAAA,KAAA,MAAW,QAAQ,QAAA,EAAU;AAC3B,QAAA,MAAM,IAAA;AAAA,MACR;AAAA,IACF,CAAA,MAAO;AACL,MAAA,MAAM,QAAA;AAAA,IACR;AAAA,EACF;AACF","file":"applyStreamingQuery-MZSY37NF.cjs","sourcesContent":["/*\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 _get = [0, \"/v2/functions/queries/{0}\", 2];\n/**\n * Gets a specific query type with the given API name. By default, this gets the latest version of the query.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRid = [0, \"/v2/functions/queries/getByRid\", 2];\n/**\n * Gets a specific query type with the given RID. By default, this gets the latest version of the query.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRid\n */\nexport function getByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRid, ...args);\n}\nconst _getByRidBatch = [1, \"/v2/functions/queries/getByRidBatch\", 3];\n/**\n * Gets a list of query types by RID in bulk. By default, this gets the latest version of each query.\n *\n * Queries are filtered from the response if they don't exist or the requesting token lacks the required\n * permissions.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRidBatch\n */\nexport function getByRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRidBatch, ...args);\n}\nconst _execute = [1, \"/v2/functions/queries/{0}/execute\", 7];\n/**\n * Executes a Query using the given parameters. By default, this executes the latest version of the query.\n *\n * This endpoint is maintained for backward compatibility only.\n *\n * For all new implementations, use the `streamingExecute` endpoint, which supports all function types\n * and provides enhanced functionality.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}\nconst _streamingExecute = [1, \"/v2/functions/queries/{0}/streamingExecute\", 7,, \"application/octet-stream\"];\n/**\n * Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query.\n *\n * This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON\n * streaming response format. Both streaming and non-streaming functions can use this endpoint.\n * Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses.\n * This is the recommended endpoint for all query execution.\n *\n * The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line\n * is a StreamingExecuteQueryResponse containing either a data batch or an error.\n *\n * For a function returning a list of 5 records with a batch size of 3, the response stream would contain\n * two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items:\n *\n * ```\n * {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99},{\"productId\":\"SKU-002\",\"price\":49.99},{\"productId\":\"SKU-003\",\"price\":19.99}]}\n * {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-004\",\"price\":39.99},{\"productId\":\"SKU-005\",\"price\":59.99}]}\n * ```\n *\n * Each line is a separate JSON object followed by a newline character. Clients should parse the stream\n * line-by-line to process results as they arrive. If an error occurs during execution, the stream will\n * contain an error line:\n *\n * ```\n * {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n * ```\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecute\n */\nexport function streamingExecute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecute, ...args);\n}\nconst _executeAsync = [1, \"/v2/functions/queries/{0}/executeAsync\", 7];\n/**\n * Submits a Query for asynchronous execution. Returns either an execution ID\n * for polling, or the complete result if execution finished immediately.\n *\n * Use the Execution resource's getResult endpoint to poll for the\n * result of a submitted execution.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/executeAsync\n */\nexport function executeAsync($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _executeAsync, ...args);\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 Functions from \"@osdk/foundry.functions/Query\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { iterateReadableStream, parseNdjsonStream } from \"../util/streamutils.js\";\nimport { getRequiredDefinitions, remapQueryParams, remapQueryResponse } from \"./applyQuery.js\";\nexport async function* applyStreamingQuery(client, query, params) {\n const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const response = await Functions.streamingExecute(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyStreamingQuery\"\n })), query), query.apiName, {\n ontology: await client.ontologyRid,\n parameters: params ? await remapQueryParams(params, client, qd.parameters) : {},\n version: query.isFixedVersion ? query.version : undefined,\n branch: client.branch\n }, {\n transactionId: client.transactionId,\n preview: true\n });\n if (response.body == null) {\n throw new Error(\"streamingExecute returned no response body\");\n }\n const definitions = await getRequiredDefinitions(qd.output, client);\n const reader = response.body.getReader();\n for await (const line of parseNdjsonStream(iterateReadableStream(reader))) {\n if (line.type === \"error\") {\n const err = new Error(`${line.errorName} (${line.errorCode}) [${line.errorInstanceId}]: ${line.errorDescription ?? \"\"}`);\n Object.assign(err, line);\n throw err;\n }\n const remapped = await remapQueryResponse(client, qd.output, line.value, definitions);\n if (qd.output.type === \"array\" && Array.isArray(remapped)) {\n for (const item of remapped) {\n yield item;\n }\n } else {\n yield remapped;\n }\n }\n}"]}
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkIXMHCGKE_cjs = require('./chunk-IXMHCGKE.cjs');
3
+ var chunkKUW6L6YZ_cjs = require('./chunk-KUW6L6YZ.cjs');
4
4
  var chunkPIWGMK3H_cjs = require('./chunk-PIWGMK3H.cjs');
5
- var chunkOQTWRF7T_cjs = require('./chunk-OQTWRF7T.cjs');
5
+ var chunkGYBMRI77_cjs = require('./chunk-GYBMRI77.cjs');
6
6
  var chunkRFHOXACX_cjs = require('./chunk-RFHOXACX.cjs');
7
7
  var shared_net_fetch = require('@osdk/shared.net.fetch');
8
8
  var rxjs = require('rxjs');
@@ -1473,7 +1473,7 @@ var FunctionParamsCanonicalizer = class {
1473
1473
  path.push("$:map_end");
1474
1474
  return arr;
1475
1475
  }
1476
- if (chunkOQTWRF7T_cjs.isObjectSpecifiersObject(value)) {
1476
+ if (chunkGYBMRI77_cjs.isObjectSpecifiersObject(value)) {
1477
1477
  const objectType = value.$objectType ?? value.$apiName;
1478
1478
  path.push("$:osdk", objectType, value.$primaryKey);
1479
1479
  return {
@@ -1599,7 +1599,7 @@ var FunctionQuery = class extends Query {
1599
1599
  }).debug("calling _fetchAndStore");
1600
1600
  }
1601
1601
  try {
1602
- const result = await chunkOQTWRF7T_cjs.applyQuery(this.store.client[chunkRFHOXACX_cjs.additionalContext], this.#queryDef, this.#params);
1602
+ const result = await chunkGYBMRI77_cjs.applyQuery(this.store.client[chunkRFHOXACX_cjs.additionalContext], this.#queryDef, this.#params);
1603
1603
  const executedAt = Date.now();
1604
1604
  this.store.batch({}, (batch) => {
1605
1605
  this.writeToStore({
@@ -3571,7 +3571,7 @@ var InterfaceListQuery = class extends ListQuery {
3571
3571
  }
3572
3572
  extractRelevantObjects(changes) {
3573
3573
  const matchesApiName = ([, object]) => {
3574
- return this.apiName in object[chunkIXMHCGKE_cjs.ObjectDefRef].interfaceMap;
3574
+ return this.apiName in object[chunkKUW6L6YZ_cjs.ObjectDefRef].interfaceMap;
3575
3575
  };
3576
3576
  const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => this.wrapObject(object));
3577
3577
  const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => this.wrapObject(object));
@@ -4164,8 +4164,8 @@ function stripRdpFields(value, rdpFields) {
4164
4164
  if (rdpFields.size === 0) {
4165
4165
  return value;
4166
4166
  }
4167
- const underlying = value[chunkIXMHCGKE_cjs.UnderlyingOsdkObject];
4168
- const objectDef = requireObjectDef(value[chunkIXMHCGKE_cjs.ObjectDefRef], underlying);
4167
+ const underlying = value[chunkKUW6L6YZ_cjs.UnderlyingOsdkObject];
4168
+ const objectDef = requireObjectDef(value[chunkKUW6L6YZ_cjs.ObjectDefRef], underlying);
4169
4169
  const newProps = {
4170
4170
  $apiName: underlying.$apiName,
4171
4171
  $objectType: underlying.$objectType,
@@ -4178,7 +4178,7 @@ function stripRdpFields(value, rdpFields) {
4178
4178
  newProps[key] = underlying[key];
4179
4179
  }
4180
4180
  }
4181
- return chunkIXMHCGKE_cjs.createOsdkObject(value[chunkIXMHCGKE_cjs.ClientRef], objectDef, newProps);
4181
+ return chunkKUW6L6YZ_cjs.createOsdkObject(value[chunkKUW6L6YZ_cjs.ClientRef], objectDef, newProps);
4182
4182
  }
4183
4183
  function isSuperset(superset, subset) {
4184
4184
  for (const field of subset) {
@@ -4189,8 +4189,8 @@ function isSuperset(superset, subset) {
4189
4189
  return true;
4190
4190
  }
4191
4191
  function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
4192
- const underlying = value[chunkIXMHCGKE_cjs.UnderlyingOsdkObject];
4193
- const objectDef = requireObjectDef(value[chunkIXMHCGKE_cjs.ObjectDefRef], underlying);
4192
+ const underlying = value[chunkKUW6L6YZ_cjs.UnderlyingOsdkObject];
4193
+ const objectDef = requireObjectDef(value[chunkKUW6L6YZ_cjs.ObjectDefRef], underlying);
4194
4194
  const newProps = {
4195
4195
  $apiName: underlying.$apiName,
4196
4196
  $objectType: underlying.$objectType,
@@ -4206,12 +4206,12 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
4206
4206
  }
4207
4207
  }
4208
4208
  }
4209
- return chunkIXMHCGKE_cjs.createOsdkObject(value[chunkIXMHCGKE_cjs.ClientRef], objectDef, newProps);
4209
+ return chunkKUW6L6YZ_cjs.createOsdkObject(value[chunkKUW6L6YZ_cjs.ClientRef], objectDef, newProps);
4210
4210
  }
4211
4211
  function mergeSelectFields(sourceValue, selectFields, existingValue) {
4212
- const sourceUnderlying = sourceValue[chunkIXMHCGKE_cjs.UnderlyingOsdkObject];
4213
- const existingUnderlying = existingValue[chunkIXMHCGKE_cjs.UnderlyingOsdkObject];
4214
- const objectDef = requireObjectDef(sourceValue[chunkIXMHCGKE_cjs.ObjectDefRef], sourceUnderlying);
4212
+ const sourceUnderlying = sourceValue[chunkKUW6L6YZ_cjs.UnderlyingOsdkObject];
4213
+ const existingUnderlying = existingValue[chunkKUW6L6YZ_cjs.UnderlyingOsdkObject];
4214
+ const objectDef = requireObjectDef(sourceValue[chunkKUW6L6YZ_cjs.ObjectDefRef], sourceUnderlying);
4215
4215
  const newProps = {
4216
4216
  $apiName: sourceUnderlying.$apiName,
4217
4217
  $objectType: sourceUnderlying.$objectType,
@@ -4229,7 +4229,7 @@ function mergeSelectFields(sourceValue, selectFields, existingValue) {
4229
4229
  newProps[key] = sourceUnderlying[key];
4230
4230
  }
4231
4231
  }
4232
- return chunkIXMHCGKE_cjs.createOsdkObject(sourceValue[chunkIXMHCGKE_cjs.ClientRef], objectDef, newProps);
4232
+ return chunkKUW6L6YZ_cjs.createOsdkObject(sourceValue[chunkKUW6L6YZ_cjs.ClientRef], objectDef, newProps);
4233
4233
  }
4234
4234
  function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
4235
4235
  if (targetRdpFields.size === 0) {
@@ -4241,8 +4241,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
4241
4241
  }
4242
4242
  return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
4243
4243
  }
4244
- const sourceUnderlying = sourceValue[chunkIXMHCGKE_cjs.UnderlyingOsdkObject];
4245
- const objectDef = requireObjectDef(sourceValue[chunkIXMHCGKE_cjs.ObjectDefRef], sourceUnderlying);
4244
+ const sourceUnderlying = sourceValue[chunkKUW6L6YZ_cjs.UnderlyingOsdkObject];
4245
+ const objectDef = requireObjectDef(sourceValue[chunkKUW6L6YZ_cjs.ObjectDefRef], sourceUnderlying);
4246
4246
  const newProps = {
4247
4247
  $apiName: sourceUnderlying.$apiName,
4248
4248
  $objectType: sourceUnderlying.$objectType,
@@ -4256,7 +4256,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
4256
4256
  }
4257
4257
  }
4258
4258
  if (targetCurrentValue) {
4259
- const targetUnderlying = targetCurrentValue[chunkIXMHCGKE_cjs.UnderlyingOsdkObject];
4259
+ const targetUnderlying = targetCurrentValue[chunkKUW6L6YZ_cjs.UnderlyingOsdkObject];
4260
4260
  for (const field of targetRdpFields) {
4261
4261
  if (field in targetUnderlying) {
4262
4262
  if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
@@ -4265,7 +4265,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
4265
4265
  }
4266
4266
  }
4267
4267
  }
4268
- return chunkIXMHCGKE_cjs.createOsdkObject(sourceValue[chunkIXMHCGKE_cjs.ClientRef], objectDef, newProps);
4268
+ return chunkKUW6L6YZ_cjs.createOsdkObject(sourceValue[chunkKUW6L6YZ_cjs.ClientRef], objectDef, newProps);
4269
4269
  }
4270
4270
 
4271
4271
  // src/observable/internal/object/ObjectCacheKeyRegistry.ts
@@ -4366,7 +4366,7 @@ var ObjectCacheKeyRegistry = class {
4366
4366
 
4367
4367
  // src/object/convertWireToOsdkObjects/InterfaceHolder.ts
4368
4368
  function isInterfaceHolder(v) {
4369
- return typeof v === "object" && v != null && chunkIXMHCGKE_cjs.InterfaceDefRef in v;
4369
+ return typeof v === "object" && v != null && chunkKUW6L6YZ_cjs.InterfaceDefRef in v;
4370
4370
  }
4371
4371
 
4372
4372
  // ../../node_modules/.pnpm/p-defer@4.0.1/node_modules/p-defer/index.js
@@ -4700,7 +4700,7 @@ var ObjectsHelper = class extends AbstractHelper {
4700
4700
  select,
4701
4701
  $loadPropertySecurityMetadata
4702
4702
  } = options;
4703
- const defType = chunkOQTWRF7T_cjs.getDefType(options.apiName);
4703
+ const defType = chunkGYBMRI77_cjs.getDefType(options.apiName);
4704
4704
  const $includeAllBaseObjectProperties = defType === "interface" && options.$includeAllBaseObjectProperties ? true : void 0;
4705
4705
  const canonSelect = select && select.length > 0 ? this.store.selectCanonicalizer.canonicalize(select) : void 0;
4706
4706
  const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0, canonSelect, $loadPropertySecurityMetadata ? true : void 0, $includeAllBaseObjectProperties);
@@ -4717,7 +4717,7 @@ var ObjectsHelper = class extends AbstractHelper {
4717
4717
  storeOsdkInstances(values, batch, rdpConfig, selectFields, includeAllBaseObjectProperties) {
4718
4718
  const holders = values;
4719
4719
  return holders.map((v) => {
4720
- const concreteHolder = isInterfaceHolder(v) ? v[chunkIXMHCGKE_cjs.UnderlyingOsdkObject] : v;
4720
+ const concreteHolder = isInterfaceHolder(v) ? v[chunkKUW6L6YZ_cjs.UnderlyingOsdkObject] : v;
4721
4721
  return this.getQuery({
4722
4722
  apiName: v.$objectType ?? v.$apiName,
4723
4723
  pk: v.$primaryKey,
@@ -4745,7 +4745,7 @@ var ObjectsHelper = class extends AbstractHelper {
4745
4745
  if (valueToWrite !== tombstone && existing?.value && this.isObjectHolder(existing.value)) {
4746
4746
  const expectedRdpFields = this.store.objectCacheKeyRegistry.getRdpFieldSet(sourceCacheKey);
4747
4747
  if (expectedRdpFields.size > 0) {
4748
- const underlying = valueToWrite[chunkIXMHCGKE_cjs.UnderlyingOsdkObject];
4748
+ const underlying = valueToWrite[chunkKUW6L6YZ_cjs.UnderlyingOsdkObject];
4749
4749
  const actualRdpFields = /* @__PURE__ */ new Set();
4750
4750
  for (const field of expectedRdpFields) {
4751
4751
  if (underlying && field in underlying) {
@@ -5920,10 +5920,10 @@ var Store = class {
5920
5920
 
5921
5921
  // src/observable/ObservableClient.ts
5922
5922
  function createObservableClient(client, extraUserAgents) {
5923
- const tweakedClient = chunkIXMHCGKE_cjs.createClientFromContext({
5923
+ const tweakedClient = chunkKUW6L6YZ_cjs.createClientFromContext({
5924
5924
  ...client[chunkRFHOXACX_cjs.additionalContext],
5925
5925
  fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkRFHOXACX_cjs.additionalContext].fetch, (headers) => {
5926
- headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkIXMHCGKE_cjs.OBSERVABLE_USER_AGENT, ...extraUserAgents?.() ?? []].filter((x) => x && x?.length > 0).join(" "));
5926
+ headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkKUW6L6YZ_cjs.OBSERVABLE_USER_AGENT, ...extraUserAgents?.() ?? []].filter((x) => x && x?.length > 0).join(" "));
5927
5927
  return headers;
5928
5928
  })
5929
5929
  });
@@ -5931,5 +5931,5 @@ function createObservableClient(client, extraUserAgents) {
5931
5931
  }
5932
5932
 
5933
5933
  exports.createObservableClient = createObservableClient;
5934
- //# sourceMappingURL=chunk-7CRNAGI7.cjs.map
5935
- //# sourceMappingURL=chunk-7CRNAGI7.cjs.map
5934
+ //# sourceMappingURL=chunk-4MCP2H5U.cjs.map
5935
+ //# sourceMappingURL=chunk-4MCP2H5U.cjs.map