agentmail 0.0.73 → 0.0.75
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 +21 -21
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/apiKeys/client/Client.js +52 -62
- package/dist/cjs/api/resources/domains/client/Client.d.ts +24 -7
- package/dist/cjs/api/resources/domains/client/Client.js +187 -76
- package/dist/cjs/api/resources/domains/types/Domain.d.ts +0 -1
- package/dist/cjs/api/resources/drafts/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/drafts/client/Client.js +70 -83
- package/dist/cjs/api/resources/drafts/types/CreateDraftRequest.d.ts +1 -0
- package/dist/cjs/api/resources/drafts/types/Draft.d.ts +1 -0
- package/dist/cjs/api/resources/drafts/types/DraftClientId.d.ts +7 -0
- package/dist/cjs/api/resources/drafts/types/DraftClientId.js +5 -0
- package/dist/cjs/api/resources/drafts/types/UpdateDraftRequest.d.ts +14 -0
- package/dist/cjs/api/resources/drafts/types/UpdateDraftRequest.js +5 -0
- package/dist/cjs/api/resources/drafts/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/drafts/types/index.js +2 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/inboxes/client/Client.js +52 -62
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +26 -2
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +161 -84
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +70 -83
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +70 -83
- package/dist/cjs/api/resources/pods/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/pods/client/Client.js +52 -62
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +70 -83
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +70 -83
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +70 -83
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +70 -83
- package/dist/cjs/api/resources/threads/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/threads/client/Client.js +70 -83
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +52 -62
- package/dist/cjs/core/index.d.ts +0 -2
- package/dist/cjs/core/index.js +0 -2
- package/dist/cjs/serialization/resources/domains/types/Domain.d.ts +0 -2
- package/dist/cjs/serialization/resources/domains/types/Domain.js +0 -2
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftRequest.js +2 -0
- package/dist/cjs/serialization/resources/drafts/types/Draft.d.ts +2 -0
- package/dist/cjs/serialization/resources/drafts/types/Draft.js +2 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftClientId.d.ts +10 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftClientId.js +41 -0
- package/dist/cjs/serialization/resources/drafts/types/UpdateDraftRequest.d.ts +27 -0
- package/dist/cjs/serialization/resources/drafts/types/UpdateDraftRequest.js +58 -0
- package/dist/cjs/serialization/resources/drafts/types/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/drafts/types/index.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/apiKeys/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/apiKeys/client/Client.mjs +52 -62
- package/dist/esm/api/resources/domains/client/Client.d.mts +24 -7
- package/dist/esm/api/resources/domains/client/Client.mjs +187 -76
- package/dist/esm/api/resources/domains/types/Domain.d.mts +0 -1
- package/dist/esm/api/resources/drafts/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/drafts/client/Client.mjs +70 -83
- package/dist/esm/api/resources/drafts/types/CreateDraftRequest.d.mts +1 -0
- package/dist/esm/api/resources/drafts/types/Draft.d.mts +1 -0
- package/dist/esm/api/resources/drafts/types/DraftClientId.d.mts +7 -0
- package/dist/esm/api/resources/drafts/types/DraftClientId.mjs +4 -0
- package/dist/esm/api/resources/drafts/types/UpdateDraftRequest.d.mts +14 -0
- package/dist/esm/api/resources/drafts/types/UpdateDraftRequest.mjs +4 -0
- package/dist/esm/api/resources/drafts/types/index.d.mts +2 -0
- package/dist/esm/api/resources/drafts/types/index.mjs +2 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/inboxes/client/Client.mjs +52 -62
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +26 -2
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +161 -84
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +70 -83
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +70 -83
- package/dist/esm/api/resources/pods/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/pods/client/Client.mjs +52 -62
- package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +70 -83
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +70 -83
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +70 -83
- package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +70 -83
- package/dist/esm/api/resources/threads/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/threads/client/Client.mjs +70 -83
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +52 -62
- package/dist/esm/core/index.d.mts +0 -2
- package/dist/esm/core/index.mjs +0 -2
- package/dist/esm/serialization/resources/domains/types/Domain.d.mts +0 -2
- package/dist/esm/serialization/resources/domains/types/Domain.mjs +0 -2
- package/dist/esm/serialization/resources/drafts/types/CreateDraftRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/drafts/types/CreateDraftRequest.mjs +2 -0
- package/dist/esm/serialization/resources/drafts/types/Draft.d.mts +2 -0
- package/dist/esm/serialization/resources/drafts/types/Draft.mjs +2 -0
- package/dist/esm/serialization/resources/drafts/types/DraftClientId.d.mts +10 -0
- package/dist/esm/serialization/resources/drafts/types/DraftClientId.mjs +5 -0
- package/dist/esm/serialization/resources/drafts/types/UpdateDraftRequest.d.mts +27 -0
- package/dist/esm/serialization/resources/drafts/types/UpdateDraftRequest.mjs +22 -0
- package/dist/esm/serialization/resources/drafts/types/index.d.mts +2 -0
- package/dist/esm/serialization/resources/drafts/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +6644 -669
- package/dist/llms.txt +27 -9
- package/package.json +1 -1
- package/reference.md +204 -160
- package/dist/cjs/core/pagination/Page.d.ts +0 -32
- package/dist/cjs/core/pagination/Page.js +0 -100
- package/dist/cjs/core/pagination/Pageable.d.ts +0 -14
- package/dist/cjs/core/pagination/Pageable.js +0 -10
- package/dist/cjs/core/pagination/index.d.ts +0 -2
- package/dist/cjs/core/pagination/index.js +0 -7
- package/dist/cjs/core/utils/index.d.ts +0 -1
- package/dist/cjs/core/utils/index.js +0 -5
- package/dist/cjs/core/utils/setObjectProperty.d.ts +0 -11
- package/dist/cjs/core/utils/setObjectProperty.js +0 -42
- package/dist/esm/core/pagination/Page.d.mts +0 -32
- package/dist/esm/core/pagination/Page.mjs +0 -96
- package/dist/esm/core/pagination/Pageable.d.mts +0 -14
- package/dist/esm/core/pagination/Pageable.mjs +0 -6
- package/dist/esm/core/pagination/index.d.mts +0 -2
- package/dist/esm/core/pagination/index.mjs +0 -2
- package/dist/esm/core/utils/index.d.mts +0 -1
- package/dist/esm/core/utils/index.mjs +0 -1
- package/dist/esm/core/utils/setObjectProperty.d.mts +0 -11
- package/dist/esm/core/utils/setObjectProperty.mjs +0 -39
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index.js";
|
|
5
|
+
import * as AgentMail from "../../../../api/index.js";
|
|
6
|
+
import * as core from "../../../../core/index.js";
|
|
7
|
+
export declare const DraftClientId: core.serialization.Schema<serializers.DraftClientId.Raw, AgentMail.DraftClientId>;
|
|
8
|
+
export declare namespace DraftClientId {
|
|
9
|
+
type Raw = string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.DraftClientId = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
41
|
+
exports.DraftClientId = core.serialization.string();
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index.js";
|
|
5
|
+
import * as AgentMail from "../../../../api/index.js";
|
|
6
|
+
import * as core from "../../../../core/index.js";
|
|
7
|
+
import { DraftReplyTo } from "./DraftReplyTo.js";
|
|
8
|
+
import { DraftTo } from "./DraftTo.js";
|
|
9
|
+
import { DraftCc } from "./DraftCc.js";
|
|
10
|
+
import { DraftBcc } from "./DraftBcc.js";
|
|
11
|
+
import { DraftSubject } from "./DraftSubject.js";
|
|
12
|
+
import { DraftText } from "./DraftText.js";
|
|
13
|
+
import { DraftHtml } from "./DraftHtml.js";
|
|
14
|
+
import { DraftSendAt } from "./DraftSendAt.js";
|
|
15
|
+
export declare const UpdateDraftRequest: core.serialization.ObjectSchema<serializers.UpdateDraftRequest.Raw, AgentMail.UpdateDraftRequest>;
|
|
16
|
+
export declare namespace UpdateDraftRequest {
|
|
17
|
+
interface Raw {
|
|
18
|
+
reply_to?: DraftReplyTo.Raw | null;
|
|
19
|
+
to?: DraftTo.Raw | null;
|
|
20
|
+
cc?: DraftCc.Raw | null;
|
|
21
|
+
bcc?: DraftBcc.Raw | null;
|
|
22
|
+
subject?: DraftSubject.Raw | null;
|
|
23
|
+
text?: DraftText.Raw | null;
|
|
24
|
+
html?: DraftHtml.Raw | null;
|
|
25
|
+
send_at?: DraftSendAt.Raw | null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.UpdateDraftRequest = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
41
|
+
const DraftReplyTo_js_1 = require("./DraftReplyTo.js");
|
|
42
|
+
const DraftTo_js_1 = require("./DraftTo.js");
|
|
43
|
+
const DraftCc_js_1 = require("./DraftCc.js");
|
|
44
|
+
const DraftBcc_js_1 = require("./DraftBcc.js");
|
|
45
|
+
const DraftSubject_js_1 = require("./DraftSubject.js");
|
|
46
|
+
const DraftText_js_1 = require("./DraftText.js");
|
|
47
|
+
const DraftHtml_js_1 = require("./DraftHtml.js");
|
|
48
|
+
const DraftSendAt_js_1 = require("./DraftSendAt.js");
|
|
49
|
+
exports.UpdateDraftRequest = core.serialization.object({
|
|
50
|
+
replyTo: core.serialization.property("reply_to", DraftReplyTo_js_1.DraftReplyTo.optional()),
|
|
51
|
+
to: DraftTo_js_1.DraftTo.optional(),
|
|
52
|
+
cc: DraftCc_js_1.DraftCc.optional(),
|
|
53
|
+
bcc: DraftBcc_js_1.DraftBcc.optional(),
|
|
54
|
+
subject: DraftSubject_js_1.DraftSubject.optional(),
|
|
55
|
+
text: DraftText_js_1.DraftText.optional(),
|
|
56
|
+
html: DraftHtml_js_1.DraftHtml.optional(),
|
|
57
|
+
sendAt: core.serialization.property("send_at", DraftSendAt_js_1.DraftSendAt.optional()),
|
|
58
|
+
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./DraftId.js";
|
|
2
|
+
export * from "./DraftClientId.js";
|
|
2
3
|
export * from "./DraftLabels.js";
|
|
3
4
|
export * from "./DraftReplyTo.js";
|
|
4
5
|
export * from "./DraftTo.js";
|
|
@@ -17,3 +18,4 @@ export * from "./DraftItem.js";
|
|
|
17
18
|
export * from "./Draft.js";
|
|
18
19
|
export * from "./ListDraftsResponse.js";
|
|
19
20
|
export * from "./CreateDraftRequest.js";
|
|
21
|
+
export * from "./UpdateDraftRequest.js";
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./DraftId.js"), exports);
|
|
18
|
+
__exportStar(require("./DraftClientId.js"), exports);
|
|
18
19
|
__exportStar(require("./DraftLabels.js"), exports);
|
|
19
20
|
__exportStar(require("./DraftReplyTo.js"), exports);
|
|
20
21
|
__exportStar(require("./DraftTo.js"), exports);
|
|
@@ -33,3 +34,4 @@ __exportStar(require("./DraftItem.js"), exports);
|
|
|
33
34
|
__exportStar(require("./Draft.js"), exports);
|
|
34
35
|
__exportStar(require("./ListDraftsResponse.js"), exports);
|
|
35
36
|
__exportStar(require("./CreateDraftRequest.js"), exports);
|
|
37
|
+
__exportStar(require("./UpdateDraftRequest.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.75";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -17,8 +17,8 @@ export class AgentMailClient {
|
|
|
17
17
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
18
18
|
"X-Fern-Language": "JavaScript",
|
|
19
19
|
"X-Fern-SDK-Name": "agentmail",
|
|
20
|
-
"X-Fern-SDK-Version": "0.0.
|
|
21
|
-
"User-Agent": "agentmail/0.0.
|
|
20
|
+
"X-Fern-SDK-Version": "0.0.75",
|
|
21
|
+
"User-Agent": "agentmail/0.0.75",
|
|
22
22
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
23
23
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
24
24
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -36,7 +36,8 @@ export declare class ApiKeys {
|
|
|
36
36
|
* @example
|
|
37
37
|
* await client.apiKeys.list()
|
|
38
38
|
*/
|
|
39
|
-
list(request?: AgentMail.ListApiKeysRequest, requestOptions?: ApiKeys.RequestOptions):
|
|
39
|
+
list(request?: AgentMail.ListApiKeysRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise<AgentMail.ListApiKeysResponse>;
|
|
40
|
+
private __list;
|
|
40
41
|
/**
|
|
41
42
|
* @param {AgentMail.CreateApiKeyRequest} request
|
|
42
43
|
* @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -27,74 +27,64 @@ export class ApiKeys {
|
|
|
27
27
|
* @example
|
|
28
28
|
* await client.apiKeys.list()
|
|
29
29
|
*/
|
|
30
|
-
list() {
|
|
30
|
+
list(request = {}, requestOptions) {
|
|
31
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
32
|
+
}
|
|
33
|
+
__list() {
|
|
31
34
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
var _a, _b, _c;
|
|
36
|
+
const { limit, pageToken } = request;
|
|
37
|
+
const _queryParams = {};
|
|
38
|
+
if (limit != null) {
|
|
39
|
+
_queryParams["limit"] = limit.toString();
|
|
40
|
+
}
|
|
41
|
+
if (pageToken != null) {
|
|
42
|
+
_queryParams["page_token"] = pageToken;
|
|
43
|
+
}
|
|
44
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
45
|
+
const _response = yield core.fetcher({
|
|
46
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/api-keys"),
|
|
47
|
+
method: "GET",
|
|
48
|
+
headers: _headers,
|
|
49
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
50
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
51
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
52
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
53
|
+
});
|
|
54
|
+
if (_response.ok) {
|
|
55
|
+
return {
|
|
56
|
+
data: serializers.ListApiKeysResponse.parseOrThrow(_response.body, {
|
|
57
|
+
unrecognizedObjectKeys: "passthrough",
|
|
58
|
+
allowUnrecognizedUnionMembers: true,
|
|
59
|
+
allowUnrecognizedEnumValues: true,
|
|
60
|
+
skipValidation: true,
|
|
61
|
+
breadcrumbsPrefix: ["response"],
|
|
62
|
+
}),
|
|
63
|
+
rawResponse: _response.rawResponse,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (_response.error.reason === "status-code") {
|
|
67
|
+
throw new errors.AgentMailError({
|
|
68
|
+
statusCode: _response.error.statusCode,
|
|
69
|
+
body: _response.error.body,
|
|
70
|
+
rawResponse: _response.rawResponse,
|
|
51
71
|
});
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
unrecognizedObjectKeys: "passthrough",
|
|
56
|
-
allowUnrecognizedUnionMembers: true,
|
|
57
|
-
allowUnrecognizedEnumValues: true,
|
|
58
|
-
skipValidation: true,
|
|
59
|
-
breadcrumbsPrefix: ["response"],
|
|
60
|
-
}),
|
|
61
|
-
rawResponse: _response.rawResponse,
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
if (_response.error.reason === "status-code") {
|
|
72
|
+
}
|
|
73
|
+
switch (_response.error.reason) {
|
|
74
|
+
case "non-json":
|
|
65
75
|
throw new errors.AgentMailError({
|
|
66
76
|
statusCode: _response.error.statusCode,
|
|
67
|
-
body: _response.error.
|
|
77
|
+
body: _response.error.rawBody,
|
|
68
78
|
rawResponse: _response.rawResponse,
|
|
69
79
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
case "timeout":
|
|
79
|
-
throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/api-keys.");
|
|
80
|
-
case "unknown":
|
|
81
|
-
throw new errors.AgentMailError({
|
|
82
|
-
message: _response.error.errorMessage,
|
|
83
|
-
rawResponse: _response.rawResponse,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}));
|
|
87
|
-
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
88
|
-
return new core.Pageable({
|
|
89
|
-
response: dataWithRawResponse.data,
|
|
90
|
-
rawResponse: dataWithRawResponse.rawResponse,
|
|
91
|
-
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
|
|
92
|
-
!(typeof (response === null || response === void 0 ? void 0 : response.nextPageToken) === "string" && (response === null || response === void 0 ? void 0 : response.nextPageToken) === ""),
|
|
93
|
-
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.apiKeys) !== null && _a !== void 0 ? _a : []; },
|
|
94
|
-
loadPage: (response) => {
|
|
95
|
-
return list(core.setObjectProperty(request, "pageToken", response === null || response === void 0 ? void 0 : response.nextPageToken));
|
|
96
|
-
},
|
|
97
|
-
});
|
|
80
|
+
case "timeout":
|
|
81
|
+
throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/api-keys.");
|
|
82
|
+
case "unknown":
|
|
83
|
+
throw new errors.AgentMailError({
|
|
84
|
+
message: _response.error.errorMessage,
|
|
85
|
+
rawResponse: _response.rawResponse,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
98
88
|
});
|
|
99
89
|
}
|
|
100
90
|
/**
|
|
@@ -36,18 +36,24 @@ export declare class Domains {
|
|
|
36
36
|
* @example
|
|
37
37
|
* await client.domains.list()
|
|
38
38
|
*/
|
|
39
|
-
list(request?: AgentMail.ListDomainsRequest, requestOptions?: Domains.RequestOptions):
|
|
39
|
+
list(request?: AgentMail.ListDomainsRequest, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<AgentMail.ListDomainsResponse>;
|
|
40
|
+
private __list;
|
|
40
41
|
/**
|
|
41
|
-
* @param {AgentMail.DomainId}
|
|
42
|
+
* @param {AgentMail.DomainId} domainId
|
|
42
43
|
* @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
44
|
*
|
|
44
45
|
* @throws {@link AgentMail.NotFoundError}
|
|
45
46
|
*
|
|
46
47
|
* @example
|
|
47
|
-
* await client.domains.get("
|
|
48
|
+
* await client.domains.get("domain_id")
|
|
48
49
|
*/
|
|
49
|
-
get(
|
|
50
|
+
get(domainId: AgentMail.DomainId, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
|
|
50
51
|
private __get;
|
|
52
|
+
/**
|
|
53
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
54
|
+
*/
|
|
55
|
+
getZoneFile(domainId: AgentMail.DomainId, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
56
|
+
private __getZoneFile;
|
|
51
57
|
/**
|
|
52
58
|
* @param {AgentMail.CreateDomainRequest} request
|
|
53
59
|
* @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -63,15 +69,26 @@ export declare class Domains {
|
|
|
63
69
|
create(request: AgentMail.CreateDomainRequest, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
|
|
64
70
|
private __create;
|
|
65
71
|
/**
|
|
66
|
-
* @param {AgentMail.DomainId}
|
|
72
|
+
* @param {AgentMail.DomainId} domainId
|
|
67
73
|
* @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
74
|
*
|
|
69
75
|
* @throws {@link AgentMail.NotFoundError}
|
|
70
76
|
*
|
|
71
77
|
* @example
|
|
72
|
-
* await client.domains.delete("
|
|
78
|
+
* await client.domains.delete("domain_id")
|
|
73
79
|
*/
|
|
74
|
-
delete(
|
|
80
|
+
delete(domainId: AgentMail.DomainId, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<void>;
|
|
75
81
|
private __delete;
|
|
82
|
+
/**
|
|
83
|
+
* @param {AgentMail.DomainId} domainId
|
|
84
|
+
* @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* await client.domains.verify("domain_id")
|
|
90
|
+
*/
|
|
91
|
+
verify(domainId: AgentMail.DomainId, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<void>;
|
|
92
|
+
private __verify;
|
|
76
93
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
77
94
|
}
|