makea-cli 0.2.30__tar.gz → 0.2.31__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 (85) hide show
  1. {makea_cli-0.2.30 → makea_cli-0.2.31}/CHANGELOG.md +12 -0
  2. {makea_cli-0.2.30 → makea_cli-0.2.31}/PKG-INFO +4 -1
  3. {makea_cli-0.2.30 → makea_cli-0.2.31}/README.md +3 -0
  4. makea_cli-0.2.31/makea_cli/__init__.py +1 -0
  5. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/api_client.py +15 -0
  6. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/brand/cmd.py +115 -0
  7. {makea_cli-0.2.30 → makea_cli-0.2.31}/pyproject.toml +1 -1
  8. {makea_cli-0.2.30 → makea_cli-0.2.31}/tests/golden_manifest.json +211 -0
  9. makea_cli-0.2.30/makea_cli/__init__.py +0 -1
  10. {makea_cli-0.2.30 → makea_cli-0.2.31}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
  11. {makea_cli-0.2.30 → makea_cli-0.2.31}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
  12. {makea_cli-0.2.30 → makea_cli-0.2.31}/.claude/skills/link-supplier-user/SKILL.md +0 -0
  13. {makea_cli-0.2.30 → makea_cli-0.2.31}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
  14. {makea_cli-0.2.30 → makea_cli-0.2.31}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
  15. {makea_cli-0.2.30 → makea_cli-0.2.31}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
  16. {makea_cli-0.2.30 → makea_cli-0.2.31}/.gitignore +0 -0
  17. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea-collection-upload/SKILL.md +0 -0
  18. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea-collection-upload/scripts/create_products.py +0 -0
  19. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/__main__.py +0 -0
  20. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/auth_pkce.py +0 -0
  21. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/broker.py +0 -0
  22. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/__init__.py +0 -0
  23. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/_util.py +0 -0
  24. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/about/__init__.py +0 -0
  25. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/about/cmd.py +0 -0
  26. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/analytics/__init__.py +0 -0
  27. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/analytics/cmd.py +0 -0
  28. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/auth/__init__.py +0 -0
  29. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/auth/cmd.py +0 -0
  30. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/brand/__init__.py +0 -0
  31. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/designer/__init__.py +0 -0
  32. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/designer/cmd.py +0 -0
  33. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/directory/__init__.py +0 -0
  34. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/directory/cmd.py +0 -0
  35. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/document/__init__.py +0 -0
  36. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/document/cmd.py +0 -0
  37. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/email/__init__.py +0 -0
  38. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/email/cmd.py +0 -0
  39. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/factory/__init__.py +0 -0
  40. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/factory/cmd.py +0 -0
  41. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/files/__init__.py +0 -0
  42. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/files/cmd.py +0 -0
  43. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/flags/__init__.py +0 -0
  44. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/flags/cmd.py +0 -0
  45. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/library/__init__.py +0 -0
  46. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/library/cmd.py +0 -0
  47. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/metrics/__init__.py +0 -0
  48. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/metrics/cmd.py +0 -0
  49. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/orders/__init__.py +0 -0
  50. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/orders/cmd.py +0 -0
  51. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/playbook/__init__.py +0 -0
  52. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/playbook/cmd.py +0 -0
  53. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/product/__init__.py +0 -0
  54. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/product/cmd.py +0 -0
  55. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/production/__init__.py +0 -0
  56. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/production/cmd.py +0 -0
  57. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/production/pricing_spec.py +0 -0
  58. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/shipping/__init__.py +0 -0
  59. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/shipping/cmd.py +0 -0
  60. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/supplier/__init__.py +0 -0
  61. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/supplier/cmd.py +0 -0
  62. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/tasks/__init__.py +0 -0
  63. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/commands/tasks/cmd.py +0 -0
  64. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/companion.py +0 -0
  65. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/config.py +0 -0
  66. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/errors.py +0 -0
  67. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/file_reader.py +0 -0
  68. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/identity.py +0 -0
  69. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/main.py +0 -0
  70. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/output.py +0 -0
  71. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/posthog_client.py +0 -0
  72. {makea_cli-0.2.30 → makea_cli-0.2.31}/makea_cli/registry.py +0 -0
  73. {makea_cli-0.2.30 → makea_cli-0.2.31}/npm/makea-cli/README.md +0 -0
  74. {makea_cli-0.2.30 → makea_cli-0.2.31}/npm/makea-cli/makea-cli.mjs +0 -0
  75. {makea_cli-0.2.30 → makea_cli-0.2.31}/npm/makea-cli/package.json +0 -0
  76. {makea_cli-0.2.30 → makea_cli-0.2.31}/tests/test_broker.py +0 -0
  77. {makea_cli-0.2.30 → makea_cli-0.2.31}/tests/test_companion.py +0 -0
  78. {makea_cli-0.2.30 → makea_cli-0.2.31}/tests/test_currency_conversion.py +0 -0
  79. {makea_cli-0.2.30 → makea_cli-0.2.31}/tests/test_file_reader.py +0 -0
  80. {makea_cli-0.2.30 → makea_cli-0.2.31}/tests/test_output_contract.py +0 -0
  81. {makea_cli-0.2.30 → makea_cli-0.2.31}/tests/test_persona_commands.py +0 -0
  82. {makea_cli-0.2.30 → makea_cli-0.2.31}/tests/test_pm_reads.py +0 -0
  83. {makea_cli-0.2.30 → makea_cli-0.2.31}/tests/test_registry.py +0 -0
  84. {makea_cli-0.2.30 → makea_cli-0.2.31}/tests/test_supplier_scorecard.py +0 -0
  85. {makea_cli-0.2.30 → makea_cli-0.2.31}/uv.lock +0 -0
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.31
4
+
5
+ Beeboo files what a brand hands it in the chat (TECH-150).
6
+
7
+ - `designer create pack-file --product <id> --document <document_id>` puts an
8
+ uploaded file on a tech pack section, named as `get tech-pack --readable`
9
+ shows it. A pattern file (DXF, RUL, PLT) goes on Patterns when no section is
10
+ named. A refusal lists the sections or rows that exist.
11
+ - `designer get library-schema` and `designer create library-element` add a
12
+ fabric, trim or other part to the brand's library, with `--document` for a
13
+ photo or data sheet and `--draft` when required fields are still unknown.
14
+
3
15
  ## 0.2.30
4
16
 
5
17
  Read HP-GL plot files (.plt), the pattern or marker a CAD sends to a cutting
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: makea-cli
3
- Version: 0.2.30
3
+ Version: 0.2.31
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
@@ -199,7 +199,9 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
199
199
  |---|---|---|---|---|
200
200
  | `makea-cli designer create checkout` | write(ask) | `POST /designer/payments/basket/create-session` | a Stripe checkout link for one or more charges. --key repeats: sampling:<sampling_order_id>, production:<production_o… | — |
201
201
  | `makea-cli designer create collection` | write(auto) | `POST /designer/collections/create` | create or update a designer collection. | `designer-create-collection` |
202
+ | `makea-cli designer create library-element` | write(auto) | `POST /designer/library_components` | add a fabric, trim or other part to the brand's library; --document attaches a photo or data sheet, --draft when required fields are unknown. | — |
202
203
  | `makea-cli designer create note` | write(ask) | `POST /designer/products/{product_id}/notes` | post a message into a product's conversation. | — |
204
+ | `makea-cli designer create pack-file` | write(auto) | `POST /designer/products/{product_id}/tech_spec/files` | put an uploaded file on a tech pack section; a pattern file (DXF, RUL, PLT) goes on Patterns when no section is named. | — |
203
205
  | `makea-cli designer create product` | write(ask) | `POST /designer/product/create_or_update_product` | payload must match manufacture/specifications (all frontend fields; categories/subcategories + collection_id in --hel… | `designer-upsert-product` |
204
206
  | `makea-cli designer create quote-award` | write(ask) | `POST /designer/quotes/group_pay_prepare` | choose the supplier quote to sample with. --quote is the supplier link id from `designer list supplier-link`; repeat … | — |
205
207
  | `makea-cli designer create rfq` | write(ask) | `POST /designer/product/send_rfq` | ask the chosen suppliers to quote on a product. --supplier repeats; --makea-sourcing also asks Makea to source. | — |
@@ -209,6 +211,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
209
211
  | `makea-cli designer download document` | read | `GET /designer/document/download` | save bytes for user_id + document_id (designer-authenticated; same query contract as admin document download). | `designer-download-document` |
210
212
  | `makea-cli designer 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. | — |
211
213
  | `makea-cli designer get collection` | read | `GET /designer/collections/{collection_id}/overview` | one collection with its products, orders and lifecycle in a single read. | — |
214
+ | `makea-cli designer get library-schema` | read | `GET /designer/library_components/schema` | the library's sections and each one's field keys, options and required fields. | — |
212
215
  | `makea-cli designer get lifecycle` | read | `GET /designer/product_orders/{product_order_id}/lifecycle` | which stage this product is in. | — |
213
216
  | `makea-cli designer get product` | read | `GET /designer/get_product` | one product: status, documents, prices, links. | — |
214
217
  | `makea-cli designer get production-price` | read | `GET /designer/production_orders/{production_order_id}/calculate_price` | what the deposit (or the balance, --phase final) comes to for the quantities on the run right now, line by line. | — |
@@ -183,7 +183,9 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
183
183
  |---|---|---|---|---|
184
184
  | `makea-cli designer create checkout` | write(ask) | `POST /designer/payments/basket/create-session` | a Stripe checkout link for one or more charges. --key repeats: sampling:<sampling_order_id>, production:<production_o… | — |
185
185
  | `makea-cli designer create collection` | write(auto) | `POST /designer/collections/create` | create or update a designer collection. | `designer-create-collection` |
186
+ | `makea-cli designer create library-element` | write(auto) | `POST /designer/library_components` | add a fabric, trim or other part to the brand's library; --document attaches a photo or data sheet, --draft when required fields are unknown. | — |
186
187
  | `makea-cli designer create note` | write(ask) | `POST /designer/products/{product_id}/notes` | post a message into a product's conversation. | — |
188
+ | `makea-cli designer create pack-file` | write(auto) | `POST /designer/products/{product_id}/tech_spec/files` | put an uploaded file on a tech pack section; a pattern file (DXF, RUL, PLT) goes on Patterns when no section is named. | — |
187
189
  | `makea-cli designer create product` | write(ask) | `POST /designer/product/create_or_update_product` | payload must match manufacture/specifications (all frontend fields; categories/subcategories + collection_id in --hel… | `designer-upsert-product` |
188
190
  | `makea-cli designer create quote-award` | write(ask) | `POST /designer/quotes/group_pay_prepare` | choose the supplier quote to sample with. --quote is the supplier link id from `designer list supplier-link`; repeat … | — |
189
191
  | `makea-cli designer create rfq` | write(ask) | `POST /designer/product/send_rfq` | ask the chosen suppliers to quote on a product. --supplier repeats; --makea-sourcing also asks Makea to source. | — |
@@ -193,6 +195,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
193
195
  | `makea-cli designer download document` | read | `GET /designer/document/download` | save bytes for user_id + document_id (designer-authenticated; same query contract as admin document download). | `designer-download-document` |
194
196
  | `makea-cli designer 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. | — |
195
197
  | `makea-cli designer get collection` | read | `GET /designer/collections/{collection_id}/overview` | one collection with its products, orders and lifecycle in a single read. | — |
198
+ | `makea-cli designer get library-schema` | read | `GET /designer/library_components/schema` | the library's sections and each one's field keys, options and required fields. | — |
196
199
  | `makea-cli designer get lifecycle` | read | `GET /designer/product_orders/{product_order_id}/lifecycle` | which stage this product is in. | — |
197
200
  | `makea-cli designer get product` | read | `GET /designer/get_product` | one product: status, documents, prices, links. | — |
198
201
  | `makea-cli designer get production-price` | read | `GET /designer/production_orders/{production_order_id}/calculate_price` | what the deposit (or the balance, --phase final) comes to for the quantities on the run right now, line by line. | — |
@@ -0,0 +1 @@
1
+ __version__ = "0.2.31"
@@ -1871,6 +1871,21 @@ def designer_create_proposals(product_id: str, proposals: list[dict[str, Any]])
1871
1871
  )
1872
1872
 
1873
1873
 
1874
+ def designer_create_pack_file(product_id: str, body: dict[str, Any]) -> Any:
1875
+ """POST /designer/products/{id}/tech_spec/files — put an uploaded file on a pack section."""
1876
+ return post_json(f"/designer/products/{product_id}/tech_spec/files", body)
1877
+
1878
+
1879
+ def designer_library_schema() -> Any:
1880
+ """GET /designer/library_components/schema — library sections and their field keys."""
1881
+ return get_json("/designer/library_components/schema")
1882
+
1883
+
1884
+ def designer_create_library_component(body: dict[str, Any]) -> Any:
1885
+ """POST /designer/library_components — {section, name?, values, document_ids?, draft?}."""
1886
+ return post_json("/designer/library_components", body)
1887
+
1888
+
1874
1889
  def designer_bulk_accept_actions(channel_id: str, actions: list[dict[str, str]]) -> Any:
1875
1890
  """POST /designer/channels/{id}/suggested_actions/bulk_accept — accept several at once."""
1876
1891
  return post_json(
@@ -750,6 +750,121 @@ def register(app: typer.Typer) -> None:
750
750
  items = [{k: v for k, v in one.items() if v is not None}]
751
751
  print_json_or_exit(console, lambda: api_client.designer_create_proposals(product, items))
752
752
 
753
+ @command(
754
+ app,
755
+ "designer",
756
+ "create",
757
+ "pack-file",
758
+ api="POST /designer/products/{product_id}/tech_spec/files",
759
+ side_effects=["adds the file to the tech pack section and to the product's documents"],
760
+ approval="auto",
761
+ help=(
762
+ "POST /designer/products/{id}/tech_spec/files — put a file the user uploaded (a "
763
+ "document_id) on a tech pack section. Pattern files (DXF, RUL, PLT, AAMA/ASTM) go "
764
+ "on Patterns, which is the default for them. Name the section as `get tech-pack "
765
+ '--readable` shows it ("Patterns", "Main fabric", "Additional notes"); pick a row '
766
+ "with --item or --entry. A refusal lists the sections that exist."
767
+ ),
768
+ )
769
+ def create_pack_file(
770
+ product: str = typer.Option(..., "--product", "-p", help="Product id."),
771
+ document: list[str] = typer.Option(
772
+ ..., "--document", "-d", help="document_id of the uploaded file (repeat)."
773
+ ),
774
+ section: str | None = typer.Option(
775
+ None,
776
+ "--section",
777
+ help="Section, by label or key. Omit for a pattern file (goes on Patterns).",
778
+ ),
779
+ entry: int | None = typer.Option(
780
+ None, "--entry", help="Row number in a repeating section, 0 = first."
781
+ ),
782
+ item: str | None = typer.Option(
783
+ None, "--item", help='Pick the row that holds this value now (e.g. "silk crepe").'
784
+ ),
785
+ ) -> None:
786
+ """Put uploaded files on a tech pack section."""
787
+ body: dict[str, Any] = {"document_ids": list(document)}
788
+ if section:
789
+ body["section"] = section
790
+ if entry is not None:
791
+ body["entry"] = entry
792
+ if item:
793
+ body["item"] = item
794
+ print_json_or_exit(console, lambda: api_client.designer_create_pack_file(product, body))
795
+
796
+ @command(
797
+ app,
798
+ "designer",
799
+ "get",
800
+ "library-schema",
801
+ api="GET /designer/library_components/schema",
802
+ help=(
803
+ "GET /designer/library_components/schema — the library's sections (fabrics, trims, "
804
+ "colours…) and, for each, its field keys, labels, options and which are required. "
805
+ "Read it before `create library-element`."
806
+ ),
807
+ )
808
+ def get_library_schema() -> None:
809
+ """Print the library sections and their fields."""
810
+ print_json_or_exit(console, api_client.designer_library_schema)
811
+
812
+ @command(
813
+ app,
814
+ "designer",
815
+ "create",
816
+ "library-element",
817
+ api="POST /designer/library_components",
818
+ side_effects=["adds the element to the brand's library, shared with their team"],
819
+ approval="auto",
820
+ help=(
821
+ "POST /designer/library_components — add a fabric, trim or other part to the brand's "
822
+ "library. --section and the --values keys come from `get library-schema`. --document "
823
+ "attaches an uploaded photo or data sheet. When required fields are unknown, pass "
824
+ "--draft: it is saved as a draft for the brand to finish."
825
+ ),
826
+ )
827
+ def create_library_element(
828
+ section: str = typer.Option(..., "--section", "-s", help="Section key, e.g. MAIN_FABRIC."),
829
+ values: str | None = typer.Option(
830
+ None, "--values", help="JSON object of {field key: value} from get library-schema."
831
+ ),
832
+ values_file: Path | None = typer.Option(
833
+ None,
834
+ "--values-file",
835
+ "-f",
836
+ exists=True,
837
+ dir_okay=False,
838
+ help="JSON file holding the values object (instead of --values).",
839
+ ),
840
+ name: str | None = typer.Option(
841
+ None, "--name", "-n", help="Display name (defaults to the name field)."
842
+ ),
843
+ document: list[str] = typer.Option(
844
+ [], "--document", "-d", help="document_id of a photo or data sheet (repeat)."
845
+ ),
846
+ product: str | None = typer.Option(
847
+ None, "--product", "-p", help="The product it was made for, if any."
848
+ ),
849
+ draft: bool = typer.Option(
850
+ False, "--draft", help="Save as a draft when required fields are still unknown."
851
+ ),
852
+ ) -> None:
853
+ """Add an element to the brand's library."""
854
+ body: dict[str, Any] = {
855
+ "section": section,
856
+ "values": _json_object(values, values_file, "values"),
857
+ }
858
+ if name:
859
+ body["name"] = name
860
+ if document:
861
+ body["document_ids"] = list(document)
862
+ if product:
863
+ body["product_reference_id"] = product
864
+ if draft:
865
+ body["draft"] = True
866
+ print_json_or_exit(console, lambda: api_client.designer_create_library_component(body))
867
+
753
868
  @command(
754
869
  app,
755
870
  "designer",
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "makea-cli"
7
- version = "0.2.30"
7
+ version = "0.2.31"
8
8
  description = "Makea admin CLI (browser login + Makea admin HTTP API)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -8290,6 +8290,116 @@
8290
8290
  }
8291
8291
  ]
8292
8292
  },
8293
+ {
8294
+ "name": "designer create library-element",
8295
+ "persona": "designer",
8296
+ "verb": "create",
8297
+ "noun": "library-element",
8298
+ "access": "write",
8299
+ "api": "POST /designer/library_components",
8300
+ "external": null,
8301
+ "side_effects": [
8302
+ "adds the element to the brand's library, shared with their team"
8303
+ ],
8304
+ "approval": "auto",
8305
+ "reversible": null,
8306
+ "idempotent": null,
8307
+ "limit": null,
8308
+ "legacy": [],
8309
+ "help": "POST /designer/library_components — add a fabric, trim or other part to the brand's library. --section and the --values keys come from `get library-schema`. --document attaches an uploaded photo or data sheet. When required fields are unknown, pass --draft: it is saved as a draft for the brand to finish.",
8310
+ "function": "makea_cli.commands.brand.cmd.register.<locals>.create_library_element",
8311
+ "flags": [
8312
+ {
8313
+ "name": "section",
8314
+ "kind": "option",
8315
+ "opts": [
8316
+ "--section",
8317
+ "-s"
8318
+ ],
8319
+ "type": "text",
8320
+ "required": true,
8321
+ "multiple": false,
8322
+ "default": null,
8323
+ "help": "Section key, e.g. MAIN_FABRIC."
8324
+ },
8325
+ {
8326
+ "name": "values",
8327
+ "kind": "option",
8328
+ "opts": [
8329
+ "--values"
8330
+ ],
8331
+ "type": "text",
8332
+ "required": false,
8333
+ "multiple": false,
8334
+ "default": null,
8335
+ "help": "JSON object of {field key: value} from get library-schema."
8336
+ },
8337
+ {
8338
+ "name": "values_file",
8339
+ "kind": "option",
8340
+ "opts": [
8341
+ "--values-file",
8342
+ "-f"
8343
+ ],
8344
+ "type": "file",
8345
+ "required": false,
8346
+ "multiple": false,
8347
+ "default": null,
8348
+ "help": "JSON file holding the values object (instead of --values)."
8349
+ },
8350
+ {
8351
+ "name": "name",
8352
+ "kind": "option",
8353
+ "opts": [
8354
+ "--name",
8355
+ "-n"
8356
+ ],
8357
+ "type": "text",
8358
+ "required": false,
8359
+ "multiple": false,
8360
+ "default": null,
8361
+ "help": "Display name (defaults to the name field)."
8362
+ },
8363
+ {
8364
+ "name": "document",
8365
+ "kind": "option",
8366
+ "opts": [
8367
+ "--document",
8368
+ "-d"
8369
+ ],
8370
+ "type": "text",
8371
+ "required": false,
8372
+ "multiple": true,
8373
+ "default": [],
8374
+ "help": "document_id of a photo or data sheet (repeat)."
8375
+ },
8376
+ {
8377
+ "name": "product",
8378
+ "kind": "option",
8379
+ "opts": [
8380
+ "--product",
8381
+ "-p"
8382
+ ],
8383
+ "type": "text",
8384
+ "required": false,
8385
+ "multiple": false,
8386
+ "default": null,
8387
+ "help": "The product it was made for, if any."
8388
+ },
8389
+ {
8390
+ "name": "draft",
8391
+ "kind": "option",
8392
+ "opts": [
8393
+ "--draft"
8394
+ ],
8395
+ "type": "flag",
8396
+ "required": false,
8397
+ "multiple": false,
8398
+ "default": false,
8399
+ "help": "Save as a draft when required fields are still unknown."
8400
+ }
8401
+ ]
8402
+ },
8293
8403
  {
8294
8404
  "name": "designer create note",
8295
8405
  "persona": "designer",
@@ -8348,6 +8458,89 @@
8348
8458
  }
8349
8459
  ]
8350
8460
  },
8461
+ {
8462
+ "name": "designer create pack-file",
8463
+ "persona": "designer",
8464
+ "verb": "create",
8465
+ "noun": "pack-file",
8466
+ "access": "write",
8467
+ "api": "POST /designer/products/{product_id}/tech_spec/files",
8468
+ "external": null,
8469
+ "side_effects": [
8470
+ "adds the file to the tech pack section and to the product's documents"
8471
+ ],
8472
+ "approval": "auto",
8473
+ "reversible": null,
8474
+ "idempotent": null,
8475
+ "limit": null,
8476
+ "legacy": [],
8477
+ "help": "POST /designer/products/{id}/tech_spec/files — put a file the user uploaded (a document_id) on a tech pack section. Pattern files (DXF, RUL, PLT, AAMA/ASTM) go on Patterns, which is the default for them. Name the section as `get tech-pack --readable` shows it (\"Patterns\", \"Main fabric\", \"Additional notes\"); pick a row with --item or --entry. A refusal lists the sections that exist.",
8478
+ "function": "makea_cli.commands.brand.cmd.register.<locals>.create_pack_file",
8479
+ "flags": [
8480
+ {
8481
+ "name": "product",
8482
+ "kind": "option",
8483
+ "opts": [
8484
+ "--product",
8485
+ "-p"
8486
+ ],
8487
+ "type": "text",
8488
+ "required": true,
8489
+ "multiple": false,
8490
+ "default": null,
8491
+ "help": "Product id."
8492
+ },
8493
+ {
8494
+ "name": "document",
8495
+ "kind": "option",
8496
+ "opts": [
8497
+ "--document",
8498
+ "-d"
8499
+ ],
8500
+ "type": "text",
8501
+ "required": true,
8502
+ "multiple": true,
8503
+ "default": null,
8504
+ "help": "document_id of the uploaded file (repeat)."
8505
+ },
8506
+ {
8507
+ "name": "section",
8508
+ "kind": "option",
8509
+ "opts": [
8510
+ "--section"
8511
+ ],
8512
+ "type": "text",
8513
+ "required": false,
8514
+ "multiple": false,
8515
+ "default": null,
8516
+ "help": "Section, by label or key. Omit for a pattern file (goes on Patterns)."
8517
+ },
8518
+ {
8519
+ "name": "entry",
8520
+ "kind": "option",
8521
+ "opts": [
8522
+ "--entry"
8523
+ ],
8524
+ "type": "integer",
8525
+ "required": false,
8526
+ "multiple": false,
8527
+ "default": null,
8528
+ "help": "Row number in a repeating section, 0 = first."
8529
+ },
8530
+ {
8531
+ "name": "item",
8532
+ "kind": "option",
8533
+ "opts": [
8534
+ "--item"
8535
+ ],
8536
+ "type": "text",
8537
+ "required": false,
8538
+ "multiple": false,
8539
+ "default": null,
8540
+ "help": "Pick the row that holds this value now (e.g. \"silk crepe\")."
8541
+ }
8542
+ ]
8543
+ },
8351
8544
  {
8352
8545
  "name": "designer create product",
8353
8546
  "persona": "designer",
@@ -9046,6 +9239,24 @@
9046
9239
  }
9047
9240
  ]
9048
9241
  },
9242
+ {
9243
+ "name": "designer get library-schema",
9244
+ "persona": "designer",
9245
+ "verb": "get",
9246
+ "noun": "library-schema",
9247
+ "access": "read",
9248
+ "api": "GET /designer/library_components/schema",
9249
+ "external": null,
9250
+ "side_effects": [],
9251
+ "approval": "auto",
9252
+ "reversible": null,
9253
+ "idempotent": null,
9254
+ "limit": null,
9255
+ "legacy": [],
9256
+ "help": "GET /designer/library_components/schema — the library's sections (fabrics, trims, colours…) and, for each, its field keys, labels, options and which are required. Read it before `create library-element`.",
9257
+ "function": "makea_cli.commands.brand.cmd.register.<locals>.get_library_schema",
9258
+ "flags": []
9259
+ },
9049
9260
  {
9050
9261
  "name": "designer get lifecycle",
9051
9262
  "persona": "designer",
@@ -1 +0,0 @@
1
- __version__ = "0.2.30"
File without changes
File without changes
File without changes