@osdk/client 2.23.0 → 2.23.1-beta.2
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 +27 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/MinimalClientContext.js.map +1 -1
- package/build/browser/actions/applyAction.js +3 -1
- package/build/browser/actions/applyAction.js.map +1 -1
- package/build/browser/createClient.js +7 -3
- package/build/browser/createClient.js.map +1 -1
- package/build/browser/createMinimalClient.js +10 -0
- package/build/browser/createMinimalClient.js.map +1 -1
- package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +3 -0
- package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js +30 -10
- package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/browser/object/aggregate.js +2 -1
- package/build/browser/object/aggregate.js.map +1 -1
- package/build/browser/object/fetchPage.js +6 -3
- package/build/browser/object/fetchPage.js.map +1 -1
- package/build/browser/objectSet/createObjectSet.js +3 -0
- package/build/browser/objectSet/createObjectSet.js.map +1 -1
- package/build/browser/public/unstable-do-not-use.js +2 -0
- package/build/browser/public/unstable-do-not-use.js.map +1 -1
- package/build/browser/queries/applyQuery.js +1 -0
- package/build/browser/queries/applyQuery.js.map +1 -1
- package/build/browser/scenarios/ScenarioClient.js +202 -0
- package/build/browser/scenarios/ScenarioClient.js.map +1 -0
- package/build/browser/scenarios/createScenario.js +55 -0
- package/build/browser/scenarios/createScenario.js.map +1 -0
- package/build/browser/scenarios/withScenario.js +42 -0
- package/build/browser/scenarios/withScenario.js.map +1 -0
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/browser/util/toDataValue.js +4 -0
- package/build/browser/util/toDataValue.js.map +1 -1
- package/build/cjs/MediaReferenceProperty-CBPMMD73.cjs +22 -0
- package/build/cjs/{MediaReferenceProperty-Y6R5ASNW.cjs.map → MediaReferenceProperty-CBPMMD73.cjs.map} +1 -1
- package/build/cjs/{applyStreamingQuery-F77N7EOP.cjs → applyStreamingQuery-G2PA2SM7.cjs} +11 -11
- package/build/cjs/{applyStreamingQuery-F77N7EOP.cjs.map → applyStreamingQuery-G2PA2SM7.cjs.map} +1 -1
- package/build/cjs/{chunk-KILPUOJP.cjs → chunk-BV6P25ZM.cjs} +51 -21
- package/build/cjs/chunk-BV6P25ZM.cjs.map +1 -0
- package/build/cjs/{chunk-3DMI6Z4B.cjs → chunk-IWAZIBOK.cjs} +75 -75
- package/build/cjs/{chunk-3DMI6Z4B.cjs.map → chunk-IWAZIBOK.cjs.map} +1 -1
- package/build/cjs/{chunk-MURBAIS4.cjs → chunk-NFD4IH4H.cjs} +17 -16
- package/build/cjs/chunk-NFD4IH4H.cjs.map +1 -0
- package/build/cjs/{chunk-5WD6SB7R.cjs → chunk-WBINM4RT.cjs} +297 -100
- package/build/cjs/chunk-WBINM4RT.cjs.map +1 -0
- package/build/cjs/{chunk-DOXHU27E.cjs → chunk-YP43NHIA.cjs} +3 -3
- package/build/cjs/{chunk-DOXHU27E.cjs.map → chunk-YP43NHIA.cjs.map} +1 -1
- package/build/cjs/{chunk-ZPLXXOU6.cjs → chunk-ZFNHWPQA.cjs} +3 -3
- package/build/cjs/{chunk-ZPLXXOU6.cjs.map → chunk-ZFNHWPQA.cjs.map} +1 -1
- package/build/cjs/index.cjs +13 -13
- package/build/cjs/public/experimental.cjs +8 -8
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/observable.cjs +7 -7
- package/build/cjs/public/unstable-do-not-use.cjs +37 -12
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +167 -4
- package/build/cjs/{transformAndWaitInternal-F3UV33FN.cjs → transformAndWaitInternal-2GORZXPK.cjs} +6 -6
- package/build/cjs/{transformAndWaitInternal-F3UV33FN.cjs.map → transformAndWaitInternal-2GORZXPK.cjs.map} +1 -1
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/MinimalClientContext.js.map +1 -1
- package/build/esm/actions/applyAction.js +3 -1
- package/build/esm/actions/applyAction.js.map +1 -1
- package/build/esm/createClient.js +7 -3
- package/build/esm/createClient.js.map +1 -1
- package/build/esm/createMinimalClient.js +10 -0
- package/build/esm/createMinimalClient.js.map +1 -1
- package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +3 -0
- package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js +30 -10
- package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
- package/build/esm/object/aggregate.js +2 -1
- package/build/esm/object/aggregate.js.map +1 -1
- package/build/esm/object/fetchPage.js +6 -3
- package/build/esm/object/fetchPage.js.map +1 -1
- package/build/esm/objectSet/createObjectSet.js +3 -0
- package/build/esm/objectSet/createObjectSet.js.map +1 -1
- package/build/esm/public/unstable-do-not-use.js +2 -0
- package/build/esm/public/unstable-do-not-use.js.map +1 -1
- package/build/esm/queries/applyQuery.js +1 -0
- package/build/esm/queries/applyQuery.js.map +1 -1
- package/build/esm/scenarios/ScenarioClient.js +202 -0
- package/build/esm/scenarios/ScenarioClient.js.map +1 -0
- package/build/esm/scenarios/createScenario.js +55 -0
- package/build/esm/scenarios/createScenario.js.map +1 -0
- package/build/esm/scenarios/withScenario.js +42 -0
- package/build/esm/scenarios/withScenario.js.map +1 -0
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/esm/util/toDataValue.js +4 -0
- package/build/esm/util/toDataValue.js.map +1 -1
- package/build/types/Client.d.ts +1 -1
- package/build/types/MinimalClientContext.d.ts +1 -0
- package/build/types/MinimalClientContext.d.ts.map +1 -1
- package/build/types/actions/applyAction.d.ts.map +1 -1
- package/build/types/createClient.d.ts.map +1 -1
- package/build/types/public/unstable-do-not-use.d.ts +3 -0
- package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
- package/build/types/queries/applyQuery.d.ts.map +1 -1
- package/build/types/scenarios/ScenarioClient.d.ts +131 -0
- package/build/types/scenarios/ScenarioClient.d.ts.map +1 -0
- package/build/types/scenarios/createScenario.d.ts +21 -0
- package/build/types/scenarios/createScenario.d.ts.map +1 -0
- package/build/types/scenarios/withScenario.d.ts +23 -0
- package/build/types/scenarios/withScenario.d.ts.map +1 -0
- package/package.json +14 -14
- package/build/cjs/MediaReferenceProperty-Y6R5ASNW.cjs +0 -22
- package/build/cjs/chunk-5WD6SB7R.cjs.map +0 -1
- package/build/cjs/chunk-KILPUOJP.cjs.map +0 -1
- package/build/cjs/chunk-MURBAIS4.cjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkNFD4IH4H_cjs = require('./chunk-NFD4IH4H.cjs');
|
|
4
|
+
var chunkBV6P25ZM_cjs = require('./chunk-BV6P25ZM.cjs');
|
|
5
|
+
require('./chunk-ZFNHWPQA.cjs');
|
|
6
6
|
var chunkD26YLHTV_cjs = require('./chunk-D26YLHTV.cjs');
|
|
7
7
|
require('./chunk-74HV6NQQ.cjs');
|
|
8
8
|
|
|
9
|
-
// ../../node_modules/.pnpm/@osdk+foundry.functions@2.
|
|
9
|
+
// ../../node_modules/.pnpm/@osdk+foundry.functions@2.61.0/node_modules/@osdk/foundry.functions/build/esm/public/Query.js
|
|
10
10
|
var _streamingExecute = [1, "/v2/functions/queries/{0}/streamingExecute", 7, , "application/octet-stream"];
|
|
11
11
|
function streamingExecute($ctx, ...args) {
|
|
12
12
|
return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _streamingExecute, ...args);
|
|
@@ -18,11 +18,11 @@ async function* applyStreamingQuery(client, query, params) {
|
|
|
18
18
|
if (client.flushEdits != null) {
|
|
19
19
|
await client.flushEdits();
|
|
20
20
|
}
|
|
21
|
-
const response = await streamingExecute(
|
|
21
|
+
const response = await streamingExecute(chunkBV6P25ZM_cjs.addUserAgentAndRequestContextHeaders(chunkBV6P25ZM_cjs.augmentRequestContext(client, (_) => ({
|
|
22
22
|
finalMethodCall: "applyStreamingQuery"
|
|
23
23
|
})), query), query.apiName, {
|
|
24
24
|
ontology: await client.ontologyRid,
|
|
25
|
-
parameters: params ? await
|
|
25
|
+
parameters: params ? await chunkNFD4IH4H_cjs.remapQueryParams(params, client, qd.parameters) : {},
|
|
26
26
|
version: query.isFixedVersion ? query.version : void 0,
|
|
27
27
|
branch: client.branch
|
|
28
28
|
}, {
|
|
@@ -32,15 +32,15 @@ async function* applyStreamingQuery(client, query, params) {
|
|
|
32
32
|
if (response.body == null) {
|
|
33
33
|
throw new Error("streamingExecute returned no response body");
|
|
34
34
|
}
|
|
35
|
-
const definitions = await
|
|
35
|
+
const definitions = await chunkNFD4IH4H_cjs.getRequiredDefinitions(qd.output, client);
|
|
36
36
|
const reader = response.body.getReader();
|
|
37
|
-
for await (const line of
|
|
37
|
+
for await (const line of chunkNFD4IH4H_cjs.parseNdjsonStream(chunkNFD4IH4H_cjs.iterateReadableStream(reader))) {
|
|
38
38
|
if (line.type === "error") {
|
|
39
39
|
const err = new Error(`${line.errorName} (${line.errorCode}) [${line.errorInstanceId}]: ${line.errorDescription ?? ""}`);
|
|
40
40
|
Object.assign(err, line);
|
|
41
41
|
throw err;
|
|
42
42
|
}
|
|
43
|
-
const remapped = await
|
|
43
|
+
const remapped = await chunkNFD4IH4H_cjs.remapQueryResponse(client, qd.output, line.value, definitions);
|
|
44
44
|
if (qd.output.type === "array" && Array.isArray(remapped)) {
|
|
45
45
|
for (const item of remapped) {
|
|
46
46
|
yield item;
|
|
@@ -52,5 +52,5 @@ async function* applyStreamingQuery(client, query, params) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
exports.applyStreamingQuery = applyStreamingQuery;
|
|
55
|
-
//# sourceMappingURL=applyStreamingQuery-
|
|
56
|
-
//# sourceMappingURL=applyStreamingQuery-
|
|
55
|
+
//# sourceMappingURL=applyStreamingQuery-G2PA2SM7.cjs.map
|
|
56
|
+
//# sourceMappingURL=applyStreamingQuery-G2PA2SM7.cjs.map
|
package/build/cjs/{applyStreamingQuery-F77N7EOP.cjs.map → applyStreamingQuery-G2PA2SM7.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.functions@2.57.0/node_modules/@osdk/foundry.functions/build/esm/public/Query.js","../../src/queries/applyStreamingQuery.ts"],"names":["foundryPlatformFetch","addUserAgentAndRequestContextHeaders","augmentRequestContext","remapQueryParams","getRequiredDefinitions","parseNdjsonStream","iterateReadableStream","remapQueryResponse"],"mappings":";;;;;;;;;AA2EA,IAAM,oBAAoB,CAAC,CAAA,EAAG,4CAAA,EAA8C,CAAA,IAAI,0BAA0B,CAAA;AAiCnG,SAAS,gBAAA,CAAiB,SAAS,IAAA,EAAM;AAC9C,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,iBAAA,EAAmB,GAAG,IAAI,CAAA;AAC/D;;;ACzFA,gBAAuB,mBAAA,CAAoB,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAQ;AAChE,EAAA,MAAM,EAAA,GAAK,MAAM,MAAA,CAAO,gBAAA,CAAiB,kBAAA,CAAmB,KAAA,CAAM,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAS,CAAA;AAC3H,EAAA,IAAI,MAAA,CAAO,cAAc,IAAA,EAAM;AAC7B,IAAA,MAAM,OAAO,UAAA,EAAW;AAAA,EAC1B;AACA,EAAA,MAAM,WAAW,MAAgB,gBAAA,CAAiBC,sDAAA,CAAqCC,uCAAA,CAAsB,QAAQ,CAAA,CAAA,MAAM;AAAA,IACzH,eAAA,EAAiB;AAAA,GACnB,CAAE,CAAA,EAAG,KAAK,CAAA,EAAG,MAAM,OAAA,EAAS;AAAA,IAC1B,QAAA,EAAU,MAAM,MAAA,CAAO,WAAA;AAAA,IACvB,UAAA,EAAY,SAAS,MAAMC,kCAAA,CAAiB,QAAQ,MAAA,EAAQ,EAAA,CAAG,UAAU,CAAA,GAAI,EAAC;AAAA,IAC9E,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAA;AAAA,IAChD,QAAQ,MAAA,CAAO;AAAA,GACjB,EAAG;AAAA,IACD,eAAe,MAAA,CAAO,aAAA;AAAA,IACtB,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,IAAI,QAAA,CAAS,QAAQ,IAAA,EAAM;AACzB,IAAA,MAAM,IAAI,MAAM,4CAA4C,CAAA;AAAA,EAC9D;AACA,EAAA,MAAM,WAAA,GAAc,MAAMC,wCAAA,CAAuB,EAAA,CAAG,QAAQ,MAAM,CAAA;AAClE,EAAA,MAAM,MAAA,GAAS,QAAA,CAAS,IAAA,CAAK,SAAA,EAAU;AACvC,EAAA,WAAA,MAAiB,IAAA,IAAQC,mCAAA,CAAkBC,uCAAA,CAAsB,MAAM,CAAC,CAAA,EAAG;AACzE,IAAA,IAAI,IAAA,CAAK,SAAS,OAAA,EAAS;AACzB,MAAA,MAAM,MAAM,IAAI,KAAA,CAAM,CAAA,EAAG,IAAA,CAAK,SAAS,CAAA,EAAA,EAAK,IAAA,CAAK,SAAS,CAAA,GAAA,EAAM,KAAK,eAAe,CAAA,GAAA,EAAM,IAAA,CAAK,gBAAA,IAAoB,EAAE,CAAA,CAAE,CAAA;AACvH,MAAA,MAAA,CAAO,MAAA,CAAO,KAAK,IAAI,CAAA;AACvB,MAAA,MAAM,GAAA;AAAA,IACR;AACA,IAAA,MAAM,QAAA,GAAW,MAAMC,oCAAA,CAAmB,MAAA,EAAQ,GAAG,MAAA,EAAQ,IAAA,CAAK,OAAO,WAAW,CAAA;AACpF,IAAA,IAAI,GAAG,MAAA,CAAO,IAAA,KAAS,WAAW,KAAA,CAAM,OAAA,CAAQ,QAAQ,CAAA,EAAG;AACzD,MAAA,KAAA,MAAW,QAAQ,QAAA,EAAU;AAC3B,QAAA,MAAM,IAAA;AAAA,MACR;AAAA,IACF,CAAA,MAAO;AACL,MAAA,MAAM,QAAA;AAAA,IACR;AAAA,EACF;AACF","file":"applyStreamingQuery-F77N7EOP.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _get = [0, \"/v2/functions/queries/{0}\", 2];\n/**\n * Gets a specific query type with the given API name. By default, this gets the latest version of the query.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRid = [0, \"/v2/functions/queries/getByRid\", 2];\n/**\n * Gets a specific query type with the given RID. By default, this gets the latest version of the query.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRid\n */\nexport function getByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRid, ...args);\n}\nconst _getByRidBatch = [1, \"/v2/functions/queries/getByRidBatch\", 3];\n/**\n * Gets a list of query types by RID in bulk. By default, this gets the latest version of each query.\n *\n * Queries are filtered from the response if they don't exist or the requesting token lacks the required\n * permissions.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRidBatch\n */\nexport function getByRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRidBatch, ...args);\n}\nconst _execute = [1, \"/v2/functions/queries/{0}/execute\", 7];\n/**\n * Executes a Query using the given parameters. By default, this executes the latest version of the query.\n *\n * This endpoint is maintained for backward compatibility only.\n *\n * For all new implementations, use the `streamingExecute` endpoint, which supports all function types\n * and provides enhanced functionality.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}\nconst _streamingExecute = [1, \"/v2/functions/queries/{0}/streamingExecute\", 7,, \"application/octet-stream\"];\n/**\n * Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query.\n *\n * This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON\n * streaming response format. Both streaming and non-streaming functions can use this endpoint.\n * Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses.\n * This is the recommended endpoint for all query execution.\n *\n * The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line\n * is a StreamingExecuteQueryResponse containing either a data batch or an error.\n *\n * For a function returning a list of 5 records with a batch size of 3, the response stream would contain\n * two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items:\n *\n * ```\n * {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99},{\"productId\":\"SKU-002\",\"price\":49.99},{\"productId\":\"SKU-003\",\"price\":19.99}]}\n * {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-004\",\"price\":39.99},{\"productId\":\"SKU-005\",\"price\":59.99}]}\n * ```\n *\n * Each line is a separate JSON object followed by a newline character. Clients should parse the stream\n * line-by-line to process results as they arrive. If an error occurs during execution, the stream will\n * contain an error line:\n *\n * ```\n * {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n * ```\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecute\n */\nexport function streamingExecute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecute, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Functions from \"@osdk/foundry.functions/Query\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { iterateReadableStream, parseNdjsonStream } from \"../util/streamutils.js\";\nimport { getRequiredDefinitions, remapQueryParams, remapQueryResponse } from \"./applyQuery.js\";\nexport async function* applyStreamingQuery(client, query, params) {\n const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const response = await Functions.streamingExecute(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyStreamingQuery\"\n })), query), query.apiName, {\n ontology: await client.ontologyRid,\n parameters: params ? await remapQueryParams(params, client, qd.parameters) : {},\n version: query.isFixedVersion ? query.version : undefined,\n branch: client.branch\n }, {\n transactionId: client.transactionId,\n preview: true\n });\n if (response.body == null) {\n throw new Error(\"streamingExecute returned no response body\");\n }\n const definitions = await getRequiredDefinitions(qd.output, client);\n const reader = response.body.getReader();\n for await (const line of parseNdjsonStream(iterateReadableStream(reader))) {\n if (line.type === \"error\") {\n const err = new Error(`${line.errorName} (${line.errorCode}) [${line.errorInstanceId}]: ${line.errorDescription ?? \"\"}`);\n Object.assign(err, line);\n throw err;\n }\n const remapped = await remapQueryResponse(client, qd.output, line.value, definitions);\n if (qd.output.type === \"array\" && Array.isArray(remapped)) {\n for (const item of remapped) {\n yield item;\n }\n } else {\n yield remapped;\n }\n }\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/.pnpm/@osdk+foundry.functions@2.61.0/node_modules/@osdk/foundry.functions/build/esm/public/Query.js","../../src/queries/applyStreamingQuery.ts"],"names":["foundryPlatformFetch","addUserAgentAndRequestContextHeaders","augmentRequestContext","remapQueryParams","getRequiredDefinitions","parseNdjsonStream","iterateReadableStream","remapQueryResponse"],"mappings":";;;;;;;;;AA2EA,IAAM,oBAAoB,CAAC,CAAA,EAAG,4CAAA,EAA8C,CAAA,IAAI,0BAA0B,CAAA;AAiCnG,SAAS,gBAAA,CAAiB,SAAS,IAAA,EAAM;AAC9C,EAAA,OAAOA,sCAAA,CAAsB,IAAA,EAAM,iBAAA,EAAmB,GAAG,IAAI,CAAA;AAC/D;;;ACzFA,gBAAuB,mBAAA,CAAoB,MAAA,EAAQ,KAAA,EAAO,MAAA,EAAQ;AAChE,EAAA,MAAM,EAAA,GAAK,MAAM,MAAA,CAAO,gBAAA,CAAiB,kBAAA,CAAmB,KAAA,CAAM,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAS,CAAA;AAC3H,EAAA,IAAI,MAAA,CAAO,cAAc,IAAA,EAAM;AAC7B,IAAA,MAAM,OAAO,UAAA,EAAW;AAAA,EAC1B;AACA,EAAA,MAAM,WAAW,MAAgB,gBAAA,CAAiBC,sDAAA,CAAqCC,uCAAA,CAAsB,QAAQ,CAAA,CAAA,MAAM;AAAA,IACzH,eAAA,EAAiB;AAAA,GACnB,CAAE,CAAA,EAAG,KAAK,CAAA,EAAG,MAAM,OAAA,EAAS;AAAA,IAC1B,QAAA,EAAU,MAAM,MAAA,CAAO,WAAA;AAAA,IACvB,UAAA,EAAY,SAAS,MAAMC,kCAAA,CAAiB,QAAQ,MAAA,EAAQ,EAAA,CAAG,UAAU,CAAA,GAAI,EAAC;AAAA,IAC9E,OAAA,EAAS,KAAA,CAAM,cAAA,GAAiB,KAAA,CAAM,OAAA,GAAU,MAAA;AAAA,IAChD,QAAQ,MAAA,CAAO;AAAA,GACjB,EAAG;AAAA,IACD,eAAe,MAAA,CAAO,aAAA;AAAA,IACtB,OAAA,EAAS;AAAA,GACV,CAAA;AACD,EAAA,IAAI,QAAA,CAAS,QAAQ,IAAA,EAAM;AACzB,IAAA,MAAM,IAAI,MAAM,4CAA4C,CAAA;AAAA,EAC9D;AACA,EAAA,MAAM,WAAA,GAAc,MAAMC,wCAAA,CAAuB,EAAA,CAAG,QAAQ,MAAM,CAAA;AAClE,EAAA,MAAM,MAAA,GAAS,QAAA,CAAS,IAAA,CAAK,SAAA,EAAU;AACvC,EAAA,WAAA,MAAiB,IAAA,IAAQC,mCAAA,CAAkBC,uCAAA,CAAsB,MAAM,CAAC,CAAA,EAAG;AACzE,IAAA,IAAI,IAAA,CAAK,SAAS,OAAA,EAAS;AACzB,MAAA,MAAM,MAAM,IAAI,KAAA,CAAM,CAAA,EAAG,IAAA,CAAK,SAAS,CAAA,EAAA,EAAK,IAAA,CAAK,SAAS,CAAA,GAAA,EAAM,KAAK,eAAe,CAAA,GAAA,EAAM,IAAA,CAAK,gBAAA,IAAoB,EAAE,CAAA,CAAE,CAAA;AACvH,MAAA,MAAA,CAAO,MAAA,CAAO,KAAK,IAAI,CAAA;AACvB,MAAA,MAAM,GAAA;AAAA,IACR;AACA,IAAA,MAAM,QAAA,GAAW,MAAMC,oCAAA,CAAmB,MAAA,EAAQ,GAAG,MAAA,EAAQ,IAAA,CAAK,OAAO,WAAW,CAAA;AACpF,IAAA,IAAI,GAAG,MAAA,CAAO,IAAA,KAAS,WAAW,KAAA,CAAM,OAAA,CAAQ,QAAQ,CAAA,EAAG;AACzD,MAAA,KAAA,MAAW,QAAQ,QAAA,EAAU;AAC3B,QAAA,MAAM,IAAA;AAAA,MACR;AAAA,IACF,CAAA,MAAO;AACL,MAAA,MAAM,QAAA;AAAA,IACR;AAAA,EACF;AACF","file":"applyStreamingQuery-G2PA2SM7.cjs","sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _get = [0, \"/v2/functions/queries/{0}\", 2];\n/**\n * Gets a specific query type with the given API name. By default, this gets the latest version of the query.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}\n */\nexport function get($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _get, ...args);\n}\nconst _getByRid = [0, \"/v2/functions/queries/getByRid\", 2];\n/**\n * Gets a specific query type with the given RID. By default, this gets the latest version of the query.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRid\n */\nexport function getByRid($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRid, ...args);\n}\nconst _getByRidBatch = [1, \"/v2/functions/queries/getByRidBatch\", 3];\n/**\n * Gets a list of query types by RID in bulk. By default, this gets the latest version of each query.\n *\n * Queries are filtered from the response if they don't exist or the requesting token lacks the required\n * permissions.\n *\n * The maximum batch size for this endpoint is 100.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/getByRidBatch\n */\nexport function getByRidBatch($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getByRidBatch, ...args);\n}\nconst _execute = [1, \"/v2/functions/queries/{0}/execute\", 7];\n/**\n * Executes a Query using the given parameters. By default, this executes the latest version of the query.\n *\n * This endpoint is maintained for backward compatibility only.\n *\n * For all new implementations, use the `streamingExecute` endpoint, which supports all function types\n * and provides enhanced functionality.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}\nconst _streamingExecute = [1, \"/v2/functions/queries/{0}/streamingExecute\", 7,, \"application/octet-stream\"];\n/**\n * Executes a Query using the given parameters, returning results as an NDJSON stream. By default, this executes the latest version of the query.\n *\n * This endpoint supports all Query functions. The endpoint name 'streamingExecute' refers to the NDJSON\n * streaming response format. Both streaming and non-streaming functions can use this endpoint.\n * Non-streaming functions return a single-line NDJSON response, while streaming functions return multi-line NDJSON responses.\n * This is the recommended endpoint for all query execution.\n *\n * The response is returned as a binary stream in NDJSON (Newline Delimited JSON) format, where each line\n * is a StreamingExecuteQueryResponse containing either a data batch or an error.\n *\n * For a function returning a list of 5 records with a batch size of 3, the response stream would contain\n * two lines. The first line contains the first 3 items, and the second line contains the remaining 2 items:\n *\n * ```\n * {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-001\",\"price\":29.99},{\"productId\":\"SKU-002\",\"price\":49.99},{\"productId\":\"SKU-003\",\"price\":19.99}]}\n * {\"type\":\"data\",\"value\":[{\"productId\":\"SKU-004\",\"price\":39.99},{\"productId\":\"SKU-005\",\"price\":59.99}]}\n * ```\n *\n * Each line is a separate JSON object followed by a newline character. Clients should parse the stream\n * line-by-line to process results as they arrive. If an error occurs during execution, the stream will\n * contain an error line:\n *\n * ```\n * {\"type\":\"error\",\"errorCode\":\"INVALID_ARGUMENT\",\"errorName\":\"QueryRuntimeError\",\"errorInstanceId\":\"3f8a9c7b-2e4d-4a1f-9b8c-7d6e5f4a3b2c\",\"errorDescription\":\"Division by zero\",\"parameters\":{}}\n * ```\n *\n * @alpha\n *\n * Required Scopes: [api:functions-read]\n * URL: /v2/functions/queries/{queryApiName}/streamingExecute\n */\nexport function streamingExecute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _streamingExecute, ...args);\n}\nconst _executeAsync = [1, \"/v2/functions/queries/{0}/executeAsync\", 7];\n/**\n * Submits a Query for asynchronous execution. Returns either an execution ID\n * for polling, or the complete result if execution finished immediately.\n *\n * Use the Execution resource's getResult endpoint to poll for the\n * result of a submitted execution.\n *\n * @alpha\n *\n * Required Scopes: [api:functions-execute]\n * URL: /v2/functions/queries/{queryApiName}/executeAsync\n */\nexport function executeAsync($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _executeAsync, ...args);\n}","/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Functions from \"@osdk/foundry.functions/Query\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport { augmentRequestContext } from \"../util/augmentRequestContext.js\";\nimport { iterateReadableStream, parseNdjsonStream } from \"../util/streamutils.js\";\nimport { getRequiredDefinitions, remapQueryParams, remapQueryResponse } from \"./applyQuery.js\";\nexport async function* applyStreamingQuery(client, query, params) {\n const qd = await client.ontologyProvider.getQueryDefinition(query.apiName, query.isFixedVersion ? query.version : undefined);\n if (client.flushEdits != null) {\n await client.flushEdits();\n }\n const response = await Functions.streamingExecute(addUserAgentAndRequestContextHeaders(augmentRequestContext(client, _ => ({\n finalMethodCall: \"applyStreamingQuery\"\n })), query), query.apiName, {\n ontology: await client.ontologyRid,\n parameters: params ? await remapQueryParams(params, client, qd.parameters) : {},\n version: query.isFixedVersion ? query.version : undefined,\n branch: client.branch\n }, {\n transactionId: client.transactionId,\n preview: true\n });\n if (response.body == null) {\n throw new Error(\"streamingExecute returned no response body\");\n }\n const definitions = await getRequiredDefinitions(qd.output, client);\n const reader = response.body.getReader();\n for await (const line of parseNdjsonStream(iterateReadableStream(reader))) {\n if (line.type === \"error\") {\n const err = new Error(`${line.errorName} (${line.errorCode}) [${line.errorInstanceId}]: ${line.errorDescription ?? \"\"}`);\n Object.assign(err, line);\n throw err;\n }\n const remapped = await remapQueryResponse(client, qd.output, line.value, definitions);\n if (qd.output.type === \"array\" && Array.isArray(remapped)) {\n for (const item of remapped) {\n yield item;\n }\n } else {\n yield remapped;\n }\n }\n}"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZFNHWPQA_cjs = require('./chunk-ZFNHWPQA.cjs');
|
|
4
4
|
var chunkD26YLHTV_cjs = require('./chunk-D26YLHTV.cjs');
|
|
5
5
|
var shared_client_impl = require('@osdk/shared.client.impl');
|
|
6
6
|
var shared_net_fetch = require('@osdk/shared.net.fetch');
|
|
@@ -32,7 +32,7 @@ var augmentRequestContext = (client, augment2) => ({
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
35
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.61.0/node_modules/@osdk/foundry.ontologies/build/esm/public/OntologyObjectSet.js
|
|
36
36
|
var _createTemporary = [1, "/v2/ontologies/{0}/objectSets/createTemporary", 7];
|
|
37
37
|
function createTemporary($ctx, ...args) {
|
|
38
38
|
return chunkD26YLHTV_cjs.foundryPlatformFetch($ctx, _createTemporary, ...args);
|
|
@@ -399,7 +399,8 @@ async function fetchStaticRidPage(client, rids, args, useSnapshot = false) {
|
|
|
399
399
|
osdkMetadata: void 0
|
|
400
400
|
}), await client.ontologyRid, requestBody, {
|
|
401
401
|
preview: true,
|
|
402
|
-
transactionId: client.transactionId
|
|
402
|
+
transactionId: client.transactionId,
|
|
403
|
+
scenarioRid: client.scenarioRid
|
|
403
404
|
});
|
|
404
405
|
return Promise.resolve({
|
|
405
406
|
data: await client.objectFactory(client, result.data, void 0, {}, shouldLoadPropertySecurities ? result.propertySecurities : void 0, !args.$includeRid, args.$select, false, result.interfaceToObjectTypeMappings, result.interfaceToObjectTypeMappingsV2),
|
|
@@ -434,7 +435,8 @@ async function fetchInterfacePage(client, interfaceType, args, objectSet, useSna
|
|
|
434
435
|
const result = await loadMultipleObjectTypes(addUserAgentAndRequestContextHeaders(client, interfaceType), await client.ontologyRid, requestBody, {
|
|
435
436
|
preview: true,
|
|
436
437
|
branch: client.branch,
|
|
437
|
-
transactionId: client.transactionId
|
|
438
|
+
transactionId: client.transactionId,
|
|
439
|
+
scenarioRid: client.scenarioRid
|
|
438
440
|
});
|
|
439
441
|
return Promise.resolve({
|
|
440
442
|
data: await client.objectFactory(client, result.data, extractedInterfaceTypeApiName, {}, shouldLoadPropertySecurities ? result.propertySecurities : void 0, !args.$includeRid, args.$select, false, result.interfaceToObjectTypeMappings, result.interfaceToObjectTypeMappingsV2),
|
|
@@ -587,7 +589,8 @@ async function fetchObjectPage(client, objectType, args, objectSet, useSnapshot
|
|
|
587
589
|
}
|
|
588
590
|
const r = await load(addUserAgentAndRequestContextHeaders(client, objectType), await client.ontologyRid, requestBody, {
|
|
589
591
|
branch: client.branch,
|
|
590
|
-
transactionId: client.transactionId
|
|
592
|
+
transactionId: client.transactionId,
|
|
593
|
+
scenarioRid: client.scenarioRid
|
|
591
594
|
});
|
|
592
595
|
return Promise.resolve({
|
|
593
596
|
data: await client.objectFactory(client, r.data, void 0, await extractRdpDefinition(client, objectSet), shouldLoadPropertySecurities ? r.propertySecurities : void 0, !args.$includeRid, args.$select, false),
|
|
@@ -739,6 +742,7 @@ function modernToLegacyWhereClause(whereClause, objectOrInterface, rdpNames) {
|
|
|
739
742
|
const parts = Object.entries(whereClause).map(([key, value]) => ({
|
|
740
743
|
[key]: value
|
|
741
744
|
}));
|
|
745
|
+
!(parts.length > 0) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Cannot convert an empty where clause to a filter. Skip the .where() call entirely when no conditions are provided.") : invariant5__default.default(false) : void 0;
|
|
742
746
|
if (parts.length === 1) {
|
|
743
747
|
return modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames);
|
|
744
748
|
}
|
|
@@ -768,18 +772,37 @@ function modernToLegacyWhereClauseInner(whereClause, objectOrInterface, rdpNames
|
|
|
768
772
|
}
|
|
769
773
|
return handleWherePair(parts[0], objectOrInterface, void 0, rdpNames);
|
|
770
774
|
}
|
|
775
|
+
function resolvePropertyIdentifier(fieldName, objectOrInterface, isTitleProperty, isPrimaryKeyProperty, isRdp, structFieldSelector) {
|
|
776
|
+
if (isTitleProperty) {
|
|
777
|
+
return {
|
|
778
|
+
type: "titleProperty"
|
|
779
|
+
};
|
|
780
|
+
} else if (isPrimaryKeyProperty) {
|
|
781
|
+
return {
|
|
782
|
+
type: "primaryKeyProperty"
|
|
783
|
+
};
|
|
784
|
+
} else if (isRdp) {
|
|
785
|
+
return {
|
|
786
|
+
type: "property",
|
|
787
|
+
apiName: fieldName
|
|
788
|
+
};
|
|
789
|
+
} else if (structFieldSelector != null) {
|
|
790
|
+
return {
|
|
791
|
+
type: "structField",
|
|
792
|
+
...structFieldSelector,
|
|
793
|
+
propertyApiName: fullyQualifyPropName(structFieldSelector.propertyApiName, objectOrInterface)
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
return void 0;
|
|
797
|
+
}
|
|
771
798
|
function handleWherePair([fieldName, filter], objectOrInterface, structFieldSelector, rdpNames) {
|
|
772
799
|
!(filter != null) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Cannot filter on property "${fieldName}" with an undefined or null value. If the value might be undefined, check it before adding to the where clause.`) : invariant5__default.default(false) : void 0;
|
|
773
|
-
const
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
...structFieldSelector,
|
|
780
|
-
propertyApiName: fullyQualifyPropName(structFieldSelector.propertyApiName, objectOrInterface)
|
|
781
|
-
} : void 0;
|
|
782
|
-
const field = !isRdp && structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : void 0;
|
|
800
|
+
const isTitleProperty = fieldName === "$title";
|
|
801
|
+
const isPrimaryKeyProperty = fieldName === "$primaryKey";
|
|
802
|
+
const isSpecialProperty = isTitleProperty || isPrimaryKeyProperty;
|
|
803
|
+
const isRdp = !structFieldSelector && !isSpecialProperty && rdpNames?.has(fieldName);
|
|
804
|
+
const propertyIdentifier = resolvePropertyIdentifier(fieldName, objectOrInterface, isTitleProperty, isPrimaryKeyProperty, isRdp, structFieldSelector);
|
|
805
|
+
const field = !isRdp && !isSpecialProperty && structFieldSelector == null ? fullyQualifyPropName(fieldName, objectOrInterface) : void 0;
|
|
783
806
|
!(field == null || propertyIdentifier == null && (field != null || isRdp != null)) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Encountered error constructing where clause: field and propertyIdentifier cannot both be defined") : invariant5__default.default(false) : void 0;
|
|
784
807
|
if (typeof filter === "string" || typeof filter === "number" || typeof filter === "boolean") {
|
|
785
808
|
return {
|
|
@@ -965,6 +988,9 @@ function createWithPropertiesObjectSet(objectType, objectSet, definitionMap, fro
|
|
|
965
988
|
}, definitionMap);
|
|
966
989
|
},
|
|
967
990
|
where: (clause) => {
|
|
991
|
+
if (clause == null || Object.keys(clause).length === 0) {
|
|
992
|
+
return createWithPropertiesObjectSet(objectType, objectSet, definitionMap);
|
|
993
|
+
}
|
|
968
994
|
const rdpNames = new Set(definitionMap.keys());
|
|
969
995
|
return createWithPropertiesObjectSet(objectType, {
|
|
970
996
|
type: "filter",
|
|
@@ -1177,7 +1203,8 @@ async function aggregate2(clientCtx, objectType, objectSet = resolveBaseObjectSe
|
|
|
1177
1203
|
aggregation: body.aggregation
|
|
1178
1204
|
}, {
|
|
1179
1205
|
branch: clientCtx.branch,
|
|
1180
|
-
transactionId: clientCtx.transactionId
|
|
1206
|
+
transactionId: clientCtx.transactionId,
|
|
1207
|
+
scenarioRid: clientCtx.scenarioRid
|
|
1181
1208
|
});
|
|
1182
1209
|
if (!result.data || !Array.isArray(result.data)) {
|
|
1183
1210
|
throw new Error(`Aggregation request failed: ${JSON.stringify(result)}`);
|
|
@@ -1301,6 +1328,9 @@ function createObjectSet(objectType, clientCtx, objectSet = resolveBaseObjectSet
|
|
|
1301
1328
|
finalMethodCall: "fetchPageWithErrors"
|
|
1302
1329
|
})), objectType, objectSet),
|
|
1303
1330
|
where: (clause) => {
|
|
1331
|
+
if (clause == null || Object.keys(clause).length === 0) {
|
|
1332
|
+
return clientCtx.objectSetFactory(objectType, clientCtx, objectSet);
|
|
1333
|
+
}
|
|
1304
1334
|
return clientCtx.objectSetFactory(objectType, clientCtx, {
|
|
1305
1335
|
type: "filter",
|
|
1306
1336
|
objectSet,
|
|
@@ -1455,7 +1485,7 @@ function isTextQuery(query) {
|
|
|
1455
1485
|
return typeof query === "string";
|
|
1456
1486
|
}
|
|
1457
1487
|
|
|
1458
|
-
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.
|
|
1488
|
+
// ../../node_modules/.pnpm/@osdk+foundry.ontologies@2.61.0/node_modules/@osdk/foundry.ontologies/build/esm/public/Attachment.js
|
|
1459
1489
|
var _upload = [1, "/v2/ontologies/attachments/upload", 7, "*/*"];
|
|
1460
1490
|
function upload($ctx, ...args) {
|
|
1461
1491
|
const headerParams = {
|
|
@@ -1507,14 +1537,14 @@ function createMediaFromReferenceInternal(client, mediaReference) {
|
|
|
1507
1537
|
const token = mediaReference.reference.mediaSetViewItem.token;
|
|
1508
1538
|
return {
|
|
1509
1539
|
async fetchContents() {
|
|
1510
|
-
return
|
|
1540
|
+
return chunkZFNHWPQA_cjs.MediaSet_exports.read(client, mediaSetRid, mediaItemRid, {
|
|
1511
1541
|
preview: true
|
|
1512
1542
|
}, token ? {
|
|
1513
1543
|
ReadToken: token
|
|
1514
1544
|
} : void 0);
|
|
1515
1545
|
},
|
|
1516
1546
|
async fetchMetadata() {
|
|
1517
|
-
const info = await
|
|
1547
|
+
const info = await chunkZFNHWPQA_cjs.MediaSet_exports.info(client, mediaSetRid, mediaItemRid, {
|
|
1518
1548
|
preview: true
|
|
1519
1549
|
}, token ? {
|
|
1520
1550
|
ReadToken: token
|
|
@@ -1555,5 +1585,5 @@ exports.hydrateAttachmentFromRidInternal = hydrateAttachmentFromRidInternal;
|
|
|
1555
1585
|
exports.isObjectSet = isObjectSet;
|
|
1556
1586
|
exports.isWireObjectSet = isWireObjectSet;
|
|
1557
1587
|
exports.upload = upload;
|
|
1558
|
-
//# sourceMappingURL=chunk-
|
|
1559
|
-
//# sourceMappingURL=chunk-
|
|
1588
|
+
//# sourceMappingURL=chunk-BV6P25ZM.cjs.map
|
|
1589
|
+
//# sourceMappingURL=chunk-BV6P25ZM.cjs.map
|