@mittwald/api-client 0.0.0-development-11873f7-20260707 → 0.0.0-development-d575ea2-20260713

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,6 +14,7 @@ see the [LICENSE](../../LICENSE) file for details.
14
14
 
15
15
  - [Installing](#installing)
16
16
  - [Usage](#usage)
17
+ - [Using the v3-next client](#using-the-v3-next-client)
17
18
  - [Setting request parameters](#setting-request-parameters)
18
19
  - [Path parameters](#path-parameters)
19
20
  - [Headers, query parameters and request body](#headers-query-parameters-and-request-body)
@@ -58,6 +59,34 @@ different types of authentication:
58
59
  Have a look at our [API introduction][api-getting-started] for more information
59
60
  on how to obtain an API token and how to get started with the API.
60
61
 
62
+ ### Using the v3-next client
63
+
64
+ The default import path exposes the v2 client. To use the production
65
+ `v3-next` client, import it from the `@mittwald/api-client/v3-next` subpath:
66
+
67
+ ```typescript
68
+ import { MittwaldAPIClient } from "@mittwald/api-client/v3-next";
69
+
70
+ const mittwaldApi = MittwaldAPIClient.newWithToken("your-access-token");
71
+ ```
72
+
73
+ The React client is available from the matching React subpath:
74
+
75
+ ```typescript
76
+ import { MittwaldAPIClientReact } from "@mittwald/api-client/v3-next/react";
77
+ ```
78
+
79
+ TypeScript request and response types are exported through the
80
+ `MittwaldAPIV3Next` namespace:
81
+
82
+ ```typescript
83
+ import { MittwaldAPIV3Next } from "@mittwald/api-client/v3-next";
84
+ ```
85
+
86
+ This uses the published, non-development `v3-next` client. The package does not
87
+ expose a `@mittwald/api-client/v3-next-dev` import path; the `v3-next-dev`
88
+ OpenAPI spec is only used for generating development builds.
89
+
61
90
  ### Setting request parameters
62
91
 
63
92
  API requests may require these type of parameters:
@@ -8,7 +8,11 @@ const buildAiHostingApi = (baseClient) => ({
8
8
  customerGetKey: new ApiCallAsyncResourceFactory(descriptors.aiHostingCustomerGetKey, baseClient.aiHosting.customerGetKey).getApiResource,
9
9
  /** Get a list of currently active models. */
10
10
  customerGetDetailedModels: new ApiCallAsyncResourceFactory(descriptors.aiHostingCustomerGetDetailedModels, baseClient.aiHosting.customerGetDetailedModels).getApiResource,
11
- /** Get ai hosting plan and usages of a customer. */
11
+ /** Get ai hosting plan and usages of a customer by planId. */
12
+ customerGetPlan: new ApiCallAsyncResourceFactory(descriptors.aiHostingCustomerGetPlan, baseClient.aiHosting.customerGetPlan).getApiResource,
13
+ /** Get all ai hosting plans of a customer. */
14
+ customerGetPlans: new ApiCallAsyncResourceFactory(descriptors.aiHostingCustomerGetPlans, baseClient.aiHosting.customerGetPlans).getApiResource,
15
+ /** Get ai hosting plan and usages of a customer. Deprecated: use /ai-hostings/{planId} instead. */
12
16
  customerGetUsage: new ApiCallAsyncResourceFactory(descriptors.aiHostingCustomerGetUsage, baseClient.aiHosting.customerGetUsage).getApiResource,
13
17
  /** Get a list of currently active models. */
14
18
  getModels: new ApiCallAsyncResourceFactory(descriptors.aiHostingGetModels, baseClient.aiHosting.getModels).getApiResource,
@@ -20,8 +24,6 @@ const buildAiHostingApi = (baseClient) => ({
20
24
  projectGetDetailedModels: new ApiCallAsyncResourceFactory(descriptors.aiHostingProjectGetDetailedModels, baseClient.aiHosting.projectGetDetailedModels).getApiResource,
21
25
  /** Get ai hosting plan and usages of a project. Same as the customer route, but less details. */
22
26
  projectGetUsage: new ApiCallAsyncResourceFactory(descriptors.aiHostingProjectGetUsage, baseClient.aiHosting.projectGetUsage).getApiResource,
23
- /** Get ai hosting subscriptions of a customer. */
24
- customerGetSubscriptions: new ApiCallAsyncResourceFactory(descriptors.aiHostingCustomerGetSubscriptions, baseClient.aiHosting.customerGetSubscriptions).getApiResource,
25
27
  });
26
28
  const buildAppApi = (baseClient) => ({
27
29
  /** Get an App. */
@@ -104,14 +106,12 @@ const buildContainerApi = (baseClient) => ({
104
106
  listServices: new ApiCallAsyncResourceFactory(descriptors.containerListServices, baseClient.container.listServices).getApiResource,
105
107
  /** List Volumes belonging to a Stack. */
106
108
  listStackVolumes: new ApiCallAsyncResourceFactory(descriptors.containerListStackVolumes, baseClient.container.listStackVolumes).getApiResource,
109
+ /** List Container Template statistics. */
110
+ listTemplateStatistics: new ApiCallAsyncResourceFactory(descriptors.containerListTemplateStatistics, baseClient.container.listTemplateStatistics).getApiResource,
107
111
  /** List Container Templates. */
108
112
  listTemplates: new ApiCallAsyncResourceFactory(descriptors.containerListTemplates, baseClient.container.listTemplates).getApiResource,
109
113
  /** List Volumes belonging to a Project. */
110
114
  listVolumes: new ApiCallAsyncResourceFactory(descriptors.containerListVolumes, baseClient.container.listVolumes).getApiResource,
111
- /** Get Container Template statistics. */
112
- getTemplateStatistics: new ApiCallAsyncResourceFactory(descriptors.containerGetTemplateStatistics, baseClient.container.getTemplateStatistics).getApiResource,
113
- /** Get Container Template statistics by category. */
114
- getTemplateStatisticsByCategory: new ApiCallAsyncResourceFactory(descriptors.containerGetTemplateStatisticsByCategory, baseClient.container.getTemplateStatisticsByCategory).getApiResource,
115
115
  });
116
116
  const buildContractApi = (baseClient) => ({
117
117
  /** Return the BaseItem of the Contract with the given ID. */
@@ -20,7 +20,13 @@ export class MittwaldAPIV2Client extends ApiClientBase {
20
20
  customerDeleteKey: this.requestFunctionFactory(descriptors.aiHostingCustomerDeleteKey),
21
21
  /** Get a list of currently active models. */
22
22
  customerGetDetailedModels: this.requestFunctionFactory(descriptors.aiHostingCustomerGetDetailedModels),
23
- /** Get ai hosting plan and usages of a customer. */
23
+ /** Get ai hosting plan and usages of a customer by planId. */
24
+ customerGetPlan: this.requestFunctionFactory(descriptors.aiHostingCustomerGetPlan),
25
+ /** Renames an AI hosting plan. */
26
+ customerUpdatePlan: this.requestFunctionFactory(descriptors.aiHostingCustomerUpdatePlan),
27
+ /** Get all ai hosting plans of a customer. */
28
+ customerGetPlans: this.requestFunctionFactory(descriptors.aiHostingCustomerGetPlans),
29
+ /** Get ai hosting plan and usages of a customer. Deprecated: use /ai-hostings/{planId} instead. */
24
30
  customerGetUsage: this.requestFunctionFactory(descriptors.aiHostingCustomerGetUsage),
25
31
  /** Get a list of currently active models. */
26
32
  getModels: this.requestFunctionFactory(descriptors.aiHostingGetModels),
@@ -40,8 +46,6 @@ export class MittwaldAPIV2Client extends ApiClientBase {
40
46
  projectGetUsage: this.requestFunctionFactory(descriptors.aiHostingProjectGetUsage),
41
47
  /** Links a container with a project licence. */
42
48
  projectLinkContainer: this.requestFunctionFactory(descriptors.aiHostingProjectLinkContainer),
43
- /** Get ai hosting subscriptions of a customer. */
44
- customerGetSubscriptions: this.requestFunctionFactory(descriptors.aiHostingCustomerGetSubscriptions),
45
49
  };
46
50
  /** The App API allows you to manage your apps within a project, and all the system softwares that are installed as dependencies. */
47
51
  app = {
@@ -136,6 +140,8 @@ export class MittwaldAPIV2Client extends ApiClientBase {
136
140
  };
137
141
  /** The container API allows you to manage your stacks, containers, volumes and registries. */
138
142
  container = {
143
+ /** Add a component to a Stack. */
144
+ addComponent: this.requestFunctionFactory(descriptors.containerAddComponent),
139
145
  /** Call pull-image webhook */
140
146
  callPullImageWebhookForService: this.requestFunctionFactory(descriptors.containerCallPullImageWebhookForService),
141
147
  /** List Registries belonging to a Project. */
@@ -180,6 +186,8 @@ export class MittwaldAPIV2Client extends ApiClientBase {
180
186
  listServices: this.requestFunctionFactory(descriptors.containerListServices),
181
187
  /** List Volumes belonging to a Stack. */
182
188
  listStackVolumes: this.requestFunctionFactory(descriptors.containerListStackVolumes),
189
+ /** List Container Template statistics. */
190
+ listTemplateStatistics: this.requestFunctionFactory(descriptors.containerListTemplateStatistics),
183
191
  /** List Container Templates. */
184
192
  listTemplates: this.requestFunctionFactory(descriptors.containerListTemplates),
185
193
  /** List Volumes belonging to a Project. */
@@ -198,10 +206,6 @@ export class MittwaldAPIV2Client extends ApiClientBase {
198
206
  startService: this.requestFunctionFactory(descriptors.containerStartService),
199
207
  /** Stop a started Service. */
200
208
  stopService: this.requestFunctionFactory(descriptors.containerStopService),
201
- /** Get Container Template statistics. */
202
- getTemplateStatistics: this.requestFunctionFactory(descriptors.containerGetTemplateStatistics),
203
- /** Get Container Template statistics by category. */
204
- getTemplateStatisticsByCategory: this.requestFunctionFactory(descriptors.containerGetTemplateStatisticsByCategory),
205
209
  };
206
210
  /** The contract API allows you to manage your contracts and orders */
207
211
  contract = {
@@ -40,7 +40,25 @@ export const aiHostingCustomerGetDetailedModels = {
40
40
  method: "GET",
41
41
  operationId: "ai-hosting-customer-get-detailed-models",
42
42
  };
43
- /** Get ai hosting plan and usages of a customer. */
43
+ /** Get ai hosting plan and usages of a customer by planId. */
44
+ export const aiHostingCustomerGetPlan = {
45
+ path: "/v2/customers/{customerId}/ai-hostings/{planId}",
46
+ method: "GET",
47
+ operationId: "ai-hosting-customer-get-plan",
48
+ };
49
+ /** Renames an AI hosting plan. */
50
+ export const aiHostingCustomerUpdatePlan = {
51
+ path: "/v2/customers/{customerId}/ai-hostings/{planId}",
52
+ method: "PUT",
53
+ operationId: "ai-hosting-customer-update-plan",
54
+ };
55
+ /** Get all ai hosting plans of a customer. */
56
+ export const aiHostingCustomerGetPlans = {
57
+ path: "/v2/customers/{customerId}/ai-hostings",
58
+ method: "GET",
59
+ operationId: "ai-hosting-customer-get-plans",
60
+ };
61
+ /** Get ai hosting plan and usages of a customer. Deprecated: use /ai-hostings/{planId} instead. */
44
62
  export const aiHostingCustomerGetUsage = {
45
63
  path: "/v2/customers/{customerId}/ai-hosting",
46
64
  method: "GET",
@@ -346,6 +364,12 @@ export const backupUpdateProjectBackupDescription = {
346
364
  method: "PATCH",
347
365
  operationId: "backup-update-project-backup-description",
348
366
  };
367
+ /** Add a component to a Stack. */
368
+ export const containerAddComponent = {
369
+ path: "/v2/stacks/{stackId}/actions/add-component",
370
+ method: "POST",
371
+ operationId: "container-add-component",
372
+ };
349
373
  /** Call pull-image webhook */
350
374
  export const containerCallPullImageWebhookForService = {
351
375
  path: "/v2/stacks/{stackId}/webhooks/pull-image",
@@ -478,6 +502,12 @@ export const containerListStackVolumes = {
478
502
  method: "GET",
479
503
  operationId: "container-list-stack-volumes",
480
504
  };
505
+ /** List Container Template statistics. */
506
+ export const containerListTemplateStatistics = {
507
+ path: "/v2/container-template-statistics",
508
+ method: "GET",
509
+ operationId: "container-list-template-statistics",
510
+ };
481
511
  /** List Container Templates. */
482
512
  export const containerListTemplates = {
483
513
  path: "/v2/container-templates",
@@ -2052,7 +2082,7 @@ export const mailRecoverMailAddressEmails = {
2052
2082
  };
2053
2083
  /** Request a rate limit change for a MailAddress. */
2054
2084
  export const mailRequestMailAddressRateLimitChange = {
2055
- path: "/v2/mail-addresses/{mailAddressId}/request-rate-limit-change",
2085
+ path: "/v2/mail-addresses/{mailAddressId}/actions/request-rate-limit-change",
2056
2086
  method: "POST",
2057
2087
  operationId: "mail-request-mail-address-rate-limit-change",
2058
2088
  };
@@ -2902,21 +2932,3 @@ export const verificationVerifyCompany = {
2902
2932
  method: "POST",
2903
2933
  operationId: "verification-verify-company",
2904
2934
  };
2905
- /** Get ai hosting subscriptions of a customer. */
2906
- export const aiHostingCustomerGetSubscriptions = {
2907
- path: "/v2/customers/{customerId}/ai-subscriptions",
2908
- method: "GET",
2909
- operationId: "ai-hosting-customer-get-subscriptions",
2910
- };
2911
- /** Get Container Template statistics. */
2912
- export const containerGetTemplateStatistics = {
2913
- path: "/v2/container-templates/{templateId}/statistics",
2914
- method: "GET",
2915
- operationId: "container-get-template-statistics",
2916
- };
2917
- /** Get Container Template statistics by category. */
2918
- export const containerGetTemplateStatisticsByCategory = {
2919
- path: "/v2/container-template-categories/{category}/statistics",
2920
- method: "GET",
2921
- operationId: "container-get-template-statistics-by-category",
2922
- };