@mittwald/api-client 0.0.0-development-11873f7-20260707 → 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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * as Descriptors from "../generated/v2/descriptors.js";
2
+ export { MittwaldAPIClient } from "./default.js";
@@ -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;
@@ -0,0 +1,2 @@
1
+ export * as Descriptors from "../generated/v3-next/descriptors.js";
2
+ export { MittwaldAPIClient } from "./default.js";
@@ -0,0 +1,3 @@
1
+ import { MittwaldAPIV3NextClientReact as MittwaldAPIClientReact } from "../generated/v3-next/client-react.js";
2
+ export { MittwaldAPIV3NextClientReact as MittwaldAPIClientReact } from "../generated/v3-next/client-react.js";
3
+ export default MittwaldAPIClientReact;
@@ -1 +1 @@
1
- export const MittwaldAPIClientVersion = '4.405.0';
1
+ export const MittwaldAPIClientVersion = '4.405.1';
@@ -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
- subscriptionId?: string | undefined;
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,7 @@ 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. Deprecated: use /ai-hostings/{planId} instead. */
43
43
  customerGetUsage: (conf: {
44
44
  customerId: string;
45
45
  headers?: {
@@ -48,7 +48,6 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
48
48
  queryParameters?: {
49
49
  [x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
50
50
  topUsageCount?: number | undefined;
51
- subscriptionId?: string | undefined;
52
51
  } | undefined;
53
52
  }) => import("@mittwald/react-use-promise").AsyncResource<{
54
53
  customerId: string;
@@ -56,8 +55,8 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
56
55
  keys: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsage;
57
56
  modelTermsApprovalRequired: boolean;
58
57
  nextTokenReset: string;
58
+ planId?: string | undefined;
59
59
  rateLimit: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingRateLimit;
60
- subscriptionId?: string | undefined;
61
60
  tokens: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsageBig;
62
61
  topUsages?: {
63
62
  keyId?: string;
@@ -80,7 +79,7 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
80
79
  } | undefined;
81
80
  queryParameters?: {
82
81
  [x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
83
- subscriptionId?: string | undefined;
82
+ planId?: string | undefined;
84
83
  } | undefined;
85
84
  }) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingKey[]>;
86
85
  /** Get a key of a project. */
@@ -98,9 +97,9 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
98
97
  keyId: string;
99
98
  models: string[];
100
99
  name: string;
100
+ planId?: string | undefined;
101
101
  projectId?: string | undefined;
102
102
  rateLimit: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingRateLimit;
103
- subscriptionId?: string | undefined;
104
103
  tokenUsage: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingTokenUsage;
105
104
  }>;
106
105
  /** Get a list of currently active models. */
@@ -118,7 +117,7 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
118
117
  } | undefined;
119
118
  queryParameters?: {
120
119
  [x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
121
- subscriptionId?: string | undefined;
120
+ planId?: string | undefined;
122
121
  } | undefined;
123
122
  }) => import("@mittwald/react-use-promise").AsyncResource<{
124
123
  keys: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanUsage;
@@ -126,14 +125,46 @@ declare const buildAiHostingApi: (baseClient: MittwaldAPIV2Client) => {
126
125
  nextTokenReset?: string | undefined;
127
126
  projectId: string;
128
127
  }>;
129
- /** Get ai hosting subscriptions of a customer. */
130
- customerGetSubscriptions: (conf: {
128
+ /** Get ai hosting plan and usages of a customer by planId. */
129
+ customerGetPlan: (conf: {
131
130
  customerId: string;
131
+ planId: string;
132
132
  headers?: {
133
133
  [x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
134
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;
135
165
  }) => import("@mittwald/react-use-promise").AsyncResource<{
136
- subscriptionIds: string[];
166
+ modelTermsApprovalRequired: boolean;
167
+ plans: import("./types.js").MittwaldAPIV2.Components.Schemas.AihostingPlanOptions[];
137
168
  }>;
138
169
  };
139
170
  declare const buildAppApi: (baseClient: MittwaldAPIV2Client) => {
@@ -1277,6 +1308,11 @@ declare const buildMarketplaceApi: (baseClient: MittwaldAPIV2Client) => {
1277
1308
  [x: string]: (string | number | boolean) | (string | number | boolean)[] | undefined;
1278
1309
  extensionId?: string | undefined;
1279
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;
1280
1316
  } | undefined;
1281
1317
  }) => import("@mittwald/react-use-promise").AsyncResource<import("./types.js").MittwaldAPIV2.Components.Schemas.MarketplaceContractPartner[]>;
1282
1318
  /** List incoming Invoices of a Contributor. */
@@ -2388,6 +2424,7 @@ declare const buildDomainApi: (baseClient: MittwaldAPIV2Client) => {
2388
2424
  certificateId?: string | undefined;
2389
2425
  hostnameSubstring?: string | undefined;
2390
2426
  appInstallationId?: string | undefined;
2427
+ containerId?: string | undefined;
2391
2428
  limit?: number | undefined;
2392
2429
  skip?: number | undefined;
2393
2430
  page?: number | undefined;