@sendmux/cli 1.0.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 (70) hide show
  1. package/README.md +26 -0
  2. package/bin/run.js +5 -0
  3. package/dist/base-command.d.ts +25 -0
  4. package/dist/base-command.d.ts.map +1 -0
  5. package/dist/base-command.js +93 -0
  6. package/dist/commands/mailbox/folders/list.d.ts +24 -0
  7. package/dist/commands/mailbox/folders/list.d.ts.map +1 -0
  8. package/dist/commands/mailbox/folders/list.js +6 -0
  9. package/dist/commands/mailbox/me/get.d.ts +21 -0
  10. package/dist/commands/mailbox/me/get.d.ts.map +1 -0
  11. package/dist/commands/mailbox/me/get.js +6 -0
  12. package/dist/commands/mailbox/messages/get.d.ts +24 -0
  13. package/dist/commands/mailbox/messages/get.d.ts.map +1 -0
  14. package/dist/commands/mailbox/messages/get.js +6 -0
  15. package/dist/commands/mailbox/messages/list.d.ts +87 -0
  16. package/dist/commands/mailbox/messages/list.d.ts.map +1 -0
  17. package/dist/commands/mailbox/messages/list.js +6 -0
  18. package/dist/commands/management/domains/get.d.ts +24 -0
  19. package/dist/commands/management/domains/get.d.ts.map +1 -0
  20. package/dist/commands/management/domains/get.js +6 -0
  21. package/dist/commands/management/domains/list.d.ts +24 -0
  22. package/dist/commands/management/domains/list.d.ts.map +1 -0
  23. package/dist/commands/management/domains/list.js +6 -0
  24. package/dist/commands/management/mailboxes/list.d.ts +27 -0
  25. package/dist/commands/management/mailboxes/list.d.ts.map +1 -0
  26. package/dist/commands/management/mailboxes/list.js +6 -0
  27. package/dist/commands/management/providers/list.d.ts +30 -0
  28. package/dist/commands/management/providers/list.d.ts.map +1 -0
  29. package/dist/commands/management/providers/list.js +6 -0
  30. package/dist/commands/profiles/list.d.ts +9 -0
  31. package/dist/commands/profiles/list.d.ts.map +1 -0
  32. package/dist/commands/profiles/list.js +28 -0
  33. package/dist/commands/profiles/set.d.ts +14 -0
  34. package/dist/commands/profiles/set.d.ts.map +1 -0
  35. package/dist/commands/profiles/set.js +57 -0
  36. package/dist/commands/profiles/show.d.ts +9 -0
  37. package/dist/commands/profiles/show.d.ts.map +1 -0
  38. package/dist/commands/profiles/show.js +36 -0
  39. package/dist/commands/sending/send/batch.d.ts +21 -0
  40. package/dist/commands/sending/send/batch.d.ts.map +1 -0
  41. package/dist/commands/sending/send/batch.js +6 -0
  42. package/dist/commands/sending/send.d.ts +21 -0
  43. package/dist/commands/sending/send.d.ts.map +1 -0
  44. package/dist/commands/sending/send.js +6 -0
  45. package/dist/generated/operations.d.ts +2340 -0
  46. package/dist/generated/operations.d.ts.map +1 -0
  47. package/dist/generated/operations.js +2511 -0
  48. package/dist/index.d.ts +2 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +1 -0
  51. package/dist/key-kind.d.ts +4 -0
  52. package/dist/key-kind.d.ts.map +1 -0
  53. package/dist/key-kind.js +15 -0
  54. package/dist/operation-command.d.ts +18 -0
  55. package/dist/operation-command.d.ts.map +1 -0
  56. package/dist/operation-command.js +11 -0
  57. package/dist/operation-flags.d.ts +33 -0
  58. package/dist/operation-flags.d.ts.map +1 -0
  59. package/dist/operation-flags.js +103 -0
  60. package/dist/operation-runner.d.ts +5 -0
  61. package/dist/operation-runner.d.ts.map +1 -0
  62. package/dist/operation-runner.js +45 -0
  63. package/dist/operation-types.d.ts +19 -0
  64. package/dist/operation-types.d.ts.map +1 -0
  65. package/dist/operation-types.js +1 -0
  66. package/dist/profiles.d.ts +12 -0
  67. package/dist/profiles.d.ts.map +1 -0
  68. package/dist/profiles.js +35 -0
  69. package/oclif.manifest.json +1546 -0
  70. package/package.json +60 -0
@@ -0,0 +1,9 @@
1
+ import { SendmuxCommand } from "../../base-command.js";
2
+ export default class ProfilesShow extends SendmuxCommand {
3
+ static args: {
4
+ name: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ run(): Promise<unknown>;
8
+ }
9
+ //# sourceMappingURL=show.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../../src/commands/profiles/show.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAOvD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,cAAc;IACtD,MAAM,CAAC,IAAI;;MAKT;IACF,MAAM,CAAC,WAAW,SAAiE;IAE7E,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC;CAyB9B"}
@@ -0,0 +1,36 @@
1
+ import { Args } from "@oclif/core";
2
+ import { SendmuxCommand } from "../../base-command.js";
3
+ import { inferApiKeyKind, maskApiKey, } from "../../key-kind.js";
4
+ import { readCliConfig } from "../../profiles.js";
5
+ export default class ProfilesShow extends SendmuxCommand {
6
+ static args = {
7
+ name: Args.string({
8
+ description: "Profile name. Defaults to the configured default profile.",
9
+ required: false,
10
+ }),
11
+ };
12
+ static description = "Show a local Sendmux CLI profile without revealing its key.";
13
+ async run() {
14
+ const { args } = await this.parse(ProfilesShow);
15
+ const config = await readCliConfig(this.config.configDir);
16
+ const profileName = args.name ?? config.defaultProfile;
17
+ if (!profileName) {
18
+ this.error("No default Sendmux profile configured.", { exit: 2 });
19
+ }
20
+ const profile = config.profiles[profileName];
21
+ if (!profile) {
22
+ this.error(`Sendmux profile "${profileName}" was not found.`, { exit: 2 });
23
+ }
24
+ return this.renderResult({
25
+ ok: true,
26
+ data: {
27
+ api_key: maskApiKey(profile.apiKey),
28
+ default: profileName === config.defaultProfile,
29
+ key_kind: inferApiKeyKind(profile.apiKey),
30
+ name: profileName,
31
+ ...(profile.baseUrl ? { base_url: profile.baseUrl } : {}),
32
+ },
33
+ meta: {},
34
+ });
35
+ }
36
+ }
@@ -0,0 +1,21 @@
1
+ import { OperationCommand } from "../../../operation-command.js";
2
+ export default class SendingSendBatch extends OperationCommand {
3
+ static description: "Send a batch of emails";
4
+ static operation: {
5
+ readonly command: "sending:send:batch";
6
+ readonly description: "Send a batch of emails";
7
+ readonly headerParams: readonly [{
8
+ readonly name: "Idempotency-Key";
9
+ readonly required: false;
10
+ }];
11
+ readonly method: "post";
12
+ readonly operationId: "sendingSendEmailBatch";
13
+ readonly path: "/emails/send/batch";
14
+ readonly pathParams: readonly [];
15
+ readonly queryParams: readonly [];
16
+ readonly requestBodyRequired: true;
17
+ readonly requiredKeyKind: "root";
18
+ readonly surface: "sending";
19
+ };
20
+ }
21
+ //# sourceMappingURL=batch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../../src/commands/sending/send/batch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,gBAAgB;IAC5D,MAAM,CAAC,WAAW,2BAAuD;IACzE,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;MAA2C;CAC5D"}
@@ -0,0 +1,6 @@
1
+ import { curatedOperations } from "../../../generated/operations.js";
2
+ import { OperationCommand } from "../../../operation-command.js";
3
+ export default class SendingSendBatch extends OperationCommand {
4
+ static description = curatedOperations.sendingSendEmailBatch.description;
5
+ static operation = curatedOperations.sendingSendEmailBatch;
6
+ }
@@ -0,0 +1,21 @@
1
+ import { OperationCommand } from "../../operation-command.js";
2
+ export default class SendingSend extends OperationCommand {
3
+ static description: "Send a single email";
4
+ static operation: {
5
+ readonly command: "sending:send";
6
+ readonly description: "Send a single email";
7
+ readonly headerParams: readonly [{
8
+ readonly name: "Idempotency-Key";
9
+ readonly required: false;
10
+ }];
11
+ readonly method: "post";
12
+ readonly operationId: "sendingSendEmail";
13
+ readonly path: "/emails/send";
14
+ readonly pathParams: readonly [];
15
+ readonly queryParams: readonly [];
16
+ readonly requestBodyRequired: true;
17
+ readonly requiredKeyKind: "root";
18
+ readonly surface: "sending";
19
+ };
20
+ }
21
+ //# sourceMappingURL=send.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/commands/sending/send.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,gBAAgB;IACvD,MAAM,CAAC,WAAW,wBAAkD;IACpE,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;MAAsC;CACvD"}
@@ -0,0 +1,6 @@
1
+ import { curatedOperations } from "../../generated/operations.js";
2
+ import { OperationCommand } from "../../operation-command.js";
3
+ export default class SendingSend extends OperationCommand {
4
+ static description = curatedOperations.sendingSendEmail.description;
5
+ static operation = curatedOperations.sendingSendEmail;
6
+ }