@mittwald/api-client 3.0.1 → 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/dist/cjs/generated/v2/client.d.ts +2 -3
- 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 +2 -3
- 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
|
@@ -5650,7 +5650,7 @@ export declare class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
5650
5650
|
[TKey: string]: (string | number | boolean) | (string | number | boolean)[];
|
|
5651
5651
|
}>;
|
|
5652
5652
|
}, import("@mittwald/api-client-commons").Response<{
|
|
5653
|
-
dnsValidationErrors: ("ERROR_UNSPECIFIED" | "ERROR_QUAD_A" | "ERROR_NO_A_RECORD")[];
|
|
5653
|
+
dnsValidationErrors: ("ERROR_UNSPECIFIED" | "ERROR_QUAD_A" | "ERROR_NO_A_RECORD" | "ERROR_ACME_CERTIFICATE_REQUEST_DEADLINE_EXCEEDED")[];
|
|
5654
5654
|
hostname: string;
|
|
5655
5655
|
id: string;
|
|
5656
5656
|
ips: {
|
|
@@ -6208,7 +6208,7 @@ export declare class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
6208
6208
|
isCatchAll: boolean;
|
|
6209
6209
|
mailbox: {
|
|
6210
6210
|
enableSpamProtection: boolean;
|
|
6211
|
-
password: string;
|
|
6211
|
+
password: string; /** Confirm password reset. */
|
|
6212
6212
|
quotaInBytes: number;
|
|
6213
6213
|
};
|
|
6214
6214
|
};
|
|
@@ -6261,7 +6261,6 @@ export declare class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
6261
6261
|
address: string;
|
|
6262
6262
|
autoResponder: {
|
|
6263
6263
|
active: boolean;
|
|
6264
|
-
/** Store a new ssh-key. */
|
|
6265
6264
|
expiresAt?: string | undefined;
|
|
6266
6265
|
message: string;
|
|
6267
6266
|
startsAt?: string | undefined;
|
|
@@ -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/cjs/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/cjs/v2.js
CHANGED
|
@@ -13,18 +13,25 @@ exports.MittwaldAPIClient = void 0;
|
|
|
13
13
|
const api_client_commons_1 = require("@mittwald/api-client-commons");
|
|
14
14
|
const client_js_1 = require("./generated/v2/client.js");
|
|
15
15
|
const version_js_1 = require("./version.js");
|
|
16
|
+
const browser_or_node_1 = require("browser-or-node");
|
|
16
17
|
const defaultUserAgent = "mittwald-api-client/" + version_js_1.MittwaldAPIClientVersion;
|
|
17
18
|
class MittwaldAPIClient extends client_js_1.default {
|
|
18
19
|
constructor(apiToken) {
|
|
19
|
-
super(
|
|
20
|
-
baseURL: "https://api.mittwald.de/",
|
|
21
|
-
headers: {
|
|
22
|
-
"User-Agent": defaultUserAgent,
|
|
23
|
-
},
|
|
24
|
-
});
|
|
20
|
+
super(MittwaldAPIClient.createAxiosDefaults());
|
|
25
21
|
this.apiToken = apiToken;
|
|
26
22
|
this.setupInterceptors();
|
|
27
23
|
}
|
|
24
|
+
static createAxiosDefaults() {
|
|
25
|
+
const headers = {};
|
|
26
|
+
// Setting user agent is not allowed in browser environment
|
|
27
|
+
if (!browser_or_node_1.isBrowser) {
|
|
28
|
+
headers["User-Agent"] = defaultUserAgent;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
baseURL: "https://api.mittwald.de/",
|
|
32
|
+
headers: headers,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
28
35
|
setupInterceptors() {
|
|
29
36
|
this.axios.interceptors.request.use((conf) => {
|
|
30
37
|
const token = this.apiToken;
|
|
@@ -5650,7 +5650,7 @@ export declare class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
5650
5650
|
[TKey: string]: (string | number | boolean) | (string | number | boolean)[];
|
|
5651
5651
|
}>;
|
|
5652
5652
|
}, import("@mittwald/api-client-commons").Response<{
|
|
5653
|
-
dnsValidationErrors: ("ERROR_UNSPECIFIED" | "ERROR_QUAD_A" | "ERROR_NO_A_RECORD")[];
|
|
5653
|
+
dnsValidationErrors: ("ERROR_UNSPECIFIED" | "ERROR_QUAD_A" | "ERROR_NO_A_RECORD" | "ERROR_ACME_CERTIFICATE_REQUEST_DEADLINE_EXCEEDED")[];
|
|
5654
5654
|
hostname: string;
|
|
5655
5655
|
id: string;
|
|
5656
5656
|
ips: {
|
|
@@ -6208,7 +6208,7 @@ export declare class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
6208
6208
|
isCatchAll: boolean;
|
|
6209
6209
|
mailbox: {
|
|
6210
6210
|
enableSpamProtection: boolean;
|
|
6211
|
-
password: string;
|
|
6211
|
+
password: string; /** Confirm password reset. */
|
|
6212
6212
|
quotaInBytes: number;
|
|
6213
6213
|
};
|
|
6214
6214
|
};
|
|
@@ -6261,7 +6261,6 @@ export declare class MittwaldAPIV2Client extends ApiClientBase {
|
|
|
6261
6261
|
address: string;
|
|
6262
6262
|
autoResponder: {
|
|
6263
6263
|
active: boolean;
|
|
6264
|
-
/** Store a new ssh-key. */
|
|
6265
6264
|
expiresAt?: string | undefined;
|
|
6266
6265
|
message: string;
|
|
6267
6266
|
startsAt?: string | undefined;
|
|
@@ -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 = '3.0.
|
|
1
|
+
export declare const MittwaldAPIClientVersion = '3.0.2';
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const MittwaldAPIClientVersion = '3.0.
|
|
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.0.
|
|
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": "^4.0.0"
|
|
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"
|