@osdk/client 2.88.0 → 2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da
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 +15 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/agents/types.js.map +1 -1
- package/build/browser/public/experimental.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{Client-gLz-Sl_L.d.cts → Client-B1mjbpDi.d.cts} +3 -1
- package/build/cjs/{applyStreamingQuery-FLN4FOKJ.cjs → applyStreamingQuery-LGIAVYUD.cjs} +8 -8
- package/build/cjs/{applyStreamingQuery-FLN4FOKJ.cjs.map → applyStreamingQuery-LGIAVYUD.cjs.map} +1 -1
- package/build/cjs/{chunk-EGN6JMSX.cjs → chunk-3KWIQTG4.cjs} +56 -56
- package/build/cjs/chunk-3KWIQTG4.cjs.map +1 -0
- package/build/cjs/{chunk-7GYHHZON.cjs → chunk-6CACQXVM.cjs} +83 -83
- package/build/cjs/{chunk-7GYHHZON.cjs.map → chunk-6CACQXVM.cjs.map} +1 -1
- package/build/cjs/{chunk-QITRJCT5.cjs → chunk-IEXH6GJR.cjs} +14 -14
- package/build/cjs/{chunk-QITRJCT5.cjs.map → chunk-IEXH6GJR.cjs.map} +1 -1
- package/build/cjs/{chunk-I35ZTL3B.cjs → chunk-QVCGW2UZ.cjs} +2 -2
- package/build/cjs/{chunk-I35ZTL3B.cjs.map → chunk-QVCGW2UZ.cjs.map} +1 -1
- package/build/cjs/{chunk-OWEI3LPL.cjs → chunk-REBP6AIV.cjs} +5 -5
- package/build/cjs/{chunk-OWEI3LPL.cjs.map → chunk-REBP6AIV.cjs.map} +1 -1
- package/build/cjs/{chunk-HAMCTAG6.cjs → chunk-SUPANXZZ.cjs} +8 -8
- package/build/cjs/{chunk-HAMCTAG6.cjs.map → chunk-SUPANXZZ.cjs.map} +1 -1
- package/build/cjs/{createClient-DUEqUTyt.d.cts → createClient-B6_iR2nP.d.cts} +1 -1
- package/build/cjs/index.cjs +12 -12
- package/build/cjs/index.d.cts +2 -2
- package/build/cjs/public/experimental.cjs +10 -10
- package/build/cjs/public/experimental.d.cts +4 -4
- package/build/cjs/public/internal.cjs +10 -10
- package/build/cjs/public/internal.d.cts +1 -1
- package/build/cjs/public/observable.cjs +6 -6
- package/build/cjs/public/observable.d.cts +2 -2
- package/build/cjs/public/unstable-do-not-use.cjs +17 -17
- package/build/cjs/public/unstable-do-not-use.d.cts +4 -4
- package/build/cjs/{withScenario-Cty6gZNZ.d.cts → withScenario-DuKtMIXk.d.cts} +1 -1
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/agents/types.js.map +1 -1
- package/build/esm/public/experimental.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/agents/types.d.ts +3 -1
- package/build/types/agents/types.d.ts.map +1 -1
- package/build/types/public/experimental.d.ts +1 -1
- package/build/types/public/experimental.d.ts.map +1 -1
- package/package.json +8 -8
- package/build/cjs/chunk-EGN6JMSX.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @osdk/client
|
|
2
2
|
|
|
3
|
+
## 2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b8cfd7c: Add static typing for agent session state returned by `experimental_getState`.
|
|
8
|
+
- 62ebddd: Add typed event names and payloads to agent sessions.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [b8cfd7c]
|
|
13
|
+
- @osdk/api@2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da
|
|
14
|
+
- @osdk/generator-converters@2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da
|
|
15
|
+
- @osdk/shared.test@2.60.1-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da
|
|
16
|
+
- @osdk/client.unstable@2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da
|
|
17
|
+
|
|
3
18
|
## 2.88.0
|
|
4
19
|
|
|
5
20
|
### 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.89.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 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.
|
|
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.89.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["types.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 type { CompileTimeMetadata } from \"@osdk/api\";\nimport type { AgentDefinition, AgentSession } from \"@osdk/api/unstable\";\n\n/** @beta */\nexport interface AgentSignatureFromDef<D extends AgentDefinition<unknown>> {\n /** @beta */\n experimental_getSession(sessionId: string): Promise<AgentSession>;\n\n /** @beta */\n experimental_createSession: CompileTimeMetadata<D>[\"signatures\"] extends never\n ? AgentSignature\n : CompileTimeMetadata<D>[\"signatures\"] extends {\n experimental_createSession: (\n ...args: never[]\n ) => Promise<AgentSession>;\n }\n ? CompileTimeMetadata<D>[\"signatures\"][\"experimental_createSession\"]\n : AgentSignature;\n}\n\n/** @beta */\nexport type AgentSignature = (\n args?: Record<string, unknown>,\n) => Promise<AgentSession>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["types.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 type { CompileTimeMetadata } from \"@osdk/api\";\nimport type { AgentDefinition, AgentSession } from \"@osdk/api/unstable\";\n\n/** @beta */\nexport interface AgentSignatureFromDef<D extends AgentDefinition<unknown>> {\n /** @beta */\n experimental_getSession: CompileTimeMetadata<D>[\"signatures\"] extends never\n ? (sessionId: string) => Promise<AgentSession>\n : CompileTimeMetadata<D>[\"signatures\"] extends {\n experimental_getSession: (sessionId: string) => Promise<AgentSession>;\n }\n ? CompileTimeMetadata<D>[\"signatures\"][\"experimental_getSession\"]\n : (sessionId: string) => Promise<AgentSession>;\n\n /** @beta */\n experimental_createSession: CompileTimeMetadata<D>[\"signatures\"] extends never\n ? AgentSignature\n : CompileTimeMetadata<D>[\"signatures\"] extends {\n experimental_createSession: (\n ...args: never[]\n ) => Promise<AgentSession>;\n }\n ? CompileTimeMetadata<D>[\"signatures\"][\"experimental_createSession\"]\n : AgentSignature;\n}\n\n/** @beta */\nexport type AgentSignature = (\n args?: Record<string, unknown>,\n) => Promise<AgentSession>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental.js","names":["AgentGetStateTimeoutError","AgentSendEventTimeoutError","createClientWithTransaction","createClientFromWriteableClient","createScenario","withScenario"],"sources":["experimental.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\nexport type {\n AgentDefinition,\n AgentParam,\n AgentContextItem,\n AgentGetStateOptions,\n AgentSessionState,\n AgentSessionStatus,\n AgentSendEventOptions,\n AgentSession,\n} from \"@osdk/api/unstable\";\n\nexport {\n AgentGetStateTimeoutError,\n AgentSendEventTimeoutError,\n} from \"@osdk/api/unstable\";\n\nexport { createClientWithTransaction } from \"../createClient.js\";\nexport { createClientFromWriteableClient } from \"../createClientFromWriteableClient.js\";\n\nexport { createScenario } from \"../scenarios/createScenario.js\";\nexport type { EXPERIMENTAL_ScenarioClient } from \"../scenarios/ScenarioClient.js\";\nexport { withScenario } from \"../scenarios/withScenario.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"file":"experimental.js","names":["AgentGetStateTimeoutError","AgentSendEventTimeoutError","createClientWithTransaction","createClientFromWriteableClient","createScenario","withScenario"],"sources":["experimental.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\nexport type {\n AgentDefinition,\n AgentParam,\n AgentResult,\n AgentContextItem,\n AgentGetStateOptions,\n AgentSessionState,\n AgentSessionStatus,\n AgentSendEventOptions,\n AgentSession,\n} from \"@osdk/api/unstable\";\n\nexport {\n AgentGetStateTimeoutError,\n AgentSendEventTimeoutError,\n} from \"@osdk/api/unstable\";\n\nexport { createClientWithTransaction } from \"../createClient.js\";\nexport { createClientFromWriteableClient } from \"../createClientFromWriteableClient.js\";\n\nexport { createScenario } from \"../scenarios/createScenario.js\";\nexport type { EXPERIMENTAL_ScenarioClient } from \"../scenarios/ScenarioClient.js\";\nexport { withScenario } from \"../scenarios/withScenario.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA,SACEA,yBAAyB,EACzBC,0BAA0B,QACrB,oBAAoB;AAE3B,SAASC,2BAA2B,QAAQ,oBAAoB;AAChE,SAASC,+BAA+B,QAAQ,uCAAuC;AAEvF,SAASC,cAAc,QAAQ,gCAAgC;AAE/D,SAASC,YAAY,QAAQ,8BAA8B","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.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da"}`;
|
|
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":[]}
|
|
@@ -37,7 +37,9 @@ type BatchActionSignature<X extends Record<any, ActionMetadata.Parameter<any>>>
|
|
|
37
37
|
/** @beta */
|
|
38
38
|
interface AgentSignatureFromDef<D extends AgentDefinition<unknown>> {
|
|
39
39
|
/** @beta */
|
|
40
|
-
experimental_getSession(sessionId: string)
|
|
40
|
+
experimental_getSession: CompileTimeMetadata<D>["signatures"] extends never ? (sessionId: string) => Promise<AgentSession> : CompileTimeMetadata<D>["signatures"] extends {
|
|
41
|
+
experimental_getSession: (sessionId: string) => Promise<AgentSession>;
|
|
42
|
+
} ? CompileTimeMetadata<D>["signatures"]["experimental_getSession"] : (sessionId: string) => Promise<AgentSession>;
|
|
41
43
|
/** @beta */
|
|
42
44
|
experimental_createSession: CompileTimeMetadata<D>["signatures"] extends never ? AgentSignature : CompileTimeMetadata<D>["signatures"] extends {
|
|
43
45
|
experimental_createSession: (...args: never[]) => Promise<AgentSession>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkIEXH6GJR_cjs = require('./chunk-IEXH6GJR.cjs');
|
|
4
|
+
var chunkQVCGW2UZ_cjs = require('./chunk-QVCGW2UZ.cjs');
|
|
5
5
|
var chunkB4UCZI2Z_cjs = require('./chunk-B4UCZI2Z.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(
|
|
20
|
+
const response = await streamingExecute(chunkQVCGW2UZ_cjs.addUserAgentHeader(client, query), query.apiName, {
|
|
21
21
|
ontology: await client.ontologyRid,
|
|
22
|
-
parameters: params ? await
|
|
22
|
+
parameters: params ? await chunkIEXH6GJR_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
|
|
29
|
+
const definitions = await chunkIEXH6GJR_cjs.getRequiredDefinitions(qd.output, client);
|
|
30
30
|
for await (const event of response) {
|
|
31
31
|
if (event.type !== "data") continue;
|
|
32
|
-
const remapped = await
|
|
32
|
+
const remapped = await chunkIEXH6GJR_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-
|
|
45
|
-
//# sourceMappingURL=applyStreamingQuery-
|
|
44
|
+
//# sourceMappingURL=applyStreamingQuery-LGIAVYUD.cjs.map
|
|
45
|
+
//# sourceMappingURL=applyStreamingQuery-LGIAVYUD.cjs.map
|
package/build/cjs/{applyStreamingQuery-FLN4FOKJ.cjs.map → applyStreamingQuery-LGIAVYUD.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.functions@2.87.0/node_modules/@osdk/foundry.functions/build/esm/v2/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-FLN4FOKJ.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 * Supports maps represented as arrays of key/value entries, including nested maps.\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.87.0/node_modules/@osdk/foundry.functions/build/esm/v2/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-LGIAVYUD.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 * Supports maps represented as arrays of key/value entries, including nested maps.\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,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkREBP6AIV_cjs = require('./chunk-REBP6AIV.cjs');
|
|
4
4
|
var chunk6OIQ3CCD_cjs = require('./chunk-6OIQ3CCD.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkIEXH6GJR_cjs = require('./chunk-IEXH6GJR.cjs');
|
|
6
|
+
var chunkQVCGW2UZ_cjs = require('./chunk-QVCGW2UZ.cjs');
|
|
7
7
|
var chunkB4UCZI2Z_cjs = require('./chunk-B4UCZI2Z.cjs');
|
|
8
8
|
var chunkIWUIN6JJ_cjs = require('./chunk-IWUIN6JJ.cjs');
|
|
9
9
|
var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
|
|
@@ -166,7 +166,7 @@ function isScenarioClient(value) {
|
|
|
166
166
|
return value != null && (typeof value === "object" || typeof value === "function") && typeof value.getScenarioReference === "function";
|
|
167
167
|
}
|
|
168
168
|
function buildScenarioClient(parent, scenarioRid) {
|
|
169
|
-
const ctx = parent[
|
|
169
|
+
const ctx = parent[chunkQVCGW2UZ_cjs.additionalContext];
|
|
170
170
|
if (ctx.transactionId != null) {
|
|
171
171
|
console.warn("withScenario / createScenario: the supplied client has an active transaction. Ignoring the transaction and scoping to the scenario instead.");
|
|
172
172
|
}
|
|
@@ -180,7 +180,7 @@ function buildScenarioClient(parent, scenarioRid) {
|
|
|
180
180
|
scenarioRid,
|
|
181
181
|
clientCacheKey: {}
|
|
182
182
|
});
|
|
183
|
-
const innerCtx = inner[
|
|
183
|
+
const innerCtx = inner[chunkQVCGW2UZ_cjs.additionalContext];
|
|
184
184
|
async function rebase() {
|
|
185
185
|
const ontologyRid = await innerCtx.ontologyRid;
|
|
186
186
|
await OntologyScenario_exports.rebaseScenario(innerCtx, ontologyRid, scenarioRid, {
|
|
@@ -369,7 +369,7 @@ async function toDataValue(value, client, parameterType) {
|
|
|
369
369
|
}
|
|
370
370
|
if (Array.isArray(value) || value instanceof Set) {
|
|
371
371
|
const values = Array.from(value);
|
|
372
|
-
if (values.some((dataValue) =>
|
|
372
|
+
if (values.some((dataValue) => chunkIEXH6GJR_cjs.isAttachmentUpload(dataValue) || chunkIEXH6GJR_cjs.isAttachmentFile(dataValue))) {
|
|
373
373
|
const converted = [];
|
|
374
374
|
for (const value2 of values) {
|
|
375
375
|
converted.push(await toDataValue(value2, client, parameterType));
|
|
@@ -379,43 +379,43 @@ async function toDataValue(value, client, parameterType) {
|
|
|
379
379
|
const promiseArray = Array.from(value, async (innerValue) => await toDataValue(innerValue, client, parameterType));
|
|
380
380
|
return Promise.all(promiseArray);
|
|
381
381
|
}
|
|
382
|
-
if (
|
|
383
|
-
const attachment = await
|
|
382
|
+
if (chunkIEXH6GJR_cjs.isAttachmentUpload(value)) {
|
|
383
|
+
const attachment = await chunkQVCGW2UZ_cjs.upload(client, value.data, {
|
|
384
384
|
filename: value.name
|
|
385
385
|
});
|
|
386
386
|
return await toDataValue(attachment.rid, client, parameterType);
|
|
387
387
|
}
|
|
388
|
-
if (
|
|
389
|
-
const attachment = await
|
|
388
|
+
if (chunkIEXH6GJR_cjs.isAttachmentFile(value)) {
|
|
389
|
+
const attachment = await chunkQVCGW2UZ_cjs.upload(client, value, {
|
|
390
390
|
filename: value.name
|
|
391
391
|
});
|
|
392
392
|
return await toDataValue(attachment.rid, client, parameterType);
|
|
393
393
|
}
|
|
394
|
-
if (
|
|
394
|
+
if (chunkIEXH6GJR_cjs.isMediaUpload(value)) {
|
|
395
395
|
const mediaRef = await chunkB4UCZI2Z_cjs.MediaSet_exports.uploadMedia(client, value.data, {
|
|
396
396
|
filename: value.fileName
|
|
397
397
|
});
|
|
398
398
|
return await toDataValue(mediaRef, client, parameterType);
|
|
399
399
|
}
|
|
400
|
-
if (
|
|
400
|
+
if (chunkIEXH6GJR_cjs.isMedia(value)) {
|
|
401
401
|
return value.getMediaReference();
|
|
402
402
|
}
|
|
403
|
-
if (
|
|
403
|
+
if (chunkIEXH6GJR_cjs.isMediaReference(value)) {
|
|
404
404
|
return value;
|
|
405
405
|
}
|
|
406
406
|
if (isOntologyObjectV2(value)) {
|
|
407
407
|
return await toDataValue(value.__primaryKey, client, parameterType);
|
|
408
408
|
}
|
|
409
|
-
if (
|
|
409
|
+
if (chunkIEXH6GJR_cjs.isObjectSpecifiersObject(value)) {
|
|
410
410
|
return await toDataValue(value.$primaryKey, client, parameterType);
|
|
411
411
|
}
|
|
412
|
-
if (
|
|
413
|
-
return
|
|
412
|
+
if (chunkQVCGW2UZ_cjs.isWireObjectSet(value)) {
|
|
413
|
+
return chunkQVCGW2UZ_cjs.normalizeInterfaceLinkSearchArounds(client, value);
|
|
414
414
|
}
|
|
415
|
-
if (
|
|
416
|
-
return
|
|
415
|
+
if (chunkQVCGW2UZ_cjs.isObjectSet(value)) {
|
|
416
|
+
return chunkQVCGW2UZ_cjs.normalizeInterfaceLinkSearchArounds(client, chunkQVCGW2UZ_cjs.getWireObjectSet(value));
|
|
417
417
|
}
|
|
418
|
-
if (
|
|
418
|
+
if (chunkIEXH6GJR_cjs.isInterfaceActionParam(value)) {
|
|
419
419
|
return {
|
|
420
420
|
objectTypeApiName: value.$objectType,
|
|
421
421
|
primaryKeyValue: value.$primaryKey
|
|
@@ -459,7 +459,7 @@ function isTimeSeriesReference(value) {
|
|
|
459
459
|
|
|
460
460
|
// src/actions/applyAction.ts
|
|
461
461
|
async function applyAction(client, action, parameters, options = {}) {
|
|
462
|
-
const clientWithHeaders =
|
|
462
|
+
const clientWithHeaders = chunkQVCGW2UZ_cjs.addUserAgentHeader(client, action);
|
|
463
463
|
if (Array.isArray(parameters)) {
|
|
464
464
|
!(client.transactionId == null) ? process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Batch actions are not supported for staged edit functions or when supplying a transaction ID") : invariant4__default.default(false) : void 0;
|
|
465
465
|
const response = await applyBatch(clientWithHeaders, await client.ontologyRid, action.unsanitizedApiName ?? action.apiName, {
|
|
@@ -710,13 +710,13 @@ async function toDataValueAgents(value, client, desiredType, path = "") {
|
|
|
710
710
|
case "nullable":
|
|
711
711
|
return await toDataValueAgents(value, client, desiredType.wrappedType, path);
|
|
712
712
|
case "object": {
|
|
713
|
-
const primaryKey =
|
|
713
|
+
const primaryKey = chunkIEXH6GJR_cjs.isObjectSpecifiersObject(value) ? value.$primaryKey : value;
|
|
714
714
|
if (typeof primaryKey !== "string" && typeof primaryKey !== "number") {
|
|
715
715
|
throw new TypeError(`Invalid agent argument "${path}": expected an OSDK object, object identifier, or string or number primary key.`);
|
|
716
716
|
}
|
|
717
717
|
try {
|
|
718
718
|
await checkOntology(client, desiredType.ontologyApiName, path, "argument");
|
|
719
|
-
const objectTypeApiName =
|
|
719
|
+
const objectTypeApiName = chunkIEXH6GJR_cjs.isObjectSpecifiersObject(value) ? value.$apiName : desiredType.objectTypeApiName;
|
|
720
720
|
const objectTypeDefinition = await client.ontologyProvider.getObjectDefinition(objectTypeApiName);
|
|
721
721
|
return {
|
|
722
722
|
ontologyRid: await client.ontologyRid,
|
|
@@ -733,12 +733,12 @@ async function toDataValueAgents(value, client, desiredType, path = "") {
|
|
|
733
733
|
if (typeof value === "string") {
|
|
734
734
|
return value;
|
|
735
735
|
}
|
|
736
|
-
if (!
|
|
736
|
+
if (!chunkQVCGW2UZ_cjs.isWireObjectSet(value) && !chunkQVCGW2UZ_cjs.isObjectSet(value)) {
|
|
737
737
|
throw new TypeError(`Invalid agent argument "${path}": expected an OSDK ObjectSet, object set definition, or object set RID string.`);
|
|
738
738
|
}
|
|
739
739
|
try {
|
|
740
740
|
await checkOntology(client, desiredType.ontologyApiName, path, "argument");
|
|
741
|
-
return await
|
|
741
|
+
return await chunkREBP6AIV_cjs.createTemporaryObjectSet(client, value);
|
|
742
742
|
} catch (cause) {
|
|
743
743
|
throw wrapConversionError(`Failed to convert agent argument "${path}" to an object set RID`, cause);
|
|
744
744
|
}
|
|
@@ -788,7 +788,7 @@ async function fromDataValueAgents(value, client, desiredType, path = "") {
|
|
|
788
788
|
if (typeof primaryKey !== "string" && typeof primaryKey !== "number") {
|
|
789
789
|
throw new TypeError("Expected a string or number primary key");
|
|
790
790
|
}
|
|
791
|
-
return
|
|
791
|
+
return chunkIEXH6GJR_cjs.createQueryObjectResponse(primaryKey, {
|
|
792
792
|
type: "object",
|
|
793
793
|
apiName: desiredType.objectTypeApiName
|
|
794
794
|
});
|
|
@@ -802,7 +802,7 @@ async function fromDataValueAgents(value, client, desiredType, path = "") {
|
|
|
802
802
|
}
|
|
803
803
|
try {
|
|
804
804
|
await checkOntology(client, desiredType.ontologyApiName, path, "value");
|
|
805
|
-
return
|
|
805
|
+
return chunkQVCGW2UZ_cjs.createObjectSet({
|
|
806
806
|
type: "object",
|
|
807
807
|
apiName: desiredType.objectTypeApiName
|
|
808
808
|
}, client, {
|
|
@@ -969,7 +969,7 @@ function validateAgentSessionClient(client) {
|
|
|
969
969
|
// src/agents/createAgentSession.ts
|
|
970
970
|
async function createAgentSession(client, agent, args) {
|
|
971
971
|
validateAgentSessionClient(client);
|
|
972
|
-
const clientWithHeaders =
|
|
972
|
+
const clientWithHeaders = chunkQVCGW2UZ_cjs.addUserAgentHeader(client, agent);
|
|
973
973
|
const ontologyRid = await client.ontologyRid;
|
|
974
974
|
const agentDefinition = await client.ontologyProvider.getAgentDefinition(agent.apiName, agent.version);
|
|
975
975
|
const convertedArguments = await toDataValueAgents(args ?? {}, client, {
|
|
@@ -993,7 +993,7 @@ async function createAgentSession(client, agent, args) {
|
|
|
993
993
|
// src/agents/getAgentSession.ts
|
|
994
994
|
async function getAgentSession(client, agent, sessionId) {
|
|
995
995
|
validateAgentSessionClient(client);
|
|
996
|
-
const clientWithHeaders =
|
|
996
|
+
const clientWithHeaders = chunkQVCGW2UZ_cjs.addUserAgentHeader(client, agent);
|
|
997
997
|
const ontologyRid = await client.ontologyRid;
|
|
998
998
|
const response = await get5(clientWithHeaders, sessionId, {
|
|
999
999
|
preview: true
|
|
@@ -1236,7 +1236,7 @@ var MediaReferencePropertyImpl = class {
|
|
|
1236
1236
|
ReadToken: token
|
|
1237
1237
|
} : void 0);
|
|
1238
1238
|
return {
|
|
1239
|
-
itemMetadata:
|
|
1239
|
+
itemMetadata: chunkQVCGW2UZ_cjs.validateMediaItemMetadata(raw)
|
|
1240
1240
|
};
|
|
1241
1241
|
}
|
|
1242
1242
|
getMediaReference() {
|
|
@@ -1664,8 +1664,8 @@ function get$link(holder) {
|
|
|
1664
1664
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
1665
1665
|
}).pivotTo(linkName);
|
|
1666
1666
|
const value = !linkDef.multiplicity ? {
|
|
1667
|
-
fetchOne: (options) =>
|
|
1668
|
-
fetchOneWithErrors: (options) =>
|
|
1667
|
+
fetchOne: (options) => chunkQVCGW2UZ_cjs.fetchSingle(client, objDef, options ?? {}, chunkQVCGW2UZ_cjs.getWireObjectSet(objectSet)),
|
|
1668
|
+
fetchOneWithErrors: (options) => chunkQVCGW2UZ_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkQVCGW2UZ_cjs.getWireObjectSet(objectSet))
|
|
1669
1669
|
} : objectSet;
|
|
1670
1670
|
return [linkName, value];
|
|
1671
1671
|
})));
|
|
@@ -1688,8 +1688,8 @@ function get$linkForInterface(holder) {
|
|
|
1688
1688
|
apiName: linkDef.targetTypeApiName
|
|
1689
1689
|
};
|
|
1690
1690
|
const value = !linkDef.multiplicity ? {
|
|
1691
|
-
fetchOne: (options) =>
|
|
1692
|
-
fetchOneWithErrors: (options) =>
|
|
1691
|
+
fetchOne: (options) => chunkQVCGW2UZ_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkQVCGW2UZ_cjs.getWireObjectSet(objectSet)),
|
|
1692
|
+
fetchOneWithErrors: (options) => chunkQVCGW2UZ_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkQVCGW2UZ_cjs.getWireObjectSet(objectSet))
|
|
1693
1693
|
} : objectSet;
|
|
1694
1694
|
return [linkName, value];
|
|
1695
1695
|
})));
|
|
@@ -1734,7 +1734,7 @@ function isStruct(value) {
|
|
|
1734
1734
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
1735
1735
|
}
|
|
1736
1736
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
1737
|
-
const [objApiNamespace] =
|
|
1737
|
+
const [objApiNamespace] = chunkQVCGW2UZ_cjs.extractNamespace(interfaceDef.apiName);
|
|
1738
1738
|
const objDef = underlying[ObjectDefRef];
|
|
1739
1739
|
const underlyingProperties = underlying;
|
|
1740
1740
|
return Object.freeze(Object.defineProperties({}, {
|
|
@@ -1798,7 +1798,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
1798
1798
|
value: interfaceDef
|
|
1799
1799
|
},
|
|
1800
1800
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1801
|
-
const [apiNamespace, apiName] =
|
|
1801
|
+
const [apiNamespace, apiName] = chunkQVCGW2UZ_cjs.extractNamespace(p);
|
|
1802
1802
|
const exposedName = apiNamespace === objApiNamespace ? apiName : p;
|
|
1803
1803
|
const impl = objDef.interfaceImplementations?.[interfaceDef.apiName]?.[p];
|
|
1804
1804
|
if (impl != null) {
|
|
@@ -1847,7 +1847,7 @@ function remapPropertySecuritiesForInterface(underlyingSecurities, objDef, inter
|
|
|
1847
1847
|
}
|
|
1848
1848
|
const interfacePropName = inverseMap[objPropName];
|
|
1849
1849
|
if (interfacePropName == null) continue;
|
|
1850
|
-
const [apiNamespace, apiName] =
|
|
1850
|
+
const [apiNamespace, apiName] = chunkQVCGW2UZ_cjs.extractNamespace(interfacePropName);
|
|
1851
1851
|
const key = apiNamespace === objApiNamespace ? apiName : interfacePropName;
|
|
1852
1852
|
remapped[key] = underlyingSecurities[objPropName];
|
|
1853
1853
|
}
|
|
@@ -1940,7 +1940,7 @@ var basePropDefs = {
|
|
|
1940
1940
|
$objectSpecifier: {
|
|
1941
1941
|
get() {
|
|
1942
1942
|
const rawObj = this[UnderlyingOsdkObject];
|
|
1943
|
-
return
|
|
1943
|
+
return chunkIEXH6GJR_cjs.createObjectSpecifierFromPrimaryKey(this[ObjectDefRef], rawObj.$primaryKey);
|
|
1944
1944
|
},
|
|
1945
1945
|
enumerable: true
|
|
1946
1946
|
},
|
|
@@ -2012,9 +2012,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
2012
2012
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
2013
2013
|
case "attachment":
|
|
2014
2014
|
if (Array.isArray(rawValue)) {
|
|
2015
|
-
return rawValue.map((a) =>
|
|
2015
|
+
return rawValue.map((a) => chunkQVCGW2UZ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
2016
2016
|
} else {
|
|
2017
|
-
return
|
|
2017
|
+
return chunkQVCGW2UZ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
2018
2018
|
}
|
|
2019
2019
|
default:
|
|
2020
2020
|
process.env.NODE_ENV !== "production" ? invariant4__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant4__default.default(false) ;
|
|
@@ -2030,9 +2030,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
2030
2030
|
}
|
|
2031
2031
|
if (propDef.type === "attachment") {
|
|
2032
2032
|
if (Array.isArray(rawValue)) {
|
|
2033
|
-
return rawValue.map((a) =>
|
|
2033
|
+
return rawValue.map((a) => chunkQVCGW2UZ_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
2034
2034
|
}
|
|
2035
|
-
return
|
|
2035
|
+
return chunkQVCGW2UZ_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
2036
2036
|
}
|
|
2037
2037
|
if (propDef.type === "cipherText") {
|
|
2038
2038
|
return new CipherTextPropertyImpl({
|
|
@@ -2346,11 +2346,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
2346
2346
|
};
|
|
2347
2347
|
|
|
2348
2348
|
// src/util/UserAgent.ts
|
|
2349
|
-
var USER_AGENT = `osdk-client/${"2.
|
|
2350
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.
|
|
2349
|
+
var USER_AGENT = `osdk-client/${"2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da"}`;
|
|
2350
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da"}`;
|
|
2351
2351
|
|
|
2352
2352
|
// src/createMinimalClient.ts
|
|
2353
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
2353
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkQVCGW2UZ_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
2354
2354
|
if (process.env.NODE_ENV !== "production") {
|
|
2355
2355
|
try {
|
|
2356
2356
|
new URL(baseUrl);
|
|
@@ -3039,7 +3039,7 @@ var ActionInvoker = class {
|
|
|
3039
3039
|
};
|
|
3040
3040
|
var QueryInvoker = class {
|
|
3041
3041
|
constructor(clientCtx, queryDef) {
|
|
3042
|
-
this.executeFunction =
|
|
3042
|
+
this.executeFunction = chunkIEXH6GJR_cjs.applyQuery.bind(void 0, clientCtx, queryDef);
|
|
3043
3043
|
}
|
|
3044
3044
|
};
|
|
3045
3045
|
var AgentClient = class {
|
|
@@ -3064,7 +3064,7 @@ function createClientInternal(objectSetFactory, transactionRid, flushEdits, scen
|
|
|
3064
3064
|
ontologyRid
|
|
3065
3065
|
}, baseUrl, tokenProvider, {
|
|
3066
3066
|
...options,
|
|
3067
|
-
logger: options?.logger ?? new
|
|
3067
|
+
logger: options?.logger ?? new chunkREBP6AIV_cjs.MinimalLogger(),
|
|
3068
3068
|
transactionId: transactionRid,
|
|
3069
3069
|
flushEdits,
|
|
3070
3070
|
scenarioRid,
|
|
@@ -3090,7 +3090,7 @@ function createClientFromContext(clientCtx) {
|
|
|
3090
3090
|
async *executeStreamingFunction(query, params) {
|
|
3091
3091
|
const {
|
|
3092
3092
|
applyStreamingQuery
|
|
3093
|
-
} = await import('./applyStreamingQuery-
|
|
3093
|
+
} = await import('./applyStreamingQuery-LGIAVYUD.cjs');
|
|
3094
3094
|
yield* applyStreamingQuery(clientCtx, query, params);
|
|
3095
3095
|
}
|
|
3096
3096
|
};
|
|
@@ -3117,16 +3117,16 @@ function createClientFromContext(clientCtx) {
|
|
|
3117
3117
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
3118
3118
|
return {
|
|
3119
3119
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
3120
|
-
return await
|
|
3120
|
+
return await chunkQVCGW2UZ_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
3121
3121
|
}
|
|
3122
3122
|
};
|
|
3123
3123
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
3124
3124
|
return {
|
|
3125
3125
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
3126
|
-
return await
|
|
3126
|
+
return await chunkQVCGW2UZ_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
3127
3127
|
},
|
|
3128
3128
|
fetchPageByRidNoType: async (rids, options) => {
|
|
3129
|
-
return await
|
|
3129
|
+
return await chunkQVCGW2UZ_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
3130
3130
|
}
|
|
3131
3131
|
};
|
|
3132
3132
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__subscribeToNoTypeObjectSet.name:
|
|
@@ -3170,7 +3170,7 @@ function createClientFromContext(clientCtx) {
|
|
|
3170
3170
|
[symbolClientContext2]: {
|
|
3171
3171
|
value: clientCtx
|
|
3172
3172
|
},
|
|
3173
|
-
[
|
|
3173
|
+
[chunkQVCGW2UZ_cjs.additionalContext]: {
|
|
3174
3174
|
value: clientCtx
|
|
3175
3175
|
},
|
|
3176
3176
|
fetchMetadata: {
|
|
@@ -3179,9 +3179,9 @@ function createClientFromContext(clientCtx) {
|
|
|
3179
3179
|
});
|
|
3180
3180
|
return client;
|
|
3181
3181
|
}
|
|
3182
|
-
var createClient = createClientInternal.bind(void 0,
|
|
3183
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
3184
|
-
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(
|
|
3182
|
+
var createClient = createClientInternal.bind(void 0, chunkQVCGW2UZ_cjs.createObjectSet, void 0, void 0, void 0, void 0);
|
|
3183
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkQVCGW2UZ_cjs.createObjectSet, transactionRid, flushEdits, void 0, void 0, ...args);
|
|
3184
|
+
var createClientWithSubscriptionConnection = (createSubscriptionConnection, ...args) => createClientInternal(chunkQVCGW2UZ_cjs.createObjectSet, void 0, void 0, void 0, createSubscriptionConnection, ...args);
|
|
3185
3185
|
function createWithRid(rids) {
|
|
3186
3186
|
const withRid = {
|
|
3187
3187
|
type: "static",
|
|
@@ -3206,5 +3206,5 @@ exports.createClientFromContext = createClientFromContext;
|
|
|
3206
3206
|
exports.createClientWithSubscriptionConnection = createClientWithSubscriptionConnection;
|
|
3207
3207
|
exports.createClientWithTransaction = createClientWithTransaction;
|
|
3208
3208
|
exports.createOsdkObject = createOsdkObject;
|
|
3209
|
-
//# sourceMappingURL=chunk-
|
|
3210
|
-
//# sourceMappingURL=chunk-
|
|
3209
|
+
//# sourceMappingURL=chunk-3KWIQTG4.cjs.map
|
|
3210
|
+
//# sourceMappingURL=chunk-3KWIQTG4.cjs.map
|