agentmail 0.4.10 → 0.4.12
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/BaseClient.js +2 -2
- package/dist/cjs/api/resources/apiKeys/types/ApiKey.d.ts +1 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeyPermissions.d.ts +75 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeyPermissions.js +3 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyRequest.d.ts +1 -0
- package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyResponse.d.ts +1 -0
- package/dist/cjs/api/resources/apiKeys/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/apiKeys/types/index.js +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.d.ts +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKey.js +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyPermissions.d.ts +43 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyPermissions.js +75 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyRequest.js +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.ts +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyResponse.js +2 -0
- package/dist/cjs/serialization/resources/apiKeys/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/apiKeys/types/ApiKey.d.mts +1 -0
- package/dist/esm/api/resources/apiKeys/types/ApiKeyPermissions.d.mts +75 -0
- package/dist/esm/api/resources/apiKeys/types/ApiKeyPermissions.mjs +2 -0
- package/dist/esm/api/resources/apiKeys/types/CreateApiKeyRequest.d.mts +1 -0
- package/dist/esm/api/resources/apiKeys/types/CreateApiKeyResponse.d.mts +1 -0
- package/dist/esm/api/resources/apiKeys/types/index.d.mts +1 -0
- package/dist/esm/api/resources/apiKeys/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKey.d.mts +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKey.mjs +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKeyPermissions.d.mts +43 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKeyPermissions.mjs +39 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyRequest.mjs +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.d.mts +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyResponse.mjs +2 -0
- package/dist/esm/serialization/resources/apiKeys/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +1419 -77
- package/dist/llms.txt +1 -0
- package/package.json +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "agentmail",
|
|
46
|
-
"X-Fern-SDK-Version": "0.4.
|
|
47
|
-
"User-Agent": "agentmail/0.4.
|
|
46
|
+
"X-Fern-SDK-Version": "0.4.12",
|
|
47
|
+
"User-Agent": "agentmail/0.4.12",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted.
|
|
3
|
+
*/
|
|
4
|
+
export interface ApiKeyPermissions {
|
|
5
|
+
/** Read inbox details. */
|
|
6
|
+
inboxRead?: boolean;
|
|
7
|
+
/** Create new inboxes. */
|
|
8
|
+
inboxCreate?: boolean;
|
|
9
|
+
/** Update inbox settings. */
|
|
10
|
+
inboxUpdate?: boolean;
|
|
11
|
+
/** Delete inboxes. */
|
|
12
|
+
inboxDelete?: boolean;
|
|
13
|
+
/** Read threads. */
|
|
14
|
+
threadRead?: boolean;
|
|
15
|
+
/** Delete threads. */
|
|
16
|
+
threadDelete?: boolean;
|
|
17
|
+
/** Read messages. */
|
|
18
|
+
messageRead?: boolean;
|
|
19
|
+
/** Send messages. */
|
|
20
|
+
messageSend?: boolean;
|
|
21
|
+
/** Update message labels. */
|
|
22
|
+
messageUpdate?: boolean;
|
|
23
|
+
/** Access messages labeled spam. */
|
|
24
|
+
labelSpamRead?: boolean;
|
|
25
|
+
/** Access messages labeled blocked. */
|
|
26
|
+
labelBlockedRead?: boolean;
|
|
27
|
+
/** Access messages labeled trash. */
|
|
28
|
+
labelTrashRead?: boolean;
|
|
29
|
+
/** Read drafts. */
|
|
30
|
+
draftRead?: boolean;
|
|
31
|
+
/** Create drafts. */
|
|
32
|
+
draftCreate?: boolean;
|
|
33
|
+
/** Update drafts. */
|
|
34
|
+
draftUpdate?: boolean;
|
|
35
|
+
/** Delete drafts. */
|
|
36
|
+
draftDelete?: boolean;
|
|
37
|
+
/** Send drafts. */
|
|
38
|
+
draftSend?: boolean;
|
|
39
|
+
/** Read webhook configurations. */
|
|
40
|
+
webhookRead?: boolean;
|
|
41
|
+
/** Create webhooks. */
|
|
42
|
+
webhookCreate?: boolean;
|
|
43
|
+
/** Update webhooks. */
|
|
44
|
+
webhookUpdate?: boolean;
|
|
45
|
+
/** Delete webhooks. */
|
|
46
|
+
webhookDelete?: boolean;
|
|
47
|
+
/** Read domain details. */
|
|
48
|
+
domainRead?: boolean;
|
|
49
|
+
/** Create domains. */
|
|
50
|
+
domainCreate?: boolean;
|
|
51
|
+
/** Update domains. */
|
|
52
|
+
domainUpdate?: boolean;
|
|
53
|
+
/** Delete domains. */
|
|
54
|
+
domainDelete?: boolean;
|
|
55
|
+
/** Read list entries. */
|
|
56
|
+
listEntryRead?: boolean;
|
|
57
|
+
/** Create list entries. */
|
|
58
|
+
listEntryCreate?: boolean;
|
|
59
|
+
/** Delete list entries. */
|
|
60
|
+
listEntryDelete?: boolean;
|
|
61
|
+
/** Read metrics. */
|
|
62
|
+
metricsRead?: boolean;
|
|
63
|
+
/** Read API keys. */
|
|
64
|
+
apiKeyRead?: boolean;
|
|
65
|
+
/** Create API keys. */
|
|
66
|
+
apiKeyCreate?: boolean;
|
|
67
|
+
/** Delete API keys. */
|
|
68
|
+
apiKeyDelete?: boolean;
|
|
69
|
+
/** Read pods. */
|
|
70
|
+
podRead?: boolean;
|
|
71
|
+
/** Create pods. */
|
|
72
|
+
podCreate?: boolean;
|
|
73
|
+
/** Delete pods. */
|
|
74
|
+
podDelete?: boolean;
|
|
75
|
+
}
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ApiKey.js"), exports);
|
|
18
18
|
__exportStar(require("./ApiKeyId.js"), exports);
|
|
19
|
+
__exportStar(require("./ApiKeyPermissions.js"), exports);
|
|
19
20
|
__exportStar(require("./CreateApiKeyRequest.js"), exports);
|
|
20
21
|
__exportStar(require("./CreateApiKeyResponse.js"), exports);
|
|
21
22
|
__exportStar(require("./CreatedAt.js"), exports);
|
|
@@ -2,6 +2,7 @@ import type * as AgentMail from "../../../../api/index.js";
|
|
|
2
2
|
import * as core from "../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
4
|
import { ApiKeyId } from "./ApiKeyId.js";
|
|
5
|
+
import { ApiKeyPermissions } from "./ApiKeyPermissions.js";
|
|
5
6
|
import { CreatedAt } from "./CreatedAt.js";
|
|
6
7
|
import { Name } from "./Name.js";
|
|
7
8
|
import { Prefix } from "./Prefix.js";
|
|
@@ -14,6 +15,7 @@ export declare namespace ApiKey {
|
|
|
14
15
|
pod_id?: string | null;
|
|
15
16
|
inbox_id?: string | null;
|
|
16
17
|
used_at?: string | null;
|
|
18
|
+
permissions?: ApiKeyPermissions.Raw | null;
|
|
17
19
|
created_at: CreatedAt.Raw;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.ApiKey = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
39
|
const ApiKeyId_js_1 = require("./ApiKeyId.js");
|
|
40
|
+
const ApiKeyPermissions_js_1 = require("./ApiKeyPermissions.js");
|
|
40
41
|
const CreatedAt_js_1 = require("./CreatedAt.js");
|
|
41
42
|
const Name_js_1 = require("./Name.js");
|
|
42
43
|
const Prefix_js_1 = require("./Prefix.js");
|
|
@@ -47,5 +48,6 @@ exports.ApiKey = core.serialization.object({
|
|
|
47
48
|
podId: core.serialization.property("pod_id", core.serialization.string().optional()),
|
|
48
49
|
inboxId: core.serialization.property("inbox_id", core.serialization.string().optional()),
|
|
49
50
|
usedAt: core.serialization.property("used_at", core.serialization.date().optional()),
|
|
51
|
+
permissions: ApiKeyPermissions_js_1.ApiKeyPermissions.optional(),
|
|
50
52
|
createdAt: core.serialization.property("created_at", CreatedAt_js_1.CreatedAt),
|
|
51
53
|
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.js";
|
|
2
|
+
import * as core from "../../../../core/index.js";
|
|
3
|
+
import type * as serializers from "../../../index.js";
|
|
4
|
+
export declare const ApiKeyPermissions: core.serialization.ObjectSchema<serializers.ApiKeyPermissions.Raw, AgentMail.ApiKeyPermissions>;
|
|
5
|
+
export declare namespace ApiKeyPermissions {
|
|
6
|
+
interface Raw {
|
|
7
|
+
inbox_read?: boolean | null;
|
|
8
|
+
inbox_create?: boolean | null;
|
|
9
|
+
inbox_update?: boolean | null;
|
|
10
|
+
inbox_delete?: boolean | null;
|
|
11
|
+
thread_read?: boolean | null;
|
|
12
|
+
thread_delete?: boolean | null;
|
|
13
|
+
message_read?: boolean | null;
|
|
14
|
+
message_send?: boolean | null;
|
|
15
|
+
message_update?: boolean | null;
|
|
16
|
+
label_spam_read?: boolean | null;
|
|
17
|
+
label_blocked_read?: boolean | null;
|
|
18
|
+
label_trash_read?: boolean | null;
|
|
19
|
+
draft_read?: boolean | null;
|
|
20
|
+
draft_create?: boolean | null;
|
|
21
|
+
draft_update?: boolean | null;
|
|
22
|
+
draft_delete?: boolean | null;
|
|
23
|
+
draft_send?: boolean | null;
|
|
24
|
+
webhook_read?: boolean | null;
|
|
25
|
+
webhook_create?: boolean | null;
|
|
26
|
+
webhook_update?: boolean | null;
|
|
27
|
+
webhook_delete?: boolean | null;
|
|
28
|
+
domain_read?: boolean | null;
|
|
29
|
+
domain_create?: boolean | null;
|
|
30
|
+
domain_update?: boolean | null;
|
|
31
|
+
domain_delete?: boolean | null;
|
|
32
|
+
list_entry_read?: boolean | null;
|
|
33
|
+
list_entry_create?: boolean | null;
|
|
34
|
+
list_entry_delete?: boolean | null;
|
|
35
|
+
metrics_read?: boolean | null;
|
|
36
|
+
api_key_read?: boolean | null;
|
|
37
|
+
api_key_create?: boolean | null;
|
|
38
|
+
api_key_delete?: boolean | null;
|
|
39
|
+
pod_read?: boolean | null;
|
|
40
|
+
pod_create?: boolean | null;
|
|
41
|
+
pod_delete?: boolean | null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.ApiKeyPermissions = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
exports.ApiKeyPermissions = core.serialization.object({
|
|
40
|
+
inboxRead: core.serialization.property("inbox_read", core.serialization.boolean().optional()),
|
|
41
|
+
inboxCreate: core.serialization.property("inbox_create", core.serialization.boolean().optional()),
|
|
42
|
+
inboxUpdate: core.serialization.property("inbox_update", core.serialization.boolean().optional()),
|
|
43
|
+
inboxDelete: core.serialization.property("inbox_delete", core.serialization.boolean().optional()),
|
|
44
|
+
threadRead: core.serialization.property("thread_read", core.serialization.boolean().optional()),
|
|
45
|
+
threadDelete: core.serialization.property("thread_delete", core.serialization.boolean().optional()),
|
|
46
|
+
messageRead: core.serialization.property("message_read", core.serialization.boolean().optional()),
|
|
47
|
+
messageSend: core.serialization.property("message_send", core.serialization.boolean().optional()),
|
|
48
|
+
messageUpdate: core.serialization.property("message_update", core.serialization.boolean().optional()),
|
|
49
|
+
labelSpamRead: core.serialization.property("label_spam_read", core.serialization.boolean().optional()),
|
|
50
|
+
labelBlockedRead: core.serialization.property("label_blocked_read", core.serialization.boolean().optional()),
|
|
51
|
+
labelTrashRead: core.serialization.property("label_trash_read", core.serialization.boolean().optional()),
|
|
52
|
+
draftRead: core.serialization.property("draft_read", core.serialization.boolean().optional()),
|
|
53
|
+
draftCreate: core.serialization.property("draft_create", core.serialization.boolean().optional()),
|
|
54
|
+
draftUpdate: core.serialization.property("draft_update", core.serialization.boolean().optional()),
|
|
55
|
+
draftDelete: core.serialization.property("draft_delete", core.serialization.boolean().optional()),
|
|
56
|
+
draftSend: core.serialization.property("draft_send", core.serialization.boolean().optional()),
|
|
57
|
+
webhookRead: core.serialization.property("webhook_read", core.serialization.boolean().optional()),
|
|
58
|
+
webhookCreate: core.serialization.property("webhook_create", core.serialization.boolean().optional()),
|
|
59
|
+
webhookUpdate: core.serialization.property("webhook_update", core.serialization.boolean().optional()),
|
|
60
|
+
webhookDelete: core.serialization.property("webhook_delete", core.serialization.boolean().optional()),
|
|
61
|
+
domainRead: core.serialization.property("domain_read", core.serialization.boolean().optional()),
|
|
62
|
+
domainCreate: core.serialization.property("domain_create", core.serialization.boolean().optional()),
|
|
63
|
+
domainUpdate: core.serialization.property("domain_update", core.serialization.boolean().optional()),
|
|
64
|
+
domainDelete: core.serialization.property("domain_delete", core.serialization.boolean().optional()),
|
|
65
|
+
listEntryRead: core.serialization.property("list_entry_read", core.serialization.boolean().optional()),
|
|
66
|
+
listEntryCreate: core.serialization.property("list_entry_create", core.serialization.boolean().optional()),
|
|
67
|
+
listEntryDelete: core.serialization.property("list_entry_delete", core.serialization.boolean().optional()),
|
|
68
|
+
metricsRead: core.serialization.property("metrics_read", core.serialization.boolean().optional()),
|
|
69
|
+
apiKeyRead: core.serialization.property("api_key_read", core.serialization.boolean().optional()),
|
|
70
|
+
apiKeyCreate: core.serialization.property("api_key_create", core.serialization.boolean().optional()),
|
|
71
|
+
apiKeyDelete: core.serialization.property("api_key_delete", core.serialization.boolean().optional()),
|
|
72
|
+
podRead: core.serialization.property("pod_read", core.serialization.boolean().optional()),
|
|
73
|
+
podCreate: core.serialization.property("pod_create", core.serialization.boolean().optional()),
|
|
74
|
+
podDelete: core.serialization.property("pod_delete", core.serialization.boolean().optional()),
|
|
75
|
+
});
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../../api/index.js";
|
|
2
2
|
import * as core from "../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
|
+
import { ApiKeyPermissions } from "./ApiKeyPermissions.js";
|
|
4
5
|
import { Name } from "./Name.js";
|
|
5
6
|
export declare const CreateApiKeyRequest: core.serialization.ObjectSchema<serializers.CreateApiKeyRequest.Raw, AgentMail.CreateApiKeyRequest>;
|
|
6
7
|
export declare namespace CreateApiKeyRequest {
|
|
7
8
|
interface Raw {
|
|
8
9
|
name: Name.Raw;
|
|
10
|
+
permissions?: ApiKeyPermissions.Raw | null;
|
|
9
11
|
}
|
|
10
12
|
}
|
|
@@ -36,7 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.CreateApiKeyRequest = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const ApiKeyPermissions_js_1 = require("./ApiKeyPermissions.js");
|
|
39
40
|
const Name_js_1 = require("./Name.js");
|
|
40
41
|
exports.CreateApiKeyRequest = core.serialization.object({
|
|
41
42
|
name: Name_js_1.Name,
|
|
43
|
+
permissions: ApiKeyPermissions_js_1.ApiKeyPermissions.optional(),
|
|
42
44
|
});
|
|
@@ -2,6 +2,7 @@ import type * as AgentMail from "../../../../api/index.js";
|
|
|
2
2
|
import * as core from "../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
4
|
import { ApiKeyId } from "./ApiKeyId.js";
|
|
5
|
+
import { ApiKeyPermissions } from "./ApiKeyPermissions.js";
|
|
5
6
|
import { CreatedAt } from "./CreatedAt.js";
|
|
6
7
|
import { Name } from "./Name.js";
|
|
7
8
|
import { Prefix } from "./Prefix.js";
|
|
@@ -14,6 +15,7 @@ export declare namespace CreateApiKeyResponse {
|
|
|
14
15
|
name: Name.Raw;
|
|
15
16
|
pod_id?: string | null;
|
|
16
17
|
inbox_id?: string | null;
|
|
18
|
+
permissions?: ApiKeyPermissions.Raw | null;
|
|
17
19
|
created_at: CreatedAt.Raw;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.CreateApiKeyResponse = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
39
|
const ApiKeyId_js_1 = require("./ApiKeyId.js");
|
|
40
|
+
const ApiKeyPermissions_js_1 = require("./ApiKeyPermissions.js");
|
|
40
41
|
const CreatedAt_js_1 = require("./CreatedAt.js");
|
|
41
42
|
const Name_js_1 = require("./Name.js");
|
|
42
43
|
const Prefix_js_1 = require("./Prefix.js");
|
|
@@ -47,5 +48,6 @@ exports.CreateApiKeyResponse = core.serialization.object({
|
|
|
47
48
|
name: Name_js_1.Name,
|
|
48
49
|
podId: core.serialization.property("pod_id", core.serialization.string().optional()),
|
|
49
50
|
inboxId: core.serialization.property("inbox_id", core.serialization.string().optional()),
|
|
51
|
+
permissions: ApiKeyPermissions_js_1.ApiKeyPermissions.optional(),
|
|
50
52
|
createdAt: core.serialization.property("created_at", CreatedAt_js_1.CreatedAt),
|
|
51
53
|
});
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ApiKey.js"), exports);
|
|
18
18
|
__exportStar(require("./ApiKeyId.js"), exports);
|
|
19
|
+
__exportStar(require("./ApiKeyPermissions.js"), exports);
|
|
19
20
|
__exportStar(require("./CreateApiKeyRequest.js"), exports);
|
|
20
21
|
__exportStar(require("./CreateApiKeyResponse.js"), exports);
|
|
21
22
|
__exportStar(require("./CreatedAt.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.12";
|
package/dist/cjs/version.js
CHANGED
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.4.
|
|
10
|
-
"User-Agent": "agentmail/0.4.
|
|
9
|
+
"X-Fern-SDK-Version": "0.4.12",
|
|
10
|
+
"User-Agent": "agentmail/0.4.12",
|
|
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);
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Granular permissions for the API key. When ommitted all permissions are granted. Otherwise, only permissions set to true are granted.
|
|
3
|
+
*/
|
|
4
|
+
export interface ApiKeyPermissions {
|
|
5
|
+
/** Read inbox details. */
|
|
6
|
+
inboxRead?: boolean;
|
|
7
|
+
/** Create new inboxes. */
|
|
8
|
+
inboxCreate?: boolean;
|
|
9
|
+
/** Update inbox settings. */
|
|
10
|
+
inboxUpdate?: boolean;
|
|
11
|
+
/** Delete inboxes. */
|
|
12
|
+
inboxDelete?: boolean;
|
|
13
|
+
/** Read threads. */
|
|
14
|
+
threadRead?: boolean;
|
|
15
|
+
/** Delete threads. */
|
|
16
|
+
threadDelete?: boolean;
|
|
17
|
+
/** Read messages. */
|
|
18
|
+
messageRead?: boolean;
|
|
19
|
+
/** Send messages. */
|
|
20
|
+
messageSend?: boolean;
|
|
21
|
+
/** Update message labels. */
|
|
22
|
+
messageUpdate?: boolean;
|
|
23
|
+
/** Access messages labeled spam. */
|
|
24
|
+
labelSpamRead?: boolean;
|
|
25
|
+
/** Access messages labeled blocked. */
|
|
26
|
+
labelBlockedRead?: boolean;
|
|
27
|
+
/** Access messages labeled trash. */
|
|
28
|
+
labelTrashRead?: boolean;
|
|
29
|
+
/** Read drafts. */
|
|
30
|
+
draftRead?: boolean;
|
|
31
|
+
/** Create drafts. */
|
|
32
|
+
draftCreate?: boolean;
|
|
33
|
+
/** Update drafts. */
|
|
34
|
+
draftUpdate?: boolean;
|
|
35
|
+
/** Delete drafts. */
|
|
36
|
+
draftDelete?: boolean;
|
|
37
|
+
/** Send drafts. */
|
|
38
|
+
draftSend?: boolean;
|
|
39
|
+
/** Read webhook configurations. */
|
|
40
|
+
webhookRead?: boolean;
|
|
41
|
+
/** Create webhooks. */
|
|
42
|
+
webhookCreate?: boolean;
|
|
43
|
+
/** Update webhooks. */
|
|
44
|
+
webhookUpdate?: boolean;
|
|
45
|
+
/** Delete webhooks. */
|
|
46
|
+
webhookDelete?: boolean;
|
|
47
|
+
/** Read domain details. */
|
|
48
|
+
domainRead?: boolean;
|
|
49
|
+
/** Create domains. */
|
|
50
|
+
domainCreate?: boolean;
|
|
51
|
+
/** Update domains. */
|
|
52
|
+
domainUpdate?: boolean;
|
|
53
|
+
/** Delete domains. */
|
|
54
|
+
domainDelete?: boolean;
|
|
55
|
+
/** Read list entries. */
|
|
56
|
+
listEntryRead?: boolean;
|
|
57
|
+
/** Create list entries. */
|
|
58
|
+
listEntryCreate?: boolean;
|
|
59
|
+
/** Delete list entries. */
|
|
60
|
+
listEntryDelete?: boolean;
|
|
61
|
+
/** Read metrics. */
|
|
62
|
+
metricsRead?: boolean;
|
|
63
|
+
/** Read API keys. */
|
|
64
|
+
apiKeyRead?: boolean;
|
|
65
|
+
/** Create API keys. */
|
|
66
|
+
apiKeyCreate?: boolean;
|
|
67
|
+
/** Delete API keys. */
|
|
68
|
+
apiKeyDelete?: boolean;
|
|
69
|
+
/** Read pods. */
|
|
70
|
+
podRead?: boolean;
|
|
71
|
+
/** Create pods. */
|
|
72
|
+
podCreate?: boolean;
|
|
73
|
+
/** Delete pods. */
|
|
74
|
+
podDelete?: boolean;
|
|
75
|
+
}
|
|
@@ -2,6 +2,7 @@ import type * as AgentMail from "../../../../api/index.mjs";
|
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import type * as serializers from "../../../index.mjs";
|
|
4
4
|
import { ApiKeyId } from "./ApiKeyId.mjs";
|
|
5
|
+
import { ApiKeyPermissions } from "./ApiKeyPermissions.mjs";
|
|
5
6
|
import { CreatedAt } from "./CreatedAt.mjs";
|
|
6
7
|
import { Name } from "./Name.mjs";
|
|
7
8
|
import { Prefix } from "./Prefix.mjs";
|
|
@@ -14,6 +15,7 @@ export declare namespace ApiKey {
|
|
|
14
15
|
pod_id?: string | null;
|
|
15
16
|
inbox_id?: string | null;
|
|
16
17
|
used_at?: string | null;
|
|
18
|
+
permissions?: ApiKeyPermissions.Raw | null;
|
|
17
19
|
created_at: CreatedAt.Raw;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import { ApiKeyId } from "./ApiKeyId.mjs";
|
|
4
|
+
import { ApiKeyPermissions } from "./ApiKeyPermissions.mjs";
|
|
4
5
|
import { CreatedAt } from "./CreatedAt.mjs";
|
|
5
6
|
import { Name } from "./Name.mjs";
|
|
6
7
|
import { Prefix } from "./Prefix.mjs";
|
|
@@ -11,5 +12,6 @@ export const ApiKey = core.serialization.object({
|
|
|
11
12
|
podId: core.serialization.property("pod_id", core.serialization.string().optional()),
|
|
12
13
|
inboxId: core.serialization.property("inbox_id", core.serialization.string().optional()),
|
|
13
14
|
usedAt: core.serialization.property("used_at", core.serialization.date().optional()),
|
|
15
|
+
permissions: ApiKeyPermissions.optional(),
|
|
14
16
|
createdAt: core.serialization.property("created_at", CreatedAt),
|
|
15
17
|
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
export declare const ApiKeyPermissions: core.serialization.ObjectSchema<serializers.ApiKeyPermissions.Raw, AgentMail.ApiKeyPermissions>;
|
|
5
|
+
export declare namespace ApiKeyPermissions {
|
|
6
|
+
interface Raw {
|
|
7
|
+
inbox_read?: boolean | null;
|
|
8
|
+
inbox_create?: boolean | null;
|
|
9
|
+
inbox_update?: boolean | null;
|
|
10
|
+
inbox_delete?: boolean | null;
|
|
11
|
+
thread_read?: boolean | null;
|
|
12
|
+
thread_delete?: boolean | null;
|
|
13
|
+
message_read?: boolean | null;
|
|
14
|
+
message_send?: boolean | null;
|
|
15
|
+
message_update?: boolean | null;
|
|
16
|
+
label_spam_read?: boolean | null;
|
|
17
|
+
label_blocked_read?: boolean | null;
|
|
18
|
+
label_trash_read?: boolean | null;
|
|
19
|
+
draft_read?: boolean | null;
|
|
20
|
+
draft_create?: boolean | null;
|
|
21
|
+
draft_update?: boolean | null;
|
|
22
|
+
draft_delete?: boolean | null;
|
|
23
|
+
draft_send?: boolean | null;
|
|
24
|
+
webhook_read?: boolean | null;
|
|
25
|
+
webhook_create?: boolean | null;
|
|
26
|
+
webhook_update?: boolean | null;
|
|
27
|
+
webhook_delete?: boolean | null;
|
|
28
|
+
domain_read?: boolean | null;
|
|
29
|
+
domain_create?: boolean | null;
|
|
30
|
+
domain_update?: boolean | null;
|
|
31
|
+
domain_delete?: boolean | null;
|
|
32
|
+
list_entry_read?: boolean | null;
|
|
33
|
+
list_entry_create?: boolean | null;
|
|
34
|
+
list_entry_delete?: boolean | null;
|
|
35
|
+
metrics_read?: boolean | null;
|
|
36
|
+
api_key_read?: boolean | null;
|
|
37
|
+
api_key_create?: boolean | null;
|
|
38
|
+
api_key_delete?: boolean | null;
|
|
39
|
+
pod_read?: boolean | null;
|
|
40
|
+
pod_create?: boolean | null;
|
|
41
|
+
pod_delete?: boolean | null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
export const ApiKeyPermissions = core.serialization.object({
|
|
4
|
+
inboxRead: core.serialization.property("inbox_read", core.serialization.boolean().optional()),
|
|
5
|
+
inboxCreate: core.serialization.property("inbox_create", core.serialization.boolean().optional()),
|
|
6
|
+
inboxUpdate: core.serialization.property("inbox_update", core.serialization.boolean().optional()),
|
|
7
|
+
inboxDelete: core.serialization.property("inbox_delete", core.serialization.boolean().optional()),
|
|
8
|
+
threadRead: core.serialization.property("thread_read", core.serialization.boolean().optional()),
|
|
9
|
+
threadDelete: core.serialization.property("thread_delete", core.serialization.boolean().optional()),
|
|
10
|
+
messageRead: core.serialization.property("message_read", core.serialization.boolean().optional()),
|
|
11
|
+
messageSend: core.serialization.property("message_send", core.serialization.boolean().optional()),
|
|
12
|
+
messageUpdate: core.serialization.property("message_update", core.serialization.boolean().optional()),
|
|
13
|
+
labelSpamRead: core.serialization.property("label_spam_read", core.serialization.boolean().optional()),
|
|
14
|
+
labelBlockedRead: core.serialization.property("label_blocked_read", core.serialization.boolean().optional()),
|
|
15
|
+
labelTrashRead: core.serialization.property("label_trash_read", core.serialization.boolean().optional()),
|
|
16
|
+
draftRead: core.serialization.property("draft_read", core.serialization.boolean().optional()),
|
|
17
|
+
draftCreate: core.serialization.property("draft_create", core.serialization.boolean().optional()),
|
|
18
|
+
draftUpdate: core.serialization.property("draft_update", core.serialization.boolean().optional()),
|
|
19
|
+
draftDelete: core.serialization.property("draft_delete", core.serialization.boolean().optional()),
|
|
20
|
+
draftSend: core.serialization.property("draft_send", core.serialization.boolean().optional()),
|
|
21
|
+
webhookRead: core.serialization.property("webhook_read", core.serialization.boolean().optional()),
|
|
22
|
+
webhookCreate: core.serialization.property("webhook_create", core.serialization.boolean().optional()),
|
|
23
|
+
webhookUpdate: core.serialization.property("webhook_update", core.serialization.boolean().optional()),
|
|
24
|
+
webhookDelete: core.serialization.property("webhook_delete", core.serialization.boolean().optional()),
|
|
25
|
+
domainRead: core.serialization.property("domain_read", core.serialization.boolean().optional()),
|
|
26
|
+
domainCreate: core.serialization.property("domain_create", core.serialization.boolean().optional()),
|
|
27
|
+
domainUpdate: core.serialization.property("domain_update", core.serialization.boolean().optional()),
|
|
28
|
+
domainDelete: core.serialization.property("domain_delete", core.serialization.boolean().optional()),
|
|
29
|
+
listEntryRead: core.serialization.property("list_entry_read", core.serialization.boolean().optional()),
|
|
30
|
+
listEntryCreate: core.serialization.property("list_entry_create", core.serialization.boolean().optional()),
|
|
31
|
+
listEntryDelete: core.serialization.property("list_entry_delete", core.serialization.boolean().optional()),
|
|
32
|
+
metricsRead: core.serialization.property("metrics_read", core.serialization.boolean().optional()),
|
|
33
|
+
apiKeyRead: core.serialization.property("api_key_read", core.serialization.boolean().optional()),
|
|
34
|
+
apiKeyCreate: core.serialization.property("api_key_create", core.serialization.boolean().optional()),
|
|
35
|
+
apiKeyDelete: core.serialization.property("api_key_delete", core.serialization.boolean().optional()),
|
|
36
|
+
podRead: core.serialization.property("pod_read", core.serialization.boolean().optional()),
|
|
37
|
+
podCreate: core.serialization.property("pod_create", core.serialization.boolean().optional()),
|
|
38
|
+
podDelete: core.serialization.property("pod_delete", core.serialization.boolean().optional()),
|
|
39
|
+
});
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
import { ApiKeyPermissions } from "./ApiKeyPermissions.mjs";
|
|
4
5
|
import { Name } from "./Name.mjs";
|
|
5
6
|
export declare const CreateApiKeyRequest: core.serialization.ObjectSchema<serializers.CreateApiKeyRequest.Raw, AgentMail.CreateApiKeyRequest>;
|
|
6
7
|
export declare namespace CreateApiKeyRequest {
|
|
7
8
|
interface Raw {
|
|
8
9
|
name: Name.Raw;
|
|
10
|
+
permissions?: ApiKeyPermissions.Raw | null;
|
|
9
11
|
}
|
|
10
12
|
}
|