agentmail 0.2.1 → 0.2.4
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 +10 -1
- package/dist/cjs/BaseClient.d.ts +7 -7
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +1 -2
- package/dist/cjs/api/errors/IsTakenError.js +5 -1
- package/dist/cjs/api/errors/NotFoundError.js +5 -1
- package/dist/cjs/api/errors/ValidationError.js +5 -1
- package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/apiKeys/client/Client.js +8 -52
- package/dist/cjs/api/resources/domains/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/domains/client/Client.js +11 -97
- package/dist/cjs/api/resources/drafts/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/drafts/client/Client.js +20 -49
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/inboxes/client/Client.js +10 -82
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +24 -109
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +27 -142
- package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.js +16 -22
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +23 -82
- package/dist/cjs/api/resources/messages/errors/MessageRejectedError.js +5 -1
- package/dist/cjs/api/resources/metrics/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/metrics/client/Client.js +16 -22
- package/dist/cjs/api/resources/organizations/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/organizations/client/Client.js +2 -15
- package/dist/cjs/api/resources/pods/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/pods/client/Client.js +9 -67
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +8 -52
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +20 -49
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +9 -67
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +22 -67
- package/dist/cjs/api/resources/threads/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/threads/client/Client.js +22 -67
- package/dist/cjs/api/resources/threads/types/Thread.d.ts +2 -2
- package/dist/cjs/api/resources/threads/types/ThreadItem.d.ts +2 -2
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +1 -2
- package/dist/cjs/api/resources/webhooks/client/Client.js +9 -67
- package/dist/cjs/api/resources/websockets/client/Client.d.ts +2 -3
- package/dist/cjs/api/resources/websockets/client/Client.js +3 -4
- package/dist/cjs/auth/BearerAuthProvider.d.ts +14 -8
- package/dist/cjs/auth/BearerAuthProvider.js +16 -6
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/core/fetcher/Fetcher.d.ts +6 -3
- package/dist/cjs/core/fetcher/Fetcher.js +2 -1
- package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
- package/dist/cjs/core/fetcher/signals.d.ts +1 -1
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/runtime/runtime.js +11 -10
- package/dist/cjs/core/schemas/builders/object/object.js +34 -3
- package/dist/cjs/core/websocket/ws.d.ts +1 -1
- package/dist/cjs/errors/AgentMailError.js +5 -1
- package/dist/cjs/errors/AgentMailTimeoutError.js +5 -1
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
- package/dist/cjs/serialization/resources/threads/types/Thread.d.ts +2 -2
- package/dist/cjs/serialization/resources/threads/types/Thread.js +2 -2
- package/dist/cjs/serialization/resources/threads/types/ThreadItem.d.ts +2 -2
- package/dist/cjs/serialization/resources/threads/types/ThreadItem.js +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +7 -7
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +1 -2
- package/dist/esm/api/errors/IsTakenError.mjs +5 -1
- package/dist/esm/api/errors/NotFoundError.mjs +5 -1
- package/dist/esm/api/errors/ValidationError.mjs +5 -1
- package/dist/esm/api/resources/apiKeys/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/apiKeys/client/Client.mjs +8 -52
- package/dist/esm/api/resources/domains/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/domains/client/Client.mjs +11 -97
- package/dist/esm/api/resources/drafts/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/drafts/client/Client.mjs +20 -49
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/inboxes/client/Client.mjs +10 -82
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +24 -109
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +27 -142
- package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.mjs +16 -22
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +23 -82
- package/dist/esm/api/resources/messages/errors/MessageRejectedError.mjs +5 -1
- package/dist/esm/api/resources/metrics/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/metrics/client/Client.mjs +16 -22
- package/dist/esm/api/resources/organizations/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/organizations/client/Client.mjs +2 -15
- package/dist/esm/api/resources/pods/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/pods/client/Client.mjs +9 -67
- package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +8 -52
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +20 -49
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +9 -67
- package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +22 -67
- package/dist/esm/api/resources/threads/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/threads/client/Client.mjs +22 -67
- package/dist/esm/api/resources/threads/types/Thread.d.mts +2 -2
- package/dist/esm/api/resources/threads/types/ThreadItem.d.mts +2 -2
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +1 -2
- package/dist/esm/api/resources/webhooks/client/Client.mjs +9 -67
- package/dist/esm/api/resources/websockets/client/Client.d.mts +2 -3
- package/dist/esm/api/resources/websockets/client/Client.mjs +3 -4
- package/dist/esm/auth/BearerAuthProvider.d.mts +14 -8
- package/dist/esm/auth/BearerAuthProvider.mjs +16 -6
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/core/fetcher/Fetcher.d.mts +6 -3
- package/dist/esm/core/fetcher/Fetcher.mjs +2 -1
- package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
- package/dist/esm/core/fetcher/signals.d.mts +1 -1
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/runtime/runtime.mjs +11 -10
- package/dist/esm/core/schemas/builders/object/object.mjs +34 -3
- package/dist/esm/core/websocket/ws.d.mts +1 -1
- package/dist/esm/errors/AgentMailError.mjs +5 -1
- package/dist/esm/errors/AgentMailTimeoutError.mjs +5 -1
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
- package/dist/esm/serialization/resources/threads/types/Thread.d.mts +2 -2
- package/dist/esm/serialization/resources/threads/types/Thread.mjs +2 -2
- package/dist/esm/serialization/resources/threads/types/ThreadItem.d.mts +2 -2
- package/dist/esm/serialization/resources/threads/types/ThreadItem.mjs +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +16 -16
- package/package.json +6 -3
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
- package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import type { ResponseWithBody } from "./ResponseWithBody.js";
|
|
2
1
|
export type BinaryResponse = {
|
|
3
2
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
4
|
-
bodyUsed:
|
|
3
|
+
bodyUsed: Response["bodyUsed"];
|
|
5
4
|
/**
|
|
6
5
|
* Returns a ReadableStream of the response body.
|
|
7
6
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body)
|
|
8
7
|
*/
|
|
9
|
-
stream: () =>
|
|
8
|
+
stream: () => Response["body"];
|
|
10
9
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
11
|
-
arrayBuffer: () =>
|
|
10
|
+
arrayBuffer: () => ReturnType<Response["arrayBuffer"]>;
|
|
12
11
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
13
|
-
blob: () =>
|
|
12
|
+
blob: () => ReturnType<Response["blob"]>;
|
|
14
13
|
/**
|
|
15
14
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)
|
|
16
15
|
* Some versions of the Fetch API may not support this method.
|
|
17
16
|
*/
|
|
18
|
-
bytes?():
|
|
17
|
+
bytes?(): ReturnType<Response["bytes"]>;
|
|
19
18
|
};
|
|
20
|
-
export declare function getBinaryResponse(response:
|
|
19
|
+
export declare function getBinaryResponse(response: Response): BinaryResponse;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { EndpointMetadata } from "./EndpointMetadata.js";
|
|
2
2
|
import type { Supplier } from "./Supplier.js";
|
|
3
3
|
type EndpointSupplierFn<T> = (arg: {
|
|
4
|
-
endpointMetadata
|
|
4
|
+
endpointMetadata?: EndpointMetadata;
|
|
5
5
|
}) => T | Promise<T>;
|
|
6
6
|
export type EndpointSupplier<T> = Supplier<T> | EndpointSupplierFn<T>;
|
|
7
7
|
export declare const EndpointSupplier: {
|
|
8
8
|
get: <T>(supplier: EndpointSupplier<T>, arg: {
|
|
9
|
-
endpointMetadata
|
|
9
|
+
endpointMetadata?: EndpointMetadata;
|
|
10
10
|
}) => Promise<T>;
|
|
11
11
|
};
|
|
12
12
|
export {};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { type LogConfig, type Logger } from "../logging/logger.js";
|
|
2
2
|
import type { APIResponse } from "./APIResponse.js";
|
|
3
3
|
import type { EndpointMetadata } from "./EndpointMetadata.js";
|
|
4
|
-
import { EndpointSupplier } from "./EndpointSupplier.js";
|
|
5
4
|
export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
|
6
5
|
export declare namespace Fetcher {
|
|
7
6
|
interface Args {
|
|
8
7
|
url: string;
|
|
9
8
|
method: string;
|
|
10
9
|
contentType?: string;
|
|
11
|
-
headers?: Record<string,
|
|
10
|
+
headers?: Record<string, unknown>;
|
|
12
11
|
queryParameters?: Record<string, unknown>;
|
|
13
12
|
body?: unknown;
|
|
14
13
|
timeoutMs?: number;
|
|
@@ -22,7 +21,7 @@ export declare namespace Fetcher {
|
|
|
22
21
|
fetchFn?: typeof fetch;
|
|
23
22
|
logging?: LogConfig | Logger;
|
|
24
23
|
}
|
|
25
|
-
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
|
24
|
+
type Error = FailedStatusCodeError | NonJsonError | BodyIsNullError | TimeoutError | UnknownError;
|
|
26
25
|
interface FailedStatusCodeError {
|
|
27
26
|
reason: "status-code";
|
|
28
27
|
statusCode: number;
|
|
@@ -33,6 +32,10 @@ export declare namespace Fetcher {
|
|
|
33
32
|
statusCode: number;
|
|
34
33
|
rawBody: string;
|
|
35
34
|
}
|
|
35
|
+
interface BodyIsNullError {
|
|
36
|
+
reason: "body-is-null";
|
|
37
|
+
statusCode: number;
|
|
38
|
+
}
|
|
36
39
|
interface TimeoutError {
|
|
37
40
|
reason: "timeout";
|
|
38
41
|
}
|
|
@@ -212,9 +212,10 @@ function fetcherImpl(args) {
|
|
|
212
212
|
};
|
|
213
213
|
logger.debug("HTTP request succeeded", metadata);
|
|
214
214
|
}
|
|
215
|
+
const body = yield (0, getResponseBody_js_1.getResponseBody)(response, args.responseType);
|
|
215
216
|
return {
|
|
216
217
|
ok: true,
|
|
217
|
-
body:
|
|
218
|
+
body: body,
|
|
218
219
|
headers: response.headers,
|
|
219
220
|
rawResponse: (0, RawResponse_js_1.toRawResponse)(response),
|
|
220
221
|
};
|
|
@@ -12,12 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.getResponseBody = getResponseBody;
|
|
13
13
|
const json_js_1 = require("../json.js");
|
|
14
14
|
const BinaryResponse_js_1 = require("./BinaryResponse.js");
|
|
15
|
-
const ResponseWithBody_js_1 = require("./ResponseWithBody.js");
|
|
16
15
|
function getResponseBody(response, responseType) {
|
|
17
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
if (!(0, ResponseWithBody_js_1.isResponseWithBody)(response)) {
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
21
17
|
switch (responseType) {
|
|
22
18
|
case "binary-response":
|
|
23
19
|
return (0, BinaryResponse_js_1.getBinaryResponse)(response);
|
|
@@ -26,8 +22,26 @@ function getResponseBody(response, responseType) {
|
|
|
26
22
|
case "arrayBuffer":
|
|
27
23
|
return yield response.arrayBuffer();
|
|
28
24
|
case "sse":
|
|
25
|
+
if (response.body == null) {
|
|
26
|
+
return {
|
|
27
|
+
ok: false,
|
|
28
|
+
error: {
|
|
29
|
+
reason: "body-is-null",
|
|
30
|
+
statusCode: response.status,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
29
34
|
return response.body;
|
|
30
35
|
case "streaming":
|
|
36
|
+
if (response.body == null) {
|
|
37
|
+
return {
|
|
38
|
+
ok: false,
|
|
39
|
+
error: {
|
|
40
|
+
reason: "body-is-null",
|
|
41
|
+
statusCode: response.status,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
31
45
|
return response.body;
|
|
32
46
|
case "text":
|
|
33
47
|
return yield response.text();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function mergeHeaders
|
|
2
|
-
export declare function mergeOnlyDefinedHeaders
|
|
1
|
+
export declare function mergeHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown>;
|
|
2
|
+
export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown>;
|
|
@@ -71,6 +71,17 @@ function evaluateRuntime() {
|
|
|
71
71
|
version: Bun.version,
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* A constant that indicates whether the environment the code is running is in React-Native.
|
|
76
|
+
* This check should come before Node.js detection since React Native may have a process polyfill.
|
|
77
|
+
* https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
|
|
78
|
+
*/
|
|
79
|
+
const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
|
|
80
|
+
if (isReactNative) {
|
|
81
|
+
return {
|
|
82
|
+
type: "react-native",
|
|
83
|
+
};
|
|
84
|
+
}
|
|
74
85
|
/**
|
|
75
86
|
* A constant that indicates whether the environment the code is running is Node.JS.
|
|
76
87
|
*/
|
|
@@ -86,16 +97,6 @@ function evaluateRuntime() {
|
|
|
86
97
|
parsedVersion: Number(process.versions.node.split(".")[0]),
|
|
87
98
|
};
|
|
88
99
|
}
|
|
89
|
-
/**
|
|
90
|
-
* A constant that indicates whether the environment the code is running is in React-Native.
|
|
91
|
-
* https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
|
|
92
|
-
*/
|
|
93
|
-
const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
|
|
94
|
-
if (isReactNative) {
|
|
95
|
-
return {
|
|
96
|
-
type: "react-native",
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
100
|
return {
|
|
100
101
|
type: "unknown",
|
|
101
102
|
};
|
|
@@ -180,6 +180,7 @@ function getObjectUtils(schema) {
|
|
|
180
180
|
value: raw,
|
|
181
181
|
transformBase: (rawBase) => schema.parse(rawBase, opts),
|
|
182
182
|
transformExtension: (rawExtension) => extension.parse(rawExtension, opts),
|
|
183
|
+
breadcrumbsPrefix: opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix,
|
|
183
184
|
});
|
|
184
185
|
},
|
|
185
186
|
json: (parsed, opts) => {
|
|
@@ -188,6 +189,7 @@ function getObjectUtils(schema) {
|
|
|
188
189
|
value: parsed,
|
|
189
190
|
transformBase: (parsedBase) => schema.json(parsedBase, opts),
|
|
190
191
|
transformExtension: (parsedExtension) => extension.json(parsedExtension, opts),
|
|
192
|
+
breadcrumbsPrefix: opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix,
|
|
191
193
|
});
|
|
192
194
|
},
|
|
193
195
|
getType: () => Schema_js_1.SchemaType.OBJECT,
|
|
@@ -195,6 +197,8 @@ function getObjectUtils(schema) {
|
|
|
195
197
|
return Object.assign(Object.assign(Object.assign(Object.assign({}, baseSchema), (0, index_js_2.getSchemaUtils)(baseSchema)), (0, index_js_1.getObjectLikeUtils)(baseSchema)), getObjectUtils(baseSchema));
|
|
196
198
|
},
|
|
197
199
|
passthrough: () => {
|
|
200
|
+
const knownRawKeys = new Set(schema._getRawProperties());
|
|
201
|
+
const knownParsedKeys = new Set(schema._getParsedProperties());
|
|
198
202
|
const baseSchema = {
|
|
199
203
|
_getParsedProperties: () => schema._getParsedProperties(),
|
|
200
204
|
_getRawProperties: () => schema._getRawProperties(),
|
|
@@ -203,9 +207,17 @@ function getObjectUtils(schema) {
|
|
|
203
207
|
if (!transformed.ok) {
|
|
204
208
|
return transformed;
|
|
205
209
|
}
|
|
210
|
+
const extraProperties = {};
|
|
211
|
+
if (typeof raw === "object" && raw != null) {
|
|
212
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
213
|
+
if (!knownRawKeys.has(key)) {
|
|
214
|
+
extraProperties[key] = value;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
206
218
|
return {
|
|
207
219
|
ok: true,
|
|
208
|
-
value: Object.assign(Object.assign({},
|
|
220
|
+
value: Object.assign(Object.assign({}, extraProperties), transformed.value),
|
|
209
221
|
};
|
|
210
222
|
},
|
|
211
223
|
json: (parsed, opts) => {
|
|
@@ -213,9 +225,17 @@ function getObjectUtils(schema) {
|
|
|
213
225
|
if (!transformed.ok) {
|
|
214
226
|
return transformed;
|
|
215
227
|
}
|
|
228
|
+
const extraProperties = {};
|
|
229
|
+
if (typeof parsed === "object" && parsed != null) {
|
|
230
|
+
for (const [key, value] of Object.entries(parsed)) {
|
|
231
|
+
if (!knownParsedKeys.has(key)) {
|
|
232
|
+
extraProperties[key] = value;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
216
236
|
return {
|
|
217
237
|
ok: true,
|
|
218
|
-
value: Object.assign(Object.assign({},
|
|
238
|
+
value: Object.assign(Object.assign({}, extraProperties), transformed.value),
|
|
219
239
|
};
|
|
220
240
|
},
|
|
221
241
|
getType: () => Schema_js_1.SchemaType.OBJECT,
|
|
@@ -224,7 +244,18 @@ function getObjectUtils(schema) {
|
|
|
224
244
|
},
|
|
225
245
|
};
|
|
226
246
|
}
|
|
227
|
-
function validateAndTransformExtendedObject({ extensionKeys, value, transformBase, transformExtension, }) {
|
|
247
|
+
function validateAndTransformExtendedObject({ extensionKeys, value, transformBase, transformExtension, breadcrumbsPrefix = [], }) {
|
|
248
|
+
if (!(0, isPlainObject_js_1.isPlainObject)(value)) {
|
|
249
|
+
return {
|
|
250
|
+
ok: false,
|
|
251
|
+
errors: [
|
|
252
|
+
{
|
|
253
|
+
path: breadcrumbsPrefix,
|
|
254
|
+
message: (0, getErrorMessageForIncorrectType_js_1.getErrorMessageForIncorrectType)(value, "object"),
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
};
|
|
258
|
+
}
|
|
228
259
|
const extensionPropertiesSet = new Set(extensionKeys);
|
|
229
260
|
const [extensionProperties, baseProperties] = (0, partition_js_1.partition)((0, keys_js_1.keys)(value), (key) => extensionPropertiesSet.has(key));
|
|
230
261
|
const transformedBase = transformBase((0, filterObject_js_1.filterObject)(value, baseProperties));
|
|
@@ -8,7 +8,7 @@ export declare namespace ReconnectingWebSocket {
|
|
|
8
8
|
protocols?: string | string[];
|
|
9
9
|
options?: ReconnectingWebSocket.Options;
|
|
10
10
|
headers?: Record<string, unknown>;
|
|
11
|
-
queryParameters?: Record<string,
|
|
11
|
+
queryParameters?: Record<string, unknown>;
|
|
12
12
|
}
|
|
13
13
|
type Options = {
|
|
14
14
|
WebSocket?: any;
|
|
@@ -6,7 +6,11 @@ const json_js_1 = require("../core/json.js");
|
|
|
6
6
|
class AgentMailError extends Error {
|
|
7
7
|
constructor({ message, statusCode, body, rawResponse, }) {
|
|
8
8
|
super(buildMessage({ message, statusCode, body }));
|
|
9
|
-
Object.setPrototypeOf(this,
|
|
9
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
10
|
+
if (Error.captureStackTrace) {
|
|
11
|
+
Error.captureStackTrace(this, this.constructor);
|
|
12
|
+
}
|
|
13
|
+
this.name = this.constructor.name;
|
|
10
14
|
this.statusCode = statusCode;
|
|
11
15
|
this.body = body;
|
|
12
16
|
this.rawResponse = rawResponse;
|
|
@@ -5,7 +5,11 @@ exports.AgentMailTimeoutError = void 0;
|
|
|
5
5
|
class AgentMailTimeoutError extends Error {
|
|
6
6
|
constructor(message) {
|
|
7
7
|
super(message);
|
|
8
|
-
Object.setPrototypeOf(this,
|
|
8
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
9
|
+
if (Error.captureStackTrace) {
|
|
10
|
+
Error.captureStackTrace(this, this.constructor);
|
|
11
|
+
}
|
|
12
|
+
this.name = this.constructor.name;
|
|
9
13
|
}
|
|
10
14
|
}
|
|
11
15
|
exports.AgentMailTimeoutError = AgentMailTimeoutError;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.handleNonStatusCodeError = handleNonStatusCodeError;
|
|
38
|
+
const errors = __importStar(require("./index.js"));
|
|
39
|
+
function handleNonStatusCodeError(error, rawResponse, method, path) {
|
|
40
|
+
switch (error.reason) {
|
|
41
|
+
case "non-json":
|
|
42
|
+
throw new errors.AgentMailError({
|
|
43
|
+
statusCode: error.statusCode,
|
|
44
|
+
body: error.rawBody,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
case "body-is-null":
|
|
48
|
+
throw new errors.AgentMailError({
|
|
49
|
+
statusCode: error.statusCode,
|
|
50
|
+
rawResponse: rawResponse,
|
|
51
|
+
});
|
|
52
|
+
case "timeout":
|
|
53
|
+
throw new errors.AgentMailTimeoutError(`Timeout exceeded when calling ${method} ${path}.`);
|
|
54
|
+
case "unknown":
|
|
55
|
+
throw new errors.AgentMailError({
|
|
56
|
+
message: error.errorMessage,
|
|
57
|
+
rawResponse: rawResponse,
|
|
58
|
+
});
|
|
59
|
+
default:
|
|
60
|
+
throw new errors.AgentMailError({
|
|
61
|
+
message: "Unknown error",
|
|
62
|
+
rawResponse: rawResponse,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -25,8 +25,8 @@ export declare namespace Thread {
|
|
|
25
25
|
thread_id: ThreadId.Raw;
|
|
26
26
|
labels: ThreadLabels.Raw;
|
|
27
27
|
timestamp: ThreadTimestamp.Raw;
|
|
28
|
-
received_timestamp
|
|
29
|
-
sent_timestamp
|
|
28
|
+
received_timestamp?: ThreadReceivedTimestamp.Raw | null;
|
|
29
|
+
sent_timestamp?: ThreadSentTimestamp.Raw | null;
|
|
30
30
|
senders: ThreadSenders.Raw;
|
|
31
31
|
recipients: ThreadRecipients.Raw;
|
|
32
32
|
subject?: ThreadSubject.Raw | null;
|
|
@@ -58,8 +58,8 @@ exports.Thread = core.serialization.object({
|
|
|
58
58
|
threadId: core.serialization.property("thread_id", ThreadId_js_1.ThreadId),
|
|
59
59
|
labels: ThreadLabels_js_1.ThreadLabels,
|
|
60
60
|
timestamp: ThreadTimestamp_js_1.ThreadTimestamp,
|
|
61
|
-
receivedTimestamp: core.serialization.property("received_timestamp", ThreadReceivedTimestamp_js_1.ThreadReceivedTimestamp),
|
|
62
|
-
sentTimestamp: core.serialization.property("sent_timestamp", ThreadSentTimestamp_js_1.ThreadSentTimestamp),
|
|
61
|
+
receivedTimestamp: core.serialization.property("received_timestamp", ThreadReceivedTimestamp_js_1.ThreadReceivedTimestamp.optional()),
|
|
62
|
+
sentTimestamp: core.serialization.property("sent_timestamp", ThreadSentTimestamp_js_1.ThreadSentTimestamp.optional()),
|
|
63
63
|
senders: ThreadSenders_js_1.ThreadSenders,
|
|
64
64
|
recipients: ThreadRecipients_js_1.ThreadRecipients,
|
|
65
65
|
subject: ThreadSubject_js_1.ThreadSubject.optional(),
|
|
@@ -24,8 +24,8 @@ export declare namespace ThreadItem {
|
|
|
24
24
|
thread_id: ThreadId.Raw;
|
|
25
25
|
labels: ThreadLabels.Raw;
|
|
26
26
|
timestamp: ThreadTimestamp.Raw;
|
|
27
|
-
received_timestamp
|
|
28
|
-
sent_timestamp
|
|
27
|
+
received_timestamp?: ThreadReceivedTimestamp.Raw | null;
|
|
28
|
+
sent_timestamp?: ThreadSentTimestamp.Raw | null;
|
|
29
29
|
senders: ThreadSenders.Raw;
|
|
30
30
|
recipients: ThreadRecipients.Raw;
|
|
31
31
|
subject?: ThreadSubject.Raw | null;
|
|
@@ -57,8 +57,8 @@ exports.ThreadItem = core.serialization.object({
|
|
|
57
57
|
threadId: core.serialization.property("thread_id", ThreadId_js_1.ThreadId),
|
|
58
58
|
labels: ThreadLabels_js_1.ThreadLabels,
|
|
59
59
|
timestamp: ThreadTimestamp_js_1.ThreadTimestamp,
|
|
60
|
-
receivedTimestamp: core.serialization.property("received_timestamp", ThreadReceivedTimestamp_js_1.ThreadReceivedTimestamp),
|
|
61
|
-
sentTimestamp: core.serialization.property("sent_timestamp", ThreadSentTimestamp_js_1.ThreadSentTimestamp),
|
|
60
|
+
receivedTimestamp: core.serialization.property("received_timestamp", ThreadReceivedTimestamp_js_1.ThreadReceivedTimestamp.optional()),
|
|
61
|
+
sentTimestamp: core.serialization.property("sent_timestamp", ThreadSentTimestamp_js_1.ThreadSentTimestamp.optional()),
|
|
62
62
|
senders: ThreadSenders_js_1.ThreadSenders,
|
|
63
63
|
recipients: ThreadRecipients_js_1.ThreadRecipients,
|
|
64
64
|
subject: ThreadSubject_js_1.ThreadSubject.optional(),
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.2.
|
|
1
|
+
export declare const SDK_VERSION = "0.2.4";
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { BearerAuthProvider } from "./auth/BearerAuthProvider.mjs";
|
|
1
2
|
import * as core from "./core/index.mjs";
|
|
2
3
|
import type * as environments from "./environments.mjs";
|
|
3
|
-
export
|
|
4
|
+
export type BaseClientOptions = {
|
|
4
5
|
environment?: core.Supplier<environments.AgentMailEnvironment | environments.AgentMailEnvironmentUrls>;
|
|
5
6
|
/** Specify a custom URL to connect the client to. */
|
|
6
7
|
baseUrl?: core.Supplier<string>;
|
|
7
|
-
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
8
8
|
/** Additional headers to include in requests. */
|
|
9
9
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
10
10
|
/** The default maximum time to wait for a response in seconds. */
|
|
@@ -15,7 +15,7 @@ export interface BaseClientOptions {
|
|
|
15
15
|
fetch?: typeof fetch;
|
|
16
16
|
/** Configure logging for the client. */
|
|
17
17
|
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
18
|
-
}
|
|
18
|
+
} & BearerAuthProvider.AuthOptions;
|
|
19
19
|
export interface BaseRequestOptions {
|
|
20
20
|
/** The maximum time to wait for a response in seconds. */
|
|
21
21
|
timeoutInSeconds?: number;
|
|
@@ -28,12 +28,12 @@ export interface BaseRequestOptions {
|
|
|
28
28
|
/** Additional headers to include in the request. */
|
|
29
29
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
30
30
|
}
|
|
31
|
-
export type NormalizedClientOptions<T extends BaseClientOptions> = T & {
|
|
31
|
+
export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
|
|
32
32
|
logging: core.logging.Logger;
|
|
33
33
|
authProvider?: core.AuthProvider;
|
|
34
34
|
};
|
|
35
|
-
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions> = NormalizedClientOptions<T> & {
|
|
35
|
+
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> = NormalizedClientOptions<T> & {
|
|
36
36
|
authProvider: core.AuthProvider;
|
|
37
37
|
};
|
|
38
|
-
export declare function normalizeClientOptions<T extends BaseClientOptions>(options: T): NormalizedClientOptions<T>;
|
|
39
|
-
export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
|
|
38
|
+
export declare function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptions<T>;
|
|
39
|
+
export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
|
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "agentmail",
|
|
9
|
-
"X-Fern-SDK-Version": "0.2.
|
|
10
|
-
"User-Agent": "agentmail/0.2.
|
|
9
|
+
"X-Fern-SDK-Version": "0.2.4",
|
|
10
|
+
"User-Agent": "agentmail/0.2.4",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/esm/Client.d.mts
CHANGED
|
@@ -11,8 +11,7 @@ import { WebsocketsClient } from "./api/resources/websockets/client/Client.mjs";
|
|
|
11
11
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
|
|
12
12
|
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.mjs";
|
|
13
13
|
export declare namespace AgentMailClient {
|
|
14
|
-
|
|
15
|
-
}
|
|
14
|
+
type Options = BaseClientOptions;
|
|
16
15
|
interface RequestOptions extends BaseRequestOptions {
|
|
17
16
|
}
|
|
18
17
|
}
|
|
@@ -8,6 +8,10 @@ export class IsTakenError extends errors.AgentMailError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class NotFoundError extends errors.AgentMailError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@ export class ValidationError extends errors.AgentMailError {
|
|
|
8
8
|
body: body,
|
|
9
9
|
rawResponse: rawResponse,
|
|
10
10
|
});
|
|
11
|
-
Object.setPrototypeOf(this,
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
|
|
|
3
3
|
import * as core from "../../../../core/index.mjs";
|
|
4
4
|
import * as AgentMail from "../../../index.mjs";
|
|
5
5
|
export declare namespace ApiKeysClient {
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
type Options = BaseClientOptions;
|
|
8
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
9
8
|
}
|
|
10
9
|
}
|
|
@@ -12,6 +12,7 @@ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
|
12
12
|
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
15
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
16
17
|
import * as serializers from "../../../../serialization/index.mjs";
|
|
17
18
|
import * as AgentMail from "../../../index.mjs";
|
|
@@ -33,13 +34,10 @@ export class ApiKeysClient {
|
|
|
33
34
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
34
35
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
35
36
|
const { limit, pageToken } = request;
|
|
36
|
-
const _queryParams = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
if (pageToken != null) {
|
|
41
|
-
_queryParams.page_token = pageToken;
|
|
42
|
-
}
|
|
37
|
+
const _queryParams = {
|
|
38
|
+
limit,
|
|
39
|
+
page_token: pageToken,
|
|
40
|
+
};
|
|
43
41
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
44
42
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
45
43
|
const _response = yield core.fetcher({
|
|
@@ -72,21 +70,7 @@ export class ApiKeysClient {
|
|
|
72
70
|
rawResponse: _response.rawResponse,
|
|
73
71
|
});
|
|
74
72
|
}
|
|
75
|
-
|
|
76
|
-
case "non-json":
|
|
77
|
-
throw new errors.AgentMailError({
|
|
78
|
-
statusCode: _response.error.statusCode,
|
|
79
|
-
body: _response.error.rawBody,
|
|
80
|
-
rawResponse: _response.rawResponse,
|
|
81
|
-
});
|
|
82
|
-
case "timeout":
|
|
83
|
-
throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/api-keys.");
|
|
84
|
-
case "unknown":
|
|
85
|
-
throw new errors.AgentMailError({
|
|
86
|
-
message: _response.error.errorMessage,
|
|
87
|
-
rawResponse: _response.rawResponse,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
73
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/api-keys");
|
|
90
74
|
});
|
|
91
75
|
}
|
|
92
76
|
/**
|
|
@@ -155,21 +139,7 @@ export class ApiKeysClient {
|
|
|
155
139
|
});
|
|
156
140
|
}
|
|
157
141
|
}
|
|
158
|
-
|
|
159
|
-
case "non-json":
|
|
160
|
-
throw new errors.AgentMailError({
|
|
161
|
-
statusCode: _response.error.statusCode,
|
|
162
|
-
body: _response.error.rawBody,
|
|
163
|
-
rawResponse: _response.rawResponse,
|
|
164
|
-
});
|
|
165
|
-
case "timeout":
|
|
166
|
-
throw new errors.AgentMailTimeoutError("Timeout exceeded when calling POST /v0/api-keys.");
|
|
167
|
-
case "unknown":
|
|
168
|
-
throw new errors.AgentMailError({
|
|
169
|
-
message: _response.error.errorMessage,
|
|
170
|
-
rawResponse: _response.rawResponse,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
142
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/api-keys");
|
|
173
143
|
});
|
|
174
144
|
}
|
|
175
145
|
/**
|
|
@@ -221,21 +191,7 @@ export class ApiKeysClient {
|
|
|
221
191
|
});
|
|
222
192
|
}
|
|
223
193
|
}
|
|
224
|
-
|
|
225
|
-
case "non-json":
|
|
226
|
-
throw new errors.AgentMailError({
|
|
227
|
-
statusCode: _response.error.statusCode,
|
|
228
|
-
body: _response.error.rawBody,
|
|
229
|
-
rawResponse: _response.rawResponse,
|
|
230
|
-
});
|
|
231
|
-
case "timeout":
|
|
232
|
-
throw new errors.AgentMailTimeoutError("Timeout exceeded when calling DELETE /v0/api-keys/{api_key}.");
|
|
233
|
-
case "unknown":
|
|
234
|
-
throw new errors.AgentMailError({
|
|
235
|
-
message: _response.error.errorMessage,
|
|
236
|
-
rawResponse: _response.rawResponse,
|
|
237
|
-
});
|
|
238
|
-
}
|
|
194
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/api-keys/{api_key}");
|
|
239
195
|
});
|
|
240
196
|
}
|
|
241
197
|
}
|