makea-cli 0.2.38__tar.gz → 0.2.39__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.38 → makea_cli-0.2.39}/CHANGELOG.md +11 -0
  2. {makea_cli-0.2.38 → makea_cli-0.2.39}/PKG-INFO +2 -1
  3. {makea_cli-0.2.38 → makea_cli-0.2.39}/README.md +1 -0
  4. makea_cli-0.2.39/makea_cli/__init__.py +1 -0
  5. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/api_client.py +7 -0
  6. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/metrics/cmd.py +47 -0
  7. {makea_cli-0.2.38 → makea_cli-0.2.39}/pyproject.toml +1 -1
  8. {makea_cli-0.2.38 → makea_cli-0.2.39}/tests/golden_manifest.json +69 -0
  9. {makea_cli-0.2.38 → makea_cli-0.2.39}/uv.lock +1 -1
  10. makea_cli-0.2.38/makea_cli/__init__.py +0 -1
  11. {makea_cli-0.2.38 → makea_cli-0.2.39}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
  12. {makea_cli-0.2.38 → makea_cli-0.2.39}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
  13. {makea_cli-0.2.38 → makea_cli-0.2.39}/.claude/skills/link-supplier-user/SKILL.md +0 -0
  14. {makea_cli-0.2.38 → makea_cli-0.2.39}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
  15. {makea_cli-0.2.38 → makea_cli-0.2.39}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
  16. {makea_cli-0.2.38 → makea_cli-0.2.39}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
  17. {makea_cli-0.2.38 → makea_cli-0.2.39}/.gitignore +0 -0
  18. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea-collection-upload/SKILL.md +0 -0
  19. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea-collection-upload/scripts/create_products.py +0 -0
  20. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/__main__.py +0 -0
  21. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/auth_pkce.py +0 -0
  22. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/broker.py +0 -0
  23. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/__init__.py +0 -0
  24. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/_util.py +0 -0
  25. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/about/__init__.py +0 -0
  26. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/about/cmd.py +0 -0
  27. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/analytics/__init__.py +0 -0
  28. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/analytics/cmd.py +0 -0
  29. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/auth/__init__.py +0 -0
  30. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/auth/cmd.py +0 -0
  31. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/brand/__init__.py +0 -0
  32. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/brand/cmd.py +0 -0
  33. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/designer/__init__.py +0 -0
  34. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/designer/cmd.py +0 -0
  35. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/directory/__init__.py +0 -0
  36. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/directory/cmd.py +0 -0
  37. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/document/__init__.py +0 -0
  38. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/document/cmd.py +0 -0
  39. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/email/__init__.py +0 -0
  40. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/email/cmd.py +0 -0
  41. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/factory/__init__.py +0 -0
  42. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/factory/cmd.py +0 -0
  43. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/files/__init__.py +0 -0
  44. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/files/cmd.py +0 -0
  45. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/flags/__init__.py +0 -0
  46. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/flags/cmd.py +0 -0
  47. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/library/__init__.py +0 -0
  48. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/library/cmd.py +0 -0
  49. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/metrics/__init__.py +0 -0
  50. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/order_flow/__init__.py +0 -0
  51. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/order_flow/cmd.py +0 -0
  52. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/orders/__init__.py +0 -0
  53. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/orders/cmd.py +0 -0
  54. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/playbook/__init__.py +0 -0
  55. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/playbook/cmd.py +0 -0
  56. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/product/__init__.py +0 -0
  57. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/product/cmd.py +0 -0
  58. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/production/__init__.py +0 -0
  59. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/production/cmd.py +0 -0
  60. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/production/pricing_spec.py +0 -0
  61. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/shiplog/__init__.py +0 -0
  62. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/shiplog/cmd.py +0 -0
  63. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/shipping/__init__.py +0 -0
  64. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/shipping/cmd.py +0 -0
  65. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/supplier/__init__.py +0 -0
  66. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/supplier/cmd.py +0 -0
  67. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/tasks/__init__.py +0 -0
  68. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/commands/tasks/cmd.py +0 -0
  69. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/companion.py +0 -0
  70. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/config.py +0 -0
  71. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/errors.py +0 -0
  72. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/file_reader.py +0 -0
  73. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/identity.py +0 -0
  74. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/main.py +0 -0
  75. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/output.py +0 -0
  76. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/posthog_client.py +0 -0
  77. {makea_cli-0.2.38 → makea_cli-0.2.39}/makea_cli/registry.py +0 -0
  78. {makea_cli-0.2.38 → makea_cli-0.2.39}/npm/makea-cli/README.md +0 -0
  79. {makea_cli-0.2.38 → makea_cli-0.2.39}/npm/makea-cli/makea-cli.mjs +0 -0
  80. {makea_cli-0.2.38 → makea_cli-0.2.39}/npm/makea-cli/package.json +0 -0
  81. {makea_cli-0.2.38 → makea_cli-0.2.39}/tests/test_broker.py +0 -0
  82. {makea_cli-0.2.38 → makea_cli-0.2.39}/tests/test_companion.py +0 -0
  83. {makea_cli-0.2.38 → makea_cli-0.2.39}/tests/test_currency_conversion.py +0 -0
  84. {makea_cli-0.2.38 → makea_cli-0.2.39}/tests/test_file_reader.py +0 -0
  85. {makea_cli-0.2.38 → makea_cli-0.2.39}/tests/test_output_contract.py +0 -0
  86. {makea_cli-0.2.38 → makea_cli-0.2.39}/tests/test_persona_commands.py +0 -0
  87. {makea_cli-0.2.38 → makea_cli-0.2.39}/tests/test_pm_reads.py +0 -0
  88. {makea_cli-0.2.38 → makea_cli-0.2.39}/tests/test_registry.py +0 -0
  89. {makea_cli-0.2.38 → makea_cli-0.2.39}/tests/test_supplier_scorecard.py +0 -0
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.39
4
+
5
+ Engagement numbers for sales. Needs the backend with `/admin/engagement-stats`.
6
+
7
+ - `admin get engagement-stats`: per customer (a team counts once) and per
8
+ product, the messages the brand, the factory and makea wrote in factory
9
+ threads, Beeboo's nudges (reminders to the brand, the morning emails that
10
+ carried them, chases to the factory) and its other actions. `--start/--end`
11
+ bound the days, `--customer` filters by name, `--view` keeps one part. Every
12
+ counter comes with a one-line definition fit for a slide.
13
+
3
14
  ## 0.2.38
4
15
 
5
16
  Set an order up like the last ones. Needs the backend with the step library.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: makea-cli
3
- Version: 0.2.38
3
+ Version: 0.2.39
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
@@ -130,6 +130,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
130
130
  | `makea-cli admin get analytics-query` | read | `POST /admin/analytics/query` | Run an arbitrary HogQL query (escape hatch). Example: analytics-query "SELECT count() FROM events" | `analytics-query` |
131
131
  | `makea-cli admin 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. | — |
132
132
  | `makea-cli admin get currency-conversion` | read | `GET /admin/fx/rates` | the platform's own exchange rates and rounding (rate table for several --from; one --from with --amount converts it). | `convert-currency` |
133
+ | `makea-cli admin get engagement-stats` | read | `GET /admin/engagement-stats` | per customer and per product: messages brand↔factory and makea→factory, Beeboo's nudges (reminders to the brand, the morning emails that carried them, chases to the factory) and its other actions; `--start/--end`, `--customer`, `--view`. | — |
133
134
  | `makea-cli admin get feature-usage` | read | `POST /admin/analytics/query` | How many distinct users used a feature recently, plus event volume. Matches $pageview path and feature_time_spent eve… | `analytics-feature-usage` |
134
135
  | `makea-cli admin get growth-snapshot` | read | `GET /admin/growth/snapshots/{id}` | one reconciled Growth Analysis snapshot (default `latest`); `--block` prints one block (headline, gates, review_items, …). | — |
135
136
  | `makea-cli admin get library-schema` | read | `GET /admin/library_components/schema` | the tech-pack library taxonomy: sections and their library-role field keys (run this before create/update). | `library-schema` |
@@ -114,6 +114,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
114
114
  | `makea-cli admin get analytics-query` | read | `POST /admin/analytics/query` | Run an arbitrary HogQL query (escape hatch). Example: analytics-query "SELECT count() FROM events" | `analytics-query` |
115
115
  | `makea-cli admin 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. | — |
116
116
  | `makea-cli admin get currency-conversion` | read | `GET /admin/fx/rates` | the platform's own exchange rates and rounding (rate table for several --from; one --from with --amount converts it). | `convert-currency` |
117
+ | `makea-cli admin get engagement-stats` | read | `GET /admin/engagement-stats` | per customer and per product: messages brand↔factory and makea→factory, Beeboo's nudges (reminders to the brand, the morning emails that carried them, chases to the factory) and its other actions; `--start/--end`, `--customer`, `--view`. | — |
117
118
  | `makea-cli admin get feature-usage` | read | `POST /admin/analytics/query` | How many distinct users used a feature recently, plus event volume. Matches $pageview path and feature_time_spent eve… | `analytics-feature-usage` |
118
119
  | `makea-cli admin get growth-snapshot` | read | `GET /admin/growth/snapshots/{id}` | one reconciled Growth Analysis snapshot (default `latest`); `--block` prints one block (headline, gates, review_items, …). | — |
119
120
  | `makea-cli admin get library-schema` | read | `GET /admin/library_components/schema` | the tech-pack library taxonomy: sections and their library-role field keys (run this before create/update). | `library-schema` |
@@ -0,0 +1 @@
1
+ __version__ = "0.2.39"
@@ -973,6 +973,13 @@ def get_growth_snapshot(snapshot_id: str = "latest") -> Any:
973
973
  return get_json(f"/admin/growth/snapshots/{quote(snapshot_id, safe='')}", timeout=120.0)
974
974
 
975
975
 
976
+ def get_engagement_stats(start: str = "", end: str = "", customer: str = "") -> Any:
977
+ """GET /admin/engagement-stats?start=&end=&customer= — brand/factory messages
978
+ and Beeboo's actions per customer and per product. Scans the table: slow-ish."""
979
+ params = {k: v for k, v in (("start", start), ("end", end), ("customer", customer)) if v}
980
+ return get_json("/admin/engagement-stats", params=params, timeout=120.0)
981
+
982
+
976
983
  def import_growth_snapshot(sources_path: Path, *, check_only: bool = False) -> Any:
977
984
  """POST /admin/growth/snapshots — gate and publish one reconciled snapshot.
978
985
 
@@ -133,6 +133,53 @@ def register(app: typer.Typer) -> None:
133
133
 
134
134
  print_json_or_exit(console, _do)
135
135
 
136
+ @command(
137
+ app,
138
+ "admin",
139
+ "get",
140
+ "engagement-stats",
141
+ api="GET /admin/engagement-stats",
142
+ help=(
143
+ "GET /admin/engagement-stats — per customer and per product: messages "
144
+ "brand to factory, factory to brand and makea to factory, Beeboo's "
145
+ "nudges (reminders to the brand, morning emails that carried them, "
146
+ "chases to the factory) and every other action Beeboo took."
147
+ ),
148
+ )
149
+ def get_engagement_stats(
150
+ start: str = typer.Option(None, "--start", help="First day, YYYY-MM-DD (inclusive)."),
151
+ end: str = typer.Option(None, "--end", help="Last day, YYYY-MM-DD (inclusive)."),
152
+ customer: str = typer.Option(
153
+ None, "--customer", "-c", help="Only customers whose name contains this."
154
+ ),
155
+ view: str = typer.Option(
156
+ "all",
157
+ "--view",
158
+ "-v",
159
+ help="all | customers | products | totals | definitions.",
160
+ ),
161
+ ) -> None:
162
+ """A customer is a team (named after its owner's brand) or a lone account.
163
+ Counts come from the threads and Beeboo's day log; nothing is estimated.
164
+
165
+ Output JSON: {"period", "definitions", "totals", "customers", "products"};
166
+ every row has the same counters plus "messages" (the three message
167
+ counts) and "beeboo_actions" (every Beeboo counter). "definitions" says
168
+ what each counter means, in words fit for a slide. --view keeps one part.
169
+ """
170
+ views = ("all", "customers", "products", "totals", "definitions")
171
+ if view not in views:
172
+ console.print(f"[red]--view must be one of {', '.join(views)}.[/red]")
173
+ raise typer.Exit(1)
174
+
175
+ def _do():
176
+ result = (
177
+ api_client.get_engagement_stats(start or "", end or "", customer or "") or {}
178
+ ).get("result") or {}
179
+ return result if view == "all" else result.get(view)
180
+
181
+ print_json_or_exit(console, _do)
182
+
136
183
  @command(
137
184
  app,
138
185
  "admin",
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "makea-cli"
7
- version = "0.2.38"
7
+ version = "0.2.39"
8
8
  description = "Makea admin CLI (browser login + Makea admin HTTP API)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -3122,6 +3122,75 @@
3122
3122
  }
3123
3123
  ]
3124
3124
  },
3125
+ {
3126
+ "name": "admin get engagement-stats",
3127
+ "persona": "admin",
3128
+ "verb": "get",
3129
+ "noun": "engagement-stats",
3130
+ "access": "read",
3131
+ "api": "GET /admin/engagement-stats",
3132
+ "external": null,
3133
+ "side_effects": [],
3134
+ "approval": "auto",
3135
+ "reversible": null,
3136
+ "idempotent": null,
3137
+ "limit": null,
3138
+ "legacy": [],
3139
+ "help": "GET /admin/engagement-stats — per customer and per product: messages brand to factory, factory to brand and makea to factory, Beeboo's nudges (reminders to the brand, morning emails that carried them, chases to the factory) and every other action Beeboo took.",
3140
+ "function": "makea_cli.commands.metrics.cmd.register.<locals>.get_engagement_stats",
3141
+ "flags": [
3142
+ {
3143
+ "name": "start",
3144
+ "kind": "option",
3145
+ "opts": [
3146
+ "--start"
3147
+ ],
3148
+ "type": "text",
3149
+ "required": false,
3150
+ "multiple": false,
3151
+ "default": null,
3152
+ "help": "First day, YYYY-MM-DD (inclusive)."
3153
+ },
3154
+ {
3155
+ "name": "end",
3156
+ "kind": "option",
3157
+ "opts": [
3158
+ "--end"
3159
+ ],
3160
+ "type": "text",
3161
+ "required": false,
3162
+ "multiple": false,
3163
+ "default": null,
3164
+ "help": "Last day, YYYY-MM-DD (inclusive)."
3165
+ },
3166
+ {
3167
+ "name": "customer",
3168
+ "kind": "option",
3169
+ "opts": [
3170
+ "--customer",
3171
+ "-c"
3172
+ ],
3173
+ "type": "text",
3174
+ "required": false,
3175
+ "multiple": false,
3176
+ "default": null,
3177
+ "help": "Only customers whose name contains this."
3178
+ },
3179
+ {
3180
+ "name": "view",
3181
+ "kind": "option",
3182
+ "opts": [
3183
+ "--view",
3184
+ "-v"
3185
+ ],
3186
+ "type": "text",
3187
+ "required": false,
3188
+ "multiple": false,
3189
+ "default": "all",
3190
+ "help": "all | customers | products | totals | definitions."
3191
+ }
3192
+ ]
3193
+ },
3125
3194
  {
3126
3195
  "name": "admin get feature-usage",
3127
3196
  "persona": "admin",
@@ -119,7 +119,7 @@ wheels = [
119
119
 
120
120
  [[package]]
121
121
  name = "makea-cli"
122
- version = "0.2.38"
122
+ version = "0.2.39"
123
123
  source = { editable = "." }
124
124
  dependencies = [
125
125
  { name = "click" },
@@ -1 +0,0 @@
1
- __version__ = "0.2.38"
File without changes
File without changes