@osdk/client 2.72.0 → 2.73.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/{applyStreamingQuery-CN7NXX4A.cjs → applyStreamingQuery-FKYWPEUU.cjs} +8 -8
- package/build/cjs/{applyStreamingQuery-CN7NXX4A.cjs.map → applyStreamingQuery-FKYWPEUU.cjs.map} +1 -1
- package/build/cjs/{chunk-ZVGQ66VU.cjs → chunk-DPEZMSW2.cjs} +13 -13
- package/build/cjs/{chunk-ZVGQ66VU.cjs.map → chunk-DPEZMSW2.cjs.map} +1 -1
- package/build/cjs/{chunk-WBDUOV47.cjs → chunk-FLPBVSKK.cjs} +46 -46
- package/build/cjs/{chunk-WBDUOV47.cjs.map → chunk-FLPBVSKK.cjs.map} +1 -1
- package/build/cjs/{chunk-IGHO3GM6.cjs → chunk-IGVLXS2Y.cjs} +83 -83
- package/build/cjs/{chunk-IGHO3GM6.cjs.map → chunk-IGVLXS2Y.cjs.map} +1 -1
- package/build/cjs/{chunk-D6LIBHAQ.cjs → chunk-PTLM24GW.cjs} +2 -2
- package/build/cjs/{chunk-D6LIBHAQ.cjs.map → chunk-PTLM24GW.cjs.map} +1 -1
- package/build/cjs/{chunk-57EC6SQO.cjs → chunk-RYZGPQTZ.cjs} +8 -8
- package/build/cjs/{chunk-57EC6SQO.cjs.map → chunk-RYZGPQTZ.cjs.map} +1 -1
- package/build/cjs/index.cjs +11 -11
- package/build/cjs/public/experimental.cjs +9 -9
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/observable.cjs +5 -5
- package/build/cjs/public/unstable-do-not-use.cjs +16 -16
- 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 +6 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkFLPBVSKK_cjs = require('./chunk-FLPBVSKK.cjs');
|
|
4
|
+
var chunkDPEZMSW2_cjs = require('./chunk-DPEZMSW2.cjs');
|
|
5
|
+
var chunkPTLM24GW_cjs = require('./chunk-PTLM24GW.cjs');
|
|
6
6
|
var shared_net_fetch = require('@osdk/shared.net.fetch');
|
|
7
7
|
var rxjs = require('rxjs');
|
|
8
8
|
var invariant5 = require('tiny-invariant');
|
|
@@ -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 (chunkPTLM24GW_cjs.isObjectSet(item)) {
|
|
71
|
+
objectSetWires.push(chunkPTLM24GW_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) => chunkPTLM24GW_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkPTLM24GW_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(chunkPTLM24GW_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[chunkPTLM24GW_cjs.additionalContext].objectFactory(store.client[chunkPTLM24GW_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[chunkPTLM24GW_cjs.additionalContext].logger : store.client[chunkPTLM24GW_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[chunkPTLM24GW_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[chunkPTLM24GW_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 = chunkPTLM24GW_cjs.createObjectSet(objectTypeDef, this.store.client[chunkPTLM24GW_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(chunkPTLM24GW_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 (chunkDPEZMSW2_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 (chunkPTLM24GW_cjs.isObjectSet(value)) {
|
|
1515
|
+
const wire = JSON.stringify(chunkPTLM24GW_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[chunkPTLM24GW_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 chunkDPEZMSW2_cjs.applyQuery(this.store.client[chunkPTLM24GW_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?.[chunkFLPBVSKK_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?.[chunkFLPBVSKK_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] = chunkPTLM24GW_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[chunkFLPBVSKK_cjs.UnderlyingOsdkObject];
|
|
2311
|
+
const objectDef = requireObjectDef(value[chunkFLPBVSKK_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 chunkFLPBVSKK_cjs.createOsdkObject(value[chunkFLPBVSKK_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[chunkFLPBVSKK_cjs.UnderlyingOsdkObject];
|
|
2336
|
+
const objectDef = requireObjectDef(value[chunkFLPBVSKK_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 chunkFLPBVSKK_cjs.createOsdkObject(value[chunkFLPBVSKK_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[chunkFLPBVSKK_cjs.UnderlyingOsdkObject];
|
|
2357
|
+
const existingUnderlying = existingValue[chunkFLPBVSKK_cjs.UnderlyingOsdkObject];
|
|
2358
|
+
const objectDef = requireObjectDef(sourceValue[chunkFLPBVSKK_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 chunkFLPBVSKK_cjs.createOsdkObject(sourceValue[chunkFLPBVSKK_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[chunkFLPBVSKK_cjs.UnderlyingOsdkObject];
|
|
2391
|
+
const objectDef = requireObjectDef(sourceValue[chunkFLPBVSKK_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[chunkFLPBVSKK_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 chunkFLPBVSKK_cjs.createOsdkObject(sourceValue[chunkFLPBVSKK_cjs.ClientRef], objectDef, newProps);
|
|
2418
2418
|
}
|
|
2419
2419
|
function createCollectionConnectable(subject, subjects, createPayload) {
|
|
2420
2420
|
return rxjs.connectable(subject.pipe(rxjs.switchMap((listEntry) => {
|
|
@@ -3062,7 +3062,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
3062
3062
|
batch.changes.modified.add(this.cacheKey);
|
|
3063
3063
|
}
|
|
3064
3064
|
constructor(store, subject, cacheKey, opts) {
|
|
3065
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3065
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPTLM24GW_cjs.additionalContext].logger?.child({}, {
|
|
3066
3066
|
msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3067
3067
|
}) : void 0);
|
|
3068
3068
|
[this.#sourceApiName, this.#sourceTypeKind, this.#sourceUnderlyingObjectType, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
|
|
@@ -3084,7 +3084,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
3084
3084
|
*/
|
|
3085
3085
|
async fetchPageData(signal) {
|
|
3086
3086
|
const client = this.store.client;
|
|
3087
|
-
const ontologyProvider = client[
|
|
3087
|
+
const ontologyProvider = client[chunkPTLM24GW_cjs.additionalContext].ontologyProvider;
|
|
3088
3088
|
const isInterface = this.#sourceTypeKind === "interface";
|
|
3089
3089
|
const hasOrderBy = this.#orderBy && Object.keys(this.#orderBy).length > 0;
|
|
3090
3090
|
let target;
|
|
@@ -3216,7 +3216,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
3216
3216
|
}
|
|
3217
3217
|
return (async () => {
|
|
3218
3218
|
try {
|
|
3219
|
-
const ontologyProvider = this.store.client[
|
|
3219
|
+
const ontologyProvider = this.store.client[chunkPTLM24GW_cjs.additionalContext].ontologyProvider;
|
|
3220
3220
|
if (this.#sourceTypeKind === "interface") {
|
|
3221
3221
|
const objectMetadata2 = await ontologyProvider.getObjectDefinition(objectType);
|
|
3222
3222
|
if (this.#sourceApiName in objectMetadata2.interfaceMap) {
|
|
@@ -3397,7 +3397,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3397
3397
|
batch.changes.registerList(this.cacheKey);
|
|
3398
3398
|
}
|
|
3399
3399
|
constructor(store, subject, apiName, cacheKey, opts) {
|
|
3400
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3400
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPTLM24GW_cjs.additionalContext].logger?.child({}, {
|
|
3401
3401
|
msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3402
3402
|
}) : void 0);
|
|
3403
3403
|
this.apiName = apiName;
|
|
@@ -3450,11 +3450,11 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3450
3450
|
async fetchPageData(signal) {
|
|
3451
3451
|
const needsResultType = Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy) || this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied;
|
|
3452
3452
|
if (needsResultType) {
|
|
3453
|
-
const wireObjectSet =
|
|
3453
|
+
const wireObjectSet = chunkPTLM24GW_cjs.getWireObjectSet(this.#objectSet);
|
|
3454
3454
|
const {
|
|
3455
3455
|
resultType,
|
|
3456
3456
|
invalidationSet
|
|
3457
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3457
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkPTLM24GW_cjs.additionalContext], wireObjectSet);
|
|
3458
3458
|
this.#updateFetchedObjectType(resultType.apiName);
|
|
3459
3459
|
this.#rdpInvalidationSet = invalidationSet;
|
|
3460
3460
|
if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
@@ -3464,7 +3464,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3464
3464
|
// Carries derived-property type metadata so string-encoded numeric
|
|
3465
3465
|
// derived properties (decimal/long) sort by value. Returns {} when
|
|
3466
3466
|
// there are no derived properties.
|
|
3467
|
-
await
|
|
3467
|
+
await chunkPTLM24GW_cjs.extractRdpDefinition(this.store.client[chunkPTLM24GW_cjs.additionalContext], wireObjectSet)
|
|
3468
3468
|
);
|
|
3469
3469
|
}
|
|
3470
3470
|
if (this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied) {
|
|
@@ -3491,11 +3491,11 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3491
3491
|
}
|
|
3492
3492
|
if (this.#fetchedObjectType == null) {
|
|
3493
3493
|
try {
|
|
3494
|
-
const wireObjectSet =
|
|
3494
|
+
const wireObjectSet = chunkPTLM24GW_cjs.getWireObjectSet(this.#objectSet);
|
|
3495
3495
|
const {
|
|
3496
3496
|
resultType,
|
|
3497
3497
|
invalidationSet
|
|
3498
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3498
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkPTLM24GW_cjs.additionalContext], wireObjectSet);
|
|
3499
3499
|
this.#updateFetchedObjectType(resultType.apiName);
|
|
3500
3500
|
this.#rdpInvalidationSet = invalidationSet;
|
|
3501
3501
|
} catch {
|
|
@@ -3758,7 +3758,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3758
3758
|
type,
|
|
3759
3759
|
apiName: this.apiName
|
|
3760
3760
|
};
|
|
3761
|
-
const clientCtx = store.client[
|
|
3761
|
+
const clientCtx = store.client[chunkPTLM24GW_cjs.additionalContext];
|
|
3762
3762
|
let objectSet;
|
|
3763
3763
|
if (rids != null) {
|
|
3764
3764
|
objectSet = clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
|
|
@@ -3802,7 +3802,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3802
3802
|
}
|
|
3803
3803
|
extractRelevantObjects(changes) {
|
|
3804
3804
|
const matchesApiName = ([, object]) => {
|
|
3805
|
-
return this.apiName in object[
|
|
3805
|
+
return this.apiName in object[chunkFLPBVSKK_cjs.ObjectDefRef].interfaceMap;
|
|
3806
3806
|
};
|
|
3807
3807
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => this.wrapObject(object));
|
|
3808
3808
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => this.wrapObject(object));
|
|
@@ -3821,7 +3821,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3821
3821
|
}
|
|
3822
3822
|
};
|
|
3823
3823
|
function createSourceSetForPivot(store, pivotInfo, rids) {
|
|
3824
|
-
const clientCtx = store.client[
|
|
3824
|
+
const clientCtx = store.client[chunkPTLM24GW_cjs.additionalContext];
|
|
3825
3825
|
if (rids != null) {
|
|
3826
3826
|
return clientCtx.objectSetFactory({
|
|
3827
3827
|
type: "object",
|
|
@@ -3850,7 +3850,7 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
3850
3850
|
const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX];
|
|
3851
3851
|
const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
|
|
3852
3852
|
const rids = this.cacheKey.otherKeys[RIDS_IDX];
|
|
3853
|
-
const clientCtx = store.client[
|
|
3853
|
+
const clientCtx = store.client[chunkPTLM24GW_cjs.additionalContext];
|
|
3854
3854
|
const typeDefinition = {
|
|
3855
3855
|
type: "object",
|
|
3856
3856
|
apiName: this.apiName
|
|
@@ -4111,7 +4111,7 @@ var MediaMetadataQuery = class extends Query {
|
|
|
4111
4111
|
#propertyName;
|
|
4112
4112
|
#preview;
|
|
4113
4113
|
constructor(store, subject, objectType, primaryKey, propertyName, cacheKey, opts) {
|
|
4114
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4114
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPTLM24GW_cjs.additionalContext].logger?.child({}, {
|
|
4115
4115
|
msgPrefix: `MediaMetadataQuery<${objectType}, ${JSON.stringify(primaryKey)}, ${propertyName}>`
|
|
4116
4116
|
}) : void 0);
|
|
4117
4117
|
this.#objectType = objectType;
|
|
@@ -4144,9 +4144,9 @@ var MediaMetadataQuery = class extends Query {
|
|
|
4144
4144
|
this.setStatus("loading", batch);
|
|
4145
4145
|
});
|
|
4146
4146
|
try {
|
|
4147
|
-
const ontologyRid = await this.store.client[
|
|
4148
|
-
const response = await
|
|
4149
|
-
branch: this.store.client[
|
|
4147
|
+
const ontologyRid = await this.store.client[chunkPTLM24GW_cjs.additionalContext].ontologyRid;
|
|
4148
|
+
const response = await chunkFLPBVSKK_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunkPTLM24GW_cjs.additionalContext], ontologyRid, this.#objectType, String(this.#primaryKey), this.#propertyName, {
|
|
4149
|
+
branch: this.store.client[chunkPTLM24GW_cjs.additionalContext].branch,
|
|
4150
4150
|
preview: this.#preview
|
|
4151
4151
|
});
|
|
4152
4152
|
const metadata = {
|
|
@@ -4268,9 +4268,9 @@ var MediaHelper = class extends AbstractHelper {
|
|
|
4268
4268
|
return this._subscribe(query, options, observer);
|
|
4269
4269
|
}
|
|
4270
4270
|
async fetchMetadata(coords, options) {
|
|
4271
|
-
const ontologyRid = await this.store.client[
|
|
4272
|
-
const response = await
|
|
4273
|
-
branch: this.store.client[
|
|
4271
|
+
const ontologyRid = await this.store.client[chunkPTLM24GW_cjs.additionalContext].ontologyRid;
|
|
4272
|
+
const response = await chunkFLPBVSKK_cjs.MediaReferenceProperty_exports.getMediaMetadata(this.store.client[chunkPTLM24GW_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
|
|
4273
|
+
branch: this.store.client[chunkPTLM24GW_cjs.additionalContext].branch,
|
|
4274
4274
|
preview: options?.preview ?? true
|
|
4275
4275
|
});
|
|
4276
4276
|
return {
|
|
@@ -4290,9 +4290,9 @@ var MediaHelper = class extends AbstractHelper {
|
|
|
4290
4290
|
let response;
|
|
4291
4291
|
const coords = this.resolveToCoords(mediaOrLocation);
|
|
4292
4292
|
if (coords) {
|
|
4293
|
-
const ontologyRid = await this.store.client[
|
|
4294
|
-
response = await
|
|
4295
|
-
branch: this.store.client[
|
|
4293
|
+
const ontologyRid = await this.store.client[chunkPTLM24GW_cjs.additionalContext].ontologyRid;
|
|
4294
|
+
response = await chunkFLPBVSKK_cjs.MediaReferenceProperty_exports.getMediaContent(this.store.client[chunkPTLM24GW_cjs.additionalContext], ontologyRid, coords.objectType, String(coords.primaryKey), coords.propertyName, {
|
|
4295
|
+
branch: this.store.client[chunkPTLM24GW_cjs.additionalContext].branch,
|
|
4296
4296
|
preview
|
|
4297
4297
|
});
|
|
4298
4298
|
} else if ("fetchContents" in mediaOrLocation) {
|
|
@@ -4479,7 +4479,7 @@ var ObjectCacheKeyRegistry = class {
|
|
|
4479
4479
|
|
|
4480
4480
|
// src/object/convertWireToOsdkObjects/InterfaceHolder.ts
|
|
4481
4481
|
function isInterfaceHolder(v) {
|
|
4482
|
-
return typeof v === "object" && v != null &&
|
|
4482
|
+
return typeof v === "object" && v != null && chunkFLPBVSKK_cjs.InterfaceDefRef in v;
|
|
4483
4483
|
}
|
|
4484
4484
|
|
|
4485
4485
|
// ../../node_modules/.pnpm/p-defer@4.0.1/node_modules/p-defer/index.js
|
|
@@ -4538,7 +4538,7 @@ var BulkObjectLoader = class {
|
|
|
4538
4538
|
#maxEntries;
|
|
4539
4539
|
constructor(client, maxWait = 25, maxEntries = 100) {
|
|
4540
4540
|
this.#client = client;
|
|
4541
|
-
this.#logger = client[
|
|
4541
|
+
this.#logger = client[chunkPTLM24GW_cjs.additionalContext].logger;
|
|
4542
4542
|
this.#maxWait = maxWait;
|
|
4543
4543
|
this.#maxEntries = maxEntries;
|
|
4544
4544
|
}
|
|
@@ -4707,7 +4707,7 @@ var ObjectQuery = class extends Query {
|
|
|
4707
4707
|
#includeAllBaseObjectProperties;
|
|
4708
4708
|
#implementingTypes;
|
|
4709
4709
|
constructor(store, subject, type, pk, cacheKey, opts, defType = "object", select, loadPropertySecurityMetadata, includeAllBaseObjectProperties) {
|
|
4710
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4710
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPTLM24GW_cjs.additionalContext].logger?.child({}, {
|
|
4711
4711
|
msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4712
4712
|
}) : void 0);
|
|
4713
4713
|
this.#apiName = type;
|
|
@@ -4822,7 +4822,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4822
4822
|
select,
|
|
4823
4823
|
$loadPropertySecurityMetadata
|
|
4824
4824
|
} = options;
|
|
4825
|
-
const defType =
|
|
4825
|
+
const defType = chunkDPEZMSW2_cjs.getDefType(options.apiName);
|
|
4826
4826
|
const $includeAllBaseObjectProperties = defType === "interface" && options.$includeAllBaseObjectProperties ? true : void 0;
|
|
4827
4827
|
const canonSelect = select && select.length > 0 ? this.store.selectCanonicalizer.canonicalize(select) : void 0;
|
|
4828
4828
|
const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0, canonSelect, $loadPropertySecurityMetadata ? true : void 0, $includeAllBaseObjectProperties);
|
|
@@ -4839,7 +4839,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4839
4839
|
storeOsdkInstances(values, batch, rdpConfig, selectFields, includeAllBaseObjectProperties, computedRdpFields) {
|
|
4840
4840
|
const holders = values;
|
|
4841
4841
|
return holders.map((v) => {
|
|
4842
|
-
const concreteHolder = isInterfaceHolder(v) ? v[
|
|
4842
|
+
const concreteHolder = isInterfaceHolder(v) ? v[chunkFLPBVSKK_cjs.UnderlyingOsdkObject] : v;
|
|
4843
4843
|
return this.getQuery({
|
|
4844
4844
|
apiName: v.$objectType ?? v.$apiName,
|
|
4845
4845
|
pk: v.$primaryKey,
|
|
@@ -4937,7 +4937,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
4937
4937
|
// revalidation. Lazily populated on first fetch when `withProperties` is set.
|
|
4938
4938
|
#rdpInvalidationSet;
|
|
4939
4939
|
constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
|
|
4940
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4940
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkPTLM24GW_cjs.additionalContext].logger?.child({}, {
|
|
4941
4941
|
msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4942
4942
|
}) : void 0);
|
|
4943
4943
|
this.#baseObjectSetWire = baseObjectSetWire;
|
|
@@ -5005,7 +5005,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
5005
5005
|
return;
|
|
5006
5006
|
}
|
|
5007
5007
|
for (const os of sets) {
|
|
5008
|
-
const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(
|
|
5008
|
+
const typeName = _ObjectSetQuery.#extractTypeFromWireObjectSet(chunkPTLM24GW_cjs.getWireObjectSet(os));
|
|
5009
5009
|
if (typeName) {
|
|
5010
5010
|
types.add(typeName);
|
|
5011
5011
|
}
|
|
@@ -5032,16 +5032,16 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
5032
5032
|
*/
|
|
5033
5033
|
async fetchPageData(signal) {
|
|
5034
5034
|
if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
5035
|
-
const wireObjectSet =
|
|
5035
|
+
const wireObjectSet = chunkPTLM24GW_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
5036
5036
|
const {
|
|
5037
5037
|
resultType,
|
|
5038
5038
|
invalidationSet
|
|
5039
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
5040
|
-
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy, await
|
|
5039
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkPTLM24GW_cjs.additionalContext], wireObjectSet);
|
|
5040
|
+
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy, await chunkPTLM24GW_cjs.extractRdpDefinition(this.store.client[chunkPTLM24GW_cjs.additionalContext], wireObjectSet));
|
|
5041
5041
|
this.#rdpInvalidationSet = invalidationSet;
|
|
5042
5042
|
}
|
|
5043
5043
|
if (this.#rdpInvalidationSet == null && this.#operations.withProperties != null) {
|
|
5044
|
-
const wireObjectSet =
|
|
5044
|
+
const wireObjectSet = chunkPTLM24GW_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
5045
5045
|
this.#rdpInvalidationSet = await this.#computeInvalidationTypes(wireObjectSet);
|
|
5046
5046
|
}
|
|
5047
5047
|
const resp = await this.#composedObjectSet.fetchPage({
|
|
@@ -5190,7 +5190,7 @@ var ObjectSetQuery = class _ObjectSetQuery extends BaseListQuery {
|
|
|
5190
5190
|
try {
|
|
5191
5191
|
const {
|
|
5192
5192
|
invalidationSet
|
|
5193
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
5193
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkPTLM24GW_cjs.additionalContext], wireObjectSet);
|
|
5194
5194
|
return invalidationSet;
|
|
5195
5195
|
} catch (error) {
|
|
5196
5196
|
this.store.logger?.error("Failed to compute invalidation types for object set query, falling back to empty set", error);
|
|
@@ -5271,7 +5271,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5271
5271
|
if (process.env.NODE_ENV !== "production") {
|
|
5272
5272
|
console.warn("[@osdk/client] streamUpdates is not supported with pivotTo. The server does not support websocket subscriptions for link-traversal queries. Ignoring streamUpdates.");
|
|
5273
5273
|
}
|
|
5274
|
-
} else if (options.withProperties ||
|
|
5274
|
+
} else if (options.withProperties || chunkPTLM24GW_cjs.hasWithProperties(chunkPTLM24GW_cjs.getWireObjectSet(options.baseObjectSet))) {
|
|
5275
5275
|
if (process.env.NODE_ENV !== "production") {
|
|
5276
5276
|
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.");
|
|
5277
5277
|
}
|
|
@@ -5285,7 +5285,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5285
5285
|
const {
|
|
5286
5286
|
baseObjectSet
|
|
5287
5287
|
} = options;
|
|
5288
|
-
const baseObjectSetWire = JSON.stringify(
|
|
5288
|
+
const baseObjectSetWire = JSON.stringify(chunkPTLM24GW_cjs.getWireObjectSet(baseObjectSet));
|
|
5289
5289
|
const operations = this.buildCanonicalizedOperations(options);
|
|
5290
5290
|
const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
|
|
5291
5291
|
return this.store.queries.get(objectSetCacheKey, () => {
|
|
@@ -5301,13 +5301,13 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
5301
5301
|
operations.withProperties = this.rdpCanonicalizer.canonicalize(options.withProperties);
|
|
5302
5302
|
}
|
|
5303
5303
|
if (options.union && options.union.length > 0) {
|
|
5304
|
-
operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(
|
|
5304
|
+
operations.union = this.objectSetArrayCanonicalizer.canonicalizeUnion(options.union.map((os) => JSON.stringify(chunkPTLM24GW_cjs.getWireObjectSet(os))));
|
|
5305
5305
|
}
|
|
5306
5306
|
if (options.intersect && options.intersect.length > 0) {
|
|
5307
|
-
operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(
|
|
5307
|
+
operations.intersect = this.objectSetArrayCanonicalizer.canonicalizeIntersect(options.intersect.map((os) => JSON.stringify(chunkPTLM24GW_cjs.getWireObjectSet(os))));
|
|
5308
5308
|
}
|
|
5309
5309
|
if (options.subtract && options.subtract.length > 0) {
|
|
5310
|
-
operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(
|
|
5310
|
+
operations.subtract = this.objectSetArrayCanonicalizer.canonicalizeSubtract(options.subtract.map((os) => JSON.stringify(chunkPTLM24GW_cjs.getWireObjectSet(os))));
|
|
5311
5311
|
}
|
|
5312
5312
|
if (options.pivotTo) {
|
|
5313
5313
|
operations.pivotTo = options.pivotTo;
|
|
@@ -5455,7 +5455,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
|
|
|
5455
5455
|
apiName: "__rdp_canonicalizer_holder__"
|
|
5456
5456
|
};
|
|
5457
5457
|
for (const [key, rdpFunction] of Object.entries(rdp)) {
|
|
5458
|
-
const builder =
|
|
5458
|
+
const builder = chunkPTLM24GW_cjs.createWithPropertiesObjectSet(
|
|
5459
5459
|
objectTypeHolder,
|
|
5460
5460
|
{
|
|
5461
5461
|
type: "methodInput"
|
|
@@ -5632,7 +5632,7 @@ var Store = class {
|
|
|
5632
5632
|
subjects = this.layers.subjects;
|
|
5633
5633
|
// these are hopefully temporary
|
|
5634
5634
|
constructor(client, options) {
|
|
5635
|
-
this.logger = client[
|
|
5635
|
+
this.logger = client[chunkPTLM24GW_cjs.additionalContext].logger?.child({}, {
|
|
5636
5636
|
msgPrefix: "Store",
|
|
5637
5637
|
level: options?.devMode?.logLevel
|
|
5638
5638
|
});
|
|
@@ -6071,10 +6071,10 @@ var Store = class {
|
|
|
6071
6071
|
|
|
6072
6072
|
// src/observable/ObservableClient.ts
|
|
6073
6073
|
function createObservableClient(client, extraUserAgents, options) {
|
|
6074
|
-
const tweakedClient =
|
|
6075
|
-
...client[
|
|
6076
|
-
fetch: shared_net_fetch.createFetchHeaderMutator(client[
|
|
6077
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
6074
|
+
const tweakedClient = chunkFLPBVSKK_cjs.createClientFromContext({
|
|
6075
|
+
...client[chunkPTLM24GW_cjs.additionalContext],
|
|
6076
|
+
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkPTLM24GW_cjs.additionalContext].fetch, (headers) => {
|
|
6077
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkFLPBVSKK_cjs.OBSERVABLE_USER_AGENT, ...extraUserAgents?.() ?? []].filter((x) => x && x?.length > 0).join(" "));
|
|
6078
6078
|
return headers;
|
|
6079
6079
|
})
|
|
6080
6080
|
});
|
|
@@ -6082,5 +6082,5 @@ function createObservableClient(client, extraUserAgents, options) {
|
|
|
6082
6082
|
}
|
|
6083
6083
|
|
|
6084
6084
|
exports.createObservableClient = createObservableClient;
|
|
6085
|
-
//# sourceMappingURL=chunk-
|
|
6086
|
-
//# sourceMappingURL=chunk-
|
|
6085
|
+
//# sourceMappingURL=chunk-IGVLXS2Y.cjs.map
|
|
6086
|
+
//# sourceMappingURL=chunk-IGVLXS2Y.cjs.map
|