makea-cli 0.2.19__tar.gz → 0.2.21__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.19 → makea_cli-0.2.21}/CHANGELOG.md +39 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/PKG-INFO +14 -6
- {makea_cli-0.2.19 → makea_cli-0.2.21}/README.md +13 -5
- makea_cli-0.2.21/makea_cli/__init__.py +1 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/api_client.py +106 -25
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/__init__.py +4 -0
- makea_cli-0.2.21/makea_cli/commands/about/cmd.py +253 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/directory/cmd.py +13 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/playbook/cmd.py +157 -44
- makea_cli-0.2.21/makea_cli/commands/shipping/__init__.py +0 -0
- makea_cli-0.2.21/makea_cli/commands/tasks/__init__.py +0 -0
- makea_cli-0.2.21/makea_cli/commands/tasks/cmd.py +159 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/pyproject.toml +1 -1
- {makea_cli-0.2.19 → makea_cli-0.2.21}/tests/golden_manifest.json +783 -29
- {makea_cli-0.2.19 → makea_cli-0.2.21}/tests/test_persona_commands.py +142 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/uv.lock +1 -1
- makea_cli-0.2.19/makea_cli/__init__.py +0 -1
- {makea_cli-0.2.19 → makea_cli-0.2.21}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/.claude/skills/link-supplier-user/SKILL.md +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/.gitignore +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea-collection-upload/SKILL.md +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea-collection-upload/scripts/create_products.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/__main__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/auth_pkce.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/broker.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/_util.py +0 -0
- {makea_cli-0.2.19/makea_cli/commands/analytics → makea_cli-0.2.21/makea_cli/commands/about}/__init__.py +0 -0
- {makea_cli-0.2.19/makea_cli/commands/brand → makea_cli-0.2.21/makea_cli/commands/analytics}/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/analytics/cmd.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/auth/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/auth/cmd.py +0 -0
- {makea_cli-0.2.19/makea_cli/commands/factory → makea_cli-0.2.21/makea_cli/commands/brand}/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/brand/cmd.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/designer/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/designer/cmd.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/directory/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/document/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/document/cmd.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/email/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/email/cmd.py +0 -0
- {makea_cli-0.2.19/makea_cli/commands/library → makea_cli-0.2.21/makea_cli/commands/factory}/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/factory/cmd.py +0 -0
- {makea_cli-0.2.19/makea_cli/commands/metrics → makea_cli-0.2.21/makea_cli/commands/library}/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/library/cmd.py +0 -0
- {makea_cli-0.2.19/makea_cli/commands/playbook → makea_cli-0.2.21/makea_cli/commands/metrics}/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/metrics/cmd.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/orders/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/orders/cmd.py +0 -0
- {makea_cli-0.2.19/makea_cli/commands/shipping → makea_cli-0.2.21/makea_cli/commands/playbook}/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/product/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/product/cmd.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/production/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/production/cmd.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/production/pricing_spec.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/shipping/cmd.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/supplier/__init__.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/commands/supplier/cmd.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/config.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/errors.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/identity.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/main.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/output.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/posthog_client.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/makea_cli/registry.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/npm/makea-cli/README.md +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/npm/makea-cli/makea-cli.mjs +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/npm/makea-cli/package.json +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/tests/test_broker.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/tests/test_currency_conversion.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/tests/test_output_contract.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/tests/test_pm_reads.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/tests/test_registry.py +0 -0
- {makea_cli-0.2.19 → makea_cli-0.2.21}/tests/test_supplier_scorecard.py +0 -0
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.21
|
|
4
|
+
|
|
5
|
+
New: the Makea team's task queue. Needs the backend from the same day
|
|
6
|
+
(`/admin/tasks`).
|
|
7
|
+
|
|
8
|
+
- `admin list task [--kind …] [--user …] [--product …]`: open Makea tasks by
|
|
9
|
+
kind: `unknown` (a lesson Beeboo held because nobody said why), `once` (read
|
|
10
|
+
as one order's problem), `note` (a slip of Makea's or the platform's),
|
|
11
|
+
`sample_price`, `pp_sample`, `brand_ask`; with `--user`, that account's own
|
|
12
|
+
cards the team may settle (`setting`).
|
|
13
|
+
- `admin get task <id>`: one task with what settles it, and for a held lesson
|
|
14
|
+
the finding behind it.
|
|
15
|
+
- `admin update task <id> --done | --dismiss --note …`: close it. On a held
|
|
16
|
+
lesson, `--reason … [--caused-by …] [--recurs | --once]` records what the
|
|
17
|
+
team found out, and Beeboo's next reading of the chats uses it. A task
|
|
18
|
+
marked done stays closed when the nightly reading raises the same fact.
|
|
19
|
+
- `admin update user --billing-currency GBP`: the account's billing currency;
|
|
20
|
+
closes a "Set your billing currency" card.
|
|
21
|
+
|
|
22
|
+
## 0.2.20
|
|
23
|
+
|
|
24
|
+
New: rules for a factory and for the whole platform, and an account's About
|
|
25
|
+
you. Needs the backend from 7c6460f8.
|
|
26
|
+
|
|
27
|
+
- `admin list / get / create / update / delete rule` take one target:
|
|
28
|
+
`--user` as before, `--supplier <supplier_id>` for one factory's playbook
|
|
29
|
+
(no user needed), or `--global` for the platform-wide playbook every
|
|
30
|
+
account's AI reads (at most 30 live rules; an add or a restore past that is
|
|
31
|
+
refused). Same rules everywhere: a reason on every write, the duplicate and
|
|
32
|
+
conflict check, evidence and audit. `--scope` only applies with `--user`.
|
|
33
|
+
- `admin get about --user | --supplier`: an account's Knowledge > About you
|
|
34
|
+
(a supplier account's person gets their factory's page). Does not recount.
|
|
35
|
+
- `admin update about <key> --text … --reason …` adds or rewords a line, which
|
|
36
|
+
then stands as the account's own words; `--restore` brings a removed one
|
|
37
|
+
back. `admin delete about <key>` removes one (not guessed again).
|
|
38
|
+
`admin update about-pause [--resume]` stops or restarts Beeboo using it.
|
|
39
|
+
- `admin generate about [--read [--force]]`: recount now instead of at the
|
|
40
|
+
nightly pass; `--read` also reads the conversations (one model call).
|
|
41
|
+
|
|
3
42
|
## 0.2.19
|
|
4
43
|
|
|
5
44
|
- `admin create rule` and `admin update rule` take `--valid-until YYYY-MM-DD`:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: makea-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.21
|
|
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
|
|
@@ -92,21 +92,24 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
92
92
|
| `makea-cli admin backfill supplier-id` | write(never) | `POST /admin/supplier/backfill_supplier_id_with_quote_requests` | Migrate supplier_id from a wrong UUID to the Cognito user sub (user_id): profile + Cognito supplierReferenceId, optio… | `backfill-supplier-id` |
|
|
93
93
|
| `makea-cli admin create library-element` | write(auto) | `POST /admin/designer/{user_id}/library_components` | save a reusable component under a designer. Provide --section and --values (see admin get library-schema). | `library-create` |
|
|
94
94
|
| `makea-cli admin create quote-request` | write(ask) | `POST /admin/supplier/create_quote_request` | create/send a quote request to a supplier for a product (admin). | `create-quote-request` |
|
|
95
|
-
| `makea-cli admin create rule` | write(ask) | `POST /admin/playbook/
|
|
95
|
+
| `makea-cli admin create rule` | write(ask) | `POST /admin/playbook/{target}/rules` | add a rule to a person's (`--user`, user_id or email), a factory's (`--supplier`) or the platform-wide (`--global`, max 30 live) AI playbook; admin-authored, active unless --status. Refuses a repeat or a conflict unless --force. --reason required. | — |
|
|
96
96
|
| `makea-cli admin create shipping-fee` | write(ask) | `POST /admin/shipping_orders/{shipping_order_id}/fees/add` | add a fee (fixed amount or percentage) on top of the freight. | — |
|
|
97
97
|
| `makea-cli admin create shipping-option` | write(ask) | `POST /admin/shipping_orders/{shipping_order_id}/shipping-options` | add one freight quote (provider, speed, price, currency). | — |
|
|
98
98
|
| `makea-cli admin create shipping-order` | write(ask) | `POST /admin/shipping_orders/create` | make a shipment for a brand's production and/or sampling orders. The shipment belongs to the orders' owner; you are r… | — |
|
|
99
99
|
| `makea-cli admin create supplier` | write(ask) | `POST /admin/supplier/add_supplier` | create supplier from JSON file (admin). Run `makea-cli get-supplier-profile-schema` FIRST to get the field taxonomy (… | `add-supplier` |
|
|
100
100
|
| `makea-cli admin create user` | write(never) | `POST /admin/users/create` | register a user and confirm the Cognito account in one step (no verification email). Allowed --user-type values: "Fas… | `create-user` |
|
|
101
|
+
| `makea-cli admin delete about` | write(ask) | `DELETE /admin/about/{target}/{key}` | remove one About you line (`--user` / `--supplier`); it is not guessed again. --reason required. | — |
|
|
101
102
|
| `makea-cli admin delete library-element` | write(never) | `DELETE /admin/designer/{user_id}/library_components/{component_id}` | remove a component from the designer's org library. | `library-delete` |
|
|
102
|
-
| `makea-cli admin delete rule` | write(ask) | `DELETE /admin/playbook/
|
|
103
|
+
| `makea-cli admin delete rule` | write(ask) | `DELETE /admin/playbook/{target}/rules/{rule_id}` | remove a rule (`--user` / `--supplier` / `--global`): archived, with who and why kept on it (`update rule --status active` restores it). --reason required. | — |
|
|
103
104
|
| `makea-cli admin delete shipping-fee` | write(ask) | `DELETE /admin/shipping_orders/{shipping_order_id}/fees/{fee_id}/remove` | remove one fee. | — |
|
|
104
105
|
| `makea-cli admin delete shipping-option` | write(ask) | `DELETE /admin/shipping_orders/{shipping_order_id}/shipping-options/{shipping_option_id}/remove` | withdraw one freight quote. | — |
|
|
105
106
|
| `makea-cli admin delete shipping-order` | write(never) | `DELETE /admin/shipping_orders/{shipping_order_id}/delete` | remove a shipment and free its orders. Graded `never`: the backend does not check status, so it removes a paid or in-transit shipment too. | — |
|
|
106
107
|
| `makea-cli admin delete shipping-order-item` | write(ask) | `POST /admin/production_orders/{id}/unlink_from_shipping_order/{shipping_order_id}` | take one production or sampling order off a shipment. A shipment left empty is deleted. | — |
|
|
107
108
|
| `makea-cli admin download document` | read | `GET /admin/document/download` | save a document file (document id + designer user_id). | `download-document` |
|
|
108
109
|
| `makea-cli admin download product-document` | read | `GET /admin/document/download` | Resolve product via admin list product-order payload, then GET /admin/document/download. | `download-product-document` |
|
|
110
|
+
| `makea-cli admin generate about` | write(auto) | `POST /admin/about/{target}/refresh` | recount an account's About you now; `--read` also reads its conversations (one model call). | — |
|
|
109
111
|
| `makea-cli admin generate pricing-groups` | write(ask) | `POST /admin/production_orders/{id}/details/update` | Lay a production order's variants into pricing groups along one axis (--by style \| colour \| variant \| all) with th… | `production-groups-generate` |
|
|
112
|
+
| `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. | — |
|
|
110
113
|
| `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` |
|
|
111
114
|
| `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` |
|
|
112
115
|
| `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` |
|
|
@@ -116,10 +119,11 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
116
119
|
| `makea-cli admin get production-pricing` | read | `GET /admin/production_orders/{id}/details` | show a production order's price tiers, MOQ, sizes/colours, pricing groups and cart coverage. | `production-pricing-show` |
|
|
117
120
|
| `makea-cli admin get quote-request` | read | `GET /admin/quote_requests/{quote_request_id}` | one quote request in full. | — |
|
|
118
121
|
| `makea-cli admin get revenue-metrics` | read | `GET /admin/business-metrics/cumulative-payment-and-platform-revenue` | platform-wide payment received and platform revenue (service fee + transaction fee) bucketed over a date range. | `get-cumulative-payment-and-platform-revenue` |
|
|
119
|
-
| `makea-cli admin get rule` | read | `GET /admin/playbook/
|
|
122
|
+
| `makea-cli admin get rule` | read | `GET /admin/playbook/{target}/rules/{rule_id}` | one rule in full (`--user` / `--supplier` / `--global`), with its evidence: where it came from, who changed it and why. | — |
|
|
120
123
|
| `makea-cli admin get rule-history` | read | `GET /admin/playbook/rules/{rule_id}/history` | every revision of one rule: its words, who changed it and why, and the rule that replaced it. | — |
|
|
121
124
|
| `makea-cli admin get shipping-order` | read | `GET /admin/shipping_orders/{shipping_order_id}/details` | one shipment with its production and sampling orders, freight quotes, fees, tracking and address. | — |
|
|
122
125
|
| `makea-cli admin get supplier-profile-schema` | read | `GET /admin/supplier/profile/schema` | supplier profile v2 schema (section/field taxonomy: sections, fields, options, required rules). | `get-supplier-profile-schema` |
|
|
126
|
+
| `makea-cli admin get task` | read | `GET /admin/tasks/{task_id}` | one Makea task in full: body, admin link, what settles it, and for a held lesson the finding Beeboo kept. | — |
|
|
123
127
|
| `makea-cli admin get tech-spec-extraction` | read | `GET /admin/products/{id}/extract-tech-specifications` | AI-generate specs (not saved). | `extract-ai-tech-spec` |
|
|
124
128
|
| `makea-cli admin get top-clicks` | read | `POST /admin/analytics/query` | which buttons/elements get clicked most. | `analytics-top-clicks` |
|
|
125
129
|
| `makea-cli admin get top-features` | read | `POST /admin/analytics/query` | a quick map of which features get used most. | `analytics-top-features` |
|
|
@@ -129,23 +133,27 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
129
133
|
| `makea-cli admin list production-order` | read | `GET /admin/production_orders?type=PRODUCTION` | 大货 (production) orders only. For restock use admin list restock-order; for shipping use admin list shipping-order. | `list-all-production-orders` |
|
|
130
134
|
| `makea-cli admin list quote-request` | read | `GET /admin/quote_requests` | quote requests, optionally for one product (--product) or one supplier (--supplier, GET /admin/quote_requests/supplie… | — |
|
|
131
135
|
| `makea-cli admin list restock-order` | read | `GET /admin/production_orders?type=RESTOCK` | restock orders only. Restock shares the production_orders table; this filters to type=RESTOCK. | `list-all-restock-orders` |
|
|
132
|
-
| `makea-cli admin list rule` | read | `GET /admin/playbook/
|
|
136
|
+
| `makea-cli admin list rule` | read | `GET /admin/playbook/{target}/rules` | every AI playbook rule for one person (team, own account, factory), one factory (`--supplier`) or the platform (`--global`): status, scope, text, which products, effect, source. Archived ones only with --all. | — |
|
|
133
137
|
| `makea-cli admin list sampling-order` | read | `GET /admin/sampling_orders/get_all` | paginated list of all sampling orders (admin). | `list-all-sampling-orders` |
|
|
134
138
|
| `makea-cli admin list shipping-order` | read | `GET /admin/shipping_orders` | paginated list of all shipping orders (admin). | `list-all-shipping-orders` |
|
|
135
139
|
| `makea-cli admin list supplier` | read | `GET /admin/supplier/get_all_suppliers` | list all suppliers (admin). | `list-suppliers` |
|
|
136
140
|
| `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` |
|
|
141
|
+
| `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. | — |
|
|
137
142
|
| `makea-cli admin list user` | read | `GET /admin/users` | list registered users (admin, optional pagination). | `list-users` |
|
|
138
143
|
| `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` |
|
|
139
144
|
| `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` |
|
|
140
145
|
| `makea-cli admin set production-tiers` | write(ask) | `POST /admin/production_orders/{id}/details/update` | Set the order-wide price tiers / MOQ / incoterm / currency on a production order (the schedule used when it has no pr… | `production-tiers-set` |
|
|
141
146
|
| `makea-cli admin set production-variants` | write(ask) | `POST /admin/production_orders/{id}/details/update` | Set a production order's available sizes and colours (the grid the buyer's cart and every pricing group's cart keys a… | `production-variants-set` |
|
|
142
147
|
| `makea-cli admin submit quote` | write(ask) | `POST /admin/quote_requests/{quote_request_id}/submit_quote` | admin submits a new quote (link) to a quote request. Pricing groups cannot be sent here (the submit endpoint ignores … | `submit-supplier-quote` |
|
|
148
|
+
| `makea-cli admin update about` | write(ask) | `PATCH /admin/about/{target}/{key}` | add or reword one About you line (stands as the account's own words); `--restore` brings a removed one back. --reason required. | — |
|
|
149
|
+
| `makea-cli admin update about-pause` | write(ask) | `POST /admin/about/{target}/pause` | stop (or `--resume`) Beeboo using an account's About you. --reason required. | — |
|
|
143
150
|
| `makea-cli admin update library-element` | write(auto) | `PATCH /admin/designer/{user_id}/library_components/{component_id}` | update a component's name and/or values (empty value clears a field). | `library-update` |
|
|
144
151
|
| `makea-cli admin update quote` | write(ask) | `POST /admin/product/edit_supplier_link_override_info` | admin updates an existing quote (supplier link) in place. Only the options you pass are sent, and the backend leaves … | `update-supplier-quote` |
|
|
145
152
|
| `makea-cli admin update quote-request` | write(ask) | `PATCH /admin/quote_requests/{quote_request_id}/update` | set a quote request's stage, status and/or due date. Only what you pass is changed. This is the door that unblocks a … | `update-quote-request` |
|
|
146
|
-
| `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/
|
|
153
|
+
| `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/{target}/rules/{rule_id}` | change a rule's text, status, applies_to, when, mode or end date (--valid-until), on `--user` / `--supplier` / `--global`. --reason required; the rule keeps what it was before. | — |
|
|
147
154
|
| `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… | — |
|
|
148
155
|
| `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` |
|
|
156
|
+
| `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`. | — |
|
|
149
157
|
| `makea-cli admin update tech-spec` | write(ask) | `POST /admin/products/{id}/technical-specifications` | persist specs from a JSON file. | `save-product-tech-spec` |
|
|
150
158
|
| `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). | — |
|
|
151
159
|
| `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` |
|
|
@@ -80,21 +80,24 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
80
80
|
| `makea-cli admin backfill supplier-id` | write(never) | `POST /admin/supplier/backfill_supplier_id_with_quote_requests` | Migrate supplier_id from a wrong UUID to the Cognito user sub (user_id): profile + Cognito supplierReferenceId, optio… | `backfill-supplier-id` |
|
|
81
81
|
| `makea-cli admin create library-element` | write(auto) | `POST /admin/designer/{user_id}/library_components` | save a reusable component under a designer. Provide --section and --values (see admin get library-schema). | `library-create` |
|
|
82
82
|
| `makea-cli admin create quote-request` | write(ask) | `POST /admin/supplier/create_quote_request` | create/send a quote request to a supplier for a product (admin). | `create-quote-request` |
|
|
83
|
-
| `makea-cli admin create rule` | write(ask) | `POST /admin/playbook/
|
|
83
|
+
| `makea-cli admin create rule` | write(ask) | `POST /admin/playbook/{target}/rules` | add a rule to a person's (`--user`, user_id or email), a factory's (`--supplier`) or the platform-wide (`--global`, max 30 live) AI playbook; admin-authored, active unless --status. Refuses a repeat or a conflict unless --force. --reason required. | — |
|
|
84
84
|
| `makea-cli admin create shipping-fee` | write(ask) | `POST /admin/shipping_orders/{shipping_order_id}/fees/add` | add a fee (fixed amount or percentage) on top of the freight. | — |
|
|
85
85
|
| `makea-cli admin create shipping-option` | write(ask) | `POST /admin/shipping_orders/{shipping_order_id}/shipping-options` | add one freight quote (provider, speed, price, currency). | — |
|
|
86
86
|
| `makea-cli admin create shipping-order` | write(ask) | `POST /admin/shipping_orders/create` | make a shipment for a brand's production and/or sampling orders. The shipment belongs to the orders' owner; you are r… | — |
|
|
87
87
|
| `makea-cli admin create supplier` | write(ask) | `POST /admin/supplier/add_supplier` | create supplier from JSON file (admin). Run `makea-cli get-supplier-profile-schema` FIRST to get the field taxonomy (… | `add-supplier` |
|
|
88
88
|
| `makea-cli admin create user` | write(never) | `POST /admin/users/create` | register a user and confirm the Cognito account in one step (no verification email). Allowed --user-type values: "Fas… | `create-user` |
|
|
89
|
+
| `makea-cli admin delete about` | write(ask) | `DELETE /admin/about/{target}/{key}` | remove one About you line (`--user` / `--supplier`); it is not guessed again. --reason required. | — |
|
|
89
90
|
| `makea-cli admin delete library-element` | write(never) | `DELETE /admin/designer/{user_id}/library_components/{component_id}` | remove a component from the designer's org library. | `library-delete` |
|
|
90
|
-
| `makea-cli admin delete rule` | write(ask) | `DELETE /admin/playbook/
|
|
91
|
+
| `makea-cli admin delete rule` | write(ask) | `DELETE /admin/playbook/{target}/rules/{rule_id}` | remove a rule (`--user` / `--supplier` / `--global`): archived, with who and why kept on it (`update rule --status active` restores it). --reason required. | — |
|
|
91
92
|
| `makea-cli admin delete shipping-fee` | write(ask) | `DELETE /admin/shipping_orders/{shipping_order_id}/fees/{fee_id}/remove` | remove one fee. | — |
|
|
92
93
|
| `makea-cli admin delete shipping-option` | write(ask) | `DELETE /admin/shipping_orders/{shipping_order_id}/shipping-options/{shipping_option_id}/remove` | withdraw one freight quote. | — |
|
|
93
94
|
| `makea-cli admin delete shipping-order` | write(never) | `DELETE /admin/shipping_orders/{shipping_order_id}/delete` | remove a shipment and free its orders. Graded `never`: the backend does not check status, so it removes a paid or in-transit shipment too. | — |
|
|
94
95
|
| `makea-cli admin delete shipping-order-item` | write(ask) | `POST /admin/production_orders/{id}/unlink_from_shipping_order/{shipping_order_id}` | take one production or sampling order off a shipment. A shipment left empty is deleted. | — |
|
|
95
96
|
| `makea-cli admin download document` | read | `GET /admin/document/download` | save a document file (document id + designer user_id). | `download-document` |
|
|
96
97
|
| `makea-cli admin download product-document` | read | `GET /admin/document/download` | Resolve product via admin list product-order payload, then GET /admin/document/download. | `download-product-document` |
|
|
98
|
+
| `makea-cli admin generate about` | write(auto) | `POST /admin/about/{target}/refresh` | recount an account's About you now; `--read` also reads its conversations (one model call). | — |
|
|
97
99
|
| `makea-cli admin generate pricing-groups` | write(ask) | `POST /admin/production_orders/{id}/details/update` | Lay a production order's variants into pricing groups along one axis (--by style \| colour \| variant \| all) with th… | `production-groups-generate` |
|
|
100
|
+
| `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. | — |
|
|
98
101
|
| `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` |
|
|
99
102
|
| `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` |
|
|
100
103
|
| `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` |
|
|
@@ -104,10 +107,11 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
104
107
|
| `makea-cli admin get production-pricing` | read | `GET /admin/production_orders/{id}/details` | show a production order's price tiers, MOQ, sizes/colours, pricing groups and cart coverage. | `production-pricing-show` |
|
|
105
108
|
| `makea-cli admin get quote-request` | read | `GET /admin/quote_requests/{quote_request_id}` | one quote request in full. | — |
|
|
106
109
|
| `makea-cli admin get revenue-metrics` | read | `GET /admin/business-metrics/cumulative-payment-and-platform-revenue` | platform-wide payment received and platform revenue (service fee + transaction fee) bucketed over a date range. | `get-cumulative-payment-and-platform-revenue` |
|
|
107
|
-
| `makea-cli admin get rule` | read | `GET /admin/playbook/
|
|
110
|
+
| `makea-cli admin get rule` | read | `GET /admin/playbook/{target}/rules/{rule_id}` | one rule in full (`--user` / `--supplier` / `--global`), with its evidence: where it came from, who changed it and why. | — |
|
|
108
111
|
| `makea-cli admin get rule-history` | read | `GET /admin/playbook/rules/{rule_id}/history` | every revision of one rule: its words, who changed it and why, and the rule that replaced it. | — |
|
|
109
112
|
| `makea-cli admin get shipping-order` | read | `GET /admin/shipping_orders/{shipping_order_id}/details` | one shipment with its production and sampling orders, freight quotes, fees, tracking and address. | — |
|
|
110
113
|
| `makea-cli admin get supplier-profile-schema` | read | `GET /admin/supplier/profile/schema` | supplier profile v2 schema (section/field taxonomy: sections, fields, options, required rules). | `get-supplier-profile-schema` |
|
|
114
|
+
| `makea-cli admin get task` | read | `GET /admin/tasks/{task_id}` | one Makea task in full: body, admin link, what settles it, and for a held lesson the finding Beeboo kept. | — |
|
|
111
115
|
| `makea-cli admin get tech-spec-extraction` | read | `GET /admin/products/{id}/extract-tech-specifications` | AI-generate specs (not saved). | `extract-ai-tech-spec` |
|
|
112
116
|
| `makea-cli admin get top-clicks` | read | `POST /admin/analytics/query` | which buttons/elements get clicked most. | `analytics-top-clicks` |
|
|
113
117
|
| `makea-cli admin get top-features` | read | `POST /admin/analytics/query` | a quick map of which features get used most. | `analytics-top-features` |
|
|
@@ -117,23 +121,27 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
117
121
|
| `makea-cli admin list production-order` | read | `GET /admin/production_orders?type=PRODUCTION` | 大货 (production) orders only. For restock use admin list restock-order; for shipping use admin list shipping-order. | `list-all-production-orders` |
|
|
118
122
|
| `makea-cli admin list quote-request` | read | `GET /admin/quote_requests` | quote requests, optionally for one product (--product) or one supplier (--supplier, GET /admin/quote_requests/supplie… | — |
|
|
119
123
|
| `makea-cli admin list restock-order` | read | `GET /admin/production_orders?type=RESTOCK` | restock orders only. Restock shares the production_orders table; this filters to type=RESTOCK. | `list-all-restock-orders` |
|
|
120
|
-
| `makea-cli admin list rule` | read | `GET /admin/playbook/
|
|
124
|
+
| `makea-cli admin list rule` | read | `GET /admin/playbook/{target}/rules` | every AI playbook rule for one person (team, own account, factory), one factory (`--supplier`) or the platform (`--global`): status, scope, text, which products, effect, source. Archived ones only with --all. | — |
|
|
121
125
|
| `makea-cli admin list sampling-order` | read | `GET /admin/sampling_orders/get_all` | paginated list of all sampling orders (admin). | `list-all-sampling-orders` |
|
|
122
126
|
| `makea-cli admin list shipping-order` | read | `GET /admin/shipping_orders` | paginated list of all shipping orders (admin). | `list-all-shipping-orders` |
|
|
123
127
|
| `makea-cli admin list supplier` | read | `GET /admin/supplier/get_all_suppliers` | list all suppliers (admin). | `list-suppliers` |
|
|
124
128
|
| `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` |
|
|
129
|
+
| `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. | — |
|
|
125
130
|
| `makea-cli admin list user` | read | `GET /admin/users` | list registered users (admin, optional pagination). | `list-users` |
|
|
126
131
|
| `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` |
|
|
127
132
|
| `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` |
|
|
128
133
|
| `makea-cli admin set production-tiers` | write(ask) | `POST /admin/production_orders/{id}/details/update` | Set the order-wide price tiers / MOQ / incoterm / currency on a production order (the schedule used when it has no pr… | `production-tiers-set` |
|
|
129
134
|
| `makea-cli admin set production-variants` | write(ask) | `POST /admin/production_orders/{id}/details/update` | Set a production order's available sizes and colours (the grid the buyer's cart and every pricing group's cart keys a… | `production-variants-set` |
|
|
130
135
|
| `makea-cli admin submit quote` | write(ask) | `POST /admin/quote_requests/{quote_request_id}/submit_quote` | admin submits a new quote (link) to a quote request. Pricing groups cannot be sent here (the submit endpoint ignores … | `submit-supplier-quote` |
|
|
136
|
+
| `makea-cli admin update about` | write(ask) | `PATCH /admin/about/{target}/{key}` | add or reword one About you line (stands as the account's own words); `--restore` brings a removed one back. --reason required. | — |
|
|
137
|
+
| `makea-cli admin update about-pause` | write(ask) | `POST /admin/about/{target}/pause` | stop (or `--resume`) Beeboo using an account's About you. --reason required. | — |
|
|
131
138
|
| `makea-cli admin update library-element` | write(auto) | `PATCH /admin/designer/{user_id}/library_components/{component_id}` | update a component's name and/or values (empty value clears a field). | `library-update` |
|
|
132
139
|
| `makea-cli admin update quote` | write(ask) | `POST /admin/product/edit_supplier_link_override_info` | admin updates an existing quote (supplier link) in place. Only the options you pass are sent, and the backend leaves … | `update-supplier-quote` |
|
|
133
140
|
| `makea-cli admin update quote-request` | write(ask) | `PATCH /admin/quote_requests/{quote_request_id}/update` | set a quote request's stage, status and/or due date. Only what you pass is changed. This is the door that unblocks a … | `update-quote-request` |
|
|
134
|
-
| `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/
|
|
141
|
+
| `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/{target}/rules/{rule_id}` | change a rule's text, status, applies_to, when, mode or end date (--valid-until), on `--user` / `--supplier` / `--global`. --reason required; the rule keeps what it was before. | — |
|
|
135
142
|
| `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… | — |
|
|
136
143
|
| `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` |
|
|
144
|
+
| `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`. | — |
|
|
137
145
|
| `makea-cli admin update tech-spec` | write(ask) | `POST /admin/products/{id}/technical-specifications` | persist specs from a JSON file. | `save-product-tech-spec` |
|
|
138
146
|
| `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). | — |
|
|
139
147
|
| `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` |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.21"
|
|
@@ -1136,49 +1136,130 @@ def admin_delete_library_component(
|
|
|
1136
1136
|
)
|
|
1137
1137
|
|
|
1138
1138
|
|
|
1139
|
-
# --- admin:
|
|
1140
|
-
# Addressed by user_id or email; the backend resolves
|
|
1141
|
-
# rules live in
|
|
1142
|
-
#
|
|
1139
|
+
# --- admin: AI playbook rules -----------------------------------------------------
|
|
1140
|
+
# Addressed by whose they are: a person (user_id or email; the backend resolves
|
|
1141
|
+
# every scope their rules live in and refuses an email on more than one account),
|
|
1142
|
+
# one factory by supplier id, or the platform-wide GLOBAL playbook. Every write
|
|
1143
|
+
# carries a reason the rule keeps.
|
|
1143
1144
|
|
|
1144
1145
|
|
|
1145
|
-
def
|
|
1146
|
-
|
|
1147
|
-
|
|
1146
|
+
def playbook_rules_path(
|
|
1147
|
+
*, user: str | None = None, supplier: str | None = None, is_global: bool = False
|
|
1148
|
+
) -> str:
|
|
1149
|
+
"""Whose rules: a person (user_id or email), one factory, or the GLOBAL playbook."""
|
|
1150
|
+
if is_global:
|
|
1151
|
+
return "/admin/playbook/global/rules"
|
|
1152
|
+
if supplier:
|
|
1153
|
+
return f"/admin/playbook/suppliers/{quote(supplier.strip(), safe='')}/rules"
|
|
1154
|
+
return f"/admin/playbook/users/{quote((user or '').strip(), safe='@')}/rules"
|
|
1155
|
+
|
|
1148
1156
|
|
|
1157
|
+
def _rule_path(base: str, rule_id: str) -> str:
|
|
1158
|
+
return f"{base}/{quote(rule_id, safe='')}"
|
|
1149
1159
|
|
|
1150
|
-
|
|
1151
|
-
|
|
1160
|
+
|
|
1161
|
+
def admin_list_rules(
|
|
1162
|
+
base: str, *, status: str | None = None, include_archived: bool = False
|
|
1152
1163
|
) -> Any:
|
|
1153
|
-
"""GET
|
|
1164
|
+
"""GET …/rules — every rule on one target (``playbook_rules_path``)."""
|
|
1154
1165
|
params: dict[str, Any] = {}
|
|
1155
1166
|
if status:
|
|
1156
1167
|
params["status"] = status
|
|
1157
1168
|
if include_archived:
|
|
1158
1169
|
params["include_archived"] = "1"
|
|
1159
|
-
return get_json(
|
|
1170
|
+
return get_json(base, params=params or None)
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
def admin_get_rule(base: str, rule_id: str) -> Any:
|
|
1174
|
+
"""GET …/rules/{rule_id} — one rule, evidence included."""
|
|
1175
|
+
return get_json(_rule_path(base, rule_id))
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
def admin_create_rule(base: str, body: dict[str, Any]) -> Any:
|
|
1179
|
+
"""POST …/rules — {text, reason, scope?, applies_to?, when?, mode?, category?,
|
|
1180
|
+
polarity?, status?, force?}."""
|
|
1181
|
+
return post_json(base, body)
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
def admin_update_rule(base: str, rule_id: str, body: dict[str, Any]) -> Any:
|
|
1185
|
+
"""PATCH …/rules/{rule_id} — {text?, status?, applies_to?, when?, mode?, reason}."""
|
|
1186
|
+
return patch_json(_rule_path(base, rule_id), body)
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
def admin_delete_rule(base: str, rule_id: str, reason: str) -> Any:
|
|
1190
|
+
"""DELETE …/rules/{rule_id} — archives it, with the reason."""
|
|
1191
|
+
return delete_json(_rule_path(base, rule_id), body={"reason": reason})
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
# --- admin: the Makea team's task queue -------------------------------------------
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
def admin_list_tasks(
|
|
1198
|
+
*,
|
|
1199
|
+
kind: str | None = None,
|
|
1200
|
+
type_: str | None = None,
|
|
1201
|
+
user: str | None = None,
|
|
1202
|
+
product: str | None = None,
|
|
1203
|
+
) -> Any:
|
|
1204
|
+
"""GET /admin/tasks — the team's open tasks; filters are comma-separated."""
|
|
1205
|
+
params = {
|
|
1206
|
+
k: v
|
|
1207
|
+
for k, v in (("kind", kind), ("type", type_), ("user", user), ("product", product))
|
|
1208
|
+
if v
|
|
1209
|
+
}
|
|
1210
|
+
return get_json("/admin/tasks", params=params or None)
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
def admin_get_task(task_id: str) -> Any:
|
|
1214
|
+
"""GET /admin/tasks/{task_id} — one task, with Beeboo's finding behind it."""
|
|
1215
|
+
return get_json(f"/admin/tasks/{quote(task_id, safe='')}")
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
def admin_close_task(task_id: str, verb: str, body: dict[str, Any]) -> Any:
|
|
1219
|
+
"""POST /admin/tasks/{task_id}/{done|dismiss} — {note, reason?, caused_by?, recurs?}."""
|
|
1220
|
+
return post_json(f"/admin/tasks/{quote(task_id, safe='')}/{verb}", body)
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
# --- admin: one account's Knowledge > About you -----------------------------------
|
|
1224
|
+
# A person (user_id or email; a supplier account's person is their factory's page)
|
|
1225
|
+
# or one factory by supplier id. Every write but refresh carries a reason.
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
def about_path(*, user: str | None = None, supplier: str | None = None) -> str:
|
|
1229
|
+
if supplier:
|
|
1230
|
+
return f"/admin/about/suppliers/{quote(supplier.strip(), safe='')}"
|
|
1231
|
+
return f"/admin/about/users/{quote((user or '').strip(), safe='@')}"
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
def admin_get_about(base: str) -> Any:
|
|
1235
|
+
"""GET /admin/about/{target} — the page: facts, removed, unknown, paused."""
|
|
1236
|
+
return get_json(base)
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
def admin_set_about_line(base: str, key: str, body: dict[str, Any]) -> Any:
|
|
1240
|
+
"""PATCH …/{key} — {text, valid_until?, reason}: add or reword one line."""
|
|
1241
|
+
return patch_json(f"{base}/{quote(key, safe='')}", body)
|
|
1160
1242
|
|
|
1161
1243
|
|
|
1162
|
-
def
|
|
1163
|
-
"""
|
|
1164
|
-
return
|
|
1244
|
+
def admin_remove_about_line(base: str, key: str, reason: str) -> Any:
|
|
1245
|
+
"""DELETE …/{key} — remove the line; it is not guessed again."""
|
|
1246
|
+
return delete_json(f"{base}/{quote(key, safe='')}", body={"reason": reason})
|
|
1165
1247
|
|
|
1166
1248
|
|
|
1167
|
-
def
|
|
1168
|
-
"""POST
|
|
1169
|
-
|
|
1170
|
-
return post_json(_user_rules_path(user), body)
|
|
1249
|
+
def admin_restore_about_line(base: str, key: str, reason: str) -> Any:
|
|
1250
|
+
"""POST …/{key}/restore — bring a removed line back."""
|
|
1251
|
+
return post_json(f"{base}/{quote(key, safe='')}/restore", {"reason": reason})
|
|
1171
1252
|
|
|
1172
1253
|
|
|
1173
|
-
def
|
|
1174
|
-
"""
|
|
1175
|
-
|
|
1176
|
-
return patch_json(_user_rules_path(user, rule_id), body)
|
|
1254
|
+
def admin_pause_about(base: str, paused: bool, reason: str) -> Any:
|
|
1255
|
+
"""POST …/pause — stop (or resume) Beeboo using the page."""
|
|
1256
|
+
return post_json(f"{base}/pause", {"paused": paused, "reason": reason})
|
|
1177
1257
|
|
|
1178
1258
|
|
|
1179
|
-
def
|
|
1180
|
-
"""
|
|
1181
|
-
|
|
1259
|
+
def admin_refresh_about(base: str, *, read: bool = False, force: bool = False) -> Any:
|
|
1260
|
+
"""POST …/refresh — recount from records now; ``read`` also reads the
|
|
1261
|
+
conversations since last time (one model call, so a long timeout)."""
|
|
1262
|
+
return post_json(f"{base}/refresh", {"read": read, "force": force}, timeout=300.0)
|
|
1182
1263
|
|
|
1183
1264
|
|
|
1184
1265
|
def admin_get_rule_history(rule_id: str) -> Any:
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import typer
|
|
4
4
|
|
|
5
|
+
from makea_cli.commands.about.cmd import register as register_about
|
|
5
6
|
from makea_cli.commands.analytics.cmd import register as register_analytics
|
|
6
7
|
from makea_cli.commands.auth.cmd import register as register_auth
|
|
7
8
|
from makea_cli.commands.brand.cmd import register as register_brand
|
|
@@ -18,6 +19,7 @@ from makea_cli.commands.product.cmd import register as register_product
|
|
|
18
19
|
from makea_cli.commands.production.cmd import register as register_production
|
|
19
20
|
from makea_cli.commands.shipping.cmd import register as register_shipping
|
|
20
21
|
from makea_cli.commands.supplier.cmd import register as register_supplier
|
|
22
|
+
from makea_cli.commands.tasks.cmd import register as register_tasks
|
|
21
23
|
|
|
22
24
|
|
|
23
25
|
def register_all(app: typer.Typer) -> None:
|
|
@@ -37,3 +39,5 @@ def register_all(app: typer.Typer) -> None:
|
|
|
37
39
|
register_factory(app)
|
|
38
40
|
register_brand(app)
|
|
39
41
|
register_playbook(app)
|
|
42
|
+
register_about(app)
|
|
43
|
+
register_tasks(app)
|