makea-cli 0.2.35__tar.gz → 0.2.38__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.
Files changed (89) hide show
  1. {makea_cli-0.2.35 → makea_cli-0.2.38}/CHANGELOG.md +47 -0
  2. {makea_cli-0.2.35 → makea_cli-0.2.38}/PKG-INFO +18 -1
  3. {makea_cli-0.2.35 → makea_cli-0.2.38}/README.md +17 -0
  4. makea_cli-0.2.38/makea_cli/__init__.py +1 -0
  5. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/api_client.py +127 -0
  6. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/__init__.py +2 -0
  7. makea_cli-0.2.38/makea_cli/commands/order_flow/__init__.py +3 -0
  8. makea_cli-0.2.38/makea_cli/commands/order_flow/cmd.py +784 -0
  9. {makea_cli-0.2.35 → makea_cli-0.2.38}/pyproject.toml +1 -1
  10. {makea_cli-0.2.35 → makea_cli-0.2.38}/tests/golden_manifest.json +1704 -169
  11. {makea_cli-0.2.35 → makea_cli-0.2.38}/uv.lock +1 -1
  12. makea_cli-0.2.35/makea_cli/__init__.py +0 -1
  13. {makea_cli-0.2.35 → makea_cli-0.2.38}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
  14. {makea_cli-0.2.35 → makea_cli-0.2.38}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
  15. {makea_cli-0.2.35 → makea_cli-0.2.38}/.claude/skills/link-supplier-user/SKILL.md +0 -0
  16. {makea_cli-0.2.35 → makea_cli-0.2.38}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
  17. {makea_cli-0.2.35 → makea_cli-0.2.38}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
  18. {makea_cli-0.2.35 → makea_cli-0.2.38}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
  19. {makea_cli-0.2.35 → makea_cli-0.2.38}/.gitignore +0 -0
  20. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea-collection-upload/SKILL.md +0 -0
  21. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea-collection-upload/scripts/create_products.py +0 -0
  22. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/__main__.py +0 -0
  23. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/auth_pkce.py +0 -0
  24. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/broker.py +0 -0
  25. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/_util.py +0 -0
  26. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/about/__init__.py +0 -0
  27. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/about/cmd.py +0 -0
  28. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/analytics/__init__.py +0 -0
  29. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/analytics/cmd.py +0 -0
  30. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/auth/__init__.py +0 -0
  31. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/auth/cmd.py +0 -0
  32. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/brand/__init__.py +0 -0
  33. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/brand/cmd.py +0 -0
  34. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/designer/__init__.py +0 -0
  35. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/designer/cmd.py +0 -0
  36. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/directory/__init__.py +0 -0
  37. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/directory/cmd.py +0 -0
  38. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/document/__init__.py +0 -0
  39. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/document/cmd.py +0 -0
  40. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/email/__init__.py +0 -0
  41. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/email/cmd.py +0 -0
  42. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/factory/__init__.py +0 -0
  43. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/factory/cmd.py +0 -0
  44. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/files/__init__.py +0 -0
  45. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/files/cmd.py +0 -0
  46. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/flags/__init__.py +0 -0
  47. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/flags/cmd.py +0 -0
  48. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/library/__init__.py +0 -0
  49. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/library/cmd.py +0 -0
  50. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/metrics/__init__.py +0 -0
  51. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/metrics/cmd.py +0 -0
  52. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/orders/__init__.py +0 -0
  53. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/orders/cmd.py +0 -0
  54. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/playbook/__init__.py +0 -0
  55. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/playbook/cmd.py +0 -0
  56. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/product/__init__.py +0 -0
  57. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/product/cmd.py +0 -0
  58. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/production/__init__.py +0 -0
  59. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/production/cmd.py +0 -0
  60. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/production/pricing_spec.py +0 -0
  61. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/shiplog/__init__.py +0 -0
  62. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/shiplog/cmd.py +0 -0
  63. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/shipping/__init__.py +0 -0
  64. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/shipping/cmd.py +0 -0
  65. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/supplier/__init__.py +0 -0
  66. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/supplier/cmd.py +0 -0
  67. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/tasks/__init__.py +0 -0
  68. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/commands/tasks/cmd.py +0 -0
  69. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/companion.py +0 -0
  70. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/config.py +0 -0
  71. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/errors.py +0 -0
  72. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/file_reader.py +0 -0
  73. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/identity.py +0 -0
  74. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/main.py +0 -0
  75. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/output.py +0 -0
  76. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/posthog_client.py +0 -0
  77. {makea_cli-0.2.35 → makea_cli-0.2.38}/makea_cli/registry.py +0 -0
  78. {makea_cli-0.2.35 → makea_cli-0.2.38}/npm/makea-cli/README.md +0 -0
  79. {makea_cli-0.2.35 → makea_cli-0.2.38}/npm/makea-cli/makea-cli.mjs +0 -0
  80. {makea_cli-0.2.35 → makea_cli-0.2.38}/npm/makea-cli/package.json +0 -0
  81. {makea_cli-0.2.35 → makea_cli-0.2.38}/tests/test_broker.py +0 -0
  82. {makea_cli-0.2.35 → makea_cli-0.2.38}/tests/test_companion.py +0 -0
  83. {makea_cli-0.2.35 → makea_cli-0.2.38}/tests/test_currency_conversion.py +0 -0
  84. {makea_cli-0.2.35 → makea_cli-0.2.38}/tests/test_file_reader.py +0 -0
  85. {makea_cli-0.2.35 → makea_cli-0.2.38}/tests/test_output_contract.py +0 -0
  86. {makea_cli-0.2.35 → makea_cli-0.2.38}/tests/test_persona_commands.py +0 -0
  87. {makea_cli-0.2.35 → makea_cli-0.2.38}/tests/test_pm_reads.py +0 -0
  88. {makea_cli-0.2.35 → makea_cli-0.2.38}/tests/test_registry.py +0 -0
  89. {makea_cli-0.2.35 → makea_cli-0.2.38}/tests/test_supplier_scorecard.py +0 -0
@@ -1,5 +1,52 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.38
4
+
5
+ Set an order up like the last ones. Needs the backend with the step library.
6
+
7
+ - `designer list step-library <product>`: the steps the brand used on its
8
+ other orders (most used first, with the kind of step each came after), its
9
+ rules that add a step to every order, and this order's steps a new one can
10
+ follow.
11
+ - `designer create custom-steps <product> --file steps.json`: several steps at
12
+ once; each item names `after` (a step id) or `anchor_type` (from the
13
+ library). Graded ask: Beeboo proposes one "Add steps" button for all of them.
14
+
15
+ ## 0.2.37
16
+
17
+ Steps added alongside, and an order's steps from the brand's and the factory's
18
+ seats. Needs the backend with parallel custom steps.
19
+
20
+ - `--placement inline|alongside|beside` on `admin create|update custom-step`:
21
+ alongside puts the step on a line of its own, at the same time as the next
22
+ step; `--joins` names the step that waits for it (default: the one after),
23
+ `--no-joins` for none; beside (`--after` a side line's step) starts a new
24
+ line from where that line starts. `--after` a side line's step continues it.
25
+ - `designer get order-flow` and `designer create|update|delete|submit
26
+ custom-step`: the same, as the brand.
27
+ - `supplier get order-flow`, `supplier list custom-step` and `supplier submit
28
+ custom-step --move done|upload|submit`: the factory's read and its moves.
29
+ Factories do not add or change steps.
30
+ - `supplier submit sample-shipment` (courier and tracking) and `supplier
31
+ submit order-acceptance` (the date bulk will be done).
32
+
33
+ ## 0.2.36
34
+
35
+ Steps added to one order (custom steps), from makea's side. Needs the backend
36
+ with `/admin/products/<id>/order_flow`.
37
+
38
+ - `admin get order-flow` reads an order's steps by stage: state, whose move it
39
+ is, dates, the key dates and the factories' names. Added steps carry
40
+ `custom` (who does it, how it is done, due, hold, rounds, files).
41
+ - `admin create custom-step` adds a step after another (`--after`), with who
42
+ does it, how it is done (`--done-when check|upload|send`), an optional due
43
+ date or days before a key date, `--hold` and `--note`.
44
+ - `admin update custom-step` changes one; `admin delete custom-step` removes it
45
+ while nothing happened on it.
46
+ - `admin submit custom-step --move done|upload|submit|approve|send-back|skip`
47
+ makes its move as makea, or `--as supplier` for the step's own factory.
48
+ `--file` uploads under the brand; `--document` reuses a document id.
49
+
3
50
  ## 0.2.35
4
51
 
5
52
  Bulk shipments in several lots (consignments), each with its own tracking
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: makea-cli
3
- Version: 0.2.35
3
+ Version: 0.2.38
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
@@ -95,6 +95,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
95
95
  |---|---|---|---|---|
96
96
  | `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` |
97
97
  | `makea-cli admin create consignment` | write(ask) | `POST /admin/{production_orders\|shipping_orders}/{id}/consignments` | add one lot leaving the factory with its own tracking number, pieces, cartons, kg and ship date. The lot that brings the pieces up to the order is marked last unless `--last/--not-last` says. | — |
98
+ | `makea-cli admin create custom-step` | write(ask) | `POST /admin/products/{product_id}/order_flow/custom_steps` | add a step to one order as makea: `--label`, `--after` (a step id), `--placement inline\|alongside\|beside`, `--joins` / `--no-joins`, `--who`, `--done-when check\|upload\|send`, due (`--due-date` or `--due-days` + `--due-before`), `--hold` (checks in a production step), `--note`. | — |
98
99
  | `makea-cli admin create feature-flag` | write(ask) | `POST /admin/feature-flags` | add a flag (off unless --enabled). An existing key is refused. | — |
99
100
  | `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` |
100
101
  | `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. | — |
@@ -110,6 +111,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
110
111
  | `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` |
111
112
  | `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. | — |
112
113
  | `makea-cli admin delete consignment` | write(ask) | `DELETE /admin/{production_orders\|shipping_orders}/{id}/consignments/{consignment_id}` | remove a lot entered by mistake. A delivered lot cannot be removed. | — |
114
+ | `makea-cli admin delete custom-step` | write(ask) | `DELETE /admin/products/{product_id}/order_flow/custom_steps/{step_id}` | remove an added step while nothing was sent or uploaded on it; otherwise skip it. | — |
113
115
  | `makea-cli admin delete ship-log` | write(ask) | `DELETE /admin/ship-log/deploys/{deploy_id}` | remove a Ship log entry recorded by mistake, with its recordings. | — |
114
116
  | `makea-cli admin delete feature-flag` | write(ask) | `DELETE /admin/feature-flags/{key}` | remove a flag. Every check of it then reads false, so delete it only once the code that reads it is gone. | — |
115
117
  | `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` |
@@ -134,6 +136,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
134
136
  | `makea-cli admin get playbook-preview` | read | `GET /admin/playbook/preview` | the playbook block one AI surface would get for a person or factory, and every rule left out with its reason; --product previews a conversation about one product, --rule answers for one rule. | — |
135
137
  | `makea-cli admin get product-status` | read | `GET /admin/products/{product_id}/status` | where the product is: stage · step · owner for each supplier on it (the shared status model), plus the step catalog. | — |
136
138
  | `makea-cli admin get product-step` | read | `GET /admin/products/{product_id}/suppliers/{supplier_id}/change_step` | the step one factory is at on a product and the steps admin update product-step can move it to (options; money steps are listed but never selectable). | — |
139
+ | `makea-cli admin get order-flow` | read | `GET /admin/products/{product_id}/order_flow` | an order's steps by stage: state, whose move it is, dates, key dates, factory names; added steps carry `custom`. | — |
137
140
  | `makea-cli admin get production-order` | read | `GET /admin/production_orders/{production_order_id}/details` | one production (or restock) order in full: items, status, progress steps, tracking, notes, documents and linked suppliers. For only its pricing use admin get production-pricing. | — |
138
141
  | `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` |
139
142
  | `makea-cli admin get quote-request` | read | `GET /admin/quote_requests/{quote_request_id}` | one quote request in full. | — |
@@ -172,6 +175,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
172
175
  | `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` |
173
176
  | `makea-cli admin set sampling-order-tracking` | write(ask) | `PUT /admin/sampling_orders/{sampling_order_id}/tracking` | the sample's parcel: tracking number, URL, shipping method, carrier. Only what you pass is changed; an empty string clears a field. | — |
174
177
  | `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` |
178
+ | `makea-cli admin submit custom-step` | write(ask) | `POST /admin/products/{product_id}/order_flow/custom_steps/{step_id}/{move}` | make an added step's move (`--move done\|upload\|submit\|approve\|send-back\|skip`) as makea, or `--as supplier` for the step's factory (done, upload, submit); `--file` uploads under the brand. | — |
175
179
  | `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. | — |
176
180
  | `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. | — |
177
181
  | `makea-cli admin update feature-flag` | write(ask) | `PATCH /admin/feature-flags/{key}` | flip the global switch, edit the description or default value, or add / remove one account on the allow-list (by user id; find it with admin list user). | — |
@@ -188,6 +192,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
188
192
  | `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` |
189
193
  | `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. | — |
190
194
  | `makea-cli admin update consignment` | write(ask) | `PUT /admin/{production_orders\|shipping_orders}/{id}/consignments/{consignment_id}` | edit one lot; `--delivered` marks it delivered through the tracking sweep path (a middle lot tells the brand in-app and on WhatsApp, the last one delivers the order); `--silent` tells nobody. | — |
195
+ | `makea-cli admin update custom-step` | write(ask) | `PATCH /admin/products/{product_id}/order_flow/custom_steps/{step_id}` | change an added step that is not done or skipped; only the options given, including `--placement` and `--joins`. | — |
191
196
  | `makea-cli admin update ship-log` | write(ask) | `PATCH /admin/ship-log/deploys/{deploy_id}` | fix a Ship log entry's title, summary or watch note; `--media` attaches more recordings. | — |
192
197
  | `makea-cli admin update tech-spec` | write(ask) | `POST /admin/products/{id}/technical-specifications` | persist specs from a JSON file. | `save-product-tech-spec` |
193
198
  | `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). | — |
@@ -207,6 +212,9 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
207
212
  |---|---|---|---|---|
208
213
  | `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… | — |
209
214
  | `makea-cli designer create collection` | write(auto) | `POST /designer/collections/create` | create or update a designer collection. | `designer-create-collection` |
215
+ | `makea-cli designer create custom-step` | write(ask) | `POST /designer/products/{product_id}/order_flow/custom_steps` | add a step to your order: `--after`, `--placement inline\|alongside\|beside` (default alongside), `--joins` / `--no-joins`, `--who`, `--done-when`, due, `--note`. | — |
216
+ | `makea-cli designer create custom-steps` | write(ask) | `POST /designer/products/{product_id}/order_flow/custom_steps/batch` | add several steps at once from `--file` (a JSON list; each item names `after` or `anchor_type`). | — |
217
+ | `makea-cli designer list step-library` | read | `GET /designer/products/{product_id}/order_flow/step_library` | steps used on your other orders, your step rules, and this order's steps a new one can follow. | — |
210
218
  | `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. | — |
211
219
  | `makea-cli designer create note` | write(ask) | `POST /designer/products/{product_id}/notes` | post a message into a product's conversation. | — |
212
220
  | `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. | — |
@@ -249,6 +257,10 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
249
257
  | `makea-cli designer update product` | write(auto) | `POST /designer/product/update_basic_info` | patch fields on a product. --cover-image / --back-image take a document id and are what the assistant's set_product_i… | — |
250
258
  | `makea-cli designer update production-order` | write(ask) | `POST /designer/production_orders/{production_order_id}/complete` | POST /designer/production_orders/{id}/complete, or PUT the order to re-pick which supplier links it covers (--links-f… | — |
251
259
  | `makea-cli designer create proposal` | write(auto) | `POST /designer/products/{product_id}/tech_spec/proposals` | propose a tech-pack change as a card on the field it changes; the user applies it. Name section/field as `get tech-pack --readable` shows them; --item / --entry pick a row, --was a line. | — |
260
+ | `makea-cli designer delete custom-step` | write(ask) | `DELETE /designer/products/{product_id}/order_flow/custom_steps/{step_id}` | remove a step you added while nothing was sent on it; the steps after it close up. | — |
261
+ | `makea-cli designer get order-flow` | read | `GET /designer/products/{product_id}/order_flow` | your order's steps, the branch/join moves of lines added alongside, and what each step `waits_for`. | — |
262
+ | `makea-cli designer submit custom-step` | write(ask) | `POST /designer/products/{product_id}/order_flow/custom_steps/{step_id}/{move}` | your move on an added step: done, upload, approve, send-back (`--comment`), skip (`--reason`). | — |
263
+ | `makea-cli designer update custom-step` | write(ask) | `PATCH /designer/products/{product_id}/order_flow/custom_steps/{step_id}` | change a step you added, including where it goes (`--after`, `--placement`, `--joins`). | — |
252
264
  | `makea-cli designer update proposal` | write(ask) | `POST /designer/beeboo_proposals/approve` | apply one spec change the assistant proposed. This edits the pack, so read the proposal first. | — |
253
265
  | `makea-cli designer update sampling-order` | write(never) | `POST /designer/sampling_orders/{sampling_order_id}/cancel` | cancel a sample order. Graded `never`: an agent must not do this on its own, a person runs it. | — |
254
266
  | `makea-cli designer update shipping-order` | write(ask) | `POST /designer/shipping_orders/{shipping_order_id}/confirm_receive` | say the goods arrived. The backend accepts this only while the shipment is IN_TRANSIT. | — |
@@ -263,18 +275,23 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
263
275
  | `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. | — |
264
276
  | `makea-cli supplier download document` | read | `GET /supplier/document/download` | save a document you are allowed to read. | — |
265
277
  | `makea-cli supplier 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. | — |
278
+ | `makea-cli supplier get order-flow` | read | `GET /supplier/products/{product_id}/order_flow` | your read of an order: request, one row per quote, your sample and bulk steps, holds (`waits_for`). | — |
266
279
  | `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). | — |
267
280
  | `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. | — |
268
281
  | `makea-cli supplier get profile` | read | `GET /supplier/profile` | your own supplier profile. | — |
269
282
  | `makea-cli supplier get rfq` | read | `GET /supplier/quote_requests` | one RFQ in full. | — |
270
283
  | `makea-cli supplier list action` | read | `GET /supplier/actions` | what the platform is waiting on you for (pending actions). | — |
271
284
  | `makea-cli supplier list channel` | read | `GET /supplier/products/{product_id}/channels` | the channels you are part of on a product. | — |
285
+ | `makea-cli supplier list custom-step` | read | `GET /supplier/products/{product_id}/custom_steps` | the steps the brand added that you do. | — |
272
286
  | `makea-cli supplier list note` | read | `GET /supplier/products/{product_id}/channels/{channel_key}/notes` | the conversation in one channel. | — |
273
287
  | `makea-cli supplier list production-order` | read | `GET /supplier/production_orders` | your production orders, optionally for one RFQ. | — |
274
288
  | `makea-cli supplier list quote-edit-request` | read | `GET /supplier/quote_requests/{quote_request_id}/quote_edit_requests` | changes the brand has asked you to make to a quote you already sent. | — |
275
289
  | `makea-cli supplier list rfq` | read | `GET /supplier/quote_requests` | the RFQs (quote requests) sent to you. | — |
276
290
  | `makea-cli supplier list task` | read | `GET /supplier/tasks` | your onboarding and per-order to-dos. | — |
291
+ | `makea-cli supplier submit custom-step` | write(ask) | `POST /supplier/products/{product_id}/custom_steps/{step_id}/{move}` | your move on an added step: done, upload, or submit a round (`--file`, `--note`). Adding or changing steps is the brand's. | — |
292
+ | `makea-cli supplier submit order-acceptance` | write(ask) | `POST /supplier/production_orders/{production_order_id}/lead_time` | accept the order after the deposit with the date bulk will be done (`--completion-date`). | — |
277
293
  | `makea-cli supplier submit quote` | write(ask) | `POST /supplier/quote_requests/{id}/submit_quote` | submit your quote for an RFQ. --file is the supplier link payload as JSON (same shape the web form posts); run with -… | — |
294
+ | `makea-cli supplier submit sample-shipment` | write(ask) | `POST /supplier/sampling_orders/{sampling_order_id}/ship` | send the sample: `--carrier`, `--tracking-number`, `--tracking-url`. | — |
278
295
  | `makea-cli supplier update action` | write(auto) | `POST /supplier/actions/{action_id}/{acknowledge\|snooze}` | respond to a pending action. Acknowledging says you have seen it; the action still closes on the fact it asks for. | — |
279
296
  | `makea-cli supplier update quote` | write(ask) | `POST /supplier/quote_requests/{quote_request_id}/links/{link_id}/edit` | revise a quote you already sent. --file is the same payload shape as submit; --dry-run first. | — |
280
297
  | `makea-cli supplier update rfq` | write(ask) | `POST /supplier/quote_requests/{quote_request_id}/{status\|archive\|accept_terms}` | answer an RFQ. --status accepts or declines the invitation; --archive takes it off your board; --accept-terms accepts… | — |
@@ -79,6 +79,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
79
79
  |---|---|---|---|---|
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 consignment` | write(ask) | `POST /admin/{production_orders\|shipping_orders}/{id}/consignments` | add one lot leaving the factory with its own tracking number, pieces, cartons, kg and ship date. The lot that brings the pieces up to the order is marked last unless `--last/--not-last` says. | — |
82
+ | `makea-cli admin create custom-step` | write(ask) | `POST /admin/products/{product_id}/order_flow/custom_steps` | add a step to one order as makea: `--label`, `--after` (a step id), `--placement inline\|alongside\|beside`, `--joins` / `--no-joins`, `--who`, `--done-when check\|upload\|send`, due (`--due-date` or `--due-days` + `--due-before`), `--hold` (checks in a production step), `--note`. | — |
82
83
  | `makea-cli admin create feature-flag` | write(ask) | `POST /admin/feature-flags` | add a flag (off unless --enabled). An existing key is refused. | — |
83
84
  | `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` |
84
85
  | `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. | — |
@@ -94,6 +95,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
94
95
  | `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` |
95
96
  | `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. | — |
96
97
  | `makea-cli admin delete consignment` | write(ask) | `DELETE /admin/{production_orders\|shipping_orders}/{id}/consignments/{consignment_id}` | remove a lot entered by mistake. A delivered lot cannot be removed. | — |
98
+ | `makea-cli admin delete custom-step` | write(ask) | `DELETE /admin/products/{product_id}/order_flow/custom_steps/{step_id}` | remove an added step while nothing was sent or uploaded on it; otherwise skip it. | — |
97
99
  | `makea-cli admin delete ship-log` | write(ask) | `DELETE /admin/ship-log/deploys/{deploy_id}` | remove a Ship log entry recorded by mistake, with its recordings. | — |
98
100
  | `makea-cli admin delete feature-flag` | write(ask) | `DELETE /admin/feature-flags/{key}` | remove a flag. Every check of it then reads false, so delete it only once the code that reads it is gone. | — |
99
101
  | `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` |
@@ -118,6 +120,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
118
120
  | `makea-cli admin get playbook-preview` | read | `GET /admin/playbook/preview` | the playbook block one AI surface would get for a person or factory, and every rule left out with its reason; --product previews a conversation about one product, --rule answers for one rule. | — |
119
121
  | `makea-cli admin get product-status` | read | `GET /admin/products/{product_id}/status` | where the product is: stage · step · owner for each supplier on it (the shared status model), plus the step catalog. | — |
120
122
  | `makea-cli admin get product-step` | read | `GET /admin/products/{product_id}/suppliers/{supplier_id}/change_step` | the step one factory is at on a product and the steps admin update product-step can move it to (options; money steps are listed but never selectable). | — |
123
+ | `makea-cli admin get order-flow` | read | `GET /admin/products/{product_id}/order_flow` | an order's steps by stage: state, whose move it is, dates, key dates, factory names; added steps carry `custom`. | — |
121
124
  | `makea-cli admin get production-order` | read | `GET /admin/production_orders/{production_order_id}/details` | one production (or restock) order in full: items, status, progress steps, tracking, notes, documents and linked suppliers. For only its pricing use admin get production-pricing. | — |
122
125
  | `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` |
123
126
  | `makea-cli admin get quote-request` | read | `GET /admin/quote_requests/{quote_request_id}` | one quote request in full. | — |
@@ -156,6 +159,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
156
159
  | `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` |
157
160
  | `makea-cli admin set sampling-order-tracking` | write(ask) | `PUT /admin/sampling_orders/{sampling_order_id}/tracking` | the sample's parcel: tracking number, URL, shipping method, carrier. Only what you pass is changed; an empty string clears a field. | — |
158
161
  | `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` |
162
+ | `makea-cli admin submit custom-step` | write(ask) | `POST /admin/products/{product_id}/order_flow/custom_steps/{step_id}/{move}` | make an added step's move (`--move done\|upload\|submit\|approve\|send-back\|skip`) as makea, or `--as supplier` for the step's factory (done, upload, submit); `--file` uploads under the brand. | — |
159
163
  | `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. | — |
160
164
  | `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. | — |
161
165
  | `makea-cli admin update feature-flag` | write(ask) | `PATCH /admin/feature-flags/{key}` | flip the global switch, edit the description or default value, or add / remove one account on the allow-list (by user id; find it with admin list user). | — |
@@ -172,6 +176,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
172
176
  | `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` |
173
177
  | `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. | — |
174
178
  | `makea-cli admin update consignment` | write(ask) | `PUT /admin/{production_orders\|shipping_orders}/{id}/consignments/{consignment_id}` | edit one lot; `--delivered` marks it delivered through the tracking sweep path (a middle lot tells the brand in-app and on WhatsApp, the last one delivers the order); `--silent` tells nobody. | — |
179
+ | `makea-cli admin update custom-step` | write(ask) | `PATCH /admin/products/{product_id}/order_flow/custom_steps/{step_id}` | change an added step that is not done or skipped; only the options given, including `--placement` and `--joins`. | — |
175
180
  | `makea-cli admin update ship-log` | write(ask) | `PATCH /admin/ship-log/deploys/{deploy_id}` | fix a Ship log entry's title, summary or watch note; `--media` attaches more recordings. | — |
176
181
  | `makea-cli admin update tech-spec` | write(ask) | `POST /admin/products/{id}/technical-specifications` | persist specs from a JSON file. | `save-product-tech-spec` |
177
182
  | `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). | — |
@@ -191,6 +196,9 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
191
196
  |---|---|---|---|---|
192
197
  | `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… | — |
193
198
  | `makea-cli designer create collection` | write(auto) | `POST /designer/collections/create` | create or update a designer collection. | `designer-create-collection` |
199
+ | `makea-cli designer create custom-step` | write(ask) | `POST /designer/products/{product_id}/order_flow/custom_steps` | add a step to your order: `--after`, `--placement inline\|alongside\|beside` (default alongside), `--joins` / `--no-joins`, `--who`, `--done-when`, due, `--note`. | — |
200
+ | `makea-cli designer create custom-steps` | write(ask) | `POST /designer/products/{product_id}/order_flow/custom_steps/batch` | add several steps at once from `--file` (a JSON list; each item names `after` or `anchor_type`). | — |
201
+ | `makea-cli designer list step-library` | read | `GET /designer/products/{product_id}/order_flow/step_library` | steps used on your other orders, your step rules, and this order's steps a new one can follow. | — |
194
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. | — |
195
203
  | `makea-cli designer create note` | write(ask) | `POST /designer/products/{product_id}/notes` | post a message into a product's conversation. | — |
196
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. | — |
@@ -233,6 +241,10 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
233
241
  | `makea-cli designer update product` | write(auto) | `POST /designer/product/update_basic_info` | patch fields on a product. --cover-image / --back-image take a document id and are what the assistant's set_product_i… | — |
234
242
  | `makea-cli designer update production-order` | write(ask) | `POST /designer/production_orders/{production_order_id}/complete` | POST /designer/production_orders/{id}/complete, or PUT the order to re-pick which supplier links it covers (--links-f… | — |
235
243
  | `makea-cli designer create proposal` | write(auto) | `POST /designer/products/{product_id}/tech_spec/proposals` | propose a tech-pack change as a card on the field it changes; the user applies it. Name section/field as `get tech-pack --readable` shows them; --item / --entry pick a row, --was a line. | — |
244
+ | `makea-cli designer delete custom-step` | write(ask) | `DELETE /designer/products/{product_id}/order_flow/custom_steps/{step_id}` | remove a step you added while nothing was sent on it; the steps after it close up. | — |
245
+ | `makea-cli designer get order-flow` | read | `GET /designer/products/{product_id}/order_flow` | your order's steps, the branch/join moves of lines added alongside, and what each step `waits_for`. | — |
246
+ | `makea-cli designer submit custom-step` | write(ask) | `POST /designer/products/{product_id}/order_flow/custom_steps/{step_id}/{move}` | your move on an added step: done, upload, approve, send-back (`--comment`), skip (`--reason`). | — |
247
+ | `makea-cli designer update custom-step` | write(ask) | `PATCH /designer/products/{product_id}/order_flow/custom_steps/{step_id}` | change a step you added, including where it goes (`--after`, `--placement`, `--joins`). | — |
236
248
  | `makea-cli designer update proposal` | write(ask) | `POST /designer/beeboo_proposals/approve` | apply one spec change the assistant proposed. This edits the pack, so read the proposal first. | — |
237
249
  | `makea-cli designer update sampling-order` | write(never) | `POST /designer/sampling_orders/{sampling_order_id}/cancel` | cancel a sample order. Graded `never`: an agent must not do this on its own, a person runs it. | — |
238
250
  | `makea-cli designer update shipping-order` | write(ask) | `POST /designer/shipping_orders/{shipping_order_id}/confirm_receive` | say the goods arrived. The backend accepts this only while the shipment is IN_TRANSIT. | — |
@@ -247,18 +259,23 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
247
259
  | `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. | — |
248
260
  | `makea-cli supplier download document` | read | `GET /supplier/document/download` | save a document you are allowed to read. | — |
249
261
  | `makea-cli supplier 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. | — |
262
+ | `makea-cli supplier get order-flow` | read | `GET /supplier/products/{product_id}/order_flow` | your read of an order: request, one row per quote, your sample and bulk steps, holds (`waits_for`). | — |
250
263
  | `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). | — |
251
264
  | `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. | — |
252
265
  | `makea-cli supplier get profile` | read | `GET /supplier/profile` | your own supplier profile. | — |
253
266
  | `makea-cli supplier get rfq` | read | `GET /supplier/quote_requests` | one RFQ in full. | — |
254
267
  | `makea-cli supplier list action` | read | `GET /supplier/actions` | what the platform is waiting on you for (pending actions). | — |
255
268
  | `makea-cli supplier list channel` | read | `GET /supplier/products/{product_id}/channels` | the channels you are part of on a product. | — |
269
+ | `makea-cli supplier list custom-step` | read | `GET /supplier/products/{product_id}/custom_steps` | the steps the brand added that you do. | — |
256
270
  | `makea-cli supplier list note` | read | `GET /supplier/products/{product_id}/channels/{channel_key}/notes` | the conversation in one channel. | — |
257
271
  | `makea-cli supplier list production-order` | read | `GET /supplier/production_orders` | your production orders, optionally for one RFQ. | — |
258
272
  | `makea-cli supplier list quote-edit-request` | read | `GET /supplier/quote_requests/{quote_request_id}/quote_edit_requests` | changes the brand has asked you to make to a quote you already sent. | — |
259
273
  | `makea-cli supplier list rfq` | read | `GET /supplier/quote_requests` | the RFQs (quote requests) sent to you. | — |
260
274
  | `makea-cli supplier list task` | read | `GET /supplier/tasks` | your onboarding and per-order to-dos. | — |
275
+ | `makea-cli supplier submit custom-step` | write(ask) | `POST /supplier/products/{product_id}/custom_steps/{step_id}/{move}` | your move on an added step: done, upload, or submit a round (`--file`, `--note`). Adding or changing steps is the brand's. | — |
276
+ | `makea-cli supplier submit order-acceptance` | write(ask) | `POST /supplier/production_orders/{production_order_id}/lead_time` | accept the order after the deposit with the date bulk will be done (`--completion-date`). | — |
261
277
  | `makea-cli supplier submit quote` | write(ask) | `POST /supplier/quote_requests/{id}/submit_quote` | submit your quote for an RFQ. --file is the supplier link payload as JSON (same shape the web form posts); run with -… | — |
278
+ | `makea-cli supplier submit sample-shipment` | write(ask) | `POST /supplier/sampling_orders/{sampling_order_id}/ship` | send the sample: `--carrier`, `--tracking-number`, `--tracking-url`. | — |
262
279
  | `makea-cli supplier update action` | write(auto) | `POST /supplier/actions/{action_id}/{acknowledge\|snooze}` | respond to a pending action. Acknowledging says you have seen it; the action still closes on the fact it asks for. | — |
263
280
  | `makea-cli supplier update quote` | write(ask) | `POST /supplier/quote_requests/{quote_request_id}/links/{link_id}/edit` | revise a quote you already sent. --file is the same payload shape as submit; --dry-run first. | — |
264
281
  | `makea-cli supplier update rfq` | write(ask) | `POST /supplier/quote_requests/{quote_request_id}/{status\|archive\|accept_terms}` | answer an RFQ. --status accepts or declines the invitation; --archive takes it off your board; --accept-terms accepts… | — |
@@ -0,0 +1 @@
1
+ __version__ = "0.2.38"
@@ -1432,6 +1432,133 @@ def admin_change_step(product_id: str, supplier_id: str, body: dict[str, Any]) -
1432
1432
  return post_json(f"/admin/products/{product_id}/suppliers/{supplier_id}/change_step", body)
1433
1433
 
1434
1434
 
1435
+ def admin_get_order_flow(product_id: str) -> Any:
1436
+ """GET /admin/products/{id}/order_flow — the order's steps read for makea, the
1437
+ factories' names and the brand's user id."""
1438
+ return get_json(f"/admin/products/{product_id}/order_flow")
1439
+
1440
+
1441
+ def _custom_step_path(product_id: str, step_id: str | None = None) -> str:
1442
+ path = f"/admin/products/{product_id}/order_flow/custom_steps"
1443
+ # A step id carries "#" and "@": encoded whole, as one path segment.
1444
+ return f"{path}/{quote(step_id, safe='')}" if step_id else path
1445
+
1446
+
1447
+ def admin_add_custom_step(product_id: str, body: dict[str, Any]) -> Any:
1448
+ """POST .../order_flow/custom_steps — {label, after, who, completion, due, hold, note,
1449
+ supplier_id?, placement?, joins?}."""
1450
+ return post_json(_custom_step_path(product_id), body)
1451
+
1452
+
1453
+ def admin_update_custom_step(product_id: str, step_id: str, body: dict[str, Any]) -> Any:
1454
+ """PATCH .../order_flow/custom_steps/{step_id} — only the fields given."""
1455
+ return patch_json(_custom_step_path(product_id, step_id), body)
1456
+
1457
+
1458
+ def admin_delete_custom_step(product_id: str, step_id: str) -> Any:
1459
+ """DELETE .../order_flow/custom_steps/{step_id} — only while nothing happened on it."""
1460
+ return delete_json(_custom_step_path(product_id, step_id))
1461
+
1462
+
1463
+ def admin_custom_step_move(product_id: str, step_id: str, move: str, body: dict[str, Any]) -> Any:
1464
+ """POST .../order_flow/custom_steps/{step_id}/{move} — done | upload | submit |
1465
+ approve | send_back | skip, {"as": "makea" | "supplier", files?, note?, comment?,
1466
+ reason?}."""
1467
+ return post_json(f"{_custom_step_path(product_id, step_id)}/{move}", body)
1468
+
1469
+
1470
+ # --- an order's steps from the brand's and the factory's own seats -----------------
1471
+
1472
+
1473
+ def _designer_step_path(product_id: str, step_id: str | None = None) -> str:
1474
+ path = f"/designer/products/{product_id}/order_flow/custom_steps"
1475
+ return f"{path}/{quote(step_id, safe='')}" if step_id else path
1476
+
1477
+
1478
+ def designer_get_order_flow(product_id: str) -> Any:
1479
+ """GET /designer/products/{id}/order_flow — the order's steps as the brand reads them."""
1480
+ return get_json(f"/designer/products/{product_id}/order_flow")
1481
+
1482
+
1483
+ def designer_step_library(product_id: str) -> Any:
1484
+ """GET /designer/products/{id}/order_flow/step_library — the steps the brand
1485
+ used on its other orders, its step rules, and this order's steps a new one
1486
+ may follow."""
1487
+ return get_json(f"/designer/products/{product_id}/order_flow/step_library")
1488
+
1489
+
1490
+ def designer_add_custom_steps(product_id: str, steps: list[dict[str, Any]]) -> Any:
1491
+ """POST /designer/products/{id}/order_flow/custom_steps/batch — several
1492
+ steps at once; each names ``after`` or ``anchor_type``."""
1493
+ return post_json(f"{_designer_step_path(product_id)}/batch", {"steps": steps})
1494
+
1495
+
1496
+ def designer_add_custom_step(product_id: str, body: dict[str, Any]) -> Any:
1497
+ """POST /designer/products/{id}/order_flow/custom_steps — {label, after, who,
1498
+ completion, due, hold, note, placement?, joins?}."""
1499
+ return post_json(_designer_step_path(product_id), body)
1500
+
1501
+
1502
+ def designer_update_custom_step(product_id: str, step_id: str, body: dict[str, Any]) -> Any:
1503
+ """PATCH /designer/products/{id}/order_flow/custom_steps/{step_id} — the fields given."""
1504
+ return patch_json(_designer_step_path(product_id, step_id), body)
1505
+
1506
+
1507
+ def designer_delete_custom_step(product_id: str, step_id: str) -> Any:
1508
+ """DELETE /designer/products/{id}/order_flow/custom_steps/{step_id}."""
1509
+ return delete_json(_designer_step_path(product_id, step_id))
1510
+
1511
+
1512
+ def designer_custom_step_move(
1513
+ product_id: str, step_id: str, move: str, body: dict[str, Any]
1514
+ ) -> Any:
1515
+ """POST /designer/products/{id}/order_flow/custom_steps/{step_id}/{move} — done |
1516
+ upload | approve | send_back | skip."""
1517
+ return post_json(f"{_designer_step_path(product_id, step_id)}/{move}", body)
1518
+
1519
+
1520
+ def supplier_get_order_flow(product_id: str) -> Any:
1521
+ """GET /supplier/products/{id}/order_flow — the factory's own read of the order."""
1522
+ return get_json(f"/supplier/products/{product_id}/order_flow")
1523
+
1524
+
1525
+ def supplier_list_custom_steps(product_id: str) -> Any:
1526
+ """GET /supplier/products/{id}/custom_steps — the added steps the factory does."""
1527
+ return get_json(f"/supplier/products/{product_id}/custom_steps")
1528
+
1529
+
1530
+ def supplier_custom_step_move(
1531
+ product_id: str, step_id: str, move: str, body: dict[str, Any]
1532
+ ) -> Any:
1533
+ """POST /supplier/products/{id}/custom_steps/{step_id}/{move} — done | upload | submit."""
1534
+ return post_json(
1535
+ f"/supplier/products/{product_id}/custom_steps/{quote(step_id, safe='')}/{move}", body
1536
+ )
1537
+
1538
+
1539
+ def supplier_ship_sample(sampling_order_id: str, body: dict[str, Any]) -> Any:
1540
+ """POST /supplier/sampling_orders/{id}/ship — {carrier, tracking_number, tracking_url?}."""
1541
+ return post_json(f"/supplier/sampling_orders/{sampling_order_id}/ship", body)
1542
+
1543
+
1544
+ def supplier_confirm_production_date(production_order_id: str, body: dict[str, Any]) -> Any:
1545
+ """POST /supplier/production_orders/{id}/lead_time — {completion_date, note?}: accept
1546
+ the order with the date bulk will be done."""
1547
+ return post_json(f"/supplier/production_orders/{production_order_id}/lead_time", body)
1548
+
1549
+
1550
+ def supplier_upload_document(
1551
+ file_path: Path, *, product_id: str, doc_type: str = "NOTE_ATTACHMENT"
1552
+ ) -> Any:
1553
+ """POST /supplier/upload_document — multipart ``file`` with ``product_id`` and
1554
+ ``doc_type``; returns the document id."""
1555
+ return post_multipart_with_file(
1556
+ "/supplier/upload_document",
1557
+ file_path=file_path,
1558
+ form_fields={"product_id": product_id, "doc_type": doc_type},
1559
+ )
1560
+
1561
+
1435
1562
  def admin_list_product_notes(product_id: str) -> Any:
1436
1563
  """GET /admin/products/{id}/notes — the product's customer notes."""
1437
1564
  return get_json(f"/admin/products/{product_id}/notes")
@@ -15,6 +15,7 @@ from makea_cli.commands.files.cmd import register as register_files
15
15
  from makea_cli.commands.flags.cmd import register as register_flags
16
16
  from makea_cli.commands.library.cmd import register as register_library
17
17
  from makea_cli.commands.metrics.cmd import register as register_metrics
18
+ from makea_cli.commands.order_flow.cmd import register as register_order_flow
18
19
  from makea_cli.commands.orders.cmd import register as register_orders
19
20
  from makea_cli.commands.playbook.cmd import register as register_playbook
20
21
  from makea_cli.commands.product.cmd import register as register_product
@@ -31,6 +32,7 @@ def register_all(app: typer.Typer) -> None:
31
32
  register_document(app)
32
33
  register_supplier(app)
33
34
  register_orders(app)
35
+ register_order_flow(app)
34
36
  register_product(app)
35
37
  register_production(app)
36
38
  register_shipping(app)
@@ -0,0 +1,3 @@
1
+ from makea_cli.commands.order_flow.cmd import register
2
+
3
+ __all__ = ["register"]