makea-cli 0.2.23__tar.gz → 0.2.24__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.23 → makea_cli-0.2.24}/CHANGELOG.md +6 -0
  2. {makea_cli-0.2.23 → makea_cli-0.2.24}/PKG-INFO +1 -2
  3. {makea_cli-0.2.23 → makea_cli-0.2.24}/README.md +0 -1
  4. makea_cli-0.2.24/makea_cli/__init__.py +1 -0
  5. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/api_client.py +0 -26
  6. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/metrics/cmd.py +0 -88
  7. {makea_cli-0.2.23 → makea_cli-0.2.24}/pyproject.toml +1 -1
  8. {makea_cli-0.2.23 → makea_cli-0.2.24}/tests/golden_manifest.json +0 -84
  9. {makea_cli-0.2.23 → makea_cli-0.2.24}/uv.lock +1 -1
  10. makea_cli-0.2.23/makea_cli/__init__.py +0 -1
  11. {makea_cli-0.2.23 → makea_cli-0.2.24}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
  12. {makea_cli-0.2.23 → makea_cli-0.2.24}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
  13. {makea_cli-0.2.23 → makea_cli-0.2.24}/.claude/skills/link-supplier-user/SKILL.md +0 -0
  14. {makea_cli-0.2.23 → makea_cli-0.2.24}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
  15. {makea_cli-0.2.23 → makea_cli-0.2.24}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
  16. {makea_cli-0.2.23 → makea_cli-0.2.24}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
  17. {makea_cli-0.2.23 → makea_cli-0.2.24}/.gitignore +0 -0
  18. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea-collection-upload/SKILL.md +0 -0
  19. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea-collection-upload/scripts/create_products.py +0 -0
  20. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/__main__.py +0 -0
  21. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/auth_pkce.py +0 -0
  22. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/broker.py +0 -0
  23. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/__init__.py +0 -0
  24. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/_util.py +0 -0
  25. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/about/__init__.py +0 -0
  26. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/about/cmd.py +0 -0
  27. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/analytics/__init__.py +0 -0
  28. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/analytics/cmd.py +0 -0
  29. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/auth/__init__.py +0 -0
  30. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/auth/cmd.py +0 -0
  31. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/brand/__init__.py +0 -0
  32. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/brand/cmd.py +0 -0
  33. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/designer/__init__.py +0 -0
  34. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/designer/cmd.py +0 -0
  35. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/directory/__init__.py +0 -0
  36. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/directory/cmd.py +0 -0
  37. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/document/__init__.py +0 -0
  38. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/document/cmd.py +0 -0
  39. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/email/__init__.py +0 -0
  40. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/email/cmd.py +0 -0
  41. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/factory/__init__.py +0 -0
  42. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/factory/cmd.py +0 -0
  43. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/library/__init__.py +0 -0
  44. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/library/cmd.py +0 -0
  45. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/metrics/__init__.py +0 -0
  46. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/orders/__init__.py +0 -0
  47. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/orders/cmd.py +0 -0
  48. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/playbook/__init__.py +0 -0
  49. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/playbook/cmd.py +0 -0
  50. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/product/__init__.py +0 -0
  51. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/product/cmd.py +0 -0
  52. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/production/__init__.py +0 -0
  53. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/production/cmd.py +0 -0
  54. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/production/pricing_spec.py +0 -0
  55. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/shipping/__init__.py +0 -0
  56. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/shipping/cmd.py +0 -0
  57. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/supplier/__init__.py +0 -0
  58. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/supplier/cmd.py +0 -0
  59. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/tasks/__init__.py +0 -0
  60. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/commands/tasks/cmd.py +0 -0
  61. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/config.py +0 -0
  62. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/errors.py +0 -0
  63. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/identity.py +0 -0
  64. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/main.py +0 -0
  65. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/output.py +0 -0
  66. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/posthog_client.py +0 -0
  67. {makea_cli-0.2.23 → makea_cli-0.2.24}/makea_cli/registry.py +0 -0
  68. {makea_cli-0.2.23 → makea_cli-0.2.24}/npm/makea-cli/README.md +0 -0
  69. {makea_cli-0.2.23 → makea_cli-0.2.24}/npm/makea-cli/makea-cli.mjs +0 -0
  70. {makea_cli-0.2.23 → makea_cli-0.2.24}/npm/makea-cli/package.json +0 -0
  71. {makea_cli-0.2.23 → makea_cli-0.2.24}/tests/test_broker.py +0 -0
  72. {makea_cli-0.2.23 → makea_cli-0.2.24}/tests/test_currency_conversion.py +0 -0
  73. {makea_cli-0.2.23 → makea_cli-0.2.24}/tests/test_output_contract.py +0 -0
  74. {makea_cli-0.2.23 → makea_cli-0.2.24}/tests/test_persona_commands.py +0 -0
  75. {makea_cli-0.2.23 → makea_cli-0.2.24}/tests/test_pm_reads.py +0 -0
  76. {makea_cli-0.2.23 → makea_cli-0.2.24}/tests/test_registry.py +0 -0
  77. {makea_cli-0.2.23 → makea_cli-0.2.24}/tests/test_supplier_scorecard.py +0 -0
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.24
4
+
5
+ Removed: `admin get revenue-metrics` (legacy `get-cumulative-payment-and-platform-revenue`).
6
+ The backend endpoint is gone; it was never the reconciled figure. Use
7
+ `admin get growth-snapshot` for platform money.
8
+
3
9
  ## 0.2.23
4
10
 
5
11
  New: Growth Analysis snapshots, the numbers on admin Metrics. Needs the
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: makea-cli
3
- Version: 0.2.23
3
+ Version: 0.2.24
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
@@ -119,7 +119,6 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
119
119
  | `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. | — |
120
120
  | `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` |
121
121
  | `makea-cli admin get quote-request` | read | `GET /admin/quote_requests/{quote_request_id}` | one quote request in full. | — |
122
- | `makea-cli admin get revenue-metrics` | read | `GET /admin/business-metrics/cumulative-payment-and-platform-revenue` | platform-wide payment received and platform revenue (service fee + transaction fee) bucketed over a date range. | `get-cumulative-payment-and-platform-revenue` |
123
122
  | `makea-cli admin get rule` | read | `GET /admin/playbook/{target}/rules/{rule_id}` | one rule in full (`--user` / `--supplier` / `--global`), with its evidence: where it came from, who changed it and why. | — |
124
123
  | `makea-cli admin get rule-history` | read | `GET /admin/playbook/rules/{rule_id}/history` | every revision of one rule: its words, who changed it and why, and the rule that replaced it. | — |
125
124
  | `makea-cli admin get shipping-order` | read | `GET /admin/shipping_orders/{shipping_order_id}/details` | one shipment with its production and sampling orders, freight quotes, fees, tracking and address. | — |
@@ -107,7 +107,6 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
107
107
  | `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. | — |
108
108
  | `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` |
109
109
  | `makea-cli admin get quote-request` | read | `GET /admin/quote_requests/{quote_request_id}` | one quote request in full. | — |
110
- | `makea-cli admin get revenue-metrics` | read | `GET /admin/business-metrics/cumulative-payment-and-platform-revenue` | platform-wide payment received and platform revenue (service fee + transaction fee) bucketed over a date range. | `get-cumulative-payment-and-platform-revenue` |
111
110
  | `makea-cli admin get rule` | read | `GET /admin/playbook/{target}/rules/{rule_id}` | one rule in full (`--user` / `--supplier` / `--global`), with its evidence: where it came from, who changed it and why. | — |
112
111
  | `makea-cli admin get rule-history` | read | `GET /admin/playbook/rules/{rule_id}/history` | every revision of one rule: its words, who changed it and why, and the rule that replaced it. | — |
113
112
  | `makea-cli admin get shipping-order` | read | `GET /admin/shipping_orders/{shipping_order_id}/details` | one shipment with its production and sampling orders, freight quotes, fees, tracking and address. | — |
@@ -0,0 +1 @@
1
+ __version__ = "0.2.24"
@@ -907,32 +907,6 @@ def update_production_order_details(
907
907
  )
908
908
 
909
909
 
910
- def get_cumulative_payment_and_platform_revenue(
911
- *,
912
- start_date: str,
913
- end_date: str,
914
- granularity: str | None = None,
915
- currency: str | None = None,
916
- order_type: str | None = None,
917
- ) -> Any:
918
- """
919
- GET /admin/business-metrics/cumulative-payment-and-platform-revenue —
920
- platform-wide cumulative payment received and platform revenue (service fee +
921
- transaction fee) within a date range, bucketed by day/week/month.
922
- """
923
- params: dict[str, Any] = {"start_date": start_date, "end_date": end_date}
924
- if granularity is not None:
925
- params["granularity"] = granularity
926
- if currency is not None:
927
- params["currency"] = currency
928
- if order_type is not None:
929
- params["order_type"] = order_type
930
- return get_json(
931
- "/admin/business-metrics/cumulative-payment-and-platform-revenue",
932
- params=params,
933
- )
934
-
935
-
936
910
  def list_growth_snapshots() -> Any:
937
911
  """GET /admin/growth/snapshots — published Growth Analysis snapshots, newest first."""
938
912
  return get_json("/admin/growth/snapshots")
@@ -14,96 +14,8 @@ from makea_cli.commands._util import print_json_or_exit
14
14
 
15
15
  console = Console()
16
16
 
17
- _GRANULARITIES = ("day", "week", "month")
18
- _ORDER_TYPES = ("all", "sampling", "production")
19
-
20
17
 
21
18
  def register(app: typer.Typer) -> None:
22
- @command(
23
- app,
24
- "admin",
25
- "get",
26
- "revenue-metrics",
27
- legacy="get-cumulative-payment-and-platform-revenue",
28
- api="GET /admin/business-metrics/cumulative-payment-and-platform-revenue",
29
- help=(
30
- "GET /admin/business-metrics/cumulative-payment-and-platform-revenue — "
31
- "platform-wide payment received and platform revenue (service fee + "
32
- "transaction fee) bucketed over a date range."
33
- ),
34
- )
35
- def get_cumulative_payment_and_platform_revenue(
36
- start_date: str = typer.Option(
37
- ...,
38
- "--start-date",
39
- help="Start date (inclusive), ISO format YYYY-MM-DD.",
40
- ),
41
- end_date: str = typer.Option(
42
- ...,
43
- "--end-date",
44
- help="End date (inclusive), ISO format YYYY-MM-DD.",
45
- ),
46
- granularity: str = typer.Option(
47
- "day",
48
- "--granularity",
49
- "-g",
50
- help="Time bucket: day, week, or month. Default: day.",
51
- ),
52
- currency: str = typer.Option(
53
- "GBP",
54
- "--currency",
55
- "-c",
56
- help="Target currency for conversion. Default: GBP.",
57
- ),
58
- order_type: str = typer.Option(
59
- "all",
60
- "--order-type",
61
- "-t",
62
- help="Filter: all, sampling, or production. Default: all.",
63
- ),
64
- ) -> None:
65
- """
66
- Platform-wide cumulative payment received and platform revenue over a date range.
67
-
68
- Calls GET /admin/business-metrics/cumulative-payment-and-platform-revenue.
69
-
70
- Platform revenue = service fee + transaction fee (the 2.8% transaction fee is
71
- applied by the server). The response contains two siblings under ``result``:
72
-
73
- - ``payment_received``: cumulative/period amounts per bucket, plus a
74
- ``payment_breakdown`` (sampling / production_deposit / production_final).
75
- - ``platform_revenue``: cumulative/period amounts per bucket.
76
-
77
- Input: required --start-date and --end-date (YYYY-MM-DD); optional
78
- --granularity (day|week|month), --currency, --order-type (all|sampling|production).
79
-
80
- Output: raw JSON body from the admin business-metrics endpoint.
81
-
82
- This endpoint is **platform-wide only** and does not support filtering by
83
- user_id, product, or category. For per-user / per-product drill-downs, use
84
- admin list product-order / admin list sampling-order --product /
85
- admin list production-order --product and aggregate client-side.
86
- """
87
- g = granularity.strip().lower()
88
- if g not in _GRANULARITIES:
89
- console.print(f"[red]--granularity must be one of: {', '.join(_GRANULARITIES)}.[/red]")
90
- raise typer.Exit(1)
91
- ot = order_type.strip().lower()
92
- if ot not in _ORDER_TYPES:
93
- console.print(f"[red]--order-type must be one of: {', '.join(_ORDER_TYPES)}.[/red]")
94
- raise typer.Exit(1)
95
-
96
- print_json_or_exit(
97
- console,
98
- lambda: api_client.get_cumulative_payment_and_platform_revenue(
99
- start_date=start_date,
100
- end_date=end_date,
101
- granularity=g,
102
- currency=currency,
103
- order_type=ot,
104
- ),
105
- )
106
-
107
19
  @command(
108
20
  app,
109
21
  "admin",
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "makea-cli"
7
- version = "0.2.23"
7
+ version = "0.2.24"
8
8
  description = "Makea admin CLI (browser login + Makea admin HTTP API)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -2342,90 +2342,6 @@
2342
2342
  }
2343
2343
  ]
2344
2344
  },
2345
- {
2346
- "name": "admin get revenue-metrics",
2347
- "persona": "admin",
2348
- "verb": "get",
2349
- "noun": "revenue-metrics",
2350
- "access": "read",
2351
- "api": "GET /admin/business-metrics/cumulative-payment-and-platform-revenue",
2352
- "external": null,
2353
- "side_effects": [],
2354
- "approval": "auto",
2355
- "reversible": null,
2356
- "idempotent": null,
2357
- "limit": null,
2358
- "legacy": [
2359
- "get-cumulative-payment-and-platform-revenue"
2360
- ],
2361
- "help": "GET /admin/business-metrics/cumulative-payment-and-platform-revenue — platform-wide payment received and platform revenue (service fee + transaction fee) bucketed over a date range.",
2362
- "function": "makea_cli.commands.metrics.cmd.register.<locals>.get_cumulative_payment_and_platform_revenue",
2363
- "flags": [
2364
- {
2365
- "name": "start_date",
2366
- "kind": "option",
2367
- "opts": [
2368
- "--start-date"
2369
- ],
2370
- "type": "text",
2371
- "required": true,
2372
- "multiple": false,
2373
- "default": null,
2374
- "help": "Start date (inclusive), ISO format YYYY-MM-DD."
2375
- },
2376
- {
2377
- "name": "end_date",
2378
- "kind": "option",
2379
- "opts": [
2380
- "--end-date"
2381
- ],
2382
- "type": "text",
2383
- "required": true,
2384
- "multiple": false,
2385
- "default": null,
2386
- "help": "End date (inclusive), ISO format YYYY-MM-DD."
2387
- },
2388
- {
2389
- "name": "granularity",
2390
- "kind": "option",
2391
- "opts": [
2392
- "--granularity",
2393
- "-g"
2394
- ],
2395
- "type": "text",
2396
- "required": false,
2397
- "multiple": false,
2398
- "default": "day",
2399
- "help": "Time bucket: day, week, or month. Default: day."
2400
- },
2401
- {
2402
- "name": "currency",
2403
- "kind": "option",
2404
- "opts": [
2405
- "--currency",
2406
- "-c"
2407
- ],
2408
- "type": "text",
2409
- "required": false,
2410
- "multiple": false,
2411
- "default": "GBP",
2412
- "help": "Target currency for conversion. Default: GBP."
2413
- },
2414
- {
2415
- "name": "order_type",
2416
- "kind": "option",
2417
- "opts": [
2418
- "--order-type",
2419
- "-t"
2420
- ],
2421
- "type": "text",
2422
- "required": false,
2423
- "multiple": false,
2424
- "default": "all",
2425
- "help": "Filter: all, sampling, or production. Default: all."
2426
- }
2427
- ]
2428
- },
2429
2345
  {
2430
2346
  "name": "admin get rule",
2431
2347
  "persona": "admin",
@@ -115,7 +115,7 @@ wheels = [
115
115
 
116
116
  [[package]]
117
117
  name = "makea-cli"
118
- version = "0.2.21"
118
+ version = "0.2.24"
119
119
  source = { editable = "." }
120
120
  dependencies = [
121
121
  { name = "click" },
@@ -1 +0,0 @@
1
- __version__ = "0.2.23"
File without changes
File without changes