@usethrottle/mcp 0.9.0 → 0.10.0

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.
package/dist/mcp.js CHANGED
@@ -498,6 +498,16 @@ function stripRawProcessorData(value) {
498
498
 
499
499
  // ../action-catalog/src/actions.ts
500
500
  var OAUTH_WITHHELD = "Over an OAuth connection (ChatGPT, Claude) these are withheld, because a buyer can type them: line-item and quote-item names, SKUs and reference ids; company; every address line except the country; the merchant's external ids; notes, messages, reasons and metadata. Describe items by quantity and amount, and say the rest is withheld rather than missing.";
501
+ var ORDER_STATUSES = [
502
+ "draft",
503
+ "awaiting_payment",
504
+ "awaiting_fulfillment",
505
+ "awaiting_shipment",
506
+ "partially_shipped",
507
+ "shipped",
508
+ "completed",
509
+ "cancelled"
510
+ ];
501
511
  var ACTIONS = [
502
512
  // ---------------------------------------------------------------- identity
503
513
  {
@@ -601,7 +611,20 @@ var ACTIONS = [
601
611
  scopes: ["orders:read"],
602
612
  input: [
603
613
  { name: "q", type: "string", required: false, description: "Free-text search." },
604
- { name: "status", type: "string", required: false, description: "Order status filter." },
614
+ {
615
+ name: "status",
616
+ type: "string",
617
+ required: false,
618
+ description: "Lifecycle status filter.",
619
+ enum: ORDER_STATUSES
620
+ },
621
+ {
622
+ name: "effectiveStatus",
623
+ type: "string",
624
+ required: false,
625
+ description: "Filter on the derived effectiveStatus: the lifecycle status unless the order is cancelled, on hold, refunded, partially refunded or disputed.",
626
+ enum: [...ORDER_STATUSES, "on_hold", "refunded", "partially_refunded", "disputed"]
627
+ },
605
628
  { name: "paymentStatus", type: "string", required: false, description: "Payment status filter." },
606
629
  {
607
630
  name: "createdAfter",
@@ -1944,6 +1967,24 @@ function trigger(id, title, eventType, description) {
1944
1967
  }
1945
1968
  var TRIGGERS = [
1946
1969
  trigger("new_order", "New order", "order.created", "Fires when an order is created."),
1970
+ trigger(
1971
+ "order_awaiting_shipment",
1972
+ "Order awaiting shipment",
1973
+ "order.awaiting_shipment",
1974
+ "Fires when an order is being prepared and nothing has shipped yet."
1975
+ ),
1976
+ trigger(
1977
+ "order_shipped",
1978
+ "Order shipped",
1979
+ "order.shipped",
1980
+ "Fires when everything an order has to ship has been handed to the carrier."
1981
+ ),
1982
+ trigger(
1983
+ "order_completed",
1984
+ "Order completed",
1985
+ "order.completed",
1986
+ "Fires when an order is completed: marked completed after shipping, or finished with nothing to ship."
1987
+ ),
1947
1988
  trigger(
1948
1989
  "payment_captured",
1949
1990
  "Payment captured",
@@ -2265,6 +2306,7 @@ var HANDLERS = {
2265
2306
  {
2266
2307
  q: args.q,
2267
2308
  status: args.status,
2309
+ effectiveStatus: args.effectiveStatus,
2268
2310
  paymentStatus: args.paymentStatus,
2269
2311
  createdAfter: args.createdAfter,
2270
2312
  createdBefore: args.createdBefore,
@@ -3471,7 +3513,16 @@ var page3 = (row) => ({ data: [row], pagination: PAGINATION });
3471
3513
  var ADDRESS = { countryCode: S };
3472
3514
  var CUSTOMER_REF = { id: S };
3473
3515
  var APPLICATION = { id: S, name: T, slug: S };
3474
- var LIFECYCLE_LABELS = ["Draft", "Pending", "Processing", "Partially fulfilled", "Fulfilled", "Cancelled", "Closed"];
3516
+ var LIFECYCLE_LABELS = [
3517
+ "Draft",
3518
+ "Awaiting Payment",
3519
+ "Awaiting Fulfillment",
3520
+ "Awaiting Shipment",
3521
+ "Partially Shipped",
3522
+ "Shipped",
3523
+ "Completed",
3524
+ "Cancelled"
3525
+ ];
3475
3526
  var DISPLAY_QUALIFIERS = [
3476
3527
  "Comped",
3477
3528
  "Awaiting payment",
@@ -3522,6 +3573,7 @@ var ORDER2 = {
3522
3573
  id: S,
3523
3574
  orderNumber: S,
3524
3575
  status: S,
3576
+ effectiveStatus: S,
3525
3577
  displayStatus: DISPLAY_STATUS,
3526
3578
  paymentStatus: S,
3527
3579
  type: S,
@@ -4084,7 +4136,7 @@ var OAUTH_PROJECTIONS = {
4084
4136
  };
4085
4137
 
4086
4138
  // src/server.ts
4087
- var VERSION = true ? "0.9.0" : "0.0.0-dev";
4139
+ var VERSION = true ? "0.10.0" : "0.0.0-dev";
4088
4140
  function registerableActions(policy) {
4089
4141
  const isProduction = policy.identity.environment.providerEnvironment === "production";
4090
4142
  return actionsForChannel("mcp").filter((action) => {