@osdk/client 2.19.0-main-73738dd57a52bd5beea4cbf6b5c301c9b8efcc2f → 2.19.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 +6 -6
- package/build/browser/util/UserAgent.js +2 -2
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{chunk-543FZFOF.cjs → chunk-G3UU3X6L.cjs} +24 -24
- package/build/cjs/{chunk-543FZFOF.cjs.map → chunk-G3UU3X6L.cjs.map} +1 -1
- package/build/cjs/{chunk-FIUT24OU.cjs → chunk-WPIA6534.cjs} +4 -4
- package/build/cjs/chunk-WPIA6534.cjs.map +1 -0
- package/build/cjs/index.cjs +7 -7
- package/build/cjs/public/experimental.cjs +3 -3
- package/build/cjs/public/observable.cjs +3 -3
- package/build/cjs/public/unstable-do-not-use.cjs +4 -4
- package/build/esm/util/UserAgent.js +2 -2
- package/build/esm/util/UserAgent.js.map +1 -1
- package/package.json +6 -6
- package/build/cjs/chunk-FIUT24OU.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# @osdk/client
|
|
2
2
|
|
|
3
|
-
## 2.19.0
|
|
3
|
+
## 2.19.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
+
- 02c796c: Array Reducers and Struct Main Value support
|
|
7
8
|
- 2a2b672: Add `@osdk/client/experimental` entry point exposing `createClientWithTransaction` and a new `createClientFromWriteableClient` that clones a writeable client's base URL, ontology, token provider, and transaction id while discarding its fetch implementation.
|
|
8
9
|
- d962309: Add ability to subscribe to an object set RID without a type, experimentally.
|
|
9
10
|
|
|
10
11
|
### Patch Changes
|
|
11
12
|
|
|
12
|
-
- 02c796c: Array Reducers and Struct Main Value support
|
|
13
13
|
- Updated dependencies [02c796c]
|
|
14
14
|
- Updated dependencies [d962309]
|
|
15
|
-
- @osdk/generator-converters@2.19.0
|
|
16
|
-
- @osdk/shared.test@2.
|
|
17
|
-
- @osdk/api@2.19.0
|
|
18
|
-
- @osdk/client.unstable@2.19.0
|
|
15
|
+
- @osdk/generator-converters@2.19.0
|
|
16
|
+
- @osdk/shared.test@2.15.0
|
|
17
|
+
- @osdk/api@2.19.0
|
|
18
|
+
- @osdk/client.unstable@2.19.0
|
|
19
19
|
|
|
20
20
|
## 2.18.0
|
|
21
21
|
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export const USER_AGENT = `osdk-client/${"2.19.0
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.19.0
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.19.0"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.19.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 chunkWPIA6534_cjs = require('./chunk-WPIA6534.cjs');
|
|
4
4
|
var chunkXXFWZX4V_cjs = require('./chunk-XXFWZX4V.cjs');
|
|
5
5
|
var chunkDOXHU27E_cjs = require('./chunk-DOXHU27E.cjs');
|
|
6
6
|
var shared_net_fetch = require('@osdk/shared.net.fetch');
|
|
@@ -1468,7 +1468,7 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1468
1468
|
path.push("$:map_end");
|
|
1469
1469
|
return arr;
|
|
1470
1470
|
}
|
|
1471
|
-
if (
|
|
1471
|
+
if (chunkWPIA6534_cjs.isObjectSpecifiersObject(value)) {
|
|
1472
1472
|
const objectType = value.$objectType ?? value.$apiName;
|
|
1473
1473
|
path.push("$:osdk", objectType, value.$primaryKey);
|
|
1474
1474
|
return {
|
|
@@ -1594,7 +1594,7 @@ var FunctionQuery = class extends Query {
|
|
|
1594
1594
|
}).debug("calling _fetchAndStore");
|
|
1595
1595
|
}
|
|
1596
1596
|
try {
|
|
1597
|
-
const result = await
|
|
1597
|
+
const result = await chunkWPIA6534_cjs.applyQuery(this.store.client[chunkXXFWZX4V_cjs.additionalContext], this.#queryDef, this.#params);
|
|
1598
1598
|
const executedAt = Date.now();
|
|
1599
1599
|
this.store.batch({}, (batch) => {
|
|
1600
1600
|
this.writeToStore({
|
|
@@ -3527,7 +3527,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3527
3527
|
}
|
|
3528
3528
|
extractRelevantObjects(changes) {
|
|
3529
3529
|
const matchesApiName = ([, object]) => {
|
|
3530
|
-
return this.apiName in object[
|
|
3530
|
+
return this.apiName in object[chunkWPIA6534_cjs.ObjectDefRef].interfaceMap;
|
|
3531
3531
|
};
|
|
3532
3532
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
3533
3533
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
@@ -4138,8 +4138,8 @@ function stripRdpFields(value, rdpFields) {
|
|
|
4138
4138
|
if (rdpFields.size === 0) {
|
|
4139
4139
|
return value;
|
|
4140
4140
|
}
|
|
4141
|
-
const underlying = value[
|
|
4142
|
-
const objectDef = value[
|
|
4141
|
+
const underlying = value[chunkWPIA6534_cjs.UnderlyingOsdkObject];
|
|
4142
|
+
const objectDef = value[chunkWPIA6534_cjs.ObjectDefRef];
|
|
4143
4143
|
const newProps = {
|
|
4144
4144
|
$apiName: underlying.$apiName,
|
|
4145
4145
|
$objectType: underlying.$objectType,
|
|
@@ -4152,7 +4152,7 @@ function stripRdpFields(value, rdpFields) {
|
|
|
4152
4152
|
newProps[key] = underlying[key];
|
|
4153
4153
|
}
|
|
4154
4154
|
}
|
|
4155
|
-
return
|
|
4155
|
+
return chunkWPIA6534_cjs.createOsdkObject(value[chunkWPIA6534_cjs.ClientRef], objectDef, newProps);
|
|
4156
4156
|
}
|
|
4157
4157
|
function isSuperset(superset, subset) {
|
|
4158
4158
|
for (const field of subset) {
|
|
@@ -4163,8 +4163,8 @@ function isSuperset(superset, subset) {
|
|
|
4163
4163
|
return true;
|
|
4164
4164
|
}
|
|
4165
4165
|
function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
4166
|
-
const underlying = value[
|
|
4167
|
-
const objectDef = value[
|
|
4166
|
+
const underlying = value[chunkWPIA6534_cjs.UnderlyingOsdkObject];
|
|
4167
|
+
const objectDef = value[chunkWPIA6534_cjs.ObjectDefRef];
|
|
4168
4168
|
const newProps = {
|
|
4169
4169
|
$apiName: underlying.$apiName,
|
|
4170
4170
|
$objectType: underlying.$objectType,
|
|
@@ -4180,12 +4180,12 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
|
4180
4180
|
}
|
|
4181
4181
|
}
|
|
4182
4182
|
}
|
|
4183
|
-
return
|
|
4183
|
+
return chunkWPIA6534_cjs.createOsdkObject(value[chunkWPIA6534_cjs.ClientRef], objectDef, newProps);
|
|
4184
4184
|
}
|
|
4185
4185
|
function mergeSelectFields(sourceValue, selectFields, existingValue) {
|
|
4186
|
-
const sourceUnderlying = sourceValue[
|
|
4187
|
-
const existingUnderlying = existingValue[
|
|
4188
|
-
const objectDef = sourceValue[
|
|
4186
|
+
const sourceUnderlying = sourceValue[chunkWPIA6534_cjs.UnderlyingOsdkObject];
|
|
4187
|
+
const existingUnderlying = existingValue[chunkWPIA6534_cjs.UnderlyingOsdkObject];
|
|
4188
|
+
const objectDef = sourceValue[chunkWPIA6534_cjs.ObjectDefRef];
|
|
4189
4189
|
const newProps = {
|
|
4190
4190
|
$apiName: sourceUnderlying.$apiName,
|
|
4191
4191
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -4203,7 +4203,7 @@ function mergeSelectFields(sourceValue, selectFields, existingValue) {
|
|
|
4203
4203
|
newProps[key] = sourceUnderlying[key];
|
|
4204
4204
|
}
|
|
4205
4205
|
}
|
|
4206
|
-
return
|
|
4206
|
+
return chunkWPIA6534_cjs.createOsdkObject(sourceValue[chunkWPIA6534_cjs.ClientRef], objectDef, newProps);
|
|
4207
4207
|
}
|
|
4208
4208
|
function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
|
|
4209
4209
|
if (targetRdpFields.size === 0) {
|
|
@@ -4215,8 +4215,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
4215
4215
|
}
|
|
4216
4216
|
return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
|
|
4217
4217
|
}
|
|
4218
|
-
const sourceUnderlying = sourceValue[
|
|
4219
|
-
const objectDef = sourceValue[
|
|
4218
|
+
const sourceUnderlying = sourceValue[chunkWPIA6534_cjs.UnderlyingOsdkObject];
|
|
4219
|
+
const objectDef = sourceValue[chunkWPIA6534_cjs.ObjectDefRef];
|
|
4220
4220
|
const newProps = {
|
|
4221
4221
|
$apiName: sourceUnderlying.$apiName,
|
|
4222
4222
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -4230,7 +4230,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
4230
4230
|
}
|
|
4231
4231
|
}
|
|
4232
4232
|
if (targetCurrentValue) {
|
|
4233
|
-
const targetUnderlying = targetCurrentValue[
|
|
4233
|
+
const targetUnderlying = targetCurrentValue[chunkWPIA6534_cjs.UnderlyingOsdkObject];
|
|
4234
4234
|
for (const field of targetRdpFields) {
|
|
4235
4235
|
if (field in targetUnderlying) {
|
|
4236
4236
|
if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
|
|
@@ -4239,7 +4239,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
4239
4239
|
}
|
|
4240
4240
|
}
|
|
4241
4241
|
}
|
|
4242
|
-
return
|
|
4242
|
+
return chunkWPIA6534_cjs.createOsdkObject(sourceValue[chunkWPIA6534_cjs.ClientRef], objectDef, newProps);
|
|
4243
4243
|
}
|
|
4244
4244
|
|
|
4245
4245
|
// src/observable/internal/object/ObjectCacheKeyRegistry.ts
|
|
@@ -4669,7 +4669,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4669
4669
|
select,
|
|
4670
4670
|
$loadPropertySecurityMetadata
|
|
4671
4671
|
} = options;
|
|
4672
|
-
const defType =
|
|
4672
|
+
const defType = chunkWPIA6534_cjs.getDefType(options.apiName);
|
|
4673
4673
|
const $includeAllBaseObjectProperties = defType === "interface" && options.$includeAllBaseObjectProperties ? true : void 0;
|
|
4674
4674
|
const canonSelect = select && select.length > 0 ? this.store.selectCanonicalizer.canonicalize(select) : void 0;
|
|
4675
4675
|
const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0, canonSelect, $loadPropertySecurityMetadata ? true : void 0, $includeAllBaseObjectProperties);
|
|
@@ -4710,7 +4710,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4710
4710
|
if (valueToWrite !== tombstone && existing?.value && this.isObjectHolder(existing.value)) {
|
|
4711
4711
|
const expectedRdpFields = this.store.objectCacheKeyRegistry.getRdpFieldSet(sourceCacheKey);
|
|
4712
4712
|
if (expectedRdpFields.size > 0) {
|
|
4713
|
-
const underlying = valueToWrite[
|
|
4713
|
+
const underlying = valueToWrite[chunkWPIA6534_cjs.UnderlyingOsdkObject];
|
|
4714
4714
|
const actualRdpFields = /* @__PURE__ */ new Set();
|
|
4715
4715
|
for (const field of expectedRdpFields) {
|
|
4716
4716
|
if (underlying && field in underlying) {
|
|
@@ -5865,10 +5865,10 @@ var Store = class {
|
|
|
5865
5865
|
|
|
5866
5866
|
// src/observable/ObservableClient.ts
|
|
5867
5867
|
function createObservableClient(client, extraUserAgents) {
|
|
5868
|
-
const tweakedClient =
|
|
5868
|
+
const tweakedClient = chunkWPIA6534_cjs.createClientFromContext({
|
|
5869
5869
|
...client[chunkXXFWZX4V_cjs.additionalContext],
|
|
5870
5870
|
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkXXFWZX4V_cjs.additionalContext].fetch, (headers) => {
|
|
5871
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
5871
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkWPIA6534_cjs.OBSERVABLE_USER_AGENT, ...extraUserAgents?.() ?? []].filter((x) => x && x?.length > 0).join(" "));
|
|
5872
5872
|
return headers;
|
|
5873
5873
|
})
|
|
5874
5874
|
});
|
|
@@ -5876,5 +5876,5 @@ function createObservableClient(client, extraUserAgents) {
|
|
|
5876
5876
|
}
|
|
5877
5877
|
|
|
5878
5878
|
exports.createObservableClient = createObservableClient;
|
|
5879
|
-
//# sourceMappingURL=chunk-
|
|
5880
|
-
//# sourceMappingURL=chunk-
|
|
5879
|
+
//# sourceMappingURL=chunk-G3UU3X6L.cjs.map
|
|
5880
|
+
//# sourceMappingURL=chunk-G3UU3X6L.cjs.map
|