c6df2ab8f5
contracts/openapi.yaml (OpenAPI 3.1, E-1..E-33, error shape and the exhaustive error code enum, device bearer scheme), contracts/schema/ server-v1.sql (SPEC §14.1 verbatim), seven test-vector files per §14.5.5, 80 examples (every JSON body of §14.3.4, every error code, sync pull/push, every FCM push type), and tools/contracts-check.py (stdlib-only reference of §9.1, §9.3, §9.4 and §14.5.4 plus shape checks; the M1 gate). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
125 lines
3.9 KiB
JSON
125 lines
3.9 KiB
JSON
{
|
|
"mutations": [
|
|
{
|
|
"mutation_id": "01929c5e-6c1f-7d3a-9b2e-4f5a6b7c8da3",
|
|
"entity_type": "expense",
|
|
"entity": {
|
|
"id": "01929c5e-1111-7aaa-8bbb-000000000002",
|
|
"account_id": "0192a003-0000-7000-8000-000000000001",
|
|
"category_id": "01920000-0000-7000-8000-000000000002",
|
|
"amount_ore": 1001,
|
|
"description": "Fika på stan",
|
|
"notes": "Kanelbullar\noch kaffe",
|
|
"expense_date": "2026-10-15",
|
|
"payer_user_id": "0192a000-0000-7000-8000-000000000002",
|
|
"split_mode": "exact",
|
|
"splits": [
|
|
{
|
|
"user_id": "0192a000-0000-7000-8000-000000000001",
|
|
"share_ore": 701,
|
|
"share_bp": null
|
|
},
|
|
{
|
|
"user_id": "0192a000-0000-7000-8000-000000000002",
|
|
"share_ore": 300,
|
|
"share_bp": null
|
|
}
|
|
],
|
|
"created_at": "2026-10-15T10:00:00.000Z",
|
|
"updated_at": "2026-10-17T09:00:00.000Z",
|
|
"deleted_at": null
|
|
}
|
|
},
|
|
{
|
|
"mutation_id": "01929c5e-6c1f-7d3a-9b2e-4f5a6b7c8da4",
|
|
"entity_type": "expense",
|
|
"entity": {
|
|
"id": "01929c5e-1111-7aaa-8bbb-000000000004",
|
|
"account_id": "0192a003-0000-7000-8000-000000000001",
|
|
"category_id": "01920000-0000-7000-8000-000000000001",
|
|
"amount_ore": 41200,
|
|
"description": "ICA Maxi",
|
|
"notes": "",
|
|
"expense_date": "2026-10-16",
|
|
"payer_user_id": "0192a000-0000-7000-8000-000000000001",
|
|
"split_mode": "default",
|
|
"splits": [
|
|
{
|
|
"user_id": "0192a000-0000-7000-8000-000000000001",
|
|
"share_ore": 20000,
|
|
"share_bp": 5000
|
|
},
|
|
{
|
|
"user_id": "0192a000-0000-7000-8000-000000000002",
|
|
"share_ore": 21200,
|
|
"share_bp": 5000
|
|
}
|
|
],
|
|
"created_at": "2026-10-16T17:02:11.123Z",
|
|
"updated_at": "2026-10-16T17:02:11.123Z",
|
|
"deleted_at": null
|
|
}
|
|
},
|
|
{
|
|
"mutation_id": "01929c5e-6c1f-7d3a-9b2e-4f5a6b7c8da1",
|
|
"entity_type": "expense",
|
|
"entity": {
|
|
"id": "01929c5e-1111-7aaa-8bbb-000000000005",
|
|
"account_id": "0192a003-0000-7000-8000-000000000002",
|
|
"category_id": "01920000-0000-7000-8000-000000000001",
|
|
"amount_ore": 41200,
|
|
"description": "ICA Maxi",
|
|
"notes": "",
|
|
"expense_date": "2026-10-16",
|
|
"payer_user_id": "0192a000-0000-7000-8000-000000000001",
|
|
"split_mode": "default",
|
|
"splits": [
|
|
{
|
|
"user_id": "0192a000-0000-7000-8000-000000000001",
|
|
"share_ore": 20600,
|
|
"share_bp": 5000
|
|
},
|
|
{
|
|
"user_id": "0192a000-0000-7000-8000-000000000002",
|
|
"share_ore": 20600,
|
|
"share_bp": 5000
|
|
}
|
|
],
|
|
"created_at": "2026-10-16T17:02:11.123Z",
|
|
"updated_at": "2026-10-16T17:02:11.123Z",
|
|
"deleted_at": null
|
|
}
|
|
},
|
|
{
|
|
"mutation_id": "01929c5e-6c1f-7d3a-9b2e-4f5a6b7c8da2",
|
|
"entity_type": "expense",
|
|
"entity": {
|
|
"id": "01929c5e-1111-7aaa-8bbb-000000000006",
|
|
"account_id": "0192a003-0000-7000-8000-000000000001",
|
|
"category_id": "01920000-0000-7000-8000-000000000001",
|
|
"amount_ore": 41200,
|
|
"description": "ICA Maxi",
|
|
"notes": "",
|
|
"expense_date": "2026-10-16",
|
|
"payer_user_id": "0192a000-0000-7000-8000-000000000001",
|
|
"split_mode": "default",
|
|
"splits": [
|
|
{
|
|
"user_id": "0192a000-0000-7000-8000-000000000001",
|
|
"share_ore": 20600,
|
|
"share_bp": 5000
|
|
},
|
|
{
|
|
"user_id": "0192a000-0000-7000-8000-000000000002",
|
|
"share_ore": 20600,
|
|
"share_bp": 5000
|
|
}
|
|
],
|
|
"created_at": "2026-10-18T12:00:00.000Z",
|
|
"updated_at": "2026-10-18T12:00:00.000Z",
|
|
"deleted_at": null
|
|
}
|
|
}
|
|
]
|
|
}
|