@mittwald/api-client 0.0.0-development-8335166-20260625 → 0.0.0-development-38105fd-20260708
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 +29 -0
- package/dist/esm/generated/v2/client-react.js +11 -1
- package/dist/esm/generated/v2/client.js +13 -3
- package/dist/esm/generated/v2/descriptors.js +37 -7
- package/dist/esm/generated/v3-next/client-react.js +577 -0
- package/dist/esm/generated/v3-next/client.js +1056 -0
- package/dist/esm/generated/v3-next/descriptors.js +2928 -0
- package/dist/esm/generated/v3-next/types.js +1 -0
- package/dist/esm/v2/index.js +2 -0
- package/dist/esm/v3-next/default.js +38 -0
- package/dist/esm/v3-next/index.js +2 -0
- package/dist/esm/v3-next/react.js +3 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/generated/v2/client-react.d.ts +116 -12
- package/dist/types/generated/v2/client.d.ts +471 -62
- package/dist/types/generated/v2/descriptors.d.ts +14 -4
- package/dist/types/generated/v2/types.d.ts +789 -159
- package/dist/types/generated/v3-next/client-react.d.ts +3928 -0
- package/dist/types/generated/v3-next/client.d.ts +32249 -0
- package/dist/types/generated/v3-next/descriptors.d.ts +981 -0
- package/dist/types/generated/v3-next/types.d.ts +32485 -0
- package/dist/types/v2/index.d.ts +3 -0
- package/dist/types/v3-next/default.d.ts +12 -0
- package/dist/types/v3-next/index.d.ts +3 -0
- package/dist/types/v3-next/react.d.ts +3 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +35 -9
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,7 @@ 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. Deprecated: use /ai-hostings/{planId} instead. */
|
|
12
12
|
customerGetUsage: new ApiCallAsyncResourceFactory(descriptors.aiHostingCustomerGetUsage, baseClient.aiHosting.customerGetUsage).getApiResource,
|
|
13
13
|
/** Get a list of currently active models. */
|
|
14
14
|
getModels: new ApiCallAsyncResourceFactory(descriptors.aiHostingGetModels, baseClient.aiHosting.getModels).getApiResource,
|
|
@@ -20,6 +20,10 @@ const buildAiHostingApi = (baseClient) => ({
|
|
|
20
20
|
projectGetDetailedModels: new ApiCallAsyncResourceFactory(descriptors.aiHostingProjectGetDetailedModels, baseClient.aiHosting.projectGetDetailedModels).getApiResource,
|
|
21
21
|
/** Get ai hosting plan and usages of a project. Same as the customer route, but less details. */
|
|
22
22
|
projectGetUsage: new ApiCallAsyncResourceFactory(descriptors.aiHostingProjectGetUsage, baseClient.aiHosting.projectGetUsage).getApiResource,
|
|
23
|
+
/** Get ai hosting plan and usages of a customer by planId. */
|
|
24
|
+
customerGetPlan: new ApiCallAsyncResourceFactory(descriptors.aiHostingCustomerGetPlan, baseClient.aiHosting.customerGetPlan).getApiResource,
|
|
25
|
+
/** Get all ai hosting plans of a customer. */
|
|
26
|
+
customerGetPlans: new ApiCallAsyncResourceFactory(descriptors.aiHostingCustomerGetPlans, baseClient.aiHosting.customerGetPlans).getApiResource,
|
|
23
27
|
});
|
|
24
28
|
const buildAppApi = (baseClient) => ({
|
|
25
29
|
/** Get an App. */
|
|
@@ -92,6 +96,8 @@ const buildContainerApi = (baseClient) => ({
|
|
|
92
96
|
getServiceLogs: new ApiCallAsyncResourceFactory(descriptors.containerGetServiceLogs, baseClient.container.getServiceLogs).getApiResource,
|
|
93
97
|
/** Get a Service belonging to a Stack. */
|
|
94
98
|
getService: new ApiCallAsyncResourceFactory(descriptors.containerGetService, baseClient.container.getService).getApiResource,
|
|
99
|
+
/** Get a Container Template icon. */
|
|
100
|
+
getTemplateIcon: new ApiCallAsyncResourceFactory(descriptors.containerGetTemplateIcon, baseClient.container.getTemplateIcon).getApiResource,
|
|
95
101
|
/** Get a Container Template by ID. */
|
|
96
102
|
getTemplate: new ApiCallAsyncResourceFactory(descriptors.containerGetTemplate, baseClient.container.getTemplate).getApiResource,
|
|
97
103
|
/** List Stacks belonging to the executing user. */
|
|
@@ -104,6 +110,10 @@ const buildContainerApi = (baseClient) => ({
|
|
|
104
110
|
listTemplates: new ApiCallAsyncResourceFactory(descriptors.containerListTemplates, baseClient.container.listTemplates).getApiResource,
|
|
105
111
|
/** List Volumes belonging to a Project. */
|
|
106
112
|
listVolumes: new ApiCallAsyncResourceFactory(descriptors.containerListVolumes, baseClient.container.listVolumes).getApiResource,
|
|
113
|
+
/** Get Container Template statistics. */
|
|
114
|
+
getTemplateStatistics: new ApiCallAsyncResourceFactory(descriptors.containerGetTemplateStatistics, baseClient.container.getTemplateStatistics).getApiResource,
|
|
115
|
+
/** Get Container Template statistics by category. */
|
|
116
|
+
getTemplateStatisticsByCategory: new ApiCallAsyncResourceFactory(descriptors.containerGetTemplateStatisticsByCategory, baseClient.container.getTemplateStatisticsByCategory).getApiResource,
|
|
107
117
|
});
|
|
108
118
|
const buildContractApi = (baseClient) => ({
|
|
109
119
|
/** Return the BaseItem of the Contract with the given ID. */
|
|
@@ -20,7 +20,7 @@ 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. Deprecated: use /ai-hostings/{planId} instead. */
|
|
24
24
|
customerGetUsage: this.requestFunctionFactory(descriptors.aiHostingCustomerGetUsage),
|
|
25
25
|
/** Get a list of currently active models. */
|
|
26
26
|
getModels: this.requestFunctionFactory(descriptors.aiHostingGetModels),
|
|
@@ -40,6 +40,10 @@ export class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
40
40
|
projectGetUsage: this.requestFunctionFactory(descriptors.aiHostingProjectGetUsage),
|
|
41
41
|
/** Links a container with a project licence. */
|
|
42
42
|
projectLinkContainer: this.requestFunctionFactory(descriptors.aiHostingProjectLinkContainer),
|
|
43
|
+
/** Get ai hosting plan and usages of a customer by planId. */
|
|
44
|
+
customerGetPlan: this.requestFunctionFactory(descriptors.aiHostingCustomerGetPlan),
|
|
45
|
+
/** Get all ai hosting plans of a customer. */
|
|
46
|
+
customerGetPlans: this.requestFunctionFactory(descriptors.aiHostingCustomerGetPlans),
|
|
43
47
|
};
|
|
44
48
|
/** The App API allows you to manage your apps within a project, and all the system softwares that are installed as dependencies. */
|
|
45
49
|
app = {
|
|
@@ -168,6 +172,8 @@ export class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
168
172
|
getServiceLogs: this.requestFunctionFactory(descriptors.containerGetServiceLogs),
|
|
169
173
|
/** Get a Service belonging to a Stack. */
|
|
170
174
|
getService: this.requestFunctionFactory(descriptors.containerGetService),
|
|
175
|
+
/** Get a Container Template icon. */
|
|
176
|
+
getTemplateIcon: this.requestFunctionFactory(descriptors.containerGetTemplateIcon),
|
|
171
177
|
/** Get a Container Template by ID. */
|
|
172
178
|
getTemplate: this.requestFunctionFactory(descriptors.containerGetTemplate),
|
|
173
179
|
/** List Stacks belonging to the executing user. */
|
|
@@ -194,6 +200,10 @@ export class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
194
200
|
startService: this.requestFunctionFactory(descriptors.containerStartService),
|
|
195
201
|
/** Stop a started Service. */
|
|
196
202
|
stopService: this.requestFunctionFactory(descriptors.containerStopService),
|
|
203
|
+
/** Get Container Template statistics. */
|
|
204
|
+
getTemplateStatistics: this.requestFunctionFactory(descriptors.containerGetTemplateStatistics),
|
|
205
|
+
/** Get Container Template statistics by category. */
|
|
206
|
+
getTemplateStatisticsByCategory: this.requestFunctionFactory(descriptors.containerGetTemplateStatisticsByCategory),
|
|
197
207
|
};
|
|
198
208
|
/** The contract API allows you to manage your contracts and orders */
|
|
199
209
|
contract = {
|
|
@@ -712,8 +722,6 @@ export class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
712
722
|
migrationRequestMailMigration: this.requestFunctionFactory(descriptors.mailMigrationRequestMailMigration),
|
|
713
723
|
/** Recover emails for a MailAddress from a backup. */
|
|
714
724
|
recoverMailAddressEmails: this.requestFunctionFactory(descriptors.mailRecoverMailAddressEmails),
|
|
715
|
-
/** Request a rate limit change for a MailAddress. */
|
|
716
|
-
requestMailAddressRateLimitChange: this.requestFunctionFactory(descriptors.mailRequestMailAddressRateLimitChange),
|
|
717
725
|
/** Update the description of a DeliveryBox. */
|
|
718
726
|
updateDeliveryBoxDescription: this.requestFunctionFactory(descriptors.mailUpdateDeliveryBoxDescription),
|
|
719
727
|
/** Update the password of a DeliveryBox. */
|
|
@@ -722,6 +730,8 @@ export class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
722
730
|
updateMailAddressAddress: this.requestFunctionFactory(descriptors.mailUpdateMailAddressAddress),
|
|
723
731
|
/** Update the catch-all of a MailAddress. */
|
|
724
732
|
updateMailAddressCatchAll: this.requestFunctionFactory(descriptors.mailUpdateMailAddressCatchAll),
|
|
733
|
+
/** Request a rate limit change for a MailAddress. */
|
|
734
|
+
requestMailAddressRateLimitChange: this.requestFunctionFactory(descriptors.mailRequestMailAddressRateLimitChange),
|
|
725
735
|
};
|
|
726
736
|
/** The notification API allows you to manage your notifications. */
|
|
727
737
|
notification = {
|
|
@@ -40,7 +40,7 @@ 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. Deprecated: use /ai-hostings/{planId} instead. */
|
|
44
44
|
export const aiHostingCustomerGetUsage = {
|
|
45
45
|
path: "/v2/customers/{customerId}/ai-hosting",
|
|
46
46
|
method: "GET",
|
|
@@ -448,6 +448,12 @@ export const containerGetService = {
|
|
|
448
448
|
method: "GET",
|
|
449
449
|
operationId: "container-get-service",
|
|
450
450
|
};
|
|
451
|
+
/** Get a Container Template icon. */
|
|
452
|
+
export const containerGetTemplateIcon = {
|
|
453
|
+
path: "/v2/container-templates/{templateId}/icon",
|
|
454
|
+
method: "GET",
|
|
455
|
+
operationId: "container-get-template-icon",
|
|
456
|
+
};
|
|
451
457
|
/** Get a Container Template by ID. */
|
|
452
458
|
export const containerGetTemplate = {
|
|
453
459
|
path: "/v2/container-templates/{templateId}",
|
|
@@ -2044,12 +2050,6 @@ export const mailRecoverMailAddressEmails = {
|
|
|
2044
2050
|
method: "POST",
|
|
2045
2051
|
operationId: "mail-recover-mail-address-emails",
|
|
2046
2052
|
};
|
|
2047
|
-
/** Request a rate limit change for a MailAddress. */
|
|
2048
|
-
export const mailRequestMailAddressRateLimitChange = {
|
|
2049
|
-
path: "/v2/mail-addresses/{mailAddressId}/request-rate-limit-change",
|
|
2050
|
-
method: "POST",
|
|
2051
|
-
operationId: "mail-request-mail-address-rate-limit-change",
|
|
2052
|
-
};
|
|
2053
2053
|
/** Update the description of a DeliveryBox. */
|
|
2054
2054
|
export const mailUpdateDeliveryBoxDescription = {
|
|
2055
2055
|
path: "/v2/delivery-boxes/{deliveryBoxId}/description",
|
|
@@ -2896,3 +2896,33 @@ export const verificationVerifyCompany = {
|
|
|
2896
2896
|
method: "POST",
|
|
2897
2897
|
operationId: "verification-verify-company",
|
|
2898
2898
|
};
|
|
2899
|
+
/** Get Container Template statistics. */
|
|
2900
|
+
export const containerGetTemplateStatistics = {
|
|
2901
|
+
path: "/v2/container-templates/{templateId}/statistics",
|
|
2902
|
+
method: "GET",
|
|
2903
|
+
operationId: "container-get-template-statistics",
|
|
2904
|
+
};
|
|
2905
|
+
/** Get Container Template statistics by category. */
|
|
2906
|
+
export const containerGetTemplateStatisticsByCategory = {
|
|
2907
|
+
path: "/v2/container-template-categories/{category}/statistics",
|
|
2908
|
+
method: "GET",
|
|
2909
|
+
operationId: "container-get-template-statistics-by-category",
|
|
2910
|
+
};
|
|
2911
|
+
/** Get ai hosting plan and usages of a customer by planId. */
|
|
2912
|
+
export const aiHostingCustomerGetPlan = {
|
|
2913
|
+
path: "/v2/customers/{customerId}/ai-hostings/{planId}",
|
|
2914
|
+
method: "GET",
|
|
2915
|
+
operationId: "ai-hosting-customer-get-plan",
|
|
2916
|
+
};
|
|
2917
|
+
/** Get all ai hosting plans of a customer. */
|
|
2918
|
+
export const aiHostingCustomerGetPlans = {
|
|
2919
|
+
path: "/v2/customers/{customerId}/ai-hostings",
|
|
2920
|
+
method: "GET",
|
|
2921
|
+
operationId: "ai-hosting-customer-get-plans",
|
|
2922
|
+
};
|
|
2923
|
+
/** Request a rate limit change for a MailAddress. */
|
|
2924
|
+
export const mailRequestMailAddressRateLimitChange = {
|
|
2925
|
+
path: "/v2/mail-addresses/{mailAddressId}/request-rate-limit-change",
|
|
2926
|
+
method: "POST",
|
|
2927
|
+
operationId: "mail-request-mail-address-rate-limit-change",
|
|
2928
|
+
};
|