@simonarcher/fika-types 1.0.93 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/supabase-helpers.d.ts +178 -0
- package/dist/supabase-helpers.js +15 -0
- package/dist/supabase.d.ts +3914 -0
- package/dist/supabase.js +22 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -46,3 +46,7 @@ __exportStar(require("./shopCorrections"), exports);
|
|
|
46
46
|
__exportStar(require("./currencyUtils"), exports);
|
|
47
47
|
// Export all stickers-related types
|
|
48
48
|
__exportStar(require("./stickers"), exports);
|
|
49
|
+
// Export Supabase database types (auto-generated)
|
|
50
|
+
__exportStar(require("./supabase"), exports);
|
|
51
|
+
// Export Supabase type helpers (convenient aliases)
|
|
52
|
+
__exportStar(require("./supabase-helpers"), exports);
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supabase Type Helpers
|
|
3
|
+
*
|
|
4
|
+
* Convenient type aliases for Supabase database types.
|
|
5
|
+
* These provide shorter imports for common use cases.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* import { Shop, NewShop, User } from '@fika/schema';
|
|
9
|
+
*
|
|
10
|
+
* Instead of:
|
|
11
|
+
* import { Tables, TablesInsert } from '@fika/schema';
|
|
12
|
+
* type Shop = Tables<"shops">;
|
|
13
|
+
*/
|
|
14
|
+
import { Tables, TablesInsert, TablesUpdate } from './supabase';
|
|
15
|
+
export type DbUser = Tables<"users">;
|
|
16
|
+
export type DbUsername = Tables<"usernames">;
|
|
17
|
+
export type DbShop = Tables<"shops">;
|
|
18
|
+
export type DbRoaster = Tables<"roasters">;
|
|
19
|
+
export type DbFarm = Tables<"farms">;
|
|
20
|
+
export type DbFranchise = Tables<"franchises">;
|
|
21
|
+
export type DbCoffeeBean = Tables<"coffee_beans">;
|
|
22
|
+
export type DbShopRoaster = Tables<"shop_roasters">;
|
|
23
|
+
export type DbRoasterFarm = Tables<"roaster_farms">;
|
|
24
|
+
export type DbFranchiseRoaster = Tables<"franchise_roasters">;
|
|
25
|
+
export type DbShopBean = Tables<"shop_beans">;
|
|
26
|
+
export type DbUserFollower = Tables<"user_followers">;
|
|
27
|
+
export type DbShopFollower = Tables<"shop_followers">;
|
|
28
|
+
export type DbShopFavourite = Tables<"shop_favourites">;
|
|
29
|
+
export type DbAction = Tables<"actions">;
|
|
30
|
+
export type DbPoints = Tables<"points">;
|
|
31
|
+
export type DbReward = Tables<"rewards">;
|
|
32
|
+
export type DbShot = Tables<"shots">;
|
|
33
|
+
export type DbShotLike = Tables<"shot_likes">;
|
|
34
|
+
export type DbReview = Tables<"reviews">;
|
|
35
|
+
export type DbVote = Tables<"votes">;
|
|
36
|
+
export type DbAssertion = Tables<"assertions">;
|
|
37
|
+
export type DbLoyaltyStamp = Tables<"loyalty_stamps">;
|
|
38
|
+
export type DbLoyaltyVoucher = Tables<"loyalty_vouchers">;
|
|
39
|
+
export type DbVoucher = Tables<"vouchers">;
|
|
40
|
+
export type DbLoyaltyAuditLog = Tables<"loyalty_audit_logs">;
|
|
41
|
+
export type DbMembership = Tables<"memberships">;
|
|
42
|
+
export type DbEvent = Tables<"events">;
|
|
43
|
+
export type DbEventAttendee = Tables<"event_attendees">;
|
|
44
|
+
export type DbEventUpdate = Tables<"event_updates">;
|
|
45
|
+
export type DbQuest = Tables<"quests">;
|
|
46
|
+
export type DbQuestParticipant = Tables<"quest_participants">;
|
|
47
|
+
export type DbStaff = Tables<"staff">;
|
|
48
|
+
export type DbStaffInvite = Tables<"staff_invites">;
|
|
49
|
+
export type DbSubmission = Tables<"submissions">;
|
|
50
|
+
export type DbCoffeeBeanSubmission = Tables<"coffee_bean_submissions">;
|
|
51
|
+
export type DbRoasterSubmission = Tables<"roaster_submissions">;
|
|
52
|
+
export type DbUserCorrection = Tables<"user_corrections">;
|
|
53
|
+
export type DbUserList = Tables<"user_lists">;
|
|
54
|
+
export type DbUserListShop = Tables<"user_list_shops">;
|
|
55
|
+
export type DbShopListMember = Tables<"shop_list_members">;
|
|
56
|
+
export type DbUserShopOrder = Tables<"user_shop_orders">;
|
|
57
|
+
export type DbQuizResult = Tables<"quiz_results">;
|
|
58
|
+
export type DbNews = Tables<"news">;
|
|
59
|
+
export type DbSticker = Tables<"stickers">;
|
|
60
|
+
export type DbUserSticker = Tables<"user_stickers">;
|
|
61
|
+
export type DbThingsToDo = Tables<"things_to_do">;
|
|
62
|
+
export type DbNotification = Tables<"notifications">;
|
|
63
|
+
export type DbReport = Tables<"reports">;
|
|
64
|
+
export type DbReportCase = Tables<"report_cases">;
|
|
65
|
+
export type DbReportAction = Tables<"report_actions">;
|
|
66
|
+
export type DbNotificationTemplate = Tables<"notification_templates">;
|
|
67
|
+
export type DbAppSetting = Tables<"app_settings">;
|
|
68
|
+
export type DbSystemConfig = Tables<"system_config">;
|
|
69
|
+
export type DbAuditLog = Tables<"audit_logs">;
|
|
70
|
+
export type DbSpecialtyJob = Tables<"specialty_jobs">;
|
|
71
|
+
export type DbFcmToken = Tables<"fcm_tokens">;
|
|
72
|
+
export type DbLeaderboard = Tables<"leaderboard">;
|
|
73
|
+
export type DbShopStats = Tables<"shop_stats">;
|
|
74
|
+
export type DbUserActivitySummary = Tables<"user_activity_summary">;
|
|
75
|
+
export type NewUser = TablesInsert<"users">;
|
|
76
|
+
export type NewUsername = TablesInsert<"usernames">;
|
|
77
|
+
export type NewShop = TablesInsert<"shops">;
|
|
78
|
+
export type NewRoaster = TablesInsert<"roasters">;
|
|
79
|
+
export type NewFarm = TablesInsert<"farms">;
|
|
80
|
+
export type NewFranchise = TablesInsert<"franchises">;
|
|
81
|
+
export type NewCoffeeBean = TablesInsert<"coffee_beans">;
|
|
82
|
+
export type NewShopRoaster = TablesInsert<"shop_roasters">;
|
|
83
|
+
export type NewRoasterFarm = TablesInsert<"roaster_farms">;
|
|
84
|
+
export type NewFranchiseRoaster = TablesInsert<"franchise_roasters">;
|
|
85
|
+
export type NewShopBean = TablesInsert<"shop_beans">;
|
|
86
|
+
export type NewUserFollower = TablesInsert<"user_followers">;
|
|
87
|
+
export type NewShopFollower = TablesInsert<"shop_followers">;
|
|
88
|
+
export type NewShopFavourite = TablesInsert<"shop_favourites">;
|
|
89
|
+
export type NewAction = TablesInsert<"actions">;
|
|
90
|
+
export type NewPoints = TablesInsert<"points">;
|
|
91
|
+
export type NewReward = TablesInsert<"rewards">;
|
|
92
|
+
export type NewShot = TablesInsert<"shots">;
|
|
93
|
+
export type NewShotLike = TablesInsert<"shot_likes">;
|
|
94
|
+
export type NewReview = TablesInsert<"reviews">;
|
|
95
|
+
export type NewVote = TablesInsert<"votes">;
|
|
96
|
+
export type NewAssertion = TablesInsert<"assertions">;
|
|
97
|
+
export type NewLoyaltyStamp = TablesInsert<"loyalty_stamps">;
|
|
98
|
+
export type NewLoyaltyVoucher = TablesInsert<"loyalty_vouchers">;
|
|
99
|
+
export type NewVoucher = TablesInsert<"vouchers">;
|
|
100
|
+
export type NewLoyaltyAuditLog = TablesInsert<"loyalty_audit_logs">;
|
|
101
|
+
export type NewMembership = TablesInsert<"memberships">;
|
|
102
|
+
export type NewEvent = TablesInsert<"events">;
|
|
103
|
+
export type NewEventAttendee = TablesInsert<"event_attendees">;
|
|
104
|
+
export type NewEventUpdate = TablesInsert<"event_updates">;
|
|
105
|
+
export type NewQuest = TablesInsert<"quests">;
|
|
106
|
+
export type NewQuestParticipant = TablesInsert<"quest_participants">;
|
|
107
|
+
export type NewStaff = TablesInsert<"staff">;
|
|
108
|
+
export type NewStaffInvite = TablesInsert<"staff_invites">;
|
|
109
|
+
export type NewSubmission = TablesInsert<"submissions">;
|
|
110
|
+
export type NewCoffeeBeanSubmission = TablesInsert<"coffee_bean_submissions">;
|
|
111
|
+
export type NewRoasterSubmission = TablesInsert<"roaster_submissions">;
|
|
112
|
+
export type NewUserCorrection = TablesInsert<"user_corrections">;
|
|
113
|
+
export type NewUserList = TablesInsert<"user_lists">;
|
|
114
|
+
export type NewUserListShop = TablesInsert<"user_list_shops">;
|
|
115
|
+
export type NewShopListMember = TablesInsert<"shop_list_members">;
|
|
116
|
+
export type NewUserShopOrder = TablesInsert<"user_shop_orders">;
|
|
117
|
+
export type NewQuizResult = TablesInsert<"quiz_results">;
|
|
118
|
+
export type NewNews = TablesInsert<"news">;
|
|
119
|
+
export type NewSticker = TablesInsert<"stickers">;
|
|
120
|
+
export type NewUserSticker = TablesInsert<"user_stickers">;
|
|
121
|
+
export type NewThingsToDo = TablesInsert<"things_to_do">;
|
|
122
|
+
export type NewNotification = TablesInsert<"notifications">;
|
|
123
|
+
export type NewReport = TablesInsert<"reports">;
|
|
124
|
+
export type NewReportCase = TablesInsert<"report_cases">;
|
|
125
|
+
export type NewReportAction = TablesInsert<"report_actions">;
|
|
126
|
+
export type NewNotificationTemplate = TablesInsert<"notification_templates">;
|
|
127
|
+
export type NewAppSetting = TablesInsert<"app_settings">;
|
|
128
|
+
export type NewSystemConfig = TablesInsert<"system_config">;
|
|
129
|
+
export type NewAuditLog = TablesInsert<"audit_logs">;
|
|
130
|
+
export type NewSpecialtyJob = TablesInsert<"specialty_jobs">;
|
|
131
|
+
export type NewFcmToken = TablesInsert<"fcm_tokens">;
|
|
132
|
+
export type UserUpdate = TablesUpdate<"users">;
|
|
133
|
+
export type UsernameUpdate = TablesUpdate<"usernames">;
|
|
134
|
+
export type ShopUpdate = TablesUpdate<"shops">;
|
|
135
|
+
export type RoasterUpdate = TablesUpdate<"roasters">;
|
|
136
|
+
export type FarmUpdate = TablesUpdate<"farms">;
|
|
137
|
+
export type FranchiseUpdate = TablesUpdate<"franchises">;
|
|
138
|
+
export type CoffeeBeanUpdate = TablesUpdate<"coffee_beans">;
|
|
139
|
+
export type ActionUpdate = TablesUpdate<"actions">;
|
|
140
|
+
export type PointsUpdate = TablesUpdate<"points">;
|
|
141
|
+
export type RewardUpdate = TablesUpdate<"rewards">;
|
|
142
|
+
export type ShotUpdate = TablesUpdate<"shots">;
|
|
143
|
+
export type ReviewUpdate = TablesUpdate<"reviews">;
|
|
144
|
+
export type VoteUpdate = TablesUpdate<"votes">;
|
|
145
|
+
export type AssertionUpdate = TablesUpdate<"assertions">;
|
|
146
|
+
export type LoyaltyStampUpdate = TablesUpdate<"loyalty_stamps">;
|
|
147
|
+
export type LoyaltyVoucherUpdate = TablesUpdate<"loyalty_vouchers">;
|
|
148
|
+
export type VoucherUpdate = TablesUpdate<"vouchers">;
|
|
149
|
+
export type MembershipUpdate = TablesUpdate<"memberships">;
|
|
150
|
+
export type EventUpdate = TablesUpdate<"events">;
|
|
151
|
+
export type EventAttendeeUpdate = TablesUpdate<"event_attendees">;
|
|
152
|
+
export type EventUpdateUpdate = TablesUpdate<"event_updates">;
|
|
153
|
+
export type QuestUpdate = TablesUpdate<"quests">;
|
|
154
|
+
export type QuestParticipantUpdate = TablesUpdate<"quest_participants">;
|
|
155
|
+
export type StaffUpdate = TablesUpdate<"staff">;
|
|
156
|
+
export type StaffInviteUpdate = TablesUpdate<"staff_invites">;
|
|
157
|
+
export type SubmissionUpdate = TablesUpdate<"submissions">;
|
|
158
|
+
export type CoffeeBeanSubmissionUpdate = TablesUpdate<"coffee_bean_submissions">;
|
|
159
|
+
export type RoasterSubmissionUpdate = TablesUpdate<"roaster_submissions">;
|
|
160
|
+
export type UserCorrectionUpdate = TablesUpdate<"user_corrections">;
|
|
161
|
+
export type UserListUpdate = TablesUpdate<"user_lists">;
|
|
162
|
+
export type UserListShopUpdate = TablesUpdate<"user_list_shops">;
|
|
163
|
+
export type ShopListMemberUpdate = TablesUpdate<"shop_list_members">;
|
|
164
|
+
export type UserShopOrderUpdate = TablesUpdate<"user_shop_orders">;
|
|
165
|
+
export type QuizResultUpdate = TablesUpdate<"quiz_results">;
|
|
166
|
+
export type NewsUpdate = TablesUpdate<"news">;
|
|
167
|
+
export type StickerUpdate = TablesUpdate<"stickers">;
|
|
168
|
+
export type UserStickerUpdate = TablesUpdate<"user_stickers">;
|
|
169
|
+
export type ThingsToDoUpdate = TablesUpdate<"things_to_do">;
|
|
170
|
+
export type NotificationUpdate = TablesUpdate<"notifications">;
|
|
171
|
+
export type ReportUpdate = TablesUpdate<"reports">;
|
|
172
|
+
export type ReportCaseUpdate = TablesUpdate<"report_cases">;
|
|
173
|
+
export type ReportActionUpdate = TablesUpdate<"report_actions">;
|
|
174
|
+
export type NotificationTemplateUpdate = TablesUpdate<"notification_templates">;
|
|
175
|
+
export type AppSettingUpdate = TablesUpdate<"app_settings">;
|
|
176
|
+
export type SystemConfigUpdate = TablesUpdate<"system_config">;
|
|
177
|
+
export type SpecialtyJobUpdate = TablesUpdate<"specialty_jobs">;
|
|
178
|
+
export type FcmTokenUpdate = TablesUpdate<"fcm_tokens">;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Supabase Type Helpers
|
|
4
|
+
*
|
|
5
|
+
* Convenient type aliases for Supabase database types.
|
|
6
|
+
* These provide shorter imports for common use cases.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* import { Shop, NewShop, User } from '@fika/schema';
|
|
10
|
+
*
|
|
11
|
+
* Instead of:
|
|
12
|
+
* import { Tables, TablesInsert } from '@fika/schema';
|
|
13
|
+
* type Shop = Tables<"shops">;
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|