@mittwald/api-models 4.44.2 → 4.44.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.
@@ -1,5 +1,6 @@
1
1
  import { DataModel } from "../../base/DataModel.js";
2
2
  import { ReferenceModel } from "../../base/ReferenceModel.js";
3
+ import type { AsyncResourceVariant } from "../../lib/provideReact.js";
3
4
  import { AppInstallationListItemData, AppInstallationData } from "./types.js";
4
5
  export declare class AppInstallation extends ReferenceModel {
5
6
  static find: ((id: string) => Promise<AppInstallationDetailed | undefined>) & {
@@ -15,10 +16,7 @@ export declare class AppInstallation extends ReferenceModel {
15
16
  asResource: (projectId: string, query?: import("@mittwald/api-client").MittwaldAPIV2.Paths.V2ProjectsProjectIdAppInstallations.Get.Parameters.Query | undefined) => import("@mittwald/react-use-promise").AsyncResource<AppInstallationListItem[]>;
16
17
  use: (projectId: string, query?: import("@mittwald/api-client").MittwaldAPIV2.Paths.V2ProjectsProjectIdAppInstallations.Get.Parameters.Query | undefined) => AppInstallationListItem[];
17
18
  };
18
- getDetailed: (() => Promise<AppInstallationDetailed>) & {
19
- asResource: () => import("@mittwald/react-use-promise").AsyncResource<AppInstallationDetailed>;
20
- use: () => AppInstallationDetailed;
21
- };
19
+ getDetailed: AsyncResourceVariant<AppInstallationDetailed, []>;
22
20
  }
23
21
  declare const AppInstallationCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
24
22
  new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.AppAppInstallation | {
@@ -1,5 +1,6 @@
1
1
  import { DataModel } from "../../base/DataModel.js";
2
2
  import { ReferenceModel } from "../../base/ReferenceModel.js";
3
+ import type { AsyncResourceVariant } from "../../lib/provideReact.js";
3
4
  import { CustomerListItemData, CustomerData } from "./types.js";
4
5
  export declare class Customer extends ReferenceModel {
5
6
  static ofId(id: string): Customer;
@@ -15,10 +16,7 @@ export declare class Customer extends ReferenceModel {
15
16
  asResource: (id: string) => import("@mittwald/react-use-promise").AsyncResource<CustomerDetailed>;
16
17
  use: (id: string) => CustomerDetailed;
17
18
  };
18
- getDetailed: (() => Promise<CustomerDetailed>) & {
19
- asResource: () => import("@mittwald/react-use-promise").AsyncResource<CustomerDetailed>;
20
- use: () => CustomerDetailed;
21
- };
19
+ getDetailed: AsyncResourceVariant<CustomerDetailed, []>;
22
20
  }
23
21
  declare const CustomerCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
24
22
  new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.CustomerCustomer | {
@@ -38,7 +36,7 @@ declare const CustomerCommon_base: import("polytype").Polytype.ClusteredConstruc
38
36
  owner?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.CustomerContact | undefined;
39
37
  projectCount: number;
40
38
  vatId?: string | undefined;
41
- vatIdValidationState?: "pending" | "unspecified" | "valid" | "invalid" | undefined;
39
+ vatIdValidationState?: ("valid" | "invalid" | "pending" | "unspecified") | undefined;
42
40
  }): DataModel<import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.CustomerCustomer | {
43
41
  activeSuspension?: {
44
42
  createdAt: string;
@@ -56,7 +54,7 @@ declare const CustomerCommon_base: import("polytype").Polytype.ClusteredConstruc
56
54
  owner?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.CustomerContact | undefined;
57
55
  projectCount: number;
58
56
  vatId?: string | undefined;
59
- vatIdValidationState?: "pending" | "unspecified" | "valid" | "invalid" | undefined;
57
+ vatIdValidationState?: ("valid" | "invalid" | "pending" | "unspecified") | undefined;
60
58
  }>;
61
59
  }, typeof Customer]>;
62
60
  declare class CustomerCommon extends CustomerCommon_base {
@@ -80,7 +78,7 @@ declare const CustomerDetailed_base: import("polytype").Polytype.ClusteredConstr
80
78
  owner?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.CustomerContact | undefined;
81
79
  projectCount: number;
82
80
  vatId?: string | undefined;
83
- vatIdValidationState?: "pending" | "unspecified" | "valid" | "invalid" | undefined;
81
+ vatIdValidationState?: ("valid" | "invalid" | "pending" | "unspecified") | undefined;
84
82
  }): DataModel<{
85
83
  activeSuspension?: {
86
84
  createdAt: string;
@@ -98,7 +96,7 @@ declare const CustomerDetailed_base: import("polytype").Polytype.ClusteredConstr
98
96
  owner?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.CustomerContact | undefined;
99
97
  projectCount: number;
100
98
  vatId?: string | undefined;
101
- vatIdValidationState?: "pending" | "unspecified" | "valid" | "invalid" | undefined;
99
+ vatIdValidationState?: ("valid" | "invalid" | "pending" | "unspecified") | undefined;
102
100
  }>;
103
101
  }]>;
104
102
  export declare class CustomerDetailed extends CustomerDetailed_base {
@@ -1,5 +1,6 @@
1
1
  import { DataModel } from "../../base/DataModel.js";
2
2
  import { ReferenceModel } from "../../base/ReferenceModel.js";
3
+ import type { AsyncResourceVariant } from "../../lib/provideReact.js";
3
4
  import { IngressListItemData, IngressData, IngressListQuery } from "./types.js";
4
5
  import { IngressPath } from "../IngressPath/IngressPath.js";
5
6
  export declare class Ingress extends ReferenceModel {
@@ -17,10 +18,7 @@ export declare class Ingress extends ReferenceModel {
17
18
  asResource: (id: string) => import("@mittwald/react-use-promise").AsyncResource<IngressDetailed>;
18
19
  use: (id: string) => IngressDetailed;
19
20
  };
20
- getDetailed: (() => Promise<IngressDetailed>) & {
21
- asResource: () => import("@mittwald/react-use-promise").AsyncResource<IngressDetailed>;
22
- use: () => IngressDetailed;
23
- };
21
+ getDetailed: AsyncResourceVariant<IngressDetailed, []>;
24
22
  }
25
23
  declare const IngressCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
26
24
  new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.IngressIngress | {
@@ -1,6 +1,7 @@
1
1
  import { ProjectListItemData, ProjectData } from "./types.js";
2
2
  import { DataModel } from "../../base/DataModel.js";
3
3
  import { Server } from "../../server/index.js";
4
+ import { type AsyncResourceVariant } from "../../lib/provideReact.js";
4
5
  import { Customer } from "../../customer/Customer/Customer.js";
5
6
  import { ReferenceModel } from "../../base/ReferenceModel.js";
6
7
  import { IngressListItem } from "../../domain/index.js";
@@ -19,18 +20,9 @@ export declare class Project extends ReferenceModel {
19
20
  use: (query?: import("@mittwald/api-client").MittwaldAPIV2.Paths.V2Projects.Get.Parameters.Query | undefined) => readonly ProjectListItem[];
20
21
  };
21
22
  static create(serverId: string, description: string): Promise<Project>;
22
- getDetailed: (() => Promise<ProjectDetailed>) & {
23
- asResource: () => import("@mittwald/react-use-promise").AsyncResource<ProjectDetailed>;
24
- use: () => ProjectDetailed;
25
- };
26
- listIngresses: (() => Promise<IngressListItem[]>) & {
27
- asResource: () => import("@mittwald/react-use-promise").AsyncResource<IngressListItem[]>;
28
- use: () => IngressListItem[];
29
- };
30
- getDefaultIngress: (() => Promise<IngressListItem>) & {
31
- asResource: () => import("@mittwald/react-use-promise").AsyncResource<IngressListItem>;
32
- use: () => IngressListItem;
33
- };
23
+ getDetailed: AsyncResourceVariant<ProjectDetailed, []>;
24
+ listIngresses: AsyncResourceVariant<IngressListItem[], []>;
25
+ getDefaultIngress: AsyncResourceVariant<IngressListItem, []>;
34
26
  updateDescription(description: string): Promise<void>;
35
27
  leave(): Promise<void>;
36
28
  delete(): Promise<void>;
@@ -56,7 +48,7 @@ declare const ProjectCommon_base: import("polytype").Polytype.ClusteredConstruct
56
48
  serverId?: string | undefined;
57
49
  serverShortId?: string | undefined;
58
50
  shortId: string;
59
- spec?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | undefined;
51
+ spec?: (import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec) | undefined;
60
52
  statisticsBaseDomain?: string | undefined;
61
53
  status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
62
54
  statusSetAt: string;
@@ -69,15 +61,15 @@ declare const ProjectCommon_base: import("polytype").Polytype.ClusteredConstruct
69
61
  id: string;
70
62
  };
71
63
  description: string;
72
- disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason | undefined;
73
- disabledAt?: string | undefined;
64
+ disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason;
65
+ disabledAt?: string;
74
66
  enabled: boolean;
75
67
  id: string;
76
- imageRefId?: string | undefined;
68
+ imageRefId?: string;
77
69
  isReady: boolean;
78
- projectHostingId?: string | undefined;
70
+ projectHostingId?: string;
79
71
  readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedProjectReadinessStatus;
80
- serverId?: string | undefined;
72
+ serverId?: string;
81
73
  shortId: string;
82
74
  status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
83
75
  statusSetAt: string;
@@ -103,7 +95,7 @@ declare const ProjectCommon_base: import("polytype").Polytype.ClusteredConstruct
103
95
  serverId?: string | undefined;
104
96
  serverShortId?: string | undefined;
105
97
  shortId: string;
106
- spec?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | undefined;
98
+ spec?: (import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec) | undefined;
107
99
  statisticsBaseDomain?: string | undefined;
108
100
  status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
109
101
  statusSetAt: string;
@@ -116,15 +108,15 @@ declare const ProjectCommon_base: import("polytype").Polytype.ClusteredConstruct
116
108
  id: string;
117
109
  };
118
110
  description: string;
119
- disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason | undefined;
120
- disabledAt?: string | undefined;
111
+ disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason;
112
+ disabledAt?: string;
121
113
  enabled: boolean;
122
114
  id: string;
123
- imageRefId?: string | undefined;
115
+ imageRefId?: string;
124
116
  isReady: boolean;
125
- projectHostingId?: string | undefined;
117
+ projectHostingId?: string;
126
118
  readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedProjectReadinessStatus;
127
- serverId?: string | undefined;
119
+ serverId?: string;
128
120
  shortId: string;
129
121
  status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
130
122
  statusSetAt: string;
@@ -158,7 +150,7 @@ declare const ProjectDetailed_base: import("polytype").Polytype.ClusteredConstru
158
150
  serverId?: string | undefined;
159
151
  serverShortId?: string | undefined;
160
152
  shortId: string;
161
- spec?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | undefined;
153
+ spec?: (import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec) | undefined;
162
154
  statisticsBaseDomain?: string | undefined;
163
155
  status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
164
156
  statusSetAt: string;
@@ -184,7 +176,7 @@ declare const ProjectDetailed_base: import("polytype").Polytype.ClusteredConstru
184
176
  serverId?: string | undefined;
185
177
  serverShortId?: string | undefined;
186
178
  shortId: string;
187
- spec?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | undefined;
179
+ spec?: (import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectVisitorSpec | import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectHardwareSpec) | undefined;
188
180
  statisticsBaseDomain?: string | undefined;
189
181
  status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
190
182
  statusSetAt: string;
@@ -203,15 +195,15 @@ declare const ProjectListItem_base: import("polytype").Polytype.ClusteredConstru
203
195
  id: string;
204
196
  };
205
197
  description: string;
206
- disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason | undefined;
207
- disabledAt?: string | undefined;
198
+ disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason;
199
+ disabledAt?: string;
208
200
  enabled: boolean;
209
201
  id: string;
210
- imageRefId?: string | undefined;
202
+ imageRefId?: string;
211
203
  isReady: boolean;
212
- projectHostingId?: string | undefined;
204
+ projectHostingId?: string;
213
205
  readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedProjectReadinessStatus;
214
- serverId?: string | undefined;
206
+ serverId?: string;
215
207
  shortId: string;
216
208
  status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
217
209
  statusSetAt: string;
@@ -224,15 +216,15 @@ declare const ProjectListItem_base: import("polytype").Polytype.ClusteredConstru
224
216
  id: string;
225
217
  };
226
218
  description: string;
227
- disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason | undefined;
228
- disabledAt?: string | undefined;
219
+ disableReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDisableReason;
220
+ disabledAt?: string;
229
221
  enabled: boolean;
230
222
  id: string;
231
- imageRefId?: string | undefined;
223
+ imageRefId?: string;
232
224
  isReady: boolean;
233
- projectHostingId?: string | undefined;
225
+ projectHostingId?: string;
234
226
  readiness: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectDeprecatedProjectReadinessStatus;
235
- serverId?: string | undefined;
227
+ serverId?: string;
236
228
  shortId: string;
237
229
  status: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectProjectStatus;
238
230
  statusSetAt: string;
@@ -3,6 +3,7 @@ import { ServerData, ServerListItemData } from "./types.js";
3
3
  import { DataModel } from "../../base/DataModel.js";
4
4
  import { Project } from "../../project/index.js";
5
5
  import { ParamsExceptFirst } from "../../lib/types.js";
6
+ import { AsyncResourceVariant } from "../../lib/provideReact.js";
6
7
  export declare class Server extends ReferenceModel {
7
8
  static ofId(id: string): Server;
8
9
  static find: ((id: string) => Promise<ServerDetailed | undefined>) & {
@@ -22,10 +23,7 @@ export declare class Server extends ReferenceModel {
22
23
  asResource: (query?: Omit<import("@mittwald/api-client").MittwaldAPIV2.Paths.V2Projects.Get.Parameters.Query | undefined, "serverId"> | undefined) => import("@mittwald/react-use-promise").AsyncResource<readonly import("../../project/index.js").ProjectListItem[]>;
23
24
  use: (query?: Omit<import("@mittwald/api-client").MittwaldAPIV2.Paths.V2Projects.Get.Parameters.Query | undefined, "serverId"> | undefined) => readonly import("../../project/index.js").ProjectListItem[];
24
25
  };
25
- getDetailed: (() => Promise<ServerDetailed>) & {
26
- asResource: () => import("@mittwald/react-use-promise").AsyncResource<ServerDetailed>;
27
- use: () => ServerDetailed;
28
- };
26
+ getDetailed: AsyncResourceVariant<ServerDetailed, []>;
29
27
  }
30
28
  declare const ServerCommon_base: import("polytype").Polytype.ClusteredConstructor<[{
31
29
  new (data: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServer | {
@@ -33,7 +31,7 @@ declare const ServerCommon_base: import("polytype").Polytype.ClusteredConstructo
33
31
  createdAt: string;
34
32
  customerId: string;
35
33
  description: string;
36
- disabledReason?: "suspended" | undefined;
34
+ disabledReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerDisableReason | undefined;
37
35
  id: string;
38
36
  imageRefId?: string | undefined;
39
37
  isReady: boolean;
@@ -48,7 +46,7 @@ declare const ServerCommon_base: import("polytype").Polytype.ClusteredConstructo
48
46
  createdAt: string;
49
47
  customerId: string;
50
48
  description: string;
51
- disabledReason?: "suspended" | undefined;
49
+ disabledReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerDisableReason | undefined;
52
50
  id: string;
53
51
  imageRefId?: string | undefined;
54
52
  isReady: boolean;
@@ -69,7 +67,7 @@ declare const ServerDetailed_base: import("polytype").Polytype.ClusteredConstruc
69
67
  createdAt: string;
70
68
  customerId: string;
71
69
  description: string;
72
- disabledReason?: "suspended" | undefined;
70
+ disabledReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerDisableReason | undefined;
73
71
  id: string;
74
72
  imageRefId?: string | undefined;
75
73
  isReady: boolean;
@@ -84,7 +82,7 @@ declare const ServerDetailed_base: import("polytype").Polytype.ClusteredConstruc
84
82
  createdAt: string;
85
83
  customerId: string;
86
84
  description: string;
87
- disabledReason?: "suspended" | undefined;
85
+ disabledReason?: import("@mittwald/api-client").MittwaldAPIV2.Components.Schemas.ProjectServerDisableReason | undefined;
88
86
  id: string;
89
87
  imageRefId?: string | undefined;
90
88
  isReady: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/api-models",
3
- "version": "4.44.2",
3
+ "version": "4.44.3",
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",
@@ -37,28 +37,28 @@
37
37
  "test": "node --experimental-vm-modules $(yarn bin jest)"
38
38
  },
39
39
  "dependencies": {
40
- "@mittwald/api-client": "^4.44.0",
40
+ "@mittwald/api-client": "^4.44.3",
41
41
  "another-deep-freeze": "^1.0.0",
42
42
  "polytype": "^0.17.0",
43
- "type-fest": "^4.12.0"
43
+ "type-fest": "^4.23.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@jest/globals": "^29.7.0",
47
- "@mittwald/react-use-promise": "^2.3.12",
47
+ "@mittwald/react-use-promise": "^2.3.13",
48
48
  "@types/jest": "^29.5.12",
49
- "@types/react": "^18.2.64",
50
- "@typescript-eslint/eslint-plugin": "^7.1.1",
51
- "@typescript-eslint/parser": "^7.1.1",
49
+ "@types/react": "^18.3.3",
50
+ "@typescript-eslint/eslint-plugin": "^7.18.0",
51
+ "@typescript-eslint/parser": "^7.18.0",
52
52
  "eslint": "^8.57.0",
53
53
  "eslint-config-prettier": "^9.1.0",
54
54
  "eslint-plugin-json": "^3.1.0",
55
- "eslint-plugin-prettier": "^5.1.3",
55
+ "eslint-plugin-prettier": "^5.2.1",
56
56
  "jest": "^29.7.0",
57
- "prettier": "^3.2.5",
58
- "react": "^18.2.0",
59
- "rimraf": "^5.0.5",
60
- "ts-jest": "^29.1.2",
61
- "typescript": "^5.4.2"
57
+ "prettier": "^3.3.3",
58
+ "react": "^18.3.1",
59
+ "rimraf": "^5.0.10",
60
+ "ts-jest": "^29.2.4",
61
+ "typescript": "^5.5.4"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@mittwald/react-use-promise": "^2.3.12"
@@ -71,5 +71,5 @@
71
71
  "optional": true
72
72
  }
73
73
  },
74
- "gitHead": "03d7df8f0a9037979a9ce2478a8137911afcff87"
74
+ "gitHead": "766d82868ab69cf3ab4852b88df9acfe185de1f3"
75
75
  }