@osdk/client 2.9.1-main-2bb6860bcbee545671e80a8a8606eec12b0c8f56 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -10
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{chunk-LSX6IT7S.cjs → chunk-3JNAYKXD.cjs} +39 -39
- package/build/cjs/chunk-3JNAYKXD.cjs.map +1 -0
- package/build/cjs/{chunk-25GFAOXO.cjs → chunk-BDPNDEZU.cjs} +2 -2
- package/build/cjs/{chunk-25GFAOXO.cjs.map → chunk-BDPNDEZU.cjs.map} +1 -1
- package/build/cjs/index.cjs +10 -10
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +73 -73
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/Client.d.ts +1 -1
- package/package.json +9 -9
- package/build/cjs/chunk-LSX6IT7S.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
# @osdk/client
|
|
2
2
|
|
|
3
|
-
## 2.
|
|
3
|
+
## 2.10.0
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Minor Changes
|
|
6
6
|
|
|
7
7
|
- 29ab35a: Use workspace:^ for peer dependencies to prevent changesets from propagating major bumps when a peer dep receives a minor version change. The internal codegen (`osdk-unstable-typescript generate --internal`) now emits `workspace:^` for peer deps while keeping `workspace:~` for regular/dev deps.
|
|
8
8
|
- 0fb9c8a: fix invalidateObjectType to match queries where the result type differs from apiName (e.g. link traversal queries)
|
|
9
9
|
- f01a8f4: improvements(build): significant reduction in build task graphs
|
|
10
10
|
- f34a1ce: prevent streamUpdates from being used with pivotTo since the server does not support websocket subscriptions for link-traversal queries
|
|
11
11
|
- 7e7f70b: Fix sorting on ObjectTable when the object set contains a reference type (e.g., intersect with a temporary object set)
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
12
15
|
- Updated dependencies [f01a8f4]
|
|
13
|
-
- @osdk/client.test.ontology@2.
|
|
14
|
-
- @osdk/generator-converters@2.
|
|
15
|
-
- @osdk/shared.client.impl@1.
|
|
16
|
-
- @osdk/shared.net.errors@2.
|
|
17
|
-
- @osdk/shared.net.fetch@1.
|
|
18
|
-
- @osdk/client.unstable@2.
|
|
19
|
-
- @osdk/shared.test@2.
|
|
20
|
-
- @osdk/api@2.
|
|
16
|
+
- @osdk/client.test.ontology@2.10.0
|
|
17
|
+
- @osdk/generator-converters@2.10.0
|
|
18
|
+
- @osdk/shared.client.impl@1.10.0
|
|
19
|
+
- @osdk/shared.net.errors@2.9.0
|
|
20
|
+
- @osdk/shared.net.fetch@1.9.0
|
|
21
|
+
- @osdk/client.unstable@2.10.0
|
|
22
|
+
- @osdk/shared.test@2.9.0
|
|
23
|
+
- @osdk/api@2.10.0
|
|
21
24
|
|
|
22
25
|
## 2.9.0
|
|
23
26
|
|
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.10.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\";\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> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n )\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends (InterfaceDefinition)>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends ActionDefinition<any>>(\n o: Q,\n ): ActionSignatureFromDef<Q>;\n\n <Q extends QueryDefinition<any>>(\n o: Q,\n ): QuerySignatureFromDef<Q>;\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 >(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n fetchMetadata<\n Q extends (\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>\n ),\n >(o: Q): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? 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\";\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> = Q extends VersionBound<infer V> ? (\n SatisfiesSemver<V, MaxOsdkVersion> extends true ? Q\n : Q & {\n [ErrorMessage]:\n `Your SDK requires a semver compatible version with ${V}. You have ${MaxOsdkVersion}. Update your package.json`;\n }\n )\n : Q;\n\nexport interface Client extends SharedClient, OldSharedClient {\n <Q extends ObjectTypeDefinition>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? ObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends (InterfaceDefinition)>(\n o: Q,\n ): unknown extends CompileTimeMetadata<Q>[\"objectSet\"] ? MinimalObjectSet<Q>\n : CompileTimeMetadata<Q>[\"objectSet\"];\n\n <Q extends ActionDefinition<any>>(\n o: Q,\n ): ActionSignatureFromDef<Q>;\n\n <Q extends QueryDefinition<any>>(\n o: Q,\n ): QuerySignatureFromDef<Q>;\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 >(\n experiment: Q,\n ): ExperimentFns<Q>;\n\n fetchMetadata<\n Q extends (\n | ObjectTypeDefinition\n | InterfaceDefinition\n | ActionDefinition<any>\n | QueryDefinition<any>\n ),\n >(o: Q): Promise<\n Q extends ObjectTypeDefinition ? ObjectMetadata\n : Q extends InterfaceDefinition ? InterfaceMetadata\n : Q extends ActionDefinition<any> ? ActionMetadata\n : Q extends QueryDefinition<any> ? 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.10.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;;AA0BA;;AA4DA;AACA;AACA,OAAO,MAAMA,iBAAgC,GAAGC,MAAM,CAAC,mBAAmB,CAAC;;AAE3E;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B;;AAEA,MAAMC,YAA2B,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export const USER_AGENT = `osdk-client/${"2.
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.10.0"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.10.0"}`;
|
|
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 =\n `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 =\n `osdk-observable-client/${process.env.PACKAGE_VERSION}`;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,UAAkB,GAAG,yBAA4C;AAC9E,OAAO,MAAMC,qBAA6B,GACxC,oCAAuD","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkBDPNDEZU_cjs = require('./chunk-BDPNDEZU.cjs');
|
|
4
4
|
var chunkDOXHU27E_cjs = require('./chunk-DOXHU27E.cjs');
|
|
5
5
|
var chunkYJG67XL4_cjs = require('./chunk-YJG67XL4.cjs');
|
|
6
6
|
var chunkZPLXXOU6_cjs = require('./chunk-ZPLXXOU6.cjs');
|
|
@@ -115,13 +115,13 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
115
115
|
return Promise.all(promiseArray);
|
|
116
116
|
}
|
|
117
117
|
if (isAttachmentUpload(value)) {
|
|
118
|
-
const attachment = await
|
|
118
|
+
const attachment = await chunkBDPNDEZU_cjs.upload(client, value.data, {
|
|
119
119
|
filename: value.name
|
|
120
120
|
});
|
|
121
121
|
return await toDataValue(attachment.rid, client);
|
|
122
122
|
}
|
|
123
123
|
if (isAttachmentFile(value)) {
|
|
124
|
-
const attachment = await
|
|
124
|
+
const attachment = await chunkBDPNDEZU_cjs.upload(client, value, {
|
|
125
125
|
filename: value.name
|
|
126
126
|
});
|
|
127
127
|
return await toDataValue(attachment.rid, client);
|
|
@@ -148,11 +148,11 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
148
148
|
if (isPoint(value)) {
|
|
149
149
|
return await toDataValue(`${value.coordinates[1]},${value.coordinates[0]}`, client);
|
|
150
150
|
}
|
|
151
|
-
if (
|
|
151
|
+
if (chunkBDPNDEZU_cjs.isWireObjectSet(value)) {
|
|
152
152
|
return value;
|
|
153
153
|
}
|
|
154
|
-
if (
|
|
155
|
-
return
|
|
154
|
+
if (chunkBDPNDEZU_cjs.isObjectSet(value)) {
|
|
155
|
+
return chunkBDPNDEZU_cjs.getWireObjectSet(value);
|
|
156
156
|
}
|
|
157
157
|
if (isInterfaceActionParam(value)) {
|
|
158
158
|
return {
|
|
@@ -172,7 +172,7 @@ async function toDataValue(value, client, actionMetadata) {
|
|
|
172
172
|
|
|
173
173
|
// src/actions/applyAction.ts
|
|
174
174
|
async function applyAction(client, action, parameters, options = {}) {
|
|
175
|
-
const clientWithHeaders =
|
|
175
|
+
const clientWithHeaders = chunkBDPNDEZU_cjs.addUserAgentAndRequestContextHeaders(chunkBDPNDEZU_cjs.augmentRequestContext(client, (_) => ({
|
|
176
176
|
finalMethodCall: "applyAction"
|
|
177
177
|
})), action);
|
|
178
178
|
if (Array.isArray(parameters)) {
|
|
@@ -903,8 +903,8 @@ function get$link(holder) {
|
|
|
903
903
|
[objDef.primaryKeyApiName]: rawObj.$primaryKey
|
|
904
904
|
}).pivotTo(linkName);
|
|
905
905
|
const value = !linkDef.multiplicity ? {
|
|
906
|
-
fetchOne: (options) =>
|
|
907
|
-
fetchOneWithErrors: (options) =>
|
|
906
|
+
fetchOne: (options) => chunkBDPNDEZU_cjs.fetchSingle(client, objDef, options ?? {}, chunkBDPNDEZU_cjs.getWireObjectSet(objectSet)),
|
|
907
|
+
fetchOneWithErrors: (options) => chunkBDPNDEZU_cjs.fetchSingleWithErrors(client, objDef, options ?? {}, chunkBDPNDEZU_cjs.getWireObjectSet(objectSet))
|
|
908
908
|
} : objectSet;
|
|
909
909
|
return [linkName, value];
|
|
910
910
|
})));
|
|
@@ -927,8 +927,8 @@ function get$linkForInterface(holder) {
|
|
|
927
927
|
apiName: linkDef.targetTypeApiName
|
|
928
928
|
};
|
|
929
929
|
const value = !linkDef.multiplicity ? {
|
|
930
|
-
fetchOne: (options) =>
|
|
931
|
-
fetchOneWithErrors: (options) =>
|
|
930
|
+
fetchOne: (options) => chunkBDPNDEZU_cjs.fetchSingle(client, linkTargetDef, options ?? {}, chunkBDPNDEZU_cjs.getWireObjectSet(objectSet)),
|
|
931
|
+
fetchOneWithErrors: (options) => chunkBDPNDEZU_cjs.fetchSingleWithErrors(client, linkTargetDef, options ?? {}, chunkBDPNDEZU_cjs.getWireObjectSet(objectSet))
|
|
932
932
|
} : objectSet;
|
|
933
933
|
return [linkName, value];
|
|
934
934
|
})));
|
|
@@ -936,7 +936,7 @@ function get$linkForInterface(holder) {
|
|
|
936
936
|
|
|
937
937
|
// src/object/convertWireToOsdkObjects/createOsdkInterface.ts
|
|
938
938
|
function createOsdkInterface(underlying, interfaceDef) {
|
|
939
|
-
const [objApiNamespace] =
|
|
939
|
+
const [objApiNamespace] = chunkBDPNDEZU_cjs.extractNamespace(interfaceDef.apiName);
|
|
940
940
|
return Object.freeze(Object.defineProperties({}, {
|
|
941
941
|
// first to minimize hidden classes
|
|
942
942
|
[UnderlyingOsdkObject]: {
|
|
@@ -999,7 +999,7 @@ function createOsdkInterface(underlying, interfaceDef) {
|
|
|
999
999
|
},
|
|
1000
1000
|
...Object.fromEntries(Object.keys(interfaceDef.properties).map((p) => {
|
|
1001
1001
|
const objDef = underlying[ObjectDefRef];
|
|
1002
|
-
const [apiNamespace, apiName] =
|
|
1002
|
+
const [apiNamespace, apiName] = chunkBDPNDEZU_cjs.extractNamespace(p);
|
|
1003
1003
|
const targetPropName = objDef.interfaceMap[interfaceDef.apiName][p];
|
|
1004
1004
|
return [apiNamespace === objApiNamespace ? apiName : p, {
|
|
1005
1005
|
enumerable: targetPropName in underlying,
|
|
@@ -1174,9 +1174,9 @@ function modifyRdpProperties(client, derivedPropertyTypeByName, rawValue, propKe
|
|
|
1174
1174
|
switch (derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType?.type) {
|
|
1175
1175
|
case "attachment":
|
|
1176
1176
|
if (Array.isArray(rawValue)) {
|
|
1177
|
-
return rawValue.map((a) =>
|
|
1177
|
+
return rawValue.map((a) => chunkBDPNDEZU_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1178
1178
|
} else {
|
|
1179
|
-
return
|
|
1179
|
+
return chunkBDPNDEZU_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1180
1180
|
}
|
|
1181
1181
|
default:
|
|
1182
1182
|
process.env.NODE_ENV !== "production" ? invariant__default.default(false, "Derived property aggregations for Timeseries and Media are not supported") : invariant__default.default(false) ;
|
|
@@ -1192,9 +1192,9 @@ function createSpecialProperty(client, objectDef, rawObject, p) {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
if (propDef.type === "attachment") {
|
|
1194
1194
|
if (Array.isArray(rawValue)) {
|
|
1195
|
-
return rawValue.map((a) =>
|
|
1195
|
+
return rawValue.map((a) => chunkBDPNDEZU_cjs.hydrateAttachmentFromRidInternal(client, a.rid));
|
|
1196
1196
|
}
|
|
1197
|
-
return
|
|
1197
|
+
return chunkBDPNDEZU_cjs.hydrateAttachmentFromRidInternal(client, rawValue.rid);
|
|
1198
1198
|
}
|
|
1199
1199
|
if (propDef.type === "numericTimeseries" || propDef.type === "stringTimeseries" || propDef.type === "sensorTimeseries") {
|
|
1200
1200
|
return new TimeSeriesPropertyImpl(client, objectDef.apiName, rawObject[objectDef.primaryKeyApiName], p);
|
|
@@ -1527,7 +1527,7 @@ async function loadFullObjectMetadata(client, objectType) {
|
|
|
1527
1527
|
|
|
1528
1528
|
// src/ontology/loadInterfaceMetadata.ts
|
|
1529
1529
|
async function loadInterfaceMetadata(client, objectType) {
|
|
1530
|
-
const r = await
|
|
1530
|
+
const r = await chunkBDPNDEZU_cjs.get(client, await client.ontologyRid, objectType, {
|
|
1531
1531
|
preview: true,
|
|
1532
1532
|
branch: client.branch
|
|
1533
1533
|
});
|
|
@@ -1606,11 +1606,11 @@ var createStandardOntologyProviderFactory = (client) => {
|
|
|
1606
1606
|
};
|
|
1607
1607
|
|
|
1608
1608
|
// src/util/UserAgent.ts
|
|
1609
|
-
var USER_AGENT = `osdk-client/${"2.
|
|
1610
|
-
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.
|
|
1609
|
+
var USER_AGENT = `osdk-client/${"2.10.0"}`;
|
|
1610
|
+
var OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.10.0"}`;
|
|
1611
1611
|
|
|
1612
1612
|
// src/createMinimalClient.ts
|
|
1613
|
-
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory =
|
|
1613
|
+
function createMinimalClient(metadata, baseUrl, tokenProvider, options = {}, fetchFn = global.fetch, objectSetFactory = chunkBDPNDEZU_cjs.createObjectSet, createOntologyProviderFactory = createStandardOntologyProviderFactory) {
|
|
1614
1614
|
if (process.env.NODE_ENV !== "production") {
|
|
1615
1615
|
try {
|
|
1616
1616
|
new URL(baseUrl);
|
|
@@ -2253,13 +2253,13 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2253
2253
|
switch (desiredType.type) {
|
|
2254
2254
|
case "attachment": {
|
|
2255
2255
|
if (isAttachmentUpload(value)) {
|
|
2256
|
-
const attachment = await
|
|
2256
|
+
const attachment = await chunkBDPNDEZU_cjs.upload(client, value.data, {
|
|
2257
2257
|
filename: value.name
|
|
2258
2258
|
});
|
|
2259
2259
|
return attachment.rid;
|
|
2260
2260
|
}
|
|
2261
2261
|
if (isAttachmentFile(value)) {
|
|
2262
|
-
const attachment = await
|
|
2262
|
+
const attachment = await chunkBDPNDEZU_cjs.upload(client, value, {
|
|
2263
2263
|
filename: value.name
|
|
2264
2264
|
});
|
|
2265
2265
|
return attachment.rid;
|
|
@@ -2315,11 +2315,11 @@ async function toDataValueQueries(value, client, desiredType) {
|
|
|
2315
2315
|
}
|
|
2316
2316
|
case "objectSet":
|
|
2317
2317
|
case "interfaceObjectSet": {
|
|
2318
|
-
if (
|
|
2318
|
+
if (chunkBDPNDEZU_cjs.isWireObjectSet(value)) {
|
|
2319
2319
|
return value;
|
|
2320
2320
|
}
|
|
2321
|
-
if (
|
|
2322
|
-
return
|
|
2321
|
+
if (chunkBDPNDEZU_cjs.isObjectSet(value)) {
|
|
2322
|
+
return chunkBDPNDEZU_cjs.getWireObjectSet(value);
|
|
2323
2323
|
}
|
|
2324
2324
|
break;
|
|
2325
2325
|
}
|
|
@@ -2364,7 +2364,7 @@ async function applyQuery(client, query, params) {
|
|
|
2364
2364
|
if (client.flushEdits != null) {
|
|
2365
2365
|
await client.flushEdits();
|
|
2366
2366
|
}
|
|
2367
|
-
const response = await execute(
|
|
2367
|
+
const response = await execute(chunkBDPNDEZU_cjs.addUserAgentAndRequestContextHeaders(chunkBDPNDEZU_cjs.augmentRequestContext(client, (_) => ({
|
|
2368
2368
|
finalMethodCall: "applyQuery"
|
|
2369
2369
|
})), query), await client.ontologyRid, query.apiName, {
|
|
2370
2370
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
@@ -2409,7 +2409,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2409
2409
|
return responseValue;
|
|
2410
2410
|
}
|
|
2411
2411
|
case "attachment": {
|
|
2412
|
-
return
|
|
2412
|
+
return chunkBDPNDEZU_cjs.hydrateAttachmentFromRidInternal(client, responseValue);
|
|
2413
2413
|
}
|
|
2414
2414
|
case "mediaReference": {
|
|
2415
2415
|
return createMediaFromReference(client, responseValue);
|
|
@@ -2434,7 +2434,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2434
2434
|
throw new Error(`Missing definition for ${responseDataType.objectSet}`);
|
|
2435
2435
|
}
|
|
2436
2436
|
if (typeof responseValue === "string") {
|
|
2437
|
-
return
|
|
2437
|
+
return chunkBDPNDEZU_cjs.createObjectSet(def, client, {
|
|
2438
2438
|
type: "intersect",
|
|
2439
2439
|
objectSets: [{
|
|
2440
2440
|
type: "base",
|
|
@@ -2445,7 +2445,7 @@ async function remapQueryResponse(client, responseDataType, responseValue, defin
|
|
|
2445
2445
|
}]
|
|
2446
2446
|
});
|
|
2447
2447
|
}
|
|
2448
|
-
return
|
|
2448
|
+
return chunkBDPNDEZU_cjs.createObjectSet(def, client, responseValue);
|
|
2449
2449
|
}
|
|
2450
2450
|
case "struct": {
|
|
2451
2451
|
for (const [key, subtype] of Object.entries(responseDataType.struct)) {
|
|
@@ -2640,7 +2640,7 @@ function createClientInternal(objectSetFactory, transactionRid, flushEdits, base
|
|
|
2640
2640
|
ontologyRid
|
|
2641
2641
|
}, baseUrl, tokenProvider, {
|
|
2642
2642
|
...options,
|
|
2643
|
-
logger: options?.logger ?? new
|
|
2643
|
+
logger: options?.logger ?? new chunkBDPNDEZU_cjs.MinimalLogger(),
|
|
2644
2644
|
transactionId: transactionRid,
|
|
2645
2645
|
flushEdits,
|
|
2646
2646
|
branch: options?.UNSTABLE_DO_NOT_USE_BRANCH
|
|
@@ -2669,7 +2669,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2669
2669
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchOneByRid.name:
|
|
2670
2670
|
return {
|
|
2671
2671
|
fetchOneByRid: async (objectType, rid, options) => {
|
|
2672
|
-
return await
|
|
2672
|
+
return await chunkBDPNDEZU_cjs.fetchSingle(clientCtx, objectType, options, createWithRid([rid]));
|
|
2673
2673
|
}
|
|
2674
2674
|
};
|
|
2675
2675
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__createMediaReference.name:
|
|
@@ -2693,10 +2693,10 @@ function createClientFromContext(clientCtx) {
|
|
|
2693
2693
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__fetchPageByRid.name:
|
|
2694
2694
|
return {
|
|
2695
2695
|
fetchPageByRid: async (objectOrInterfaceType, rids, options = {}) => {
|
|
2696
|
-
return await
|
|
2696
|
+
return await chunkBDPNDEZU_cjs.fetchPage(clientCtx, objectOrInterfaceType, options, createWithRid(rids));
|
|
2697
2697
|
},
|
|
2698
2698
|
fetchPageByRidNoType: async (rids, options) => {
|
|
2699
|
-
return await
|
|
2699
|
+
return await chunkBDPNDEZU_cjs.fetchStaticRidPage(clientCtx, rids, options ?? {});
|
|
2700
2700
|
}
|
|
2701
2701
|
};
|
|
2702
2702
|
case unstable.__EXPERIMENTAL__NOT_SUPPORTED_YET__transformAndWait.name:
|
|
@@ -2728,7 +2728,7 @@ function createClientFromContext(clientCtx) {
|
|
|
2728
2728
|
[symbolClientContext2]: {
|
|
2729
2729
|
value: clientCtx
|
|
2730
2730
|
},
|
|
2731
|
-
[
|
|
2731
|
+
[chunkBDPNDEZU_cjs.additionalContext]: {
|
|
2732
2732
|
value: clientCtx
|
|
2733
2733
|
},
|
|
2734
2734
|
fetchMetadata: {
|
|
@@ -2737,8 +2737,8 @@ function createClientFromContext(clientCtx) {
|
|
|
2737
2737
|
});
|
|
2738
2738
|
return client;
|
|
2739
2739
|
}
|
|
2740
|
-
var createClient = createClientInternal.bind(void 0,
|
|
2741
|
-
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(
|
|
2740
|
+
var createClient = createClientInternal.bind(void 0, chunkBDPNDEZU_cjs.createObjectSet, void 0, void 0);
|
|
2741
|
+
var createClientWithTransaction = (transactionRid, flushEdits, ...args) => createClientInternal(chunkBDPNDEZU_cjs.createObjectSet, transactionRid, flushEdits, ...args);
|
|
2742
2742
|
function createWithRid(rids) {
|
|
2743
2743
|
const withRid = {
|
|
2744
2744
|
type: "static",
|
|
@@ -2763,5 +2763,5 @@ exports.createOsdkObject = createOsdkObject;
|
|
|
2763
2763
|
exports.extractPrimaryKeyFromObjectSpecifier = extractPrimaryKeyFromObjectSpecifier;
|
|
2764
2764
|
exports.getDefType = getDefType;
|
|
2765
2765
|
exports.isObjectSpecifiersObject = isObjectSpecifiersObject;
|
|
2766
|
-
//# sourceMappingURL=chunk-
|
|
2767
|
-
//# sourceMappingURL=chunk-
|
|
2766
|
+
//# sourceMappingURL=chunk-3JNAYKXD.cjs.map
|
|
2767
|
+
//# sourceMappingURL=chunk-3JNAYKXD.cjs.map
|