@osdk/client 2.21.1-main-1f635101dcdf13bf3201bcaa21c641715744dbb6 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -4
- 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-GMRW7AZR.cjs → applyStreamingQuery-QLINJ5HQ.cjs} +9 -9
- package/build/cjs/{applyStreamingQuery-GMRW7AZR.cjs.map → applyStreamingQuery-QLINJ5HQ.cjs.map} +1 -1
- package/build/cjs/{chunk-TITZ237V.cjs → chunk-77XXXUGJ.cjs} +74 -74
- package/build/cjs/{chunk-TITZ237V.cjs.map → chunk-77XXXUGJ.cjs.map} +1 -1
- package/build/cjs/{chunk-EBIMOR5S.cjs → chunk-CNVWYZKL.cjs} +2 -2
- package/build/cjs/{chunk-EBIMOR5S.cjs.map → chunk-CNVWYZKL.cjs.map} +1 -1
- package/build/cjs/{chunk-IZVYD4TQ.cjs → chunk-NRPYHQFF.cjs} +42 -42
- package/build/cjs/chunk-NRPYHQFF.cjs.map +1 -0
- package/build/cjs/{chunk-DCTMCTB5.cjs → chunk-TDQU3KC2.cjs} +13 -13
- package/build/cjs/{chunk-DCTMCTB5.cjs.map → chunk-TDQU3KC2.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 +10 -10
- 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 +7 -7
- package/build/cjs/chunk-IZVYD4TQ.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkNRPYHQFF_cjs = require('./chunk-NRPYHQFF.cjs');
|
|
4
|
+
var chunkTDQU3KC2_cjs = require('./chunk-TDQU3KC2.cjs');
|
|
5
|
+
var chunkCNVWYZKL_cjs = require('./chunk-CNVWYZKL.cjs');
|
|
6
6
|
var chunkDOXHU27E_cjs = require('./chunk-DOXHU27E.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 (chunkCNVWYZKL_cjs.isObjectSet(item)) {
|
|
70
|
+
objectSetWires.push(chunkCNVWYZKL_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) => chunkCNVWYZKL_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkCNVWYZKL_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(chunkCNVWYZKL_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[chunkCNVWYZKL_cjs.additionalContext].objectFactory(store.client[chunkCNVWYZKL_cjs.additionalContext], [{
|
|
356
356
|
$primaryKey: pk,
|
|
357
357
|
$apiName: type.apiName,
|
|
358
358
|
$objectType: type.apiName,
|
|
@@ -853,7 +853,7 @@ var Query = class {
|
|
|
853
853
|
this.store = store;
|
|
854
854
|
this.cacheKeys = store.cacheKeys;
|
|
855
855
|
this.#subject = observable;
|
|
856
|
-
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[
|
|
856
|
+
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkCNVWYZKL_cjs.additionalContext].logger : store.client[chunkCNVWYZKL_cjs.additionalContext].logger?.child({}, {
|
|
857
857
|
msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
|
|
858
858
|
}));
|
|
859
859
|
}
|
|
@@ -1015,7 +1015,7 @@ var AggregationQuery = class extends Query {
|
|
|
1015
1015
|
#invalidationTypes;
|
|
1016
1016
|
#invalidationTypesPromise;
|
|
1017
1017
|
constructor(store, subject, cacheKey, opts) {
|
|
1018
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1018
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCNVWYZKL_cjs.additionalContext].logger?.child({}, {
|
|
1019
1019
|
msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1020
1020
|
}) : void 0);
|
|
1021
1021
|
this.apiName = cacheKey.otherKeys[API_NAME_IDX2];
|
|
@@ -1033,7 +1033,7 @@ var AggregationQuery = class extends Query {
|
|
|
1033
1033
|
try {
|
|
1034
1034
|
const {
|
|
1035
1035
|
invalidationSet
|
|
1036
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
1036
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkCNVWYZKL_cjs.additionalContext], wireObjectSet);
|
|
1037
1037
|
return /* @__PURE__ */ new Set([this.apiName, ...invalidationSet]);
|
|
1038
1038
|
} catch (error) {
|
|
1039
1039
|
this.store.logger?.error("Failed to compute invalidation types for aggregation, falling back to base type only", error);
|
|
@@ -1104,7 +1104,7 @@ var ObjectAggregationQuery = class extends AggregationQuery {
|
|
|
1104
1104
|
};
|
|
1105
1105
|
let objectSet;
|
|
1106
1106
|
if (this.parsedWireObjectSet) {
|
|
1107
|
-
objectSet =
|
|
1107
|
+
objectSet = chunkCNVWYZKL_cjs.createObjectSet(objectTypeDef, this.store.client[chunkCNVWYZKL_cjs.additionalContext], this.parsedWireObjectSet);
|
|
1108
1108
|
} else {
|
|
1109
1109
|
objectSet = this.store.client(objectTypeDef);
|
|
1110
1110
|
}
|
|
@@ -1146,7 +1146,7 @@ var AggregationsHelper = class extends AbstractHelper {
|
|
|
1146
1146
|
return this.getOrCreateQuery(options, void 0);
|
|
1147
1147
|
}
|
|
1148
1148
|
getQueryWithObjectSet(options) {
|
|
1149
|
-
const serializedObjectSet = JSON.stringify(
|
|
1149
|
+
const serializedObjectSet = JSON.stringify(chunkCNVWYZKL_cjs.getWireObjectSet(options.objectSet));
|
|
1150
1150
|
return this.getOrCreateQuery(options, serializedObjectSet);
|
|
1151
1151
|
}
|
|
1152
1152
|
getOrCreateQuery(options, serializedObjectSet) {
|
|
@@ -1469,7 +1469,7 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1469
1469
|
path.push("$:map_end");
|
|
1470
1470
|
return arr;
|
|
1471
1471
|
}
|
|
1472
|
-
if (
|
|
1472
|
+
if (chunkTDQU3KC2_cjs.isObjectSpecifiersObject(value)) {
|
|
1473
1473
|
const objectType = value.$objectType ?? value.$apiName;
|
|
1474
1474
|
path.push("$:osdk", objectType, value.$primaryKey);
|
|
1475
1475
|
return {
|
|
@@ -1477,8 +1477,8 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1477
1477
|
$primaryKey: value.$primaryKey
|
|
1478
1478
|
};
|
|
1479
1479
|
}
|
|
1480
|
-
if (
|
|
1481
|
-
const wire = JSON.stringify(
|
|
1480
|
+
if (chunkCNVWYZKL_cjs.isObjectSet(value)) {
|
|
1481
|
+
const wire = JSON.stringify(chunkCNVWYZKL_cjs.getWireObjectSet(value));
|
|
1482
1482
|
path.push("$:objectset", wire);
|
|
1483
1483
|
return wire;
|
|
1484
1484
|
}
|
|
@@ -1538,7 +1538,7 @@ var FunctionQuery = class extends Query {
|
|
|
1538
1538
|
#dependsOnObjects;
|
|
1539
1539
|
#queryDef;
|
|
1540
1540
|
constructor(store, subject, queryDef, params, cacheKey, opts, objectSetTypesPromise) {
|
|
1541
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1541
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCNVWYZKL_cjs.additionalContext].logger?.child({}, {
|
|
1542
1542
|
msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1543
1543
|
}) : void 0);
|
|
1544
1544
|
this.#apiName = queryDef.apiName;
|
|
@@ -1595,7 +1595,7 @@ var FunctionQuery = class extends Query {
|
|
|
1595
1595
|
}).debug("calling _fetchAndStore");
|
|
1596
1596
|
}
|
|
1597
1597
|
try {
|
|
1598
|
-
const result = await
|
|
1598
|
+
const result = await chunkTDQU3KC2_cjs.applyQuery(this.store.client[chunkCNVWYZKL_cjs.additionalContext], this.#queryDef, this.#params);
|
|
1599
1599
|
const executedAt = Date.now();
|
|
1600
1600
|
this.store.batch({}, (batch) => {
|
|
1601
1601
|
this.writeToStore({
|
|
@@ -2803,7 +2803,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2803
2803
|
batch.changes.modified.add(this.cacheKey);
|
|
2804
2804
|
}
|
|
2805
2805
|
constructor(store, subject, cacheKey, opts) {
|
|
2806
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
2806
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCNVWYZKL_cjs.additionalContext].logger?.child({}, {
|
|
2807
2807
|
msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
2808
2808
|
}) : void 0);
|
|
2809
2809
|
[this.#sourceApiName, this.#sourceTypeKind, this.#sourceUnderlyingObjectType, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
|
|
@@ -2824,7 +2824,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2824
2824
|
*/
|
|
2825
2825
|
async fetchPageData(signal) {
|
|
2826
2826
|
const client = this.store.client;
|
|
2827
|
-
const ontologyProvider = client[
|
|
2827
|
+
const ontologyProvider = client[chunkCNVWYZKL_cjs.additionalContext].ontologyProvider;
|
|
2828
2828
|
const isInterface = this.#sourceTypeKind === "interface";
|
|
2829
2829
|
const hasOrderBy = this.#orderBy && Object.keys(this.#orderBy).length > 0;
|
|
2830
2830
|
let target;
|
|
@@ -2947,7 +2947,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2947
2947
|
}
|
|
2948
2948
|
return (async () => {
|
|
2949
2949
|
try {
|
|
2950
|
-
const ontologyProvider = this.store.client[
|
|
2950
|
+
const ontologyProvider = this.store.client[chunkCNVWYZKL_cjs.additionalContext].ontologyProvider;
|
|
2951
2951
|
if (this.#sourceTypeKind === "interface") {
|
|
2952
2952
|
const objectMetadata2 = await ontologyProvider.getObjectDefinition(objectType);
|
|
2953
2953
|
if (this.#sourceApiName in objectMetadata2.interfaceMap) {
|
|
@@ -3128,7 +3128,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3128
3128
|
batch.changes.registerList(this.cacheKey);
|
|
3129
3129
|
}
|
|
3130
3130
|
constructor(store, subject, apiName, cacheKey, opts) {
|
|
3131
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3131
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCNVWYZKL_cjs.additionalContext].logger?.child({}, {
|
|
3132
3132
|
msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3133
3133
|
}) : void 0);
|
|
3134
3134
|
this.apiName = apiName;
|
|
@@ -3181,11 +3181,11 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3181
3181
|
async fetchPageData(signal) {
|
|
3182
3182
|
const needsResultType = Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy) || this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied;
|
|
3183
3183
|
if (needsResultType) {
|
|
3184
|
-
const wireObjectSet =
|
|
3184
|
+
const wireObjectSet = chunkCNVWYZKL_cjs.getWireObjectSet(this.#objectSet);
|
|
3185
3185
|
const {
|
|
3186
3186
|
resultType,
|
|
3187
3187
|
invalidationSet
|
|
3188
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3188
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkCNVWYZKL_cjs.additionalContext], wireObjectSet);
|
|
3189
3189
|
this.#updateFetchedObjectType(resultType.apiName);
|
|
3190
3190
|
this.#rdpInvalidationSet = invalidationSet;
|
|
3191
3191
|
if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
@@ -3215,11 +3215,11 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3215
3215
|
}
|
|
3216
3216
|
if (this.#fetchedObjectType == null) {
|
|
3217
3217
|
try {
|
|
3218
|
-
const wireObjectSet =
|
|
3218
|
+
const wireObjectSet = chunkCNVWYZKL_cjs.getWireObjectSet(this.#objectSet);
|
|
3219
3219
|
const {
|
|
3220
3220
|
resultType,
|
|
3221
3221
|
invalidationSet
|
|
3222
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3222
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkCNVWYZKL_cjs.additionalContext], wireObjectSet);
|
|
3223
3223
|
this.#updateFetchedObjectType(resultType.apiName);
|
|
3224
3224
|
this.#rdpInvalidationSet = invalidationSet;
|
|
3225
3225
|
} catch {
|
|
@@ -3489,7 +3489,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3489
3489
|
type,
|
|
3490
3490
|
apiName: this.apiName
|
|
3491
3491
|
};
|
|
3492
|
-
const clientCtx = store.client[
|
|
3492
|
+
const clientCtx = store.client[chunkCNVWYZKL_cjs.additionalContext];
|
|
3493
3493
|
let objectSet;
|
|
3494
3494
|
if (rids != null) {
|
|
3495
3495
|
objectSet = clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
|
|
@@ -3528,7 +3528,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3528
3528
|
}
|
|
3529
3529
|
extractRelevantObjects(changes) {
|
|
3530
3530
|
const matchesApiName = ([, object]) => {
|
|
3531
|
-
return this.apiName in object[
|
|
3531
|
+
return this.apiName in object[chunkNRPYHQFF_cjs.ObjectDefRef].interfaceMap;
|
|
3532
3532
|
};
|
|
3533
3533
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
3534
3534
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
@@ -3547,7 +3547,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3547
3547
|
}
|
|
3548
3548
|
};
|
|
3549
3549
|
function createSourceSetForPivot(store, pivotInfo, rids) {
|
|
3550
|
-
const clientCtx = store.client[
|
|
3550
|
+
const clientCtx = store.client[chunkCNVWYZKL_cjs.additionalContext];
|
|
3551
3551
|
if (rids != null) {
|
|
3552
3552
|
return clientCtx.objectSetFactory({
|
|
3553
3553
|
type: "object",
|
|
@@ -3602,7 +3602,7 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
3602
3602
|
const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX];
|
|
3603
3603
|
const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
|
|
3604
3604
|
const rids = this.cacheKey.otherKeys[RIDS_IDX];
|
|
3605
|
-
const clientCtx = store.client[
|
|
3605
|
+
const clientCtx = store.client[chunkCNVWYZKL_cjs.additionalContext];
|
|
3606
3606
|
const typeDefinition = {
|
|
3607
3607
|
type: "object",
|
|
3608
3608
|
apiName: this.apiName
|
|
@@ -3861,7 +3861,7 @@ var MediaMetadataQuery = class extends Query {
|
|
|
3861
3861
|
#propertyName;
|
|
3862
3862
|
#preview;
|
|
3863
3863
|
constructor(store, subject, objectType, primaryKey, propertyName, cacheKey, opts) {
|
|
3864
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3864
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCNVWYZKL_cjs.additionalContext].logger?.child({}, {
|
|
3865
3865
|
msgPrefix: `MediaMetadataQuery<${objectType}, ${JSON.stringify(primaryKey)}, ${propertyName}>`
|
|
3866
3866
|
}) : void 0);
|
|
3867
3867
|
this.#objectType = objectType;
|
|
@@ -3894,8 +3894,8 @@ var MediaMetadataQuery = class extends Query {
|
|
|
3894
3894
|
this.setStatus("loading", batch);
|
|
3895
3895
|
});
|
|
3896
3896
|
try {
|
|
3897
|
-
const ontologyRid = await this.store.client[
|
|
3898
|
-
const response = await chunkDOXHU27E_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[
|
|
3897
|
+
const ontologyRid = await this.store.client[chunkCNVWYZKL_cjs.additionalContext].ontologyRid;
|
|
3898
|
+
const response = await chunkDOXHU27E_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunkCNVWYZKL_cjs.additionalContext], ontologyRid, this.#objectType, String(this.#primaryKey), this.#propertyName, {
|
|
3899
3899
|
preview: this.#preview
|
|
3900
3900
|
});
|
|
3901
3901
|
const metadata = {
|
|
@@ -4017,8 +4017,8 @@ var MediaHelper = class extends AbstractHelper {
|
|
|
4017
4017
|
return this._subscribe(query, options, observer);
|
|
4018
4018
|
}
|
|
4019
4019
|
async fetchMetadata(coords, options) {
|
|
4020
|
-
const ontologyRid = await this.store.client[
|
|
4021
|
-
const response = await chunkDOXHU27E_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[
|
|
4020
|
+
const ontologyRid = await this.store.client[chunkCNVWYZKL_cjs.additionalContext].ontologyRid;
|
|
4021
|
+
const response = await chunkDOXHU27E_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunkCNVWYZKL_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
|
|
4022
4022
|
preview: options?.preview ?? true
|
|
4023
4023
|
});
|
|
4024
4024
|
return {
|
|
@@ -4038,8 +4038,8 @@ var MediaHelper = class extends AbstractHelper {
|
|
|
4038
4038
|
let response;
|
|
4039
4039
|
const coords = this.resolveToCoords(mediaOrLocation);
|
|
4040
4040
|
if (coords) {
|
|
4041
|
-
const ontologyRid = await this.store.client[
|
|
4042
|
-
response = await chunkDOXHU27E_cjs.MediaReferenceProperty_exports.getMediaContent(this.store.client[
|
|
4041
|
+
const ontologyRid = await this.store.client[chunkCNVWYZKL_cjs.additionalContext].ontologyRid;
|
|
4042
|
+
response = await chunkDOXHU27E_cjs.MediaReferenceProperty_exports.getMediaContent(this.store.client[chunkCNVWYZKL_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
|
|
4043
4043
|
preview
|
|
4044
4044
|
});
|
|
4045
4045
|
} else if ("fetchContents" in mediaOrLocation) {
|
|
@@ -4139,8 +4139,8 @@ function stripRdpFields(value, rdpFields) {
|
|
|
4139
4139
|
if (rdpFields.size === 0) {
|
|
4140
4140
|
return value;
|
|
4141
4141
|
}
|
|
4142
|
-
const underlying = value[
|
|
4143
|
-
const objectDef = value[
|
|
4142
|
+
const underlying = value[chunkNRPYHQFF_cjs.UnderlyingOsdkObject];
|
|
4143
|
+
const objectDef = value[chunkNRPYHQFF_cjs.ObjectDefRef];
|
|
4144
4144
|
const newProps = {
|
|
4145
4145
|
$apiName: underlying.$apiName,
|
|
4146
4146
|
$objectType: underlying.$objectType,
|
|
@@ -4153,7 +4153,7 @@ function stripRdpFields(value, rdpFields) {
|
|
|
4153
4153
|
newProps[key] = underlying[key];
|
|
4154
4154
|
}
|
|
4155
4155
|
}
|
|
4156
|
-
return
|
|
4156
|
+
return chunkNRPYHQFF_cjs.createOsdkObject(value[chunkNRPYHQFF_cjs.ClientRef], objectDef, newProps);
|
|
4157
4157
|
}
|
|
4158
4158
|
function isSuperset(superset, subset) {
|
|
4159
4159
|
for (const field of subset) {
|
|
@@ -4164,8 +4164,8 @@ function isSuperset(superset, subset) {
|
|
|
4164
4164
|
return true;
|
|
4165
4165
|
}
|
|
4166
4166
|
function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
4167
|
-
const underlying = value[
|
|
4168
|
-
const objectDef = value[
|
|
4167
|
+
const underlying = value[chunkNRPYHQFF_cjs.UnderlyingOsdkObject];
|
|
4168
|
+
const objectDef = value[chunkNRPYHQFF_cjs.ObjectDefRef];
|
|
4169
4169
|
const newProps = {
|
|
4170
4170
|
$apiName: underlying.$apiName,
|
|
4171
4171
|
$objectType: underlying.$objectType,
|
|
@@ -4181,12 +4181,12 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
|
4181
4181
|
}
|
|
4182
4182
|
}
|
|
4183
4183
|
}
|
|
4184
|
-
return
|
|
4184
|
+
return chunkNRPYHQFF_cjs.createOsdkObject(value[chunkNRPYHQFF_cjs.ClientRef], objectDef, newProps);
|
|
4185
4185
|
}
|
|
4186
4186
|
function mergeSelectFields(sourceValue, selectFields, existingValue) {
|
|
4187
|
-
const sourceUnderlying = sourceValue[
|
|
4188
|
-
const existingUnderlying = existingValue[
|
|
4189
|
-
const objectDef = sourceValue[
|
|
4187
|
+
const sourceUnderlying = sourceValue[chunkNRPYHQFF_cjs.UnderlyingOsdkObject];
|
|
4188
|
+
const existingUnderlying = existingValue[chunkNRPYHQFF_cjs.UnderlyingOsdkObject];
|
|
4189
|
+
const objectDef = sourceValue[chunkNRPYHQFF_cjs.ObjectDefRef];
|
|
4190
4190
|
const newProps = {
|
|
4191
4191
|
$apiName: sourceUnderlying.$apiName,
|
|
4192
4192
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -4204,7 +4204,7 @@ function mergeSelectFields(sourceValue, selectFields, existingValue) {
|
|
|
4204
4204
|
newProps[key] = sourceUnderlying[key];
|
|
4205
4205
|
}
|
|
4206
4206
|
}
|
|
4207
|
-
return
|
|
4207
|
+
return chunkNRPYHQFF_cjs.createOsdkObject(sourceValue[chunkNRPYHQFF_cjs.ClientRef], objectDef, newProps);
|
|
4208
4208
|
}
|
|
4209
4209
|
function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
|
|
4210
4210
|
if (targetRdpFields.size === 0) {
|
|
@@ -4216,8 +4216,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
4216
4216
|
}
|
|
4217
4217
|
return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
|
|
4218
4218
|
}
|
|
4219
|
-
const sourceUnderlying = sourceValue[
|
|
4220
|
-
const objectDef = sourceValue[
|
|
4219
|
+
const sourceUnderlying = sourceValue[chunkNRPYHQFF_cjs.UnderlyingOsdkObject];
|
|
4220
|
+
const objectDef = sourceValue[chunkNRPYHQFF_cjs.ObjectDefRef];
|
|
4221
4221
|
const newProps = {
|
|
4222
4222
|
$apiName: sourceUnderlying.$apiName,
|
|
4223
4223
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -4231,7 +4231,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
4231
4231
|
}
|
|
4232
4232
|
}
|
|
4233
4233
|
if (targetCurrentValue) {
|
|
4234
|
-
const targetUnderlying = targetCurrentValue[
|
|
4234
|
+
const targetUnderlying = targetCurrentValue[chunkNRPYHQFF_cjs.UnderlyingOsdkObject];
|
|
4235
4235
|
for (const field of targetRdpFields) {
|
|
4236
4236
|
if (field in targetUnderlying) {
|
|
4237
4237
|
if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
|
|
@@ -4240,7 +4240,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
4240
4240
|
}
|
|
4241
4241
|
}
|
|
4242
4242
|
}
|
|
4243
|
-
return
|
|
4243
|
+
return chunkNRPYHQFF_cjs.createOsdkObject(sourceValue[chunkNRPYHQFF_cjs.ClientRef], objectDef, newProps);
|
|
4244
4244
|
}
|
|
4245
4245
|
|
|
4246
4246
|
// src/observable/internal/object/ObjectCacheKeyRegistry.ts
|
|
@@ -4395,7 +4395,7 @@ var BulkObjectLoader = class {
|
|
|
4395
4395
|
#maxEntries;
|
|
4396
4396
|
constructor(client, maxWait = 25, maxEntries = 100) {
|
|
4397
4397
|
this.#client = client;
|
|
4398
|
-
this.#logger = client[
|
|
4398
|
+
this.#logger = client[chunkCNVWYZKL_cjs.additionalContext].logger;
|
|
4399
4399
|
this.#maxWait = maxWait;
|
|
4400
4400
|
this.#maxEntries = maxEntries;
|
|
4401
4401
|
}
|
|
@@ -4564,7 +4564,7 @@ var ObjectQuery = class extends Query {
|
|
|
4564
4564
|
#includeAllBaseObjectProperties;
|
|
4565
4565
|
#implementingTypes;
|
|
4566
4566
|
constructor(store, subject, type, pk, cacheKey, opts, defType = "object", select, loadPropertySecurityMetadata, includeAllBaseObjectProperties) {
|
|
4567
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4567
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCNVWYZKL_cjs.additionalContext].logger?.child({}, {
|
|
4568
4568
|
msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4569
4569
|
}) : void 0);
|
|
4570
4570
|
this.#apiName = type;
|
|
@@ -4670,7 +4670,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4670
4670
|
select,
|
|
4671
4671
|
$loadPropertySecurityMetadata
|
|
4672
4672
|
} = options;
|
|
4673
|
-
const defType =
|
|
4673
|
+
const defType = chunkTDQU3KC2_cjs.getDefType(options.apiName);
|
|
4674
4674
|
const $includeAllBaseObjectProperties = defType === "interface" && options.$includeAllBaseObjectProperties ? true : void 0;
|
|
4675
4675
|
const canonSelect = select && select.length > 0 ? this.store.selectCanonicalizer.canonicalize(select) : void 0;
|
|
4676
4676
|
const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0, canonSelect, $loadPropertySecurityMetadata ? true : void 0, $includeAllBaseObjectProperties);
|
|
@@ -4711,7 +4711,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4711
4711
|
if (valueToWrite !== tombstone && existing?.value && this.isObjectHolder(existing.value)) {
|
|
4712
4712
|
const expectedRdpFields = this.store.objectCacheKeyRegistry.getRdpFieldSet(sourceCacheKey);
|
|
4713
4713
|
if (expectedRdpFields.size > 0) {
|
|
4714
|
-
const underlying = valueToWrite[
|
|
4714
|
+
const underlying = valueToWrite[chunkNRPYHQFF_cjs.UnderlyingOsdkObject];
|
|
4715
4715
|
const actualRdpFields = /* @__PURE__ */ new Set();
|
|
4716
4716
|
for (const field of expectedRdpFields) {
|
|
4717
4717
|
if (underlying && field in underlying) {
|
|
@@ -4792,7 +4792,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
4792
4792
|
// revalidation. Lazily populated on first fetch when `withProperties` is set.
|
|
4793
4793
|
#rdpInvalidationSet;
|
|
4794
4794
|
constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
|
|
4795
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4795
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkCNVWYZKL_cjs.additionalContext].logger?.child({}, {
|
|
4796
4796
|
msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4797
4797
|
}) : void 0);
|
|
4798
4798
|
this.#baseObjectSetWire = baseObjectSetWire;
|
|
@@ -4860,7 +4860,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
4860
4860
|
return;
|
|
4861
4861
|
}
|
|
4862
4862
|
for (const os of sets) {
|
|
4863
|
-
const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(
|
|
4863
|
+
const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(chunkCNVWYZKL_cjs.getWireObjectSet(os));
|
|
4864
4864
|
if (typeName) {
|
|
4865
4865
|
types.add(typeName);
|
|
4866
4866
|
}
|
|
@@ -4887,16 +4887,16 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
4887
4887
|
*/
|
|
4888
4888
|
async fetchPageData(signal) {
|
|
4889
4889
|
if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
4890
|
-
const wireObjectSet =
|
|
4890
|
+
const wireObjectSet = chunkCNVWYZKL_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
4891
4891
|
const {
|
|
4892
4892
|
resultType,
|
|
4893
4893
|
invalidationSet
|
|
4894
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
4894
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkCNVWYZKL_cjs.additionalContext], wireObjectSet);
|
|
4895
4895
|
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy);
|
|
4896
4896
|
this.#rdpInvalidationSet = invalidationSet;
|
|
4897
4897
|
}
|
|
4898
4898
|
if (this.#rdpInvalidationSet == null && this.#operations.withProperties != null) {
|
|
4899
|
-
const wireObjectSet =
|
|
4899
|
+
const wireObjectSet = chunkCNVWYZKL_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
4900
4900
|
this.#rdpInvalidationSet = await this.#computeInvalidationTypes(wireObjectSet);
|
|
4901
4901
|
}
|
|
4902
4902
|
const resp = await this.#composedObjectSet.fetchPage({
|
|
@@ -5045,7 +5045,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
5045
5045
|
try {
|
|
5046
5046
|
const {
|
|
5047
5047
|
invalidationSet
|
|
5048
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
5048
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkCNVWYZKL_cjs.additionalContext], wireObjectSet);
|
|
5049
5049
|
return invalidationSet;
|
|
5050
5050
|
} catch (error) {
|
|
5051
5051
|
this.store.logger?.error("Failed to compute invalidation types for object set query, falling back to empty set", error);
|
|
@@ -5124,7 +5124,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5124
5124
|
if (process.env.NODE_ENV !== "production") {
|
|
5125
5125
|
console.warn("[@osdk/client] streamUpdates is not supported with pivotTo. The server does not support websocket subscriptions for link-traversal queries. Ignoring streamUpdates.");
|
|
5126
5126
|
}
|
|
5127
|
-
} else if (options.withProperties ||
|
|
5127
|
+
} else if (options.withProperties || chunkCNVWYZKL_cjs.hasWithProperties(chunkCNVWYZKL_cjs.getWireObjectSet(options.baseObjectSet))) {
|
|
5128
5128
|
if (process.env.NODE_ENV !== "production") {
|
|
5129
5129
|
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.");
|
|
5130
5130
|
}
|
|
@@ -5138,7 +5138,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5138
5138
|
const {
|
|
5139
5139
|
baseObjectSet
|
|
5140
5140
|
} = options;
|
|
5141
|
-
const baseObjectSetWire = JSON.stringify(
|
|
5141
|
+
const baseObjectSetWire = JSON.stringify(chunkCNVWYZKL_cjs.getWireObjectSet(baseObjectSet));
|
|
5142
5142
|
const operations = this.buildCanonicalizedOperations(options);
|
|
5143
5143
|
const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
|
|
5144
5144
|
return this.store.queries.get(objectSetCacheKey, () => {
|
|
@@ -5154,13 +5154,13 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5154
5154
|
operations.withProperties = this.rdpCanonicalizer.canonicalize(options.withProperties);
|
|
5155
5155
|
}
|
|
5156
5156
|
if (options.union && options.union.length > 0) {
|
|
5157
|
-
operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(
|
|
5157
|
+
operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(chunkCNVWYZKL_cjs.getWireObjectSet(os))));
|
|
5158
5158
|
}
|
|
5159
5159
|
if (options.intersect && options.intersect.length > 0) {
|
|
5160
|
-
operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(
|
|
5160
|
+
operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(chunkCNVWYZKL_cjs.getWireObjectSet(os))));
|
|
5161
5161
|
}
|
|
5162
5162
|
if (options.subtract && options.subtract.length > 0) {
|
|
5163
|
-
operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(
|
|
5163
|
+
operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(chunkCNVWYZKL_cjs.getWireObjectSet(os))));
|
|
5164
5164
|
}
|
|
5165
5165
|
if (options.pivotTo) {
|
|
5166
5166
|
operations.pivotTo = options.pivotTo;
|
|
@@ -5308,7 +5308,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
|
|
|
5308
5308
|
apiName: "__rdp_canonicalizer_holder__"
|
|
5309
5309
|
};
|
|
5310
5310
|
for (const [key, rdpFunction] of Object.entries(rdp)) {
|
|
5311
|
-
const builder =
|
|
5311
|
+
const builder = chunkCNVWYZKL_cjs.createWithPropertiesObjectSet(
|
|
5312
5312
|
objectTypeHolder,
|
|
5313
5313
|
{
|
|
5314
5314
|
type: "methodInput"
|
|
@@ -5475,7 +5475,7 @@ var Store = class {
|
|
|
5475
5475
|
subjects = this.layers.subjects;
|
|
5476
5476
|
// these are hopefully temporary
|
|
5477
5477
|
constructor(client) {
|
|
5478
|
-
this.logger = client[
|
|
5478
|
+
this.logger = client[chunkCNVWYZKL_cjs.additionalContext].logger?.child({}, {
|
|
5479
5479
|
msgPrefix: "Store"
|
|
5480
5480
|
});
|
|
5481
5481
|
this.client = client;
|
|
@@ -5886,10 +5886,10 @@ var Store = class {
|
|
|
5886
5886
|
|
|
5887
5887
|
// src/observable/ObservableClient.ts
|
|
5888
5888
|
function createObservableClient(client, extraUserAgents) {
|
|
5889
|
-
const tweakedClient =
|
|
5890
|
-
...client[
|
|
5891
|
-
fetch: shared_net_fetch.createFetchHeaderMutator(client[
|
|
5892
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
5889
|
+
const tweakedClient = chunkNRPYHQFF_cjs.createClientFromContext({
|
|
5890
|
+
...client[chunkCNVWYZKL_cjs.additionalContext],
|
|
5891
|
+
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkCNVWYZKL_cjs.additionalContext].fetch, (headers) => {
|
|
5892
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkNRPYHQFF_cjs.OBSERVABLE_USER_AGENT, ...extraUserAgents?.() ?? []].filter((x) => x && x?.length > 0).join(" "));
|
|
5893
5893
|
return headers;
|
|
5894
5894
|
})
|
|
5895
5895
|
});
|
|
@@ -5897,5 +5897,5 @@ function createObservableClient(client, extraUserAgents) {
|
|
|
5897
5897
|
}
|
|
5898
5898
|
|
|
5899
5899
|
exports.createObservableClient = createObservableClient;
|
|
5900
|
-
//# sourceMappingURL=chunk-
|
|
5901
|
-
//# sourceMappingURL=chunk-
|
|
5900
|
+
//# sourceMappingURL=chunk-77XXXUGJ.cjs.map
|
|
5901
|
+
//# sourceMappingURL=chunk-77XXXUGJ.cjs.map
|