@sendmux/cli 1.0.1 → 1.2.0

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.
Files changed (35) hide show
  1. package/README.md +63 -8
  2. package/dist/base-command.d.ts +2 -2
  3. package/dist/base-command.d.ts.map +1 -1
  4. package/dist/base-command.js +4 -4
  5. package/dist/commands/mailbox/create-attachment-upload.d.ts +26 -0
  6. package/dist/commands/mailbox/create-attachment-upload.d.ts.map +1 -0
  7. package/dist/commands/mailbox/create-attachment-upload.js +7 -0
  8. package/dist/commands/mailbox/get-message-attachment.d.ts +6 -0
  9. package/dist/commands/mailbox/get-message-attachment.d.ts.map +1 -1
  10. package/dist/commands/mailbox/stream-events.d.ts +18 -0
  11. package/dist/commands/mailbox/stream-events.d.ts.map +1 -1
  12. package/dist/commands/mailbox/stream-events.js +8 -0
  13. package/dist/commands/management/check-mailbox-availability.d.ts +26 -0
  14. package/dist/commands/management/check-mailbox-availability.d.ts.map +1 -0
  15. package/dist/commands/management/check-mailbox-availability.js +7 -0
  16. package/dist/commands/sending/get-open-api-spec.d.ts +1 -1
  17. package/dist/commands/sending/send/batch.d.ts +1 -1
  18. package/dist/commands/sending/send.d.ts +1 -1
  19. package/dist/generated/operations.d.ts +53 -5
  20. package/dist/generated/operations.d.ts.map +1 -1
  21. package/dist/generated/operations.js +56 -3
  22. package/dist/key-kind.d.ts +3 -0
  23. package/dist/key-kind.d.ts.map +1 -1
  24. package/dist/key-kind.js +13 -1
  25. package/dist/operation-command.d.ts +4 -0
  26. package/dist/operation-command.d.ts.map +1 -1
  27. package/dist/operation-flags.d.ts +9 -0
  28. package/dist/operation-flags.d.ts.map +1 -1
  29. package/dist/operation-flags.js +29 -4
  30. package/dist/operation-runner.d.ts.map +1 -1
  31. package/dist/operation-runner.js +282 -0
  32. package/dist/operation-types.d.ts +2 -2
  33. package/dist/operation-types.d.ts.map +1 -1
  34. package/oclif.manifest.json +3002 -104
  35. package/package.json +2 -2
package/README.md CHANGED
@@ -9,17 +9,18 @@ Agent-drivable command line interface for Sendmux.
9
9
 
10
10
  ## Documentation
11
11
 
12
- - Sendmux docs: [docs.sendmux.ai](https://docs.sendmux.ai)
13
- - Management API reference: [docs.sendmux.ai/api/introduction](https://docs.sendmux.ai/api/introduction)
14
- - Mailbox API reference: [docs.sendmux.ai/mailbox-api/introduction](https://docs.sendmux.ai/mailbox-api/introduction)
15
- - Sending API reference: [docs.sendmux.ai/sending-api/introduction](https://docs.sendmux.ai/sending-api/introduction)
12
+ - Sendmux docs: [sendmux.ai/docs](https://sendmux.ai/docs)
13
+ - Management API reference: [sendmux.ai/docs/api/introduction](https://sendmux.ai/docs/api/introduction)
14
+ - Mailbox API reference: [sendmux.ai/docs/mailbox-api/introduction](https://sendmux.ai/docs/mailbox-api/introduction)
15
+ - Sending API reference: [sendmux.ai/docs/sending-api/introduction](https://sendmux.ai/docs/sending-api/introduction)
16
16
  - Source repository: [Sendmux/sendmux-sdk](https://github.com/Sendmux/sendmux-sdk)
17
17
 
18
18
  ## Requirements
19
19
 
20
20
  - npm global installs, `npx`, or a downloaded release tarball.
21
21
  - A root `smx_root_*` key for Management commands.
22
- - A mailbox-scoped `smx_mbx_*` key for Mailbox and Sending commands.
22
+ - A send-capable `smx_mbx_*` key or owner-approved Sending-resource `smx_agent_*` token for Sending commands.
23
+ - A mailbox-scoped `smx_mbx_*` key or scoped `smx_agent_*` token for Mailbox commands. Agent tokens remain limited by server-side scopes; pre-claim self-registered agent tokens do not include `email.send`.
23
24
 
24
25
  ## Installation
25
26
 
@@ -49,12 +50,58 @@ sendmux sending:send --profile sending --body '{"from":{"email":"sender@example.
49
50
 
50
51
  Commands reject mismatched key types before making a network request.
51
52
 
53
+ ## Attachments And Events
54
+
55
+ Send a mailbox message with a local file in one command:
56
+
57
+ ```sh
58
+ sendmux mailbox:send-message \
59
+ --profile mailbox \
60
+ --idempotency-key "$IDEMPOTENCY_KEY" \
61
+ --attach ./report.md \
62
+ --body '{"to":[{"email":"recipient@example.com","name":null}],"subject":"Report","text_body":"Attached."}' \
63
+ --json
64
+ ```
65
+
66
+ `--attach` can be repeated. The CLI reads and uploads each local file before sending, so the file bytes do not pass through model context. Mailbox uploads use the mailbox attachment cap, currently `7,500,000` bytes per attachment; Sending API sends use the generated Sending API request-body limits.
67
+
68
+ Upload a file first, then use the returned `blob_id` in `mailbox:send-message`:
69
+
70
+ ```sh
71
+ sendmux mailbox:upload-attachment \
72
+ --profile mailbox \
73
+ --file ./report.md \
74
+ --json
75
+ ```
76
+
77
+ Use presigned upload when a shell should upload without an API key:
78
+
79
+ ```sh
80
+ sendmux mailbox:upload-attachment \
81
+ --profile mailbox \
82
+ --file ./report.md \
83
+ --via-presigned \
84
+ --json
85
+ ```
86
+
87
+ Attachment metadata returned from message, search, and event operations includes `download_url`. Fetch it promptly with any HTTP client; no `Authorization` header is needed. If it expires, re-run the message or attachment metadata command to get a fresh URL.
88
+
89
+ Follow live mailbox events as newline-delimited JSON:
90
+
91
+ ```sh
92
+ sendmux mailbox:stream-events \
93
+ --profile mailbox \
94
+ --query event_types=message.received \
95
+ --query close_after=300 \
96
+ --follow
97
+ ```
98
+
52
99
  ## Commands
53
100
 
54
- The CLI includes `95` generated API operation commands:
101
+ The CLI includes `97` generated API operation commands:
55
102
 
56
- - `40` Mailbox commands, including `mailbox:messages:list`, `mailbox:messages:get`, `mailbox:send-message`, and `mailbox:list-granted-mailboxes`.
57
- - `52` Management commands, including `management:domains:list`, `management:create-mailbox`, `management:get-spend-summary`, and `management:create-webhook`.
103
+ - `41` Mailbox commands, including `mailbox:messages:list`, `mailbox:messages:get`, `mailbox:send-message`, and `mailbox:list-granted-mailboxes`.
104
+ - `53` Management commands, including `management:domains:list`, `management:create-mailbox`, `management:get-spend-summary`, and `management:create-webhook`.
58
105
  - `3` Sending commands: `sending:get-open-api-spec`, `sending:send`, and `sending:send:batch`.
59
106
  - Profile commands: `profiles:list`, `profiles:set`, and `profiles:show`.
60
107
 
@@ -74,6 +121,10 @@ Operation commands support:
74
121
  - `--profile` / `-p`
75
122
  - `--body`
76
123
  - `--body-file`
124
+ - `--attach`
125
+ - `--file`
126
+ - `--via-presigned`
127
+ - `--content-type`
77
128
  - `--header`
78
129
  - `--idempotency-key`
79
130
  - `--if-match`
@@ -84,6 +135,10 @@ Operation commands support:
84
135
 
85
136
  `--path`, `--query`, and `--header` use `name=value` syntax and can be repeated when the operation accepts multiple values.
86
137
 
138
+ Attachment flags are command-specific: `--attach` works on supported send commands, while `--file` and `--via-presigned` work on mailbox attachment upload commands. Mailbox upload commands share the `7,500,000` byte per-attachment cap.
139
+
140
+ `mailbox:stream-events` also supports `--follow` to keep printing events until the stream closes or the process is interrupted.
141
+
87
142
  ## Support
88
143
 
89
144
  Open an issue in [Sendmux/sendmux-sdk](https://github.com/Sendmux/sendmux-sdk/issues) with the CLI version, command, flags, and request ID from any API error.
@@ -1,5 +1,5 @@
1
1
  import { Command } from "@oclif/core";
2
- import { type ApiKeyKind } from "./key-kind.js";
2
+ import { type ApiKeyKind, type RequiredApiKeyKind } from "./key-kind.js";
3
3
  export interface AuthFlags {
4
4
  "api-key"?: string;
5
5
  "base-url"?: string;
@@ -18,7 +18,7 @@ export declare const authFlags: {
18
18
  };
19
19
  export declare abstract class SendmuxCommand extends Command {
20
20
  static enableJsonFlag: boolean;
21
- resolveAuth(flags: AuthFlags, expectedKind: ApiKeyKind): Promise<ResolvedAuth>;
21
+ resolveAuth(flags: AuthFlags, expectedKind: RequiredApiKeyKind): Promise<ResolvedAuth>;
22
22
  renderResult(value: unknown): unknown;
23
23
  renderTextResult(value: string): unknown;
24
24
  renderBinaryResult(value: ArrayBuffer | ArrayBufferView | string): unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../src/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAS,MAAM,aAAa,CAAC;AAE7C,OAAO,EAEL,KAAK,UAAU,EAChB,MAAM,eAAe,CA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;AAEF,8BAAsB,cAAe,SAAQ,OAAO;IAClD,MAAM,CAAC,cAAc,UAAQ;IAEvB,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAmD5F,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IASrC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IASxC,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,eAAe,GAAG,MAAM,GAAG,OAAO;IAa1E,OAAO,CAAC,aAAa;CA4BtB"}
@@ -1,5 +1,5 @@
1
1
  import { Command, Flags } from "@oclif/core";
2
- import { inferApiKeyKind, } from "./key-kind.js";
2
+ import { apiKeyKindLabel, inferApiKeyKind, isApiKeyCompatibleWithKind, } from "./key-kind.js";
3
3
  import { readCliConfig } from "./profiles.js";
4
4
  export const authFlags = {
5
5
  "api-key": Flags.string({
@@ -94,9 +94,9 @@ export class SendmuxCommand extends Command {
94
94
  catch (error) {
95
95
  this.error(error instanceof Error ? error.message : "Invalid Sendmux API key", { exit: 2 });
96
96
  }
97
- if (apiKeyKind !== expectedKind) {
98
- const expectedLabel = expectedKind === "root" ? "root" : "mailbox";
99
- const actualLabel = apiKeyKind === "root" ? "root" : "mailbox";
97
+ if (!isApiKeyCompatibleWithKind(apiKey, expectedKind)) {
98
+ const expectedLabel = apiKeyKindLabel(expectedKind);
99
+ const actualLabel = apiKeyKindLabel(apiKeyKind);
100
100
  this.error(`Command requires a ${expectedLabel} API key, but ${source} contains a ${actualLabel} API key.`, {
101
101
  exit: 2,
102
102
  });
@@ -0,0 +1,26 @@
1
+ import { OperationCommand } from "../../operation-command.js";
2
+ export default class MailboxCreateAttachmentUploadCommand extends OperationCommand {
3
+ static description: "Create a presigned mailbox attachment upload";
4
+ static operation: {
5
+ readonly bodyKind: "json";
6
+ readonly command: "mailbox:create-attachment-upload";
7
+ readonly description: "Create a presigned mailbox attachment upload";
8
+ readonly headerParams: readonly [];
9
+ readonly method: "post";
10
+ readonly operationId: "mailboxCreateAttachmentUpload";
11
+ readonly path: "/mailbox/attachment-uploads";
12
+ readonly pathParams: readonly [];
13
+ readonly queryParams: readonly [{
14
+ readonly name: "mailbox_id";
15
+ readonly required: false;
16
+ readonly schema: {
17
+ readonly type: "string";
18
+ };
19
+ }];
20
+ readonly responseKind: "json";
21
+ readonly requestBodyRequired: false;
22
+ readonly requiredKeyKind: "mailbox";
23
+ readonly surface: "mailbox";
24
+ };
25
+ }
26
+ //# sourceMappingURL=create-attachment-upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-attachment-upload.d.ts","sourceRoot":"","sources":["../../../src/commands/mailbox/create-attachment-upload.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,CAAC,OAAO,OAAO,oCAAqC,SAAQ,gBAAgB;IAChF,MAAM,CAAC,WAAW,iDAAwD;IAC1E,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;MAA4C;CAC7D"}
@@ -0,0 +1,7 @@
1
+ // This file is generated by scripts/generate-cli.mjs
2
+ import { operations } from "../../generated/operations.js";
3
+ import { OperationCommand } from "../../operation-command.js";
4
+ export default class MailboxCreateAttachmentUploadCommand extends OperationCommand {
5
+ static description = operations.mailboxCreateAttachmentUpload.description;
6
+ static operation = operations.mailboxCreateAttachmentUpload;
7
+ }
@@ -34,6 +34,12 @@ export default class MailboxGetMessageAttachmentCommand extends OperationCommand
34
34
  readonly schema: {
35
35
  readonly type: "string";
36
36
  };
37
+ }, {
38
+ readonly name: "download_token";
39
+ readonly required: false;
40
+ readonly schema: {
41
+ readonly type: "string";
42
+ };
37
43
  }];
38
44
  readonly responseKind: "json";
39
45
  readonly requestBodyRequired: false;
@@ -1 +1 @@
1
- {"version":3,"file":"get-message-attachment.d.ts","sourceRoot":"","sources":["../../../src/commands/mailbox/get-message-attachment.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,gBAAgB;IAC9E,MAAM,CAAC,WAAW,kCAAsD;IACxE,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA0C;CAC3D"}
1
+ {"version":3,"file":"get-message-attachment.d.ts","sourceRoot":"","sources":["../../../src/commands/mailbox/get-message-attachment.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,gBAAgB;IAC9E,MAAM,CAAC,WAAW,kCAAsD;IACxE,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA0C;CAC3D"}
@@ -1,6 +1,24 @@
1
1
  import { OperationCommand } from "../../operation-command.js";
2
2
  export default class MailboxStreamEventsCommand extends OperationCommand {
3
3
  static description: "Stream mailbox events";
4
+ static flags: {
5
+ follow: import("@oclif/core/interfaces").BooleanFlag<boolean>;
6
+ attach: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ body: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ "body-file": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ "content-type": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ header: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ "idempotency-key": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ "if-match": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ "if-none-match": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ path: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ query: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ "via-presigned": import("@oclif/core/interfaces").BooleanFlag<boolean>;
18
+ "api-key": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ "base-url": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ };
4
22
  static operation: {
5
23
  readonly bodyKind: "none";
6
24
  readonly command: "mailbox:stream-events";
@@ -1 +1 @@
1
- {"version":3,"file":"stream-events.d.ts","sourceRoot":"","sources":["../../../src/commands/mailbox/stream-events.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,gBAAgB;IACtE,MAAM,CAAC,WAAW,0BAA8C;IAChE,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAkC;CACnD"}
1
+ {"version":3,"file":"stream-events.d.ts","sourceRoot":"","sources":["../../../src/commands/mailbox/stream-events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,gBAAgB;IACtE,MAAM,CAAC,WAAW,0BAA8C;IAChE,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;;MAKV;IACF,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAkC;CACnD"}
@@ -1,7 +1,15 @@
1
1
  // This file is generated by scripts/generate-cli.mjs
2
+ import { Flags } from "@oclif/core";
2
3
  import { operations } from "../../generated/operations.js";
3
4
  import { OperationCommand } from "../../operation-command.js";
5
+ import { operationFlags } from "../../operation-flags.js";
4
6
  export default class MailboxStreamEventsCommand extends OperationCommand {
5
7
  static description = operations.mailboxStreamEvents.description;
8
+ static flags = {
9
+ ...operationFlags,
10
+ follow: Flags.boolean({
11
+ description: "Keep streaming mailbox events until the stream closes or the process is interrupted. Emits one JSON object per line.",
12
+ }),
13
+ };
6
14
  static operation = operations.mailboxStreamEvents;
7
15
  }
@@ -0,0 +1,26 @@
1
+ import { OperationCommand } from "../../operation-command.js";
2
+ export default class ManagementCheckMailboxAvailabilityCommand extends OperationCommand {
3
+ static description: "Check mailbox address availability";
4
+ static operation: {
5
+ readonly bodyKind: "none";
6
+ readonly command: "management:check-mailbox-availability";
7
+ readonly description: "Check mailbox address availability";
8
+ readonly headerParams: readonly [];
9
+ readonly method: "get";
10
+ readonly operationId: "managementCheckMailboxAvailability";
11
+ readonly path: "/mailboxes/availability";
12
+ readonly pathParams: readonly [];
13
+ readonly queryParams: readonly [{
14
+ readonly name: "email";
15
+ readonly required: true;
16
+ readonly schema: {
17
+ readonly type: "string";
18
+ };
19
+ }];
20
+ readonly responseKind: "json";
21
+ readonly requestBodyRequired: false;
22
+ readonly requiredKeyKind: "root";
23
+ readonly surface: "management";
24
+ };
25
+ }
26
+ //# sourceMappingURL=check-mailbox-availability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-mailbox-availability.d.ts","sourceRoot":"","sources":["../../../src/commands/management/check-mailbox-availability.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,CAAC,OAAO,OAAO,yCAA0C,SAAQ,gBAAgB;IACrF,MAAM,CAAC,WAAW,uCAA6D;IAC/E,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;MAAiD;CAClE"}
@@ -0,0 +1,7 @@
1
+ // This file is generated by scripts/generate-cli.mjs
2
+ import { operations } from "../../generated/operations.js";
3
+ import { OperationCommand } from "../../operation-command.js";
4
+ export default class ManagementCheckMailboxAvailabilityCommand extends OperationCommand {
5
+ static description = operations.managementCheckMailboxAvailability.description;
6
+ static operation = operations.managementCheckMailboxAvailability;
7
+ }
@@ -19,7 +19,7 @@ export default class SendingGetOpenApiSpecCommand extends OperationCommand {
19
19
  readonly queryParams: readonly [];
20
20
  readonly responseKind: "json";
21
21
  readonly requestBodyRequired: false;
22
- readonly requiredKeyKind: "mailbox";
22
+ readonly requiredKeyKind: "sending";
23
23
  readonly surface: "sending";
24
24
  };
25
25
  }
@@ -20,7 +20,7 @@ export default class SendingSendEmailBatchCommand extends OperationCommand {
20
20
  readonly queryParams: readonly [];
21
21
  readonly responseKind: "json";
22
22
  readonly requestBodyRequired: true;
23
- readonly requiredKeyKind: "mailbox";
23
+ readonly requiredKeyKind: "sending";
24
24
  readonly surface: "sending";
25
25
  };
26
26
  }
@@ -20,7 +20,7 @@ export default class SendingSendEmailCommand extends OperationCommand {
20
20
  readonly queryParams: readonly [];
21
21
  readonly responseKind: "json";
22
22
  readonly requestBodyRequired: true;
23
- readonly requiredKeyKind: "mailbox";
23
+ readonly requiredKeyKind: "sending";
24
24
  readonly surface: "sending";
25
25
  };
26
26
  }
@@ -199,6 +199,27 @@ export declare const operations: {
199
199
  readonly requiredKeyKind: "mailbox";
200
200
  readonly surface: "mailbox";
201
201
  };
202
+ readonly mailboxCreateAttachmentUpload: {
203
+ readonly bodyKind: "json";
204
+ readonly command: "mailbox:create-attachment-upload";
205
+ readonly description: "Create a presigned mailbox attachment upload";
206
+ readonly headerParams: readonly [];
207
+ readonly method: "post";
208
+ readonly operationId: "mailboxCreateAttachmentUpload";
209
+ readonly path: "/mailbox/attachment-uploads";
210
+ readonly pathParams: readonly [];
211
+ readonly queryParams: readonly [{
212
+ readonly name: "mailbox_id";
213
+ readonly required: false;
214
+ readonly schema: {
215
+ readonly type: "string";
216
+ };
217
+ }];
218
+ readonly responseKind: "json";
219
+ readonly requestBodyRequired: false;
220
+ readonly requiredKeyKind: "mailbox";
221
+ readonly surface: "mailbox";
222
+ };
202
223
  readonly mailboxCreateFolder: {
203
224
  readonly bodyKind: "json";
204
225
  readonly command: "mailbox:create-folder";
@@ -551,6 +572,12 @@ export declare const operations: {
551
572
  readonly schema: {
552
573
  readonly type: "string";
553
574
  };
575
+ }, {
576
+ readonly name: "download_token";
577
+ readonly required: false;
578
+ readonly schema: {
579
+ readonly type: "string";
580
+ };
554
581
  }];
555
582
  readonly responseKind: "json";
556
583
  readonly requestBodyRequired: false;
@@ -2148,6 +2175,27 @@ export declare const operations: {
2148
2175
  readonly requiredKeyKind: "root";
2149
2176
  readonly surface: "management";
2150
2177
  };
2178
+ readonly managementCheckMailboxAvailability: {
2179
+ readonly bodyKind: "none";
2180
+ readonly command: "management:check-mailbox-availability";
2181
+ readonly description: "Check mailbox address availability";
2182
+ readonly headerParams: readonly [];
2183
+ readonly method: "get";
2184
+ readonly operationId: "managementCheckMailboxAvailability";
2185
+ readonly path: "/mailboxes/availability";
2186
+ readonly pathParams: readonly [];
2187
+ readonly queryParams: readonly [{
2188
+ readonly name: "email";
2189
+ readonly required: true;
2190
+ readonly schema: {
2191
+ readonly type: "string";
2192
+ };
2193
+ }];
2194
+ readonly responseKind: "json";
2195
+ readonly requestBodyRequired: false;
2196
+ readonly requiredKeyKind: "root";
2197
+ readonly surface: "management";
2198
+ };
2151
2199
  readonly managementCreateDomain: {
2152
2200
  readonly bodyKind: "json";
2153
2201
  readonly command: "management:create-domain";
@@ -3532,7 +3580,7 @@ export declare const operations: {
3532
3580
  readonly queryParams: readonly [];
3533
3581
  readonly responseKind: "json";
3534
3582
  readonly requestBodyRequired: false;
3535
- readonly requiredKeyKind: "mailbox";
3583
+ readonly requiredKeyKind: "sending";
3536
3584
  readonly surface: "sending";
3537
3585
  };
3538
3586
  readonly sendingSendEmail: {
@@ -3554,7 +3602,7 @@ export declare const operations: {
3554
3602
  readonly queryParams: readonly [];
3555
3603
  readonly responseKind: "json";
3556
3604
  readonly requestBodyRequired: true;
3557
- readonly requiredKeyKind: "mailbox";
3605
+ readonly requiredKeyKind: "sending";
3558
3606
  readonly surface: "sending";
3559
3607
  };
3560
3608
  readonly sendingSendEmailBatch: {
@@ -3576,7 +3624,7 @@ export declare const operations: {
3576
3624
  readonly queryParams: readonly [];
3577
3625
  readonly responseKind: "json";
3578
3626
  readonly requestBodyRequired: true;
3579
- readonly requiredKeyKind: "mailbox";
3627
+ readonly requiredKeyKind: "sending";
3580
3628
  readonly surface: "sending";
3581
3629
  };
3582
3630
  };
@@ -3995,7 +4043,7 @@ export declare const curatedOperations: {
3995
4043
  readonly queryParams: readonly [];
3996
4044
  readonly responseKind: "json";
3997
4045
  readonly requestBodyRequired: true;
3998
- readonly requiredKeyKind: "mailbox";
4046
+ readonly requiredKeyKind: "sending";
3999
4047
  readonly surface: "sending";
4000
4048
  };
4001
4049
  readonly sendingSendEmailBatch: {
@@ -4017,7 +4065,7 @@ export declare const curatedOperations: {
4017
4065
  readonly queryParams: readonly [];
4018
4066
  readonly responseKind: "json";
4019
4067
  readonly requestBodyRequired: true;
4020
- readonly requiredKeyKind: "mailbox";
4068
+ readonly requiredKeyKind: "sending";
4021
4069
  readonly surface: "sending";
4022
4070
  };
4023
4071
  };
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/generated/operations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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G,MAAM,OAAO,UAAU,CAAC"}
@@ -227,6 +227,29 @@ export const operations = {
227
227
  "requiredKeyKind": "mailbox",
228
228
  "surface": "mailbox"
229
229
  },
230
+ mailboxCreateAttachmentUpload: {
231
+ "bodyKind": "json",
232
+ "command": "mailbox:create-attachment-upload",
233
+ "description": "Create a presigned mailbox attachment upload",
234
+ "headerParams": [],
235
+ "method": "post",
236
+ "operationId": "mailboxCreateAttachmentUpload",
237
+ "path": "/mailbox/attachment-uploads",
238
+ "pathParams": [],
239
+ "queryParams": [
240
+ {
241
+ "name": "mailbox_id",
242
+ "required": false,
243
+ "schema": {
244
+ "type": "string"
245
+ }
246
+ }
247
+ ],
248
+ "responseKind": "json",
249
+ "requestBodyRequired": false,
250
+ "requiredKeyKind": "mailbox",
251
+ "surface": "mailbox"
252
+ },
230
253
  mailboxCreateFolder: {
231
254
  "bodyKind": "json",
232
255
  "command": "mailbox:create-folder",
@@ -633,6 +656,13 @@ export const operations = {
633
656
  "schema": {
634
657
  "type": "string"
635
658
  }
659
+ },
660
+ {
661
+ "name": "download_token",
662
+ "required": false,
663
+ "schema": {
664
+ "type": "string"
665
+ }
636
666
  }
637
667
  ],
638
668
  "responseKind": "json",
@@ -2542,6 +2572,29 @@ export const operations = {
2542
2572
  "requiredKeyKind": "root",
2543
2573
  "surface": "management"
2544
2574
  },
2575
+ managementCheckMailboxAvailability: {
2576
+ "bodyKind": "none",
2577
+ "command": "management:check-mailbox-availability",
2578
+ "description": "Check mailbox address availability",
2579
+ "headerParams": [],
2580
+ "method": "get",
2581
+ "operationId": "managementCheckMailboxAvailability",
2582
+ "path": "/mailboxes/availability",
2583
+ "pathParams": [],
2584
+ "queryParams": [
2585
+ {
2586
+ "name": "email",
2587
+ "required": true,
2588
+ "schema": {
2589
+ "type": "string"
2590
+ }
2591
+ }
2592
+ ],
2593
+ "responseKind": "json",
2594
+ "requestBodyRequired": false,
2595
+ "requiredKeyKind": "root",
2596
+ "surface": "management"
2597
+ },
2545
2598
  managementCreateDomain: {
2546
2599
  "bodyKind": "json",
2547
2600
  "command": "management:create-domain",
@@ -4141,7 +4194,7 @@ export const operations = {
4141
4194
  "queryParams": [],
4142
4195
  "responseKind": "json",
4143
4196
  "requestBodyRequired": false,
4144
- "requiredKeyKind": "mailbox",
4197
+ "requiredKeyKind": "sending",
4145
4198
  "surface": "sending"
4146
4199
  },
4147
4200
  sendingSendEmail: {
@@ -4165,7 +4218,7 @@ export const operations = {
4165
4218
  "queryParams": [],
4166
4219
  "responseKind": "json",
4167
4220
  "requestBodyRequired": true,
4168
- "requiredKeyKind": "mailbox",
4221
+ "requiredKeyKind": "sending",
4169
4222
  "surface": "sending"
4170
4223
  },
4171
4224
  sendingSendEmailBatch: {
@@ -4189,7 +4242,7 @@ export const operations = {
4189
4242
  "queryParams": [],
4190
4243
  "responseKind": "json",
4191
4244
  "requestBodyRequired": true,
4192
- "requiredKeyKind": "mailbox",
4245
+ "requiredKeyKind": "sending",
4193
4246
  "surface": "sending"
4194
4247
  },
4195
4248
  };
@@ -1,4 +1,7 @@
1
1
  export type ApiKeyKind = "mailbox" | "root";
2
+ export type RequiredApiKeyKind = ApiKeyKind | "sending";
2
3
  export declare function inferApiKeyKind(apiKey: string): ApiKeyKind;
4
+ export declare function isApiKeyCompatibleWithKind(apiKey: string, expectedKind: RequiredApiKeyKind): boolean;
5
+ export declare function apiKeyKindLabel(kind: RequiredApiKeyKind): string;
3
6
  export declare function maskApiKey(apiKey: string): string;
4
7
  //# sourceMappingURL=key-kind.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"key-kind.d.ts","sourceRoot":"","sources":["../src/key-kind.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAE5C,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAU1D;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMjD"}
1
+ {"version":3,"file":"key-kind.d.ts","sourceRoot":"","sources":["../src/key-kind.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAC5C,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,SAAS,CAAC;AAExD,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAc1D;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,kBAAkB,GAAG,OAAO,CAMpG;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAEhE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMjD"}
package/dist/key-kind.js CHANGED
@@ -5,7 +5,19 @@ export function inferApiKeyKind(apiKey) {
5
5
  if (apiKey.startsWith("smx_mbx_")) {
6
6
  return "mailbox";
7
7
  }
8
- throw new Error("Sendmux API keys must start with smx_root_ or smx_mbx_");
8
+ if (apiKey.startsWith("smx_agent_")) {
9
+ return "mailbox";
10
+ }
11
+ throw new Error("Sendmux API keys must start with smx_root_, smx_mbx_, or smx_agent_");
12
+ }
13
+ export function isApiKeyCompatibleWithKind(apiKey, expectedKind) {
14
+ if (expectedKind === "sending") {
15
+ return apiKey.startsWith("smx_mbx_") || apiKey.startsWith("smx_agent_");
16
+ }
17
+ return inferApiKeyKind(apiKey) === expectedKind;
18
+ }
19
+ export function apiKeyKindLabel(kind) {
20
+ return kind === "sending" ? "sending" : kind;
9
21
  }
10
22
  export function maskApiKey(apiKey) {
11
23
  if (apiKey.length <= 16) {
@@ -1,14 +1,18 @@
1
1
  import { SendmuxCommand } from "./base-command.js";
2
2
  export declare abstract class OperationCommand extends SendmuxCommand {
3
3
  static flags: {
4
+ attach: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
4
5
  body: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
5
6
  "body-file": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ "content-type": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
6
9
  header: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
10
  "idempotency-key": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
11
  "if-match": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
12
  "if-none-match": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
13
  path: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
14
  query: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ "via-presigned": import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
16
  "api-key": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
17
  "base-url": import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
18
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -1 +1 @@
1
- {"version":3,"file":"operation-command.d.ts","sourceRoot":"","sources":["../src/operation-command.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,8BAAsB,gBAAiB,SAAQ,cAAc;IAC3D,MAAM,CAAC,KAAK;;;;;;;;;;;;MAAkB;IAExB,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;CAK9B"}
1
+ {"version":3,"file":"operation-command.d.ts","sourceRoot":"","sources":["../src/operation-command.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,8BAAsB,gBAAiB,SAAQ,cAAc;IAC3D,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;MAAkB;IAExB,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;CAK9B"}