@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
|
@@ -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.405.1';
|
|
@@ -7,6 +7,10 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
7
7
|
headers?: {
|
|
8
8
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
9
9
|
} | undefined;
|
|
10
|
+
queryParameters?: {
|
|
11
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
12
|
+
planId?: string | undefined;
|
|
13
|
+
} | undefined;
|
|
10
14
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingKey[]>;
|
|
11
15
|
/** Get a key of a customer. */
|
|
12
16
|
customerGetKey: (conf: {
|
|
@@ -23,6 +27,7 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
23
27
|
keyId: string;
|
|
24
28
|
models: string[];
|
|
25
29
|
name: string;
|
|
30
|
+
planId?: string | undefined;
|
|
26
31
|
projectId?: string | undefined;
|
|
27
32
|
rateLimit: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingRateLimit;
|
|
28
33
|
tokenUsage: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingTokenUsage;
|
|
@@ -34,7 +39,7 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
34
39
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
35
40
|
} | undefined;
|
|
36
41
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingCustomerDetailedModel[]>;
|
|
37
|
-
/** Get ai hosting plan and usages of a customer. */
|
|
42
|
+
/** Get ai hosting plan and usages of a customer. Deprecated: use /ai-hostings/{planId} instead. */
|
|
38
43
|
customerGetUsage: (conf: {
|
|
39
44
|
customerId: string;
|
|
40
45
|
headers?: {
|
|
@@ -50,6 +55,7 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
50
55
|
keys: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsage;
|
|
51
56
|
modelTermsApprovalRequired: boolean;
|
|
52
57
|
nextTokenReset: string;
|
|
58
|
+
planId?: string | undefined;
|
|
53
59
|
rateLimit: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingRateLimit;
|
|
54
60
|
tokens: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsageBig;
|
|
55
61
|
topUsages?: {
|
|
@@ -71,6 +77,10 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
71
77
|
headers?: {
|
|
72
78
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
73
79
|
} | undefined;
|
|
80
|
+
queryParameters?: {
|
|
81
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
82
|
+
planId?: string | undefined;
|
|
83
|
+
} | undefined;
|
|
74
84
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingKey[]>;
|
|
75
85
|
/** Get a key of a project. */
|
|
76
86
|
projectGetKey: (conf: {
|
|
@@ -87,6 +97,7 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
87
97
|
keyId: string;
|
|
88
98
|
models: string[];
|
|
89
99
|
name: string;
|
|
100
|
+
planId?: string | undefined;
|
|
90
101
|
projectId?: string | undefined;
|
|
91
102
|
rateLimit: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingRateLimit;
|
|
92
103
|
tokenUsage: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingTokenUsage;
|
|
@@ -104,12 +115,57 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
104
115
|
headers?: {
|
|
105
116
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
106
117
|
} | undefined;
|
|
118
|
+
queryParameters?: {
|
|
119
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
120
|
+
planId?: string | undefined;
|
|
121
|
+
} | undefined;
|
|
107
122
|
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
108
123
|
keys: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsage;
|
|
109
124
|
modelTermsApprovalRequired: boolean;
|
|
110
125
|
nextTokenReset?: string | undefined;
|
|
111
126
|
projectId: string;
|
|
112
127
|
}>;
|
|
128
|
+
/** Get ai hosting plan and usages of a customer by planId. */
|
|
129
|
+
customerGetPlan: (conf: {
|
|
130
|
+
customerId: string;
|
|
131
|
+
planId: string;
|
|
132
|
+
headers?: {
|
|
133
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
queryParameters?: {
|
|
136
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
137
|
+
topUsageCount?: number | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
140
|
+
customerId: string;
|
|
141
|
+
deletedAt?: string | undefined;
|
|
142
|
+
keys: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsage;
|
|
143
|
+
modelTermsApprovalRequired: boolean;
|
|
144
|
+
nextTokenReset: string;
|
|
145
|
+
planId?: string | undefined;
|
|
146
|
+
rateLimit: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingRateLimit;
|
|
147
|
+
tokens: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsageBig;
|
|
148
|
+
topUsages?: {
|
|
149
|
+
keyId?: string;
|
|
150
|
+
name: string;
|
|
151
|
+
projectId?: string;
|
|
152
|
+
tokenUsed: number;
|
|
153
|
+
}[] | undefined;
|
|
154
|
+
}>;
|
|
155
|
+
/** Get all ai hosting plans of a customer. */
|
|
156
|
+
customerGetPlans: (conf: {
|
|
157
|
+
customerId: string;
|
|
158
|
+
headers?: {
|
|
159
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
160
|
+
} | undefined;
|
|
161
|
+
queryParameters?: {
|
|
162
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
163
|
+
topUsageCount?: number | undefined;
|
|
164
|
+
} | undefined;
|
|
165
|
+
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
166
|
+
modelTermsApprovalRequired: boolean;
|
|
167
|
+
plans: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanOptions[];
|
|
168
|
+
}>;
|
|
113
169
|
};
|
|
114
170
|
declare const buildAppApi: (baseClient: MittwaldAPIV2Client) => {
|
|
115
171
|
/** Get an App. */
|
|
@@ -669,6 +725,13 @@ declare const buildContainerApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
669
725
|
status: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerServiceStatus;
|
|
670
726
|
statusSetAt: string;
|
|
671
727
|
}>;
|
|
728
|
+
/** Get a Container Template icon. */
|
|
729
|
+
getTemplateIcon: (conf: {
|
|
730
|
+
templateId: string;
|
|
731
|
+
headers?: {
|
|
732
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
733
|
+
} | undefined;
|
|
734
|
+
}) => import("@mittwald/react-use-promise").AsyncResource<string>;
|
|
672
735
|
/** Get a Container Template by ID. */
|
|
673
736
|
getTemplate: (conf: {
|
|
674
737
|
templateId: string;
|
|
@@ -677,29 +740,42 @@ declare const buildContainerApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
677
740
|
} | undefined;
|
|
678
741
|
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
679
742
|
categories: string[];
|
|
680
|
-
description:
|
|
681
|
-
de: string;
|
|
682
|
-
en: string;
|
|
683
|
-
};
|
|
743
|
+
description: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateTranslatedString;
|
|
684
744
|
developer: string;
|
|
685
745
|
domains?: {
|
|
686
746
|
port: string;
|
|
747
|
+
purpose?: string;
|
|
687
748
|
service: string;
|
|
688
749
|
userInput: string;
|
|
689
750
|
}[] | undefined;
|
|
690
|
-
|
|
751
|
+
help?: {
|
|
752
|
+
alerts?: {
|
|
753
|
+
content: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateTranslatedString;
|
|
754
|
+
heading: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateTranslatedString;
|
|
755
|
+
link?: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateTranslatedString;
|
|
756
|
+
linkText?: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateTranslatedString;
|
|
757
|
+
status: string;
|
|
758
|
+
}[];
|
|
759
|
+
technicalDetails?: {
|
|
760
|
+
key: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateTranslatedString;
|
|
761
|
+
value: string;
|
|
762
|
+
}[];
|
|
763
|
+
} | undefined;
|
|
764
|
+
iconUrl: string;
|
|
691
765
|
id: string;
|
|
692
|
-
license?:
|
|
766
|
+
license?: {
|
|
767
|
+
link?: string;
|
|
768
|
+
name: string;
|
|
769
|
+
} | undefined;
|
|
693
770
|
manifestVersion: string;
|
|
694
|
-
name:
|
|
771
|
+
name: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateTranslatedString;
|
|
695
772
|
repository?: string | undefined;
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
en: string;
|
|
699
|
-
};
|
|
773
|
+
supportLink?: string | undefined;
|
|
774
|
+
tagline: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateTranslatedString;
|
|
700
775
|
userInputs?: {
|
|
701
776
|
dataSource?: string;
|
|
702
777
|
defaultValue?: string;
|
|
778
|
+
label?: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateTranslatedString;
|
|
703
779
|
name: string;
|
|
704
780
|
required: boolean;
|
|
705
781
|
validationSchema?: string;
|
|
@@ -765,6 +841,7 @@ declare const buildContainerApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
765
841
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
766
842
|
category?: string | undefined;
|
|
767
843
|
searchTerm?: string | undefined;
|
|
844
|
+
type?: "component" | "standalone" | undefined;
|
|
768
845
|
limit?: number | undefined;
|
|
769
846
|
skip?: number | undefined;
|
|
770
847
|
page?: number | undefined;
|
|
@@ -787,6 +864,27 @@ declare const buildContainerApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
787
864
|
page?: number | undefined;
|
|
788
865
|
} | undefined;
|
|
789
866
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerVolumeResponse[]>;
|
|
867
|
+
/** Get Container Template statistics. */
|
|
868
|
+
getTemplateStatistics: (conf: {
|
|
869
|
+
templateId: string;
|
|
870
|
+
headers?: {
|
|
871
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
872
|
+
} | undefined;
|
|
873
|
+
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
874
|
+
id: string;
|
|
875
|
+
installations: number;
|
|
876
|
+
installations30Days: number;
|
|
877
|
+
}>;
|
|
878
|
+
/** Get Container Template statistics by category. */
|
|
879
|
+
getTemplateStatisticsByCategory: (conf: {
|
|
880
|
+
category: string;
|
|
881
|
+
headers?: {
|
|
882
|
+
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
883
|
+
} | undefined;
|
|
884
|
+
}) => import("@mittwald/react-use-promise").AsyncResource<{
|
|
885
|
+
category: string;
|
|
886
|
+
templates: import("./types.js").MittwaldAPIV2.Components.Schemas.ContainerTemplateStatsResponse[];
|
|
887
|
+
}>;
|
|
790
888
|
};
|
|
791
889
|
declare const buildContractApi: (baseClient: MittwaldAPIV2Client) => {
|
|
792
890
|
/** Return the BaseItem of the Contract with the given ID. */
|
|
@@ -1210,6 +1308,11 @@ declare const buildMarketplaceApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
1210
1308
|
[x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
|
|
1211
1309
|
extensionId?: string | undefined;
|
|
1212
1310
|
extensionInstanceId?: string | undefined;
|
|
1311
|
+
limit?: number | undefined;
|
|
1312
|
+
skip?: number | undefined;
|
|
1313
|
+
page?: number | undefined;
|
|
1314
|
+
sort?: ("createdAt" | "extensionId" | "parentCustomerId" | "contractPartner.company")[] | undefined;
|
|
1315
|
+
order?: ("asc" | "desc")[] | undefined;
|
|
1213
1316
|
} | undefined;
|
|
1214
1317
|
}) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.MarketplaceContractPartner[]>;
|
|
1215
1318
|
/** List incoming Invoices of a Contributor. */
|
|
@@ -2321,6 +2424,7 @@ declare const buildDomainApi: (baseClient: MittwaldAPIV2Client) => {
|
|
|
2321
2424
|
certificateId?: string | undefined;
|
|
2322
2425
|
hostnameSubstring?: string | undefined;
|
|
2323
2426
|
appInstallationId?: string | undefined;
|
|
2427
|
+
containerId?: string | undefined;
|
|
2324
2428
|
limit?: number | undefined;
|
|
2325
2429
|
skip?: number | undefined;
|
|
2326
2430
|
page?: number | undefined;
|