@divythebill/schema 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@divythebill/schema",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Internal shared validation schemas for Divy applications",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,13 +18,16 @@
18
18
  "types": "./dist/index.d.cts",
19
19
  "default": "./dist/index.cjs"
20
20
  }
21
- }
21
+ },
22
+ "./fixtures/*": "./tests/fixtures/*",
23
+ "./package.json": "./package.json"
22
24
  },
23
25
  "main": "./dist/index.cjs",
24
26
  "module": "./dist/index.mjs",
25
27
  "types": "./dist/index.d.cts",
26
28
  "files": [
27
- "dist"
29
+ "dist",
30
+ "tests/fixtures"
28
31
  ],
29
32
  "sideEffects": false,
30
33
  "engines": {
@@ -0,0 +1,95 @@
1
+ {
2
+ "receipts": {
3
+ "completed": {
4
+ "receipt_id": "receipt_user123_a1b2c3d4",
5
+ "owner_id": "user123",
6
+ "shared_with": [
7
+ { "type": "member", "uid": "user123" },
8
+ {
9
+ "type": "guest",
10
+ "uid": "6f9619ff-8b86-4d01-b42d-00cf4fc964ff",
11
+ "first_name": "Sam",
12
+ "last_name": "",
13
+ "emoji": "🦖",
14
+ "venmo": "sam-example",
15
+ "cashapp": "",
16
+ "phone_number": "",
17
+ "color": "#aabbcc"
18
+ },
19
+ {
20
+ "type": "departed",
21
+ "uid": "user456",
22
+ "first_name": "Alex",
23
+ "last_name": "Smith",
24
+ "color": "#112233"
25
+ }
26
+ ],
27
+ "shared_with_uids": ["user123"],
28
+ "source_image": "gs://bucket/user123/receipts/receipt_user123_a1b2c3d4.jpg",
29
+ "receipt_status": "completed",
30
+ "merchant_name": "Dunkin",
31
+ "merchant_address": "123 Main St, Austin, TX",
32
+ "merchant_full_address": "123 Main St, Austin, TX 78701, USA",
33
+ "merchant_city": "Austin",
34
+ "merchant_state": "TX",
35
+ "merchant_google_maps_uri": "https://maps.google.com/?cid=123456789",
36
+ "original_upload_time": "2026-07-15T18:04:11.000Z",
37
+ "transaction_date_time": "2026-07-15T12:31:00.000Z",
38
+ "server_name": "Casey",
39
+ "guest_count": 2,
40
+ "currency_code": "USD",
41
+ "subtotal": 10.53,
42
+ "tax": 0.87,
43
+ "tip": 2.0,
44
+ "additional_tip": 1.0,
45
+ "service_fee": 0.35,
46
+ "discount": -1.6,
47
+ "grand_total": 13.15,
48
+ "card_issuer": "VISA",
49
+ "card_id": "1234"
50
+ },
51
+ "bare-draft": {
52
+ "receipt_id": "receipt_user123_e5f6a7b8",
53
+ "owner_id": "user123",
54
+ "shared_with": [{ "type": "member", "uid": "user123" }],
55
+ "shared_with_uids": ["user123"],
56
+ "receipt_status": "draft",
57
+ "merchant_name": ""
58
+ }
59
+ },
60
+ "itemLists": {
61
+ "extracted-order": [
62
+ {
63
+ "item_id": "b3e4a5d6-7c8f-4a01-9b2c-1d3e5f7a9b0c",
64
+ "item_name": "Md Ice Orig Cof",
65
+ "item_note": "",
66
+ "item_quantity": 1,
67
+ "item_unit_price": 3.79,
68
+ "item_total_price": 3.79,
69
+ "item_modifiers": [{ "modifier_description": "Oatmilk" }],
70
+ "item_assigned_uids": ["user123"],
71
+ "item_order": 0
72
+ },
73
+ {
74
+ "item_id": "c4f5b6e7-8d9a-4b12-8c3d-2e4f6a8b0c1d",
75
+ "item_name": "Md Ice Orig Cof - $6 Meal Deal",
76
+ "item_note": "",
77
+ "item_quantity": 1,
78
+ "item_unit_price": -1.6,
79
+ "item_total_price": -1.6,
80
+ "item_modifiers": [],
81
+ "item_assigned_uids": [],
82
+ "item_order": 1
83
+ },
84
+ {
85
+ "item_id": "d5a6c7f8-9e0b-4c23-9d4e-3f5a7b9c1d2e",
86
+ "item_name": "6pc Hash Brown",
87
+ "item_quantity": 2,
88
+ "item_unit_price": 4.17,
89
+ "item_total_price": 8.34,
90
+ "item_assigned_uids": ["user123", "6f9619ff-8b86-4d01-b42d-00cf4fc964ff"],
91
+ "item_order": 2
92
+ }
93
+ ]
94
+ }
95
+ }