makea-cli 0.2.21__py3-none-any.whl → 0.2.22__py3-none-any.whl
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/__init__.py +1 -1
- makea_cli/commands/playbook/cmd.py +22 -3
- {makea_cli-0.2.21.dist-info → makea_cli-0.2.22.dist-info}/METADATA +4 -4
- {makea_cli-0.2.21.dist-info → makea_cli-0.2.22.dist-info}/RECORD +6 -6
- {makea_cli-0.2.21.dist-info → makea_cli-0.2.22.dist-info}/WHEEL +0 -0
- {makea_cli-0.2.21.dist-info → makea_cli-0.2.22.dist-info}/entry_points.txt +0 -0
makea_cli/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
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,
|
|
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 --
|
|
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))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: makea-cli
|
|
3
|
-
Version: 0.2.
|
|
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`. | — |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
makea_cli/__init__.py,sha256=
|
|
1
|
+
makea_cli/__init__.py,sha256=ByX4mXI7ZzGpflAj9VCqX2NLBK8uAil5WOrao7y2YZM,23
|
|
2
2
|
makea_cli/__main__.py,sha256=AkQjxWfKE3w9iD1d6I-2Zqvv2t9cct0oYyFF0UiA-Z0,144
|
|
3
3
|
makea_cli/api_client.py,sha256=SJu96FAB2jjbXtbg6rz9dbJfAdR-xodP_7bwsQnLn2c,74802
|
|
4
4
|
makea_cli/auth_pkce.py,sha256=iXSyJ7DM3qVuj-3FwPiqM25CxXz9ebFs9FNthZdw3ws,7315
|
|
@@ -37,7 +37,7 @@ makea_cli/commands/metrics/cmd.py,sha256=ox5OD7Bk3QJcdHQv5u4t6G-OlC6eSbQG5BEH1yB
|
|
|
37
37
|
makea_cli/commands/orders/__init__.py,sha256=6WKPqX02e0RRPmItPIBJ0TA4_yDI2PVvBDkAiMQu9rU,75
|
|
38
38
|
makea_cli/commands/orders/cmd.py,sha256=Nh5lGv5k4SIwsr_hg-ndah8eTorZCYIMpTAz4CCi6oY,13352
|
|
39
39
|
makea_cli/commands/playbook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
-
makea_cli/commands/playbook/cmd.py,sha256=
|
|
40
|
+
makea_cli/commands/playbook/cmd.py,sha256=NiiVjfGLbNEqzfqqkxjxj-p6DZZI-7owRg1UtxtuG6M,21683
|
|
41
41
|
makea_cli/commands/product/__init__.py,sha256=mfdonFmpbddDSlJq6JWNWgNpM6aOpKtZr-3FJ6scrwg,76
|
|
42
42
|
makea_cli/commands/product/cmd.py,sha256=W0oVTZvsK1QWZWv2x6NC26_JQMXrO16O8gYuKYPWC08,7101
|
|
43
43
|
makea_cli/commands/production/__init__.py,sha256=Whn5ziwVMt4jzcokiFWLhWIpRLYC-ldnjZgAzeQ3We4,79
|
|
@@ -49,7 +49,7 @@ makea_cli/commands/supplier/__init__.py,sha256=qfQDeQdQ-B7I_uwFVfcp1vXFUTL4fAcNL
|
|
|
49
49
|
makea_cli/commands/supplier/cmd.py,sha256=crRCy9WfhkryHMIL3iufoiT90_SG3-mKChAtdhd06uc,58076
|
|
50
50
|
makea_cli/commands/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
51
|
makea_cli/commands/tasks/cmd.py,sha256=SRvv4Ovtcf5-me-8AdKcZ_z_gSrdgC0pbswYbMz7oY4,6539
|
|
52
|
-
makea_cli-0.2.
|
|
53
|
-
makea_cli-0.2.
|
|
54
|
-
makea_cli-0.2.
|
|
55
|
-
makea_cli-0.2.
|
|
52
|
+
makea_cli-0.2.22.dist-info/METADATA,sha256=_4x_4_mqAfhiet0nJk5tmxAGBiGA63OGT8eeEO4Gtnk,37484
|
|
53
|
+
makea_cli-0.2.22.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
54
|
+
makea_cli-0.2.22.dist-info/entry_points.txt,sha256=4x-lbVa1jBbNlkNq7L-rYyfRh2spZmc3BLIzP-Dl-Qk,50
|
|
55
|
+
makea_cli-0.2.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|