run402 1.35.4 → 1.36.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/lib/ai.mjs +27 -0
- package/lib/allowance.mjs +31 -0
- package/lib/apps.mjs +73 -0
- package/lib/auth.mjs +89 -2
- package/lib/billing.mjs +64 -0
- package/lib/blob.mjs +84 -1
- package/lib/contracts.mjs +139 -0
- package/lib/deploy.mjs +17 -6
- package/lib/domains.mjs +1 -0
- package/lib/email.mjs +51 -0
- package/lib/functions.mjs +90 -1
- package/lib/init.mjs +16 -6
- package/lib/projects.mjs +117 -30
- package/lib/secrets.mjs +26 -1
- package/lib/sender-domain.mjs +1 -0
- package/lib/service.mjs +4 -4
- package/lib/sites.mjs +36 -0
- package/lib/storage.mjs +24 -0
- package/lib/subdomains.mjs +26 -0
- package/lib/tier.mjs +8 -1
- package/lib/webhooks.mjs +42 -0
- package/package.json +1 -1
package/lib/webhooks.mjs
CHANGED
|
@@ -21,6 +21,47 @@ Examples:
|
|
|
21
21
|
run402 email webhooks delete whk_123
|
|
22
22
|
`;
|
|
23
23
|
|
|
24
|
+
const SUB_HELP = {
|
|
25
|
+
update: `run402 email webhooks update — Update an existing webhook
|
|
26
|
+
|
|
27
|
+
Usage:
|
|
28
|
+
run402 email webhooks update <webhook_id> [--url <url>] [--events <e1,e2>] [--project <id>]
|
|
29
|
+
|
|
30
|
+
Arguments:
|
|
31
|
+
<webhook_id> Webhook ID to update
|
|
32
|
+
|
|
33
|
+
Options:
|
|
34
|
+
--url <url> New delivery URL for the webhook
|
|
35
|
+
--events <e1,e2> Comma-separated event list to replace the current events
|
|
36
|
+
Valid: delivery, bounced, complained, reply_received
|
|
37
|
+
--project <id> Project ID (defaults to the active project)
|
|
38
|
+
|
|
39
|
+
Notes:
|
|
40
|
+
- Provide at least one of --url or --events
|
|
41
|
+
|
|
42
|
+
Examples:
|
|
43
|
+
run402 email webhooks update whk_123 --url https://new.example.com/hook
|
|
44
|
+
run402 email webhooks update whk_123 --events delivery,bounced
|
|
45
|
+
`,
|
|
46
|
+
register: `run402 email webhooks register — Register a new webhook
|
|
47
|
+
|
|
48
|
+
Usage:
|
|
49
|
+
run402 email webhooks register --url <url> --events <e1,e2> [--project <id>]
|
|
50
|
+
|
|
51
|
+
Options:
|
|
52
|
+
--url <url> Delivery URL for the webhook (required)
|
|
53
|
+
--events <e1,e2> Comma-separated event list (required)
|
|
54
|
+
Valid: delivery, bounced, complained, reply_received
|
|
55
|
+
--project <id> Project ID (defaults to the active project)
|
|
56
|
+
|
|
57
|
+
Examples:
|
|
58
|
+
run402 email webhooks register --url https://example.com/hook \\
|
|
59
|
+
--events delivery,bounced
|
|
60
|
+
run402 email webhooks register --url https://example.com/hook \\
|
|
61
|
+
--events reply_received --project proj123
|
|
62
|
+
`,
|
|
63
|
+
};
|
|
64
|
+
|
|
24
65
|
function parseFlag(args, flag) {
|
|
25
66
|
for (let i = 0; i < args.length; i++) {
|
|
26
67
|
if (args[i] === flag && args[i + 1]) return args[i + 1];
|
|
@@ -207,6 +248,7 @@ async function register(args) {
|
|
|
207
248
|
|
|
208
249
|
export async function run(sub, args) {
|
|
209
250
|
if (!sub || sub === '--help' || sub === '-h') { console.log(HELP); process.exit(0); }
|
|
251
|
+
if (Array.isArray(args) && (args.includes("--help") || args.includes("-h"))) { console.log(SUB_HELP[sub] || HELP); process.exit(0); }
|
|
210
252
|
switch (sub) {
|
|
211
253
|
case "list": await list(args); break;
|
|
212
254
|
case "get": await get(args); break;
|
package/package.json
CHANGED