@osdk/client 2.7.0-rc.15 → 2.7.1
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 +68 -0
- package/build/browser/Client.js +1 -1
- package/build/browser/Client.js.map +1 -1
- package/build/browser/observable/internal/actions/ActionApplication.js +1 -2
- package/build/browser/observable/internal/actions/ActionApplication.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-CDUYWOVQ.cjs → chunk-OVZCGOMG.cjs} +65 -65
- package/build/cjs/{chunk-CDUYWOVQ.cjs.map → chunk-OVZCGOMG.cjs.map} +1 -1
- package/build/cjs/{chunk-Y362HOIZ.cjs → chunk-OZNDU7AU.cjs} +2 -2
- package/build/cjs/{chunk-Y362HOIZ.cjs.map → chunk-OZNDU7AU.cjs.map} +1 -1
- package/build/cjs/index.cjs +8 -8
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +53 -54
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/esm/Client.js +1 -1
- package/build/esm/Client.js.map +1 -1
- package/build/esm/observable/internal/actions/ActionApplication.js +1 -2
- package/build/esm/observable/internal/actions/ActionApplication.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/build/types/observable/internal/actions/ActionApplication.d.ts.map +1 -1
- package/package.json +11 -12
- package/build/cjs/delay-W2TSML2P.cjs +0 -75
- package/build/cjs/delay-W2TSML2P.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 chunkOVZCGOMG_cjs = require('./chunk-OVZCGOMG.cjs');
|
|
4
|
+
require('./chunk-OZNDU7AU.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, chunkOVZCGOMG_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 chunkOVZCGOMG_cjs.ActionValidationError; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "createAttachmentUpload", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkOVZCGOMG_cjs.createAttachmentUpload; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "createClient", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkOVZCGOMG_cjs.createClient; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkOVZCGOMG_cjs.createObjectSpecifierFromPrimaryKey; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkOVZCGOMG_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 chunkOZNDU7AU_cjs = require('../chunk-OZNDU7AU.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 chunkOZNDU7AU_cjs.OntologyObjectSet_exports.createTemporary(client, await client[chunkOZNDU7AU_cjs.additionalContext].ontologyRid, {
|
|
13
|
+
objectSet: chunkOZNDU7AU_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 chunkOZNDU7AU_cjs.createObjectSet(definition, client[chunkOZNDU7AU_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 chunkOZNDU7AU_cjs.createObjectSet(definition, client[chunkOZNDU7AU_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 chunkOZNDU7AU_cjs.BaseLogger {
|
|
85
85
|
constructor(bindings = {}, options = {}) {
|
|
86
86
|
super(bindings, {
|
|
87
87
|
...options,
|
|
@@ -107,11 +107,11 @@ var BrowserLogger = class _BrowserLogger extends chunkY362HOIZ_cjs.BaseLogger {
|
|
|
107
107
|
|
|
108
108
|
Object.defineProperty(exports, "MinimalLogger", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkOZNDU7AU_cjs.MinimalLogger; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "hydrateAttachmentFromRid", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkOZNDU7AU_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 chunkOVZCGOMG_cjs = require('../chunk-OVZCGOMG.cjs');
|
|
4
|
+
var chunkOZNDU7AU_cjs = require('../chunk-OZNDU7AU.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", chunkOZNDU7AU_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) => chunkOZNDU7AU_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) => chunkOZNDU7AU_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) => chunkOZNDU7AU_cjs.getWireObjectSet(os)));
|
|
175
175
|
}
|
|
176
176
|
if (options.pivotTo) {
|
|
177
177
|
keyParts.push("pivotTo", options.pivotTo);
|
|
@@ -371,7 +371,7 @@ var OptimisticJob = class {
|
|
|
371
371
|
return this;
|
|
372
372
|
},
|
|
373
373
|
createObject(type, pk, properties) {
|
|
374
|
-
const create = store.client[
|
|
374
|
+
const create = store.client[chunkOZNDU7AU_cjs.additionalContext].objectFactory2(store.client[chunkOZNDU7AU_cjs.additionalContext], [{
|
|
375
375
|
$primaryKey: pk,
|
|
376
376
|
$apiName: type.apiName,
|
|
377
377
|
$objectType: type.apiName,
|
|
@@ -438,8 +438,7 @@ var ActionApplication = class {
|
|
|
438
438
|
if (process.env.NODE_ENV !== "production") {
|
|
439
439
|
if (ACTION_DELAY > 0) {
|
|
440
440
|
logger?.debug("action done, pausing", actionResults);
|
|
441
|
-
|
|
442
|
-
await delay(ACTION_DELAY);
|
|
441
|
+
await new Promise((resolve) => setTimeout(resolve, ACTION_DELAY));
|
|
443
442
|
logger?.debug("action done, pausing done");
|
|
444
443
|
}
|
|
445
444
|
}
|
|
@@ -593,7 +592,7 @@ var Query = class {
|
|
|
593
592
|
this.store = store;
|
|
594
593
|
this.cacheKeys = store.cacheKeys;
|
|
595
594
|
this.#subject = observable;
|
|
596
|
-
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[
|
|
595
|
+
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkOZNDU7AU_cjs.additionalContext].logger : store.client[chunkOZNDU7AU_cjs.additionalContext].logger?.child({}, {
|
|
597
596
|
msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
|
|
598
597
|
}));
|
|
599
598
|
}
|
|
@@ -751,7 +750,7 @@ var Query = class {
|
|
|
751
750
|
// src/observable/internal/aggregation/AggregationQuery.ts
|
|
752
751
|
var AggregationQuery = class extends Query {
|
|
753
752
|
constructor(store, subject, cacheKey, opts) {
|
|
754
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
753
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkOZNDU7AU_cjs.additionalContext].logger?.child({}, {
|
|
755
754
|
msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
756
755
|
}) : void 0);
|
|
757
756
|
this.apiName = cacheKey.otherKeys[API_NAME_IDX];
|
|
@@ -1122,7 +1121,7 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1122
1121
|
path.push("$:map_end");
|
|
1123
1122
|
return arr;
|
|
1124
1123
|
}
|
|
1125
|
-
if (
|
|
1124
|
+
if (chunkOVZCGOMG_cjs.isObjectSpecifiersObject(value)) {
|
|
1126
1125
|
const objectType = value.$objectType ?? value.$apiName;
|
|
1127
1126
|
path.push("$:osdk", objectType, value.$primaryKey);
|
|
1128
1127
|
return {
|
|
@@ -1130,8 +1129,8 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1130
1129
|
$primaryKey: value.$primaryKey
|
|
1131
1130
|
};
|
|
1132
1131
|
}
|
|
1133
|
-
if (
|
|
1134
|
-
const wire =
|
|
1132
|
+
if (chunkOZNDU7AU_cjs.isObjectSet(value)) {
|
|
1133
|
+
const wire = chunkOZNDU7AU_cjs.getWireObjectSet(value);
|
|
1135
1134
|
path.push("$:objectset", wire);
|
|
1136
1135
|
return wire;
|
|
1137
1136
|
}
|
|
@@ -1194,7 +1193,7 @@ var FunctionQuery = class extends Query {
|
|
|
1194
1193
|
#dependsOnObjects;
|
|
1195
1194
|
#queryDef;
|
|
1196
1195
|
constructor(store, subject, queryDef, params, cacheKey, opts) {
|
|
1197
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1196
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkOZNDU7AU_cjs.additionalContext].logger?.child({}, {
|
|
1198
1197
|
msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1199
1198
|
}) : void 0);
|
|
1200
1199
|
this.#apiName = queryDef.apiName;
|
|
@@ -1228,7 +1227,7 @@ var FunctionQuery = class extends Query {
|
|
|
1228
1227
|
}).debug("calling _fetchAndStore");
|
|
1229
1228
|
}
|
|
1230
1229
|
try {
|
|
1231
|
-
const result = await
|
|
1230
|
+
const result = await chunkOVZCGOMG_cjs.applyQuery(this.store.client[chunkOZNDU7AU_cjs.additionalContext], this.#queryDef, this.#params);
|
|
1232
1231
|
const executedAt = Date.now();
|
|
1233
1232
|
this.store.batch({}, (batch) => {
|
|
1234
1233
|
this.writeToStore({
|
|
@@ -2335,7 +2334,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2335
2334
|
batch.changes.modified.add(this.cacheKey);
|
|
2336
2335
|
}
|
|
2337
2336
|
constructor(store, subject, cacheKey, opts) {
|
|
2338
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
2337
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkOZNDU7AU_cjs.additionalContext].logger?.child({}, {
|
|
2339
2338
|
msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
2340
2339
|
}) : void 0);
|
|
2341
2340
|
[this.#sourceApiName, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
|
|
@@ -2351,7 +2350,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2351
2350
|
type: "object",
|
|
2352
2351
|
apiName: this.#sourceApiName
|
|
2353
2352
|
};
|
|
2354
|
-
const sourceMetadata = await client[
|
|
2353
|
+
const sourceMetadata = await client[chunkOZNDU7AU_cjs.additionalContext].ontologyProvider.getObjectDefinition(this.#sourceApiName);
|
|
2355
2354
|
if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {
|
|
2356
2355
|
const linkDef = sourceMetadata.links?.[this.#linkName];
|
|
2357
2356
|
if (!linkDef?.targetType) {
|
|
@@ -2423,7 +2422,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2423
2422
|
return this.revalidate(true);
|
|
2424
2423
|
} else {
|
|
2425
2424
|
return (async () => {
|
|
2426
|
-
const sourceMetadata = await this.store.client[
|
|
2425
|
+
const sourceMetadata = await this.store.client[chunkOZNDU7AU_cjs.additionalContext].ontologyProvider.getObjectDefinition(this.#sourceApiName);
|
|
2427
2426
|
const linkDef = sourceMetadata.links?.[this.#linkName];
|
|
2428
2427
|
if (!linkDef || linkDef.targetType !== objectType) return;
|
|
2429
2428
|
const promise = this.revalidate(true);
|
|
@@ -2731,7 +2730,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
2731
2730
|
batch.changes.registerList(this.cacheKey);
|
|
2732
2731
|
}
|
|
2733
2732
|
constructor(store, subject, apiName, cacheKey, opts) {
|
|
2734
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
2733
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkOZNDU7AU_cjs.additionalContext].logger?.child({}, {
|
|
2735
2734
|
msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
2736
2735
|
}) : void 0);
|
|
2737
2736
|
this.apiName = apiName;
|
|
@@ -2769,10 +2768,10 @@ var ListQuery = class extends BaseListQuery {
|
|
|
2769
2768
|
*/
|
|
2770
2769
|
async fetchPageData(signal) {
|
|
2771
2770
|
if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
2772
|
-
const wireObjectSet =
|
|
2771
|
+
const wireObjectSet = chunkOZNDU7AU_cjs.getWireObjectSet(this.#objectSet);
|
|
2773
2772
|
const {
|
|
2774
2773
|
resultType
|
|
2775
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
2774
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkOZNDU7AU_cjs.additionalContext], wireObjectSet);
|
|
2776
2775
|
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#orderBy);
|
|
2777
2776
|
}
|
|
2778
2777
|
const resp = await this.#objectSet.fetchPage({
|
|
@@ -3038,7 +3037,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3038
3037
|
}
|
|
3039
3038
|
extractRelevantObjects(changes) {
|
|
3040
3039
|
const matchesApiName = ([, object]) => {
|
|
3041
|
-
return this.apiName in object[
|
|
3040
|
+
return this.apiName in object[chunkOVZCGOMG_cjs.ObjectDefRef].interfaceMap;
|
|
3042
3041
|
};
|
|
3043
3042
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
3044
3043
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
@@ -3091,7 +3090,7 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
3091
3090
|
const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX];
|
|
3092
3091
|
const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
|
|
3093
3092
|
const rids = this.cacheKey.otherKeys[RIDS_IDX];
|
|
3094
|
-
const clientCtx = store.client[
|
|
3093
|
+
const clientCtx = store.client[chunkOZNDU7AU_cjs.additionalContext];
|
|
3095
3094
|
const typeDefinition = {
|
|
3096
3095
|
type: "object",
|
|
3097
3096
|
apiName: this.apiName
|
|
@@ -3242,8 +3241,8 @@ function stripRdpFields(value, rdpFields) {
|
|
|
3242
3241
|
if (rdpFields.size === 0) {
|
|
3243
3242
|
return value;
|
|
3244
3243
|
}
|
|
3245
|
-
const underlying = value[
|
|
3246
|
-
const objectDef = value[
|
|
3244
|
+
const underlying = value[chunkOVZCGOMG_cjs.UnderlyingOsdkObject];
|
|
3245
|
+
const objectDef = value[chunkOVZCGOMG_cjs.ObjectDefRef];
|
|
3247
3246
|
const newProps = {
|
|
3248
3247
|
$apiName: underlying.$apiName,
|
|
3249
3248
|
$objectType: underlying.$objectType,
|
|
@@ -3256,7 +3255,7 @@ function stripRdpFields(value, rdpFields) {
|
|
|
3256
3255
|
newProps[key] = underlying[key];
|
|
3257
3256
|
}
|
|
3258
3257
|
}
|
|
3259
|
-
return
|
|
3258
|
+
return chunkOVZCGOMG_cjs.createOsdkObject(value[chunkOVZCGOMG_cjs.ClientRef], objectDef, newProps);
|
|
3260
3259
|
}
|
|
3261
3260
|
function isSuperset(superset, subset) {
|
|
3262
3261
|
for (const field of subset) {
|
|
@@ -3267,8 +3266,8 @@ function isSuperset(superset, subset) {
|
|
|
3267
3266
|
return true;
|
|
3268
3267
|
}
|
|
3269
3268
|
function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
3270
|
-
const underlying = value[
|
|
3271
|
-
const objectDef = value[
|
|
3269
|
+
const underlying = value[chunkOVZCGOMG_cjs.UnderlyingOsdkObject];
|
|
3270
|
+
const objectDef = value[chunkOVZCGOMG_cjs.ObjectDefRef];
|
|
3272
3271
|
const newProps = {
|
|
3273
3272
|
$apiName: underlying.$apiName,
|
|
3274
3273
|
$objectType: underlying.$objectType,
|
|
@@ -3284,7 +3283,7 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
|
3284
3283
|
}
|
|
3285
3284
|
}
|
|
3286
3285
|
}
|
|
3287
|
-
return
|
|
3286
|
+
return chunkOVZCGOMG_cjs.createOsdkObject(value[chunkOVZCGOMG_cjs.ClientRef], objectDef, newProps);
|
|
3288
3287
|
}
|
|
3289
3288
|
function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
|
|
3290
3289
|
if (targetRdpFields.size === 0) {
|
|
@@ -3296,8 +3295,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
3296
3295
|
}
|
|
3297
3296
|
return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
|
|
3298
3297
|
}
|
|
3299
|
-
const sourceUnderlying = sourceValue[
|
|
3300
|
-
const objectDef = sourceValue[
|
|
3298
|
+
const sourceUnderlying = sourceValue[chunkOVZCGOMG_cjs.UnderlyingOsdkObject];
|
|
3299
|
+
const objectDef = sourceValue[chunkOVZCGOMG_cjs.ObjectDefRef];
|
|
3301
3300
|
const newProps = {
|
|
3302
3301
|
$apiName: sourceUnderlying.$apiName,
|
|
3303
3302
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -3311,14 +3310,14 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
3311
3310
|
}
|
|
3312
3311
|
}
|
|
3313
3312
|
if (targetCurrentValue) {
|
|
3314
|
-
const targetUnderlying = targetCurrentValue[
|
|
3313
|
+
const targetUnderlying = targetCurrentValue[chunkOVZCGOMG_cjs.UnderlyingOsdkObject];
|
|
3315
3314
|
for (const field of targetRdpFields) {
|
|
3316
3315
|
if (!sourceRdpFields.has(field) && field in targetUnderlying) {
|
|
3317
3316
|
newProps[field] = targetUnderlying[field];
|
|
3318
3317
|
}
|
|
3319
3318
|
}
|
|
3320
3319
|
}
|
|
3321
|
-
return
|
|
3320
|
+
return chunkOVZCGOMG_cjs.createOsdkObject(sourceValue[chunkOVZCGOMG_cjs.ClientRef], objectDef, newProps);
|
|
3322
3321
|
}
|
|
3323
3322
|
|
|
3324
3323
|
// src/observable/internal/object/ObjectCacheKeyRegistry.ts
|
|
@@ -3453,7 +3452,7 @@ var BulkObjectLoader = class {
|
|
|
3453
3452
|
#maxEntries;
|
|
3454
3453
|
constructor(client, maxWait = 25, maxEntries = 100) {
|
|
3455
3454
|
this.#client = client;
|
|
3456
|
-
this.#logger = client[
|
|
3455
|
+
this.#logger = client[chunkOZNDU7AU_cjs.additionalContext].logger;
|
|
3457
3456
|
this.#maxWait = maxWait;
|
|
3458
3457
|
this.#maxEntries = maxEntries;
|
|
3459
3458
|
}
|
|
@@ -3522,7 +3521,7 @@ var ObjectQuery = class extends Query {
|
|
|
3522
3521
|
#apiName;
|
|
3523
3522
|
#pk;
|
|
3524
3523
|
constructor(store, subject, type, pk, cacheKey, opts) {
|
|
3525
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3524
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkOZNDU7AU_cjs.additionalContext].logger?.child({}, {
|
|
3526
3525
|
msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3527
3526
|
}) : void 0);
|
|
3528
3527
|
this.#apiName = type;
|
|
@@ -3683,7 +3682,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3683
3682
|
#composedObjectSet;
|
|
3684
3683
|
#objectTypes;
|
|
3685
3684
|
constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
|
|
3686
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3685
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkOZNDU7AU_cjs.additionalContext].logger?.child({}, {
|
|
3687
3686
|
msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3688
3687
|
}) : void 0);
|
|
3689
3688
|
this.#baseObjectSetWire = baseObjectSetWire;
|
|
@@ -3728,7 +3727,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3728
3727
|
}
|
|
3729
3728
|
if (opts.union) {
|
|
3730
3729
|
for (const os of opts.union) {
|
|
3731
|
-
const wire =
|
|
3730
|
+
const wire = chunkOZNDU7AU_cjs.getWireObjectSet(os);
|
|
3732
3731
|
if (wire.type) {
|
|
3733
3732
|
types.add(wire.type);
|
|
3734
3733
|
}
|
|
@@ -3736,7 +3735,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3736
3735
|
}
|
|
3737
3736
|
if (opts.intersect) {
|
|
3738
3737
|
for (const os of opts.intersect) {
|
|
3739
|
-
const wire =
|
|
3738
|
+
const wire = chunkOZNDU7AU_cjs.getWireObjectSet(os);
|
|
3740
3739
|
if (wire.type) {
|
|
3741
3740
|
types.add(wire.type);
|
|
3742
3741
|
}
|
|
@@ -3744,7 +3743,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3744
3743
|
}
|
|
3745
3744
|
if (opts.subtract) {
|
|
3746
3745
|
for (const os of opts.subtract) {
|
|
3747
|
-
const wire =
|
|
3746
|
+
const wire = chunkOZNDU7AU_cjs.getWireObjectSet(os);
|
|
3748
3747
|
if (wire.type) {
|
|
3749
3748
|
types.add(wire.type);
|
|
3750
3749
|
}
|
|
@@ -3764,10 +3763,10 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
3764
3763
|
*/
|
|
3765
3764
|
async fetchPageData(signal) {
|
|
3766
3765
|
if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
3767
|
-
const wireObjectSet =
|
|
3766
|
+
const wireObjectSet = chunkOZNDU7AU_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
3768
3767
|
const {
|
|
3769
3768
|
resultType
|
|
3770
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3769
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkOZNDU7AU_cjs.additionalContext], wireObjectSet);
|
|
3771
3770
|
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy);
|
|
3772
3771
|
}
|
|
3773
3772
|
const resp = await this.#composedObjectSet.fetchPage({
|
|
@@ -3836,7 +3835,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
3836
3835
|
const {
|
|
3837
3836
|
baseObjectSet
|
|
3838
3837
|
} = options;
|
|
3839
|
-
const baseObjectSetWire = JSON.stringify(
|
|
3838
|
+
const baseObjectSetWire = JSON.stringify(chunkOZNDU7AU_cjs.getWireObjectSet(baseObjectSet));
|
|
3840
3839
|
const operations = this.buildCanonicalizedOperations(options);
|
|
3841
3840
|
const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
|
|
3842
3841
|
return this.store.queries.get(objectSetCacheKey, () => {
|
|
@@ -3852,13 +3851,13 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
3852
3851
|
operations.withProperties = Object.keys(options.withProperties).sort();
|
|
3853
3852
|
}
|
|
3854
3853
|
if (options.union && options.union.length > 0) {
|
|
3855
|
-
operations.union = options.union.map((os) => JSON.stringify(
|
|
3854
|
+
operations.union = options.union.map((os) => JSON.stringify(chunkOZNDU7AU_cjs.getWireObjectSet(os)));
|
|
3856
3855
|
}
|
|
3857
3856
|
if (options.intersect && options.intersect.length > 0) {
|
|
3858
|
-
operations.intersect = options.intersect.map((os) => JSON.stringify(
|
|
3857
|
+
operations.intersect = options.intersect.map((os) => JSON.stringify(chunkOZNDU7AU_cjs.getWireObjectSet(os)));
|
|
3859
3858
|
}
|
|
3860
3859
|
if (options.subtract && options.subtract.length > 0) {
|
|
3861
|
-
operations.subtract = options.subtract.map((os) => JSON.stringify(
|
|
3860
|
+
operations.subtract = options.subtract.map((os) => JSON.stringify(chunkOZNDU7AU_cjs.getWireObjectSet(os)));
|
|
3862
3861
|
}
|
|
3863
3862
|
if (options.pivotTo) {
|
|
3864
3863
|
operations.pivotTo = options.pivotTo;
|
|
@@ -3930,7 +3929,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
|
|
|
3930
3929
|
apiName: "__rdp_canonicalizer_holder__"
|
|
3931
3930
|
};
|
|
3932
3931
|
for (const [key, rdpFunction] of Object.entries(rdp)) {
|
|
3933
|
-
const builder =
|
|
3932
|
+
const builder = chunkOZNDU7AU_cjs.createWithPropertiesObjectSet(
|
|
3934
3933
|
objectTypeHolder,
|
|
3935
3934
|
{
|
|
3936
3935
|
type: "methodInput"
|
|
@@ -3998,7 +3997,7 @@ var Store = class {
|
|
|
3998
3997
|
subjects = this.layers.subjects;
|
|
3999
3998
|
// these are hopefully temporary
|
|
4000
3999
|
constructor(client) {
|
|
4001
|
-
this.logger = client[
|
|
4000
|
+
this.logger = client[chunkOZNDU7AU_cjs.additionalContext].logger?.child({}, {
|
|
4002
4001
|
msgPrefix: "Store"
|
|
4003
4002
|
});
|
|
4004
4003
|
this.client = client;
|
|
@@ -4271,10 +4270,10 @@ var Store = class {
|
|
|
4271
4270
|
|
|
4272
4271
|
// src/observable/ObservableClient.ts
|
|
4273
4272
|
function createObservableClient(client) {
|
|
4274
|
-
const tweakedClient =
|
|
4275
|
-
...client[
|
|
4276
|
-
fetch: shared_net_fetch.createFetchHeaderMutator(client[
|
|
4277
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
4273
|
+
const tweakedClient = chunkOVZCGOMG_cjs.createClientFromContext({
|
|
4274
|
+
...client[chunkOZNDU7AU_cjs.additionalContext],
|
|
4275
|
+
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkOZNDU7AU_cjs.additionalContext].fetch, (headers) => {
|
|
4276
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkOVZCGOMG_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
|
|
4278
4277
|
return headers;
|
|
4279
4278
|
})
|
|
4280
4279
|
});
|
|
@@ -4318,11 +4317,11 @@ function getOsdkConfig(ontologyRid) {
|
|
|
4318
4317
|
|
|
4319
4318
|
Object.defineProperty(exports, "createClientWithTransaction", {
|
|
4320
4319
|
enumerable: true,
|
|
4321
|
-
get: function () { return
|
|
4320
|
+
get: function () { return chunkOVZCGOMG_cjs.createClientWithTransaction; }
|
|
4322
4321
|
});
|
|
4323
4322
|
Object.defineProperty(exports, "augment", {
|
|
4324
4323
|
enumerable: true,
|
|
4325
|
-
get: function () { return
|
|
4324
|
+
get: function () { return chunkOZNDU7AU_cjs.augment; }
|
|
4326
4325
|
});
|
|
4327
4326
|
exports.computeObjectSetCacheKey = computeObjectSetCacheKey;
|
|
4328
4327
|
exports.createObservableClient = createObservableClient;
|