makea-cli 0.2.21__tar.gz → 0.2.22__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 (77) hide show
  1. {makea_cli-0.2.21 → makea_cli-0.2.22}/CHANGELOG.md +14 -0
  2. {makea_cli-0.2.21 → makea_cli-0.2.22}/PKG-INFO +4 -4
  3. {makea_cli-0.2.21 → makea_cli-0.2.22}/README.md +3 -3
  4. makea_cli-0.2.22/makea_cli/__init__.py +1 -0
  5. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/playbook/cmd.py +22 -3
  6. {makea_cli-0.2.21 → makea_cli-0.2.22}/pyproject.toml +1 -1
  7. {makea_cli-0.2.21 → makea_cli-0.2.22}/tests/golden_manifest.json +26 -2
  8. makea_cli-0.2.21/makea_cli/__init__.py +0 -1
  9. {makea_cli-0.2.21 → makea_cli-0.2.22}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
  10. {makea_cli-0.2.21 → makea_cli-0.2.22}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
  11. {makea_cli-0.2.21 → makea_cli-0.2.22}/.claude/skills/link-supplier-user/SKILL.md +0 -0
  12. {makea_cli-0.2.21 → makea_cli-0.2.22}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
  13. {makea_cli-0.2.21 → makea_cli-0.2.22}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
  14. {makea_cli-0.2.21 → makea_cli-0.2.22}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
  15. {makea_cli-0.2.21 → makea_cli-0.2.22}/.gitignore +0 -0
  16. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea-collection-upload/SKILL.md +0 -0
  17. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea-collection-upload/scripts/create_products.py +0 -0
  18. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/__main__.py +0 -0
  19. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/api_client.py +0 -0
  20. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/auth_pkce.py +0 -0
  21. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/broker.py +0 -0
  22. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/__init__.py +0 -0
  23. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/_util.py +0 -0
  24. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/about/__init__.py +0 -0
  25. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/about/cmd.py +0 -0
  26. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/analytics/__init__.py +0 -0
  27. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/analytics/cmd.py +0 -0
  28. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/auth/__init__.py +0 -0
  29. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/auth/cmd.py +0 -0
  30. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/brand/__init__.py +0 -0
  31. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/brand/cmd.py +0 -0
  32. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/designer/__init__.py +0 -0
  33. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/designer/cmd.py +0 -0
  34. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/directory/__init__.py +0 -0
  35. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/directory/cmd.py +0 -0
  36. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/document/__init__.py +0 -0
  37. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/document/cmd.py +0 -0
  38. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/email/__init__.py +0 -0
  39. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/email/cmd.py +0 -0
  40. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/factory/__init__.py +0 -0
  41. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/factory/cmd.py +0 -0
  42. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/library/__init__.py +0 -0
  43. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/library/cmd.py +0 -0
  44. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/metrics/__init__.py +0 -0
  45. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/metrics/cmd.py +0 -0
  46. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/orders/__init__.py +0 -0
  47. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/orders/cmd.py +0 -0
  48. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/playbook/__init__.py +0 -0
  49. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/product/__init__.py +0 -0
  50. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/product/cmd.py +0 -0
  51. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/production/__init__.py +0 -0
  52. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/production/cmd.py +0 -0
  53. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/production/pricing_spec.py +0 -0
  54. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/shipping/__init__.py +0 -0
  55. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/shipping/cmd.py +0 -0
  56. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/supplier/__init__.py +0 -0
  57. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/supplier/cmd.py +0 -0
  58. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/tasks/__init__.py +0 -0
  59. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/commands/tasks/cmd.py +0 -0
  60. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/config.py +0 -0
  61. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/errors.py +0 -0
  62. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/identity.py +0 -0
  63. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/main.py +0 -0
  64. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/output.py +0 -0
  65. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/posthog_client.py +0 -0
  66. {makea_cli-0.2.21 → makea_cli-0.2.22}/makea_cli/registry.py +0 -0
  67. {makea_cli-0.2.21 → makea_cli-0.2.22}/npm/makea-cli/README.md +0 -0
  68. {makea_cli-0.2.21 → makea_cli-0.2.22}/npm/makea-cli/makea-cli.mjs +0 -0
  69. {makea_cli-0.2.21 → makea_cli-0.2.22}/npm/makea-cli/package.json +0 -0
  70. {makea_cli-0.2.21 → makea_cli-0.2.22}/tests/test_broker.py +0 -0
  71. {makea_cli-0.2.21 → makea_cli-0.2.22}/tests/test_currency_conversion.py +0 -0
  72. {makea_cli-0.2.21 → makea_cli-0.2.22}/tests/test_output_contract.py +0 -0
  73. {makea_cli-0.2.21 → makea_cli-0.2.22}/tests/test_persona_commands.py +0 -0
  74. {makea_cli-0.2.21 → makea_cli-0.2.22}/tests/test_pm_reads.py +0 -0
  75. {makea_cli-0.2.21 → makea_cli-0.2.22}/tests/test_registry.py +0 -0
  76. {makea_cli-0.2.21 → makea_cli-0.2.22}/tests/test_supplier_scorecard.py +0 -0
  77. {makea_cli-0.2.21 → makea_cli-0.2.22}/uv.lock +0 -0
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.22
4
+
5
+ New: what the brand reads under a rule, and its card name. Needs the backend
6
+ from the same day.
7
+
8
+ - `admin create / update rule --why … --proof "WHO|YYYY-MM-DD|TEXT"`: the
9
+ reason the brand reads under a rule on Knowledge > Rules, and up to 5
10
+ messages behind it (WHO is Brand, Factory, record or a name). Kept apart
11
+ from `--reason`, which only admins see. (The flags went out in 0.2.21; the
12
+ backend reads them from this release.)
13
+ - `admin create / update rule --title …`: the rule's card name on the Rules
14
+ page. Beeboo names every rule by itself; `update --title ""` hands it back.
15
+ - `admin list / get rule` show each rule's `title`.
16
+
3
17
  ## 0.2.21
4
18
 
5
19
  New: the Makea team's task queue. Needs the backend from the same day
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: makea-cli
3
- Version: 0.2.21
3
+ Version: 0.2.22
4
4
  Summary: Makea admin CLI (browser login + Makea admin HTTP API)
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: click<9,>=8.1
@@ -92,7 +92,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
92
92
  | `makea-cli admin backfill supplier-id` | write(never) | `POST /admin/supplier/backfill_supplier_id_with_quote_requests` | Migrate supplier_id from a wrong UUID to the Cognito user sub (user_id): profile + Cognito supplierReferenceId, optio… | `backfill-supplier-id` |
93
93
  | `makea-cli admin create library-element` | write(auto) | `POST /admin/designer/{user_id}/library_components` | save a reusable component under a designer. Provide --section and --values (see admin get library-schema). | `library-create` |
94
94
  | `makea-cli admin create quote-request` | write(ask) | `POST /admin/supplier/create_quote_request` | create/send a quote request to a supplier for a product (admin). | `create-quote-request` |
95
- | `makea-cli admin create rule` | write(ask) | `POST /admin/playbook/{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. | — |
95
+ | `makea-cli admin create rule` | write(ask) | `POST /admin/playbook/{target}/rules` | add a rule to a person's (`--user`, user_id or email), a factory's (`--supplier`) or the platform-wide (`--global`, max 30 live) AI playbook; admin-authored, active unless --status. Refuses a repeat or a conflict unless --force. --reason required; --why / --proof are what the brand reads under it, --title its card name. | — |
96
96
  | `makea-cli admin create shipping-fee` | write(ask) | `POST /admin/shipping_orders/{shipping_order_id}/fees/add` | add a fee (fixed amount or percentage) on top of the freight. | — |
97
97
  | `makea-cli admin create shipping-option` | write(ask) | `POST /admin/shipping_orders/{shipping_order_id}/shipping-options` | add one freight quote (provider, speed, price, currency). | — |
98
98
  | `makea-cli admin create shipping-order` | write(ask) | `POST /admin/shipping_orders/create` | make a shipment for a brand's production and/or sampling orders. The shipment belongs to the orders' owner; you are r… | — |
@@ -133,7 +133,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
133
133
  | `makea-cli admin list production-order` | read | `GET /admin/production_orders?type=PRODUCTION` | 大货 (production) orders only. For restock use admin list restock-order; for shipping use admin list shipping-order. | `list-all-production-orders` |
134
134
  | `makea-cli admin list quote-request` | read | `GET /admin/quote_requests` | quote requests, optionally for one product (--product) or one supplier (--supplier, GET /admin/quote_requests/supplie… | — |
135
135
  | `makea-cli admin list restock-order` | read | `GET /admin/production_orders?type=RESTOCK` | restock orders only. Restock shares the production_orders table; this filters to type=RESTOCK. | `list-all-restock-orders` |
136
- | `makea-cli admin list rule` | read | `GET /admin/playbook/{target}/rules` | every AI playbook rule for one person (team, own account, factory), one factory (`--supplier`) or the platform (`--global`): status, scope, text, which products, effect, source. Archived ones only with --all. | — |
136
+ | `makea-cli admin list rule` | read | `GET /admin/playbook/{target}/rules` | every AI playbook rule for one person (team, own account, factory), one factory (`--supplier`) or the platform (`--global`): status, scope, title, text, which products, effect, source. Archived ones only with --all. | — |
137
137
  | `makea-cli admin list sampling-order` | read | `GET /admin/sampling_orders/get_all` | paginated list of all sampling orders (admin). | `list-all-sampling-orders` |
138
138
  | `makea-cli admin list shipping-order` | read | `GET /admin/shipping_orders` | paginated list of all shipping orders (admin). | `list-all-shipping-orders` |
139
139
  | `makea-cli admin list supplier` | read | `GET /admin/supplier/get_all_suppliers` | list all suppliers (admin). | `list-suppliers` |
@@ -150,7 +150,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
150
150
  | `makea-cli admin update library-element` | write(auto) | `PATCH /admin/designer/{user_id}/library_components/{component_id}` | update a component's name and/or values (empty value clears a field). | `library-update` |
151
151
  | `makea-cli admin update quote` | write(ask) | `POST /admin/product/edit_supplier_link_override_info` | admin updates an existing quote (supplier link) in place. Only the options you pass are sent, and the backend leaves … | `update-supplier-quote` |
152
152
  | `makea-cli admin update quote-request` | write(ask) | `PATCH /admin/quote_requests/{quote_request_id}/update` | set a quote request's stage, status and/or due date. Only what you pass is changed. This is the door that unblocks a … | `update-quote-request` |
153
- | `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/{target}/rules/{rule_id}` | change a rule's text, status, applies_to, when, mode or end date (--valid-until), on `--user` / `--supplier` / `--global`. --reason required; the rule keeps what it was before. | — |
153
+ | `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/{target}/rules/{rule_id}` | change a rule's text, status, applies_to, when, mode or end date (--valid-until), the --why / --proof the brand reads, or its card --title, on `--user` / `--supplier` / `--global`. --reason required; the rule keeps what it was before. | — |
154
154
  | `makea-cli admin update shipping-order` | write(ask) | `PUT /admin/shipping_orders/{shipping_order_id}/status` | Change a shipment: --status (PUT .../status), tracking flags (POST .../tracking), --address (PUT .../shipping-address… | — |
155
155
  | `makea-cli admin update supplier` | write(ask) | `PUT /admin/supplier/update_supplier` | update an existing supplier from a JSON file (admin). Run `makea-cli get-supplier-profile-schema` FIRST to get the fi… | `update-supplier` |
156
156
  | `makea-cli admin update task` | write(ask) | `POST /admin/tasks/{task_id}/{done\|dismiss}` | close a Makea task with a note: `--done` once handled (a held lesson's `--reason` goes to Beeboo's next reading), or `--dismiss`. | — |
@@ -80,7 +80,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
80
80
  | `makea-cli admin backfill supplier-id` | write(never) | `POST /admin/supplier/backfill_supplier_id_with_quote_requests` | Migrate supplier_id from a wrong UUID to the Cognito user sub (user_id): profile + Cognito supplierReferenceId, optio… | `backfill-supplier-id` |
81
81
  | `makea-cli admin create library-element` | write(auto) | `POST /admin/designer/{user_id}/library_components` | save a reusable component under a designer. Provide --section and --values (see admin get library-schema). | `library-create` |
82
82
  | `makea-cli admin create quote-request` | write(ask) | `POST /admin/supplier/create_quote_request` | create/send a quote request to a supplier for a product (admin). | `create-quote-request` |
83
- | `makea-cli admin create rule` | write(ask) | `POST /admin/playbook/{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. | — |
83
+ | `makea-cli admin create rule` | write(ask) | `POST /admin/playbook/{target}/rules` | add a rule to a person's (`--user`, user_id or email), a factory's (`--supplier`) or the platform-wide (`--global`, max 30 live) AI playbook; admin-authored, active unless --status. Refuses a repeat or a conflict unless --force. --reason required; --why / --proof are what the brand reads under it, --title its card name. | — |
84
84
  | `makea-cli admin create shipping-fee` | write(ask) | `POST /admin/shipping_orders/{shipping_order_id}/fees/add` | add a fee (fixed amount or percentage) on top of the freight. | — |
85
85
  | `makea-cli admin create shipping-option` | write(ask) | `POST /admin/shipping_orders/{shipping_order_id}/shipping-options` | add one freight quote (provider, speed, price, currency). | — |
86
86
  | `makea-cli admin create shipping-order` | write(ask) | `POST /admin/shipping_orders/create` | make a shipment for a brand's production and/or sampling orders. The shipment belongs to the orders' owner; you are r… | — |
@@ -121,7 +121,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
121
121
  | `makea-cli admin list production-order` | read | `GET /admin/production_orders?type=PRODUCTION` | 大货 (production) orders only. For restock use admin list restock-order; for shipping use admin list shipping-order. | `list-all-production-orders` |
122
122
  | `makea-cli admin list quote-request` | read | `GET /admin/quote_requests` | quote requests, optionally for one product (--product) or one supplier (--supplier, GET /admin/quote_requests/supplie… | — |
123
123
  | `makea-cli admin list restock-order` | read | `GET /admin/production_orders?type=RESTOCK` | restock orders only. Restock shares the production_orders table; this filters to type=RESTOCK. | `list-all-restock-orders` |
124
- | `makea-cli admin list rule` | read | `GET /admin/playbook/{target}/rules` | every AI playbook rule for one person (team, own account, factory), one factory (`--supplier`) or the platform (`--global`): status, scope, text, which products, effect, source. Archived ones only with --all. | — |
124
+ | `makea-cli admin list rule` | read | `GET /admin/playbook/{target}/rules` | every AI playbook rule for one person (team, own account, factory), one factory (`--supplier`) or the platform (`--global`): status, scope, title, text, which products, effect, source. Archived ones only with --all. | — |
125
125
  | `makea-cli admin list sampling-order` | read | `GET /admin/sampling_orders/get_all` | paginated list of all sampling orders (admin). | `list-all-sampling-orders` |
126
126
  | `makea-cli admin list shipping-order` | read | `GET /admin/shipping_orders` | paginated list of all shipping orders (admin). | `list-all-shipping-orders` |
127
127
  | `makea-cli admin list supplier` | read | `GET /admin/supplier/get_all_suppliers` | list all suppliers (admin). | `list-suppliers` |
@@ -138,7 +138,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
138
138
  | `makea-cli admin update library-element` | write(auto) | `PATCH /admin/designer/{user_id}/library_components/{component_id}` | update a component's name and/or values (empty value clears a field). | `library-update` |
139
139
  | `makea-cli admin update quote` | write(ask) | `POST /admin/product/edit_supplier_link_override_info` | admin updates an existing quote (supplier link) in place. Only the options you pass are sent, and the backend leaves … | `update-supplier-quote` |
140
140
  | `makea-cli admin update quote-request` | write(ask) | `PATCH /admin/quote_requests/{quote_request_id}/update` | set a quote request's stage, status and/or due date. Only what you pass is changed. This is the door that unblocks a … | `update-quote-request` |
141
- | `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/{target}/rules/{rule_id}` | change a rule's text, status, applies_to, when, mode or end date (--valid-until), on `--user` / `--supplier` / `--global`. --reason required; the rule keeps what it was before. | — |
141
+ | `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/{target}/rules/{rule_id}` | change a rule's text, status, applies_to, when, mode or end date (--valid-until), the --why / --proof the brand reads, or its card --title, on `--user` / `--supplier` / `--global`. --reason required; the rule keeps what it was before. | — |
142
142
  | `makea-cli admin update shipping-order` | write(ask) | `PUT /admin/shipping_orders/{shipping_order_id}/status` | Change a shipment: --status (PUT .../status), tracking flags (POST .../tracking), --address (PUT .../shipping-address… | — |
143
143
  | `makea-cli admin update supplier` | write(ask) | `PUT /admin/supplier/update_supplier` | update an existing supplier from a JSON file (admin). Run `makea-cli get-supplier-profile-schema` FIRST to get the fi… | `update-supplier` |
144
144
  | `makea-cli admin update task` | write(ask) | `POST /admin/tasks/{task_id}/{done\|dismiss}` | close a Makea task with a note: `--done` once handled (a held lesson's `--reason` goes to Beeboo's next reading), or `--dismiss`. | — |
@@ -0,0 +1 @@
1
+ __version__ = "0.2.22"
@@ -62,6 +62,10 @@ one message behind it, WHO|YYYY-MM-DD|TEXT or WHO|TEXT, WHO being Brand,
62
62
  Factory, record or a name. Both are kept apart from --reason, which only
63
63
  admins see. A later --why/--proof replaces the earlier pair.
64
64
 
65
+ --title is the rule's card name on the brand's Rules page ("Restate every
66
+ comment"). Beeboo names every rule by itself; a --title given here holds
67
+ until the rule's words change. update --title "" hands naming back to Beeboo.
68
+
65
69
  --when is which products it is for, as JSON:
66
70
  '{"categories": ["knitwear"], "service_modes": ["cmt"]}'
67
71
  Order conditions the rule already has (units, destination) are kept; {} means
@@ -129,6 +133,15 @@ def _why_option() -> Any:
129
133
  )
130
134
 
131
135
 
136
+ def _title_option() -> Any:
137
+ return typer.Option(
138
+ None,
139
+ "--title",
140
+ help="The card name on the brand's Rules page, 2-4 words (Beeboo names it "
141
+ 'when left out; "" on update hands it back to Beeboo).',
142
+ )
143
+
144
+
132
145
  def _proof_option() -> Any:
133
146
  return typer.Option(
134
147
  None,
@@ -402,6 +415,7 @@ def register(app: typer.Typer) -> None:
402
415
  ),
403
416
  why: str | None = _why_option(),
404
417
  proof: list[str] | None = _proof_option(),
418
+ title: str | None = _title_option(),
405
419
  ) -> None:
406
420
  """Add a playbook rule for a person, a factory or everyone."""
407
421
  base = _target(user, supplier, is_global)
@@ -429,6 +443,8 @@ def register(app: typer.Typer) -> None:
429
443
  if valid_until is not None:
430
444
  body["valid_until"] = _date(valid_until)
431
445
  _basis(body, why, proof)
446
+ if title is not None and title.strip():
447
+ body["title"] = " ".join(title.split())
432
448
  print_json_or_exit(console, lambda: api_client.admin_create_rule(base, body))
433
449
 
434
450
  @command(
@@ -446,8 +462,8 @@ def register(app: typer.Typer) -> None:
446
462
  idempotent=True,
447
463
  help=(
448
464
  "PATCH /admin/playbook/{target}/rules/{rule_id} — change a rule's text, "
449
- "status, applies_to, when, mode, or the --why/--proof the brand reads. --reason "
450
- "required; the rule keeps what it was before."
465
+ "status, applies_to, when, mode, the --why/--proof the brand reads, or its card "
466
+ "--title. --reason required; the rule keeps what it was before."
451
467
  ),
452
468
  epilog=_RULES_EPILOG,
453
469
  )
@@ -473,6 +489,7 @@ def register(app: typer.Typer) -> None:
473
489
  ),
474
490
  why: str | None = _why_option(),
475
491
  proof: list[str] | None = _proof_option(),
492
+ title: str | None = _title_option(),
476
493
  ) -> None:
477
494
  """Edit a playbook rule."""
478
495
  base = _target(user, supplier, is_global)
@@ -492,10 +509,12 @@ def register(app: typer.Typer) -> None:
492
509
  "" if valid_until.strip().lower() == "none" else _date(valid_until)
493
510
  )
494
511
  _basis(body, why, proof)
512
+ if title is not None:
513
+ body["title"] = " ".join(title.split())
495
514
  if not body:
496
515
  raise typer.BadParameter(
497
516
  "nothing to change: pass --text, --status, --applies-to, --when, --mode, "
498
- "--valid-until, --why or --proof"
517
+ "--valid-until, --why, --proof or --title"
499
518
  )
500
519
  body["reason"] = _reason(reason)
501
520
  print_json_or_exit(console, lambda: api_client.admin_update_rule(base, rule_id, body))
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "makea-cli"
7
- version = "0.2.21"
7
+ version = "0.2.22"
8
8
  description = "Makea admin CLI (browser login + Makea admin HTTP API)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -546,6 +546,18 @@
546
546
  "multiple": true,
547
547
  "default": null,
548
548
  "help": "A message behind the rule, WHO|YYYY-MM-DD|TEXT or WHO|TEXT (repeatable, max 5)."
549
+ },
550
+ {
551
+ "name": "title",
552
+ "kind": "option",
553
+ "opts": [
554
+ "--title"
555
+ ],
556
+ "type": "text",
557
+ "required": false,
558
+ "multiple": false,
559
+ "default": null,
560
+ "help": "The card name on the brand's Rules page, 2-4 words (Beeboo names it when left out; \"\" on update hands it back to Beeboo)."
549
561
  }
550
562
  ]
551
563
  },
@@ -5059,7 +5071,7 @@
5059
5071
  "idempotent": true,
5060
5072
  "limit": null,
5061
5073
  "legacy": [],
5062
- "help": "PATCH /admin/playbook/{target}/rules/{rule_id} — change a rule's text, status, applies_to, when, mode, or the --why/--proof the brand reads. --reason required; the rule keeps what it was before.",
5074
+ "help": "PATCH /admin/playbook/{target}/rules/{rule_id} — change a rule's text, status, applies_to, when, mode, the --why/--proof the brand reads, or its card --title. --reason required; the rule keeps what it was before.",
5063
5075
  "function": "makea_cli.commands.playbook.cmd.register.<locals>.update_rule",
5064
5076
  "flags": [
5065
5077
  {
@@ -5219,6 +5231,18 @@
5219
5231
  "multiple": true,
5220
5232
  "default": null,
5221
5233
  "help": "A message behind the rule, WHO|YYYY-MM-DD|TEXT or WHO|TEXT (repeatable, max 5)."
5234
+ },
5235
+ {
5236
+ "name": "title",
5237
+ "kind": "option",
5238
+ "opts": [
5239
+ "--title"
5240
+ ],
5241
+ "type": "text",
5242
+ "required": false,
5243
+ "multiple": false,
5244
+ "default": null,
5245
+ "help": "The card name on the brand's Rules page, 2-4 words (Beeboo names it when left out; \"\" on update hands it back to Beeboo)."
5222
5246
  }
5223
5247
  ]
5224
5248
  },
@@ -9914,4 +9938,4 @@
9914
9938
  ]
9915
9939
  }
9916
9940
  ]
9917
- }
9941
+ }
@@ -1 +0,0 @@
1
- __version__ = "0.2.21"
File without changes
File without changes
File without changes