@osdk/client 2.84.0 → 2.84.1-main-94e35b435d77d90207032f9d66bca92efc187b6a

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/build/browser/Client.js +1 -1
  3. package/build/browser/Client.js.map +1 -1
  4. package/build/browser/util/UserAgent.js +2 -2
  5. package/build/browser/util/UserAgent.js.map +1 -1
  6. package/build/cjs/{applyStreamingQuery-LW2ZIKJP.cjs → applyStreamingQuery-XJJENLN2.cjs} +8 -8
  7. package/build/cjs/{applyStreamingQuery-LW2ZIKJP.cjs.map → applyStreamingQuery-XJJENLN2.cjs.map} +1 -1
  8. package/build/cjs/{chunk-TABUTR5E.cjs → chunk-63FNGFSF.cjs} +14 -14
  9. package/build/cjs/{chunk-TABUTR5E.cjs.map → chunk-63FNGFSF.cjs.map} +1 -1
  10. package/build/cjs/{chunk-E7K7RZO2.cjs → chunk-B5GWGQVL.cjs} +5 -5
  11. package/build/cjs/{chunk-E7K7RZO2.cjs.map → chunk-B5GWGQVL.cjs.map} +1 -1
  12. package/build/cjs/{chunk-MZWO4NH3.cjs → chunk-R2SSUQNS.cjs} +83 -83
  13. package/build/cjs/{chunk-MZWO4NH3.cjs.map → chunk-R2SSUQNS.cjs.map} +1 -1
  14. package/build/cjs/{chunk-HT2OLGRZ.cjs → chunk-TTN3WK3L.cjs} +2 -2
  15. package/build/cjs/{chunk-HT2OLGRZ.cjs.map → chunk-TTN3WK3L.cjs.map} +1 -1
  16. package/build/cjs/{chunk-WV7IBS3P.cjs → chunk-UK73QGJH.cjs} +53 -53
  17. package/build/cjs/chunk-UK73QGJH.cjs.map +1 -0
  18. package/build/cjs/{chunk-VDV2QGRB.cjs → chunk-VTEIPLQB.cjs} +8 -8
  19. package/build/cjs/{chunk-VDV2QGRB.cjs.map → chunk-VTEIPLQB.cjs.map} +1 -1
  20. package/build/cjs/index.cjs +12 -12
  21. package/build/cjs/public/experimental.cjs +10 -10
  22. package/build/cjs/public/internal.cjs +9 -9
  23. package/build/cjs/public/observable.cjs +6 -6
  24. package/build/cjs/public/unstable-do-not-use.cjs +17 -17
  25. package/build/esm/Client.js +1 -1
  26. package/build/esm/Client.js.map +1 -1
  27. package/build/esm/util/UserAgent.js +2 -2
  28. package/build/esm/util/UserAgent.js.map +1 -1
  29. package/build/types/Client.d.ts +1 -1
  30. package/package.json +7 -7
  31. package/build/cjs/chunk-WV7IBS3P.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @osdk/client
2
2
 
3
+ ## 2.84.1-main-94e35b435d77d90207032f9d66bca92efc187b6a
4
+
5
+ ### Patch Changes
6
+
7
+ - @osdk/api@2.84.1-main-94e35b435d77d90207032f9d66bca92efc187b6a
8
+ - @osdk/client.unstable@2.84.1-main-94e35b435d77d90207032f9d66bca92efc187b6a
9
+ - @osdk/generator-converters@2.84.1-main-94e35b435d77d90207032f9d66bca92efc187b6a
10
+
3
11
  ## 2.84.0
4
12
 
5
13
  ### Patch Changes
@@ -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.84.0";
24
+ const MaxOsdkVersion = "2.84.1";
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 AgentDefinition,\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\n\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { AgentSignatureFromDef } from \"./agents/types.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> =\n Q extends VersionBound<infer V>\n ? SatisfiesSemver<V, MaxOsdkVersion> extends true\n ? Q\n : Q & {\n [ErrorMessage]: `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\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\"]\n ? 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\"]\n ? 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>>(o: Q): 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>>(o: Q): QuerySignatureFromDef<Q>;\n\n /** @beta */\n <Q extends AgentDefinition<unknown>>(o: Q): AgentSignatureFromDef<Q>;\n\n /**\n * @param experiment - The experiment marker that gates an unstable feature.\n * @example\n * ```ts\n * const employee = await client(__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid)\n * .fetchOneByRid(Employee, \"ri.phonograph2-objects.main.object.1234\");\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.59.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,\n ): Promise<\n Q extends ObjectTypeDefinition\n ? ObjectMetadata\n : Q extends InterfaceDefinition\n ? InterfaceMetadata\n : Q extends ActionDefinition<any>\n ? ActionMetadata\n : Q extends QueryDefinition<any>\n ? 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.84.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;;AA6BA;;AAqIA;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 AgentDefinition,\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\n\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { AgentSignatureFromDef } from \"./agents/types.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> =\n Q extends VersionBound<infer V>\n ? SatisfiesSemver<V, MaxOsdkVersion> extends true\n ? Q\n : Q & {\n [ErrorMessage]: `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\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\"]\n ? 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\"]\n ? 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>>(o: Q): 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>>(o: Q): QuerySignatureFromDef<Q>;\n\n /** @beta */\n <Q extends AgentDefinition<unknown>>(o: Q): AgentSignatureFromDef<Q>;\n\n /**\n * @param experiment - The experiment marker that gates an unstable feature.\n * @example\n * ```ts\n * const employee = await client(__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid)\n * .fetchOneByRid(Employee, \"ri.phonograph2-objects.main.object.1234\");\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.59.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,\n ): Promise<\n Q extends ObjectTypeDefinition\n ? ObjectMetadata\n : Q extends InterfaceDefinition\n ? InterfaceMetadata\n : Q extends ActionDefinition<any>\n ? ActionMetadata\n : Q extends QueryDefinition<any>\n ? 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.84.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;;AA6BA;;AAqIA;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.84.0"}`;
18
- export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.84.0"}`;
17
+ export const USER_AGENT = `osdk-client/${"2.84.1-main-94e35b435d77d90207032f9d66bca92efc187b6a"}`;
18
+ export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.84.1-main-94e35b435d77d90207032f9d66bca92efc187b6a"}`;
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 = `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,GAAG,oCAAuD","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 = `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,GAAG,kFAAuD","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkTABUTR5E_cjs = require('./chunk-TABUTR5E.cjs');
4
- var chunkHT2OLGRZ_cjs = require('./chunk-HT2OLGRZ.cjs');
3
+ var chunk63FNGFSF_cjs = require('./chunk-63FNGFSF.cjs');
4
+ var chunkTTN3WK3L_cjs = require('./chunk-TTN3WK3L.cjs');
5
5
  var chunk4L3NEGLF_cjs = require('./chunk-4L3NEGLF.cjs');
6
6
  require('./chunk-Q7SFCCGT.cjs');
7
7
 
@@ -17,19 +17,19 @@ async function* applyStreamingQuery(client, query, params) {
17
17
  if (client.flushEdits != null) {
18
18
  await client.flushEdits();
19
19
  }
20
- const response = await streamingExecute(chunkHT2OLGRZ_cjs.addUserAgentHeader(client, query), query.apiName, {
20
+ const response = await streamingExecute(chunkTTN3WK3L_cjs.addUserAgentHeader(client, query), query.apiName, {
21
21
  ontology: await client.ontologyRid,
22
- parameters: params ? await chunkTABUTR5E_cjs.remapQueryParams(params, client, qd.parameters) : {},
22
+ parameters: params ? await chunk63FNGFSF_cjs.remapQueryParams(params, client, qd.parameters) : {},
23
23
  version: query.isFixedVersion ? query.version : void 0,
24
24
  branch: client.branch
25
25
  }, {
26
26
  transactionId: client.transactionId,
27
27
  preview: true
28
28
  });
29
- const definitions = await chunkTABUTR5E_cjs.getRequiredDefinitions(qd.output, client);
29
+ const definitions = await chunk63FNGFSF_cjs.getRequiredDefinitions(qd.output, client);
30
30
  for await (const event of response) {
31
31
  if (event.type !== "data") continue;
32
- const remapped = await chunkTABUTR5E_cjs.remapQueryResponse(client, qd.output, event.value, definitions);
32
+ const remapped = await chunk63FNGFSF_cjs.remapQueryResponse(client, qd.output, event.value, definitions);
33
33
  if (qd.output.type === "array" && Array.isArray(remapped)) {
34
34
  for (const item of remapped) {
35
35
  yield item;
@@ -41,5 +41,5 @@ async function* applyStreamingQuery(client, query, params) {
41
41
  }
42
42
 
43
43
  exports.applyStreamingQuery = applyStreamingQuery;
44
- //# sourceMappingURL=applyStreamingQuery-LW2ZIKJP.cjs.map
45
- //# sourceMappingURL=applyStreamingQuery-LW2ZIKJP.cjs.map
44
+ //# sourceMappingURL=applyStreamingQuery-XJJENLN2.cjs.map
45
+ //# sourceMappingURL=applyStreamingQuery-XJJENLN2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.functions@2.78.0/node_modules/@osdk/foundry.functions/build/esm/public/Query.js","../../src/queries/applyStreamingQuery.ts"],"names":["foundryPlatformFetch","addUserAgentHeader","remapQueryParams","getRequiredDefinitions","remapQueryResponse"],"mappings":";;;;;;;;AAgFA,IAAM,oBAAoB,CAAC,CAAA,EAAG,4CAAA,EAA8C,CAAA,IAAI,mBAAmB,CAAA;AA2B5F,SAAS,gBAAA,CAAiB,SAAS,IAAA,EAAM;AAC9C,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,iBAAA,EAAmB,GAAG,IAAI,CAAA;AAC/D;;;AC1FA,gBAAuB,mBAAA,CAAoB,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAQ;AAChE,EAAA,MAAM,EAAA,GAAK,MAAM,MAAA,CAAO,gBAAA,CAAiB,kBAAA,CAAmB,KAAA,CAAM,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAS,CAAA;AAC3H,EAAA,IAAI,MAAA,CAAO,cAAc,IAAA,EAAM;AAC7B,IAAA,MAAM,OAAO,UAAA,EAAW;AAAA,EAC1B;AACA,EAAA,MAAM,QAAA,GAAW,MAAgB,gBAAA,CAAiBC,oCAAA,CAAmB,QAAQ,KAAK,CAAA,EAAG,MAAM,OAAA,EAAS;AAAA,IAClG,QAAA,EAAU,MAAM,MAAA,CAAO,WAAA;AAAA,IACvB,UAAA,EAAY,SAAS,MAAMC,kCAAA,CAAiB,QAAQ,MAAA,EAAQ,EAAA,CAAG,UAAU,CAAA,GAAI,EAAC;AAAA,IAC9E,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAA;AAAA,IAChD,QAAQ,MAAA,CAAO;AAAA,GACjB,EAAG;AAAA,IACD,eAAe,MAAA,CAAO,aAAA;AAAA,IACtB,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,MAAM,WAAA,GAAc,MAAMC,wCAAA,CAAuB,EAAA,CAAG,QAAQ,MAAM,CAAA;AAClE,EAAA,WAAA,MAAiB,SAAS,QAAA,EAAU;AAClC,IAAA,IAAI,KAAA,CAAM,SAAS,MAAA,EAAQ;AAC3B,IAAA,MAAM,QAAA,GAAW,MAAMC,oCAAA,CAAmB,MAAA,EAAQ,GAAG,MAAA,EAAQ,KAAA,CAAM,OAAO,WAAW,CAAA;AACrF,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-LW2ZIKJP.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 returns the highest semantic\n * version of the query, excluding pre-release versions. To resolve the most recently published version\n * instead, including pre-release versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * @beta\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 * @beta\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 * @beta\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 and returns the result as a single JSON object. By default, this executes\n * the highest semantic version of the query, excluding pre-release versions. To resolve the\n * most recently published version instead, including pre-release versions, set\n * `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint executes global (non-ontology-scoped) query functions. For ontology-scoped\n * functions, use the equivalent endpoint under\n * `/v2/ontologies/{ontology}/queries/{queryApiName}/execute`. For streaming or incremental\n * result delivery, use `streamingExecute`.\n *\n * @beta\n *\n * Required Scopes: [api:functions-execute]\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,, \"text/event-stream\"];\n/**\n * Executes a Query and returns results as a Server-Sent Events (`text/event-stream`) stream.\n * By default, this executes the highest semantic version of the query, excluding pre-release\n * versions. To resolve the most recently published version instead, including pre-release\n * versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint supports all Query functions. Each SSE event's `data` field is a JSON-encoded\n * `StreamingExecuteQueryResponse` – either a data batch (`type: data`) carrying one or more\n * result values, or an error (`type: error`) emitted before stream termination if execution\n * fails. Non-streaming functions emit a single data event containing the entire result;\n * streaming functions emit a data event per batch as results become available.\n *\n * Per the Server-Sent Events specification, each event is terminated by a blank line:\n *\n * ```\n * data: {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99}]}\n *\n * data: {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n *\n * ```\n *\n * @beta\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecute\n */\nexport function streamingExecute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecute, ...args);\n}\nconst _streamingExecuteEvents = [1, \"/v2/functions/queries/{0}/streamingExecuteEvents\", 7,, \"text/event-stream\"];\n/**\n * Executes a Query and returns results as a Server-Sent Events (`text/event-stream`) stream.\n * By default, this executes the highest semantic version of the query, excluding pre-release\n * versions. To resolve the most recently published version instead, including pre-release\n * versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint supports all Query functions. Each SSE event's `data` field is a JSON-encoded\n * `StreamingExecuteQueryResponse` – either a data batch (`type: data`) carrying one or more\n * result values, or an error (`type: error`) emitted before stream termination if execution\n * fails. Non-streaming functions emit a single data event containing the entire result;\n * streaming functions emit a data event per batch as results become available.\n *\n * Per the Server-Sent Events specification, each event is terminated by a blank line:\n *\n * ```\n * data: {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99}]}\n *\n * data: {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n *\n * ```\n *\n * @alpha\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecuteEvents\n */\nexport function streamingExecuteEvents($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecuteEvents, ...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 { addUserAgentHeader } from \"../util/addUserAgentHeader.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(addUserAgentHeader(client, 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 const definitions = await getRequiredDefinitions(qd.output, client);\n for await (const event of response) {\n if (event.type !== \"data\") continue;\n const remapped = await remapQueryResponse(client, qd.output, event.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.78.0/node_modules/@osdk/foundry.functions/build/esm/public/Query.js","../../src/queries/applyStreamingQuery.ts"],"names":["foundryPlatformFetch","addUserAgentHeader","remapQueryParams","getRequiredDefinitions","remapQueryResponse"],"mappings":";;;;;;;;AAgFA,IAAM,oBAAoB,CAAC,CAAA,EAAG,4CAAA,EAA8C,CAAA,IAAI,mBAAmB,CAAA;AA2B5F,SAAS,gBAAA,CAAiB,SAAS,IAAA,EAAM;AAC9C,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,iBAAA,EAAmB,GAAG,IAAI,CAAA;AAC/D;;;AC1FA,gBAAuB,mBAAA,CAAoB,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAQ;AAChE,EAAA,MAAM,EAAA,GAAK,MAAM,MAAA,CAAO,gBAAA,CAAiB,kBAAA,CAAmB,KAAA,CAAM,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAS,CAAA;AAC3H,EAAA,IAAI,MAAA,CAAO,cAAc,IAAA,EAAM;AAC7B,IAAA,MAAM,OAAO,UAAA,EAAW;AAAA,EAC1B;AACA,EAAA,MAAM,QAAA,GAAW,MAAgB,gBAAA,CAAiBC,oCAAA,CAAmB,QAAQ,KAAK,CAAA,EAAG,MAAM,OAAA,EAAS;AAAA,IAClG,QAAA,EAAU,MAAM,MAAA,CAAO,WAAA;AAAA,IACvB,UAAA,EAAY,SAAS,MAAMC,kCAAA,CAAiB,QAAQ,MAAA,EAAQ,EAAA,CAAG,UAAU,CAAA,GAAI,EAAC;AAAA,IAC9E,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAA;AAAA,IAChD,QAAQ,MAAA,CAAO;AAAA,GACjB,EAAG;AAAA,IACD,eAAe,MAAA,CAAO,aAAA;AAAA,IACtB,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,MAAM,WAAA,GAAc,MAAMC,wCAAA,CAAuB,EAAA,CAAG,QAAQ,MAAM,CAAA;AAClE,EAAA,WAAA,MAAiB,SAAS,QAAA,EAAU;AAClC,IAAA,IAAI,KAAA,CAAM,SAAS,MAAA,EAAQ;AAC3B,IAAA,MAAM,QAAA,GAAW,MAAMC,oCAAA,CAAmB,MAAA,EAAQ,GAAG,MAAA,EAAQ,KAAA,CAAM,OAAO,WAAW,CAAA;AACrF,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-XJJENLN2.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 returns the highest semantic\n * version of the query, excluding pre-release versions. To resolve the most recently published version\n * instead, including pre-release versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * @beta\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 * @beta\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 * @beta\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 and returns the result as a single JSON object. By default, this executes\n * the highest semantic version of the query, excluding pre-release versions. To resolve the\n * most recently published version instead, including pre-release versions, set\n * `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint executes global (non-ontology-scoped) query functions. For ontology-scoped\n * functions, use the equivalent endpoint under\n * `/v2/ontologies/{ontology}/queries/{queryApiName}/execute`. For streaming or incremental\n * result delivery, use `streamingExecute`.\n *\n * @beta\n *\n * Required Scopes: [api:functions-execute]\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,, \"text/event-stream\"];\n/**\n * Executes a Query and returns results as a Server-Sent Events (`text/event-stream`) stream.\n * By default, this executes the highest semantic version of the query, excluding pre-release\n * versions. To resolve the most recently published version instead, including pre-release\n * versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint supports all Query functions. Each SSE event's `data` field is a JSON-encoded\n * `StreamingExecuteQueryResponse` – either a data batch (`type: data`) carrying one or more\n * result values, or an error (`type: error`) emitted before stream termination if execution\n * fails. Non-streaming functions emit a single data event containing the entire result;\n * streaming functions emit a data event per batch as results become available.\n *\n * Per the Server-Sent Events specification, each event is terminated by a blank line:\n *\n * ```\n * data: {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99}]}\n *\n * data: {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n *\n * ```\n *\n * @beta\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecute\n */\nexport function streamingExecute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecute, ...args);\n}\nconst _streamingExecuteEvents = [1, \"/v2/functions/queries/{0}/streamingExecuteEvents\", 7,, \"text/event-stream\"];\n/**\n * Executes a Query and returns results as a Server-Sent Events (`text/event-stream`) stream.\n * By default, this executes the highest semantic version of the query, excluding pre-release\n * versions. To resolve the most recently published version instead, including pre-release\n * versions, set `latestVersionResolution` to `PUBLISH_TIME`.\n *\n * This endpoint supports all Query functions. Each SSE event's `data` field is a JSON-encoded\n * `StreamingExecuteQueryResponse` – either a data batch (`type: data`) carrying one or more\n * result values, or an error (`type: error`) emitted before stream termination if execution\n * fails. Non-streaming functions emit a single data event containing the entire result;\n * streaming functions emit a data event per batch as results become available.\n *\n * Per the Server-Sent Events specification, each event is terminated by a blank line:\n *\n * ```\n * data: {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99}]}\n *\n * data: {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n *\n * ```\n *\n * @alpha\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecuteEvents\n */\nexport function streamingExecuteEvents($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecuteEvents, ...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 { addUserAgentHeader } from \"../util/addUserAgentHeader.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(addUserAgentHeader(client, 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 const definitions = await getRequiredDefinitions(qd.output, client);\n for await (const event of response) {\n if (event.type !== \"data\") continue;\n const remapped = await remapQueryResponse(client, qd.output, event.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,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkHT2OLGRZ_cjs = require('./chunk-HT2OLGRZ.cjs');
3
+ var chunkTTN3WK3L_cjs = require('./chunk-TTN3WK3L.cjs');
4
4
  var chunk4L3NEGLF_cjs = require('./chunk-4L3NEGLF.cjs');
5
5
  var invariant = require('tiny-invariant');
6
6
 
@@ -89,13 +89,13 @@ async function toDataValueQueries(value, client, desiredType) {
89
89
  switch (desiredType.type) {
90
90
  case "attachment": {
91
91
  if (isAttachmentUpload(value)) {
92
- const attachment = await chunkHT2OLGRZ_cjs.upload(client, value.data, {
92
+ const attachment = await chunkTTN3WK3L_cjs.upload(client, value.data, {
93
93
  filename: value.name
94
94
  });
95
95
  return attachment.rid;
96
96
  }
97
97
  if (isAttachmentFile(value)) {
98
- const attachment = await chunkHT2OLGRZ_cjs.upload(client, value, {
98
+ const attachment = await chunkTTN3WK3L_cjs.upload(client, value, {
99
99
  filename: value.name
100
100
  });
101
101
  return attachment.rid;
@@ -150,11 +150,11 @@ async function toDataValueQueries(value, client, desiredType) {
150
150
  }
151
151
  case "objectSet":
152
152
  case "interfaceObjectSet": {
153
- if (chunkHT2OLGRZ_cjs.isWireObjectSet(value)) {
154
- return chunkHT2OLGRZ_cjs.normalizeInterfaceLinkSearchArounds(client, value);
153
+ if (chunkTTN3WK3L_cjs.isWireObjectSet(value)) {
154
+ return chunkTTN3WK3L_cjs.normalizeInterfaceLinkSearchArounds(client, value);
155
155
  }
156
- if (chunkHT2OLGRZ_cjs.isObjectSet(value)) {
157
- return chunkHT2OLGRZ_cjs.normalizeInterfaceLinkSearchArounds(client, chunkHT2OLGRZ_cjs.getWireObjectSet(value));
156
+ if (chunkTTN3WK3L_cjs.isObjectSet(value)) {
157
+ return chunkTTN3WK3L_cjs.normalizeInterfaceLinkSearchArounds(client, chunkTTN3WK3L_cjs.getWireObjectSet(value));
158
158
  }
159
159
  break;
160
160
  }
@@ -199,7 +199,7 @@ async function applyQuery(client, query, params) {
199
199
  if (client.flushEdits != null) {
200
200
  await client.flushEdits();
201
201
  }
202
- const response = await execute(chunkHT2OLGRZ_cjs.addUserAgentHeader(client, query), await client.ontologyRid, query.apiName, {
202
+ const response = await execute(chunkTTN3WK3L_cjs.addUserAgentHeader(client, query), await client.ontologyRid, query.apiName, {
203
203
  parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
204
204
  }, {
205
205
  version: query.isFixedVersion ? query.version : void 0,
@@ -243,10 +243,10 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
243
243
  return responseValue;
244
244
  }
245
245
  case "attachment": {
246
- return chunkHT2OLGRZ_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
246
+ return chunkTTN3WK3L_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
247
247
  }
248
248
  case "mediaReference": {
249
- return chunkHT2OLGRZ_cjs.createMediaFromReferenceInternal(client, responseValue);
249
+ return chunkTTN3WK3L_cjs.createMediaFromReferenceInternal(client, responseValue);
250
250
  }
251
251
  case "object": {
252
252
  const def = definitions.get(responseDataType.object);
@@ -268,7 +268,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
268
268
  throw new Error(`Missing definition for ${responseDataType.objectSet}`);
269
269
  }
270
270
  if (typeof responseValue === "string") {
271
- return chunkHT2OLGRZ_cjs.createObjectSet(def, client, {
271
+ return chunkTTN3WK3L_cjs.createObjectSet(def, client, {
272
272
  type: "intersect",
273
273
  objectSets: [{
274
274
  type: "base",
@@ -279,7 +279,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
279
279
  }]
280
280
  });
281
281
  }
282
- return chunkHT2OLGRZ_cjs.createObjectSet(def, client, responseValue);
282
+ return chunkTTN3WK3L_cjs.createObjectSet(def, client, responseValue);
283
283
  }
284
284
  case "struct": {
285
285
  for (const [key, subtype] of Object.entries(responseDataType.struct)) {
@@ -461,5 +461,5 @@ exports.isMediaUpload = isMediaUpload;
461
461
  exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
462
462
  exports.remapQueryParams = remapQueryParams;
463
463
  exports.remapQueryResponse = remapQueryResponse;
464
- //# sourceMappingURL=chunk-TABUTR5E.cjs.map
465
- //# sourceMappingURL=chunk-TABUTR5E.cjs.map
464
+ //# sourceMappingURL=chunk-63FNGFSF.cjs.map
465
+ //# sourceMappingURL=chunk-63FNGFSF.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/object/AttachmentUpload.ts","../../src/util/objectSpecifierUtils.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.78.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","normalizeInterfaceLinkSearchArounds","isObjectSet","getWireObjectSet","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esContent":["/*\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 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 * The latest version is the one that was most recently published, which may be a pre-release version.\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 { normalizeInterfaceLinkSearchArounds } from \"./normalizeInterfaceLinkSearchArounds.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 });\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 normalizeInterfaceLinkSearchArounds(client, value);\n }\n if (isObjectSet(value)) {\n return normalizeInterfaceLinkSearchArounds(client, 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 { addUserAgentHeader } from \"../util/addUserAgentHeader.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(addUserAgentHeader(client, query), await client.ontologyRid, query.apiName, {\n parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}\n }, {\n version: query.isFixedVersion ? query.version : undefined,\n transactionId: client.transactionId,\n scenarioRid: client.scenarioRid,\n branch: client.branch\n });\n const objectOutputDefs = await getRequiredDefinitions((await qd).output, client);\n const remappedResponse = await remapQueryResponse(client, (await qd).output, response.value, objectOutputDefs);\n return remappedResponse;\n}\nexport async function remapQueryParams(params, client, paramTypes) {\n const parameterMap = {};\n for (const [key, value] of Object.entries(params)) {\n parameterMap[key] = await toDataValueQueries(value, client, paramTypes[key]);\n }\n return parameterMap;\n}\nexport async function remapQueryResponse(client, responseDataType, responseValue, definitions) {\n // handle null responses\n if (responseValue == null) {\n if (responseDataType.nullable) {\n return undefined;\n } else {\n throw new Error(\"Got null response when nullable was not allowed\");\n }\n }\n switch (responseDataType.type) {\n case \"union\":\n {\n throw new Error(\"Union return types are not yet supported\");\n }\n case \"array\":\n {\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(client, responseDataType.array, responseValue[i], definitions);\n }\n return responseValue;\n }\n case \"set\":\n {\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(client, responseDataType.set, responseValue[i], definitions);\n }\n return responseValue;\n }\n case \"attachment\":\n {\n return hydrateAttachmentFromRidInternal(client, responseValue);\n }\n case \"mediaReference\":\n {\n return createMediaFromReferenceInternal(client, responseValue);\n }\n case \"object\":\n {\n const def = definitions.get(responseDataType.object);\n if (!def || def.type !== \"object\") {\n throw new Error(`Missing definition for ${responseDataType.object}`);\n }\n return createQueryObjectResponse(responseValue, def);\n }\n case \"interface\":\n {\n const def = definitions.get(responseDataType.interface);\n if (!def || def.type !== \"interface\") {\n throw new Error(`Missing definition for ${responseDataType.interface}`);\n }\n return createQueryInterfaceResponse(responseValue, def);\n }\n case \"objectSet\":\n {\n const def = definitions.get(responseDataType.objectSet);\n if (!def) {\n throw new Error(`Missing definition for ${responseDataType.objectSet}`);\n }\n if (typeof responseValue === \"string\") {\n return createObjectSet(def, client, {\n type: \"intersect\",\n objectSets: [{\n type: \"base\",\n objectType: responseDataType.objectSet\n }, {\n type: \"reference\",\n reference: responseValue\n }]\n });\n }\n return createObjectSet(def, client, responseValue);\n }\n case \"struct\":\n {\n // figure out what keys need to be fixed up\n for (const [key, subtype] of Object.entries(responseDataType.struct)) {\n if (requiresConversion(subtype) || responseValue[key] == null) {\n responseValue[key] = await remapQueryResponse(client, subtype, responseValue[key], definitions);\n }\n }\n return responseValue;\n }\n case \"map\":\n {\n const map = {};\n !Array.isArray(responseValue) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected array entry\") : invariant(false) : void 0;\n for (const entry of responseValue) {\n !(entry.key != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected key\") : invariant(false) : void 0;\n !(responseDataType.valueType.nullable || entry.value != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected value\") : invariant(false) : void 0;\n const key = responseDataType.keyType.type === \"object\" ? getObjectSpecifier(entry.key, responseDataType.keyType.object, definitions) : entry.key;\n const value = await remapQueryResponse(client, responseDataType.valueType, entry.value, definitions);\n map[key] = value;\n }\n return map;\n }\n case \"twoDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n value\n } of responseValue.groups) {\n result.push({\n key,\n value\n });\n }\n return result;\n }\n case \"threeDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n groups\n } of responseValue.groups) {\n const subResult = [];\n for (const {\n key: subKey,\n value\n } of groups) {\n subResult.push({\n key: subKey,\n value\n });\n }\n result.push({\n key,\n groups: subResult\n });\n }\n return result;\n }\n }\n return responseValue;\n}\nexport async function getRequiredDefinitions(dataType, client) {\n const result = new Map();\n switch (dataType.type) {\n case \"objectSet\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.objectSet);\n result.set(dataType.objectSet, objectDef);\n break;\n }\n case \"interfaceObjectSet\":\n {\n const interfaceDef = await client.ontologyProvider.getInterfaceDefinition(dataType.objectSet);\n result.set(dataType.objectSet, interfaceDef);\n break;\n }\n case \"object\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.object);\n result.set(dataType.object, objectDef);\n break;\n }\n case \"interface\":\n {\n const interfaceDef = await client.ontologyProvider.getInterfaceDefinition(dataType.interface);\n result.set(dataType.interface, interfaceDef);\n break;\n }\n case \"set\":\n {\n return getRequiredDefinitions(dataType.set, client);\n }\n case \"array\":\n {\n return getRequiredDefinitions(dataType.array, client);\n }\n case \"map\":\n {\n const types = [dataType.keyType, dataType.valueType];\n const allDefs = await Promise.all(types.map(value => getRequiredDefinitions(value, client)));\n for (const defs of allDefs) {\n for (const [type, objectDef] of defs) {\n result.set(type, objectDef);\n }\n }\n break;\n }\n case \"struct\":\n {\n const structValues = Object.values(dataType.struct);\n const allDefs = await Promise.all(structValues.map(value => getRequiredDefinitions(value, client)));\n for (const defs of allDefs) {\n for (const [type, objectDef] of defs) {\n result.set(type, objectDef);\n }\n }\n break;\n }\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"mediaReference\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"typeReference\":\n case \"union\":\n break;\n default:\n {\n const _ = dataType;\n break;\n }\n }\n return result;\n}\nfunction requiresConversion(dataType) {\n switch (dataType.type) {\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"timestamp\":\n return false;\n case \"union\":\n return true;\n case \"struct\":\n return Object.values(dataType.struct).some(requiresConversion);\n case \"set\":\n return requiresConversion(dataType.set);\n case \"attachment\":\n case \"mediaReference\":\n case \"objectSet\":\n case \"twoDimensionalAggregation\":\n case \"threeDimensionalAggregation\":\n case \"object\":\n return true;\n default:\n return false;\n }\n}\nfunction getObjectSpecifier(primaryKey, objectTypeApiName, definitions) {\n const def = definitions.get(objectTypeApiName);\n if (!def || def.type !== \"object\") {\n throw new Error(`Missing definition for ${objectTypeApiName}`);\n }\n return createObjectSpecifierFromPrimaryKey(def, primaryKey);\n}\nexport function createQueryObjectResponse(primaryKey, objectDef) {\n return {\n $apiName: objectDef.apiName,\n $title: undefined,\n $objectType: objectDef.apiName,\n $primaryKey: primaryKey,\n $objectSpecifier: createObjectSpecifierFromPrimaryKey(objectDef, primaryKey)\n };\n}\nexport function createQueryInterfaceResponse(interfaceSpecifier, interfaceDef) {\n return {\n $apiName: interfaceDef.apiName,\n $title: undefined,\n $objectType: interfaceSpecifier.objectTypeApiName,\n $primaryKey: interfaceSpecifier.primaryKeyValue,\n $objectSpecifier: createObjectSpecifierFromInterfaceSpecifier(interfaceDef, interfaceSpecifier)\n };\n}"]}
1
+ {"version":3,"sources":["../../src/object/AttachmentUpload.ts","../../src/util/objectSpecifierUtils.ts","../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.78.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","normalizeInterfaceLinkSearchArounds","isObjectSet","getWireObjectSet","addUserAgentHeader","hydrateAttachmentFromRidInternal","createMediaFromReferenceInternal","createObjectSet","invariant"],"mappings":";;;;;;;;;;;AAgBO,SAAS,mBAAmB,CAAA,EAAG;AACpC,EAAA,OAAO,OAAO,CAAA,KAAM,QAAA,I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L,KAAK,2BAAA;AAAA,IACL,KAAK,6BAAA;AAAA,IACL,KAAK,QAAA;AACH,MAAA,OAAO,IAAA;AAAA,IACT;AACE,MAAA,OAAO,KAAA;AAAA;AAEb;AACA,SAAS,kBAAA,CAAmB,UAAA,EAAY,iBAAA,EAAmB,WAAA,EAAa;AACtE,EAAA,MAAM,GAAA,GAAM,WAAA,CAAY,GAAA,CAAI,iBAAiB,CAAA;AAC7C,EAAA,IAAI,CAAC,GAAA,IAAO,GAAA,CAAI,IAAA,KAAS,QAAA,EAAU;AACjC,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,uBAAA,EAA0B,iBAAiB,CAAA,CAAE,CAAA;AAAA,EAC/D;AACA,EAAA,OAAO,mCAAA,CAAoC,KAAK,UAAU,CAAA;AAC5D;AACO,SAAS,yBAAA,CAA0B,YAAY,SAAA,EAAW;AAC/D,EAAA,OAAO;AAAA,IACL,UAAU,SAAA,CAAU,OAAA;AAAA,IACpB,MAAA,EAAQ,MAAA;AAAA,IACR,aAAa,SAAA,CAAU,OAAA;AAAA,IACvB,WAAA,EAAa,UAAA;AAAA,IACb,gBAAA,EAAkB,mCAAA,CAAoC,SAAA,EAAW,UAAU;AAAA,GAC7E;AACF;AACO,SAAS,4BAAA,CAA6B,oBAAoB,YAAA,EAAc;AAC7E,EAAA,OAAO;AAAA,IACL,UAAU,YAAA,CAAa,OAAA;AAAA,IACvB,MAAA,EAAQ,MAAA;AAAA,IACR,aAAa,kBAAA,CAAmB,iBAAA;AAAA,IAChC,aAAa,kBAAA,CAAmB,eAAA;AAAA,IAChC,gBAAA,EAAkB,2CAAA,CAA4C,YAAA,EAAc,kBAAkB;AAAA,GAChG;AACF","file":"chunk-63FNGFSF.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 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 * The latest version is the one that was most recently published, which may be a pre-release version.\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 { normalizeInterfaceLinkSearchArounds } from \"./normalizeInterfaceLinkSearchArounds.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 });\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 normalizeInterfaceLinkSearchArounds(client, value);\n }\n if (isObjectSet(value)) {\n return normalizeInterfaceLinkSearchArounds(client, 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 { addUserAgentHeader } from \"../util/addUserAgentHeader.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(addUserAgentHeader(client, query), await client.ontologyRid, query.apiName, {\n parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}\n }, {\n version: query.isFixedVersion ? query.version : undefined,\n transactionId: client.transactionId,\n scenarioRid: client.scenarioRid,\n branch: client.branch\n });\n const objectOutputDefs = await getRequiredDefinitions((await qd).output, client);\n const remappedResponse = await remapQueryResponse(client, (await qd).output, response.value, objectOutputDefs);\n return remappedResponse;\n}\nexport async function remapQueryParams(params, client, paramTypes) {\n const parameterMap = {};\n for (const [key, value] of Object.entries(params)) {\n parameterMap[key] = await toDataValueQueries(value, client, paramTypes[key]);\n }\n return parameterMap;\n}\nexport async function remapQueryResponse(client, responseDataType, responseValue, definitions) {\n // handle null responses\n if (responseValue == null) {\n if (responseDataType.nullable) {\n return undefined;\n } else {\n throw new Error(\"Got null response when nullable was not allowed\");\n }\n }\n switch (responseDataType.type) {\n case \"union\":\n {\n throw new Error(\"Union return types are not yet supported\");\n }\n case \"array\":\n {\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(client, responseDataType.array, responseValue[i], definitions);\n }\n return responseValue;\n }\n case \"set\":\n {\n for (let i = 0; i < responseValue.length; i++) {\n responseValue[i] = await remapQueryResponse(client, responseDataType.set, responseValue[i], definitions);\n }\n return responseValue;\n }\n case \"attachment\":\n {\n return hydrateAttachmentFromRidInternal(client, responseValue);\n }\n case \"mediaReference\":\n {\n return createMediaFromReferenceInternal(client, responseValue);\n }\n case \"object\":\n {\n const def = definitions.get(responseDataType.object);\n if (!def || def.type !== \"object\") {\n throw new Error(`Missing definition for ${responseDataType.object}`);\n }\n return createQueryObjectResponse(responseValue, def);\n }\n case \"interface\":\n {\n const def = definitions.get(responseDataType.interface);\n if (!def || def.type !== \"interface\") {\n throw new Error(`Missing definition for ${responseDataType.interface}`);\n }\n return createQueryInterfaceResponse(responseValue, def);\n }\n case \"objectSet\":\n {\n const def = definitions.get(responseDataType.objectSet);\n if (!def) {\n throw new Error(`Missing definition for ${responseDataType.objectSet}`);\n }\n if (typeof responseValue === \"string\") {\n return createObjectSet(def, client, {\n type: \"intersect\",\n objectSets: [{\n type: \"base\",\n objectType: responseDataType.objectSet\n }, {\n type: \"reference\",\n reference: responseValue\n }]\n });\n }\n return createObjectSet(def, client, responseValue);\n }\n case \"struct\":\n {\n // figure out what keys need to be fixed up\n for (const [key, subtype] of Object.entries(responseDataType.struct)) {\n if (requiresConversion(subtype) || responseValue[key] == null) {\n responseValue[key] = await remapQueryResponse(client, subtype, responseValue[key], definitions);\n }\n }\n return responseValue;\n }\n case \"map\":\n {\n const map = {};\n !Array.isArray(responseValue) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected array entry\") : invariant(false) : void 0;\n for (const entry of responseValue) {\n !(entry.key != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected key\") : invariant(false) : void 0;\n !(responseDataType.valueType.nullable || entry.value != null) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Expected value\") : invariant(false) : void 0;\n const key = responseDataType.keyType.type === \"object\" ? getObjectSpecifier(entry.key, responseDataType.keyType.object, definitions) : entry.key;\n const value = await remapQueryResponse(client, responseDataType.valueType, entry.value, definitions);\n map[key] = value;\n }\n return map;\n }\n case \"twoDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n value\n } of responseValue.groups) {\n result.push({\n key,\n value\n });\n }\n return result;\n }\n case \"threeDimensionalAggregation\":\n {\n const result = [];\n for (const {\n key,\n groups\n } of responseValue.groups) {\n const subResult = [];\n for (const {\n key: subKey,\n value\n } of groups) {\n subResult.push({\n key: subKey,\n value\n });\n }\n result.push({\n key,\n groups: subResult\n });\n }\n return result;\n }\n }\n return responseValue;\n}\nexport async function getRequiredDefinitions(dataType, client) {\n const result = new Map();\n switch (dataType.type) {\n case \"objectSet\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.objectSet);\n result.set(dataType.objectSet, objectDef);\n break;\n }\n case \"interfaceObjectSet\":\n {\n const interfaceDef = await client.ontologyProvider.getInterfaceDefinition(dataType.objectSet);\n result.set(dataType.objectSet, interfaceDef);\n break;\n }\n case \"object\":\n {\n const objectDef = await client.ontologyProvider.getObjectDefinition(dataType.object);\n result.set(dataType.object, objectDef);\n break;\n }\n case \"interface\":\n {\n const interfaceDef = await client.ontologyProvider.getInterfaceDefinition(dataType.interface);\n result.set(dataType.interface, interfaceDef);\n break;\n }\n case \"set\":\n {\n return getRequiredDefinitions(dataType.set, client);\n }\n case \"array\":\n {\n return getRequiredDefinitions(dataType.array, client);\n }\n case \"map\":\n {\n const types = [dataType.keyType, dataType.valueType];\n const allDefs = await Promise.all(types.map(value => getRequiredDefinitions(value, client)));\n for (const defs of allDefs) {\n for (const [type, objectDef] of defs) {\n result.set(type, objectDef);\n }\n }\n break;\n }\n case \"struct\":\n {\n const structValues = Object.values(dataType.struct);\n const allDefs = await Promise.all(structValues.map(value => getRequiredDefinitions(value, client)));\n for (const defs of allDefs) {\n for (const [type, objectDef] of defs) {\n result.set(type, objectDef);\n }\n }\n break;\n }\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"mediaReference\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"typeReference\":\n case \"union\":\n break;\n default:\n {\n const _ = dataType;\n break;\n }\n }\n return result;\n}\nfunction requiresConversion(dataType) {\n switch (dataType.type) {\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"string\":\n case \"timestamp\":\n return false;\n case \"union\":\n return true;\n case \"struct\":\n return Object.values(dataType.struct).some(requiresConversion);\n case \"set\":\n return requiresConversion(dataType.set);\n case \"attachment\":\n case \"mediaReference\":\n case \"objectSet\":\n case \"twoDimensionalAggregation\":\n case \"threeDimensionalAggregation\":\n case \"object\":\n return true;\n default:\n return false;\n }\n}\nfunction getObjectSpecifier(primaryKey, objectTypeApiName, definitions) {\n const def = definitions.get(objectTypeApiName);\n if (!def || def.type !== \"object\") {\n throw new Error(`Missing definition for ${objectTypeApiName}`);\n }\n return createObjectSpecifierFromPrimaryKey(def, primaryKey);\n}\nexport function createQueryObjectResponse(primaryKey, objectDef) {\n return {\n $apiName: objectDef.apiName,\n $title: undefined,\n $objectType: objectDef.apiName,\n $primaryKey: primaryKey,\n $objectSpecifier: createObjectSpecifierFromPrimaryKey(objectDef, primaryKey)\n };\n}\nexport function createQueryInterfaceResponse(interfaceSpecifier, interfaceDef) {\n return {\n $apiName: interfaceDef.apiName,\n $title: undefined,\n $objectType: interfaceSpecifier.objectTypeApiName,\n $primaryKey: interfaceSpecifier.primaryKeyValue,\n $objectSpecifier: createObjectSpecifierFromInterfaceSpecifier(interfaceDef, interfaceSpecifier)\n };\n}"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkHT2OLGRZ_cjs = require('./chunk-HT2OLGRZ.cjs');
3
+ var chunkTTN3WK3L_cjs = require('./chunk-TTN3WK3L.cjs');
4
4
 
5
5
  // src/logger/BaseLogger.ts
6
6
  function noop() {
@@ -71,8 +71,8 @@ var MinimalLogger = class _MinimalLogger extends BaseLogger {
71
71
 
72
72
  // src/objectSet/createTemporaryObjectSet.ts
73
73
  async function createTemporaryObjectSet(client, objectSet) {
74
- const response = await chunkHT2OLGRZ_cjs.createTemporary(client, await client.ontologyRid, {
75
- objectSet: await chunkHT2OLGRZ_cjs.normalizeInterfaceLinkSearchArounds(client, chunkHT2OLGRZ_cjs.isWireObjectSet(objectSet) ? objectSet : chunkHT2OLGRZ_cjs.getWireObjectSet(objectSet))
74
+ const response = await chunkTTN3WK3L_cjs.createTemporary(client, await client.ontologyRid, {
75
+ objectSet: await chunkTTN3WK3L_cjs.normalizeInterfaceLinkSearchArounds(client, chunkTTN3WK3L_cjs.isWireObjectSet(objectSet) ? objectSet : chunkTTN3WK3L_cjs.getWireObjectSet(objectSet))
76
76
  }, {
77
77
  branch: client.branch
78
78
  });
@@ -82,5 +82,5 @@ async function createTemporaryObjectSet(client, objectSet) {
82
82
  exports.BaseLogger = BaseLogger;
83
83
  exports.MinimalLogger = MinimalLogger;
84
84
  exports.createTemporaryObjectSet = createTemporaryObjectSet;
85
- //# sourceMappingURL=chunk-E7K7RZO2.cjs.map
86
- //# sourceMappingURL=chunk-E7K7RZO2.cjs.map
85
+ //# sourceMappingURL=chunk-B5GWGQVL.cjs.map
86
+ //# sourceMappingURL=chunk-B5GWGQVL.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/logger/BaseLogger.ts","../../src/logger/MinimalLogger.ts","../../src/objectSet/createTemporaryObjectSet.ts"],"names":["createTemporary","normalizeInterfaceLinkSearchArounds","isWireObjectSet","getWireObjectSet"],"mappings":";;;;;AAgBO,SAAS,IAAA,GAAO;AAAC;AACxB,IAAM,MAAA,GAAS;AAAA,EACb,KAAA,EAAO,EAAA;AAAA,EACP,KAAA,EAAO,EAAA;AAAA,EACP,IAAA,EAAM,EAAA;AAAA,EACN,IAAA,EAAM,EAAA;AAAA,EACN,KAAA,EAAO,EAAA;AAAA,EACP,KAAA,EAAO;AACT,CAAA;AACO,IAAM,aAAN,MAAiB;AAAA,EACtB,QAAA;AAAA,EACA,WAAA,CAAY,QAAA,EAAU,OAAA,EAAS,OAAA,EAAS;AACtC,IAAA,IAAA,CAAK,QAAA,GAAW,QAAA;AAChB,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AACf,IAAA,IAAA,CAAK,QAAA,GAAW,OAAA;AAChB,IAAA,KAAA,MAAW,CAAA,IAAK,CAAC,OAAA,EAAS,OAAA,EAAS,QAAQ,MAAA,EAAQ,OAAA,EAAS,OAAO,CAAA,EAAG;AACpE,MAAA,IAAI,KAAK,OAAA,EAAS,KAAA,IAAS,CAAC,IAAA,CAAK,cAAA,CAAe,CAAC,CAAA,EAAG;AAClD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AM,QAAA,EAAU;AAC9B,IAAA,MAAM,IAAA,GAAO,CAAC,IAAI,CAAA;AAClB,IAAA,IAAI,IAAA,CAAK,SAAS,SAAA,EAAW;AAC3B,MAAA,IAAA,CAAK,IAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,SAAS,CAAA;AAAA,IAClC;AACA,IAAA,IAAI,OAAO,QAAA,KAAa,QAAA,IAAY,YAAA,IAAgB,QAAA,EAAU;AAC5D,MAAA,IAAA,CAAK,IAAA,CAAK,CAAA,CAAA,EAAI,QAAA,CAAS,UAAU,CAAA,EAAA,CAAI,CAAA;AAAA,IACvC;AACA,IAAA,OAAO,IAAI,IAAA,KAAS;AAElB,MAAA,OAAA,CAAQ,IAAA,KAAS,OAAA,GAAU,OAAA,GAAU,IAAI,CAAA,CAAE,KAAK,IAAA,CAAK,GAAG,CAAA,EAAG,GAAG,IAAI,CAAA;AAAA,IACpE,CAAA;AAAA,EACF;AACF;;;ACjBA,eAAsB,wBAAA,CAAyB,QAAQ,SAAA,EAAW;AAChE,EAAA,MAAM,WAAW,MAAyBA,iCAAA,CAAgB,MAAA,EAAQ,MAAM,OAAO,WAAA,EAAa;AAAA,IAC1F,SAAA,EAAW,MAAMC,qDAAA,CAAoC,MAAA,EAAQC,iCAAA,CAAgB,SAAS,CAAA,GAAI,SAAA,GAAYC,kCAAA,CAAiB,SAAS,CAAC;AAAA,GACnI,EAAG;AAAA,IACD,QAAQ,MAAA,CAAO;AAAA,GAChB,CAAA;AACD,EAAA,OAAO,QAAA,CAAS,YAAA;AAClB","file":"chunk-E7K7RZO2.cjs","sourcesContent":["/*\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 noop() {}\nconst levels = {\n trace: 10,\n debug: 20,\n info: 30,\n warn: 40,\n error: 50,\n fatal: 60\n};\nexport class BaseLogger {\n #factory;\n constructor(bindings, options, factory) {\n this.bindings = bindings;\n this.options = options;\n this.#factory = factory;\n for (const k of [\"trace\", \"debug\", \"info\", \"warn\", \"error\", \"fatal\"]) {\n if (this.options?.level && !this.isLevelEnabled(k)) {\n continue;\n }\n this[k] = this.createLogMethod(k, bindings);\n }\n }\n trace = noop;\n debug = noop;\n warn = noop;\n info = noop;\n error = noop;\n fatal = noop;\n child(bindings, options) {\n return new this.#factory({\n ...this.bindings,\n ...bindings\n }, {\n level: options?.level ?? this.options?.level,\n msgPrefix: [this.options?.msgPrefix, options?.msgPrefix].filter(x => x).join(\" \")\n });\n }\n isLevelEnabled(level) {\n const ourLevel = this.options?.level ?? \"info\";\n return level in levels && ourLevel in levels && levels[level] >= levels[ourLevel];\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\nimport { BaseLogger } from \"./BaseLogger.js\";\nexport class MinimalLogger extends BaseLogger {\n constructor(bindings = {}, options = {}) {\n super(bindings, {\n ...options,\n level: options.level ?? \"error\"\n }, MinimalLogger);\n }\n createLogMethod(name, bindings) {\n const msgs = [name];\n if (this.options?.msgPrefix) {\n msgs.push(this.options.msgPrefix);\n }\n if (typeof bindings === \"object\" && \"methodName\" in bindings) {\n msgs.push(`.${bindings.methodName}()`);\n }\n return (...args) => {\n // eslint-disable-next-line no-console\n console[name === \"fatal\" ? \"error\" : name](msgs.join(\" \"), ...args);\n };\n }\n}","/*\n * Copyright 2026 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 OntologyObjectSets from \"@osdk/foundry.ontologies/OntologyObjectSet\";\nimport { normalizeInterfaceLinkSearchArounds } from \"../util/normalizeInterfaceLinkSearchArounds.js\";\nimport { isWireObjectSet } from \"../util/WireObjectSet.js\";\nimport { getWireObjectSet } from \"./createObjectSet.js\";\nexport async function createTemporaryObjectSet(client, objectSet) {\n const response = await OntologyObjectSets.createTemporary(client, await client.ontologyRid, {\n objectSet: await normalizeInterfaceLinkSearchArounds(client, isWireObjectSet(objectSet) ? objectSet : getWireObjectSet(objectSet))\n }, {\n branch: client.branch\n });\n return response.objectSetRid;\n}"]}
1
+ {"version":3,"sources":["../../src/logger/BaseLogger.ts","../../src/logger/MinimalLogger.ts","../../src/objectSet/createTemporaryObjectSet.ts"],"names":["createTemporary","normalizeInterfaceLinkSearchArounds","isWireObjectSet","getWireObjectSet"],"mappings":";;;;;AAgBO,SAAS,IAAA,GAAO;AAAC;AACxB,IAAM,MAAA,GAAS;AAAA,EACb,KAAA,EAAO,EAAA;AAAA,EACP,KAAA,EAAO,EAAA;AAAA,EACP,IAAA,EAAM,EAAA;AAAA,EACN,IAAA,EAAM,EAAA;AAAA,EACN,KAAA,EAAO,EAAA;AAAA,EACP,KAAA,EAAO;AACT,CAAA;AACO,IAAM,aAAN,MAAiB;AAAA,EACtB,QAAA;AAAA,EACA,WAAA,CAAY,QAAA,EAAU,OAAA,EAAS,O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,QAAQ,MAAA,CAAO;AAAA,GAChB,CAAA;AACD,EAAA,OAAO,QAAA,CAAS,YAAA;AAClB","file":"chunk-B5GWGQVL.cjs","sourcesContent":["/*\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 noop() {}\nconst levels = {\n trace: 10,\n debug: 20,\n info: 30,\n warn: 40,\n error: 50,\n fatal: 60\n};\nexport class BaseLogger {\n #factory;\n constructor(bindings, options, factory) {\n this.bindings = bindings;\n this.options = options;\n this.#factory = factory;\n for (const k of [\"trace\", \"debug\", \"info\", \"warn\", \"error\", \"fatal\"]) {\n if (this.options?.level && !this.isLevelEnabled(k)) {\n continue;\n }\n this[k] = this.createLogMethod(k, bindings);\n }\n }\n trace = noop;\n debug = noop;\n warn = noop;\n info = noop;\n error = noop;\n fatal = noop;\n child(bindings, options) {\n return new this.#factory({\n ...this.bindings,\n ...bindings\n }, {\n level: options?.level ?? this.options?.level,\n msgPrefix: [this.options?.msgPrefix, options?.msgPrefix].filter(x => x).join(\" \")\n });\n }\n isLevelEnabled(level) {\n const ourLevel = this.options?.level ?? \"info\";\n return level in levels && ourLevel in levels && levels[level] >= levels[ourLevel];\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\nimport { BaseLogger } from \"./BaseLogger.js\";\nexport class MinimalLogger extends BaseLogger {\n constructor(bindings = {}, options = {}) {\n super(bindings, {\n ...options,\n level: options.level ?? \"error\"\n }, MinimalLogger);\n }\n createLogMethod(name, bindings) {\n const msgs = [name];\n if (this.options?.msgPrefix) {\n msgs.push(this.options.msgPrefix);\n }\n if (typeof bindings === \"object\" && \"methodName\" in bindings) {\n msgs.push(`.${bindings.methodName}()`);\n }\n return (...args) => {\n // eslint-disable-next-line no-console\n console[name === \"fatal\" ? \"error\" : name](msgs.join(\" \"), ...args);\n };\n }\n}","/*\n * Copyright 2026 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 OntologyObjectSets from \"@osdk/foundry.ontologies/OntologyObjectSet\";\nimport { normalizeInterfaceLinkSearchArounds } from \"../util/normalizeInterfaceLinkSearchArounds.js\";\nimport { isWireObjectSet } from \"../util/WireObjectSet.js\";\nimport { getWireObjectSet } from \"./createObjectSet.js\";\nexport async function createTemporaryObjectSet(client, objectSet) {\n const response = await OntologyObjectSets.createTemporary(client, await client.ontologyRid, {\n objectSet: await normalizeInterfaceLinkSearchArounds(client, isWireObjectSet(objectSet) ? objectSet : getWireObjectSet(objectSet))\n }, {\n branch: client.branch\n });\n return response.objectSetRid;\n}"]}