makea-cli 0.2.26__tar.gz → 0.2.28__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.2.26 → makea_cli-0.2.28}/CHANGELOG.md +36 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/PKG-INFO +10 -3
- {makea_cli-0.2.26 → makea_cli-0.2.28}/README.md +5 -2
- makea_cli-0.2.28/makea_cli/__init__.py +1 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/api_client.py +7 -2
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/__init__.py +2 -0
- makea_cli-0.2.28/makea_cli/commands/files/cmd.py +84 -0
- makea_cli-0.2.28/makea_cli/commands/tasks/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/tasks/cmd.py +53 -15
- makea_cli-0.2.28/makea_cli/file_reader.py +1236 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/pyproject.toml +7 -1
- {makea_cli-0.2.26 → makea_cli-0.2.28}/tests/golden_manifest.json +161 -6
- makea_cli-0.2.28/tests/test_file_reader.py +225 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/tests/test_persona_commands.py +20 -1
- makea_cli-0.2.28/uv.lock +471 -0
- makea_cli-0.2.26/makea_cli/__init__.py +0 -1
- makea_cli-0.2.26/uv.lock +0 -220
- {makea_cli-0.2.26 → makea_cli-0.2.28}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/.claude/skills/link-supplier-user/SKILL.md +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/.gitignore +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea-collection-upload/SKILL.md +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea-collection-upload/scripts/create_products.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/__main__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/auth_pkce.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/broker.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/_util.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/about/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/about/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/analytics/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/analytics/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/auth/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/auth/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/brand/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/brand/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/designer/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/designer/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/directory/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/directory/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/document/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/document/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/email/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/email/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/factory/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/factory/cmd.py +0 -0
- {makea_cli-0.2.26/makea_cli/commands/flags → makea_cli-0.2.28/makea_cli/commands/files}/__init__.py +0 -0
- {makea_cli-0.2.26/makea_cli/commands/library → makea_cli-0.2.28/makea_cli/commands/flags}/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/flags/cmd.py +0 -0
- {makea_cli-0.2.26/makea_cli/commands/metrics → makea_cli-0.2.28/makea_cli/commands/library}/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/library/cmd.py +0 -0
- {makea_cli-0.2.26/makea_cli/commands/playbook → makea_cli-0.2.28/makea_cli/commands/metrics}/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/metrics/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/orders/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/orders/cmd.py +0 -0
- {makea_cli-0.2.26/makea_cli/commands/shipping → makea_cli-0.2.28/makea_cli/commands/playbook}/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/playbook/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/product/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/product/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/production/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/production/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/production/pricing_spec.py +0 -0
- {makea_cli-0.2.26/makea_cli/commands/tasks → makea_cli-0.2.28/makea_cli/commands/shipping}/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/shipping/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/supplier/__init__.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/commands/supplier/cmd.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/companion.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/config.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/errors.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/identity.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/main.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/output.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/posthog_client.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/makea_cli/registry.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/npm/makea-cli/README.md +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/npm/makea-cli/makea-cli.mjs +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/npm/makea-cli/package.json +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/tests/test_broker.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/tests/test_companion.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/tests/test_currency_conversion.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/tests/test_output_contract.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/tests/test_pm_reads.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/tests/test_registry.py +0 -0
- {makea_cli-0.2.26 → makea_cli-0.2.28}/tests/test_supplier_scorecard.py +0 -0
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.28
|
|
4
|
+
|
|
5
|
+
Read the files brands send that no model reads (TECH-143).
|
|
6
|
+
|
|
7
|
+
`makea-cli designer get file <path>` (also `supplier` and `admin`) reads a file
|
|
8
|
+
on this machine and saves PNG pictures of what it draws next to it. No API call.
|
|
9
|
+
|
|
10
|
+
- Pattern DXF (AAMA/ASTM, Gerber, Optitex, Chinese CAD): every piece with its
|
|
11
|
+
sizes, cut quantity, size, seam allowance, notches and grain line, and a sheet
|
|
12
|
+
of the pieces. Chinese piece names come out right (GBK).
|
|
13
|
+
- RUL grade rules: sizes, sample size, units, the rules.
|
|
14
|
+
- Illustrator: as the PDF it holds, or, when it was saved without PDF content
|
|
15
|
+
(CorelDRAW's AI export), drawn from Illustrator's own data.
|
|
16
|
+
- EPS: header facts and its preview picture. Photoshop: size, layers, picture.
|
|
17
|
+
- Embroidery: PES, DST, EXP, JEF, VP3 and more (size, stitches, threads,
|
|
18
|
+
stitch-out); Wilcom EMB (stitches, threads, fabric, backing, preview).
|
|
19
|
+
- ZIP: every file inside, each read the same way. AVIF, TIFF, BMP: as pictures.
|
|
20
|
+
SVG: size, colours, text.
|
|
21
|
+
- Anything else says what it is and what to export instead.
|
|
22
|
+
|
|
23
|
+
The same reader (`makea_cli.file_reader`) is what the Makea backend uses to read
|
|
24
|
+
these uploads for the tech pack and to preview them.
|
|
25
|
+
|
|
26
|
+
## 0.2.27
|
|
27
|
+
|
|
28
|
+
Notes and misfires on the Makea task queue.
|
|
29
|
+
|
|
30
|
+
- `admin update task <id> --note "…"` alone adds a note (who was asked, what
|
|
31
|
+
the team is waiting on) and leaves the task open.
|
|
32
|
+
- `admin update task <id> --dismiss --wrong --note "…"`: the task should never
|
|
33
|
+
have been raised, and the note says why. On a lesson Beeboo held, its next
|
|
34
|
+
reading of the chats is told and raises nothing on the same message again.
|
|
35
|
+
- `admin list task --wrong`: every task marked wrong, newest first, with why.
|
|
36
|
+
|
|
37
|
+
The same queue is on the admin page under Makea tasks.
|
|
38
|
+
|
|
3
39
|
## 0.2.26
|
|
4
40
|
|
|
5
41
|
The admin page is now the CLI's companion. Every `makea-cli admin …` result
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: makea-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.28
|
|
4
4
|
Summary: Makea admin CLI (browser login + Makea admin HTTP API)
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Requires-Dist: click<9,>=8.1
|
|
7
7
|
Requires-Dist: httpx>=0.27
|
|
8
|
+
Requires-Dist: olefile>=0.47
|
|
9
|
+
Requires-Dist: pillow>=11.3
|
|
8
10
|
Requires-Dist: platformdirs>=4.2
|
|
11
|
+
Requires-Dist: pyembroidery>=1.5
|
|
12
|
+
Requires-Dist: pypdfium2>=4.30
|
|
9
13
|
Requires-Dist: rich>=13.7
|
|
10
14
|
Requires-Dist: typer<0.25,>=0.12
|
|
11
15
|
Description-Content-Type: text/markdown
|
|
@@ -118,6 +122,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
118
122
|
| `makea-cli admin get about` | read | `GET /admin/about/{target}` | one account's About you (`--user`: a supplier account's person gets their factory's page; `--supplier`): facts, removed, unknown, paused, topic keys. | — |
|
|
119
123
|
| `makea-cli admin get active-users` | read | `POST /admin/analytics/query` | Distinct active users per day over the last N days (DAU series). | `analytics-active-users` |
|
|
120
124
|
| `makea-cli admin get analytics-query` | read | `POST /admin/analytics/query` | Run an arbitrary HogQL query (escape hatch). Example: analytics-query "SELECT count() FROM events" | `analytics-query` |
|
|
125
|
+
| `makea-cli admin get file` | read | local (makea_cli.file_reader) | read a pattern (DXF/RUL), artwork (AI/EPS/PSD/SVG), embroidery (PES/DST/EMB), ZIP or AVIF/TIFF file on this machine; saves PNG pictures of what it draws next to it. No API call. | — |
|
|
121
126
|
| `makea-cli admin get currency-conversion` | read | `GET /admin/fx/rates` | the platform's own exchange rates and rounding (rate table for several --from; one --from with --amount converts it). | `convert-currency` |
|
|
122
127
|
| `makea-cli admin get feature-usage` | read | `POST /admin/analytics/query` | How many distinct users used a feature recently, plus event volume. Matches $pageview path and feature_time_spent eve… | `analytics-feature-usage` |
|
|
123
128
|
| `makea-cli admin get growth-snapshot` | read | `GET /admin/growth/snapshots/{id}` | one reconciled Growth Analysis snapshot (default `latest`); `--block` prints one block (headline, gates, review_items, …). | — |
|
|
@@ -152,7 +157,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
152
157
|
| `makea-cli admin list shipping-order` | read | `GET /admin/shipping_orders` | paginated list of all shipping orders (admin). | `list-all-shipping-orders` |
|
|
153
158
|
| `makea-cli admin list supplier` | read | `GET /admin/supplier/get_all_suppliers` | list all suppliers (admin). | `list-suppliers` |
|
|
154
159
|
| `makea-cli admin list supplier-link` | read | `GET /admin/product/linked_suppliers/by_supplier/{supplier_id}` | direct backend query. | `get-supplier-links-by-supplier-id` |
|
|
155
|
-
| `makea-cli admin list task` | read | `GET /admin/tasks` | the Makea team's open tasks (Beeboo's notes, held lessons, sample price flags, PP samples, brand asks) by kind; `--user` adds that account's own `account.*` cards. | — |
|
|
160
|
+
| `makea-cli admin list task` | read | `GET /admin/tasks` | the Makea team's open tasks (Beeboo's notes, held lessons, sample price flags, PP samples, brand asks) by kind, with notes; `--user` adds that account's own `account.*` cards; `--wrong` lists the tasks marked wrong instead. | — |
|
|
156
161
|
| `makea-cli admin list user` | read | `GET /admin/users` | list registered users (admin, optional pagination). | `list-users` |
|
|
157
162
|
| `makea-cli admin send email` | write(ask) | `POST /admin/email/send` | queue an HTML email (To required, Cc optional). From must be @makea.co; HTML from --html-file or stdin ('-'). Require… | `send-email` |
|
|
158
163
|
| `makea-cli admin set pricing-groups` | write(ask) | `POST /admin/production_orders/{id}/details/update` | Set a production order's pricing groups from a JSON file, copy them from the order's quote, or clear them (--clear) t… | `production-groups-set` |
|
|
@@ -175,7 +180,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
175
180
|
| `makea-cli admin update sampling-order` | write(ask) | `PUT /admin/sampling_orders/{sampling_order_id}/status` | move a sampling order to another status (DRAFT, IN_PROGRESS, SAMPLING_COMPLETED, APPROVAL, SHIPPED, DELIVERED, CANCELLED). PAID is recorded by the payment and is refused here. Prefer admin update product-step, which moves the same statuses through the step model. | — |
|
|
176
181
|
| `makea-cli admin update shipping-order` | write(ask) | `PUT /admin/shipping_orders/{shipping_order_id}/status` | Change a shipment: --status (PUT .../status), tracking flags (POST .../tracking), --address (PUT .../shipping-address… | — |
|
|
177
182
|
| `makea-cli admin update supplier` | write(ask) | `PUT /admin/supplier/update_supplier` | update an existing supplier from a JSON file (admin). Run `makea-cli get-supplier-profile-schema` FIRST to get the fi… | `update-supplier` |
|
|
178
|
-
| `makea-cli admin update task` | write(ask) | `POST /admin/tasks/{task_id}/{done\|dismiss}` | close a Makea task with a note: `--done` once handled (a held lesson's `--reason` goes to Beeboo's next reading), or `--dismiss
|
|
183
|
+
| `makea-cli admin update task` | write(ask) | `POST /admin/tasks/{task_id}/{done\|dismiss\|note}` | close a Makea task with a note: `--done` once handled (a held lesson's `--reason` goes to Beeboo's next reading), `--dismiss`, or `--dismiss --wrong` when it should never have been raised; `--note` alone adds a note and leaves it open. | — |
|
|
179
184
|
| `makea-cli admin update tech-spec` | write(ask) | `POST /admin/products/{id}/technical-specifications` | persist specs from a JSON file. | `save-product-tech-spec` |
|
|
180
185
|
| `makea-cli admin update tracking-status` | write(ask) | `POST /admin/tracking/carrier_status` | apply a carrier status looked up by hand (tracking-sweep skill) to one order: status, fan-out, delivered emails (--silent: state only). | — |
|
|
181
186
|
| `makea-cli admin update user` | write(ask) | `PUT /admin/user-profiles/{user_id}/update` | admin updates DynamoDB user profile fields and/or Cognito custom:userType. Allowed --user-type values: "Fashion brand… | `update-user-profile` |
|
|
@@ -202,6 +207,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
202
207
|
| `makea-cli designer delete sampling-order` | write(never) | `DELETE /designer/sampling_orders/{sampling_order_id}` | delete a DRAFT sample order. The backend refuses any other status. Graded `never`. | — |
|
|
203
208
|
| `makea-cli designer delete shipping-order` | write(never) | `POST /designer/shipping_orders/{shipping_order_id}/cancel` | the endpoint is called cancel but it unlinks every production order and removes the shipment, so it is a delete here.… | — |
|
|
204
209
|
| `makea-cli designer download document` | read | `GET /designer/document/download` | save bytes for user_id + document_id (designer-authenticated; same query contract as admin document download). | `designer-download-document` |
|
|
210
|
+
| `makea-cli designer get file` | read | local (makea_cli.file_reader) | read a pattern (DXF/RUL), artwork (AI/EPS/PSD/SVG), embroidery (PES/DST/EMB), ZIP or AVIF/TIFF file on this machine; saves PNG pictures of what it draws next to it. No API call. | — |
|
|
205
211
|
| `makea-cli designer get collection` | read | `GET /designer/collections/{collection_id}/overview` | one collection with its products, orders and lifecycle in a single read. | — |
|
|
206
212
|
| `makea-cli designer get lifecycle` | read | `GET /designer/product_orders/{product_order_id}/lifecycle` | which stage this product is in. | — |
|
|
207
213
|
| `makea-cli designer get product` | read | `GET /designer/get_product` | one product: status, documents, prices, links. | — |
|
|
@@ -245,6 +251,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
245
251
|
|---|---|---|---|---|
|
|
246
252
|
| `makea-cli supplier create note` | write(ask) | `POST /supplier/products/{id}/channels/{key}/notes` | post a message into a product channel you are part of. | — |
|
|
247
253
|
| `makea-cli supplier download document` | read | `GET /supplier/document/download` | save a document you are allowed to read. | — |
|
|
254
|
+
| `makea-cli supplier get file` | read | local (makea_cli.file_reader) | read a pattern (DXF/RUL), artwork (AI/EPS/PSD/SVG), embroidery (PES/DST/EMB), ZIP or AVIF/TIFF file on this machine; saves PNG pictures of what it draws next to it. No API call. | — |
|
|
248
255
|
| `makea-cli supplier get pack` | read | `GET /supplier/quote_requests/{id}/technical-specifications` | the tech pack for an RFQ, as the factory is allowed to see it (`--readable`: labels, values and blank essentials only). | — |
|
|
249
256
|
| `makea-cli supplier get pack-changes` | read | `GET /supplier/products/{product_id}/specification-change-history` | what changed in the pack since you quoted, field by field. | — |
|
|
250
257
|
| `makea-cli supplier get profile` | read | `GET /supplier/profile` | your own supplier profile. | — |
|
|
@@ -106,6 +106,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
106
106
|
| `makea-cli admin get about` | read | `GET /admin/about/{target}` | one account's About you (`--user`: a supplier account's person gets their factory's page; `--supplier`): facts, removed, unknown, paused, topic keys. | — |
|
|
107
107
|
| `makea-cli admin get active-users` | read | `POST /admin/analytics/query` | Distinct active users per day over the last N days (DAU series). | `analytics-active-users` |
|
|
108
108
|
| `makea-cli admin get analytics-query` | read | `POST /admin/analytics/query` | Run an arbitrary HogQL query (escape hatch). Example: analytics-query "SELECT count() FROM events" | `analytics-query` |
|
|
109
|
+
| `makea-cli admin get file` | read | local (makea_cli.file_reader) | read a pattern (DXF/RUL), artwork (AI/EPS/PSD/SVG), embroidery (PES/DST/EMB), ZIP or AVIF/TIFF file on this machine; saves PNG pictures of what it draws next to it. No API call. | — |
|
|
109
110
|
| `makea-cli admin get currency-conversion` | read | `GET /admin/fx/rates` | the platform's own exchange rates and rounding (rate table for several --from; one --from with --amount converts it). | `convert-currency` |
|
|
110
111
|
| `makea-cli admin get feature-usage` | read | `POST /admin/analytics/query` | How many distinct users used a feature recently, plus event volume. Matches $pageview path and feature_time_spent eve… | `analytics-feature-usage` |
|
|
111
112
|
| `makea-cli admin get growth-snapshot` | read | `GET /admin/growth/snapshots/{id}` | one reconciled Growth Analysis snapshot (default `latest`); `--block` prints one block (headline, gates, review_items, …). | — |
|
|
@@ -140,7 +141,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
140
141
|
| `makea-cli admin list shipping-order` | read | `GET /admin/shipping_orders` | paginated list of all shipping orders (admin). | `list-all-shipping-orders` |
|
|
141
142
|
| `makea-cli admin list supplier` | read | `GET /admin/supplier/get_all_suppliers` | list all suppliers (admin). | `list-suppliers` |
|
|
142
143
|
| `makea-cli admin list supplier-link` | read | `GET /admin/product/linked_suppliers/by_supplier/{supplier_id}` | direct backend query. | `get-supplier-links-by-supplier-id` |
|
|
143
|
-
| `makea-cli admin list task` | read | `GET /admin/tasks` | the Makea team's open tasks (Beeboo's notes, held lessons, sample price flags, PP samples, brand asks) by kind; `--user` adds that account's own `account.*` cards. | — |
|
|
144
|
+
| `makea-cli admin list task` | read | `GET /admin/tasks` | the Makea team's open tasks (Beeboo's notes, held lessons, sample price flags, PP samples, brand asks) by kind, with notes; `--user` adds that account's own `account.*` cards; `--wrong` lists the tasks marked wrong instead. | — |
|
|
144
145
|
| `makea-cli admin list user` | read | `GET /admin/users` | list registered users (admin, optional pagination). | `list-users` |
|
|
145
146
|
| `makea-cli admin send email` | write(ask) | `POST /admin/email/send` | queue an HTML email (To required, Cc optional). From must be @makea.co; HTML from --html-file or stdin ('-'). Require… | `send-email` |
|
|
146
147
|
| `makea-cli admin set pricing-groups` | write(ask) | `POST /admin/production_orders/{id}/details/update` | Set a production order's pricing groups from a JSON file, copy them from the order's quote, or clear them (--clear) t… | `production-groups-set` |
|
|
@@ -163,7 +164,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
163
164
|
| `makea-cli admin update sampling-order` | write(ask) | `PUT /admin/sampling_orders/{sampling_order_id}/status` | move a sampling order to another status (DRAFT, IN_PROGRESS, SAMPLING_COMPLETED, APPROVAL, SHIPPED, DELIVERED, CANCELLED). PAID is recorded by the payment and is refused here. Prefer admin update product-step, which moves the same statuses through the step model. | — |
|
|
164
165
|
| `makea-cli admin update shipping-order` | write(ask) | `PUT /admin/shipping_orders/{shipping_order_id}/status` | Change a shipment: --status (PUT .../status), tracking flags (POST .../tracking), --address (PUT .../shipping-address… | — |
|
|
165
166
|
| `makea-cli admin update supplier` | write(ask) | `PUT /admin/supplier/update_supplier` | update an existing supplier from a JSON file (admin). Run `makea-cli get-supplier-profile-schema` FIRST to get the fi… | `update-supplier` |
|
|
166
|
-
| `makea-cli admin update task` | write(ask) | `POST /admin/tasks/{task_id}/{done\|dismiss}` | close a Makea task with a note: `--done` once handled (a held lesson's `--reason` goes to Beeboo's next reading), or `--dismiss
|
|
167
|
+
| `makea-cli admin update task` | write(ask) | `POST /admin/tasks/{task_id}/{done\|dismiss\|note}` | close a Makea task with a note: `--done` once handled (a held lesson's `--reason` goes to Beeboo's next reading), `--dismiss`, or `--dismiss --wrong` when it should never have been raised; `--note` alone adds a note and leaves it open. | — |
|
|
167
168
|
| `makea-cli admin update tech-spec` | write(ask) | `POST /admin/products/{id}/technical-specifications` | persist specs from a JSON file. | `save-product-tech-spec` |
|
|
168
169
|
| `makea-cli admin update tracking-status` | write(ask) | `POST /admin/tracking/carrier_status` | apply a carrier status looked up by hand (tracking-sweep skill) to one order: status, fan-out, delivered emails (--silent: state only). | — |
|
|
169
170
|
| `makea-cli admin update user` | write(ask) | `PUT /admin/user-profiles/{user_id}/update` | admin updates DynamoDB user profile fields and/or Cognito custom:userType. Allowed --user-type values: "Fashion brand… | `update-user-profile` |
|
|
@@ -190,6 +191,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
190
191
|
| `makea-cli designer delete sampling-order` | write(never) | `DELETE /designer/sampling_orders/{sampling_order_id}` | delete a DRAFT sample order. The backend refuses any other status. Graded `never`. | — |
|
|
191
192
|
| `makea-cli designer delete shipping-order` | write(never) | `POST /designer/shipping_orders/{shipping_order_id}/cancel` | the endpoint is called cancel but it unlinks every production order and removes the shipment, so it is a delete here.… | — |
|
|
192
193
|
| `makea-cli designer download document` | read | `GET /designer/document/download` | save bytes for user_id + document_id (designer-authenticated; same query contract as admin document download). | `designer-download-document` |
|
|
194
|
+
| `makea-cli designer get file` | read | local (makea_cli.file_reader) | read a pattern (DXF/RUL), artwork (AI/EPS/PSD/SVG), embroidery (PES/DST/EMB), ZIP or AVIF/TIFF file on this machine; saves PNG pictures of what it draws next to it. No API call. | — |
|
|
193
195
|
| `makea-cli designer get collection` | read | `GET /designer/collections/{collection_id}/overview` | one collection with its products, orders and lifecycle in a single read. | — |
|
|
194
196
|
| `makea-cli designer get lifecycle` | read | `GET /designer/product_orders/{product_order_id}/lifecycle` | which stage this product is in. | — |
|
|
195
197
|
| `makea-cli designer get product` | read | `GET /designer/get_product` | one product: status, documents, prices, links. | — |
|
|
@@ -233,6 +235,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
233
235
|
|---|---|---|---|---|
|
|
234
236
|
| `makea-cli supplier create note` | write(ask) | `POST /supplier/products/{id}/channels/{key}/notes` | post a message into a product channel you are part of. | — |
|
|
235
237
|
| `makea-cli supplier download document` | read | `GET /supplier/document/download` | save a document you are allowed to read. | — |
|
|
238
|
+
| `makea-cli supplier get file` | read | local (makea_cli.file_reader) | read a pattern (DXF/RUL), artwork (AI/EPS/PSD/SVG), embroidery (PES/DST/EMB), ZIP or AVIF/TIFF file on this machine; saves PNG pictures of what it draws next to it. No API call. | — |
|
|
236
239
|
| `makea-cli supplier get pack` | read | `GET /supplier/quote_requests/{id}/technical-specifications` | the tech pack for an RFQ, as the factory is allowed to see it (`--readable`: labels, values and blank essentials only). | — |
|
|
237
240
|
| `makea-cli supplier get pack-changes` | read | `GET /supplier/products/{product_id}/specification-change-history` | what changed in the pack since you quoted, field by field. | — |
|
|
238
241
|
| `makea-cli supplier get profile` | read | `GET /supplier/profile` | your own supplier profile. | — |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.28"
|
|
@@ -1195,8 +1195,12 @@ def admin_list_tasks(
|
|
|
1195
1195
|
type_: str | None = None,
|
|
1196
1196
|
user: str | None = None,
|
|
1197
1197
|
product: str | None = None,
|
|
1198
|
+
wrong: bool = False,
|
|
1198
1199
|
) -> Any:
|
|
1199
|
-
"""GET /admin/tasks — the team's open tasks; filters are comma-separated.
|
|
1200
|
+
"""GET /admin/tasks — the team's open tasks; filters are comma-separated.
|
|
1201
|
+
``wrong``: the tasks the team marked wrong instead, newest first."""
|
|
1202
|
+
if wrong:
|
|
1203
|
+
return get_json("/admin/tasks", params={"wrong": "1"})
|
|
1200
1204
|
params = {
|
|
1201
1205
|
k: v
|
|
1202
1206
|
for k, v in (("kind", kind), ("type", type_), ("user", user), ("product", product))
|
|
@@ -1211,7 +1215,8 @@ def admin_get_task(task_id: str) -> Any:
|
|
|
1211
1215
|
|
|
1212
1216
|
|
|
1213
1217
|
def admin_close_task(task_id: str, verb: str, body: dict[str, Any]) -> Any:
|
|
1214
|
-
"""POST /admin/tasks/{task_id}/{done|dismiss} — {note, reason?, caused_by?,
|
|
1218
|
+
"""POST /admin/tasks/{task_id}/{done|dismiss|note} — {note, reason?, caused_by?,
|
|
1219
|
+
recurs?, wrong?}. ``note`` adds a note and leaves the task open."""
|
|
1215
1220
|
return post_json(f"/admin/tasks/{quote(task_id, safe='')}/{verb}", body)
|
|
1216
1221
|
|
|
1217
1222
|
|
|
@@ -11,6 +11,7 @@ from makea_cli.commands.directory.cmd import register as register_directory
|
|
|
11
11
|
from makea_cli.commands.document.cmd import register as register_document
|
|
12
12
|
from makea_cli.commands.email.cmd import register as register_email
|
|
13
13
|
from makea_cli.commands.factory.cmd import register as register_factory
|
|
14
|
+
from makea_cli.commands.files.cmd import register as register_files
|
|
14
15
|
from makea_cli.commands.flags.cmd import register as register_flags
|
|
15
16
|
from makea_cli.commands.library.cmd import register as register_library
|
|
16
17
|
from makea_cli.commands.metrics.cmd import register as register_metrics
|
|
@@ -38,6 +39,7 @@ def register_all(app: typer.Typer) -> None:
|
|
|
38
39
|
register_email(app)
|
|
39
40
|
register_library(app)
|
|
40
41
|
register_factory(app)
|
|
42
|
+
register_files(app)
|
|
41
43
|
register_brand(app)
|
|
42
44
|
register_playbook(app)
|
|
43
45
|
register_about(app)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""``makea-cli <persona> get file PATH``: read a file a brand sent, locally.
|
|
2
|
+
|
|
3
|
+
Pattern DXF/RUL, Illustrator, EPS, Photoshop, embroidery (PES/DST/EMB), ZIP,
|
|
4
|
+
AVIF/TIFF/SVG. No API call: the file never leaves the machine. Pictures of what
|
|
5
|
+
the file draws are saved next to it so the caller can look at them (an agent
|
|
6
|
+
reads them with its image tool).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import re
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
|
|
14
|
+
import typer
|
|
15
|
+
from rich.console import Console
|
|
16
|
+
|
|
17
|
+
from makea_cli.commands._util import print_json_or_exit
|
|
18
|
+
from makea_cli.file_reader import read_path
|
|
19
|
+
from makea_cli.registry import command
|
|
20
|
+
|
|
21
|
+
console = Console()
|
|
22
|
+
|
|
23
|
+
_HELP = (
|
|
24
|
+
"Read a pattern (DXF/RUL), artwork (AI/EPS/PSD/SVG), embroidery (PES/DST/EMB), ZIP or "
|
|
25
|
+
"AVIF/TIFF file on this machine: what it states plus PNG pictures of what it draws."
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _slug(text: str) -> str:
|
|
30
|
+
return re.sub(r"[^A-Za-z0-9]+", "-", text).strip("-").lower()[:40] or "picture"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def read_file_payload(path: Path, pictures_dir: Path | None) -> dict:
|
|
34
|
+
if not path.is_file():
|
|
35
|
+
raise FileNotFoundError(f"{path} is not a file")
|
|
36
|
+
reading = read_path(str(path))
|
|
37
|
+
out_dir = pictures_dir or path.parent
|
|
38
|
+
saved = []
|
|
39
|
+
pictures = reading.all_pictures()
|
|
40
|
+
if pictures:
|
|
41
|
+
out_dir.mkdir(parents=True, exist_ok=True)
|
|
42
|
+
for i, pic in enumerate(pictures, 1):
|
|
43
|
+
target = out_dir / f"{path.stem}.{i}-{_slug(pic.label)}.png"
|
|
44
|
+
target.write_bytes(pic.png)
|
|
45
|
+
saved.append({"label": pic.label, "path": str(target)})
|
|
46
|
+
payload = {
|
|
47
|
+
"file": str(path),
|
|
48
|
+
"kind": reading.kind,
|
|
49
|
+
"format": reading.format,
|
|
50
|
+
"readable": reading.readable,
|
|
51
|
+
"readout": reading.markdown(),
|
|
52
|
+
"pictures": saved,
|
|
53
|
+
}
|
|
54
|
+
if saved:
|
|
55
|
+
payload["next"] = (
|
|
56
|
+
"Look at each picture to read what it shows; the readout lists only stated facts."
|
|
57
|
+
)
|
|
58
|
+
return payload
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def register(app: typer.Typer) -> None:
|
|
62
|
+
for persona in ("designer", "supplier", "admin"):
|
|
63
|
+
_register_for(app, persona)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _register_for(app: typer.Typer, persona: str) -> None:
|
|
67
|
+
@command(
|
|
68
|
+
app,
|
|
69
|
+
persona,
|
|
70
|
+
"get",
|
|
71
|
+
"file",
|
|
72
|
+
api="LOCAL file_reader",
|
|
73
|
+
external="local",
|
|
74
|
+
help=_HELP,
|
|
75
|
+
)
|
|
76
|
+
def get_file(
|
|
77
|
+
path: Path = typer.Argument(..., help="The file to read."),
|
|
78
|
+
pictures_dir: Path | None = typer.Option(
|
|
79
|
+
None,
|
|
80
|
+
"--pictures-dir",
|
|
81
|
+
help="Where to save the PNG pictures (default: next to the file).",
|
|
82
|
+
),
|
|
83
|
+
) -> None:
|
|
84
|
+
print_json_or_exit(console, lambda: read_file_payload(path, pictures_dir))
|
|
File without changes
|
|
@@ -12,7 +12,10 @@ read as one order's problem), ``note`` (a slip of Makea's or the platform's),
|
|
|
12
12
|
|
|
13
13
|
The change a task asks for is made with the command that owns it (``admin
|
|
14
14
|
create rule``, ``admin update user``, ``admin update about`` …); ``update
|
|
15
|
-
task --done`` then records that it was handled.
|
|
15
|
+
task --done`` then records that it was handled. ``update task --note`` alone
|
|
16
|
+
adds a note and leaves the task open; ``--dismiss --wrong`` says the task
|
|
17
|
+
should never have been raised (Beeboo's next reading is told, and ``list
|
|
18
|
+
task --wrong`` lists every such task). Only notes the team handles
|
|
16
19
|
off the platform can be marked done; the others close by themselves when the
|
|
17
20
|
fact behind them lands, and ``get task`` says which fact.
|
|
18
21
|
"""
|
|
@@ -44,6 +47,10 @@ Examples
|
|
|
44
47
|
makea-cli admin update task <task_id> --done --note "Asked the brand on WhatsApp" \\
|
|
45
48
|
--reason "The brand changed the cuff after approval" --caused-by brand --once
|
|
46
49
|
makea-cli admin update task <task_id> --dismiss --note "Brand keeps GBP"
|
|
50
|
+
makea-cli admin update task <task_id> --note "Asked the brand, waiting"
|
|
51
|
+
makea-cli admin update task <task_id> --dismiss --wrong \
|
|
52
|
+
--note "The factory was confirming the file, not reporting a mistake"
|
|
53
|
+
makea-cli admin list task --wrong
|
|
47
54
|
""".strip()
|
|
48
55
|
|
|
49
56
|
|
|
@@ -56,8 +63,9 @@ def register(app: typer.Typer) -> None:
|
|
|
56
63
|
api="GET /admin/tasks",
|
|
57
64
|
help=(
|
|
58
65
|
"GET /admin/tasks — the Makea team's open tasks: task_id, type, kind, title, "
|
|
59
|
-
"owner (the account), product, due date, can_mark_done; counts by kind. "
|
|
60
|
-
"--user adds that account's own cards the team may settle (account.*)."
|
|
66
|
+
"owner (the account), product, due date, can_mark_done, notes; counts by kind. "
|
|
67
|
+
"--user adds that account's own cards the team may settle (account.*). "
|
|
68
|
+
"--wrong lists the tasks the team marked wrong instead, newest first."
|
|
61
69
|
),
|
|
62
70
|
epilog=_TASKS_EPILOG,
|
|
63
71
|
)
|
|
@@ -72,11 +80,18 @@ def register(app: typer.Typer) -> None:
|
|
|
72
80
|
None, "--user", "-u", help="One account: user_id or email."
|
|
73
81
|
),
|
|
74
82
|
product: str | None = typer.Option(None, "--product", "-p", help="One product id."),
|
|
83
|
+
wrong: bool = typer.Option(
|
|
84
|
+
False, "--wrong", help="The tasks marked wrong (closed), with why, newest first."
|
|
85
|
+
),
|
|
75
86
|
) -> None:
|
|
76
|
-
"""List the Makea team's open tasks."""
|
|
87
|
+
"""List the Makea team's open tasks, or the ones marked wrong."""
|
|
88
|
+
if wrong and (kind or type_ or user or product):
|
|
89
|
+
raise typer.BadParameter("--wrong takes no filters")
|
|
77
90
|
print_json_or_exit(
|
|
78
91
|
console,
|
|
79
|
-
lambda: api_client.admin_list_tasks(
|
|
92
|
+
lambda: api_client.admin_list_tasks(
|
|
93
|
+
kind=kind, type_=type_, user=user, product=product, wrong=wrong
|
|
94
|
+
),
|
|
80
95
|
)
|
|
81
96
|
|
|
82
97
|
@command(
|
|
@@ -101,19 +116,23 @@ def register(app: typer.Typer) -> None:
|
|
|
101
116
|
"admin",
|
|
102
117
|
"update",
|
|
103
118
|
"task",
|
|
104
|
-
api="POST /admin/tasks/{task_id}/{done|dismiss}",
|
|
119
|
+
api="POST /admin/tasks/{task_id}/{done|dismiss|note}",
|
|
105
120
|
side_effects=[
|
|
106
|
-
"closes the task for the whole Makea team",
|
|
121
|
+
"with --done or --dismiss, closes the task for the whole Makea team",
|
|
122
|
+
"with --note alone, adds a note the team sees; the task stays open",
|
|
107
123
|
"with --reason, Beeboo's next reading of the chats uses that reason",
|
|
124
|
+
"with --wrong, Beeboo's next reading is told the finding was wrong",
|
|
108
125
|
],
|
|
109
126
|
approval="ask",
|
|
110
127
|
reversible=False,
|
|
111
128
|
idempotent=False,
|
|
112
129
|
help=(
|
|
113
|
-
"POST /admin/tasks/{task_id}/{done|dismiss} — close a task: --done once
|
|
114
|
-
"handled (notes the team handles off the platform only), --dismiss when
|
|
115
|
-
"will not be done
|
|
116
|
-
"
|
|
130
|
+
"POST /admin/tasks/{task_id}/{done|dismiss|note} — close a task: --done once "
|
|
131
|
+
"it is handled (notes the team handles off the platform only), --dismiss when "
|
|
132
|
+
"it will not be done, --dismiss --wrong when it should never have been raised "
|
|
133
|
+
"(the note says why). --note required; --note alone adds a note and leaves the "
|
|
134
|
+
"task open. On a held lesson, --reason records why it happened for Beeboo's "
|
|
135
|
+
"next reading."
|
|
117
136
|
),
|
|
118
137
|
epilog=_TASKS_EPILOG,
|
|
119
138
|
)
|
|
@@ -121,7 +140,17 @@ def register(app: typer.Typer) -> None:
|
|
|
121
140
|
task_id: str = typer.Argument(..., help="Task id (from list task)."),
|
|
122
141
|
done: bool = typer.Option(False, "--done", help="It was handled."),
|
|
123
142
|
dismiss: bool = typer.Option(False, "--dismiss", help="It will not be done."),
|
|
124
|
-
|
|
143
|
+
wrong: bool = typer.Option(
|
|
144
|
+
False,
|
|
145
|
+
"--wrong",
|
|
146
|
+
help="With --dismiss: it should never have been raised; --note says why.",
|
|
147
|
+
),
|
|
148
|
+
note: str = typer.Option(
|
|
149
|
+
...,
|
|
150
|
+
"--note",
|
|
151
|
+
"-n",
|
|
152
|
+
help="What was done, or why not (required). Alone: a note; the task stays open.",
|
|
153
|
+
),
|
|
125
154
|
reason: str | None = typer.Option(
|
|
126
155
|
None,
|
|
127
156
|
"--reason",
|
|
@@ -136,13 +165,22 @@ def register(app: typer.Typer) -> None:
|
|
|
136
165
|
help="With --reason: it will happen again, or it was this order only.",
|
|
137
166
|
),
|
|
138
167
|
) -> None:
|
|
139
|
-
"""Mark a task done, or
|
|
140
|
-
if done
|
|
141
|
-
raise typer.BadParameter("pass
|
|
168
|
+
"""Mark a task done, dismiss it, or add a note."""
|
|
169
|
+
if done and dismiss:
|
|
170
|
+
raise typer.BadParameter("pass at most one of --done, --dismiss")
|
|
171
|
+
if wrong and not dismiss:
|
|
172
|
+
raise typer.BadParameter("--wrong goes with --dismiss")
|
|
142
173
|
clean_note = " ".join(note.split())
|
|
143
174
|
if not clean_note:
|
|
144
175
|
raise typer.BadParameter("--note must not be empty")
|
|
145
176
|
body: dict[str, Any] = {"note": clean_note}
|
|
177
|
+
if not (done or dismiss):
|
|
178
|
+
if reason is not None or caused_by is not None or recurs is not None:
|
|
179
|
+
raise typer.BadParameter("--reason, --caused-by, --recurs/--once go with --done")
|
|
180
|
+
print_json_or_exit(console, lambda: api_client.admin_close_task(task_id, "note", body))
|
|
181
|
+
return
|
|
182
|
+
if wrong:
|
|
183
|
+
body["wrong"] = True
|
|
146
184
|
if reason is not None:
|
|
147
185
|
if not done:
|
|
148
186
|
raise typer.BadParameter("--reason goes with --done")
|