@cakemail-org/cakemail-cli 1.7.0 → 2.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.
- package/.claude/settings.local.json +12 -0
- package/.env.example +40 -0
- package/.env.test.example +45 -0
- package/CHANGELOG.md +1031 -0
- package/README.md +41 -37
- package/audit-formats.js +128 -0
- package/cakemail.rb +20 -0
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/commands/account.js +1 -1
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/attributes.js +1 -1
- package/dist/commands/attributes.js.map +1 -1
- package/dist/commands/campaigns.js +1 -1
- package/dist/commands/campaigns.js.map +1 -1
- package/dist/commands/contacts.js +1 -1
- package/dist/commands/contacts.js.map +1 -1
- package/dist/commands/emails.js +1 -1
- package/dist/commands/emails.js.map +1 -1
- package/dist/commands/interests.js +1 -1
- package/dist/commands/interests.js.map +1 -1
- package/dist/commands/lists.js +1 -1
- package/dist/commands/lists.js.map +1 -1
- package/dist/commands/logs.js +1 -1
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/reports.js +1 -1
- package/dist/commands/reports.js.map +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/segments.js.map +1 -1
- package/dist/commands/senders.js +1 -1
- package/dist/commands/senders.js.map +1 -1
- package/dist/commands/suppressed.js +1 -1
- package/dist/commands/suppressed.js.map +1 -1
- package/dist/commands/tags.js +1 -1
- package/dist/commands/tags.js.map +1 -1
- package/dist/commands/templates.js +1 -1
- package/dist/commands/templates.js.map +1 -1
- package/dist/commands/transactional-templates.js +1 -1
- package/dist/commands/transactional-templates.js.map +1 -1
- package/dist/commands/webhooks.js +1 -1
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/utils/config.js +2 -2
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/errors.js +1 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/progress.d.ts.map +1 -1
- package/dist/utils/progress.js +32 -4
- package/dist/utils/progress.js.map +1 -1
- package/dist/utils/spinner.d.ts +17 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/spinner.js +43 -0
- package/dist/utils/spinner.js.map +1 -0
- package/docs/DOCUMENTATION-STANDARD.md +1068 -0
- package/docs/README.md +161 -0
- package/docs/developer/ARCHITECTURE.md +516 -0
- package/docs/developer/AUTH.md +204 -0
- package/docs/developer/CONTRIBUTING.md +227 -0
- package/docs/developer/DOCUMENTATION_SUMMARY.md +346 -0
- package/docs/developer/PROJECT_INDEX.md +365 -0
- package/docs/planning/API_COVERAGE.md +1045 -0
- package/docs/planning/BACKLOG.md +1159 -0
- package/docs/planning/PROFILE_SYSTEM_TASKS.md +287 -0
- package/docs/planning/UX_IMPLEMENTATION_PLAN.md +691 -0
- package/docs/planning/archive/RELEASE_CHECKLIST_v1.3.0.md +332 -0
- package/docs/planning/archive/RELEASE_v1.3.0.md +428 -0
- package/docs/planning/archive/cakemail-cli-ux-improvements.md +438 -0
- package/docs/planning/cakemail-profile-system-plan.md +1121 -0
- package/docs/testing/AI_USER_SIMULATION_DESIGN.md +1342 -0
- package/docs/testing/KENOGAMI_BIDIRECTIONAL_FLOW.md +1517 -0
- package/docs/testing/KENOGAMI_TRUTH_RECONCILIATION_SYSTEM.md +1369 -0
- package/docs/user-manual/.obsidian/app.json +1 -0
- package/docs/user-manual/.obsidian/appearance.json +1 -0
- package/docs/user-manual/.obsidian/core-plugins.json +33 -0
- package/docs/user-manual/.obsidian/workspace.json +167 -0
- package/docs/user-manual/01-getting-started/01-installation.md +214 -0
- package/docs/user-manual/01-getting-started/02-quick-start.md +432 -0
- package/docs/user-manual/01-getting-started/03-authentication.md +448 -0
- package/docs/user-manual/01-getting-started/04-configuration.md +430 -0
- package/docs/user-manual/01-getting-started/05-output-formats.md +447 -0
- package/docs/user-manual/02-core-concepts/01-accounts.md +514 -0
- package/docs/user-manual/02-core-concepts/02-profile-system.md +771 -0
- package/docs/user-manual/02-core-concepts/03-smart-defaults.md +485 -0
- package/docs/user-manual/02-core-concepts/04-authentication-methods.md +435 -0
- package/docs/user-manual/02-core-concepts/05-pagination-filtering.md +600 -0
- package/docs/user-manual/02-core-concepts/06-error-handling.md +718 -0
- package/docs/user-manual/02-core-concepts/07-api-coverage.md +483 -0
- package/docs/user-manual/03-email-operations/01-senders.md +490 -0
- package/docs/user-manual/03-email-operations/02-templates.md +444 -0
- package/docs/user-manual/03-email-operations/03-transactional-emails.md +706 -0
- package/docs/user-manual/03-email-operations/04-email-tracking.md +407 -0
- package/docs/user-manual/04-campaign-management/01-campaigns-basics.md +394 -0
- package/docs/user-manual/04-campaign-management/02-campaign-scheduling.md +630 -0
- package/docs/user-manual/04-campaign-management/03-campaign-testing.md +997 -0
- package/docs/user-manual/04-campaign-management/04-campaign-lifecycle.md +709 -0
- package/docs/user-manual/04-campaign-management/05-campaign-links.md +934 -0
- package/docs/user-manual/05-contact-management/01-lists.md +836 -0
- package/docs/user-manual/05-contact-management/02-contacts.md +1035 -0
- package/docs/user-manual/05-contact-management/03-custom-attributes.md +788 -0
- package/docs/user-manual/05-contact-management/04-segments.md +1028 -0
- package/docs/user-manual/05-contact-management/05-contact-import-export.md +1031 -0
- package/docs/user-manual/06-analytics-reporting/01-campaign-analytics.md +867 -0
- package/docs/user-manual/06-analytics-reporting/02-account-reports.md +227 -0
- package/docs/user-manual/07-integrations/01-webhooks-integration.md +259 -0
- package/docs/user-manual/07-integrations/02-automation.md +326 -0
- package/docs/user-manual/08-advanced-usage/01-scripting-patterns.md +672 -0
- package/docs/user-manual/08-advanced-usage/02-bulk-operations.md +932 -0
- package/docs/user-manual/08-advanced-usage/03-ci-cd-integration.md +892 -0
- package/docs/user-manual/08-advanced-usage/04-performance-optimization.md +766 -0
- package/docs/user-manual/09-command-reference/01-config.md +776 -0
- package/docs/user-manual/09-command-reference/02-account.md +652 -0
- package/docs/user-manual/09-command-reference/03-lists.md +958 -0
- package/docs/user-manual/09-command-reference/04-contacts.md +1408 -0
- package/docs/user-manual/09-command-reference/05-attributes.md +617 -0
- package/docs/user-manual/09-command-reference/06-segments.md +894 -0
- package/docs/user-manual/09-command-reference/07-senders.md +803 -0
- package/docs/user-manual/09-command-reference/08-templates.md +818 -0
- package/docs/user-manual/09-command-reference/09-campaigns.md +1250 -0
- package/docs/user-manual/09-command-reference/10-emails.md +807 -0
- package/docs/user-manual/09-command-reference/11-reports.md +1135 -0
- package/docs/user-manual/09-command-reference/12-webhooks.md +773 -0
- package/docs/user-manual/09-command-reference/13-suppressed.md +797 -0
- package/docs/user-manual/09-command-reference/14-interests.md +630 -0
- package/docs/user-manual/09-command-reference/15-tags.md +584 -0
- package/docs/user-manual/09-command-reference/16-logs.md +656 -0
- package/docs/user-manual/09-command-reference/17-transactional-templates.md +850 -0
- package/docs/user-manual/10-troubleshooting/01-common-errors.md +457 -0
- package/docs/user-manual/10-troubleshooting/02-authentication-issues.md +558 -0
- package/docs/user-manual/10-troubleshooting/03-connection-problems.md +634 -0
- package/docs/user-manual/10-troubleshooting/04-debugging.md +725 -0
- package/docs/user-manual/11-appendix/04-faq.md +484 -0
- package/docs/user-manual/11-appendix/05-glossary.md +250 -0
- package/docs/user-manual/README.md +0 -0
- package/package.json +13 -61
- package/src/cli.ts +125 -0
- package/src/client.ts +16 -0
- package/src/commands/account.ts +267 -0
- package/src/commands/accounts.ts +78 -0
- package/src/commands/actions.ts +249 -0
- package/src/commands/attributes.ts +139 -0
- package/src/commands/campaign-blueprints.ts +106 -0
- package/src/commands/campaigns.ts +469 -0
- package/src/commands/config.ts +77 -0
- package/src/commands/contacts.ts +612 -0
- package/src/commands/custom-attributes.ts +127 -0
- package/src/commands/dkims.ts +117 -0
- package/src/commands/domains.ts +82 -0
- package/src/commands/email-apis.ts +569 -0
- package/src/commands/emails.ts +197 -0
- package/src/commands/forms.ts +283 -0
- package/src/commands/interests.ts +155 -0
- package/src/commands/links.ts +38 -0
- package/src/commands/lists.ts +406 -0
- package/src/commands/logos.ts +71 -0
- package/src/commands/logs.ts +386 -0
- package/src/commands/reports.ts +306 -0
- package/src/commands/segments.ts +158 -0
- package/src/commands/senders.ts +204 -0
- package/src/commands/sub-accounts.ts +271 -0
- package/src/commands/suppressed-emails.ts +234 -0
- package/src/commands/suppressed.ts +198 -0
- package/src/commands/system-emails.ts +85 -0
- package/src/commands/tags.ts +146 -0
- package/src/commands/tasks.ts +116 -0
- package/src/commands/templates.ts +189 -0
- package/src/commands/tokens.ts +83 -0
- package/src/commands/transactional-emails.ts +374 -0
- package/src/commands/transactional-templates.ts +385 -0
- package/src/commands/users.ts +506 -0
- package/src/commands/webhooks.ts +172 -0
- package/src/commands/workflow-blueprints.ts +123 -0
- package/src/commands/workflows.ts +265 -0
- package/src/types/profile.ts +93 -0
- package/src/utils/auth.ts +272 -0
- package/src/utils/config-file.ts +96 -0
- package/src/utils/config.ts +134 -0
- package/src/utils/confirm.ts +32 -0
- package/src/utils/defaults.ts +99 -0
- package/src/utils/errors.ts +116 -0
- package/src/utils/interactive.ts +91 -0
- package/src/utils/list-defaults.ts +74 -0
- package/src/utils/output.ts +190 -0
- package/src/utils/progress.ts +320 -0
- package/src/utils/spinner.ts +22 -0
- package/tests/IMPLEMENTATION_STATUS.md +258 -0
- package/tests/PTY_SETUP.md +118 -0
- package/tests/PTY_TESTING_GUIDE.md +507 -0
- package/tests/README.md +244 -0
- package/tests/fixtures/api-responses/campaigns.json +34 -0
- package/tests/fixtures/test-config.json +13 -0
- package/tests/helpers/cli-runner.ts +128 -0
- package/tests/helpers/mock-server.ts +301 -0
- package/tests/helpers/pty-runner.ts +181 -0
- package/tests/integration/campaigns-real-api.test.ts +196 -0
- package/tests/integration/setup-integration.ts +50 -0
- package/tests/pty/campaigns.test.ts +241 -0
- package/tests/setup.ts +34 -0
- package/tsconfig.json +15 -0
- package/vitest.config.ts +28 -0
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
# Interests Commands
|
|
2
|
+
|
|
3
|
+
Manage list-specific contact interests.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Interests are list-specific preferences that contacts can subscribe to. Unlike tags which are global, interests are specific to each list and are commonly used for newsletter preferences, topic subscriptions, and opt-in categories.
|
|
8
|
+
|
|
9
|
+
**Available Commands:**
|
|
10
|
+
- [`interests list`](#interests-list) - List all interests in a list
|
|
11
|
+
- [`interests get`](#interests-get) - Get interest details
|
|
12
|
+
- [`interests create`](#interests-create) - Create a new interest
|
|
13
|
+
- [`interests update`](#interests-update) - Update interest name or alias
|
|
14
|
+
- [`interests delete`](#interests-delete) - Delete an interest
|
|
15
|
+
|
|
16
|
+
**Contact-Level Operations:**
|
|
17
|
+
See [Contacts Commands](/en/cli/command-reference/contacts/) for:
|
|
18
|
+
- `contacts add-interests` - Add interests to contacts (bulk supported)
|
|
19
|
+
- `contacts remove-interests` - Remove interests from contacts (bulk supported)
|
|
20
|
+
|
|
21
|
+
**Key Features:**
|
|
22
|
+
- List-specific (not global like tags)
|
|
23
|
+
- Support auto-detection when only one list exists
|
|
24
|
+
- Optional URL-friendly aliases
|
|
25
|
+
- Used for subscription preferences
|
|
26
|
+
- Profile-aware delete confirmations
|
|
27
|
+
|
|
28
|
+
**Use Cases:**
|
|
29
|
+
- Newsletter topic preferences ("Product Updates", "Weekly Digest")
|
|
30
|
+
- Content categories ("Tech News", "Marketing Tips", "Sales Updates")
|
|
31
|
+
- Event notifications ("Webinars", "Product Launches")
|
|
32
|
+
- Frequency preferences ("Daily", "Weekly", "Monthly")
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## interests list
|
|
37
|
+
|
|
38
|
+
List all interests for a specific list.
|
|
39
|
+
|
|
40
|
+
### Usage
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
cakemail interests list [list-id] [options]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Arguments
|
|
47
|
+
|
|
48
|
+
- `[list-id]` - List ID (optional - auto-detects if only one list exists)
|
|
49
|
+
|
|
50
|
+
### Options
|
|
51
|
+
|
|
52
|
+
- `-p, --page <number>` - Page number for pagination
|
|
53
|
+
- `--per-page <number>` - Results per page
|
|
54
|
+
- `--sort <sort>` - Sort order (e.g., `+name`, `-created_on`)
|
|
55
|
+
|
|
56
|
+
### Examples
|
|
57
|
+
|
|
58
|
+
**List interests (auto-detect list):**
|
|
59
|
+
```bash
|
|
60
|
+
$ cakemail interests list
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Output:**
|
|
64
|
+
```
|
|
65
|
+
✓ Auto-detected list: 123 (Newsletter Subscribers)
|
|
66
|
+
|
|
67
|
+
┌────┬──────────────────┬──────────────┬─────────────────────┐
|
|
68
|
+
│ ID │ Name │ Alias │ Created At │
|
|
69
|
+
├────┼──────────────────┼──────────────┼─────────────────────┤
|
|
70
|
+
│ 1 │ Product Updates │ updates │ 2025-09-15 10:23:11 │
|
|
71
|
+
│ 2 │ Weekly Digest │ digest │ 2025-09-20 14:05:42 │
|
|
72
|
+
│ 3 │ Event Invites │ events │ 2025-10-01 08:15:33 │
|
|
73
|
+
└────┴──────────────────┴──────────────┴─────────────────────┘
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**List interests for specific list:**
|
|
77
|
+
```bash
|
|
78
|
+
$ cakemail interests list 123
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Sorted by name:**
|
|
82
|
+
```bash
|
|
83
|
+
$ cakemail interests list --sort +name
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**JSON output (Developer profile):**
|
|
87
|
+
```bash
|
|
88
|
+
$ cakemail --profile developer interests list 123
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Output:**
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"data": [
|
|
95
|
+
{"id": 1, "name": "Product Updates", "alias": "updates", "created_on": "2025-09-15T10:23:11Z"},
|
|
96
|
+
{"id": 2, "name": "Weekly Digest", "alias": "digest", "created_on": "2025-09-20T14:05:42Z"}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Notes
|
|
102
|
+
|
|
103
|
+
- List ID is optional if you have only one list
|
|
104
|
+
- Interests are list-specific (different lists have different interests)
|
|
105
|
+
- Use aliases for URL-friendly subscription preferences
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## interests get
|
|
110
|
+
|
|
111
|
+
Get details for a specific interest.
|
|
112
|
+
|
|
113
|
+
### Usage
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
cakemail interests get [list-id] <interest-name>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Arguments
|
|
120
|
+
|
|
121
|
+
- `[list-id]` - List ID (optional - auto-detects if only one list exists)
|
|
122
|
+
- `<interest-name>` - Interest name or alias (required)
|
|
123
|
+
|
|
124
|
+
### Examples
|
|
125
|
+
|
|
126
|
+
**Get interest by name (auto-detect list):**
|
|
127
|
+
```bash
|
|
128
|
+
$ cakemail interests get "Product Updates"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Output:**
|
|
132
|
+
```
|
|
133
|
+
Interest: Product Updates
|
|
134
|
+
|
|
135
|
+
Details:
|
|
136
|
+
ID: 1
|
|
137
|
+
Name: Product Updates
|
|
138
|
+
Alias: updates
|
|
139
|
+
List: Newsletter Subscribers (123)
|
|
140
|
+
Created: 2025-09-15 10:23:11
|
|
141
|
+
Subscribers: 342
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Get interest with specific list:**
|
|
145
|
+
```bash
|
|
146
|
+
$ cakemail interests get 123 "Weekly Digest"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Get by alias:**
|
|
150
|
+
```bash
|
|
151
|
+
$ cakemail interests get 123 digest
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**JSON output:**
|
|
155
|
+
```bash
|
|
156
|
+
$ cakemail -f json interests get updates
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Output:**
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"id": 1,
|
|
163
|
+
"name": "Product Updates",
|
|
164
|
+
"alias": "updates",
|
|
165
|
+
"list_id": 123,
|
|
166
|
+
"created_on": "2025-09-15T10:23:11Z",
|
|
167
|
+
"subscribers_count": 342
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## interests create
|
|
174
|
+
|
|
175
|
+
Create a new interest for a list.
|
|
176
|
+
|
|
177
|
+
### Usage
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
cakemail interests create [list-id] --name <name> [options]
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Arguments
|
|
184
|
+
|
|
185
|
+
- `[list-id]` - List ID (optional - auto-detects if only one list exists)
|
|
186
|
+
|
|
187
|
+
### Options
|
|
188
|
+
|
|
189
|
+
- `-n, --name <name>` - Interest name (required)
|
|
190
|
+
- `-a, --alias <alias>` - URL-friendly alias (optional)
|
|
191
|
+
|
|
192
|
+
### Examples
|
|
193
|
+
|
|
194
|
+
**Create interest (auto-detect list):**
|
|
195
|
+
```bash
|
|
196
|
+
$ cakemail interests create --name "Product Updates"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Output:**
|
|
200
|
+
```
|
|
201
|
+
✓ Auto-detected list: 123 (Newsletter Subscribers)
|
|
202
|
+
✓ Interest created successfully
|
|
203
|
+
|
|
204
|
+
Interest: Product Updates
|
|
205
|
+
ID: 4
|
|
206
|
+
List: Newsletter Subscribers (123)
|
|
207
|
+
Created: just now
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Create with alias:**
|
|
211
|
+
```bash
|
|
212
|
+
$ cakemail interests create --name "Product Updates" --alias "updates"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Output:**
|
|
216
|
+
```
|
|
217
|
+
✓ Interest created successfully
|
|
218
|
+
|
|
219
|
+
Interest: Product Updates
|
|
220
|
+
Alias: updates (use in URLs: ?interests=updates)
|
|
221
|
+
ID: 4
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Create for specific list:**
|
|
225
|
+
```bash
|
|
226
|
+
$ cakemail interests create 456 --name "Event Invites" --alias "events"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Developer profile (JSON):**
|
|
230
|
+
```bash
|
|
231
|
+
$ cakemail --profile developer interests create --name "Weekly Tips" --alias "tips"
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Output:**
|
|
235
|
+
```json
|
|
236
|
+
{
|
|
237
|
+
"id": 5,
|
|
238
|
+
"name": "Weekly Tips",
|
|
239
|
+
"alias": "tips",
|
|
240
|
+
"list_id": 123,
|
|
241
|
+
"created_on": "2025-10-11T15:30:00Z"
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Interest Naming
|
|
246
|
+
|
|
247
|
+
**Name:**
|
|
248
|
+
- Human-readable description
|
|
249
|
+
- Can contain spaces and special characters
|
|
250
|
+
- Examples: "Product Updates", "Weekly Digest", "News & Events"
|
|
251
|
+
|
|
252
|
+
**Alias (optional):**
|
|
253
|
+
- URL-friendly identifier
|
|
254
|
+
- No spaces, lowercase recommended
|
|
255
|
+
- Used in subscription URLs and forms
|
|
256
|
+
- Examples: `updates`, `digest`, `news-events`
|
|
257
|
+
|
|
258
|
+
### Use Cases
|
|
259
|
+
|
|
260
|
+
**Newsletter preferences:**
|
|
261
|
+
```bash
|
|
262
|
+
cakemail interests create --name "Daily Newsletter" --alias "daily"
|
|
263
|
+
cakemail interests create --name "Weekly Digest" --alias "weekly"
|
|
264
|
+
cakemail interests create --name "Monthly Roundup" --alias "monthly"
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Topic subscriptions:**
|
|
268
|
+
```bash
|
|
269
|
+
cakemail interests create --name "Product Updates" --alias "products"
|
|
270
|
+
cakemail interests create --name "Company News" --alias "news"
|
|
271
|
+
cakemail interests create --name "Industry Insights" --alias "insights"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## interests update
|
|
277
|
+
|
|
278
|
+
Update an interest's name or alias.
|
|
279
|
+
|
|
280
|
+
### Usage
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
cakemail interests update [list-id] <interest-name> [options]
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Arguments
|
|
287
|
+
|
|
288
|
+
- `[list-id]` - List ID (optional - auto-detects if only one list exists)
|
|
289
|
+
- `<interest-name>` - Current interest name or alias (required)
|
|
290
|
+
|
|
291
|
+
### Options
|
|
292
|
+
|
|
293
|
+
- `-n, --name <name>` - New interest name (optional)
|
|
294
|
+
- `-a, --alias <alias>` - New alias (optional)
|
|
295
|
+
|
|
296
|
+
### Examples
|
|
297
|
+
|
|
298
|
+
**Update name (auto-detect list):**
|
|
299
|
+
```bash
|
|
300
|
+
$ cakemail interests update "Product Updates" --name "Product Announcements"
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Output:**
|
|
304
|
+
```
|
|
305
|
+
✓ Interest updated successfully
|
|
306
|
+
|
|
307
|
+
Interest:
|
|
308
|
+
Old name: Product Updates
|
|
309
|
+
New name: Product Announcements
|
|
310
|
+
Alias: updates (unchanged)
|
|
311
|
+
Subscribers: 342 (unchanged)
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**Update alias:**
|
|
315
|
+
```bash
|
|
316
|
+
$ cakemail interests update "Product Announcements" --alias "announcements"
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Update both:**
|
|
320
|
+
```bash
|
|
321
|
+
$ cakemail interests update 123 updates --name "Product News" --alias "product-news"
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Notes
|
|
325
|
+
|
|
326
|
+
- Interest ID remains unchanged
|
|
327
|
+
- Subscribers keep their preferences (only metadata changes)
|
|
328
|
+
- Update by current name or alias
|
|
329
|
+
- Existing subscription forms continue to work with new alias
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## interests delete
|
|
334
|
+
|
|
335
|
+
Delete an interest from a list.
|
|
336
|
+
|
|
337
|
+
### Usage
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
cakemail interests delete [list-id] <interest-name> [options]
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Arguments
|
|
344
|
+
|
|
345
|
+
- `[list-id]` - List ID (optional - auto-detects if only one list exists)
|
|
346
|
+
- `<interest-name>` - Interest name or alias (required)
|
|
347
|
+
|
|
348
|
+
### Options
|
|
349
|
+
|
|
350
|
+
- `-f, --force` - Skip confirmation prompt
|
|
351
|
+
|
|
352
|
+
### Examples
|
|
353
|
+
|
|
354
|
+
**Delete with confirmation (Balanced/Marketer profile):**
|
|
355
|
+
```bash
|
|
356
|
+
$ cakemail interests delete "Old Interest"
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Output:**
|
|
360
|
+
```
|
|
361
|
+
✓ Auto-detected list: 123 (Newsletter Subscribers)
|
|
362
|
+
|
|
363
|
+
⚠ Delete interest 'Old Interest'?
|
|
364
|
+
Interest will be removed from the list
|
|
365
|
+
342 contacts currently subscribed
|
|
366
|
+
This action cannot be undone
|
|
367
|
+
|
|
368
|
+
Delete interest? (y/N): y
|
|
369
|
+
|
|
370
|
+
✓ Interest 'Old Interest' deleted successfully
|
|
371
|
+
✓ Removed from 342 contacts
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**Force delete (skip confirmation):**
|
|
375
|
+
```bash
|
|
376
|
+
$ cakemail interests delete "Old Interest" --force
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
**Delete from specific list:**
|
|
380
|
+
```bash
|
|
381
|
+
$ cakemail interests delete 123 "Old Interest" --force
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
**Developer profile (no confirmation):**
|
|
385
|
+
```bash
|
|
386
|
+
$ cakemail --profile developer interests delete updates
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
**Output:**
|
|
390
|
+
```json
|
|
391
|
+
{"success":true,"interest":"updates","contacts_affected":342}
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Confirmation Behavior
|
|
395
|
+
|
|
396
|
+
Same as tags - profile-aware confirmations:
|
|
397
|
+
- **Marketer**: Always confirms
|
|
398
|
+
- **Balanced**: Confirms in interactive mode, skips in scripts
|
|
399
|
+
- **Developer**: Never confirms
|
|
400
|
+
|
|
401
|
+
### Important Notes
|
|
402
|
+
|
|
403
|
+
**⚠️ Warning: This action is destructive**
|
|
404
|
+
|
|
405
|
+
When you delete an interest:
|
|
406
|
+
- Interest is permanently removed from the list
|
|
407
|
+
- Removed from all contacts who subscribed
|
|
408
|
+
- Subscription forms using this interest stop working
|
|
409
|
+
- Segments filtering by this interest may break
|
|
410
|
+
- Cannot be undone
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Common Workflows
|
|
415
|
+
|
|
416
|
+
### Workflow 1: Setup Newsletter Preferences
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
# Create frequency preferences
|
|
420
|
+
cakemail interests create --name "Daily Updates" --alias "daily"
|
|
421
|
+
cakemail interests create --name "Weekly Digest" --alias "weekly"
|
|
422
|
+
cakemail interests create --name "Monthly Newsletter" --alias "monthly"
|
|
423
|
+
|
|
424
|
+
# Verify
|
|
425
|
+
cakemail interests list --sort +name
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
### Workflow 2: Migrate Interest Names
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
# Check current interest
|
|
434
|
+
cakemail interests get "Old Name"
|
|
435
|
+
|
|
436
|
+
# Update to new naming convention
|
|
437
|
+
cakemail interests update "Old Name" --name "New Name" --alias "new-alias"
|
|
438
|
+
|
|
439
|
+
# Verify
|
|
440
|
+
cakemail interests get "New Name"
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
### Workflow 3: Bulk Interest Management
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
# Create multiple topic interests
|
|
449
|
+
cakemail interests create --name "Product Updates" --alias "products"
|
|
450
|
+
cakemail interests create --name "Industry News" --alias "news"
|
|
451
|
+
cakemail interests create --name "Events" --alias "events"
|
|
452
|
+
|
|
453
|
+
# Apply to contacts
|
|
454
|
+
cakemail contacts add-interests 123 \
|
|
455
|
+
--interests "products,news,events" \
|
|
456
|
+
--query "status==active"
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## Integration with Contact Commands
|
|
462
|
+
|
|
463
|
+
### Adding Interests to Contacts
|
|
464
|
+
|
|
465
|
+
After creating interests, apply them to contacts:
|
|
466
|
+
|
|
467
|
+
**Single contact:**
|
|
468
|
+
```bash
|
|
469
|
+
# This would be done via contact update/preferences API
|
|
470
|
+
# Check contacts command reference
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
**Bulk operations:**
|
|
474
|
+
```bash
|
|
475
|
+
# Add interests to specific contacts
|
|
476
|
+
cakemail contacts add-interests 123 \
|
|
477
|
+
--interests "updates,digest" \
|
|
478
|
+
--contacts "1,2,3,4,5"
|
|
479
|
+
|
|
480
|
+
# Add interests by query
|
|
481
|
+
cakemail contacts add-interests 123 \
|
|
482
|
+
--interests "vip-updates" \
|
|
483
|
+
--query "tags==vip"
|
|
484
|
+
|
|
485
|
+
# Remove interests
|
|
486
|
+
cakemail contacts remove-interests 123 \
|
|
487
|
+
--interests "old-interest" \
|
|
488
|
+
--query "status==unsubscribed"
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
### Segmentation by Interests
|
|
492
|
+
|
|
493
|
+
```bash
|
|
494
|
+
# Create segment of contacts interested in products
|
|
495
|
+
cakemail segments create 123 \
|
|
496
|
+
--name "Product Interest" \
|
|
497
|
+
--query "interests==products"
|
|
498
|
+
|
|
499
|
+
# Multiple interests
|
|
500
|
+
cakemail segments create 123 \
|
|
501
|
+
--name "Engaged Subscribers" \
|
|
502
|
+
--query "interests==products;interests==news"
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
---
|
|
506
|
+
|
|
507
|
+
## Interests vs Tags
|
|
508
|
+
|
|
509
|
+
Understanding when to use each:
|
|
510
|
+
|
|
511
|
+
**Use Interests When:**
|
|
512
|
+
- ✅ Subscription preferences (user-controlled)
|
|
513
|
+
- ✅ List-specific categories
|
|
514
|
+
- ✅ Newsletter topic selection
|
|
515
|
+
- ✅ Opt-in preferences
|
|
516
|
+
- ✅ Need URL-friendly aliases
|
|
517
|
+
|
|
518
|
+
**Use Tags When:**
|
|
519
|
+
- ✅ Internal organization (admin-controlled)
|
|
520
|
+
- ✅ Cross-list categorization
|
|
521
|
+
- ✅ Customer lifecycle stages
|
|
522
|
+
- ✅ Behavior-based labels
|
|
523
|
+
- ✅ Global classification
|
|
524
|
+
|
|
525
|
+
**Example:**
|
|
526
|
+
|
|
527
|
+
**Interests (subscriber chooses):**
|
|
528
|
+
- "Product Updates"
|
|
529
|
+
- "Weekly Digest"
|
|
530
|
+
- "Event Invitations"
|
|
531
|
+
|
|
532
|
+
**Tags (admin applies):**
|
|
533
|
+
- "vip"
|
|
534
|
+
- "high-value"
|
|
535
|
+
- "churned-customer"
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
## Best Practices
|
|
540
|
+
|
|
541
|
+
### 1. Use Clear, User-Friendly Names
|
|
542
|
+
|
|
543
|
+
**Good:**
|
|
544
|
+
```bash
|
|
545
|
+
cakemail interests create --name "Product Updates" --alias "products"
|
|
546
|
+
cakemail interests create --name "Weekly Newsletter" --alias "weekly"
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
**Avoid:**
|
|
550
|
+
```bash
|
|
551
|
+
cakemail interests create --name "INT_PROD_UPD" --alias "int1"
|
|
552
|
+
cakemail interests create --name "Newsletter_wkly" --alias "nwsltr"
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
### 2. Provide Aliases for All Interests
|
|
556
|
+
|
|
557
|
+
```bash
|
|
558
|
+
# Always include aliases for subscription forms
|
|
559
|
+
cakemail interests create \
|
|
560
|
+
--name "Product Announcements" \
|
|
561
|
+
--alias "announcements"
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
### 3. Keep Interest Count Manageable
|
|
565
|
+
|
|
566
|
+
**Recommended:**
|
|
567
|
+
- 3-7 interests for simple newsletters
|
|
568
|
+
- 10-15 interests for comprehensive programs
|
|
569
|
+
- <20 interests to avoid overwhelming subscribers
|
|
570
|
+
|
|
571
|
+
### 4. Organize by Category
|
|
572
|
+
|
|
573
|
+
```bash
|
|
574
|
+
# Content type
|
|
575
|
+
cakemail interests create --name "Blog Posts" --alias "blog"
|
|
576
|
+
cakemail interests create --name "Case Studies" --alias "cases"
|
|
577
|
+
cakemail interests create --name "Webinars" --alias "webinars"
|
|
578
|
+
|
|
579
|
+
# Or by frequency
|
|
580
|
+
cakemail interests create --name "Daily Tips" --alias "daily"
|
|
581
|
+
cakemail interests create --name "Weekly Roundup" --alias "weekly"
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
---
|
|
585
|
+
|
|
586
|
+
## Troubleshooting
|
|
587
|
+
|
|
588
|
+
### Interest Not Found
|
|
589
|
+
|
|
590
|
+
**Problem:**
|
|
591
|
+
```
|
|
592
|
+
Error: Interest 'updates' not found in list 123
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
**Solutions:**
|
|
596
|
+
1. List all interests: `cakemail interests list 123`
|
|
597
|
+
2. Check spelling
|
|
598
|
+
3. Verify you're using correct list ID
|
|
599
|
+
4. Try interest name instead of alias
|
|
600
|
+
|
|
601
|
+
---
|
|
602
|
+
|
|
603
|
+
### Cannot Delete Interest
|
|
604
|
+
|
|
605
|
+
**Problem:**
|
|
606
|
+
```
|
|
607
|
+
Error: Cannot delete interest - subscribers exist
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
**Solutions:**
|
|
611
|
+
1. Check subscriber count: `cakemail interests get updates`
|
|
612
|
+
2. This is expected - delete anyway with confirmation
|
|
613
|
+
3. Remove from contacts first (optional but not required)
|
|
614
|
+
|
|
615
|
+
---
|
|
616
|
+
|
|
617
|
+
### Duplicate Interest
|
|
618
|
+
|
|
619
|
+
**Problem:**
|
|
620
|
+
```
|
|
621
|
+
Error: Interest 'Product Updates' already exists in this list
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
**Solutions:**
|
|
625
|
+
1. List interests: `cakemail interests list`
|
|
626
|
+
2. Use different name
|
|
627
|
+
3. Or update existing: `cakemail interests update "Product Updates" --alias "new-alias"`
|
|
628
|
+
|
|
629
|
+
---
|
|
630
|
+
|