makea-cli 0.2.9__py3-none-any.whl → 0.2.10__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/api_client.py +93 -0
- makea_cli/commands/brand/cmd.py +89 -0
- {makea_cli-0.2.9.dist-info → makea_cli-0.2.10.dist-info}/METADATA +1 -1
- {makea_cli-0.2.9.dist-info → makea_cli-0.2.10.dist-info}/RECORD +7 -7
- {makea_cli-0.2.9.dist-info → makea_cli-0.2.10.dist-info}/WHEEL +0 -0
- {makea_cli-0.2.9.dist-info → makea_cli-0.2.10.dist-info}/entry_points.txt +0 -0
makea_cli/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.10"
|
makea_cli/api_client.py
CHANGED
|
@@ -1359,6 +1359,99 @@ def supplier_list_quote_edit_requests(quote_request_id: str) -> Any:
|
|
|
1359
1359
|
return get_json(f"/supplier/quote_requests/{quote_request_id}/quote_edit_requests")
|
|
1360
1360
|
|
|
1361
1361
|
|
|
1362
|
+
def designer_get_tna() -> Any:
|
|
1363
|
+
"""GET /designer/tna_calendar — every pack's five steps and arrival, with
|
|
1364
|
+
the launch it is measured against when the arrival is confirmed."""
|
|
1365
|
+
return get_json("/designer/tna_calendar")
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
def designer_list_milestones(product_id: str) -> Any:
|
|
1369
|
+
"""Production milestones on a pack's bulk orders, compact: what is done,
|
|
1370
|
+
submitted or waiting, never a lateness the factory did not commit to."""
|
|
1371
|
+
raw = get_json(
|
|
1372
|
+
f"/designer/products/{product_id}/production_order_details",
|
|
1373
|
+
params={"type": "PRODUCTION"},
|
|
1374
|
+
)
|
|
1375
|
+
orders = (
|
|
1376
|
+
raw.get("production_orders_details") or raw.get("orders")
|
|
1377
|
+
if isinstance(raw, dict)
|
|
1378
|
+
else raw
|
|
1379
|
+
)
|
|
1380
|
+
out = []
|
|
1381
|
+
for order in orders or []:
|
|
1382
|
+
if not isinstance(order, dict):
|
|
1383
|
+
continue
|
|
1384
|
+
for step in order.get("production_progress") or []:
|
|
1385
|
+
meta = step.get("metadata") or {}
|
|
1386
|
+
for m in meta.get("milestones") or []:
|
|
1387
|
+
if not isinstance(m, dict):
|
|
1388
|
+
continue
|
|
1389
|
+
out.append(
|
|
1390
|
+
{
|
|
1391
|
+
"order_id": order.get("production_order_id"),
|
|
1392
|
+
"step": step.get("progress_type"),
|
|
1393
|
+
"milestone": m.get("title"),
|
|
1394
|
+
"status": m.get("status"),
|
|
1395
|
+
"days_from_payment": m.get("time_window"),
|
|
1396
|
+
"submitted_at": m.get("submitted_at"),
|
|
1397
|
+
"approval_result": m.get("approval_result"),
|
|
1398
|
+
"completed_at": m.get("completed_at"),
|
|
1399
|
+
}
|
|
1400
|
+
)
|
|
1401
|
+
return {"product_id": product_id, "milestones": out}
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
def designer_list_notes(
|
|
1405
|
+
product_id: str, channel_key: str, *, since: str | None = None
|
|
1406
|
+
) -> Any:
|
|
1407
|
+
"""A channel's messages, oldest first, optionally only those after
|
|
1408
|
+
``since`` (ISO date or datetime): what the factory said this week."""
|
|
1409
|
+
raw = get_json(f"/designer/products/{product_id}/channels/{channel_key}/notes")
|
|
1410
|
+
notes = raw.get("notes") if isinstance(raw, dict) else raw
|
|
1411
|
+
out = []
|
|
1412
|
+
for n in notes or []:
|
|
1413
|
+
if not isinstance(n, dict):
|
|
1414
|
+
continue
|
|
1415
|
+
if since and str(n.get("created_at") or "") < since:
|
|
1416
|
+
continue
|
|
1417
|
+
out.append(
|
|
1418
|
+
{
|
|
1419
|
+
"note_id": n.get("note_id"),
|
|
1420
|
+
"at": n.get("created_at"),
|
|
1421
|
+
"from": n.get("created_by_type"),
|
|
1422
|
+
"supplier": n.get("supplier_name"),
|
|
1423
|
+
"text": n.get("content"),
|
|
1424
|
+
"replies": len(n.get("replies") or []),
|
|
1425
|
+
}
|
|
1426
|
+
)
|
|
1427
|
+
return {"product_id": product_id, "channel": channel_key, "notes": out}
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
def designer_list_fit_rounds(product_id: str) -> Any:
|
|
1431
|
+
"""GET /designer/products/{id}/fit_rounds — every fit round on the pack and
|
|
1432
|
+
the corrections carried into bulk."""
|
|
1433
|
+
return get_json(f"/designer/products/{product_id}/fit_rounds")
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
def designer_get_costing(style_id: str) -> Any:
|
|
1437
|
+
"""One unit of each pack on a product card: factory price, fees, the
|
|
1438
|
+
brand's freight and duty estimates, target, RRP, margin."""
|
|
1439
|
+
raw = get_json(f"/designer/styles/{style_id}/overview")
|
|
1440
|
+
packs = raw.get("packs") if isinstance(raw, dict) else []
|
|
1441
|
+
return {
|
|
1442
|
+
"style_id": style_id,
|
|
1443
|
+
"packs": [
|
|
1444
|
+
{
|
|
1445
|
+
"product_id": p.get("product_id"),
|
|
1446
|
+
"pack": p.get("pack_label"),
|
|
1447
|
+
"costing": p.get("costing"),
|
|
1448
|
+
}
|
|
1449
|
+
for p in packs or []
|
|
1450
|
+
if isinstance(p, dict)
|
|
1451
|
+
],
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
|
|
1362
1455
|
def designer_list_actions(*, product_id: str | None = None) -> Any:
|
|
1363
1456
|
"""GET /designer/actions — the brand's pending actions, optionally for one product."""
|
|
1364
1457
|
params = {"product_id": product_id} if product_id else None
|
makea_cli/commands/brand/cmd.py
CHANGED
|
@@ -212,6 +212,95 @@ def register(app: typer.Typer) -> None:
|
|
|
212
212
|
"""List a product's channels."""
|
|
213
213
|
print_json_or_exit(console, lambda: api_client.designer_list_channels(product))
|
|
214
214
|
|
|
215
|
+
@command(
|
|
216
|
+
app,
|
|
217
|
+
"designer",
|
|
218
|
+
"get",
|
|
219
|
+
"tna",
|
|
220
|
+
api="GET /designer/tna_calendar",
|
|
221
|
+
help=(
|
|
222
|
+
"GET /designer/tna_calendar — when each pack arrives and how sure that is "
|
|
223
|
+
"(done / confirmed / estimated), with its launch day."
|
|
224
|
+
),
|
|
225
|
+
)
|
|
226
|
+
def get_tna() -> None:
|
|
227
|
+
"""The Time & Action calendar."""
|
|
228
|
+
print_json_or_exit(console, lambda: api_client.designer_get_tna())
|
|
229
|
+
|
|
230
|
+
@command(
|
|
231
|
+
app,
|
|
232
|
+
"designer",
|
|
233
|
+
"list",
|
|
234
|
+
"milestone",
|
|
235
|
+
api="GET /designer/products/{product_id}/production_order_details",
|
|
236
|
+
help=(
|
|
237
|
+
"GET /designer/products/{id}/production_order_details — the bulk order's "
|
|
238
|
+
"production milestones: done, submitted, waiting."
|
|
239
|
+
),
|
|
240
|
+
)
|
|
241
|
+
def list_milestones(
|
|
242
|
+
product: str = typer.Option(..., "--product", "-p", help="Product id."),
|
|
243
|
+
) -> None:
|
|
244
|
+
"""List a pack's production milestones."""
|
|
245
|
+
print_json_or_exit(console, lambda: api_client.designer_list_milestones(product))
|
|
246
|
+
|
|
247
|
+
@command(
|
|
248
|
+
app,
|
|
249
|
+
"designer",
|
|
250
|
+
"list",
|
|
251
|
+
"note",
|
|
252
|
+
api="GET /designer/products/{product_id}/channels/{channel_key}/notes",
|
|
253
|
+
help=(
|
|
254
|
+
"GET /designer/products/{id}/channels/{key}/notes — a channel's messages, "
|
|
255
|
+
"oldest first; --since keeps the recent ones (no keyword needed)."
|
|
256
|
+
),
|
|
257
|
+
)
|
|
258
|
+
def list_notes(
|
|
259
|
+
product: str = typer.Option(..., "--product", "-p", help="Product id."),
|
|
260
|
+
channel: str = typer.Option(..., "--channel", "-c", help="Channel key."),
|
|
261
|
+
since: str | None = typer.Option(
|
|
262
|
+
None, "--since", help="ISO date or datetime, e.g. 2026-10-01."
|
|
263
|
+
),
|
|
264
|
+
) -> None:
|
|
265
|
+
"""List a channel's messages."""
|
|
266
|
+
print_json_or_exit(
|
|
267
|
+
console, lambda: api_client.designer_list_notes(product, channel, since=since)
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
@command(
|
|
271
|
+
app,
|
|
272
|
+
"designer",
|
|
273
|
+
"list",
|
|
274
|
+
"fit-round",
|
|
275
|
+
api="GET /designer/products/{product_id}/fit_rounds",
|
|
276
|
+
help=(
|
|
277
|
+
"GET /designer/products/{id}/fit_rounds — the pack's fit rounds and the "
|
|
278
|
+
"corrections carried into bulk."
|
|
279
|
+
),
|
|
280
|
+
)
|
|
281
|
+
def list_fit_rounds(
|
|
282
|
+
product: str = typer.Option(..., "--product", "-p", help="Product id."),
|
|
283
|
+
) -> None:
|
|
284
|
+
"""List a pack's fit rounds."""
|
|
285
|
+
print_json_or_exit(console, lambda: api_client.designer_list_fit_rounds(product))
|
|
286
|
+
|
|
287
|
+
@command(
|
|
288
|
+
app,
|
|
289
|
+
"designer",
|
|
290
|
+
"get",
|
|
291
|
+
"costing",
|
|
292
|
+
api="GET /designer/styles/{style_id}/overview",
|
|
293
|
+
help=(
|
|
294
|
+
"GET /designer/styles/{id}/overview — what one unit of each pack costs and "
|
|
295
|
+
"the margin at RRP (freight and duty are the brand's estimates)."
|
|
296
|
+
),
|
|
297
|
+
)
|
|
298
|
+
def get_costing(
|
|
299
|
+
style: str = typer.Option(..., "--style", "-s", help="Product card (style) id."),
|
|
300
|
+
) -> None:
|
|
301
|
+
"""A product card's unit cost and margin."""
|
|
302
|
+
print_json_or_exit(console, lambda: api_client.designer_get_costing(style))
|
|
303
|
+
|
|
215
304
|
@command(
|
|
216
305
|
app,
|
|
217
306
|
"designer",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
makea_cli/__init__.py,sha256=
|
|
1
|
+
makea_cli/__init__.py,sha256=waXgc7p-jgGCsUjdVfO_KjlVZblnCvrzf4A0dsBj_lg,23
|
|
2
2
|
makea_cli/__main__.py,sha256=AkQjxWfKE3w9iD1d6I-2Zqvv2t9cct0oYyFF0UiA-Z0,144
|
|
3
|
-
makea_cli/api_client.py,sha256=
|
|
3
|
+
makea_cli/api_client.py,sha256=a2q6wPZkGn2D_HIrIqDgPFULpuLK_1rRhUr9BrQIqYM,54320
|
|
4
4
|
makea_cli/auth_pkce.py,sha256=iXSyJ7DM3qVuj-3FwPiqM25CxXz9ebFs9FNthZdw3ws,7315
|
|
5
5
|
makea_cli/broker.py,sha256=5O650nAdRuF-u9E1MuVM2jVv796iBdxJGIaJasxHij0,3019
|
|
6
6
|
makea_cli/config.py,sha256=hz8MnJSkhxcIEZkcpHR005JrDceo1Xmi8qwIUq50cMU,3003
|
|
@@ -17,7 +17,7 @@ makea_cli/commands/analytics/cmd.py,sha256=KVLUtYSeyYZ8_09jIuIAmePjQqcpQS2mb5PBB
|
|
|
17
17
|
makea_cli/commands/auth/__init__.py,sha256=NXoKGfkY2X_hb8GnAyzhoI_qDXfpwKZPqt4HnOrXW3Y,73
|
|
18
18
|
makea_cli/commands/auth/cmd.py,sha256=G9ZeiaJwzUUTptIyynr0V-82wI7eV0qVX0pD6rdPSXg,1321
|
|
19
19
|
makea_cli/commands/brand/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
-
makea_cli/commands/brand/cmd.py,sha256=
|
|
20
|
+
makea_cli/commands/brand/cmd.py,sha256=lYT-9CRdOugVTGy2pJz9-RqdqWPIKIW10K8iSb0kQVE,42259
|
|
21
21
|
makea_cli/commands/designer/__init__.py,sha256=Tc3Ju4-BKX2euBljhlrEd-Ksirk6JSPNixq4x0IbQYI,77
|
|
22
22
|
makea_cli/commands/designer/cmd.py,sha256=4oOJ5tWYojUs8FBj3QRmgpwbicpsU1XqswoNlJpLLS8,23615
|
|
23
23
|
makea_cli/commands/directory/__init__.py,sha256=rQHBc0JOFXynlzrBm_YfqoRuNsS-JOl-OOvPjgDbnIA,78
|
|
@@ -41,7 +41,7 @@ makea_cli/commands/production/cmd.py,sha256=s6fVAGzOvokF6Va5WKGEA2vw2x2hDQ3PrsF0
|
|
|
41
41
|
makea_cli/commands/production/pricing_spec.py,sha256=xGbj7-ps3PcKuU6Oc59A70b62FjF6Awhr5IY3ymZveU,27174
|
|
42
42
|
makea_cli/commands/supplier/__init__.py,sha256=qfQDeQdQ-B7I_uwFVfcp1vXFUTL4fAcNLu3ipsZ7dfs,77
|
|
43
43
|
makea_cli/commands/supplier/cmd.py,sha256=crRCy9WfhkryHMIL3iufoiT90_SG3-mKChAtdhd06uc,58076
|
|
44
|
-
makea_cli-0.2.
|
|
45
|
-
makea_cli-0.2.
|
|
46
|
-
makea_cli-0.2.
|
|
47
|
-
makea_cli-0.2.
|
|
44
|
+
makea_cli-0.2.10.dist-info/METADATA,sha256=iK_NxuwTO2xNvxR87xGQ3UGrQbfgCVoN2sd-M4IvLCo,31761
|
|
45
|
+
makea_cli-0.2.10.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
46
|
+
makea_cli-0.2.10.dist-info/entry_points.txt,sha256=4x-lbVa1jBbNlkNq7L-rYyfRh2spZmc3BLIzP-Dl-Qk,50
|
|
47
|
+
makea_cli-0.2.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|