@mittwald/api-models 4.63.0 → 4.64.1
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/dist/esm/app/AppInstallation/AppInstallation.js +3 -1
- package/dist/esm/base/ListQueryModel.js +4 -2
- package/dist/esm/lib/joinedId.js +1 -0
- package/dist/esm/react/provideReact.js +4 -7
- package/dist/types/base/ListQueryModel.d.ts +5 -1
- package/dist/types/lib/joinedId.d.ts +1 -0
- package/package.json +2 -2
|
@@ -53,7 +53,9 @@ export class AppInstallationListItem extends classes(AppInstallationCommon, (Dat
|
|
|
53
53
|
export class AppInstallationListQuery extends ListQueryModel {
|
|
54
54
|
project;
|
|
55
55
|
constructor(project, query = {}) {
|
|
56
|
-
super(query
|
|
56
|
+
super(query, {
|
|
57
|
+
dependencies: [project.id],
|
|
58
|
+
});
|
|
57
59
|
this.project = project;
|
|
58
60
|
}
|
|
59
61
|
refine(query) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { hash } from "object-code";
|
|
2
|
+
import { joinedId } from "../lib/joinedId.js";
|
|
2
3
|
export class ListQueryModel {
|
|
3
4
|
query;
|
|
4
5
|
queryId;
|
|
5
|
-
constructor(query) {
|
|
6
|
+
constructor(query, opts = {}) {
|
|
7
|
+
const { dependencies = [] } = opts;
|
|
6
8
|
this.query = query;
|
|
7
|
-
this.queryId = hash(query)
|
|
9
|
+
this.queryId = joinedId(hash(query), ...dependencies);
|
|
8
10
|
}
|
|
9
11
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const joinedId = (...parts) => parts.join(" | ");
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { reactUsePromise } from "./reactUsePromise.js";
|
|
2
2
|
import { hash } from "object-code";
|
|
3
3
|
import { reactProvisionContext } from "./reactProvisionContext.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
dependencies,
|
|
8
|
-
}));
|
|
4
|
+
import { joinedId } from "../lib/joinedId.js";
|
|
5
|
+
export const provideReact = (loader, dependencies = []) => {
|
|
6
|
+
const provisionId = joinedId(hash(loader), ...dependencies);
|
|
9
7
|
const getAsyncResource = (params) => {
|
|
10
|
-
const
|
|
11
|
-
const contextId = provisionId + paramsHash;
|
|
8
|
+
const contextId = joinedId(provisionId, hash(params));
|
|
12
9
|
const loaderWithContext = reactProvisionContext.bind({
|
|
13
10
|
id: contextId,
|
|
14
11
|
}, loader);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
interface Options {
|
|
2
|
+
dependencies?: string[];
|
|
3
|
+
}
|
|
1
4
|
export declare abstract class ListQueryModel<TQuery> {
|
|
2
5
|
protected readonly query: TQuery;
|
|
3
6
|
readonly queryId: string;
|
|
4
|
-
constructor(query: TQuery);
|
|
7
|
+
constructor(query: TQuery, opts?: Options);
|
|
5
8
|
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const joinedId: (...parts: Array<number | string>) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/api-models",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.64.1",
|
|
4
4
|
"author": "Mittwald CM Service GmbH & Co. KG <opensource@mittwald.de>",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Collection of domain models for coherent interaction with the API",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"optional": true
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "1cf99e8e75eb13a755a15f2a83e7a0babdf4490b"
|
|
88
88
|
}
|