@osdk/client 2.53.0 → 2.54.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 +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/cjs/{chunk-E5UOKLCW.cjs → chunk-7VOMQUIX.cjs} +2 -2
- package/build/cjs/{chunk-E5UOKLCW.cjs.map → chunk-7VOMQUIX.cjs.map} +1 -1
- package/build/cjs/{chunk-B7IRP73C.cjs → chunk-DPWQXPBJ.cjs} +45 -45
- package/build/cjs/{chunk-B7IRP73C.cjs.map → chunk-DPWQXPBJ.cjs.map} +1 -1
- package/build/cjs/{chunk-SYOUIMHV.cjs → chunk-JFTS2NKV.cjs} +79 -79
- package/build/cjs/{chunk-SYOUIMHV.cjs.map → chunk-JFTS2NKV.cjs.map} +1 -1
- package/build/cjs/{chunk-BXUXE2VL.cjs → chunk-ZPPYQPTN.cjs} +8 -8
- package/build/cjs/{chunk-BXUXE2VL.cjs.map → chunk-ZPPYQPTN.cjs.map} +1 -1
- package/build/cjs/index.cjs +10 -10
- package/build/cjs/public/experimental.cjs +8 -8
- package/build/cjs/public/internal.cjs +9 -9
- package/build/cjs/public/observable.cjs +4 -4
- package/build/cjs/public/unstable-do-not-use.cjs +15 -15
- 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/types/Client.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkDPWQXPBJ_cjs = require('./chunk-DPWQXPBJ.cjs');
|
|
4
|
+
var chunk7VOMQUIX_cjs = require('./chunk-7VOMQUIX.cjs');
|
|
5
5
|
var chunk7R2DRDPC_cjs = require('./chunk-7R2DRDPC.cjs');
|
|
6
6
|
var shared_net_fetch = require('@osdk/shared.net.fetch');
|
|
7
7
|
var rxjs = require('rxjs');
|
|
@@ -67,8 +67,8 @@ var ObservableClientImpl = class {
|
|
|
67
67
|
const instances = [];
|
|
68
68
|
const objectSetWires = [];
|
|
69
69
|
for (const item of options.dependsOnObjects ?? []) {
|
|
70
|
-
if (
|
|
71
|
-
objectSetWires.push(
|
|
70
|
+
if (chunk7VOMQUIX_cjs.isObjectSet(item)) {
|
|
71
|
+
objectSetWires.push(chunk7VOMQUIX_cjs.getWireObjectSet(item));
|
|
72
72
|
} else {
|
|
73
73
|
instances.push({
|
|
74
74
|
$apiName: item.$objectType ?? item.$apiName,
|
|
@@ -76,7 +76,7 @@ var ObservableClientImpl = class {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) =>
|
|
79
|
+
const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunk7VOMQUIX_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunk7VOMQUIX_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
|
|
80
80
|
return this.__experimentalStore.functions.observe({
|
|
81
81
|
...options,
|
|
82
82
|
queryDef,
|
|
@@ -139,7 +139,7 @@ var ObservableClientImpl = class {
|
|
|
139
139
|
if (!arr || arr.length === 0) {
|
|
140
140
|
return arr;
|
|
141
141
|
}
|
|
142
|
-
const wireStrings = arr.map((os) => JSON.stringify(
|
|
142
|
+
const wireStrings = arr.map((os) => JSON.stringify(chunk7VOMQUIX_cjs.getWireObjectSet(os)));
|
|
143
143
|
const canonKey = canonicalize(wireStrings);
|
|
144
144
|
let cached = cache.get(canonKey);
|
|
145
145
|
if (!cached) {
|
|
@@ -354,7 +354,7 @@ var OptimisticJob = class {
|
|
|
354
354
|
return this;
|
|
355
355
|
},
|
|
356
356
|
createObject(type, pk, properties) {
|
|
357
|
-
const create = store.client[
|
|
357
|
+
const create = store.client[chunk7VOMQUIX_cjs.additionalContext].objectFactory(store.client[chunk7VOMQUIX_cjs.additionalContext], [{
|
|
358
358
|
$primaryKey: pk,
|
|
359
359
|
$apiName: type.apiName,
|
|
360
360
|
$objectType: type.apiName,
|
|
@@ -860,7 +860,7 @@ var Query = class {
|
|
|
860
860
|
this.store = store;
|
|
861
861
|
this.cacheKeys = store.cacheKeys;
|
|
862
862
|
this.#subject = observable;
|
|
863
|
-
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[
|
|
863
|
+
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunk7VOMQUIX_cjs.additionalContext].logger : store.client[chunk7VOMQUIX_cjs.additionalContext].logger?.child({}, {
|
|
864
864
|
msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
|
|
865
865
|
}));
|
|
866
866
|
}
|
|
@@ -1022,7 +1022,7 @@ var AggregationQuery = class extends Query {
|
|
|
1022
1022
|
#invalidationTypes;
|
|
1023
1023
|
#invalidationTypesPromise;
|
|
1024
1024
|
constructor(store, subject, cacheKey, opts) {
|
|
1025
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1025
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunk7VOMQUIX_cjs.additionalContext].logger?.child({}, {
|
|
1026
1026
|
msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1027
1027
|
}) : void 0);
|
|
1028
1028
|
this.apiName = cacheKey.otherKeys[API_NAME_IDX2];
|
|
@@ -1040,7 +1040,7 @@ var AggregationQuery = class extends Query {
|
|
|
1040
1040
|
try {
|
|
1041
1041
|
const {
|
|
1042
1042
|
invalidationSet
|
|
1043
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
1043
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunk7VOMQUIX_cjs.additionalContext], wireObjectSet);
|
|
1044
1044
|
return /* @__PURE__ */ new Set([this.apiName, ...invalidationSet]);
|
|
1045
1045
|
} catch (error) {
|
|
1046
1046
|
this.store.logger?.error("Failed to compute invalidation types for aggregation, falling back to base type only", error);
|
|
@@ -1111,7 +1111,7 @@ var ObjectAggregationQuery = class extends AggregationQuery {
|
|
|
1111
1111
|
};
|
|
1112
1112
|
let objectSet;
|
|
1113
1113
|
if (this.parsedWireObjectSet) {
|
|
1114
|
-
objectSet =
|
|
1114
|
+
objectSet = chunk7VOMQUIX_cjs.createObjectSet(objectTypeDef, this.store.client[chunk7VOMQUIX_cjs.additionalContext], this.parsedWireObjectSet);
|
|
1115
1115
|
} else {
|
|
1116
1116
|
objectSet = this.store.client(objectTypeDef);
|
|
1117
1117
|
}
|
|
@@ -1153,7 +1153,7 @@ var AggregationsHelper = class extends AbstractHelper {
|
|
|
1153
1153
|
return this.getOrCreateQuery(options, void 0);
|
|
1154
1154
|
}
|
|
1155
1155
|
getQueryWithObjectSet(options) {
|
|
1156
|
-
const serializedObjectSet = JSON.stringify(
|
|
1156
|
+
const serializedObjectSet = JSON.stringify(chunk7VOMQUIX_cjs.getWireObjectSet(options.objectSet));
|
|
1157
1157
|
return this.getOrCreateQuery(options, serializedObjectSet);
|
|
1158
1158
|
}
|
|
1159
1159
|
getOrCreateQuery(options, serializedObjectSet) {
|
|
@@ -1503,7 +1503,7 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1503
1503
|
path.push("$:map_end");
|
|
1504
1504
|
return arr;
|
|
1505
1505
|
}
|
|
1506
|
-
if (
|
|
1506
|
+
if (chunkDPWQXPBJ_cjs.isObjectSpecifiersObject(value)) {
|
|
1507
1507
|
const objectType = value.$objectType ?? value.$apiName;
|
|
1508
1508
|
path.push("$:osdk", objectType, value.$primaryKey);
|
|
1509
1509
|
return {
|
|
@@ -1511,8 +1511,8 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1511
1511
|
$primaryKey: value.$primaryKey
|
|
1512
1512
|
};
|
|
1513
1513
|
}
|
|
1514
|
-
if (
|
|
1515
|
-
const wire = JSON.stringify(
|
|
1514
|
+
if (chunk7VOMQUIX_cjs.isObjectSet(value)) {
|
|
1515
|
+
const wire = JSON.stringify(chunk7VOMQUIX_cjs.getWireObjectSet(value));
|
|
1516
1516
|
path.push("$:objectset", wire);
|
|
1517
1517
|
return wire;
|
|
1518
1518
|
}
|
|
@@ -1572,7 +1572,7 @@ var FunctionQuery = class extends Query {
|
|
|
1572
1572
|
#dependsOnObjects;
|
|
1573
1573
|
#queryDef;
|
|
1574
1574
|
constructor(store, subject, queryDef, params, cacheKey, opts, objectSetTypesPromise) {
|
|
1575
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1575
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunk7VOMQUIX_cjs.additionalContext].logger?.child({}, {
|
|
1576
1576
|
msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1577
1577
|
}) : void 0);
|
|
1578
1578
|
this.#apiName = queryDef.apiName;
|
|
@@ -1629,7 +1629,7 @@ var FunctionQuery = class extends Query {
|
|
|
1629
1629
|
}).debug("calling _fetchAndStore");
|
|
1630
1630
|
}
|
|
1631
1631
|
try {
|
|
1632
|
-
const result = await
|
|
1632
|
+
const result = await chunkDPWQXPBJ_cjs.applyQuery(this.store.client[chunk7VOMQUIX_cjs.additionalContext], this.#queryDef, this.#params);
|
|
1633
1633
|
const executedAt = Date.now();
|
|
1634
1634
|
this.store.batch({}, (batch) => {
|
|
1635
1635
|
this.writeToStore({
|
|
@@ -2209,11 +2209,11 @@ function isStringEncodedNumericType(type) {
|
|
|
2209
2209
|
return type != null && NUMERIC_STRING_PROPERTY_TYPES.has(type);
|
|
2210
2210
|
}
|
|
2211
2211
|
function resolvePropertyType(holder, key, derivedPropertyMetadata = {}) {
|
|
2212
|
-
const objectType = holder?.[
|
|
2212
|
+
const objectType = holder?.[chunkDPWQXPBJ_cjs.ObjectDefRef]?.properties?.[key]?.type;
|
|
2213
2213
|
if (typeof objectType === "string") {
|
|
2214
2214
|
return objectType;
|
|
2215
2215
|
}
|
|
2216
|
-
const interfaceType = resolveInterfacePropertyType(holder?.[
|
|
2216
|
+
const interfaceType = resolveInterfacePropertyType(holder?.[chunkDPWQXPBJ_cjs.InterfaceDefRef], key);
|
|
2217
2217
|
if (typeof interfaceType === "string") {
|
|
2218
2218
|
return interfaceType;
|
|
2219
2219
|
}
|
|
@@ -2228,7 +2228,7 @@ function resolveInterfacePropertyType(interfaceDef, key) {
|
|
|
2228
2228
|
if (typeof direct === "string") {
|
|
2229
2229
|
return direct;
|
|
2230
2230
|
}
|
|
2231
|
-
const [namespace] =
|
|
2231
|
+
const [namespace] = chunk7VOMQUIX_cjs.extractNamespace(interfaceDef.apiName);
|
|
2232
2232
|
if (namespace == null) {
|
|
2233
2233
|
return void 0;
|
|
2234
2234
|
}
|
|
@@ -2307,8 +2307,8 @@ function stripRdpFields(value, rdpFields) {
|
|
|
2307
2307
|
if (rdpFields.size === 0) {
|
|
2308
2308
|
return value;
|
|
2309
2309
|
}
|
|
2310
|
-
const underlying = value[
|
|
2311
|
-
const objectDef = requireObjectDef(value[
|
|
2310
|
+
const underlying = value[chunkDPWQXPBJ_cjs.UnderlyingOsdkObject];
|
|
2311
|
+
const objectDef = requireObjectDef(value[chunkDPWQXPBJ_cjs.ObjectDefRef], underlying);
|
|
2312
2312
|
const newProps = {
|
|
2313
2313
|
$apiName: underlying.$apiName,
|
|
2314
2314
|
$objectType: underlying.$objectType,
|
|
@@ -2321,7 +2321,7 @@ function stripRdpFields(value, rdpFields) {
|
|
|
2321
2321
|
newProps[key] = underlying[key];
|
|
2322
2322
|
}
|
|
2323
2323
|
}
|
|
2324
|
-
return
|
|
2324
|
+
return chunkDPWQXPBJ_cjs.createOsdkObject(value[chunkDPWQXPBJ_cjs.ClientRef], objectDef, newProps);
|
|
2325
2325
|
}
|
|
2326
2326
|
function isSuperset(superset, subset) {
|
|
2327
2327
|
for (const field of subset) {
|
|
@@ -2332,8 +2332,8 @@ function isSuperset(superset, subset) {
|
|
|
2332
2332
|
return true;
|
|
2333
2333
|
}
|
|
2334
2334
|
function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
2335
|
-
const underlying = value[
|
|
2336
|
-
const objectDef = requireObjectDef(value[
|
|
2335
|
+
const underlying = value[chunkDPWQXPBJ_cjs.UnderlyingOsdkObject];
|
|
2336
|
+
const objectDef = requireObjectDef(value[chunkDPWQXPBJ_cjs.ObjectDefRef], underlying);
|
|
2337
2337
|
const newProps = {
|
|
2338
2338
|
$apiName: underlying.$apiName,
|
|
2339
2339
|
$objectType: underlying.$objectType,
|
|
@@ -2350,12 +2350,12 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
|
2350
2350
|
newProps[key] = underlying[key];
|
|
2351
2351
|
}
|
|
2352
2352
|
}
|
|
2353
|
-
return
|
|
2353
|
+
return chunkDPWQXPBJ_cjs.createOsdkObject(value[chunkDPWQXPBJ_cjs.ClientRef], objectDef, newProps);
|
|
2354
2354
|
}
|
|
2355
2355
|
function mergeSelectFields(sourceValue, selectFields, existingValue, sourceRdpFields) {
|
|
2356
|
-
const sourceUnderlying = sourceValue[
|
|
2357
|
-
const existingUnderlying = existingValue[
|
|
2358
|
-
const objectDef = requireObjectDef(sourceValue[
|
|
2356
|
+
const sourceUnderlying = sourceValue[chunkDPWQXPBJ_cjs.UnderlyingOsdkObject];
|
|
2357
|
+
const existingUnderlying = existingValue[chunkDPWQXPBJ_cjs.UnderlyingOsdkObject];
|
|
2358
|
+
const objectDef = requireObjectDef(sourceValue[chunkDPWQXPBJ_cjs.ObjectDefRef], sourceUnderlying);
|
|
2359
2359
|
const newProps = {
|
|
2360
2360
|
$apiName: sourceUnderlying.$apiName,
|
|
2361
2361
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -2375,7 +2375,7 @@ function mergeSelectFields(sourceValue, selectFields, existingValue, sourceRdpFi
|
|
|
2375
2375
|
newProps[key] = sourceUnderlying[key];
|
|
2376
2376
|
}
|
|
2377
2377
|
}
|
|
2378
|
-
return
|
|
2378
|
+
return chunkDPWQXPBJ_cjs.createOsdkObject(sourceValue[chunkDPWQXPBJ_cjs.ClientRef], objectDef, newProps);
|
|
2379
2379
|
}
|
|
2380
2380
|
function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
|
|
2381
2381
|
if (targetRdpFields.size === 0) {
|
|
@@ -2387,8 +2387,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
2387
2387
|
}
|
|
2388
2388
|
return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
|
|
2389
2389
|
}
|
|
2390
|
-
const sourceUnderlying = sourceValue[
|
|
2391
|
-
const objectDef = requireObjectDef(sourceValue[
|
|
2390
|
+
const sourceUnderlying = sourceValue[chunkDPWQXPBJ_cjs.UnderlyingOsdkObject];
|
|
2391
|
+
const objectDef = requireObjectDef(sourceValue[chunkDPWQXPBJ_cjs.ObjectDefRef], sourceUnderlying);
|
|
2392
2392
|
const newProps = {
|
|
2393
2393
|
$apiName: sourceUnderlying.$apiName,
|
|
2394
2394
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -2407,14 +2407,14 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
2407
2407
|
}
|
|
2408
2408
|
}
|
|
2409
2409
|
if (targetCurrentValue) {
|
|
2410
|
-
const targetUnderlying = targetCurrentValue[
|
|
2410
|
+
const targetUnderlying = targetCurrentValue[chunkDPWQXPBJ_cjs.UnderlyingOsdkObject];
|
|
2411
2411
|
for (const field of targetRdpFields) {
|
|
2412
2412
|
if (!sourceRdpFields.has(field) && field in targetUnderlying) {
|
|
2413
2413
|
newProps[field] = targetUnderlying[field];
|
|
2414
2414
|
}
|
|
2415
2415
|
}
|
|
2416
2416
|
}
|
|
2417
|
-
return
|
|
2417
|
+
return chunkDPWQXPBJ_cjs.createOsdkObject(sourceValue[chunkDPWQXPBJ_cjs.ClientRef], objectDef, newProps);
|
|
2418
2418
|
}
|
|
2419
2419
|
function createCollectionConnectable(subject, subjects, createPayload) {
|
|
2420
2420
|
return rxjs.connectable(subject.pipe(rxjs.switchMap((listEntry) => {
|
|
@@ -3060,7 +3060,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
3060
3060
|
batch.changes.modified.add(this.cacheKey);
|
|
3061
3061
|
}
|
|
3062
3062
|
constructor(store, subject, cacheKey, opts) {
|
|
3063
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3063
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunk7VOMQUIX_cjs.additionalContext].logger?.child({}, {
|
|
3064
3064
|
msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3065
3065
|
}) : void 0);
|
|
3066
3066
|
[this.#sourceApiName, this.#sourceTypeKind, this.#sourceUnderlyingObjectType, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
|
|
@@ -3082,7 +3082,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
3082
3082
|
*/
|
|
3083
3083
|
async fetchPageData(signal) {
|
|
3084
3084
|
const client = this.store.client;
|
|
3085
|
-
const ontologyProvider = client[
|
|
3085
|
+
const ontologyProvider = client[chunk7VOMQUIX_cjs.additionalContext].ontologyProvider;
|
|
3086
3086
|
const isInterface = this.#sourceTypeKind === "interface";
|
|
3087
3087
|
const hasOrderBy = this.#orderBy && Object.keys(this.#orderBy).length > 0;
|
|
3088
3088
|
let target;
|
|
@@ -3214,7 +3214,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
3214
3214
|
}
|
|
3215
3215
|
return (async () => {
|
|
3216
3216
|
try {
|
|
3217
|
-
const ontologyProvider = this.store.client[
|
|
3217
|
+
const ontologyProvider = this.store.client[chunk7VOMQUIX_cjs.additionalContext].ontologyProvider;
|
|
3218
3218
|
if (this.#sourceTypeKind === "interface") {
|
|
3219
3219
|
const objectMetadata2 = await ontologyProvider.getObjectDefinition(objectType);
|
|
3220
3220
|
if (this.#sourceApiName in objectMetadata2.interfaceMap) {
|
|
@@ -3395,7 +3395,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3395
3395
|
batch.changes.registerList(this.cacheKey);
|
|
3396
3396
|
}
|
|
3397
3397
|
constructor(store, subject, apiName, cacheKey, opts) {
|
|
3398
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3398
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunk7VOMQUIX_cjs.additionalContext].logger?.child({}, {
|
|
3399
3399
|
msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3400
3400
|
}) : void 0);
|
|
3401
3401
|
this.apiName = apiName;
|
|
@@ -3448,11 +3448,11 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3448
3448
|
async fetchPageData(signal) {
|
|
3449
3449
|
const needsResultType = Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy) || this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied;
|
|
3450
3450
|
if (needsResultType) {
|
|
3451
|
-
const wireObjectSet =
|
|
3451
|
+
const wireObjectSet = chunk7VOMQUIX_cjs.getWireObjectSet(this.#objectSet);
|
|
3452
3452
|
const {
|
|
3453
3453
|
resultType,
|
|
3454
3454
|
invalidationSet
|
|
3455
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3455
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunk7VOMQUIX_cjs.additionalContext], wireObjectSet);
|
|
3456
3456
|
this.#updateFetchedObjectType(resultType.apiName);
|
|
3457
3457
|
this.#rdpInvalidationSet = invalidationSet;
|
|
3458
3458
|
if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
@@ -3462,7 +3462,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3462
3462
|
// Carries derived-property type metadata so string-encoded numeric
|
|
3463
3463
|
// derived properties (decimal/long) sort by value. Returns {} when
|
|
3464
3464
|
// there are no derived properties.
|
|
3465
|
-
await
|
|
3465
|
+
await chunk7VOMQUIX_cjs.extractRdpDefinition(this.store.client[chunk7VOMQUIX_cjs.additionalContext], wireObjectSet)
|
|
3466
3466
|
);
|
|
3467
3467
|
}
|
|
3468
3468
|
if (this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied) {
|
|
@@ -3489,11 +3489,11 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3489
3489
|
}
|
|
3490
3490
|
if (this.#fetchedObjectType == null) {
|
|
3491
3491
|
try {
|
|
3492
|
-
const wireObjectSet =
|
|
3492
|
+
const wireObjectSet = chunk7VOMQUIX_cjs.getWireObjectSet(this.#objectSet);
|
|
3493
3493
|
const {
|
|
3494
3494
|
resultType,
|
|
3495
3495
|
invalidationSet
|
|
3496
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3496
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunk7VOMQUIX_cjs.additionalContext], wireObjectSet);
|
|
3497
3497
|
this.#updateFetchedObjectType(resultType.apiName);
|
|
3498
3498
|
this.#rdpInvalidationSet = invalidationSet;
|
|
3499
3499
|
} catch {
|
|
@@ -3756,7 +3756,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3756
3756
|
type,
|
|
3757
3757
|
apiName: this.apiName
|
|
3758
3758
|
};
|
|
3759
|
-
const clientCtx = store.client[
|
|
3759
|
+
const clientCtx = store.client[chunk7VOMQUIX_cjs.additionalContext];
|
|
3760
3760
|
let objectSet;
|
|
3761
3761
|
if (rids != null) {
|
|
3762
3762
|
objectSet = clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
|
|
@@ -3800,7 +3800,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3800
3800
|
}
|
|
3801
3801
|
extractRelevantObjects(changes) {
|
|
3802
3802
|
const matchesApiName = ([, object]) => {
|
|
3803
|
-
return this.apiName in object[
|
|
3803
|
+
return this.apiName in object[chunkDPWQXPBJ_cjs.ObjectDefRef].interfaceMap;
|
|
3804
3804
|
};
|
|
3805
3805
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => this.wrapObject(object));
|
|
3806
3806
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => this.wrapObject(object));
|
|
@@ -3819,7 +3819,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3819
3819
|
}
|
|
3820
3820
|
};
|
|
3821
3821
|
function createSourceSetForPivot(store, pivotInfo, rids) {
|
|
3822
|
-
const clientCtx = store.client[
|
|
3822
|
+
const clientCtx = store.client[chunk7VOMQUIX_cjs.additionalContext];
|
|
3823
3823
|
if (rids != null) {
|
|
3824
3824
|
return clientCtx.objectSetFactory({
|
|
3825
3825
|
type: "object",
|
|
@@ -3848,7 +3848,7 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
3848
3848
|
const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX];
|
|
3849
3849
|
const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
|
|
3850
3850
|
const rids = this.cacheKey.otherKeys[RIDS_IDX];
|
|
3851
|
-
const clientCtx = store.client[
|
|
3851
|
+
const clientCtx = store.client[chunk7VOMQUIX_cjs.additionalContext];
|
|
3852
3852
|
const typeDefinition = {
|
|
3853
3853
|
type: "object",
|
|
3854
3854
|
apiName: this.apiName
|
|
@@ -4109,7 +4109,7 @@ var MediaMetadataQuery = class extends Query {
|
|
|
4109
4109
|
#propertyName;
|
|
4110
4110
|
#preview;
|
|
4111
4111
|
constructor(store, subject, objectType, primaryKey, propertyName, cacheKey, opts) {
|
|
4112
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4112
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunk7VOMQUIX_cjs.additionalContext].logger?.child({}, {
|
|
4113
4113
|
msgPrefix: `MediaMetadataQuery<${objectType}, ${JSON.stringify(primaryKey)}, ${propertyName}>`
|
|
4114
4114
|
}) : void 0);
|
|
4115
4115
|
this.#objectType = objectType;
|
|
@@ -4142,8 +4142,8 @@ var MediaMetadataQuery = class extends Query {
|
|
|
4142
4142
|
this.setStatus("loading", batch);
|
|
4143
4143
|
});
|
|
4144
4144
|
try {
|
|
4145
|
-
const ontologyRid = await this.store.client[
|
|
4146
|
-
const response = await chunk7R2DRDPC_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[
|
|
4145
|
+
const ontologyRid = await this.store.client[chunk7VOMQUIX_cjs.additionalContext].ontologyRid;
|
|
4146
|
+
const response = await chunk7R2DRDPC_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunk7VOMQUIX_cjs.additionalContext], ontologyRid, this.#objectType, String(this.#primaryKey), this.#propertyName, {
|
|
4147
4147
|
preview: this.#preview
|
|
4148
4148
|
});
|
|
4149
4149
|
const metadata = {
|
|
@@ -4265,8 +4265,8 @@ var MediaHelper = class extends AbstractHelper {
|
|
|
4265
4265
|
return this._subscribe(query, options, observer);
|
|
4266
4266
|
}
|
|
4267
4267
|
async fetchMetadata(coords, options) {
|
|
4268
|
-
const ontologyRid = await this.store.client[
|
|
4269
|
-
const response = await chunk7R2DRDPC_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[
|
|
4268
|
+
const ontologyRid = await this.store.client[chunk7VOMQUIX_cjs.additionalContext].ontologyRid;
|
|
4269
|
+
const response = await chunk7R2DRDPC_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunk7VOMQUIX_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
|
|
4270
4270
|
preview: options?.preview ?? true
|
|
4271
4271
|
});
|
|
4272
4272
|
return {
|
|
@@ -4286,8 +4286,8 @@ var MediaHelper = class extends AbstractHelper {
|
|
|
4286
4286
|
let response;
|
|
4287
4287
|
const coords = this.resolveToCoords(mediaOrLocation);
|
|
4288
4288
|
if (coords) {
|
|
4289
|
-
const ontologyRid = await this.store.client[
|
|
4290
|
-
response = await chunk7R2DRDPC_cjs.MediaReferenceProperty_exports.getMediaContent(this.store.client[
|
|
4289
|
+
const ontologyRid = await this.store.client[chunk7VOMQUIX_cjs.additionalContext].ontologyRid;
|
|
4290
|
+
response = await chunk7R2DRDPC_cjs.MediaReferenceProperty_exports.getMediaContent(this.store.client[chunk7VOMQUIX_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
|
|
4291
4291
|
preview
|
|
4292
4292
|
});
|
|
4293
4293
|
} else if ("fetchContents" in mediaOrLocation) {
|
|
@@ -4474,7 +4474,7 @@ var ObjectCacheKeyRegistry = class {
|
|
|
4474
4474
|
|
|
4475
4475
|
// src/object/convertWireToOsdkObjects/InterfaceHolder.ts
|
|
4476
4476
|
function isInterfaceHolder(v) {
|
|
4477
|
-
return typeof v === "object" && v != null &&
|
|
4477
|
+
return typeof v === "object" && v != null && chunkDPWQXPBJ_cjs.InterfaceDefRef in v;
|
|
4478
4478
|
}
|
|
4479
4479
|
|
|
4480
4480
|
// ../../node_modules/.pnpm/p-defer@4.0.1/node_modules/p-defer/index.js
|
|
@@ -4533,7 +4533,7 @@ var BulkObjectLoader = class {
|
|
|
4533
4533
|
#maxEntries;
|
|
4534
4534
|
constructor(client, maxWait = 25, maxEntries = 100) {
|
|
4535
4535
|
this.#client = client;
|
|
4536
|
-
this.#logger = client[
|
|
4536
|
+
this.#logger = client[chunk7VOMQUIX_cjs.additionalContext].logger;
|
|
4537
4537
|
this.#maxWait = maxWait;
|
|
4538
4538
|
this.#maxEntries = maxEntries;
|
|
4539
4539
|
}
|
|
@@ -4702,7 +4702,7 @@ var ObjectQuery = class extends Query {
|
|
|
4702
4702
|
#includeAllBaseObjectProperties;
|
|
4703
4703
|
#implementingTypes;
|
|
4704
4704
|
constructor(store, subject, type, pk, cacheKey, opts, defType = "object", select, loadPropertySecurityMetadata, includeAllBaseObjectProperties) {
|
|
4705
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4705
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunk7VOMQUIX_cjs.additionalContext].logger?.child({}, {
|
|
4706
4706
|
msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4707
4707
|
}) : void 0);
|
|
4708
4708
|
this.#apiName = type;
|
|
@@ -4817,7 +4817,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4817
4817
|
select,
|
|
4818
4818
|
$loadPropertySecurityMetadata
|
|
4819
4819
|
} = options;
|
|
4820
|
-
const defType =
|
|
4820
|
+
const defType = chunkDPWQXPBJ_cjs.getDefType(options.apiName);
|
|
4821
4821
|
const $includeAllBaseObjectProperties = defType === "interface" && options.$includeAllBaseObjectProperties ? true : void 0;
|
|
4822
4822
|
const canonSelect = select && select.length > 0 ? this.store.selectCanonicalizer.canonicalize(select) : void 0;
|
|
4823
4823
|
const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0, canonSelect, $loadPropertySecurityMetadata ? true : void 0, $includeAllBaseObjectProperties);
|
|
@@ -4834,7 +4834,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4834
4834
|
storeOsdkInstances(values, batch, rdpConfig, selectFields, includeAllBaseObjectProperties, computedRdpFields) {
|
|
4835
4835
|
const holders = values;
|
|
4836
4836
|
return holders.map((v) => {
|
|
4837
|
-
const concreteHolder = isInterfaceHolder(v) ? v[
|
|
4837
|
+
const concreteHolder = isInterfaceHolder(v) ? v[chunkDPWQXPBJ_cjs.UnderlyingOsdkObject] : v;
|
|
4838
4838
|
return this.getQuery({
|
|
4839
4839
|
apiName: v.$objectType ?? v.$apiName,
|
|
4840
4840
|
pk: v.$primaryKey,
|
|
@@ -4932,7 +4932,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
4932
4932
|
// revalidation. Lazily populated on first fetch when `withProperties` is set.
|
|
4933
4933
|
#rdpInvalidationSet;
|
|
4934
4934
|
constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
|
|
4935
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4935
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunk7VOMQUIX_cjs.additionalContext].logger?.child({}, {
|
|
4936
4936
|
msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4937
4937
|
}) : void 0);
|
|
4938
4938
|
this.#baseObjectSetWire = baseObjectSetWire;
|
|
@@ -5000,7 +5000,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
5000
5000
|
return;
|
|
5001
5001
|
}
|
|
5002
5002
|
for (const os of sets) {
|
|
5003
|
-
const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(
|
|
5003
|
+
const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(chunk7VOMQUIX_cjs.getWireObjectSet(os));
|
|
5004
5004
|
if (typeName) {
|
|
5005
5005
|
types.add(typeName);
|
|
5006
5006
|
}
|
|
@@ -5027,16 +5027,16 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
5027
5027
|
*/
|
|
5028
5028
|
async fetchPageData(signal) {
|
|
5029
5029
|
if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
5030
|
-
const wireObjectSet =
|
|
5030
|
+
const wireObjectSet = chunk7VOMQUIX_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
5031
5031
|
const {
|
|
5032
5032
|
resultType,
|
|
5033
5033
|
invalidationSet
|
|
5034
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
5035
|
-
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy, await
|
|
5034
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunk7VOMQUIX_cjs.additionalContext], wireObjectSet);
|
|
5035
|
+
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy, await chunk7VOMQUIX_cjs.extractRdpDefinition(this.store.client[chunk7VOMQUIX_cjs.additionalContext], wireObjectSet));
|
|
5036
5036
|
this.#rdpInvalidationSet = invalidationSet;
|
|
5037
5037
|
}
|
|
5038
5038
|
if (this.#rdpInvalidationSet == null && this.#operations.withProperties != null) {
|
|
5039
|
-
const wireObjectSet =
|
|
5039
|
+
const wireObjectSet = chunk7VOMQUIX_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
5040
5040
|
this.#rdpInvalidationSet = await this.#computeInvalidationTypes(wireObjectSet);
|
|
5041
5041
|
}
|
|
5042
5042
|
const resp = await this.#composedObjectSet.fetchPage({
|
|
@@ -5185,7 +5185,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
5185
5185
|
try {
|
|
5186
5186
|
const {
|
|
5187
5187
|
invalidationSet
|
|
5188
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
5188
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunk7VOMQUIX_cjs.additionalContext], wireObjectSet);
|
|
5189
5189
|
return invalidationSet;
|
|
5190
5190
|
} catch (error) {
|
|
5191
5191
|
this.store.logger?.error("Failed to compute invalidation types for object set query, falling back to empty set", error);
|
|
@@ -5266,7 +5266,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5266
5266
|
if (process.env.NODE_ENV !== "production") {
|
|
5267
5267
|
console.warn("[@osdk/client] streamUpdates is not supported with pivotTo. The server does not support websocket subscriptions for link-traversal queries. Ignoring streamUpdates.");
|
|
5268
5268
|
}
|
|
5269
|
-
} else if (options.withProperties ||
|
|
5269
|
+
} else if (options.withProperties || chunk7VOMQUIX_cjs.hasWithProperties(chunk7VOMQUIX_cjs.getWireObjectSet(options.baseObjectSet))) {
|
|
5270
5270
|
if (process.env.NODE_ENV !== "production") {
|
|
5271
5271
|
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.");
|
|
5272
5272
|
}
|
|
@@ -5280,7 +5280,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5280
5280
|
const {
|
|
5281
5281
|
baseObjectSet
|
|
5282
5282
|
} = options;
|
|
5283
|
-
const baseObjectSetWire = JSON.stringify(
|
|
5283
|
+
const baseObjectSetWire = JSON.stringify(chunk7VOMQUIX_cjs.getWireObjectSet(baseObjectSet));
|
|
5284
5284
|
const operations = this.buildCanonicalizedOperations(options);
|
|
5285
5285
|
const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
|
|
5286
5286
|
return this.store.queries.get(objectSetCacheKey, () => {
|
|
@@ -5296,13 +5296,13 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5296
5296
|
operations.withProperties = this.rdpCanonicalizer.canonicalize(options.withProperties);
|
|
5297
5297
|
}
|
|
5298
5298
|
if (options.union && options.union.length > 0) {
|
|
5299
|
-
operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(
|
|
5299
|
+
operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(chunk7VOMQUIX_cjs.getWireObjectSet(os))));
|
|
5300
5300
|
}
|
|
5301
5301
|
if (options.intersect && options.intersect.length > 0) {
|
|
5302
|
-
operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(
|
|
5302
|
+
operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(chunk7VOMQUIX_cjs.getWireObjectSet(os))));
|
|
5303
5303
|
}
|
|
5304
5304
|
if (options.subtract && options.subtract.length > 0) {
|
|
5305
|
-
operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(
|
|
5305
|
+
operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(chunk7VOMQUIX_cjs.getWireObjectSet(os))));
|
|
5306
5306
|
}
|
|
5307
5307
|
if (options.pivotTo) {
|
|
5308
5308
|
operations.pivotTo = options.pivotTo;
|
|
@@ -5450,7 +5450,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
|
|
|
5450
5450
|
apiName: "__rdp_canonicalizer_holder__"
|
|
5451
5451
|
};
|
|
5452
5452
|
for (const [key, rdpFunction] of Object.entries(rdp)) {
|
|
5453
|
-
const builder =
|
|
5453
|
+
const builder = chunk7VOMQUIX_cjs.createWithPropertiesObjectSet(
|
|
5454
5454
|
objectTypeHolder,
|
|
5455
5455
|
{
|
|
5456
5456
|
type: "methodInput"
|
|
@@ -5627,7 +5627,7 @@ var Store = class {
|
|
|
5627
5627
|
subjects = this.layers.subjects;
|
|
5628
5628
|
// these are hopefully temporary
|
|
5629
5629
|
constructor(client, options) {
|
|
5630
|
-
this.logger = client[
|
|
5630
|
+
this.logger = client[chunk7VOMQUIX_cjs.additionalContext].logger?.child({}, {
|
|
5631
5631
|
msgPrefix: "Store",
|
|
5632
5632
|
level: options?.devMode?.logLevel
|
|
5633
5633
|
});
|
|
@@ -6066,10 +6066,10 @@ var Store = class {
|
|
|
6066
6066
|
|
|
6067
6067
|
// src/observable/ObservableClient.ts
|
|
6068
6068
|
function createObservableClient(client, extraUserAgents, options) {
|
|
6069
|
-
const tweakedClient =
|
|
6070
|
-
...client[
|
|
6071
|
-
fetch: shared_net_fetch.createFetchHeaderMutator(client[
|
|
6072
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
6069
|
+
const tweakedClient = chunkDPWQXPBJ_cjs.createClientFromContext({
|
|
6070
|
+
...client[chunk7VOMQUIX_cjs.additionalContext],
|
|
6071
|
+
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunk7VOMQUIX_cjs.additionalContext].fetch, (headers) => {
|
|
6072
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkDPWQXPBJ_cjs.OBSERVABLE_USER_AGENT, ...extraUserAgents?.() ?? []].filter((x) => x && x?.length > 0).join(" "));
|
|
6073
6073
|
return headers;
|
|
6074
6074
|
})
|
|
6075
6075
|
});
|
|
@@ -6077,5 +6077,5 @@ function createObservableClient(client, extraUserAgents, options) {
|
|
|
6077
6077
|
}
|
|
6078
6078
|
|
|
6079
6079
|
exports.createObservableClient = createObservableClient;
|
|
6080
|
-
//# sourceMappingURL=chunk-
|
|
6081
|
-
//# sourceMappingURL=chunk-
|
|
6080
|
+
//# sourceMappingURL=chunk-JFTS2NKV.cjs.map
|
|
6081
|
+
//# sourceMappingURL=chunk-JFTS2NKV.cjs.map
|