@osdk/client 2.7.0-beta.13 → 2.7.0-beta.14
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 +13 -0
- package/build/browser/observable/internal/evaluateFilter.js +1 -1
- package/build/browser/observable/internal/evaluateFilter.js.map +1 -1
- package/build/browser/observable/internal/evaluateFilter.test.js +105 -0
- package/build/browser/observable/internal/evaluateFilter.test.js.map +1 -0
- package/build/browser/observable/internal/list/ListQuery.test.js +86 -1
- package/build/browser/observable/internal/list/ListQuery.test.js.map +1 -1
- package/build/browser/observable/internal/list/ObjectListQuery.js +4 -4
- package/build/browser/observable/internal/list/ObjectListQuery.js.map +1 -1
- package/build/browser/observable/internal/object/ObjectQuery.js +12 -1
- package/build/browser/observable/internal/object/ObjectQuery.js.map +1 -1
- package/build/browser/observable/internal/objectMatchesWhereClause.test.js +11 -1
- package/build/browser/observable/internal/objectMatchesWhereClause.test.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-ZFL7RPT6.cjs → chunk-VX7CVNQZ.cjs} +4 -4
- package/build/cjs/{chunk-ZFL7RPT6.cjs.map → chunk-VX7CVNQZ.cjs.map} +1 -1
- package/build/cjs/index.cjs +7 -7
- package/build/cjs/public/unstable-do-not-use.cjs +31 -21
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/esm/observable/internal/evaluateFilter.js +1 -1
- package/build/esm/observable/internal/evaluateFilter.js.map +1 -1
- package/build/esm/observable/internal/evaluateFilter.test.js +105 -0
- package/build/esm/observable/internal/evaluateFilter.test.js.map +1 -0
- package/build/esm/observable/internal/list/ListQuery.test.js +86 -1
- package/build/esm/observable/internal/list/ListQuery.test.js.map +1 -1
- package/build/esm/observable/internal/list/ObjectListQuery.js +4 -4
- package/build/esm/observable/internal/list/ObjectListQuery.js.map +1 -1
- package/build/esm/observable/internal/object/ObjectQuery.js +12 -1
- package/build/esm/observable/internal/object/ObjectQuery.js.map +1 -1
- package/build/esm/observable/internal/objectMatchesWhereClause.test.js +11 -1
- package/build/esm/observable/internal/objectMatchesWhereClause.test.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/observable/internal/evaluateFilter.test.d.ts +1 -0
- package/build/types/observable/internal/evaluateFilter.test.d.ts.map +1 -0
- package/build/types/observable/internal/list/ObjectListQuery.d.ts.map +1 -1
- package/build/types/observable/internal/object/ObjectQuery.d.ts.map +1 -1
- package/package.json +7 -7
package/build/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVX7CVNQZ_cjs = require('./chunk-VX7CVNQZ.cjs');
|
|
4
4
|
require('./chunk-VVKEXIIO.cjs');
|
|
5
5
|
var chunkLDTMSHUZ_cjs = require('./chunk-LDTMSHUZ.cjs');
|
|
6
6
|
var api = require('@osdk/api');
|
|
@@ -18,7 +18,7 @@ chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
|
18
18
|
// src/createPlatformClient.ts
|
|
19
19
|
chunkLDTMSHUZ_cjs.init_cjs_shims();
|
|
20
20
|
function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
21
|
-
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider,
|
|
21
|
+
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkVX7CVNQZ_cjs.USER_AGENT, fetchFn);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// src/util/datetimeConverters.ts
|
|
@@ -45,23 +45,23 @@ var extractDateFromIsoString = (dateTime) => {
|
|
|
45
45
|
|
|
46
46
|
Object.defineProperty(exports, "ActionValidationError", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkVX7CVNQZ_cjs.ActionValidationError; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "createAttachmentUpload", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkVX7CVNQZ_cjs.createAttachmentUpload; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "createClient", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkVX7CVNQZ_cjs.createClient; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkVX7CVNQZ_cjs.createObjectSpecifierFromPrimaryKey; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkVX7CVNQZ_cjs.extractPrimaryKeyFromObjectSpecifier; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "isOk", {
|
|
67
67
|
enumerable: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVX7CVNQZ_cjs = require('../chunk-VX7CVNQZ.cjs');
|
|
4
4
|
var chunkVVKEXIIO_cjs = require('../chunk-VVKEXIIO.cjs');
|
|
5
5
|
var chunkLDTMSHUZ_cjs = require('../chunk-LDTMSHUZ.cjs');
|
|
6
6
|
var trie = require('@wry/trie');
|
|
@@ -1122,7 +1122,7 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1122
1122
|
path.push("$:map_end");
|
|
1123
1123
|
return arr;
|
|
1124
1124
|
}
|
|
1125
|
-
if (
|
|
1125
|
+
if (chunkVX7CVNQZ_cjs.isObjectSpecifiersObject(value)) {
|
|
1126
1126
|
const objectType = value.$objectType ?? value.$apiName;
|
|
1127
1127
|
path.push("$:osdk", objectType, value.$primaryKey);
|
|
1128
1128
|
return {
|
|
@@ -1228,7 +1228,7 @@ var FunctionQuery = class extends Query {
|
|
|
1228
1228
|
}).debug("calling _fetchAndStore");
|
|
1229
1229
|
}
|
|
1230
1230
|
try {
|
|
1231
|
-
const result = await
|
|
1231
|
+
const result = await chunkVX7CVNQZ_cjs.applyQuery(this.store.client[chunkVVKEXIIO_cjs.additionalContext], this.#queryDef, this.#params);
|
|
1232
1232
|
const executedAt = Date.now();
|
|
1233
1233
|
this.store.batch({}, (batch) => {
|
|
1234
1234
|
this.writeToStore({
|
|
@@ -2627,7 +2627,7 @@ function evaluateFilter(f, realValue, expected, strict) {
|
|
|
2627
2627
|
case "$ne":
|
|
2628
2628
|
return realValue !== expected;
|
|
2629
2629
|
case "$in":
|
|
2630
|
-
return expected
|
|
2630
|
+
return Array.isArray(expected) && expected.includes(realValue);
|
|
2631
2631
|
case "$isNull":
|
|
2632
2632
|
return realValue == null;
|
|
2633
2633
|
case "$startsWith":
|
|
@@ -3019,7 +3019,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3019
3019
|
}
|
|
3020
3020
|
extractRelevantObjects(changes) {
|
|
3021
3021
|
const matchesApiName = ([, object]) => {
|
|
3022
|
-
return this.apiName in object[
|
|
3022
|
+
return this.apiName in object[chunkVX7CVNQZ_cjs.ObjectDefRef].interfaceMap;
|
|
3023
3023
|
};
|
|
3024
3024
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
3025
3025
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
@@ -3070,15 +3070,15 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
3070
3070
|
const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX];
|
|
3071
3071
|
const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
|
|
3072
3072
|
if (pivotInfo != null) {
|
|
3073
|
-
|
|
3073
|
+
let sourceSet = store.client({
|
|
3074
3074
|
type: "object",
|
|
3075
3075
|
apiName: pivotInfo.sourceType
|
|
3076
3076
|
});
|
|
3077
|
+
sourceSet = sourceSet.where(this.canonicalWhere);
|
|
3077
3078
|
let objectSet2 = sourceSet.pivotTo(pivotInfo.linkName);
|
|
3078
3079
|
if (rdpConfig != null) {
|
|
3079
3080
|
objectSet2 = objectSet2.withProperties(rdpConfig);
|
|
3080
3081
|
}
|
|
3081
|
-
objectSet2 = objectSet2.where(this.canonicalWhere);
|
|
3082
3082
|
if (intersectWith != null && intersectWith.length > 0) {
|
|
3083
3083
|
const intersectSets = intersectWith.map((whereClause) => {
|
|
3084
3084
|
let intersectSet = store.client({
|
|
@@ -3207,8 +3207,8 @@ function stripRdpFields(value, rdpFields) {
|
|
|
3207
3207
|
if (rdpFields.size === 0) {
|
|
3208
3208
|
return value;
|
|
3209
3209
|
}
|
|
3210
|
-
const underlying = value[
|
|
3211
|
-
const objectDef = value[
|
|
3210
|
+
const underlying = value[chunkVX7CVNQZ_cjs.UnderlyingOsdkObject];
|
|
3211
|
+
const objectDef = value[chunkVX7CVNQZ_cjs.ObjectDefRef];
|
|
3212
3212
|
const newProps = {
|
|
3213
3213
|
$apiName: underlying.$apiName,
|
|
3214
3214
|
$objectType: underlying.$objectType,
|
|
@@ -3220,7 +3220,7 @@ function stripRdpFields(value, rdpFields) {
|
|
|
3220
3220
|
newProps[key] = underlying[key];
|
|
3221
3221
|
}
|
|
3222
3222
|
}
|
|
3223
|
-
return
|
|
3223
|
+
return chunkVX7CVNQZ_cjs.createOsdkObject(value[chunkVX7CVNQZ_cjs.ClientRef], objectDef, newProps);
|
|
3224
3224
|
}
|
|
3225
3225
|
function isSuperset(superset, subset) {
|
|
3226
3226
|
for (const field of subset) {
|
|
@@ -3231,8 +3231,8 @@ function isSuperset(superset, subset) {
|
|
|
3231
3231
|
return true;
|
|
3232
3232
|
}
|
|
3233
3233
|
function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
3234
|
-
const underlying = value[
|
|
3235
|
-
const objectDef = value[
|
|
3234
|
+
const underlying = value[chunkVX7CVNQZ_cjs.UnderlyingOsdkObject];
|
|
3235
|
+
const objectDef = value[chunkVX7CVNQZ_cjs.ObjectDefRef];
|
|
3236
3236
|
const newProps = {
|
|
3237
3237
|
$apiName: underlying.$apiName,
|
|
3238
3238
|
$objectType: underlying.$objectType,
|
|
@@ -3247,7 +3247,7 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
|
3247
3247
|
}
|
|
3248
3248
|
}
|
|
3249
3249
|
}
|
|
3250
|
-
return
|
|
3250
|
+
return chunkVX7CVNQZ_cjs.createOsdkObject(value[chunkVX7CVNQZ_cjs.ClientRef], objectDef, newProps);
|
|
3251
3251
|
}
|
|
3252
3252
|
function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
|
|
3253
3253
|
if (targetRdpFields.size === 0) {
|
|
@@ -3259,8 +3259,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
3259
3259
|
}
|
|
3260
3260
|
return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
|
|
3261
3261
|
}
|
|
3262
|
-
const sourceUnderlying = sourceValue[
|
|
3263
|
-
const objectDef = sourceValue[
|
|
3262
|
+
const sourceUnderlying = sourceValue[chunkVX7CVNQZ_cjs.UnderlyingOsdkObject];
|
|
3263
|
+
const objectDef = sourceValue[chunkVX7CVNQZ_cjs.ObjectDefRef];
|
|
3264
3264
|
const newProps = {
|
|
3265
3265
|
$apiName: sourceUnderlying.$apiName,
|
|
3266
3266
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -3273,14 +3273,14 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
3273
3273
|
}
|
|
3274
3274
|
}
|
|
3275
3275
|
if (targetCurrentValue) {
|
|
3276
|
-
const targetUnderlying = targetCurrentValue[
|
|
3276
|
+
const targetUnderlying = targetCurrentValue[chunkVX7CVNQZ_cjs.UnderlyingOsdkObject];
|
|
3277
3277
|
for (const field of targetRdpFields) {
|
|
3278
3278
|
if (!sourceRdpFields.has(field) && field in targetUnderlying) {
|
|
3279
3279
|
newProps[field] = targetUnderlying[field];
|
|
3280
3280
|
}
|
|
3281
3281
|
}
|
|
3282
3282
|
}
|
|
3283
|
-
return
|
|
3283
|
+
return chunkVX7CVNQZ_cjs.createOsdkObject(sourceValue[chunkVX7CVNQZ_cjs.ClientRef], objectDef, newProps);
|
|
3284
3284
|
}
|
|
3285
3285
|
|
|
3286
3286
|
// src/observable/internal/object/ObjectCacheKeyRegistry.ts
|
|
@@ -3512,7 +3512,17 @@ var ObjectQuery = class extends Query {
|
|
|
3512
3512
|
methodName: "_fetchAndStore"
|
|
3513
3513
|
}).debug("calling _fetchAndStore");
|
|
3514
3514
|
}
|
|
3515
|
-
const
|
|
3515
|
+
const rdpConfig = this.cacheKey.otherKeys[RDP_CONFIG_IDX];
|
|
3516
|
+
let obj;
|
|
3517
|
+
if (rdpConfig) {
|
|
3518
|
+
const miniDef = {
|
|
3519
|
+
type: "object",
|
|
3520
|
+
apiName: this.#apiName
|
|
3521
|
+
};
|
|
3522
|
+
obj = await this.store.client(miniDef).withProperties(rdpConfig).fetchOne(this.#pk);
|
|
3523
|
+
} else {
|
|
3524
|
+
obj = await getBulkObjectLoader(this.store.client).fetch(this.#apiName, this.#pk);
|
|
3525
|
+
}
|
|
3516
3526
|
this.store.batch({}, (batch) => {
|
|
3517
3527
|
this.writeToStore(obj, "loaded", batch);
|
|
3518
3528
|
});
|
|
@@ -4198,10 +4208,10 @@ var Store = class {
|
|
|
4198
4208
|
|
|
4199
4209
|
// src/observable/ObservableClient.ts
|
|
4200
4210
|
function createObservableClient(client) {
|
|
4201
|
-
const tweakedClient =
|
|
4211
|
+
const tweakedClient = chunkVX7CVNQZ_cjs.createClientFromContext({
|
|
4202
4212
|
...client[chunkVVKEXIIO_cjs.additionalContext],
|
|
4203
4213
|
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkVVKEXIIO_cjs.additionalContext].fetch, (headers) => {
|
|
4204
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
4214
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkVX7CVNQZ_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
|
|
4205
4215
|
return headers;
|
|
4206
4216
|
})
|
|
4207
4217
|
});
|
|
@@ -4245,7 +4255,7 @@ function getOsdkConfig(ontologyRid) {
|
|
|
4245
4255
|
|
|
4246
4256
|
Object.defineProperty(exports, "createClientWithTransaction", {
|
|
4247
4257
|
enumerable: true,
|
|
4248
|
-
get: function () { return
|
|
4258
|
+
get: function () { return chunkVX7CVNQZ_cjs.createClientWithTransaction; }
|
|
4249
4259
|
});
|
|
4250
4260
|
Object.defineProperty(exports, "augment", {
|
|
4251
4261
|
enumerable: true,
|