makea-cli 0.2.5__py3-none-any.whl → 0.2.7__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/commands/orders/cmd.py +70 -0
- {makea_cli-0.2.5.dist-info → makea_cli-0.2.7.dist-info}/METADATA +2 -1
- {makea_cli-0.2.5.dist-info → makea_cli-0.2.7.dist-info}/RECORD +6 -6
- {makea_cli-0.2.5.dist-info → makea_cli-0.2.7.dist-info}/WHEEL +0 -0
- {makea_cli-0.2.5.dist-info → makea_cli-0.2.7.dist-info}/entry_points.txt +0 -0
makea_cli/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.7"
|
makea_cli/commands/orders/cmd.py
CHANGED
|
@@ -314,3 +314,73 @@ def register(app: typer.Typer) -> None:
|
|
|
314
314
|
offset=offset,
|
|
315
315
|
),
|
|
316
316
|
)
|
|
317
|
+
|
|
318
|
+
@command(
|
|
319
|
+
app,
|
|
320
|
+
"admin",
|
|
321
|
+
"update",
|
|
322
|
+
"tracking-status",
|
|
323
|
+
api="POST /admin/tracking/carrier_status",
|
|
324
|
+
side_effects=[
|
|
325
|
+
"moves the order to delivered when the status says so",
|
|
326
|
+
"emails and messages the designer, supplier and admins as the 17track webhook did (none with --silent)",
|
|
327
|
+
],
|
|
328
|
+
approval="ask",
|
|
329
|
+
idempotent=True,
|
|
330
|
+
help=(
|
|
331
|
+
"POST /admin/tracking/carrier_status — apply a carrier status looked up by hand "
|
|
332
|
+
"(the tracking-sweep skill) to one order. Runs the 17track webhook path: status, "
|
|
333
|
+
"fan-out to every order sharing the number, and the delivered emails."
|
|
334
|
+
),
|
|
335
|
+
)
|
|
336
|
+
def update_tracking_status(
|
|
337
|
+
kind: str = typer.Argument(
|
|
338
|
+
...,
|
|
339
|
+
help="sampling | production | restock | shipping | material | reference_sample",
|
|
340
|
+
),
|
|
341
|
+
order_id: str = typer.Argument(..., help="Order id (product id for reference_sample)."),
|
|
342
|
+
tracking_number: str = typer.Argument(..., help="The parcel's tracking number."),
|
|
343
|
+
status: str = typer.Option(
|
|
344
|
+
..., "--status", help="17track status, e.g. Delivered, InTransit."
|
|
345
|
+
),
|
|
346
|
+
sub_status: str | None = typer.Option(None, "--sub-status"),
|
|
347
|
+
event: str | None = typer.Option(None, "--event", help="Latest carrier event text."),
|
|
348
|
+
location: str | None = typer.Option(None, "--location"),
|
|
349
|
+
time_utc: str | None = typer.Option(
|
|
350
|
+
None, "--time", help="Latest event time, ISO 8601 UTC."
|
|
351
|
+
),
|
|
352
|
+
silent: bool = typer.Option(
|
|
353
|
+
False,
|
|
354
|
+
"--silent",
|
|
355
|
+
help="Change state only: no email, WhatsApp or WeChat to anyone. For parcels that landed long ago.",
|
|
356
|
+
),
|
|
357
|
+
) -> None:
|
|
358
|
+
"""
|
|
359
|
+
Tell Makea what the carrier says about one parcel.
|
|
360
|
+
|
|
361
|
+
Output: JSON from the webhook path: success, status, and one entry per
|
|
362
|
+
order the number was fanned out to. Repeating a Delivered update is a
|
|
363
|
+
no-op (no second email). --silent moves the orders without telling
|
|
364
|
+
anyone.
|
|
365
|
+
"""
|
|
366
|
+
track_info = {
|
|
367
|
+
"latest_status": {"status": status, "sub_status": sub_status},
|
|
368
|
+
"latest_event": {
|
|
369
|
+
"description": event,
|
|
370
|
+
"location": location,
|
|
371
|
+
"time_utc": time_utc,
|
|
372
|
+
},
|
|
373
|
+
}
|
|
374
|
+
print_json_or_exit(
|
|
375
|
+
console,
|
|
376
|
+
lambda: api_client.post_json(
|
|
377
|
+
"/admin/tracking/carrier_status",
|
|
378
|
+
{
|
|
379
|
+
"kind": kind,
|
|
380
|
+
"order_id": order_id,
|
|
381
|
+
"tracking_number": tracking_number,
|
|
382
|
+
"track_info": track_info,
|
|
383
|
+
"notify": not silent,
|
|
384
|
+
},
|
|
385
|
+
),
|
|
386
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: makea-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
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
|
|
@@ -131,6 +131,7 @@ exit code:`0` 成功 · `2` 用法错 · `3` 未登录或身份与 persona 不
|
|
|
131
131
|
| `makea-cli admin update quote-request` | write(ask) | `PATCH /admin/quote_requests/{quote_request_id}/update` | set a quote request's stage, status and/or due date. Only what you pass is changed. This is the door that unblocks a … | `update-quote-request` |
|
|
132
132
|
| `makea-cli admin update supplier` | write(ask) | `PUT /admin/supplier/update_supplier` | update an existing supplier from a JSON file (admin). Run `makea-cli get-supplier-profile-schema` FIRST to get the fi… | `update-supplier` |
|
|
133
133
|
| `makea-cli admin update tech-spec` | write(ask) | `POST /admin/products/{id}/technical-specifications` | persist specs from a JSON file. | `save-product-tech-spec` |
|
|
134
|
+
| `makea-cli admin update tracking-status` | write(ask) | `POST /admin/tracking/carrier_status` | apply a carrier status looked up by hand (tracking-sweep skill) to one order. Runs the 17track webhook path: status, fan-out, delivered emails (--silent: state only). | — |
|
|
134
135
|
| `makea-cli admin update user` | write(ask) | `PUT /admin/user-profiles/{user_id}/update` | admin updates DynamoDB user profile fields and/or Cognito custom:userType. Allowed --user-type values: "Fashion brand… | `update-user-profile` |
|
|
135
136
|
| `makea-cli admin upload financial-document` | write(auto) | `POST /admin/products/{product_id}/financial_documents` | upload one or more files to AWS S3 and return financial document metadata. | `upload-financial-documents` |
|
|
136
137
|
| `makea-cli admin upload link-document` | write(auto) | `POST /admin/upload_link_document` | upload a file to AWS S3 and return document domain metadata for reuse as input in other commands. | `upload-link-document` |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
makea_cli/__init__.py,sha256=
|
|
1
|
+
makea_cli/__init__.py,sha256=XHypfHSPdgXFKmOdoewn7czU670gt8InhHhzlP5j_aA,22
|
|
2
2
|
makea_cli/__main__.py,sha256=AkQjxWfKE3w9iD1d6I-2Zqvv2t9cct0oYyFF0UiA-Z0,144
|
|
3
3
|
makea_cli/api_client.py,sha256=Q17LkGpWs_W87Y8ArFBT2l8LfBfsc_OUGPazOaJhQas,50484
|
|
4
4
|
makea_cli/auth_pkce.py,sha256=iXSyJ7DM3qVuj-3FwPiqM25CxXz9ebFs9FNthZdw3ws,7315
|
|
@@ -33,7 +33,7 @@ makea_cli/commands/library/cmd.py,sha256=eXZa6iLyPaoEWtRd-UmhRT6Ox-zlfs89gJqGn-I
|
|
|
33
33
|
makea_cli/commands/metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
34
|
makea_cli/commands/metrics/cmd.py,sha256=mXMSy3zHgJXzqLNy6OrdQqySk9COknPKVDf_SQQdFIA,7662
|
|
35
35
|
makea_cli/commands/orders/__init__.py,sha256=6WKPqX02e0RRPmItPIBJ0TA4_yDI2PVvBDkAiMQu9rU,75
|
|
36
|
-
makea_cli/commands/orders/cmd.py,sha256=
|
|
36
|
+
makea_cli/commands/orders/cmd.py,sha256=A-4HA6WqAaLdqybUVRZRrhCE1C2RGwV66d7Vk6Nka0o,13347
|
|
37
37
|
makea_cli/commands/product/__init__.py,sha256=mfdonFmpbddDSlJq6JWNWgNpM6aOpKtZr-3FJ6scrwg,76
|
|
38
38
|
makea_cli/commands/product/cmd.py,sha256=W0oVTZvsK1QWZWv2x6NC26_JQMXrO16O8gYuKYPWC08,7101
|
|
39
39
|
makea_cli/commands/production/__init__.py,sha256=Whn5ziwVMt4jzcokiFWLhWIpRLYC-ldnjZgAzeQ3We4,79
|
|
@@ -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.7.dist-info/METADATA,sha256=BdE2jRNW3fDb65Q10pcdFd-Pe40gBaambZ8F-j7Zuy8,31603
|
|
45
|
+
makea_cli-0.2.7.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
46
|
+
makea_cli-0.2.7.dist-info/entry_points.txt,sha256=4x-lbVa1jBbNlkNq7L-rYyfRh2spZmc3BLIzP-Dl-Qk,50
|
|
47
|
+
makea_cli-0.2.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|