@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 +29 -0
- package/dist/esm/generated/v2/client-react.js +7 -7
- package/dist/esm/generated/v2/client.js +11 -7
- package/dist/esm/generated/v2/descriptors.js +32 -20
- package/dist/esm/generated/v3-next/client-react.js +575 -0
- package/dist/esm/generated/v3-next/client.js +1058 -0
- package/dist/esm/generated/v3-next/descriptors.js +2934 -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 +71 -38
- package/dist/types/generated/v2/client.d.ts +431 -164
- package/dist/types/generated/v2/descriptors.d.ts +13 -9
- package/dist/types/generated/v2/types.d.ts +471 -292
- package/dist/types/generated/v3-next/client-react.d.ts +3924 -0
- package/dist/types/generated/v3-next/client.d.ts +32395 -0
- package/dist/types/generated/v3-next/descriptors.d.ts +983 -0
- package/dist/types/generated/v3-next/types.d.ts +32593 -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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { withAccessToken, withEventConsistencyHandling, } from "@mittwald/api-client-commons";
|
|
2
|
+
import { isBrowser } from "browser-or-node";
|
|
3
|
+
import MittwaldApiV3NextClient from "../generated/v3-next/client.js";
|
|
4
|
+
import { MittwaldAPIClientVersion } from "../version.js";
|
|
5
|
+
const defaultUserAgent = "mittwald-api-client/" + MittwaldAPIClientVersion;
|
|
6
|
+
export class MittwaldAPIClient extends MittwaldApiV3NextClient {
|
|
7
|
+
apiToken;
|
|
8
|
+
constructor(apiToken) {
|
|
9
|
+
super(MittwaldAPIClient.createAxiosDefaults());
|
|
10
|
+
this.apiToken = apiToken;
|
|
11
|
+
this.setupInterceptors();
|
|
12
|
+
}
|
|
13
|
+
static createAxiosDefaults() {
|
|
14
|
+
const headers = {};
|
|
15
|
+
// Setting user agent is not allowed in browser environment
|
|
16
|
+
if (!isBrowser) {
|
|
17
|
+
headers["User-Agent"] = defaultUserAgent;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
baseURL: "https://api.mittwald.de/",
|
|
21
|
+
headers: headers,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
setupInterceptors() {
|
|
25
|
+
withAccessToken(this, this.apiToken);
|
|
26
|
+
}
|
|
27
|
+
static newUnauthenticated() {
|
|
28
|
+
return new MittwaldAPIClient();
|
|
29
|
+
}
|
|
30
|
+
static newWithToken(apiToken) {
|
|
31
|
+
return new MittwaldAPIClient(apiToken);
|
|
32
|
+
}
|
|
33
|
+
withEventConsistencyHandling() {
|
|
34
|
+
withEventConsistencyHandling(this);
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export default MittwaldAPIClient;
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const MittwaldAPIClientVersion = '4.
|
|
1
|
+
export const MittwaldAPIClientVersion = '4.410.0';
|
|
@@ -9,7 +9,7 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
9
9
|
} | undefined;
|
|
10
10
|
queryParameters?: {
|
|
11
11
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
12
|
-
|
|
12
|
+
planId?: string | undefined;
|
|
13
13
|
} | undefined;
|
|
14
14
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingKey[]>;
|
|
15
15
|
/** Get a key of a customer. */
|
|
@@ -27,9 +27,9 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
27
27
|
keyId: string;
|
|
28
28
|
models: string[];
|
|
29
29
|
name: string;
|
|
30
|
+
planId?: string | undefined;
|
|
30
31
|
projectId?: string | undefined;
|
|
31
32
|
rateLimit: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingRateLimit;
|
|
32
|
-
subscriptionId?: string | undefined;
|
|
33
33
|
tokenUsage: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingTokenUsage;
|
|
34
34
|
}>;
|
|
35
35
|
/** Get a list of currently active models. */
|
|
@@ -39,7 +39,48 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
39
39
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
40
40
|
} | undefined;
|
|
41
41
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingCustomerDetailedModel[]>;
|
|
42
|
-
/** Get ai hosting plan and usages of a customer. */
|
|
42
|
+
/** Get ai hosting plan and usages of a customer by planId. */
|
|
43
|
+
customerGetPlan: (conf: {
|
|
44
|
+
customerId: string;
|
|
45
|
+
planId: string;
|
|
46
|
+
headers?: {
|
|
47
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
queryParameters?: {
|
|
50
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
51
|
+
topUsageCount?: number | undefined;
|
|
52
|
+
} | undefined;
|
|
53
|
+
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
54
|
+
customerId: string;
|
|
55
|
+
deletedAt?: string | undefined;
|
|
56
|
+
keys: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsage;
|
|
57
|
+
modelTermsApprovalRequired: boolean;
|
|
58
|
+
nextTokenReset: string;
|
|
59
|
+
planId?: string | undefined;
|
|
60
|
+
rateLimit: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingRateLimit;
|
|
61
|
+
tokens: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsageBig;
|
|
62
|
+
topUsages?: {
|
|
63
|
+
keyId?: string;
|
|
64
|
+
name: string;
|
|
65
|
+
projectId?: string;
|
|
66
|
+
tokenUsed: number;
|
|
67
|
+
}[] | undefined;
|
|
68
|
+
}>;
|
|
69
|
+
/** Get all ai hosting plans of a customer. */
|
|
70
|
+
customerGetPlans: (conf: {
|
|
71
|
+
customerId: string;
|
|
72
|
+
headers?: {
|
|
73
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
74
|
+
} | undefined;
|
|
75
|
+
queryParameters?: {
|
|
76
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
77
|
+
topUsageCount?: number | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
80
|
+
modelTermsApprovalRequired: boolean;
|
|
81
|
+
plans: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanOptions[];
|
|
82
|
+
}>;
|
|
83
|
+
/** Get ai hosting plan and usages of a customer. Deprecated: use /ai-hostings/{planId} instead. */
|
|
43
84
|
customerGetUsage: (conf: {
|
|
44
85
|
customerId: string;
|
|
45
86
|
headers?: {
|
|
@@ -48,7 +89,6 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
48
89
|
queryParameters?: {
|
|
49
90
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
50
91
|
topUsageCount?: number | undefined;
|
|
51
|
-
subscriptionId?: string | undefined;
|
|
52
92
|
} | undefined;
|
|
53
93
|
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
54
94
|
customerId: string;
|
|
@@ -56,8 +96,8 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
56
96
|
keys: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsage;
|
|
57
97
|
modelTermsApprovalRequired: boolean;
|
|
58
98
|
nextTokenReset: string;
|
|
99
|
+
planId?: string | undefined;
|
|
59
100
|
rateLimit: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingRateLimit;
|
|
60
|
-
subscriptionId?: string | undefined;
|
|
61
101
|
tokens: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsageBig;
|
|
62
102
|
topUsages?: {
|
|
63
103
|
keyId?: string;
|
|
@@ -80,7 +120,7 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
80
120
|
} | undefined;
|
|
81
121
|
queryParameters?: {
|
|
82
122
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
83
|
-
|
|
123
|
+
planId?: string | undefined;
|
|
84
124
|
} | undefined;
|
|
85
125
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingKey[]>;
|
|
86
126
|
/** Get a key of a project. */
|
|
@@ -98,9 +138,9 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
98
138
|
keyId: string;
|
|
99
139
|
models: string[];
|
|
100
140
|
name: string;
|
|
141
|
+
planId?: string | undefined;
|
|
101
142
|
projectId?: string | undefined;
|
|
102
143
|
rateLimit: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingRateLimit;
|
|
103
|
-
subscriptionId?: string | undefined;
|
|
104
144
|
tokenUsage: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingTokenUsage;
|
|
105
145
|
}>;
|
|
106
146
|
/** Get a list of currently active models. */
|
|
@@ -118,7 +158,7 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
118
158
|
} | undefined;
|
|
119
159
|
queryParameters?: {
|
|
120
160
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
121
|
-
|
|
161
|
+
planId?: string | undefined;
|
|
122
162
|
} | undefined;
|
|
123
163
|
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
124
164
|
keys: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsage;
|
|
@@ -126,15 +166,6 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
126
166
|
nextTokenReset?: string | undefined;
|
|
127
167
|
projectId: string;
|
|
128
168
|
}>;
|
|
129
|
-
/** Get ai hosting subscriptions of a customer. */
|
|
130
|
-
customerGetSubscriptions: (conf: {
|
|
131
|
-
customerId: string;
|
|
132
|
-
headers?: {
|
|
133
|
-
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
134
|
-
} | undefined;
|
|
135
|
-
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
136
|
-
subscriptionIds: string[];
|
|
137
|
-
}>;
|
|
138
169
|
};
|
|
139
170
|
declare const buildAppApi: (baseClient: MittwaldAPIV2Client) => {
|
|
140
171
|
/** Get an App. */
|
|
@@ -572,6 +603,7 @@ declare const buildContainerApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
572
603
|
} | undefined;
|
|
573
604
|
queryParameters?: {
|
|
574
605
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
606
|
+
searchTerm?: string | undefined;
|
|
575
607
|
limit?: number | undefined;
|
|
576
608
|
skip?: number | undefined;
|
|
577
609
|
page?: number | undefined;
|
|
@@ -801,6 +833,20 @@ declare const buildContainerApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
801
833
|
page?: number | undefined;
|
|
802
834
|
} | undefined;
|
|
803
835
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerVolumeResponse[]>;
|
|
836
|
+
/** List Container Template statistics. */
|
|
837
|
+
listTemplateStatistics: (conf?: {
|
|
838
|
+
headers?: {
|
|
839
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
840
|
+
} | undefined;
|
|
841
|
+
queryParameters?: {
|
|
842
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
843
|
+
templateId?: string | undefined;
|
|
844
|
+
category?: string | undefined;
|
|
845
|
+
} | undefined;
|
|
846
|
+
} | null | undefined) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
847
|
+
category?: string | undefined;
|
|
848
|
+
templates?: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateStatsResponse[] | undefined;
|
|
849
|
+
}>;
|
|
804
850
|
/** List Container Templates. */
|
|
805
851
|
listTemplates: (conf?: {
|
|
806
852
|
headers?: {
|
|
@@ -833,27 +879,6 @@ declare const buildContainerApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
833
879
|
page?: number | undefined;
|
|
834
880
|
} | undefined;
|
|
835
881
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerVolumeResponse[]>;
|
|
836
|
-
/** Get Container Template statistics. */
|
|
837
|
-
getTemplateStatistics: (conf: {
|
|
838
|
-
templateId: string;
|
|
839
|
-
headers?: {
|
|
840
|
-
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
841
|
-
} | undefined;
|
|
842
|
-
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
843
|
-
id: string;
|
|
844
|
-
installations: number;
|
|
845
|
-
installations30Days: number;
|
|
846
|
-
}>;
|
|
847
|
-
/** Get Container Template statistics by category. */
|
|
848
|
-
getTemplateStatisticsByCategory: (conf: {
|
|
849
|
-
category: string;
|
|
850
|
-
headers?: {
|
|
851
|
-
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
852
|
-
} | undefined;
|
|
853
|
-
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
854
|
-
category: string;
|
|
855
|
-
templates: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateStatsResponse[];
|
|
856
|
-
}>;
|
|
857
882
|
};
|
|
858
883
|
declare const buildContractApi: (baseClient: MittwaldAPIV2Client) => {
|
|
859
884
|
/** Return the BaseItem of the Contract with the given ID. */
|
|
@@ -1277,6 +1302,11 @@ declare const buildMarketplaceApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
1277
1302
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
1278
1303
|
extensionId?: string | undefined;
|
|
1279
1304
|
extensionInstanceId?: string | undefined;
|
|
1305
|
+
limit?: number | undefined;
|
|
1306
|
+
skip?: number | undefined;
|
|
1307
|
+
page?: number | undefined;
|
|
1308
|
+
sort?: ("createdAt" | "extensionId" | "parentCustomerId" | "contractPartner.company")[] | undefined;
|
|
1309
|
+
order?: ("asc" | "desc")[] | undefined;
|
|
1280
1310
|
} | undefined;
|
|
1281
1311
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.MarketplaceContractPartner[]>;
|
|
1282
1312
|
/** List incoming Invoices of a Contributor. */
|
|
@@ -2388,6 +2418,7 @@ declare const buildDomainApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
2388
2418
|
certificateId?: string | undefined;
|
|
2389
2419
|
hostnameSubstring?: string | undefined;
|
|
2390
2420
|
appInstallationId?: string | undefined;
|
|
2421
|
+
containerId?: string | undefined;
|
|
2391
2422
|
limit?: number | undefined;
|
|
2392
2423
|
skip?: number | undefined;
|
|
2393
2424
|
page?: number | undefined;
|
|
@@ -2942,6 +2973,7 @@ declare const buildMailApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
2942
2973
|
mailRateLimitId: string;
|
|
2943
2974
|
headers?: {
|
|
2944
2975
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
2976
|
+
"x-access-token"?: string | undefined;
|
|
2945
2977
|
} | undefined;
|
|
2946
2978
|
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
2947
2979
|
id: string;
|
|
@@ -2980,6 +3012,7 @@ declare const buildMailApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
2980
3012
|
listMailRateLimits: (conf?: {
|
|
2981
3013
|
headers?: {
|
|
2982
3014
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
3015
|
+
"x-access-token"?: string | undefined;
|
|
2983
3016
|
} | undefined;
|
|
2984
3017
|
} | null | undefined) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.MailsystemRateLimit[]>;
|
|
2985
3018
|
/** List mail settings of a Project. */
|