@mittwald/api-models 4.448.2 → 4.450.0

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 (195) hide show
  1. package/dist/esm/app/AppInstallation/AppInstallation.js +89 -0
  2. package/dist/esm/app/AppInstallation/behaviors/api.js +24 -0
  3. package/dist/esm/app/AppInstallation/behaviors/index.js +2 -0
  4. package/dist/esm/app/AppInstallation/behaviors/types.js +1 -0
  5. package/dist/esm/app/AppInstallation/index.js +2 -0
  6. package/dist/esm/app/AppInstallation/types.js +1 -0
  7. package/dist/esm/app/index.js +1 -0
  8. package/dist/esm/article/Article/Article.js +79 -0
  9. package/dist/esm/article/Article/behaviors/api.js +22 -0
  10. package/dist/esm/article/Article/behaviors/index.js +2 -0
  11. package/dist/esm/article/Article/behaviors/types.js +1 -0
  12. package/dist/esm/article/Article/index.js +2 -0
  13. package/dist/esm/article/Article/types.js +1 -0
  14. package/dist/esm/article/index.js +1 -0
  15. package/dist/esm/base/DataModel.js +7 -0
  16. package/dist/esm/base/ListDataModel.js +8 -0
  17. package/dist/esm/base/ListQueryModel.js +11 -0
  18. package/dist/esm/base/Money.js +5 -0
  19. package/dist/esm/base/ReferenceModel.js +9 -0
  20. package/dist/esm/base/assertObjectFound.js +9 -0
  21. package/dist/esm/base/index.js +6 -0
  22. package/dist/esm/base/types.js +1 -0
  23. package/dist/esm/config/behaviors/api.js +51 -0
  24. package/dist/esm/config/behaviors/index.js +1 -0
  25. package/dist/esm/config/config.js +14 -0
  26. package/dist/esm/config/index.js +1 -0
  27. package/dist/esm/contract/Contract/Contract.js +78 -0
  28. package/dist/esm/contract/Contract/behaviors/api.js +20 -0
  29. package/dist/esm/contract/Contract/behaviors/index.js +2 -0
  30. package/dist/esm/contract/Contract/behaviors/types.js +1 -0
  31. package/dist/esm/contract/Contract/index.js +2 -0
  32. package/dist/esm/contract/Contract/types.js +1 -0
  33. package/dist/esm/contract/ContractItem/ContractItem.js +31 -0
  34. package/dist/esm/contract/ContractItem/behaviors/api.js +13 -0
  35. package/dist/esm/contract/ContractItem/behaviors/index.js +2 -0
  36. package/dist/esm/contract/ContractItem/behaviors/types.js +1 -0
  37. package/dist/esm/contract/ContractItem/index.js +2 -0
  38. package/dist/esm/contract/ContractItem/types.js +1 -0
  39. package/dist/esm/contract/index.js +2 -0
  40. package/dist/esm/customer/Customer/Customer.js +96 -0
  41. package/dist/esm/customer/Customer/behaviors/api.js +30 -0
  42. package/dist/esm/customer/Customer/behaviors/index.js +2 -0
  43. package/dist/esm/customer/Customer/behaviors/types.js +1 -0
  44. package/dist/esm/customer/Customer/index.js +2 -0
  45. package/dist/esm/customer/Customer/types.js +1 -0
  46. package/dist/esm/customer/index.js +1 -0
  47. package/dist/esm/domain/Ingress/Ingress.js +106 -0
  48. package/dist/esm/domain/Ingress/behaviors/api.js +25 -0
  49. package/dist/esm/domain/Ingress/behaviors/index.js +2 -0
  50. package/dist/esm/domain/Ingress/behaviors/types.js +1 -0
  51. package/dist/esm/domain/Ingress/index.js +2 -0
  52. package/dist/esm/domain/Ingress/types.js +1 -0
  53. package/dist/esm/domain/IngressPath/IngressPath.js +15 -0
  54. package/dist/esm/domain/IngressPath/IngressPath.test.js +16 -0
  55. package/dist/esm/domain/IngressPath/index.js +2 -0
  56. package/dist/esm/domain/IngressPath/types.js +1 -0
  57. package/dist/esm/domain/IngressTarget/IngressTarget.js +40 -0
  58. package/dist/esm/domain/IngressTarget/IngressTarget.test-types.js +10 -0
  59. package/dist/esm/domain/IngressTarget/index.js +2 -0
  60. package/dist/esm/domain/IngressTarget/types.js +1 -0
  61. package/dist/esm/domain/index.js +1 -0
  62. package/dist/esm/errors/ObjectNotFoundError.js +7 -0
  63. package/dist/esm/index.js +7 -0
  64. package/dist/esm/lib/deepFreeze.js +4 -0
  65. package/dist/esm/lib/joinedId.js +1 -0
  66. package/dist/esm/lib/types.js +1 -0
  67. package/dist/esm/marketplace/Contributor/Contributor.js +83 -0
  68. package/dist/esm/marketplace/Contributor/ContributorIncomingInvoice.js +53 -0
  69. package/dist/esm/marketplace/Contributor/behaviors/api.js +39 -0
  70. package/dist/esm/marketplace/Contributor/behaviors/index.js +2 -0
  71. package/dist/esm/marketplace/Contributor/behaviors/types.js +1 -0
  72. package/dist/esm/marketplace/Contributor/index.js +3 -0
  73. package/dist/esm/marketplace/Contributor/types.js +1 -0
  74. package/dist/esm/marketplace/index.js +1 -0
  75. package/dist/esm/project/Project/Project.js +121 -0
  76. package/dist/esm/project/Project/behaviors/api.js +58 -0
  77. package/dist/esm/project/Project/behaviors/inMem.js +28 -0
  78. package/dist/esm/project/Project/behaviors/index.js +3 -0
  79. package/dist/esm/project/Project/behaviors/types.js +1 -0
  80. package/dist/esm/project/Project/index.js +2 -0
  81. package/dist/esm/project/Project/types.js +1 -0
  82. package/dist/esm/project/index.js +1 -0
  83. package/dist/esm/react/MittwaldApiModelProvider.js +12 -0
  84. package/dist/esm/react/asyncResourceInvalidation.js +29 -0
  85. package/dist/esm/react/index.js +4 -0
  86. package/dist/esm/react/provideReact.js +27 -0
  87. package/dist/esm/react/provideReact.test-types.js +21 -0
  88. package/dist/esm/react/reactProvisionContext.js +2 -0
  89. package/dist/esm/react/reactUsePromise.js +17 -0
  90. package/dist/esm/react.js +1 -0
  91. package/dist/esm/server/Server/Server.js +102 -0
  92. package/dist/esm/server/Server/behaviors/api.js +22 -0
  93. package/dist/esm/server/Server/behaviors/index.js +2 -0
  94. package/dist/esm/server/Server/behaviors/types.js +1 -0
  95. package/dist/esm/server/Server/index.js +1 -0
  96. package/dist/esm/server/Server/types.js +1 -0
  97. package/dist/esm/server/index.js +1 -0
  98. package/dist/types/app/AppInstallation/AppInstallation.d.ts +186 -0
  99. package/dist/types/app/AppInstallation/behaviors/api.d.ts +3 -0
  100. package/dist/types/app/AppInstallation/behaviors/index.d.ts +2 -0
  101. package/dist/types/app/AppInstallation/behaviors/types.d.ts +6 -0
  102. package/dist/types/app/AppInstallation/index.d.ts +2 -0
  103. package/dist/types/app/AppInstallation/types.d.ts +4 -0
  104. package/dist/types/app/index.d.ts +1 -0
  105. package/dist/types/article/Article/Article.d.ts +133 -0
  106. package/dist/types/article/Article/behaviors/api.d.ts +3 -0
  107. package/dist/types/article/Article/behaviors/index.d.ts +2 -0
  108. package/dist/types/article/Article/behaviors/types.d.ts +6 -0
  109. package/dist/types/article/Article/index.d.ts +2 -0
  110. package/dist/types/article/Article/types.d.ts +5 -0
  111. package/dist/types/article/index.d.ts +1 -0
  112. package/dist/types/base/DataModel.d.ts +5 -0
  113. package/dist/types/base/ListDataModel.d.ts +5 -0
  114. package/dist/types/base/ListQueryModel.d.ts +9 -0
  115. package/dist/types/base/Money.d.ts +3 -0
  116. package/dist/types/base/ReferenceModel.d.ts +5 -0
  117. package/dist/types/base/assertObjectFound.d.ts +3 -0
  118. package/dist/types/base/index.d.ts +6 -0
  119. package/dist/types/base/types.d.ts +6 -0
  120. package/dist/types/config/behaviors/api.d.ts +12 -0
  121. package/dist/types/config/behaviors/index.d.ts +1 -0
  122. package/dist/types/config/config.d.ts +25 -0
  123. package/dist/types/config/index.d.ts +1 -0
  124. package/dist/types/contract/Contract/Contract.d.ts +68 -0
  125. package/dist/types/contract/Contract/behaviors/api.d.ts +3 -0
  126. package/dist/types/contract/Contract/behaviors/index.d.ts +2 -0
  127. package/dist/types/contract/Contract/behaviors/types.d.ts +9 -0
  128. package/dist/types/contract/Contract/index.d.ts +2 -0
  129. package/dist/types/contract/Contract/types.d.ts +8 -0
  130. package/dist/types/contract/ContractItem/ContractItem.d.ts +64 -0
  131. package/dist/types/contract/ContractItem/behaviors/api.d.ts +3 -0
  132. package/dist/types/contract/ContractItem/behaviors/index.d.ts +2 -0
  133. package/dist/types/contract/ContractItem/behaviors/types.d.ts +4 -0
  134. package/dist/types/contract/ContractItem/index.d.ts +2 -0
  135. package/dist/types/contract/ContractItem/types.d.ts +2 -0
  136. package/dist/types/contract/index.d.ts +2 -0
  137. package/dist/types/customer/Customer/Customer.d.ts +146 -0
  138. package/dist/types/customer/Customer/behaviors/api.d.ts +3 -0
  139. package/dist/types/customer/Customer/behaviors/index.d.ts +2 -0
  140. package/dist/types/customer/Customer/behaviors/types.d.ts +7 -0
  141. package/dist/types/customer/Customer/index.d.ts +2 -0
  142. package/dist/types/customer/Customer/types.d.ts +5 -0
  143. package/dist/types/customer/index.d.ts +1 -0
  144. package/dist/types/domain/Ingress/Ingress.d.ts +113 -0
  145. package/dist/types/domain/Ingress/behaviors/api.d.ts +3 -0
  146. package/dist/types/domain/Ingress/behaviors/index.d.ts +2 -0
  147. package/dist/types/domain/Ingress/behaviors/types.d.ts +6 -0
  148. package/dist/types/domain/Ingress/index.d.ts +2 -0
  149. package/dist/types/domain/Ingress/types.d.ts +8 -0
  150. package/dist/types/domain/IngressPath/IngressPath.d.ts +11 -0
  151. package/dist/types/domain/IngressPath/IngressPath.test.d.ts +1 -0
  152. package/dist/types/domain/IngressPath/index.d.ts +2 -0
  153. package/dist/types/domain/IngressPath/types.d.ts +2 -0
  154. package/dist/types/domain/IngressTarget/IngressTarget.d.ts +24 -0
  155. package/dist/types/domain/IngressTarget/IngressTarget.test-types.d.ts +1 -0
  156. package/dist/types/domain/IngressTarget/index.d.ts +2 -0
  157. package/dist/types/domain/IngressTarget/types.d.ts +6 -0
  158. package/dist/types/domain/index.d.ts +1 -0
  159. package/dist/types/errors/ObjectNotFoundError.d.ts +3 -0
  160. package/dist/types/index.d.ts +7 -0
  161. package/dist/types/lib/deepFreeze.d.ts +5 -0
  162. package/dist/types/lib/joinedId.d.ts +1 -0
  163. package/dist/types/lib/types.d.ts +2 -0
  164. package/dist/types/marketplace/Contributor/Contributor.d.ts +49 -0
  165. package/dist/types/marketplace/Contributor/ContributorIncomingInvoice.d.ts +31 -0
  166. package/dist/types/marketplace/Contributor/behaviors/api.d.ts +3 -0
  167. package/dist/types/marketplace/Contributor/behaviors/index.d.ts +2 -0
  168. package/dist/types/marketplace/Contributor/behaviors/types.d.ts +10 -0
  169. package/dist/types/marketplace/Contributor/index.d.ts +3 -0
  170. package/dist/types/marketplace/Contributor/types.d.ts +6 -0
  171. package/dist/types/marketplace/index.d.ts +1 -0
  172. package/dist/types/project/Project/Project.d.ts +196 -0
  173. package/dist/types/project/Project/behaviors/api.d.ts +3 -0
  174. package/dist/types/project/Project/behaviors/inMem.d.ts +3 -0
  175. package/dist/types/project/Project/behaviors/index.d.ts +3 -0
  176. package/dist/types/project/Project/behaviors/types.d.ts +12 -0
  177. package/dist/types/project/Project/index.d.ts +2 -0
  178. package/dist/types/project/Project/types.d.ts +10 -0
  179. package/dist/types/project/index.d.ts +1 -0
  180. package/dist/types/react/MittwaldApiModelProvider.d.ts +6 -0
  181. package/dist/types/react/asyncResourceInvalidation.d.ts +4 -0
  182. package/dist/types/react/index.d.ts +5 -0
  183. package/dist/types/react/provideReact.d.ts +12 -0
  184. package/dist/types/react/provideReact.test-types.d.ts +1 -0
  185. package/dist/types/react/reactProvisionContext.d.ts +3 -0
  186. package/dist/types/react/reactUsePromise.d.ts +2 -0
  187. package/dist/types/react.d.ts +1 -0
  188. package/dist/types/server/Server/Server.d.ts +119 -0
  189. package/dist/types/server/Server/behaviors/api.d.ts +3 -0
  190. package/dist/types/server/Server/behaviors/index.d.ts +2 -0
  191. package/dist/types/server/Server/behaviors/types.d.ts +6 -0
  192. package/dist/types/server/Server/index.d.ts +1 -0
  193. package/dist/types/server/Server/types.d.ts +8 -0
  194. package/dist/types/server/index.d.ts +1 -0
  195. package/package.json +3 -3
@@ -0,0 +1,6 @@
1
+ import type { MittwaldAPIV2 } from "@mittwald/api-client";
2
+ export type ContributorData = MittwaldAPIV2.Components.Schemas.MarketplaceContributor;
3
+ export type ContributorListItemData = MittwaldAPIV2.Operations.ExtensionListContributors.ResponseData[number];
4
+ export type ContributorListQueryData = MittwaldAPIV2.Paths.V2Contributors.Get.Parameters.Query;
5
+ export type ContributorIncomingInvoiceData = MittwaldAPIV2.Operations.ContributorListIncomingInvoices.ResponseData[number];
6
+ export type ContributorListIncomingInvoiceQueryData = MittwaldAPIV2.Paths.V2ContributorsContributorIdInvoicesIncoming.Get.Parameters.Query;
@@ -0,0 +1 @@
1
+ export * from "./Contributor/index.js";
@@ -0,0 +1,196 @@
1
+ import { ProjectData, ProjectListItemData, ProjectListQueryData, ProjectListQueryModelData } from "./types.js";
2
+ import { DataModel } from "../../base/DataModel.js";
3
+ import { Server } from "../../server/index.js";
4
+ import { AsyncResourceVariant } from "../../react/provideReact.js";
5
+ import { Customer } from "../../customer/Customer/Customer.js";
6
+ import { ReferenceModel } from "../../base/ReferenceModel.js";
7
+ import { IngressListItem, IngressListQuery } from "../../domain/index.js";
8
+ import { ListQueryModel } from "../../base/ListQueryModel.js";
9
+ import { ListDataModel } from "../../base/ListDataModel.js";
10
+ import { AppInstallationListQuery } from "../../app/index.js";
11
+ export declare class Project extends ReferenceModel {
12
+ readonly ingresses: IngressListQuery;
13
+ readonly appInstallations: AppInstallationListQuery;
14
+ constructor(id: string);
15
+ static ofId(id: string): Project;
16
+ static find: AsyncResourceVariant<(id: string) => Promise<ProjectDetailed | undefined>>;
17
+ static get: AsyncResourceVariant<(id: string) => Promise<ProjectDetailed>>;
18
+ static query(query?: ProjectListQueryModelData): ProjectListQuery;
19
+ /** @deprecated: use query(), Customer.projects or Server.projects */
20
+ static list: AsyncResourceVariant<(query?: ProjectListQueryData) => Promise<Readonly<Array<ProjectListItem>>>>;
21
+ static create(serverId: string, description: string): Promise<Project>;
22
+ getDetailed: AsyncResourceVariant<() => Promise<ProjectDetailed>>;
23
+ findDetailed: AsyncResourceVariant<() => Promise<ProjectDetailed | undefined>>;
24
+ /** @deprecated: use ingresses property */
25
+ listIngresses: AsyncResourceVariant<() => Promise<readonly IngressListItem[]>>;
26
+ getDefaultIngress: AsyncResourceVariant<() => Promise<IngressListItem>>;
27
+ updateDescription(description: string): Promise<void>;
28
+ leave(): Promise<void>;
29
+ delete(): Promise<void>;
30
+ }
31
+ declare const ProjectCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
32
+ new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectListItem | {
33
+ backupStorageUsageInBytes: number;
34
+ backupStorageUsageInBytesSetAt: string;
35
+ clusterDomain?: string | undefined;
36
+ clusterID?: string | undefined;
37
+ clusterId?: string | undefined;
38
+ createdAt: string;
39
+ customerId: string;
40
+ deletionRequested?: boolean | undefined;
41
+ description: string;
42
+ directories: {
43
+ [k: string]: string;
44
+ };
45
+ disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason | undefined;
46
+ disabledAt?: string | undefined;
47
+ enabled: boolean;
48
+ features?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectFeature[] | undefined;
49
+ id: string;
50
+ imageRefId?: string | undefined;
51
+ isReady: boolean;
52
+ projectHostingId?: string | undefined;
53
+ readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedProjectReadinessStatus;
54
+ serverGroupId: string;
55
+ serverId?: string | undefined;
56
+ serverShortId?: string | undefined;
57
+ shortId: string;
58
+ spec?: (import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec) | undefined;
59
+ statisticsBaseDomain?: string | undefined;
60
+ status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
61
+ statusSetAt: string;
62
+ supportedFeatures: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectFeature[];
63
+ webStorageUsageInBytes: number;
64
+ webStorageUsageInBytesSetAt: string;
65
+ }): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectListItem | {
66
+ backupStorageUsageInBytes: number;
67
+ backupStorageUsageInBytesSetAt: string;
68
+ clusterDomain?: string | undefined;
69
+ clusterID?: string | undefined;
70
+ clusterId?: string | undefined;
71
+ createdAt: string;
72
+ customerId: string;
73
+ deletionRequested?: boolean | undefined;
74
+ description: string;
75
+ directories: {
76
+ [k: string]: string;
77
+ };
78
+ disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason | undefined;
79
+ disabledAt?: string | undefined;
80
+ enabled: boolean;
81
+ features?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectFeature[] | undefined;
82
+ id: string;
83
+ imageRefId?: string | undefined;
84
+ isReady: boolean;
85
+ projectHostingId?: string | undefined;
86
+ readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedProjectReadinessStatus;
87
+ serverGroupId: string;
88
+ serverId?: string | undefined;
89
+ serverShortId?: string | undefined;
90
+ shortId: string;
91
+ spec?: (import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec) | undefined;
92
+ statisticsBaseDomain?: string | undefined;
93
+ status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
94
+ statusSetAt: string;
95
+ supportedFeatures: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectFeature[];
96
+ webStorageUsageInBytes: number;
97
+ webStorageUsageInBytesSetAt: string;
98
+ }>;
99
+ }, typeof Project]>;
100
+ declare class ProjectCommon extends ProjectCommon_base {
101
+ readonly server: Server | undefined;
102
+ readonly customer: Customer;
103
+ constructor(data: ProjectListItemData | ProjectData);
104
+ }
105
+ declare const ProjectDetailed_base: import("polytype").Polytype.ClusteredConstructor<[typeof ProjectCommon, {
106
+ new (data: {
107
+ backupStorageUsageInBytes: number;
108
+ backupStorageUsageInBytesSetAt: string;
109
+ clusterDomain?: string | undefined;
110
+ clusterID?: string | undefined;
111
+ clusterId?: string | undefined;
112
+ createdAt: string;
113
+ customerId: string;
114
+ deletionRequested?: boolean | undefined;
115
+ description: string;
116
+ directories: {
117
+ [k: string]: string;
118
+ };
119
+ disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason | undefined;
120
+ disabledAt?: string | undefined;
121
+ enabled: boolean;
122
+ features?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectFeature[] | undefined;
123
+ id: string;
124
+ imageRefId?: string | undefined;
125
+ isReady: boolean;
126
+ projectHostingId?: string | undefined;
127
+ readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedProjectReadinessStatus;
128
+ serverGroupId: string;
129
+ serverId?: string | undefined;
130
+ serverShortId?: string | undefined;
131
+ shortId: string;
132
+ spec?: (import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec) | undefined;
133
+ statisticsBaseDomain?: string | undefined;
134
+ status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
135
+ statusSetAt: string;
136
+ supportedFeatures: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectFeature[];
137
+ webStorageUsageInBytes: number;
138
+ webStorageUsageInBytesSetAt: string;
139
+ }): DataModel<{
140
+ backupStorageUsageInBytes: number;
141
+ backupStorageUsageInBytesSetAt: string;
142
+ clusterDomain?: string | undefined;
143
+ clusterID?: string | undefined;
144
+ clusterId?: string | undefined;
145
+ createdAt: string;
146
+ customerId: string;
147
+ deletionRequested?: boolean | undefined;
148
+ description: string;
149
+ directories: {
150
+ [k: string]: string;
151
+ };
152
+ disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason | undefined;
153
+ disabledAt?: string | undefined;
154
+ enabled: boolean;
155
+ features?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectFeature[] | undefined;
156
+ id: string;
157
+ imageRefId?: string | undefined;
158
+ isReady: boolean;
159
+ projectHostingId?: string | undefined;
160
+ readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedProjectReadinessStatus;
161
+ serverGroupId: string;
162
+ serverId?: string | undefined;
163
+ serverShortId?: string | undefined;
164
+ shortId: string;
165
+ spec?: (import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec) | undefined;
166
+ statisticsBaseDomain?: string | undefined;
167
+ status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
168
+ statusSetAt: string;
169
+ supportedFeatures: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectFeature[];
170
+ webStorageUsageInBytes: number;
171
+ webStorageUsageInBytesSetAt: string;
172
+ }>;
173
+ }]>;
174
+ export declare class ProjectDetailed extends ProjectDetailed_base {
175
+ constructor(data: ProjectData);
176
+ }
177
+ declare const ProjectListItem_base: import("polytype").Polytype.ClusteredConstructor<[typeof ProjectCommon, {
178
+ new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectListItem): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectListItem>;
179
+ }]>;
180
+ export declare class ProjectListItem extends ProjectListItem_base {
181
+ constructor(data: ProjectListItemData);
182
+ }
183
+ export declare class ProjectListQuery extends ListQueryModel<ProjectListQueryModelData> {
184
+ constructor(query?: ProjectListQueryModelData);
185
+ refine(query: ProjectListQueryModelData): ProjectListQuery;
186
+ execute: AsyncResourceVariant<() => Promise<ProjectList>>;
187
+ getTotalCount: AsyncResourceVariant<() => Promise<number>>;
188
+ findOneAndOnly: AsyncResourceVariant<() => Promise<ProjectListItem | undefined>>;
189
+ }
190
+ declare const ProjectList_base: import("polytype").Polytype.ClusteredConstructor<[typeof ProjectListQuery, {
191
+ new (items: ProjectListItem[], totalCount: number): ListDataModel<ProjectListItem>;
192
+ }]>;
193
+ export declare class ProjectList extends ProjectList_base {
194
+ constructor(query: ProjectListQueryModelData, projects: ProjectListItem[], totalCount: number);
195
+ }
196
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ProjectBehaviors } from "./types.js";
2
+ import { MittwaldAPIV2Client } from "@mittwald/api-client";
3
+ export declare const apiProjectBehaviors: (client: MittwaldAPIV2Client) => ProjectBehaviors;
@@ -0,0 +1,3 @@
1
+ import { ProjectBehaviors } from "./types.js";
2
+ import { ProjectData } from "../types.js";
3
+ export declare const inMemProjectBehaviors: (store: Map<string, ProjectData>) => ProjectBehaviors;
@@ -0,0 +1,3 @@
1
+ export * from "./api.js";
2
+ export * from "./inMem.js";
3
+ export * from "./types.js";
@@ -0,0 +1,12 @@
1
+ import { ProjectListItemData, ProjectData, ProjectListQueryData } from "../types.js";
2
+ import { QueryResponseData } from "../../../base/index.js";
3
+ export interface ProjectBehaviors {
4
+ find: (id: string) => Promise<ProjectData | undefined>;
5
+ list: (query?: ProjectListQueryData) => Promise<QueryResponseData<ProjectListItemData>>;
6
+ create: (serverId: string, description: string) => Promise<{
7
+ id: string;
8
+ }>;
9
+ leave: (projectId: string) => Promise<void>;
10
+ delete: (projectId: string) => Promise<void>;
11
+ updateDescription: (projectId: string, description: string) => Promise<void>;
12
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./Project.js";
2
+ export * from "./types.js";
@@ -0,0 +1,10 @@
1
+ import { MittwaldAPIV2 } from "@mittwald/api-client";
2
+ import { Server } from "../../server/index.js";
3
+ import { Customer } from "../../customer/index.js";
4
+ export type ProjectListQueryData = MittwaldAPIV2.Paths.V2Projects.Get.Parameters.Query;
5
+ export type ProjectListQueryModelData = Omit<ProjectListQueryData, "serverId" | "customerId"> & {
6
+ server?: Server;
7
+ customer?: Customer;
8
+ };
9
+ export type ProjectData = MittwaldAPIV2.Operations.ProjectGetProject.ResponseData;
10
+ export type ProjectListItemData = MittwaldAPIV2.Operations.ProjectListProjects.ResponseData[number];
@@ -0,0 +1 @@
1
+ export * from "./Project/index.js";
@@ -0,0 +1,6 @@
1
+ import { FC, PropsWithChildren, ReactNode } from "react";
2
+ interface Props extends PropsWithChildren {
3
+ fallback?: ReactNode;
4
+ }
5
+ export declare const MittwaldApiModelProvider: FC<Props>;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Commons } from "@mittwald/api-client";
2
+ export declare const refreshProvideReactCache: (tag: string) => void;
3
+ export declare const addTagToProvideReactCache: (tag: string) => void;
4
+ export declare const addUrlTagToProvideReactCache: Commons.RequestOptions["onBeforeRequest"];
@@ -0,0 +1,5 @@
1
+ export { refreshProvideReactCache, addTagToProvideReactCache, addUrlTagToProvideReactCache, } from "./asyncResourceInvalidation.js";
2
+ export * from "./MittwaldApiModelProvider.js";
3
+ export * from "./reactUsePromise.js";
4
+ export { type AsyncResourceVariant } from "./provideReact.js";
5
+ export { provideReact } from "./provideReact.js";
@@ -0,0 +1,12 @@
1
+ import { AsyncResource } from "./reactUsePromise.js";
2
+ import { AsyncReturnType } from "type-fest";
3
+ type AsyncFn = (...args: any[]) => Promise<unknown>;
4
+ type ReactProvisionDep = string | number;
5
+ type LazyReactProvisionDep = () => ReactProvisionDep;
6
+ type ReactProvisionDeps = Array<ReactProvisionDep | LazyReactProvisionDep>;
7
+ export declare const provideReact: <T extends AsyncFn>(loader: T, dependencies?: ReactProvisionDeps) => AsyncResourceVariant<T>;
8
+ export type AsyncResourceVariant<T extends AsyncFn> = T & {
9
+ asResource: (...params: Parameters<T>) => AsyncResource<AsyncReturnType<T>>;
10
+ use: (...params: Parameters<T>) => AsyncReturnType<T>;
11
+ };
12
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const reactProvisionContext: import("context").CtxCascadeApi<{
2
+ id: string;
3
+ }>;
@@ -0,0 +1,2 @@
1
+ export type ReactUsePromiseModule = typeof import("@mittwald/react-use-promise");
2
+ export type { AsyncResource, getAsyncResource, } from "@mittwald/react-use-promise";
@@ -0,0 +1 @@
1
+ export * from "./react/index.js";
@@ -0,0 +1,119 @@
1
+ import { ReferenceModel } from "../../base/ReferenceModel.js";
2
+ import { ServerData, ServerListItemData, ServerListQueryData, ServerListQueryModelData } from "./types.js";
3
+ import { DataModel } from "../../base/DataModel.js";
4
+ import { Project, ProjectListQuery } from "../../project/index.js";
5
+ import { FirstParameter, ParamsExceptFirst } from "../../lib/types.js";
6
+ import { AsyncResourceVariant } from "../../react/provideReact.js";
7
+ import { ListQueryModel } from "../../base/ListQueryModel.js";
8
+ import { ListDataModel } from "../../base/ListDataModel.js";
9
+ export declare class Server extends ReferenceModel {
10
+ readonly projects: ProjectListQuery;
11
+ constructor(id: string);
12
+ static ofId(id: string): Server;
13
+ static find: AsyncResourceVariant<(id: string) => Promise<ServerDetailed | undefined>>;
14
+ static get: AsyncResourceVariant<(id: string) => Promise<ServerDetailed>>;
15
+ static query(query?: ServerListQueryModelData): ServerListQuery;
16
+ /** @deprecated: use query() or customer.servers */
17
+ static list: AsyncResourceVariant<(query?: ServerListQueryData) => Promise<Readonly<ServerListItem[]>>>;
18
+ createProject(...parameters: ParamsExceptFirst<typeof Project.create>): ReturnType<typeof Project.create>;
19
+ /** @deprecated Use Server.projects property */
20
+ listProjects: AsyncResourceVariant<(query?: Omit<FirstParameter<typeof Project.list>, "serverId">) => ReturnType<typeof Project.list>>;
21
+ getDetailed: AsyncResourceVariant<() => Promise<ServerDetailed>>;
22
+ findDetailed: AsyncResourceVariant<() => Promise<ServerDetailed | undefined>>;
23
+ }
24
+ declare const ServerCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
25
+ new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServer | {
26
+ clusterName: string;
27
+ createdAt: string;
28
+ customerId: string;
29
+ description: string;
30
+ disabledReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerDisableReason | undefined;
31
+ groupId: string;
32
+ id: string;
33
+ imageRefId?: string | undefined;
34
+ isReady: boolean;
35
+ machineType: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectMachineType;
36
+ readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedServerReadinessStatus;
37
+ shortId: string;
38
+ statisticsBaseDomain?: string | undefined;
39
+ status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerStatus;
40
+ storage: string;
41
+ }): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServer | {
42
+ clusterName: string;
43
+ createdAt: string;
44
+ customerId: string;
45
+ description: string;
46
+ disabledReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerDisableReason | undefined;
47
+ groupId: string;
48
+ id: string;
49
+ imageRefId?: string | undefined;
50
+ isReady: boolean;
51
+ machineType: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectMachineType;
52
+ readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedServerReadinessStatus;
53
+ shortId: string;
54
+ statisticsBaseDomain?: string | undefined;
55
+ status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerStatus;
56
+ storage: string;
57
+ }>;
58
+ }, typeof Server]>;
59
+ declare class ServerCommon extends ServerCommon_base {
60
+ constructor(data: ServerListItemData | ServerData);
61
+ }
62
+ declare const ServerDetailed_base: import("polytype").Polytype.ClusteredConstructor<[typeof ServerCommon, {
63
+ new (data: {
64
+ clusterName: string;
65
+ createdAt: string;
66
+ customerId: string;
67
+ description: string;
68
+ disabledReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerDisableReason | undefined;
69
+ groupId: string;
70
+ id: string;
71
+ imageRefId?: string | undefined;
72
+ isReady: boolean;
73
+ machineType: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectMachineType;
74
+ readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedServerReadinessStatus;
75
+ shortId: string;
76
+ statisticsBaseDomain?: string | undefined;
77
+ status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerStatus;
78
+ storage: string;
79
+ }): DataModel<{
80
+ clusterName: string;
81
+ createdAt: string;
82
+ customerId: string;
83
+ description: string;
84
+ disabledReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerDisableReason | undefined;
85
+ groupId: string;
86
+ id: string;
87
+ imageRefId?: string | undefined;
88
+ isReady: boolean;
89
+ machineType: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectMachineType;
90
+ readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedServerReadinessStatus;
91
+ shortId: string;
92
+ statisticsBaseDomain?: string | undefined;
93
+ status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerStatus;
94
+ storage: string;
95
+ }>;
96
+ }]>;
97
+ export declare class ServerDetailed extends ServerDetailed_base {
98
+ constructor(data: ServerData);
99
+ }
100
+ declare const ServerListItem_base: import("polytype").Polytype.ClusteredConstructor<[typeof ServerCommon, {
101
+ new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServer): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServer>;
102
+ }]>;
103
+ export declare class ServerListItem extends ServerListItem_base {
104
+ constructor(data: ServerListItemData);
105
+ }
106
+ export declare class ServerListQuery extends ListQueryModel<ServerListQueryModelData> {
107
+ constructor(query?: ServerListQueryModelData);
108
+ refine(query: ServerListQueryModelData): ServerListQuery;
109
+ execute: AsyncResourceVariant<() => Promise<ServerList>>;
110
+ getTotalCount: AsyncResourceVariant<() => Promise<number>>;
111
+ findOneAndOnly: AsyncResourceVariant<() => Promise<ServerListItem | undefined>>;
112
+ }
113
+ declare const ServerList_base: import("polytype").Polytype.ClusteredConstructor<[typeof ServerListQuery, {
114
+ new (items: ServerListItem[], totalCount: number): ListDataModel<ServerListItem>;
115
+ }]>;
116
+ export declare class ServerList extends ServerList_base {
117
+ constructor(query: ServerListQueryData, servers: ServerListItem[], totalCount: number);
118
+ }
119
+ export {};
@@ -0,0 +1,3 @@
1
+ import { MittwaldAPIV2Client } from "@mittwald/api-client";
2
+ import { ServerBehaviors } from "./types.js";
3
+ export declare const apiServerBehaviors: (client: MittwaldAPIV2Client) => ServerBehaviors;
@@ -0,0 +1,2 @@
1
+ export * from "./api.js";
2
+ export * from "./types.js";
@@ -0,0 +1,6 @@
1
+ import { ServerListItemData, ServerData, ServerListQueryData } from "../types.js";
2
+ import { QueryResponseData } from "../../../base/index.js";
3
+ export interface ServerBehaviors {
4
+ find: (id: string) => Promise<ServerData | undefined>;
5
+ list: (query?: ServerListQueryData) => Promise<QueryResponseData<ServerListItemData>>;
6
+ }
@@ -0,0 +1 @@
1
+ export * from "./Server.js";
@@ -0,0 +1,8 @@
1
+ import { MittwaldAPIV2 } from "@mittwald/api-client";
2
+ import { Customer } from "../../customer/index.js";
3
+ export type ServerListQueryData = MittwaldAPIV2.Paths.V2Servers.Get.Parameters.Query;
4
+ export type ServerListQueryModelData = Omit<ServerListQueryData, "customerId"> & {
5
+ customer?: Customer;
6
+ };
7
+ export type ServerData = MittwaldAPIV2.Operations.ProjectGetServer.ResponseData;
8
+ export type ServerListItemData = MittwaldAPIV2.Operations.ProjectListServers.ResponseData[number];
@@ -0,0 +1 @@
1
+ export * from "./Server/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/api-models",
3
- "version": "4.448.2",
3
+ "version": "4.450.0",
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",
@@ -39,7 +39,7 @@
39
39
  "test:unit": "node --experimental-vm-modules $(yarn bin jest)"
40
40
  },
41
41
  "dependencies": {
42
- "@mittwald/api-client": "^4.448.2",
42
+ "@mittwald/api-client": "^4.450.0",
43
43
  "another-deep-freeze": "1.0.0",
44
44
  "context": "^3.0.33",
45
45
  "dinero.js": "^1.9.1",
@@ -86,5 +86,5 @@
86
86
  "optional": true
87
87
  }
88
88
  },
89
- "gitHead": "3c465d1201cd677f2f8132c9f3f1de1c795646ef"
89
+ "gitHead": "b188e8da4ea70a3e373a1ec53d767d56c6b99156"
90
90
  }