makea-cli 0.2.18__tar.gz → 0.2.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {makea_cli-0.2.18 → makea_cli-0.2.19}/CHANGELOG.md +8 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/PKG-INFO +2 -2
- {makea_cli-0.2.18 → makea_cli-0.2.19}/README.md +1 -1
- makea_cli-0.2.19/makea_cli/__init__.py +1 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/playbook/cmd.py +26 -1
- {makea_cli-0.2.18 → makea_cli-0.2.19}/pyproject.toml +1 -1
- {makea_cli-0.2.18 → makea_cli-0.2.19}/tests/golden_manifest.json +24 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/uv.lock +1 -1
- makea_cli-0.2.18/makea_cli/__init__.py +0 -1
- {makea_cli-0.2.18 → makea_cli-0.2.19}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/.claude/skills/link-supplier-user/SKILL.md +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/.gitignore +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea-collection-upload/SKILL.md +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea-collection-upload/scripts/create_products.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/__main__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/api_client.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/auth_pkce.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/broker.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/_util.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/analytics/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/analytics/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/auth/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/auth/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/brand/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/brand/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/designer/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/designer/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/directory/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/directory/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/document/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/document/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/email/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/email/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/factory/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/factory/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/library/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/library/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/metrics/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/metrics/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/orders/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/orders/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/playbook/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/product/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/product/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/production/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/production/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/production/pricing_spec.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/shipping/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/shipping/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/supplier/__init__.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/commands/supplier/cmd.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/config.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/errors.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/identity.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/main.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/output.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/posthog_client.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/makea_cli/registry.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/npm/makea-cli/README.md +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/npm/makea-cli/makea-cli.mjs +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/npm/makea-cli/package.json +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/tests/test_broker.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/tests/test_currency_conversion.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/tests/test_output_contract.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/tests/test_persona_commands.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/tests/test_pm_reads.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/tests/test_registry.py +0 -0
- {makea_cli-0.2.18 → makea_cli-0.2.19}/tests/test_supplier_scorecard.py +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.19
|
|
4
|
+
|
|
5
|
+
- `admin create rule` and `admin update rule` take `--valid-until YYYY-MM-DD`:
|
|
6
|
+
the day the rule ends (a closure, a temporary arrangement). From the day
|
|
7
|
+
after, it is in no prompt and does nothing; `playbook-preview` lists it as
|
|
8
|
+
"Ended". `--valid-until none` on update removes the end date. Needs the
|
|
9
|
+
backend from 3c1dc4e4.
|
|
10
|
+
|
|
3
11
|
## 0.2.18
|
|
4
12
|
|
|
5
13
|
New: see why a playbook rule did not reach Beeboo, and what a rule said
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: makea-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.19
|
|
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
|
|
@@ -143,7 +143,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
143
143
|
| `makea-cli admin update library-element` | write(auto) | `PATCH /admin/designer/{user_id}/library_components/{component_id}` | update a component's name and/or values (empty value clears a field). | `library-update` |
|
|
144
144
|
| `makea-cli admin update quote` | write(ask) | `POST /admin/product/edit_supplier_link_override_info` | admin updates an existing quote (supplier link) in place. Only the options you pass are sent, and the backend leaves … | `update-supplier-quote` |
|
|
145
145
|
| `makea-cli admin update quote-request` | write(ask) | `PATCH /admin/quote_requests/{quote_request_id}/update` | set a quote request's stage, status and/or due date. Only what you pass is changed. This is the door that unblocks a … | `update-quote-request` |
|
|
146
|
-
| `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/users/{user}/rules/{rule_id}` | change a rule's text, status, applies_to, when or
|
|
146
|
+
| `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/users/{user}/rules/{rule_id}` | change a rule's text, status, applies_to, when, mode or end date (--valid-until). --reason required; the rule keeps what it was before. | — |
|
|
147
147
|
| `makea-cli admin update shipping-order` | write(ask) | `PUT /admin/shipping_orders/{shipping_order_id}/status` | Change a shipment: --status (PUT .../status), tracking flags (POST .../tracking), --address (PUT .../shipping-address… | — |
|
|
148
148
|
| `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` |
|
|
149
149
|
| `makea-cli admin update tech-spec` | write(ask) | `POST /admin/products/{id}/technical-specifications` | persist specs from a JSON file. | `save-product-tech-spec` |
|
|
@@ -131,7 +131,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
131
131
|
| `makea-cli admin update library-element` | write(auto) | `PATCH /admin/designer/{user_id}/library_components/{component_id}` | update a component's name and/or values (empty value clears a field). | `library-update` |
|
|
132
132
|
| `makea-cli admin update quote` | write(ask) | `POST /admin/product/edit_supplier_link_override_info` | admin updates an existing quote (supplier link) in place. Only the options you pass are sent, and the backend leaves … | `update-supplier-quote` |
|
|
133
133
|
| `makea-cli admin update quote-request` | write(ask) | `PATCH /admin/quote_requests/{quote_request_id}/update` | set a quote request's stage, status and/or due date. Only what you pass is changed. This is the door that unblocks a … | `update-quote-request` |
|
|
134
|
-
| `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/users/{user}/rules/{rule_id}` | change a rule's text, status, applies_to, when or
|
|
134
|
+
| `makea-cli admin update rule` | write(ask) | `PATCH /admin/playbook/users/{user}/rules/{rule_id}` | change a rule's text, status, applies_to, when, mode or end date (--valid-until). --reason required; the rule keeps what it was before. | — |
|
|
135
135
|
| `makea-cli admin update shipping-order` | write(ask) | `PUT /admin/shipping_orders/{shipping_order_id}/status` | Change a shipment: --status (PUT .../status), tracking flags (POST .../tracking), --address (PUT .../shipping-address… | — |
|
|
136
136
|
| `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` |
|
|
137
137
|
| `makea-cli admin update tech-spec` | write(ask) | `POST /admin/products/{id}/technical-specifications` | persist specs from a JSON file. | `save-product-tech-spec` |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.19"
|
|
@@ -17,6 +17,7 @@ the row stays as the record, and ``update --status active`` brings it back.
|
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
19
|
import json
|
|
20
|
+
from datetime import date
|
|
20
21
|
from typing import Any
|
|
21
22
|
|
|
22
23
|
import typer
|
|
@@ -107,6 +108,13 @@ def _when(raw: str) -> dict[str, Any]:
|
|
|
107
108
|
return data
|
|
108
109
|
|
|
109
110
|
|
|
111
|
+
def _date(raw: str) -> str:
|
|
112
|
+
try:
|
|
113
|
+
return date.fromisoformat(raw.strip()).isoformat()
|
|
114
|
+
except ValueError as e:
|
|
115
|
+
raise typer.BadParameter("--valid-until: expected YYYY-MM-DD") from e
|
|
116
|
+
|
|
117
|
+
|
|
110
118
|
def _choice(value: str | None, allowed: tuple[str, ...], flag: str) -> str | None:
|
|
111
119
|
if value is None:
|
|
112
120
|
return None
|
|
@@ -290,6 +298,11 @@ def register(app: typer.Typer) -> None:
|
|
|
290
298
|
force: bool = typer.Option(
|
|
291
299
|
False, "--force", help="Add even if it repeats or disagrees with an existing rule."
|
|
292
300
|
),
|
|
301
|
+
valid_until: str | None = typer.Option(
|
|
302
|
+
None,
|
|
303
|
+
"--valid-until",
|
|
304
|
+
help="YYYY-MM-DD the rule ends on (a closure, a temporary arrangement).",
|
|
305
|
+
),
|
|
293
306
|
) -> None:
|
|
294
307
|
"""Add a playbook rule for a person."""
|
|
295
308
|
body: dict[str, Any] = {"text": text, "reason": _reason(reason)}
|
|
@@ -311,6 +324,8 @@ def register(app: typer.Typer) -> None:
|
|
|
311
324
|
body["status"] = _choice(status, ("pending", "active", "muted"), "--status")
|
|
312
325
|
if force:
|
|
313
326
|
body["force"] = True
|
|
327
|
+
if valid_until is not None:
|
|
328
|
+
body["valid_until"] = _date(valid_until)
|
|
314
329
|
print_json_or_exit(console, lambda: api_client.admin_create_user_rule(user, body))
|
|
315
330
|
|
|
316
331
|
@command(
|
|
@@ -345,6 +360,11 @@ def register(app: typer.Typer) -> None:
|
|
|
345
360
|
None, "--when", help="Which products, JSON ({} for every product)."
|
|
346
361
|
),
|
|
347
362
|
mode: str | None = typer.Option(None, "--mode", help="remind or act."),
|
|
363
|
+
valid_until: str | None = typer.Option(
|
|
364
|
+
None,
|
|
365
|
+
"--valid-until",
|
|
366
|
+
help='YYYY-MM-DD the rule ends on; "none" removes the end date.',
|
|
367
|
+
),
|
|
348
368
|
) -> None:
|
|
349
369
|
"""Edit a person's playbook rule."""
|
|
350
370
|
body: dict[str, Any] = {}
|
|
@@ -358,9 +378,14 @@ def register(app: typer.Typer) -> None:
|
|
|
358
378
|
body["when"] = _when(when)
|
|
359
379
|
if mode is not None:
|
|
360
380
|
body["mode"] = _choice(mode, _MODES, "--mode")
|
|
381
|
+
if valid_until is not None:
|
|
382
|
+
body["valid_until"] = (
|
|
383
|
+
"" if valid_until.strip().lower() == "none" else _date(valid_until)
|
|
384
|
+
)
|
|
361
385
|
if not body:
|
|
362
386
|
raise typer.BadParameter(
|
|
363
|
-
"nothing to change: pass --text, --status, --applies-to, --when
|
|
387
|
+
"nothing to change: pass --text, --status, --applies-to, --when, --mode "
|
|
388
|
+
"or --valid-until"
|
|
364
389
|
)
|
|
365
390
|
body["reason"] = _reason(reason)
|
|
366
391
|
print_json_or_exit(console, lambda: api_client.admin_update_user_rule(user, rule_id, body))
|
|
@@ -486,6 +486,18 @@
|
|
|
486
486
|
"multiple": false,
|
|
487
487
|
"default": false,
|
|
488
488
|
"help": "Add even if it repeats or disagrees with an existing rule."
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"name": "valid_until",
|
|
492
|
+
"kind": "option",
|
|
493
|
+
"opts": [
|
|
494
|
+
"--valid-until"
|
|
495
|
+
],
|
|
496
|
+
"type": "text",
|
|
497
|
+
"required": false,
|
|
498
|
+
"multiple": false,
|
|
499
|
+
"default": null,
|
|
500
|
+
"help": "YYYY-MM-DD the rule ends on (a closure, a temporary arrangement)."
|
|
489
501
|
}
|
|
490
502
|
]
|
|
491
503
|
},
|
|
@@ -4560,6 +4572,18 @@
|
|
|
4560
4572
|
"multiple": false,
|
|
4561
4573
|
"default": null,
|
|
4562
4574
|
"help": "remind or act."
|
|
4575
|
+
},
|
|
4576
|
+
{
|
|
4577
|
+
"name": "valid_until",
|
|
4578
|
+
"kind": "option",
|
|
4579
|
+
"opts": [
|
|
4580
|
+
"--valid-until"
|
|
4581
|
+
],
|
|
4582
|
+
"type": "text",
|
|
4583
|
+
"required": false,
|
|
4584
|
+
"multiple": false,
|
|
4585
|
+
"default": null,
|
|
4586
|
+
"help": "YYYY-MM-DD the rule ends on; \"none\" removes the end date."
|
|
4563
4587
|
}
|
|
4564
4588
|
]
|
|
4565
4589
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.18"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|