{
	"contract": 2,
	"identity": {
		"accent": "#10b981",
		"category": "commerce",
		"description": "Provider-agnostic commerce primitives: cart and pricing math, order + fulfillment lifecycle, discount codes, branded transactional-email building blocks, and a ready-made Drizzle schema (orders, inventory, quotes, gift cards, loyalty, reviews). Payments, shipping, and email ride pluggable vendor adapters (`@absolutejs/commerce-*`), so a shop keeps the gateway and carrier accounts it already has.",
		"docsUrl": "https://github.com/absolutejs/commerce",
		"name": "@absolutejs/commerce",
		"tagline": "Sell products — cart, checkout, and shipping."
	},
	"requires": {
		"peers": [
			{
				"name": "drizzle-orm",
				"range": ">=1.0.0-rc.4",
				"reason": "order/inventory tables and queries (the ./drizzle subpath)"
			}
		],
		"services": [
			{
				"description": "Orders, inventory, quotes, gift cards, and loyalty tables live here",
				"id": "postgres",
				"optional": true
			}
		]
	},
	"lifecycle": [
		{
			"docsUrl": "https://github.com/absolutejs/commerce#readme",
			"id": "drizzle-schema",
			"idempotent": true,
			"kind": "migration",
			"title": "Add the commerce tables to your Drizzle schema and run `drizzle-kit push`",
			"when": "before-first-run"
		}
	],
	"settings": {
		"type": "object",
		"properties": {}
	},
	"slots": {
		"email": {
			"configPath": "$self",
			"contract": "commerce/email-provider",
			"description": "Who delivers your order and receipt emails",
			"known": [
				"@absolutejs/commerce-resend"
			]
		},
		"payment": {
			"configPath": "$self",
			"contract": "commerce/payment-provider",
			"description": "Who processes payments and hosts checkout",
			"known": [
				"@absolutejs/commerce-stripe"
			]
		},
		"shipping": {
			"configPath": "$self",
			"contract": "commerce/shipping-provider",
			"description": "Who quotes rates and prints shipping labels",
			"known": [
				"@absolutejs/commerce-easypost"
			]
		}
	},
	"wiring": [
		{
			"description": "Each surface is independent — wire only the providers your shop uses.",
			"id": "default",
			"server": {
				"code": "const payments = ${slot.payment};\nconst shipping = ${slot.shipping};\nconst receipts = ${slot.email};",
				"imports": [],
				"placement": "module-scope"
			},
			"title": "Wire the payment, shipping, and email providers"
		}
	],
	"tools": {
		"inventory_levels": {
			"annotations": {
				"readOnlyHint": true
			},
			"authorization": {
				"approval": "never",
				"audience": "admin",
				"effects": [
					"read"
				],
				"requiredScopes": [
					"commerce:read"
				]
			},
			"description": "Current blank-stock inventory (product, size, color, quantity on hand). Set lowOnly to list only items at or below their restock threshold.",
			"input": {
				"type": "object",
				"properties": {
					"lowOnly": {
						"description": "Only items at or below their low-stock threshold.",
						"type": "boolean"
					}
				}
			},
			"kind": "runtime"
		},
		"list_orders": {
			"annotations": {
				"readOnlyHint": true
			},
			"authorization": {
				"approval": "never",
				"audience": "admin",
				"effects": [
					"read"
				],
				"requiredScopes": [
					"commerce:orders:read"
				]
			},
			"description": "List recent orders (newest first) with status, production stage, total, and tracking. Filter by status: paid, shipped, rejected, failed, or refunded.",
			"input": {
				"type": "object",
				"properties": {
					"limit": {
						"maximum": 200,
						"minimum": 1,
						"type": "integer"
					},
					"status": {
						"anyOf": [
							{
								"const": "paid",
								"type": "string"
							},
							{
								"const": "shipped",
								"type": "string"
							},
							{
								"const": "rejected",
								"type": "string"
							},
							{
								"const": "failed",
								"type": "string"
							},
							{
								"const": "refunded",
								"type": "string"
							}
						]
					}
				}
			},
			"kind": "runtime"
		},
		"order_detail": {
			"annotations": {
				"readOnlyHint": true
			},
			"authorization": {
				"approval": "never",
				"audience": "admin",
				"effects": [
					"read"
				],
				"requiredScopes": [
					"commerce:orders:read"
				],
				"resource": {
					"idField": "sessionId",
					"type": "commerce-order"
				}
			},
			"description": "Full detail for one order by its checkout session id: line items, shipping address, production stage, proof status, and tracking.",
			"input": {
				"type": "object",
				"required": [
					"sessionId"
				],
				"properties": {
					"sessionId": {
						"minLength": 1,
						"type": "string"
					}
				}
			},
			"kind": "runtime"
		}
	}
}
