makea-cli 0.1.24__tar.gz → 0.2.1__tar.gz
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.
- {makea_cli-0.1.24 → makea_cli-0.2.1}/.claude/skills/create-supplier-profile/SKILL.md +8 -8
- {makea_cli-0.1.24 → makea_cli-0.2.1}/.claude/skills/link-supplier-user/SKILL.md +8 -8
- {makea_cli-0.1.24 → makea_cli-0.2.1}/.claude/skills/makea-cli-setup/SKILL.md +5 -5
- {makea_cli-0.1.24 → makea_cli-0.2.1}/.claude/skills/payment-revenue-report/SKILL.md +16 -16
- {makea_cli-0.1.24 → makea_cli-0.2.1}/.claude/skills/supplier-user-id-migration/SKILL.md +6 -6
- makea_cli-0.2.1/CHANGELOG.md +144 -0
- makea_cli-0.2.1/PKG-INFO +251 -0
- makea_cli-0.2.1/README.md +239 -0
- makea_cli-0.2.1/makea_cli/__init__.py +1 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/__main__.py +2 -2
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/api_client.py +463 -120
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/__init__.py +4 -0
- makea_cli-0.2.1/makea_cli/commands/_util.py +29 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/analytics/cmd.py +41 -9
- makea_cli-0.2.1/makea_cli/commands/brand/cmd.py +628 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/designer/cmd.py +57 -20
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/directory/cmd.py +27 -6
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/document/cmd.py +82 -21
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/email/cmd.py +11 -2
- makea_cli-0.2.1/makea_cli/commands/factory/cmd.py +398 -0
- makea_cli-0.2.1/makea_cli/commands/library/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/library/cmd.py +47 -14
- makea_cli-0.2.1/makea_cli/commands/metrics/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/metrics/cmd.py +19 -6
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/orders/cmd.py +74 -22
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/product/cmd.py +29 -10
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/production/cmd.py +52 -17
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/supplier/cmd.py +165 -33
- makea_cli-0.2.1/makea_cli/errors.py +85 -0
- makea_cli-0.2.1/makea_cli/identity.py +78 -0
- makea_cli-0.2.1/makea_cli/main.py +207 -0
- makea_cli-0.2.1/makea_cli/output.py +182 -0
- makea_cli-0.2.1/makea_cli/registry.py +357 -0
- makea_cli-0.2.1/pyproject.toml +32 -0
- makea_cli-0.2.1/tests/golden_manifest.json +6698 -0
- makea_cli-0.2.1/tests/test_output_contract.py +317 -0
- makea_cli-0.2.1/tests/test_persona_commands.py +325 -0
- makea_cli-0.2.1/tests/test_registry.py +136 -0
- makea_cli-0.1.24/PKG-INFO +0 -157
- makea_cli-0.1.24/README.md +0 -146
- makea_cli-0.1.24/makea_cli/__init__.py +0 -1
- makea_cli-0.1.24/makea_cli/commands/_util.py +0 -16
- makea_cli-0.1.24/makea_cli/main.py +0 -31
- makea_cli-0.1.24/pyproject.toml +0 -26
- {makea_cli-0.1.24 → makea_cli-0.2.1}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/.gitignore +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea-collection-upload/SKILL.md +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea-collection-upload/scripts/create_products.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/auth_pkce.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/analytics/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/auth/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/auth/cmd.py +0 -0
- {makea_cli-0.1.24/makea_cli/commands/library → makea_cli-0.2.1/makea_cli/commands/brand}/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/designer/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/directory/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/document/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/email/__init__.py +0 -0
- {makea_cli-0.1.24/makea_cli/commands/metrics → makea_cli-0.2.1/makea_cli/commands/factory}/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/orders/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/product/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/production/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/production/pricing_spec.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/commands/supplier/__init__.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/config.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/makea_cli/posthog_client.py +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/npm/makea-cli/README.md +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/npm/makea-cli/makea-cli.mjs +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/npm/makea-cli/package.json +0 -0
- {makea_cli-0.1.24 → makea_cli-0.2.1}/uv.lock +0 -0
|
@@ -3,8 +3,8 @@ name: create-supplier-profile
|
|
|
3
3
|
description: >-
|
|
4
4
|
Create a new Makea supplier profile from scratch (admin), the schema-driven way:
|
|
5
5
|
first fetch the live supplier profile schema (the field taxonomy) with
|
|
6
|
-
`makea-cli get
|
|
7
|
-
it, then upload with `makea-cli
|
|
6
|
+
`makea-cli admin get supplier-profile-schema`, then build a valid v2 payload against
|
|
7
|
+
it, then upload with `makea-cli admin create supplier`. Use this whenever you need to
|
|
8
8
|
onboard / register / create a supplier, turn raw supplier info (a website, a
|
|
9
9
|
brochure, an email, a few notes) into a structured profile, or are asked to
|
|
10
10
|
"add a supplier", "create a supplier profile", "onboard [company]". The AI does
|
|
@@ -27,7 +27,7 @@ Flow: **fetch schema → build payload → upload.**
|
|
|
27
27
|
|
|
28
28
|
## Step 0 — Auth & CLI setup
|
|
29
29
|
|
|
30
|
-
You need a working, authenticated `makea-cli`. If `makea-cli list
|
|
30
|
+
You need a working, authenticated `makea-cli`. If `makea-cli admin list supplier`
|
|
31
31
|
returns JSON, you're good. If it prints `尚未登录` / "not logged in" or
|
|
32
32
|
`command not found`, run the **`makea-cli-setup`** skill first (install + token
|
|
33
33
|
refresh + login).
|
|
@@ -35,7 +35,7 @@ refresh + login).
|
|
|
35
35
|
Quick smoke-test:
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
makea-cli list
|
|
38
|
+
makea-cli admin list supplier 2>&1 | head -3
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
---
|
|
@@ -43,7 +43,7 @@ makea-cli list-suppliers 2>&1 | head -3
|
|
|
43
43
|
## Step 1 — Fetch the schema (taxonomy)
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
makea-cli get
|
|
46
|
+
makea-cli admin get supplier-profile-schema
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
Returns `{success, schema}`. The `schema` object you care about:
|
|
@@ -122,7 +122,7 @@ is for. Confirm anything ambiguous with the user before uploading.
|
|
|
122
122
|
## Step 3 — Upload
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
makea-cli
|
|
125
|
+
makea-cli admin create supplier --file supplier.json
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
The file root may be the flat supplier object (recommended) or the full envelope
|
|
@@ -140,7 +140,7 @@ schema (Step 2), and re-run. Common codes: `required_missing`,
|
|
|
140
140
|
## Step 4 — Verify
|
|
141
141
|
|
|
142
142
|
```bash
|
|
143
|
-
makea-cli list
|
|
143
|
+
makea-cli admin list supplier | python3 -c "
|
|
144
144
|
import json, sys
|
|
145
145
|
data = json.load(sys.stdin)
|
|
146
146
|
search = 'acme' # lowercase fragment of the company name
|
|
@@ -164,4 +164,4 @@ user.
|
|
|
164
164
|
- **`supplier_id` is auto-generated** when omitted. Provide one only if you need
|
|
165
165
|
it to equal a Cognito sub up front (usually you don't — link later).
|
|
166
166
|
- **Documents** (catalogue, images, business_license, …) are uploaded separately
|
|
167
|
-
with `makea-cli upload
|
|
167
|
+
with `makea-cli admin upload supplier-document` after the profile exists.
|
|
@@ -70,7 +70,7 @@ export PATH="$PATH:/sessions/modest-brave-newton/.local/bin"
|
|
|
70
70
|
Quick smoke-test:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
makea-cli list
|
|
73
|
+
makea-cli admin list supplier 2>&1 | head -3
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
If you see JSON, you're authenticated. If you see "尚未登录", the token is still broken.
|
|
@@ -110,7 +110,7 @@ Confirm with the user if there are multiple matches. The right one is typically
|
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
112
|
export PATH="$PATH:/sessions/modest-brave-newton/.local/bin"
|
|
113
|
-
makea-cli list
|
|
113
|
+
makea-cli admin list supplier | python3 -c "
|
|
114
114
|
import json, sys
|
|
115
115
|
data = json.load(sys.stdin)
|
|
116
116
|
suppliers = data.get('result', [])
|
|
@@ -133,7 +133,7 @@ equal to the newly registered user, and one with `null` — the one with `null`
|
|
|
133
133
|
Always preview before writing anything:
|
|
134
134
|
|
|
135
135
|
```bash
|
|
136
|
-
makea-cli backfill
|
|
136
|
+
makea-cli admin backfill supplier-id \
|
|
137
137
|
--user-id "<cognito_sub / new user_id>" \
|
|
138
138
|
--old-supplier-id "<old profile UUID>" \
|
|
139
139
|
--dry-run
|
|
@@ -155,7 +155,7 @@ with the user before proceeding.
|
|
|
155
155
|
## Step 5 — Apply
|
|
156
156
|
|
|
157
157
|
```bash
|
|
158
|
-
makea-cli backfill
|
|
158
|
+
makea-cli admin backfill supplier-id \
|
|
159
159
|
--user-id "<cognito_sub>" \
|
|
160
160
|
--old-supplier-id "<old_supplier_id>" \
|
|
161
161
|
--apply
|
|
@@ -176,7 +176,7 @@ Only do this if the user explicitly asks. The old `SUPPLIER#{old_id}` partition
|
|
|
176
176
|
marked `is_migrated` but still present. To remove it permanently:
|
|
177
177
|
|
|
178
178
|
```bash
|
|
179
|
-
makea-cli backfill
|
|
179
|
+
makea-cli admin backfill supplier-id \
|
|
180
180
|
--user-id "<cognito_sub>" \
|
|
181
181
|
--old-supplier-id "<old_supplier_id>" \
|
|
182
182
|
--apply \
|
|
@@ -194,8 +194,8 @@ After linking, verify by pulling all quote requests and supplier links for the n
|
|
|
194
194
|
|
|
195
195
|
```bash
|
|
196
196
|
export PATH="$PATH:/sessions/modest-brave-newton/.local/bin"
|
|
197
|
-
makea-cli
|
|
198
|
-
makea-cli
|
|
197
|
+
makea-cli admin list quote-request --supplier "<cognito_sub>"
|
|
198
|
+
makea-cli admin list supplier-link "<cognito_sub>"
|
|
199
199
|
```
|
|
200
200
|
|
|
201
201
|
Present the results as a clean table per product: link name, sampling price, production
|
|
@@ -213,7 +213,7 @@ price tiers (with currency), lead times.
|
|
|
213
213
|
| Thing | Where to find it |
|
|
214
214
|
| -------------------------------- | ----------------------------------------------------------------------------------- |
|
|
215
215
|
| Supplier `user_id` (Cognito sub) | `/admin/users` search by name/email |
|
|
216
|
-
| Old `supplier_id` | `makea-cli list
|
|
216
|
+
| Old `supplier_id` | `makea-cli admin list supplier` — look for `supplier_user_id: null` |
|
|
217
217
|
| Credentials path | `/sessions/modest-brave-newton/mnt/Application Support--makea-cli/credentials.json` |
|
|
218
218
|
|
|
219
219
|
|
|
@@ -35,7 +35,7 @@ makea-cli version 2>&1 | head -1 || echo "NOT_INSTALLED"
|
|
|
35
35
|
If that prints a version, test auth with a low-cost call:
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
makea-cli list
|
|
38
|
+
makea-cli admin list supplier 2>&1 | head -c 200
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
- JSON output → **already set up, you're done.** Skip to "Confirm & report".
|
|
@@ -110,7 +110,7 @@ Connecting to a **non-production** environment? Set these before `makea-cli auth
|
|
|
110
110
|
Re-run the smoke-test from Step 0:
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
|
-
makea-cli list
|
|
113
|
+
makea-cli admin list supplier 2>&1 | head -c 200
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
JSON back → tell the user **"✓ makea-cli is installed and logged in."** and
|
|
@@ -132,6 +132,6 @@ Step 2 and confirm the browser flow completed.
|
|
|
132
132
|
| Logout | `makea-cli auth --logout` |
|
|
133
133
|
|
|
134
134
|
The credentials JSON holds `id_token`, `refresh_token`, `expires_in`,
|
|
135
|
-
`saved_at`. Run `makea-cli --help` for the full command list (list
|
|
136
|
-
list
|
|
137
|
-
upload-*-document, backfill
|
|
135
|
+
`saved_at`. Run `makea-cli --help` for the full command list (admin list user,
|
|
136
|
+
admin list supplier, admin list product-order, admin create quote-request, admin download document,
|
|
137
|
+
upload-*-document, admin backfill supplier-id, …).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: payment-revenue-report
|
|
3
|
-
description: Report payment received and platform revenue (service fee + transaction fee) across a date range. Use when the user asks about platform totals, or wants a drill-down by user / product / product category. Backed by the makea-cli `get-
|
|
3
|
+
description: Report payment received and platform revenue (service fee + transaction fee) across a date range. Use when the user asks about platform totals, or wants a drill-down by user / product / product category. Backed by the makea-cli `admin get revenue-metrics` command and existing order-listing commands.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Payment & platform revenue report
|
|
@@ -18,7 +18,7 @@ the question the user is asking:
|
|
|
18
18
|
|
|
19
19
|
| Mode | When | How |
|
|
20
20
|
| --- | --- | --- |
|
|
21
|
-
| **A. Platform totals** | User wants the whole-platform aggregate over a time range. | One direct admin API call: `makea-cli get-
|
|
21
|
+
| **A. Platform totals** | User wants the whole-platform aggregate over a time range. | One direct admin API call: `makea-cli admin get revenue-metrics`. |
|
|
22
22
|
| **B. Per-user / per-product / per-category drill-down** | User wants revenue attributed to a specific designer, product, or category. | The admin cumulative endpoint does **not** support these filters. Fetch the relevant orders with the existing list commands and aggregate the fees client-side. |
|
|
23
23
|
|
|
24
24
|
Always confirm which mode is needed before running anything. If the user is
|
|
@@ -72,7 +72,7 @@ boundary mistakes.
|
|
|
72
72
|
### 2. Run the command
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
makea-cli get-
|
|
75
|
+
makea-cli admin get revenue-metrics \
|
|
76
76
|
--start-date 2026-01-01 \
|
|
77
77
|
--end-date 2026-03-31 \
|
|
78
78
|
--granularity month \
|
|
@@ -146,15 +146,15 @@ Choose the entry point based on what you are drilling into:
|
|
|
146
146
|
1. List the designer's product orders:
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
|
-
makea-cli list
|
|
149
|
+
makea-cli admin list product-order --user-id <user_id>
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
2. For each product order's `product_reference_id`, pull the sampling and
|
|
153
153
|
production orders:
|
|
154
154
|
|
|
155
155
|
```bash
|
|
156
|
-
makea-cli list
|
|
157
|
-
makea-cli list
|
|
156
|
+
makea-cli admin list sampling-order --product <product_reference_id>
|
|
157
|
+
makea-cli admin list production-order --product <product_reference_id>
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
3. Filter the returned orders to those whose **payment timestamp** falls in
|
|
@@ -172,8 +172,8 @@ Choose the entry point based on what you are drilling into:
|
|
|
172
172
|
|
|
173
173
|
### By product
|
|
174
174
|
|
|
175
|
-
Skip step 1 and go straight to `list
|
|
176
|
-
`list
|
|
175
|
+
Skip step 1 and go straight to `admin list sampling-order --product` /
|
|
176
|
+
`admin list production-order --product` with the known `product_reference_id`.
|
|
177
177
|
|
|
178
178
|
### By product category
|
|
179
179
|
|
|
@@ -194,8 +194,8 @@ There is no admin list-products-by-category CLI command today. Do this:
|
|
|
194
194
|
- **Transaction fee is hard-coded at 2.8%.** If that constant changes in
|
|
195
195
|
`FeeCalculationHelper.py` it will silently diverge from this skill. Keep
|
|
196
196
|
the magic number centralized in one place in any scratch script you write.
|
|
197
|
-
- **Pagination.** `list
|
|
198
|
-
`list
|
|
197
|
+
- **Pagination.** `admin list product-order`, `admin list sampling-order`, and
|
|
198
|
+
`admin list production-order` page with `--limit` / `--offset`. For a time
|
|
199
199
|
window that could contain many orders, loop until `has_more` / the returned
|
|
200
200
|
page is empty before aggregating — do not silently truncate.
|
|
201
201
|
- **Timezones.** Date ranges are interpreted by the server as calendar dates.
|
|
@@ -214,12 +214,12 @@ There is no admin list-products-by-category CLI command today. Do this:
|
|
|
214
214
|
|
|
215
215
|
## Related commands already in the CLI
|
|
216
216
|
|
|
217
|
-
- `list
|
|
218
|
-
- `list
|
|
219
|
-
- `list
|
|
220
|
-
- `list
|
|
221
|
-
- `list
|
|
222
|
-
- `list
|
|
217
|
+
- `admin list user` — find a user id to drill down on.
|
|
218
|
+
- `admin list product-order --user-id <id>` — product (SKU) rows for one designer.
|
|
219
|
+
- `admin list sampling-order` — global sampling order list.
|
|
220
|
+
- `admin list production-order [--type PRODUCTION|RESTOCK]` — global 大货 list.
|
|
221
|
+
- `admin list sampling-order --product <id>` — sampling orders for one product.
|
|
222
|
+
- `admin list production-order --product <id>` — production orders for one product.
|
|
223
223
|
|
|
224
224
|
## Upstream reference
|
|
225
225
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: supplier-user-id-migration
|
|
3
3
|
description: >-
|
|
4
4
|
Migrates supplier data when DynamoDB supplier_id does not match Cognito user sub.
|
|
5
|
-
Admins use makea-cli backfill
|
|
5
|
+
Admins use makea-cli admin backfill supplier-id (calls garmentby-service admin API).
|
|
6
6
|
Server-only modes (S3-only, delete-old-partition-only) and reconcile_quote_request_stage_status
|
|
7
7
|
still run from garmentby-service with manage.py. Use when the user mentions supplier migration,
|
|
8
8
|
wrong supplier_id, supplierReferenceId, backfill_supplier_id, quote request stage/status,
|
|
@@ -19,7 +19,7 @@ Production expects **`supplier_id` == Cognito `sub` (user_id)**. If a profile wa
|
|
|
19
19
|
|
|
20
20
|
Requires an admin Makea account and existing `makea-cli` browser login (same as other admin commands).
|
|
21
21
|
|
|
22
|
-
**CLI command:** `makea-cli backfill
|
|
22
|
+
**CLI command:** `makea-cli admin backfill supplier-id`
|
|
23
23
|
|
|
24
24
|
It calls **`POST /admin/supplier/backfill_supplier_id_with_quote_requests`**, which wraps the same logic as `manage.py backfill_supplier_id` on the server (profile, Cognito, optional S3/DOCUMENT#, product links, link→quote-request backfill, orders, optional delete old partition at end).
|
|
25
25
|
|
|
@@ -27,25 +27,25 @@ It calls **`POST /admin/supplier/backfill_supplier_id_with_quote_requests`**, wh
|
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
# Always dry-run first (default)
|
|
30
|
-
makea-cli backfill
|
|
30
|
+
makea-cli admin backfill supplier-id \
|
|
31
31
|
--user-id "<cognito_sub>" \
|
|
32
32
|
--old-supplier-id "<wrong_supplier_uuid>"
|
|
33
33
|
|
|
34
34
|
# Apply writes
|
|
35
|
-
makea-cli backfill
|
|
35
|
+
makea-cli admin backfill supplier-id \
|
|
36
36
|
--user-id "<cognito_sub>" \
|
|
37
37
|
--old-supplier-id "<wrong_supplier_uuid>" \
|
|
38
38
|
--apply
|
|
39
39
|
|
|
40
40
|
# Full run but defer S3/documents (server will skip step 2b)
|
|
41
|
-
makea-cli backfill
|
|
41
|
+
makea-cli admin backfill supplier-id \
|
|
42
42
|
--user-id "<cognito_sub>" \
|
|
43
43
|
--old-supplier-id "<wrong_supplier_uuid>" \
|
|
44
44
|
--apply \
|
|
45
45
|
--skip-s3-documents
|
|
46
46
|
|
|
47
47
|
# Only link→quote-request backfill (profile/Cognito/links already fixed)
|
|
48
|
-
makea-cli backfill
|
|
48
|
+
makea-cli admin backfill supplier-id \
|
|
49
49
|
--user-id "<cognito_sub>" \
|
|
50
50
|
--old-supplier-id "<wrong_supplier_uuid>" \
|
|
51
51
|
--apply \
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
Each persona can now clear its own queue. `list task` and `list action` could show
|
|
6
|
+
you the work; nothing could close it.
|
|
7
|
+
|
|
8
|
+
- **designer**: `list action`, `update task --complete|--dismiss`,
|
|
9
|
+
`update action --acknowledge|--snooze DAYS|--dismiss`,
|
|
10
|
+
`update note --accept|--reject` (a task the assistant proposed),
|
|
11
|
+
`update proposal --note N` (apply one proposed spec change),
|
|
12
|
+
`update suggested-action -a note:action` (accept several at once, one write).
|
|
13
|
+
- **supplier**: `list task`, `list quote-edit-request`, `update task`, `update action`,
|
|
14
|
+
`update quote <rfq> <link> --file` (revise a quote already sent), and
|
|
15
|
+
`update rfq --status|--archive|--accept-terms` — a factory could submit a quote
|
|
16
|
+
but had no way to correct it or answer the invitation.
|
|
17
|
+
|
|
18
|
+
Acknowledging an action does not close it: an action is closed by the fact it asks
|
|
19
|
+
for. The help text says so, because the opposite assumption is easy to make and
|
|
20
|
+
produces a dashboard that lies.
|
|
21
|
+
|
|
22
|
+
## 0.2.0
|
|
23
|
+
|
|
24
|
+
**The command names changed.** Every command is now `makea-cli <persona> <verb> <noun>`:
|
|
25
|
+
the persona says who is acting (`admin` / `designer` / `supplier`), and the verb says whether
|
|
26
|
+
the command reads or writes. The old flat names still work as hidden aliases that forward to
|
|
27
|
+
the new command and print a deprecation line on stderr — **they are removed in the next minor
|
|
28
|
+
release**, so move scripts and skills over now.
|
|
29
|
+
|
|
30
|
+
Why: the CLI is becoming the action surface for Beeboo. An agent harness has to decide, from
|
|
31
|
+
the command text alone and before running it, who is acting and whether this is a read or a
|
|
32
|
+
write. A flat list of 58 names could not answer either question; `submit-supplier-quote` is an
|
|
33
|
+
*admin* command acting *on behalf of* a supplier, and nothing in the name said so.
|
|
34
|
+
|
|
35
|
+
### New in 0.2.0
|
|
36
|
+
|
|
37
|
+
- **`--describe`** on any command prints its machine-readable definition (flags, backend path,
|
|
38
|
+
declared side effects, approval grade). `makea-cli --describe --json` prints the whole manifest.
|
|
39
|
+
- **JSON by default when piped.** A terminal still gets pretty-printed output; a pipe gets one
|
|
40
|
+
plain JSON document. `--json` forces the plain form anywhere.
|
|
41
|
+
- **`--fields a,b,c`** on reads keeps only those keys, on the payload or on each of its rows.
|
|
42
|
+
- **`--limit N`** on every `list`. Where the backend pages, it is passed through; where it does
|
|
43
|
+
not, the rows are capped locally and the payload says how many were dropped (`truncated`,
|
|
44
|
+
`returned`, `omitted`). There is no default cap: several skills depend on reading a whole
|
|
45
|
+
table, and a silent default would make them quietly wrong. A response with no single list of
|
|
46
|
+
rows (several lists, no obvious one) is left alone and says so in `limit_note` rather than
|
|
47
|
+
pretending the flag applied.
|
|
48
|
+
- **`--dry-run`** on every write prints the exact request (method, URL, body) and sends nothing.
|
|
49
|
+
- **`--idempotency-key K`** on every write, sent as the `Idempotency-Key` header.
|
|
50
|
+
- **Exit codes**: `0` ok, `2` usage, `3` not logged in or the login cannot act as this persona,
|
|
51
|
+
`4` the backend refused (4xx), `5` the call did not complete (5xx / network / timeout). A read
|
|
52
|
+
that exits 5 is simply retryable; a **write** that exits 5 may or may not have been applied, so
|
|
53
|
+
re-read state before retrying it. Writes are never retried automatically.
|
|
54
|
+
- **Errors are JSON on stderr**, with the exit code inside.
|
|
55
|
+
- **Secrets are redacted** from all output (JWTs, `Bearer …`, impersonation/delegation tokens).
|
|
56
|
+
- **A persona pre-check**: a command whose persona your token cannot act as fails with exit 3
|
|
57
|
+
before any request. The backend remains the real boundary; this only saves a round trip.
|
|
58
|
+
|
|
59
|
+
### New commands
|
|
60
|
+
|
|
61
|
+
The `designer` and `supplier` personas are new. They mirror what the in-product assistant can
|
|
62
|
+
already do, so the same operation is available from a terminal, a script and an agent:
|
|
63
|
+
|
|
64
|
+
- **designer** (21 new): `create note`, `create rfq`, `create sampling-order`, `get collection`, `get lifecycle`, `get product`, `get quote-advice`, `get tech-pack`, `get tech-pack-history`, `list channel`, `list collection`, `list library-element`, `list payment`, `list product`, `list production-order`, `list sampling-order`, `list shipping-order`, `list supplier-link`, `list task`, `search note`, `update product`
|
|
65
|
+
- **supplier** (12 new): `create note`, `download document`, `get pack`, `get pack-changes`, `get profile`, `get rfq`, `list action`, `list channel`, `list note`, `list production-order`, `list rfq`, `submit quote`
|
|
66
|
+
- **admin** (2 new): `get quote-request`, `list quote-request`
|
|
67
|
+
|
|
68
|
+
### Renamed
|
|
69
|
+
|
|
70
|
+
| 0.1 | 0.2 |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `add-supplier` | `admin create supplier` |
|
|
73
|
+
| `analytics-active-users` | `admin get active-users` |
|
|
74
|
+
| `analytics-feature-usage` | `admin get feature-usage` |
|
|
75
|
+
| `analytics-query` | `admin get analytics-query` |
|
|
76
|
+
| `analytics-top-clicks` | `admin get top-clicks` |
|
|
77
|
+
| `analytics-top-features` | `admin get top-features` |
|
|
78
|
+
| `backfill-supplier-id` | `admin backfill supplier-id` |
|
|
79
|
+
| `convert-currency` | `admin get currency-conversion` |
|
|
80
|
+
| `create-quote-request` | `admin create quote-request` |
|
|
81
|
+
| `create-user` | `admin create user` |
|
|
82
|
+
| `designer-create-collection` | `designer create collection` |
|
|
83
|
+
| `designer-download-document` | `designer download document` |
|
|
84
|
+
| `designer-link-product-to-collection` | `designer set product-collection` |
|
|
85
|
+
| `designer-upload-document` | `designer upload document` |
|
|
86
|
+
| `designer-upsert-product` | `designer create product` |
|
|
87
|
+
| `download-document` | `admin download document` |
|
|
88
|
+
| `download-product-document` | `admin download product-document` |
|
|
89
|
+
| `extract-ai-tech-spec` | `admin get tech-spec-extraction` |
|
|
90
|
+
| `get-cumulative-payment-and-platform-revenue` | `admin get revenue-metrics` |
|
|
91
|
+
| `get-supplier-links-by-supplier-id` | `admin list supplier-link` |
|
|
92
|
+
| `get-supplier-profile-schema` | `admin get supplier-profile-schema` |
|
|
93
|
+
| `library-create` | `admin create library-element` |
|
|
94
|
+
| `library-delete` | `admin delete library-element` |
|
|
95
|
+
| `library-list` | `admin list library-element` |
|
|
96
|
+
| `library-schema` | `admin get library-schema` |
|
|
97
|
+
| `library-update` | `admin update library-element` |
|
|
98
|
+
| `list-all-production-orders` | `admin list production-order` |
|
|
99
|
+
| `list-all-restock-orders` | `admin list restock-order` |
|
|
100
|
+
| `list-all-sampling-orders` | `admin list sampling-order` |
|
|
101
|
+
| `list-all-shipping-orders` | `admin list shipping-order` |
|
|
102
|
+
| `list-misc-payments-by-product` | `admin list misc-payment` |
|
|
103
|
+
| `list-product-orders` | `admin list product-order` |
|
|
104
|
+
| `list-suppliers` | `admin list supplier` |
|
|
105
|
+
| `list-users` | `admin list user` |
|
|
106
|
+
| `production-groups-generate` | `admin generate pricing-groups` |
|
|
107
|
+
| `production-groups-set` | `admin set pricing-groups` |
|
|
108
|
+
| `production-pricing-show` | `admin get production-pricing` |
|
|
109
|
+
| `production-tiers-set` | `admin set production-tiers` |
|
|
110
|
+
| `production-variants-set` | `admin set production-variants` |
|
|
111
|
+
| `save-product-tech-spec` | `admin update tech-spec` |
|
|
112
|
+
| `send-email` | `admin send email` |
|
|
113
|
+
| `submit-supplier-quote` | `admin submit quote` |
|
|
114
|
+
| `update-quote-request` | `admin update quote-request` |
|
|
115
|
+
| `update-supplier` | `admin update supplier` |
|
|
116
|
+
| `update-supplier-quote` | `admin update quote` |
|
|
117
|
+
| `update-user-profile` | `admin update user` |
|
|
118
|
+
| `upload-financial-documents` | `admin upload financial-document` |
|
|
119
|
+
| `upload-link-document` | `admin upload link-document` |
|
|
120
|
+
| `upload-product-document` | `admin upload product-document` |
|
|
121
|
+
| `upload-production-order-document` | `admin upload production-order-document` |
|
|
122
|
+
| `upload-production-progress-document` | `admin upload production-progress-document` |
|
|
123
|
+
| `upload-sampling-order-document` | `admin upload sampling-order-document` |
|
|
124
|
+
| `upload-supplier-document` | `admin upload supplier-document` |
|
|
125
|
+
|
|
126
|
+
### Merged
|
|
127
|
+
|
|
128
|
+
These four became flags on a single command, because they were the same read with a different filter:
|
|
129
|
+
|
|
130
|
+
| 0.1 | 0.2 |
|
|
131
|
+
|---|---|
|
|
132
|
+
| `list-sampling-orders-by-product <id>` | `admin list sampling-order --product <id>` |
|
|
133
|
+
| `list-production-orders-by-product <id>` | `admin list production-order --product <id>` |
|
|
134
|
+
| `get-quote-requests <id>` | `admin list quote-request (and admin get quote-request <id> for one)` |
|
|
135
|
+
| `get-quote-requests-by-supplier-id <id>` | `admin list quote-request --supplier <id>` |
|
|
136
|
+
|
|
137
|
+
### Compatibility notes
|
|
138
|
+
|
|
139
|
+
- `typer` is pinned to `<0.25`. From 0.25 typer vendors its own copy of click, so a `TyperGroup`
|
|
140
|
+
is no longer a `click.Group` and the shared switches above cannot be attached to it. Lifting the
|
|
141
|
+
ceiling means reworking `makea_cli/main.py` at the same time.
|
|
142
|
+
- The npm wrapper is unchanged: it still forwards to `python3 -m makea_cli` and now propagates the
|
|
143
|
+
new exit codes.
|
|
144
|
+
|