makea-cli 0.2.12__py3-none-any.whl → 0.2.13__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "0.2.12"
1
+ __version__ = "0.2.13"
makea_cli/api_client.py CHANGED
@@ -1674,6 +1674,18 @@ def designer_get_costing(style_id: str | None = None, *, product_id: str | None
1674
1674
  return {"style_id": style_id, "packs": packs}
1675
1675
 
1676
1676
 
1677
+ def designer_get_supplier_scorecard(supplier_id: str | None = None) -> Any:
1678
+ """A factory's track record with the brand's team: on time against its
1679
+ confirmed dates, quality, responsiveness, volume. Each figure has its n and
1680
+ period; "too few to judge" below the minimum. No id: every factory the
1681
+ brand works with. Brand-private."""
1682
+ if supplier_id:
1683
+ raw = get_json(f"/designer/suppliers/{supplier_id}/scorecard")
1684
+ return raw.get("scorecard") if isinstance(raw, dict) else raw
1685
+ raw = get_json("/designer/suppliers/scorecards")
1686
+ return {"scorecards": raw.get("scorecards") if isinstance(raw, dict) else raw}
1687
+
1688
+
1677
1689
  def designer_list_actions(*, product_id: str | None = None) -> Any:
1678
1690
  """GET /designer/actions — the brand's pending actions, optionally for one product."""
1679
1691
  params = {"product_id": product_id} if product_id else None
@@ -348,6 +348,27 @@ def register(app: typer.Typer) -> None:
348
348
  console, lambda: api_client.designer_get_costing(style, product_id=product)
349
349
  )
350
350
 
351
+ @command(
352
+ app,
353
+ "designer",
354
+ "get",
355
+ "supplier-scorecard",
356
+ api="GET /designer/suppliers/{supplier_id}/scorecard",
357
+ help=(
358
+ "GET /designer/suppliers/{id}/scorecard — a factory's track record with the "
359
+ "brand's team (on time vs confirmed dates, quality, responsiveness, volume; "
360
+ "each figure with its n and period). No id: every factory the brand works "
361
+ "with. Brand-private: never shared with the factory."
362
+ ),
363
+ )
364
+ def get_supplier_scorecard(
365
+ supplier_id: str | None = typer.Argument(
366
+ None, help="Supplier id; omit for every factory the brand works with."
367
+ ),
368
+ ) -> None:
369
+ """A factory's track record with this brand."""
370
+ print_json_or_exit(console, lambda: api_client.designer_get_supplier_scorecard(supplier_id))
371
+
351
372
  @command(
352
373
  app,
353
374
  "designer",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: makea-cli
3
- Version: 0.2.12
3
+ Version: 0.2.13
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
@@ -1,6 +1,6 @@
1
- makea_cli/__init__.py,sha256=X4KG3FscE5AhbGbcdDDgdDC550CVpxNMwdNLcx6EQ7M,23
1
+ makea_cli/__init__.py,sha256=C0atO05M0rfDTTHt02NxNa4jt0eSqXM4AxShEhb2epA,23
2
2
  makea_cli/__main__.py,sha256=AkQjxWfKE3w9iD1d6I-2Zqvv2t9cct0oYyFF0UiA-Z0,144
3
- makea_cli/api_client.py,sha256=VVkNs8u1Bl-q3lWMBIdyxoY9MT5ewOCdN2fJJ4oHO5E,64428
3
+ makea_cli/api_client.py,sha256=uh2CcEYt7-08vm_qhx3ojY76lx_2-fuMsKwg0KCBk8M,65073
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=iQEJc7c-Plrn0FBJiYRkC5YRLkZ_zr3u5swC-2FDfNI,44492
20
+ makea_cli/commands/brand/cmd.py,sha256=I2L1F-OGoLkwZ6xNXAuM-KWTXhp1ebPNxTjmr7lQtmQ,45364
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.12.dist-info/METADATA,sha256=ixglV8TCYcSpkVACuHKqUp0pWA7brZPiZShaxp8xjG8,31761
45
- makea_cli-0.2.12.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
46
- makea_cli-0.2.12.dist-info/entry_points.txt,sha256=4x-lbVa1jBbNlkNq7L-rYyfRh2spZmc3BLIzP-Dl-Qk,50
47
- makea_cli-0.2.12.dist-info/RECORD,,
44
+ makea_cli-0.2.13.dist-info/METADATA,sha256=7ij2fac6smQHzgfvLbfaEMhC16xqjFHMM50F58k7KGk,31761
45
+ makea_cli-0.2.13.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
46
+ makea_cli-0.2.13.dist-info/entry_points.txt,sha256=4x-lbVa1jBbNlkNq7L-rYyfRh2spZmc3BLIzP-Dl-Qk,50
47
+ makea_cli-0.2.13.dist-info/RECORD,,