@osdk/client 2.65.0 → 2.66.0-main-3404eda8e674e20f1bf328ad0cc3db2cc39a46b5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/scenarios/createScenario.js +13 -6
- package/build/browser/scenarios/createScenario.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{applyStreamingQuery-7BX4DRU5.cjs → applyStreamingQuery-C4FRLUOC.cjs} +8 -8
- package/build/cjs/{applyStreamingQuery-7BX4DRU5.cjs.map → applyStreamingQuery-C4FRLUOC.cjs.map} +1 -1
- package/build/cjs/{chunk-OYXNRFJB.cjs → chunk-ARALL5IL.cjs} +46 -46
- package/build/cjs/chunk-ARALL5IL.cjs.map +1 -0
- package/build/cjs/{chunk-UKSU5YF3.cjs → chunk-FFVLRJCA.cjs} +2 -2
- package/build/cjs/{chunk-UKSU5YF3.cjs.map → chunk-FFVLRJCA.cjs.map} +1 -1
- package/build/cjs/{chunk-4NZ4GY6B.cjs → chunk-JEC72GNA.cjs} +80 -80
- package/build/cjs/{chunk-4NZ4GY6B.cjs.map → chunk-JEC72GNA.cjs.map} +1 -1
- package/build/cjs/{chunk-4X3PI6OD.cjs → chunk-N5W2RR2Z.cjs} +13 -13
- package/build/cjs/{chunk-4X3PI6OD.cjs.map → chunk-N5W2RR2Z.cjs.map} +1 -1
- package/build/cjs/chunk-RZCL4CXM.cjs +36 -0
- package/build/cjs/chunk-RZCL4CXM.cjs.map +1 -0
- package/build/cjs/index.cjs +11 -11
- package/build/cjs/public/experimental.cjs +9 -9
- package/build/cjs/public/experimental.d.cts +1 -1
- package/build/cjs/public/internal.cjs +7 -7
- package/build/cjs/public/observable.cjs +5 -5
- package/build/cjs/public/unstable-do-not-use.cjs +16 -16
- package/build/cjs/public/unstable-do-not-use.d.cts +1 -1
- package/build/cjs/{withScenario-CwHWdp9K.d.cts → withScenario-OfaBmUvQ.d.cts} +6 -2
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/scenarios/createScenario.js +13 -6
- package/build/esm/scenarios/createScenario.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/Client.d.ts +1 -1
- package/build/types/scenarios/createScenario.d.ts +6 -2
- package/build/types/scenarios/createScenario.d.ts.map +1 -1
- package/package.json +8 -8
- package/build/cjs/chunk-OYXNRFJB.cjs.map +0 -1
- package/build/cjs/chunk-QRQJZS6A.cjs +0 -31
- package/build/cjs/chunk-QRQJZS6A.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @osdk/client
|
|
2
2
|
|
|
3
|
+
## 2.66.0-main-3404eda8e674e20f1bf328ad0cc3db2cc39a46b5
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3404eda: Allow `createScenario` to accept an optional `expireAfter` timestamp
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- @osdk/api@2.66.0-main-3404eda8e674e20f1bf328ad0cc3db2cc39a46b5
|
|
12
|
+
- @osdk/client.unstable@2.66.0-main-3404eda8e674e20f1bf328ad0cc3db2cc39a46b5
|
|
13
|
+
- @osdk/generator-converters@2.66.0-main-3404eda8e674e20f1bf328ad0cc3db2cc39a46b5
|
|
14
|
+
- @osdk/shared.test@2.44.1-main-3404eda8e674e20f1bf328ad0cc3db2cc39a46b5
|
|
15
|
+
|
|
3
16
|
## 2.65.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/build/browser/Client.js
CHANGED
|
@@ -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.
|
|
24
|
+
const MaxOsdkVersion = "2.66.0";
|
|
25
25
|
// END: THIS IS GENERATED CODE. DO NOT EDIT.
|
|
26
26
|
|
|
27
27
|
const ErrorMessage = Symbol("ErrorMessage");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\n\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> =\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 /**\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.
|
|
1
|
+
{"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionMetadata,\n CompileTimeMetadata,\n InterfaceDefinition,\n InterfaceMetadata,\n ObjectMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n QueryDefinition,\n QueryMetadata,\n VersionBound,\n} from \"@osdk/api\";\nimport type {\n Experiment,\n ExperimentFns,\n MinimalObjectSet,\n} from \"@osdk/api/unstable\";\nimport type { SharedClient } from \"@osdk/shared.client2\";\n\nimport type { ActionSignatureFromDef } from \"./actions/applyAction.js\";\nimport type { MinimalClient } from \"./MinimalClientContext.js\";\nimport type { QuerySignatureFromDef } from \"./queries/types.js\";\nimport type { SatisfiesSemver } from \"./SatisfiesSemver.js\";\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\ntype OldSharedClient = import(\"@osdk/shared.client\").SharedClient;\n\nexport type CheckVersionBound<Q> =\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 /**\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.66.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;;AA2BA;;AAkIA;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":[]}
|
|
@@ -25,6 +25,7 @@ import { buildScenarioClient } from "./ScenarioClient.js";
|
|
|
25
25
|
* from. Throws at runtime if the client is already scoped to a scenario. If the client has an active transaction,
|
|
26
26
|
* the transaction is ignored (a warning is logged) and the client is scoped to the new scenario. When the base
|
|
27
27
|
* client has a branch set, the newly minted scenario uses that branch as its base.
|
|
28
|
+
* @param options - Optional settings for the new scenario.
|
|
28
29
|
* @returns a {@link EXPERIMENTAL_ScenarioClient} bound to the freshly minted scenario RID.
|
|
29
30
|
*
|
|
30
31
|
* @beta This is an experimental, unstable feature subject to change.
|
|
@@ -33,21 +34,27 @@ import { buildScenarioClient } from "./ScenarioClient.js";
|
|
|
33
34
|
* ```ts
|
|
34
35
|
* import { createScenario } from "@osdk/client/unstable-do-not-use";
|
|
35
36
|
*
|
|
36
|
-
* const
|
|
37
|
+
* const expireAfter = new Date(Date.now() + 60 * 60 * 1000);
|
|
38
|
+
* const scenario = await createScenario(client, { expireAfter });
|
|
37
39
|
* const scenarioRid = scenario.getScenarioReference();
|
|
38
40
|
* ```
|
|
39
41
|
*/
|
|
40
|
-
export async function createScenario(client) {
|
|
42
|
+
export async function createScenario(client, options) {
|
|
41
43
|
const ctx = client[additionalContext];
|
|
42
44
|
if (ctx.scenarioRid != null) {
|
|
43
45
|
throw new Error("createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.");
|
|
44
46
|
}
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
+
const request = {};
|
|
48
|
+
if (ctx.branch != null) {
|
|
49
|
+
request.base = {
|
|
47
50
|
type: "branch",
|
|
48
51
|
branch: ctx.branch
|
|
49
|
-
}
|
|
50
|
-
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
if (options?.expireAfter != null) {
|
|
55
|
+
request.expireAfter = options.expireAfter.toISOString();
|
|
56
|
+
}
|
|
57
|
+
const response = await OntologyScenarios.createScenario(ctx, await ctx.ontologyRid, request, {
|
|
51
58
|
preview: true
|
|
52
59
|
});
|
|
53
60
|
return buildScenarioClient(client, response.scenarioRid);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createScenario.js","names":["OntologyScenarios","additionalContext","buildScenarioClient","createScenario","client","ctx","scenarioRid","Error","
|
|
1
|
+
{"version":3,"file":"createScenario.js","names":["OntologyScenarios","additionalContext","buildScenarioClient","createScenario","client","options","ctx","scenarioRid","Error","request","branch","base","type","expireAfter","toISOString","response","ontologyRid","preview"],"sources":["createScenario.ts"],"sourcesContent":["/*\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 {\n type CreateOntologyScenarioRequest,\n OntologyScenarios,\n} from \"@osdk/foundry.ontologies\";\n\nimport { additionalContext, type Client } from \"../Client.js\";\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport {\n buildScenarioClient,\n type EXPERIMENTAL_ScenarioClient,\n} from \"./ScenarioClient.js\";\n\n/**\n * Mint a fresh ontology scenario and return a client scoped to it.\n *\n * @param client - The base {@link Client} to derive context (`baseUrl`, `ontologyRid`, `tokenProvider`, `branch`, …)\n * from. Throws at runtime if the client is already scoped to a scenario. If the client has an active transaction,\n * the transaction is ignored (a warning is logged) and the client is scoped to the new scenario. When the base\n * client has a branch set, the newly minted scenario uses that branch as its base.\n * @param options - Optional settings for the new scenario.\n * @returns a {@link EXPERIMENTAL_ScenarioClient} bound to the freshly minted scenario RID.\n *\n * @beta This is an experimental, unstable feature subject to change.\n *\n * @example\n * ```ts\n * import { createScenario } from \"@osdk/client/unstable-do-not-use\";\n *\n * const expireAfter = new Date(Date.now() + 60 * 60 * 1000);\n * const scenario = await createScenario(client, { expireAfter });\n * const scenarioRid = scenario.getScenarioReference();\n * ```\n */\nexport async function createScenario(\n client: Client,\n options?: {\n expireAfter?: Date;\n },\n): Promise<EXPERIMENTAL_ScenarioClient> {\n const ctx: MinimalClient = client[additionalContext];\n\n if (ctx.scenarioRid != null) {\n throw new Error(\n \"createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.\",\n );\n }\n\n const request: CreateOntologyScenarioRequest = {};\n\n if (ctx.branch != null) {\n request.base = { type: \"branch\", branch: ctx.branch };\n }\n\n if (options?.expireAfter != null) {\n request.expireAfter = options.expireAfter.toISOString();\n }\n\n const response = await OntologyScenarios.createScenario(\n ctx,\n await ctx.ontologyRid,\n request,\n { preview: true },\n );\n\n return buildScenarioClient(client, response.scenarioRid);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAEEA,iBAAiB,QACZ,0BAA0B;AAEjC,SAASC,iBAAiB,QAAqB,cAAc;AAE7D,SACEC,mBAAmB,QAEd,qBAAqB;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,cAAcA,CAClCC,MAAc,EACdC,OAEC,EACqC;EACtC,MAAMC,GAAkB,GAAGF,MAAM,CAACH,iBAAiB,CAAC;EAEpD,IAAIK,GAAG,CAACC,WAAW,IAAI,IAAI,EAAE;IAC3B,MAAM,IAAIC,KAAK,CACb,iGACF,CAAC;EACH;EAEA,MAAMC,OAAsC,GAAG,CAAC,CAAC;EAEjD,IAAIH,GAAG,CAACI,MAAM,IAAI,IAAI,EAAE;IACtBD,OAAO,CAACE,IAAI,GAAG;MAAEC,IAAI,EAAE,QAAQ;MAAEF,MAAM,EAAEJ,GAAG,CAACI;IAAO,CAAC;EACvD;EAEA,IAAIL,OAAO,EAAEQ,WAAW,IAAI,IAAI,EAAE;IAChCJ,OAAO,CAACI,WAAW,GAAGR,OAAO,CAACQ,WAAW,CAACC,WAAW,CAAC,CAAC;EACzD;EAEA,MAAMC,QAAQ,GAAG,MAAMf,iBAAiB,CAACG,cAAc,CACrDG,GAAG,EACH,MAAMA,GAAG,CAACU,WAAW,EACrBP,OAAO,EACP;IAAEQ,OAAO,EAAE;EAAK,CAClB,CAAC;EAED,OAAOf,mBAAmB,CAACE,MAAM,EAAEW,QAAQ,CAACR,WAAW,CAAC;AAC1D","ignoreList":[]}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export const USER_AGENT = `osdk-client/${"2.
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.66.0-main-3404eda8e674e20f1bf328ad0cc3db2cc39a46b5"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.66.0-main-3404eda8e674e20f1bf328ad0cc3db2cc39a46b5"}`;
|
|
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,
|
|
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
|
|
4
|
-
var
|
|
3
|
+
var chunkN5W2RR2Z_cjs = require('./chunk-N5W2RR2Z.cjs');
|
|
4
|
+
var chunkFFVLRJCA_cjs = require('./chunk-FFVLRJCA.cjs');
|
|
5
5
|
var chunkLEHLBYTY_cjs = require('./chunk-LEHLBYTY.cjs');
|
|
6
6
|
require('./chunk-Q7SFCCGT.cjs');
|
|
7
7
|
|
|
@@ -17,21 +17,21 @@ async function* applyStreamingQuery(client, query, params) {
|
|
|
17
17
|
if (client.flushEdits != null) {
|
|
18
18
|
await client.flushEdits();
|
|
19
19
|
}
|
|
20
|
-
const response = await streamingExecute(
|
|
20
|
+
const response = await streamingExecute(chunkFFVLRJCA_cjs.addUserAgentAndRequestContextHeaders(chunkFFVLRJCA_cjs.augmentRequestContext(client, (_) => ({
|
|
21
21
|
finalMethodCall: "applyStreamingQuery"
|
|
22
22
|
})), query), query.apiName, {
|
|
23
23
|
ontology: await client.ontologyRid,
|
|
24
|
-
parameters: params ? await
|
|
24
|
+
parameters: params ? await chunkN5W2RR2Z_cjs.remapQueryParams(params, client, qd.parameters) : {},
|
|
25
25
|
version: query.isFixedVersion ? query.version : void 0,
|
|
26
26
|
branch: client.branch
|
|
27
27
|
}, {
|
|
28
28
|
transactionId: client.transactionId,
|
|
29
29
|
preview: true
|
|
30
30
|
});
|
|
31
|
-
const definitions = await
|
|
31
|
+
const definitions = await chunkN5W2RR2Z_cjs.getRequiredDefinitions(qd.output, client);
|
|
32
32
|
for await (const event of response) {
|
|
33
33
|
if (event.type !== "data") continue;
|
|
34
|
-
const remapped = await
|
|
34
|
+
const remapped = await chunkN5W2RR2Z_cjs.remapQueryResponse(client, qd.output, event.value, definitions);
|
|
35
35
|
if (qd.output.type === "array" && Array.isArray(remapped)) {
|
|
36
36
|
for (const item of remapped) {
|
|
37
37
|
yield item;
|
|
@@ -43,5 +43,5 @@ async function* applyStreamingQuery(client, query, params) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
exports.applyStreamingQuery = applyStreamingQuery;
|
|
46
|
-
//# sourceMappingURL=applyStreamingQuery-
|
|
47
|
-
//# sourceMappingURL=applyStreamingQuery-
|
|
46
|
+
//# sourceMappingURL=applyStreamingQuery-C4FRLUOC.cjs.map
|
|
47
|
+
//# sourceMappingURL=applyStreamingQuery-C4FRLUOC.cjs.map
|
package/build/cjs/{applyStreamingQuery-7BX4DRU5.cjs.map → applyStreamingQuery-C4FRLUOC.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.functions@2.77.0/node_modules/@osdk/foundry.functions/build/esm/public/Query.js","../../src/queries/applyStreamingQuery.ts"],"names":["foundryPlatformFetch","addUserAgentAndRequestContextHeaders","augmentRequestContext","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;;;ACzFA,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,WAAW,MAAgB,gBAAA,CAAiBC,sDAAA,CAAqCC,uCAAA,CAAsB,QAAQ,CAAA,CAAA,MAAM;AAAA,IACzH,eAAA,EAAiB;AAAA,GACnB,CAAE,CAAA,EAAG,KAAK,CAAA,EAAG,MAAM,OAAA,EAAS;AAAA,IAC1B,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-7BX4DRU5.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 { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { getRequiredDefinitions, remapQueryParams, remapQueryResponse } from \"./applyQuery.js\";\nexport async function* applyStreamingQuery(client, query, params) {\n const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const response = await Functions.streamingExecute(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyStreamingQuery\"\n })), query), query.apiName, {\n ontology: await client.ontologyRid,\n parameters: params ? await remapQueryParams(params, client, qd.parameters) : {},\n version: query.isFixedVersion ? query.version : undefined,\n branch: client.branch\n }, {\n transactionId: client.transactionId,\n preview: true\n });\n 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.77.0/node_modules/@osdk/foundry.functions/build/esm/public/Query.js","../../src/queries/applyStreamingQuery.ts"],"names":["foundryPlatformFetch","addUserAgentAndRequestContextHeaders","augmentRequestContext","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;;;ACzFA,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,WAAW,MAAgB,gBAAA,CAAiBC,sDAAA,CAAqCC,uCAAA,CAAsB,QAAQ,CAAA,CAAA,MAAM;AAAA,IACzH,eAAA,EAAiB;AAAA,GACnB,CAAE,CAAA,EAAG,KAAK,CAAA,EAAG,MAAM,OAAA,EAAS;AAAA,IAC1B,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-C4FRLUOC.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 { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { getRequiredDefinitions, remapQueryParams, remapQueryResponse } from \"./applyQuery.js\";\nexport async function* applyStreamingQuery(client, query, params) {\n const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const response = await Functions.streamingExecute(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyStreamingQuery\"\n })), query), query.apiName, {\n ontology: await client.ontologyRid,\n parameters: params ? await remapQueryParams(params, client, qd.parameters) : {},\n version: query.isFixedVersion ? query.version : undefined,\n branch: client.branch\n }, {\n transactionId: client.transactionId,\n preview: true\n });\n 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}"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkIBY4PG26_cjs = require('./chunk-IBY4PG26.cjs');
|
|
4
4
|
var chunkG2EJPP5V_cjs = require('./chunk-G2EJPP5V.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkN5W2RR2Z_cjs = require('./chunk-N5W2RR2Z.cjs');
|
|
6
|
+
var chunkFFVLRJCA_cjs = require('./chunk-FFVLRJCA.cjs');
|
|
7
7
|
var chunkLEHLBYTY_cjs = require('./chunk-LEHLBYTY.cjs');
|
|
8
8
|
var chunkIWUIN6JJ_cjs = require('./chunk-IWUIN6JJ.cjs');
|
|
9
9
|
var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
|
|
@@ -154,7 +154,7 @@ function isScenarioClient(value) {
|
|
|
154
154
|
return value != null && (typeof value === "object" || typeof value === "function") && typeof value.getScenarioReference === "function";
|
|
155
155
|
}
|
|
156
156
|
function buildScenarioClient(parent, scenarioRid) {
|
|
157
|
-
const ctx = parent[
|
|
157
|
+
const ctx = parent[chunkFFVLRJCA_cjs.additionalContext];
|
|
158
158
|
if (ctx.transactionId != null) {
|
|
159
159
|
console.warn("withScenario / createScenario: the supplied client has an active transaction. Ignoring the transaction and scoping to the scenario instead.");
|
|
160
160
|
}
|
|
@@ -168,7 +168,7 @@ function buildScenarioClient(parent, scenarioRid) {
|
|
|
168
168
|
// resolved to no branch must stay on the default branch here too.
|
|
169
169
|
UNSTABLE_DO_NOT_USE_BRANCH: ctx.branch ?? null
|
|
170
170
|
}, ctx.fetch);
|
|
171
|
-
const innerCtx = inner[
|
|
171
|
+
const innerCtx = inner[chunkFFVLRJCA_cjs.additionalContext];
|
|
172
172
|
async function getEditedEntityTypes() {
|
|
173
173
|
const ontologyRid = await innerCtx.ontologyRid;
|
|
174
174
|
const response = await OntologyScenario_exports.listScenarioEditedEntityTypes(innerCtx, ontologyRid, scenarioRid, {
|
|
@@ -345,7 +345,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
345
345
|
}
|
|
346
346
|
if (Array.isArray(value) || value instanceof Set) {
|
|
347
347
|
const values = Array.from(value);
|
|
348
|
-
if (values.some((dataValue) =>
|
|
348
|
+
if (values.some((dataValue) => chunkN5W2RR2Z_cjs.isAttachmentUpload(dataValue) || chunkN5W2RR2Z_cjs.isAttachmentFile(dataValue))) {
|
|
349
349
|
const converted = [];
|
|
350
350
|
for (const value2 of values) {
|
|
351
351
|
converted.push(await toDataValue(value2, client));
|
|
@@ -355,43 +355,43 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
355
355
|
const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client));
|
|
356
356
|
return Promise.all(promiseArray);
|
|
357
357
|
}
|
|
358
|
-
if (
|
|
359
|
-
const attachment = await
|
|
358
|
+
if (chunkN5W2RR2Z_cjs.isAttachmentUpload(value)) {
|
|
359
|
+
const attachment = await chunkFFVLRJCA_cjs.upload(client, value.data, {
|
|
360
360
|
filename: value.name
|
|
361
361
|
});
|
|
362
362
|
return await toDataValue(attachment.rid, client);
|
|
363
363
|
}
|
|
364
|
-
if (
|
|
365
|
-
const attachment = await
|
|
364
|
+
if (chunkN5W2RR2Z_cjs.isAttachmentFile(value)) {
|
|
365
|
+
const attachment = await chunkFFVLRJCA_cjs.upload(client, value, {
|
|
366
366
|
filename: value.name
|
|
367
367
|
});
|
|
368
368
|
return await toDataValue(attachment.rid, client);
|
|
369
369
|
}
|
|
370
|
-
if (
|
|
370
|
+
if (chunkN5W2RR2Z_cjs.isMediaUpload(value)) {
|
|
371
371
|
const mediaRef = await chunkLEHLBYTY_cjs.MediaSet_exports.uploadMedia(client, value.data, {
|
|
372
372
|
filename: value.fileName
|
|
373
373
|
});
|
|
374
374
|
return await toDataValue(mediaRef, client);
|
|
375
375
|
}
|
|
376
|
-
if (
|
|
376
|
+
if (chunkN5W2RR2Z_cjs.isMedia(value)) {
|
|
377
377
|
return value.getMediaReference();
|
|
378
378
|
}
|
|
379
|
-
if (
|
|
379
|
+
if (chunkN5W2RR2Z_cjs.isMediaReference(value)) {
|
|
380
380
|
return value;
|
|
381
381
|
}
|
|
382
382
|
if (isOntologyObjectV2(value)) {
|
|
383
383
|
return await toDataValue(value.__primaryKey, client);
|
|
384
384
|
}
|
|
385
|
-
if (
|
|
385
|
+
if (chunkN5W2RR2Z_cjs.isObjectSpecifiersObject(value)) {
|
|
386
386
|
return await toDataValue(value.$primaryKey, client);
|
|
387
387
|
}
|
|
388
|
-
if (
|
|
388
|
+
if (chunkFFVLRJCA_cjs.isWireObjectSet(value)) {
|
|
389
389
|
return value;
|
|
390
390
|
}
|
|
391
|
-
if (
|
|
392
|
-
return
|
|
391
|
+
if (chunkFFVLRJCA_cjs.isObjectSet(value)) {
|
|
392
|
+
return chunkFFVLRJCA_cjs.getWireObjectSet(value);
|
|
393
393
|
}
|
|
394
|
-
if (
|
|
394
|
+
if (chunkN5W2RR2Z_cjs.isInterfaceActionParam(value)) {
|
|
395
395
|
return {
|
|
396
396
|
objectTypeApiName: value.$objectType,
|
|
397
397
|
primaryKeyValue: value.$primaryKey
|
|
@@ -412,7 +412,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
412
412
|
|
|
413
413
|
// src/actions/applyAction.ts
|
|
414
414
|
async function applyAction(client, action, parameters, options = {}) {
|
|
415
|
-
const clientWithHeaders =
|
|
415
|
+
const clientWithHeaders = chunkFFVLRJCA_cjs.addUserAgentAndRequestContextHeaders(chunkFFVLRJCA_cjs.augmentRequestContext(client, (_) => ({
|
|
416
416
|
finalMethodCall: "applyAction"
|
|
417
417
|
})), action);
|
|
418
418
|
if (Array.isArray(parameters)) {
|
|
@@ -738,7 +738,7 @@ var MediaReferencePropertyImpl = class {
|
|
|
738
738
|
ReadToken: token
|
|
739
739
|
} : void 0);
|
|
740
740
|
return {
|
|
741
|
-
itemMetadata:
|
|
741
|
+
itemMetadata: chunkFFVLRJCA_cjs.validateMediaItemMetadata(raw)
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
744
|
getMediaReference() {
|
|
@@ -1166,8 +1166,8 @@ function get$link(holder) {
|
|
|
1166
1166
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1167
1167
|
}).pivotTo(linkName);
|
|
1168
1168
|
const value = !linkDef.multiplicity ? {
|
|
1169
|
-
fetchOne: (options) =>
|
|
1170
|
-
fetchOneWithErrors: (options) =>
|
|
1169
|
+
fetchOne: (options) => chunkFFVLRJCA_cjs.fetchSingle(client, objDef, options ?? {}, chunkFFVLRJCA_cjs.getWireObjectSet(objectSet)),
|
|
1170
|
+
fetchOneWithErrors: (options) => chunkFFVLRJCA_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkFFVLRJCA_cjs.getWireObjectSet(objectSet))
|
|
1171
1171
|
} : objectSet;
|
|
1172
1172
|
return [linkName, value];
|
|
1173
1173
|
})));
|
|
@@ -1190,8 +1190,8 @@ function get$linkForInterface(holder) {
|
|
|
1190
1190
|
apiName: linkDef.targetTypeApiName
|
|
1191
1191
|
};
|
|
1192
1192
|
const value = !linkDef.multiplicity ? {
|
|
1193
|
-
fetchOne: (options) =>
|
|
1194
|
-
fetchOneWithErrors: (options) =>
|
|
1193
|
+
fetchOne: (options) => chunkFFVLRJCA_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkFFVLRJCA_cjs.getWireObjectSet(objectSet)),
|
|
1194
|
+
fetchOneWithErrors: (options) => chunkFFVLRJCA_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkFFVLRJCA_cjs.getWireObjectSet(objectSet))
|
|
1195
1195
|
} : objectSet;
|
|
1196
1196
|
return [linkName, value];
|
|
1197
1197
|
})));
|
|
@@ -1236,7 +1236,7 @@ function isStruct(value) {
|
|
|
1236
1236
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
1237
1237
|
}
|
|
1238
1238
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1239
|
-
const [objApiNamespace] =
|
|
1239
|
+
const [objApiNamespace] = chunkFFVLRJCA_cjs.extractNamespace(interfaceDef.apiName);
|
|
1240
1240
|
const objDef = underlying[ObjectDefRef];
|
|
1241
1241
|
const underlyingProperties = underlying;
|
|
1242
1242
|
return Object.freeze(Object.defineProperties({}, {
|
|
@@ -1300,7 +1300,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1300
1300
|
value: interfaceDef
|
|
1301
1301
|
},
|
|
1302
1302
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1303
|
-
const [apiNamespace, apiName] =
|
|
1303
|
+
const [apiNamespace, apiName] = chunkFFVLRJCA_cjs.extractNamespace(p);
|
|
1304
1304
|
const exposedName = apiNamespace === objApiNamespace ? apiName : p;
|
|
1305
1305
|
const impl = objDef.interfaceImplementations?.[interfaceDef.apiName]?.[p];
|
|
1306
1306
|
if (impl != null) {
|
|
@@ -1349,7 +1349,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
|
|
|
1349
1349
|
}
|
|
1350
1350
|
const interfacePropName = inverseMap[objPropName];
|
|
1351
1351
|
if (interfacePropName == null) continue;
|
|
1352
|
-
const [apiNamespace, apiName] =
|
|
1352
|
+
const [apiNamespace, apiName] = chunkFFVLRJCA_cjs.extractNamespace(interfacePropName);
|
|
1353
1353
|
const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
|
|
1354
1354
|
remapped[key] = underlyingSecurities[objPropName];
|
|
1355
1355
|
}
|
|
@@ -1442,7 +1442,7 @@ var basePropDefs = {
|
|
|
1442
1442
|
$objectSpecifier: {
|
|
1443
1443
|
get() {
|
|
1444
1444
|
const rawObj = this[UnderlyingOsdkObject];
|
|
1445
|
-
return
|
|
1445
|
+
return chunkN5W2RR2Z_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
|
|
1446
1446
|
},
|
|
1447
1447
|
enumerable: true
|
|
1448
1448
|
},
|
|
@@ -1514,9 +1514,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1514
1514
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1515
1515
|
case "attachment":
|
|
1516
1516
|
if (Array.isArray(rawValue)) {
|
|
1517
|
-
return rawValue.map((a) =>
|
|
1517
|
+
return rawValue.map((a) => chunkFFVLRJCA_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1518
1518
|
} else {
|
|
1519
|
-
return
|
|
1519
|
+
return chunkFFVLRJCA_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1520
1520
|
}
|
|
1521
1521
|
default:
|
|
1522
1522
|
process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant4__default.default(false) ;
|
|
@@ -1532,9 +1532,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
if (propDef.type === "attachment") {
|
|
1534
1534
|
if (Array.isArray(rawValue)) {
|
|
1535
|
-
return rawValue.map((a) =>
|
|
1535
|
+
return rawValue.map((a) => chunkFFVLRJCA_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1536
1536
|
}
|
|
1537
|
-
return
|
|
1537
|
+
return chunkFFVLRJCA_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1538
1538
|
}
|
|
1539
1539
|
if (propDef.type === "cipherText") {
|
|
1540
1540
|
return new CipherTextPropertyImpl({
|
|
@@ -1888,11 +1888,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1888
1888
|
};
|
|
1889
1889
|
|
|
1890
1890
|
// src/util/UserAgent.ts
|
|
1891
|
-
var USER_AGENT = `osdk-client/${"2.
|
|
1892
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.
|
|
1891
|
+
var USER_AGENT = `osdk-client/${"2.66.0-main-3404eda8e674e20f1bf328ad0cc3db2cc39a46b5"}`;
|
|
1892
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.66.0-main-3404eda8e674e20f1bf328ad0cc3db2cc39a46b5"}`;
|
|
1893
1893
|
|
|
1894
1894
|
// src/createMinimalClient.ts
|
|
1895
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1895
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkFFVLRJCA_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1896
1896
|
if (process.env.NODE_ENV !== "production") {
|
|
1897
1897
|
try {
|
|
1898
1898
|
new URL(baseUrl);
|
|
@@ -2575,7 +2575,7 @@ var ActionInvoker = class {
|
|
|
2575
2575
|
};
|
|
2576
2576
|
var QueryInvoker = class {
|
|
2577
2577
|
constructor(clientCtx, queryDef) {
|
|
2578
|
-
this.executeFunction =
|
|
2578
|
+
this.executeFunction = chunkN5W2RR2Z_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
|
|
2579
2579
|
}
|
|
2580
2580
|
};
|
|
2581
2581
|
function createClientInternal(objectSetFactory, transactionRid, flushEdits, scenarioRid, subscribeConnectionFn, baseUrl, ontologyRid, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
@@ -2618,7 +2618,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2618
2618
|
async *executeStreamingFunction(query, params) {
|
|
2619
2619
|
const {
|
|
2620
2620
|
applyStreamingQuery
|
|
2621
|
-
} = await import('./applyStreamingQuery-
|
|
2621
|
+
} = await import('./applyStreamingQuery-C4FRLUOC.cjs');
|
|
2622
2622
|
yield* applyStreamingQuery(clientCtx, query, params);
|
|
2623
2623
|
}
|
|
2624
2624
|
};
|
|
@@ -2645,16 +2645,16 @@ function createClientFromContext(clientCtx) {
|
|
|
2645
2645
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2646
2646
|
return {
|
|
2647
2647
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2648
|
-
return await
|
|
2648
|
+
return await chunkFFVLRJCA_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2649
2649
|
}
|
|
2650
2650
|
};
|
|
2651
2651
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2652
2652
|
return {
|
|
2653
2653
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2654
|
-
return await
|
|
2654
|
+
return await chunkFFVLRJCA_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2655
2655
|
},
|
|
2656
2656
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2657
|
-
return await
|
|
2657
|
+
return await chunkFFVLRJCA_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2658
2658
|
}
|
|
2659
2659
|
};
|
|
2660
2660
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
|
|
@@ -2698,7 +2698,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2698
2698
|
[symbolClientContext2]: {
|
|
2699
2699
|
value: clientCtx
|
|
2700
2700
|
},
|
|
2701
|
-
[
|
|
2701
|
+
[chunkFFVLRJCA_cjs.additionalContext]: {
|
|
2702
2702
|
value: clientCtx
|
|
2703
2703
|
},
|
|
2704
2704
|
fetchMetadata: {
|
|
@@ -2707,10 +2707,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2707
2707
|
});
|
|
2708
2708
|
return client;
|
|
2709
2709
|
}
|
|
2710
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2711
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
2712
|
-
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(
|
|
2713
|
-
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(
|
|
2710
|
+
var createClient = createClientInternal.bind(void 0, chunkFFVLRJCA_cjs.createObjectSet, void 0, void 0, void 0, void 0);
|
|
2711
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkFFVLRJCA_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
|
|
2712
|
+
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunkFFVLRJCA_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
|
|
2713
|
+
var createClientWithScenario = (scenarioRid, ...args) => createClientInternal(chunkFFVLRJCA_cjs.createObjectSet, void 0, void 0, scenarioRid, void 0, ...args);
|
|
2714
2714
|
function createWithRid(rids) {
|
|
2715
2715
|
const withRid = {
|
|
2716
2716
|
type: "static",
|
|
@@ -2735,5 +2735,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
2735
2735
|
exports.createClientWithSubscriptionConnection = createClientWithSubscriptionConnection;
|
|
2736
2736
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
2737
2737
|
exports.createOsdkObject = createOsdkObject;
|
|
2738
|
-
//# sourceMappingURL=chunk-
|
|
2739
|
-
//# sourceMappingURL=chunk-
|
|
2738
|
+
//# sourceMappingURL=chunk-ARALL5IL.cjs.map
|
|
2739
|
+
//# sourceMappingURL=chunk-ARALL5IL.cjs.map
|