{"openapi":"3.1.0","info":{"title":"Munim core-api — /v1 and /platform/v1","version":"w1","description":"Generated by packages/contracts/scripts/gen.ts from the zod sources — do not edit; run `make contracts`. All data is synthetic; suppliers are simulated; payments are recorded, never processed."},"jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","paths":{"/v1/account":{"get":{"operationId":"getAccount","summary":"The signed-in customer's profile at this merchant (404 before first sign-in here)","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AccountProfile"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account:link":{"post":{"operationId":"linkAccount","summary":"customers.account.link.v1 — first sign-in creates this merchant's profile; X-Munim-Guest-Token claims that guest order","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersAccountLinkV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.account.link.v1"},"payload":{"$ref":"#/components/schemas/CustomersAccountLinkV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/profile":{"post":{"operationId":"updateAccountProfile","summary":"customers.profile.update.v1 — name and phone","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersProfileUpdateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.profile.update.v1"},"payload":{"$ref":"#/components/schemas/CustomersProfileUpdateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/consent":{"post":{"operationId":"setAccountConsent","summary":"customers.consent.set.v1 — marketing consent","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersConsentSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.consent.set.v1"},"payload":{"$ref":"#/components/schemas/CustomersConsentSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/orders":{"get":{"operationId":"listAccountOrders","summary":"The customer's orders at this merchant, newest first","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AccountOrders"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/orders/{id}":{"get":{"operationId":"getAccountOrder","summary":"One of the customer's own orders with its lines (404 for any other order)","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AccountOrder"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/loyalty":{"get":{"operationId":"getAccountLoyalty","summary":"Loyalty: latest balance_after and every entry","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AccountLoyalty"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account:export":{"post":{"operationId":"exportAccount","summary":"customers.data.export.v1 — JSON of the customer's own rows at this merchant","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersDataExportV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.data.export.v1"},"payload":{"$ref":"#/components/schemas/CustomersDataExportV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AccountExport"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account:erase":{"post":{"operationId":"eraseAccount","summary":"customers.erasure.request.v1 — anonymise the profile; orders are kept","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersErasureRequestV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.erasure.request.v1"},"payload":{"$ref":"#/components/schemas/CustomersErasureRequestV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ai/policy":{"get":{"operationId":"getAiPolicy","summary":"Per-role investigation-mode ceilings and the owner's monthly AI cap","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AiPolicy"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ai/policy/ceiling":{"post":{"operationId":"setAiModeCeiling","summary":"ai_policy.ceiling.set.v1 — set the highest investigation mode a role may pick (owner only)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"AiPolicyCeilingSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"ai_policy.ceiling.set.v1"},"payload":{"$ref":"#/components/schemas/AiPolicyCeilingSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ai/policy/cap":{"post":{"operationId":"setAiMonthlyCap","summary":"ai_policy.cap.set.v1 — set the monthly AI spend cap, never above the operator's limit (owner only)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"AiPolicyCapSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"ai_policy.cap.set.v1"},"payload":{"$ref":"#/components/schemas/AiPolicyCapSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/drafts":{"get":{"operationId":"listDrafts","summary":"Drafts in the caller's outlet scope (status: proposed (default) | executing | executed | failed | rejected | stale | decided)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["proposed","executing","executed","failed","rejected","stale","decided"]}},{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","pattern":"^(intel:[a-z_]+|import|member)$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1DraftsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/drafts/{id}":{"get":{"operationId":"getDraft","summary":"One draft with its decision and history","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1DraftDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/drafts/{id}:approve":{"post":{"operationId":"approveDraft","summary":"drafts.approve.v1 — approve as proposed or edited (payload draft_id must equal the path id)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"DraftsApproveV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"drafts.approve.v1"},"payload":{"$ref":"#/components/schemas/DraftsApproveV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftsDecisionError"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftsDecisionError"}}}}}}},"/v1/drafts/{id}:reject":{"post":{"operationId":"rejectDraft","summary":"drafts.reject.v1 — reject with a reason (payload draft_id must equal the path id)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"DraftsRejectV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"drafts.reject.v1"},"payload":{"$ref":"#/components/schemas/DraftsRejectV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftsDecisionError"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftsDecisionError"}}}}}}},"/v1/cares/profile":{"get":{"operationId":"getCaresProfile","summary":"The business's Munim Cares setup: availability, operator enablement, profile and outlet cities","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresProfile"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"setCaresProfile","summary":"cares.profile.set.v1 — opt in or pause, name the business, set each outlet's city, location and pickup hours","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CaresProfileSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"cares.profile.set.v1"},"payload":{"$ref":"#/components/schemas/CaresProfileSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/recipients":{"get":{"operationId":"listCaresRecipients","summary":"Simulated recipients in the outlet's city","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresRecipients"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/listings":{"get":{"operationId":"listCaresListings","summary":"Surplus listings and their hand-overs, newest first","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["donation","offer"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["published","allocated","closed","withdrawn"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresListings"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"publishCaresListing","summary":"cares.listing.publish.v1 — publish a donation or an offer (owner or judge; intel may draft it, cooked lines only by the owner's own command)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CaresListingPublishV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"cares.listing.publish.v1"},"payload":{"$ref":"#/components/schemas/CaresListingPublishV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/listings/{id}":{"get":{"operationId":"getCaresListing","summary":"One listing with its lines and hand-overs","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresListing"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/listings/{id}:withdraw":{"post":{"operationId":"withdrawCaresListing","summary":"cares.listing.withdraw.v1 — withdraw a published listing (not after an offer is allocated)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CaresListingWithdrawV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"cares.listing.withdraw.v1"},"payload":{"$ref":"#/components/schemas/CaresListingWithdrawV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/handovers":{"post":{"operationId":"recordCaresHandover","summary":"cares.handover.record.v1 — record what was handed over; core derives the stock movements","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CaresHandoverRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"cares.handover.record.v1"},"payload":{"$ref":"#/components/schemas/CaresHandoverRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/handovers/{id}:void":{"post":{"operationId":"voidCaresHandover","summary":"cares.handover.void.v1 — void a recorded hand-over with a reason; stock comes back (not after the buyer received)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CaresHandoverVoidV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"cares.handover.void.v1"},"payload":{"$ref":"#/components/schemas/CaresHandoverVoidV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/market":{"get":{"operationId":"listCaresMarket","summary":"Other businesses' shared surplus offers in the caller's cities (needs B2B on)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"listing","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresMarket"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/claims":{"get":{"operationId":"listCaresClaims","summary":"The buyer's own claims with their outcome","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresClaims"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createCaresClaim","summary":"cares.claim.create.v1 — claim every line of an offer at the offered quantity (all-or-nothing); the price is recorded, never processed","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CaresClaimCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"cares.claim.create.v1"},"payload":{"$ref":"#/components/schemas/CaresClaimCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/claims/{id}:cancel":{"post":{"operationId":"cancelCaresClaim","summary":"cares.claim.cancel.v1 — cancel a claim before any verdict","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CaresClaimCancelV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"cares.claim.cancel.v1"},"payload":{"$ref":"#/components/schemas/CaresClaimCancelV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/claims/{id}:close":{"post":{"operationId":"closeCaresClaim","summary":"cares.claim.close.v1 — close a claim whose outcome is declined","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CaresClaimCloseV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"cares.claim.close.v1"},"payload":{"$ref":"#/components/schemas/CaresClaimCloseV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/claims/{id}:receive":{"post":{"operationId":"receiveCaresClaim","summary":"cares.claim.receive.v1 — receive an accepted, handed-over claim into stock","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CaresClaimReceiveV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"cares.claim.receive.v1"},"payload":{"$ref":"#/components/schemas/CaresClaimReceiveV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/listings/{id}/claims":{"get":{"operationId":"listCaresInboundClaims","summary":"Claims on the caller's own offer","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresInboundClaims"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares/listings/{id}:decide":{"post":{"operationId":"decideCaresClaim","summary":"cares.claim.decide.v1 — accept or decline one claim on the caller's offer (one accepted claim per offer)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CaresClaimDecideV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"cares.claim.decide.v1"},"payload":{"$ref":"#/components/schemas/CaresClaimDecideV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares-network/cities":{"get":{"operationId":"listCaresNetworkCities","summary":"Cities with surplus-sharing businesses (Simulated recipients; Check your local food-donation rules)","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresNetworkCities"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares-network/listings":{"get":{"operationId":"listCaresNetworkListings","summary":"Live donation listings in a city to Simulated recipients","security":[],"parameters":[{"name":"city","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","maxLength":40}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresNetworkListings"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares-network/listings/{id}":{"get":{"operationId":"getCaresNetworkListing","summary":"One live donation listing (404 when not live)","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresNetworkListing"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares-network/impact":{"get":{"operationId":"getCaresNetworkImpact","summary":"Meals shared across Munim to Simulated recipients: the latest published network snapshot, each value beside its ref","security":[],"parameters":[{"name":"city","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]*$","maxLength":40}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresNetworkImpact"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cares-network/snapshots/{id}":{"get":{"operationId":"getCaresNetworkSnapshot","summary":"A published network snapshot with its rows and sha256 (404 when unpublished)","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CaresNetworkSnapshot"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront/cares":{"get":{"operationId":"getStorefrontCares","summary":"The storefront key's own live donation listings (uncached; a bad key or a non-storefront channel is 404)","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1StorefrontCares"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/network-snapshots":{"post":{"operationId":"mintCaresNetworkSnapshot","summary":"Mint the network impact snapshot (operator template platform.cares_network_impact); nothing is public until a config draft publishes it","security":[{"operatorToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaresNetworkSnapshotMint"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCaresNetworkSnapshot"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listCaresNetworkSnapshots","summary":"Minted network snapshots with their publish state","security":[{"operatorToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCaresNetworkSnapshots"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/items":{"get":{"operationId":"listCatalogueItems","summary":"Items with their variants; inactive ones only with include_inactive=true","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CatalogueItems"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"upsertCatalogueItem","summary":"catalogue.item.upsert.v1 — create or update an item with its variants and option groups (owner/manager, all outlets)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CatalogueItemUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"catalogue.item.upsert.v1"},"payload":{"$ref":"#/components/schemas/CatalogueItemUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/recipes":{"get":{"operationId":"listCatalogueRecipes","summary":"Recipe versions with their lines, optionally of one item","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"item","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CatalogueRecipes"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createRecipeVersion","summary":"catalogue.recipe.version.create.v1 — the next recipe version; closes the open one; an overlapping validity or a unit that is not the ingredient's base unit is refused","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CatalogueRecipeVersionCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"catalogue.recipe.version.create.v1"},"payload":{"$ref":"#/components/schemas/CatalogueRecipeVersionCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/prices":{"get":{"operationId":"listCataloguePrices","summary":"Price rows in every validity window, future-dated included","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"item","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"channel_kind","in":"query","required":false,"schema":{"type":"string","pattern":"^(counter|table_qr|pickup|own_site|aggregator:[a-z][a-z0-9_]*)$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CataloguePrices"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"setPrice","summary":"catalogue.price.set.v1 — a price for an outlet and channel; closes the open one; an overlapping validity is refused","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CataloguePriceSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"catalogue.price.set.v1"},"payload":{"$ref":"#/components/schemas/CataloguePriceSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/deals":{"get":{"operationId":"listCatalogueDeals","summary":"Deals visible to the caller's outlet scope (an empty outlet list = every outlet)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CatalogueDeals"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"upsertDeal","summary":"catalogue.deal.upsert.v1 — create or update a deal with its weekly windows (outlet time zone)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CatalogueDealUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"catalogue.deal.upsert.v1"},"payload":{"$ref":"#/components/schemas/CatalogueDealUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/coupons":{"get":{"operationId":"listCatalogueCoupons","summary":"Coupons visible to the caller's outlet scope (an empty outlet list = every outlet)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CatalogueCoupons"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"setCoupon","summary":"catalogue.coupon.set.v1 — create a coupon or change its caps, end date or status","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CatalogueCouponSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"catalogue.coupon.set.v1"},"payload":{"$ref":"#/components/schemas/CatalogueCouponSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/deals/{id}:end":{"post":{"operationId":"endDeal","summary":"catalogue.deal.end.v1 — end a deal (payload deal_id must equal the path id)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CatalogueDealEndV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"catalogue.deal.end.v1"},"payload":{"$ref":"#/components/schemas/CatalogueDealEndV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/availability":{"post":{"operationId":"setAvailability","summary":"catalogue.availability.set.v1 — mark an item sold out or back on sale at one outlet","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CatalogueAvailabilitySetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"catalogue.availability.set.v1"},"payload":{"$ref":"#/components/schemas/CatalogueAvailabilitySetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/menu":{"get":{"operationId":"getMenu","summary":"Items for sale at an outlet and channel now: price rows, options, sold-out state and deal badges","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"channel_kind","in":"query","required":true,"schema":{"type":"string","pattern":"^(counter|table_qr|pickup|own_site|aggregator:[a-z][a-z0-9_]*)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CatalogueMenu"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/catalogue/barcodes/{code}":{"get":{"operationId":"lookupBarcode","summary":"Shop scan: the item or variant with this barcode and its price at the outlet; unknown code → 404","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"outlet","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"channel_kind","in":"query","required":true,"schema":{"type":"string","pattern":"^(counter|table_qr|pickup|own_site|aggregator:[a-z][a-z0-9_]*)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1CatalogueBarcode"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/compliance/licences":{"get":{"operationId":"listLicences","summary":"Licences (active by default), tenant-wide and in the caller's outlets","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","superseded","lapsed"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ComplianceLicences"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"upsertLicence","summary":"compliance.licence.upsert.v1 — record or renew a licence","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"ComplianceLicenceUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"compliance.licence.upsert.v1"},"payload":{"$ref":"#/components/schemas/ComplianceLicenceUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/compliance/licences/expiring":{"get":{"operationId":"listExpiringLicences","summary":"Active licences expiring within N days of as_of (outlet-local date)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"within_days","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":9999}},{"name":"as_of","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"outlet","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ComplianceLicencesExpiring"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/compliance/assets":{"get":{"operationId":"listAssets","summary":"Assets in the caller's outlets","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ComplianceAssets"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"upsertAsset","summary":"compliance.asset.upsert.v1 — add or change an asset","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"ComplianceAssetUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"compliance.asset.upsert.v1"},"payload":{"$ref":"#/components/schemas/ComplianceAssetUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/compliance/checklists":{"get":{"operationId":"listChecklists","summary":"Checklists","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ComplianceChecklists"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"upsertChecklist","summary":"compliance.checklist.upsert.v1 — add or change a checklist","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"ComplianceChecklistUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"compliance.checklist.upsert.v1"},"payload":{"$ref":"#/components/schemas/ComplianceChecklistUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/compliance/checklist-runs":{"get":{"operationId":"listChecklistRuns","summary":"Completed checklist runs, newest first","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"checklist","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ComplianceChecklistRuns"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"completeChecklist","summary":"compliance.checklist.complete.v1 — complete a checklist for a business date","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"ComplianceChecklistCompleteV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"compliance.checklist.complete.v1"},"payload":{"$ref":"#/components/schemas/ComplianceChecklistCompleteV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/compliance/temp-logs":{"get":{"operationId":"listTempLogs","summary":"Temperature readings with the asset's own range applied","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"asset","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ComplianceTempLogs"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"recordTemp","summary":"compliance.temp.record.v1 — record a temperature reading (evidence, not a certificate)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"ComplianceTempRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"compliance.temp.record.v1"},"payload":{"$ref":"#/components/schemas/ComplianceTempRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/compliance/amcs":{"get":{"operationId":"listAmcs","summary":"Annual maintenance contracts","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"asset","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ComplianceAmcs"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"recordAmc","summary":"compliance.amc.record.v1 — record an AMC","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"ComplianceAmcRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"compliance.amc.record.v1"},"payload":{"$ref":"#/components/schemas/ComplianceAmcRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/compliance/maintenance":{"get":{"operationId":"listMaintenance","summary":"Maintenance rows","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"asset","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["scheduled","done","cancelled"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ComplianceMaintenance"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"scheduleMaintenance","summary":"compliance.maintenance.schedule.v1 — schedule maintenance (intel may draft it)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"ComplianceMaintenanceScheduleV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"compliance.maintenance.schedule.v1"},"payload":{"$ref":"#/components/schemas/ComplianceMaintenanceScheduleV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/compliance/maintenance/record":{"post":{"operationId":"recordMaintenance","summary":"compliance.maintenance.record.v1 — record maintenance done","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"ComplianceMaintenanceRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"compliance.maintenance.record.v1"},"payload":{"$ref":"#/components/schemas/ComplianceMaintenanceRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers/{id}":{"get":{"operationId":"getCustomer","summary":"One merchant-side customer record (owner/manager/staff/judge; staff see a masked phone and no email)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Customer"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers":{"get":{"operationId":"listCustomers","summary":"Search merchant-side customer records (owner/manager/staff/judge; staff see masked contacts)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersCustomerList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers:upsert":{"post":{"operationId":"upsertCustomer","summary":"customers.customer.upsert.v1 — create or edit a customer record; consent can only be withdrawn","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersCustomerUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.customer.upsert.v1"},"payload":{"$ref":"#/components/schemas/CustomersCustomerUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers/{id}/loyalty":{"get":{"operationId":"getCustomerLoyalty","summary":"Loyalty balance (latest balance_after) and ledger entries","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersLoyaltyLedger"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/customers/{id}/coupon-uses":{"get":{"operationId":"listCustomerCouponUses","summary":"Coupon use history of one customer","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersCouponUseList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/loyalty:adjust":{"post":{"operationId":"adjustLoyalty","summary":"customers.loyalty.adjust.v1 — append an adjustment entry (never below zero)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersLoyaltyAdjustV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.loyalty.adjust.v1"},"payload":{"$ref":"#/components/schemas/CustomersLoyaltyAdjustV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns":{"get":{"operationId":"listCampaigns","summary":"Queued, cancelled and (demo) recorded-as-sent campaigns (created only by an approved draft; never sent by Munim)","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersCampaignList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns:cancel":{"post":{"operationId":"cancelCampaign","summary":"customers.campaign.cancel.v1 — cancel a queued campaign","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersCampaignCancelV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.campaign.cancel.v1"},"payload":{"$ref":"#/components/schemas/CustomersCampaignCancelV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/campaigns:record-sent":{"post":{"operationId":"recordCampaignSent","summary":"customers.campaign.record_sent.v1 — on a demo business, record a queued campaign as sent (simulated: no message leaves Munim; owner)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersCampaignRecordSentV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.campaign.record_sent.v1"},"payload":{"$ref":"#/components/schemas/CustomersCampaignRecordSentV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reservations":{"get":{"operationId":"listReservations","summary":"Reservations","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersReservationList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reservations:upsert":{"post":{"operationId":"upsertReservation","summary":"customers.reservation.upsert.v1","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersReservationUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.reservation.upsert.v1"},"payload":{"$ref":"#/components/schemas/CustomersReservationUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reviews":{"get":{"operationId":"listReviews","summary":"Imported or hand-entered reviews","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersReviewList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/reviews:record":{"post":{"operationId":"recordReview","summary":"customers.review.record.v1 — enter a review (append-only)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersReviewRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.review.record.v1"},"payload":{"$ref":"#/components/schemas/CustomersReviewRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/bulk-orders":{"get":{"operationId":"listBulkOrders","summary":"Bulk / catering enquiries and orders","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet_id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersBulkOrderList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/bulk-orders:upsert":{"post":{"operationId":"upsertBulkOrder","summary":"customers.bulk_order.upsert.v1","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"CustomersBulkOrderUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"customers.bulk_order.upsert.v1"},"payload":{"$ref":"#/components/schemas/CustomersBulkOrderUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finance/settlements":{"get":{"operationId":"listSettlements","summary":"Channel settlements (owner, advisor, judge); from / to overlap the settlement period","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"channel","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1FinanceSettlements"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finance/settlement-lines":{"get":{"operationId":"listSettlementLines","summary":"Settlement lines with commission, ad fee, promo share and tax withheld (owner, advisor, judge)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"channel","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1FinanceSettlementLines"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finance/bank-lines":{"get":{"operationId":"listBankLines","summary":"Imported bank lines by value date (owner, advisor, judge)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1FinanceBankLines"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finance/disputes":{"get":{"operationId":"listDisputes","summary":"Recorded disputes with channels and suppliers (owner, advisor, judge)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["recorded","sent","resolved","rejected","withdrawn"]}},{"name":"counterparty","in":"query","required":false,"schema":{"type":"string","enum":["channel","supplier"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1FinanceDisputes"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"recordDispute","summary":"finance.dispute.draft.v1 — record a channel dispute for the owner to send (also draftable)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"FinanceDisputeDraftV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"finance.dispute.draft.v1"},"payload":{"$ref":"#/components/schemas/FinanceDisputeDraftV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finance/disputes/{id}":{"get":{"operationId":"getDispute","summary":"One dispute with its claimed lines","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1FinanceDispute"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finance/period-closes":{"get":{"operationId":"listPeriodCloses","summary":"Closed periods with their checklist (owner, advisor, judge)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1FinancePeriodCloses"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"closePeriod","summary":"finance.period.close.v1 — close a month (also draftable); later entries dated in it are refused","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"FinancePeriodCloseV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"finance.period.close.v1"},"payload":{"$ref":"#/components/schemas/FinancePeriodCloseV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finance/channel-terms":{"post":{"operationId":"setChannelTerms","summary":"finance.channel_terms.set.v1 — record agreed commission, ad and promo terms for a channel (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"FinanceChannelTermsSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"finance.channel_terms.set.v1"},"payload":{"$ref":"#/components/schemas/FinanceChannelTermsSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listChannelTerms","summary":"Recorded channel terms (commission, ad consent and cap, validity), newest window first (owner, advisor, judge)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"channel_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1FinanceChannelTerms"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finance/expenses":{"post":{"operationId":"recordExpense","summary":"finance.expense.record.v1 — record an expense (posts it)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"FinanceExpenseRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"finance.expense.record.v1"},"payload":{"$ref":"#/components/schemas/FinanceExpenseRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finance/budgets":{"post":{"operationId":"setBudget","summary":"finance.budget.set.v1 — set a month's budget for one spending category, for one outlet or the whole business (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"FinanceBudgetSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"finance.budget.set.v1"},"payload":{"$ref":"#/components/schemas/FinanceBudgetSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/finance/exports/tally":{"get":{"operationId":"exportTally","summary":"Journal vouchers for a date range as a Tally-importable CSV (owner, advisor, judge)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1FinanceTallyExport"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings/{id}:dismiss":{"post":{"operationId":"dismissFinding","summary":"findings.dismiss.v1 — dismiss an open finding with a reason code (payload finding_id must equal the path id)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"FindingsDismissV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"findings.dismiss.v1"},"payload":{"$ref":"#/components/schemas/FindingsDismissV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goals":{"get":{"operationId":"listGoals","summary":"Goals in the caller's outlets and the tenant-wide ones","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","achieved","missed","cancelled"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Goals"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createGoal","summary":"goals.goal.create.v1 — set a goal (intel may draft it)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"GoalsGoalCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"goals.goal.create.v1"},"payload":{"$ref":"#/components/schemas/GoalsGoalCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goals/update":{"post":{"operationId":"updateGoal","summary":"goals.goal.update.v1 — close a goal as achieved, missed or cancelled","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"GoalsGoalUpdateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"goals.goal.update.v1"},"payload":{"$ref":"#/components/schemas/GoalsGoalUpdateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tasks":{"get":{"operationId":"listTasks","summary":"Tasks in the caller's outlets and the tenant-wide ones","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"assignee","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","done","cancelled"]}},{"name":"due_before","in":"query","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Tasks"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTask","summary":"goals.task.create.v1 — assign a task (intel may draft it)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"GoalsTaskCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"goals.task.create.v1"},"payload":{"$ref":"#/components/schemas/GoalsTaskCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tasks/update":{"post":{"operationId":"updateTask","summary":"goals.task.update.v1 — close or reassign a task","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"GoalsTaskUpdateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"goals.task.update.v1"},"payload":{"$ref":"#/components/schemas/GoalsTaskUpdateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/conversations":{"get":{"operationId":"listConversations","summary":"Conversations in the caller's outlet scope (handovers, supplier and imported chats); a conversation with no outlet is tenant-wide","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["handover","supplier","customer","imported_chat","other"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Conversations"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/conversations/{id}/messages":{"get":{"operationId":"listConversationMessages","summary":"A conversation's messages, oldest first; bodies are untrusted text","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ConversationMessages"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/imports/documents":{"post":{"operationId":"uploadImportDocument","summary":"Upload a file (sha256 unique per tenant: the same file again returns the existing document); a recognised format starts a run","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ImportsUploadRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ImportsUploadResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/imports/runs":{"post":{"operationId":"createImportRun","summary":"Start a run for an uploaded document whose format is now known (after its mapping was approved)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ImportsRunCreateRequest"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ImportsRun"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listImportRuns","summary":"Import runs, newest first; kind and status filter, cursor = the last run's id (T-092a)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["payout_statement","bank_statement","pos_export","tally_export","market_signal","pos_bills","waste_log","shift_log","stock_count"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["parsing","previewed","committed","rejected","failed"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ImportsRunsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/imports/runs/{id}":{"get":{"operationId":"getImportRun","summary":"One import run (status, rows ready, rows quarantined, the file's total)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ImportsRun"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/imports/runs/{id}/rows":{"get":{"operationId":"getImportRunRows","summary":"Staged rows and quarantined rows (with reasons) of one run","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ImportsRunRowsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/imports/formats:propose":{"post":{"operationId":"proposeImportFormat","summary":"Propose a column mapping (renames + units only) for a document's layout, as a draft to approve","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ImportsFormatProposeRequest"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ImportsFormatProposeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/wiki/pages":{"get":{"operationId":"listWikiPages","summary":"Wiki pages, newest first","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1WikiPages"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/wiki/pages/{id}":{"get":{"operationId":"getWikiPage","summary":"One wiki page with its current body (refs unresolved)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1WikiPage"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/wiki/pages/{id}/versions":{"get":{"operationId":"listWikiVersions","summary":"A page's versions with their bodies, newest first","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1WikiVersions"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/findings":{"get":{"operationId":"listFindings","summary":"Findings in the caller's outlet scope; pack = the specialist (T-092a)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","dismissed","resolved"]}},{"name":"pack","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z_]{1,40}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1FindingsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inbox":{"get":{"operationId":"listInbox","summary":"Findings and drafts awaiting a person","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InboxResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/snapshots":{"post":{"operationId":"mintMemberSnapshot","summary":"A member mints an allow-listed template snapshot (R40 C4); scope from the member token","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SnapshotsRequest"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/snapshots/{id}":{"get":{"operationId":"getSnapshot","summary":"Open the rows behind a ref","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/runs/{id}":{"get":{"operationId":"getRun","summary":"A run by id","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1RunResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/runs":{"get":{"operationId":"listRuns","summary":"Runs in the caller's scope, newest first; ?finding= gives the run that produced it","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"finding","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1RunsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/traces/{run}":{"get":{"operationId":"getTrace","summary":"Trace events of a run, in seq order","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"run","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"after_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1TracesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/ingredients":{"get":{"operationId":"listIngredients","summary":"Ingredients (tenant-wide); q matches the name; outlet is checked against the caller's scope","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InventoryIngredients"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"upsertIngredient","summary":"inventory.ingredient.upsert.v1 — create or edit an ingredient / stock record","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"InventoryIngredientUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"inventory.ingredient.upsert.v1"},"payload":{"$ref":"#/components/schemas/InventoryIngredientUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/waste":{"get":{"operationId":"listWaste","summary":"An outlet's waste log; business_date = the outlet's local day less its business-day cutoff","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"business_date","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InventoryWaste"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"recordWaste","summary":"inventory.waste.record.v1 — log waste; core derives the waste movement","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"InventoryWasteRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"inventory.waste.record.v1"},"payload":{"$ref":"#/components/schemas/InventoryWasteRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/counts":{"get":{"operationId":"listStockCounts","summary":"Stock counts with their lines (expected beside counted), newest first","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","submitted","cancelled"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InventoryCounts"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"submitStockCount","summary":"inventory.count.submit.v1 — a blind count; core derives count_adjust movements","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"InventoryCountSubmitV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"inventory.count.submit.v1"},"payload":{"$ref":"#/components/schemas/InventoryCountSubmitV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/counts/{id}":{"get":{"operationId":"getStockCount","summary":"One stock count with its lines","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InventoryCount"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/transfers":{"get":{"operationId":"listTransfers","summary":"Transfers visible from either end (outlet = from or to), with their lines","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["sent","received","cancelled"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InventoryTransfers"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTransfer","summary":"inventory.transfer.create.v1 — send stock to another outlet (draftable); both ends in scope","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"InventoryTransferCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"inventory.transfer.create.v1"},"payload":{"$ref":"#/components/schemas/InventoryTransferCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/stock:receive":{"post":{"operationId":"receiveOpeningStock","summary":"inventory.stock.receive.v1 — opening stock, optionally into new dated batches","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"InventoryStockReceiveV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"inventory.stock.receive.v1"},"payload":{"$ref":"#/components/schemas/InventoryStockReceiveV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/reorder-levels":{"post":{"operationId":"setReorderLevel","summary":"inventory.reorder_level.set.v1 — min / par for one ingredient at one outlet (draftable)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"InventoryReorderLevelSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"inventory.reorder_level.set.v1"},"payload":{"$ref":"#/components/schemas/InventoryReorderLevelSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listReorderLevels","summary":"Min / par levels at an outlet","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"ingredient","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InventoryReorderLevels"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/batches:update":{"post":{"operationId":"updateBatch","summary":"inventory.batch.update.v1 — correct a batch's expiry or MRP","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"InventoryBatchUpdateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"inventory.batch.update.v1"},"payload":{"$ref":"#/components/schemas/InventoryBatchUpdateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/transfers/{id}:receive":{"post":{"operationId":"receiveTransfer","summary":"inventory.transfer.receive.v1 — the receiving outlet books the stock in","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"InventoryTransferReceiveV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"inventory.transfer.receive.v1"},"payload":{"$ref":"#/components/schemas/InventoryTransferReceiveV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/expired-sale-overrides":{"post":{"operationId":"issueExpiredSaleOverride","summary":"inventory.expired_sale.override.v1 — a manager or owner lets one cart line sell from one expired batch, where the country pack allows it","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"InventoryExpiredSaleOverrideV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"inventory.expired_sale.override.v1"},"payload":{"$ref":"#/components/schemas/InventoryExpiredSaleOverrideV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/movements":{"get":{"operationId":"listStockMovements","summary":"Stock movement rows for an outlet, newest first; kind and ref (the source row id) filter (T-092a)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"ingredient","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["receipt","sale_consumption","waste","transfer_out","transfer_in","count_adjust","supplier_return","sale_return","donation","surplus_out","surplus_in","cares_reversal"]}},{"name":"ref","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InventoryMovements"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/inventory/batches":{"get":{"operationId":"listBatches","summary":"Batches at an outlet with expiry and MRP, earliest expiry first","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"ingredient","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InventoryBatches"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/investigations":{"post":{"operationId":"createInvestigation","summary":"Open an investigation (Step or Plan mode, within the role's ceiling) for a playbook over the caller's outlet scope; the client's id is its idempotency key","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InvestigationCreateRequest"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Investigation"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listInvestigations","summary":"Investigations in the caller's outlet scope, most recently changed first; ?status= one status","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","waiting","done","no_driver_found","cannot_verify","cancelled","exhausted"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InvestigationsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/investigations/{id}":{"get":{"operationId":"getInvestigation","summary":"An investigation with its checklist, steps and narrations (404 outside the caller's outlet scope)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Investigation"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/investigations/{id}:continue":{"post":{"operationId":"continueInvestigation","summary":"Run exactly the named next step: mint, judge in code, store, narrate","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InvestigationContinueRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Investigation"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/investigations/{id}:cancel":{"post":{"operationId":"cancelInvestigation","summary":"Cancel an open or waiting investigation (its creator); a repeat is a replay, a later :continue is 409","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InvestigationCancelRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Investigation"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/investigations/{id}:approve-plan":{"post":{"operationId":"approveInvestigationPlan","summary":"Approve a Plan-mode investigation (its creator, within the role's ceiling), as Plan or Auto, and run its steps inside this request until a stop","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1InvestigationApprovePlanRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Investigation"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/kitchen/board":{"get":{"operationId":"getKdsBoard","summary":"Live tickets for an outlet (optionally one station) with elapsed/due and amber/red colour; restaurants and cloud kitchens only","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"station","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1KdsBoard"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/kitchen/tickets/{id}:advance":{"post":{"operationId":"advanceKitchenTicket","summary":"kitchen.ticket.advance.v1 — queued → preparing → ready → done; a stale from_status or an illegal move is 409","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"KitchenTicketAdvanceV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"kitchen.ticket.advance.v1"},"payload":{"$ref":"#/components/schemas/KitchenTicketAdvanceV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/kitchen/prep-times":{"post":{"operationId":"setPrepTime","summary":"kitchen.prep_time.set.v1 — a manager's own expected prep time (closes the previous one)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"KitchenPrepTimeSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"kitchen.prep_time.set.v1"},"payload":{"$ref":"#/components/schemas/KitchenPrepTimeSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/kitchen/prep-lists":{"post":{"operationId":"createPrepList","summary":"kitchen.prep_list.create.v1 — a manager's own prep list (intel's proposals arrive as drafts and wait for approval)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"KitchenPrepListCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"kitchen.prep_list.create.v1"},"payload":{"$ref":"#/components/schemas/KitchenPrepListCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/kitchen/prep-list":{"get":{"operationId":"getPrepList","summary":"Whether the outlet's prep list for a business date is approved, waiting for approval, absent, or cannot be verified","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"business_date","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1KitchenPrepList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/lineage":{"get":{"operationId":"getRowLineage","summary":"Lineage of one book row via core.audit_log (row=<schema>.<table>:<uuid>); a row outside the caller's scope is 404","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"row","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z_]+\\.[a-z_][a-z0-9_]*:[0-9a-f-]{36}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1LineageRow"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/drafts/{id}/lineage":{"get":{"operationId":"getDraftLineage","summary":"A draft up (finding, run, snapshots) and down (decision, touched rows), including rejected, stale and failed ones","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1LineageDraft"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/draftables":{"get":{"operationId":"listDraftables","summary":"The draftable command types, for forms and the SDK","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Draftables"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders:preview":{"post":{"operationId":"previewOrder","summary":"Price a cart with core's pricing function; writes nothing; labelled Preview (R40 C1)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersPreviewRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersPreviewResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders":{"post":{"operationId":"placeOrder","summary":"orders.place.v1 — core re-prices; client totals are ignored; a preview total that no longer holds is refused (preview_total_changed)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersPlaceV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.place.v1"},"payload":{"$ref":"#/components/schemas/OrdersPlaceV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listOrders","summary":"Orders in the caller's outlet scope, newest first; a shift's orders are those it took a tender for","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["placed","accepted","rejected","preparing","ready","completed","cancelled"]}},{"name":"table_ref","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"name":"shift","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"business_date","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OrdersList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}":{"get":{"operationId":"getOrder","summary":"One order with its lines and tenders; paid and remaining computed by core in the same read","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Order"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/receipt":{"get":{"operationId":"getOrderReceipt","summary":"The bill per the country pack (tax invoice, or a Sec 9(5) record-only receipt)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OrderReceipt"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}:accept":{"post":{"operationId":"acceptOrder","summary":"Accept a placed order","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersOrderAcceptV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.order.accept.v1"},"payload":{"$ref":"#/components/schemas/OrdersOrderAcceptV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}:reject":{"post":{"operationId":"rejectOrder","summary":"Reject a placed order with a reason code; consumed stock, redeemed points and the pickup slot are given back","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersOrderRejectV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.order.reject.v1"},"payload":{"$ref":"#/components/schemas/OrdersOrderRejectV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}:advance":{"post":{"operationId":"advanceOrder","summary":"Move an order one step (preparing, ready, completed, or cancelled with a reason — refused while payments stand unrefunded); completion derives loyalty earn and the sale's journal entry","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersOrderAdvanceV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.order.advance.v1"},"payload":{"$ref":"#/components/schemas/OrdersOrderAdvanceV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}:push-back":{"post":{"operationId":"pushBackOrder","summary":"Move the promised time later with a reason code; deals are re-judged at the new time; refused once a payment is recorded","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersPromisePushBackV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.promise.push_back.v1"},"payload":{"$ref":"#/components/schemas/OrdersPromisePushBackV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/tenders":{"post":{"operationId":"recordTender","summary":"Record a cash / card / UPI payment (recorded only — Munim does not process payments)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersTenderRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.tender.record.v1"},"payload":{"$ref":"#/components/schemas/OrdersTenderRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/voids":{"post":{"operationId":"recordVoid","summary":"Void a line, or the whole order (which cancels it; voids never exceed the total), with a reason; before any payment","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersVoidRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.void.record.v1"},"payload":{"$ref":"#/components/schemas/OrdersVoidRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{id}/refunds":{"post":{"operationId":"recordRefund","summary":"Record a refund with a reason, within what was paid and the member's authority","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersRefundRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.refund.record.v1"},"payload":{"$ref":"#/components/schemas/OrdersRefundRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pickup-windows":{"post":{"operationId":"generatePickupWindows","summary":"Create pickup slots for a business date (outlet-local times, DST-safe); existing slots are kept","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersPickupWindowGenerateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.pickup_window.generate.v1"},"payload":{"$ref":"#/components/schemas/OrdersPickupWindowGenerateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listPickupWindows","summary":"An outlet's pickup slots for a local calendar day, in time order, with capacity and booked","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"date","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PickupWindowsList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shifts":{"post":{"operationId":"openShift","summary":"Open a drawer shift with its float","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersShiftOpenV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.shift.open.v1"},"payload":{"$ref":"#/components/schemas/OrdersShiftOpenV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listShifts","summary":"Drawer shifts in the caller's outlet scope, newest first (from / to = the outlet's business day of the opening, local time less its business-day cutoff)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"device","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","closed"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ShiftsList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shifts/{id}:close":{"post":{"operationId":"closeShift","summary":"Close a shift with the counted cash; core computes expected cash and variance","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"OrdersShiftCloseV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.shift.close.v1"},"payload":{"$ref":"#/components/schemas/OrdersShiftCloseV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shifts/{id}":{"get":{"operationId":"getShift","summary":"One drawer shift: opening float and, once closed, counted cash, expected cash and variance (row fields)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Shift"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/rosters":{"get":{"operationId":"listRosters","summary":"Rosters with their shifts; week = the roster's Monday. A staff-role member gets only their own shifts","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"week","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleRosters"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"peopleRosterCreate","summary":"Create a week's roster (a person's own command)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PeopleRosterCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"people.roster.create.v1"},"payload":{"$ref":"#/components/schemas/PeopleRosterCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleCommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/attendance":{"get":{"operationId":"listAttendance","summary":"Clock-ins and outs; from / to = the outlet's business day (local time less its business-day cutoff). A staff-role member gets only their own","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleAttendance"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"peopleAttendanceRecord","summary":"Clock a staff member in or out","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PeopleAttendanceRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"people.attendance.record.v1"},"payload":{"$ref":"#/components/schemas/PeopleAttendanceRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleCommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/advances":{"get":{"operationId":"listAdvances","summary":"Salary advances given and recovered (not for staff-role members)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"staff","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["given","recovered"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleAdvances"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"peopleAdvanceRecord","summary":"Record an advance given or recovered","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PeopleAdvanceRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"people.advance.record.v1"},"payload":{"$ref":"#/components/schemas/PeopleAdvanceRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleCommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/payroll-drafts":{"get":{"operationId":"listPayrollDrafts","summary":"Approved payroll drafts with their lines; month = the 1st (not for staff-role members)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}},{"name":"month","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeoplePayrollDrafts"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"peoplePayrollDraftCreate","summary":"Record an approved payroll draft (IN only)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PeoplePayrollDraftCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"people.payroll_draft.create.v1"},"payload":{"$ref":"#/components/schemas/PeoplePayrollDraftCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleCommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/staff:upsert":{"post":{"operationId":"peopleStaffUpsert","summary":"Create or update a staff record","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PeopleStaffUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"people.staff.upsert.v1"},"payload":{"$ref":"#/components/schemas/PeopleStaffUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleCommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/rosters:update":{"post":{"operationId":"peopleRosterUpdate","summary":"Edit or cancel a roster","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PeopleRosterUpdateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"people.roster.update.v1"},"payload":{"$ref":"#/components/schemas/PeopleRosterUpdateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleCommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/payroll-drafts/{id}:status":{"post":{"operationId":"peoplePayrollDraftStatus","summary":"Mark an approved payroll paid outside Munim, or void it with a reason (reverses its journal entry; owner)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PeoplePayrollDraftStatusV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"people.payroll_draft.status.v1"},"payload":{"$ref":"#/components/schemas/PeoplePayrollDraftStatusV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleCommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/tip-pools":{"post":{"operationId":"peopleTipPoolRecord","summary":"Record a tip pool and its shares","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PeopleTipPoolRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"people.tip_pool.record.v1"},"payload":{"$ref":"#/components/schemas/PeopleTipPoolRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleCommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/training":{"post":{"operationId":"peopleTrainingRecord","summary":"Record a training completion","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PeopleTrainingRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"people.training.record.v1"},"payload":{"$ref":"#/components/schemas/PeopleTrainingRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleCommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/candidates:upsert":{"post":{"operationId":"peopleCandidateUpsert","summary":"Create or move a hiring candidate","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PeopleCandidateUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"people.candidate.upsert.v1"},"payload":{"$ref":"#/components/schemas/PeopleCandidateUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleCommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/overtime":{"get":{"operationId":"peopleOvertime","summary":"Overtime against the roster, per staff per ISO week","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string"}},{"name":"to","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleOvertimeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/payroll-preview":{"get":{"operationId":"peoplePayrollPreview","summary":"Proposed payroll lines for a month (IN only)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string"}},{"name":"month","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeoplePayrollPreviewResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/people/staff":{"get":{"operationId":"peopleStaffList","summary":"Staff of an outlet with their pay terms (not for staff-role members)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"outlet","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PeopleStaffList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/budgets/{tenant}/spend":{"get":{"operationId":"getTenantSpend","summary":"A tenant's monthly AI budget and spend rows for one UTC month (default the current), newest first; operator only","security":[{"operatorToken":[]}],"parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},{"name":"month","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])-01$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformTenantSpend"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/tenants":{"get":{"operationId":"listTenants","summary":"Tenants from platform.tenant_registry (no tenant business data)","security":[{"operatorToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformTenants"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/country-packs":{"get":{"operationId":"listCountryPacks","summary":"Country pack versions","security":[{"operatorToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCountryPacks"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/country-packs/{code}/{version}":{"get":{"operationId":"getCountryPack","summary":"One country pack version with its document","security":[{"operatorToken":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCountryPackDetail"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/plans":{"get":{"operationId":"listPlans","summary":"Plans and limits","security":[{"operatorToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformPlans"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/feature-flags":{"get":{"operationId":"listFeatureFlags","summary":"Feature flags (intel.enabled is the AI kill switch)","security":[{"operatorToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformFeatureFlags"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/budgets":{"get":{"operationId":"listBudgets","summary":"Per-tenant monthly AI budgets with spent from platform.llm_budget_spent","security":[{"operatorToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformBudgets"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/model-roles":{"get":{"operationId":"listModelRoles","summary":"Provider + model per role (R36)","security":[{"operatorToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformModelRoles"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/operators":{"get":{"operationId":"listOperators","summary":"Operators","security":[{"operatorToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformOperators"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/config-drafts":{"get":{"operationId":"listConfigDrafts","summary":"Config drafts (status: proposed (default) | applied | rejected | stale | all)","security":[{"operatorToken":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["proposed","applied","rejected","stale","all"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConfigDrafts"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"proposeConfigDraft","summary":"Propose a platform config change (nothing applies until approved)","security":[{"operatorToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConfigDraftPropose"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConfigDraft"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/config-drafts/{id}":{"get":{"operationId":"getConfigDraft","summary":"One config draft (404 for an unknown id)","security":[{"operatorToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConfigDraft"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/config-drafts/{id}:approve":{"post":{"operationId":"approveConfigDraft","summary":"Approve and apply a config draft (an operator's own command is its approval, R27)","security":[{"operatorToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConfigDraftApprove"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConfigDraft"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/config-drafts/{id}:reject":{"post":{"operationId":"rejectConfigDraft","summary":"Reject a config draft with a reason","security":[{"operatorToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConfigDraftReject"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConfigDraft"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/snapshots":{"post":{"operationId":"mintOperatorSnapshot","summary":"Mint an operator snapshot of an operator-level template (R40 C4)","security":[{"operatorToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSnapshotMint"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/suppliers":{"get":{"operationId":"listSuppliers","summary":"Suppliers; simulated ones carry the label \"Simulated supplier\"","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Suppliers"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"upsertSupplier","summary":"purchasing.supplier.upsert.v1 — create or update a supplier (kind is fixed)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PurchasingSupplierUpsertV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"purchasing.supplier.upsert.v1"},"payload":{"$ref":"#/components/schemas/PurchasingSupplierUpsertV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/suppliers/{id}":{"get":{"operationId":"getSupplier","summary":"One supplier with its price observations","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Supplier"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/purchase-orders":{"get":{"operationId":"listPurchaseOrders","summary":"Purchase orders touching the caller's outlets (a pooled PO shows to each listed outlet's managers)","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PurchaseOrders"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createPurchaseOrder","summary":"purchasing.po.create.v1 — commit a purchase order (single or pooled)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PurchasingPoCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"purchasing.po.create.v1"},"payload":{"$ref":"#/components/schemas/PurchasingPoCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/purchase-orders/{id}":{"get":{"operationId":"getPurchaseOrder","summary":"One purchase order with its lines","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1PurchaseOrder"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goods-received":{"get":{"operationId":"listGoodsReceived","summary":"Goods received in the caller's outlets","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1GoodsReceivedList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"receiveGoods","summary":"purchasing.grn.receive.v1 — receive goods (creates batches, stock movements and postings)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PurchasingGrnReceiveV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"purchasing.grn.receive.v1"},"payload":{"$ref":"#/components/schemas/PurchasingGrnReceiveV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/goods-received/{id}":{"get":{"operationId":"getGoodsReceived","summary":"One goods-received note with its lines","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1GoodsReceived"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/supplier-invoices":{"get":{"operationId":"listSupplierInvoices","summary":"Supplier invoices (not for staff)","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SupplierInvoices"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"recordSupplierInvoice","summary":"purchasing.invoice.record.v1 — record an invoice; a repeated supplier + number is refused with 409","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PurchasingInvoiceRecordV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"purchasing.invoice.record.v1"},"payload":{"$ref":"#/components/schemas/PurchasingInvoiceRecordV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/supplier-invoices/{id}":{"get":{"operationId":"getSupplierInvoice","summary":"One supplier invoice with its lines and derived payable","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SupplierInvoice"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/supplier-invoices/{id}:approve":{"post":{"operationId":"approveSupplierInvoice","summary":"purchasing.invoice.approve.v1 — approve a recorded invoice (owner); derives the payable","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PurchasingInvoiceApproveV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"purchasing.invoice.approve.v1"},"payload":{"$ref":"#/components/schemas/PurchasingInvoiceApproveV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/supplier-invoices/{id}:dispute":{"post":{"operationId":"disputeSupplierInvoice","summary":"purchasing.invoice.dispute.v1 — record a dispute for the owner to send","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PurchasingInvoiceDisputeV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"purchasing.invoice.dispute.v1"},"payload":{"$ref":"#/components/schemas/PurchasingInvoiceDisputeV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/supplier-returns":{"get":{"operationId":"listSupplierReturns","summary":"Supplier returns in the caller's outlets","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SupplierReturns"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createSupplierReturn","summary":"purchasing.supplier_return.create.v1 — return stock to a supplier","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PurchasingSupplierReturnCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"purchasing.supplier_return.create.v1"},"payload":{"$ref":"#/components/schemas/PurchasingSupplierReturnCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/rfq-requests":{"post":{"operationId":"requestQuotes","summary":"purchasing.rfq.request.v1 — ask the simulated suppliers to quote one ingredient for the chosen outlets; any purchase order comes back as a draft to approve","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"PurchasingRfqRequestV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"purchasing.rfq.request.v1"},"payload":{"$ref":"#/components/schemas/PurchasingRfqRequestV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/specialists":{"get":{"operationId":"listSpecialists","summary":"The team: the eight specialists and the Manager, with what each owns","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SpecialistsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/specialists/{id}":{"get":{"operationId":"getSpecialistDesk","summary":"A specialist's desk: findings, drafts, track record (snapshot refs), threads","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1SpecialistDesk"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront/outlets":{"get":{"operationId":"storefrontOutlets","summary":"Outlets the storefront key's tenant offers","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontOutletsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront/outlets/{outlet_id}/menu":{"get":{"operationId":"storefrontMenu","summary":"Public menu with availability, deals and the effective accepting state","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"parameters":[{"name":"outlet_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontMenuResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront/outlets/{outlet_id}/state":{"get":{"operationId":"storefrontState","summary":"Effective accepting-orders state (open / busy +N / paused / closed) with next opening","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"parameters":[{"name":"outlet_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontAcceptingResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront/outlets/{outlet_id}/pickup-windows":{"get":{"operationId":"storefrontPickupWindows","summary":"Pickup windows with spare capacity","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"parameters":[{"name":"outlet_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPickupWindowsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront/orders:preview":{"post":{"operationId":"storefrontPreviewOrder","summary":"Price a cart (Preview; writes nothing) with tax rates, component amounts and refusal parameters; channel comes from the key","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersPreviewRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPreviewResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontRefusalError"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontRefusalError"}}}}}}},"/v1/storefront/orders":{"post":{"operationId":"storefrontPlaceOrder","summary":"Guest or signed-in checkout in one transaction; pay at the counter. A refusal's 409 / 422 body carries `params`","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontOrderPlaceRequest"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontOrderPlaced"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontRefusalError"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontRefusalError"}}}}}}},"/v1/storefront/orders/{id}":{"get":{"operationId":"storefrontGetOrder","summary":"The shopper's own order (customer token or guest access token); anything else is 404","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]},{"storefrontKey":[],"guestToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontOrderView"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront/orders/{id}:cancel":{"post":{"operationId":"storefrontCancelOrder","summary":"storefront.order.cancel.v1 — inside the outlet's cancel window","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"StorefrontOrderCancelV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"storefront.order.cancel.v1"},"payload":{"$ref":"#/components/schemas/StorefrontOrderCancelV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront/orders/{id}:reschedule-preview":{"post":{"operationId":"storefrontReschedulePreview","summary":"Re-price the order at a new pickup time; writes nothing","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontReschedulePreviewRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontReschedulePreviewResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront/orders/{id}:reschedule":{"post":{"operationId":"storefrontRescheduleOrder","summary":"storefront.order.reschedule.v1 — inside the outlet's reschedule window; deals re-priced (deal_rejudged carries old/new totals in `params`)","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"StorefrontOrderRescheduleV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"storefront.order.reschedule.v1"},"payload":{"$ref":"#/components/schemas/StorefrontOrderRescheduleV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontRefusalError"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontRefusalError"}}}}}}},"/v1/stream":{"get":{"operationId":"streamEvents","summary":"Server-sent events for the given topics (kds / order / inbox / trace); text/event-stream, read with the SDK's openStream; resume with Last-Event-ID; heartbeat every 20 s, closed at 55 min","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]},{"storefrontKey":[],"guestToken":[]},{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"topics","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Comma list of kds:<outlet id>, order:<order id>, inbox:<tenant id>, trace:<run id>"}}],"responses":{"200":{"description":"OK — server-sent events; each `data:` line is the JSON of StreamEvent (read with the SDK's openStream, never EventSource)","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront-pages":{"get":{"operationId":"listStorefrontPages","summary":"The storefront page's saved versions and the live one","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1StorefrontPages"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"saveStorefrontPage","summary":"storefront.page.save.v1 — save the next version of the storefront page (owner; all-outlet manager)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"StorefrontPageSaveV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"storefront.page.save.v1"},"payload":{"$ref":"#/components/schemas/StorefrontPageSaveV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront-pages/{id}":{"get":{"operationId":"getStorefrontPage","summary":"One saved version of the storefront page with its theme and sections","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1StorefrontPage"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront-pages/{id}:publish":{"post":{"operationId":"publishStorefrontPage","summary":"storefront.page.publish.v1 — put a saved version live; an older one restores it (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"StorefrontPagePublishV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"storefront.page.publish.v1"},"payload":{"$ref":"#/components/schemas/StorefrontPagePublishV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront/page":{"get":{"operationId":"storefrontPage","summary":"The live storefront page (theme and home page sections), or null for the built-in look","security":[{"storefrontKey":[]},{"storefrontKey":[],"customerToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorefrontPagePublic"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/outlets/{id}/calendar":{"get":{"operationId":"getOutletCalendar","summary":"An outlet's weekly hours and dated overrides (holidays), in the outlet's own zone; an outlet outside the caller's scope is 404","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1OutletCalendar"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/tenants:provision":{"post":{"operationId":"provisionTenant","summary":"tenancy.provision.v1 — operator provisions a tenant (03-architecture §1.9)","security":[{"operatorToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyProvisionV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.provision.v1"},"payload":{"$ref":"#/components/schemas/TenancyProvisionV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/outlets":{"post":{"operationId":"createOutlet","summary":"tenancy.outlet.create.v1 — add an outlet (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyOutletCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.outlet.create.v1"},"payload":{"$ref":"#/components/schemas/TenancyOutletCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listOutlets","summary":"Outlets in the caller's scope","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Outlets"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/outlets/{id}:update":{"post":{"operationId":"updateOutlet","summary":"tenancy.outlet.update.v1 — outlet settings (owner; manager of that outlet)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyOutletUpdateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.outlet.update.v1"},"payload":{"$ref":"#/components/schemas/TenancyOutletUpdateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/brands":{"post":{"operationId":"createBrand","summary":"tenancy.brand.create.v1 — add a brand (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyBrandCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.brand.create.v1"},"payload":{"$ref":"#/components/schemas/TenancyBrandCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listBrands","summary":"Brands","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Brands"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/channels":{"post":{"operationId":"createChannel","summary":"tenancy.channel.create.v1 — add a sales channel (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyChannelCreateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.channel.create.v1"},"payload":{"$ref":"#/components/schemas/TenancyChannelCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listChannels","summary":"Sales channels","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Channels"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/devices":{"post":{"operationId":"registerDevice","summary":"tenancy.device.register.v1 — register a POS or KDS device (owner; manager of that outlet)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyDeviceRegisterV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.device.register.v1"},"payload":{"$ref":"#/components/schemas/TenancyDeviceRegisterV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listDevices","summary":"POS and KDS devices","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Devices"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/members:invite":{"post":{"operationId":"inviteMember","summary":"tenancy.member.invite.v1 — invite a member by email (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyMemberInviteV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.member.invite.v1"},"payload":{"$ref":"#/components/schemas/TenancyMemberInviteV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant:update":{"post":{"operationId":"updateTenant","summary":"tenancy.tenant.update.v1 — business settings; country is locked after onboarding (R30)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyTenantUpdateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.tenant.update.v1"},"payload":{"$ref":"#/components/schemas/TenancyTenantUpdateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/policy":{"post":{"operationId":"setBusinessPolicy","summary":"tenancy.policy.set.v1 — the owner's labour and margin targets, as a new dated version (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyPolicySetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.policy.set.v1"},"payload":{"$ref":"#/components/schemas/TenancyPolicySetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/platform/v1/demo-sessions":{"post":{"operationId":"startDemoSession","summary":"demo.session.start.v1 — operator starts an ephemeral judge session on a fresh demo tenant","security":[{"operatorToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"DemoSessionStartV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"demo.session.start.v1"},"payload":{"$ref":"#/components/schemas/DemoSessionStartV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront-keys":{"post":{"operationId":"createStorefrontKey","summary":"Create a storefront key; the raw key is returned once (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenancyStorefrontKeyCreate"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenancyStorefrontKeyCreated"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listStorefrontKeys","summary":"Storefront keys (no key material)","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenancyStorefrontKeyList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/onboarding":{"post":{"operationId":"onboard","summary":"tenancy.onboard.v1 — a signed-in person with no tenant creates one: tenant, first outlet, owner membership, pack defaults. The owner's email is the verified IdP email; the same envelope twice makes one tenant","security":[{"memberToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyOnboardV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.onboard.v1"},"payload":{"$ref":"#/components/schemas/TenancyOnboardV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me/tenants":{"get":{"operationId":"listMyTenants","summary":"Where this sign-in is an active member","security":[{"memberToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenancyMeTenants"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/members:bind":{"post":{"operationId":"bindMember","summary":"tenancy.member.bind.v1 — the invitee's first sign-in binds the IdP subject to the invited member, once. Tenant from the invite link (X-Munim-Tenant); the email must match the invite AND be verified by the IdP, else 404","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyMemberBindV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.member.bind.v1"},"payload":{"$ref":"#/components/schemas/TenancyMemberBindV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/me":{"get":{"operationId":"getMe","summary":"The caller's own member id, name, role and outlet scope in this tenant (read-only)","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Me"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenant":{"get":{"operationId":"getTenant","summary":"The business's settings row","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Tenant"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/members":{"get":{"operationId":"listMembers","summary":"Members and their roles (owner only)","security":[{"memberToken":[],"tenantHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Members"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/members/{id}:set-role":{"post":{"operationId":"setMemberRole","summary":"tenancy.member.role.set.v1 — change another member's role and outlet scope (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyMemberRoleSetV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.member.role.set.v1"},"payload":{"$ref":"#/components/schemas/TenancyMemberRoleSetV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/members/{id}:deactivate":{"post":{"operationId":"deactivateMember","summary":"tenancy.member.deactivate.v1 — deactivate another member; their sign-in stops resolving, their records stay (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"TenancyMemberDeactivateV1Command","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"tenancy.member.deactivate.v1"},"payload":{"$ref":"#/components/schemas/TenancyMemberDeactivateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResult"}}},"headers":{"X-Munim-Replayed":{"description":"\"true\" when this is the stored response of an earlier identical request","schema":{"type":"string","enum":["true"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/storefront-keys/{id}:revoke":{"post":{"operationId":"revokeStorefrontKey","summary":"Revoke a storefront key; it stops resolving at once (owner)","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenancyStorefrontKeyRevoked"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ask":{"post":{"operationId":"ask","summary":"Ask the Manager, or a specialist by a leading @Name; appends a turn to a thread (new or given)","security":[{"memberToken":[],"tenantHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AskRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1AskResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/threads":{"get":{"operationId":"listThreads","summary":"Threads in the caller's outlet scope; ?specialist= those addressed to that desk","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"specialist","in":"query","required":false,"schema":{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market","manager"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1ThreadsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/threads/{id}":{"get":{"operationId":"getThread","summary":"A thread with its turns, answers and rolling cited summary","security":[{"memberToken":[],"tenantHeader":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1Thread"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"CustomersAccountLinkV1":{"title":"CustomersAccountLinkV1","x-munim-contract":"customers.account.link.v1","x-munim-module":"accounts","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]}},"required":["name","phone"],"additionalProperties":false},"CustomersProfileUpdateV1":{"title":"CustomersProfileUpdateV1","x-munim-contract":"customers.profile.update.v1","x-munim-module":"accounts","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]}},"required":["name","phone"],"additionalProperties":false},"CustomersConsentSetV1":{"title":"CustomersConsentSetV1","x-munim-contract":"customers.consent.set.v1","x-munim-module":"accounts","type":"object","properties":{"marketing":{"type":"boolean"}},"required":["marketing"],"additionalProperties":false},"CustomersDataExportV1":{"title":"CustomersDataExportV1","x-munim-contract":"customers.data.export.v1","x-munim-module":"accounts","type":"object","properties":{"format":{"type":"string","const":"json"}},"required":["format"],"additionalProperties":false},"CustomersErasureRequestV1":{"title":"CustomersErasureRequestV1","x-munim-contract":"customers.erasure.request.v1","x-munim-module":"accounts","type":"object","properties":{"confirm":{"type":"boolean","const":true}},"required":["confirm"],"additionalProperties":false},"V1AccountProfile":{"title":"V1AccountProfile","x-munim-contract":"v1.account.profile","x-munim-module":"accounts","type":"object","properties":{"customer_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"name":{"type":["string","null"]},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},{"type":"null"}]},"email_verified_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"consent":{"anyOf":[{"type":"object","properties":{"marketing":{"type":"boolean"},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["marketing","at"],"additionalProperties":false},{"type":"null"}]},"is_guest":{"type":"boolean"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["customer_id","name","phone","email","email_verified_at","consent","is_guest","created_at"],"additionalProperties":false},"V1AccountOrders":{"title":"V1AccountOrders","x-munim-contract":"v1.account.orders","x-munim-module":"accounts","type":"object","properties":{"orders":{"type":"array","items":{"type":"object","properties":{"order_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"channel_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"kind":{"type":"string","enum":["dine_in","takeaway","pickup","delivery"]},"status":{"type":"string","enum":["placed","accepted","rejected","preparing","ready","completed","cancelled"]},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"ticket_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["order_id","outlet_id","channel_id","kind","status","business_date","ticket_no","subtotal_minor","discount_minor","tax_minor","total_minor","currency","created_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}]}},"required":["orders","next_cursor"],"additionalProperties":false},"V1AccountOrder":{"title":"V1AccountOrder","x-munim-contract":"v1.account.order","x-munim-module":"accounts","type":"object","properties":{"order":{"type":"object","properties":{"order_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"channel_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"kind":{"type":"string","enum":["dine_in","takeaway","pickup","delivery"]},"status":{"type":"string","enum":["placed","accepted","rejected","preparing","ready","completed","cancelled"]},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"ticket_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["order_id","outlet_id","channel_id","kind","status","business_date","ticket_no","subtotal_minor","discount_minor","tax_minor","total_minor","currency","created_at"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"line_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"line_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"item_name_key":{"type":"string"},"variant_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["line_id","line_no","item_id","item_name_key","variant_id","qty_milli","unit_price_minor","line_discount_minor","tax_minor"],"additionalProperties":false}}},"required":["order","lines"],"additionalProperties":false},"V1AccountLoyalty":{"title":"V1AccountLoyalty","x-munim-contract":"v1.account.loyalty","x-munim-module":"accounts","type":"object","properties":{"balance":{"anyOf":[{"type":"object","properties":{"points":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"entry_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["points","entry_id","seq"],"additionalProperties":false},{"type":"null"}]},"entries":{"type":"array","items":{"type":"object","properties":{"entry_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","enum":["earn","redeem","reverse","expire","adjust"]},"points":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"balance_after":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"order_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}]},"note":{"type":["string","null"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["entry_id","seq","kind","points","balance_after","order_id","note","created_at"],"additionalProperties":false}}},"required":["balance","entries"],"additionalProperties":false},"V1AccountExport":{"title":"V1AccountExport","x-munim-contract":"v1.account.export","x-munim-module":"accounts","type":"object","properties":{"command":{"$ref":"#/components/schemas/CommandResult"},"export":{"type":"object","properties":{"format":{"type":"string","const":"munim.customer-export.v1"},"generated_at":{"$ref":"#/components/schemas/IsoDatetime"},"tenant_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"profile":{"$ref":"#/components/schemas/V1AccountProfile"},"orders":{"type":"array","items":{"type":"object","properties":{"order":{"type":"object","properties":{"order_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"channel_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"kind":{"type":"string","enum":["dine_in","takeaway","pickup","delivery"]},"status":{"type":"string","enum":["placed","accepted","rejected","preparing","ready","completed","cancelled"]},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"ticket_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["order_id","outlet_id","channel_id","kind","status","business_date","ticket_no","subtotal_minor","discount_minor","tax_minor","total_minor","currency","created_at"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"line_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"line_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"item_name_key":{"type":"string"},"variant_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["line_id","line_no","item_id","item_name_key","variant_id","qty_milli","unit_price_minor","line_discount_minor","tax_minor"],"additionalProperties":false}}},"required":["order","lines"],"additionalProperties":false}},"loyalty_entries":{"type":"array","items":{"type":"object","properties":{"entry_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"kind":{"type":"string","enum":["earn","redeem","reverse","expire","adjust"]},"points":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"balance_after":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"order_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}]},"note":{"type":["string","null"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["entry_id","seq","kind","points","balance_after","order_id","note","created_at"],"additionalProperties":false}},"reservations":{"type":"array","items":{"type":"object","properties":{"reservation_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"name":{"type":"string"},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"party_size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"starts_at":{"$ref":"#/components/schemas/IsoDatetime"},"status":{"type":"string"},"note":{"type":["string","null"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["reservation_id","outlet_id","name","phone","party_size","starts_at","status","note","created_at"],"additionalProperties":false}},"bulk_orders":{"type":"array","items":{"type":"object","properties":{"bulk_order_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"contact_name":{"type":"string"},"contact_phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"deliver_at":{"$ref":"#/components/schemas/IsoDatetime"},"headcount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string"},"quote_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"advance_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"order_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}]},"note":{"type":["string","null"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["bulk_order_id","outlet_id","contact_name","contact_phone","deliver_at","headcount","status","quote_minor","advance_minor","currency","order_id","note","created_at"],"additionalProperties":false}},"order_events":{"type":"array","items":{"type":"object","properties":{"order_event_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"order_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"kind":{"type":"string","enum":["status","promised_at"]},"from_status":{"type":["string","null"]},"to_status":{"type":["string","null"]},"from_promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"to_promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"reason":{"type":["string","null"]},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["order_event_id","order_id","kind","from_status","to_status","from_promised_at","to_promised_at","reason","at"],"additionalProperties":false}},"tenders":{"type":"array","items":{"type":"object","properties":{"tender_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"order_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"method":{"type":"string","enum":["cash","card","upi"]},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tendered_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"change_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"ref":{"type":["string","null"]},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["tender_id","order_id","method","amount_minor","tendered_minor","change_minor","currency","ref","at"],"additionalProperties":false}},"refunds":{"type":"array","items":{"type":"object","properties":{"refund_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"order_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"tender_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}]},"method":{"type":"string","enum":["cash","card","upi"]},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"reason_code":{"type":"string"},"note":{"type":"string"},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["refund_id","order_id","tender_id","method","amount_minor","currency","reason_code","note","at"],"additionalProperties":false}},"coupon_uses":{"type":"array","items":{"type":"object","properties":{"coupon_use_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"coupon_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"order_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["coupon_use_id","coupon_id","order_id","discount_minor","currency","at"],"additionalProperties":false}},"voids":{"type":"array","items":{"type":"object","properties":{"void_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"order_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"order_line_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},{"type":"null"}]},"reason_code":{"type":"string"},"note":{"type":"string"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["void_id","order_id","order_line_id","reason_code","note","amount_minor","currency","at"],"additionalProperties":false}},"sale_returns":{"type":"array","items":{"type":"object","properties":{"sale_return_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"order_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"order_line_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"restock":{"type":"boolean"},"reason_code":{"type":"string"},"note":{"type":"string"},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["sale_return_id","order_id","order_line_id","qty_milli","restock","reason_code","note","at"],"additionalProperties":false}}},"required":["format","generated_at","tenant_id","profile","orders","loyalty_entries","reservations","bulk_orders","order_events","tenders","refunds","coupon_uses","voids","sale_returns"],"additionalProperties":false}},"required":["command","export"],"additionalProperties":false},"AiPolicyCeilingSetV1":{"title":"AiPolicyCeilingSetV1","x-munim-contract":"ai_policy.ceiling.set.v1","x-munim-module":"ai_policy","type":"object","properties":{"role":{"type":"string","enum":["owner","manager","staff","advisor","judge"]},"mode_ceiling":{"type":"string","enum":["step","plan","auto"]}},"required":["role","mode_ceiling"],"additionalProperties":false},"AiPolicyCapSetV1":{"title":"AiPolicyCapSetV1","x-munim-contract":"ai_policy.cap.set.v1","x-munim-module":"ai_policy","type":"object","properties":{"monthly_cap_minor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["monthly_cap_minor"],"additionalProperties":false},"V1AiPolicy":{"title":"V1AiPolicy","x-munim-contract":"v1.ai.policy","x-munim-module":"ai_policy","type":"object","properties":{"ceilings":{"minItems":5,"maxItems":5,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["owner","manager","staff","advisor","judge"]},"mode_ceiling":{"type":"string","enum":["step","plan","auto"]},"source":{"type":"string","enum":["default","set"]}},"required":["role","mode_ceiling","source"],"additionalProperties":false}},"cap":{"anyOf":[{"type":"object","properties":{"monthly_cap_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["monthly_cap_minor","currency"],"additionalProperties":false},{"type":"null"}]}},"required":["ceilings","cap"],"additionalProperties":false},"DraftsApproveV1":{"title":"DraftsApproveV1","x-munim-contract":"drafts.approve.v1","x-munim-module":"approvals","type":"object","properties":{"draft_id":{"$ref":"#/components/schemas/Uuid7"},"command_type":{"type":"string","pattern":"^[a-z][a-z_]*(\\.[a-z][a-z_]*)+\\.v[1-9][0-9]*$"},"edited_payload":{"anyOf":[{"x-munim-draft-payload":"editable","anyOf":[{"type":"object","properties":{"listing_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"kind":{"type":"string","enum":["donation","offer"]},"recipient_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"pickup_from":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"pickup_to":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"lines":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"line_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"food_kind":{"type":"string","enum":["cooked","raw","packaged"]},"item_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"ingredient_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"batch_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"unit_price_minor":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]}},"required":["line_id","food_kind","item_id","ingredient_id","batch_id","qty_milli","unit","expires_on","unit_price_minor","currency"],"additionalProperties":false}}},"required":["listing_id","outlet_id","kind","recipient_id","pickup_from","pickup_to","lines"],"additionalProperties":false},{"type":"object","properties":{"coupon_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"code":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9-]{2,31}$"},"kind":{"type":"string","enum":["percent","amount"]},"value_bp":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":1,"maximum":10000},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"value_minor":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"min_spend_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"global_cap":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":1,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"per_customer_cap":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":1,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"requires_customer":{"type":"boolean"},"outlet_ids":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"valid_from":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["coupon_id","code","kind","value_bp","value_minor","currency","min_spend_minor","global_cap","per_customer_cap","requires_customer","outlet_ids","valid_from","valid_to","active"],"additionalProperties":false},{"type":"object","properties":{"deal_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"valid_to":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"}},"required":["deal_id","valid_to"],"additionalProperties":false},{"type":"object","properties":{"price_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"item_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"variant_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"channel_kind":{"anyOf":[{"type":"string","enum":["counter","table_qr","pickup","own_site"]},{"type":"string","pattern":"^aggregator:[a-z][a-z0-9_]*$"}]},"amount_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"tax_class":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]}},"required":["price_id","item_id","variant_id","outlet_id","channel_kind","amount_minor","currency","tax_class","valid_from","valid_to"],"additionalProperties":false},{"type":"object","properties":{"recipe_version_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"item_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"variant_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"version":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":1,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"yield_qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"waste_pct_bp":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":10000},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["ingredient_id","qty_milli","unit","waste_pct_bp"],"additionalProperties":false}}},"required":["recipe_version_id","item_id","variant_id","version","valid_from","valid_to","yield_qty_milli","lines"],"additionalProperties":false},{"type":"object","properties":{"maintenance_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"asset_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"kind":{"type":"string","enum":["preventive","inspection"]},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"estimated_cost_minor":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"vendor_note":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["maintenance_id","outlet_id","asset_id","kind","due_on","estimated_cost_minor","vendor_note"],"additionalProperties":false},{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"name":{"type":"string","minLength":1,"maxLength":200},"channel":{"type":"string","enum":["email","sms"]},"outlet_ids":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"segment_snapshot_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"audience_count":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"message_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"placeholders":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"value":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["key","value"],"additionalProperties":false}},"coupon_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"send_at":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"window_from":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},{"type":"null"}]},"window_to":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},{"type":"null"}]}},"required":["campaign_id","name","channel","outlet_ids","segment_snapshot_id","audience_count","message_key","placeholders","coupon_id","send_at","window_from","window_to"],"additionalProperties":false},{"type":"object","properties":{"dispute_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"channel_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"basis":{"type":"string","enum":["unapproved_ad_fee","short_payout","missing_payout"]},"lines":{"type":"array","items":{"type":"object","properties":{"settlement_line_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"order_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"claimed_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["settlement_line_id","order_id","claimed_minor"],"additionalProperties":false}},"total_claimed_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"break_ids":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}},"required":["dispute_id","channel_id","basis","lines","total_claimed_minor","currency","break_ids"],"additionalProperties":false},{"type":"object","properties":{"journal_entry_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"entry_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"outlet_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"reverses_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"postings":{"minItems":2,"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"side":{"type":"string","enum":["debit","credit"]},"amount_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["account_id","side","amount_minor"],"additionalProperties":false}},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"memo_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"required":["journal_entry_id","entry_date","outlet_id","reverses_id","postings","currency","memo_key"],"additionalProperties":false},{"type":"object","properties":{"period_close_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"period_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"checklist":{"minItems":1,"type":"array","items":{"type":"object","properties":{"item_code":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"evidence_ref":{"type":"string","pattern":"^(?:snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}))$"}},"required":["item_code","evidence_ref"],"additionalProperties":false}},"net_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["period_close_id","outlet_id","period_month","checklist","net_minor","currency"],"additionalProperties":false},{"type":"object","properties":{"goal_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"metric":{"type":"string","enum":["net_sales","orders"]},"target_value":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"period_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"basis_snapshot_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]}},"required":["goal_id","outlet_id","metric","target_value","period_from","due_on","basis_snapshot_id"],"additionalProperties":false},{"type":"object","properties":{"task_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"title_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"assignee_member_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"finding_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"cares_listing_id":{"default":null,"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]}},"required":["task_id","outlet_id","title_key","assignee_member_id","due_on","finding_id"],"additionalProperties":false},{"type":"object","properties":{"format_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"kind":{"type":"string","enum":["payout_statement","bank_statement","pos_export","tally_export","market_signal","pos_bills","waste_log","shift_log","stock_count"]},"name":{"type":"string","minLength":1,"maxLength":100},"header":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"header_signature":{"type":"string","pattern":"^[0-9a-f]{64}$"},"mapping":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":100},"target":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"unit":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,15}$"}},"required":["source","target"],"additionalProperties":false}}},"required":["format_id","kind","name","header","header_signature","mapping"],"additionalProperties":false},{"type":"object","properties":{"import_run_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["import_run_id"],"additionalProperties":false},{"type":"object","properties":{"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"min_qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"par_qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["outlet_id","ingredient_id","min_qty_milli","par_qty_milli"],"additionalProperties":false},{"type":"object","properties":{"transfer_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"from_outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"to_outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"batch_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["ingredient_id","batch_id","qty_milli","unit"],"additionalProperties":false}}},"required":["transfer_id","from_outlet_id","to_outlet_id","lines"],"additionalProperties":false},{"type":"object","properties":{"prep_list_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"lines":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["ingredient_id","qty_milli","unit"],"additionalProperties":false}}},"required":["prep_list_id","outlet_id","business_date","lines"],"additionalProperties":false},{"type":"object","properties":{"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"item_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"station":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"prep_sec":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":1,"maximum":86400},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"}},"required":["outlet_id","item_id","station","prep_sec","valid_from"],"additionalProperties":false},{"type":"object","properties":{"payroll_draft_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"period_month":{"type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])-01$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"staff_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"base_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"overtime_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"advance_recovery_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"tips_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"net_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["staff_id","base_minor","overtime_minor","advance_recovery_minor","tips_minor","net_minor"],"additionalProperties":false}}},"required":["payroll_draft_id","outlet_id","period_month","currency","lines"],"additionalProperties":false},{"type":"object","properties":{"roster_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"week_start":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"shifts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"roster_shift_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"staff_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"ends_at":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"role_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"}},"required":["roster_shift_id","staff_id","starts_at","ends_at","role_key"],"additionalProperties":false}}},"required":["roster_id","outlet_id","week_start","shifts"],"additionalProperties":false},{"type":"object","properties":{"dispute_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"supplier_invoice_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"basis":{"type":"string","enum":["overbilled","duplicate_invoice","other"]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"invoice_line_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"claimed_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["invoice_line_id","claimed_minor"],"additionalProperties":false}}},"required":["dispute_id","supplier_invoice_id","basis","lines"],"additionalProperties":false},{"type":"object","properties":{"supplier_invoice_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"supplier_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"invoice_no":{"type":"string","minLength":1,"maxLength":200},"invoice_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"po_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"line_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"po_line_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"ingredient_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"tax_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["line_id","po_line_id","ingredient_id","description","qty_milli","unit","unit_price_minor","tax_minor"],"additionalProperties":false}}},"required":["supplier_invoice_id","supplier_id","invoice_no","invoice_date","po_id","currency","lines"],"additionalProperties":false},{"type":"object","properties":{"po_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"supplier_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_ids":{"minItems":1,"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"expected_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"negotiation_run_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["ingredient_id","qty_milli","unit","unit_price_minor"],"additionalProperties":false}}},"required":["po_id","supplier_id","outlet_ids","currency","expected_on","negotiation_run_id","lines"],"additionalProperties":false},{"type":"object","properties":{"supplier_return_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"supplier_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"goods_received_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"reason_code":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"note":{"type":"string","minLength":1,"maxLength":200},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"batch_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["batch_id","ingredient_id","qty_milli","unit"],"additionalProperties":false}}},"required":["supplier_return_id","outlet_id","supplier_id","goods_received_id","reason_code","note","lines"],"additionalProperties":false}]},{"type":"null"}]},"reason":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["draft_id","command_type","edited_payload","reason"],"additionalProperties":false},"DraftsRejectV1":{"title":"DraftsRejectV1","x-munim-contract":"drafts.reject.v1","x-munim-module":"approvals","type":"object","properties":{"draft_id":{"$ref":"#/components/schemas/Uuid7"},"reason":{"type":"string","minLength":1,"maxLength":500},"reason_code":{"type":"string","enum":["wrong_numbers","not_needed","already_done","bad_timing","other"]}},"required":["draft_id","reason"],"additionalProperties":false},"V1Draft":{"title":"V1Draft","x-munim-contract":"v1.draft","x-munim-module":"approvals","type":"object","properties":{"draft_id":{"$ref":"#/components/schemas/Uuid7"},"command_type":{"type":"string","pattern":"^[a-z][a-z_]*(\\.[a-z][a-z_]*)+\\.v[1-9][0-9]*$"},"payload":{"x-munim-draft-payload":"editable","anyOf":[{"type":"object","properties":{"listing_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"kind":{"type":"string","enum":["donation","offer"]},"recipient_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"pickup_from":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"pickup_to":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"lines":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"line_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"food_kind":{"type":"string","enum":["cooked","raw","packaged"]},"item_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"ingredient_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"batch_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"unit_price_minor":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]}},"required":["line_id","food_kind","item_id","ingredient_id","batch_id","qty_milli","unit","expires_on","unit_price_minor","currency"],"additionalProperties":false}}},"required":["listing_id","outlet_id","kind","recipient_id","pickup_from","pickup_to","lines"],"additionalProperties":false},{"type":"object","properties":{"coupon_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"code":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9-]{2,31}$"},"kind":{"type":"string","enum":["percent","amount"]},"value_bp":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":1,"maximum":10000},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"value_minor":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"min_spend_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"global_cap":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":1,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"per_customer_cap":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":1,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"requires_customer":{"type":"boolean"},"outlet_ids":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"valid_from":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["coupon_id","code","kind","value_bp","value_minor","currency","min_spend_minor","global_cap","per_customer_cap","requires_customer","outlet_ids","valid_from","valid_to","active"],"additionalProperties":false},{"type":"object","properties":{"deal_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"valid_to":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"}},"required":["deal_id","valid_to"],"additionalProperties":false},{"type":"object","properties":{"price_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"item_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"variant_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"channel_kind":{"anyOf":[{"type":"string","enum":["counter","table_qr","pickup","own_site"]},{"type":"string","pattern":"^aggregator:[a-z][a-z0-9_]*$"}]},"amount_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"tax_class":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]}},"required":["price_id","item_id","variant_id","outlet_id","channel_kind","amount_minor","currency","tax_class","valid_from","valid_to"],"additionalProperties":false},{"type":"object","properties":{"recipe_version_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"item_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"variant_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"version":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":1,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"yield_qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"waste_pct_bp":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":10000},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["ingredient_id","qty_milli","unit","waste_pct_bp"],"additionalProperties":false}}},"required":["recipe_version_id","item_id","variant_id","version","valid_from","valid_to","yield_qty_milli","lines"],"additionalProperties":false},{"type":"object","properties":{"maintenance_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"asset_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"kind":{"type":"string","enum":["preventive","inspection"]},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"estimated_cost_minor":{"anyOf":[{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},{"type":"null"}]},"vendor_note":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["maintenance_id","outlet_id","asset_id","kind","due_on","estimated_cost_minor","vendor_note"],"additionalProperties":false},{"type":"object","properties":{"campaign_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"name":{"type":"string","minLength":1,"maxLength":200},"channel":{"type":"string","enum":["email","sms"]},"outlet_ids":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"segment_snapshot_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"audience_count":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"message_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"placeholders":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"value":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["key","value"],"additionalProperties":false}},"coupon_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"send_at":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"window_from":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},{"type":"null"}]},"window_to":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},{"type":"null"}]}},"required":["campaign_id","name","channel","outlet_ids","segment_snapshot_id","audience_count","message_key","placeholders","coupon_id","send_at","window_from","window_to"],"additionalProperties":false},{"type":"object","properties":{"dispute_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"channel_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"basis":{"type":"string","enum":["unapproved_ad_fee","short_payout","missing_payout"]},"lines":{"type":"array","items":{"type":"object","properties":{"settlement_line_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"order_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"claimed_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["settlement_line_id","order_id","claimed_minor"],"additionalProperties":false}},"total_claimed_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"break_ids":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}}},"required":["dispute_id","channel_id","basis","lines","total_claimed_minor","currency","break_ids"],"additionalProperties":false},{"type":"object","properties":{"journal_entry_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"entry_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"outlet_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"reverses_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"postings":{"minItems":2,"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"side":{"type":"string","enum":["debit","credit"]},"amount_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["account_id","side","amount_minor"],"additionalProperties":false}},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"memo_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"required":["journal_entry_id","entry_date","outlet_id","reverses_id","postings","currency","memo_key"],"additionalProperties":false},{"type":"object","properties":{"period_close_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"period_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"checklist":{"minItems":1,"type":"array","items":{"type":"object","properties":{"item_code":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"evidence_ref":{"type":"string","pattern":"^(?:snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}))$"}},"required":["item_code","evidence_ref"],"additionalProperties":false}},"net_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["period_close_id","outlet_id","period_month","checklist","net_minor","currency"],"additionalProperties":false},{"type":"object","properties":{"goal_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"metric":{"type":"string","enum":["net_sales","orders"]},"target_value":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"period_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"basis_snapshot_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]}},"required":["goal_id","outlet_id","metric","target_value","period_from","due_on","basis_snapshot_id"],"additionalProperties":false},{"type":"object","properties":{"task_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"title_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"assignee_member_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"finding_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"cares_listing_id":{"default":null,"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]}},"required":["task_id","outlet_id","title_key","assignee_member_id","due_on","finding_id"],"additionalProperties":false},{"type":"object","properties":{"format_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"kind":{"type":"string","enum":["payout_statement","bank_statement","pos_export","tally_export","market_signal","pos_bills","waste_log","shift_log","stock_count"]},"name":{"type":"string","minLength":1,"maxLength":100},"header":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"header_signature":{"type":"string","pattern":"^[0-9a-f]{64}$"},"mapping":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":100},"target":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"unit":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,15}$"}},"required":["source","target"],"additionalProperties":false}}},"required":["format_id","kind","name","header","header_signature","mapping"],"additionalProperties":false},{"type":"object","properties":{"import_run_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["import_run_id"],"additionalProperties":false},{"type":"object","properties":{"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"min_qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"par_qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["outlet_id","ingredient_id","min_qty_milli","par_qty_milli"],"additionalProperties":false},{"type":"object","properties":{"transfer_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"from_outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"to_outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"batch_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["ingredient_id","batch_id","qty_milli","unit"],"additionalProperties":false}}},"required":["transfer_id","from_outlet_id","to_outlet_id","lines"],"additionalProperties":false},{"type":"object","properties":{"prep_list_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"lines":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["ingredient_id","qty_milli","unit"],"additionalProperties":false}}},"required":["prep_list_id","outlet_id","business_date","lines"],"additionalProperties":false},{"type":"object","properties":{"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"item_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"station":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"prep_sec":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":1,"maximum":86400},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"}},"required":["outlet_id","item_id","station","prep_sec","valid_from"],"additionalProperties":false},{"type":"object","properties":{"payroll_draft_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"period_month":{"type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])-01$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"staff_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"base_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"overtime_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"advance_recovery_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"tips_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"net_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["staff_id","base_minor","overtime_minor","advance_recovery_minor","tips_minor","net_minor"],"additionalProperties":false}}},"required":["payroll_draft_id","outlet_id","period_month","currency","lines"],"additionalProperties":false},{"type":"object","properties":{"roster_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"week_start":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"shifts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"roster_shift_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"staff_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"starts_at":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"ends_at":{"type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"role_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"}},"required":["roster_shift_id","staff_id","starts_at","ends_at","role_key"],"additionalProperties":false}}},"required":["roster_id","outlet_id","week_start","shifts"],"additionalProperties":false},{"type":"object","properties":{"dispute_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"supplier_invoice_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"basis":{"type":"string","enum":["overbilled","duplicate_invoice","other"]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"invoice_line_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"claimed_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["invoice_line_id","claimed_minor"],"additionalProperties":false}}},"required":["dispute_id","supplier_invoice_id","basis","lines"],"additionalProperties":false},{"type":"object","properties":{"supplier_invoice_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"supplier_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"invoice_no":{"type":"string","minLength":1,"maxLength":200},"invoice_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"po_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"line_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"po_line_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"ingredient_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"tax_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["line_id","po_line_id","ingredient_id","description","qty_milli","unit","unit_price_minor","tax_minor"],"additionalProperties":false}}},"required":["supplier_invoice_id","supplier_id","invoice_no","invoice_date","po_id","currency","lines"],"additionalProperties":false},{"type":"object","properties":{"po_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"supplier_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_ids":{"minItems":1,"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"expected_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"negotiation_run_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]}},"required":["ingredient_id","qty_milli","unit","unit_price_minor"],"additionalProperties":false}}},"required":["po_id","supplier_id","outlet_ids","currency","expected_on","negotiation_run_id","lines"],"additionalProperties":false},{"type":"object","properties":{"supplier_return_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"outlet_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"supplier_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"goods_received_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"reason_code":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"note":{"type":"string","minLength":1,"maxLength":200},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"batch_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},{"type":"null"}]},"ingredient_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"qty_milli":{"anyOf":[{"type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},{"type":"object","properties":{"value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"typed_by":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"}},"required":["value","typed_by"],"additionalProperties":false}]},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["batch_id","ingredient_id","qty_milli","unit"],"additionalProperties":false}}},"required":["supplier_return_id","outlet_id","supplier_id","goods_received_id","reason_code","note","lines"],"additionalProperties":false}]},"resolved_refs":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^(\\/[^/]+)+$"},"ref":{"$ref":"#/components/schemas/Ref"},"value":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}},"required":["path","ref","value"],"additionalProperties":false}},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"source":{"type":"string","pattern":"^(intel:[a-z_]+|import|member)$"},"finding_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"run_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/RefId"}},"based_on":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},"template_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"params":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}}]}},"expected":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}},"required":["ref","template_id","params","expected"],"additionalProperties":false}},"status":{"type":"string","enum":["proposed","executing","executed","failed","rejected","stale"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["draft_id","command_type","payload","resolved_refs","outlet_ids","source","finding_id","run_id","evidence","based_on","status","created_at","updated_at"],"additionalProperties":false},"V1DraftsResponse":{"title":"V1DraftsResponse","x-munim-contract":"v1.drafts.response","x-munim-module":"approvals","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"draft":{"$ref":"#/components/schemas/V1Draft"},"decision":{"anyOf":[{"type":"object","properties":{"decision_id":{"$ref":"#/components/schemas/Uuid7"},"verdict":{"type":"string","enum":["approved","edited","rejected"]},"reason":{"type":["string","null"]},"decided_by":{"type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":["string","null"]}},"required":["member_id","name"],"additionalProperties":false},"decided_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["decision_id","verdict","reason","decided_by","decided_at"],"additionalProperties":false},{"type":"null"}]},"unverified_refs":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}}},"required":["draft","decision","unverified_refs"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["items","has_more","next_cursor"],"additionalProperties":false},"V1DraftDetail":{"title":"V1DraftDetail","x-munim-contract":"v1.draft.detail","x-munim-module":"approvals","type":"object","properties":{"draft":{"$ref":"#/components/schemas/V1Draft"},"decision":{"anyOf":[{"type":"object","properties":{"decision_id":{"$ref":"#/components/schemas/Uuid7"},"verdict":{"type":"string","enum":["approved","edited","rejected"]},"reason":{"type":["string","null"]},"decided_by":{"type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":["string","null"]}},"required":["member_id","name"],"additionalProperties":false},"decided_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["decision_id","verdict","reason","decided_by","decided_at"],"additionalProperties":false},{"type":"null"}]},"unverified_refs":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"history":{"minItems":1,"type":"array","items":{"type":"object","properties":{"event":{"type":"string","pattern":"^[a-z_.]+$"},"at":{"$ref":"#/components/schemas/IsoDatetime"},"by":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":["string","null"]}},"required":["member_id","name"],"additionalProperties":false},{"type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"},"role":{"type":"string","minLength":1}},"required":["member_id","role"],"additionalProperties":false}]},"reason":{"type":["string","null"]},"decision_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"changes":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},"value":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]},"now_ref":{"anyOf":[{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},{"type":"null"}]},"now":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}},"required":["ref","value","now_ref","now"],"additionalProperties":false}},"sqlstate":{"type":"string","pattern":"^[0-9A-Z]{5}$"}},"required":["event","at","by"],"additionalProperties":false}}},"required":["draft","decision","unverified_refs","history"],"additionalProperties":false},"DraftsDecisionError":{"title":"DraftsDecisionError","x-munim-contract":"drafts.decision-error","x-munim-module":"approvals","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_payload","unregistered_command_type","cannot_verify","already_decided","stale_draft","idempotency_conflict","execution_failed"]},"message":{"type":"string","minLength":1,"maxLength":500},"reason_code":{"anyOf":[{"$ref":"#/components/schemas/ReasonCode"},{"type":"null"}]}},"required":["code","message","reason_code"],"additionalProperties":false,"title":"DraftDecisionErrorBody"},"changes":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},"value":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]},"now_ref":{"anyOf":[{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},{"type":"null"}]},"now":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}},"required":["ref","value","now_ref","now"],"additionalProperties":false}},"refs":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}}},"required":["error"],"additionalProperties":false},"CaresProfileSetV1":{"title":"CaresProfileSetV1","x-munim-contract":"cares.profile.set.v1","x-munim-module":"cares","type":"object","properties":{"status":{"type":"string","enum":["active","paused"]},"public_name":{"type":"string","minLength":1,"maxLength":120},"b2b_enabled":{"type":"boolean"},"outlets":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"city_code":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"lat_e6":{"type":"integer","minimum":-90000000,"maximum":90000000},"lng_e6":{"type":"integer","minimum":-180000000,"maximum":180000000},"pickup_from":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"pickup_to":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"active":{"type":"boolean"}},"required":["outlet_id","city_code","lat_e6","lng_e6","pickup_from","pickup_to","active"],"additionalProperties":false}}},"required":["status","public_name","b2b_enabled","outlets"],"additionalProperties":false},"CaresListingPublishV1":{"title":"CaresListingPublishV1","x-munim-contract":"cares.listing.publish.v1","x-munim-module":"cares","type":"object","properties":{"listing_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["donation","offer"]},"recipient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"pickup_from":{"$ref":"#/components/schemas/IsoDatetime"},"pickup_to":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/Uuid7"},"food_kind":{"type":"string","enum":["cooked","raw","packaged"]},"item_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"ingredient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"unit_price_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]}},"required":["line_id","food_kind","item_id","ingredient_id","batch_id","qty_milli","unit","expires_on","unit_price_minor","currency"],"additionalProperties":false}}},"required":["listing_id","outlet_id","kind","recipient_id","pickup_from","pickup_to","lines"],"additionalProperties":false},"CaresListingWithdrawV1":{"title":"CaresListingWithdrawV1","x-munim-contract":"cares.listing.withdraw.v1","x-munim-module":"cares","type":"object","properties":{"listing_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["listing_id"],"additionalProperties":false},"CaresHandoverRecordV1":{"title":"CaresHandoverRecordV1","x-munim-contract":"cares.handover.record.v1","x-munim-module":"cares","type":"object","properties":{"handover_id":{"$ref":"#/components/schemas/Uuid7"},"listing_id":{"$ref":"#/components/schemas/Uuid7"},"allocation_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"lines":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"listing_line_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["listing_line_id","qty_milli"],"additionalProperties":false}}},"required":["handover_id","listing_id","allocation_id","lines"],"additionalProperties":false},"CaresHandoverVoidV1":{"title":"CaresHandoverVoidV1","x-munim-contract":"cares.handover.void.v1","x-munim-module":"cares","type":"object","properties":{"handover_id":{"$ref":"#/components/schemas/Uuid7"},"reason_code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"}},"required":["handover_id","reason_code"],"additionalProperties":false},"CaresClaimCreateV1":{"title":"CaresClaimCreateV1","x-munim-contract":"cares.claim.create.v1","x-munim-module":"cares","type":"object","properties":{"claim_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"offer_tenant_id":{"$ref":"#/components/schemas/Uuid7"},"offer_listing_id":{"$ref":"#/components/schemas/Uuid7"},"lines":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"offer_line_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["offer_line_id","ingredient_id"],"additionalProperties":false}}},"required":["claim_id","outlet_id","offer_tenant_id","offer_listing_id","lines"],"additionalProperties":false},"CaresClaimCancelV1":{"title":"CaresClaimCancelV1","x-munim-contract":"cares.claim.cancel.v1","x-munim-module":"cares","type":"object","properties":{"claim_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["claim_id"],"additionalProperties":false},"CaresClaimCloseV1":{"title":"CaresClaimCloseV1","x-munim-contract":"cares.claim.close.v1","x-munim-module":"cares","type":"object","properties":{"claim_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["claim_id"],"additionalProperties":false},"CaresClaimDecideV1":{"title":"CaresClaimDecideV1","x-munim-contract":"cares.claim.decide.v1","x-munim-module":"cares","type":"object","properties":{"allocation_id":{"$ref":"#/components/schemas/Uuid7"},"listing_id":{"$ref":"#/components/schemas/Uuid7"},"claim_tenant_id":{"$ref":"#/components/schemas/Uuid7"},"claim_id":{"$ref":"#/components/schemas/Uuid7"},"verdict":{"type":"string","enum":["accepted","declined"]}},"required":["allocation_id","listing_id","claim_tenant_id","claim_id","verdict"],"additionalProperties":false},"CaresClaimReceiveV1":{"title":"CaresClaimReceiveV1","x-munim-contract":"cares.claim.receive.v1","x-munim-module":"cares","type":"object","properties":{"claim_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["claim_id"],"additionalProperties":false},"CaresNetworkSnapshotMint":{"title":"CaresNetworkSnapshotMint","x-munim-contract":"cares.network-snapshot-mint","x-munim-module":"cares","type":"object","properties":{"template_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"params":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"required":["template_id","params"],"additionalProperties":false},"V1CaresProfile":{"title":"V1CaresProfile","x-munim-contract":"v1.cares.profile","x-munim-module":"cares","type":"object","properties":{"available":{"type":"boolean"},"enabled":{"type":"boolean"},"profile":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["active","paused"]},"public_name":{"type":"string","minLength":1,"maxLength":200},"b2b_enabled":{"type":"boolean"}},"required":["status","public_name","b2b_enabled"],"additionalProperties":false},{"type":"null"}]},"outlets":{"type":"array","items":{"type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"city_code":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"lat_e6":{"type":"integer","minimum":-90000000,"maximum":90000000},"lng_e6":{"type":"integer","minimum":-180000000,"maximum":180000000},"pickup_from":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"pickup_to":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"active":{"type":"boolean"}},"required":["outlet_id","city_code","lat_e6","lng_e6","pickup_from","pickup_to","active"],"additionalProperties":false}},"labels":{"type":"object","properties":{"data":{"type":"string","const":"Measured on synthetic data"},"recipients":{"type":"string","const":"to simulated recipients"}},"required":["data","recipients"],"additionalProperties":false},"note_key":{"type":"string","const":"cares.note.check_local_rules"}},"required":["available","enabled","profile","outlets","labels","note_key"],"additionalProperties":false},"V1CaresRecipients":{"title":"V1CaresRecipients","x-munim-contract":"v1.cares.recipients","x-munim-module":"cares","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"recipient_id":{"$ref":"#/components/schemas/Uuid7"},"city_code":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["ngo","food_bank"]},"simulated":{"type":"boolean","const":true},"accepts_cooked":{"type":"boolean"},"accepts_raw":{"type":"boolean"},"accepts_packaged":{"type":"boolean"},"capacity_kg_per_day":{"type":"integer","minimum":0,"maximum":9007199254740991},"capacity_portions_per_day":{"type":"integer","minimum":0,"maximum":9007199254740991},"receiving_from":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"receiving_to":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"lat_e6":{"type":"integer","minimum":-90000000,"maximum":90000000},"lng_e6":{"type":"integer","minimum":-180000000,"maximum":180000000}},"required":["recipient_id","city_code","name","kind","simulated","accepts_cooked","accepts_raw","accepts_packaged","capacity_kg_per_day","capacity_portions_per_day","receiving_from","receiving_to","lat_e6","lng_e6"],"additionalProperties":false}},"labels":{"type":"object","properties":{"data":{"type":"string","const":"Measured on synthetic data"},"recipients":{"type":"string","const":"to simulated recipients"}},"required":["data","recipients"],"additionalProperties":false},"note_key":{"type":"string","const":"cares.note.check_local_rules"}},"required":["items","labels","note_key"],"additionalProperties":false},"V1CaresListings":{"title":"V1CaresListings","x-munim-contract":"v1.cares.listings","x-munim-module":"cares","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"listing_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["donation","offer"]},"status":{"type":"string","enum":["published","allocated","closed","withdrawn"]},"recipient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"pickup_from":{"$ref":"#/components/schemas/IsoDatetime"},"pickup_to":{"$ref":"#/components/schemas/IsoDatetime"},"pickup_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"published_by":{"$ref":"#/components/schemas/Uuid7"},"published_at":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"type":"array","items":{"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/Uuid7"},"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"food_kind":{"type":"string","enum":["cooked","raw","packaged"]},"item_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"ingredient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"unit_price_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]}},"required":["line_id","line_no","food_kind","item_id","ingredient_id","batch_id","qty_milli","unit","expires_on","unit_price_minor","currency"],"additionalProperties":false}},"handovers":{"type":"array","items":{"type":"object","properties":{"handover_id":{"$ref":"#/components/schemas/Uuid7"},"allocation_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"status":{"type":"string","enum":["recorded","voided"]},"handed_at":{"$ref":"#/components/schemas/IsoDatetime"},"recorded_by":{"$ref":"#/components/schemas/Uuid7"},"voided_by":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"void_reason_code":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"listing_line_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["listing_line_id","qty_milli"],"additionalProperties":false}}},"required":["handover_id","allocation_id","status","handed_at","recorded_by","voided_by","void_reason_code","lines"],"additionalProperties":false}}},"required":["listing_id","outlet_id","kind","status","recipient_id","pickup_from","pickup_to","pickup_on","published_by","published_at","lines","handovers"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"labels":{"type":"object","properties":{"data":{"type":"string","const":"Measured on synthetic data"},"recipients":{"type":"string","const":"to simulated recipients"}},"required":["data","recipients"],"additionalProperties":false},"note_key":{"type":"string","const":"cares.note.check_local_rules"}},"required":["items","next_cursor","labels","note_key"],"additionalProperties":false},"V1CaresListing":{"title":"V1CaresListing","x-munim-contract":"v1.cares.listing","x-munim-module":"cares","type":"object","properties":{"listing_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["donation","offer"]},"status":{"type":"string","enum":["published","allocated","closed","withdrawn"]},"recipient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"pickup_from":{"$ref":"#/components/schemas/IsoDatetime"},"pickup_to":{"$ref":"#/components/schemas/IsoDatetime"},"pickup_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"published_by":{"$ref":"#/components/schemas/Uuid7"},"published_at":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"type":"array","items":{"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/Uuid7"},"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"food_kind":{"type":"string","enum":["cooked","raw","packaged"]},"item_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"ingredient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"unit_price_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]}},"required":["line_id","line_no","food_kind","item_id","ingredient_id","batch_id","qty_milli","unit","expires_on","unit_price_minor","currency"],"additionalProperties":false}},"handovers":{"type":"array","items":{"type":"object","properties":{"handover_id":{"$ref":"#/components/schemas/Uuid7"},"allocation_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"status":{"type":"string","enum":["recorded","voided"]},"handed_at":{"$ref":"#/components/schemas/IsoDatetime"},"recorded_by":{"$ref":"#/components/schemas/Uuid7"},"voided_by":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"void_reason_code":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"listing_line_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["listing_line_id","qty_milli"],"additionalProperties":false}}},"required":["handover_id","allocation_id","status","handed_at","recorded_by","voided_by","void_reason_code","lines"],"additionalProperties":false}},"labels":{"type":"object","properties":{"data":{"type":"string","const":"Measured on synthetic data"},"recipients":{"type":"string","const":"to simulated recipients"}},"required":["data","recipients"],"additionalProperties":false},"note_key":{"type":"string","const":"cares.note.check_local_rules"}},"required":["listing_id","outlet_id","kind","status","recipient_id","pickup_from","pickup_to","pickup_on","published_by","published_at","lines","handovers","labels","note_key"],"additionalProperties":false},"V1CaresMarket":{"title":"V1CaresMarket","x-munim-contract":"v1.cares.market","x-munim-module":"cares","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"offer_tenant_id":{"$ref":"#/components/schemas/Uuid7"},"listing_id":{"$ref":"#/components/schemas/Uuid7"},"business_name":{"type":"string","minLength":1,"maxLength":200},"outlet_name":{"type":"string","minLength":1,"maxLength":200},"city_code":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"pickup_from":{"$ref":"#/components/schemas/IsoDatetime"},"pickup_to":{"$ref":"#/components/schemas/IsoDatetime"},"pickup_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"lines":{"type":"array","items":{"type":"object","properties":{"offer_line_id":{"$ref":"#/components/schemas/Uuid7"},"food_kind":{"type":"string","enum":["cooked","raw","packaged"]},"label":{"type":"string"},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["offer_line_id","food_kind","label","qty_milli","unit","expires_on","unit_price_minor","currency"],"additionalProperties":false}}},"required":["offer_tenant_id","listing_id","business_name","outlet_name","city_code","pickup_from","pickup_to","pickup_on","lines"],"additionalProperties":false}},"labels":{"type":"object","properties":{"data":{"type":"string","const":"Measured on synthetic data"},"recipients":{"type":"string","const":"to simulated recipients"}},"required":["data","recipients"],"additionalProperties":false},"note_key":{"type":"string","const":"cares.note.check_local_rules"},"money_label":{"type":"string","const":"Recorded, never processed"}},"required":["items","labels","note_key","money_label"],"additionalProperties":false},"V1CaresClaims":{"title":"V1CaresClaims","x-munim-contract":"v1.cares.claims","x-munim-module":"cares","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"claim_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"offer_tenant_id":{"$ref":"#/components/schemas/Uuid7"},"offer_listing_id":{"$ref":"#/components/schemas/Uuid7"},"allocation_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"status":{"type":"string","enum":["requested","cancelled","closed","received"]},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"created_by":{"$ref":"#/components/schemas/Uuid7"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"type":"array","items":{"type":"object","properties":{"offer_line_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"received_qty_milli":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["offer_line_id","ingredient_id","qty_milli","unit","unit_price_minor","expires_on","received_qty_milli"],"additionalProperties":false}},"outcome":{"type":"object","properties":{"verdict":{"type":"string","enum":["accepted","declined","none"]},"allocation_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"decided_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"offer_line_id":{"$ref":"#/components/schemas/Uuid7"},"handed_qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["offer_line_id","handed_qty_milli"],"additionalProperties":false}}},"required":["verdict","allocation_id","decided_at","lines"],"additionalProperties":false}},"required":["claim_id","outlet_id","offer_tenant_id","offer_listing_id","allocation_id","status","total_minor","currency","created_by","created_at","lines","outcome"],"additionalProperties":false}},"labels":{"type":"object","properties":{"data":{"type":"string","const":"Measured on synthetic data"},"recipients":{"type":"string","const":"to simulated recipients"}},"required":["data","recipients"],"additionalProperties":false},"note_key":{"type":"string","const":"cares.note.check_local_rules"},"money_label":{"type":"string","const":"Recorded, never processed"}},"required":["items","labels","note_key","money_label"],"additionalProperties":false},"V1CaresInboundClaims":{"title":"V1CaresInboundClaims","x-munim-contract":"v1.cares.inbound-claims","x-munim-module":"cares","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"claim_tenant_id":{"$ref":"#/components/schemas/Uuid7"},"claim_id":{"$ref":"#/components/schemas/Uuid7"},"buyer_public_name":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["requested","cancelled","closed","received"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"type":"array","items":{"type":"object","properties":{"offer_line_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["offer_line_id","qty_milli","unit_price_minor"],"additionalProperties":false}}},"required":["claim_tenant_id","claim_id","buyer_public_name","status","created_at","lines"],"additionalProperties":false}},"labels":{"type":"object","properties":{"data":{"type":"string","const":"Measured on synthetic data"},"recipients":{"type":"string","const":"to simulated recipients"}},"required":["data","recipients"],"additionalProperties":false},"note_key":{"type":"string","const":"cares.note.check_local_rules"},"money_label":{"type":"string","const":"Recorded, never processed"}},"required":["items","labels","note_key","money_label"],"additionalProperties":false},"V1CaresNetworkCities":{"title":"V1CaresNetworkCities","x-munim-contract":"v1.cares-network.cities","x-munim-module":"cares","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["code","country_code","name"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1CaresNetworkListings":{"title":"V1CaresNetworkListings","x-munim-contract":"v1.cares-network.listings","x-munim-module":"cares","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/V1CaresNetworkListing"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1CaresNetworkListing":{"title":"V1CaresNetworkListing","x-munim-contract":"v1.cares-network.listing","x-munim-module":"cares","type":"object","properties":{"listing_id":{"$ref":"#/components/schemas/Uuid7"},"city_code":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"business_name":{"type":"string","minLength":1,"maxLength":200},"outlet_name":{"type":"string","minLength":1,"maxLength":200},"pickup_from":{"$ref":"#/components/schemas/IsoDatetime"},"pickup_to":{"$ref":"#/components/schemas/IsoDatetime"},"tz":{"type":"string","pattern":"^[A-Za-z]+\\/[A-Za-z_]+$"},"recipient_name":{"type":"string","minLength":1,"maxLength":200},"recipient_simulated":{"type":"boolean","const":true},"lines":{"type":"array","items":{"type":"object","properties":{"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"food_kind":{"type":"string","enum":["cooked","raw","packaged"]},"label_key":{"type":["string","null"]},"label":{"type":["string","null"]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]}},"required":["line_no","food_kind","label_key","label","qty_milli","unit","expires_on"],"additionalProperties":false}}},"required":["listing_id","city_code","business_name","outlet_name","pickup_from","pickup_to","tz","recipient_name","recipient_simulated","lines"],"additionalProperties":false},"V1CaresNetworkImpact":{"title":"V1CaresNetworkImpact","x-munim-contract":"v1.cares-network.impact","x-munim-module":"cares","type":"object","properties":{"snapshot_id":{"$ref":"#/components/schemas/Uuid7"},"as_of":{"$ref":"#/components/schemas/IsoDatetime"},"template_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"template_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"rows":{"type":"array","items":{"type":"object","properties":{"city_code":{"anyOf":[{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]},"businesses":{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ref":{"$ref":"#/components/schemas/Ref"}},"required":["value","ref"],"additionalProperties":false},"donations":{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ref":{"$ref":"#/components/schemas/Ref"}},"required":["value","ref"],"additionalProperties":false},"meals_portions_milli":{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ref":{"$ref":"#/components/schemas/Ref"}},"required":["value","ref"],"additionalProperties":false},"weight_g":{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ref":{"$ref":"#/components/schemas/Ref"}},"required":["value","ref"],"additionalProperties":false},"volume_ml":{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ref":{"$ref":"#/components/schemas/Ref"}},"required":["value","ref"],"additionalProperties":false},"all_synthetic":{"type":"object","properties":{"value":{"type":"boolean"},"ref":{"$ref":"#/components/schemas/Ref"}},"required":["value","ref"],"additionalProperties":false}},"required":["city_code","businesses","donations","meals_portions_milli","weight_g","volume_ml","all_synthetic"],"additionalProperties":false}},"labels":{"type":"object","properties":{"data":{"type":"string","const":"Measured on synthetic data"},"recipients":{"type":"string","const":"to simulated recipients"}},"required":["data","recipients"],"additionalProperties":false},"note_key":{"type":"string","const":"cares.note.check_local_rules"}},"required":["snapshot_id","as_of","template_id","template_version","rows","labels","note_key"],"additionalProperties":false},"V1CaresNetworkSnapshot":{"title":"V1CaresNetworkSnapshot","x-munim-contract":"v1.cares-network.snapshot","x-munim-module":"cares","type":"object","properties":{"snapshot_id":{"$ref":"#/components/schemas/Uuid7"},"template_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"template_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"params":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}}]}},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"type":{"type":"string","enum":["integer","numeric","text","date","timestamptz","boolean","uuid"]},"numeric_source":{"anyOf":[{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},{"type":"null"}]}},"required":["name","type"],"additionalProperties":false}},"rows":{"maxItems":500,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}}},"row_count":{"type":"integer","minimum":0,"maximum":500},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"published_at":{"$ref":"#/components/schemas/IsoDatetime"},"labels":{"type":"object","properties":{"data":{"type":"string","const":"Measured on synthetic data"},"recipients":{"type":"string","const":"to simulated recipients"}},"required":["data","recipients"],"additionalProperties":false},"note_key":{"type":"string","const":"cares.note.check_local_rules"}},"required":["snapshot_id","template_id","template_version","params","columns","rows","row_count","sha256","created_at","published_at","labels","note_key"],"additionalProperties":false},"V1StorefrontCares":{"title":"V1StorefrontCares","x-munim-contract":"v1.storefront.cares","x-munim-module":"cares","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/V1CaresNetworkListing"}}},"required":["items"],"additionalProperties":false},"PlatformCaresNetworkSnapshot":{"title":"PlatformCaresNetworkSnapshot","x-munim-contract":"platform.cares-network-snapshot","x-munim-module":"cares","type":"object","properties":{"snapshot_id":{"$ref":"#/components/schemas/Uuid7"},"template_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"template_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"params":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}}]}},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"type":{"type":"string","enum":["integer","numeric","text","date","timestamptz","boolean","uuid"]},"numeric_source":{"anyOf":[{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},{"type":"null"}]}},"required":["name","type"],"additionalProperties":false}},"rows":{"maxItems":500,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}}},"row_count":{"type":"integer","minimum":0,"maximum":500},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"minted_by_operator_id":{"$ref":"#/components/schemas/Uuid7"},"published_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"publish_draft_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["snapshot_id","template_id","template_version","params","columns","rows","row_count","sha256","created_at","minted_by_operator_id","published_at","publish_draft_id"],"additionalProperties":false},"PlatformCaresNetworkSnapshots":{"title":"PlatformCaresNetworkSnapshots","x-munim-contract":"platform.cares-network-snapshots","x-munim-module":"cares","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCaresNetworkSnapshot"}}},"required":["items"],"additionalProperties":false},"V1CatalogueItems":{"title":"V1CatalogueItems","x-munim-contract":"v1.catalogue.items","x-munim-module":"catalogue","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"item_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["dish","sku","combo"]},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"category":{"type":"string"},"brand_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"barcode":{"type":["string","null"]},"stock_ingredient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"active":{"type":"boolean"},"variants":{"type":"array","items":{"type":"object","properties":{"variant_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"barcode":{"type":["string","null"]},"active":{"type":"boolean"}},"required":["variant_id","name_key","barcode","active"],"additionalProperties":false}}},"required":["item_id","kind","name_key","category","brand_id","barcode","stock_ingredient_id","active","variants"],"additionalProperties":false,"title":"CatalogueItemRow"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1CatalogueRecipes":{"title":"V1CatalogueRecipes","x-munim-contract":"v1.catalogue.recipes","x-munim-module":"catalogue","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"recipe_version_id":{"$ref":"#/components/schemas/Uuid7"},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"yield_qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lines":{"type":"array","items":{"type":"object","properties":{"recipe_line_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"waste_pct_bp":{"type":"integer","minimum":0,"maximum":10000}},"required":["recipe_line_id","ingredient_id","qty_milli","unit","waste_pct_bp"],"additionalProperties":false}}},"required":["recipe_version_id","item_id","variant_id","version","valid_from","valid_to","yield_qty_milli","lines"],"additionalProperties":false,"title":"CatalogueRecipeRow"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1CataloguePrices":{"title":"V1CataloguePrices","x-munim-contract":"v1.catalogue.prices","x-munim-module":"catalogue","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"price_id":{"$ref":"#/components/schemas/Uuid7"},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"channel_kind":{"type":"string"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"tax_class":{"type":"string"},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]}},"required":["price_id","item_id","variant_id","outlet_id","channel_kind","amount_minor","currency","tax_class","valid_from","valid_to"],"additionalProperties":false,"title":"CataloguePriceRow"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1CatalogueDeals":{"title":"V1CatalogueDeals","x-munim-contract":"v1.catalogue.deals","x-munim-module":"catalogue","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"deal_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"rule":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"windows":{"type":"array","items":{}},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["deal_id","kind","name_key","rule","windows","outlet_ids","valid_from","valid_to","active"],"additionalProperties":false,"title":"CatalogueDealRow"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1CatalogueCoupons":{"title":"V1CatalogueCoupons","x-munim-contract":"v1.catalogue.coupons","x-munim-module":"catalogue","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"coupon_id":{"$ref":"#/components/schemas/Uuid7"},"code":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9-]{2,31}$"},"kind":{"type":"string","enum":["percent","amount"]},"value_bp":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"value_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"min_spend_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"global_cap":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"per_customer_cap":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"requires_customer":{"type":"boolean"},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"campaign_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"valid_from":{"$ref":"#/components/schemas/IsoDatetime"},"valid_to":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["coupon_id","code","kind","value_bp","value_minor","currency","min_spend_minor","global_cap","per_customer_cap","requires_customer","outlet_ids","campaign_id","valid_from","valid_to","active"],"additionalProperties":false,"title":"CatalogueCouponRow"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"CatalogueItemUpsertV1":{"title":"CatalogueItemUpsertV1","x-munim-contract":"catalogue.item.upsert.v1","x-munim-module":"catalogue","oneOf":[{"type":"object","properties":{"item_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"category":{"type":"string","minLength":1,"maxLength":100},"brand_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z-]{4,32}$"},{"type":"null"}]},"mrp_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"active":{"type":"boolean"},"variants":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"variant_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"barcode":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z-]{4,32}$"},{"type":"null"}]},"active":{"type":"boolean"},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["variant_id","name_key","barcode","active"],"additionalProperties":false}},"option_groups":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option_group_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"min_select":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_select":{"type":"integer","minimum":1,"maximum":9007199254740991},"required":{"type":"boolean"},"options":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"option_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"price_delta_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"active":{"type":"boolean"},"ingredient_deltas":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"delta_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"waste_pct_bp":{"type":"integer","minimum":0,"maximum":10000}},"required":["delta_id","ingredient_id","qty_milli","unit","waste_pct_bp"],"additionalProperties":false}},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["option_id","name_key","price_delta_minor","currency","active","ingredient_deltas"],"additionalProperties":false}},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["option_group_id","name_key","min_select","max_select","required","options"],"additionalProperties":false}},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"diet":{"anyOf":[{"type":"string","enum":["veg","non_veg","egg","vegan"]},{"type":"null"}]},"kind":{"type":"string","enum":["dish","combo"]},"stock_ingredient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["item_id","name_key","category","brand_id","barcode","mrp_minor","currency","active","variants","option_groups","kind","stock_ingredient_id"],"additionalProperties":false},{"type":"object","properties":{"item_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"category":{"type":"string","minLength":1,"maxLength":100},"brand_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"barcode":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z-]{4,32}$"},{"type":"null"}]},"mrp_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"active":{"type":"boolean"},"variants":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"variant_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"barcode":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z-]{4,32}$"},{"type":"null"}]},"active":{"type":"boolean"},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["variant_id","name_key","barcode","active"],"additionalProperties":false}},"option_groups":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"option_group_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"min_select":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_select":{"type":"integer","minimum":1,"maximum":9007199254740991},"required":{"type":"boolean"},"options":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"option_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"price_delta_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"active":{"type":"boolean"},"ingredient_deltas":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"delta_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"waste_pct_bp":{"type":"integer","minimum":0,"maximum":10000}},"required":["delta_id","ingredient_id","qty_milli","unit","waste_pct_bp"],"additionalProperties":false}},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["option_id","name_key","price_delta_minor","currency","active","ingredient_deltas"],"additionalProperties":false}},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["option_group_id","name_key","min_select","max_select","required","options"],"additionalProperties":false}},"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"diet":{"anyOf":[{"type":"string","enum":["veg","non_veg","egg","vegan"]},{"type":"null"}]},"kind":{"type":"string","const":"sku"},"stock_ingredient_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["item_id","name_key","category","brand_id","barcode","mrp_minor","currency","active","variants","option_groups","kind","stock_ingredient_id"],"additionalProperties":false}]},"CatalogueRecipeVersionCreateV1":{"title":"CatalogueRecipeVersionCreateV1","x-munim-contract":"catalogue.recipe.version.create.v1","x-munim-module":"catalogue","type":"object","properties":{"recipe_version_id":{"$ref":"#/components/schemas/Uuid7"},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"yield_qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"waste_pct_bp":{"type":"integer","minimum":0,"maximum":10000}},"required":["ingredient_id","qty_milli","unit","waste_pct_bp"],"additionalProperties":false}}},"required":["recipe_version_id","item_id","variant_id","version","valid_from","valid_to","yield_qty_milli","lines"],"additionalProperties":false},"CataloguePriceSetV1":{"title":"CataloguePriceSetV1","x-munim-contract":"catalogue.price.set.v1","x-munim-module":"catalogue","type":"object","properties":{"price_id":{"$ref":"#/components/schemas/Uuid7"},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"channel_kind":{"anyOf":[{"type":"string","enum":["counter","table_qr","pickup","own_site"]},{"type":"string","pattern":"^aggregator:[a-z][a-z0-9_]*$"}]},"amount_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"tax_class":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]}},"required":["price_id","item_id","variant_id","outlet_id","channel_kind","amount_minor","currency","tax_class","valid_from","valid_to"],"additionalProperties":false},"CatalogueDealUpsertV1":{"title":"CatalogueDealUpsertV1","x-munim-contract":"catalogue.deal.upsert.v1","x-munim-module":"catalogue","type":"object","properties":{"deal_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"rule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"percent_off"},"bp":{"type":"integer","minimum":1,"maximum":10000},"item_ids":{"maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["kind","bp","item_ids"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"amount_off"},"amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"item_ids":{"maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["kind","amount_minor","item_ids"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"buy_x_get_y"},"buy_qty":{"type":"integer","minimum":1,"maximum":100},"get_qty":{"type":"integer","minimum":1,"maximum":100},"item_ids":{"minItems":1,"maxItems":200,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["kind","buy_qty","get_qty","item_ids"],"additionalProperties":false}]},"windows":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"from":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"to":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"}},"required":["days","from","to"],"additionalProperties":false}},"outlet_ids":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["deal_id","name_key","rule","windows","outlet_ids","valid_from","valid_to","active"],"additionalProperties":false},"CatalogueDealEndV1":{"title":"CatalogueDealEndV1","x-munim-contract":"catalogue.deal.end.v1","x-munim-module":"catalogue","type":"object","properties":{"deal_id":{"$ref":"#/components/schemas/Uuid7"},"valid_to":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"}},"required":["deal_id","valid_to"],"additionalProperties":false},"CatalogueCouponSetV1":{"title":"CatalogueCouponSetV1","x-munim-contract":"catalogue.coupon.set.v1","x-munim-module":"catalogue","type":"object","properties":{"coupon_id":{"$ref":"#/components/schemas/Uuid7"},"code":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9-]{2,31}$"},"kind":{"type":"string","enum":["percent","amount"]},"value_bp":{"anyOf":[{"type":"integer","minimum":1,"maximum":10000},{"type":"null"}]},"value_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"min_spend_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"global_cap":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"per_customer_cap":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"requires_customer":{"type":"boolean"},"outlet_ids":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"valid_from":{"$ref":"#/components/schemas/IsoDatetime"},"valid_to":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["coupon_id","code","kind","value_bp","value_minor","currency","min_spend_minor","global_cap","per_customer_cap","requires_customer","outlet_ids","valid_from","valid_to","active"],"additionalProperties":false},"CatalogueAvailabilitySetV1":{"title":"CatalogueAvailabilitySetV1","x-munim-contract":"catalogue.availability.set.v1","x-munim-module":"catalogue","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"available":{"type":"boolean"}},"required":["outlet_id","item_id","variant_id","available"],"additionalProperties":false},"V1CatalogueMenu":{"title":"V1CatalogueMenu","x-munim-contract":"v1.catalogue.menu","x-munim-module":"catalogue","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"channel_kind":{"anyOf":[{"type":"string","enum":["counter","table_qr","pickup","own_site"]},{"type":"string","pattern":"^aggregator:[a-z][a-z0-9_]*$"}]},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"entries":{"type":"array","items":{"type":"object","properties":{"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","enum":["dish","sku","combo"]},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"variant_name_key":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},{"type":"null"}]},"category":{"type":"string"},"brand_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"display_name":{"type":["string","null"]},"description":{"type":["string","null"]},"diet":{"anyOf":[{"type":"string","enum":["veg","non_veg","egg","vegan"]},{"type":"null"}]},"variant_display_name":{"type":["string","null"]},"variant_description":{"type":["string","null"]},"barcode":{"type":["string","null"]},"price_id":{"$ref":"#/components/schemas/Uuid7"},"price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"tax_class":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"mrp_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"available":{"type":"boolean"},"option_groups":{"type":"array","items":{"type":"object","properties":{"option_group_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"min_select":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_select":{"type":"integer","minimum":1,"maximum":9007199254740991},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"option_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"price_delta_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"display_name":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["option_id","name_key","price_delta_minor","currency","display_name","description"],"additionalProperties":false}},"display_name":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["option_group_id","name_key","min_select","max_select","required","options","display_name","description"],"additionalProperties":false}},"deals":{"type":"array","items":{"type":"object","properties":{"deal_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"kind":{"type":"string"},"windows":{"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"from":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"to":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"}},"required":["days","from","to"],"additionalProperties":false}}},"required":["deal_id","name_key","kind","windows"],"additionalProperties":false}}},"required":["item_id","variant_id","kind","name_key","variant_name_key","category","brand_id","display_name","description","diet","variant_display_name","variant_description","barcode","price_id","price_minor","currency","tax_class","mrp_minor","available","option_groups","deals"],"additionalProperties":false}}},"required":["outlet_id","channel_kind","business_date","entries"],"additionalProperties":false},"V1CatalogueBarcode":{"title":"V1CatalogueBarcode","x-munim-contract":"v1.catalogue.barcode","x-munim-module":"catalogue","type":"object","properties":{"barcode":{"type":"string"},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"on_sale":{"type":"boolean"},"entry":{"anyOf":[{"type":"object","properties":{"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","enum":["dish","sku","combo"]},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"variant_name_key":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},{"type":"null"}]},"category":{"type":"string"},"brand_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"display_name":{"type":["string","null"]},"description":{"type":["string","null"]},"diet":{"anyOf":[{"type":"string","enum":["veg","non_veg","egg","vegan"]},{"type":"null"}]},"variant_display_name":{"type":["string","null"]},"variant_description":{"type":["string","null"]},"barcode":{"type":["string","null"]},"price_id":{"$ref":"#/components/schemas/Uuid7"},"price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"tax_class":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"mrp_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"available":{"type":"boolean"},"option_groups":{"type":"array","items":{"type":"object","properties":{"option_group_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"min_select":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_select":{"type":"integer","minimum":1,"maximum":9007199254740991},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"option_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"price_delta_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"display_name":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["option_id","name_key","price_delta_minor","currency","display_name","description"],"additionalProperties":false}},"display_name":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["option_group_id","name_key","min_select","max_select","required","options","display_name","description"],"additionalProperties":false}},"deals":{"type":"array","items":{"type":"object","properties":{"deal_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"kind":{"type":"string"},"windows":{"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"from":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"to":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"}},"required":["days","from","to"],"additionalProperties":false}}},"required":["deal_id","name_key","kind","windows"],"additionalProperties":false}}},"required":["item_id","variant_id","kind","name_key","variant_name_key","category","brand_id","display_name","description","diet","variant_display_name","variant_description","barcode","price_id","price_minor","currency","tax_class","mrp_minor","available","option_groups","deals"],"additionalProperties":false},{"type":"null"}]}},"required":["barcode","item_id","variant_id","on_sale","entry"],"additionalProperties":false},"ComplianceLicenceUpsertV1":{"title":"ComplianceLicenceUpsertV1","x-munim-contract":"compliance.licence.upsert.v1","x-munim-module":"compliance","type":"object","properties":{"licence_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9_]*$"},"number":{"type":"string","minLength":1,"maxLength":200},"issuer":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"document_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"supersedes_licence_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["licence_id","outlet_id","kind","number","issuer","valid_from","valid_to","document_id","supersedes_licence_id"],"additionalProperties":false},"ComplianceChecklistUpsertV1":{"title":"ComplianceChecklistUpsertV1","x-munim-contract":"compliance.checklist.upsert.v1","x-munim-module":"compliance","type":"object","properties":{"checklist_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"kind":{"type":"string","enum":["opening","closing","hygiene","cleaning","other"]},"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"due_time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"active":{"type":"boolean"}},"required":["checklist_id","outlet_id","name_key","kind","frequency","due_time","items","active"],"additionalProperties":false},"ComplianceChecklistCompleteV1":{"title":"ComplianceChecklistCompleteV1","x-munim-contract":"compliance.checklist.complete.v1","x-munim-module":"compliance","type":"object","properties":{"run_id":{"$ref":"#/components/schemas/Uuid7"},"checklist_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"results":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"additionalProperties":{"type":"boolean"}}},"required":["run_id","checklist_id","outlet_id","business_date","results"],"additionalProperties":false},"ComplianceTempRecordV1":{"title":"ComplianceTempRecordV1","x-munim-contract":"compliance.temp.record.v1","x-munim-module":"compliance","type":"object","properties":{"log_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"asset_id":{"$ref":"#/components/schemas/Uuid7"},"reading_milli_c":{"type":"integer","minimum":-60000,"maximum":300000},"read_at":{"$ref":"#/components/schemas/IsoDatetime"},"note":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["log_id","outlet_id","asset_id","reading_milli_c","read_at","note"],"additionalProperties":false},"ComplianceAssetUpsertV1":{"title":"ComplianceAssetUpsertV1","x-munim-contract":"compliance.asset.upsert.v1","x-munim-module":"compliance","type":"object","properties":{"asset_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["chiller","freezer","hot_holding","oven","fryer","dishwasher","air_conditioner","generator","water_purifier","other"]},"name":{"type":"string","minLength":1,"maxLength":200},"make_model":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"serial_no":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"safe_min_milli_c":{"anyOf":[{"type":"integer","minimum":-60000,"maximum":300000},{"type":"null"}]},"safe_max_milli_c":{"anyOf":[{"type":"integer","minimum":-60000,"maximum":300000},{"type":"null"}]},"installed_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["asset_id","outlet_id","kind","name","make_model","serial_no","safe_min_milli_c","safe_max_milli_c","installed_on","active"],"additionalProperties":false},"ComplianceAmcRecordV1":{"title":"ComplianceAmcRecordV1","x-munim-contract":"compliance.amc.record.v1","x-munim-module":"compliance","type":"object","properties":{"amc_id":{"$ref":"#/components/schemas/Uuid7"},"asset_id":{"$ref":"#/components/schemas/Uuid7"},"vendor":{"type":"string","minLength":1,"maxLength":200},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"cost":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"document_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["amc_id","asset_id","vendor","valid_from","valid_to","cost","document_id"],"additionalProperties":false},"ComplianceMaintenanceScheduleV1":{"title":"ComplianceMaintenanceScheduleV1","x-munim-contract":"compliance.maintenance.schedule.v1","x-munim-module":"compliance","type":"object","properties":{"maintenance_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"asset_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["preventive","inspection"]},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"estimated_cost_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"vendor_note":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["maintenance_id","outlet_id","asset_id","kind","due_on","estimated_cost_minor","vendor_note"],"additionalProperties":false},"ComplianceMaintenanceRecordV1":{"title":"ComplianceMaintenanceRecordV1","x-munim-contract":"compliance.maintenance.record.v1","x-munim-module":"compliance","type":"object","properties":{"maintenance_id":{"$ref":"#/components/schemas/Uuid7"},"asset_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["preventive","breakdown","inspection"]},"done_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"cost_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"vendor":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"amc_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["maintenance_id","asset_id","kind","done_on","cost_minor","vendor","amc_id","note"],"additionalProperties":false},"V1ComplianceLicences":{"title":"V1ComplianceLicences","x-munim-contract":"v1.compliance.licences","x-munim-module":"compliance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9_]*$"},"number":{"type":"string","minLength":1,"maxLength":200},"issuer":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"document_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"status":{"type":"string","enum":["active","superseded","lapsed"]}},"required":["id","outlet_id","kind","number","issuer","valid_from","valid_to","document_id","status"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1ComplianceLicencesExpiring":{"title":"V1ComplianceLicencesExpiring","x-munim-contract":"v1.compliance.licences-expiring","x-munim-module":"compliance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","maxLength":60,"pattern":"^[a-z][a-z0-9_]*$"},"number":{"type":"string","minLength":1,"maxLength":200},"valid_to":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"document_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"days_left":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expired":{"type":"boolean"}},"required":["id","outlet_id","kind","number","valid_to","document_id","days_left","expired"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1ComplianceAssets":{"title":"V1ComplianceAssets","x-munim-contract":"v1.compliance.assets","x-munim-module":"compliance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["chiller","freezer","hot_holding","oven","fryer","dishwasher","air_conditioner","generator","water_purifier","other"]},"name":{"type":"string","minLength":1,"maxLength":200},"make_model":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"serial_no":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"safe_min_milli_c":{"anyOf":[{"type":"integer","minimum":-60000,"maximum":300000},{"type":"null"}]},"safe_max_milli_c":{"anyOf":[{"type":"integer","minimum":-60000,"maximum":300000},{"type":"null"}]},"installed_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["id","outlet_id","kind","name","make_model","serial_no","safe_min_milli_c","safe_max_milli_c","installed_on","active"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1ComplianceTempLogs":{"title":"V1ComplianceTempLogs","x-munim-contract":"v1.compliance.temp-logs","x-munim-module":"compliance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"asset_id":{"$ref":"#/components/schemas/Uuid7"},"reading_milli_c":{"type":"integer","minimum":-60000,"maximum":300000},"read_at":{"$ref":"#/components/schemas/IsoDatetime"},"recorded_by":{"$ref":"#/components/schemas/Uuid7"},"note":{"type":["string","null"]},"local_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"out_of_range":{"type":["boolean","null"]}},"required":["id","outlet_id","asset_id","reading_milli_c","read_at","recorded_by","note","local_date","out_of_range"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1ComplianceChecklists":{"title":"V1ComplianceChecklists","x-munim-contract":"v1.compliance.checklists","x-munim-module":"compliance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"kind":{"type":"string","enum":["opening","closing","hygiene","cleaning","other"]},"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"due_time":{"type":"string","pattern":"^[0-9]{2}:[0-9]{2}(:[0-9]{2})?$"},"items":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"active":{"type":"boolean"}},"required":["id","outlet_id","name_key","kind","frequency","due_time","items","active"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1ComplianceChecklistRuns":{"title":"V1ComplianceChecklistRuns","x-munim-contract":"v1.compliance.checklist-runs","x-munim-module":"compliance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"checklist_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"results":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"additionalProperties":{"type":"boolean"}},"completed_by":{"$ref":"#/components/schemas/Uuid7"},"completed_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["id","checklist_id","outlet_id","business_date","results","completed_by","completed_at"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1ComplianceAmcs":{"title":"V1ComplianceAmcs","x-munim-contract":"v1.compliance.amcs","x-munim-module":"compliance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"asset_id":{"$ref":"#/components/schemas/Uuid7"},"vendor":{"type":"string","minLength":1,"maxLength":200},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"cost_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"document_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["id","asset_id","vendor","valid_from","valid_to","cost_minor","currency","document_id"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1ComplianceMaintenance":{"title":"V1ComplianceMaintenance","x-munim-contract":"v1.compliance.maintenance","x-munim-module":"compliance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"asset_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["preventive","breakdown","inspection"]},"status":{"type":"string","enum":["scheduled","done","cancelled"]},"due_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"done_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"estimated_cost_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"cost_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"vendor":{"type":["string","null"]},"amc_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"note":{"type":["string","null"]}},"required":["id","asset_id","kind","status","due_on","done_on","estimated_cost_minor","cost_minor","currency","vendor","amc_id","note"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"CustomersCustomerUpsertV1":{"title":"CustomersCustomerUpsertV1","x-munim-contract":"customers.customer.upsert.v1","x-munim-module":"customers","type":"object","properties":{"customer_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},{"type":"null"}]},"withdraw_consent":{"maxItems":2,"type":"array","items":{"type":"string","enum":["email","sms"]}}},"required":["customer_id","name","phone","email","withdraw_consent"],"additionalProperties":false},"CustomersLoyaltyAdjustV1":{"title":"CustomersLoyaltyAdjustV1","x-munim-contract":"customers.loyalty.adjust.v1","x-munim-module":"customers","type":"object","properties":{"customer_id":{"$ref":"#/components/schemas/Uuid7"},"points":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":"string","minLength":1,"maxLength":200}},"required":["customer_id","points","note"],"additionalProperties":false},"CustomersCampaignCancelV1":{"title":"CustomersCampaignCancelV1","x-munim-contract":"customers.campaign.cancel.v1","x-munim-module":"customers","type":"object","properties":{"campaign_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["campaign_id"],"additionalProperties":false},"CustomersCampaignRecordSentV1":{"title":"CustomersCampaignRecordSentV1","x-munim-contract":"customers.campaign.record_sent.v1","x-munim-module":"customers","type":"object","properties":{"campaign_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["campaign_id"],"additionalProperties":false},"CustomersReservationUpsertV1":{"title":"CustomersReservationUpsertV1","x-munim-contract":"customers.reservation.upsert.v1","x-munim-module":"customers","type":"object","properties":{"reservation_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"customer_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"party_size":{"type":"integer","minimum":1,"maximum":500},"starts_at":{"$ref":"#/components/schemas/IsoDatetime"},"duration_min":{"type":"integer","minimum":15,"maximum":720},"table_ref":{"anyOf":[{"type":"string","minLength":1,"maxLength":20},{"type":"null"}]},"status":{"type":"string","enum":["booked","seated","completed","cancelled","no_show"]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["reservation_id","outlet_id","customer_id","name","phone","party_size","starts_at","duration_min","table_ref","status","note"],"additionalProperties":false},"CustomersReviewRecordV1":{"title":"CustomersReviewRecordV1","x-munim-contract":"customers.review.record.v1","x-munim-module":"customers","type":"object","properties":{"review_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"source":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"external_ref":{"type":"string","minLength":1,"maxLength":200},"rating":{"type":"integer","minimum":1,"maximum":5},"body":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"reviewed_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["review_id","outlet_id","channel_id","source","external_ref","rating","body","reviewed_at"],"additionalProperties":false},"CustomersBulkOrderUpsertV1":{"title":"CustomersBulkOrderUpsertV1","x-munim-contract":"customers.bulk_order.upsert.v1","x-munim-module":"customers","type":"object","properties":{"bulk_order_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"customer_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"contact_name":{"type":"string","minLength":1,"maxLength":200},"contact_phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"deliver_at":{"$ref":"#/components/schemas/IsoDatetime"},"headcount":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["enquiry","quoted","confirmed","delivered","cancelled"]},"quote_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"advance_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"order_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["bulk_order_id","outlet_id","customer_id","contact_name","contact_phone","deliver_at","headcount","status","quote_minor","advance_minor","currency","order_id","note"],"additionalProperties":false},"V1Customer":{"title":"V1Customer","x-munim-contract":"v1.customer","x-munim-module":"customers","type":"object","properties":{"customer_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"consent":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"}},"additionalProperties":false},"has_account":{"type":"boolean"},"erased":{"type":"boolean"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["customer_id","name","phone","email","consent","has_account","erased","created_at"],"additionalProperties":false},"CustomersCustomerList":{"title":"CustomersCustomerList","x-munim-contract":"customers.customer.list","x-munim-module":"customers","type":"object","properties":{"customers":{"type":"array","items":{"$ref":"#/components/schemas/V1Customer"}},"next_cursor":{"type":["string","null"]}},"required":["customers","next_cursor"],"additionalProperties":false},"V1LoyaltyEntry":{"title":"V1LoyaltyEntry","x-munim-contract":"v1.loyalty-entry","x-munim-module":"customers","type":"object","properties":{"entry_id":{"$ref":"#/components/schemas/Uuid7"},"customer_id":{"$ref":"#/components/schemas/Uuid7"},"seq":{"type":"integer","minimum":1,"maximum":9007199254740991},"kind":{"type":"string","enum":["earn","redeem","reverse","expire","adjust"]},"points":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"balance_after":{"type":"integer","minimum":0,"maximum":9007199254740991},"order_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"reverses_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"note":{"type":["string","null"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["entry_id","customer_id","seq","kind","points","balance_after","order_id","reverses_id","note","created_at"],"additionalProperties":false},"CustomersLoyaltyLedger":{"title":"CustomersLoyaltyLedger","x-munim-contract":"customers.loyalty.ledger","x-munim-module":"customers","type":"object","properties":{"customer_id":{"$ref":"#/components/schemas/Uuid7"},"balance":{"type":"integer","minimum":0,"maximum":9007199254740991},"balance_entry_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"entries":{"type":"array","items":{"$ref":"#/components/schemas/V1LoyaltyEntry"}}},"required":["customer_id","balance","balance_entry_id","entries"],"additionalProperties":false},"V1CouponUse":{"title":"V1CouponUse","x-munim-contract":"v1.coupon-use","x-munim-module":"customers","type":"object","properties":{"coupon_use_id":{"$ref":"#/components/schemas/Uuid7"},"coupon_id":{"$ref":"#/components/schemas/Uuid7"},"order_id":{"$ref":"#/components/schemas/Uuid7"},"customer_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"discount_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"applied_by":{"$ref":"#/components/schemas/Uuid7"},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["coupon_use_id","coupon_id","order_id","customer_id","discount_minor","currency","applied_by","at"],"additionalProperties":false},"CustomersCouponUseList":{"title":"CustomersCouponUseList","x-munim-contract":"customers.coupon-use.list","x-munim-module":"customers","type":"object","properties":{"coupon_uses":{"type":"array","items":{"$ref":"#/components/schemas/V1CouponUse"}}},"required":["coupon_uses"],"additionalProperties":false},"V1Campaign":{"title":"V1Campaign","x-munim-contract":"v1.campaign","x-munim-module":"customers","type":"object","properties":{"campaign_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string"},"channel":{"type":"string","enum":["email","sms"]},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"segment_snapshot_id":{"$ref":"#/components/schemas/Uuid7"},"audience_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"message_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"coupon_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"send_at":{"$ref":"#/components/schemas/IsoDatetime"},"status":{"type":"string","enum":["queued","sent","cancelled"]},"never_auto_sent":{"type":"boolean","const":true},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["campaign_id","name","channel","outlet_ids","segment_snapshot_id","audience_count","message_key","coupon_id","send_at","status","never_auto_sent","created_at"],"additionalProperties":false},"CustomersCampaignList":{"title":"CustomersCampaignList","x-munim-contract":"customers.campaign.list","x-munim-module":"customers","type":"object","properties":{"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/V1Campaign"}}},"required":["campaigns"],"additionalProperties":false},"V1Reservation":{"title":"V1Reservation","x-munim-contract":"v1.reservation","x-munim-module":"customers","type":"object","properties":{"reservation_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"customer_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"party_size":{"type":"integer","minimum":1,"maximum":500},"starts_at":{"$ref":"#/components/schemas/IsoDatetime"},"duration_min":{"type":"integer","minimum":15,"maximum":720},"table_ref":{"anyOf":[{"type":"string","minLength":1,"maxLength":20},{"type":"null"}]},"status":{"type":"string","enum":["booked","seated","completed","cancelled","no_show"]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["reservation_id","outlet_id","customer_id","name","phone","party_size","starts_at","duration_min","table_ref","status","note","created_at"],"additionalProperties":false},"CustomersReservationList":{"title":"CustomersReservationList","x-munim-contract":"customers.reservation.list","x-munim-module":"customers","type":"object","properties":{"reservations":{"type":"array","items":{"$ref":"#/components/schemas/V1Reservation"}}},"required":["reservations"],"additionalProperties":false},"V1Review":{"title":"V1Review","x-munim-contract":"v1.review","x-munim-module":"customers","type":"object","properties":{"review_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"source":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"external_ref":{"type":"string","minLength":1,"maxLength":200},"rating":{"type":"integer","minimum":1,"maximum":5},"body":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"reviewed_at":{"$ref":"#/components/schemas/IsoDatetime"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["review_id","outlet_id","channel_id","source","external_ref","rating","body","reviewed_at","created_at"],"additionalProperties":false},"CustomersReviewList":{"title":"CustomersReviewList","x-munim-contract":"customers.review.list","x-munim-module":"customers","type":"object","properties":{"reviews":{"type":"array","items":{"$ref":"#/components/schemas/V1Review"}}},"required":["reviews"],"additionalProperties":false},"V1BulkOrder":{"title":"V1BulkOrder","x-munim-contract":"v1.bulk-order","x-munim-module":"customers","type":"object","properties":{"bulk_order_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"customer_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"contact_name":{"type":"string","minLength":1,"maxLength":200},"contact_phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"deliver_at":{"$ref":"#/components/schemas/IsoDatetime"},"headcount":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["enquiry","quoted","confirmed","delivered","cancelled"]},"quote_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"advance_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"order_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["bulk_order_id","outlet_id","customer_id","contact_name","contact_phone","deliver_at","headcount","status","quote_minor","advance_minor","currency","order_id","note","created_at"],"additionalProperties":false},"CustomersBulkOrderList":{"title":"CustomersBulkOrderList","x-munim-contract":"customers.bulk-order.list","x-munim-module":"customers","type":"object","properties":{"bulk_orders":{"type":"array","items":{"$ref":"#/components/schemas/V1BulkOrder"}}},"required":["bulk_orders"],"additionalProperties":false},"V1FinanceSettlements":{"title":"V1FinanceSettlements","x-munim-contract":"v1.finance.settlements","x-munim-module":"finance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"settlement_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"period_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"period_to":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"paid_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"external_ref":{"type":"string"},"net_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["settlement_id","channel_id","outlet_id","period_from","period_to","paid_on","external_ref","net_minor","currency","created_at"],"additionalProperties":false,"title":"SettlementItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1FinanceSettlementLines":{"title":"V1FinanceSettlementLines","x-munim-contract":"v1.finance.settlement-lines","x-munim-module":"finance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"settlement_line_id":{"$ref":"#/components/schemas/Uuid7"},"settlement_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"line_kind":{"type":"string","enum":["order","ad_fee","promo_share","adjustment","other"]},"external_order_ref":{"type":["string","null"]},"matched_order_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"gross_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"commission_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ad_fee_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"promo_share_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_withheld_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"net_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["settlement_line_id","settlement_id","channel_id","line_no","line_kind","external_order_ref","matched_order_id","gross_minor","commission_minor","ad_fee_minor","promo_share_minor","tax_withheld_minor","net_minor","currency"],"additionalProperties":false,"title":"SettlementLineItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1FinanceBankLines":{"title":"V1FinanceBankLines","x-munim-contract":"v1.finance.bank-lines","x-munim-module":"finance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"bank_line_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"account_ref":{"type":"string"},"value_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"method":{"type":"string","enum":["upi","card","bank_transfer","neft","imps","rtgs","cash_deposit","cheque","fee","other"]},"payee_vpa":{"type":["string","null"]},"narration":{"type":["string","null"]},"external_ref":{"type":"string"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["bank_line_id","outlet_id","account_ref","value_date","amount_minor","currency","method","payee_vpa","narration","external_ref","created_at"],"additionalProperties":false,"title":"BankLineItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1FinanceDisputes":{"title":"V1FinanceDisputes","x-munim-contract":"v1.finance.disputes","x-munim-module":"finance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"dispute_id":{"$ref":"#/components/schemas/Uuid7"},"counterparty":{"type":"string","enum":["channel","supplier"]},"channel_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"supplier_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"supplier_invoice_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"basis":{"type":"string","enum":["unapproved_ad_fee","short_payout","missing_payout","overbilled","duplicate_invoice","other"]},"total_claimed_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["recorded","sent","resolved","rejected","withdrawn"]},"resolved_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["dispute_id","counterparty","channel_id","supplier_id","supplier_invoice_id","basis","total_claimed_minor","currency","status","resolved_minor","created_at"],"additionalProperties":false,"title":"DisputeItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1FinanceDispute":{"title":"V1FinanceDispute","x-munim-contract":"v1.finance.dispute","x-munim-module":"finance","type":"object","properties":{"dispute_id":{"$ref":"#/components/schemas/Uuid7"},"counterparty":{"type":"string","enum":["channel","supplier"]},"channel_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"supplier_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"supplier_invoice_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"basis":{"type":"string","enum":["unapproved_ad_fee","short_payout","missing_payout","overbilled","duplicate_invoice","other"]},"total_claimed_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["recorded","sent","resolved","rejected","withdrawn"]},"resolved_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"type":"array","items":{"type":"object","properties":{"dispute_line_id":{"$ref":"#/components/schemas/Uuid7"},"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"settlement_line_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"order_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"supplier_invoice_line_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"claimed_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["dispute_line_id","line_no","settlement_line_id","order_id","supplier_invoice_line_id","claimed_minor","currency"],"additionalProperties":false}}},"required":["dispute_id","counterparty","channel_id","supplier_id","supplier_invoice_id","basis","total_claimed_minor","currency","status","resolved_minor","created_at","lines"],"additionalProperties":false},"V1FinancePeriodCloses":{"title":"V1FinancePeriodCloses","x-munim-contract":"v1.finance.period-closes","x-munim-module":"finance","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"period_close_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"period_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"checklist":{"type":"array","items":{"type":"object","properties":{"item_code":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"evidence_ref":{"type":"string"}},"required":["item_code","evidence_ref"],"additionalProperties":false}},"net_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"closed_by":{"$ref":"#/components/schemas/Uuid7"},"closed_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["period_close_id","outlet_id","period_month","checklist","net_minor","currency","closed_by","closed_at"],"additionalProperties":false,"title":"PeriodCloseItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"FinanceChannelTermsSetV1":{"title":"FinanceChannelTermsSetV1","x-munim-contract":"finance.channel_terms.set.v1","x-munim-module":"finance","type":"object","properties":{"channel_terms_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"commission_bp":{"type":"integer","minimum":0,"maximum":10000},"ads_opted_in":{"type":"boolean"},"ad_spend_cap_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"promo_share_bp":{"type":"integer","minimum":0,"maximum":10000},"payout_cycle_days":{"type":"integer","minimum":1,"maximum":90},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]}},"required":["channel_terms_id","channel_id","commission_bp","ads_opted_in","ad_spend_cap_minor","promo_share_bp","payout_cycle_days","currency","valid_from","valid_to"],"additionalProperties":false},"FinanceExpenseRecordV1":{"title":"FinanceExpenseRecordV1","x-munim-contract":"finance.expense.record.v1","x-munim-module":"finance","type":"object","properties":{"expense_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"category":{"type":"string","enum":["rent","utilities","repairs","marketing","packaging","bank_charges","professional_fees","other"]},"incurred_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"payee":{"type":"string","minLength":1,"maxLength":200},"note":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"document_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["expense_id","outlet_id","category","incurred_on","amount_minor","tax_minor","currency","payee","note","document_id"],"additionalProperties":false},"FinanceBudgetSetV1":{"title":"FinanceBudgetSetV1","x-munim-contract":"finance.budget.set.v1","x-munim-module":"finance","type":"object","properties":{"budget_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"category":{"type":"string","enum":["purchases","labour","marketing","utilities","maintenance","other"]},"period_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"amount_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["budget_id","outlet_id","category","period_month","amount_minor","currency"],"additionalProperties":false},"FinanceDisputeDraftV1":{"title":"FinanceDisputeDraftV1","x-munim-contract":"finance.dispute.draft.v1","x-munim-module":"finance","type":"object","properties":{"dispute_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"basis":{"type":"string","enum":["unapproved_ad_fee","short_payout","missing_payout"]},"lines":{"type":"array","items":{"type":"object","properties":{"settlement_line_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"order_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"claimed_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["settlement_line_id","order_id","claimed_minor"],"additionalProperties":false}},"total_claimed_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"break_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["dispute_id","channel_id","basis","lines","total_claimed_minor","currency","break_ids"],"additionalProperties":false},"FinancePeriodCloseV1":{"title":"FinancePeriodCloseV1","x-munim-contract":"finance.period.close.v1","x-munim-module":"finance","type":"object","properties":{"period_close_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"period_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"checklist":{"minItems":1,"type":"array","items":{"type":"object","properties":{"item_code":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"evidence_ref":{"$ref":"#/components/schemas/RefId"}},"required":["item_code","evidence_ref"],"additionalProperties":false}},"net_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["period_close_id","outlet_id","period_month","checklist","net_minor","currency"],"additionalProperties":false},"V1FinanceTallyExport":{"title":"V1FinanceTallyExport","x-munim-contract":"v1.finance.tally-export","x-munim-module":"finance","type":"object","properties":{"file_name":{"type":"string","pattern":"^munim-tally-[0-9]{4}-[0-9]{2}-[0-9]{2}-to-[0-9]{4}-[0-9]{2}-[0-9]{2}\\.csv$"},"content_type":{"type":"string","const":"text/csv"},"content":{"type":"string"}},"required":["file_name","content_type","content"],"additionalProperties":false},"V1FinanceChannelTerms":{"title":"V1FinanceChannelTerms","x-munim-contract":"v1.finance.channel-terms","x-munim-module":"finance","type":"object","properties":{"channel_terms":{"type":"array","items":{"$ref":"#/components/schemas/FinanceChannelTermsSetV1"}}},"required":["channel_terms"],"additionalProperties":false},"FindingsDismissV1":{"title":"FindingsDismissV1","x-munim-contract":"findings.dismiss.v1","x-munim-module":"findings","type":"object","properties":{"finding_id":{"$ref":"#/components/schemas/Uuid7"},"reason_code":{"type":"string","enum":["wrong_numbers","not_needed","already_done","bad_timing","other"]}},"required":["finding_id","reason_code"],"additionalProperties":false},"GoalsGoalCreateV1":{"title":"GoalsGoalCreateV1","x-munim-contract":"goals.goal.create.v1","x-munim-module":"goals","type":"object","properties":{"goal_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"metric":{"type":"string","enum":["net_sales","orders"]},"target_value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"period_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"basis_snapshot_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["goal_id","outlet_id","metric","target_value","period_from","due_on","basis_snapshot_id"],"additionalProperties":false},"GoalsGoalUpdateV1":{"title":"GoalsGoalUpdateV1","x-munim-contract":"goals.goal.update.v1","x-munim-module":"goals","type":"object","properties":{"goal_id":{"$ref":"#/components/schemas/Uuid7"},"status":{"type":"string","enum":["achieved","missed","cancelled"]}},"required":["goal_id","status"],"additionalProperties":false},"GoalsTaskCreateV1":{"title":"GoalsTaskCreateV1","x-munim-contract":"goals.task.create.v1","x-munim-module":"goals","type":"object","properties":{"task_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"title_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"assignee_member_id":{"$ref":"#/components/schemas/Uuid7"},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"finding_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"cares_listing_id":{"default":null,"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["task_id","outlet_id","title_key","assignee_member_id","due_on","finding_id"],"additionalProperties":false},"GoalsTaskUpdateV1":{"title":"GoalsTaskUpdateV1","x-munim-contract":"goals.task.update.v1","x-munim-module":"goals","type":"object","properties":{"task_id":{"$ref":"#/components/schemas/Uuid7"},"status":{"anyOf":[{"type":"string","enum":["done","cancelled"]},{"type":"null"}]},"assignee_member_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"due_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]}},"required":["task_id","status","assignee_member_id","due_on"],"additionalProperties":false},"V1Goals":{"title":"V1Goals","x-munim-contract":"v1.goals","x-munim-module":"goals","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"metric":{"type":"string","enum":["net_sales","orders"]},"target_value":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"period_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"status":{"type":"string","enum":["active","achieved","missed","cancelled"]},"basis_snapshot_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["id","outlet_id","metric","target_value","currency","period_from","due_on","status","basis_snapshot_id"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1Tasks":{"title":"V1Tasks","x-munim-contract":"v1.tasks","x-munim-module":"goals","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"title_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"assignee_member_id":{"$ref":"#/components/schemas/Uuid7"},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"finding_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"cares_listing_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"status":{"type":"string","enum":["open","done","cancelled"]},"done_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"done_by":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["id","outlet_id","title_key","assignee_member_id","due_on","finding_id","cares_listing_id","status","done_at","done_by"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1Conversations":{"title":"V1Conversations","x-munim-contract":"v1.conversations","x-munim-module":"imports","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"conversation_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","enum":["handover","supplier","customer","imported_chat","other"]},"title":{"type":["string","null"]},"document_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["conversation_id","outlet_id","kind","title","document_id","created_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1ConversationMessages":{"title":"V1ConversationMessages","x-munim-contract":"v1.conversation.messages","x-munim-module":"imports","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"message_id":{"$ref":"#/components/schemas/Uuid7"},"conversation_id":{"$ref":"#/components/schemas/Uuid7"},"author_member_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"author_label":{"type":["string","null"]},"body":{"type":"string"},"sent_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["message_id","conversation_id","author_member_id","author_label","body","sent_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1ImportsDocument":{"title":"V1ImportsDocument","x-munim-contract":"v1.imports.document","x-munim-module":"imports","type":"object","properties":{"document_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string"},"media_type":{"type":"string"},"filename":{"type":["string","null"]},"byte_size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"uploaded_by":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["document_id","kind","media_type","filename","byte_size","sha256","uploaded_by","created_at"],"additionalProperties":false},"V1ImportsRun":{"title":"V1ImportsRun","x-munim-contract":"v1.imports.run","x-munim-module":"imports","type":"object","properties":{"import_run_id":{"$ref":"#/components/schemas/Uuid7"},"document_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["payout_statement","bank_statement","pos_export","tally_export","market_signal","pos_bills","waste_log","shift_log","stock_count"]},"parser":{"type":["string","null"]},"format_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"status":{"type":"string","enum":["parsing","previewed","committed","rejected","failed"]},"rows_ok":{"type":"integer","minimum":0,"maximum":9007199254740991},"rows_quarantined":{"type":"integer","minimum":0,"maximum":9007199254740991},"control_total_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"total_matches":{"type":["boolean","null"]},"draft_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"decision_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["import_run_id","document_id","kind","parser","format_id","status","rows_ok","rows_quarantined","control_total_minor","currency","total_matches","draft_id","decision_id","created_at","updated_at"],"additionalProperties":false},"V1ImportsUploadRequest":{"title":"V1ImportsUploadRequest","x-munim-contract":"v1.imports.upload.request","x-munim-module":"imports","type":"object","properties":{"kind":{"type":"string","enum":["payout_statement","bank_statement","pos_export","tally_export","market_signal","pos_bills","waste_log","shift_log","stock_count"]},"filename":{"type":"string","minLength":1,"maxLength":255},"media_type":{"type":"string","pattern":"^[a-z]+\\/[a-z0-9.+-]+$"},"content_base64":{"type":"string","minLength":1,"maxLength":7000000}},"required":["kind","filename","media_type","content_base64"],"additionalProperties":false},"V1ImportsUploadResponse":{"title":"V1ImportsUploadResponse","x-munim-contract":"v1.imports.upload.response","x-munim-module":"imports","type":"object","properties":{"duplicate":{"type":"boolean"},"document":{"$ref":"#/components/schemas/V1ImportsDocument"},"run":{"anyOf":[{"$ref":"#/components/schemas/V1ImportsRun"},{"type":"null"}]},"header":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["duplicate","document","run","header"],"additionalProperties":false},"V1ImportsRunCreateRequest":{"title":"V1ImportsRunCreateRequest","x-munim-contract":"v1.imports.run.create.request","x-munim-module":"imports","type":"object","properties":{"document_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["document_id"],"additionalProperties":false},"V1ImportsRunsResponse":{"title":"V1ImportsRunsResponse","x-munim-contract":"v1.imports.runs.response","x-munim-module":"imports","type":"object","properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/V1ImportsRun"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["runs","next_cursor"],"additionalProperties":false},"V1ImportsRunRowsResponse":{"title":"V1ImportsRunRowsResponse","x-munim-contract":"v1.imports.run.rows.response","x-munim-module":"imports","type":"object","properties":{"staged":{"type":"array","items":{"type":"object","properties":{"row_no":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"target_table":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}},"amount_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"external_ref":{"type":["string","null"]}},"required":["row_no","target_table","data","amount_minor","external_ref"],"additionalProperties":false}},"quarantined":{"type":"array","items":{"type":"object","properties":{"row_no":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"raw":{"type":"string"},"reason_code":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"}},"required":["row_no","raw","reason_code"],"additionalProperties":false}}},"required":["staged","quarantined"],"additionalProperties":false},"V1ImportsFormatProposeRequest":{"title":"V1ImportsFormatProposeRequest","x-munim-contract":"v1.imports.format.propose.request","x-munim-module":"imports","type":"object","properties":{"document_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["payout_statement","bank_statement","pos_export","tally_export","market_signal","pos_bills","waste_log","shift_log","stock_count"]},"name":{"type":"string","minLength":1,"maxLength":100},"mapping":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":100},"target":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"unit":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,15}$"}},"required":["source","target"],"additionalProperties":false}}},"required":["document_id","kind","name","mapping"],"additionalProperties":false},"V1ImportsFormatProposeResponse":{"title":"V1ImportsFormatProposeResponse","x-munim-contract":"v1.imports.format.propose.response","x-munim-module":"imports","type":"object","properties":{"draft_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["draft_id"],"additionalProperties":false},"V1WikiPages":{"title":"V1WikiPages","x-munim-contract":"v1.wiki.pages","x-munim-module":"intel","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"page_id":{"$ref":"#/components/schemas/Uuid7"},"entity_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"current_version":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["page_id","entity_id","kind","slug","title","current_version","updated_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1WikiPage":{"title":"V1WikiPage","x-munim-contract":"v1.wiki.page","x-munim-module":"intel","type":"object","properties":{"page_id":{"$ref":"#/components/schemas/Uuid7"},"entity_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"current_version":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"},"body":{"type":"array","items":{}}},"required":["page_id","entity_id","kind","slug","title","current_version","updated_at","body"],"additionalProperties":false},"V1WikiVersions":{"title":"V1WikiVersions","x-munim-contract":"v1.wiki.versions","x-munim-module":"intel","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"version_id":{"$ref":"#/components/schemas/Uuid7"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"body":{"type":"array","items":{}},"run_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["version_id","version","body","run_id","created_at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1Finding":{"title":"V1Finding","x-munim-contract":"v1.finding","x-munim-module":"intel","type":"object","properties":{"finding_id":{"$ref":"#/components/schemas/Uuid7"},"run_id":{"$ref":"#/components/schemas/Uuid7"},"pack":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"type":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"severity":{"type":"string","enum":["low","medium","high","critical"]},"status":{"type":"string","enum":["open","dismissed","resolved"]},"confidence_bp":{"type":"integer","minimum":0,"maximum":10000},"dedupe_key":{"type":"string"},"envelope":{"$ref":"#/components/schemas/FindingEnvelope"},"resolved_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/Ref"},"value":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}},"required":["ref","value"],"additionalProperties":false}},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["finding_id","run_id","pack","type","severity","status","confidence_bp","dedupe_key","envelope","resolved_refs","created_at","updated_at"],"additionalProperties":false},"V1FindingsResponse":{"title":"V1FindingsResponse","x-munim-contract":"v1.findings.response","x-munim-module":"intel","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/V1Finding"}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false},"V1InboxResponse":{"title":"V1InboxResponse","x-munim-contract":"v1.inbox.response","x-munim-module":"intel","type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"finding"},"finding":{"$ref":"#/components/schemas/V1Finding"}},"required":["kind","finding"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"draft"},"draft":{"$ref":"#/components/schemas/V1Draft"}},"required":["kind","draft"],"additionalProperties":false}]}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false},"V1RunResponse":{"title":"V1RunResponse","x-munim-contract":"v1.run.response","x-munim-module":"intel","type":"object","properties":{"run_id":{"$ref":"#/components/schemas/Uuid7"},"trigger":{"type":"string","enum":["event","watch_sweep","ask","brief","ingest","auto_step"]},"actor":{"type":"string","minLength":1,"maxLength":100},"outlet_scope":{"anyOf":[{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","const":"*"}}]},"issued_at":{"$ref":"#/components/schemas/IsoDatetime"},"expires_at":{"$ref":"#/components/schemas/IsoDatetime"},"ended_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]}},"required":["run_id","trigger","actor","outlet_scope","issued_at","expires_at","ended_at"],"additionalProperties":false},"V1RunsResponse":{"title":"V1RunsResponse","x-munim-contract":"v1.runs.response","x-munim-module":"intel","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/V1RunResponse"}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false},"V1TracesResponse":{"title":"V1TracesResponse","x-munim-contract":"v1.traces.response","x-munim-module":"intel","type":"object","properties":{"run_id":{"$ref":"#/components/schemas/Uuid7"},"events":{"type":"array","items":{"$ref":"#/components/schemas/TraceEvent"}},"next_after_seq":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["run_id","events","next_after_seq"],"additionalProperties":false},"V1SnapshotsRequest":{"title":"V1SnapshotsRequest","x-munim-contract":"v1.snapshots.request","x-munim-module":"intel","type":"object","properties":{"template_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"params":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"required":["template_id","params"],"additionalProperties":false},"V1InventoryIngredients":{"title":"V1InventoryIngredients","x-munim-contract":"v1.inventory.ingredients","x-munim-module":"inventory","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string"},"base_unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"shelf_life_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"tracked_by_batch":{"type":"boolean"},"active":{"type":"boolean"}},"required":["ingredient_id","name","base_unit","shelf_life_days","tracked_by_batch","active"],"additionalProperties":false,"title":"IngredientItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1InventoryWaste":{"title":"V1InventoryWaste","x-munim-contract":"v1.inventory.waste","x-munim-module":"inventory","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"waste_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"reason":{"type":"string","enum":["temperature","overprep","expired","damaged","other"]},"note":{"type":["string","null"]},"recorded_by":{"$ref":"#/components/schemas/Uuid7"},"at":{"$ref":"#/components/schemas/IsoDatetime"},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"}},"required":["waste_id","outlet_id","ingredient_id","batch_id","qty_milli","unit","reason","note","recorded_by","at","business_date"],"additionalProperties":false,"title":"WasteItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1InventoryCounts":{"title":"V1InventoryCounts","x-munim-contract":"v1.inventory.counts","x-munim-module":"inventory","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"stock_count_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"counted_by":{"$ref":"#/components/schemas/Uuid7"},"counted_at":{"$ref":"#/components/schemas/IsoDatetime"},"status":{"type":"string","enum":["open","submitted","cancelled"]},"lines":{"type":"array","items":{"type":"object","properties":{"count_line_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"expected_qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"counted_qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["count_line_id","ingredient_id","batch_id","expected_qty_milli","counted_qty_milli","unit"],"additionalProperties":false}}},"required":["stock_count_id","outlet_id","counted_by","counted_at","status","lines"],"additionalProperties":false,"title":"StockCountItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1InventoryCount":{"title":"V1InventoryCount","x-munim-contract":"v1.inventory.count","x-munim-module":"inventory","type":"object","properties":{"stock_count_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"counted_by":{"$ref":"#/components/schemas/Uuid7"},"counted_at":{"$ref":"#/components/schemas/IsoDatetime"},"status":{"type":"string","enum":["open","submitted","cancelled"]},"lines":{"type":"array","items":{"type":"object","properties":{"count_line_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"expected_qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"counted_qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["count_line_id","ingredient_id","batch_id","expected_qty_milli","counted_qty_milli","unit"],"additionalProperties":false}}},"required":["stock_count_id","outlet_id","counted_by","counted_at","status","lines"],"additionalProperties":false},"V1InventoryTransfers":{"title":"V1InventoryTransfers","x-munim-contract":"v1.inventory.transfers","x-munim-module":"inventory","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"transfer_id":{"$ref":"#/components/schemas/Uuid7"},"from_outlet_id":{"$ref":"#/components/schemas/Uuid7"},"to_outlet_id":{"$ref":"#/components/schemas/Uuid7"},"status":{"type":"string","enum":["sent","received","cancelled"]},"sent_by":{"$ref":"#/components/schemas/Uuid7"},"sent_at":{"$ref":"#/components/schemas/IsoDatetime"},"received_by":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"received_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"transfer_line_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["transfer_line_id","ingredient_id","batch_id","qty_milli","unit"],"additionalProperties":false}}},"required":["transfer_id","from_outlet_id","to_outlet_id","status","sent_by","sent_at","received_by","received_at","lines"],"additionalProperties":false,"title":"TransferItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"InventoryIngredientUpsertV1":{"title":"InventoryIngredientUpsertV1","x-munim-contract":"inventory.ingredient.upsert.v1","x-munim-module":"inventory","type":"object","properties":{"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"base_unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"shelf_life_days":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tracked_by_batch":{"type":"boolean"}},"required":["ingredient_id","name","base_unit","shelf_life_days","tracked_by_batch"],"additionalProperties":false},"InventoryReorderLevelSetV1":{"title":"InventoryReorderLevelSetV1","x-munim-contract":"inventory.reorder_level.set.v1","x-munim-module":"inventory","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"min_qty_milli":{"type":"integer","minimum":0,"maximum":9007199254740991},"par_qty_milli":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["outlet_id","ingredient_id","min_qty_milli","par_qty_milli"],"additionalProperties":false},"InventoryStockReceiveV1":{"title":"InventoryStockReceiveV1","x-munim-contract":"inventory.stock.receive.v1","x-munim-module":"inventory","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"source":{"type":"string","const":"opening"},"at":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"movement_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"batch":{"anyOf":[{"type":"object","properties":{"batch_code":{"type":"string","minLength":1,"maxLength":64},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"mrp_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["batch_code","expires_on","mrp_minor"],"additionalProperties":false},{"type":"null"}]},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_cost":{"$ref":"#/components/schemas/Money"}},"required":["movement_id","ingredient_id","batch_id","batch","qty_milli","unit","unit_cost"],"additionalProperties":false}}},"required":["outlet_id","source","at","lines"],"additionalProperties":false},"InventoryWasteRecordV1":{"title":"InventoryWasteRecordV1","x-munim-contract":"inventory.waste.record.v1","x-munim-module":"inventory","type":"object","properties":{"waste_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"reason":{"type":"string","enum":["temperature","overprep","expired","damaged","other"]},"note":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"required":["waste_id","outlet_id","ingredient_id","batch_id","qty_milli","unit","reason","note"],"additionalProperties":false},"InventoryCountSubmitV1":{"title":"InventoryCountSubmitV1","x-munim-contract":"inventory.count.submit.v1","x-munim-module":"inventory","type":"object","properties":{"count_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"counted_qty_milli":{"type":"integer","minimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["line_id","ingredient_id","batch_id","counted_qty_milli","unit"],"additionalProperties":false}}},"required":["count_id","outlet_id","lines"],"additionalProperties":false},"InventoryBatchUpdateV1":{"title":"InventoryBatchUpdateV1","x-munim-contract":"inventory.batch.update.v1","x-munim-module":"inventory","type":"object","properties":{"batch_id":{"$ref":"#/components/schemas/Uuid7"},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"mrp_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["batch_id","expires_on","mrp_minor"],"additionalProperties":false},"InventoryTransferCreateV1":{"title":"InventoryTransferCreateV1","x-munim-contract":"inventory.transfer.create.v1","x-munim-module":"inventory","type":"object","properties":{"transfer_id":{"$ref":"#/components/schemas/Uuid7"},"from_outlet_id":{"$ref":"#/components/schemas/Uuid7"},"to_outlet_id":{"$ref":"#/components/schemas/Uuid7"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["ingredient_id","batch_id","qty_milli","unit"],"additionalProperties":false}}},"required":["transfer_id","from_outlet_id","to_outlet_id","lines"],"additionalProperties":false},"InventoryTransferReceiveV1":{"title":"InventoryTransferReceiveV1","x-munim-contract":"inventory.transfer.receive.v1","x-munim-module":"inventory","type":"object","properties":{"transfer_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["transfer_id"],"additionalProperties":false},"InventoryExpiredSaleOverrideV1":{"title":"InventoryExpiredSaleOverrideV1","x-munim-contract":"inventory.expired_sale.override.v1","x-munim-module":"inventory","type":"object","properties":{"override_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"cart_line_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason_code":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["override_id","outlet_id","cart_line_id","batch_id","qty_milli","reason_code","note"],"additionalProperties":false},"V1InventoryMovements":{"title":"V1InventoryMovements","x-munim-contract":"v1.inventory.movements","x-munim-module":"inventory","type":"object","properties":{"movements":{"type":"array","items":{"type":"object","properties":{"movement_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"kind":{"type":"string","enum":["receipt","sale_consumption","waste","transfer_out","transfer_in","count_adjust","supplier_return","sale_return","donation","surplus_out","surplus_in","cares_reversal"]},"ref_type":{"anyOf":[{"type":"string","pattern":"^core\\.[a-z_]+$"},{"type":"null"}]},"ref_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"unit_cost":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"unit_cost_per_1000":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]},"expired_sale_override_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["movement_id","outlet_id","ingredient_id","batch_id","qty_milli","unit","kind","ref_type","ref_id","unit_cost","unit_cost_per_1000","expired_sale_override_id","at"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["movements","next_cursor"],"additionalProperties":false},"V1InventoryBatches":{"title":"V1InventoryBatches","x-munim-contract":"v1.inventory.batches","x-munim-module":"inventory","type":"object","properties":{"batches":{"type":"array","items":{"type":"object","properties":{"batch_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_code":{"type":"string","minLength":1},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"received_at":{"$ref":"#/components/schemas/IsoDatetime"},"mrp":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}]}},"required":["batch_id","outlet_id","ingredient_id","batch_code","expires_on","received_at","mrp"],"additionalProperties":false}}},"required":["batches"],"additionalProperties":false},"V1InventoryReorderLevels":{"title":"V1InventoryReorderLevels","x-munim-contract":"v1.inventory.reorder-levels","x-munim-module":"inventory","type":"object","properties":{"reorder_levels":{"type":"array","items":{"type":"object","properties":{"reorder_level_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"min_qty_milli":{"type":"integer","minimum":0,"maximum":9007199254740991},"par_qty_milli":{"type":"integer","minimum":0,"maximum":9007199254740991},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["reorder_level_id","outlet_id","ingredient_id","min_qty_milli","par_qty_milli","updated_at"],"additionalProperties":false}}},"required":["reorder_levels"],"additionalProperties":false},"V1InvestigationCreateRequest":{"title":"V1InvestigationCreateRequest","x-munim-contract":"v1.investigation.create.request","x-munim-module":"investigations","type":"object","properties":{"investigation_id":{"$ref":"#/components/schemas/Uuid7"},"playbook_id":{"type":"string","enum":["margin_fall"]},"params":{"type":"object","properties":{"period_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"compare_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"}},"required":["period_month","compare_month"],"additionalProperties":false},"outlet_scope":{"anyOf":[{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","const":"*"}}]},"mode":{"type":"string","enum":["step","plan","auto"]}},"required":["investigation_id","playbook_id","params"],"additionalProperties":false},"V1InvestigationContinueRequest":{"title":"V1InvestigationContinueRequest","x-munim-contract":"v1.investigation.continue.request","x-munim-module":"investigations","type":"object","properties":{"step_no":{"type":"integer","minimum":1,"maximum":10}},"required":["step_no"],"additionalProperties":false},"V1InvestigationCancelRequest":{"title":"V1InvestigationCancelRequest","x-munim-contract":"v1.investigation.cancel.request","x-munim-module":"investigations","type":"object","properties":{},"additionalProperties":false},"V1InvestigationApprovePlanRequest":{"title":"V1InvestigationApprovePlanRequest","x-munim-contract":"v1.investigation.approve-plan.request","x-munim-module":"investigations","type":"object","properties":{"mode":{"type":"string","enum":["plan","auto"]}},"additionalProperties":false},"V1Investigation":{"title":"V1Investigation","x-munim-contract":"v1.investigation","x-munim-module":"investigations","type":"object","properties":{"investigation_id":{"$ref":"#/components/schemas/Uuid7"},"playbook_id":{"type":"string","enum":["margin_fall"]},"params":{"type":"object","properties":{"period_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"compare_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"}},"required":["period_month","compare_month"],"additionalProperties":false},"outlet_scope":{"anyOf":[{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","const":"*"}}]},"mode":{"type":"string","enum":["step","plan","auto"]},"status":{"type":"string","enum":["open","waiting","done","no_driver_found","cannot_verify","cancelled","exhausted","restricted"]},"stop_reason":{"anyOf":[{"type":"string","enum":["draft","abstain","budget","scope","waiting","ceiling"]},{"type":"null"}]},"created_by":{"$ref":"#/components/schemas/Uuid7"},"steps_done":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_steps":{"type":"integer","minimum":1,"maximum":10},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"},"checklist":{"type":"array","items":{"type":"object","properties":{"item_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"label_key":{"type":"string","minLength":1},"specialist":{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]},"signature":{"type":"object","properties":{"key":{"type":"string","const":"investigation.signature.specialist"},"specialist":{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]},"name_key":{"type":"string","minLength":1}},"required":["key","specialist","name_key"],"additionalProperties":false},"status":{"type":"string","enum":["pending","supported","refuted","cannot_verify","restricted"]},"frozen":{"type":"boolean"},"snapshot_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"refs":{"type":"array","items":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"}}},"required":["item_id","label_key","specialist","signature","status","frozen","snapshot_ids","refs"],"additionalProperties":false}},"plan":{"anyOf":[{"type":"object","properties":{"items":{"minItems":1,"type":"array","items":{"type":"object","properties":{"item_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"label_key":{"type":"string","minLength":1},"specialist":{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]}},"required":["item_id","label_key","specialist"],"additionalProperties":false}},"specialists":{"minItems":1,"type":"array","items":{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]}},"estimate":{"type":"object","properties":{"label":{"type":"string","const":"estimate (computed)"},"status":{"type":"string","enum":["computed","cannot_verify"]},"snapshot_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"estimate_ref":{"anyOf":[{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},{"type":"null"}]},"currency_ref":{"anyOf":[{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},{"type":"null"}]}},"required":["label","status","snapshot_id","estimate_ref","currency_ref"],"additionalProperties":false},"approved_by":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"approved_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]}},"required":["items","specialists","estimate","approved_by","approved_at"],"additionalProperties":false},{"type":"null"}]},"steps":{"type":"array","items":{"type":"object","properties":{"step_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"member_id":{"$ref":"#/components/schemas/Uuid7"},"triggered_by":{"type":"string","enum":["member","plan","auto"]},"started_at":{"$ref":"#/components/schemas/IsoDatetime"},"item_updates":{"type":"array","items":{"type":"object","properties":{"item_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"specialist":{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]},"from":{"type":"string","enum":["pending","supported","refuted","cannot_verify","restricted"]},"to":{"type":"string","enum":["pending","supported","refuted","cannot_verify","restricted"]},"frozen":{"type":"boolean"},"reopened":{"type":"boolean"},"snapshot_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"refs":{"type":"array","items":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"}}},"required":["item_id","specialist","from","to","frozen","reopened","snapshot_ids","refs"],"additionalProperties":false}},"tainted":{"type":"boolean"},"narration":{"anyOf":[{"type":"object","properties":{"answer_id":{"$ref":"#/components/schemas/Uuid7"},"envelope":{"$ref":"#/components/schemas/AnswerEnvelope"},"signatures":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","const":"investigation.signature.specialist"},"specialist":{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]},"name_key":{"type":"string","minLength":1}},"required":["key","specialist","name_key"],"additionalProperties":false}}},"required":["answer_id","envelope","signatures"],"additionalProperties":false},{"type":"null"}]}},"required":["step_no","member_id","triggered_by","started_at","item_updates","tainted","narration"],"additionalProperties":false}},"resolved_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/Ref"},"value":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}},"required":["ref","value"],"additionalProperties":false}}},"required":["investigation_id","playbook_id","params","outlet_scope","mode","status","stop_reason","created_by","steps_done","max_steps","created_at","updated_at","checklist","plan","steps","resolved_refs"],"additionalProperties":false},"V1InvestigationsResponse":{"title":"V1InvestigationsResponse","x-munim-contract":"v1.investigations.response","x-munim-module":"investigations","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"investigation_id":{"$ref":"#/components/schemas/Uuid7"},"playbook_id":{"type":"string","enum":["margin_fall"]},"params":{"type":"object","properties":{"period_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"compare_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"}},"required":["period_month","compare_month"],"additionalProperties":false},"outlet_scope":{"anyOf":[{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","const":"*"}}]},"mode":{"type":"string","enum":["step","plan","auto"]},"status":{"type":"string","enum":["open","waiting","done","no_driver_found","cannot_verify","cancelled","exhausted","restricted"]},"stop_reason":{"anyOf":[{"type":"string","enum":["draft","abstain","budget","scope","waiting","ceiling"]},{"type":"null"}]},"created_by":{"$ref":"#/components/schemas/Uuid7"},"steps_done":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_steps":{"type":"integer","minimum":1,"maximum":10},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["investigation_id","playbook_id","params","outlet_scope","mode","status","stop_reason","created_by","steps_done","max_steps","created_at","updated_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false},"KitchenTicketAdvanceV1":{"title":"KitchenTicketAdvanceV1","x-munim-contract":"kitchen.ticket.advance.v1","x-munim-module":"kitchen","type":"object","properties":{"ticket_id":{"$ref":"#/components/schemas/Uuid7"},"from_status":{"type":"string","enum":["queued","preparing","ready","done"]},"to_status":{"type":"string","enum":["queued","preparing","ready","done"]}},"required":["ticket_id","from_status","to_status"],"additionalProperties":false},"KitchenPrepTimeSetV1":{"title":"KitchenPrepTimeSetV1","x-munim-contract":"kitchen.prep_time.set.v1","x-munim-module":"kitchen","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"item_id":{"$ref":"#/components/schemas/Uuid7"},"station":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"prep_sec":{"type":"integer","minimum":1,"maximum":86400},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"}},"required":["outlet_id","item_id","station","prep_sec","valid_from"],"additionalProperties":false},"KitchenPrepListCreateV1":{"title":"KitchenPrepListCreateV1","x-munim-contract":"kitchen.prep_list.create.v1","x-munim-module":"kitchen","type":"object","properties":{"prep_list_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"lines":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["ingredient_id","qty_milli","unit"],"additionalProperties":false}}},"required":["prep_list_id","outlet_id","business_date","lines"],"additionalProperties":false},"V1KdsBoard":{"title":"V1KdsBoard","x-munim-contract":"v1.kds.board","x-munim-module":"kitchen","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"as_of":{"$ref":"#/components/schemas/IsoDatetime"},"stations":{"type":"array","items":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"}},"tickets":{"type":"array","items":{"type":"object","properties":{"ticket_id":{"$ref":"#/components/schemas/Uuid7"},"order_id":{"$ref":"#/components/schemas/Uuid7"},"ticket_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"station":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"status":{"type":"string","enum":["queued","preparing","ready","done"]},"kind":{"type":"string","enum":["dine_in","takeaway","pickup","delivery"]},"table_ref":{"type":["string","null"]},"channel_kind":{"type":"string"},"started_at":{"$ref":"#/components/schemas/IsoDatetime"},"accepted_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"ready_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"due_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"lane":{"type":"string","enum":["now","later"]},"surface_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"colour":{"type":"string","enum":["normal","amber","red"]},"lines":{"type":"array","items":{"type":"object","properties":{"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"item_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","minLength":1,"maxLength":200},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options":{"type":"array","items":{"type":"object","properties":{"option_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","minLength":1,"maxLength":200}},"required":["option_id","name_key"],"additionalProperties":false}},"note":{"type":["string","null"]}},"required":["line_no","item_id","name_key","qty_milli","options","note"],"additionalProperties":false}}},"required":["ticket_id","order_id","ticket_no","business_date","station","status","kind","table_ref","channel_kind","started_at","accepted_at","ready_at","due_at","promised_at","lane","surface_at","colour","lines"],"additionalProperties":false}}},"required":["outlet_id","as_of","stations","tickets"],"additionalProperties":false},"V1KitchenPrepList":{"title":"V1KitchenPrepList","x-munim-contract":"v1.kitchen.prep_list","x-munim-module":"kitchen","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"state":{"type":"string","enum":["approved","waiting","none","cannot_verify"]},"reason_code":{"anyOf":[{"$ref":"#/components/schemas/ReasonCode"},{"type":"null"}]},"prep_list":{"anyOf":[{"type":"object","properties":{"prep_list_id":{"$ref":"#/components/schemas/Uuid7"},"status":{"type":"string","enum":["open","done","cancelled"]},"draft_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"lines":{"type":"array","items":{"type":"object","properties":{"ingredient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"item_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["ingredient_id","item_id","qty_milli","unit"],"additionalProperties":false}}},"required":["prep_list_id","status","draft_id","lines"],"additionalProperties":false},{"type":"null"}]}},"required":["outlet_id","business_date","state","reason_code","prep_list"],"additionalProperties":false},"V1LineageRow":{"title":"V1LineageRow","x-munim-contract":"v1.lineage.row","x-munim-module":"lineage","type":"object","properties":{"row":{"type":"object","properties":{"table":{"type":"string","pattern":"^[a-z_]+\\.[a-z_][a-z0-9_]*$"},"id":{"$ref":"#/components/schemas/Uuid7"}},"required":["table","id"],"additionalProperties":false},"chains":{"minItems":1,"type":"array","items":{"type":"object","properties":{"audit":{"anyOf":[{"type":"object","properties":{"seq":{"type":"integer","minimum":1,"maximum":9007199254740991},"action":{"type":"string","minLength":1},"entity":{"type":"string","pattern":"^[a-z_]+\\.[a-z_][a-z0-9_]*$"},"entity_id":{"type":"string","minLength":1},"at":{"$ref":"#/components/schemas/IsoDatetime"},"actor":{"type":"object","properties":{"member_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","minLength":1},"role":{"type":"string","minLength":1}},"required":["member_id","kind","role"],"additionalProperties":false},"decision_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["seq","action","entity","entity_id","at","actor","decision_id"],"additionalProperties":false,"title":"LineageAuditHop"},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","properties":{"decision_id":{"$ref":"#/components/schemas/Uuid7"},"verdict":{"type":"string","enum":["approved","edited","rejected"]},"reason":{"type":["string","null"]},"reason_code":{"anyOf":[{"type":"string","enum":["wrong_numbers","not_needed","already_done","bad_timing","other"]},{"type":"null"}]},"decided_by":{"type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":["string","null"]}},"required":["member_id","name"],"additionalProperties":false},"decided_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["decision_id","verdict","reason","reason_code","decided_by","decided_at"],"additionalProperties":false,"title":"LineageDecisionHop"},{"type":"null"}]},"draft":{"anyOf":[{"type":"object","properties":{"draft_id":{"$ref":"#/components/schemas/Uuid7"},"command_type":{"type":"string","pattern":"^[a-z][a-z_]*(\\.[a-z][a-z_]*)+\\.v[1-9][0-9]*$"},"source":{"type":"string","pattern":"^(intel:[a-z_]+|import|member)$"},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"outcome":{"type":"object","properties":{"status":{"type":"string","enum":["proposed","executing","executed","failed","rejected","stale"]},"reason":{"type":["string","null"]},"reason_code":{"anyOf":[{"type":"string","enum":["wrong_numbers","not_needed","already_done","bad_timing","other"]},{"type":"null"}]},"changes":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},"now_ref":{"anyOf":[{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},{"type":"null"}]}},"required":["ref","now_ref"],"additionalProperties":false}},"sqlstate":{"anyOf":[{"type":"string","pattern":"^[0-9A-Z]{5}$"},{"type":"null"}]},"failure_reason":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]}},"required":["status","reason","reason_code","changes","sqlstate","failure_reason"],"additionalProperties":false,"title":"LineageDraftOutcome"}},"required":["draft_id","command_type","source","outlet_ids","created_at","outcome"],"additionalProperties":false,"title":"LineageDraftHop"},{"type":"null"}]},"finding":{"anyOf":[{"type":"object","properties":{"finding_id":{"$ref":"#/components/schemas/Uuid7"},"pack":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"status":{"type":"string","enum":["open","dismissed","resolved"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["finding_id","pack","type","status","created_at"],"additionalProperties":false,"title":"LineageFindingHop"},{"type":"null"}]},"run":{"anyOf":[{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/Uuid7"},"trigger":{"type":"string","minLength":1},"actor":{"type":"string","minLength":1},"issued_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["run_id","trigger","actor","issued_at"],"additionalProperties":false,"title":"LineageRunHop"},{"type":"null"}]},"snapshots":{"type":"array","items":{"type":"object","properties":{"snapshot_id":{"$ref":"#/components/schemas/Uuid7"},"template_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"template_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"refs":{"type":"array","items":{"$ref":"#/components/schemas/Ref"}}},"required":["snapshot_id","template_id","template_version","refs"],"additionalProperties":false,"title":"LineageSnapshotHop"}},"unverified_refs":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}}},"required":["audit","decision","draft","finding","run","snapshots","unverified_refs"],"additionalProperties":false}}},"required":["row","chains"],"additionalProperties":false},"V1LineageDraft":{"title":"V1LineageDraft","x-munim-contract":"v1.lineage.draft","x-munim-module":"lineage","type":"object","properties":{"chain":{"type":"object","properties":{"audit":{"anyOf":[{"type":"object","properties":{"seq":{"type":"integer","minimum":1,"maximum":9007199254740991},"action":{"type":"string","minLength":1},"entity":{"type":"string","pattern":"^[a-z_]+\\.[a-z_][a-z0-9_]*$"},"entity_id":{"type":"string","minLength":1},"at":{"$ref":"#/components/schemas/IsoDatetime"},"actor":{"type":"object","properties":{"member_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","minLength":1},"role":{"type":"string","minLength":1}},"required":["member_id","kind","role"],"additionalProperties":false},"decision_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["seq","action","entity","entity_id","at","actor","decision_id"],"additionalProperties":false,"title":"LineageAuditHop"},{"type":"null"}]},"decision":{"anyOf":[{"type":"object","properties":{"decision_id":{"$ref":"#/components/schemas/Uuid7"},"verdict":{"type":"string","enum":["approved","edited","rejected"]},"reason":{"type":["string","null"]},"reason_code":{"anyOf":[{"type":"string","enum":["wrong_numbers","not_needed","already_done","bad_timing","other"]},{"type":"null"}]},"decided_by":{"type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":["string","null"]}},"required":["member_id","name"],"additionalProperties":false},"decided_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["decision_id","verdict","reason","reason_code","decided_by","decided_at"],"additionalProperties":false,"title":"LineageDecisionHop"},{"type":"null"}]},"draft":{"anyOf":[{"type":"object","properties":{"draft_id":{"$ref":"#/components/schemas/Uuid7"},"command_type":{"type":"string","pattern":"^[a-z][a-z_]*(\\.[a-z][a-z_]*)+\\.v[1-9][0-9]*$"},"source":{"type":"string","pattern":"^(intel:[a-z_]+|import|member)$"},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"outcome":{"type":"object","properties":{"status":{"type":"string","enum":["proposed","executing","executed","failed","rejected","stale"]},"reason":{"type":["string","null"]},"reason_code":{"anyOf":[{"type":"string","enum":["wrong_numbers","not_needed","already_done","bad_timing","other"]},{"type":"null"}]},"changes":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},"now_ref":{"anyOf":[{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},{"type":"null"}]}},"required":["ref","now_ref"],"additionalProperties":false}},"sqlstate":{"anyOf":[{"type":"string","pattern":"^[0-9A-Z]{5}$"},{"type":"null"}]},"failure_reason":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},{"type":"null"}]}},"required":["status","reason","reason_code","changes","sqlstate","failure_reason"],"additionalProperties":false,"title":"LineageDraftOutcome"}},"required":["draft_id","command_type","source","outlet_ids","created_at","outcome"],"additionalProperties":false,"title":"LineageDraftHop"},{"type":"null"}]},"finding":{"anyOf":[{"type":"object","properties":{"finding_id":{"$ref":"#/components/schemas/Uuid7"},"pack":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"status":{"type":"string","enum":["open","dismissed","resolved"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["finding_id","pack","type","status","created_at"],"additionalProperties":false,"title":"LineageFindingHop"},{"type":"null"}]},"run":{"anyOf":[{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/Uuid7"},"trigger":{"type":"string","minLength":1},"actor":{"type":"string","minLength":1},"issued_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["run_id","trigger","actor","issued_at"],"additionalProperties":false,"title":"LineageRunHop"},{"type":"null"}]},"snapshots":{"type":"array","items":{"type":"object","properties":{"snapshot_id":{"$ref":"#/components/schemas/Uuid7"},"template_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"template_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"refs":{"type":"array","items":{"$ref":"#/components/schemas/Ref"}}},"required":["snapshot_id","template_id","template_version","refs"],"additionalProperties":false,"title":"LineageSnapshotHop"}},"unverified_refs":{"type":"array","items":{"type":"string","minLength":1,"maxLength":300}}},"required":["audit","decision","draft","finding","run","snapshots","unverified_refs"],"additionalProperties":false},"touched":{"type":"array","items":{"type":"object","properties":{"table":{"type":"string","pattern":"^[a-z_]+\\.[a-z_][a-z0-9_]*$"},"id":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"seq":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["table","id","action","seq"],"additionalProperties":false}}},"required":["chain","touched"],"additionalProperties":false},"V1Draftables":{"title":"V1Draftables","x-munim-contract":"v1.draftables","x-munim-module":"lineage","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"command_type":{"type":"string","pattern":"^[a-z][a-z_]*(\\.[a-z][a-z_]*)+\\.v[1-9][0-9]*$"},"proposal_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"command_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["command_type","proposal_schema","command_schema"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1OrdersList":{"title":"V1OrdersList","x-munim-contract":"v1.orders.list","x-munim-module":"orders","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"device_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","enum":["dine_in","takeaway","pickup","delivery"]},"table_ref":{"type":["string","null"]},"status":{"type":"string","enum":["placed","accepted","rejected","preparing","ready","completed","cancelled"]},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"ticket_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["order_id","outlet_id","channel_id","device_id","kind","table_ref","status","business_date","ticket_no","subtotal_minor","discount_minor","tax_minor","total_minor","currency","promised_at","created_at"],"additionalProperties":false,"title":"OrderListItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1ShiftsList":{"title":"V1ShiftsList","x-munim-contract":"v1.shifts.list","x-munim-module":"orders","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"shift_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"device_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"status":{"type":"string","enum":["open","closed"]},"opened_by":{"$ref":"#/components/schemas/Uuid7"},"opened_at":{"$ref":"#/components/schemas/IsoDatetime"},"float_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"closed_by":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"closed_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"counted_cash_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"expected_cash_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"variance_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["shift_id","outlet_id","device_id","status","opened_by","opened_at","float_minor","currency","closed_by","closed_at","counted_cash_minor","expected_cash_minor","variance_minor"],"additionalProperties":false,"title":"ShiftListItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1PickupWindowsList":{"title":"V1PickupWindowsList","x-munim-contract":"v1.pickup-windows.list","x-munim-module":"orders","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"pickup_window_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"starts_at":{"$ref":"#/components/schemas/IsoDatetime"},"ends_at":{"$ref":"#/components/schemas/IsoDatetime"},"capacity_orders":{"type":"integer","minimum":1,"maximum":9007199254740991},"booked":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pickup_window_id","outlet_id","starts_at","ends_at","capacity_orders","booked"],"additionalProperties":false,"title":"PickupWindowItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"OrdersPlaceV1":{"title":"OrdersPlaceV1","x-munim-contract":"orders.place.v1","x-munim-module":"orders","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"brand_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"device_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","enum":["dine_in","takeaway","pickup","delivery"]},"table_ref":{"anyOf":[{"type":"string","minLength":1,"maxLength":20},{"type":"null"}]},"pickup_window_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"external_ref":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/Uuid7"},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"option_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"barcode":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z-]{4,32}$"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["line_id","item_id","variant_id","option_ids","qty_milli","barcode","note"],"additionalProperties":false}},"coupon_codes":{"maxItems":5,"type":"array","items":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9-]{2,31}$"}},"loyalty_redeem_points":{"type":"integer","minimum":0,"maximum":9007199254740991},"preview_total_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"client_totals":{"anyOf":[{"type":"object","properties":{"subtotal":{"$ref":"#/components/schemas/Money"},"total":{"$ref":"#/components/schemas/Money"}},"required":["subtotal","total"],"additionalProperties":false},{"type":"null"}]}},"required":["order_id","outlet_id","channel_id","brand_id","device_id","kind","table_ref","pickup_window_id","promised_at","external_ref","lines","coupon_codes","loyalty_redeem_points","preview_total_minor","client_totals"],"additionalProperties":false},"OrdersPickupWindowGenerateV1":{"title":"OrdersPickupWindowGenerateV1","x-munim-contract":"orders.pickup_window.generate.v1","x-munim-module":"orders","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"from_local":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"to_local":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"slot_minutes":{"type":"integer","minimum":5,"maximum":120},"capacity_orders":{"type":"integer","minimum":1,"maximum":1000}},"required":["outlet_id","business_date","from_local","to_local","slot_minutes","capacity_orders"],"additionalProperties":false},"OrdersPreviewRequest":{"title":"OrdersPreviewRequest","x-munim-contract":"orders.preview.request","x-munim-module":"orders","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"brand_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","enum":["dine_in","takeaway","pickup","delivery"]},"pickup_window_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"coupon_codes":{"maxItems":5,"type":"array","items":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9-]{2,31}$"}},"loyalty_redeem_points":{"type":"integer","minimum":0,"maximum":9007199254740991},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"option_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"barcode":{"anyOf":[{"type":"string","pattern":"^[0-9A-Za-z-]{4,32}$"},{"type":"null"}]}},"required":["item_id","variant_id","option_ids","qty_milli","barcode"],"additionalProperties":false}}},"required":["outlet_id","channel_id","brand_id","kind","pickup_window_id","promised_at","coupon_codes","loyalty_redeem_points","lines"],"additionalProperties":false},"OrdersPreviewResponse":{"title":"OrdersPreviewResponse","x-munim-contract":"orders.preview.response","x-munim-module":"orders","type":"object","properties":{"label":{"type":"string","const":"preview"},"priced_at":{"$ref":"#/components/schemas/IsoDatetime"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"tax_rule":{"type":"object","properties":{"pack_code":{"type":"string","pattern":"^[A-Z]{2}$"},"pack_version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["pack_code","pack_version"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_class":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price_ref":{"type":"string","pattern":"^⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩$"},"option_refs":{"type":"array","items":{"type":"string","pattern":"^⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩$"}},"deal_refs":{"type":"array","items":{"type":"string","pattern":"^⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩$"}},"coupon_refs":{"type":"array","items":{"type":"string","pattern":"^⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩$"}}},"required":["line_no","item_id","variant_id","qty_milli","unit_price_minor","options_minor","line_discount_minor","tax_class","tax_minor","line_total_minor","price_ref","option_refs","deal_refs","coupon_refs"],"additionalProperties":false}},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refusals":{"type":"array","items":{"type":"object","properties":{"line_no":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"reason_code":{"$ref":"#/components/schemas/ReasonCode"}},"required":["line_no","reason_code"],"additionalProperties":false}}},"required":["label","priced_at","currency","tax_rule","lines","subtotal_minor","discount_minor","tax_minor","total_minor","refusals"],"additionalProperties":false},"OrdersTenderRecordV1":{"title":"OrdersTenderRecordV1","x-munim-contract":"orders.tender.record.v1","x-munim-module":"orders","type":"object","properties":{"tender_id":{"$ref":"#/components/schemas/Uuid7"},"order_id":{"$ref":"#/components/schemas/Uuid7"},"method":{"type":"string","enum":["cash","card","upi"]},"tendered_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"amount_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"ref":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]}},"required":["tender_id","order_id","method","tendered_minor","amount_minor","currency","ref"],"additionalProperties":false},"V1Tender":{"title":"V1Tender","x-munim-contract":"v1.tender","x-munim-module":"orders","type":"object","properties":{"tender_id":{"$ref":"#/components/schemas/Uuid7"},"order_id":{"$ref":"#/components/schemas/Uuid7"},"method":{"type":"string","enum":["cash","card","upi"]},"amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tendered_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"change_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rounding_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"ref":{"type":["string","null"]},"recorded_by":{"$ref":"#/components/schemas/Uuid7"},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["tender_id","order_id","method","amount_minor","tendered_minor","change_minor","rounding_minor","currency","ref","recorded_by","at"],"additionalProperties":false},"OrdersPromisePushBackV1":{"title":"OrdersPromisePushBackV1","x-munim-contract":"orders.promise.push_back.v1","x-munim-module":"orders","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"from_promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"to_promised_at":{"$ref":"#/components/schemas/IsoDatetime"},"reason_code":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"required":["order_id","from_promised_at","to_promised_at","reason_code"],"additionalProperties":false},"OrdersVoidRecordV1":{"title":"OrdersVoidRecordV1","x-munim-contract":"orders.void.record.v1","x-munim-module":"orders","type":"object","properties":{"void_id":{"$ref":"#/components/schemas/Uuid7"},"order_id":{"$ref":"#/components/schemas/Uuid7"},"order_line_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"reason_code":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["void_id","order_id","order_line_id","reason_code","note"],"additionalProperties":false},"OrdersRefundRecordV1":{"title":"OrdersRefundRecordV1","x-munim-contract":"orders.refund.record.v1","x-munim-module":"orders","type":"object","properties":{"refund_id":{"$ref":"#/components/schemas/Uuid7"},"order_id":{"$ref":"#/components/schemas/Uuid7"},"tender_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"method":{"type":"string","enum":["cash","card","upi"]},"amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"reason_code":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"note":{"type":"string","minLength":1,"maxLength":500}},"required":["refund_id","order_id","tender_id","method","amount_minor","currency","reason_code","note"],"additionalProperties":false},"OrdersShiftOpenV1":{"title":"OrdersShiftOpenV1","x-munim-contract":"orders.shift.open.v1","x-munim-module":"orders","type":"object","properties":{"shift_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"device_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"float_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["shift_id","outlet_id","device_id","float_minor","currency"],"additionalProperties":false},"OrdersShiftCloseV1":{"title":"OrdersShiftCloseV1","x-munim-contract":"orders.shift.close.v1","x-munim-module":"orders","type":"object","properties":{"shift_id":{"$ref":"#/components/schemas/Uuid7"},"counted_cash_minor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["shift_id","counted_cash_minor"],"additionalProperties":false},"OrdersOrderAcceptV1":{"title":"OrdersOrderAcceptV1","x-munim-contract":"orders.order.accept.v1","x-munim-module":"orders","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["order_id"],"additionalProperties":false},"OrdersOrderRejectV1":{"title":"OrdersOrderRejectV1","x-munim-contract":"orders.order.reject.v1","x-munim-module":"orders","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"reason_code":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"required":["order_id","reason_code"],"additionalProperties":false},"OrdersOrderAdvanceV1":{"title":"OrdersOrderAdvanceV1","x-munim-contract":"orders.order.advance.v1","x-munim-module":"orders","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"from_status":{"type":"string","enum":["placed","accepted","rejected","preparing","ready","completed","cancelled"]},"to_status":{"type":"string","enum":["preparing","ready","completed","cancelled"]},"reason_code":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},{"type":"null"}]}},"required":["order_id","from_status","to_status","reason_code"],"additionalProperties":false},"V1Order":{"title":"V1Order","x-munim-contract":"v1.order","x-munim-module":"orders","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"device_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","enum":["dine_in","takeaway","pickup","delivery"]},"table_ref":{"type":["string","null"]},"status":{"type":"string","enum":["placed","accepted","rejected","preparing","ready","completed","cancelled"]},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"ticket_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"invoice_fy":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"invoice_no":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"pickup_window_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"loyalty_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"paid_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"remaining_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"type":"array","items":{"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/Uuid7"},"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"option_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["line_id","line_no","item_id","variant_id","option_ids","qty_milli","unit_price_minor","line_discount_minor","tax_minor"],"additionalProperties":false}},"tenders":{"type":"array","items":{"$ref":"#/components/schemas/V1Tender"}},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["order_id","outlet_id","channel_id","device_id","kind","table_ref","status","business_date","ticket_no","invoice_fy","invoice_no","promised_at","pickup_window_id","subtotal_minor","discount_minor","tax_minor","total_minor","loyalty_minor","paid_minor","remaining_minor","currency","lines","tenders","created_at"],"additionalProperties":false},"V1OrderReceipt":{"title":"V1OrderReceipt","x-munim-contract":"v1.order.receipt","x-munim-module":"orders","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["tax_invoice","record"]},"title":{"type":"string"},"operator":{"type":["string","null"]},"seller":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"}},"required":["name","address"],"additionalProperties":false},"tax_ids":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["code","label","value"],"additionalProperties":false}},"number":{"type":"string","minLength":1},"date":{"type":"string","minLength":1},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"type":"array","items":{"type":"object","properties":{"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"item_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"net_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_class":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"components":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":20},"rate_bp":{"type":"integer","minimum":0,"maximum":9007199254740991},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","rate_bp","amount_minor"],"additionalProperties":false}}},"required":["line_no","item_id","name_key","qty_milli","unit_price_minor","amount_minor","discount_minor","net_minor","tax_minor","total_minor","tax_class","components"],"additionalProperties":false}},"net_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"components":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":20},"rate_bp":{"type":"integer","minimum":0,"maximum":9007199254740991},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","rate_bp","amount_minor"],"additionalProperties":false}}},"required":["order_id","kind","title","operator","seller","tax_ids","number","date","currency","lines","net_minor","tax_minor","total_minor","components"],"additionalProperties":false},"V1Shift":{"title":"V1Shift","x-munim-contract":"v1.shift","x-munim-module":"orders","type":"object","properties":{"shift_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"device_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"status":{"type":"string","enum":["open","closed"]},"opened_by":{"$ref":"#/components/schemas/Uuid7"},"opened_at":{"$ref":"#/components/schemas/IsoDatetime"},"float_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"closed_by":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"closed_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"counted_cash_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"expected_cash_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"variance_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["shift_id","outlet_id","device_id","status","opened_by","opened_at","float_minor","currency","closed_by","closed_at","counted_cash_minor","expected_cash_minor","variance_minor"],"additionalProperties":false},"V1PeopleRosters":{"title":"V1PeopleRosters","x-munim-contract":"v1.people.rosters","x-munim-module":"people","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"roster_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"week_start":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"status":{"type":"string","enum":["active","cancelled"]},"shifts":{"type":"array","items":{"type":"object","properties":{"roster_shift_id":{"$ref":"#/components/schemas/Uuid7"},"staff_id":{"$ref":"#/components/schemas/Uuid7"},"starts_at":{"$ref":"#/components/schemas/IsoDatetime"},"ends_at":{"$ref":"#/components/schemas/IsoDatetime"},"role_key":{"type":"string"},"status":{"type":"string","enum":["scheduled","cancelled"]}},"required":["roster_shift_id","staff_id","starts_at","ends_at","role_key","status"],"additionalProperties":false}}},"required":["roster_id","outlet_id","week_start","status","shifts"],"additionalProperties":false,"title":"RosterItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1PeopleAttendance":{"title":"V1PeopleAttendance","x-munim-contract":"v1.people.attendance","x-munim-module":"people","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"attendance_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"staff_id":{"$ref":"#/components/schemas/Uuid7"},"roster_shift_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"clock_in_at":{"$ref":"#/components/schemas/IsoDatetime"},"clock_out_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"source":{"type":"string","enum":["device","manual"]},"recorded_by":{"$ref":"#/components/schemas/Uuid7"}},"required":["attendance_id","outlet_id","staff_id","roster_shift_id","clock_in_at","clock_out_at","source","recorded_by"],"additionalProperties":false,"title":"AttendanceItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1PeopleAdvances":{"title":"V1PeopleAdvances","x-munim-contract":"v1.people.advances","x-munim-module":"people","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"advance_id":{"$ref":"#/components/schemas/Uuid7"},"staff_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["given","recovered"]},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"on_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"payroll_draft_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"note":{"type":["string","null"]},"recorded_by":{"$ref":"#/components/schemas/Uuid7"}},"required":["advance_id","staff_id","outlet_id","kind","amount_minor","currency","on_date","payroll_draft_id","note","recorded_by"],"additionalProperties":false,"title":"AdvanceItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"V1PeoplePayrollDrafts":{"title":"V1PeoplePayrollDrafts","x-munim-contract":"v1.people.payroll-drafts","x-munim-module":"people","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"payroll_draft_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"period_month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"status":{"type":"string","enum":["approved","paid_externally","void"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"type":"array","items":{"type":"object","properties":{"payroll_line_id":{"$ref":"#/components/schemas/Uuid7"},"staff_id":{"$ref":"#/components/schemas/Uuid7"},"base_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"overtime_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tips_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"advance_recovery_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"net_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["payroll_line_id","staff_id","base_minor","overtime_minor","tips_minor","advance_recovery_minor","net_minor","currency"],"additionalProperties":false}}},"required":["payroll_draft_id","outlet_id","period_month","status","currency","created_at","lines"],"additionalProperties":false,"title":"PayrollDraftItem"}},"next_cursor":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["items","next_cursor"],"additionalProperties":false},"PeopleStaffUpsertV1":{"title":"PeopleStaffUpsertV1","x-munim-contract":"people.staff.upsert.v1","x-munim-module":"people","type":"object","properties":{"staff_id":{"$ref":"#/components/schemas/Uuid7"},"member_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"role_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"pay_basis":{"type":"string","enum":["hourly","monthly"]},"wage_rate_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"monthly_salary_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"contract_min_per_month":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"ot_multiplier_bp":{"type":"integer","minimum":10000,"maximum":40000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"joined_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"left_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["staff_id","member_id","outlet_id","name","phone","role_key","pay_basis","wage_rate_minor","monthly_salary_minor","contract_min_per_month","ot_multiplier_bp","currency","joined_on","left_on","active"],"additionalProperties":false},"PeopleRosterCreateV1":{"title":"PeopleRosterCreateV1","x-munim-contract":"people.roster.create.v1","x-munim-module":"people","type":"object","properties":{"roster_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"week_start":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"shifts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"roster_shift_id":{"$ref":"#/components/schemas/Uuid7"},"staff_id":{"$ref":"#/components/schemas/Uuid7"},"starts_at":{"$ref":"#/components/schemas/IsoDatetime"},"ends_at":{"$ref":"#/components/schemas/IsoDatetime"},"role_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"}},"required":["roster_shift_id","staff_id","starts_at","ends_at","role_key"],"additionalProperties":false}}},"required":["roster_id","outlet_id","week_start","shifts"],"additionalProperties":false},"PeopleRosterUpdateV1":{"title":"PeopleRosterUpdateV1","x-munim-contract":"people.roster.update.v1","x-munim-module":"people","type":"object","properties":{"roster_id":{"$ref":"#/components/schemas/Uuid7"},"cancel_roster":{"type":"boolean"},"add_shifts":{"type":"array","items":{"type":"object","properties":{"roster_shift_id":{"$ref":"#/components/schemas/Uuid7"},"staff_id":{"$ref":"#/components/schemas/Uuid7"},"starts_at":{"$ref":"#/components/schemas/IsoDatetime"},"ends_at":{"$ref":"#/components/schemas/IsoDatetime"},"role_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"}},"required":["roster_shift_id","staff_id","starts_at","ends_at","role_key"],"additionalProperties":false}},"edit_shifts":{"type":"array","items":{"type":"object","properties":{"roster_shift_id":{"$ref":"#/components/schemas/Uuid7"},"starts_at":{"$ref":"#/components/schemas/IsoDatetime"},"ends_at":{"$ref":"#/components/schemas/IsoDatetime"},"role_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"}},"required":["roster_shift_id","starts_at","ends_at","role_key"],"additionalProperties":false}},"cancel_shift_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["roster_id","cancel_roster","add_shifts","edit_shifts","cancel_shift_ids"],"additionalProperties":false},"PeopleAttendanceRecordV1":{"title":"PeopleAttendanceRecordV1","x-munim-contract":"people.attendance.record.v1","x-munim-module":"people","type":"object","properties":{"attendance_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"staff_id":{"$ref":"#/components/schemas/Uuid7"},"action":{"type":"string","enum":["clock_in","clock_out"]},"at":{"$ref":"#/components/schemas/IsoDatetime"},"roster_shift_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"source":{"type":"string","enum":["device","manual"]}},"required":["attendance_id","outlet_id","staff_id","action","at","roster_shift_id","source"],"additionalProperties":false},"PeoplePayrollDraftCreateV1":{"title":"PeoplePayrollDraftCreateV1","x-munim-contract":"people.payroll_draft.create.v1","x-munim-module":"people","type":"object","properties":{"payroll_draft_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"period_month":{"type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])-01$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"staff_id":{"$ref":"#/components/schemas/Uuid7"},"base_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"overtime_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"advance_recovery_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"tips_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"net_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["staff_id","base_minor","overtime_minor","advance_recovery_minor","tips_minor","net_minor"],"additionalProperties":false}}},"required":["payroll_draft_id","outlet_id","period_month","currency","lines"],"additionalProperties":false},"PeoplePayrollDraftStatusV1":{"title":"PeoplePayrollDraftStatusV1","x-munim-contract":"people.payroll_draft.status.v1","x-munim-module":"people","type":"object","properties":{"payroll_draft_id":{"$ref":"#/components/schemas/Uuid7"},"status":{"type":"string","enum":["paid_externally","void"]},"reason_code":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},{"type":"null"}]}},"required":["payroll_draft_id","status","reason_code"],"additionalProperties":false},"PeopleAdvanceRecordV1":{"title":"PeopleAdvanceRecordV1","x-munim-contract":"people.advance.record.v1","x-munim-module":"people","type":"object","properties":{"advance_id":{"$ref":"#/components/schemas/Uuid7"},"staff_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["given","recovered"]},"amount_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"on_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["advance_id","staff_id","kind","amount_minor","currency","on_date","note"],"additionalProperties":false},"PeopleTipPoolRecordV1":{"title":"PeopleTipPoolRecordV1","x-munim-contract":"people.tip_pool.record.v1","x-munim-module":"people","type":"object","properties":{"tip_pool_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"period_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"period_to":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"basis":{"type":"string","enum":["equal","hours","manual"]},"total_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"manual_shares":{"type":"array","items":{"type":"object","properties":{"staff_id":{"$ref":"#/components/schemas/Uuid7"},"amount_minor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["staff_id","amount_minor"],"additionalProperties":false}},"staff_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["tip_pool_id","outlet_id","period_from","period_to","basis","total_minor","currency","manual_shares","staff_ids"],"additionalProperties":false},"PeopleTrainingRecordV1":{"title":"PeopleTrainingRecordV1","x-munim-contract":"people.training.record.v1","x-munim-module":"people","type":"object","properties":{"training_id":{"$ref":"#/components/schemas/Uuid7"},"staff_id":{"$ref":"#/components/schemas/Uuid7"},"course_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"completed_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"document_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["training_id","staff_id","course_key","completed_on","valid_to","document_id"],"additionalProperties":false},"PeopleCandidateUpsertV1":{"title":"PeopleCandidateUpsertV1","x-munim-contract":"people.candidate.upsert.v1","x-munim-module":"people","type":"object","properties":{"candidate_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]},"role_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"stage":{"type":"string","enum":["applied","interviewed","offered","hired","rejected","withdrawn"]},"source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"required":["candidate_id","outlet_id","name","phone","email","role_key","stage","source","note"],"additionalProperties":false},"V1PeopleCommandResult":{"title":"V1PeopleCommandResult","x-munim-contract":"v1.people.command-result","x-munim-module":"people","type":"object","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"type":{"type":"string","pattern":"^[a-z][a-z_]*(\\.[a-z][a-z_]*)+\\.v[1-9][0-9]*$"},"entity_id":{"$ref":"#/components/schemas/Uuid7"},"committed_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["command_id","type","entity_id","committed_at"],"additionalProperties":false},"V1PeopleOvertimeResponse":{"title":"V1PeopleOvertimeResponse","x-munim-contract":"v1.people.overtime.response","x-munim-module":"people","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"to":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"rows":{"type":"array","items":{"type":"object","properties":{"staff_id":{"$ref":"#/components/schemas/Uuid7"},"iso_week":{"type":"string","pattern":"^[0-9]{4}-W[0-9]{2}$"},"rostered_min":{"type":"integer","minimum":0,"maximum":9007199254740991},"attended_min":{"type":"integer","minimum":0,"maximum":9007199254740991},"extra_min":{"type":"integer","minimum":0,"maximum":9007199254740991},"extra_cost_minor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["staff_id","iso_week","rostered_min","attended_min","extra_min","extra_cost_minor"],"additionalProperties":false}}},"required":["outlet_id","from","to","rows"],"additionalProperties":false},"V1PeoplePayrollPreviewResponse":{"title":"V1PeoplePayrollPreviewResponse","x-munim-contract":"v1.people.payroll-preview.response","x-munim-module":"people","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"period_month":{"type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])-01$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"type":"array","items":{"type":"object","properties":{"staff_id":{"$ref":"#/components/schemas/Uuid7"},"base_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"overtime_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"advance_recovery_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"tips_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"net_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"outstanding_advance_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["staff_id","base_minor","overtime_minor","advance_recovery_minor","tips_minor","net_minor","outstanding_advance_minor"],"additionalProperties":false}}},"required":["outlet_id","period_month","currency","lines"],"additionalProperties":false},"V1PeopleStaffList":{"title":"V1PeopleStaffList","x-munim-contract":"v1.people.staff.list","x-munim-module":"people","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"staff":{"type":"array","items":{"type":"object","properties":{"staff_id":{"$ref":"#/components/schemas/Uuid7"},"member_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"role_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*$"},"pay_basis":{"type":"string","enum":["hourly","monthly"]},"wage_rate_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"monthly_salary_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"contract_min_per_month":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"ot_multiplier_bp":{"type":"integer","minimum":10000,"maximum":40000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"joined_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"left_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"active":{"type":"boolean"}},"required":["staff_id","member_id","outlet_id","name","role_key","pay_basis","wage_rate_minor","monthly_salary_minor","contract_min_per_month","ot_multiplier_bp","currency","joined_on","left_on","active"],"additionalProperties":false}}},"required":["outlet_id","staff"],"additionalProperties":false},"PlatformTenantSpend":{"title":"PlatformTenantSpend","x-munim-contract":"platform.tenant-spend","x-munim-module":"platform","type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/Uuid7"},"months":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"limit_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"spent_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["month","limit_minor","spent_minor","currency"],"additionalProperties":false}},"rows":{"type":"array","items":{"type":"object","properties":{"at":{"$ref":"#/components/schemas/IsoDatetime"},"amount_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["at","amount_minor","currency"],"additionalProperties":false}},"has_more":{"type":"boolean"}},"required":["tenant_id","months","rows","has_more"],"additionalProperties":false},"PlatformModelRoleRow":{"title":"PlatformModelRoleRow","x-munim-contract":"platform.model-role-row","x-munim-module":"platform","type":"object","properties":{"role":{"type":"string","enum":["router","reason","extract","narrate","vision","embed"]},"provider":{"type":"string","enum":["gemini","openai","openrouter","nvidia"]},"model_id":{"type":"string"},"location":{"type":["string","null"]},"input_price_per_mtok_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"output_price_per_mtok_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"price_currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"probed_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["role","provider","model_id","location","input_price_per_mtok_minor","output_price_per_mtok_minor","price_currency","probed_at","updated_at"],"additionalProperties":false},"PlatformTenant":{"title":"PlatformTenant","x-munim-contract":"platform.tenant","x-munim-module":"platform","type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string"},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"base_currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string"},"is_demo":{"type":"boolean"},"onboarded_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["tenant_id","name","country_code","base_currency","status","is_demo","onboarded_at","created_at"],"additionalProperties":false},"PlatformCountryPackRow":{"title":"PlatformCountryPackRow","x-munim-contract":"platform.country-pack-row","x-munim-module":"platform","type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z]{2}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"status":{"type":"string","enum":["draft","active","retired"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["code","version","effective_from","status","created_at"],"additionalProperties":false},"PlatformCountryPackDetail":{"title":"PlatformCountryPackDetail","x-munim-contract":"platform.country-pack-detail","x-munim-module":"platform","type":"object","properties":{"code":{"type":"string","pattern":"^[A-Z]{2}$"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"status":{"type":"string","enum":["draft","active","retired"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"doc":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","version","effective_from","status","created_at","doc"],"additionalProperties":false},"PlatformPlan":{"title":"PlatformPlan","x-munim-contract":"platform.plan","x-munim-module":"platform","type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"limits":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"type":"string","enum":["active","retired"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["code","name","limits","status","created_at"],"additionalProperties":false},"PlatformFeatureFlag":{"title":"PlatformFeatureFlag","x-munim-contract":"platform.feature-flag","x-munim-module":"platform","type":"object","properties":{"key":{"type":"string"},"value_type":{"type":"string","enum":["boolean","integer","text"]},"value":{"anyOf":[{"type":"boolean"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string"}]},"description":{"type":"string"},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["key","value_type","value","description","updated_at"],"additionalProperties":false},"PlatformBudget":{"title":"PlatformBudget","x-munim-contract":"platform.budget","x-munim-module":"platform","type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/Uuid7"},"month":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"limit_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"spent_minor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["tenant_id","month","limit_minor","currency","spent_minor"],"additionalProperties":false},"PlatformOperator":{"title":"PlatformOperator","x-munim-contract":"platform.operator","x-munim-module":"platform","type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"email":{"type":"string","maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"active":{"type":"boolean"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["id","email","active","created_at"],"additionalProperties":false},"PlatformConfigDraftPropose":{"title":"PlatformConfigDraftPropose","x-munim-contract":"platform.config-draft-propose","x-munim-module":"platform","type":"object","properties":{"draft_id":{"$ref":"#/components/schemas/Uuid7"},"target":{"type":"string","pattern":"^[a-z_]+(:[A-Za-z0-9_.-]+)?$"},"patch":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["target","patch"],"additionalProperties":false},"PlatformConfigDraftApprove":{"title":"PlatformConfigDraftApprove","x-munim-contract":"platform.config-draft-approve","x-munim-module":"platform","type":"object","properties":{"reason":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]}},"additionalProperties":false},"PlatformConfigDraftReject":{"title":"PlatformConfigDraftReject","x-munim-contract":"platform.config-draft-reject","x-munim-module":"platform","type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false},"PlatformConfigDraft":{"title":"PlatformConfigDraft","x-munim-contract":"platform.config-draft","x-munim-module":"platform","type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"target":{"type":"string"},"patch":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"before":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"status":{"type":"string","enum":["proposed","applied","rejected","stale"]},"proposed_by":{"type":"string"},"decided_by":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"decided_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"reason":{"type":["string","null"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["id","target","patch","before","status","proposed_by","decided_by","decided_at","reason","created_at"],"additionalProperties":false},"PlatformSnapshotMint":{"title":"PlatformSnapshotMint","x-munim-contract":"platform.snapshot-mint","x-munim-module":"platform","type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/Uuid7"},"template_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"params":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"required":["tenant_id","template_id","params"],"additionalProperties":false},"PlatformTenants":{"title":"PlatformTenants","x-munim-contract":"platform.tenants","x-munim-module":"platform","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlatformTenant"}}},"required":["items"],"additionalProperties":false},"PlatformCountryPacks":{"title":"PlatformCountryPacks","x-munim-contract":"platform.country-packs","x-munim-module":"platform","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlatformCountryPackRow"}}},"required":["items"],"additionalProperties":false},"PlatformPlans":{"title":"PlatformPlans","x-munim-contract":"platform.plans","x-munim-module":"platform","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlatformPlan"}}},"required":["items"],"additionalProperties":false},"PlatformFeatureFlags":{"title":"PlatformFeatureFlags","x-munim-contract":"platform.feature-flags","x-munim-module":"platform","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlatformFeatureFlag"}}},"required":["items"],"additionalProperties":false},"PlatformBudgets":{"title":"PlatformBudgets","x-munim-contract":"platform.budgets","x-munim-module":"platform","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlatformBudget"}}},"required":["items"],"additionalProperties":false},"PlatformModelRoles":{"title":"PlatformModelRoles","x-munim-contract":"platform.model-roles","x-munim-module":"platform","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlatformModelRoleRow"}}},"required":["items"],"additionalProperties":false},"PlatformOperators":{"title":"PlatformOperators","x-munim-contract":"platform.operators","x-munim-module":"platform","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlatformOperator"}}},"required":["items"],"additionalProperties":false},"PlatformConfigDrafts":{"title":"PlatformConfigDrafts","x-munim-contract":"platform.config-drafts","x-munim-module":"platform","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlatformConfigDraft"}}},"required":["items"],"additionalProperties":false},"PurchasingSupplierUpsertV1":{"title":"PurchasingSupplierUpsertV1","x-munim-contract":"purchasing.supplier.upsert.v1","x-munim-module":"purchasing","type":"object","properties":{"supplier_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["real","simulated"]},"a2a_card_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?:\\/\\/\\S+$"},{"type":"null"}]},"terms":{"type":"object","properties":{"payment_days":{"type":"integer","minimum":0,"maximum":9007199254740991},"notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["payment_days","notes"],"additionalProperties":false},"prices":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"price_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"observed_at":{"$ref":"#/components/schemas/IsoDatetime"},"source_ref":{"type":"string","minLength":1,"maxLength":200}},"required":["price_id","ingredient_id","unit","unit_price_minor","currency","observed_at","source_ref"],"additionalProperties":false}}},"required":["supplier_id","name","kind","a2a_card_url","terms","prices"],"additionalProperties":false},"PurchasingPoCreateV1":{"title":"PurchasingPoCreateV1","x-munim-contract":"purchasing.po.create.v1","x-munim-module":"purchasing","type":"object","properties":{"po_id":{"$ref":"#/components/schemas/Uuid7"},"supplier_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_ids":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"expected_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"negotiation_run_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["ingredient_id","qty_milli","unit","unit_price_minor"],"additionalProperties":false}}},"required":["po_id","supplier_id","outlet_ids","currency","expected_on","negotiation_run_id","lines"],"additionalProperties":false},"PurchasingGrnReceiveV1":{"title":"PurchasingGrnReceiveV1","x-munim-contract":"purchasing.grn.receive.v1","x-munim-module":"purchasing","type":"object","properties":{"grn_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"supplier_id":{"$ref":"#/components/schemas/Uuid7"},"po_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"received_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"grn_line_id":{"$ref":"#/components/schemas/Uuid7"},"po_line_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_cost_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"batch":{"anyOf":[{"type":"object","properties":{"batch_id":{"$ref":"#/components/schemas/Uuid7"},"batch_code":{"type":"string","minLength":1,"maxLength":200},"expires_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"mrp_minor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["batch_id","batch_code","expires_on","mrp_minor"],"additionalProperties":false},{"type":"null"}]}},"required":["grn_line_id","po_line_id","ingredient_id","qty_milli","unit","unit_cost_minor","currency","batch"],"additionalProperties":false}}},"required":["grn_id","outlet_id","supplier_id","po_id","received_at","note","lines"],"additionalProperties":false},"PurchasingInvoiceRecordV1":{"title":"PurchasingInvoiceRecordV1","x-munim-contract":"purchasing.invoice.record.v1","x-munim-module":"purchasing","type":"object","properties":{"supplier_invoice_id":{"$ref":"#/components/schemas/Uuid7"},"supplier_id":{"$ref":"#/components/schemas/Uuid7"},"invoice_no":{"type":"string","minLength":1,"maxLength":200},"invoice_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"po_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/Uuid7"},"po_line_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"ingredient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["line_id","po_line_id","ingredient_id","description","qty_milli","unit","unit_price_minor","tax_minor"],"additionalProperties":false}}},"required":["supplier_invoice_id","supplier_id","invoice_no","invoice_date","po_id","currency","lines"],"additionalProperties":false},"PurchasingInvoiceApproveV1":{"title":"PurchasingInvoiceApproveV1","x-munim-contract":"purchasing.invoice.approve.v1","x-munim-module":"purchasing","type":"object","properties":{"supplier_invoice_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["supplier_invoice_id"],"additionalProperties":false},"PurchasingInvoiceDisputeV1":{"title":"PurchasingInvoiceDisputeV1","x-munim-contract":"purchasing.invoice.dispute.v1","x-munim-module":"purchasing","type":"object","properties":{"dispute_id":{"$ref":"#/components/schemas/Uuid7"},"supplier_invoice_id":{"$ref":"#/components/schemas/Uuid7"},"basis":{"type":"string","enum":["overbilled","duplicate_invoice","other"]},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"invoice_line_id":{"$ref":"#/components/schemas/Uuid7"},"claimed_minor":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["invoice_line_id","claimed_minor"],"additionalProperties":false}}},"required":["dispute_id","supplier_invoice_id","basis","lines"],"additionalProperties":false},"PurchasingSupplierReturnCreateV1":{"title":"PurchasingSupplierReturnCreateV1","x-munim-contract":"purchasing.supplier_return.create.v1","x-munim-module":"purchasing","type":"object","properties":{"supplier_return_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"supplier_id":{"$ref":"#/components/schemas/Uuid7"},"goods_received_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"reason_code":{"type":"string","maxLength":40,"pattern":"^[a-z][a-z0-9_]*$"},"note":{"type":"string","minLength":1,"maxLength":200},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"}},"required":["batch_id","ingredient_id","qty_milli","unit"],"additionalProperties":false}}},"required":["supplier_return_id","outlet_id","supplier_id","goods_received_id","reason_code","note","lines"],"additionalProperties":false},"PurchasingRfqRequestV1":{"title":"PurchasingRfqRequestV1","x-munim-contract":"purchasing.rfq.request.v1","x-munim-module":"purchasing","type":"object","properties":{"rfq_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["rfq_id","ingredient_id","outlet_ids"],"additionalProperties":false},"V1Supplier":{"title":"V1Supplier","x-munim-contract":"v1.supplier","x-munim-module":"purchasing","type":"object","properties":{"supplier_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["real","simulated"]},"label":{"anyOf":[{"type":"string","const":"Simulated supplier"},{"type":"null"}]},"a2a_card_url":{"type":["string","null"]},"payment_days":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"notes":{"type":["string","null"]},"active":{"type":"boolean"},"prices":{"type":"array","items":{"type":"object","properties":{"price_id":{"$ref":"#/components/schemas/Uuid7"},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"observed_at":{"$ref":"#/components/schemas/IsoDatetime"},"source_ref":{"type":"string","minLength":1,"maxLength":200}},"required":["price_id","ingredient_id","unit","unit_price_minor","currency","observed_at","source_ref"],"additionalProperties":false}}},"required":["supplier_id","name","kind","label","a2a_card_url","payment_days","notes","active","prices"],"additionalProperties":false},"V1Suppliers":{"title":"V1Suppliers","x-munim-contract":"v1.suppliers","x-munim-module":"purchasing","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/V1Supplier"}}},"required":["items"],"additionalProperties":false},"V1PurchaseOrder":{"title":"V1PurchaseOrder","x-munim-contract":"v1.purchase-order","x-munim-module":"purchasing","type":"object","properties":{"po_id":{"$ref":"#/components/schemas/Uuid7"},"supplier":{"type":"object","properties":{"supplier_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["real","simulated"]},"label":{"anyOf":[{"type":"string","const":"Simulated supplier"},{"type":"null"}]}},"required":["supplier_id","name","kind","label"],"additionalProperties":false},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"status":{"type":"string","enum":["committed","received","cancelled"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expected_on":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"negotiation_run_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"type":"array","items":{"type":"object","properties":{"po_line_id":{"$ref":"#/components/schemas/Uuid7"},"line_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["po_line_id","line_no","ingredient_id","qty_milli","unit","unit_price_minor"],"additionalProperties":false}}},"required":["po_id","supplier","outlet_ids","status","currency","total_minor","expected_on","negotiation_run_id","created_at","lines"],"additionalProperties":false},"V1PurchaseOrders":{"title":"V1PurchaseOrders","x-munim-contract":"v1.purchase-orders","x-munim-module":"purchasing","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/V1PurchaseOrder"}}},"required":["items"],"additionalProperties":false},"V1GoodsReceived":{"title":"V1GoodsReceived","x-munim-contract":"v1.goods-received","x-munim-module":"purchasing","type":"object","properties":{"grn_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"supplier":{"type":"object","properties":{"supplier_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["real","simulated"]},"label":{"anyOf":[{"type":"string","const":"Simulated supplier"},{"type":"null"}]}},"required":["supplier_id","name","kind","label"],"additionalProperties":false},"po_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"received_at":{"$ref":"#/components/schemas/IsoDatetime"},"received_by":{"$ref":"#/components/schemas/Uuid7"},"note":{"type":["string","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"grn_line_id":{"$ref":"#/components/schemas/Uuid7"},"po_line_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_cost_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["grn_line_id","po_line_id","ingredient_id","batch_id","qty_milli","unit","unit_cost_minor","currency"],"additionalProperties":false}}},"required":["grn_id","outlet_id","supplier","po_id","received_at","received_by","note","lines"],"additionalProperties":false},"V1GoodsReceivedList":{"title":"V1GoodsReceivedList","x-munim-contract":"v1.goods-received.list","x-munim-module":"purchasing","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/V1GoodsReceived"}}},"required":["items"],"additionalProperties":false},"V1SupplierInvoice":{"title":"V1SupplierInvoice","x-munim-contract":"v1.supplier-invoice","x-munim-module":"purchasing","type":"object","properties":{"supplier_invoice_id":{"$ref":"#/components/schemas/Uuid7"},"supplier":{"type":"object","properties":{"supplier_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["real","simulated"]},"label":{"anyOf":[{"type":"string","const":"Simulated supplier"},{"type":"null"}]}},"required":["supplier_id","name","kind","label"],"additionalProperties":false},"invoice_no":{"type":"string"},"invoice_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"po_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["recorded","approved","disputed","void"]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"type":"array","items":{"type":"object","properties":{"line_id":{"$ref":"#/components/schemas/Uuid7"},"line_no":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"po_line_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"ingredient_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"description":{"type":["string","null"]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["line_id","line_no","po_line_id","ingredient_id","description","qty_milli","unit","unit_price_minor","tax_minor","line_total_minor"],"additionalProperties":false}},"payable":{"anyOf":[{"type":"object","properties":{"payable_id":{"$ref":"#/components/schemas/Uuid7"},"due_on":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["open","paid","disputed","void"]}},"required":["payable_id","due_on","amount_minor","status"],"additionalProperties":false},{"type":"null"}]}},"required":["supplier_invoice_id","supplier","invoice_no","invoice_date","po_id","subtotal_minor","tax_minor","total_minor","currency","status","created_at","lines","payable"],"additionalProperties":false},"V1SupplierInvoices":{"title":"V1SupplierInvoices","x-munim-contract":"v1.supplier-invoices","x-munim-module":"purchasing","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/V1SupplierInvoice"}}},"required":["items"],"additionalProperties":false},"V1SupplierReturn":{"title":"V1SupplierReturn","x-munim-contract":"v1.supplier-return","x-munim-module":"purchasing","type":"object","properties":{"supplier_return_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"supplier":{"type":"object","properties":{"supplier_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["real","simulated"]},"label":{"anyOf":[{"type":"string","const":"Simulated supplier"},{"type":"null"}]}},"required":["supplier_id","name","kind","label"],"additionalProperties":false},"goods_received_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"reason_code":{"type":"string"},"note":{"type":"string"},"returned_by":{"$ref":"#/components/schemas/Uuid7"},"returned_at":{"$ref":"#/components/schemas/IsoDatetime"},"lines":{"type":"array","items":{"type":"object","properties":{"ingredient_id":{"$ref":"#/components/schemas/Uuid7"},"batch_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit":{"type":"string","pattern":"^[a-z][a-z_]{0,15}$"},"unit_cost_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit_cost_per_1000_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["ingredient_id","batch_id","qty_milli","unit","unit_cost_minor","unit_cost_per_1000_minor","currency"],"additionalProperties":false}}},"required":["supplier_return_id","outlet_id","supplier","goods_received_id","reason_code","note","returned_by","returned_at","lines"],"additionalProperties":false},"V1SupplierReturns":{"title":"V1SupplierReturns","x-munim-contract":"v1.supplier-returns","x-munim-module":"purchasing","type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/V1SupplierReturn"}}},"required":["items"],"additionalProperties":false},"Uuid7":{"title":"Uuid7","x-munim-contract":"uuid7","x-munim-module":"shared","type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"IsoDatetime":{"title":"IsoDatetime","x-munim-contract":"iso-datetime","x-munim-module":"shared","type":"string","format":"date-time","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))T(?:(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]+)?(?:Z|([+-](?:[01][0-9]|2[0-3]):[0-5][0-9])))$"},"Money":{"title":"Money","x-munim-contract":"money","x-munim-module":"shared","type":"object","properties":{"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","currency"],"additionalProperties":false},"Ref":{"title":"Ref","x-munim-contract":"ref","x-munim-module":"shared","type":"string","pattern":"^(?:⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩|⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩)$"},"RefId":{"title":"RefId","x-munim-contract":"ref-id","x-munim-module":"shared","type":"string","pattern":"^(?:snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}))$"},"ReasonCode":{"title":"ReasonCode","x-munim-contract":"reason-code","x-munim-module":"shared","type":"string","enum":["number_grammar","unresolved_ref","cross_tenant_ref","quote_mismatch","missing_ref","settlements_missing","recipe_missing","stale_draft","authority_denied","cost_price_missing","ticket_times_missing","count_missing","expiry_missing","budget_exceeded","budget_missing","margin_below_floor","moq_exceeds_need","open_commitment_overlap","payment_terms_worse","consent_record_missing","bank_lines_missing","attendance_missing","payroll_out_of_scope","no_marketing_consent","not_a_certificate","log_coverage_missing","signal_source_missing","insufficient_history","forecast_stale","window_full","outlet_paused","item_sold_out","deal_rejudged","coupon_invalid","coupon_cap_reached","coupon_min_spend","change_window_closed","coupon_expired","coupon_out_of_scope","price_above_mrp","expired_batch","period_closed","model_blocked","preview_total_changed","buyer_identity_required","tax_id_missing","unknown_tax_class","unknown_channel","unit_mismatch","not_applicable","item_unavailable","reason_required","deal_changed","duplicate_invoice","guest_cannot_change","refund_first","order_tendered","cash_below_rounding","recently_rejected","mode_above_ceiling","cap_above_platform_budget","platform_budget_missing","assignee_missing","campaign_audience_unscoped","specialist_needed","cares_not_available","cares_not_enabled","cares_not_opted_in","cares_city_mismatch","recipient_ineligible","listing_expired","qty_exceeds_on_hand","qty_exceeds_listed","cooked_hold_exceeded","line_expired","no_eligible_recipient","no_rostered_staff","offer_not_enabled","offer_closed","claim_decided","claim_received","rate_limited","handover_must_be_complete","offer_handover_final","pickup_time_outside_window","theme_contrast","page_version_stale","demo_only","demo_protected"]},"AnswerEnvelope":{"title":"AnswerEnvelope","x-munim-contract":"answer-envelope","x-munim-module":"shared","type":"object","properties":{"answer_id":{"$ref":"#/components/schemas/Uuid7"},"segments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000},"refs":{"type":"array","items":{"$ref":"#/components/schemas/RefId"}}},"required":["text","refs"],"additionalProperties":false}},"abstained":{"type":"boolean"},"reason_code":{"anyOf":[{"$ref":"#/components/schemas/ReasonCode"},{"type":"null"}]},"follow_up":{"anyOf":[{"type":"string","enum":["dig_deeper"]},{"type":"null"}]}},"required":["answer_id","segments","abstained"],"additionalProperties":false},"FindingEnvelope":{"title":"FindingEnvelope","x-munim-contract":"finding-envelope","x-munim-module":"shared","type":"object","properties":{"finding_id":{"$ref":"#/components/schemas/Uuid7"},"segments":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":2000},"refs":{"type":"array","items":{"$ref":"#/components/schemas/RefId"}}},"required":["text","refs"],"additionalProperties":false}},"impact_ref":{"anyOf":[{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},{"type":"null"}]},"abstained":{"type":"boolean"},"reason_code":{"anyOf":[{"$ref":"#/components/schemas/ReasonCode"},{"type":"null"}]}},"required":["finding_id","segments","impact_ref","abstained"],"additionalProperties":false},"TraceEvent":{"title":"TraceEvent","x-munim-contract":"trace-event","x-munim-module":"shared","oneOf":[{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/Uuid7"},"id":{"$ref":"#/components/schemas/Uuid7"},"seq":{"type":"integer","minimum":1,"maximum":9007199254740991},"parent_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"actor":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,99}$"},"at":{"$ref":"#/components/schemas/IsoDatetime"},"kind":{"type":"string","enum":["route","skill_load","subagent_start","subagent_end","tool_call","tool_result","a2a_send","a2a_receive","finding","draft","abstain","error"]},"payload":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"additionalProperties":{"anyOf":[{"type":"string","pattern":"^(?![0-9][0-9.]{3,}$)[A-Za-z0-9][A-Za-z0-9_.:/-]{0,199}$"},{"type":"array","items":{"type":"string","pattern":"^(?![0-9][0-9.]{3,}$)[A-Za-z0-9][A-Za-z0-9_.:/-]{0,199}$"}}]}}},"required":["run_id","id","seq","parent_id","actor","at","kind","payload"],"additionalProperties":false},{"type":"object","properties":{"run_id":{"$ref":"#/components/schemas/Uuid7"},"id":{"$ref":"#/components/schemas/Uuid7"},"seq":{"type":"integer","minimum":1,"maximum":9007199254740991},"parent_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"actor":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,99}$"},"at":{"$ref":"#/components/schemas/IsoDatetime"},"kind":{"type":"string","const":"review"},"payload":{"$ref":"#/components/schemas/TraceReviewPayload"}},"required":["run_id","id","seq","parent_id","actor","at","kind","payload"],"additionalProperties":false}]},"TraceReviewPayload":{"title":"TraceReviewPayload","x-munim-contract":"trace-review-payload","x-munim-module":"shared","type":"object","properties":{"verdict":{"type":"string","enum":["pass","fail","cannot_verify"]},"reason_code":{"anyOf":[{"$ref":"#/components/schemas/ReasonCode"},{"type":"null"}]},"refs":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/RefId"}},"subject_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]}},"required":["verdict","reason_code","refs","subject_id"],"additionalProperties":false},"CommandResult":{"title":"CommandResult","x-munim-contract":"command-result","x-munim-module":"shared","type":"object","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"type":{"type":"string","pattern":"^[a-z][a-z_]*(\\.[a-z][a-z_]*)+\\.v[1-9][0-9]*$"},"entity_id":{"$ref":"#/components/schemas/Uuid7"},"committed_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["command_id","type","entity_id","committed_at"],"additionalProperties":false},"Snapshot":{"title":"Snapshot","x-munim-contract":"snapshot","x-munim-module":"shared","type":"object","properties":{"snapshot_id":{"$ref":"#/components/schemas/Uuid7"},"template_id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"params":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"type":"string"}}]}},"run_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"minted_by_member_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"minted_by_operator_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"outlet_scope":{"anyOf":[{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","const":"*"}}]},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z_][a-z0-9_]*$"},"type":{"type":"string","enum":["integer","numeric","text","date","timestamptz","boolean","uuid"]},"numeric_source":{"anyOf":[{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},{"type":"null"}]}},"required":["name","type"],"additionalProperties":false}},"rows":{"maxItems":500,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}}},"row_count":{"type":"integer","minimum":0,"maximum":500},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["snapshot_id","template_id","params","run_id","minted_by_member_id","minted_by_operator_id","outlet_scope","columns","rows","row_count","sha256","created_at"],"additionalProperties":false},"Error":{"title":"Error","x-munim-contract":"error","x-munim-module":"shared","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthenticated","forbidden","not_found","conflict","book_write_refused","country_locked","currency_mismatch","illegal_transition","override_refused","decision_refused","customer_erased","command_table_mismatch","period_closed","books_unbalanced","loyalty_refused","claim_quote_mismatch","out_of_pack_scope","sequence_gap","investigation_refused","idempotency_conflict","command_type_mismatch","invalid_payload","unregistered_command_type","cannot_verify","already_decided","stale_draft","chart_incomplete","execution_failed","unavailable","internal"]},"message":{"type":"string","minLength":1,"maxLength":500},"reason_code":{"anyOf":[{"$ref":"#/components/schemas/ReasonCode"},{"type":"null"}]}},"required":["code","message","reason_code"],"additionalProperties":false,"title":"ErrorBody"}},"required":["error"],"additionalProperties":false},"V1SpecialistsResponse":{"title":"V1SpecialistsResponse","x-munim-contract":"v1.specialists.response","x-munim-module":"specialists","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"kind":{"type":"string","enum":["specialist","manager","service"]},"name_key":{"type":"string","minLength":1},"desk_key":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"aliases":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z_]*$"}},"detectors":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"templates":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"draftables":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"workflow_draftables":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}}},"required":["id","kind","name_key","desk_key","aliases","detectors","templates","draftables","workflow_draftables"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"V1SpecialistDesk":{"title":"V1SpecialistDesk","x-munim-contract":"v1.specialist.desk","x-munim-module":"specialists","type":"object","properties":{"specialist":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"kind":{"type":"string","enum":["specialist","manager","service"]},"name_key":{"type":"string","minLength":1},"desk_key":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"aliases":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z_]*$"}},"detectors":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"templates":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"draftables":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}},"workflow_draftables":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"}}},"required":["id","kind","name_key","desk_key","aliases","detectors","templates","draftables","workflow_draftables"],"additionalProperties":false},"applicable":{"type":"boolean"},"findings":{"type":"array","items":{"$ref":"#/components/schemas/V1Finding"}},"drafts":{"type":"array","items":{"$ref":"#/components/schemas/V1Draft"}},"track_record":{"anyOf":[{"type":"object","properties":{"snapshot_id":{"$ref":"#/components/schemas/Uuid7"},"cells":{"anyOf":[{"type":"object","properties":{"proposed":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},"approved":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},"edited":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},"rejected":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},"stale":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"},"abstained":{"type":"string","pattern":"^⟨snap:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}·(?:0|[1-9][0-9]*)·[a-z_][a-z0-9_]*⟩$"}},"required":["proposed","approved","edited","rejected","stale","abstained"],"additionalProperties":false},{"type":"null"}]}},"required":["snapshot_id","cells"],"additionalProperties":false},{"type":"null"}]},"threads":{"type":"array","items":{"type":"object","properties":{"thread_id":{"$ref":"#/components/schemas/Uuid7"},"last_activity_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["thread_id","last_activity_at"],"additionalProperties":false}}},"required":["specialist","applicable","findings","drafts","track_record","threads"],"additionalProperties":false},"StorefrontGuestCreateV1":{"title":"StorefrontGuestCreateV1","x-munim-contract":"storefront.guest.create.v1","x-munim-module":"storefront","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},{"type":"null"}]},"consent":{"type":"object","properties":{"marketing":{"type":"boolean"},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["marketing","at"],"additionalProperties":false}},"required":["name","phone","email","consent"],"additionalProperties":false},"StorefrontOrderCancelV1":{"title":"StorefrontOrderCancelV1","x-munim-contract":"storefront.order.cancel.v1","x-munim-module":"storefront","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"reason":{"anyOf":[{"type":"string","enum":["changed_mind","ordered_by_mistake","wait_too_long","other"]},{"type":"null"}]}},"required":["order_id","reason"],"additionalProperties":false},"StorefrontOrderRescheduleV1":{"title":"StorefrontOrderRescheduleV1","x-munim-contract":"storefront.order.reschedule.v1","x-munim-module":"storefront","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"pickup_window_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"promised_at":{"$ref":"#/components/schemas/IsoDatetime"},"preview_total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["order_id","pickup_window_id","promised_at","preview_total_minor"],"additionalProperties":false},"StorefrontReschedulePreviewRequest":{"title":"StorefrontReschedulePreviewRequest","x-munim-contract":"storefront.reschedule.preview.request","x-munim-module":"storefront","type":"object","properties":{"pickup_window_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"promised_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["pickup_window_id","promised_at"],"additionalProperties":false},"StorefrontReschedulePreviewResponse":{"title":"StorefrontReschedulePreviewResponse","x-munim-contract":"storefront.reschedule.preview.response","x-munim-module":"storefront","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"promised_at":{"$ref":"#/components/schemas/IsoDatetime"},"current_total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"preview":{"$ref":"#/components/schemas/OrdersPreviewResponse"}},"required":["order_id","promised_at","current_total_minor","preview"],"additionalProperties":false},"StorefrontOutletsResponse":{"title":"StorefrontOutletsResponse","x-munim-contract":"storefront.outlets.response","x-munim-module":"storefront","type":"object","properties":{"outlets":{"type":"array","items":{"type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string"},"kind":{"type":"string","enum":["restaurant","cloud_kitchen","store"]},"tz":{"type":"string"},"address":{"type":"string"},"phone":{"type":["string","null"]},"tax_ids":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["code","label","value"],"additionalProperties":false}}},"required":["outlet_id","name","kind","tz","address","phone","tax_ids"],"additionalProperties":false}},"pay_at_counter_methods":{"anyOf":[{"type":"array","items":{"type":"string","enum":["cash","card","upi"]}},{"type":"null"}]}},"required":["outlets","pay_at_counter_methods"],"additionalProperties":false},"StorefrontMenuResponse":{"title":"StorefrontMenuResponse","x-munim-contract":"storefront.menu.response","x-munim-module":"storefront","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"channel_kind":{"anyOf":[{"type":"string","enum":["counter","table_qr","pickup","own_site"]},{"type":"string","pattern":"^aggregator:[a-z][a-z0-9_]*$"}]},"brands":{"type":"array","items":{"type":"object","properties":{"brand_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string"}},"required":["brand_id","name"],"additionalProperties":false}},"prices_include_tax":{"type":"boolean"},"accepting":{"$ref":"#/components/schemas/StorefrontAcceptingResponse"},"items":{"type":"array","items":{"type":"object","properties":{"item_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"display_name":{"type":["string","null"]},"description":{"type":["string","null"]},"diet":{"anyOf":[{"type":"string","enum":["veg","non_veg","egg","vegan"]},{"type":"null"}]},"category":{"type":"string"},"brand_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"kind":{"type":"string","enum":["dish","sku","combo"]},"available":{"type":"boolean"},"price_minor":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"variants":{"type":"array","items":{"type":"object","properties":{"variant_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"display_name":{"type":["string","null"]},"description":{"type":["string","null"]},"available":{"type":"boolean"},"price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["variant_id","name_key","display_name","description","available","price_minor"],"additionalProperties":false}},"option_groups":{"type":"array","items":{"type":"object","properties":{"option_group_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"display_name":{"type":["string","null"]},"description":{"type":["string","null"]},"min_select":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_select":{"type":"integer","minimum":1,"maximum":9007199254740991},"required":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"option_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"display_name":{"type":["string","null"]},"description":{"type":["string","null"]},"price_delta_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["option_id","name_key","display_name","description","price_delta_minor"],"additionalProperties":false}}},"required":["option_group_id","name_key","display_name","description","min_select","max_select","required","options"],"additionalProperties":false}}},"required":["item_id","name_key","display_name","description","diet","category","brand_id","kind","available","price_minor","currency","variants","option_groups"],"additionalProperties":false}},"deals":{"type":"array","items":{"type":"object","properties":{"deal_id":{"$ref":"#/components/schemas/Uuid7"},"name_key":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"kind":{"type":"string"},"windows":{"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":1,"maximum":7}},"from":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"to":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"}},"required":["days","from","to"],"additionalProperties":false}},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"valid_to":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]}},"required":["deal_id","name_key","kind","windows","valid_from","valid_to"],"additionalProperties":false}},"pay_at_counter":{"type":"boolean","const":true},"pay_at_counter_methods":{"anyOf":[{"type":"array","items":{"type":"string","enum":["cash","card","upi"]}},{"type":"null"}]}},"required":["outlet_id","channel_id","channel_kind","brands","prices_include_tax","accepting","items","deals","pay_at_counter","pay_at_counter_methods"],"additionalProperties":false},"StorefrontAcceptingResponse":{"title":"StorefrontAcceptingResponse","x-munim-contract":"storefront.accepting.response","x-munim-module":"storefront","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"state":{"type":"string","enum":["open","busy","paused","closed"]},"busy_extra_min":{"type":"integer","minimum":0,"maximum":9007199254740991},"default_prep_min":{"type":"integer","minimum":0,"maximum":9007199254740991},"next_open":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"tz":{"type":"string"},"as_of":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["outlet_id","state","busy_extra_min","default_prep_min","next_open","tz","as_of"],"additionalProperties":false},"StorefrontPickupWindowsResponse":{"title":"StorefrontPickupWindowsResponse","x-munim-contract":"storefront.pickup_windows.response","x-munim-module":"storefront","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"windows":{"type":"array","items":{"type":"object","properties":{"pickup_window_id":{"$ref":"#/components/schemas/Uuid7"},"starts_at":{"$ref":"#/components/schemas/IsoDatetime"},"ends_at":{"$ref":"#/components/schemas/IsoDatetime"},"capacity_orders":{"type":"integer","minimum":1,"maximum":9007199254740991},"booked":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pickup_window_id","starts_at","ends_at","capacity_orders","booked"],"additionalProperties":false}}},"required":["outlet_id","windows"],"additionalProperties":false},"StorefrontOrderPlaceRequest":{"title":"StorefrontOrderPlaceRequest","x-munim-contract":"storefront.order.place.request","x-munim-module":"storefront","type":"object","properties":{"order":{"type":"object","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"orders.place.v1"},"payload":{"$ref":"#/components/schemas/OrdersPlaceV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false},"guest":{"anyOf":[{"type":"object","properties":{"command_id":{"$ref":"#/components/schemas/Uuid7"},"idempotency_key":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"type":{"type":"string","const":"storefront.guest.create.v1"},"payload":{"$ref":"#/components/schemas/StorefrontGuestCreateV1"}},"required":["command_id","idempotency_key","type","payload"],"additionalProperties":false},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]}},"required":["name","phone"],"additionalProperties":false},{"type":"null"}]}},"required":["order","guest","contact"],"additionalProperties":false},"StorefrontOrderPlaced":{"title":"StorefrontOrderPlaced","x-munim-contract":"storefront.order.placed","x-munim-module":"storefront","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"status":{"type":"string","enum":["placed","accepted","rejected","preparing","ready","completed","cancelled"]},"ticket_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"prices_include_tax":{"type":["boolean","null"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"pay_at_counter":{"type":"boolean","const":true},"guest_access_token":{"type":["string","null"]}},"required":["order_id","status","ticket_no","total_minor","tax_minor","prices_include_tax","currency","promised_at","pay_at_counter","guest_access_token"],"additionalProperties":false},"StorefrontOrderView":{"title":"StorefrontOrderView","x-munim-contract":"storefront.order.view","x-munim-module":"storefront","type":"object","properties":{"order_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["dine_in","takeaway","pickup","delivery"]},"status":{"type":"string","enum":["placed","accepted","rejected","preparing","ready","completed","cancelled"]},"ticket_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"business_date":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"pickup_window_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"cancel_window_min":{"type":"integer","minimum":0,"maximum":9007199254740991},"reschedule_window_min":{"type":"integer","minimum":0,"maximum":9007199254740991},"pay_at_counter":{"type":"boolean","const":true},"prices_include_tax":{"type":["boolean","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_rate_bp":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"tax_component_rates":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"rate_bp":{"type":"integer","minimum":0,"maximum":10000}},"required":["code","rate_bp"],"additionalProperties":false}}},"required":["line_no","item_id","variant_id","qty_milli","unit_price_minor","line_discount_minor","tax_minor","tax_rate_bp","tax_component_rates"],"additionalProperties":false}},"events":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["status","promised_at"]},"from_status":{"type":["string","null"]},"to_status":{"type":["string","null"]},"from_promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"to_promised_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"reason":{"type":["string","null"]},"at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["kind","from_status","to_status","from_promised_at","to_promised_at","reason","at"],"additionalProperties":false}}},"required":["order_id","outlet_id","kind","status","ticket_no","business_date","promised_at","pickup_window_id","subtotal_minor","discount_minor","tax_minor","total_minor","currency","created_at","cancel_window_min","reschedule_window_min","pay_at_counter","prices_include_tax","lines","events"],"additionalProperties":false},"StorefrontPreviewResponse":{"title":"StorefrontPreviewResponse","x-munim-contract":"storefront.preview.response","x-munim-module":"storefront","type":"object","properties":{"label":{"type":"string","const":"preview"},"priced_at":{"$ref":"#/components/schemas/IsoDatetime"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"tax_rule":{"type":"object","properties":{"pack_code":{"type":"string","pattern":"^[A-Z]{2}$"},"pack_version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["pack_code","pack_version"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"qty_milli":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit_price_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"options_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_class":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$"},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"line_total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price_ref":{"type":"string","pattern":"^⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩$"},"option_refs":{"type":"array","items":{"type":"string","pattern":"^⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩$"}},"deal_refs":{"type":"array","items":{"type":"string","pattern":"^⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩$"}},"coupon_refs":{"type":"array","items":{"type":"string","pattern":"^⟨cite:(?:row:[a-z_][a-z0-9_]*\\.[a-z_][a-z0-9_]*:[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:doc|msg|claim|snapshot):[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:·(?:0|[1-9][0-9]*)-(?:0|[1-9][0-9]*))?⟩$"}},"tax_rate_bp":{"type":"integer","minimum":0,"maximum":10000},"tax_components":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"rate_bp":{"type":"integer","minimum":0,"maximum":10000},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","rate_bp","amount_minor"],"additionalProperties":false}}},"required":["line_no","item_id","variant_id","qty_milli","unit_price_minor","options_minor","line_discount_minor","tax_class","tax_minor","line_total_minor","price_ref","option_refs","deal_refs","coupon_refs","tax_rate_bp","tax_components"],"additionalProperties":false}},"subtotal_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"discount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tax_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refusals":{"type":"array","items":{"type":"object","properties":{"line_no":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"reason_code":{"$ref":"#/components/schemas/ReasonCode"},"params":{"type":"object","properties":{"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"deal_id":{"$ref":"#/components/schemas/Uuid7"},"code":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9-]{2,31}$"},"min_spend_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shortfall_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"old_total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"new_total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"additionalProperties":false}},"required":["line_no","reason_code"],"additionalProperties":false}},"tax_components":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"rate_bp":{"type":"integer","minimum":0,"maximum":10000},"amount_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","rate_bp","amount_minor"],"additionalProperties":false}},"prices_include_tax":{"type":"boolean"}},"required":["label","priced_at","currency","tax_rule","lines","subtotal_minor","discount_minor","tax_minor","total_minor","refusals","tax_components","prices_include_tax"],"additionalProperties":false},"StorefrontRefusalError":{"title":"StorefrontRefusalError","x-munim-contract":"storefront.refusal-error","x-munim-module":"storefront","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["bad_request","unauthenticated","forbidden","not_found","conflict","book_write_refused","country_locked","currency_mismatch","illegal_transition","override_refused","decision_refused","customer_erased","command_table_mismatch","period_closed","books_unbalanced","loyalty_refused","claim_quote_mismatch","out_of_pack_scope","sequence_gap","investigation_refused","idempotency_conflict","command_type_mismatch","invalid_payload","unregistered_command_type","cannot_verify","already_decided","stale_draft","chart_incomplete","execution_failed","unavailable","internal"]},"message":{"type":"string","minLength":1,"maxLength":500},"reason_code":{"anyOf":[{"$ref":"#/components/schemas/ReasonCode"},{"type":"null"}]}},"required":["code","message","reason_code"],"additionalProperties":false,"title":"ErrorBody"},"params":{"type":"object","properties":{"line_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"item_id":{"$ref":"#/components/schemas/Uuid7"},"variant_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"deal_id":{"$ref":"#/components/schemas/Uuid7"},"code":{"type":"string","pattern":"^[A-Z0-9][A-Z0-9-]{2,31}$"},"min_spend_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shortfall_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"old_total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"new_total_minor":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"additionalProperties":false}},"required":["error"],"additionalProperties":false},"StreamEvent":{"title":"StreamEvent","x-munim-contract":"stream.event","x-munim-module":"storefront","type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","data"],"additionalProperties":false},"StorefrontPageDoc":{"title":"StorefrontPageDoc","x-munim-contract":"storefront.page.doc","x-munim-module":"storefront","type":"object","properties":{"theme":{"type":"object","properties":{"primary":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"secondary":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"radius":{"type":"string","enum":["soft","round"]},"layout":{"type":"string","enum":["hero-banner","menu-grid","menu-list"]}},"required":["primary","secondary","accent","radius","layout"],"additionalProperties":false},"sections":{"minItems":4,"maxItems":4,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"hero"},"visible":{"type":"boolean"},"badge":{"type":"string","minLength":1,"maxLength":60},"tagline":{"type":"string","minLength":1,"maxLength":160}},"required":["kind","visible","badge","tagline"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"outlets"},"visible":{"type":"boolean","const":true},"title":{"type":"string","minLength":1,"maxLength":60}},"required":["kind","visible","title"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"ribbon"},"visible":{"type":"boolean"}},"required":["kind","visible"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"cards"},"visible":{"type":"boolean"},"cards":{"minItems":2,"maxItems":2,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":60},"body":{"type":"string","minLength":1,"maxLength":240}},"required":["title","body"],"additionalProperties":false}}},"required":["kind","visible","cards"],"additionalProperties":false}]}}},"required":["theme","sections"],"additionalProperties":false},"StorefrontPageSaveV1":{"title":"StorefrontPageSaveV1","x-munim-contract":"storefront.page.save.v1","x-munim-module":"storefront","type":"object","properties":{"page_id":{"$ref":"#/components/schemas/Uuid7"},"based_on_version":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"doc":{"$ref":"#/components/schemas/StorefrontPageDoc"}},"required":["page_id","based_on_version","doc"],"additionalProperties":false},"StorefrontPagePublishV1":{"title":"StorefrontPagePublishV1","x-munim-contract":"storefront.page.publish.v1","x-munim-module":"storefront","type":"object","properties":{"publish_id":{"$ref":"#/components/schemas/Uuid7"},"page_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["publish_id","page_id"],"additionalProperties":false},"V1StorefrontPages":{"title":"V1StorefrontPages","x-munim-contract":"v1.storefront-pages","x-munim-module":"storefront","type":"object","properties":{"versions":{"type":"array","items":{"type":"object","properties":{"page_id":{"$ref":"#/components/schemas/Uuid7"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"created_by":{"$ref":"#/components/schemas/Uuid7"},"created_by_name":{"type":"string"}},"required":["page_id","version","created_at","created_by","created_by_name"],"additionalProperties":false}},"live":{"anyOf":[{"type":"object","properties":{"page_id":{"$ref":"#/components/schemas/Uuid7"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"published_at":{"$ref":"#/components/schemas/IsoDatetime"},"published_by":{"$ref":"#/components/schemas/Uuid7"},"published_by_name":{"type":"string"}},"required":["page_id","version","published_at","published_by","published_by_name"],"additionalProperties":false},{"type":"null"}]}},"required":["versions","live"],"additionalProperties":false},"V1StorefrontPage":{"title":"V1StorefrontPage","x-munim-contract":"v1.storefront-page","x-munim-module":"storefront","type":"object","properties":{"page_id":{"$ref":"#/components/schemas/Uuid7"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"created_by":{"$ref":"#/components/schemas/Uuid7"},"created_by_name":{"type":"string"},"doc":{"$ref":"#/components/schemas/StorefrontPageDoc"}},"required":["page_id","version","created_at","created_by","created_by_name","doc"],"additionalProperties":false},"StorefrontPagePublic":{"title":"StorefrontPagePublic","x-munim-contract":"storefront.page.public","x-munim-module":"storefront","type":"object","properties":{"page":{"anyOf":[{"type":"object","properties":{"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"published_at":{"$ref":"#/components/schemas/IsoDatetime"},"doc":{"$ref":"#/components/schemas/StorefrontPageDoc"}},"required":["version","published_at","doc"],"additionalProperties":false},{"type":"null"}]}},"required":["page"],"additionalProperties":false},"V1OutletCalendar":{"title":"V1OutletCalendar","x-munim-contract":"v1.outlet.calendar","x-munim-module":"tenancy","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"tz":{"type":"string","pattern":"^[A-Za-z]+\\/[A-Za-z_]+$"},"rows":{"type":"array","items":{"type":"object","properties":{"calendar_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["weekly","override"]},"weekday":{"anyOf":[{"type":"integer","minimum":0,"maximum":6},{"type":"null"}]},"on_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},{"type":"null"}]},"opens_at":{"anyOf":[{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}]},"closes_at":{"anyOf":[{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},{"type":"null"}]},"closed":{"type":"boolean"}},"required":["calendar_id","kind","weekday","on_date","opens_at","closes_at","closed"],"additionalProperties":false}}},"required":["outlet_id","tz","rows"],"additionalProperties":false},"TenancyProvisionV1":{"title":"TenancyProvisionV1","x-munim-contract":"tenancy.provision.v1","x-munim-module":"tenancy","type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"is_demo":{"type":"boolean"},"owner":{"type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"}},"required":["member_id","name","email"],"additionalProperties":false}},"required":["tenant_id","name","country_code","is_demo","owner"],"additionalProperties":false},"TenancyOutletCreateV1":{"title":"TenancyOutletCreateV1","x-munim-contract":"tenancy.outlet.create.v1","x-munim-module":"tenancy","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["restaurant","cloud_kitchen","store"]},"tz":{"type":"string","pattern":"^[A-Za-z]+\\/[A-Za-z_]+$"},"address":{"type":"string","minLength":1,"maxLength":500},"tax_ids":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":64}},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]}},"required":["outlet_id","name","kind","tz","address","tax_ids"],"additionalProperties":false},"TenancyMemberInviteV1":{"title":"TenancyMemberInviteV1","x-munim-contract":"tenancy.member.invite.v1","x-munim-module":"tenancy","type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"role":{"type":"string","enum":["owner","manager","staff","advisor"]},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["member_id","name","email","role","outlet_ids"],"additionalProperties":false},"TenancyBrandCreateV1":{"title":"TenancyBrandCreateV1","x-munim-contract":"tenancy.brand.create.v1","x-munim-module":"tenancy","type":"object","properties":{"brand_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"outlet_ids":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["brand_id","name","outlet_ids"],"additionalProperties":false},"TenancyChannelCreateV1":{"title":"TenancyChannelCreateV1","x-munim-contract":"tenancy.channel.create.v1","x-munim-module":"tenancy","type":"object","properties":{"channel_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"anyOf":[{"type":"string","enum":["counter","table_qr","pickup","own_site"]},{"type":"string","pattern":"^aggregator:[a-z][a-z0-9_]*$"}]}},"required":["channel_id","name","kind"],"additionalProperties":false},"TenancyDeviceRegisterV1":{"title":"TenancyDeviceRegisterV1","x-munim-contract":"tenancy.device.register.v1","x-munim-module":"tenancy","type":"object","properties":{"device_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["pos","kds"]},"invoice_series":{"anyOf":[{"type":"string","pattern":"^[A-Z][A-Z0-9-]{0,15}$"},{"type":"null"}]}},"required":["device_id","outlet_id","kind","invoice_series"],"additionalProperties":false},"TenancyOnboardV1":{"title":"TenancyOnboardV1","x-munim-contract":"tenancy.onboard.v1","x-munim-module":"tenancy","type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/Uuid7"},"owner_member_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"owner_name":{"type":"string","minLength":1,"maxLength":200},"business_name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["restaurant","cloud_kitchen","shop"]},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"outlet":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":500},"tz":{"type":"string","pattern":"^[A-Za-z]+\\/[A-Za-z_]+$"},"hours":{"type":"object","properties":{"opens":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"closes":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"}},"required":["opens","closes"],"additionalProperties":false},"tax_ids":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":64}}},"required":["name","address","tax_ids"],"additionalProperties":false}},"required":["tenant_id","owner_member_id","outlet_id","owner_name","business_name","kind","country_code","outlet"],"additionalProperties":false},"TenancyOutletUpdateV1":{"title":"TenancyOutletUpdateV1","x-munim-contract":"tenancy.outlet.update.v1","x-munim-module":"tenancy","type":"object","properties":{"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"address":{"type":"string","minLength":1,"maxLength":500},"tax_ids":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":64}},"accepting_orders":{"type":"string","enum":["open","busy","paused"]},"busy_extra_min":{"type":"integer","minimum":0,"maximum":240},"default_prep_min":{"type":"integer","minimum":0,"maximum":240},"cancel_window_min":{"type":"integer","minimum":0,"maximum":1440},"reschedule_window_min":{"type":"integer","minimum":0,"maximum":1440},"pickup_slot_min":{"type":"integer","minimum":5,"maximum":120},"pickup_lead_min":{"type":"integer","minimum":0,"maximum":1440},"upi_vpa":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9._-]{2,256}@[A-Za-z][A-Za-z0-9]{1,63}$"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{6,14}$"},{"type":"null"}]},"business_day_cutoff":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"hours":{"type":"object","properties":{"opens":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"closes":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"}},"required":["opens","closes"],"additionalProperties":false}},"required":["outlet_id"],"additionalProperties":false},"TenancyTenantUpdateV1":{"title":"TenancyTenantUpdateV1","x-munim-contract":"tenancy.tenant.update.v1","x-munim-module":"tenancy","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"home_tz":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]+\\/[A-Za-z_]+$"},{"type":"null"}]},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"complete_onboarding":{"type":"boolean","const":true}},"additionalProperties":false},"TenancyPolicySetV1":{"title":"TenancyPolicySetV1","x-munim-contract":"tenancy.policy.set.v1","x-munim-module":"tenancy","type":"object","properties":{"outlet_id":{"anyOf":[{"$ref":"#/components/schemas/Uuid7"},{"type":"null"}]},"valid_from":{"type":"string","format":"date","pattern":"^(?:(?:[0-9][0-9][2468][048]|[0-9][0-9][13579][26]|[0-9][0-9]0[48]|[02468][048]00|[13579][26]00)-02-29|[0-9]{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12][0-9]|3[01])|(?:0[469]|11)-(?:0[1-9]|[12][0-9]|30)|(?:02)-(?:0[1-9]|1[0-9]|2[0-8])))$"},"labour_target_bp":{"type":"integer","minimum":0,"maximum":10000},"target_margin_bp":{"type":"integer","minimum":0,"maximum":10000},"margin_floor_bp":{"type":"integer","minimum":0,"maximum":10000},"min_payment_days":{"type":"integer","minimum":0,"maximum":365},"negotiation_target_bp":{"type":"integer","minimum":1,"maximum":20000},"negotiation_walkaway_bp":{"type":"integer","minimum":1,"maximum":20000}},"required":["outlet_id","valid_from"],"additionalProperties":false},"TenancyMemberBindV1":{"title":"TenancyMemberBindV1","x-munim-contract":"tenancy.member.bind.v1","x-munim-module":"tenancy","type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["member_id"],"additionalProperties":false},"TenancyMemberRoleSetV1":{"title":"TenancyMemberRoleSetV1","x-munim-contract":"tenancy.member.role.set.v1","x-munim-module":"tenancy","type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"},"role":{"type":"string","enum":["owner","manager","staff","advisor"]},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["member_id","role","outlet_ids"],"additionalProperties":false},"TenancyMemberDeactivateV1":{"title":"TenancyMemberDeactivateV1","x-munim-contract":"tenancy.member.deactivate.v1","x-munim-module":"tenancy","type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"}},"required":["member_id"],"additionalProperties":false},"DemoSessionStartV1":{"title":"DemoSessionStartV1","x-munim-contract":"demo.session.start.v1","x-munim-module":"tenancy","type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/Uuid7"},"member_id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["restaurant","cloud_kitchen","shop"]},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"idp_sub":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"judge_label":{"type":"string","minLength":1,"maxLength":200}},"required":["tenant_id","member_id","outlet_id","kind","country_code","idp_sub","judge_label"],"additionalProperties":false},"TenancyStorefrontKeyCreate":{"title":"TenancyStorefrontKeyCreate","x-munim-contract":"tenancy.storefront-key.create","x-munim-module":"tenancy","type":"object","properties":{"key_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"allowed_origins":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^https?:\\/\\/[^/\\s]+$"}}},"required":["key_id","channel_id","allowed_origins"],"additionalProperties":false},"TenancyStorefrontKeyCreated":{"title":"TenancyStorefrontKeyCreated","x-munim-contract":"tenancy.storefront-key.created","x-munim-module":"tenancy","type":"object","properties":{"key_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"key":{"type":"string","minLength":16,"maxLength":256},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["key_id","channel_id","key","created_at"],"additionalProperties":false},"TenancyStorefrontKeyList":{"title":"TenancyStorefrontKeyList","x-munim-contract":"tenancy.storefront-key.list","x-munim-module":"tenancy","type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"key_id":{"$ref":"#/components/schemas/Uuid7"},"channel_id":{"$ref":"#/components/schemas/Uuid7"},"allowed_origins":{"type":"array","items":{"type":"string"}},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"revoked_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]}},"required":["key_id","channel_id","allowed_origins","created_at","revoked_at"],"additionalProperties":false}}},"required":["keys"],"additionalProperties":false},"TenancyStorefrontKeyRevoked":{"title":"TenancyStorefrontKeyRevoked","x-munim-contract":"tenancy.storefront-key.revoked","x-munim-module":"tenancy","type":"object","properties":{"key_id":{"$ref":"#/components/schemas/Uuid7"},"revoked_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["key_id","revoked_at"],"additionalProperties":false},"TenancyMeTenants":{"title":"TenancyMeTenants","x-munim-contract":"tenancy.me.tenants","x-munim-module":"tenancy","type":"object","properties":{"tenants":{"type":"array","items":{"type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/Uuid7"},"tenant_name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["owner","manager","staff","advisor","judge"]}},"required":["tenant_id","tenant_name","role"],"additionalProperties":false}}},"required":["tenants"],"additionalProperties":false},"V1Tenant":{"title":"V1Tenant","x-munim-contract":"v1.tenant","x-munim-module":"tenancy","type":"object","properties":{"tenant_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"country_code":{"type":"string","pattern":"^[A-Z]{2}$"},"base_currency":{"type":"string","pattern":"^[A-Z]{3}$"},"fy_start_month":{"type":"integer","minimum":1,"maximum":12},"status":{"type":"string","enum":["active","retired"]},"is_demo":{"type":"boolean"},"onboarded_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]},"home_tz":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]+\\/[A-Za-z_]+$"},{"type":"null"}]}},"required":["tenant_id","name","country_code","base_currency","fy_start_month","status","is_demo","onboarded_at","home_tz"],"additionalProperties":false},"V1Outlets":{"title":"V1Outlets","x-munim-contract":"v1.outlets","x-munim-module":"tenancy","type":"object","properties":{"outlets":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["restaurant","cloud_kitchen","store"]},"tz":{"type":"string","pattern":"^[A-Za-z]+\\/[A-Za-z_]+$"},"address":{"type":"string"},"tax_ids":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Z][A-Z0-9_]*$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":64}},"accepting_orders":{"type":"string","enum":["open","busy","paused"]},"busy_extra_min":{"type":"integer","minimum":0,"maximum":240},"default_prep_min":{"type":"integer","minimum":0,"maximum":240},"cancel_window_min":{"type":"integer","minimum":0,"maximum":1440},"reschedule_window_min":{"type":"integer","minimum":0,"maximum":1440},"pickup_slot_min":{"type":"integer","minimum":5,"maximum":120},"pickup_lead_min":{"type":"integer","minimum":0,"maximum":1440},"upi_vpa":{"type":["string","null"]},"business_day_cutoff":{"type":"string","pattern":"^[0-9]{2}:[0-9]{2}(:[0-9]{2})?$"},"phone":{"type":["string","null"]}},"required":["id","name","kind","tz","address","tax_ids","accepting_orders","busy_extra_min","default_prep_min","cancel_window_min","reschedule_window_min","pickup_slot_min","pickup_lead_min","upi_vpa","business_day_cutoff","phone"],"additionalProperties":false}}},"required":["outlets"],"additionalProperties":false},"V1Me":{"title":"V1Me","x-munim-contract":"v1.me","x-munim-module":"tenancy","type":"object","properties":{"member_id":{"$ref":"#/components/schemas/Uuid7"},"tenant_id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","enum":["owner","manager","staff","advisor","judge"]},"outlet_ids":{"anyOf":[{"type":"string","const":"*"},{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}]}},"required":["member_id","tenant_id","name","role","outlet_ids"],"additionalProperties":false},"V1Brands":{"title":"V1Brands","x-munim-contract":"v1.brands","x-munim-module":"tenancy","type":"object","properties":{"brands":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},"active":{"type":"boolean"}},"required":["id","name","outlet_ids","active"],"additionalProperties":false}}},"required":["brands"],"additionalProperties":false},"V1Channels":{"title":"V1Channels","x-munim-contract":"v1.channels","x-munim-module":"tenancy","type":"object","properties":{"channels":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"anyOf":[{"type":"string","enum":["counter","table_qr","pickup","own_site"]},{"type":"string","pattern":"^aggregator:[a-z][a-z0-9_]*$"}]},"active":{"type":"boolean"}},"required":["id","name","kind","active"],"additionalProperties":false}}},"required":["channels"],"additionalProperties":false},"V1Devices":{"title":"V1Devices","x-munim-contract":"v1.devices","x-munim-module":"tenancy","type":"object","properties":{"devices":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"outlet_id":{"$ref":"#/components/schemas/Uuid7"},"kind":{"type":"string","enum":["pos","kds"]},"invoice_series":{"type":["string","null"]},"last_seen_at":{"anyOf":[{"$ref":"#/components/schemas/IsoDatetime"},{"type":"null"}]}},"required":["id","outlet_id","kind","invoice_series","last_seen_at"],"additionalProperties":false}}},"required":["devices"],"additionalProperties":false},"V1Members":{"title":"V1Members","x-munim-contract":"v1.members","x-munim-module":"tenancy","type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Uuid7"},"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":254,"pattern":"^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"},"active":{"type":"boolean"},"signed_in":{"type":"boolean"},"role":{"type":"string","enum":["owner","manager","staff","advisor","judge"]},"outlet_ids":{"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}}},"required":["id","name","email","active","signed_in","role","outlet_ids"],"additionalProperties":false}}},"required":["members"],"additionalProperties":false},"V1AskRequest":{"title":"V1AskRequest","x-munim-contract":"v1.ask.request","x-munim-module":"threads","type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":2000},"thread_id":{"$ref":"#/components/schemas/Uuid7"},"deep":{"type":"boolean"}},"required":["question"],"additionalProperties":false},"V1AskResponse":{"title":"V1AskResponse","x-munim-contract":"v1.ask.response","x-munim-module":"threads","type":"object","properties":{"thread_id":{"$ref":"#/components/schemas/Uuid7"},"turn":{"type":"object","properties":{"turn_id":{"$ref":"#/components/schemas/Uuid7"},"turn_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"addressed_to":{"anyOf":[{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]},{"type":"null"}]},"tainted":{"type":"boolean"}},"required":["turn_id","turn_no","addressed_to","tainted"],"additionalProperties":false},"answer":{"type":"object","properties":{"answer_id":{"$ref":"#/components/schemas/Uuid7"},"envelope":{"$ref":"#/components/schemas/AnswerEnvelope"},"resolved_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/Ref"},"value":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}},"required":["ref","value"],"additionalProperties":false}},"signature":{"type":"object","properties":{"key":{"type":"string","enum":["answer.signature.via_manager","answer.signature.manager"]},"specialist":{"anyOf":[{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]},{"type":"string","const":"manager"}]},"name_key":{"type":"string","minLength":1}},"required":["key","specialist","name_key"],"additionalProperties":false}},"required":["answer_id","envelope","resolved_refs","signature"],"additionalProperties":false}},"required":["thread_id","turn","answer"],"additionalProperties":false},"V1Thread":{"title":"V1Thread","x-munim-contract":"v1.thread","x-munim-module":"threads","type":"object","properties":{"thread_id":{"$ref":"#/components/schemas/Uuid7"},"specialist":{"anyOf":[{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]},{"type":"null"}]},"created_by":{"$ref":"#/components/schemas/Uuid7"},"outlet_scope":{"anyOf":[{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","const":"*"}}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"},"summary":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"turn_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"answer_id":{"$ref":"#/components/schemas/Uuid7"},"segment":{"type":"integer","minimum":0,"maximum":9007199254740991},"refs":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/RefId"}}},"required":["turn_no","answer_id","segment","refs"],"additionalProperties":false}},"turns":{"type":"array","items":{"type":"object","properties":{"turn_id":{"$ref":"#/components/schemas/Uuid7"},"turn_no":{"type":"integer","minimum":1,"maximum":9007199254740991},"member_id":{"$ref":"#/components/schemas/Uuid7"},"addressed_to":{"anyOf":[{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]},{"type":"null"}]},"tainted":{"type":"boolean"},"question":{"type":["string","null"]},"answer":{"anyOf":[{"type":"object","properties":{"answer_id":{"$ref":"#/components/schemas/Uuid7"},"envelope":{"$ref":"#/components/schemas/AnswerEnvelope"},"resolved_refs":{"type":"array","items":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/Ref"},"value":{"anyOf":[{"type":"string"},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"boolean"},{"type":"null"}]}},"required":["ref","value"],"additionalProperties":false}},"signature":{"type":"object","properties":{"key":{"type":"string","enum":["answer.signature.via_manager","answer.signature.manager"]},"specialist":{"anyOf":[{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]},{"type":"string","const":"manager"}]},"name_key":{"type":"string","minLength":1}},"required":["key","specialist","name_key"],"additionalProperties":false}},"required":["answer_id","envelope","resolved_refs","signature"],"additionalProperties":false},{"type":"null"}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["turn_id","turn_no","member_id","addressed_to","tainted","question","answer","created_at"],"additionalProperties":false}}},"required":["thread_id","specialist","created_by","outlet_scope","created_at","updated_at","summary","turns"],"additionalProperties":false},"V1ThreadsResponse":{"title":"V1ThreadsResponse","x-munim-contract":"v1.threads.response","x-munim-module":"threads","type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"thread_id":{"$ref":"#/components/schemas/Uuid7"},"specialist":{"anyOf":[{"type":"string","enum":["catalogue","kitchen","inventory_purchasing","finance","people","customers","compliance","market"]},{"type":"null"}]},"created_by":{"$ref":"#/components/schemas/Uuid7"},"outlet_scope":{"anyOf":[{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/Uuid7"}},{"minItems":1,"maxItems":1,"type":"array","items":{"type":"string","const":"*"}}]},"created_at":{"$ref":"#/components/schemas/IsoDatetime"},"updated_at":{"$ref":"#/components/schemas/IsoDatetime"}},"required":["thread_id","specialist","created_by","outlet_scope","created_at","updated_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"additionalProperties":false}},"securitySchemes":{"memberToken":{"type":"http","scheme":"bearer","description":"IdP ID token of a signed-in person (a tenant member; alone on identity routes)"},"operatorToken":{"type":"http","scheme":"bearer","description":"IdP ID token of a platform operator"},"tenantHeader":{"type":"apiKey","in":"header","name":"X-Munim-Tenant","description":"The tenant a member acts in (with memberToken)"},"storefrontKey":{"type":"apiKey","in":"header","name":"X-Munim-Storefront-Key","description":"Public storefront key; resolves the tenant and channel"},"customerToken":{"type":"http","scheme":"bearer","description":"IdP ID token of a customer (optional on storefront routes)"},"guestToken":{"type":"apiKey","in":"header","name":"X-Munim-Guest-Token","description":"Guest access token of one order (returned once when the guest places it); with storefrontKey, on routes that mark guest access"}}}}