@myapihq/cli 1.1.0-wip.4 → 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.
- package/dist/commands/{email.d.ts → audience.d.ts} +2 -0
- package/dist/commands/audience.js +245 -0
- package/dist/commands/auth.d.ts +5 -2
- package/dist/commands/auth.js +133 -5
- package/dist/commands/billing.d.ts +2 -0
- package/dist/commands/billing.js +18 -1
- package/dist/commands/company.d.ts +6 -0
- package/dist/commands/company.js +149 -0
- package/dist/commands/config.d.ts +2 -0
- package/dist/commands/config.js +20 -0
- package/dist/commands/crm/companies.d.ts +6 -0
- package/dist/commands/crm/companies.js +193 -0
- package/dist/commands/crm/contacts.d.ts +6 -0
- package/dist/commands/crm/contacts.js +241 -0
- package/dist/commands/crm/index.d.ts +6 -0
- package/dist/commands/crm/index.js +74 -0
- package/dist/commands/database.d.ts +6 -0
- package/dist/commands/database.js +259 -0
- package/dist/commands/domain.d.ts +3 -0
- package/dist/commands/domain.js +67 -1
- package/dist/commands/email/campaign.d.ts +2 -0
- package/dist/commands/email/campaign.js +34 -1
- package/dist/commands/email/index.d.ts +2 -0
- package/dist/commands/email/index.js +9 -0
- package/dist/commands/email/mailbox.d.ts +2 -0
- package/dist/commands/email/mailbox.js +5 -0
- package/dist/commands/email/message.d.ts +2 -0
- package/dist/commands/email/message.js +8 -0
- package/dist/commands/email/template.d.ts +2 -0
- package/dist/commands/email/template.js +54 -0
- package/dist/commands/email/verify.d.ts +7 -0
- package/dist/commands/email/verify.js +52 -0
- package/dist/commands/email/warmup.d.ts +2 -0
- package/dist/commands/email/warmup.js +7 -0
- package/dist/commands/funnel.d.ts +3 -0
- package/dist/commands/funnel.js +31 -0
- package/dist/commands/image.d.ts +2 -0
- package/dist/commands/image.js +43 -9
- package/dist/commands/keys.d.ts +2 -0
- package/dist/commands/keys.js +5 -0
- package/dist/commands/llm.d.ts +6 -0
- package/dist/commands/llm.js +156 -0
- package/dist/commands/org.d.ts +3 -0
- package/dist/commands/org.js +55 -0
- package/dist/commands/people.d.ts +6 -0
- package/dist/commands/people.js +136 -0
- package/dist/commands/pixel.d.ts +11 -3
- package/dist/commands/pixel.js +93 -0
- package/dist/commands/setup.d.ts +2 -0
- package/dist/commands/setup.js +57 -5
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.js +154 -0
- package/dist/commands/storage.d.ts +2 -0
- package/dist/commands/storage.js +14 -2
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.js +3 -0
- package/dist/commands/url.d.ts +7 -2
- package/dist/commands/url.js +6 -0
- package/dist/commands/verify.d.ts +7 -0
- package/dist/commands/verify.js +56 -0
- package/dist/commands/webhook.d.ts +2 -0
- package/dist/commands/webhook.js +31 -6
- package/dist/commands/workflow.d.ts +2 -0
- package/dist/commands/workflow.js +19 -1
- package/dist/completion.d.ts +3 -0
- package/dist/completion.js +78 -0
- package/dist/config.d.ts +2 -0
- package/dist/exposes.d.ts +2 -0
- package/dist/exposes.js +13 -0
- package/dist/exposes.test.js +99 -0
- package/dist/flags.test.js +84 -0
- package/dist/index.js +106 -14
- package/dist/prompt.d.ts +15 -0
- package/dist/prompt.js +27 -0
- package/dist/registrant.d.ts +6 -0
- package/dist/registrant.js +155 -0
- package/dist/services-sync.test.d.ts +1 -0
- package/dist/services-sync.test.js +32 -0
- package/dist/skills/my-api-hq/SKILL.md +51 -45
- package/dist/skills/my-crm-api/README.md +42 -0
- package/dist/skills/my-crm-api/SKILL.md +165 -0
- package/dist/skills/my-crm-api/claude/.claude-plugin/plugin.json +6 -0
- package/dist/skills/my-database-api/README.md +41 -0
- package/dist/skills/my-database-api/SKILL.md +107 -0
- package/dist/skills/my-database-api/claude/.claude-plugin/plugin.json +6 -0
- package/dist/skills/my-domain-api/SKILL.md +53 -26
- package/dist/skills/my-email-verify-api/README.md +33 -0
- package/dist/skills/my-email-verify-api/SKILL.md +91 -0
- package/dist/skills/my-email-verify-api/claude/.claude-plugin/plugin.json +6 -0
- package/dist/skills/my-funnel-api/SKILL.md +41 -37
- package/dist/skills/my-image-api/SKILL.md +48 -44
- package/dist/skills/my-llm-api/README.md +35 -0
- package/dist/skills/my-llm-api/SKILL.md +125 -0
- package/dist/skills/my-llm-api/claude/.claude-plugin/plugin.json +6 -0
- package/dist/skills/my-storage-api/README.md +1 -1
- package/dist/skills/my-storage-api/SKILL.md +44 -54
- package/dist/skills/my-webhook-api/README.md +1 -1
- package/dist/skills/my-webhook-api/SKILL.md +48 -92
- package/dist/skills/my-workflow-api/SKILL.md +46 -115
- package/dist/telemetry.d.ts +12 -0
- package/dist/telemetry.js +80 -0
- package/dist/telemetry.test.d.ts +1 -0
- package/dist/telemetry.test.js +101 -0
- package/package.json +13 -8
- package/dist/commands/email.js +0 -586
- package/dist/skills/my-email-api/README.md +0 -45
- package/dist/skills/my-email-api/SKILL.md +0 -104
- package/dist/skills/my-email-api/claude/.claude-plugin/plugin.json +0 -6
- package/dist/skills/my-email-api/make/.gitkeep +0 -0
- package/dist/skills/my-email-api/n8n/.gitkeep +0 -0
- package/dist/skills/my-email-api/openapi/.gitkeep +0 -0
- package/dist/skills/my-funnel-api/make/.gitkeep +0 -0
- package/dist/skills/my-funnel-api/n8n/.gitkeep +0 -0
- package/dist/skills/my-image-api/make/.gitkeep +0 -0
- package/dist/skills/my-image-api/n8n/.gitkeep +0 -0
- package/dist/skills/my-storage-api/make/.gitkeep +0 -0
- package/dist/skills/my-storage-api/n8n/.gitkeep +0 -0
- package/dist/skills/my-webhook-api/make/.gitkeep +0 -0
- package/dist/skills/my-webhook-api/n8n/.gitkeep +0 -0
- package/dist/skills/my-workflow-api/make/.gitkeep +0 -0
- package/dist/skills/my-workflow-api/n8n/.gitkeep +0 -0
- package/dist/utils.test.js +0 -48
- /package/dist/{utils.test.d.ts → exposes.test.d.ts} +0 -0
- /package/dist/skills/{my-api-hq/make → my-crm-api/openapi}/.gitkeep +0 -0
- /package/dist/skills/{my-api-hq/n8n → my-database-api/openapi}/.gitkeep +0 -0
- /package/dist/skills/{my-domain-api/make → my-email-verify-api/openapi}/.gitkeep +0 -0
- /package/dist/skills/{my-domain-api/n8n → my-llm-api/openapi}/.gitkeep +0 -0
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: my-email-api
|
|
3
|
-
description: >
|
|
4
|
-
Send transactional and bulk email from your own domain. Create mailboxes, send/receive messages, generate AI templates, run drip campaigns, and manage warmup.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# MyEmailAPI
|
|
8
|
-
|
|
9
|
-
Account-scoped email infrastructure tied to your registered domains. Mailboxes belong to domains; sending and receiving work without per-org plumbing. Templates and campaigns are org-scoped (one campaign belongs to one org).
|
|
10
|
-
|
|
11
|
-
## How It Fits Together
|
|
12
|
-
|
|
13
|
-
- Requires `api_key` from **myapihq** and a registered domain via **mydomainapi**.
|
|
14
|
-
- Mailboxes live on a domain (e.g. `hello@yourdomain.com`).
|
|
15
|
-
- Sending must be activated per-mailbox (`mailbox activate-sending`) before transactional sends or campaigns.
|
|
16
|
-
- Templates and campaigns require `org_id` (set a default with `myapi auth config set-org`).
|
|
17
|
-
|
|
18
|
-
## Quick Start
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# 1. Create a mailbox on your registered domain
|
|
22
|
-
myapi email mailbox create hello@yourdomain.com --display-name "Hello"
|
|
23
|
-
|
|
24
|
-
# 2. Activate sending (required before send/campaign)
|
|
25
|
-
myapi email mailbox activate-sending --address hello@yourdomain.com
|
|
26
|
-
|
|
27
|
-
# 3. Send a transactional email
|
|
28
|
-
myapi email message send \
|
|
29
|
-
--from hello@yourdomain.com \
|
|
30
|
-
--to recipient@example.com \
|
|
31
|
-
--subject "Hi" \
|
|
32
|
-
--body "Test message"
|
|
33
|
-
|
|
34
|
-
# 4. Read inbox / outbox
|
|
35
|
-
myapi email message inbox hello@yourdomain.com
|
|
36
|
-
myapi email message outbox hello@yourdomain.com
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Command Map
|
|
40
|
-
|
|
41
|
-
| Namespace | Subcommands | Purpose |
|
|
42
|
-
|---|---|---|
|
|
43
|
-
| `email mailbox` | `create`, `list`, `activate-sending` | Create and manage mailboxes on your domains |
|
|
44
|
-
| `email message` | `send`, `status`, `sent`, `inbox`, `outbox`, `get` | Transactional send + read |
|
|
45
|
-
| `email warmup` | `start`, `stats`, `pause`, `resume`, `stop` | IP/domain warmup for sending reputation |
|
|
46
|
-
| `email template` | `generate`, `list`, `edit`, `send-test`, `delete` | AI-generated HTML templates (org-scoped) |
|
|
47
|
-
| `email campaign` | `create`, `list`, `get`, `update`, `upload-contacts`, `start`, `pause`, `resume`, `stats` | Drip campaigns (org-scoped) |
|
|
48
|
-
|
|
49
|
-
## Templates (AI-generated)
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
# Generate a template — polls the LLM job (up to 90s)
|
|
53
|
-
myapi email template generate welcome-v1 \
|
|
54
|
-
--prompt "A welcome email with our brand colors and a CTA to /onboarding"
|
|
55
|
-
|
|
56
|
-
# List, edit, delete
|
|
57
|
-
myapi email template list
|
|
58
|
-
myapi email template edit <id> --prompt "Make the CTA larger and red"
|
|
59
|
-
myapi email template send-test <id> --to me@yourdomain.com
|
|
60
|
-
myapi email template delete <id>
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Campaigns
|
|
64
|
-
|
|
65
|
-
Campaigns send a template to a contact list at a per-day rate.
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
# 1. Create a campaign linked to an existing template + sender mailbox
|
|
69
|
-
myapi email campaign create "Welcome series" \
|
|
70
|
-
--template-id <template_id> \
|
|
71
|
-
--from hello@yourdomain.com \
|
|
72
|
-
--per-day 50
|
|
73
|
-
|
|
74
|
-
# 2. Upload contacts
|
|
75
|
-
myapi email campaign upload-contacts <campaign_id> \
|
|
76
|
-
--emails "alice@example.com,bob@example.com"
|
|
77
|
-
|
|
78
|
-
# 3. Start (only after upload-contacts has finished processing)
|
|
79
|
-
myapi email campaign start <campaign_id>
|
|
80
|
-
|
|
81
|
-
# 4. Monitor
|
|
82
|
-
myapi email campaign stats <campaign_id>
|
|
83
|
-
myapi email campaign pause <campaign_id>
|
|
84
|
-
myapi email campaign resume <campaign_id>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Warmup
|
|
88
|
-
|
|
89
|
-
Warmup gradually ramps mailbox sending to build reputation with inbox providers. Recommended before high-volume campaigns.
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
myapi email warmup start --address hello@yourdomain.com
|
|
93
|
-
myapi email warmup stats --address hello@yourdomain.com
|
|
94
|
-
myapi email warmup pause --address hello@yourdomain.com
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## Notes
|
|
98
|
-
|
|
99
|
-
- A single mailbox is uniquely identified by its address (`username@domain`).
|
|
100
|
-
- Sending must be activated explicitly — newly-created mailboxes can receive but not send.
|
|
101
|
-
- Templates and campaigns are org-scoped. Set a default org once: `myapi auth config set-org <id>`.
|
|
102
|
-
- Domain assignment to org is enforced at unassign time: an active or paused campaign sending from a mailbox on the domain will block `domain unassign` with `DOMAIN_IN_USE`.
|
|
103
|
-
|
|
104
|
-
Run `myapi email --help` or `myapi email <namespace> --help` for full flag reference.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/utils.test.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { parseArgs } from './utils.js';
|
|
3
|
-
describe('parseArgs', () => {
|
|
4
|
-
it('treats unknown flags as boolean', () => {
|
|
5
|
-
const { args, flags } = parseArgs(['funnel', 'get', '--json', 'abc-123']);
|
|
6
|
-
expect(flags.json).toBe(true);
|
|
7
|
-
expect(args).toEqual(['funnel', 'get', 'abc-123']);
|
|
8
|
-
});
|
|
9
|
-
it('treats --yes, --help, --verbose as boolean', () => {
|
|
10
|
-
const { flags } = parseArgs(['--yes', '--help', '--verbose']);
|
|
11
|
-
expect(flags.yes).toBe(true);
|
|
12
|
-
expect(flags.help).toBe(true);
|
|
13
|
-
expect(flags.verbose).toBe(true);
|
|
14
|
-
});
|
|
15
|
-
it('consumes next token for value flags', () => {
|
|
16
|
-
const { args, flags } = parseArgs(['org', 'create', '--name', 'Acme Inc', '--yes']);
|
|
17
|
-
expect(flags.name).toBe('Acme Inc');
|
|
18
|
-
expect(flags.yes).toBe(true);
|
|
19
|
-
expect(args).toEqual(['org', 'create']);
|
|
20
|
-
});
|
|
21
|
-
it('supports --key=value syntax for any flag', () => {
|
|
22
|
-
const { flags } = parseArgs(['--org=abc-123', '--json']);
|
|
23
|
-
expect(flags.org).toBe('abc-123');
|
|
24
|
-
expect(flags.json).toBe(true);
|
|
25
|
-
});
|
|
26
|
-
it('value flag with no next token becomes boolean true', () => {
|
|
27
|
-
const { flags } = parseArgs(['--name']);
|
|
28
|
-
expect(flags.name).toBe(true);
|
|
29
|
-
});
|
|
30
|
-
it('value flag followed by another flag does not consume it', () => {
|
|
31
|
-
const { flags } = parseArgs(['--org', '--json']);
|
|
32
|
-
expect(flags.org).toBe(true);
|
|
33
|
-
expect(flags.json).toBe(true);
|
|
34
|
-
});
|
|
35
|
-
it('-h maps to help', () => {
|
|
36
|
-
const { flags } = parseArgs(['-h']);
|
|
37
|
-
expect(flags.help).toBe(true);
|
|
38
|
-
});
|
|
39
|
-
it('-v maps to version', () => {
|
|
40
|
-
const { flags } = parseArgs(['-v']);
|
|
41
|
-
expect(flags.version).toBe(true);
|
|
42
|
-
});
|
|
43
|
-
it('collects positional args correctly', () => {
|
|
44
|
-
const { args, flags } = parseArgs(['domain', 'register', 'example.com', '--org', 'uuid-here']);
|
|
45
|
-
expect(args).toEqual(['domain', 'register', 'example.com']);
|
|
46
|
-
expect(flags.org).toBe('uuid-here');
|
|
47
|
-
});
|
|
48
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|