@osdk/client 2.25.0 → 2.25.1-main-90f7fb6fbd4d38d9eeb36c4bb00ec8ca7db8bd95
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 +8 -0
- 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/{applyStreamingQuery-6T4TZT2J.cjs → applyStreamingQuery-HYPSPLFN.cjs} +9 -9
- package/build/cjs/{applyStreamingQuery-6T4TZT2J.cjs.map → applyStreamingQuery-HYPSPLFN.cjs.map} +1 -1
- package/build/cjs/{chunk-SVE3DMG5.cjs → chunk-26AZ3LMH.cjs} +13 -13
- package/build/cjs/{chunk-SVE3DMG5.cjs.map → chunk-26AZ3LMH.cjs.map} +1 -1
- package/build/cjs/{chunk-WA246HQE.cjs → chunk-DZA3BOGZ.cjs} +74 -74
- package/build/cjs/{chunk-WA246HQE.cjs.map → chunk-DZA3BOGZ.cjs.map} +1 -1
- package/build/cjs/{chunk-6ZFTHAN6.cjs → chunk-HBCI3QZV.cjs} +45 -45
- package/build/cjs/chunk-HBCI3QZV.cjs.map +1 -0
- package/build/cjs/{chunk-WOPBEGWL.cjs → chunk-PCJDAUL2.cjs} +2 -2
- package/build/cjs/{chunk-WOPBEGWL.cjs.map → chunk-PCJDAUL2.cjs.map} +1 -1
- package/build/cjs/index.cjs +11 -11
- package/build/cjs/public/experimental.cjs +6 -6
- package/build/cjs/public/internal.cjs +7 -7
- package/build/cjs/public/observable.cjs +5 -5
- package/build/cjs/public/unstable-do-not-use.cjs +14 -14
- 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 +6 -6
- package/build/cjs/chunk-6ZFTHAN6.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkHBCI3QZV_cjs = require('./chunk-HBCI3QZV.cjs');
|
|
4
|
+
var chunk26AZ3LMH_cjs = require('./chunk-26AZ3LMH.cjs');
|
|
5
|
+
var chunkPCJDAUL2_cjs = require('./chunk-PCJDAUL2.cjs');
|
|
6
6
|
var chunkYP43NHIA_cjs = require('./chunk-YP43NHIA.cjs');
|
|
7
7
|
var shared_net_fetch = require('@osdk/shared.net.fetch');
|
|
8
8
|
var rxjs = require('rxjs');
|
|
@@ -66,8 +66,8 @@ var ObservableClientImpl = class {
|
|
|
66
66
|
const instances = [];
|
|
67
67
|
const objectSetWires = [];
|
|
68
68
|
for (const item of options.dependsOnObjects ?? []) {
|
|
69
|
-
if (
|
|
70
|
-
objectSetWires.push(
|
|
69
|
+
if (chunkPCJDAUL2_cjs.isObjectSet(item)) {
|
|
70
|
+
objectSetWires.push(chunkPCJDAUL2_cjs.getWireObjectSet(item));
|
|
71
71
|
} else {
|
|
72
72
|
instances.push({
|
|
73
73
|
$apiName: item.$objectType ?? item.$apiName,
|
|
@@ -75,7 +75,7 @@ var ObservableClientImpl = class {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) =>
|
|
78
|
+
const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunkPCJDAUL2_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkPCJDAUL2_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
|
|
79
79
|
return this.__experimentalStore.functions.observe({
|
|
80
80
|
...options,
|
|
81
81
|
queryDef,
|
|
@@ -138,7 +138,7 @@ var ObservableClientImpl = class {
|
|
|
138
138
|
if (!arr || arr.length === 0) {
|
|
139
139
|
return arr;
|
|
140
140
|
}
|
|
141
|
-
const wireStrings = arr.map((os) => JSON.stringify(
|
|
141
|
+
const wireStrings = arr.map((os) => JSON.stringify(chunkPCJDAUL2_cjs.getWireObjectSet(os)));
|
|
142
142
|
const canonKey = canonicalize(wireStrings);
|
|
143
143
|
let cached = cache.get(canonKey);
|
|
144
144
|
if (!cached) {
|
|
@@ -352,7 +352,7 @@ var OptimisticJob = class {
|
|
|
352
352
|
return this;
|
|
353
353
|
},
|
|
354
354
|
createObject(type, pk, properties) {
|
|
355
|
-
const create = store.client[
|
|
355
|
+
const create = store.client[chunkPCJDAUL2_cjs.additionalContext].objectFactory(store.client[chunkPCJDAUL2_cjs.additionalContext], [{
|
|
356
356
|
$primaryKey: pk,
|
|
357
357
|
$apiName: type.apiName,
|
|
358
358
|
$objectType: type.apiName,
|
|
@@ -857,7 +857,7 @@ var Query = class {
|
|
|
857
857
|
this.store = store;
|
|
858
858
|
this.cacheKeys = store.cacheKeys;
|
|
859
859
|
this.#subject = observable;
|
|
860
|
-
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[
|
|
860
|
+
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkPCJDAUL2_cjs.additionalContext].logger : store.client[chunkPCJDAUL2_cjs.additionalContext].logger?.child({}, {
|
|
861
861
|
msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
|
|
862
862
|
}));
|
|
863
863
|
}
|
|
@@ -1019,7 +1019,7 @@ var AggregationQuery = class extends Query {
|
|
|
1019
1019
|
#invalidationTypes;
|
|
1020
1020
|
#invalidationTypesPromise;
|
|
1021
1021
|
constructor(store, subject, cacheKey, opts) {
|
|
1022
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1022
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPCJDAUL2_cjs.additionalContext].logger?.child({}, {
|
|
1023
1023
|
msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1024
1024
|
}) : void 0);
|
|
1025
1025
|
this.apiName = cacheKey.otherKeys[API_NAME_IDX2];
|
|
@@ -1037,7 +1037,7 @@ var AggregationQuery = class extends Query {
|
|
|
1037
1037
|
try {
|
|
1038
1038
|
const {
|
|
1039
1039
|
invalidationSet
|
|
1040
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
1040
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkPCJDAUL2_cjs.additionalContext], wireObjectSet);
|
|
1041
1041
|
return /* @__PURE__ */ new Set([this.apiName, ...invalidationSet]);
|
|
1042
1042
|
} catch (error) {
|
|
1043
1043
|
this.store.logger?.error("Failed to compute invalidation types for aggregation, falling back to base type only", error);
|
|
@@ -1108,7 +1108,7 @@ var ObjectAggregationQuery = class extends AggregationQuery {
|
|
|
1108
1108
|
};
|
|
1109
1109
|
let objectSet;
|
|
1110
1110
|
if (this.parsedWireObjectSet) {
|
|
1111
|
-
objectSet =
|
|
1111
|
+
objectSet = chunkPCJDAUL2_cjs.createObjectSet(objectTypeDef, this.store.client[chunkPCJDAUL2_cjs.additionalContext], this.parsedWireObjectSet);
|
|
1112
1112
|
} else {
|
|
1113
1113
|
objectSet = this.store.client(objectTypeDef);
|
|
1114
1114
|
}
|
|
@@ -1150,7 +1150,7 @@ var AggregationsHelper = class extends AbstractHelper {
|
|
|
1150
1150
|
return this.getOrCreateQuery(options, void 0);
|
|
1151
1151
|
}
|
|
1152
1152
|
getQueryWithObjectSet(options) {
|
|
1153
|
-
const serializedObjectSet = JSON.stringify(
|
|
1153
|
+
const serializedObjectSet = JSON.stringify(chunkPCJDAUL2_cjs.getWireObjectSet(options.objectSet));
|
|
1154
1154
|
return this.getOrCreateQuery(options, serializedObjectSet);
|
|
1155
1155
|
}
|
|
1156
1156
|
getOrCreateQuery(options, serializedObjectSet) {
|
|
@@ -1473,7 +1473,7 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1473
1473
|
path.push("$:map_end");
|
|
1474
1474
|
return arr;
|
|
1475
1475
|
}
|
|
1476
|
-
if (
|
|
1476
|
+
if (chunk26AZ3LMH_cjs.isObjectSpecifiersObject(value)) {
|
|
1477
1477
|
const objectType = value.$objectType ?? value.$apiName;
|
|
1478
1478
|
path.push("$:osdk", objectType, value.$primaryKey);
|
|
1479
1479
|
return {
|
|
@@ -1481,8 +1481,8 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1481
1481
|
$primaryKey: value.$primaryKey
|
|
1482
1482
|
};
|
|
1483
1483
|
}
|
|
1484
|
-
if (
|
|
1485
|
-
const wire = JSON.stringify(
|
|
1484
|
+
if (chunkPCJDAUL2_cjs.isObjectSet(value)) {
|
|
1485
|
+
const wire = JSON.stringify(chunkPCJDAUL2_cjs.getWireObjectSet(value));
|
|
1486
1486
|
path.push("$:objectset", wire);
|
|
1487
1487
|
return wire;
|
|
1488
1488
|
}
|
|
@@ -1542,7 +1542,7 @@ var FunctionQuery = class extends Query {
|
|
|
1542
1542
|
#dependsOnObjects;
|
|
1543
1543
|
#queryDef;
|
|
1544
1544
|
constructor(store, subject, queryDef, params, cacheKey, opts, objectSetTypesPromise) {
|
|
1545
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1545
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPCJDAUL2_cjs.additionalContext].logger?.child({}, {
|
|
1546
1546
|
msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1547
1547
|
}) : void 0);
|
|
1548
1548
|
this.#apiName = queryDef.apiName;
|
|
@@ -1599,7 +1599,7 @@ var FunctionQuery = class extends Query {
|
|
|
1599
1599
|
}).debug("calling _fetchAndStore");
|
|
1600
1600
|
}
|
|
1601
1601
|
try {
|
|
1602
|
-
const result = await
|
|
1602
|
+
const result = await chunk26AZ3LMH_cjs.applyQuery(this.store.client[chunkPCJDAUL2_cjs.additionalContext], this.#queryDef, this.#params);
|
|
1603
1603
|
const executedAt = Date.now();
|
|
1604
1604
|
this.store.batch({}, (batch) => {
|
|
1605
1605
|
this.writeToStore({
|
|
@@ -2807,7 +2807,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2807
2807
|
batch.changes.modified.add(this.cacheKey);
|
|
2808
2808
|
}
|
|
2809
2809
|
constructor(store, subject, cacheKey, opts) {
|
|
2810
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
2810
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPCJDAUL2_cjs.additionalContext].logger?.child({}, {
|
|
2811
2811
|
msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
2812
2812
|
}) : void 0);
|
|
2813
2813
|
[this.#sourceApiName, this.#sourceTypeKind, this.#sourceUnderlyingObjectType, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
|
|
@@ -2828,7 +2828,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2828
2828
|
*/
|
|
2829
2829
|
async fetchPageData(signal) {
|
|
2830
2830
|
const client = this.store.client;
|
|
2831
|
-
const ontologyProvider = client[
|
|
2831
|
+
const ontologyProvider = client[chunkPCJDAUL2_cjs.additionalContext].ontologyProvider;
|
|
2832
2832
|
const isInterface = this.#sourceTypeKind === "interface";
|
|
2833
2833
|
const hasOrderBy = this.#orderBy && Object.keys(this.#orderBy).length > 0;
|
|
2834
2834
|
let target;
|
|
@@ -2951,7 +2951,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2951
2951
|
}
|
|
2952
2952
|
return (async () => {
|
|
2953
2953
|
try {
|
|
2954
|
-
const ontologyProvider = this.store.client[
|
|
2954
|
+
const ontologyProvider = this.store.client[chunkPCJDAUL2_cjs.additionalContext].ontologyProvider;
|
|
2955
2955
|
if (this.#sourceTypeKind === "interface") {
|
|
2956
2956
|
const objectMetadata2 = await ontologyProvider.getObjectDefinition(objectType);
|
|
2957
2957
|
if (this.#sourceApiName in objectMetadata2.interfaceMap) {
|
|
@@ -3132,7 +3132,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3132
3132
|
batch.changes.registerList(this.cacheKey);
|
|
3133
3133
|
}
|
|
3134
3134
|
constructor(store, subject, apiName, cacheKey, opts) {
|
|
3135
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3135
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPCJDAUL2_cjs.additionalContext].logger?.child({}, {
|
|
3136
3136
|
msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3137
3137
|
}) : void 0);
|
|
3138
3138
|
this.apiName = apiName;
|
|
@@ -3185,11 +3185,11 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3185
3185
|
async fetchPageData(signal) {
|
|
3186
3186
|
const needsResultType = Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy) || this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied;
|
|
3187
3187
|
if (needsResultType) {
|
|
3188
|
-
const wireObjectSet =
|
|
3188
|
+
const wireObjectSet = chunkPCJDAUL2_cjs.getWireObjectSet(this.#objectSet);
|
|
3189
3189
|
const {
|
|
3190
3190
|
resultType,
|
|
3191
3191
|
invalidationSet
|
|
3192
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3192
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkPCJDAUL2_cjs.additionalContext], wireObjectSet);
|
|
3193
3193
|
this.#updateFetchedObjectType(resultType.apiName);
|
|
3194
3194
|
this.#rdpInvalidationSet = invalidationSet;
|
|
3195
3195
|
if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
@@ -3219,11 +3219,11 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3219
3219
|
}
|
|
3220
3220
|
if (this.#fetchedObjectType == null) {
|
|
3221
3221
|
try {
|
|
3222
|
-
const wireObjectSet =
|
|
3222
|
+
const wireObjectSet = chunkPCJDAUL2_cjs.getWireObjectSet(this.#objectSet);
|
|
3223
3223
|
const {
|
|
3224
3224
|
resultType,
|
|
3225
3225
|
invalidationSet
|
|
3226
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3226
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkPCJDAUL2_cjs.additionalContext], wireObjectSet);
|
|
3227
3227
|
this.#updateFetchedObjectType(resultType.apiName);
|
|
3228
3228
|
this.#rdpInvalidationSet = invalidationSet;
|
|
3229
3229
|
} catch {
|
|
@@ -3493,7 +3493,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3493
3493
|
type,
|
|
3494
3494
|
apiName: this.apiName
|
|
3495
3495
|
};
|
|
3496
|
-
const clientCtx = store.client[
|
|
3496
|
+
const clientCtx = store.client[chunkPCJDAUL2_cjs.additionalContext];
|
|
3497
3497
|
let objectSet;
|
|
3498
3498
|
if (rids != null) {
|
|
3499
3499
|
objectSet = clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
|
|
@@ -3532,7 +3532,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3532
3532
|
}
|
|
3533
3533
|
extractRelevantObjects(changes) {
|
|
3534
3534
|
const matchesApiName = ([, object]) => {
|
|
3535
|
-
return this.apiName in object[
|
|
3535
|
+
return this.apiName in object[chunkHBCI3QZV_cjs.ObjectDefRef].interfaceMap;
|
|
3536
3536
|
};
|
|
3537
3537
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
3538
3538
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
@@ -3551,7 +3551,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3551
3551
|
}
|
|
3552
3552
|
};
|
|
3553
3553
|
function createSourceSetForPivot(store, pivotInfo, rids) {
|
|
3554
|
-
const clientCtx = store.client[
|
|
3554
|
+
const clientCtx = store.client[chunkPCJDAUL2_cjs.additionalContext];
|
|
3555
3555
|
if (rids != null) {
|
|
3556
3556
|
return clientCtx.objectSetFactory({
|
|
3557
3557
|
type: "object",
|
|
@@ -3606,7 +3606,7 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
3606
3606
|
const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX];
|
|
3607
3607
|
const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
|
|
3608
3608
|
const rids = this.cacheKey.otherKeys[RIDS_IDX];
|
|
3609
|
-
const clientCtx = store.client[
|
|
3609
|
+
const clientCtx = store.client[chunkPCJDAUL2_cjs.additionalContext];
|
|
3610
3610
|
const typeDefinition = {
|
|
3611
3611
|
type: "object",
|
|
3612
3612
|
apiName: this.apiName
|
|
@@ -3865,7 +3865,7 @@ var MediaMetadataQuery = class extends Query {
|
|
|
3865
3865
|
#propertyName;
|
|
3866
3866
|
#preview;
|
|
3867
3867
|
constructor(store, subject, objectType, primaryKey, propertyName, cacheKey, opts) {
|
|
3868
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3868
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPCJDAUL2_cjs.additionalContext].logger?.child({}, {
|
|
3869
3869
|
msgPrefix: `MediaMetadataQuery<${objectType}, ${JSON.stringify(primaryKey)}, ${propertyName}>`
|
|
3870
3870
|
}) : void 0);
|
|
3871
3871
|
this.#objectType = objectType;
|
|
@@ -3898,8 +3898,8 @@ var MediaMetadataQuery = class extends Query {
|
|
|
3898
3898
|
this.setStatus("loading", batch);
|
|
3899
3899
|
});
|
|
3900
3900
|
try {
|
|
3901
|
-
const ontologyRid = await this.store.client[
|
|
3902
|
-
const response = await chunkYP43NHIA_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[
|
|
3901
|
+
const ontologyRid = await this.store.client[chunkPCJDAUL2_cjs.additionalContext].ontologyRid;
|
|
3902
|
+
const response = await chunkYP43NHIA_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunkPCJDAUL2_cjs.additionalContext], ontologyRid, this.#objectType, String(this.#primaryKey), this.#propertyName, {
|
|
3903
3903
|
preview: this.#preview
|
|
3904
3904
|
});
|
|
3905
3905
|
const metadata = {
|
|
@@ -4021,8 +4021,8 @@ var MediaHelper = class extends AbstractHelper {
|
|
|
4021
4021
|
return this._subscribe(query, options, observer);
|
|
4022
4022
|
}
|
|
4023
4023
|
async fetchMetadata(coords, options) {
|
|
4024
|
-
const ontologyRid = await this.store.client[
|
|
4025
|
-
const response = await chunkYP43NHIA_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[
|
|
4024
|
+
const ontologyRid = await this.store.client[chunkPCJDAUL2_cjs.additionalContext].ontologyRid;
|
|
4025
|
+
const response = await chunkYP43NHIA_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunkPCJDAUL2_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
|
|
4026
4026
|
preview: options?.preview ?? true
|
|
4027
4027
|
});
|
|
4028
4028
|
return {
|
|
@@ -4042,8 +4042,8 @@ var MediaHelper = class extends AbstractHelper {
|
|
|
4042
4042
|
let response;
|
|
4043
4043
|
const coords = this.resolveToCoords(mediaOrLocation);
|
|
4044
4044
|
if (coords) {
|
|
4045
|
-
const ontologyRid = await this.store.client[
|
|
4046
|
-
response = await chunkYP43NHIA_cjs.MediaReferenceProperty_exports.getMediaContent(this.store.client[
|
|
4045
|
+
const ontologyRid = await this.store.client[chunkPCJDAUL2_cjs.additionalContext].ontologyRid;
|
|
4046
|
+
response = await chunkYP43NHIA_cjs.MediaReferenceProperty_exports.getMediaContent(this.store.client[chunkPCJDAUL2_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
|
|
4047
4047
|
preview
|
|
4048
4048
|
});
|
|
4049
4049
|
} else if ("fetchContents" in mediaOrLocation) {
|
|
@@ -4143,8 +4143,8 @@ function stripRdpFields(value, rdpFields) {
|
|
|
4143
4143
|
if (rdpFields.size === 0) {
|
|
4144
4144
|
return value;
|
|
4145
4145
|
}
|
|
4146
|
-
const underlying = value[
|
|
4147
|
-
const objectDef = value[
|
|
4146
|
+
const underlying = value[chunkHBCI3QZV_cjs.UnderlyingOsdkObject];
|
|
4147
|
+
const objectDef = value[chunkHBCI3QZV_cjs.ObjectDefRef];
|
|
4148
4148
|
const newProps = {
|
|
4149
4149
|
$apiName: underlying.$apiName,
|
|
4150
4150
|
$objectType: underlying.$objectType,
|
|
@@ -4157,7 +4157,7 @@ function stripRdpFields(value, rdpFields) {
|
|
|
4157
4157
|
newProps[key] = underlying[key];
|
|
4158
4158
|
}
|
|
4159
4159
|
}
|
|
4160
|
-
return
|
|
4160
|
+
return chunkHBCI3QZV_cjs.createOsdkObject(value[chunkHBCI3QZV_cjs.ClientRef], objectDef, newProps);
|
|
4161
4161
|
}
|
|
4162
4162
|
function isSuperset(superset, subset) {
|
|
4163
4163
|
for (const field of subset) {
|
|
@@ -4168,8 +4168,8 @@ function isSuperset(superset, subset) {
|
|
|
4168
4168
|
return true;
|
|
4169
4169
|
}
|
|
4170
4170
|
function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
4171
|
-
const underlying = value[
|
|
4172
|
-
const objectDef = value[
|
|
4171
|
+
const underlying = value[chunkHBCI3QZV_cjs.UnderlyingOsdkObject];
|
|
4172
|
+
const objectDef = value[chunkHBCI3QZV_cjs.ObjectDefRef];
|
|
4173
4173
|
const newProps = {
|
|
4174
4174
|
$apiName: underlying.$apiName,
|
|
4175
4175
|
$objectType: underlying.$objectType,
|
|
@@ -4185,12 +4185,12 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
|
4185
4185
|
}
|
|
4186
4186
|
}
|
|
4187
4187
|
}
|
|
4188
|
-
return
|
|
4188
|
+
return chunkHBCI3QZV_cjs.createOsdkObject(value[chunkHBCI3QZV_cjs.ClientRef], objectDef, newProps);
|
|
4189
4189
|
}
|
|
4190
4190
|
function mergeSelectFields(sourceValue, selectFields, existingValue) {
|
|
4191
|
-
const sourceUnderlying = sourceValue[
|
|
4192
|
-
const existingUnderlying = existingValue[
|
|
4193
|
-
const objectDef = sourceValue[
|
|
4191
|
+
const sourceUnderlying = sourceValue[chunkHBCI3QZV_cjs.UnderlyingOsdkObject];
|
|
4192
|
+
const existingUnderlying = existingValue[chunkHBCI3QZV_cjs.UnderlyingOsdkObject];
|
|
4193
|
+
const objectDef = sourceValue[chunkHBCI3QZV_cjs.ObjectDefRef];
|
|
4194
4194
|
const newProps = {
|
|
4195
4195
|
$apiName: sourceUnderlying.$apiName,
|
|
4196
4196
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -4208,7 +4208,7 @@ function mergeSelectFields(sourceValue, selectFields, existingValue) {
|
|
|
4208
4208
|
newProps[key] = sourceUnderlying[key];
|
|
4209
4209
|
}
|
|
4210
4210
|
}
|
|
4211
|
-
return
|
|
4211
|
+
return chunkHBCI3QZV_cjs.createOsdkObject(sourceValue[chunkHBCI3QZV_cjs.ClientRef], objectDef, newProps);
|
|
4212
4212
|
}
|
|
4213
4213
|
function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
|
|
4214
4214
|
if (targetRdpFields.size === 0) {
|
|
@@ -4220,8 +4220,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
4220
4220
|
}
|
|
4221
4221
|
return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
|
|
4222
4222
|
}
|
|
4223
|
-
const sourceUnderlying = sourceValue[
|
|
4224
|
-
const objectDef = sourceValue[
|
|
4223
|
+
const sourceUnderlying = sourceValue[chunkHBCI3QZV_cjs.UnderlyingOsdkObject];
|
|
4224
|
+
const objectDef = sourceValue[chunkHBCI3QZV_cjs.ObjectDefRef];
|
|
4225
4225
|
const newProps = {
|
|
4226
4226
|
$apiName: sourceUnderlying.$apiName,
|
|
4227
4227
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -4235,7 +4235,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
4235
4235
|
}
|
|
4236
4236
|
}
|
|
4237
4237
|
if (targetCurrentValue) {
|
|
4238
|
-
const targetUnderlying = targetCurrentValue[
|
|
4238
|
+
const targetUnderlying = targetCurrentValue[chunkHBCI3QZV_cjs.UnderlyingOsdkObject];
|
|
4239
4239
|
for (const field of targetRdpFields) {
|
|
4240
4240
|
if (field in targetUnderlying) {
|
|
4241
4241
|
if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
|
|
@@ -4244,7 +4244,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
4244
4244
|
}
|
|
4245
4245
|
}
|
|
4246
4246
|
}
|
|
4247
|
-
return
|
|
4247
|
+
return chunkHBCI3QZV_cjs.createOsdkObject(sourceValue[chunkHBCI3QZV_cjs.ClientRef], objectDef, newProps);
|
|
4248
4248
|
}
|
|
4249
4249
|
|
|
4250
4250
|
// src/observable/internal/object/ObjectCacheKeyRegistry.ts
|
|
@@ -4399,7 +4399,7 @@ var BulkObjectLoader = class {
|
|
|
4399
4399
|
#maxEntries;
|
|
4400
4400
|
constructor(client, maxWait = 25, maxEntries = 100) {
|
|
4401
4401
|
this.#client = client;
|
|
4402
|
-
this.#logger = client[
|
|
4402
|
+
this.#logger = client[chunkPCJDAUL2_cjs.additionalContext].logger;
|
|
4403
4403
|
this.#maxWait = maxWait;
|
|
4404
4404
|
this.#maxEntries = maxEntries;
|
|
4405
4405
|
}
|
|
@@ -4568,7 +4568,7 @@ var ObjectQuery = class extends Query {
|
|
|
4568
4568
|
#includeAllBaseObjectProperties;
|
|
4569
4569
|
#implementingTypes;
|
|
4570
4570
|
constructor(store, subject, type, pk, cacheKey, opts, defType = "object", select, loadPropertySecurityMetadata, includeAllBaseObjectProperties) {
|
|
4571
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4571
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPCJDAUL2_cjs.additionalContext].logger?.child({}, {
|
|
4572
4572
|
msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4573
4573
|
}) : void 0);
|
|
4574
4574
|
this.#apiName = type;
|
|
@@ -4674,7 +4674,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4674
4674
|
select,
|
|
4675
4675
|
$loadPropertySecurityMetadata
|
|
4676
4676
|
} = options;
|
|
4677
|
-
const defType =
|
|
4677
|
+
const defType = chunk26AZ3LMH_cjs.getDefType(options.apiName);
|
|
4678
4678
|
const $includeAllBaseObjectProperties = defType === "interface" && options.$includeAllBaseObjectProperties ? true : void 0;
|
|
4679
4679
|
const canonSelect = select && select.length > 0 ? this.store.selectCanonicalizer.canonicalize(select) : void 0;
|
|
4680
4680
|
const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0, canonSelect, $loadPropertySecurityMetadata ? true : void 0, $includeAllBaseObjectProperties);
|
|
@@ -4715,7 +4715,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4715
4715
|
if (valueToWrite !== tombstone && existing?.value && this.isObjectHolder(existing.value)) {
|
|
4716
4716
|
const expectedRdpFields = this.store.objectCacheKeyRegistry.getRdpFieldSet(sourceCacheKey);
|
|
4717
4717
|
if (expectedRdpFields.size > 0) {
|
|
4718
|
-
const underlying = valueToWrite[
|
|
4718
|
+
const underlying = valueToWrite[chunkHBCI3QZV_cjs.UnderlyingOsdkObject];
|
|
4719
4719
|
const actualRdpFields = /* @__PURE__ */ new Set();
|
|
4720
4720
|
for (const field of expectedRdpFields) {
|
|
4721
4721
|
if (underlying && field in underlying) {
|
|
@@ -4796,7 +4796,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
4796
4796
|
// revalidation. Lazily populated on first fetch when `withProperties` is set.
|
|
4797
4797
|
#rdpInvalidationSet;
|
|
4798
4798
|
constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
|
|
4799
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4799
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPCJDAUL2_cjs.additionalContext].logger?.child({}, {
|
|
4800
4800
|
msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4801
4801
|
}) : void 0);
|
|
4802
4802
|
this.#baseObjectSetWire = baseObjectSetWire;
|
|
@@ -4864,7 +4864,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
4864
4864
|
return;
|
|
4865
4865
|
}
|
|
4866
4866
|
for (const os of sets) {
|
|
4867
|
-
const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(
|
|
4867
|
+
const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(chunkPCJDAUL2_cjs.getWireObjectSet(os));
|
|
4868
4868
|
if (typeName) {
|
|
4869
4869
|
types.add(typeName);
|
|
4870
4870
|
}
|
|
@@ -4891,16 +4891,16 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
4891
4891
|
*/
|
|
4892
4892
|
async fetchPageData(signal) {
|
|
4893
4893
|
if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
4894
|
-
const wireObjectSet =
|
|
4894
|
+
const wireObjectSet = chunkPCJDAUL2_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
4895
4895
|
const {
|
|
4896
4896
|
resultType,
|
|
4897
4897
|
invalidationSet
|
|
4898
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
4898
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkPCJDAUL2_cjs.additionalContext], wireObjectSet);
|
|
4899
4899
|
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy);
|
|
4900
4900
|
this.#rdpInvalidationSet = invalidationSet;
|
|
4901
4901
|
}
|
|
4902
4902
|
if (this.#rdpInvalidationSet == null && this.#operations.withProperties != null) {
|
|
4903
|
-
const wireObjectSet =
|
|
4903
|
+
const wireObjectSet = chunkPCJDAUL2_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
4904
4904
|
this.#rdpInvalidationSet = await this.#computeInvalidationTypes(wireObjectSet);
|
|
4905
4905
|
}
|
|
4906
4906
|
const resp = await this.#composedObjectSet.fetchPage({
|
|
@@ -5049,7 +5049,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
5049
5049
|
try {
|
|
5050
5050
|
const {
|
|
5051
5051
|
invalidationSet
|
|
5052
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
5052
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkPCJDAUL2_cjs.additionalContext], wireObjectSet);
|
|
5053
5053
|
return invalidationSet;
|
|
5054
5054
|
} catch (error) {
|
|
5055
5055
|
this.store.logger?.error("Failed to compute invalidation types for object set query, falling back to empty set", error);
|
|
@@ -5128,7 +5128,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5128
5128
|
if (process.env.NODE_ENV !== "production") {
|
|
5129
5129
|
console.warn("[@osdk/client] streamUpdates is not supported with pivotTo. The server does not support websocket subscriptions for link-traversal queries. Ignoring streamUpdates.");
|
|
5130
5130
|
}
|
|
5131
|
-
} else if (options.withProperties ||
|
|
5131
|
+
} else if (options.withProperties || chunkPCJDAUL2_cjs.hasWithProperties(chunkPCJDAUL2_cjs.getWireObjectSet(options.baseObjectSet))) {
|
|
5132
5132
|
if (process.env.NODE_ENV !== "production") {
|
|
5133
5133
|
console.warn("[@osdk/client] streamUpdates is not supported with withProperties. The server does not support websocket subscriptions for object sets that include derived properties. Ignoring streamUpdates.");
|
|
5134
5134
|
}
|
|
@@ -5142,7 +5142,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5142
5142
|
const {
|
|
5143
5143
|
baseObjectSet
|
|
5144
5144
|
} = options;
|
|
5145
|
-
const baseObjectSetWire = JSON.stringify(
|
|
5145
|
+
const baseObjectSetWire = JSON.stringify(chunkPCJDAUL2_cjs.getWireObjectSet(baseObjectSet));
|
|
5146
5146
|
const operations = this.buildCanonicalizedOperations(options);
|
|
5147
5147
|
const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
|
|
5148
5148
|
return this.store.queries.get(objectSetCacheKey, () => {
|
|
@@ -5158,13 +5158,13 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5158
5158
|
operations.withProperties = this.rdpCanonicalizer.canonicalize(options.withProperties);
|
|
5159
5159
|
}
|
|
5160
5160
|
if (options.union && options.union.length > 0) {
|
|
5161
|
-
operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(
|
|
5161
|
+
operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(chunkPCJDAUL2_cjs.getWireObjectSet(os))));
|
|
5162
5162
|
}
|
|
5163
5163
|
if (options.intersect && options.intersect.length > 0) {
|
|
5164
|
-
operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(
|
|
5164
|
+
operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(chunkPCJDAUL2_cjs.getWireObjectSet(os))));
|
|
5165
5165
|
}
|
|
5166
5166
|
if (options.subtract && options.subtract.length > 0) {
|
|
5167
|
-
operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(
|
|
5167
|
+
operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(chunkPCJDAUL2_cjs.getWireObjectSet(os))));
|
|
5168
5168
|
}
|
|
5169
5169
|
if (options.pivotTo) {
|
|
5170
5170
|
operations.pivotTo = options.pivotTo;
|
|
@@ -5312,7 +5312,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
|
|
|
5312
5312
|
apiName: "__rdp_canonicalizer_holder__"
|
|
5313
5313
|
};
|
|
5314
5314
|
for (const [key, rdpFunction] of Object.entries(rdp)) {
|
|
5315
|
-
const builder =
|
|
5315
|
+
const builder = chunkPCJDAUL2_cjs.createWithPropertiesObjectSet(
|
|
5316
5316
|
objectTypeHolder,
|
|
5317
5317
|
{
|
|
5318
5318
|
type: "methodInput"
|
|
@@ -5479,7 +5479,7 @@ var Store = class {
|
|
|
5479
5479
|
subjects = this.layers.subjects;
|
|
5480
5480
|
// these are hopefully temporary
|
|
5481
5481
|
constructor(client) {
|
|
5482
|
-
this.logger = client[
|
|
5482
|
+
this.logger = client[chunkPCJDAUL2_cjs.additionalContext].logger?.child({}, {
|
|
5483
5483
|
msgPrefix: "Store"
|
|
5484
5484
|
});
|
|
5485
5485
|
this.client = client;
|
|
@@ -5890,10 +5890,10 @@ var Store = class {
|
|
|
5890
5890
|
|
|
5891
5891
|
// src/observable/ObservableClient.ts
|
|
5892
5892
|
function createObservableClient(client, extraUserAgents) {
|
|
5893
|
-
const tweakedClient =
|
|
5894
|
-
...client[
|
|
5895
|
-
fetch: shared_net_fetch.createFetchHeaderMutator(client[
|
|
5896
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
5893
|
+
const tweakedClient = chunkHBCI3QZV_cjs.createClientFromContext({
|
|
5894
|
+
...client[chunkPCJDAUL2_cjs.additionalContext],
|
|
5895
|
+
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkPCJDAUL2_cjs.additionalContext].fetch, (headers) => {
|
|
5896
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkHBCI3QZV_cjs.OBSERVABLE_USER_AGENT, ...extraUserAgents?.() ?? []].filter((x) => x && x?.length > 0).join(" "));
|
|
5897
5897
|
return headers;
|
|
5898
5898
|
})
|
|
5899
5899
|
});
|
|
@@ -5901,5 +5901,5 @@ function createObservableClient(client, extraUserAgents) {
|
|
|
5901
5901
|
}
|
|
5902
5902
|
|
|
5903
5903
|
exports.createObservableClient = createObservableClient;
|
|
5904
|
-
//# sourceMappingURL=chunk-
|
|
5905
|
-
//# sourceMappingURL=chunk-
|
|
5904
|
+
//# sourceMappingURL=chunk-DZA3BOGZ.cjs.map
|
|
5905
|
+
//# sourceMappingURL=chunk-DZA3BOGZ.cjs.map
|