makea-cli 0.2.30__tar.gz → 0.2.32__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.30 → makea_cli-0.2.32}/CHANGELOG.md +21 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/PKG-INFO +5 -2
- {makea_cli-0.2.30 → makea_cli-0.2.32}/README.md +4 -1
- makea_cli-0.2.32/makea_cli/__init__.py +1 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/api_client.py +21 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/brand/cmd.py +115 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/supplier/cmd.py +6 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/pyproject.toml +1 -1
- {makea_cli-0.2.30 → makea_cli-0.2.32}/tests/golden_manifest.json +223 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/uv.lock +1 -1
- makea_cli-0.2.30/makea_cli/__init__.py +0 -1
- {makea_cli-0.2.30 → makea_cli-0.2.32}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/.claude/skills/link-supplier-user/SKILL.md +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/.gitignore +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea-collection-upload/SKILL.md +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea-collection-upload/scripts/create_products.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/__main__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/auth_pkce.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/broker.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/_util.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/about/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/about/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/analytics/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/analytics/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/auth/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/auth/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/brand/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/designer/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/designer/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/directory/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/directory/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/document/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/document/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/email/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/email/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/factory/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/factory/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/files/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/files/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/flags/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/flags/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/library/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/library/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/metrics/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/metrics/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/orders/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/orders/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/playbook/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/playbook/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/product/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/product/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/production/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/production/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/production/pricing_spec.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/shipping/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/shipping/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/supplier/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/tasks/__init__.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/commands/tasks/cmd.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/companion.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/config.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/errors.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/file_reader.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/identity.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/main.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/output.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/posthog_client.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/makea_cli/registry.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/npm/makea-cli/README.md +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/npm/makea-cli/makea-cli.mjs +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/npm/makea-cli/package.json +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/tests/test_broker.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/tests/test_companion.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/tests/test_currency_conversion.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/tests/test_file_reader.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/tests/test_output_contract.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/tests/test_persona_commands.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/tests/test_pm_reads.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/tests/test_registry.py +0 -0
- {makea_cli-0.2.30 → makea_cli-0.2.32}/tests/test_supplier_scorecard.py +0 -0
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.32
|
|
4
|
+
|
|
5
|
+
Quote requests wait while the brand's files disagree (TECH-181).
|
|
6
|
+
|
|
7
|
+
- `admin create quote-request` gets `--release-anyway`. The server now holds
|
|
8
|
+
a request (409 FILES_DISAGREE, naming what disagrees) while a conflict
|
|
9
|
+
between the brand's files is open; settle it on the order's "Ready for
|
|
10
|
+
factories" tab, or pass the flag to send regardless.
|
|
11
|
+
|
|
12
|
+
## 0.2.31
|
|
13
|
+
|
|
14
|
+
Beeboo files what a brand hands it in the chat (TECH-150).
|
|
15
|
+
|
|
16
|
+
- `designer create pack-file --product <id> --document <document_id>` puts an
|
|
17
|
+
uploaded file on a tech pack section, named as `get tech-pack --readable`
|
|
18
|
+
shows it. A pattern file (DXF, RUL, PLT) goes on Patterns when no section is
|
|
19
|
+
named. A refusal lists the sections or rows that exist.
|
|
20
|
+
- `designer get library-schema` and `designer create library-element` add a
|
|
21
|
+
fabric, trim or other part to the brand's library, with `--document` for a
|
|
22
|
+
photo or data sheet and `--draft` when required fields are still unknown.
|
|
23
|
+
|
|
3
24
|
## 0.2.30
|
|
4
25
|
|
|
5
26
|
Read HP-GL plot files (.plt), the pattern or marker a CAD sends to a cutting
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: makea-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.32
|
|
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
|
|
@@ -97,7 +97,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
97
97
|
| `makea-cli admin create feature-flag` | write(ask) | `POST /admin/feature-flags` | add a flag (off unless --enabled). An existing key is refused. | — |
|
|
98
98
|
| `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` |
|
|
99
99
|
| `makea-cli admin create product-note` | write(ask) | `POST /admin/products/{product_id}/notes` | write a note on a product. Without --internal it goes to the brand. | — |
|
|
100
|
-
| `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` |
|
|
100
|
+
| `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). Held (409 FILES_DISAGREE) while the brand's files disagree; --release-anyway sends regardless. | `create-quote-request` |
|
|
101
101
|
| `makea-cli admin create quote-request-note` | write(ask) | `POST /admin/quote_requests/{quote_request_id}/reply_status_note` | write to the factory on a quote request (e.g. answer its clarification). --requirements-updated words the email as a change to the product's requirements. | — |
|
|
102
102
|
| `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; --why / --proof are what the brand reads under it, --title its card name. | — |
|
|
103
103
|
| `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. | — |
|
|
@@ -199,7 +199,9 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
199
199
|
|---|---|---|---|---|
|
|
200
200
|
| `makea-cli designer create checkout` | write(ask) | `POST /designer/payments/basket/create-session` | a Stripe checkout link for one or more charges. --key repeats: sampling:<sampling_order_id>, production:<production_o… | — |
|
|
201
201
|
| `makea-cli designer create collection` | write(auto) | `POST /designer/collections/create` | create or update a designer collection. | `designer-create-collection` |
|
|
202
|
+
| `makea-cli designer create library-element` | write(auto) | `POST /designer/library_components` | add a fabric, trim or other part to the brand's library; --document attaches a photo or data sheet, --draft when required fields are unknown. | — |
|
|
202
203
|
| `makea-cli designer create note` | write(ask) | `POST /designer/products/{product_id}/notes` | post a message into a product's conversation. | — |
|
|
204
|
+
| `makea-cli designer create pack-file` | write(auto) | `POST /designer/products/{product_id}/tech_spec/files` | put an uploaded file on a tech pack section; a pattern file (DXF, RUL, PLT) goes on Patterns when no section is named. | — |
|
|
203
205
|
| `makea-cli designer create product` | write(ask) | `POST /designer/product/create_or_update_product` | payload must match manufacture/specifications (all frontend fields; categories/subcategories + collection_id in --hel… | `designer-upsert-product` |
|
|
204
206
|
| `makea-cli designer create quote-award` | write(ask) | `POST /designer/quotes/group_pay_prepare` | choose the supplier quote to sample with. --quote is the supplier link id from `designer list supplier-link`; repeat … | — |
|
|
205
207
|
| `makea-cli designer create rfq` | write(ask) | `POST /designer/product/send_rfq` | ask the chosen suppliers to quote on a product. --supplier repeats; --makea-sourcing also asks Makea to source. | — |
|
|
@@ -209,6 +211,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
209
211
|
| `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
212
|
| `makea-cli designer get file` | read | local (makea_cli.file_reader) | read a pattern (DXF/RUL/PLT), 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. | — |
|
|
211
213
|
| `makea-cli designer get collection` | read | `GET /designer/collections/{collection_id}/overview` | one collection with its products, orders and lifecycle in a single read. | — |
|
|
214
|
+
| `makea-cli designer get library-schema` | read | `GET /designer/library_components/schema` | the library's sections and each one's field keys, options and required fields. | — |
|
|
212
215
|
| `makea-cli designer get lifecycle` | read | `GET /designer/product_orders/{product_order_id}/lifecycle` | which stage this product is in. | — |
|
|
213
216
|
| `makea-cli designer get product` | read | `GET /designer/get_product` | one product: status, documents, prices, links. | — |
|
|
214
217
|
| `makea-cli designer get production-price` | read | `GET /designer/production_orders/{production_order_id}/calculate_price` | what the deposit (or the balance, --phase final) comes to for the quantities on the run right now, line by line. | — |
|
|
@@ -81,7 +81,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
81
81
|
| `makea-cli admin create feature-flag` | write(ask) | `POST /admin/feature-flags` | add a flag (off unless --enabled). An existing key is refused. | — |
|
|
82
82
|
| `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` |
|
|
83
83
|
| `makea-cli admin create product-note` | write(ask) | `POST /admin/products/{product_id}/notes` | write a note on a product. Without --internal it goes to the brand. | — |
|
|
84
|
-
| `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` |
|
|
84
|
+
| `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). Held (409 FILES_DISAGREE) while the brand's files disagree; --release-anyway sends regardless. | `create-quote-request` |
|
|
85
85
|
| `makea-cli admin create quote-request-note` | write(ask) | `POST /admin/quote_requests/{quote_request_id}/reply_status_note` | write to the factory on a quote request (e.g. answer its clarification). --requirements-updated words the email as a change to the product's requirements. | — |
|
|
86
86
|
| `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; --why / --proof are what the brand reads under it, --title its card name. | — |
|
|
87
87
|
| `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. | — |
|
|
@@ -183,7 +183,9 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
183
183
|
|---|---|---|---|---|
|
|
184
184
|
| `makea-cli designer create checkout` | write(ask) | `POST /designer/payments/basket/create-session` | a Stripe checkout link for one or more charges. --key repeats: sampling:<sampling_order_id>, production:<production_o… | — |
|
|
185
185
|
| `makea-cli designer create collection` | write(auto) | `POST /designer/collections/create` | create or update a designer collection. | `designer-create-collection` |
|
|
186
|
+
| `makea-cli designer create library-element` | write(auto) | `POST /designer/library_components` | add a fabric, trim or other part to the brand's library; --document attaches a photo or data sheet, --draft when required fields are unknown. | — |
|
|
186
187
|
| `makea-cli designer create note` | write(ask) | `POST /designer/products/{product_id}/notes` | post a message into a product's conversation. | — |
|
|
188
|
+
| `makea-cli designer create pack-file` | write(auto) | `POST /designer/products/{product_id}/tech_spec/files` | put an uploaded file on a tech pack section; a pattern file (DXF, RUL, PLT) goes on Patterns when no section is named. | — |
|
|
187
189
|
| `makea-cli designer create product` | write(ask) | `POST /designer/product/create_or_update_product` | payload must match manufacture/specifications (all frontend fields; categories/subcategories + collection_id in --hel… | `designer-upsert-product` |
|
|
188
190
|
| `makea-cli designer create quote-award` | write(ask) | `POST /designer/quotes/group_pay_prepare` | choose the supplier quote to sample with. --quote is the supplier link id from `designer list supplier-link`; repeat … | — |
|
|
189
191
|
| `makea-cli designer create rfq` | write(ask) | `POST /designer/product/send_rfq` | ask the chosen suppliers to quote on a product. --supplier repeats; --makea-sourcing also asks Makea to source. | — |
|
|
@@ -193,6 +195,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
193
195
|
| `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
196
|
| `makea-cli designer get file` | read | local (makea_cli.file_reader) | read a pattern (DXF/RUL/PLT), 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. | — |
|
|
195
197
|
| `makea-cli designer get collection` | read | `GET /designer/collections/{collection_id}/overview` | one collection with its products, orders and lifecycle in a single read. | — |
|
|
198
|
+
| `makea-cli designer get library-schema` | read | `GET /designer/library_components/schema` | the library's sections and each one's field keys, options and required fields. | — |
|
|
196
199
|
| `makea-cli designer get lifecycle` | read | `GET /designer/product_orders/{product_order_id}/lifecycle` | which stage this product is in. | — |
|
|
197
200
|
| `makea-cli designer get product` | read | `GET /designer/get_product` | one product: status, documents, prices, links. | — |
|
|
198
201
|
| `makea-cli designer get production-price` | read | `GET /designer/production_orders/{production_order_id}/calculate_price` | what the deposit (or the balance, --phase final) comes to for the quantities on the run right now, line by line. | — |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.32"
|
|
@@ -418,9 +418,13 @@ def create_quote_request(
|
|
|
418
418
|
message: str | None = None,
|
|
419
419
|
quote_type: str = "SAMPLING",
|
|
420
420
|
due_date: str | None = None,
|
|
421
|
+
release_anyway: bool = False,
|
|
421
422
|
) -> Any:
|
|
422
423
|
"""
|
|
423
424
|
POST /admin/supplier/create_quote_request — admin creates a quote request for a supplier.
|
|
425
|
+
|
|
426
|
+
The server holds the request (409 FILES_DISAGREE) while the brand's files
|
|
427
|
+
disagree (TECH-181); ``release_anyway`` sends it regardless.
|
|
424
428
|
"""
|
|
425
429
|
body: dict[str, Any] = {
|
|
426
430
|
"supplier_id": supplier_id,
|
|
@@ -431,6 +435,8 @@ def create_quote_request(
|
|
|
431
435
|
body["message"] = message
|
|
432
436
|
if due_date is not None:
|
|
433
437
|
body["due_date"] = due_date
|
|
438
|
+
if release_anyway:
|
|
439
|
+
body["release_anyway"] = True
|
|
434
440
|
return post_json("/admin/supplier/create_quote_request", body)
|
|
435
441
|
|
|
436
442
|
|
|
@@ -1871,6 +1877,21 @@ def designer_create_proposals(product_id: str, proposals: list[dict[str, Any]])
|
|
|
1871
1877
|
)
|
|
1872
1878
|
|
|
1873
1879
|
|
|
1880
|
+
def designer_create_pack_file(product_id: str, body: dict[str, Any]) -> Any:
|
|
1881
|
+
"""POST /designer/products/{id}/tech_spec/files — put an uploaded file on a pack section."""
|
|
1882
|
+
return post_json(f"/designer/products/{product_id}/tech_spec/files", body)
|
|
1883
|
+
|
|
1884
|
+
|
|
1885
|
+
def designer_library_schema() -> Any:
|
|
1886
|
+
"""GET /designer/library_components/schema — library sections and their field keys."""
|
|
1887
|
+
return get_json("/designer/library_components/schema")
|
|
1888
|
+
|
|
1889
|
+
|
|
1890
|
+
def designer_create_library_component(body: dict[str, Any]) -> Any:
|
|
1891
|
+
"""POST /designer/library_components — {section, name?, values, document_ids?, draft?}."""
|
|
1892
|
+
return post_json("/designer/library_components", body)
|
|
1893
|
+
|
|
1894
|
+
|
|
1874
1895
|
def designer_bulk_accept_actions(channel_id: str, actions: list[dict[str, str]]) -> Any:
|
|
1875
1896
|
"""POST /designer/channels/{id}/suggested_actions/bulk_accept — accept several at once."""
|
|
1876
1897
|
return post_json(
|
|
@@ -750,6 +750,121 @@ def register(app: typer.Typer) -> None:
|
|
|
750
750
|
items = [{k: v for k, v in one.items() if v is not None}]
|
|
751
751
|
print_json_or_exit(console, lambda: api_client.designer_create_proposals(product, items))
|
|
752
752
|
|
|
753
|
+
@command(
|
|
754
|
+
app,
|
|
755
|
+
"designer",
|
|
756
|
+
"create",
|
|
757
|
+
"pack-file",
|
|
758
|
+
api="POST /designer/products/{product_id}/tech_spec/files",
|
|
759
|
+
side_effects=["adds the file to the tech pack section and to the product's documents"],
|
|
760
|
+
approval="auto",
|
|
761
|
+
help=(
|
|
762
|
+
"POST /designer/products/{id}/tech_spec/files — put a file the user uploaded (a "
|
|
763
|
+
"document_id) on a tech pack section. Pattern files (DXF, RUL, PLT, AAMA/ASTM) go "
|
|
764
|
+
"on Patterns, which is the default for them. Name the section as `get tech-pack "
|
|
765
|
+
'--readable` shows it ("Patterns", "Main fabric", "Additional notes"); pick a row '
|
|
766
|
+
"with --item or --entry. A refusal lists the sections that exist."
|
|
767
|
+
),
|
|
768
|
+
)
|
|
769
|
+
def create_pack_file(
|
|
770
|
+
product: str = typer.Option(..., "--product", "-p", help="Product id."),
|
|
771
|
+
document: list[str] = typer.Option(
|
|
772
|
+
..., "--document", "-d", help="document_id of the uploaded file (repeat)."
|
|
773
|
+
),
|
|
774
|
+
section: str | None = typer.Option(
|
|
775
|
+
None,
|
|
776
|
+
"--section",
|
|
777
|
+
help="Section, by label or key. Omit for a pattern file (goes on Patterns).",
|
|
778
|
+
),
|
|
779
|
+
entry: int | None = typer.Option(
|
|
780
|
+
None, "--entry", help="Row number in a repeating section, 0 = first."
|
|
781
|
+
),
|
|
782
|
+
item: str | None = typer.Option(
|
|
783
|
+
None, "--item", help='Pick the row that holds this value now (e.g. "silk crepe").'
|
|
784
|
+
),
|
|
785
|
+
) -> None:
|
|
786
|
+
"""Put uploaded files on a tech pack section."""
|
|
787
|
+
body: dict[str, Any] = {"document_ids": list(document)}
|
|
788
|
+
if section:
|
|
789
|
+
body["section"] = section
|
|
790
|
+
if entry is not None:
|
|
791
|
+
body["entry"] = entry
|
|
792
|
+
if item:
|
|
793
|
+
body["item"] = item
|
|
794
|
+
print_json_or_exit(console, lambda: api_client.designer_create_pack_file(product, body))
|
|
795
|
+
|
|
796
|
+
@command(
|
|
797
|
+
app,
|
|
798
|
+
"designer",
|
|
799
|
+
"get",
|
|
800
|
+
"library-schema",
|
|
801
|
+
api="GET /designer/library_components/schema",
|
|
802
|
+
help=(
|
|
803
|
+
"GET /designer/library_components/schema — the library's sections (fabrics, trims, "
|
|
804
|
+
"colours…) and, for each, its field keys, labels, options and which are required. "
|
|
805
|
+
"Read it before `create library-element`."
|
|
806
|
+
),
|
|
807
|
+
)
|
|
808
|
+
def get_library_schema() -> None:
|
|
809
|
+
"""Print the library sections and their fields."""
|
|
810
|
+
print_json_or_exit(console, api_client.designer_library_schema)
|
|
811
|
+
|
|
812
|
+
@command(
|
|
813
|
+
app,
|
|
814
|
+
"designer",
|
|
815
|
+
"create",
|
|
816
|
+
"library-element",
|
|
817
|
+
api="POST /designer/library_components",
|
|
818
|
+
side_effects=["adds the element to the brand's library, shared with their team"],
|
|
819
|
+
approval="auto",
|
|
820
|
+
help=(
|
|
821
|
+
"POST /designer/library_components — add a fabric, trim or other part to the brand's "
|
|
822
|
+
"library. --section and the --values keys come from `get library-schema`. --document "
|
|
823
|
+
"attaches an uploaded photo or data sheet. When required fields are unknown, pass "
|
|
824
|
+
"--draft: it is saved as a draft for the brand to finish."
|
|
825
|
+
),
|
|
826
|
+
)
|
|
827
|
+
def create_library_element(
|
|
828
|
+
section: str = typer.Option(..., "--section", "-s", help="Section key, e.g. MAIN_FABRIC."),
|
|
829
|
+
values: str | None = typer.Option(
|
|
830
|
+
None, "--values", help="JSON object of {field key: value} from get library-schema."
|
|
831
|
+
),
|
|
832
|
+
values_file: Path | None = typer.Option(
|
|
833
|
+
None,
|
|
834
|
+
"--values-file",
|
|
835
|
+
"-f",
|
|
836
|
+
exists=True,
|
|
837
|
+
dir_okay=False,
|
|
838
|
+
help="JSON file holding the values object (instead of --values).",
|
|
839
|
+
),
|
|
840
|
+
name: str | None = typer.Option(
|
|
841
|
+
None, "--name", "-n", help="Display name (defaults to the name field)."
|
|
842
|
+
),
|
|
843
|
+
document: list[str] = typer.Option(
|
|
844
|
+
[], "--document", "-d", help="document_id of a photo or data sheet (repeat)."
|
|
845
|
+
),
|
|
846
|
+
product: str | None = typer.Option(
|
|
847
|
+
None, "--product", "-p", help="The product it was made for, if any."
|
|
848
|
+
),
|
|
849
|
+
draft: bool = typer.Option(
|
|
850
|
+
False, "--draft", help="Save as a draft when required fields are still unknown."
|
|
851
|
+
),
|
|
852
|
+
) -> None:
|
|
853
|
+
"""Add an element to the brand's library."""
|
|
854
|
+
body: dict[str, Any] = {
|
|
855
|
+
"section": section,
|
|
856
|
+
"values": _json_object(values, values_file, "values"),
|
|
857
|
+
}
|
|
858
|
+
if name:
|
|
859
|
+
body["name"] = name
|
|
860
|
+
if document:
|
|
861
|
+
body["document_ids"] = list(document)
|
|
862
|
+
if product:
|
|
863
|
+
body["product_reference_id"] = product
|
|
864
|
+
if draft:
|
|
865
|
+
body["draft"] = True
|
|
866
|
+
print_json_or_exit(console, lambda: api_client.designer_create_library_component(body))
|
|
867
|
+
|
|
753
868
|
@command(
|
|
754
869
|
app,
|
|
755
870
|
"designer",
|
|
@@ -367,6 +367,11 @@ def register(app: typer.Typer) -> None:
|
|
|
367
367
|
"--due-date",
|
|
368
368
|
help="due_date: optional due date in YYYY-MM-DD format.",
|
|
369
369
|
),
|
|
370
|
+
release_anyway: bool = typer.Option(
|
|
371
|
+
False,
|
|
372
|
+
"--release-anyway",
|
|
373
|
+
help="Send even though the brand's files disagree (the server holds the request otherwise, FILES_DISAGREE).",
|
|
374
|
+
),
|
|
370
375
|
) -> None:
|
|
371
376
|
"""
|
|
372
377
|
Create/send a quote request as admin.
|
|
@@ -383,6 +388,7 @@ def register(app: typer.Typer) -> None:
|
|
|
383
388
|
message=message,
|
|
384
389
|
quote_type=qt,
|
|
385
390
|
due_date=due_date,
|
|
391
|
+
release_anyway=release_anyway,
|
|
386
392
|
),
|
|
387
393
|
)
|
|
388
394
|
|
|
@@ -457,6 +457,18 @@
|
|
|
457
457
|
"multiple": false,
|
|
458
458
|
"default": null,
|
|
459
459
|
"help": "due_date: optional due date in YYYY-MM-DD format."
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "release_anyway",
|
|
463
|
+
"kind": "option",
|
|
464
|
+
"opts": [
|
|
465
|
+
"--release-anyway"
|
|
466
|
+
],
|
|
467
|
+
"type": "flag",
|
|
468
|
+
"required": false,
|
|
469
|
+
"multiple": false,
|
|
470
|
+
"default": false,
|
|
471
|
+
"help": "Send even though the brand's files disagree (the server holds the request otherwise, FILES_DISAGREE)."
|
|
460
472
|
}
|
|
461
473
|
]
|
|
462
474
|
},
|
|
@@ -8290,6 +8302,116 @@
|
|
|
8290
8302
|
}
|
|
8291
8303
|
]
|
|
8292
8304
|
},
|
|
8305
|
+
{
|
|
8306
|
+
"name": "designer create library-element",
|
|
8307
|
+
"persona": "designer",
|
|
8308
|
+
"verb": "create",
|
|
8309
|
+
"noun": "library-element",
|
|
8310
|
+
"access": "write",
|
|
8311
|
+
"api": "POST /designer/library_components",
|
|
8312
|
+
"external": null,
|
|
8313
|
+
"side_effects": [
|
|
8314
|
+
"adds the element to the brand's library, shared with their team"
|
|
8315
|
+
],
|
|
8316
|
+
"approval": "auto",
|
|
8317
|
+
"reversible": null,
|
|
8318
|
+
"idempotent": null,
|
|
8319
|
+
"limit": null,
|
|
8320
|
+
"legacy": [],
|
|
8321
|
+
"help": "POST /designer/library_components — add a fabric, trim or other part to the brand's library. --section and the --values keys come from `get library-schema`. --document attaches an uploaded photo or data sheet. When required fields are unknown, pass --draft: it is saved as a draft for the brand to finish.",
|
|
8322
|
+
"function": "makea_cli.commands.brand.cmd.register.<locals>.create_library_element",
|
|
8323
|
+
"flags": [
|
|
8324
|
+
{
|
|
8325
|
+
"name": "section",
|
|
8326
|
+
"kind": "option",
|
|
8327
|
+
"opts": [
|
|
8328
|
+
"--section",
|
|
8329
|
+
"-s"
|
|
8330
|
+
],
|
|
8331
|
+
"type": "text",
|
|
8332
|
+
"required": true,
|
|
8333
|
+
"multiple": false,
|
|
8334
|
+
"default": null,
|
|
8335
|
+
"help": "Section key, e.g. MAIN_FABRIC."
|
|
8336
|
+
},
|
|
8337
|
+
{
|
|
8338
|
+
"name": "values",
|
|
8339
|
+
"kind": "option",
|
|
8340
|
+
"opts": [
|
|
8341
|
+
"--values"
|
|
8342
|
+
],
|
|
8343
|
+
"type": "text",
|
|
8344
|
+
"required": false,
|
|
8345
|
+
"multiple": false,
|
|
8346
|
+
"default": null,
|
|
8347
|
+
"help": "JSON object of {field key: value} from get library-schema."
|
|
8348
|
+
},
|
|
8349
|
+
{
|
|
8350
|
+
"name": "values_file",
|
|
8351
|
+
"kind": "option",
|
|
8352
|
+
"opts": [
|
|
8353
|
+
"--values-file",
|
|
8354
|
+
"-f"
|
|
8355
|
+
],
|
|
8356
|
+
"type": "file",
|
|
8357
|
+
"required": false,
|
|
8358
|
+
"multiple": false,
|
|
8359
|
+
"default": null,
|
|
8360
|
+
"help": "JSON file holding the values object (instead of --values)."
|
|
8361
|
+
},
|
|
8362
|
+
{
|
|
8363
|
+
"name": "name",
|
|
8364
|
+
"kind": "option",
|
|
8365
|
+
"opts": [
|
|
8366
|
+
"--name",
|
|
8367
|
+
"-n"
|
|
8368
|
+
],
|
|
8369
|
+
"type": "text",
|
|
8370
|
+
"required": false,
|
|
8371
|
+
"multiple": false,
|
|
8372
|
+
"default": null,
|
|
8373
|
+
"help": "Display name (defaults to the name field)."
|
|
8374
|
+
},
|
|
8375
|
+
{
|
|
8376
|
+
"name": "document",
|
|
8377
|
+
"kind": "option",
|
|
8378
|
+
"opts": [
|
|
8379
|
+
"--document",
|
|
8380
|
+
"-d"
|
|
8381
|
+
],
|
|
8382
|
+
"type": "text",
|
|
8383
|
+
"required": false,
|
|
8384
|
+
"multiple": true,
|
|
8385
|
+
"default": [],
|
|
8386
|
+
"help": "document_id of a photo or data sheet (repeat)."
|
|
8387
|
+
},
|
|
8388
|
+
{
|
|
8389
|
+
"name": "product",
|
|
8390
|
+
"kind": "option",
|
|
8391
|
+
"opts": [
|
|
8392
|
+
"--product",
|
|
8393
|
+
"-p"
|
|
8394
|
+
],
|
|
8395
|
+
"type": "text",
|
|
8396
|
+
"required": false,
|
|
8397
|
+
"multiple": false,
|
|
8398
|
+
"default": null,
|
|
8399
|
+
"help": "The product it was made for, if any."
|
|
8400
|
+
},
|
|
8401
|
+
{
|
|
8402
|
+
"name": "draft",
|
|
8403
|
+
"kind": "option",
|
|
8404
|
+
"opts": [
|
|
8405
|
+
"--draft"
|
|
8406
|
+
],
|
|
8407
|
+
"type": "flag",
|
|
8408
|
+
"required": false,
|
|
8409
|
+
"multiple": false,
|
|
8410
|
+
"default": false,
|
|
8411
|
+
"help": "Save as a draft when required fields are still unknown."
|
|
8412
|
+
}
|
|
8413
|
+
]
|
|
8414
|
+
},
|
|
8293
8415
|
{
|
|
8294
8416
|
"name": "designer create note",
|
|
8295
8417
|
"persona": "designer",
|
|
@@ -8348,6 +8470,89 @@
|
|
|
8348
8470
|
}
|
|
8349
8471
|
]
|
|
8350
8472
|
},
|
|
8473
|
+
{
|
|
8474
|
+
"name": "designer create pack-file",
|
|
8475
|
+
"persona": "designer",
|
|
8476
|
+
"verb": "create",
|
|
8477
|
+
"noun": "pack-file",
|
|
8478
|
+
"access": "write",
|
|
8479
|
+
"api": "POST /designer/products/{product_id}/tech_spec/files",
|
|
8480
|
+
"external": null,
|
|
8481
|
+
"side_effects": [
|
|
8482
|
+
"adds the file to the tech pack section and to the product's documents"
|
|
8483
|
+
],
|
|
8484
|
+
"approval": "auto",
|
|
8485
|
+
"reversible": null,
|
|
8486
|
+
"idempotent": null,
|
|
8487
|
+
"limit": null,
|
|
8488
|
+
"legacy": [],
|
|
8489
|
+
"help": "POST /designer/products/{id}/tech_spec/files — put a file the user uploaded (a document_id) on a tech pack section. Pattern files (DXF, RUL, PLT, AAMA/ASTM) go on Patterns, which is the default for them. Name the section as `get tech-pack --readable` shows it (\"Patterns\", \"Main fabric\", \"Additional notes\"); pick a row with --item or --entry. A refusal lists the sections that exist.",
|
|
8490
|
+
"function": "makea_cli.commands.brand.cmd.register.<locals>.create_pack_file",
|
|
8491
|
+
"flags": [
|
|
8492
|
+
{
|
|
8493
|
+
"name": "product",
|
|
8494
|
+
"kind": "option",
|
|
8495
|
+
"opts": [
|
|
8496
|
+
"--product",
|
|
8497
|
+
"-p"
|
|
8498
|
+
],
|
|
8499
|
+
"type": "text",
|
|
8500
|
+
"required": true,
|
|
8501
|
+
"multiple": false,
|
|
8502
|
+
"default": null,
|
|
8503
|
+
"help": "Product id."
|
|
8504
|
+
},
|
|
8505
|
+
{
|
|
8506
|
+
"name": "document",
|
|
8507
|
+
"kind": "option",
|
|
8508
|
+
"opts": [
|
|
8509
|
+
"--document",
|
|
8510
|
+
"-d"
|
|
8511
|
+
],
|
|
8512
|
+
"type": "text",
|
|
8513
|
+
"required": true,
|
|
8514
|
+
"multiple": true,
|
|
8515
|
+
"default": null,
|
|
8516
|
+
"help": "document_id of the uploaded file (repeat)."
|
|
8517
|
+
},
|
|
8518
|
+
{
|
|
8519
|
+
"name": "section",
|
|
8520
|
+
"kind": "option",
|
|
8521
|
+
"opts": [
|
|
8522
|
+
"--section"
|
|
8523
|
+
],
|
|
8524
|
+
"type": "text",
|
|
8525
|
+
"required": false,
|
|
8526
|
+
"multiple": false,
|
|
8527
|
+
"default": null,
|
|
8528
|
+
"help": "Section, by label or key. Omit for a pattern file (goes on Patterns)."
|
|
8529
|
+
},
|
|
8530
|
+
{
|
|
8531
|
+
"name": "entry",
|
|
8532
|
+
"kind": "option",
|
|
8533
|
+
"opts": [
|
|
8534
|
+
"--entry"
|
|
8535
|
+
],
|
|
8536
|
+
"type": "integer",
|
|
8537
|
+
"required": false,
|
|
8538
|
+
"multiple": false,
|
|
8539
|
+
"default": null,
|
|
8540
|
+
"help": "Row number in a repeating section, 0 = first."
|
|
8541
|
+
},
|
|
8542
|
+
{
|
|
8543
|
+
"name": "item",
|
|
8544
|
+
"kind": "option",
|
|
8545
|
+
"opts": [
|
|
8546
|
+
"--item"
|
|
8547
|
+
],
|
|
8548
|
+
"type": "text",
|
|
8549
|
+
"required": false,
|
|
8550
|
+
"multiple": false,
|
|
8551
|
+
"default": null,
|
|
8552
|
+
"help": "Pick the row that holds this value now (e.g. \"silk crepe\")."
|
|
8553
|
+
}
|
|
8554
|
+
]
|
|
8555
|
+
},
|
|
8351
8556
|
{
|
|
8352
8557
|
"name": "designer create product",
|
|
8353
8558
|
"persona": "designer",
|
|
@@ -9046,6 +9251,24 @@
|
|
|
9046
9251
|
}
|
|
9047
9252
|
]
|
|
9048
9253
|
},
|
|
9254
|
+
{
|
|
9255
|
+
"name": "designer get library-schema",
|
|
9256
|
+
"persona": "designer",
|
|
9257
|
+
"verb": "get",
|
|
9258
|
+
"noun": "library-schema",
|
|
9259
|
+
"access": "read",
|
|
9260
|
+
"api": "GET /designer/library_components/schema",
|
|
9261
|
+
"external": null,
|
|
9262
|
+
"side_effects": [],
|
|
9263
|
+
"approval": "auto",
|
|
9264
|
+
"reversible": null,
|
|
9265
|
+
"idempotent": null,
|
|
9266
|
+
"limit": null,
|
|
9267
|
+
"legacy": [],
|
|
9268
|
+
"help": "GET /designer/library_components/schema — the library's sections (fabrics, trims, colours…) and, for each, its field keys, labels, options and which are required. Read it before `create library-element`.",
|
|
9269
|
+
"function": "makea_cli.commands.brand.cmd.register.<locals>.get_library_schema",
|
|
9270
|
+
"flags": []
|
|
9271
|
+
},
|
|
9049
9272
|
{
|
|
9050
9273
|
"name": "designer get lifecycle",
|
|
9051
9274
|
"persona": "designer",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.30"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|