@osdk/client 2.52.0 → 2.53.0-main-c14abb8c42dc5f289bec2162062c415dd1037bf8
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 +11 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/queries/applyStreamingQuery.js +3 -41
- package/build/browser/queries/applyStreamingQuery.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/browser/util/streamutils.js +0 -22
- package/build/browser/util/streamutils.js.map +1 -1
- package/build/cjs/MediaReferenceProperty-XVLCRD4T.cjs +22 -0
- package/build/cjs/{MediaReferenceProperty-QB5RSPON.cjs.map → MediaReferenceProperty-XVLCRD4T.cjs.map} +1 -1
- package/build/cjs/applyStreamingQuery-GMHLFTJL.cjs +12 -0
- package/build/cjs/applyStreamingQuery-GMHLFTJL.cjs.map +1 -0
- package/build/cjs/{chunk-FMLMNWRU.cjs → chunk-2NM5TPDK.cjs} +8 -8
- package/build/cjs/{chunk-FMLMNWRU.cjs.map → chunk-2NM5TPDK.cjs.map} +1 -1
- package/build/cjs/{chunk-PIWGMK3H.cjs → chunk-7R2DRDPC.cjs} +3 -3
- package/build/cjs/{chunk-PIWGMK3H.cjs.map → chunk-7R2DRDPC.cjs.map} +1 -1
- package/build/cjs/{chunk-ROJIXXGF.cjs → chunk-BHRMH4Q2.cjs} +3 -3
- package/build/cjs/{chunk-ROJIXXGF.cjs.map → chunk-BHRMH4Q2.cjs.map} +1 -1
- package/build/cjs/{chunk-F7SYRCG4.cjs → chunk-E5UOKLCW.cjs} +97 -29
- package/build/cjs/chunk-E5UOKLCW.cjs.map +1 -0
- package/build/cjs/{chunk-AA2XCKNU.cjs → chunk-H57NLONM.cjs} +80 -81
- package/build/cjs/chunk-H57NLONM.cjs.map +1 -0
- package/build/cjs/{chunk-NSFHMV6E.cjs → chunk-M6QGS7EM.cjs} +591 -67
- package/build/cjs/chunk-M6QGS7EM.cjs.map +1 -0
- package/build/cjs/index.cjs +14 -16
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/public/experimental.cjs +10 -12
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/cjs/public/internal.cjs +10 -11
- package/build/cjs/public/internal.cjs.map +1 -1
- package/build/cjs/public/observable.cjs +6 -8
- package/build/cjs/public/unstable-do-not-use.cjs +17 -19
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/{transformAndWaitInternal-PTYSXCC2.cjs → transformAndWaitInternal-F5NQMFU3.cjs} +6 -6
- package/build/cjs/{transformAndWaitInternal-PTYSXCC2.cjs.map → transformAndWaitInternal-F5NQMFU3.cjs.map} +1 -1
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/queries/applyStreamingQuery.js +3 -41
- package/build/esm/queries/applyStreamingQuery.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/esm/util/streamutils.js +0 -22
- package/build/esm/util/streamutils.js.map +1 -1
- package/build/types/Client.d.ts +1 -1
- package/build/types/queries/applyStreamingQuery.d.ts +1 -1
- package/build/types/queries/applyStreamingQuery.d.ts.map +1 -1
- package/build/types/util/streamutils.d.ts +0 -1
- package/build/types/util/streamutils.d.ts.map +1 -1
- package/package.json +12 -12
- package/build/cjs/MediaReferenceProperty-QB5RSPON.cjs +0 -22
- package/build/cjs/applyStreamingQuery-GZYWMCWV.cjs +0 -56
- package/build/cjs/applyStreamingQuery-GZYWMCWV.cjs.map +0 -1
- package/build/cjs/chunk-AA2XCKNU.cjs.map +0 -1
- package/build/cjs/chunk-ECYOCUVS.cjs +0 -566
- package/build/cjs/chunk-ECYOCUVS.cjs.map +0 -1
- package/build/cjs/chunk-F7SYRCG4.cjs.map +0 -1
- package/build/cjs/chunk-IBY4PG26.cjs +0 -73
- package/build/cjs/chunk-IBY4PG26.cjs.map +0 -1
- package/build/cjs/chunk-NSFHMV6E.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @osdk/client
|
|
2
2
|
|
|
3
|
+
## 2.53.0-main-c14abb8c42dc5f289bec2162062c415dd1037bf8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c14abb8: Streaming query execution is not currently supported in the TypeScript OSDK, so the experimental `executeStreamingFunction` helper now throws. Bump the `@osdk/foundry.*` and `@osdk/internal.foundry.*` catalog entries to `2.70.0`. The ontology-as-code full-metadata converters now populate the object type `aliases` and `datasources` fields.
|
|
8
|
+
- Updated dependencies [c14abb8]
|
|
9
|
+
- @osdk/generator-converters@2.53.0-main-c14abb8c42dc5f289bec2162062c415dd1037bf8
|
|
10
|
+
- @osdk/api@2.53.0-main-c14abb8c42dc5f289bec2162062c415dd1037bf8
|
|
11
|
+
- @osdk/client.unstable@2.53.0-main-c14abb8c42dc5f289bec2162062c415dd1037bf8
|
|
12
|
+
- @osdk/shared.test@2.35.1-main-c14abb8c42dc5f289bec2162062c415dd1037bf8
|
|
13
|
+
|
|
3
14
|
## 2.52.0
|
|
4
15
|
|
|
5
16
|
### 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.53.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 ref = await client(__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference)\n * .createMediaReference({ data: blob, fileName: \"media.mp4\", objectType: Employee, propertyType: \"photo\" });\n * ```\n * @returns the experiment-specific function surface.\n */\n <\n Q extends\n | Experiment<\"2.0.8\">\n | Experiment<\"2.1.0\">\n | Experiment<\"2.2.0\">\n | Experiment<\"2.8.0\">\n | Experiment<\"2.19.0\">,\n >(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n /**\n * Fetches runtime metadata for the given ontology definition. The returned shape\n * is dispatched on the kind of definition passed: {@link ObjectMetadata},\n * {@link InterfaceMetadata}, {@link ActionMetadata}, or {@link QueryMetadata}.\n * @param o - The object type, interface, action, or query definition to look up.\n * @example\n * ```ts\n * const meta = await client.fetchMetadata(Employee);\n * console.log(meta.displayName, meta.description);\n * ```\n * @returns a promise resolving to the metadata for the given definition.\n */\n fetchMetadata<\n Q extends\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>,\n >(\n o: Q,\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 ref = await client(__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference)\n * .createMediaReference({ data: blob, fileName: \"media.mp4\", objectType: Employee, propertyType: \"photo\" });\n * ```\n * @returns the experiment-specific function surface.\n */\n <\n Q extends\n | Experiment<\"2.0.8\">\n | Experiment<\"2.1.0\">\n | Experiment<\"2.2.0\">\n | Experiment<\"2.8.0\">\n | Experiment<\"2.19.0\">,\n >(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n /**\n * Fetches runtime metadata for the given ontology definition. The returned shape\n * is dispatched on the kind of definition passed: {@link ObjectMetadata},\n * {@link InterfaceMetadata}, {@link ActionMetadata}, or {@link QueryMetadata}.\n * @param o - The object type, interface, action, or query definition to look up.\n * @example\n * ```ts\n * const meta = await client.fetchMetadata(Employee);\n * console.log(meta.displayName, meta.description);\n * ```\n * @returns a promise resolving to the metadata for the given definition.\n */\n fetchMetadata<\n Q extends\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>,\n >(\n o: Q,\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.53.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;;AAiIA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
|
|
@@ -14,46 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import { iterateReadableStream, parseNdjsonStream } from "../util/streamutils.js";
|
|
21
|
-
import { getRequiredDefinitions, remapQueryParams, remapQueryResponse } from "./applyQuery.js";
|
|
22
|
-
export async function* applyStreamingQuery(client, query, params) {
|
|
23
|
-
const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);
|
|
24
|
-
if (client.flushEdits != null) {
|
|
25
|
-
await client.flushEdits();
|
|
26
|
-
}
|
|
27
|
-
const response = await Functions.streamingExecute(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, () => ({
|
|
28
|
-
finalMethodCall: "applyStreamingQuery"
|
|
29
|
-
})), query), query.apiName, {
|
|
30
|
-
ontology: await client.ontologyRid,
|
|
31
|
-
parameters: params ? await remapQueryParams(params, client, qd.parameters) : {},
|
|
32
|
-
version: query.isFixedVersion ? query.version : undefined,
|
|
33
|
-
branch: client.branch
|
|
34
|
-
}, {
|
|
35
|
-
transactionId: client.transactionId,
|
|
36
|
-
preview: true
|
|
37
|
-
});
|
|
38
|
-
if (response.body == null) {
|
|
39
|
-
throw new Error("streamingExecute returned no response body");
|
|
40
|
-
}
|
|
41
|
-
const definitions = await getRequiredDefinitions(qd.output, client);
|
|
42
|
-
const reader = response.body.getReader();
|
|
43
|
-
for await (const line of parseNdjsonStream(iterateReadableStream(reader))) {
|
|
44
|
-
if (line.type === "error") {
|
|
45
|
-
const err = new Error(`${line.errorName} (${line.errorCode}) [${line.errorInstanceId}]: ${line.errorDescription ?? ""}`);
|
|
46
|
-
Object.assign(err, line);
|
|
47
|
-
throw err;
|
|
48
|
-
}
|
|
49
|
-
const remapped = await remapQueryResponse(client, qd.output, line.value, definitions);
|
|
50
|
-
if (qd.output.type === "array" && Array.isArray(remapped)) {
|
|
51
|
-
for (const item of remapped) {
|
|
52
|
-
yield item;
|
|
53
|
-
}
|
|
54
|
-
} else {
|
|
55
|
-
yield remapped;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
17
|
+
// Streaming query execution is not currently supported in the TypeScript OSDK
|
|
18
|
+
export function applyStreamingQuery() {
|
|
19
|
+
throw new Error("Streaming query execution is not currently supported in the TypeScript OSDK.");
|
|
58
20
|
}
|
|
59
21
|
//# sourceMappingURL=applyStreamingQuery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyStreamingQuery.js","names":["
|
|
1
|
+
{"version":3,"file":"applyStreamingQuery.js","names":["applyStreamingQuery","Error"],"sources":["applyStreamingQuery.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { CompileTimeMetadata, QueryDefinition } from \"@osdk/api\";\n\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport type { QueryParameterType, QueryReturnType } from \"./types.js\";\n\n// Streaming query execution is not currently supported in the TypeScript OSDK\nexport function applyStreamingQuery<\n QD extends QueryDefinition<any>,\n P extends QueryParameterType<CompileTimeMetadata<QD>[\"parameters\"]>,\n>(\n _client: MinimalClient,\n _query: QD,\n _params?: P,\n): AsyncGenerator<\n QueryReturnType<CompileTimeMetadata<QD>[\"output\"]>,\n void,\n unknown\n> {\n throw new Error(\n \"Streaming query execution is not currently supported in the TypeScript OSDK.\",\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA,OAAO,SAASA,mBAAmBA,CAAA,EAWjC;EACA,MAAM,IAAIC,KAAK,CACb,8EACF,CAAC;AACH","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.53.0-main-c14abb8c42dc5f289bec2162062c415dd1037bf8"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.53.0-main-c14abb8c42dc5f289bec2162062c415dd1037bf8"}`;
|
|
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":[]}
|
|
@@ -99,26 +99,4 @@ export async function* iterateReadableStream(readableStream) {
|
|
|
99
99
|
res = await readableStream.read();
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
export async function* parseNdjsonStream(asyncIterable) {
|
|
103
|
-
const decoder = new TextDecoder("utf-8");
|
|
104
|
-
let buffer = "";
|
|
105
|
-
for await (const chunk of asyncIterable) {
|
|
106
|
-
buffer += decoder.decode(chunk, {
|
|
107
|
-
stream: true
|
|
108
|
-
});
|
|
109
|
-
let newlineIdx;
|
|
110
|
-
while ((newlineIdx = buffer.indexOf("\n")) !== -1) {
|
|
111
|
-
const line = buffer.slice(0, newlineIdx);
|
|
112
|
-
buffer = buffer.slice(newlineIdx + 1);
|
|
113
|
-
if (line.length > 0) {
|
|
114
|
-
yield JSON.parse(line);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
buffer += decoder.decode();
|
|
119
|
-
const trailing = buffer.trim();
|
|
120
|
-
if (trailing.length > 0) {
|
|
121
|
-
yield JSON.parse(trailing);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
102
|
//# sourceMappingURL=streamutils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streamutils.js","names":["START_TOKEN","Uint8Array","OBJECT_OPEN_CHAR_CODE","OBJECT_CLOSE_CHAR_CODE","parseStreamedResponse","asyncIterable","utf8decoder","TextDecoder","parsedStart","prevChunks","openBracesCount","chunk","i","startsWith","length","j","c","combineAndParse","subarray","push","a","b","prev","curr","str","decode","stream","JSON","parse","iterateReadableStream","readableStream","res","read","done","value"
|
|
1
|
+
{"version":3,"file":"streamutils.js","names":["START_TOKEN","Uint8Array","OBJECT_OPEN_CHAR_CODE","OBJECT_CLOSE_CHAR_CODE","parseStreamedResponse","asyncIterable","utf8decoder","TextDecoder","parsedStart","prevChunks","openBracesCount","chunk","i","startsWith","length","j","c","combineAndParse","subarray","push","a","b","prev","curr","str","decode","stream","JSON","parse","iterateReadableStream","readableStream","res","read","done","value"],"sources":["streamutils.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\nconst START_TOKEN = new Uint8Array([123, 34, 100, 97, 116, 97, 34, 58, 91]); // `{\"data\":[`\nconst OBJECT_OPEN_CHAR_CODE = 123; // '{'\nconst OBJECT_CLOSE_CHAR_CODE = 125; // '}'\n\nexport async function* parseStreamedResponse(\n asyncIterable: AsyncIterable<Uint8Array>,\n): AsyncGenerator<any, void, unknown> {\n const utf8decoder = new TextDecoder(\"utf-8\");\n\n let parsedStart = false;\n let prevChunks: Uint8Array[] = [];\n let openBracesCount = 0;\n\n for await (const chunk of asyncIterable) {\n // on the first chunk, skip the expected START_TOKEN if we see it\n let i = 0;\n if (!parsedStart) {\n parsedStart = true;\n if (startsWith(chunk, START_TOKEN)) {\n i = START_TOKEN.length;\n }\n }\n\n for (; i < chunk.length; i++) {\n // if we aren't currently parsing an object, skip until we find the next object start\n while (\n openBracesCount === 0 &&\n chunk[i] !== OBJECT_OPEN_CHAR_CODE &&\n i < chunk.length\n ) {\n i++;\n }\n\n // iterate through the chunk looking for the end of the current top level object\n let j = i;\n for (; j < chunk.length; j++) {\n const c = chunk[j];\n if (c === OBJECT_OPEN_CHAR_CODE) {\n openBracesCount++;\n } else if (c === OBJECT_CLOSE_CHAR_CODE) {\n openBracesCount--;\n\n // found a complete top level object, emit it\n if (0 === openBracesCount) {\n yield combineAndParse(\n utf8decoder,\n prevChunks,\n chunk.subarray(i, j + 1),\n );\n\n // if there was a prevChunk, we've consumed it now\n prevChunks = [];\n\n // advance the start index to the final '}' of the current object,\n // which lets us start seeking the beginning of the next object\n i = j;\n break;\n }\n }\n }\n\n // if we reached the end of our chunk before finding the end of the object\n // store off the relevant remainder of our current chunk and go grab the next one\n if (j === chunk.length) {\n prevChunks.push(chunk.subarray(i));\n break;\n }\n }\n }\n}\n\nfunction startsWith(a: Uint8Array, b: Uint8Array) {\n if (a.length < b.length) {\n return false;\n }\n\n for (let i = 0; i < b.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction combineAndParse(\n utf8decoder: TextDecoder,\n prev: Uint8Array[],\n curr: Uint8Array,\n) {\n let str = \"\";\n for (const chunk of prev) {\n str += utf8decoder.decode(chunk, { stream: true });\n }\n str += utf8decoder.decode(curr);\n\n return JSON.parse(str);\n}\n\nexport async function* iterateReadableStream(\n readableStream: ReadableStreamDefaultReader<Uint8Array>,\n): AsyncGenerator<Uint8Array, void, unknown> {\n let res = await readableStream.read();\n while (!res.done) {\n yield res.value;\n res = await readableStream.read();\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,WAAW,GAAG,IAAIC,UAAU,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAC7E,MAAMC,qBAAqB,GAAG,GAAG,CAAC,CAAC;AACnC,MAAMC,sBAAsB,GAAG,GAAG,CAAC,CAAC;;AAEpC,OAAO,gBAAgBC,qBAAqBA,CAC1CC,aAAwC,EACJ;EACpC,MAAMC,WAAW,GAAG,IAAIC,WAAW,CAAC,OAAO,CAAC;EAE5C,IAAIC,WAAW,GAAG,KAAK;EACvB,IAAIC,UAAwB,GAAG,EAAE;EACjC,IAAIC,eAAe,GAAG,CAAC;EAEvB,WAAW,MAAMC,KAAK,IAAIN,aAAa,EAAE;IACvC;IACA,IAAIO,CAAC,GAAG,CAAC;IACT,IAAI,CAACJ,WAAW,EAAE;MAChBA,WAAW,GAAG,IAAI;MAClB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P,MAAM,EAAEF,CAAC,EAAE,EAAE;IACjC,IAAIQ,CAAC,CAACR,CAAC,CAAC,KAAKS,CAAC,CAACT,CAAC,CAAC,EAAE;MACjB,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb;AAEA,SAASK,eAAeA,CACtBX,WAAwB,EACxBgB,IAAkB,EAClBC,IAAgB,EAChB;EACA,IAAIC,GAAG,GAAG,EAAE;EACZ,KAAK,MAAMb,KAAK,IAAIW,IAAI,EAAE;IACxBE,GAAG,IAAIlB,WAAW,CAACmB,MAAM,CAACd,KAAK,EAAE;MAAEe,MAAM,EAAE;IAAK,CAAC,CAAC;EACpD;EACAF,GAAG,IAAIlB,WAAW,CAACmB,MAAM,CAACF,IAAI,CAAC;EAE/B,OAAOI,IAAI,CAACC,KAAK,CAACJ,GAAG,CAAC;AACxB;AAEA,OAAO,gBAAgBK,qBAAqBA,CAC1CC,cAAuD,EACZ;EAC3C,IAAIC,GAAG,GAAG,MAAMD,cAAc,CAACE,IAAI,CAAC,CAAC;EACrC,OAAO,CAACD,GAAG,CAACE,IAAI,EAAE;IAChB,MAAMF,GAAG,CAACG,KAAK;IACfH,GAAG,GAAG,MAAMD,cAAc,CAACE,IAAI,CAAC,CAAC;EACnC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk7R2DRDPC_cjs = require('./chunk-7R2DRDPC.cjs');
|
|
4
|
+
require('./chunk-H6PXPU6F.cjs');
|
|
5
|
+
require('./chunk-Q7SFCCGT.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "getMediaContent", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk7R2DRDPC_cjs.getMediaContent; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "getMediaMetadata", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunk7R2DRDPC_cjs.getMediaMetadata; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "upload", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunk7R2DRDPC_cjs.upload; }
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=MediaReferenceProperty-XVLCRD4T.cjs.map
|
|
22
|
+
//# sourceMappingURL=MediaReferenceProperty-XVLCRD4T.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"MediaReferenceProperty-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"MediaReferenceProperty-XVLCRD4T.cjs"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./chunk-Q7SFCCGT.cjs');
|
|
4
|
+
|
|
5
|
+
// src/queries/applyStreamingQuery.ts
|
|
6
|
+
function applyStreamingQuery(_client, _query, _params) {
|
|
7
|
+
throw new Error("Streaming query execution is not currently supported in the TypeScript OSDK.");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
exports.applyStreamingQuery = applyStreamingQuery;
|
|
11
|
+
//# sourceMappingURL=applyStreamingQuery-GMHLFTJL.cjs.map
|
|
12
|
+
//# sourceMappingURL=applyStreamingQuery-GMHLFTJL.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/queries/applyStreamingQuery.ts"],"names":[],"mappings":";;;;;AAiBO,SAAS,mBAAA,CAAoB,OAAA,EAAS,MAAA,EAAQ,OAAA,EAAS;AAC5D,EAAA,MAAM,IAAI,MAAM,8EAA8E,CAAA;AAChG","file":"applyStreamingQuery-GMHLFTJL.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 */\n\n// Streaming query execution is not currently supported in the TypeScript OSDK\nexport function applyStreamingQuery(_client, _query, _params) {\n throw new Error(\"Streaming query execution is not currently supported in the TypeScript OSDK.\");\n}"]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkM6QGS7EM_cjs = require('./chunk-M6QGS7EM.cjs');
|
|
4
|
+
var chunkE5UOKLCW_cjs = require('./chunk-E5UOKLCW.cjs');
|
|
5
5
|
|
|
6
6
|
// src/scenarios/createScenario.ts
|
|
7
7
|
async function createScenario(client) {
|
|
8
|
-
const ctx = client[
|
|
8
|
+
const ctx = client[chunkE5UOKLCW_cjs.additionalContext];
|
|
9
9
|
if (ctx.scenarioRid != null) {
|
|
10
10
|
throw new Error("createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.");
|
|
11
11
|
}
|
|
12
|
-
const response = await
|
|
12
|
+
const response = await chunkM6QGS7EM_cjs.OntologyScenario_exports.createScenario(ctx, await ctx.ontologyRid, ctx.branch != null ? {
|
|
13
13
|
base: {
|
|
14
14
|
type: "branch",
|
|
15
15
|
branch: ctx.branch
|
|
@@ -17,15 +17,15 @@ async function createScenario(client) {
|
|
|
17
17
|
} : {}, {
|
|
18
18
|
preview: true
|
|
19
19
|
});
|
|
20
|
-
return
|
|
20
|
+
return chunkM6QGS7EM_cjs.buildScenarioClient(client, response.scenarioRid);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// src/scenarios/withScenario.ts
|
|
24
24
|
function withScenario(client, scenarioRid) {
|
|
25
|
-
return
|
|
25
|
+
return chunkM6QGS7EM_cjs.buildScenarioClient(client, scenarioRid);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
exports.createScenario = createScenario;
|
|
29
29
|
exports.withScenario = withScenario;
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-2NM5TPDK.cjs.map
|
|
31
|
+
//# sourceMappingURL=chunk-2NM5TPDK.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/scenarios/createScenario.ts","../../src/scenarios/withScenario.ts"],"names":["additionalContext","OntologyScenario_exports","buildScenarioClient"],"mappings":";;;;;;AAuCA,eAAsB,eAAe,MAAA,EAAQ;AAC3C,EAAA,MAAM,GAAA,GAAM,OAAOA,mCAAiB,CAAA;AACpC,EAAA,IAAI,GAAA,CAAI,eAAe,IAAA,EAAM;AAC3B,IAAA,MAAM,IAAI,MAAM,iGAAiG,CAAA;AAAA,EACnH;AACA,EAAA,MAAM,QAAA,GAAW,MAAMC,0CAAA,CAAkB,cAAA,CAAe,GAAA,EAAK,MAAM,GAAA,CAAI,WAAA,EAAa,GAAA,CAAI,MAAA,IAAU,IAAA,GAAO;AAAA,IACvG,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,QAAQ,GAAA,CAAI;AAAA;AACd,GACF,GAAI,EAAC,EAAG;AAAA,IACN,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,OAAOC,qCAAA,CAAoB,MAAA,EAAQ,QAAA,CAAS,WAAW,CAAA;AACzD;;;ACdO,SAAS,YAAA,CAAa,QAAQ,WAAA,EAAa;AAChD,EAAA,OAAOA,qCAAA,CAAoB,QAAQ,WAAW,CAAA;AAChD","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/scenarios/createScenario.ts","../../src/scenarios/withScenario.ts"],"names":["additionalContext","OntologyScenario_exports","buildScenarioClient"],"mappings":";;;;;;AAuCA,eAAsB,eAAe,MAAA,EAAQ;AAC3C,EAAA,MAAM,GAAA,GAAM,OAAOA,mCAAiB,CAAA;AACpC,EAAA,IAAI,GAAA,CAAI,eAAe,IAAA,EAAM;AAC3B,IAAA,MAAM,IAAI,MAAM,iGAAiG,CAAA;AAAA,EACnH;AACA,EAAA,MAAM,QAAA,GAAW,MAAMC,0CAAA,CAAkB,cAAA,CAAe,GAAA,EAAK,MAAM,GAAA,CAAI,WAAA,EAAa,GAAA,CAAI,MAAA,IAAU,IAAA,GAAO;AAAA,IACvG,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,QAAQ,GAAA,CAAI;AAAA;AACd,GACF,GAAI,EAAC,EAAG;AAAA,IACN,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,OAAOC,qCAAA,CAAoB,MAAA,EAAQ,QAAA,CAAS,WAAW,CAAA;AACzD;;;ACdO,SAAS,YAAA,CAAa,QAAQ,WAAA,EAAa;AAChD,EAAA,OAAOA,qCAAA,CAAoB,QAAQ,WAAW,CAAA;AAChD","file":"chunk-2NM5TPDK.cjs","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 { OntologyScenarios } from \"@osdk/foundry.ontologies\";\nimport { additionalContext } from \"../Client.js\";\nimport { buildScenarioClient } 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 * @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 scenario = await createScenario(client);\n * const scenarioRid = scenario.getScenarioReference();\n * ```\n */\nexport async function createScenario(client) {\n const ctx = client[additionalContext];\n if (ctx.scenarioRid != null) {\n throw new Error(\"createScenario: the supplied client already has an active scenario. Scenarios cannot be nested.\");\n }\n const response = await OntologyScenarios.createScenario(ctx, await ctx.ontologyRid, ctx.branch != null ? {\n base: {\n type: \"branch\",\n branch: ctx.branch\n }\n } : {}, {\n preview: true\n });\n return buildScenarioClient(client, response.scenarioRid);\n}","/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { buildScenarioClient } from \"./ScenarioClient.js\";\n\n/**\n * Attach to an existing ontology scenario. Synchronous — no network call is made. The returned client scopes all\n * subsequent operations (`fetchPage`, `applyAction`, `executeFunction`, etc.) to the given `scenarioRid`.\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 scenario.\n * @param scenarioRid - The RID of the scenario to attach to.\n * @returns a {@link EXPERIMENTAL_ScenarioClient} bound to `scenarioRid`.\n *\n * @beta This is an experimental, unstable feature subject to change.\n *\n * @example\n * ```ts\n * import { withScenario } from \"@osdk/client/unstable-do-not-use\";\n *\n * const scenario = withScenario(client, \"ri.actions..scenario.abc\");\n * const page = await scenario(Doctor).fetchPage();\n * await scenario(Schedule).applyAction({ doctor: page.data[0], shift: \"AM\" });\n * ```\n */\nexport function withScenario(client, scenarioRid) {\n return buildScenarioClient(client, scenarioRid);\n}"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var chunkH6PXPU6F_cjs = require('./chunk-H6PXPU6F.cjs');
|
|
4
4
|
var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
|
|
5
5
|
|
|
6
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
6
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.70.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js
|
|
7
7
|
var MediaReferenceProperty_exports = {};
|
|
8
8
|
chunkQ7SFCCGT_cjs.__export(MediaReferenceProperty_exports, {
|
|
9
9
|
getMediaContent: () => getMediaContent,
|
|
@@ -27,5 +27,5 @@ exports.MediaReferenceProperty_exports = MediaReferenceProperty_exports;
|
|
|
27
27
|
exports.getMediaContent = getMediaContent;
|
|
28
28
|
exports.getMediaMetadata = getMediaMetadata;
|
|
29
29
|
exports.upload = upload;
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-7R2DRDPC.cjs.map
|
|
31
|
+
//# sourceMappingURL=chunk-7R2DRDPC.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.ontologies@2.70.0/node_modules/@osdk/foundry.ontologies/build/esm/public/MediaReferenceProperty.js"],"names":["__export","foundryPlatformFetch"],"mappings":";;;;;;AAAA,IAAA,8BAAA,GAAA;AAAAA,0BAAA,CAAA,8BAAA,EAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,gBAAA,EAAA,MAAA,gBAAA;AAAA,EAAA,MAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AAiBA,IAAM,mBAAmB,CAAC,CAAA,EAAG,sDAAA,EAAwD,CAAA,IAAI,KAAK,CAAA;AASvF,SAAS,eAAA,CAAgB,SAAS,IAAA,EAAM;AAC7C,EAAA,OAAOC,sCAAA,CAAsB,IAAA,EAAM,gBAAA,EAAkB,GAAG,IAAI,CAAA;AAC9D;AACA,IAAM,iBAAA,GAAoB,CAAC,CAAA,EAAG,uDAAA,EAAyD,CAAC,CAAA;AASjF,SAAS,gBAAA,CAAiB,SAAS,IAAA,EAAM;AAC9C,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,iBAAA,EAAmB,GAAG,IAAI,CAAA;AAC/D;AACA,IAAM,OAAA,GAAU,CAAC,CAAA,EAAG,qDAAA,EAAuD,GAAG,KAAK,CAAA;AAU5E,SAAS,MAAA,CAAO,SAAS,IAAA,EAAM;AACpC,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,OAAA,EAAS,GAAG,IAAI,CAAA;AACrD","file":"chunk-7R2DRDPC.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 _getMediaContent = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/content\", 2,, \"*/*\"];\n/**\n * Gets the content of a media item referenced by this property.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content\n */\nexport function getMediaContent($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaContent, ...args);\n}\nconst _getMediaMetadata = [0, \"/v2/ontologies/{0}/objects/{1}/{2}/media/{3}/metadata\", 2];\n/**\n * Gets metadata about the media item referenced by this property.\n *\n * @alpha\n *\n * Required Scopes: [api:ontologies-read]\n * URL: /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/metadata\n */\nexport function getMediaMetadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getMediaMetadata, ...args);\n}\nconst _upload = [1, \"/v2/ontologies/{0}/objectTypes/{1}/media/{2}/upload\", 3, \"*/*\"];\n/**\n * Uploads a media item to the media set which backs the specified property. The property must be backed by a single media set and branch, otherwise an error will be thrown.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/ontologies/{ontology}/objectTypes/{objectType}/media/{property}/upload\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...args);\n}"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var chunkH6PXPU6F_cjs = require('./chunk-H6PXPU6F.cjs');
|
|
4
4
|
var chunkQ7SFCCGT_cjs = require('./chunk-Q7SFCCGT.cjs');
|
|
5
5
|
|
|
6
|
-
// ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.
|
|
6
|
+
// ../../node_modules/.pnpm/@osdk+foundry.mediasets@2.70.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js
|
|
7
7
|
var MediaSet_exports = {};
|
|
8
8
|
chunkQ7SFCCGT_cjs.__export(MediaSet_exports, {
|
|
9
9
|
abort: () => abort,
|
|
@@ -104,5 +104,5 @@ function uploadMedia($ctx, ...args) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
exports.MediaSet_exports = MediaSet_exports;
|
|
107
|
-
//# sourceMappingURL=chunk-
|
|
108
|
-
//# sourceMappingURL=chunk-
|
|
107
|
+
//# sourceMappingURL=chunk-BHRMH4Q2.cjs.map
|
|
108
|
+
//# sourceMappingURL=chunk-BHRMH4Q2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.mediasets@2.63.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js"],"names":["__export","foundryPlatformFetch"],"mappings":";;;;;;AAAA,IAAA,gBAAA,GAAA;AAAAA,0BAAA,CAAA,gBAAA,EAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,GAAA,EAAA,MAAA,GAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,IAAA,EAAA,MAAA,IAAA;AAAA,EAAA,QAAA,EAAA,MAAA,QAAA;AAAA,EAAA,IAAA,EAAA,MAAA,IAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,QAAA,EAAA,MAAA,QAAA;AAAA,EAAA,QAAA,EAAA,MAAA,QAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,WAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AAiBA,IAAM,MAAA,GAAS,CAAC,CAAA,EAAG,0CAAA,EAA4C,CAAC,CAAA;AASzD,SAAS,KAAA,CAAM,S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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 _abort = [1, \"/v2/mediasets/{0}/transactions/{1}/abort\", 2];\n/**\n * Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort\n */\nexport function abort($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _abort, ...args);\n}\nconst _calculate = [0, \"/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate\", 6];\n/**\n * Starts calculation of a thumbnail for a given image.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/calculate\n */\nexport function calculate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _calculate, ...args);\n}\nconst _clear = [3, \"/v2/mediasets/{0}/items/clearAtPath\", 2];\n/**\n * Clears (soft-deletes) the media item at the specified path within a media set, making it and all older\n * media items at that path un-retrievable.\n *\n * A branch name, branch RID, or view RID may optionally be specified. If none is specified,\n * the item will be cleared from the default branch. If more than one is specified, an error is thrown.\n *\n * For transactional media sets, a transaction ID must be provided. The deletion will not be\n * visible until the transaction is committed.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/items/clearAtPath\n */\nexport function clear($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _clear, ...args);\n}\nconst _commit = [1, \"/v2/mediasets/{0}/transactions/{1}/commit\", 2];\n/**\n * Commits an open transaction. On success, items uploaded to the media set during this transaction will become available.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit\n */\nexport function commit($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _commit, ...args);\n}\nconst _create = [1, \"/v2/mediasets/{0}/transactions\", 2];\n/**\n * Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions\n */\nexport function create($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _create, ...args);\n}\nconst _info = [0, \"/v2/mediasets/{0}/items/{1}\", 6];\n/**\n * Gets information about the media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}\n */\nexport function info($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _info, ...args);\n}\nconst _metadata = [0, \"/v2/mediasets/{0}/items/{1}/metadata\", 6];\n/**\n * Gets detailed metadata about the media item, including type-specific information\n * such as dimensions for images, duration for audio/video, page count for documents, etc.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/metadata\n */\nexport function metadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _metadata, ...args);\n}\nconst _reference = [0, \"/v2/mediasets/{0}/items/{1}/reference\", 6];\n/**\n * Gets the [media reference](https://www.palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference\n */\nexport function reference($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _reference, ...args);\n}\nconst _getRidByPath = [0, \"/v2/mediasets/{0}/items/getRidByPath\", 2];\n/**\n * Returns the media item RID for the media item with the specified path.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/getRidByPath\n */\nexport function getRidByPath($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getRidByPath, ...args);\n}\nconst _get = [0, \"/v2/mediasets/{0}\", 2];\n/**\n * Gets information about the media set.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getResult = [0, \"/v2/mediasets/{0}/items/{1}/transformationJobs/{2}/result\", 6,, \"*/*\"];\n/**\n * Gets the result of a completed transformation job. Returns the transformed media content as binary data.\n * This endpoint will return an error if the transformation job has not completed successfully.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-transform]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transformationJobs/{transformationJobId}/result\n */\nexport function getResult($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getResult, ...args);\n}\nconst _getStatus = [0, \"/v2/mediasets/{0}/items/{1}/transformationJobs/{2}\", 6];\n/**\n * Gets the status of a transformation job.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-transform]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transformationJobs/{transformationJobId}\n */\nexport function getStatus($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getStatus, ...args);\n}\nconst _upload = [1, \"/v2/mediasets/{0}/items\", 3, \"*/*\"];\n/**\n * Uploads a media item to an existing media set.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n * A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/items\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...args);\n}\nconst _read = [0, \"/v2/mediasets/{0}/items/{1}/content\", 6,, \"*/*\"];\n/**\n * Gets the content of a media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _readOriginal = [0, \"/v2/mediasets/{0}/items/{1}/original\", 6,, \"*/*\"];\n/**\n * Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original\n */\nexport function readOriginal($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readOriginal, ...args);\n}\nconst _register = [1, \"/v2/mediasets/{0}/items/register\", 3];\n/**\n * Registers a media item that currently resides in a federated media store. Registration will validate the item\n * against the media set's schema and perform initial metadata extraction.\n * This endpoint is only applicable for federated media sets.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/items/register\n */\nexport function register($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _register, ...args);\n}\nconst _retrieve = [0, \"/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve\", 6,, \"*/*\"];\n/**\n * Retrieves a successfully calculated thumbnail for a given image.\n *\n * Thumbnails are 200px wide in the format of `image/webp`\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/retrieve\n */\nexport function retrieve($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _retrieve, ...args);\n}\nconst _transform = [1, \"/v2/mediasets/{0}/items/{1}/transform\", 7];\n/**\n * Initiates a transformation on a media item. Returns a job ID that can be used to check the status and retrieve\n * the result of the transformation.\n *\n * Transforming a media item requires that you are able to read the media item, either via `api:mediasets-read` or\n * via a `MediaItemReadToken`\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-transform]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform\n */\nexport function transform($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _transform, ...args);\n}\nconst _uploadMedia = [2, \"/v2/mediasets/media/upload\", 7, \"*/*\"];\n/**\n * Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted.\n *\n * If multiple resources are attributed to, usage will be attributed to the first one in the list.\n *\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n * Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/mediasets/media/upload\n */\nexport function uploadMedia($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _uploadMedia, ...args);\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.mediasets@2.70.0/node_modules/@osdk/foundry.mediasets/build/esm/public/MediaSet.js"],"names":["__export","foundryPlatformFetch"],"mappings":";;;;;;AAAA,IAAA,gBAAA,GAAA;AAAAA,0BAAA,CAAA,gBAAA,EAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,GAAA,EAAA,MAAA,GAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,IAAA,EAAA,MAAA,IAAA;AAAA,EAAA,QAAA,EAAA,MAAA,QAAA;AAAA,EAAA,IAAA,EAAA,MAAA,IAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA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D;AACA,IAAM,YAAA,GAAe,CAAC,CAAA,EAAG,4BAAA,EAA8B,GAAG,KAAK,CAAA;AAcxD,SAAS,WAAA,CAAY,SAAS,IAAA,EAAM;AACzC,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,YAAA,EAAc,GAAG,IAAI,CAAA;AAC1D","file":"chunk-BHRMH4Q2.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 _abort = [1, \"/v2/mediasets/{0}/transactions/{1}/abort\", 2];\n/**\n * Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort\n */\nexport function abort($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _abort, ...args);\n}\nconst _calculate = [0, \"/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/calculate\", 6];\n/**\n * Starts calculation of a thumbnail for a given image.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/calculate\n */\nexport function calculate($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _calculate, ...args);\n}\nconst _clear = [3, \"/v2/mediasets/{0}/items/clearAtPath\", 2];\n/**\n * Clears (soft-deletes) the media item at the specified path within a media set, making it and all older\n * media items at that path un-retrievable.\n *\n * A branch name, branch RID, or view RID may optionally be specified. If none is specified,\n * the item will be cleared from the default branch. If more than one is specified, an error is thrown.\n *\n * For transactional media sets, a transaction ID must be provided. The deletion will not be\n * visible until the transaction is committed.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/items/clearAtPath\n */\nexport function clear($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _clear, ...args);\n}\nconst _commit = [1, \"/v2/mediasets/{0}/transactions/{1}/commit\", 2];\n/**\n * Commits an open transaction. On success, items uploaded to the media set during this transaction will become available.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit\n */\nexport function commit($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _commit, ...args);\n}\nconst _create = [1, \"/v2/mediasets/{0}/transactions\", 2];\n/**\n * Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions\n */\nexport function create($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _create, ...args);\n}\nconst _info = [0, \"/v2/mediasets/{0}/items/{1}\", 6];\n/**\n * Gets information about the media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}\n */\nexport function info($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _info, ...args);\n}\nconst _metadata = [0, \"/v2/mediasets/{0}/items/{1}/metadata\", 6];\n/**\n * Gets detailed metadata about the media item, including type-specific information\n * such as dimensions for images, duration for audio/video, page count for documents, etc.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/metadata\n */\nexport function metadata($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _metadata, ...args);\n}\nconst _reference = [0, \"/v2/mediasets/{0}/items/{1}/reference\", 6];\n/**\n * Gets the [media reference](https://www.palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference\n */\nexport function reference($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _reference, ...args);\n}\nconst _getRidByPath = [0, \"/v2/mediasets/{0}/items/getRidByPath\", 2];\n/**\n * Returns the media item RID for the media item with the specified path.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/getRidByPath\n */\nexport function getRidByPath($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getRidByPath, ...args);\n}\nconst _get = [0, \"/v2/mediasets/{0}\", 2];\n/**\n * Gets information about the media set.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getResult = [0, \"/v2/mediasets/{0}/items/{1}/transformationJobs/{2}/result\", 6,, \"*/*\"];\n/**\n * Gets the result of a completed transformation job. Returns the transformed media content as binary data.\n * This endpoint will return an error if the transformation job has not completed successfully.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-transform]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transformationJobs/{transformationJobId}/result\n */\nexport function getResult($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getResult, ...args);\n}\nconst _getStatus = [0, \"/v2/mediasets/{0}/items/{1}/transformationJobs/{2}\", 6];\n/**\n * Gets the status of a transformation job.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-transform]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transformationJobs/{transformationJobId}\n */\nexport function getStatus($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getStatus, ...args);\n}\nconst _upload = [1, \"/v2/mediasets/{0}/items\", 3, \"*/*\"];\n/**\n * Uploads a media item to an existing media set.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n * A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/items\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...args);\n}\nconst _read = [0, \"/v2/mediasets/{0}/items/{1}/content\", 6,, \"*/*\"];\n/**\n * Gets the content of a media item.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/content\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _readOriginal = [0, \"/v2/mediasets/{0}/items/{1}/original\", 6,, \"*/*\"];\n/**\n * Gets the content of an original file uploaded to the media item, even if it was transformed on upload due to being an additional input format.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/original\n */\nexport function readOriginal($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _readOriginal, ...args);\n}\nconst _register = [1, \"/v2/mediasets/{0}/items/register\", 3];\n/**\n * Registers a media item that currently resides in a federated media store. Registration will validate the item\n * against the media set's schema and perform initial metadata extraction.\n * This endpoint is only applicable for federated media sets.\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/items/register\n */\nexport function register($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _register, ...args);\n}\nconst _retrieve = [0, \"/v2/mediasets/{0}/items/{1}/transform/imagery/thumbnail/retrieve\", 6,, \"*/*\"];\n/**\n * Retrieves a successfully calculated thumbnail for a given image.\n *\n * Thumbnails are 200px wide in the format of `image/webp`\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform/imagery/thumbnail/retrieve\n */\nexport function retrieve($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _retrieve, ...args);\n}\nconst _transform = [1, \"/v2/mediasets/{0}/items/{1}/transform\", 7];\n/**\n * Initiates a transformation on a media item. Returns a job ID that can be used to check the status and retrieve\n * the result of the transformation.\n *\n * Transforming a media item requires that you are able to read the media item, either via `api:mediasets-read` or\n * via a `MediaItemReadToken`\n *\n * @beta\n *\n * Required Scopes: [api:mediasets-transform]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/transform\n */\nexport function transform($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _transform, ...args);\n}\nconst _uploadMedia = [2, \"/v2/mediasets/media/upload\", 7, \"*/*\"];\n/**\n * Uploads a temporary media item. If the media item isn't persisted within 1 hour, the item will be deleted.\n *\n * If multiple resources are attributed to, usage will be attributed to the first one in the list.\n *\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n * Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:ontologies-read api:ontologies-write`.\n *\n * @beta\n *\n * Required Scopes: [api:ontologies-read, api:ontologies-write]\n * URL: /v2/mediasets/media/upload\n */\nexport function uploadMedia($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _uploadMedia, ...args);\n}"]}
|