@osdk/client 2.8.0-beta.21 → 2.8.0-beta.23
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 +22 -0
- package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js +30 -15
- package/build/browser/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -1
- package/build/browser/internal/conversions/modernToLegacyAggregationClause.js +13 -3
- package/build/browser/internal/conversions/modernToLegacyAggregationClause.js.map +1 -1
- package/build/browser/object/aggregate.js +2 -2
- package/build/browser/object/aggregate.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-3XHX3RLX.cjs → chunk-R7OP6A6S.cjs} +43 -23
- package/build/cjs/chunk-R7OP6A6S.cjs.map +1 -0
- package/build/cjs/{chunk-CXIHFOWS.cjs → chunk-WLFG2VXM.cjs} +39 -39
- package/build/cjs/{chunk-CXIHFOWS.cjs.map → chunk-WLFG2VXM.cjs.map} +1 -1
- package/build/cjs/index.cjs +10 -10
- package/build/cjs/public/internal.cjs +8 -8
- package/build/cjs/public/unstable-do-not-use.cjs +68 -68
- package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js +30 -15
- package/build/esm/internal/conversions/legacyToModernSingleAggregationResult.js.map +1 -1
- package/build/esm/internal/conversions/modernToLegacyAggregationClause.js +13 -3
- package/build/esm/internal/conversions/modernToLegacyAggregationClause.js.map +1 -1
- package/build/esm/object/aggregate.js +2 -2
- package/build/esm/object/aggregate.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/package.json +9 -9
- package/build/cjs/chunk-3XHX3RLX.cjs.map +0 -1
package/build/cjs/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkWLFG2VXM_cjs = require('./chunk-WLFG2VXM.cjs');
|
|
4
|
+
var chunkR7OP6A6S_cjs = require('./chunk-R7OP6A6S.cjs');
|
|
5
5
|
require('./chunk-GSVXEVM4.cjs');
|
|
6
6
|
require('./chunk-D26YLHTV.cjs');
|
|
7
7
|
require('./chunk-YJG67XL4.cjs');
|
|
@@ -16,7 +16,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
16
16
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
17
17
|
|
|
18
18
|
function createPlatformClient(baseUrl, tokenProvider, options = void 0, fetchFn = fetch) {
|
|
19
|
-
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider,
|
|
19
|
+
return shared_client_impl.createSharedClientContext(baseUrl, tokenProvider, chunkWLFG2VXM_cjs.USER_AGENT, fetchFn);
|
|
20
20
|
}
|
|
21
21
|
var isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
|
|
22
22
|
var extractDate = (dateTime) => {
|
|
@@ -40,31 +40,31 @@ var extractDateFromIsoString = (dateTime) => {
|
|
|
40
40
|
|
|
41
41
|
Object.defineProperty(exports, "ActionValidationError", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkWLFG2VXM_cjs.ActionValidationError; }
|
|
44
44
|
});
|
|
45
45
|
Object.defineProperty(exports, "createAttachmentUpload", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkWLFG2VXM_cjs.createAttachmentUpload; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "createClient", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkWLFG2VXM_cjs.createClient; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "createObjectSpecifierFromPrimaryKey", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkWLFG2VXM_cjs.createObjectSpecifierFromPrimaryKey; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "extractPrimaryKeyFromObjectSpecifier", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkWLFG2VXM_cjs.extractPrimaryKeyFromObjectSpecifier; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "getWireObjectSet", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkR7OP6A6S_cjs.getWireObjectSet; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "isObjectSet", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkR7OP6A6S_cjs.isObjectSet; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "isOk", {
|
|
70
70
|
enumerable: true,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkR7OP6A6S_cjs = require('../chunk-R7OP6A6S.cjs');
|
|
4
4
|
require('../chunk-D26YLHTV.cjs');
|
|
5
5
|
require('../chunk-HEMBBCBS.cjs');
|
|
6
6
|
|
|
7
7
|
// src/public-utils/createAndFetchTempObjectSetRid.ts
|
|
8
8
|
async function createAndFetchTempObjectSetRid(client, objectSet) {
|
|
9
|
-
const response = await
|
|
10
|
-
objectSet:
|
|
9
|
+
const response = await chunkR7OP6A6S_cjs.createTemporary(client, await client[chunkR7OP6A6S_cjs.additionalContext].ontologyRid, {
|
|
10
|
+
objectSet: chunkR7OP6A6S_cjs.getWireObjectSet(objectSet)
|
|
11
11
|
});
|
|
12
12
|
return response.objectSetRid;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// src/public-utils/hydrateObjectSetFromObjectRids.ts
|
|
16
16
|
function hydrateObjectSetFromObjectRids(client, definition, rids) {
|
|
17
|
-
return
|
|
17
|
+
return chunkR7OP6A6S_cjs.createObjectSet(definition, client[chunkR7OP6A6S_cjs.additionalContext], {
|
|
18
18
|
type: "intersect",
|
|
19
19
|
objectSets: [definition.type === "interface" ? {
|
|
20
20
|
type: "interfaceBase",
|
|
@@ -34,7 +34,7 @@ function asMutableArray(array) {
|
|
|
34
34
|
|
|
35
35
|
// src/public-utils/hydrateObjectSetFromRid.ts
|
|
36
36
|
function hydrateObjectSetFromRid(client, definition, rid) {
|
|
37
|
-
return
|
|
37
|
+
return chunkR7OP6A6S_cjs.createObjectSet(definition, client[chunkR7OP6A6S_cjs.additionalContext], {
|
|
38
38
|
type: "intersect",
|
|
39
39
|
objectSets: [definition.type === "interface" ? {
|
|
40
40
|
type: "interfaceBase",
|
|
@@ -75,7 +75,7 @@ var levelStyles = {
|
|
|
75
75
|
color: "orange"
|
|
76
76
|
})
|
|
77
77
|
};
|
|
78
|
-
var BrowserLogger = class _BrowserLogger extends
|
|
78
|
+
var BrowserLogger = class _BrowserLogger extends chunkR7OP6A6S_cjs.BaseLogger {
|
|
79
79
|
constructor(bindings = {}, options = {}) {
|
|
80
80
|
super(bindings, {
|
|
81
81
|
...options,
|
|
@@ -101,11 +101,11 @@ var BrowserLogger = class _BrowserLogger extends chunk3XHX3RLX_cjs.BaseLogger {
|
|
|
101
101
|
|
|
102
102
|
Object.defineProperty(exports, "MinimalLogger", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkR7OP6A6S_cjs.MinimalLogger; }
|
|
105
105
|
});
|
|
106
106
|
Object.defineProperty(exports, "hydrateAttachmentFromRid", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkR7OP6A6S_cjs.hydrateAttachmentFromRid; }
|
|
109
109
|
});
|
|
110
110
|
exports.BrowserLogger = BrowserLogger;
|
|
111
111
|
exports.createAndFetchTempObjectSetRid = createAndFetchTempObjectSetRid;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkWLFG2VXM_cjs = require('../chunk-WLFG2VXM.cjs');
|
|
4
|
+
var chunkR7OP6A6S_cjs = require('../chunk-R7OP6A6S.cjs');
|
|
5
5
|
require('../chunk-GSVXEVM4.cjs');
|
|
6
6
|
require('../chunk-D26YLHTV.cjs');
|
|
7
7
|
require('../chunk-YJG67XL4.cjs');
|
|
@@ -139,7 +139,7 @@ var WhereClauseCanonicalizer = class {
|
|
|
139
139
|
var whereCanonicalizer = new WhereClauseCanonicalizer();
|
|
140
140
|
var orderByCanonicalizer = new OrderByCanonicalizer();
|
|
141
141
|
function computeObjectSetCacheKey(objectSet, options) {
|
|
142
|
-
const keyParts = ["objectSet",
|
|
142
|
+
const keyParts = ["objectSet", chunkR7OP6A6S_cjs.getWireObjectSet(objectSet)];
|
|
143
143
|
if (!options) {
|
|
144
144
|
return JSON.stringify(keyParts);
|
|
145
145
|
}
|
|
@@ -151,13 +151,13 @@ function computeObjectSetCacheKey(objectSet, options) {
|
|
|
151
151
|
keyParts.push("props", propKeys);
|
|
152
152
|
}
|
|
153
153
|
if (options.union && options.union.length > 0) {
|
|
154
|
-
keyParts.push("union", options.union.map((os) =>
|
|
154
|
+
keyParts.push("union", options.union.map((os) => chunkR7OP6A6S_cjs.getWireObjectSet(os)));
|
|
155
155
|
}
|
|
156
156
|
if (options.intersect && options.intersect.length > 0) {
|
|
157
|
-
keyParts.push("intersect", options.intersect.map((os) =>
|
|
157
|
+
keyParts.push("intersect", options.intersect.map((os) => chunkR7OP6A6S_cjs.getWireObjectSet(os)));
|
|
158
158
|
}
|
|
159
159
|
if (options.subtract && options.subtract.length > 0) {
|
|
160
|
-
keyParts.push("subtract", options.subtract.map((os) =>
|
|
160
|
+
keyParts.push("subtract", options.subtract.map((os) => chunkR7OP6A6S_cjs.getWireObjectSet(os)));
|
|
161
161
|
}
|
|
162
162
|
if (options.pivotTo) {
|
|
163
163
|
keyParts.push("pivotTo", options.pivotTo);
|
|
@@ -221,8 +221,8 @@ var ObservableClientImpl = class {
|
|
|
221
221
|
const instances = [];
|
|
222
222
|
const objectSetWires = [];
|
|
223
223
|
for (const item of options.dependsOnObjects ?? []) {
|
|
224
|
-
if (
|
|
225
|
-
objectSetWires.push(
|
|
224
|
+
if (chunkR7OP6A6S_cjs.isObjectSet(item)) {
|
|
225
|
+
objectSetWires.push(chunkR7OP6A6S_cjs.getWireObjectSet(item));
|
|
226
226
|
} else {
|
|
227
227
|
instances.push({
|
|
228
228
|
$apiName: item.$objectType ?? item.$apiName,
|
|
@@ -230,7 +230,7 @@ var ObservableClientImpl = class {
|
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) =>
|
|
233
|
+
const objectSetTypesPromise = objectSetWires.length > 0 ? Promise.all(objectSetWires.map((wire) => chunkR7OP6A6S_cjs.extractObjectOrInterfaceType(this.__experimentalStore.client[chunkR7OP6A6S_cjs.additionalContext], wire))).then((types) => types.filter((t) => t != null).map((t) => t.apiName)) : void 0;
|
|
234
234
|
return this.__experimentalStore.functions.observe({
|
|
235
235
|
...options,
|
|
236
236
|
queryDef,
|
|
@@ -459,7 +459,7 @@ var OptimisticJob = class {
|
|
|
459
459
|
return this;
|
|
460
460
|
},
|
|
461
461
|
createObject(type, pk, properties) {
|
|
462
|
-
const create = store.client[
|
|
462
|
+
const create = store.client[chunkR7OP6A6S_cjs.additionalContext].objectFactory2(store.client[chunkR7OP6A6S_cjs.additionalContext], [{
|
|
463
463
|
$primaryKey: pk,
|
|
464
464
|
$apiName: type.apiName,
|
|
465
465
|
$objectType: type.apiName,
|
|
@@ -917,7 +917,7 @@ var Query = class {
|
|
|
917
917
|
this.store = store;
|
|
918
918
|
this.cacheKeys = store.cacheKeys;
|
|
919
919
|
this.#subject = observable;
|
|
920
|
-
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[
|
|
920
|
+
this.logger = logger ?? (process.env.NODE_ENV === "production" ? store.client[chunkR7OP6A6S_cjs.additionalContext].logger : store.client[chunkR7OP6A6S_cjs.additionalContext].logger?.child({}, {
|
|
921
921
|
msgPrefix: process.env.NODE_ENV !== "production" ? `Query<${cacheKey.type}, ${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>` : "Query"
|
|
922
922
|
}));
|
|
923
923
|
}
|
|
@@ -1079,7 +1079,7 @@ var AggregationQuery = class extends Query {
|
|
|
1079
1079
|
#invalidationTypes;
|
|
1080
1080
|
#invalidationTypesPromise;
|
|
1081
1081
|
constructor(store, subject, cacheKey, opts) {
|
|
1082
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1082
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkR7OP6A6S_cjs.additionalContext].logger?.child({}, {
|
|
1083
1083
|
msgPrefix: `AggregationQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1084
1084
|
}) : void 0);
|
|
1085
1085
|
this.apiName = cacheKey.otherKeys[API_NAME_IDX];
|
|
@@ -1097,7 +1097,7 @@ var AggregationQuery = class extends Query {
|
|
|
1097
1097
|
try {
|
|
1098
1098
|
const {
|
|
1099
1099
|
invalidationSet
|
|
1100
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
1100
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkR7OP6A6S_cjs.additionalContext], wireObjectSet);
|
|
1101
1101
|
return /* @__PURE__ */ new Set([this.apiName, ...invalidationSet]);
|
|
1102
1102
|
} catch (error) {
|
|
1103
1103
|
this.store.logger?.error("Failed to compute invalidation types for aggregation, falling back to base type only", error);
|
|
@@ -1168,7 +1168,7 @@ var ObjectAggregationQuery = class extends AggregationQuery {
|
|
|
1168
1168
|
};
|
|
1169
1169
|
let objectSet;
|
|
1170
1170
|
if (this.parsedWireObjectSet) {
|
|
1171
|
-
objectSet =
|
|
1171
|
+
objectSet = chunkR7OP6A6S_cjs.createObjectSet(objectTypeDef, this.store.client[chunkR7OP6A6S_cjs.additionalContext], this.parsedWireObjectSet);
|
|
1172
1172
|
} else {
|
|
1173
1173
|
objectSet = this.store.client(objectTypeDef);
|
|
1174
1174
|
}
|
|
@@ -1210,7 +1210,7 @@ var AggregationsHelper = class extends AbstractHelper {
|
|
|
1210
1210
|
return this.getOrCreateQuery(options, void 0);
|
|
1211
1211
|
}
|
|
1212
1212
|
getQueryWithObjectSet(options) {
|
|
1213
|
-
const serializedObjectSet = JSON.stringify(
|
|
1213
|
+
const serializedObjectSet = JSON.stringify(chunkR7OP6A6S_cjs.getWireObjectSet(options.objectSet));
|
|
1214
1214
|
return this.getOrCreateQuery(options, serializedObjectSet);
|
|
1215
1215
|
}
|
|
1216
1216
|
getOrCreateQuery(options, serializedObjectSet) {
|
|
@@ -1533,7 +1533,7 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1533
1533
|
path.push("$:map_end");
|
|
1534
1534
|
return arr;
|
|
1535
1535
|
}
|
|
1536
|
-
if (
|
|
1536
|
+
if (chunkWLFG2VXM_cjs.isObjectSpecifiersObject(value)) {
|
|
1537
1537
|
const objectType = value.$objectType ?? value.$apiName;
|
|
1538
1538
|
path.push("$:osdk", objectType, value.$primaryKey);
|
|
1539
1539
|
return {
|
|
@@ -1541,8 +1541,8 @@ var FunctionParamsCanonicalizer = class {
|
|
|
1541
1541
|
$primaryKey: value.$primaryKey
|
|
1542
1542
|
};
|
|
1543
1543
|
}
|
|
1544
|
-
if (
|
|
1545
|
-
const wire =
|
|
1544
|
+
if (chunkR7OP6A6S_cjs.isObjectSet(value)) {
|
|
1545
|
+
const wire = chunkR7OP6A6S_cjs.getWireObjectSet(value);
|
|
1546
1546
|
path.push("$:objectset", wire);
|
|
1547
1547
|
return wire;
|
|
1548
1548
|
}
|
|
@@ -1602,7 +1602,7 @@ var FunctionQuery = class extends Query {
|
|
|
1602
1602
|
#dependsOnObjects;
|
|
1603
1603
|
#queryDef;
|
|
1604
1604
|
constructor(store, subject, queryDef, params, cacheKey, opts, objectSetTypesPromise) {
|
|
1605
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
1605
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkR7OP6A6S_cjs.additionalContext].logger?.child({}, {
|
|
1606
1606
|
msgPrefix: `FunctionQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
1607
1607
|
}) : void 0);
|
|
1608
1608
|
this.#apiName = queryDef.apiName;
|
|
@@ -1659,7 +1659,7 @@ var FunctionQuery = class extends Query {
|
|
|
1659
1659
|
}).debug("calling _fetchAndStore");
|
|
1660
1660
|
}
|
|
1661
1661
|
try {
|
|
1662
|
-
const result = await
|
|
1662
|
+
const result = await chunkWLFG2VXM_cjs.applyQuery(this.store.client[chunkR7OP6A6S_cjs.additionalContext], this.#queryDef, this.#params);
|
|
1663
1663
|
const executedAt = Date.now();
|
|
1664
1664
|
this.store.batch({}, (batch) => {
|
|
1665
1665
|
this.writeToStore({
|
|
@@ -2823,7 +2823,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2823
2823
|
batch.changes.modified.add(this.cacheKey);
|
|
2824
2824
|
}
|
|
2825
2825
|
constructor(store, subject, cacheKey, opts) {
|
|
2826
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
2826
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkR7OP6A6S_cjs.additionalContext].logger?.child({}, {
|
|
2827
2827
|
msgPrefix: `SpecificLinkQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
2828
2828
|
}) : void 0);
|
|
2829
2829
|
[this.#sourceApiName, this.#sourceTypeKind, this.#sourceUnderlyingObjectType, this.#sourcePk, this.#linkName, this.#whereClause, this.#orderBy] = cacheKey.otherKeys;
|
|
@@ -2837,7 +2837,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2837
2837
|
*/
|
|
2838
2838
|
async fetchPageData(signal) {
|
|
2839
2839
|
const client = this.store.client;
|
|
2840
|
-
const ontologyProvider = client[
|
|
2840
|
+
const ontologyProvider = client[chunkR7OP6A6S_cjs.additionalContext].ontologyProvider;
|
|
2841
2841
|
const isInterface = this.#sourceTypeKind === "interface";
|
|
2842
2842
|
if (this.#orderBy && Object.keys(this.#orderBy).length > 0) {
|
|
2843
2843
|
let targetTypeApiName;
|
|
@@ -2948,7 +2948,7 @@ var SpecificLinkQuery = class extends BaseListQuery {
|
|
|
2948
2948
|
}
|
|
2949
2949
|
return (async () => {
|
|
2950
2950
|
try {
|
|
2951
|
-
const ontologyProvider = this.store.client[
|
|
2951
|
+
const ontologyProvider = this.store.client[chunkR7OP6A6S_cjs.additionalContext].ontologyProvider;
|
|
2952
2952
|
if (this.#sourceTypeKind === "interface") {
|
|
2953
2953
|
const objectMetadata = await ontologyProvider.getObjectDefinition(objectType);
|
|
2954
2954
|
if (this.#sourceApiName in objectMetadata.interfaceMap) {
|
|
@@ -3123,7 +3123,7 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3123
3123
|
batch.changes.registerList(this.cacheKey);
|
|
3124
3124
|
}
|
|
3125
3125
|
constructor(store, subject, apiName, cacheKey, opts) {
|
|
3126
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
3126
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkR7OP6A6S_cjs.additionalContext].logger?.child({}, {
|
|
3127
3127
|
msgPrefix: `ListQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
3128
3128
|
}) : void 0);
|
|
3129
3129
|
this.apiName = apiName;
|
|
@@ -3166,10 +3166,10 @@ var ListQuery = class extends BaseListQuery {
|
|
|
3166
3166
|
async fetchPageData(signal) {
|
|
3167
3167
|
const needsResultType = Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy) || this.#pivotInfo != null && this.#intersectWith != null && this.#intersectWith.length > 0 && !this.#pivotIntersectApplied;
|
|
3168
3168
|
if (needsResultType) {
|
|
3169
|
-
const wireObjectSet =
|
|
3169
|
+
const wireObjectSet = chunkR7OP6A6S_cjs.getWireObjectSet(this.#objectSet);
|
|
3170
3170
|
const {
|
|
3171
3171
|
resultType
|
|
3172
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
3172
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkR7OP6A6S_cjs.additionalContext], wireObjectSet);
|
|
3173
3173
|
if (Object.keys(this.#orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
3174
3174
|
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#orderBy);
|
|
3175
3175
|
}
|
|
@@ -3441,7 +3441,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3441
3441
|
type,
|
|
3442
3442
|
apiName: this.apiName
|
|
3443
3443
|
};
|
|
3444
|
-
const clientCtx = store.client[
|
|
3444
|
+
const clientCtx = store.client[chunkR7OP6A6S_cjs.additionalContext];
|
|
3445
3445
|
let objectSet;
|
|
3446
3446
|
if (rids != null) {
|
|
3447
3447
|
objectSet = clientCtx.objectSetFactory(objectTypeDef, clientCtx, {
|
|
@@ -3484,7 +3484,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3484
3484
|
}
|
|
3485
3485
|
extractRelevantObjects(changes) {
|
|
3486
3486
|
const matchesApiName = ([, object]) => {
|
|
3487
|
-
return this.apiName in object[
|
|
3487
|
+
return this.apiName in object[chunkWLFG2VXM_cjs.ObjectDefRef].interfaceMap;
|
|
3488
3488
|
};
|
|
3489
3489
|
const added = Array.from(changes.addedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
3490
3490
|
const modified = Array.from(changes.modifiedObjects).filter(matchesApiName).map(([, object]) => object.$as(this.apiName));
|
|
@@ -3503,7 +3503,7 @@ var InterfaceListQuery = class extends ListQuery {
|
|
|
3503
3503
|
}
|
|
3504
3504
|
};
|
|
3505
3505
|
function createSourceSetForPivot(store, pivotInfo, rids) {
|
|
3506
|
-
const clientCtx = store.client[
|
|
3506
|
+
const clientCtx = store.client[chunkR7OP6A6S_cjs.additionalContext];
|
|
3507
3507
|
if (rids != null) {
|
|
3508
3508
|
return clientCtx.objectSetFactory({
|
|
3509
3509
|
type: "object",
|
|
@@ -3558,7 +3558,7 @@ var ObjectListQuery = class extends ListQuery {
|
|
|
3558
3558
|
const intersectWith = this.cacheKey.otherKeys[INTERSECT_IDX2];
|
|
3559
3559
|
const pivotInfo = this.cacheKey.otherKeys[PIVOT_IDX];
|
|
3560
3560
|
const rids = this.cacheKey.otherKeys[RIDS_IDX];
|
|
3561
|
-
const clientCtx = store.client[
|
|
3561
|
+
const clientCtx = store.client[chunkR7OP6A6S_cjs.additionalContext];
|
|
3562
3562
|
const typeDefinition = {
|
|
3563
3563
|
type: "object",
|
|
3564
3564
|
apiName: this.apiName
|
|
@@ -3703,8 +3703,8 @@ function stripRdpFields(value, rdpFields) {
|
|
|
3703
3703
|
if (rdpFields.size === 0) {
|
|
3704
3704
|
return value;
|
|
3705
3705
|
}
|
|
3706
|
-
const underlying = value[
|
|
3707
|
-
const objectDef = value[
|
|
3706
|
+
const underlying = value[chunkWLFG2VXM_cjs.UnderlyingOsdkObject];
|
|
3707
|
+
const objectDef = value[chunkWLFG2VXM_cjs.ObjectDefRef];
|
|
3708
3708
|
const newProps = {
|
|
3709
3709
|
$apiName: underlying.$apiName,
|
|
3710
3710
|
$objectType: underlying.$objectType,
|
|
@@ -3717,7 +3717,7 @@ function stripRdpFields(value, rdpFields) {
|
|
|
3717
3717
|
newProps[key] = underlying[key];
|
|
3718
3718
|
}
|
|
3719
3719
|
}
|
|
3720
|
-
return
|
|
3720
|
+
return chunkWLFG2VXM_cjs.createOsdkObject(value[chunkWLFG2VXM_cjs.ClientRef], objectDef, newProps);
|
|
3721
3721
|
}
|
|
3722
3722
|
function isSuperset(superset, subset) {
|
|
3723
3723
|
for (const field of subset) {
|
|
@@ -3728,8 +3728,8 @@ function isSuperset(superset, subset) {
|
|
|
3728
3728
|
return true;
|
|
3729
3729
|
}
|
|
3730
3730
|
function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
3731
|
-
const underlying = value[
|
|
3732
|
-
const objectDef = value[
|
|
3731
|
+
const underlying = value[chunkWLFG2VXM_cjs.UnderlyingOsdkObject];
|
|
3732
|
+
const objectDef = value[chunkWLFG2VXM_cjs.ObjectDefRef];
|
|
3733
3733
|
const newProps = {
|
|
3734
3734
|
$apiName: underlying.$apiName,
|
|
3735
3735
|
$objectType: underlying.$objectType,
|
|
@@ -3745,12 +3745,12 @@ function filterToRdpFields(value, rdpFieldsToKeep, sourceRdpFields) {
|
|
|
3745
3745
|
}
|
|
3746
3746
|
}
|
|
3747
3747
|
}
|
|
3748
|
-
return
|
|
3748
|
+
return chunkWLFG2VXM_cjs.createOsdkObject(value[chunkWLFG2VXM_cjs.ClientRef], objectDef, newProps);
|
|
3749
3749
|
}
|
|
3750
3750
|
function mergeSelectFields(sourceValue, selectFields, existingValue) {
|
|
3751
|
-
const sourceUnderlying = sourceValue[
|
|
3752
|
-
const existingUnderlying = existingValue[
|
|
3753
|
-
const objectDef = sourceValue[
|
|
3751
|
+
const sourceUnderlying = sourceValue[chunkWLFG2VXM_cjs.UnderlyingOsdkObject];
|
|
3752
|
+
const existingUnderlying = existingValue[chunkWLFG2VXM_cjs.UnderlyingOsdkObject];
|
|
3753
|
+
const objectDef = sourceValue[chunkWLFG2VXM_cjs.ObjectDefRef];
|
|
3754
3754
|
const newProps = {
|
|
3755
3755
|
$apiName: sourceUnderlying.$apiName,
|
|
3756
3756
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -3768,7 +3768,7 @@ function mergeSelectFields(sourceValue, selectFields, existingValue) {
|
|
|
3768
3768
|
newProps[key] = sourceUnderlying[key];
|
|
3769
3769
|
}
|
|
3770
3770
|
}
|
|
3771
|
-
return
|
|
3771
|
+
return chunkWLFG2VXM_cjs.createOsdkObject(sourceValue[chunkWLFG2VXM_cjs.ClientRef], objectDef, newProps);
|
|
3772
3772
|
}
|
|
3773
3773
|
function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, targetCurrentValue) {
|
|
3774
3774
|
if (targetRdpFields.size === 0) {
|
|
@@ -3780,8 +3780,8 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
3780
3780
|
}
|
|
3781
3781
|
return filterToRdpFields(sourceValue, targetRdpFields, sourceRdpFields);
|
|
3782
3782
|
}
|
|
3783
|
-
const sourceUnderlying = sourceValue[
|
|
3784
|
-
const objectDef = sourceValue[
|
|
3783
|
+
const sourceUnderlying = sourceValue[chunkWLFG2VXM_cjs.UnderlyingOsdkObject];
|
|
3784
|
+
const objectDef = sourceValue[chunkWLFG2VXM_cjs.ObjectDefRef];
|
|
3785
3785
|
const newProps = {
|
|
3786
3786
|
$apiName: sourceUnderlying.$apiName,
|
|
3787
3787
|
$objectType: sourceUnderlying.$objectType,
|
|
@@ -3795,7 +3795,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
3795
3795
|
}
|
|
3796
3796
|
}
|
|
3797
3797
|
if (targetCurrentValue) {
|
|
3798
|
-
const targetUnderlying = targetCurrentValue[
|
|
3798
|
+
const targetUnderlying = targetCurrentValue[chunkWLFG2VXM_cjs.UnderlyingOsdkObject];
|
|
3799
3799
|
for (const field of targetRdpFields) {
|
|
3800
3800
|
if (field in targetUnderlying) {
|
|
3801
3801
|
if (!sourceRdpFields.has(field) || newProps[field] === void 0) {
|
|
@@ -3804,7 +3804,7 @@ function mergeObjectFields(sourceValue, sourceRdpFields, targetRdpFields, target
|
|
|
3804
3804
|
}
|
|
3805
3805
|
}
|
|
3806
3806
|
}
|
|
3807
|
-
return
|
|
3807
|
+
return chunkWLFG2VXM_cjs.createOsdkObject(sourceValue[chunkWLFG2VXM_cjs.ClientRef], objectDef, newProps);
|
|
3808
3808
|
}
|
|
3809
3809
|
|
|
3810
3810
|
// src/observable/internal/object/ObjectCacheKeyRegistry.ts
|
|
@@ -3959,7 +3959,7 @@ var BulkObjectLoader = class {
|
|
|
3959
3959
|
#maxEntries;
|
|
3960
3960
|
constructor(client, maxWait = 25, maxEntries = 100) {
|
|
3961
3961
|
this.#client = client;
|
|
3962
|
-
this.#logger = client[
|
|
3962
|
+
this.#logger = client[chunkR7OP6A6S_cjs.additionalContext].logger;
|
|
3963
3963
|
this.#maxWait = maxWait;
|
|
3964
3964
|
this.#maxEntries = maxEntries;
|
|
3965
3965
|
}
|
|
@@ -4103,7 +4103,7 @@ var ObjectQuery = class extends Query {
|
|
|
4103
4103
|
#select;
|
|
4104
4104
|
#implementingTypes;
|
|
4105
4105
|
constructor(store, subject, type, pk, cacheKey, opts, defType = "object", select) {
|
|
4106
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4106
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkR7OP6A6S_cjs.additionalContext].logger?.child({}, {
|
|
4107
4107
|
msgPrefix: `ObjectQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4108
4108
|
}) : void 0);
|
|
4109
4109
|
this.#apiName = type;
|
|
@@ -4202,7 +4202,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4202
4202
|
pk,
|
|
4203
4203
|
select
|
|
4204
4204
|
} = options;
|
|
4205
|
-
const defType =
|
|
4205
|
+
const defType = chunkWLFG2VXM_cjs.getDefType(options.apiName);
|
|
4206
4206
|
const objectCacheKey = this.cacheKeys.get("object", apiName, pk, rdpConfig ?? void 0);
|
|
4207
4207
|
return this.store.queries.get(objectCacheKey, () => new ObjectQuery(this.store, this.store.subjects.get(objectCacheKey), apiName, pk, objectCacheKey, {
|
|
4208
4208
|
dedupeInterval: 0
|
|
@@ -4240,7 +4240,7 @@ var ObjectsHelper = class extends AbstractHelper {
|
|
|
4240
4240
|
if (valueToWrite !== tombstone && existing?.value && this.isObjectHolder(existing.value)) {
|
|
4241
4241
|
const expectedRdpFields = this.store.objectCacheKeyRegistry.getRdpFieldSet(sourceCacheKey);
|
|
4242
4242
|
if (expectedRdpFields.size > 0) {
|
|
4243
|
-
const underlying = valueToWrite[
|
|
4243
|
+
const underlying = valueToWrite[chunkWLFG2VXM_cjs.UnderlyingOsdkObject];
|
|
4244
4244
|
const actualRdpFields = /* @__PURE__ */ new Set();
|
|
4245
4245
|
for (const field of expectedRdpFields) {
|
|
4246
4246
|
if (underlying && field in underlying) {
|
|
@@ -4308,7 +4308,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
4308
4308
|
#composedObjectSet;
|
|
4309
4309
|
#objectTypes;
|
|
4310
4310
|
constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
|
|
4311
|
-
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[
|
|
4311
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[chunkR7OP6A6S_cjs.additionalContext].logger?.child({}, {
|
|
4312
4312
|
msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map((x) => JSON.stringify(x)).join(", ")}>`
|
|
4313
4313
|
}) : void 0);
|
|
4314
4314
|
this.#baseObjectSetWire = baseObjectSetWire;
|
|
@@ -4362,7 +4362,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
4362
4362
|
}
|
|
4363
4363
|
if (opts.union) {
|
|
4364
4364
|
for (const os of opts.union) {
|
|
4365
|
-
const wire =
|
|
4365
|
+
const wire = chunkR7OP6A6S_cjs.getWireObjectSet(os);
|
|
4366
4366
|
if (wire.type) {
|
|
4367
4367
|
types.add(wire.type);
|
|
4368
4368
|
}
|
|
@@ -4370,7 +4370,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
4370
4370
|
}
|
|
4371
4371
|
if (opts.intersect) {
|
|
4372
4372
|
for (const os of opts.intersect) {
|
|
4373
|
-
const wire =
|
|
4373
|
+
const wire = chunkR7OP6A6S_cjs.getWireObjectSet(os);
|
|
4374
4374
|
if (wire.type) {
|
|
4375
4375
|
types.add(wire.type);
|
|
4376
4376
|
}
|
|
@@ -4378,7 +4378,7 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
4378
4378
|
}
|
|
4379
4379
|
if (opts.subtract) {
|
|
4380
4380
|
for (const os of opts.subtract) {
|
|
4381
|
-
const wire =
|
|
4381
|
+
const wire = chunkR7OP6A6S_cjs.getWireObjectSet(os);
|
|
4382
4382
|
if (wire.type) {
|
|
4383
4383
|
types.add(wire.type);
|
|
4384
4384
|
}
|
|
@@ -4398,10 +4398,10 @@ var ObjectSetQuery = class extends BaseListQuery {
|
|
|
4398
4398
|
*/
|
|
4399
4399
|
async fetchPageData(signal) {
|
|
4400
4400
|
if (this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 && !(this.sortingStrategy instanceof OrderBySortingStrategy)) {
|
|
4401
|
-
const wireObjectSet =
|
|
4401
|
+
const wireObjectSet = chunkR7OP6A6S_cjs.getWireObjectSet(this.#composedObjectSet);
|
|
4402
4402
|
const {
|
|
4403
4403
|
resultType
|
|
4404
|
-
} = await getObjectTypesThatInvalidate(this.store.client[
|
|
4404
|
+
} = await getObjectTypesThatInvalidate(this.store.client[chunkR7OP6A6S_cjs.additionalContext], wireObjectSet);
|
|
4405
4405
|
this.sortingStrategy = new OrderBySortingStrategy(resultType.apiName, this.#operations.orderBy);
|
|
4406
4406
|
}
|
|
4407
4407
|
const resp = await this.#composedObjectSet.fetchPage({
|
|
@@ -4475,7 +4475,7 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
4475
4475
|
const {
|
|
4476
4476
|
baseObjectSet
|
|
4477
4477
|
} = options;
|
|
4478
|
-
const baseObjectSetWire = JSON.stringify(
|
|
4478
|
+
const baseObjectSetWire = JSON.stringify(chunkR7OP6A6S_cjs.getWireObjectSet(baseObjectSet));
|
|
4479
4479
|
const operations = this.buildCanonicalizedOperations(options);
|
|
4480
4480
|
const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
|
|
4481
4481
|
return this.store.queries.get(objectSetCacheKey, () => {
|
|
@@ -4491,13 +4491,13 @@ var ObjectSetHelper = class extends AbstractHelper {
|
|
|
4491
4491
|
operations.withProperties = this.rdpCanonicalizer.canonicalize(options.withProperties);
|
|
4492
4492
|
}
|
|
4493
4493
|
if (options.union && options.union.length > 0) {
|
|
4494
|
-
operations.union = options.union.map((os) => JSON.stringify(
|
|
4494
|
+
operations.union = options.union.map((os) => JSON.stringify(chunkR7OP6A6S_cjs.getWireObjectSet(os)));
|
|
4495
4495
|
}
|
|
4496
4496
|
if (options.intersect && options.intersect.length > 0) {
|
|
4497
|
-
operations.intersect = options.intersect.map((os) => JSON.stringify(
|
|
4497
|
+
operations.intersect = options.intersect.map((os) => JSON.stringify(chunkR7OP6A6S_cjs.getWireObjectSet(os)));
|
|
4498
4498
|
}
|
|
4499
4499
|
if (options.subtract && options.subtract.length > 0) {
|
|
4500
|
-
operations.subtract = options.subtract.map((os) => JSON.stringify(
|
|
4500
|
+
operations.subtract = options.subtract.map((os) => JSON.stringify(chunkR7OP6A6S_cjs.getWireObjectSet(os)));
|
|
4501
4501
|
}
|
|
4502
4502
|
if (options.pivotTo) {
|
|
4503
4503
|
operations.pivotTo = options.pivotTo;
|
|
@@ -4569,7 +4569,7 @@ var RdpCanonicalizer = class extends CachingCanonicalizer {
|
|
|
4569
4569
|
apiName: "__rdp_canonicalizer_holder__"
|
|
4570
4570
|
};
|
|
4571
4571
|
for (const [key, rdpFunction] of Object.entries(rdp)) {
|
|
4572
|
-
const builder =
|
|
4572
|
+
const builder = chunkR7OP6A6S_cjs.createWithPropertiesObjectSet(
|
|
4573
4573
|
objectTypeHolder,
|
|
4574
4574
|
{
|
|
4575
4575
|
type: "methodInput"
|
|
@@ -4663,7 +4663,7 @@ var Store = class {
|
|
|
4663
4663
|
subjects = this.layers.subjects;
|
|
4664
4664
|
// these are hopefully temporary
|
|
4665
4665
|
constructor(client) {
|
|
4666
|
-
this.logger = client[
|
|
4666
|
+
this.logger = client[chunkR7OP6A6S_cjs.additionalContext].logger?.child({}, {
|
|
4667
4667
|
msgPrefix: "Store"
|
|
4668
4668
|
});
|
|
4669
4669
|
this.client = client;
|
|
@@ -4941,10 +4941,10 @@ var Store = class {
|
|
|
4941
4941
|
|
|
4942
4942
|
// src/observable/ObservableClient.ts
|
|
4943
4943
|
function createObservableClient(client) {
|
|
4944
|
-
const tweakedClient =
|
|
4945
|
-
...client[
|
|
4946
|
-
fetch: shared_net_fetch.createFetchHeaderMutator(client[
|
|
4947
|
-
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"),
|
|
4944
|
+
const tweakedClient = chunkWLFG2VXM_cjs.createClientFromContext({
|
|
4945
|
+
...client[chunkR7OP6A6S_cjs.additionalContext],
|
|
4946
|
+
fetch: shared_net_fetch.createFetchHeaderMutator(client[chunkR7OP6A6S_cjs.additionalContext].fetch, (headers) => {
|
|
4947
|
+
headers.set("Fetch-User-Agent", [headers.get("Fetch-User-Agent"), chunkWLFG2VXM_cjs.OBSERVABLE_USER_AGENT].filter((x) => x && x?.length > 0).join(" "));
|
|
4948
4948
|
return headers;
|
|
4949
4949
|
})
|
|
4950
4950
|
});
|
|
@@ -4987,19 +4987,19 @@ function getOsdkConfig(ontologyRid) {
|
|
|
4987
4987
|
|
|
4988
4988
|
Object.defineProperty(exports, "createClientWithTransaction", {
|
|
4989
4989
|
enumerable: true,
|
|
4990
|
-
get: function () { return
|
|
4990
|
+
get: function () { return chunkWLFG2VXM_cjs.createClientWithTransaction; }
|
|
4991
4991
|
});
|
|
4992
4992
|
Object.defineProperty(exports, "augment", {
|
|
4993
4993
|
enumerable: true,
|
|
4994
|
-
get: function () { return
|
|
4994
|
+
get: function () { return chunkR7OP6A6S_cjs.augment; }
|
|
4995
4995
|
});
|
|
4996
4996
|
Object.defineProperty(exports, "getWireObjectSet", {
|
|
4997
4997
|
enumerable: true,
|
|
4998
|
-
get: function () { return
|
|
4998
|
+
get: function () { return chunkR7OP6A6S_cjs.getWireObjectSet; }
|
|
4999
4999
|
});
|
|
5000
5000
|
Object.defineProperty(exports, "isObjectSet", {
|
|
5001
5001
|
enumerable: true,
|
|
5002
|
-
get: function () { return
|
|
5002
|
+
get: function () { return chunkR7OP6A6S_cjs.isObjectSet; }
|
|
5003
5003
|
});
|
|
5004
5004
|
exports.computeObjectSetCacheKey = computeObjectSetCacheKey;
|
|
5005
5005
|
exports.createObservableClient = createObservableClient;
|
|
@@ -14,23 +14,38 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import { splitAggregationKey } from "./modernToLegacyAggregationClause.js";
|
|
18
|
+
|
|
18
19
|
/** @internal */
|
|
19
|
-
export function legacyToModernSingleAggregationResult(entry) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
export function legacyToModernSingleAggregationResult(entry, select) {
|
|
21
|
+
const result = {};
|
|
22
|
+
|
|
23
|
+
// Seed the result with undefined for every selected metric so that
|
|
24
|
+
// properties are always present, even when the server returns no metrics
|
|
25
|
+
// (e.g. aggregating over 0 objects).
|
|
26
|
+
for (const selectKey of Object.keys(select)) {
|
|
27
|
+
if (selectKey === "$count") {
|
|
28
|
+
continue;
|
|
24
29
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
const {
|
|
31
|
+
property,
|
|
32
|
+
metric
|
|
33
|
+
} = splitAggregationKey(selectKey);
|
|
34
|
+
(result[property] ??= {})[metric] = undefined;
|
|
35
|
+
}
|
|
36
|
+
for (const {
|
|
37
|
+
name,
|
|
38
|
+
value
|
|
39
|
+
} of entry.metrics) {
|
|
40
|
+
if (name === "count") {
|
|
41
|
+
continue;
|
|
30
42
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
const [property, metricType] = name.split(".");
|
|
44
|
+
if (result[property]) {
|
|
45
|
+
// guard against an unknown metric name
|
|
46
|
+
result[property][metricType] = value;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
35
50
|
}
|
|
36
51
|
//# sourceMappingURL=legacyToModernSingleAggregationResult.js.map
|