@mittwald/api-client 2.0.22 → 3.0.2
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 +90 -0
- package/dist/cjs/generated/v2/client.d.ts +250 -717
- package/dist/cjs/generated/v2/types.d.ts +1 -1
- package/dist/cjs/v2.d.ts +1 -0
- package/dist/cjs/v2.js +13 -6
- package/dist/esm/generated/v2/client.d.ts +250 -717
- package/dist/esm/generated/v2/types.d.ts +1 -1
- package/dist/esm/v2.d.ts +1 -0
- package/dist/esm/v2.js +14 -7
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
|
@@ -899,7 +899,7 @@ export declare module MittwaldAPIV2 {
|
|
|
899
899
|
/**
|
|
900
900
|
* A list of errors that occurred while validating the ingress's dns before requesting a certificate.
|
|
901
901
|
*/
|
|
902
|
-
dnsValidationErrors: ("ERROR_UNSPECIFIED" | "ERROR_QUAD_A" | "ERROR_NO_A_RECORD")[];
|
|
902
|
+
dnsValidationErrors: ("ERROR_UNSPECIFIED" | "ERROR_QUAD_A" | "ERROR_NO_A_RECORD" | "ERROR_ACME_CERTIFICATE_REQUEST_DEADLINE_EXCEEDED")[];
|
|
903
903
|
hostname: string;
|
|
904
904
|
id: string;
|
|
905
905
|
ips: {
|
package/dist/esm/v2.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export type { MittwaldAPIV2 } from "./generated/v2/types.js";
|
|
|
3
3
|
export declare class MittwaldAPIClient extends MittwaldApiV2Client {
|
|
4
4
|
private readonly apiToken;
|
|
5
5
|
private constructor();
|
|
6
|
+
private static createAxiosDefaults;
|
|
6
7
|
private setupInterceptors;
|
|
7
8
|
static newUnauthenticated(): MittwaldAPIClient;
|
|
8
9
|
static newWithToken(apiToken: string): MittwaldAPIClient;
|
package/dist/esm/v2.js
CHANGED
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
import { ApiClientError } from "@mittwald/api-client-commons";
|
|
1
|
+
import { ApiClientError, } from "@mittwald/api-client-commons";
|
|
2
2
|
import MittwaldApiV2Client from "./generated/v2/client.js";
|
|
3
3
|
import { MittwaldAPIClientVersion } from "./version.js";
|
|
4
|
+
import { isBrowser } from "browser-or-node";
|
|
4
5
|
const defaultUserAgent = "mittwald-api-client/" + MittwaldAPIClientVersion;
|
|
5
6
|
export class MittwaldAPIClient extends MittwaldApiV2Client {
|
|
6
7
|
apiToken;
|
|
7
8
|
constructor(apiToken) {
|
|
8
|
-
super(
|
|
9
|
-
baseURL: "https://api.mittwald.de/",
|
|
10
|
-
headers: {
|
|
11
|
-
"User-Agent": defaultUserAgent,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
9
|
+
super(MittwaldAPIClient.createAxiosDefaults());
|
|
14
10
|
this.apiToken = apiToken;
|
|
15
11
|
this.setupInterceptors();
|
|
16
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
|
+
}
|
|
17
24
|
setupInterceptors() {
|
|
18
25
|
this.axios.interceptors.request.use((conf) => {
|
|
19
26
|
const token = this.apiToken;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MittwaldAPIClientVersion = '
|
|
1
|
+
export declare const MittwaldAPIClientVersion = '3.0.2';
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const MittwaldAPIClientVersion = '
|
|
1
|
+
export const MittwaldAPIClientVersion = '3.0.2';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/api-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Auto-generated client for the mittwald API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "github:mittwald/api-client-js",
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"rest"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@mittwald/api-client-commons": "^
|
|
49
|
+
"@mittwald/api-client-commons": "^4.0.0",
|
|
50
|
+
"browser-or-node": "^2.1.1"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@mittwald/api-code-generator": "^1.0.0"
|