@osdk/client 2.5.0-beta.10 → 2.5.0-beta.11
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/ObjectSetPayload.js +2 -0
- package/build/browser/observable/ObjectSetPayload.js.map +1 -0
- package/build/browser/observable/ObservableClient.js.map +1 -1
- package/build/browser/observable/computeObjectSetCacheKey.js +64 -0
- package/build/browser/observable/computeObjectSetCacheKey.js.map +1 -0
- package/build/browser/observable/internal/Changes.js +3 -0
- package/build/browser/observable/internal/Changes.js.map +1 -1
- package/build/browser/observable/internal/KnownCacheKey.js.map +1 -1
- package/build/browser/observable/internal/ObservableClientImpl.js +8 -0
- package/build/browser/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/browser/observable/internal/Query.js +18 -1
- package/build/browser/observable/internal/Query.js.map +1 -1
- package/build/browser/observable/internal/Store.js +2 -0
- package/build/browser/observable/internal/Store.js.map +1 -1
- package/build/browser/observable/internal/objectset/ObjectSetCacheKey.js +2 -0
- package/build/browser/observable/internal/objectset/ObjectSetCacheKey.js.map +1 -0
- package/build/browser/observable/internal/objectset/ObjectSetHelper.js +69 -0
- package/build/browser/observable/internal/objectset/ObjectSetHelper.js.map +1 -0
- package/build/browser/observable/internal/objectset/ObjectSetQuery.js +151 -0
- package/build/browser/observable/internal/objectset/ObjectSetQuery.js.map +1 -0
- package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js +2 -0
- package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -0
- package/build/browser/public/unstable-do-not-use.js +1 -0
- package/build/browser/public/unstable-do-not-use.js.map +1 -1
- package/build/browser/util/UserAgent.js +2 -2
- package/build/cjs/{chunk-YADG7KA6.cjs → chunk-3LPXQHP5.cjs} +4 -4
- package/build/cjs/{chunk-YADG7KA6.cjs.map → chunk-3LPXQHP5.cjs.map} +1 -1
- package/build/cjs/index.cjs +6 -6
- package/build/cjs/public/unstable-do-not-use.cjs +389 -143
- package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
- package/build/cjs/public/unstable-do-not-use.d.cts +57 -6
- package/build/esm/observable/ObjectSetPayload.js +2 -0
- package/build/esm/observable/ObjectSetPayload.js.map +1 -0
- package/build/esm/observable/ObservableClient.js.map +1 -1
- package/build/esm/observable/computeObjectSetCacheKey.js +64 -0
- package/build/esm/observable/computeObjectSetCacheKey.js.map +1 -0
- package/build/esm/observable/internal/Changes.js +3 -0
- package/build/esm/observable/internal/Changes.js.map +1 -1
- package/build/esm/observable/internal/KnownCacheKey.js.map +1 -1
- package/build/esm/observable/internal/ObservableClientImpl.js +8 -0
- package/build/esm/observable/internal/ObservableClientImpl.js.map +1 -1
- package/build/esm/observable/internal/Query.js +18 -1
- package/build/esm/observable/internal/Query.js.map +1 -1
- package/build/esm/observable/internal/Store.js +2 -0
- package/build/esm/observable/internal/Store.js.map +1 -1
- package/build/esm/observable/internal/objectset/ObjectSetCacheKey.js +2 -0
- package/build/esm/observable/internal/objectset/ObjectSetCacheKey.js.map +1 -0
- package/build/esm/observable/internal/objectset/ObjectSetHelper.js +69 -0
- package/build/esm/observable/internal/objectset/ObjectSetHelper.js.map +1 -0
- package/build/esm/observable/internal/objectset/ObjectSetQuery.js +151 -0
- package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -0
- package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js +2 -0
- package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -0
- package/build/esm/public/unstable-do-not-use.js +1 -0
- package/build/esm/public/unstable-do-not-use.js.map +1 -1
- package/build/esm/util/UserAgent.js +2 -2
- package/build/types/observable/ObjectSetPayload.d.ts +5 -0
- package/build/types/observable/ObjectSetPayload.d.ts.map +1 -0
- package/build/types/observable/ObservableClient.d.ts +33 -1
- package/build/types/observable/ObservableClient.d.ts.map +1 -1
- package/build/types/observable/computeObjectSetCacheKey.d.ts +16 -0
- package/build/types/observable/computeObjectSetCacheKey.d.ts.map +1 -0
- package/build/types/observable/internal/Changes.d.ts +5 -3
- package/build/types/observable/internal/Changes.d.ts.map +1 -1
- package/build/types/observable/internal/KnownCacheKey.d.ts +2 -1
- package/build/types/observable/internal/KnownCacheKey.d.ts.map +1 -1
- package/build/types/observable/internal/Query.d.ts.map +1 -1
- package/build/types/observable/internal/Store.d.ts +2 -0
- package/build/types/observable/internal/Store.d.ts.map +1 -1
- package/build/types/observable/internal/objectset/ObjectSetCacheKey.d.ts +16 -0
- package/build/types/observable/internal/objectset/ObjectSetCacheKey.d.ts.map +1 -0
- package/build/types/observable/internal/objectset/ObjectSetHelper.d.ts +19 -0
- package/build/types/observable/internal/objectset/ObjectSetHelper.d.ts.map +1 -0
- package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts +34 -0
- package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -0
- package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts +18 -0
- package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts.map +1 -0
- package/build/types/public/unstable-do-not-use.d.ts +2 -1
- package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { getWireObjectSet } from "../../../objectSet/createObjectSet.js";
|
|
18
|
+
import { AbstractHelper } from "../AbstractHelper.js";
|
|
19
|
+
import { ObjectSetQuery } from "./ObjectSetQuery.js";
|
|
20
|
+
export class ObjectSetHelper extends AbstractHelper {
|
|
21
|
+
constructor(store, cacheKeys, whereCanonicalizer, orderByCanonicalizer) {
|
|
22
|
+
super(store, cacheKeys);
|
|
23
|
+
this.whereCanonicalizer = whereCanonicalizer;
|
|
24
|
+
this.orderByCanonicalizer = orderByCanonicalizer;
|
|
25
|
+
}
|
|
26
|
+
observe(options, subFn) {
|
|
27
|
+
return super.observe(options, subFn);
|
|
28
|
+
}
|
|
29
|
+
getQuery(options) {
|
|
30
|
+
const {
|
|
31
|
+
baseObjectSet
|
|
32
|
+
} = options;
|
|
33
|
+
const baseObjectSetWire = JSON.stringify(getWireObjectSet(baseObjectSet));
|
|
34
|
+
const operations = this.buildCanonicalizedOperations(options);
|
|
35
|
+
const objectSetCacheKey = this.cacheKeys.get("objectSet", baseObjectSetWire, operations);
|
|
36
|
+
return this.store.queries.get(objectSetCacheKey, () => {
|
|
37
|
+
return new ObjectSetQuery(this.store, this.store.subjects.get(objectSetCacheKey), baseObjectSetWire, operations, objectSetCacheKey, options);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
buildCanonicalizedOperations(options) {
|
|
41
|
+
const operations = {};
|
|
42
|
+
if (options.where) {
|
|
43
|
+
operations.where = this.whereCanonicalizer.canonicalize(options.where);
|
|
44
|
+
}
|
|
45
|
+
if (options.withProperties) {
|
|
46
|
+
operations.withProperties = Object.keys(options.withProperties).sort();
|
|
47
|
+
}
|
|
48
|
+
if (options.union && options.union.length > 0) {
|
|
49
|
+
operations.union = options.union.map(os => JSON.stringify(getWireObjectSet(os)));
|
|
50
|
+
}
|
|
51
|
+
if (options.intersect && options.intersect.length > 0) {
|
|
52
|
+
operations.intersect = options.intersect.map(os => JSON.stringify(getWireObjectSet(os)));
|
|
53
|
+
}
|
|
54
|
+
if (options.subtract && options.subtract.length > 0) {
|
|
55
|
+
operations.subtract = options.subtract.map(os => JSON.stringify(getWireObjectSet(os)));
|
|
56
|
+
}
|
|
57
|
+
if (options.pivotTo) {
|
|
58
|
+
operations.pivotTo = options.pivotTo;
|
|
59
|
+
}
|
|
60
|
+
if (options.orderBy) {
|
|
61
|
+
operations.orderBy = this.orderByCanonicalizer.canonicalize(options.orderBy);
|
|
62
|
+
}
|
|
63
|
+
if (options.pageSize) {
|
|
64
|
+
operations.pageSize = options.pageSize;
|
|
65
|
+
}
|
|
66
|
+
return operations;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=ObjectSetHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectSetHelper.js","names":["getWireObjectSet","AbstractHelper","ObjectSetQuery","ObjectSetHelper","constructor","store","cacheKeys","whereCanonicalizer","orderByCanonicalizer","observe","options","subFn","getQuery","baseObjectSet","baseObjectSetWire","JSON","stringify","operations","buildCanonicalizedOperations","objectSetCacheKey","get","queries","subjects","where","canonicalize","withProperties","Object","keys","sort","union","length","map","os","intersect","subtract","pivotTo","orderBy","pageSize"],"sources":["ObjectSetHelper.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getWireObjectSet } from \"../../../objectSet/createObjectSet.js\";\nimport type { ObjectSetPayload } from \"../../ObjectSetPayload.js\";\nimport type { Observer } from \"../../ObservableClient/common.js\";\nimport { AbstractHelper } from \"../AbstractHelper.js\";\nimport type { CacheKeys } from \"../CacheKeys.js\";\nimport type { Canonical } from \"../Canonical.js\";\nimport type { KnownCacheKey } from \"../KnownCacheKey.js\";\nimport type { OrderByCanonicalizer } from \"../OrderByCanonicalizer.js\";\nimport type { QuerySubscription } from \"../QuerySubscription.js\";\nimport type { Store } from \"../Store.js\";\nimport type { WhereClauseCanonicalizer } from \"../WhereClauseCanonicalizer.js\";\nimport type {\n ObjectSetCacheKey,\n ObjectSetOperations,\n} from \"./ObjectSetCacheKey.js\";\nimport { ObjectSetQuery } from \"./ObjectSetQuery.js\";\nimport type { ObjectSetQueryOptions } from \"./ObjectSetQueryOptions.js\";\n\nexport class ObjectSetHelper extends AbstractHelper<\n ObjectSetQuery,\n ObjectSetQueryOptions\n> {\n whereCanonicalizer: WhereClauseCanonicalizer;\n orderByCanonicalizer: OrderByCanonicalizer;\n\n constructor(\n store: Store,\n cacheKeys: CacheKeys<KnownCacheKey>,\n whereCanonicalizer: WhereClauseCanonicalizer,\n orderByCanonicalizer: OrderByCanonicalizer,\n ) {\n super(store, cacheKeys);\n\n this.whereCanonicalizer = whereCanonicalizer;\n this.orderByCanonicalizer = orderByCanonicalizer;\n }\n\n observe(\n options: ObjectSetQueryOptions,\n subFn: Observer<ObjectSetPayload>,\n ): QuerySubscription<ObjectSetQuery> {\n return super.observe(options, subFn);\n }\n\n getQuery(options: ObjectSetQueryOptions): ObjectSetQuery {\n const { baseObjectSet } = options;\n const baseObjectSetWire = JSON.stringify(getWireObjectSet(baseObjectSet));\n const operations = this.buildCanonicalizedOperations(options);\n\n const objectSetCacheKey = this.cacheKeys.get<ObjectSetCacheKey>(\n \"objectSet\",\n baseObjectSetWire,\n operations,\n );\n\n return this.store.queries.get(objectSetCacheKey, () => {\n return new ObjectSetQuery(\n this.store,\n this.store.subjects.get(objectSetCacheKey),\n baseObjectSetWire,\n operations,\n objectSetCacheKey,\n options,\n );\n });\n }\n\n private buildCanonicalizedOperations(\n options: ObjectSetQueryOptions,\n ): Canonical<ObjectSetOperations> {\n const operations: ObjectSetOperations = {};\n\n if (options.where) {\n operations.where = this.whereCanonicalizer.canonicalize(options.where);\n }\n\n if (options.withProperties) {\n operations.withProperties = Object.keys(options.withProperties).sort();\n }\n\n if (options.union && options.union.length > 0) {\n operations.union = options.union.map(os =>\n JSON.stringify(getWireObjectSet(os))\n );\n }\n\n if (options.intersect && options.intersect.length > 0) {\n operations.intersect = options.intersect.map(os =>\n JSON.stringify(getWireObjectSet(os))\n );\n }\n\n if (options.subtract && options.subtract.length > 0) {\n operations.subtract = options.subtract.map(os =>\n JSON.stringify(getWireObjectSet(os))\n );\n }\n\n if (options.pivotTo) {\n operations.pivotTo = options.pivotTo as string;\n }\n\n if (options.orderBy) {\n operations.orderBy = this.orderByCanonicalizer.canonicalize(\n options.orderBy,\n );\n }\n\n if (options.pageSize) {\n operations.pageSize = options.pageSize;\n }\n\n return operations as Canonical<ObjectSetOperations>;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,gBAAgB,QAAQ,uCAAuC;AAGxE,SAASC,cAAc,QAAQ,sBAAsB;AAYrD,SAASC,cAAc,QAAQ,qBAAqB;AAGpD,OAAO,MAAMC,eAAe,SAASF,cAAc,CAGjD;EAIAG,WAAWA,CACTC,KAAY,EACZC,SAAmC,EACnCC,kBAA4C,EAC5CC,oBAA0C,EAC1C;IACA,KAAK,CAACH,KAAK,EAAEC,SAAS,CAAC;IAEvB,IAAI,CAACC,kBAAkB,GAAGA,kBAAkB;IAC5C,IAAI,CAACC,oBAAoB,GAAGA,oBAAoB;EAClD;EAEAC,OAAOA,CACLC,OAA8B,EAC9BC,KAAiC,EACE;IACnC,OAAO,KAAK,CAACF,OAAO,CAACC,OAAO,EAAEC,KAAK,CAAC;EACtC;EAEAC,QAAQA,CAACF,OAA8B,EAAkB;IACvD,MAAM;MAAEG;IAAc,CAAC,GAAGH,OAAO;IACjC,MA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C,EAAE;MACrDb,UAAU,CAACgB,SAAS,GAAGvB,OAAO,CAACuB,SAAS,CAACF,GAAG,CAACC,EAAE,IAC7CjB,IAAI,CAACC,SAAS,CAAChB,gBAAgB,CAACgC,EAAE,CAAC,CACrC,CAAC;IACH;IAEA,IAAItB,OAAO,CAACwB,QAAQ,IAAIxB,OAAO,CAACwB,QAAQ,CAACJ,MAAM,GAAG,CAAC,EAAE;MACnDb,UAAU,CAACiB,QAAQ,GAAGxB,OAAO,CAACwB,QAAQ,CAACH,GAAG,CAACC,EAAE,IAC3CjB,IAAI,CAACC,SAAS,CAAChB,gBAAgB,CAACgC,EAAE,CAAC,CACrC,CAAC;IACH;IAEA,IAAItB,OAAO,CAACyB,OAAO,EAAE;MACnBlB,UAAU,CAACkB,OAAO,GAAGzB,OAAO,CAACyB,OAAiB;IAChD;IAEA,IAAIzB,OAAO,CAAC0B,OAAO,EAAE;MACnBnB,UAAU,CAACmB,OAAO,GAAG,IAAI,CAAC5B,oBAAoB,CAACgB,YAAY,CACzDd,OAAO,CAAC0B,OACV,CAAC;IACH;IAEA,IAAI1B,OAAO,CAAC2B,QAAQ,EAAE;MACpBpB,UAAU,CAACoB,QAAQ,GAAG3B,OAAO,CAAC2B,QAAQ;IACxC;IAEA,OAAOpB,UAAU;EACnB;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { additionalContext } from "../../../Client.js";
|
|
18
|
+
import { getWireObjectSet } from "../../../objectSet/createObjectSet.js";
|
|
19
|
+
import { BaseListQuery } from "../base-list/BaseListQuery.js";
|
|
20
|
+
import { OrderBySortingStrategy } from "../sorting/SortingStrategy.js";
|
|
21
|
+
export class ObjectSetQuery extends BaseListQuery {
|
|
22
|
+
#baseObjectSetWire;
|
|
23
|
+
#operations;
|
|
24
|
+
#composedObjectSet;
|
|
25
|
+
#objectTypes;
|
|
26
|
+
constructor(store, subject, baseObjectSetWire, operations, cacheKey, opts) {
|
|
27
|
+
super(store, subject, opts, cacheKey, process.env.NODE_ENV !== "production" ? store.client[additionalContext].logger?.child({}, {
|
|
28
|
+
msgPrefix: `ObjectSetQuery<${cacheKey.otherKeys.map(x => JSON.stringify(x)).join(", ")}>`
|
|
29
|
+
}) : undefined);
|
|
30
|
+
this.#baseObjectSetWire = baseObjectSetWire;
|
|
31
|
+
this.#operations = operations;
|
|
32
|
+
this.#composedObjectSet = this.#composeObjectSet(opts);
|
|
33
|
+
this.#objectTypes = this.#extractObjectTypes(opts);
|
|
34
|
+
if (operations.orderBy && Object.keys(operations.orderBy).length > 0) {
|
|
35
|
+
const firstType = Array.from(this.#objectTypes)[0];
|
|
36
|
+
this.sortingStrategy = new OrderBySortingStrategy(firstType, operations.orderBy);
|
|
37
|
+
}
|
|
38
|
+
this.minResultsToLoad = opts.pageSize || 0;
|
|
39
|
+
}
|
|
40
|
+
#composeObjectSet(opts) {
|
|
41
|
+
let result = opts.baseObjectSet;
|
|
42
|
+
if (opts.withProperties) {
|
|
43
|
+
result = result.withProperties(opts.withProperties);
|
|
44
|
+
}
|
|
45
|
+
if (opts.where) {
|
|
46
|
+
result = result.where(opts.where);
|
|
47
|
+
}
|
|
48
|
+
if (opts.union && opts.union.length > 0) {
|
|
49
|
+
result = result.union(...opts.union);
|
|
50
|
+
}
|
|
51
|
+
if (opts.intersect && opts.intersect.length > 0) {
|
|
52
|
+
result = result.intersect(...opts.intersect);
|
|
53
|
+
}
|
|
54
|
+
if (opts.subtract && opts.subtract.length > 0) {
|
|
55
|
+
result = result.subtract(...opts.subtract);
|
|
56
|
+
}
|
|
57
|
+
if (opts.pivotTo) {
|
|
58
|
+
result = result.pivotTo(opts.pivotTo);
|
|
59
|
+
}
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
|
+
#extractObjectTypes(opts) {
|
|
63
|
+
const types = new Set();
|
|
64
|
+
const baseWire = JSON.parse(this.#baseObjectSetWire);
|
|
65
|
+
if (baseWire.type) {
|
|
66
|
+
types.add(baseWire.type);
|
|
67
|
+
}
|
|
68
|
+
if (opts.union) {
|
|
69
|
+
for (const os of opts.union) {
|
|
70
|
+
const wire = getWireObjectSet(os);
|
|
71
|
+
if (wire.type) {
|
|
72
|
+
types.add(wire.type);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (opts.intersect) {
|
|
77
|
+
for (const os of opts.intersect) {
|
|
78
|
+
const wire = getWireObjectSet(os);
|
|
79
|
+
if (wire.type) {
|
|
80
|
+
types.add(wire.type);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (opts.subtract) {
|
|
85
|
+
for (const os of opts.subtract) {
|
|
86
|
+
const wire = getWireObjectSet(os);
|
|
87
|
+
if (wire.type) {
|
|
88
|
+
types.add(wire.type);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// TODO: support pivotTo, requires resolving the target type from link metadata
|
|
94
|
+
|
|
95
|
+
return types;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Register changes to the cache specific to ObjectSetQuery
|
|
100
|
+
*/
|
|
101
|
+
registerCacheChanges(batch) {
|
|
102
|
+
batch.changes.registerObjectSet(this.cacheKey);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Implements fetchPageData from BaseListQuery template method
|
|
107
|
+
* Fetches a page of data from the composed ObjectSet
|
|
108
|
+
*/
|
|
109
|
+
async fetchPageData(signal) {
|
|
110
|
+
// Fetch the data with pagination
|
|
111
|
+
const resp = await this.#composedObjectSet.fetchPage({
|
|
112
|
+
$nextPageToken: this.nextPageToken,
|
|
113
|
+
$pageSize: this.options.pageSize,
|
|
114
|
+
// OrderBy is already applied in the composed ObjectSet
|
|
115
|
+
...(this.#operations.orderBy && Object.keys(this.#operations.orderBy).length > 0 ? {
|
|
116
|
+
$orderBy: this.#operations.orderBy
|
|
117
|
+
} : {})
|
|
118
|
+
});
|
|
119
|
+
if (signal?.aborted) {
|
|
120
|
+
throw new Error("Aborted");
|
|
121
|
+
}
|
|
122
|
+
this.nextPageToken = resp.nextPageToken;
|
|
123
|
+
return resp;
|
|
124
|
+
}
|
|
125
|
+
handleFetchError(error, _status, batch) {
|
|
126
|
+
this.logger?.error("error", error);
|
|
127
|
+
this.store.subjects.get(this.cacheKey).error(error);
|
|
128
|
+
return this.writeToStore({
|
|
129
|
+
data: []
|
|
130
|
+
}, "error", batch);
|
|
131
|
+
}
|
|
132
|
+
invalidateObjectType = async (objectType, changes) => {
|
|
133
|
+
if (this.#objectTypes.has(objectType)) {
|
|
134
|
+
changes?.modified.add(this.cacheKey);
|
|
135
|
+
return this.revalidate(true);
|
|
136
|
+
}
|
|
137
|
+
return Promise.resolve();
|
|
138
|
+
};
|
|
139
|
+
createPayload(params) {
|
|
140
|
+
return {
|
|
141
|
+
resolvedList: params.resolvedData,
|
|
142
|
+
isOptimistic: params.isOptimistic,
|
|
143
|
+
fetchMore: this.fetchMore,
|
|
144
|
+
hasMore: this.nextPageToken != null,
|
|
145
|
+
status: params.status,
|
|
146
|
+
lastUpdated: params.lastUpdated,
|
|
147
|
+
objectSet: this.#composedObjectSet
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=ObjectSetQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectSetQuery.js","names":["additionalContext","getWireObjectSet","BaseListQuery","OrderBySortingStrategy","ObjectSetQuery","baseObjectSetWire","operations","composedObjectSet","objectTypes","constructor","store","subject","cacheKey","opts","process","env","NODE_ENV","client","logger","child","msgPrefix","otherKeys","map","x","JSON","stringify","join","undefined","composeObjectSet","extractObjectTypes","orderBy","Object","keys","length","firstType","Array","from","sortingStrategy","minResultsToLoad","pageSize","#composeObjectSet","result","baseObjectSet","withProperties","where","union","intersect","subtract","pivotTo","#extractObjectTypes","types","Set","baseWire","parse","type","add","os","wire","registerCacheChanges","batch","changes","registerObjectSet","fetchPageData","signal","resp","fetchPage","$nextPageToken","nextPageToken","$pageSize","options","$orderBy","aborted","Error","handleFetchError","error","_status","subjects","get","writeToStore","data","invalidateObjectType","objectType","has","modified","revalidate","Promise","resolve","createPayload","params","resolvedList","resolvedData","isOptimistic","fetchMore","hasMore","status","lastUpdated","objectSet"],"sources":["ObjectSetQuery.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ObjectSet, Osdk, PageResult } from \"@osdk/api\";\nimport type { Observable } from \"rxjs\";\nimport { additionalContext } from \"../../../Client.js\";\nimport { getWireObjectSet } from \"../../../objectSet/createObjectSet.js\";\nimport type { ObjectSetPayload } from \"../../ObjectSetPayload.js\";\nimport type { Status } from \"../../ObservableClient/common.js\";\nimport { BaseListQuery } from \"../base-list/BaseListQuery.js\";\nimport type { BatchContext } from \"../BatchContext.js\";\nimport type { Canonical } from \"../Canonical.js\";\nimport type { Changes } from \"../Changes.js\";\nimport type { Entry } from \"../Layer.js\";\nimport { OrderBySortingStrategy } from \"../sorting/SortingStrategy.js\";\nimport type { Store } from \"../Store.js\";\nimport type { SubjectPayload } from \"../SubjectPayload.js\";\nimport type {\n ObjectSetCacheKey,\n ObjectSetOperations,\n} from \"./ObjectSetCacheKey.js\";\nimport type { ObjectSetQueryOptions } from \"./ObjectSetQueryOptions.js\";\n\nexport class ObjectSetQuery extends BaseListQuery<\n ObjectSetCacheKey,\n ObjectSetPayload,\n ObjectSetQueryOptions\n> {\n #baseObjectSetWire: string;\n #operations: Canonical<ObjectSetOperations>;\n #composedObjectSet: ObjectSet<any, any>;\n #objectTypes: Set<string>;\n\n constructor(\n store: Store,\n subject: Observable<SubjectPayload<ObjectSetCacheKey>>,\n baseObjectSetWire: string,\n operations: Canonical<ObjectSetOperations>,\n cacheKey: ObjectSetCacheKey,\n opts: ObjectSetQueryOptions,\n ) {\n super(\n store,\n subject,\n opts,\n cacheKey,\n process.env.NODE_ENV !== \"production\"\n ? (\n store.client[additionalContext].logger?.child({}, {\n msgPrefix: `ObjectSetQuery<${\n cacheKey.otherKeys.map(x => JSON.stringify(x)).join(\", \")\n }>`,\n })\n )\n : undefined,\n );\n\n this.#baseObjectSetWire = baseObjectSetWire;\n this.#operations = operations;\n this.#composedObjectSet = this.#composeObjectSet(opts);\n this.#objectTypes = this.#extractObjectTypes(opts);\n\n if (operations.orderBy && Object.keys(operations.orderBy).length > 0) {\n const firstType = Array.from(this.#objectTypes)[0];\n this.sortingStrategy = new OrderBySortingStrategy(\n firstType,\n operations.orderBy,\n );\n }\n\n this.minResultsToLoad = opts.pageSize || 0;\n }\n\n #composeObjectSet(opts: ObjectSetQueryOptions): ObjectSet<any, any> {\n let result = opts.baseObjectSet;\n\n if (opts.withProperties) {\n result = result.withProperties(opts.withProperties);\n }\n if (opts.where) {\n result = result.where(opts.where);\n }\n if (opts.union && opts.union.length > 0) {\n result = result.union(...opts.union);\n }\n if (opts.intersect && opts.intersect.length > 0) {\n result = result.intersect(...opts.intersect);\n }\n if (opts.subtract && opts.subtract.length > 0) {\n result = result.subtract(...opts.subtract);\n }\n if (opts.pivotTo) {\n result = result.pivotTo(opts.pivotTo);\n }\n\n return result;\n }\n\n #extractObjectTypes(opts: ObjectSetQueryOptions): Set<string> {\n const types = new Set<string>();\n const baseWire = JSON.parse(this.#baseObjectSetWire);\n if (baseWire.type) {\n types.add(baseWire.type);\n }\n\n if (opts.union) {\n for (const os of opts.union) {\n const wire = getWireObjectSet(os);\n if (wire.type) {\n types.add(wire.type);\n }\n }\n }\n\n if (opts.intersect) {\n for (const os of opts.intersect) {\n const wire = getWireObjectSet(os);\n if (wire.type) {\n types.add(wire.type);\n }\n }\n }\n\n if (opts.subtract) {\n for (const os of opts.subtract) {\n const wire = getWireObjectSet(os);\n if (wire.type) {\n types.add(wire.type);\n }\n }\n }\n\n // TODO: support pivotTo, requires resolving the target type from link metadata\n\n return types;\n }\n\n /**\n * Register changes to the cache specific to ObjectSetQuery\n */\n protected registerCacheChanges(batch: BatchContext): void {\n batch.changes.registerObjectSet(this.cacheKey);\n }\n\n /**\n * Implements fetchPageData from BaseListQuery template method\n * Fetches a page of data from the composed ObjectSet\n */\n protected async fetchPageData(\n signal: AbortSignal | undefined,\n ): Promise<PageResult<Osdk.Instance<any>>> {\n // Fetch the data with pagination\n const resp = await this.#composedObjectSet.fetchPage({\n $nextPageToken: this.nextPageToken,\n $pageSize: this.options.pageSize,\n // OrderBy is already applied in the composed ObjectSet\n ...(this.#operations.orderBy\n && Object.keys(this.#operations.orderBy).length > 0\n ? { $orderBy: this.#operations.orderBy }\n : {}),\n });\n\n if (signal?.aborted) {\n throw new Error(\"Aborted\");\n }\n\n this.nextPageToken = resp.nextPageToken;\n\n return resp;\n }\n\n protected handleFetchError(\n error: unknown,\n _status: Status,\n batch: BatchContext,\n ): Entry<ObjectSetCacheKey> {\n this.logger?.error(\"error\", error);\n this.store.subjects.get(this.cacheKey).error(error);\n\n return this.writeToStore({ data: [] }, \"error\", batch);\n }\n\n invalidateObjectType = async (\n objectType: string,\n changes: Changes | undefined,\n ): Promise<void> => {\n if (this.#objectTypes.has(objectType)) {\n changes?.modified.add(this.cacheKey);\n return this.revalidate(true);\n }\n return Promise.resolve();\n };\n\n protected createPayload(\n params: {\n resolvedData: any[];\n isOptimistic: boolean;\n status: Status;\n lastUpdated: number;\n },\n ): ObjectSetPayload {\n return {\n resolvedList: params.resolvedData,\n isOptimistic: params.isOptimistic,\n fetchMore: this.fetchMore,\n hasMore: this.nextPageToken != null,\n status: params.status,\n lastUpdated: params.lastUpdated,\n objectSet: this.#composedObjectSet,\n };\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,gBAAgB,QAAQ,uCAAuC;AAGxE,SAASC,aAAa,QAAQ,+BAA+B;AAK7D,SAASC,sBAAsB,QAAQ,+BAA+B;AAStE,OAAO,MAAMC,cAAc,SAASF,aAAa,CAI/C;EACA,CAACG,iBAAiB;EAClB,CAACC,UAAU;EACX,CAACC,iBAAiB;EAClB,CAACC,WAAW;EAEZC,WAAWA,CACTC,KAAY,EACZC,OAAsD,EACtDN,iBAAyB,EACzBC,UAA0C,EAC1CM,QAA2B,EAC3BC,IAA2B,EAC3B;IACA,KAAK,CACHH,KAAK,EACLC,OAAO,EACPE,IAAI,EACJD,QAAQ,EACRE,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAEjCN,KAAK,CAACO,MAAM,CAACjB,iBAAiB,CAAC,CAACkB,MAAM,EAAEC,KAAK,CAAC,CAAC,CAAC,EAAE;MAChDC,SAAS,EAAE,kBACTR,QAAQ,CAACS,SAAS,CAACC,G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Aa;IAEvC,OAAOH,IAAI;EACb;EAEUS,gBAAgBA,CACxBC,KAAc,EACdC,OAAe,EACfhB,KAAmB,EACO;IAC1B,IAAI,CAACzC,MAAM,EAAEwD,KAAK,CAAC,OAAO,EAAEA,KAAK,CAAC;IAClC,IAAI,CAAChE,KAAK,CAACkE,QAAQ,CAACC,GAAG,CAAC,IAAI,CAACjE,QAAQ,CAAC,CAAC8D,KAAK,CAACA,KAAK,CAAC;IAEnD,OAAO,IAAI,CAACI,YAAY,CAAC;MAAEC,IAAI,EAAE;IAAG,CAAC,EAAE,OAAO,EAAEpB,KAAK,CAAC;EACxD;EAEAqB,oBAAoB,GAAG,MAAAA,CACrBC,UAAkB,EAClBrB,OAA4B,KACV;IAClB,IAAI,IAAI,CAAC,CAACpD,WAAW,CAAC0E,GAAG,CAACD,UAAU,CAAC,EAAE;MACrCrB,OAAO,EAAEuB,QAAQ,CAAC5B,GAAG,CAAC,IAAI,CAAC3C,QAAQ,CAAC;MACpC,OAAO,IAAI,CAACwE,UAAU,CAAC,IAAI,CAAC;IAC9B;IACA,OAAOC,OAAO,CAACC,OAAO,CAAC,CAAC;EAC1B,CAAC;EAESC,aAAaA,CACrBC,MAKC,EACiB;IAClB,OAAO;MACLC,YAAY,EAAED,MAAM,CAACE,YAAY;MACjCC,YAAY,EAAEH,MAAM,CAACG,YAAY;MACjCC,SAAS,EAAE,IAAI,CAACA,SAAS;MACzBC,OAAO,EAAE,IAAI,CAAC1B,aAAa,IAAI,IAAI;MACnC2B,MAAM,EAAEN,MAAM,CAACM,MAAM;MACrBC,WAAW,EAAEP,MAAM,CAACO,WAAW;MAC/BC,SAAS,EAAE,IAAI,CAAC,CAACzF;IACnB,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectSetQueryOptions.js","names":[],"sources":["ObjectSetQueryOptions.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n DerivedProperty,\n LinkNames,\n ObjectSet,\n ObjectTypeDefinition,\n PropertyKeys,\n WhereClause,\n WirePropertyTypes,\n} from \"@osdk/api\";\nimport type { CommonObserveOptions } from \"../../ObservableClient/common.js\";\n\nexport interface ObserveObjectSetOptions<\n Q extends ObjectTypeDefinition,\n RDPs extends Record<\n string,\n WirePropertyTypes | undefined | Array<WirePropertyTypes>\n > = {},\n> extends CommonObserveOptions {\n where?: WhereClause<Q>;\n withProperties?: { [K in keyof RDPs]: DerivedProperty.Creator<Q, RDPs[K]> };\n union?: ObjectSet<Q>[];\n intersect?: ObjectSet<Q>[];\n subtract?: ObjectSet<Q>[];\n pivotTo?: LinkNames<Q>;\n pageSize?: number;\n orderBy?: { [K in PropertyKeys<Q>]?: \"asc\" | \"desc\" };\n}\n\nexport interface ObjectSetQueryOptions\n extends ObserveObjectSetOptions<any, any>\n{\n baseObjectSet: ObjectSet<any>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -18,6 +18,7 @@ export { augment } from "../object/fetchPage.js";
|
|
|
18
18
|
|
|
19
19
|
// THIS IS NOT THE FINAL NAME DO NOT SHIP LIKE THIS
|
|
20
20
|
|
|
21
|
+
export { computeObjectSetCacheKey } from "../observable/computeObjectSetCacheKey.js";
|
|
21
22
|
export { createObservableClient } from "../observable/ObservableClient.js";
|
|
22
23
|
export { getMetaTagContent, getOsdkConfig } from "../public-utils/osdkConfig.js";
|
|
23
24
|
export { createClientWithTransaction } from "../createClient.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unstable-do-not-use.js","names":["augment","createObservableClient","getMetaTagContent","getOsdkConfig","createClientWithTransaction"],"sources":["unstable-do-not-use.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { augment } from \"../object/fetchPage.js\";\n\n// THIS IS NOT THE FINAL NAME DO NOT SHIP LIKE THIS\nexport type { ActionSignatureFromDef } from \"../actions/applyAction.js\";\nexport { createObservableClient } from \"../observable/ObservableClient.js\";\nexport type {\n ObservableClient,\n ObserveObjectArgs,\n ObserveObjectsArgs,\n Unsubscribable,\n} from \"../observable/ObservableClient.js\";\nexport type { Observer } from \"../observable/ObservableClient/common.js\";\nexport type { ObserveLinks } from \"../observable/ObservableClient/ObserveLink.js\";\nexport {\n getMetaTagContent,\n getOsdkConfig,\n} from \"../public-utils/osdkConfig.js\";\nexport type { OsdkConfig } from \"../public-utils/osdkConfig.js\";\n\nexport { createClientWithTransaction } from \"../createClient.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,wBAAwB;;AAEhD;;AAEA,SAASC,sBAAsB,QAAQ,mCAAmC;
|
|
1
|
+
{"version":3,"file":"unstable-do-not-use.js","names":["augment","computeObjectSetCacheKey","createObservableClient","getMetaTagContent","getOsdkConfig","createClientWithTransaction"],"sources":["unstable-do-not-use.ts"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { augment } from \"../object/fetchPage.js\";\n\n// THIS IS NOT THE FINAL NAME DO NOT SHIP LIKE THIS\nexport type { ActionSignatureFromDef } from \"../actions/applyAction.js\";\nexport { computeObjectSetCacheKey } from \"../observable/computeObjectSetCacheKey.js\";\nexport { createObservableClient } from \"../observable/ObservableClient.js\";\nexport type {\n ObservableClient,\n ObserveObjectArgs,\n ObserveObjectsArgs,\n ObserveObjectSetArgs,\n Unsubscribable,\n} from \"../observable/ObservableClient.js\";\nexport type { Observer } from \"../observable/ObservableClient/common.js\";\nexport type { ObserveLinks } from \"../observable/ObservableClient/ObserveLink.js\";\nexport {\n getMetaTagContent,\n getOsdkConfig,\n} from \"../public-utils/osdkConfig.js\";\nexport type { OsdkConfig } from \"../public-utils/osdkConfig.js\";\n\nexport { createClientWithTransaction } from \"../createClient.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,wBAAwB;;AAEhD;;AAEA,SAASC,wBAAwB,QAAQ,2CAA2C;AACpF,SAASC,sBAAsB,QAAQ,mCAAmC;AAU1E,SACEC,iBAAiB,EACjBC,aAAa,QACR,+BAA+B;AAGtC,SAASC,2BAA2B,QAAQ,oBAAoB","ignoreList":[]}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export const USER_AGENT = `osdk-client/${"2.5.0-beta.
|
|
18
|
-
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.5.0-beta.
|
|
17
|
+
export const USER_AGENT = `osdk-client/${"2.5.0-beta.11"}`;
|
|
18
|
+
export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.5.0-beta.11"}`;
|
|
19
19
|
//# sourceMappingURL=UserAgent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc,iBAAiB,WAAY;AAC3C,cAAc,6BAA6B,6CAA8C;AAEzF,iBAAiB,yBAAyB,sBAAsB;CAC9D,WAAW;AACZ","names":[],"sources":["../../../src/observable/ObjectSetPayload.ts"],"version":3,"file":"ObjectSetPayload.d.ts"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { ActionDefinition, ActionValidationResponse, InterfaceDefinition, ObjectTypeDefinition, Osdk, PrimaryKeyType, PropertyKeys, WhereClause } from "@osdk/api";
|
|
1
|
+
import type { ActionDefinition, ActionValidationResponse, InterfaceDefinition, ObjectSet, ObjectTypeDefinition, Osdk, PrimaryKeyType, PropertyKeys, WhereClause, WirePropertyTypes } from "@osdk/api";
|
|
2
2
|
import type { ActionSignatureFromDef } from "../actions/applyAction.js";
|
|
3
3
|
import { type Client } from "../Client.js";
|
|
4
4
|
import type { Canonical } from "./internal/Canonical.js";
|
|
5
|
+
import type { ObserveObjectSetOptions } from "./internal/objectset/ObjectSetQueryOptions.js";
|
|
5
6
|
import type { CommonObserveOptions, InvalidationMode, ObserveOptions, Observer, Status } from "./ObservableClient/common.js";
|
|
6
7
|
import type { ObserveLinks } from "./ObservableClient/ObserveLink.js";
|
|
7
8
|
import type { OptimisticBuilder } from "./OptimisticBuilder.js";
|
|
@@ -39,6 +40,18 @@ export interface ObserveObjectsArgs<T extends ObjectTypeDefinition | InterfaceDe
|
|
|
39
40
|
hasMore: boolean;
|
|
40
41
|
status: Status;
|
|
41
42
|
}
|
|
43
|
+
export interface ObserveObjectSetArgs<
|
|
44
|
+
T extends ObjectTypeDefinition | InterfaceDefinition,
|
|
45
|
+
RDPs extends Record<string, WirePropertyTypes | undefined | Array<WirePropertyTypes>> = {}
|
|
46
|
+
> {
|
|
47
|
+
resolvedList: Array<Osdk.Instance<T, "$allBaseProperties", PropertyKeys<T>, RDPs>>;
|
|
48
|
+
isOptimistic: boolean;
|
|
49
|
+
lastUpdated: number;
|
|
50
|
+
fetchMore: () => Promise<void>;
|
|
51
|
+
hasMore: boolean;
|
|
52
|
+
status: Status;
|
|
53
|
+
objectSet: ObjectSet<T, RDPs>;
|
|
54
|
+
}
|
|
42
55
|
/**
|
|
43
56
|
* User facing callback args for `observeLink`
|
|
44
57
|
*/
|
|
@@ -92,6 +105,25 @@ export interface ObservableClient extends ObserveLinks {
|
|
|
92
105
|
*/
|
|
93
106
|
observeList<T extends ObjectTypeDefinition | InterfaceDefinition>(options: ObserveListOptions<T>, subFn: Observer<ObserveObjectsArgs<T>>): Unsubscribable;
|
|
94
107
|
/**
|
|
108
|
+
* Observe an ObjectSet with automatic updates when matching objects change.
|
|
109
|
+
*
|
|
110
|
+
* @param baseObjectSet - The base ObjectSet to observe
|
|
111
|
+
* @param options - Options for transforming and observing the ObjectSet
|
|
112
|
+
* @param subFn - Observer that receives ObjectSet state updates
|
|
113
|
+
* @returns Subscription that can be unsubscribed to stop updates
|
|
114
|
+
*
|
|
115
|
+
* Supports all ObjectSet operations:
|
|
116
|
+
* - Filtering with where clauses
|
|
117
|
+
* - Derived properties with withProperties
|
|
118
|
+
* - Set operations (union, intersect, subtract)
|
|
119
|
+
* - Link traversal with pivotTo
|
|
120
|
+
* - Sorting and pagination
|
|
121
|
+
*/
|
|
122
|
+
observeObjectSet<
|
|
123
|
+
T extends ObjectTypeDefinition,
|
|
124
|
+
RDPs extends Record<string, WirePropertyTypes | undefined | Array<WirePropertyTypes>> = {}
|
|
125
|
+
>(baseObjectSet: ObjectSet<T>, options: ObserveObjectSetOptions<T, RDPs>, subFn: Observer<ObserveObjectSetArgs<T, RDPs>>): Unsubscribable;
|
|
126
|
+
/**
|
|
95
127
|
* Execute an action with optional optimistic updates.
|
|
96
128
|
*
|
|
97
129
|
* @param action - Action definition to execute
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,kBACA,0BACA,qBACA,sBACA,MACA,gBACA,cACA,
|
|
1
|
+
{"mappings":"AAgBA,cACE,kBACA,0BACA,qBACA,WACA,sBACA,MACA,gBACA,cACA,aACA,yBACK,WAAY;AAEnB,cAAc,8BAA8B,2BAA4B;AACxE,cAAiC,cAAc,cAAe;AAG9D,cAAc,iBAAiB,yBAA0B;AACzD,cAAc,+BAA+B,+CAAgD;AAG7F,cACE,sBACA,kBACA,gBACA,UACA,cACK,8BAA+B;AACtC,cAAc,oBAAoB,mCAAoC;AACtE,cAAc,yBAAyB,wBAAyB;AAEhE,yBAAiB;WACE,mBAAmB;EAClC,oBAAoBA,KAAK;CAC1B;;AAGH,iBAAiB,qBACf,UAAU,uBAAuB,6BACzB,eAAe;CACvB,SAAS,EAAE,aAAa;CACxB,IAAI,eAAe;CACnB,SAAS,aAAa;AACvB;AAED,YAAY,QAAQ,UAAU,uBAAuB,0BAClD,KAAK,aAAa,OAAM,QAAQ;AAGnC,iBAAiB,mBACf,UAAU,uBAAuB,6BACzB,sBAAsB,eAAe;CAC7C,MAAM,KAAK,GAAG,YAAY;CAC1B,QAAQ,YAAY;CACpB;CACA,UAAU,QAAQ;CAClB,mBAAmB;CACnB;CACA;AACD;AAID,iBAAiB,kBAAkB,UAAU,sBAAsB;CACjE,QAAQ,KAAK,SAAS;CACtB;CACA,QAAQ;CACR;AACD;AAGD,iBAAiB,mBACf,UAAU,uBAAuB,qBACjC;CACA,cAAc,MAAM,KAAK,SAAS;CAClC;CACA;CACA,iBAAiB;CACjB;CACA,QAAQ;AACT;AAED,iBAAiB;CACf,UAAU,uBAAuB;CACjC,aAAa,eAEX,gCAAgC,MAAM,sBACpC,CAAE;EACN;CACA,cAAc,MACZ,KAAK,SAAS,GAAG,sBAAsB,aAAa,IAAI;CAE1D;CACA;CACA,iBAAiB;CACjB;CACA,QAAQ;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observer<ObserveObjectArgs<T>>","options: ObserveListOptions<T>","subFn: Observer<ObserveObjectsArgs<T>>","baseObjectSet: ObjectSet<T>","options: ObserveObjectSetOptions<T, RDPs>","subFn: Observer<ObserveObjectSetArgs<T, RDPs>>","action: Q","args:\n | Parameters<ActionSignatureFromDef<Q>[\"applyAction\"]>[0]\n | Array<Parameters<ActionSignatureFromDef<Q>[\"applyAction\"]>[0]>","opts?: ObservableClient.ApplyActionOptions","args: Parameters<ActionSignatureFromDef<Q>[\"applyAction\"]>[0]","objects:\n | Osdk.Instance<ObjectTypeDefinition>\n | ReadonlyArray<Osdk.Instance<ObjectTypeDefinition>>","type: T | T[\"apiName\"]","where: WhereClause<T>","client: Client"],"sources":["../../../src/observable/ObservableClient.ts"],"version":3,"file":"ObservableClient.d.ts"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BaseObjectSet, ObjectSet, ObjectTypeDefinition, WirePropertyTypes } from "@osdk/api";
|
|
2
|
+
import type { ObserveObjectSetOptions } from "./internal/objectset/ObjectSetQueryOptions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Computes a stable cache key for an ObjectSet with options.
|
|
5
|
+
*
|
|
6
|
+
* Note: dedupeInterval is excluded as it doesn't affect the data, only the refresh rate.
|
|
7
|
+
*
|
|
8
|
+
* @param objectSet - The base ObjectSet
|
|
9
|
+
* @param options - Optional observation options (where, orderBy, etc.)
|
|
10
|
+
* @returns A stable string key representing the ObjectSet and options
|
|
11
|
+
*/
|
|
12
|
+
export declare function computeObjectSetCacheKey<
|
|
13
|
+
T extends ObjectTypeDefinition,
|
|
14
|
+
BaseRDPs extends Record<string, WirePropertyTypes | undefined | Array<WirePropertyTypes>> | BaseObjectSet<T> = never,
|
|
15
|
+
RDPs extends Record<string, WirePropertyTypes | undefined | Array<WirePropertyTypes>> = {}
|
|
16
|
+
>(objectSet: ObjectSet<T, BaseRDPs>, options?: ObserveObjectSetOptions<T, RDPs>): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cACE,eACA,WACA,sBACA,yBACK,WAAY;AAEnB,cAAc,+BAA+B,+CAAgD;;;;;;;;;;AAgB7F,OAAO,iBAAS;CACd,UAAU;CACV,iBACI,eAAe,gCAAgC,MAAM,sBACrD,cAAc;CAClB,aAAa,eAEX,gCAAgC,MAAM,sBACpC,CAAE;EAENA,WAAW,UAAU,GAAG,WACxBC,UAAU,wBAAwB,GAAG","names":["objectSet: ObjectSet<T, BaseRDPs>","options?: ObserveObjectSetOptions<T, RDPs>"],"sources":["../../../src/observable/computeObjectSetCacheKey.ts"],"version":3,"file":"computeObjectSetCacheKey.d.ts"}
|
|
@@ -3,17 +3,19 @@ import type { ObjectHolder } from "../../object/convertWireToOsdkObjects/ObjectH
|
|
|
3
3
|
import type { SpecificLinkCacheKey } from "./links/SpecificLinkCacheKey.js";
|
|
4
4
|
import type { ListCacheKey } from "./list/ListCacheKey.js";
|
|
5
5
|
import type { ObjectCacheKey } from "./object/ObjectCacheKey.js";
|
|
6
|
+
import type { ObjectSetCacheKey } from "./objectset/ObjectSetCacheKey.js";
|
|
6
7
|
export declare class Changes {
|
|
7
8
|
modifiedObjects: MultiMap<string, ObjectHolder>;
|
|
8
9
|
addedObjects: MultiMap<string, ObjectHolder>;
|
|
9
|
-
added: Set<ListCacheKey | ObjectCacheKey | SpecificLinkCacheKey>;
|
|
10
|
-
modified: Set<ListCacheKey | ObjectCacheKey | SpecificLinkCacheKey>;
|
|
11
|
-
deleted: Set<ListCacheKey | ObjectCacheKey | SpecificLinkCacheKey>;
|
|
10
|
+
added: Set<ListCacheKey | ObjectCacheKey | SpecificLinkCacheKey | ObjectSetCacheKey>;
|
|
11
|
+
modified: Set<ListCacheKey | ObjectCacheKey | SpecificLinkCacheKey | ObjectSetCacheKey>;
|
|
12
|
+
deleted: Set<ListCacheKey | ObjectCacheKey | SpecificLinkCacheKey | ObjectSetCacheKey>;
|
|
12
13
|
registerObject: (cacheKey: ObjectCacheKey, data: ObjectHolder, isNew: boolean) => void;
|
|
13
14
|
deleteObject: (cacheKey: ObjectCacheKey) => void;
|
|
14
15
|
registerList: (key: ListCacheKey) => void;
|
|
15
16
|
registerLink: (cacheKey: SpecificLinkCacheKey) => void;
|
|
16
17
|
deleteLink: (cacheKey: SpecificLinkCacheKey) => void;
|
|
18
|
+
registerObjectSet: (key: ObjectSetCacheKey) => void;
|
|
17
19
|
isEmpty(): boolean;
|
|
18
20
|
}
|
|
19
21
|
export declare function createChangedObjects(): Changes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,SAAS,gBAAgB,WAAY;AACrC,cAAc,oBAAoB,uDAAwD;AAG1F,cAAc,4BAA4B,iCAAkC;AAC5E,cAAc,oBAAoB,wBAAyB;AAC3D,cAAc,sBAAsB,4BAA6B;
|
|
1
|
+
{"mappings":"AAgBA,SAAS,gBAAgB,WAAY;AACrC,cAAc,oBAAoB,uDAAwD;AAG1F,cAAc,4BAA4B,iCAAkC;AAC5E,cAAc,oBAAoB,wBAAyB;AAC3D,cAAc,sBAAsB,4BAA6B;AACjE,cAAc,yBAAyB,kCAAmC;AAE1E,OAAO,cAAM,QAAQ;CACnB,iBAAiB,iBAAiB;CAClC,cAAc,iBAAiB;CAE/B,OAAO,IACL,eAAe,iBAAiB,uBAAuB;CAEzD,UAAU,IACR,eAAe,iBAAiB,uBAAuB;CAEzD,SAAS,IACP,eAAe,iBAAiB,uBAAuB;CAGzD,iBACEA,UAAU,gBACVC,MAAM,cACNC;CAMF,eAAgBF,UAAU;CAI1B,eAAgBG,KAAK;CAIrB,eAAgBC,UAAU;CAI1B,aAAcA,UAAU;CAIxB,oBAAqBC,KAAK;CAI1B;AASD;AAED,OAAO,iBAAS,wBAAwB;AAIxC,OAAO,iBAAS,4BAA4BC,SAAS","names":["cacheKey: ObjectCacheKey","data: ObjectHolder","isNew: boolean","key: ListCacheKey","cacheKey: SpecificLinkCacheKey","key: ObjectSetCacheKey","changes: Changes"],"sources":["../../../../src/observable/internal/Changes.ts"],"version":3,"file":"Changes.d.ts"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SpecificLinkCacheKey } from "./links/SpecificLinkCacheKey.js";
|
|
2
2
|
import type { ListCacheKey } from "./list/ListCacheKey.js";
|
|
3
3
|
import type { ObjectCacheKey } from "./object/ObjectCacheKey.js";
|
|
4
|
-
|
|
4
|
+
import type { ObjectSetCacheKey } from "./objectset/ObjectSetCacheKey.js";
|
|
5
|
+
export type KnownCacheKey = ObjectCacheKey | SpecificLinkCacheKey | ListCacheKey | ObjectSetCacheKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,4BAA4B,iCAAkC;AAC5E,cAAc,oBAAoB,wBAAyB;AAC3D,cAAc,sBAAsB,4BAA6B;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,4BAA4B,iCAAkC;AAC5E,cAAc,oBAAoB,wBAAyB;AAC3D,cAAc,sBAAsB,4BAA6B;AACjE,cAAc,yBAAyB,kCAAmC;AAE1E,YAAY,gBACR,iBACA,uBACA,eACA","names":[],"sources":["../../../../src/observable/internal/KnownCacheKey.ts"],"version":3,"file":"KnownCacheKey.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,cAAc,WAAY;AACxC,cACE,aACA,YACA,UACA,cACA,oBACK,MAAO;AAEd,cACE,sBACA,cACK,+BAAgC;AACvC,cAAc,oBAAoB,mBAAoB;AACtD,cAAc,iBAAiB,gBAAiB;AAChD,cAAc,eAAe,cAAe;AAC5C,cAAc,qBAAqB,oBAAqB;AACxD,cAAc,aAAa,YAAa;AACxC,cAAc,oBAAoB,mBAAoB;AACtD,cAAc,aAAa,YAAa;AACxC,cAAc,sBAAsB,qBAAsB;AAE1D,OAAO,uBAAe;CACpB,YAAY;CACZ;CACA,UAAU;aACC,aAAa,SAAS;;CACjC;CACA,eAAe;CACf;CACA,SAAS;CACT,UAAU;CACV,OAAO;CACP,kB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S,sBACR;AACJ","names":["store: Store","observable: Observable<SubjectPayload<KEY>>","opts: O","cacheKey: KEY","logger?: Logger","subject: Observable<SubjectPayload<KEY>>","observer: Observer<PAYLOAD>","subscriptionId: string","dedupeInterval: number | undefined","force?: boolean","status: Status","batch: BatchContext","data: KEY[\"__cacheKey\"][\"value\"]","changes: Changes","optimisticId: OptimisticId | undefined","objectType: string","changes: Changes | undefined"],"sources":["../../../../src/observable/internal/Query.ts"],"version":3,"file":"Query.d.ts"}
|
|
@@ -11,6 +11,7 @@ import { Layers } from "./Layers.js";
|
|
|
11
11
|
import { LinksHelper } from "./links/LinksHelper.js";
|
|
12
12
|
import { ListsHelper } from "./list/ListsHelper.js";
|
|
13
13
|
import { ObjectsHelper } from "./object/ObjectsHelper.js";
|
|
14
|
+
import { ObjectSetHelper } from "./objectset/ObjectSetHelper.js";
|
|
14
15
|
import { type OptimisticId } from "./OptimisticId.js";
|
|
15
16
|
import { OrderByCanonicalizer } from "./OrderByCanonicalizer.js";
|
|
16
17
|
import { Queries } from "./Queries.js";
|
|
@@ -39,6 +40,7 @@ export declare class Store {
|
|
|
39
40
|
readonly lists: ListsHelper;
|
|
40
41
|
readonly objects: ObjectsHelper;
|
|
41
42
|
readonly links: LinksHelper;
|
|
43
|
+
readonly objectSets: ObjectSetHelper;
|
|
42
44
|
constructor(client: Client);
|
|
43
45
|
applyAction: <Q extends ActionDefinition<any>>(action: Q, args: Parameters<ActionSignatureFromDef<Q>["applyAction"]>[0] | Array<Parameters<ActionSignatureFromDef<Q>["applyAction"]>[0]>, opts?: Store.ApplyActionOptions) => Promise<ActionEditResponse>;
|
|
44
46
|
validateAction: <Q extends ActionDefinition<any>>(action: Q, args: Parameters<ActionSignatureFromDef<Q>["applyAction"]>[0]) => Promise<ActionValidationResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,kBACA,oBACA,0BAEA,sBACA,MACA,sBACK,WAAY;AAEnB,cAAc,8BAA8B,8BAA+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2BAA4B;AACjE,SAAS,eAAe,cAAe;AACvC,cAAc,gBAAgB,eAAgB;AAC9C,SAAS,gCAAgC,+BAAgC;AAEzE,yBAAiB;WACE,mBAAmB;EAClC,oBAAoBA,KAAK;CAC1B;;;;;;;;AAeH,OAAO,cAAM,MAAM;;CACjB,SAAS,oBAAoB;CAE7B,SAAS,sBAAsB;CAG/B,SAAS,QAAQ;CAKjB,SAAS,WAAW,UAAU;CAC9B,SAAS,SAAS;CAElB,SAAS,QAAQ;CAIjB,SAAS,UAAU;CAGnB,SAAS,OAAO;CAChB,SAAS,SAAS;CAClB,SAAS,OAAO;CAChB,SAAS,YAAY;CAErB,YAAYC,QAAQ;CA2DpB,cAAc,UAAU,uBACtBC,QAAQ,GACRC,MACI,WAAW,uBAAuB,GAAG,gBAAgB,KACrD,MAAM,WAAW,uBAAuB,GAAG,gBAAgB,KAC/DC,OAAO,MAAM,uBACV,QAAQ;CAIb,iBAAiB,UAAU,uBACzBF,QAAQ,GACRG,MAAM,WAAW,uBAAuB,GAAG,gBAAgB,OACxD,QAAQ;CAQb,AAAO,SAAS,UAAU,eACxBC,UAAU,IACT,MAAM;CAIT,MAAM,GACJ,EAAE,cAAc,SAGf,EAHmD;EAClD,eAAe;EACf,UAAU;CACX,GACDC,UAAUC,cAAc,iBAAiB,IACxC;EACD,aAAa;EACb,QAAQ;EACR,SAAS;CACV;CAID,AAAO,iBAAiB,UAAU,sBAChCC,SAAS,EAAE,aAAa,GACxBC,IAAI,eAAe,KAClB;;;;;;;;;;;;CA0DH,AAAO,qBAAqB,UAAU,sBACpCD,SAAS,EAAE,aAAa,GACxBE,SAAS,sBACR;CA0BH,AAAa,iBAAiB;CAY9B,AAAa,kBACXC,SACI,KAAK,SAAS,wBACd,cAAc,KAAK,SAAS,yBAC/B;AAWJ","names":["ctx: OptimisticBuilder","client: Client","action: Q","args:\n | Parameters<ActionSignatureFromDef<Q>[\"applyAction\"]>[0]\n | Array<Parameters<ActionSignatureFromDef<Q>[\"applyAction\"]>[0]>","opts?: Store.ApplyActionOptions","args: Parameters<ActionSignatureFromDef<Q>[\"applyAction\"]>[0]","cacheKey: K","batchFn: (batchContext: BatchContext) => X","batchContext: BatchContext","apiName: T[\"apiName\"] | T","pk: PrimaryKeyType<T>","changes: Changes | undefined","objects:\n | Osdk.Instance<ObjectTypeDefinition>\n | ReadonlyArray<Osdk.Instance<ObjectTypeDefinition>>"],"sources":["../../../../src/observable/internal/Store.ts"],"version":3,"file":"Store.d.ts"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CollectionStorageData } from "../base-list/BaseCollectionQuery.js";
|
|
2
|
+
import type { CacheKey } from "../CacheKey.js";
|
|
3
|
+
import type { Canonical } from "../Canonical.js";
|
|
4
|
+
import type { ObjectSetQuery } from "./ObjectSetQuery.js";
|
|
5
|
+
export interface ObjectSetStorageData extends CollectionStorageData {}
|
|
6
|
+
export interface ObjectSetOperations {
|
|
7
|
+
where?: Canonical<any>;
|
|
8
|
+
withProperties?: string[];
|
|
9
|
+
union?: string[];
|
|
10
|
+
intersect?: string[];
|
|
11
|
+
subtract?: string[];
|
|
12
|
+
pivotTo?: string;
|
|
13
|
+
orderBy?: Canonical<Record<string, "asc" | "desc" | undefined>>;
|
|
14
|
+
pageSize?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ObjectSetCacheKey extends CacheKey<"objectSet", ObjectSetStorageData, ObjectSetQuery, [baseObjectSetWire: string, operations: Canonical<ObjectSetOperations>]> {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc,6BAA6B,qCAAsC;AACjF,cAAc,gBAAgB,gBAAiB;AAC/C,cAAc,iBAAiB,iBAAkB;AACjD,cAAc,sBAAsB,qBAAsB;AAE1D,iBAAiB,6BAA6B,sBAAsB,CAAE;AAEtE,iBAAiB,oBAAoB;CACnC,QAAQ;CACR;CACA;CACA;CACA;CACA;CACA,UAAU,UAAU,eAAe,QAAQ;CAC3C;AACD;AAED,iBAAiB,0BACf,SACE,aACA,sBACA,iBAEE,2BACA,YAAY,UAAU,uBAG5B,CACC","names":[],"sources":["../../../../../src/observable/internal/objectset/ObjectSetCacheKey.ts"],"version":3,"file":"ObjectSetCacheKey.d.ts"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ObjectSetPayload } from "../../ObjectSetPayload.js";
|
|
2
|
+
import type { Observer } from "../../ObservableClient/common.js";
|
|
3
|
+
import { AbstractHelper } from "../AbstractHelper.js";
|
|
4
|
+
import type { CacheKeys } from "../CacheKeys.js";
|
|
5
|
+
import type { KnownCacheKey } from "../KnownCacheKey.js";
|
|
6
|
+
import type { OrderByCanonicalizer } from "../OrderByCanonicalizer.js";
|
|
7
|
+
import type { QuerySubscription } from "../QuerySubscription.js";
|
|
8
|
+
import type { Store } from "../Store.js";
|
|
9
|
+
import type { WhereClauseCanonicalizer } from "../WhereClauseCanonicalizer.js";
|
|
10
|
+
import { ObjectSetQuery } from "./ObjectSetQuery.js";
|
|
11
|
+
import type { ObjectSetQueryOptions } from "./ObjectSetQueryOptions.js";
|
|
12
|
+
export declare class ObjectSetHelper extends AbstractHelper<ObjectSetQuery, ObjectSetQueryOptions> {
|
|
13
|
+
whereCanonicalizer: WhereClauseCanonicalizer;
|
|
14
|
+
orderByCanonicalizer: OrderByCanonicalizer;
|
|
15
|
+
constructor(store: Store, cacheKeys: CacheKeys<KnownCacheKey>, whereCanonicalizer: WhereClauseCanonicalizer, orderByCanonicalizer: OrderByCanonicalizer);
|
|
16
|
+
observe(options: ObjectSetQueryOptions, subFn: Observer<ObjectSetPayload>): QuerySubscription<ObjectSetQuery>;
|
|
17
|
+
getQuery(options: ObjectSetQueryOptions): ObjectSetQuery;
|
|
18
|
+
private buildCanonicalizedOperations;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAiBA,cAAc,wBAAwB,2BAA4B;AAClE,cAAc,gBAAgB,kCAAmC;AACjE,SAAS,sBAAsB,sBAAuB;AACtD,cAAc,iBAAiB,iBAAkB;AAEjD,cAAc,qBAAqB,qBAAsB;AACzD,cAAc,4BAA4B,4BAA6B;AACvE,cAAc,yBAAyB,yBAA0B;AACjE,cAAc,aAAa,aAAc;AACzC,cAAc,gCAAgC,gCAAiC;AAK/E,SAAS,sBAAsB,qBAAsB;AACrD,cAAc,6BAA6B,4BAA6B;AAExE,OAAO,cAAM,wBAAwB,eACnC,gBACA,uBACA;CACA,oBAAoB;CACpB,sBAAsB;CAEtB,YACEA,OAAO,OACPC,WAAW,UAAU,gBACrBC,oBAAoB,0BACpBC,sBAAsB;CAQxB,QACEC,SAAS,uBACTC,OAAO,SAAS,oBACf,kBAAkB;CAIrB,SAASD,SAAS,wBAAwB;CAuB1C,QAAQ;AA+CT","names":["store: Store","cacheKeys: CacheKeys<KnownCacheKey>","whereCanonicalizer: WhereClauseCanonicalizer","orderByCanonicalizer: OrderByCanonicalizer","options: ObjectSetQueryOptions","subFn: Observer<ObjectSetPayload>"],"sources":["../../../../../src/observable/internal/objectset/ObjectSetHelper.ts"],"version":3,"file":"ObjectSetHelper.d.ts"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Osdk, PageResult } from "@osdk/api";
|
|
2
|
+
import type { Observable } from "rxjs";
|
|
3
|
+
import type { ObjectSetPayload } from "../../ObjectSetPayload.js";
|
|
4
|
+
import type { Status } from "../../ObservableClient/common.js";
|
|
5
|
+
import { BaseListQuery } from "../base-list/BaseListQuery.js";
|
|
6
|
+
import type { BatchContext } from "../BatchContext.js";
|
|
7
|
+
import type { Canonical } from "../Canonical.js";
|
|
8
|
+
import type { Changes } from "../Changes.js";
|
|
9
|
+
import type { Entry } from "../Layer.js";
|
|
10
|
+
import type { Store } from "../Store.js";
|
|
11
|
+
import type { SubjectPayload } from "../SubjectPayload.js";
|
|
12
|
+
import type { ObjectSetCacheKey, ObjectSetOperations } from "./ObjectSetCacheKey.js";
|
|
13
|
+
import type { ObjectSetQueryOptions } from "./ObjectSetQueryOptions.js";
|
|
14
|
+
export declare class ObjectSetQuery extends BaseListQuery<ObjectSetCacheKey, ObjectSetPayload, ObjectSetQueryOptions> {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(store: Store, subject: Observable<SubjectPayload<ObjectSetCacheKey>>, baseObjectSetWire: string, operations: Canonical<ObjectSetOperations>, cacheKey: ObjectSetCacheKey, opts: ObjectSetQueryOptions);
|
|
17
|
+
/**
|
|
18
|
+
* Register changes to the cache specific to ObjectSetQuery
|
|
19
|
+
*/
|
|
20
|
+
protected registerCacheChanges(batch: BatchContext): void;
|
|
21
|
+
/**
|
|
22
|
+
* Implements fetchPageData from BaseListQuery template method
|
|
23
|
+
* Fetches a page of data from the composed ObjectSet
|
|
24
|
+
*/
|
|
25
|
+
protected fetchPageData(signal: AbortSignal | undefined): Promise<PageResult<Osdk.Instance<any>>>;
|
|
26
|
+
protected handleFetchError(error: unknown, _status: Status, batch: BatchContext): Entry<ObjectSetCacheKey>;
|
|
27
|
+
invalidateObjectType: (objectType: string, changes: Changes | undefined) => Promise<void>;
|
|
28
|
+
protected createPayload(params: {
|
|
29
|
+
resolvedData: any[]
|
|
30
|
+
isOptimistic: boolean
|
|
31
|
+
status: Status
|
|
32
|
+
lastUpdated: number
|
|
33
|
+
}): ObjectSetPayload;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAyB,MAAM,kBAAkB,WAAY;AAC7D,cAAc,kBAAkB,MAAO;AAGvC,cAAc,wBAAwB,2BAA4B;AAClE,cAAc,cAAc,kCAAmC;AAC/D,SAAS,qBAAqB,+BAAgC;AAC9D,cAAc,oBAAoB,oBAAqB;AACvD,cAAc,iBAAiB,iBAAkB;AACjD,cAAc,eAAe,eAAgB;AAC7C,cAAc,aAAa,aAAc;AAEzC,cAAc,aAAa,aAAc;AACzC,cAAc,sBAAsB,sBAAuB;AAC3D,cACE,mBACA,2BACK,wBAAyB;AAChC,cAAc,6BAA6B,4BAA6B;AAExE,OAAO,cAAM,uBAAuB,cAClC,mBACA,kBACA,uBACA;;CAMA,YACEA,OAAO,OACPC,SAAS,WAAW,eAAe,qBACnCC,2BACAC,YAAY,UAAU,sBACtBC,UAAU,mBACVC,MAAM;;;;CAqGR,UAAU,qBAAqBC,OAAO;;;;;CAQtC,UAAgB,cACdC,QAAQ,0BACP,QAAQ,WAAW,KAAK;CAqB3B,UAAU,iBACRC,gBACAC,SAAS,QACTH,OAAO,eACN,MAAM;CAOT,uBACEI,oBACAC,SAAS,wBACR;CAQH,UAAU,cACRC,QAAQ;EACN;EACA;EACA,QAAQ;EACR;CACD,IACA;AAWJ","names":["store: Store","subject: Observable<SubjectPayload<ObjectSetCacheKey>>","baseObjectSetWire: string","operations: Canonical<ObjectSetOperations>","cacheKey: ObjectSetCacheKey","opts: ObjectSetQueryOptions","batch: BatchContext","signal: AbortSignal | undefined","error: unknown","_status: Status","objectType: string","changes: Changes | undefined","params: {\n resolvedData: any[];\n isOptimistic: boolean;\n status: Status;\n lastUpdated: number;\n }"],"sources":["../../../../../src/observable/internal/objectset/ObjectSetQuery.ts"],"version":3,"file":"ObjectSetQuery.d.ts"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DerivedProperty, LinkNames, ObjectSet, ObjectTypeDefinition, PropertyKeys, WhereClause, WirePropertyTypes } from "@osdk/api";
|
|
2
|
+
import type { CommonObserveOptions } from "../../ObservableClient/common.js";
|
|
3
|
+
export interface ObserveObjectSetOptions<
|
|
4
|
+
Q extends ObjectTypeDefinition,
|
|
5
|
+
RDPs extends Record<string, WirePropertyTypes | undefined | Array<WirePropertyTypes>> = {}
|
|
6
|
+
> extends CommonObserveOptions {
|
|
7
|
+
where?: WhereClause<Q>;
|
|
8
|
+
withProperties?: { [K in keyof RDPs] : DerivedProperty.Creator<Q, RDPs[K]> };
|
|
9
|
+
union?: ObjectSet<Q>[];
|
|
10
|
+
intersect?: ObjectSet<Q>[];
|
|
11
|
+
subtract?: ObjectSet<Q>[];
|
|
12
|
+
pivotTo?: LinkNames<Q>;
|
|
13
|
+
pageSize?: number;
|
|
14
|
+
orderBy?: { [K in PropertyKeys<Q>]? : "asc" | "desc" };
|
|
15
|
+
}
|
|
16
|
+
export interface ObjectSetQueryOptions extends ObserveObjectSetOptions<any, any> {
|
|
17
|
+
baseObjectSet: ObjectSet<any>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cACE,iBACA,WACA,WACA,sBACA,cACA,aACA,yBACK,WAAY;AACnB,cAAc,4BAA4B,kCAAmC;AAE7E,iBAAiB;CACf,UAAU;CACV,aAAa,eAEX,gCAAgC,MAAM,sBACpC,CAAE;UACE,qBAAqB;CAC7B,QAAQ,YAAY;CACpB,oBAAoB,WAAW,QAAO,gBAAgB,QAAQ,GAAG,KAAK;CACtE,QAAQ,UAAU;CAClB,YAAY,UAAU;CACtB,WAAW,UAAU;CACrB,UAAU,UAAU;CACpB;CACA,aAAa,KAAK,aAAa,OAAM,QAAQ;AAC9C;AAED,iBAAiB,8BACP,kCACV;CACE,eAAe;AAChB","names":[],"sources":["../../../../../src/observable/internal/objectset/ObjectSetQueryOptions.ts"],"version":3,"file":"ObjectSetQueryOptions.d.ts"}
|