@madewithremy/admin 0.1.0 → 0.1.1
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.d.ts +108 -6
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/prod.js +41 -8
- package/package.json +1 -1
package/dist/prod.js
CHANGED
|
@@ -36,11 +36,11 @@ function fatal(message) {
|
|
|
36
36
|
throw new CliError(message);
|
|
37
37
|
}
|
|
38
38
|
var AdminApiError = class extends Error {
|
|
39
|
-
constructor(method, path5,
|
|
40
|
-
super(`API ${method} ${path5} returned ${
|
|
39
|
+
constructor(method, path5, status2, body) {
|
|
40
|
+
super(`API ${method} ${path5} returned ${status2}: ${JSON.stringify(body)}`);
|
|
41
41
|
this.method = method;
|
|
42
42
|
this.path = path5;
|
|
43
|
-
this.status =
|
|
43
|
+
this.status = status2;
|
|
44
44
|
this.body = body;
|
|
45
45
|
this.name = "AdminApiError";
|
|
46
46
|
}
|
|
@@ -4606,6 +4606,13 @@ function stats2(ctx, params = {}) {
|
|
|
4606
4606
|
`/_internal/v2/apps/${ctx.appId}/outbound-email/summary${qs(params)}`
|
|
4607
4607
|
);
|
|
4608
4608
|
}
|
|
4609
|
+
function status(ctx) {
|
|
4610
|
+
return call(
|
|
4611
|
+
ctx,
|
|
4612
|
+
"GET",
|
|
4613
|
+
`/_internal/v2/apps/${ctx.appId}/outbound-email/status`
|
|
4614
|
+
);
|
|
4615
|
+
}
|
|
4609
4616
|
function batches(ctx, params = {}) {
|
|
4610
4617
|
return call(
|
|
4611
4618
|
ctx,
|
|
@@ -4702,6 +4709,9 @@ var emailSpecs = {
|
|
|
4702
4709
|
usage: "Usage: remy-admin email stats [--start <ISO date>] [--end <ISO date>]",
|
|
4703
4710
|
flags: { ...WINDOW }
|
|
4704
4711
|
},
|
|
4712
|
+
"email status": {
|
|
4713
|
+
usage: "Usage: remy-admin email status"
|
|
4714
|
+
},
|
|
4705
4715
|
"email batches": {
|
|
4706
4716
|
usage: "Usage: remy-admin email batches [--start <ISO date>] [--end <ISO date>] [--limit 50]",
|
|
4707
4717
|
flags: { ...WINDOW, ...PAGINATION }
|
|
@@ -4793,6 +4803,9 @@ async function emailGet(ctx, a) {
|
|
|
4793
4803
|
async function emailStats(ctx, a) {
|
|
4794
4804
|
out(await stats2(ctx, { start: a.str("start"), end: a.str("end") }));
|
|
4795
4805
|
}
|
|
4806
|
+
async function emailStatus(ctx) {
|
|
4807
|
+
out(await status(ctx));
|
|
4808
|
+
}
|
|
4796
4809
|
async function emailBatches(ctx, a) {
|
|
4797
4810
|
out(
|
|
4798
4811
|
await batches(ctx, {
|
|
@@ -4829,7 +4842,12 @@ async function emailUnsuppress(ctx, a) {
|
|
|
4829
4842
|
const { reason, at } = result.platformSuppression;
|
|
4830
4843
|
console.error(
|
|
4831
4844
|
`
|
|
4832
|
-
Note: removed from this app's list, but ${a.req("email")} is still on the
|
|
4845
|
+
Note: removed from this app's list, but ${a.req("email")} is still on the ACCOUNT-wide suppression list (${reason}${at ? ` since ${at}` : ""}). Mail to it will still be blocked \u2014 that list is shared by every app and is not cleared.`
|
|
4846
|
+
);
|
|
4847
|
+
} else if (result?.tenantEntryRemoved) {
|
|
4848
|
+
console.error(
|
|
4849
|
+
`
|
|
4850
|
+
Note: also cleared this app's provider-side bounce/complaint record for ${a.req("email")}. Mail will be attempted again \u2014 another hard bounce re-suppresses it automatically.`
|
|
4833
4851
|
);
|
|
4834
4852
|
}
|
|
4835
4853
|
}
|
|
@@ -4868,6 +4886,7 @@ var emailHandlers = {
|
|
|
4868
4886
|
"email list": emailList,
|
|
4869
4887
|
"email get": emailGet,
|
|
4870
4888
|
"email stats": emailStats,
|
|
4889
|
+
"email status": emailStatus,
|
|
4871
4890
|
"email batches": emailBatches,
|
|
4872
4891
|
"email batch": emailBatch,
|
|
4873
4892
|
"email suppressions": emailSuppressions,
|
|
@@ -4891,7 +4910,8 @@ Subcommands:
|
|
|
4891
4910
|
list List sent messages (includes mail that never reached the provider)
|
|
4892
4911
|
get Full detail for one message, including bounce diagnostics
|
|
4893
4912
|
stats Counts and rates over a window
|
|
4894
|
-
|
|
4913
|
+
status Can this app send right now? Pause/throttle state + daily quota
|
|
4914
|
+
batches One row per blast, with per-status counts and delivery progress
|
|
4895
4915
|
batch Stats for a single blast
|
|
4896
4916
|
suppressions This app's unsubscribe list
|
|
4897
4917
|
suppress Add an address to the unsubscribe list
|
|
@@ -4903,15 +4923,26 @@ Subcommands:
|
|
|
4903
4923
|
|
|
4904
4924
|
Notes:
|
|
4905
4925
|
Statuses: suppressed, failed, sent, delivered, blocked, bounced, complained,
|
|
4906
|
-
delayed, rejected. "blocked" means
|
|
4907
|
-
|
|
4926
|
+
delayed, rejected. "blocked" means an SES suppression list dropped it before
|
|
4927
|
+
delivery \u2014 usually this app's OWN list, after an earlier hard bounce or spam
|
|
4928
|
+
report from that address ('unsuppress' clears it and says which list it was).
|
|
4929
|
+
|
|
4930
|
+
'status' is the first check when sends are failing or a send returns
|
|
4931
|
+
409 sending_paused. sending.source 'ses' = Amazon paused the tenant (clears
|
|
4932
|
+
when the finding clears; nothing lifts it directly); 'platform' = our
|
|
4933
|
+
bounce/complaint enforcement \u2014 enforcement.origin 'platform' steps down on
|
|
4934
|
+
its own as rates recover, 'operator' is a human hold and will not. A reduced
|
|
4935
|
+
quota.limit with an expiresAt is an automatic throttle.
|
|
4908
4936
|
|
|
4909
4937
|
--recipient is an exact match and is index-backed; use --search for partials
|
|
4910
4938
|
(bounded, and not paginated).
|
|
4911
4939
|
|
|
4912
4940
|
A marketing send delivers one message per recipient, so a campaign is many
|
|
4913
4941
|
rows sharing a batch id. Pass batchId to sendEmail to group them under your own
|
|
4914
|
-
campaign id.
|
|
4942
|
+
campaign id. Large and marketing sends are QUEUED: accepted immediately,
|
|
4943
|
+
delivered in chunks \u2014 a batch's status (accepted|sending|completed|partial|
|
|
4944
|
+
failed), chunksDone/chunksTotal and pending report the progress. status null
|
|
4945
|
+
is a normal send that delivered inline, not an error.
|
|
4915
4946
|
|
|
4916
4947
|
An inbox row's id is its request-log id: open the full detail (parsed message,
|
|
4917
4948
|
method run, errors) with 'requests get <id>'.
|
|
@@ -4934,6 +4965,8 @@ Custom domains \u2014 two independent directions:
|
|
|
4934
4965
|
the records and 'verify' again).
|
|
4935
4966
|
|
|
4936
4967
|
Examples:
|
|
4968
|
+
remy-admin email status
|
|
4969
|
+
remy-admin email list --status bounced,blocked --limit 50
|
|
4937
4970
|
remy-admin email domains add mail.acme.com
|
|
4938
4971
|
remy-admin email domains verify mail.acme.com
|
|
4939
4972
|
remy-admin email inbound-domains check acme.com
|