emailr-cli 1.7.6 → 1.7.8
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/index.js +11 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -798,6 +798,7 @@ OPTIONS
|
|
|
798
798
|
--html-file <file_path> Read HTML content from file
|
|
799
799
|
--text-file <file_path> Read text content from file
|
|
800
800
|
--from <email_address> Default from email address
|
|
801
|
+
--from-name <name> Sender display name (e.g. "Acme Inc")
|
|
801
802
|
--reply-to <email_address> Default reply-to email address
|
|
802
803
|
--preview-text <text> Preview text shown in email clients
|
|
803
804
|
--tags <tags> Comma-separated tags
|
|
@@ -848,6 +849,7 @@ OPTIONS
|
|
|
848
849
|
--html-file <file_path> Read new HTML content from file
|
|
849
850
|
--text-file <file_path> Read new text content from file
|
|
850
851
|
--from <email_address> New default from email address
|
|
852
|
+
--from-name <name> New sender display name
|
|
851
853
|
--reply-to <email_address> New default reply-to email address
|
|
852
854
|
--preview-text <text> New preview text
|
|
853
855
|
--tags <tags> Comma-separated tags (replaces existing)
|
|
@@ -1899,6 +1901,9 @@ OPTIONS
|
|
|
1899
1901
|
--name <broadcast_name> Broadcast name for internal reference (required)
|
|
1900
1902
|
--subject <subject_line> Email subject line (required)
|
|
1901
1903
|
--from <email_address> Sender email address (required)
|
|
1904
|
+
--from-name <name> Sender display name (e.g. "Acme Inc")
|
|
1905
|
+
--reply-to <email> Reply-To email address
|
|
1906
|
+
--preview-text <text> Preview text (preheader) shown in email clients
|
|
1902
1907
|
--template <template_id> Template ID to use for content
|
|
1903
1908
|
--segment <segment_id> Segment ID to target recipients
|
|
1904
1909
|
--html <html_content> Inline HTML content (alternative to --template)
|
|
@@ -1963,7 +1968,7 @@ EXAMPLES
|
|
|
1963
1968
|
|
|
1964
1969
|
SEE ALSO
|
|
1965
1970
|
emailr templates Create and manage email templates
|
|
1966
|
-
emailr segments Create and manage contact segments`).requiredOption("--name <name>","Broadcast name").requiredOption("--subject <subject>","Email subject").requiredOption("--from <email>","Sender email address").option("--from-name <name>","Sender display name").option("--template <id>","Template ID to use").option("--segment <id>","Segment ID to target").option("--html <html>","HTML content").option("--text <text>","Plain text content").option("--schedule <datetime>","Schedule time (ISO 8601)").option("--tags <tags>","Comma-separated tags").option("--format <format>","Output format (json|table)","table").action(async t=>{try{let e=m(),o=new Emailr({apiKey:e.apiKey,baseUrl:e.baseUrl}),r={name:t.name,subject:t.subject,from_email:t.from,from_name:t.fromName,template_id:t.template,segment_id:t.segment,html_content:t.html,text_content:t.text,scheduled_at:t.schedule};t.tags&&(r.tags=t.tags.split(",").map(n=>n.trim().toLowerCase()).filter(Boolean));let a=await o.broadcasts.create(r);t.format==="json"?c(a,"json"):(d("Broadcast created successfully!"),c({ID:a.id,Name:a.name,Status:a.status,Tags:a.tags?.join(", ")||"-","Scheduled At":a.scheduled_at||"Not scheduled"},"table"));}catch(e){l(e instanceof Error?e.message:"Failed to create broadcast"),process.exit(1);}}),i.command("send <broadcast_id>").description(`Send a broadcast immediately
|
|
1971
|
+
emailr segments Create and manage contact segments`).requiredOption("--name <name>","Broadcast name").requiredOption("--subject <subject>","Email subject").requiredOption("--from <email>","Sender email address").option("--from-name <name>","Sender display name").option("--reply-to <email>","Reply-To email address").option("--preview-text <text>","Preview text (preheader)").option("--template <id>","Template ID to use").option("--segment <id>","Segment ID to target").option("--html <html>","HTML content").option("--text <text>","Plain text content").option("--schedule <datetime>","Schedule time (ISO 8601)").option("--tags <tags>","Comma-separated tags").option("--format <format>","Output format (json|table)","table").action(async t=>{try{let e=m(),o=new Emailr({apiKey:e.apiKey,baseUrl:e.baseUrl}),r={name:t.name,subject:t.subject,from_email:t.from,from_name:t.fromName,reply_to:t.replyTo,preview_text:t.previewText,template_id:t.template,segment_id:t.segment,html_content:t.html,text_content:t.text,scheduled_at:t.schedule};t.tags&&(r.tags=t.tags.split(",").map(n=>n.trim().toLowerCase()).filter(Boolean));let a=await o.broadcasts.create(r);t.format==="json"?c(a,"json"):(d("Broadcast created successfully!"),c({ID:a.id,Name:a.name,Status:a.status,Tags:a.tags?.join(", ")||"-","Scheduled At":a.scheduled_at||"Not scheduled"},"table"));}catch(e){l(e instanceof Error?e.message:"Failed to create broadcast"),process.exit(1);}}),i.command("send <broadcast_id>").description(`Send a broadcast immediately
|
|
1967
1972
|
|
|
1968
1973
|
USAGE
|
|
1969
1974
|
emailr broadcasts send <broadcast_id> [options]
|
|
@@ -2090,6 +2095,9 @@ OPTIONS
|
|
|
2090
2095
|
--name <name> Update broadcast name
|
|
2091
2096
|
--subject <subject> Update email subject line
|
|
2092
2097
|
--from <email> Update sender email address
|
|
2098
|
+
--from-name <name> Update sender display name
|
|
2099
|
+
--reply-to <email> Update Reply-To email address
|
|
2100
|
+
--preview-text <text> Update preview text (preheader)
|
|
2093
2101
|
--template <id> Update template ID (use "none" to clear)
|
|
2094
2102
|
--segment <id> Update segment ID (use "none" to clear)
|
|
2095
2103
|
--topic <id> Update topic ID (use "none" to clear)
|
|
@@ -2119,7 +2127,7 @@ EXAMPLES
|
|
|
2119
2127
|
emailr broadcasts update brd_abc123 --name "Updated" --format json
|
|
2120
2128
|
|
|
2121
2129
|
NOTE
|
|
2122
|
-
Only broadcasts in 'draft' or 'scheduled' status can be updated.`).option("--name <name>","Broadcast name").option("--subject <subject>","Email subject").option("--from <email>","Sender email address").option("--from-name <name>","Sender display name").option("--template <id>",'Template ID (use "none" to clear)').option("--segment <id>",'Segment ID (use "none" to clear)').option("--topic <id>",'Topic ID (use "none" to clear)').option("--html <html>","HTML content").option("--text <text>","Plain text content").option("--schedule <datetime>",'Schedule time ISO 8601 (use "none" to clear)').option("--tags <tags>","Comma-separated tags (replaces existing)").option("--format <format>","Output format (json|table)","table").action(async(t,e)=>{try{let o=m(),r=new Emailr({apiKey:o.apiKey,baseUrl:o.baseUrl}),a={};e.name&&(a.name=e.name),e.subject&&(a.subject=e.subject),e.from&&(a.from_email=e.from),e.fromName&&(a.from_name=e.fromName),e.html&&(a.html_content=e.html),e.text&&(a.text_content=e.text),e.template&&(a.template_id=e.template==="none"?null:e.template),e.segment&&(a.segment_id=e.segment==="none"?null:e.segment),e.topic&&(a.topic_id=e.topic==="none"?null:e.topic),e.schedule&&(a.scheduled_at=e.schedule==="none"?null:e.schedule),e.tags&&(a.tags=e.tags.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean)),Object.keys(a).length===0&&(l("No update fields specified. Use --help to see available options."),process.exit(1));let n=await r.broadcasts.update(t,a);e.format==="json"?c(n,"json"):(d("Broadcast updated successfully!"),c({ID:n.id,Name:n.name,Subject:n.subject,Status:n.status,Tags:n.tags?.join(", ")||"-","Scheduled At":n.scheduled_at||"Not scheduled"},"table"));}catch(o){l(o instanceof Error?o.message:"Failed to update broadcast"),process.exit(1);}}),i.command("delete <broadcast_id>").description(`Delete a broadcast
|
|
2130
|
+
Only broadcasts in 'draft' or 'scheduled' status can be updated.`).option("--name <name>","Broadcast name").option("--subject <subject>","Email subject").option("--from <email>","Sender email address").option("--from-name <name>","Sender display name").option("--reply-to <email>","Reply-To email address").option("--preview-text <text>","Preview text (preheader)").option("--template <id>",'Template ID (use "none" to clear)').option("--segment <id>",'Segment ID (use "none" to clear)').option("--topic <id>",'Topic ID (use "none" to clear)').option("--html <html>","HTML content").option("--text <text>","Plain text content").option("--schedule <datetime>",'Schedule time ISO 8601 (use "none" to clear)').option("--tags <tags>","Comma-separated tags (replaces existing)").option("--format <format>","Output format (json|table)","table").action(async(t,e)=>{try{let o=m(),r=new Emailr({apiKey:o.apiKey,baseUrl:o.baseUrl}),a={};e.name&&(a.name=e.name),e.subject&&(a.subject=e.subject),e.from&&(a.from_email=e.from),e.fromName&&(a.from_name=e.fromName),e.replyTo&&(a.reply_to=e.replyTo),e.previewText&&(a.preview_text=e.previewText),e.html&&(a.html_content=e.html),e.text&&(a.text_content=e.text),e.template&&(a.template_id=e.template==="none"?null:e.template),e.segment&&(a.segment_id=e.segment==="none"?null:e.segment),e.topic&&(a.topic_id=e.topic==="none"?null:e.topic),e.schedule&&(a.scheduled_at=e.schedule==="none"?null:e.schedule),e.tags&&(a.tags=e.tags.split(",").map(s=>s.trim().toLowerCase()).filter(Boolean)),Object.keys(a).length===0&&(l("No update fields specified. Use --help to see available options."),process.exit(1));let n=await r.broadcasts.update(t,a);e.format==="json"?c(n,"json"):(d("Broadcast updated successfully!"),c({ID:n.id,Name:n.name,Subject:n.subject,Status:n.status,Tags:n.tags?.join(", ")||"-","Scheduled At":n.scheduled_at||"Not scheduled"},"table"));}catch(o){l(o instanceof Error?o.message:"Failed to update broadcast"),process.exit(1);}}),i.command("delete <broadcast_id>").description(`Delete a broadcast
|
|
2123
2131
|
|
|
2124
2132
|
USAGE
|
|
2125
2133
|
emailr broadcasts delete <broadcast_id> [options]
|
|
@@ -3088,4 +3096,4 @@ AGENTIC WORKFLOW
|
|
|
3088
3096
|
|
|
3089
3097
|
MORE INFORMATION
|
|
3090
3098
|
Run 'emailr <command> --help' for detailed help on any command.
|
|
3091
|
-
Run 'emailr <command> <subcommand> --help' for subcommand details.`).version("1.
|
|
3099
|
+
Run 'emailr <command> <subcommand> --help' for subcommand details.`).version("1.7.7");g.addCommand(ce());g.addCommand(me());g.addCommand(Oe());g.addCommand(Ee());g.addCommand(Ne());g.addCommand(je());g.addCommand(Ie());g.addCommand(_e());g.addCommand(Pe());g.addCommand(xe());g.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "emailr-cli",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.8",
|
|
4
4
|
"description": "Command-line interface for the Emailr email API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"chalk": "^5.3.0",
|
|
24
24
|
"cli-table3": "^0.6.3",
|
|
25
25
|
"commander": "^12.0.0",
|
|
26
|
-
"emailr": "^1.3.
|
|
26
|
+
"emailr": "^1.3.4",
|
|
27
27
|
"open": "^11.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|