@myapihq/cli 2.7.0 → 2.7.2
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/account.js +15 -0
- package/dist/commands/audience.js +7 -5
- package/dist/commands/container.js +50 -26
- package/dist/commands/crm/companies.js +4 -4
- package/dist/commands/crm/contacts.js +4 -4
- package/dist/commands/crm/index.js +3 -0
- package/dist/commands/crm/origin-flag.test.d.ts +1 -0
- package/dist/commands/crm/origin-flag.test.js +38 -0
- package/dist/commands/crm/pagination.d.ts +2 -0
- package/dist/commands/crm/pagination.js +9 -0
- package/dist/commands/database.js +21 -14
- package/dist/commands/domain.js +11 -0
- package/dist/commands/fn.js +10 -5
- package/dist/commands/task.js +12 -4
- package/dist/skills/my-api-hq/SKILL.md +25 -1
- package/dist/skills/my-audience-api/SKILL.md +5 -5
- package/dist/skills/my-auth-api/SKILL.md +8 -1
- package/dist/skills/my-company-api/SKILL.md +3 -3
- package/dist/skills/my-container-api/SKILL.md +47 -30
- package/dist/skills/my-crm-api/SKILL.md +6 -6
- package/dist/skills/my-database-api/README.md +1 -1
- package/dist/skills/my-database-api/SKILL.md +25 -4
- package/dist/skills/my-domain-api/SKILL.md +18 -1
- package/dist/skills/my-email-api/SKILL.md +36 -1
- package/dist/skills/my-function-api/SKILL.md +38 -10
- package/dist/skills/my-funnel-api/SKILL.md +6 -3
- package/dist/skills/my-git-api/SKILL.md +10 -4
- package/dist/skills/my-people-api/SKILL.md +3 -3
- package/dist/skills/my-pixel-api/SKILL.md +12 -1
- package/dist/skills/my-storage-api/SKILL.md +31 -2
- package/dist/skills/my-task-api/SKILL.md +9 -1
- package/dist/skills/my-webhook-api/SKILL.md +12 -1
- package/package.json +3 -2
|
@@ -4,7 +4,7 @@ version: 1.0.0
|
|
|
4
4
|
description: >
|
|
5
5
|
Edge-hosted asset storage. Upload a local file of any content type directly, or have the server fetch from a public URL. Each asset gets a stable public CDN URL.
|
|
6
6
|
triggers: [storage, upload, ingest, asset, cdn, image hosting, file upload, get-url, download, public url]
|
|
7
|
-
checksum: sha256-
|
|
7
|
+
checksum: sha256-9172b0d8590a3102ce35b94ef48015ec36c624ab9bcc37fe0f7efa15bc54cf62
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MyStorageAPI
|
|
@@ -89,8 +89,37 @@ Both produce identical asset records — `list` doesn't distinguish.
|
|
|
89
89
|
|
|
90
90
|
## Notes
|
|
91
91
|
|
|
92
|
-
- Assets are public
|
|
92
|
+
- **Assets are public, permanently, with no auth.** Anyone with the URL can
|
|
93
|
+
fetch it; there is no private mode, no signed URL, and no revocation. The id
|
|
94
|
+
being long and random is **not** access control — treat the URL as public the
|
|
95
|
+
moment it exists.
|
|
96
|
+
- **For personal or regulated data, encrypt before upload.** Storage only ever
|
|
97
|
+
sees ciphertext. A team shipping Swiss lease documents (names, dates of
|
|
98
|
+
birth, permit type, IBAN) used AES-256-GCM envelope encryption with a
|
|
99
|
+
per-document data key wrapped under a master key held in function secrets.
|
|
100
|
+
That is the pattern to copy until private assets exist.
|
|
93
101
|
- Delete is immediate and unrecoverable — run `myapi storage list` first to confirm the asset, pass `--org` explicitly, and pass `--yes` in non-interactive runs.
|
|
94
102
|
- The URL is permanent until you `myapi storage delete <id>` — embed it freely.
|
|
95
103
|
|
|
104
|
+
|
|
105
|
+
## Calling this from deployed code (HTTP)
|
|
106
|
+
|
|
107
|
+
The CLI is not what runs in production — a deployed function or container calls
|
|
108
|
+
the HTTP API directly. That surface was previously only discoverable by
|
|
109
|
+
grepping the CLI bundle, which cost one team an hour per slot.
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
base https://api.mystorageapi.com ← not the gateway
|
|
113
|
+
path /storage/orgs/{org_id}/assets/upload (multipart, field: file)
|
|
114
|
+
auth Authorization: Bearer <api key>
|
|
115
|
+
(inside a function: env.__MYAPI_KEY · inside a container: env.MYAPI_KEY)
|
|
116
|
+
body multipart/form-data
|
|
117
|
+
reply { "success": true, "data": …, "error": null, "meta": {…} }
|
|
118
|
+
Unwrap `data`. On failure `success` is false and `error` is
|
|
119
|
+
{ code, message }.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**The org id goes in the PATH, not a header.** There is no `X-Org-Id`.
|
|
123
|
+
**Base URLs differ per slot** — do not assume one host for everything.
|
|
124
|
+
|
|
96
125
|
Run `myapi storage --help` for full flag reference.
|
|
@@ -4,7 +4,7 @@ version: 1.0.0
|
|
|
4
4
|
description: >
|
|
5
5
|
Agent-task queue — file units of work, rank them, claim under a lease, then resolve, fail, or cancel. The agent-loop hot path.
|
|
6
6
|
triggers: [task, task queue, agent loop, work queue, claim task, resolve task, lease, backlog, to-do, assignee]
|
|
7
|
-
checksum: sha256-
|
|
7
|
+
checksum: sha256-ceb6cdfffe465d8b0cd232eaa16868c1b8c8b10288f1cf9b4174fdd48a8d2c18
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MyTaskAPI
|
|
@@ -71,4 +71,12 @@ myapi task create "Ship once payment clears" \
|
|
|
71
71
|
- `resolve` unblocks dependents; `fail` cascades to dependents that can never proceed.
|
|
72
72
|
- `resolve_on` matches platform events. Today few event kinds are emitted in production — verify the kind exists before relying on it.
|
|
73
73
|
|
|
74
|
+
## Idempotency and provenance
|
|
75
|
+
|
|
76
|
+
- `--dedup-key <k>` — creating a task with a key that already exists returns
|
|
77
|
+
the existing task instead of a duplicate. Use it whenever a task is created
|
|
78
|
+
from a retryable event, which for an agent is nearly always.
|
|
79
|
+
- `--origin <s>` — records what created the task, and filters `task list`.
|
|
80
|
+
(Formerly `--source`, which still works and is undocumented.)
|
|
81
|
+
|
|
74
82
|
Run `myapi task --help` for the full flag reference.
|
|
@@ -4,7 +4,7 @@ version: 1.0.0
|
|
|
4
4
|
description: >
|
|
5
5
|
Inbound webhook endpoints for non-funnel sources — Stripe, GitHub, custom services. Funnel forms use the my-funnel-api proxy.
|
|
6
6
|
triggers: [webhook, inbound, receiver, stripe events, github webhook, slack notification, delivery, payload, event ingest]
|
|
7
|
-
checksum: sha256-
|
|
7
|
+
checksum: sha256-17b358d780333cabe76cb01df3be3c3f11db10a2b068449bcf9e10e2ed89393d
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MyWebhookAPI
|
|
@@ -97,4 +97,15 @@ The form sends `{name, email, message}` → webhook stores it → workflow runs
|
|
|
97
97
|
- Failed workflow runs don't affect the delivery record — the inbound POST is always saved.
|
|
98
98
|
- Inbound responses: `200` on success, `4xx` if the endpoint is missing or body isn't valid JSON.
|
|
99
99
|
|
|
100
|
+
## Auto-ingest and forwarding
|
|
101
|
+
|
|
102
|
+
- `--crm-email-path <dot-path>` — where to find the email in an incoming
|
|
103
|
+
payload, so submissions become CRM contacts automatically. Default `email`
|
|
104
|
+
(top level). Stripe: `data.object.customer_email`. GitHub: `sender.email`.
|
|
105
|
+
An empty string disables ingest for that endpoint.
|
|
106
|
+
- `--forward-url <url>` — POST a copy of every delivery onward. The forward
|
|
107
|
+
status is recorded on the delivery, so a failing forward is visible in
|
|
108
|
+
`webhook deliveries` rather than silent.
|
|
109
|
+
- `--description <text>` — free text, shown in `webhook list`.
|
|
110
|
+
|
|
100
111
|
Run `myapi webhook --help` for full flag reference.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myapihq/cli",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "2.7.
|
|
4
|
+
"version": "2.7.2",
|
|
5
5
|
"description": "MyAPI command-line interface",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -37,11 +37,12 @@
|
|
|
37
37
|
"lint:request-fields": "node scripts/lint-request-fields.js",
|
|
38
38
|
"audit:doctor": "npm run build && node scripts/audit-doctor.js",
|
|
39
39
|
"lint:docs": "node scripts/lint-docs.js",
|
|
40
|
+
"lint:skill-coverage": "node scripts/lint-skill-coverage.js",
|
|
40
41
|
"lint:skills": "node scripts/copy-skills.js && node scripts/lint-skills.js",
|
|
41
42
|
"lint:skills:strict": "node scripts/copy-skills.js && node scripts/lint-skills.js --strict"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@myapihq/sdk": "^2.7.
|
|
45
|
+
"@myapihq/sdk": "^2.7.2"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@types/node": "^25.6.0",
|