@osdk/client 2.8.0-beta.12 → 2.8.0-beta.13
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 -0
- package/build/browser/queries/applyQuery.js +2 -1
- package/build/browser/queries/applyQuery.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-22QZVXHI.cjs → chunk-FE6Q5R5O.cjs} +85 -69
- package/build/cjs/chunk-FE6Q5R5O.cjs.map +1 -0
- package/build/cjs/{chunk-YVZM2JPW.cjs → chunk-JVLSSAAP.cjs} +29 -24
- package/build/cjs/chunk-JVLSSAAP.cjs.map +1 -0
- package/build/cjs/index.cjs +8 -8
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +63 -63
- package/build/esm/queries/applyQuery.js +2 -1
- package/build/esm/queries/applyQuery.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/queries/applyQuery.d.ts.map +1 -1
- package/package.json +12 -12
- package/build/cjs/chunk-22QZVXHI.cjs.map +0 -1
- package/build/cjs/chunk-YVZM2JPW.cjs.map +0 -1
package/build/cjs/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkFE6Q5R5O_cjs = require('./chunk-FE6Q5R5O.cjs');
|
|
4
|
+
require('./chunk-JVLSSAAP.cjs');
|
|
5
5
|
var chunkLDTMSHUZ_cjs = require('./chunk-LDTMSHUZ.cjs');
|
|
6
6
|
var api = require('@osdk/api');
|
|
7
7
|
var shared_net_errors = require('@osdk/shared.net.errors');
|
|
@@ -18,7 +18,7 @@ chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
|
18
18
|
// src/createPlatformClient.ts
|
|
19
19
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
20
20
|
function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
21
|
-
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider,
|
|
21
|
+
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkFE6Q5R5O_cjs.USER_AGENT, fetchFn);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// src/util/datetimeConverters.ts
|
|
@@ -45,23 +45,23 @@ var extractDateFromIsoString = (dateTime) => {
|
|
|
45
45
|
|
|
46
46
|
Object.defineProperty(exports, "ActionValidationError", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkFE6Q5R5O_cjs.ActionValidationError; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "createAttachmentUpload", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkFE6Q5R5O_cjs.createAttachmentUpload; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "createClient", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkFE6Q5R5O_cjs.createClient; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkFE6Q5R5O_cjs.createObjectSpecifierFromPrimaryKey; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkFE6Q5R5O_cjs.extractPrimaryKeyFromObjectSpecifier; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "isOk", {
|
|
67
67
|
enumerable: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJVLSSAAP_cjs = require('../chunk-JVLSSAAP.cjs');
|
|
4
4
|
var chunkLDTMSHUZ_cjs = require('../chunk-LDTMSHUZ.cjs');
|
|
5
5
|
|
|
6
6
|
// src/public/internal.ts
|
|
@@ -9,8 +9,8 @@ chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
|
9
9
|
// src/public-utils/createAndFetchTempObjectSetRid.ts
|
|
10
10
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
11
11
|
async function createAndFetchTempObjectSetRid(client, objectSet) {
|
|
12
|
-
const response = await
|
|
13
|
-
objectSet:
|
|
12
|
+
const response = await chunkJVLSSAAP_cjs.OntologyObjectSet_exports.createTemporary(client, await client[chunkJVLSSAAP_cjs.additionalContext].ontologyRid, {
|
|
13
|
+
objectSet: chunkJVLSSAAP_cjs.getWireObjectSet(objectSet)
|
|
14
14
|
});
|
|
15
15
|
return response.objectSetRid;
|
|
16
16
|
}
|
|
@@ -18,7 +18,7 @@ async function createAndFetchTempObjectSetRid(client, objectSet) {
|
|
|
18
18
|
// src/public-utils/hydrateObjectSetFromObjectRids.ts
|
|
19
19
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
20
20
|
function hydrateObjectSetFromObjectRids(client, definition, rids) {
|
|
21
|
-
return
|
|
21
|
+
return chunkJVLSSAAP_cjs.createObjectSet(definition, client[chunkJVLSSAAP_cjs.additionalContext], {
|
|
22
22
|
type: "intersect",
|
|
23
23
|
objectSets: [definition.type === "interface" ? {
|
|
24
24
|
type: "interfaceBase",
|
|
@@ -39,7 +39,7 @@ function asMutableArray(array) {
|
|
|
39
39
|
// src/public-utils/hydrateObjectSetFromRid.ts
|
|
40
40
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
41
41
|
function hydrateObjectSetFromRid(client, definition, rid) {
|
|
42
|
-
return
|
|
42
|
+
return chunkJVLSSAAP_cjs.createObjectSet(definition, client[chunkJVLSSAAP_cjs.additionalContext], {
|
|
43
43
|
type: "intersect",
|
|
44
44
|
objectSets: [definition.type === "interface" ? {
|
|
45
45
|
type: "interfaceBase",
|
|
@@ -81,7 +81,7 @@ var levelStyles = {
|
|
|
81
81
|
color: "orange"
|
|
82
82
|
})
|
|
83
83
|
};
|
|
84
|
-
var BrowserLogger = class _BrowserLogger extends
|
|
84
|
+
var BrowserLogger = class _BrowserLogger extends chunkJVLSSAAP_cjs.BaseLogger {
|
|
85
85
|
constructor(bindings = {}, options = {}) {
|
|
86
86
|
super(bindings, {
|
|
87
87
|
...options,
|
|
@@ -107,11 +107,11 @@ var BrowserLogger = class _BrowserLogger extends chunkYVZM2JPW_cjs.BaseLogger {
|
|
|
107
107
|
|
|
108
108
|
Object.defineProperty(exports, "MinimalLogger", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkJVLSSAAP_cjs.MinimalLogger; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "hydrateAttachmentFromRid", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkJVLSSAAP_cjs.hydrateAttachmentFromRid; }
|
|
115
115
|
});
|
|
116
116
|
exports.BrowserLogger = BrowserLogger;
|
|
117
117
|
exports.createAndFetchTempObjectSetRid = createAndFetchTempObjectSetRid;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkFE6Q5R5O_cjs = require('../chunk-FE6Q5R5O.cjs');
|
|
4
|
+
var chunkJVLSSAAP_cjs = require('../chunk-JVLSSAAP.cjs');
|
|
5
5
|
var chunkLDTMSHUZ_cjs = require('../chunk-LDTMSHUZ.cjs');
|
|
6
6
|
var trie = require('@wry/trie');
|
|
7
7
|
var deepEqual = require('fast-deep-equal');
|
|
@@ -153,7 +153,7 @@ var WhereClauseCanonicalizer = class {
|
|
|
153
153
|
var whereCanonicalizer = new WhereClauseCanonicalizer();
|
|
154
154
|
var orderByCanonicalizer = new OrderByCanonicalizer();
|
|
155
155
|
function computeObjectSetCacheKey(objectSet, options) {
|
|
156
|
-
const keyParts = ["objectSet",
|
|
156
|
+
const keyParts = ["objectSet", chunkJVLSSAAP_cjs.getWireObjectSet(objectSet)];
|
|
157
157
|
if (!options) {
|
|
158
158
|
return JSON.stringify(keyParts);
|
|
159
159
|
}
|
|
@@ -165,13 +165,13 @@ function computeObjectSetCacheKey(objectSet, options) {
|
|
|
165
165
|
keyParts.push("props", propKeys);
|
|
166
166
|
}
|
|
167
167
|
if (options.union && options.union.length > 0) {
|
|
168
|
-
keyParts.push("union", options.union.map((os) =>
|
|
168
|
+
keyParts.push("union", options.union.map((os) => chunkJVLSSAAP_cjs.getWireObjectSet(os)));
|
|
169
169
|
}
|
|
170
170
|
if (options.intersect && options.intersect.length > 0) {
|
|
171
|
-
keyParts.push("intersect", options.intersect.map((os) =>
|
|
171
|
+
keyParts.push("intersect", options.intersect.map((os) => chunkJVLSSAAP_cjs.getWireObjectSet(os)));
|
|
172
172
|
}
|
|
173
173
|
if (options.subtract && options.subtract.length > 0) {
|
|
174
|
-
keyParts.push("subtract", options.subtract.map((os) =>
|
|
174
|
+
keyParts.push("subtract", options.subtract.map((os) => chunkJVLSSAAP_cjs.getWireObjectSet(os)));
|
|
175
175
|
}
|
|
176
176
|
if (options.pivotTo) {
|
|
177
177
|
keyParts.push("pivotTo", options.pivotTo);
|
|
@@ -239,8 +239,8 @@ var ObservableClientImpl = class {
|
|
|
239
239
|
const instances = [];
|
|
240
240
|
const objectSetWires = [];
|
|
241
241
|
for (const item of options.dependsOnObjects ?? []) {
|
|
242
|
-
if (
|
|
243
|
-
objectSetWires.push(
|
|
242
|
+
if (chunkJVLSSAAP_cjs.isObjectSet(item)) {
|
|
243
|
+
objectSetWires.push(chunkJVLSSAAP_cjs.getWireObjectSet(item));
|
|
244
244
|
} else {
|
|
245
245
|
instances.push({
|
|
246
246
|
$apiName: item.$objectType ?? item.$apiName,
|
|
@@ -248,7 +248,7 @@ var ObservableClientImpl = class {
|
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) =>
|
|
251
|
+
const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunkJVLSSAAP_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkJVLSSAAP_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
|
|
252
252
|
return this.__experimentalStore.functions.observe({
|
|
253
253
|
...options,
|
|
254
254
|
queryDef,
|
|
@@ -476,7 +476,7 @@ var OptimisticJob = class {
|
|
|
476
476
|
return this;
|
|
477
477
|
},
|
|
478
478
|
createObject(type, pk, properties) {
|
|
479
|
-
const create = store.client[
|
|
479
|
+
const create = store.client[chunkJVLSSAAP_cjs.additionalContext].objectFactory2(store.client[chunkJVLSSAAP_cjs.additionalContext], [{
|
|
480
480
|
$primaryKey: pk,
|
|
481
481
|
$apiName: type.apiName,
|
|
482
482
|
$objectType: type.apiName,
|
|
@@ -952,7 +952,7 @@ var Query = class {
|
|
|
952
952
|
this.store = store;
|
|
953
953
|
this.cacheKeys = store.cacheKeys;
|
|
954
954
|
this.#subject = observable;
|
|
955
|
-
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[
|
|
955
|
+
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger : store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
|
|
956
956
|
msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
|
|
957
957
|
}));
|
|
958
958
|
}
|
|
@@ -1114,7 +1114,7 @@ var AggregationQuery = class extends Query {
|
|
|
1114
1114
|
#invalidationTypes;
|
|
1115
1115
|
#invalidationTypesPromise;
|
|
1116
1116
|
constructor(store, subject, cacheKey, opts) {
|
|
1117
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1117
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
|
|
1118
1118
|
msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1119
1119
|
}) : void 0);
|
|
1120
1120
|
this.apiName = cacheKey.otherKeys[API_NAME_IDX];
|
|
@@ -1132,7 +1132,7 @@ var AggregationQuery = class extends Query {
|
|
|
1132
1132
|
try {
|
|
1133
1133
|
const {
|
|
1134
1134
|
invalidationSet
|
|
1135
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
1135
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkJVLSSAAP_cjs.additionalContext], wireObjectSet);
|
|
1136
1136
|
return /* @__PURE__ */ new Set([this.apiName, ...invalidationSet]);
|
|
1137
1137
|
} catch (error) {
|
|
1138
1138
|
this.store.logger?.error("Failed to compute invalidation types for aggregation, falling back to base type only", error);
|
|
@@ -1203,7 +1203,7 @@ var ObjectAggregationQuery = class extends AggregationQuery {
|
|
|
1203
1203
|
};
|
|
1204
1204
|
let objectSet;
|
|
1205
1205
|
if (this.parsedWireObjectSet) {
|
|
1206
|
-
objectSet =
|
|
1206
|
+
objectSet = chunkJVLSSAAP_cjs.createObjectSet(objectTypeDef, this.store.client[chunkJVLSSAAP_cjs.additionalContext], this.parsedWireObjectSet);
|
|
1207
1207
|
} else {
|
|
1208
1208
|
objectSet = this.store.client(objectTypeDef);
|
|
1209
1209
|
}
|
|
@@ -1245,7 +1245,7 @@ var AggregationsHelper = class extends AbstractHelper {
|
|
|
1245
1245
|
return this.getOrCreateQuery(options, void 0);
|
|
1246
1246
|
}
|
|
1247
1247
|
getQueryWithObjectSet(options) {
|
|
1248
|
-
const serializedObjectSet = JSON.stringify(
|
|
1248
|
+
const serializedObjectSet = JSON.stringify(chunkJVLSSAAP_cjs.getWireObjectSet(options.objectSet));
|
|
1249
1249
|
return this.getOrCreateQuery(options, serializedObjectSet);
|
|
1250
1250
|
}
|
|
1251
1251
|
getOrCreateQuery(options, serializedObjectSet) {
|
|
@@ -1550,7 +1550,7 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1550
1550
|
path.push("$:map_end");
|
|
1551
1551
|
return arr;
|
|
1552
1552
|
}
|
|
1553
|
-
if (
|
|
1553
|
+
if (chunkFE6Q5R5O_cjs.isObjectSpecifiersObject(value)) {
|
|
1554
1554
|
const objectType = value.$objectType ?? value.$apiName;
|
|
1555
1555
|
path.push("$:osdk", objectType, value.$primaryKey);
|
|
1556
1556
|
return {
|
|
@@ -1558,8 +1558,8 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1558
1558
|
$primaryKey: value.$primaryKey
|
|
1559
1559
|
};
|
|
1560
1560
|
}
|
|
1561
|
-
if (
|
|
1562
|
-
const wire =
|
|
1561
|
+
if (chunkJVLSSAAP_cjs.isObjectSet(value)) {
|
|
1562
|
+
const wire = chunkJVLSSAAP_cjs.getWireObjectSet(value);
|
|
1563
1563
|
path.push("$:objectset", wire);
|
|
1564
1564
|
return wire;
|
|
1565
1565
|
}
|
|
@@ -1622,7 +1622,7 @@ var FunctionQuery = class extends Query {
|
|
|
1622
1622
|
#dependsOnObjects;
|
|
1623
1623
|
#queryDef;
|
|
1624
1624
|
constructor(store, subject, queryDef, params, cacheKey, opts, objectSetTypesPromise) {
|
|
1625
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1625
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
|
|
1626
1626
|
msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1627
1627
|
}) : void 0);
|
|
1628
1628
|
this.#apiName = queryDef.apiName;
|
|
@@ -1679,7 +1679,7 @@ var FunctionQuery = class extends Query {
|
|
|
1679
1679
|
}).debug("calling _fetchAndStore");
|
|
1680
1680
|
}
|
|
1681
1681
|
try {
|
|
1682
|
-
const result = await
|
|
1682
|
+
const result = await chunkFE6Q5R5O_cjs.applyQuery(this.store.client[chunkJVLSSAAP_cjs.additionalContext], this.#queryDef, this.#params);
|
|
1683
1683
|
const executedAt = Date.now();
|
|
1684
1684
|
this.store.batch({}, (batch) => {
|
|
1685
1685
|
this.writeToStore({
|
|
@@ -2839,7 +2839,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2839
2839
|
batch.changes.modified.add(this.cacheKey);
|
|
2840
2840
|
}
|
|
2841
2841
|
constructor(store, subject, cacheKey, opts) {
|
|
2842
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
2842
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
|
|
2843
2843
|
msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
2844
2844
|
}) : void 0);
|
|
2845
2845
|
[this.#sourceApiName, this.#sourceTypeKind, this.#sourceUnderlyingObjectType, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
|
|
@@ -2849,7 +2849,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2849
2849
|
*/
|
|
2850
2850
|
async fetchPageData(signal) {
|
|
2851
2851
|
const client = this.store.client;
|
|
2852
|
-
const ontologyProvider = client[
|
|
2852
|
+
const ontologyProvider = client[chunkJVLSSAAP_cjs.additionalContext].ontologyProvider;
|
|
2853
2853
|
const isInterface = this.#sourceTypeKind === "interface";
|
|
2854
2854
|
if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {
|
|
2855
2855
|
let targetTypeApiName;
|
|
@@ -2957,7 +2957,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2957
2957
|
}
|
|
2958
2958
|
return (async () => {
|
|
2959
2959
|
try {
|
|
2960
|
-
const ontologyProvider = this.store.client[
|
|
2960
|
+
const ontologyProvider = this.store.client[chunkJVLSSAAP_cjs.additionalContext].ontologyProvider;
|
|
2961
2961
|
if (this.#sourceTypeKind === "interface") {
|
|
2962
2962
|
const objectMetadata = await ontologyProvider.getObjectDefinition(objectType);
|
|
2963
2963
|
if (this.#sourceApiName in objectMetadata.interfaceMap) {
|
|
@@ -3144,7 +3144,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3144
3144
|
batch.changes.registerList(this.cacheKey);
|
|
3145
3145
|
}
|
|
3146
3146
|
constructor(store, subject, apiName, cacheKey, opts) {
|
|
3147
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3147
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
|
|
3148
3148
|
msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3149
3149
|
}) : void 0);
|
|
3150
3150
|
this.apiName = apiName;
|
|
@@ -3180,10 +3180,10 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3180
3180
|
async fetchPageData(signal) {
|
|
3181
3181
|
const needsResultType = Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy) || this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied;
|
|
3182
3182
|
if (needsResultType) {
|
|
3183
|
-
const wireObjectSet =
|
|
3183
|
+
const wireObjectSet = chunkJVLSSAAP_cjs.getWireObjectSet(this.#objectSet);
|
|
3184
3184
|
const {
|
|
3185
3185
|
resultType
|
|
3186
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3186
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkJVLSSAAP_cjs.additionalContext], wireObjectSet);
|
|
3187
3187
|
if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
3188
3188
|
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#orderBy);
|
|
3189
3189
|
}
|
|
@@ -3449,7 +3449,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3449
3449
|
type,
|
|
3450
3450
|
apiName: this.apiName
|
|
3451
3451
|
};
|
|
3452
|
-
const clientCtx = store.client[
|
|
3452
|
+
const clientCtx = store.client[chunkJVLSSAAP_cjs.additionalContext];
|
|
3453
3453
|
let objectSet;
|
|
3454
3454
|
if (rids != null) {
|
|
3455
3455
|
objectSet = clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
|
|
@@ -3492,7 +3492,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3492
3492
|
}
|
|
3493
3493
|
extractRelevantObjects(changes) {
|
|
3494
3494
|
const matchesApiName = ([, object]) => {
|
|
3495
|
-
return this.apiName in object[
|
|
3495
|
+
return this.apiName in object[chunkFE6Q5R5O_cjs.ObjectDefRef].interfaceMap;
|
|
3496
3496
|
};
|
|
3497
3497
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
3498
3498
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
@@ -3511,7 +3511,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3511
3511
|
}
|
|
3512
3512
|
};
|
|
3513
3513
|
function createSourceSetForPivot(store, pivotInfo, rids) {
|
|
3514
|
-
const clientCtx = store.client[
|
|
3514
|
+
const clientCtx = store.client[chunkJVLSSAAP_cjs.additionalContext];
|
|
3515
3515
|
if (rids != null) {
|
|
3516
3516
|
return clientCtx.objectSetFactory({
|
|
3517
3517
|
type: "object",
|
|
@@ -3567,7 +3567,7 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
3567
3567
|
const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX2];
|
|
3568
3568
|
const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
|
|
3569
3569
|
const rids = this.cacheKey.otherKeys[RIDS_IDX];
|
|
3570
|
-
const clientCtx = store.client[
|
|
3570
|
+
const clientCtx = store.client[chunkJVLSSAAP_cjs.additionalContext];
|
|
3571
3571
|
const typeDefinition = {
|
|
3572
3572
|
type: "object",
|
|
3573
3573
|
apiName: this.apiName
|
|
@@ -3718,8 +3718,8 @@ function stripRdpFields(value, rdpFields) {
|
|
|
3718
3718
|
if (rdpFields.size === 0) {
|
|
3719
3719
|
return value;
|
|
3720
3720
|
}
|
|
3721
|
-
const underlying = value[
|
|
3722
|
-
const objectDef = value[
|
|
3721
|
+
const underlying = value[chunkFE6Q5R5O_cjs.UnderlyingOsdkObject];
|
|
3722
|
+
const objectDef = value[chunkFE6Q5R5O_cjs.ObjectDefRef];
|
|
3723
3723
|
const newProps = {
|
|
3724
3724
|
$apiName: underlying.$apiName,
|
|
3725
3725
|
$objectType: underlying.$objectType,
|
|
@@ -3732,7 +3732,7 @@ function stripRdpFields(value, rdpFields) {
|
|
|
3732
3732
|
newProps[key] = underlying[key];
|
|
3733
3733
|
}
|
|
3734
3734
|
}
|
|
3735
|
-
return
|
|
3735
|
+
return chunkFE6Q5R5O_cjs.createOsdkObject(value[chunkFE6Q5R5O_cjs.ClientRef], objectDef, newProps);
|
|
3736
3736
|
}
|
|
3737
3737
|
function isSuperset(superset, subset) {
|
|
3738
3738
|
for (const field of subset) {
|
|
@@ -3743,8 +3743,8 @@ function isSuperset(superset, subset) {
|
|
|
3743
3743
|
return true;
|
|
3744
3744
|
}
|
|
3745
3745
|
function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
3746
|
-
const underlying = value[
|
|
3747
|
-
const objectDef = value[
|
|
3746
|
+
const underlying = value[chunkFE6Q5R5O_cjs.UnderlyingOsdkObject];
|
|
3747
|
+
const objectDef = value[chunkFE6Q5R5O_cjs.ObjectDefRef];
|
|
3748
3748
|
const newProps = {
|
|
3749
3749
|
$apiName: underlying.$apiName,
|
|
3750
3750
|
$objectType: underlying.$objectType,
|
|
@@ -3760,7 +3760,7 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
|
3760
3760
|
}
|
|
3761
3761
|
}
|
|
3762
3762
|
}
|
|
3763
|
-
return
|
|
3763
|
+
return chunkFE6Q5R5O_cjs.createOsdkObject(value[chunkFE6Q5R5O_cjs.ClientRef], objectDef, newProps);
|
|
3764
3764
|
}
|
|
3765
3765
|
function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
|
|
3766
3766
|
if (targetRdpFields.size === 0) {
|
|
@@ -3772,8 +3772,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
3772
3772
|
}
|
|
3773
3773
|
return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
|
|
3774
3774
|
}
|
|
3775
|
-
const sourceUnderlying = sourceValue[
|
|
3776
|
-
const objectDef = sourceValue[
|
|
3775
|
+
const sourceUnderlying = sourceValue[chunkFE6Q5R5O_cjs.UnderlyingOsdkObject];
|
|
3776
|
+
const objectDef = sourceValue[chunkFE6Q5R5O_cjs.ObjectDefRef];
|
|
3777
3777
|
const newProps = {
|
|
3778
3778
|
$apiName: sourceUnderlying.$apiName,
|
|
3779
3779
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -3787,7 +3787,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
3787
3787
|
}
|
|
3788
3788
|
}
|
|
3789
3789
|
if (targetCurrentValue) {
|
|
3790
|
-
const targetUnderlying = targetCurrentValue[
|
|
3790
|
+
const targetUnderlying = targetCurrentValue[chunkFE6Q5R5O_cjs.UnderlyingOsdkObject];
|
|
3791
3791
|
for (const field of targetRdpFields) {
|
|
3792
3792
|
if (field in targetUnderlying) {
|
|
3793
3793
|
if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
|
|
@@ -3796,7 +3796,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
3796
3796
|
}
|
|
3797
3797
|
}
|
|
3798
3798
|
}
|
|
3799
|
-
return
|
|
3799
|
+
return chunkFE6Q5R5O_cjs.createOsdkObject(sourceValue[chunkFE6Q5R5O_cjs.ClientRef], objectDef, newProps);
|
|
3800
3800
|
}
|
|
3801
3801
|
|
|
3802
3802
|
// src/observable/internal/object/ObjectCacheKeyRegistry.ts
|
|
@@ -3931,7 +3931,7 @@ var BulkObjectLoader = class {
|
|
|
3931
3931
|
#maxEntries;
|
|
3932
3932
|
constructor(client, maxWait = 25, maxEntries = 100) {
|
|
3933
3933
|
this.#client = client;
|
|
3934
|
-
this.#logger = client[
|
|
3934
|
+
this.#logger = client[chunkJVLSSAAP_cjs.additionalContext].logger;
|
|
3935
3935
|
this.#maxWait = maxWait;
|
|
3936
3936
|
this.#maxEntries = maxEntries;
|
|
3937
3937
|
}
|
|
@@ -4065,7 +4065,7 @@ var ObjectQuery = class extends Query {
|
|
|
4065
4065
|
#defType;
|
|
4066
4066
|
#implementingTypes;
|
|
4067
4067
|
constructor(store, subject, type, pk, cacheKey, opts, defType = "object") {
|
|
4068
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4068
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
|
|
4069
4069
|
msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4070
4070
|
}) : void 0);
|
|
4071
4071
|
this.#apiName = type;
|
|
@@ -4159,7 +4159,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4159
4159
|
const {
|
|
4160
4160
|
pk
|
|
4161
4161
|
} = options;
|
|
4162
|
-
const defType =
|
|
4162
|
+
const defType = chunkFE6Q5R5O_cjs.getDefType(options.apiName);
|
|
4163
4163
|
const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0);
|
|
4164
4164
|
return this.store.queries.get(objectCacheKey, () => new ObjectQuery(this.store, this.store.subjects.get(objectCacheKey), apiName, pk, objectCacheKey, {
|
|
4165
4165
|
dedupeInterval: 0
|
|
@@ -4249,7 +4249,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
4249
4249
|
#composedObjectSet;
|
|
4250
4250
|
#objectTypes;
|
|
4251
4251
|
constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
|
|
4252
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4252
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
|
|
4253
4253
|
msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4254
4254
|
}) : void 0);
|
|
4255
4255
|
this.#baseObjectSetWire = baseObjectSetWire;
|
|
@@ -4297,7 +4297,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
4297
4297
|
}
|
|
4298
4298
|
if (opts.union) {
|
|
4299
4299
|
for (const os of opts.union) {
|
|
4300
|
-
const wire =
|
|
4300
|
+
const wire = chunkJVLSSAAP_cjs.getWireObjectSet(os);
|
|
4301
4301
|
if (wire.type) {
|
|
4302
4302
|
types.add(wire.type);
|
|
4303
4303
|
}
|
|
@@ -4305,7 +4305,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
4305
4305
|
}
|
|
4306
4306
|
if (opts.intersect) {
|
|
4307
4307
|
for (const os of opts.intersect) {
|
|
4308
|
-
const wire =
|
|
4308
|
+
const wire = chunkJVLSSAAP_cjs.getWireObjectSet(os);
|
|
4309
4309
|
if (wire.type) {
|
|
4310
4310
|
types.add(wire.type);
|
|
4311
4311
|
}
|
|
@@ -4313,7 +4313,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
4313
4313
|
}
|
|
4314
4314
|
if (opts.subtract) {
|
|
4315
4315
|
for (const os of opts.subtract) {
|
|
4316
|
-
const wire =
|
|
4316
|
+
const wire = chunkJVLSSAAP_cjs.getWireObjectSet(os);
|
|
4317
4317
|
if (wire.type) {
|
|
4318
4318
|
types.add(wire.type);
|
|
4319
4319
|
}
|
|
@@ -4333,10 +4333,10 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
4333
4333
|
*/
|
|
4334
4334
|
async fetchPageData(signal) {
|
|
4335
4335
|
if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
4336
|
-
const wireObjectSet =
|
|
4336
|
+
const wireObjectSet = chunkJVLSSAAP_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
4337
4337
|
const {
|
|
4338
4338
|
resultType
|
|
4339
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
4339
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkJVLSSAAP_cjs.additionalContext], wireObjectSet);
|
|
4340
4340
|
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy);
|
|
4341
4341
|
}
|
|
4342
4342
|
const resp = await this.#composedObjectSet.fetchPage({
|
|
@@ -4406,7 +4406,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
4406
4406
|
const {
|
|
4407
4407
|
baseObjectSet
|
|
4408
4408
|
} = options;
|
|
4409
|
-
const baseObjectSetWire = JSON.stringify(
|
|
4409
|
+
const baseObjectSetWire = JSON.stringify(chunkJVLSSAAP_cjs.getWireObjectSet(baseObjectSet));
|
|
4410
4410
|
const operations = this.buildCanonicalizedOperations(options);
|
|
4411
4411
|
const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
|
|
4412
4412
|
return this.store.queries.get(objectSetCacheKey, () => {
|
|
@@ -4422,13 +4422,13 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
4422
4422
|
operations.withProperties = this.rdpCanonicalizer.canonicalize(options.withProperties);
|
|
4423
4423
|
}
|
|
4424
4424
|
if (options.union && options.union.length > 0) {
|
|
4425
|
-
operations.union = options.union.map((os) => JSON.stringify(
|
|
4425
|
+
operations.union = options.union.map((os) => JSON.stringify(chunkJVLSSAAP_cjs.getWireObjectSet(os)));
|
|
4426
4426
|
}
|
|
4427
4427
|
if (options.intersect && options.intersect.length > 0) {
|
|
4428
|
-
operations.intersect = options.intersect.map((os) => JSON.stringify(
|
|
4428
|
+
operations.intersect = options.intersect.map((os) => JSON.stringify(chunkJVLSSAAP_cjs.getWireObjectSet(os)));
|
|
4429
4429
|
}
|
|
4430
4430
|
if (options.subtract && options.subtract.length > 0) {
|
|
4431
|
-
operations.subtract = options.subtract.map((os) => JSON.stringify(
|
|
4431
|
+
operations.subtract = options.subtract.map((os) => JSON.stringify(chunkJVLSSAAP_cjs.getWireObjectSet(os)));
|
|
4432
4432
|
}
|
|
4433
4433
|
if (options.pivotTo) {
|
|
4434
4434
|
operations.pivotTo = options.pivotTo;
|
|
@@ -4500,7 +4500,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
|
|
|
4500
4500
|
apiName: "__rdp_canonicalizer_holder__"
|
|
4501
4501
|
};
|
|
4502
4502
|
for (const [key, rdpFunction] of Object.entries(rdp)) {
|
|
4503
|
-
const builder =
|
|
4503
|
+
const builder = chunkJVLSSAAP_cjs.createWithPropertiesObjectSet(
|
|
4504
4504
|
objectTypeHolder,
|
|
4505
4505
|
{
|
|
4506
4506
|
type: "methodInput"
|
|
@@ -4579,7 +4579,7 @@ var Store = class {
|
|
|
4579
4579
|
subjects = this.layers.subjects;
|
|
4580
4580
|
// these are hopefully temporary
|
|
4581
4581
|
constructor(client) {
|
|
4582
|
-
this.logger = client[
|
|
4582
|
+
this.logger = client[chunkJVLSSAAP_cjs.additionalContext].logger?.child({}, {
|
|
4583
4583
|
msgPrefix: "Store"
|
|
4584
4584
|
});
|
|
4585
4585
|
this.client = client;
|
|
@@ -4857,10 +4857,10 @@ var Store = class {
|
|
|
4857
4857
|
|
|
4858
4858
|
// src/observable/ObservableClient.ts
|
|
4859
4859
|
function createObservableClient(client) {
|
|
4860
|
-
const tweakedClient =
|
|
4861
|
-
...client[
|
|
4862
|
-
fetch: shared_net_fetch.createFetchHeaderMutator(client[
|
|
4863
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
4860
|
+
const tweakedClient = chunkFE6Q5R5O_cjs.createClientFromContext({
|
|
4861
|
+
...client[chunkJVLSSAAP_cjs.additionalContext],
|
|
4862
|
+
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkJVLSSAAP_cjs.additionalContext].fetch, (headers) => {
|
|
4863
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkFE6Q5R5O_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
|
|
4864
4864
|
return headers;
|
|
4865
4865
|
})
|
|
4866
4866
|
});
|
|
@@ -4904,19 +4904,19 @@ function getOsdkConfig(ontologyRid) {
|
|
|
4904
4904
|
|
|
4905
4905
|
Object.defineProperty(exports, "createClientWithTransaction", {
|
|
4906
4906
|
enumerable: true,
|
|
4907
|
-
get: function () { return
|
|
4907
|
+
get: function () { return chunkFE6Q5R5O_cjs.createClientWithTransaction; }
|
|
4908
4908
|
});
|
|
4909
4909
|
Object.defineProperty(exports, "augment", {
|
|
4910
4910
|
enumerable: true,
|
|
4911
|
-
get: function () { return
|
|
4911
|
+
get: function () { return chunkJVLSSAAP_cjs.augment; }
|
|
4912
4912
|
});
|
|
4913
4913
|
Object.defineProperty(exports, "getWireObjectSet", {
|
|
4914
4914
|
enumerable: true,
|
|
4915
|
-
get: function () { return
|
|
4915
|
+
get: function () { return chunkJVLSSAAP_cjs.getWireObjectSet; }
|
|
4916
4916
|
});
|
|
4917
4917
|
Object.defineProperty(exports, "isObjectSet", {
|
|
4918
4918
|
enumerable: true,
|
|
4919
|
-
get: function () { return
|
|
4919
|
+
get: function () { return chunkJVLSSAAP_cjs.isObjectSet; }
|
|
4920
4920
|
});
|
|
4921
4921
|
exports.computeObjectSetCacheKey = computeObjectSetCacheKey;
|
|
4922
4922
|
exports.createObservableClient = createObservableClient;
|
|
@@ -34,7 +34,8 @@ export async function applyQuery(client, query, params) {
|
|
|
34
34
|
parameters: params ? await remapQueryParams(params, client, (await qd).parameters) : {}
|
|
35
35
|
}, {
|
|
36
36
|
version: query.isFixedVersion ? query.version : undefined,
|
|
37
|
-
transactionId: client.transactionId
|
|
37
|
+
transactionId: client.transactionId,
|
|
38
|
+
branch: client.branch
|
|
38
39
|
});
|
|
39
40
|
const objectOutputDefs = await getRequiredDefinitions((await qd).output, client);
|
|
40
41
|
const remappedResponse = await remapQueryResponse(client, (await qd).output, response.value, objectOutputDefs);
|