@mittwald/api-models 4.242.1 → 4.242.3

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.
Files changed (179) hide show
  1. package/package.json +3 -3
  2. package/dist/esm/app/AppInstallation/AppInstallation.js +0 -89
  3. package/dist/esm/app/AppInstallation/behaviors/api.js +0 -24
  4. package/dist/esm/app/AppInstallation/behaviors/index.js +0 -2
  5. package/dist/esm/app/AppInstallation/behaviors/types.js +0 -1
  6. package/dist/esm/app/AppInstallation/index.js +0 -2
  7. package/dist/esm/app/AppInstallation/types.js +0 -1
  8. package/dist/esm/app/index.js +0 -1
  9. package/dist/esm/article/Article/Article.js +0 -79
  10. package/dist/esm/article/Article/behaviors/api.js +0 -22
  11. package/dist/esm/article/Article/behaviors/index.js +0 -2
  12. package/dist/esm/article/Article/behaviors/types.js +0 -1
  13. package/dist/esm/article/Article/index.js +0 -2
  14. package/dist/esm/article/Article/types.js +0 -1
  15. package/dist/esm/article/index.js +0 -1
  16. package/dist/esm/base/DataModel.js +0 -7
  17. package/dist/esm/base/ListDataModel.js +0 -8
  18. package/dist/esm/base/ListQueryModel.js +0 -11
  19. package/dist/esm/base/Money.js +0 -5
  20. package/dist/esm/base/ReferenceModel.js +0 -9
  21. package/dist/esm/base/assertObjectFound.js +0 -9
  22. package/dist/esm/base/index.js +0 -6
  23. package/dist/esm/base/types.js +0 -1
  24. package/dist/esm/config/behaviors/api.js +0 -49
  25. package/dist/esm/config/behaviors/index.js +0 -1
  26. package/dist/esm/config/config.js +0 -13
  27. package/dist/esm/config/index.js +0 -1
  28. package/dist/esm/contract/Contract/Contract.js +0 -78
  29. package/dist/esm/contract/Contract/behaviors/api.js +0 -20
  30. package/dist/esm/contract/Contract/behaviors/index.js +0 -2
  31. package/dist/esm/contract/Contract/behaviors/types.js +0 -1
  32. package/dist/esm/contract/Contract/index.js +0 -2
  33. package/dist/esm/contract/Contract/types.js +0 -1
  34. package/dist/esm/contract/ContractItem/ContractItem.js +0 -31
  35. package/dist/esm/contract/ContractItem/behaviors/api.js +0 -13
  36. package/dist/esm/contract/ContractItem/behaviors/index.js +0 -2
  37. package/dist/esm/contract/ContractItem/behaviors/types.js +0 -1
  38. package/dist/esm/contract/ContractItem/index.js +0 -2
  39. package/dist/esm/contract/ContractItem/types.js +0 -1
  40. package/dist/esm/contract/index.js +0 -2
  41. package/dist/esm/customer/Customer/Customer.js +0 -96
  42. package/dist/esm/customer/Customer/behaviors/api.js +0 -30
  43. package/dist/esm/customer/Customer/behaviors/index.js +0 -2
  44. package/dist/esm/customer/Customer/behaviors/types.js +0 -1
  45. package/dist/esm/customer/Customer/index.js +0 -2
  46. package/dist/esm/customer/Customer/types.js +0 -1
  47. package/dist/esm/customer/index.js +0 -1
  48. package/dist/esm/domain/Ingress/Ingress.js +0 -106
  49. package/dist/esm/domain/Ingress/behaviors/api.js +0 -25
  50. package/dist/esm/domain/Ingress/behaviors/index.js +0 -2
  51. package/dist/esm/domain/Ingress/behaviors/types.js +0 -1
  52. package/dist/esm/domain/Ingress/index.js +0 -2
  53. package/dist/esm/domain/Ingress/types.js +0 -1
  54. package/dist/esm/domain/IngressPath/IngressPath.js +0 -15
  55. package/dist/esm/domain/IngressPath/IngressPath.test.js +0 -16
  56. package/dist/esm/domain/IngressPath/index.js +0 -2
  57. package/dist/esm/domain/IngressPath/types.js +0 -1
  58. package/dist/esm/domain/IngressTarget/IngressTarget.js +0 -40
  59. package/dist/esm/domain/IngressTarget/IngressTarget.test-types.js +0 -10
  60. package/dist/esm/domain/IngressTarget/index.js +0 -2
  61. package/dist/esm/domain/IngressTarget/types.js +0 -1
  62. package/dist/esm/domain/index.js +0 -1
  63. package/dist/esm/errors/ObjectNotFoundError.js +0 -7
  64. package/dist/esm/index.js +0 -7
  65. package/dist/esm/lib/deepFreeze.js +0 -4
  66. package/dist/esm/lib/joinedId.js +0 -1
  67. package/dist/esm/lib/types.js +0 -1
  68. package/dist/esm/project/Project/Project.js +0 -121
  69. package/dist/esm/project/Project/behaviors/api.js +0 -58
  70. package/dist/esm/project/Project/behaviors/inMem.js +0 -27
  71. package/dist/esm/project/Project/behaviors/index.js +0 -3
  72. package/dist/esm/project/Project/behaviors/types.js +0 -1
  73. package/dist/esm/project/Project/index.js +0 -2
  74. package/dist/esm/project/Project/types.js +0 -1
  75. package/dist/esm/project/index.js +0 -1
  76. package/dist/esm/react/MittwaldApiModelProvider.js +0 -12
  77. package/dist/esm/react/asyncResourceInvalidation.js +0 -29
  78. package/dist/esm/react/index.js +0 -4
  79. package/dist/esm/react/provideReact.js +0 -27
  80. package/dist/esm/react/provideReact.test-types.js +0 -21
  81. package/dist/esm/react/reactProvisionContext.js +0 -2
  82. package/dist/esm/react/reactUsePromise.js +0 -17
  83. package/dist/esm/react.js +0 -1
  84. package/dist/esm/server/Server/Server.js +0 -102
  85. package/dist/esm/server/Server/behaviors/api.js +0 -22
  86. package/dist/esm/server/Server/behaviors/index.js +0 -2
  87. package/dist/esm/server/Server/behaviors/types.js +0 -1
  88. package/dist/esm/server/Server/index.js +0 -1
  89. package/dist/esm/server/Server/types.js +0 -1
  90. package/dist/esm/server/index.js +0 -1
  91. package/dist/types/app/AppInstallation/AppInstallation.d.ts +0 -138
  92. package/dist/types/app/AppInstallation/behaviors/api.d.ts +0 -3
  93. package/dist/types/app/AppInstallation/behaviors/index.d.ts +0 -2
  94. package/dist/types/app/AppInstallation/behaviors/types.d.ts +0 -6
  95. package/dist/types/app/AppInstallation/index.d.ts +0 -2
  96. package/dist/types/app/AppInstallation/types.d.ts +0 -4
  97. package/dist/types/app/index.d.ts +0 -1
  98. package/dist/types/article/Article/Article.d.ts +0 -133
  99. package/dist/types/article/Article/behaviors/api.d.ts +0 -3
  100. package/dist/types/article/Article/behaviors/index.d.ts +0 -2
  101. package/dist/types/article/Article/behaviors/types.d.ts +0 -6
  102. package/dist/types/article/Article/index.d.ts +0 -2
  103. package/dist/types/article/Article/types.d.ts +0 -5
  104. package/dist/types/article/index.d.ts +0 -1
  105. package/dist/types/base/DataModel.d.ts +0 -5
  106. package/dist/types/base/ListDataModel.d.ts +0 -5
  107. package/dist/types/base/ListQueryModel.d.ts +0 -9
  108. package/dist/types/base/Money.d.ts +0 -3
  109. package/dist/types/base/ReferenceModel.d.ts +0 -5
  110. package/dist/types/base/assertObjectFound.d.ts +0 -3
  111. package/dist/types/base/index.d.ts +0 -6
  112. package/dist/types/base/types.d.ts +0 -6
  113. package/dist/types/config/behaviors/api.d.ts +0 -12
  114. package/dist/types/config/behaviors/index.d.ts +0 -1
  115. package/dist/types/config/config.d.ts +0 -23
  116. package/dist/types/config/index.d.ts +0 -1
  117. package/dist/types/contract/Contract/Contract.d.ts +0 -68
  118. package/dist/types/contract/Contract/behaviors/api.d.ts +0 -3
  119. package/dist/types/contract/Contract/behaviors/index.d.ts +0 -2
  120. package/dist/types/contract/Contract/behaviors/types.d.ts +0 -9
  121. package/dist/types/contract/Contract/index.d.ts +0 -2
  122. package/dist/types/contract/Contract/types.d.ts +0 -8
  123. package/dist/types/contract/ContractItem/ContractItem.d.ts +0 -64
  124. package/dist/types/contract/ContractItem/behaviors/api.d.ts +0 -3
  125. package/dist/types/contract/ContractItem/behaviors/index.d.ts +0 -2
  126. package/dist/types/contract/ContractItem/behaviors/types.d.ts +0 -4
  127. package/dist/types/contract/ContractItem/index.d.ts +0 -2
  128. package/dist/types/contract/ContractItem/types.d.ts +0 -2
  129. package/dist/types/contract/index.d.ts +0 -2
  130. package/dist/types/customer/Customer/Customer.d.ts +0 -138
  131. package/dist/types/customer/Customer/behaviors/api.d.ts +0 -3
  132. package/dist/types/customer/Customer/behaviors/index.d.ts +0 -2
  133. package/dist/types/customer/Customer/behaviors/types.d.ts +0 -7
  134. package/dist/types/customer/Customer/index.d.ts +0 -2
  135. package/dist/types/customer/Customer/types.d.ts +0 -5
  136. package/dist/types/customer/index.d.ts +0 -1
  137. package/dist/types/domain/Ingress/Ingress.d.ts +0 -109
  138. package/dist/types/domain/Ingress/behaviors/api.d.ts +0 -3
  139. package/dist/types/domain/Ingress/behaviors/index.d.ts +0 -2
  140. package/dist/types/domain/Ingress/behaviors/types.d.ts +0 -6
  141. package/dist/types/domain/Ingress/index.d.ts +0 -2
  142. package/dist/types/domain/Ingress/types.d.ts +0 -8
  143. package/dist/types/domain/IngressPath/IngressPath.d.ts +0 -11
  144. package/dist/types/domain/IngressPath/IngressPath.test.d.ts +0 -1
  145. package/dist/types/domain/IngressPath/index.d.ts +0 -2
  146. package/dist/types/domain/IngressPath/types.d.ts +0 -2
  147. package/dist/types/domain/IngressTarget/IngressTarget.d.ts +0 -24
  148. package/dist/types/domain/IngressTarget/IngressTarget.test-types.d.ts +0 -1
  149. package/dist/types/domain/IngressTarget/index.d.ts +0 -2
  150. package/dist/types/domain/IngressTarget/types.d.ts +0 -6
  151. package/dist/types/domain/index.d.ts +0 -1
  152. package/dist/types/errors/ObjectNotFoundError.d.ts +0 -3
  153. package/dist/types/index.d.ts +0 -7
  154. package/dist/types/lib/deepFreeze.d.ts +0 -5
  155. package/dist/types/lib/joinedId.d.ts +0 -1
  156. package/dist/types/lib/types.d.ts +0 -2
  157. package/dist/types/project/Project/Project.d.ts +0 -292
  158. package/dist/types/project/Project/behaviors/api.d.ts +0 -3
  159. package/dist/types/project/Project/behaviors/inMem.d.ts +0 -3
  160. package/dist/types/project/Project/behaviors/index.d.ts +0 -3
  161. package/dist/types/project/Project/behaviors/types.d.ts +0 -12
  162. package/dist/types/project/Project/index.d.ts +0 -2
  163. package/dist/types/project/Project/types.d.ts +0 -10
  164. package/dist/types/project/index.d.ts +0 -1
  165. package/dist/types/react/MittwaldApiModelProvider.d.ts +0 -6
  166. package/dist/types/react/asyncResourceInvalidation.d.ts +0 -4
  167. package/dist/types/react/index.d.ts +0 -5
  168. package/dist/types/react/provideReact.d.ts +0 -12
  169. package/dist/types/react/provideReact.test-types.d.ts +0 -1
  170. package/dist/types/react/reactProvisionContext.d.ts +0 -3
  171. package/dist/types/react/reactUsePromise.d.ts +0 -2
  172. package/dist/types/react.d.ts +0 -1
  173. package/dist/types/server/Server/Server.d.ts +0 -115
  174. package/dist/types/server/Server/behaviors/api.d.ts +0 -3
  175. package/dist/types/server/Server/behaviors/index.d.ts +0 -2
  176. package/dist/types/server/Server/behaviors/types.d.ts +0 -6
  177. package/dist/types/server/Server/index.d.ts +0 -1
  178. package/dist/types/server/Server/types.d.ts +0 -8
  179. package/dist/types/server/index.d.ts +0 -1
@@ -1,29 +0,0 @@
1
- import { reactProvisionContext } from "./reactProvisionContext.js";
2
- import { refresh } from "@mittwald/react-use-promise";
3
- import { Store } from "@mittwald/react-use-promise/store";
4
- const cacheTagStore = new Store();
5
- export const refreshProvideReactCache = (tag) => {
6
- cacheTagStore.getAll(tag).forEach((ids) => {
7
- ids.forEach((id) => {
8
- refresh({
9
- tag: String(id),
10
- });
11
- });
12
- });
13
- };
14
- export const addTagToProvideReactCache = (tag) => {
15
- const context = reactProvisionContext.use();
16
- if (context) {
17
- const ids = cacheTagStore.get(tag) ?? new Set();
18
- ids.add(context.id);
19
- cacheTagStore.set(tag, () => ids, {
20
- tags: [tag],
21
- });
22
- }
23
- };
24
- export const addUrlTagToProvideReactCache = (request) => {
25
- const url = request.requestConfig.url;
26
- if (request.requestConfig.method === "GET" && url) {
27
- addTagToProvideReactCache(url);
28
- }
29
- };
@@ -1,4 +0,0 @@
1
- export { refreshProvideReactCache, addTagToProvideReactCache, addUrlTagToProvideReactCache, } from "./asyncResourceInvalidation.js";
2
- export * from "./MittwaldApiModelProvider.js";
3
- export * from "./reactUsePromise.js";
4
- export { provideReact } from "./provideReact.js";
@@ -1,27 +0,0 @@
1
- import { reactUsePromise } from "./reactUsePromise.js";
2
- import { hash } from "object-code";
3
- import { reactProvisionContext } from "./reactProvisionContext.js";
4
- import { joinedId } from "../lib/joinedId.js";
5
- export const provideReact = (loader, dependencies = []) => {
6
- const loaderHash = hash(loader);
7
- let cachedProvisionId;
8
- const getAsyncResource = (params) => {
9
- const provisionId = cachedProvisionId ??
10
- joinedId(loaderHash, ...dependencies
11
- .map((d) => (typeof d === "function" ? d() : d))
12
- .map((d) => hash(d)));
13
- cachedProvisionId = provisionId;
14
- const contextId = joinedId(provisionId, hash(params));
15
- const loaderWithContext = reactProvisionContext.bind({
16
- id: contextId,
17
- }, loader);
18
- return reactUsePromise.getAsyncResource(loaderWithContext, params, {
19
- loaderId: provisionId,
20
- tags: [contextId],
21
- });
22
- };
23
- return Object.assign(loader, {
24
- asResource: (...params) => getAsyncResource(params),
25
- use: (...params) => getAsyncResource(params).use(),
26
- });
27
- };
@@ -1,21 +0,0 @@
1
- import { provideReact } from "./provideReact.js";
2
- import { expectType } from "tsd";
3
- const reactProvided = provideReact(async (ignoredP1, ignoredP2) => Promise.resolve("foo"));
4
- function ignoredTestReturnTypesOfProvideReact() {
5
- const usedValue = reactProvided.use("foo");
6
- const asAsyncResource = reactProvided.asResource("foo");
7
- expectType(usedValue);
8
- expectType(asAsyncResource.use());
9
- }
10
- function ignoredTestParameterTypesOfProvideReact() {
11
- reactProvided.use("foo", true);
12
- reactProvided.asResource("foo", true);
13
- reactProvided.use("foo");
14
- reactProvided.asResource("foo");
15
- // @ts-expect-error Not assignable
16
- reactProvided.asResource(42);
17
- // @ts-expect-error Not assignable
18
- reactProvided.asResource("foo", 42);
19
- // @ts-expect-error Not assignable
20
- reactProvided.asResource("foo", true, 42);
21
- }
@@ -1,2 +0,0 @@
1
- import { createCascade } from "context";
2
- export const reactProvisionContext = createCascade();
@@ -1,17 +0,0 @@
1
- let module = undefined;
2
- /** @internal */
3
- export const reactUsePromise = new Proxy({}, {
4
- get: (_, prop) => {
5
- if (module === undefined) {
6
- // @todo Provide better error message
7
- throw new Error("ModelProvider not found");
8
- }
9
- if (prop in module) {
10
- return module[prop];
11
- }
12
- },
13
- });
14
- /** @internal */
15
- export const setModule = (theModule) => {
16
- module = theModule;
17
- };
package/dist/esm/react.js DELETED
@@ -1 +0,0 @@
1
- export * from "./react/index.js";
@@ -1,102 +0,0 @@
1
- import { ReferenceModel } from "../../base/ReferenceModel.js";
2
- import { config } from "../../config/config.js";
3
- import { classes } from "polytype";
4
- import { DataModel } from "../../base/DataModel.js";
5
- import assertObjectFound from "../../base/assertObjectFound.js";
6
- import { Project, ProjectListQuery } from "../../project/index.js";
7
- import { provideReact, } from "../../react/provideReact.js";
8
- import { ListQueryModel } from "../../base/ListQueryModel.js";
9
- import { ListDataModel } from "../../base/ListDataModel.js";
10
- export class Server extends ReferenceModel {
11
- projects;
12
- constructor(id) {
13
- super(id);
14
- this.projects = new ProjectListQuery({
15
- server: this,
16
- });
17
- }
18
- static ofId(id) {
19
- return new Server(id);
20
- }
21
- static find = provideReact(async (id) => {
22
- const data = await config.behaviors.server.find(id);
23
- if (data !== undefined) {
24
- return new ServerDetailed(data);
25
- }
26
- });
27
- static get = provideReact(async (id) => {
28
- const server = await this.find(id);
29
- assertObjectFound(server, this, id);
30
- return server;
31
- });
32
- static query(query = {}) {
33
- return new ServerListQuery(query);
34
- }
35
- /** @deprecated: use query() or customer.servers */
36
- static list = provideReact(async (query = {}) => {
37
- return new ServerListQuery(query).execute().then((r) => r.items);
38
- });
39
- async createProject(...parameters) {
40
- return Project.create(this.id, ...parameters);
41
- }
42
- /** @deprecated Use Server.projects property */
43
- listProjects = provideReact(async (query = {}) => {
44
- return Project.list({
45
- ...query,
46
- serverId: this.id,
47
- });
48
- });
49
- getDetailed = provideReact(() => Server.get(this.id), [this.id]);
50
- findDetailed = provideReact(() => Server.find(this.id), [this.id]);
51
- }
52
- // Common class for future extension
53
- class ServerCommon extends classes((DataModel), Server) {
54
- constructor(data) {
55
- super([data], [data.id]);
56
- }
57
- }
58
- export class ServerDetailed extends classes(ServerCommon, (DataModel)) {
59
- constructor(data) {
60
- super([data], [data]);
61
- }
62
- }
63
- export class ServerListItem extends classes(ServerCommon, (DataModel)) {
64
- constructor(data) {
65
- super([data], [data]);
66
- }
67
- }
68
- export class ServerListQuery extends ListQueryModel {
69
- constructor(query = {}) {
70
- super(query);
71
- }
72
- refine(query) {
73
- return new ServerListQuery({
74
- ...this.query,
75
- ...query,
76
- });
77
- }
78
- execute = provideReact(async () => {
79
- const { customer, ...query } = this.query;
80
- const { items, totalCount } = await config.behaviors.server.list({
81
- limit: config.defaultPaginationLimit,
82
- customerId: customer?.id,
83
- ...query,
84
- });
85
- return new ServerList(this.query, items.map((d) => new ServerListItem(d)), totalCount);
86
- }, [this.queryId]);
87
- getTotalCount = provideReact(async () => {
88
- const { totalCount } = await this.refine({ limit: 1 }).execute();
89
- return totalCount;
90
- }, [this.queryId]);
91
- findOneAndOnly = provideReact(async () => {
92
- const { items, totalCount } = await this.refine({ limit: 2 }).execute();
93
- if (totalCount === 1) {
94
- return items[0];
95
- }
96
- }, [this.queryId]);
97
- }
98
- export class ServerList extends classes(ServerListQuery, (ListDataModel)) {
99
- constructor(query, servers, totalCount) {
100
- super([query], [servers, totalCount]);
101
- }
102
- }
@@ -1,22 +0,0 @@
1
- import { assertStatus, assertOneOfStatus, extractTotalCountHeader, } from "@mittwald/api-client";
2
- export const apiServerBehaviors = (client) => ({
3
- find: async (id) => {
4
- const response = await client.project.getServer({
5
- serverId: id,
6
- });
7
- if (response.status === 200) {
8
- return response.data;
9
- }
10
- assertOneOfStatus(response, [403, 404]);
11
- },
12
- list: async (query) => {
13
- const response = await client.project.listServers({
14
- queryParameters: query,
15
- });
16
- assertStatus(response, 200);
17
- return {
18
- items: response.data,
19
- totalCount: extractTotalCountHeader(response),
20
- };
21
- },
22
- });
@@ -1,2 +0,0 @@
1
- export * from "./api.js";
2
- export * from "./types.js";
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from "./Server.js";
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from "./Server/index.js";
@@ -1,138 +0,0 @@
1
- import { DataModel } from "../../base/DataModel.js";
2
- import { ReferenceModel } from "../../base/ReferenceModel.js";
3
- import { AsyncResourceVariant } from "../../react/provideReact.js";
4
- import { AppInstallationData, AppInstallationListItemData, AppInstallationListQueryData } from "./types.js";
5
- import { ListQueryModel } from "../../base/ListQueryModel.js";
6
- import { ListDataModel } from "../../base/ListDataModel.js";
7
- import { Project } from "../../project/index.js";
8
- export declare class AppInstallation extends ReferenceModel {
9
- static find: AsyncResourceVariant<(id: string) => Promise<AppInstallationDetailed | undefined>>;
10
- static get: AsyncResourceVariant<(id: string) => Promise<AppInstallationDetailed>>;
11
- static ofId(id: string): AppInstallation;
12
- query(project: Project, query?: AppInstallationListQueryData): AppInstallationListQuery;
13
- /** @deprecated: use query() or project.appInstallations */
14
- static list: AsyncResourceVariant<(projectId: string, query?: AppInstallationListQueryData) => Promise<Readonly<Array<AppInstallationListItem>>>>;
15
- getDetailed: AsyncResourceVariant<() => Promise<AppInstallationDetailed>>;
16
- findDetailed: AsyncResourceVariant<() => Promise<AppInstallationDetailed | undefined>>;
17
- }
18
- declare const AppInstallationCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
19
- new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppAppInstallation | {
20
- appId: string;
21
- appVersion: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppVersionStatus;
22
- createdAt: string;
23
- customDocumentRoot?: string | undefined;
24
- deletionRequested?: boolean | undefined;
25
- description: string;
26
- disabled: boolean;
27
- id: string;
28
- installationPath: string;
29
- linkedDatabases: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppLinkedDatabase[];
30
- lockedBy?: {
31
- [k: string]: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppLockPurpose;
32
- } | undefined;
33
- phase: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppPhase;
34
- projectId: string;
35
- screenshotId?: string | undefined;
36
- screenshotRef?: string | undefined;
37
- shortId: string;
38
- systemSoftware: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppInstalledSystemSoftware[];
39
- updatePolicy: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppAppUpdatePolicy;
40
- userInputs: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppSavedUserInput[];
41
- }): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppAppInstallation | {
42
- appId: string;
43
- appVersion: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppVersionStatus;
44
- createdAt: string;
45
- customDocumentRoot?: string | undefined;
46
- deletionRequested?: boolean | undefined;
47
- description: string;
48
- disabled: boolean;
49
- id: string;
50
- installationPath: string;
51
- linkedDatabases: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppLinkedDatabase[];
52
- lockedBy?: {
53
- [k: string]: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppLockPurpose;
54
- } | undefined;
55
- phase: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppPhase;
56
- projectId: string;
57
- screenshotId?: string | undefined;
58
- screenshotRef?: string | undefined;
59
- shortId: string;
60
- systemSoftware: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppInstalledSystemSoftware[];
61
- updatePolicy: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppAppUpdatePolicy;
62
- userInputs: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppSavedUserInput[];
63
- }>;
64
- }, typeof AppInstallation]>;
65
- declare class AppInstallationCommon extends AppInstallationCommon_base {
66
- constructor(data: AppInstallationListItemData | AppInstallationData);
67
- }
68
- declare const AppInstallationDetailed_base: import("polytype").Polytype.ClusteredConstructor<[typeof AppInstallationCommon, {
69
- new (data: {
70
- appId: string;
71
- appVersion: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppVersionStatus;
72
- createdAt: string;
73
- customDocumentRoot?: string | undefined;
74
- deletionRequested?: boolean | undefined;
75
- description: string;
76
- disabled: boolean;
77
- id: string;
78
- installationPath: string;
79
- linkedDatabases: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppLinkedDatabase[];
80
- lockedBy?: {
81
- [k: string]: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppLockPurpose;
82
- } | undefined;
83
- phase: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppPhase;
84
- projectId: string;
85
- screenshotId?: string | undefined;
86
- screenshotRef?: string | undefined;
87
- shortId: string;
88
- systemSoftware: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppInstalledSystemSoftware[];
89
- updatePolicy: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppAppUpdatePolicy;
90
- userInputs: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppSavedUserInput[];
91
- }): DataModel<{
92
- appId: string;
93
- appVersion: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppVersionStatus;
94
- createdAt: string;
95
- customDocumentRoot?: string | undefined;
96
- deletionRequested?: boolean | undefined;
97
- description: string;
98
- disabled: boolean;
99
- id: string;
100
- installationPath: string;
101
- linkedDatabases: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppLinkedDatabase[];
102
- lockedBy?: {
103
- [k: string]: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppLockPurpose;
104
- } | undefined;
105
- phase: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppPhase;
106
- projectId: string;
107
- screenshotId?: string | undefined;
108
- screenshotRef?: string | undefined;
109
- shortId: string;
110
- systemSoftware: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppInstalledSystemSoftware[];
111
- updatePolicy: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppAppUpdatePolicy;
112
- userInputs: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppSavedUserInput[];
113
- }>;
114
- }]>;
115
- export declare class AppInstallationDetailed extends AppInstallationDetailed_base {
116
- constructor(data: AppInstallationData);
117
- }
118
- declare const AppInstallationListItem_base: import("polytype").Polytype.ClusteredConstructor<[typeof AppInstallationCommon, {
119
- new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppAppInstallation): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppAppInstallation>;
120
- }]>;
121
- export declare class AppInstallationListItem extends AppInstallationListItem_base {
122
- constructor(data: AppInstallationListItemData);
123
- }
124
- export declare class AppInstallationListQuery extends ListQueryModel<AppInstallationListQueryData> {
125
- readonly project: Project;
126
- constructor(project: Project, query?: AppInstallationListQueryData);
127
- refine(query: AppInstallationListQueryData): AppInstallationListQuery;
128
- execute: AsyncResourceVariant<() => Promise<AppInstallationList>>;
129
- getTotalCount: AsyncResourceVariant<() => Promise<number>>;
130
- findOneAndOnly: AsyncResourceVariant<() => Promise<AppInstallationListItem | undefined>>;
131
- }
132
- declare const AppInstallationList_base: import("polytype").Polytype.ClusteredConstructor<[typeof AppInstallationListQuery, {
133
- new (items: AppInstallationListItem[], totalCount: number): ListDataModel<AppInstallationListItem>;
134
- }]>;
135
- export declare class AppInstallationList extends AppInstallationList_base {
136
- constructor(project: Project, query: AppInstallationListQueryData, appInstallations: AppInstallationListItem[], totalCount: number);
137
- }
138
- export {};
@@ -1,3 +0,0 @@
1
- import { MittwaldAPIV2Client } from "@mittwald/api-client";
2
- import { AppInstallationBehaviors } from "./types.js";
3
- export declare const apiAppInstallationBehaviors: (client: MittwaldAPIV2Client) => AppInstallationBehaviors;
@@ -1,2 +0,0 @@
1
- export * from "./api.js";
2
- export * from "./types.js";
@@ -1,6 +0,0 @@
1
- import { AppInstallationData, AppInstallationListItemData, AppInstallationListQueryData } from "../types.js";
2
- import { QueryResponseData } from "../../../base/index.js";
3
- export interface AppInstallationBehaviors {
4
- find: (id: string) => Promise<AppInstallationData | undefined>;
5
- list: (projectId: string, query?: AppInstallationListQueryData) => Promise<QueryResponseData<AppInstallationListItemData>>;
6
- }
@@ -1,2 +0,0 @@
1
- export * from "./AppInstallation.js";
2
- export * from "./types.js";
@@ -1,4 +0,0 @@
1
- import { MittwaldAPIV2 } from "@mittwald/api-client";
2
- export type AppInstallationListQueryData = MittwaldAPIV2.Paths.V2ProjectsProjectIdAppInstallations.Get.Parameters.Query;
3
- export type AppInstallationData = MittwaldAPIV2.Operations.AppGetAppinstallation.ResponseData;
4
- export type AppInstallationListItemData = MittwaldAPIV2.Operations.AppListAppinstallations.ResponseData[number];
@@ -1 +0,0 @@
1
- export * from "./AppInstallation/index.js";
@@ -1,133 +0,0 @@
1
- import { ReferenceModel } from "../../base/ReferenceModel.js";
2
- import { ArticleData, ArticleListItemData, ArticleListQueryData, ArticleListQueryModelData } from "./types.js";
3
- import { DataModel } from "../../base/DataModel.js";
4
- import { ListQueryModel } from "../../base/ListQueryModel.js";
5
- import { ListDataModel } from "../../base/ListDataModel.js";
6
- import { Money } from "../../base/Money.js";
7
- export declare class Article extends ReferenceModel {
8
- static ofId(id: string): Article;
9
- static find: import("../../react/provideReact.js").AsyncResourceVariant<(id: string) => Promise<ArticleDetailed | undefined>>;
10
- static get: import("../../react/provideReact.js").AsyncResourceVariant<(id: string) => Promise<ArticleDetailed>>;
11
- static query(query?: ArticleListQueryModelData): ArticleListQuery;
12
- }
13
- declare const ArticleCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
14
- new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableArticle | {
15
- addons?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAddons[] | undefined;
16
- articleId: string;
17
- attributes?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAttributes[] | undefined;
18
- balanceAddonKey?: string | undefined;
19
- contractDurationInMonth: number;
20
- description?: string | undefined;
21
- forcedInvoicingPeriodInMonth?: number | undefined;
22
- hasIndependentContractPeriod?: boolean | undefined;
23
- hideOnInvoice?: boolean | undefined;
24
- machineType?: {
25
- cpu: string;
26
- memory: string;
27
- name: string;
28
- } | undefined;
29
- modifierArticles?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableModifierArticleOptions[] | undefined;
30
- name: string;
31
- orderable: "forbidden" | "internal" | "beta_testing" | "full" | "deprecated";
32
- possibleArticleChanges?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableChangeArticleOptions[] | undefined;
33
- price?: number | undefined;
34
- tags?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTag[] | undefined;
35
- template: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTemplate;
36
- }): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableArticle | {
37
- addons?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAddons[] | undefined;
38
- articleId: string;
39
- attributes?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAttributes[] | undefined;
40
- balanceAddonKey?: string | undefined;
41
- contractDurationInMonth: number;
42
- description?: string | undefined;
43
- forcedInvoicingPeriodInMonth?: number | undefined;
44
- hasIndependentContractPeriod?: boolean | undefined;
45
- hideOnInvoice?: boolean | undefined;
46
- machineType?: {
47
- cpu: string;
48
- memory: string;
49
- name: string;
50
- } | undefined;
51
- modifierArticles?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableModifierArticleOptions[] | undefined;
52
- name: string;
53
- orderable: "forbidden" | "internal" | "beta_testing" | "full" | "deprecated";
54
- possibleArticleChanges?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableChangeArticleOptions[] | undefined;
55
- price?: number | undefined;
56
- tags?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTag[] | undefined;
57
- template: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTemplate;
58
- }>;
59
- }, typeof Article]>;
60
- declare class ArticleCommon extends ArticleCommon_base {
61
- readonly price: Money;
62
- constructor(data: ArticleListItemData | ArticleData);
63
- }
64
- declare const ArticleDetailed_base: import("polytype").Polytype.ClusteredConstructor<[typeof ArticleCommon, {
65
- new (data: {
66
- addons?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAddons[] | undefined;
67
- articleId: string;
68
- attributes?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAttributes[] | undefined;
69
- balanceAddonKey?: string | undefined;
70
- contractDurationInMonth: number;
71
- description?: string | undefined;
72
- forcedInvoicingPeriodInMonth?: number | undefined;
73
- hasIndependentContractPeriod?: boolean | undefined;
74
- hideOnInvoice?: boolean | undefined;
75
- machineType?: {
76
- cpu: string;
77
- memory: string;
78
- name: string;
79
- } | undefined;
80
- modifierArticles?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableModifierArticleOptions[] | undefined;
81
- name: string;
82
- orderable: "forbidden" | "internal" | "beta_testing" | "full" | "deprecated";
83
- possibleArticleChanges?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableChangeArticleOptions[] | undefined;
84
- price?: number | undefined;
85
- tags?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTag[] | undefined;
86
- template: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTemplate;
87
- }): DataModel<{
88
- addons?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAddons[] | undefined;
89
- articleId: string;
90
- attributes?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleAttributes[] | undefined;
91
- balanceAddonKey?: string | undefined;
92
- contractDurationInMonth: number;
93
- description?: string | undefined;
94
- forcedInvoicingPeriodInMonth?: number | undefined;
95
- hasIndependentContractPeriod?: boolean | undefined;
96
- hideOnInvoice?: boolean | undefined;
97
- machineType?: {
98
- cpu: string;
99
- memory: string;
100
- name: string;
101
- } | undefined;
102
- modifierArticles?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableModifierArticleOptions[] | undefined;
103
- name: string;
104
- orderable: "forbidden" | "internal" | "beta_testing" | "full" | "deprecated";
105
- possibleArticleChanges?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableChangeArticleOptions[] | undefined;
106
- price?: number | undefined;
107
- tags?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTag[] | undefined;
108
- template: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleArticleTemplate;
109
- }>;
110
- }]>;
111
- export declare class ArticleDetailed extends ArticleDetailed_base {
112
- constructor(data: ArticleData);
113
- }
114
- declare const ArticleListItem_base: import("polytype").Polytype.ClusteredConstructor<[typeof ArticleCommon, {
115
- new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableArticle): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ArticleReadableArticle>;
116
- }]>;
117
- export declare class ArticleListItem extends ArticleListItem_base {
118
- constructor(data: ArticleListItemData);
119
- }
120
- export declare class ArticleListQuery extends ListQueryModel<ArticleListQueryModelData> {
121
- constructor(query?: ArticleListQueryModelData);
122
- refine(query: ArticleListQueryModelData): ArticleListQuery;
123
- execute: import("../../react/provideReact.js").AsyncResourceVariant<() => Promise<ArticleList>>;
124
- getTotalCount: import("../../react/provideReact.js").AsyncResourceVariant<() => Promise<number>>;
125
- findOneAndOnly: import("../../react/provideReact.js").AsyncResourceVariant<() => Promise<ArticleListItem | undefined>>;
126
- }
127
- declare const ArticleList_base: import("polytype").Polytype.ClusteredConstructor<[typeof ArticleListQuery, {
128
- new (items: ArticleListItem[], totalCount: number): ListDataModel<ArticleListItem>;
129
- }]>;
130
- export declare class ArticleList extends ArticleList_base {
131
- constructor(query: ArticleListQueryData, articles: ArticleListItem[], totalCount: number);
132
- }
133
- export {};
@@ -1,3 +0,0 @@
1
- import { ArticleBehaviors } from "./types.js";
2
- import { MittwaldAPIV2Client } from "@mittwald/api-client";
3
- export declare const apiArticleBehaviors: (client: MittwaldAPIV2Client) => ArticleBehaviors;
@@ -1,2 +0,0 @@
1
- export * from "./api.js";
2
- export * from "./types.js";
@@ -1,6 +0,0 @@
1
- import { ArticleData, ArticleListItemData, ArticleListQueryData } from "../types.js";
2
- import { QueryResponseData } from "../../../base/index.js";
3
- export interface ArticleBehaviors {
4
- find: (id: string) => Promise<ArticleData | undefined>;
5
- list: (query?: ArticleListQueryData) => Promise<QueryResponseData<ArticleListItemData>>;
6
- }
@@ -1,2 +0,0 @@
1
- export * from "./Article.js";
2
- export * from "./types.js";
@@ -1,5 +0,0 @@
1
- import { MittwaldAPIV2 } from "@mittwald/api-client";
2
- export type ArticleListQueryData = MittwaldAPIV2.Paths.V2Articles.Get.Parameters.Query;
3
- export type ArticleData = MittwaldAPIV2.Operations.ArticleGetArticle.ResponseData;
4
- export type ArticleListItemData = MittwaldAPIV2.Operations.ArticleListArticles.ResponseData[number];
5
- export type ArticleListQueryModelData = ArticleListQueryData;
@@ -1 +0,0 @@
1
- export * from "./Article/index.js";
@@ -1,5 +0,0 @@
1
- import { ReadonlyDeep } from "type-fest";
2
- export declare class DataModel<T> {
3
- readonly data: ReadonlyDeep<T>;
4
- constructor(data: T);
5
- }
@@ -1,5 +0,0 @@
1
- export declare class ListDataModel<TItem> {
2
- readonly items: readonly TItem[];
3
- readonly totalCount: number;
4
- constructor(items: TItem[], totalCount: number);
5
- }
@@ -1,9 +0,0 @@
1
- interface Options {
2
- dependencies?: string[];
3
- }
4
- export declare abstract class ListQueryModel<TQuery> {
5
- protected readonly query: TQuery;
6
- readonly queryId: string;
7
- constructor(query: TQuery, opts?: Options);
8
- }
9
- export {};
@@ -1,3 +0,0 @@
1
- import Dinero from "dinero.js";
2
- export declare const Money: typeof Dinero;
3
- export type Money = ReturnType<typeof Money>;
@@ -1,5 +0,0 @@
1
- export declare abstract class ReferenceModel {
2
- readonly id: string;
3
- constructor(id: string);
4
- describe(): string;
5
- }
@@ -1,3 +0,0 @@
1
- import { Constructor } from "type-fest";
2
- import { ReferenceModel } from "./ReferenceModel.js";
3
- export default function assertObjectFound<T>(obj: T | undefined, theClass: Constructor<unknown>, refIdOrObject: string | ReferenceModel): asserts obj is T;
@@ -1,6 +0,0 @@
1
- export * from "./assertObjectFound.js";
2
- export * from "./DataModel.js";
3
- export * from "./ReferenceModel.js";
4
- export * from "./ListDataModel.js";
5
- export * from "./ListQueryModel.js";
6
- export * from "./types.js";