@cmssy/mcp-server 0.10.0 → 0.11.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/README.md CHANGED
@@ -52,7 +52,9 @@ As of 0.6.0, most write tools accept an optional `response` arg:
52
52
  `{pageId, blockId, hasUnpublishedChanges, updatedAt}` for block tools,
53
53
  `{id, slug, status, updatedAt}` for form tools,
54
54
  `{id, slug, updatedAt}` for model tools,
55
- `{id, status, updatedAt}` for record tools.
55
+ `{id, status, updatedAt}` for record tools,
56
+ `{id, orderNumber, status, paymentStatus, fulfillmentStatus, total, balanceDue, currency, updatedAt}` for order tools,
57
+ `{id, code, type, value, enabled, updatedAt}` for discount tools.
56
58
  - `response: "full"` - returns the full mutation response (pre-0.6 behavior).
57
59
 
58
60
  Use `"full"` only if you need the post-write state inline; otherwise issue a
@@ -63,7 +65,11 @@ Tools that accept `response`: `create_page`, `update_page_blocks`,
63
65
  `update_page_settings`, `publish_page`, `unpublish_page`, `revert_to_published`,
64
66
  `update_page_layout`, `add_block_to_page`, `update_block_content`,
65
67
  `remove_block_from_page`, `create_form`, `update_form`, `create_model`,
66
- `update_model`, `create_record`, `update_record`.
68
+ `update_model`, `create_record`, `update_record`, `create_manual_order`,
69
+ `edit_order`, `update_order_details`, `mark_order_paid`, `record_order_payment`,
70
+ `refund_order`, `cancel_order`, `transition_order_fulfillment`,
71
+ `set_order_pipeline_stage`, `record_order_invoice`, `create_discount`,
72
+ `update_discount`, `set_discount_enabled`.
67
73
 
68
74
  `patch_block_content` and the various `delete_*` / status-only tools
69
75
  (`update_form_submission_status`, `import_records`)
@@ -156,6 +162,66 @@ model on every write.
156
162
  Requires workspace permissions `MODELS_VIEW` (read) / `MODELS_CREATE` /
157
163
  `MODELS_EDIT` / `MODELS_DELETE` depending on the operation.
158
164
 
165
+ ### Commerce Tools (Orders, Carts, Discounts)
166
+
167
+ Manage the storefront's orders, carts, and discount codes. **All money fields
168
+ are integer minor units (cents).** Order/discount write tools accept the
169
+ `response` arg (see [Response shape](#response-shape-write-tools)).
170
+
171
+ | Tool | Description |
172
+ | ------------------------------ | ------------------------------------------------------------------- |
173
+ | `list_orders` | List orders (filter by payment/fulfillment status, customer, dates) |
174
+ | `get_order` | Get an order with items, payments, and tax summary |
175
+ | `get_order_pipeline` | Get the workspace's configurable order pipeline stages |
176
+ | `create_manual_order` | Create an admin-entered order |
177
+ | `edit_order` | Replace an order's line items (recomputes totals) |
178
+ | `update_order_details` | Update customer email, notes, and tracking |
179
+ | `mark_order_paid` | Record a full payment (manual reconciliation, no provider verify) |
180
+ | `record_order_payment` | Record a partial payment against the balance due |
181
+ | `refund_order` | Refund an order (full, or partial with `amount`) |
182
+ | `cancel_order` | Cancel an order |
183
+ | `transition_order_fulfillment` | Move an order to a new fulfillment status (with optional tracking) |
184
+ | `set_order_pipeline_stage` | Move an order to a pipeline stage |
185
+ | `record_order_invoice` | Attach an invoice (number, url, provider) to an order |
186
+ | `list_carts` | List shopping carts (admin view, optional status filter) |
187
+ | `list_discounts` | List discount codes (filter by enabled/type/code) |
188
+ | `get_discount` | Get a discount by id |
189
+ | `create_discount` | Create a discount (`percentage` / `fixed` / `free_shipping`) |
190
+ | `update_discount` | Partial update (code/type/currency lock once the code is used) |
191
+ | `set_discount_enabled` | Enable or disable a discount |
192
+ | `list_products` | Product catalog with stock + variant info (over a Data Model) |
193
+ | `bulk_update_products` | Bulk set/adjust status, stock, or price on selected products |
194
+ | `bulk_delete_products` | Bulk-delete selected product records |
195
+
196
+ Products are records of a Custom Data Model; these tools add product-aware
197
+ stock/variant reads and bulk writes on top of the generic record tools. The
198
+ bulk tools target an explicit `ids` list **or** everything matching a `filter`
199
+ (`allMatching: true`). There is no per-variant stock write and no standalone
200
+ inventory mutation - stock is set/adjusted in bulk via `patch.setStock` /
201
+ `patch.adjustStock`.
202
+
203
+ Requires workspace permissions `ORDERS_VIEW` / `ORDERS_MANAGE` (orders),
204
+ `CARTS_VIEW` (carts), `DISCOUNTS_VIEW` / `DISCOUNTS_MANAGE` (discounts),
205
+ `MODELS_VIEW` / `MODELS_EDIT` / `MODELS_DELETE` (products).
206
+
207
+ ### Webhook Tools
208
+
209
+ Manage outbound event webhooks. `create_webhook` and `rotate_webhook_secret`
210
+ return the signing secret **once** - it cannot be retrieved again.
211
+
212
+ | Tool | Description |
213
+ | -------------------------- | -------------------------------------------------------- |
214
+ | `list_webhooks` | List webhook endpoints (secrets never returned) |
215
+ | `list_webhook_deliveries` | Recent delivery attempts (pending/success/failed) |
216
+ | `list_webhook_event_types` | The authoritative allowlist of subscribable events |
217
+ | `create_webhook` | Create an endpoint; returns the endpoint + secret (once) |
218
+ | `update_webhook` | Partial update; pass `enabled` to enable/disable |
219
+ | `rotate_webhook_secret` | Rotate the signing secret (returns new secret once) |
220
+ | `delete_webhook` | Delete an endpoint |
221
+
222
+ Requires workspace permissions `WEBHOOKS_VIEW` (read) / `WEBHOOKS_MANAGE`
223
+ (create, update, rotate, delete).
224
+
159
225
  ## Resources
160
226
 
161
227
  | URI | Description |
@@ -1,7 +1,7 @@
1
1
  export declare class CmssyClient {
2
2
  private apiUrl;
3
3
  private token;
4
- private workspaceId;
4
+ readonly workspaceId: string;
5
5
  private selectionCache;
6
6
  constructor(apiUrl: string, token: string, workspaceId: string);
7
7
  query<T>(query: string, variables?: Record<string, unknown>): Promise<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../src/graphql-client.ts"],"names":[],"mappings":"AAoCA,qBAAa,WAAW;IAIpB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,WAAW;IALrB,OAAO,CAAC,cAAc,CAA6B;gBAGzC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM;IAGvB,KAAK,CAAC,CAAC,EACX,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,OAAO,CAAC,CAAC,CAAC;IA+Bb;;;OAGG;IACG,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,OAAO,CAAC,MAAM,CAAC;CA8BtE"}
1
+ {"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../src/graphql-client.ts"],"names":[],"mappings":"AAoCA,qBAAa,WAAW;IAIpB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,KAAK;aACG,WAAW,EAAE,MAAM;IALrC,OAAO,CAAC,cAAc,CAA6B;gBAGzC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACL,WAAW,EAAE,MAAM;IAG/B,KAAK,CAAC,CAAC,EACX,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,OAAO,CAAC,CAAC,CAAC;IA+Bb;;;OAGG;IACG,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,OAAO,CAAC,MAAM,CAAC;CA8BtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-client.js","sourceRoot":"","sources":["../src/graphql-client.ts"],"names":[],"mappings":"AAWA,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;CAa7B,CAAC;AAEF,SAAS,UAAU,CAAC,IAAa;IAC/B,IAAI,OAAO,GAA+B,IAAI,CAAC;IAC/C,OAAO,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,EAAE,CAAC;QAC3E,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAC3B,CAAC;IACD,OAAO,OAAO;QACZ,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE;QAC5C,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EA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G,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YACtC,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACvC,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBAC3D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACzB,CAAC;iBAAM,IAAI,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACvD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;gBACnE,IAAI,GAAG;oBAAE,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,MAAM,GAAG,IAAI,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC1C,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
package/dist/queries.d.ts CHANGED
@@ -37,4 +37,33 @@ export declare const UPDATE_MODEL_RECORD_MUTATION = "\n mutation UpdateModelRec
37
37
  export declare const UPDATE_MODEL_RECORD_STATUS_MUTATION = "\n mutation UpdateModelRecordStatus($input: UpdateModelRecordStatusInput!) {\n updateModelRecordStatus(input: $input) {\n \n id\n workspaceId\n modelId\n data\n status\n createdAt\n updatedAt\n createdBy\n updatedBy\n\n }\n }\n";
38
38
  export declare const DELETE_MODEL_RECORD_MUTATION = "\n mutation DeleteModelRecord($id: ID!) {\n deleteModelRecord(id: $id)\n }\n";
39
39
  export declare const IMPORT_MODEL_RECORDS_MUTATION = "\n mutation ImportModelRecords($input: ImportModelRecordsInput!) {\n importModelRecords(input: $input) {\n importedCount\n errors { row message }\n }\n }\n";
40
+ export declare const ORDERS_QUERY = "\n query Orders(\n $workspaceId: ID!\n $paymentStatus: String\n $fulfillmentStatus: String\n $customerId: ID\n $search: String\n $pipelineStageId: String\n $dateFrom: DateTime\n $dateTo: DateTime\n $skip: Int\n $limit: Int\n ) {\n orders(\n workspaceId: $workspaceId\n paymentStatus: $paymentStatus\n fulfillmentStatus: $fulfillmentStatus\n customerId: $customerId\n search: $search\n pipelineStageId: $pipelineStageId\n dateFrom: $dateFrom\n dateTo: $dateTo\n skip: $skip\n limit: $limit\n ) {\n items { \n id\n status\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n amountPaid\n balanceDue\n refundedAmount\n pipelineStageId\n createdAt\n updatedAt\n }\n total\n hasMore\n }\n }\n";
41
+ export declare const ORDER_BY_ID_QUERY = "\n query Order($workspaceId: ID!, $id: ID!) {\n order(workspaceId: $workspaceId, id: $id) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
42
+ export declare const ORDER_PIPELINE_QUERY = "\n query OrderPipeline($workspaceId: ID!) {\n orderPipeline(workspaceId: $workspaceId) {\n stages { id label color position isDefault isTerminal }\n }\n }\n";
43
+ export declare const CREATE_MANUAL_ORDER_MUTATION = "\n mutation CreateManualOrder($input: CreateManualOrderInput!) {\n createManualOrder(input: $input) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
44
+ export declare const EDIT_ORDER_MUTATION = "\n mutation EditOrder($input: EditOrderInput!) {\n editOrder(input: $input) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
45
+ export declare const UPDATE_ORDER_DETAILS_MUTATION = "\n mutation UpdateOrderDetails($input: UpdateOrderDetailsInput!) {\n updateOrderDetails(input: $input) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
46
+ export declare const MARK_ORDER_PAID_MUTATION = "\n mutation MarkOrderPaid($input: MarkOrderPaidInput!) {\n markOrderPaid(input: $input) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
47
+ export declare const RECORD_ORDER_PAYMENT_MUTATION = "\n mutation RecordOrderPayment($input: RecordOrderPaymentInput!) {\n recordOrderPayment(input: $input) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
48
+ export declare const REFUND_ORDER_MUTATION = "\n mutation RefundOrder($input: RefundOrderInput!) {\n refundOrder(input: $input) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
49
+ export declare const CANCEL_ORDER_MUTATION = "\n mutation CancelOrder($input: CancelOrderInput!) {\n cancelOrder(input: $input) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
50
+ export declare const TRANSITION_ORDER_FULFILLMENT_MUTATION = "\n mutation TransitionOrderFulfillment($input: FulfillOrderInput!) {\n transitionOrderFulfillment(input: $input) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
51
+ export declare const SET_ORDER_PIPELINE_STAGE_MUTATION = "\n mutation SetOrderPipelineStage($input: SetOrderPipelineStageInput!) {\n setOrderPipelineStage(input: $input) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
52
+ export declare const RECORD_ORDER_INVOICE_MUTATION = "\n mutation RecordOrderInvoice($input: RecordOrderInvoiceInput!) {\n recordOrderInvoice(input: $input) { \n id\n status\n displayStatus\n paymentStatus\n fulfillmentStatus\n orderNumber\n customerId\n customerEmail\n currency\n subtotal\n tax\n total\n pricesIncludeTax\n amountPaid\n balanceDue\n refundedAmount\n paymentProvider\n paymentReference\n paidAt\n fulfilledAt\n trackingNumber\n trackingCarrier\n notes\n invoiceNumber\n invoiceUrl\n invoiceProvider\n invoicedAt\n canceledAt\n pipelineStageId\n items {\n name\n price\n currency\n quantity\n sku\n variantKey\n modelId\n recordId\n recordDeleted\n taxRate\n taxAmount\n }\n payments { amount reference provider at }\n taxSummary { name rate base amount }\n createdAt\n updatedAt\n }\n }\n";
53
+ export declare const ADMIN_CARTS_QUERY = "\n query AdminCarts($workspaceId: ID!, $status: String, $skip: Int, $limit: Int) {\n adminCarts(workspaceId: $workspaceId, status: $status, skip: $skip, limit: $limit) {\n items {\n id\n status\n customerId\n itemCount\n totalValue\n currency\n createdAt\n updatedAt\n }\n total\n hasMore\n }\n }\n";
54
+ export declare const DISCOUNTS_QUERY = "\n query Discounts(\n $workspaceId: ID!\n $enabled: Boolean\n $type: String\n $search: String\n $limit: Int\n $offset: Int\n ) {\n discounts(\n workspaceId: $workspaceId\n enabled: $enabled\n type: $type\n search: $search\n limit: $limit\n offset: $offset\n ) {\n items { \n id\n code\n type\n value\n currency\n minSubtotal\n maxUses\n currentUses\n maxUsesPerUser\n startsAt\n endsAt\n enabled\n createdAt\n updatedAt\n }\n total\n hasMore\n }\n }\n";
55
+ export declare const DISCOUNT_BY_ID_QUERY = "\n query Discount($workspaceId: ID!, $id: ID!) {\n discount(workspaceId: $workspaceId, id: $id) { \n id\n code\n type\n value\n currency\n minSubtotal\n maxUses\n currentUses\n maxUsesPerUser\n startsAt\n endsAt\n enabled\n createdAt\n updatedAt\n }\n }\n";
56
+ export declare const CREATE_DISCOUNT_MUTATION = "\n mutation CreateDiscount($workspaceId: ID!, $input: CreateDiscountInput!) {\n createDiscount(workspaceId: $workspaceId, input: $input) { \n id\n code\n type\n value\n currency\n minSubtotal\n maxUses\n currentUses\n maxUsesPerUser\n startsAt\n endsAt\n enabled\n createdAt\n updatedAt\n }\n }\n";
57
+ export declare const UPDATE_DISCOUNT_MUTATION = "\n mutation UpdateDiscount($workspaceId: ID!, $id: ID!, $input: UpdateDiscountInput!) {\n updateDiscount(workspaceId: $workspaceId, id: $id, input: $input) { \n id\n code\n type\n value\n currency\n minSubtotal\n maxUses\n currentUses\n maxUsesPerUser\n startsAt\n endsAt\n enabled\n createdAt\n updatedAt\n }\n }\n";
58
+ export declare const SET_DISCOUNT_ENABLED_MUTATION = "\n mutation SetDiscountEnabled($workspaceId: ID!, $id: ID!, $enabled: Boolean!) {\n setDiscountEnabled(workspaceId: $workspaceId, id: $id, enabled: $enabled) { \n id\n code\n type\n value\n currency\n minSubtotal\n maxUses\n currentUses\n maxUsesPerUser\n startsAt\n endsAt\n enabled\n createdAt\n updatedAt\n }\n }\n";
59
+ export declare const WEBHOOK_ENDPOINTS_QUERY = "\n query WebhookEndpoints($workspaceId: ID!) {\n webhookEndpoints(workspaceId: $workspaceId) { \n id\n url\n events\n enabled\n description\n createdAt\n updatedAt\n }\n }\n";
60
+ export declare const WEBHOOK_DELIVERIES_QUERY = "\n query WebhookDeliveries($workspaceId: ID!, $limit: Int) {\n webhookDeliveries(workspaceId: $workspaceId, limit: $limit) {\n id\n endpointId\n webhookId\n event\n url\n status\n attempts\n responseCode\n error\n nextAttemptAt\n deliveredAt\n createdAt\n }\n }\n";
61
+ export declare const WEBHOOK_EVENT_TYPES_QUERY = "\n query WebhookEventTypes($workspaceId: ID!) {\n webhookEventTypes(workspaceId: $workspaceId)\n }\n";
62
+ export declare const CREATE_WEBHOOK_ENDPOINT_MUTATION = "\n mutation CreateWebhookEndpoint($input: CreateWebhookEndpointInput!) {\n createWebhookEndpoint(input: $input) {\n secret\n endpoint { \n id\n url\n events\n enabled\n description\n createdAt\n updatedAt\n }\n }\n }\n";
63
+ export declare const UPDATE_WEBHOOK_ENDPOINT_MUTATION = "\n mutation UpdateWebhookEndpoint($input: UpdateWebhookEndpointInput!) {\n updateWebhookEndpoint(input: $input) { \n id\n url\n events\n enabled\n description\n createdAt\n updatedAt\n }\n }\n";
64
+ export declare const ROTATE_WEBHOOK_SECRET_MUTATION = "\n mutation RotateWebhookSecret($workspaceId: ID!, $id: ID!) {\n rotateWebhookSecret(workspaceId: $workspaceId, id: $id) {\n secret\n endpoint { \n id\n url\n events\n enabled\n description\n createdAt\n updatedAt\n }\n }\n }\n";
65
+ export declare const DELETE_WEBHOOK_ENDPOINT_MUTATION = "\n mutation DeleteWebhookEndpoint($workspaceId: ID!, $id: ID!) {\n deleteWebhookEndpoint(workspaceId: $workspaceId, id: $id)\n }\n";
66
+ export declare const PRODUCT_CATALOG_QUERY = "\n query ProductCatalog(\n $modelId: ID!\n $filter: ProductCatalogFilterInput\n $limit: Int\n $offset: Int\n $sort: String\n ) {\n productCatalog(\n modelId: $modelId\n filter: $filter\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n items {\n id\n data\n status\n onHand\n reserved\n available\n hasVariants\n variants {\n key\n sku\n price\n onHand\n reserved\n available\n selectedOptions { name value }\n }\n createdAt\n updatedAt\n }\n total\n hasMore\n lowStockThreshold\n }\n }\n";
67
+ export declare const BULK_UPDATE_PRODUCT_RECORDS_MUTATION = "\n mutation BulkUpdateProductRecords(\n $modelId: ID!\n $selection: ProductBulkSelectionInput!\n $patch: ProductBulkPatchInput!\n ) {\n bulkUpdateProductRecords(\n modelId: $modelId\n selection: $selection\n patch: $patch\n )\n }\n";
68
+ export declare const BULK_DELETE_PRODUCT_RECORDS_MUTATION = "\n mutation BulkDeleteProductRecords(\n $modelId: ID!\n $selection: ProductBulkSelectionInput!\n ) {\n bulkDeleteProductRecords(modelId: $modelId, selection: $selection)\n }\n";
40
69
  //# sourceMappingURL=queries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../src/queries.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,2YAqBvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,0kDA0E5B,CAAC;AAIF,eAAO,MAAM,iBAAiB,2JAU7B,CAAC;AAIF,eAAO,MAAM,uBAAuB,6YAqBnC,CAAC;AAIF,eAAO,MAAM,kBAAkB,+TAmB9B,CAAC;AAIF,eAAO,MAAM,kBAAkB,+tBAuC9B,CAAC;AAOF,eAAO,MAAM,4BAA4B,0OAUxC,CAAC;AAEF,eAAO,MAAM,6BAA6B,+ZAmBzC,CAAC;AAIF,eAAO,MAAM,gBAAgB,mUAsB5B,CAAC;AAEF,eAAO,MAAM,yBAAyB,uTAcrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,yOAYnC,CAAC;AAEF,eAAO,MAAM,6BAA6B,giBA6BzC,CAAC;AAEF,eAAO,MAAM,4BAA4B,iPAYxC,CAAC;AAEF,eAAO,MAAM,oCAAo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eAAO,MAAM,gCAAgC,iNAI5C,CAAC;AAEF,eAAO,MAAM,8BAA8B,iQAO1C,CAAC;AAEF,eAAO,MAAM,gCAAgC,4IAI5C,CAAC;AAIF,eAAO,MAAM,qBAAqB,2sBAwCjC,CAAC;AAEF,eAAO,MAAM,oCAAoC,6QAYhD,CAAC;AAEF,eAAO,MAAM,oCAAoC,gMAOhD,CAAC"}
package/dist/queries.js CHANGED
@@ -637,4 +637,375 @@ export const IMPORT_MODEL_RECORDS_MUTATION = `
637
637
  }
638
638
  }
639
639
  `;
640
+ // ─── Commerce: Orders ────────────────────────────────────────
641
+ // Selection set reused by every order read + mutation (they all return Order).
642
+ // Money fields are integer minor units (cents).
643
+ const ORDER_FRAGMENT = `
644
+ id
645
+ status
646
+ displayStatus
647
+ paymentStatus
648
+ fulfillmentStatus
649
+ orderNumber
650
+ customerId
651
+ customerEmail
652
+ currency
653
+ subtotal
654
+ tax
655
+ total
656
+ pricesIncludeTax
657
+ amountPaid
658
+ balanceDue
659
+ refundedAmount
660
+ paymentProvider
661
+ paymentReference
662
+ paidAt
663
+ fulfilledAt
664
+ trackingNumber
665
+ trackingCarrier
666
+ notes
667
+ invoiceNumber
668
+ invoiceUrl
669
+ invoiceProvider
670
+ invoicedAt
671
+ canceledAt
672
+ pipelineStageId
673
+ items {
674
+ name
675
+ price
676
+ currency
677
+ quantity
678
+ sku
679
+ variantKey
680
+ modelId
681
+ recordId
682
+ recordDeleted
683
+ taxRate
684
+ taxAmount
685
+ }
686
+ payments { amount reference provider at }
687
+ taxSummary { name rate base amount }
688
+ createdAt
689
+ updatedAt
690
+ `;
691
+ // Slim selection for list views - omits items/payments/taxSummary so a page
692
+ // of orders does not blow up the agent's context. Use get_order for full detail.
693
+ const ORDER_LIST_FRAGMENT = `
694
+ id
695
+ status
696
+ paymentStatus
697
+ fulfillmentStatus
698
+ orderNumber
699
+ customerId
700
+ customerEmail
701
+ currency
702
+ subtotal
703
+ tax
704
+ total
705
+ amountPaid
706
+ balanceDue
707
+ refundedAmount
708
+ pipelineStageId
709
+ createdAt
710
+ updatedAt
711
+ `;
712
+ export const ORDERS_QUERY = `
713
+ query Orders(
714
+ $workspaceId: ID!
715
+ $paymentStatus: String
716
+ $fulfillmentStatus: String
717
+ $customerId: ID
718
+ $search: String
719
+ $pipelineStageId: String
720
+ $dateFrom: DateTime
721
+ $dateTo: DateTime
722
+ $skip: Int
723
+ $limit: Int
724
+ ) {
725
+ orders(
726
+ workspaceId: $workspaceId
727
+ paymentStatus: $paymentStatus
728
+ fulfillmentStatus: $fulfillmentStatus
729
+ customerId: $customerId
730
+ search: $search
731
+ pipelineStageId: $pipelineStageId
732
+ dateFrom: $dateFrom
733
+ dateTo: $dateTo
734
+ skip: $skip
735
+ limit: $limit
736
+ ) {
737
+ items { ${ORDER_LIST_FRAGMENT} }
738
+ total
739
+ hasMore
740
+ }
741
+ }
742
+ `;
743
+ export const ORDER_BY_ID_QUERY = `
744
+ query Order($workspaceId: ID!, $id: ID!) {
745
+ order(workspaceId: $workspaceId, id: $id) { ${ORDER_FRAGMENT} }
746
+ }
747
+ `;
748
+ export const ORDER_PIPELINE_QUERY = `
749
+ query OrderPipeline($workspaceId: ID!) {
750
+ orderPipeline(workspaceId: $workspaceId) {
751
+ stages { id label color position isDefault isTerminal }
752
+ }
753
+ }
754
+ `;
755
+ export const CREATE_MANUAL_ORDER_MUTATION = `
756
+ mutation CreateManualOrder($input: CreateManualOrderInput!) {
757
+ createManualOrder(input: $input) { ${ORDER_FRAGMENT} }
758
+ }
759
+ `;
760
+ export const EDIT_ORDER_MUTATION = `
761
+ mutation EditOrder($input: EditOrderInput!) {
762
+ editOrder(input: $input) { ${ORDER_FRAGMENT} }
763
+ }
764
+ `;
765
+ export const UPDATE_ORDER_DETAILS_MUTATION = `
766
+ mutation UpdateOrderDetails($input: UpdateOrderDetailsInput!) {
767
+ updateOrderDetails(input: $input) { ${ORDER_FRAGMENT} }
768
+ }
769
+ `;
770
+ export const MARK_ORDER_PAID_MUTATION = `
771
+ mutation MarkOrderPaid($input: MarkOrderPaidInput!) {
772
+ markOrderPaid(input: $input) { ${ORDER_FRAGMENT} }
773
+ }
774
+ `;
775
+ export const RECORD_ORDER_PAYMENT_MUTATION = `
776
+ mutation RecordOrderPayment($input: RecordOrderPaymentInput!) {
777
+ recordOrderPayment(input: $input) { ${ORDER_FRAGMENT} }
778
+ }
779
+ `;
780
+ export const REFUND_ORDER_MUTATION = `
781
+ mutation RefundOrder($input: RefundOrderInput!) {
782
+ refundOrder(input: $input) { ${ORDER_FRAGMENT} }
783
+ }
784
+ `;
785
+ export const CANCEL_ORDER_MUTATION = `
786
+ mutation CancelOrder($input: CancelOrderInput!) {
787
+ cancelOrder(input: $input) { ${ORDER_FRAGMENT} }
788
+ }
789
+ `;
790
+ export const TRANSITION_ORDER_FULFILLMENT_MUTATION = `
791
+ mutation TransitionOrderFulfillment($input: FulfillOrderInput!) {
792
+ transitionOrderFulfillment(input: $input) { ${ORDER_FRAGMENT} }
793
+ }
794
+ `;
795
+ export const SET_ORDER_PIPELINE_STAGE_MUTATION = `
796
+ mutation SetOrderPipelineStage($input: SetOrderPipelineStageInput!) {
797
+ setOrderPipelineStage(input: $input) { ${ORDER_FRAGMENT} }
798
+ }
799
+ `;
800
+ export const RECORD_ORDER_INVOICE_MUTATION = `
801
+ mutation RecordOrderInvoice($input: RecordOrderInvoiceInput!) {
802
+ recordOrderInvoice(input: $input) { ${ORDER_FRAGMENT} }
803
+ }
804
+ `;
805
+ // ─── Commerce: Carts ─────────────────────────────────────────
806
+ export const ADMIN_CARTS_QUERY = `
807
+ query AdminCarts($workspaceId: ID!, $status: String, $skip: Int, $limit: Int) {
808
+ adminCarts(workspaceId: $workspaceId, status: $status, skip: $skip, limit: $limit) {
809
+ items {
810
+ id
811
+ status
812
+ customerId
813
+ itemCount
814
+ totalValue
815
+ currency
816
+ createdAt
817
+ updatedAt
818
+ }
819
+ total
820
+ hasMore
821
+ }
822
+ }
823
+ `;
824
+ // ─── Commerce: Discounts ─────────────────────────────────────
825
+ const DISCOUNT_FRAGMENT = `
826
+ id
827
+ code
828
+ type
829
+ value
830
+ currency
831
+ minSubtotal
832
+ maxUses
833
+ currentUses
834
+ maxUsesPerUser
835
+ startsAt
836
+ endsAt
837
+ enabled
838
+ createdAt
839
+ updatedAt
840
+ `;
841
+ export const DISCOUNTS_QUERY = `
842
+ query Discounts(
843
+ $workspaceId: ID!
844
+ $enabled: Boolean
845
+ $type: String
846
+ $search: String
847
+ $limit: Int
848
+ $offset: Int
849
+ ) {
850
+ discounts(
851
+ workspaceId: $workspaceId
852
+ enabled: $enabled
853
+ type: $type
854
+ search: $search
855
+ limit: $limit
856
+ offset: $offset
857
+ ) {
858
+ items { ${DISCOUNT_FRAGMENT} }
859
+ total
860
+ hasMore
861
+ }
862
+ }
863
+ `;
864
+ export const DISCOUNT_BY_ID_QUERY = `
865
+ query Discount($workspaceId: ID!, $id: ID!) {
866
+ discount(workspaceId: $workspaceId, id: $id) { ${DISCOUNT_FRAGMENT} }
867
+ }
868
+ `;
869
+ export const CREATE_DISCOUNT_MUTATION = `
870
+ mutation CreateDiscount($workspaceId: ID!, $input: CreateDiscountInput!) {
871
+ createDiscount(workspaceId: $workspaceId, input: $input) { ${DISCOUNT_FRAGMENT} }
872
+ }
873
+ `;
874
+ export const UPDATE_DISCOUNT_MUTATION = `
875
+ mutation UpdateDiscount($workspaceId: ID!, $id: ID!, $input: UpdateDiscountInput!) {
876
+ updateDiscount(workspaceId: $workspaceId, id: $id, input: $input) { ${DISCOUNT_FRAGMENT} }
877
+ }
878
+ `;
879
+ export const SET_DISCOUNT_ENABLED_MUTATION = `
880
+ mutation SetDiscountEnabled($workspaceId: ID!, $id: ID!, $enabled: Boolean!) {
881
+ setDiscountEnabled(workspaceId: $workspaceId, id: $id, enabled: $enabled) { ${DISCOUNT_FRAGMENT} }
882
+ }
883
+ `;
884
+ // ─── Webhooks ────────────────────────────────────────────────
885
+ const WEBHOOK_ENDPOINT_FRAGMENT = `
886
+ id
887
+ url
888
+ events
889
+ enabled
890
+ description
891
+ createdAt
892
+ updatedAt
893
+ `;
894
+ export const WEBHOOK_ENDPOINTS_QUERY = `
895
+ query WebhookEndpoints($workspaceId: ID!) {
896
+ webhookEndpoints(workspaceId: $workspaceId) { ${WEBHOOK_ENDPOINT_FRAGMENT} }
897
+ }
898
+ `;
899
+ export const WEBHOOK_DELIVERIES_QUERY = `
900
+ query WebhookDeliveries($workspaceId: ID!, $limit: Int) {
901
+ webhookDeliveries(workspaceId: $workspaceId, limit: $limit) {
902
+ id
903
+ endpointId
904
+ webhookId
905
+ event
906
+ url
907
+ status
908
+ attempts
909
+ responseCode
910
+ error
911
+ nextAttemptAt
912
+ deliveredAt
913
+ createdAt
914
+ }
915
+ }
916
+ `;
917
+ export const WEBHOOK_EVENT_TYPES_QUERY = `
918
+ query WebhookEventTypes($workspaceId: ID!) {
919
+ webhookEventTypes(workspaceId: $workspaceId)
920
+ }
921
+ `;
922
+ export const CREATE_WEBHOOK_ENDPOINT_MUTATION = `
923
+ mutation CreateWebhookEndpoint($input: CreateWebhookEndpointInput!) {
924
+ createWebhookEndpoint(input: $input) {
925
+ secret
926
+ endpoint { ${WEBHOOK_ENDPOINT_FRAGMENT} }
927
+ }
928
+ }
929
+ `;
930
+ export const UPDATE_WEBHOOK_ENDPOINT_MUTATION = `
931
+ mutation UpdateWebhookEndpoint($input: UpdateWebhookEndpointInput!) {
932
+ updateWebhookEndpoint(input: $input) { ${WEBHOOK_ENDPOINT_FRAGMENT} }
933
+ }
934
+ `;
935
+ export const ROTATE_WEBHOOK_SECRET_MUTATION = `
936
+ mutation RotateWebhookSecret($workspaceId: ID!, $id: ID!) {
937
+ rotateWebhookSecret(workspaceId: $workspaceId, id: $id) {
938
+ secret
939
+ endpoint { ${WEBHOOK_ENDPOINT_FRAGMENT} }
940
+ }
941
+ }
942
+ `;
943
+ export const DELETE_WEBHOOK_ENDPOINT_MUTATION = `
944
+ mutation DeleteWebhookEndpoint($workspaceId: ID!, $id: ID!) {
945
+ deleteWebhookEndpoint(workspaceId: $workspaceId, id: $id)
946
+ }
947
+ `;
948
+ // ─── Commerce: Products (catalog over model records) ─────────
949
+ export const PRODUCT_CATALOG_QUERY = `
950
+ query ProductCatalog(
951
+ $modelId: ID!
952
+ $filter: ProductCatalogFilterInput
953
+ $limit: Int
954
+ $offset: Int
955
+ $sort: String
956
+ ) {
957
+ productCatalog(
958
+ modelId: $modelId
959
+ filter: $filter
960
+ limit: $limit
961
+ offset: $offset
962
+ sort: $sort
963
+ ) {
964
+ items {
965
+ id
966
+ data
967
+ status
968
+ onHand
969
+ reserved
970
+ available
971
+ hasVariants
972
+ variants {
973
+ key
974
+ sku
975
+ price
976
+ onHand
977
+ reserved
978
+ available
979
+ selectedOptions { name value }
980
+ }
981
+ createdAt
982
+ updatedAt
983
+ }
984
+ total
985
+ hasMore
986
+ lowStockThreshold
987
+ }
988
+ }
989
+ `;
990
+ export const BULK_UPDATE_PRODUCT_RECORDS_MUTATION = `
991
+ mutation BulkUpdateProductRecords(
992
+ $modelId: ID!
993
+ $selection: ProductBulkSelectionInput!
994
+ $patch: ProductBulkPatchInput!
995
+ ) {
996
+ bulkUpdateProductRecords(
997
+ modelId: $modelId
998
+ selection: $selection
999
+ patch: $patch
1000
+ )
1001
+ }
1002
+ `;
1003
+ export const BULK_DELETE_PRODUCT_RECORDS_MUTATION = `
1004
+ mutation BulkDeleteProductRecords(
1005
+ $modelId: ID!
1006
+ $selection: ProductBulkSelectionInput!
1007
+ ) {
1008
+ bulkDeleteProductRecords(modelId: $modelId, selection: $selection)
1009
+ }
1010
+ `;
640
1011
  //# sourceMappingURL=queries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries.js","sourceRoot":"","sources":["../src/queries.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAEhE,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;CAqB1B,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAg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AG3C,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG;;6CAEH,yBAAyB;;CAErE,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;mBAI3B,yBAAyB;;;CAG3C,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;CAI/C,CAAC;AAEF,gEAAgE;AAEhE,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCpC,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG;;;;;;;;;;;;CAYnD,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG;;;;;;;CAOnD,CAAC"}
@@ -61,6 +61,46 @@ export interface RecordMinimal {
61
61
  updatedAt?: string;
62
62
  }
63
63
  export declare function recordMinimal(record: RecordLike): RecordMinimal;
64
+ interface OrderLike {
65
+ id: string;
66
+ orderNumber?: number | null;
67
+ status?: string | null;
68
+ paymentStatus?: string | null;
69
+ fulfillmentStatus?: string | null;
70
+ total?: number | null;
71
+ balanceDue?: number | null;
72
+ currency?: string | null;
73
+ updatedAt?: string | null;
74
+ }
75
+ export interface OrderMinimal {
76
+ id: string;
77
+ orderNumber?: number;
78
+ status?: string;
79
+ paymentStatus?: string;
80
+ fulfillmentStatus?: string;
81
+ total?: number;
82
+ balanceDue?: number;
83
+ currency?: string;
84
+ updatedAt?: string;
85
+ }
86
+ export declare function orderMinimal(order: OrderLike): OrderMinimal;
87
+ interface DiscountLike {
88
+ id: string;
89
+ code?: string | null;
90
+ type?: string | null;
91
+ value?: number | null;
92
+ enabled?: boolean | null;
93
+ updatedAt?: string | null;
94
+ }
95
+ export interface DiscountMinimal {
96
+ id: string;
97
+ code?: string;
98
+ type?: string;
99
+ value?: number;
100
+ enabled?: boolean;
101
+ updatedAt?: string;
102
+ }
103
+ export declare function discountMinimal(discount: DiscountLike): DiscountMinimal;
64
104
  export declare function jsonText<T>(mode: ResponseMode, full: T, toMinimal: (full: T) => unknown): {
65
105
  content: Array<{
66
106
  type: "text";
@@ -1 +1 @@
1
- {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../src/responses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB,6DAM5B,CAAC;AAEJ,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9C,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,4BAA4B,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9C,2BAA2B,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5B;AAYD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,QAAQ,EACd,MAAM,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GAC/B,WAAW,CAab;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,MAAM,GACd,gBAAgB,CAMlB;AAED,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAC;IACX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