create-fullstack-scaffold 0.4.3 → 0.4.4

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.
Files changed (147) hide show
  1. package/dist/cli/index.js +513 -122
  2. package/dist/cli/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/template/dist/cli/index.js +237 -94
  5. package/template/dist/cli/index.js.map +1 -1
  6. package/template/dist/client/admin.html +15 -10
  7. package/template/dist/client/assets/App-BpFUIC-5.js +114 -0
  8. package/template/dist/client/assets/{CartPage-DESSHkaG.js → CartPage-DgDZP-R5.js} +2 -2
  9. package/template/dist/client/assets/{CategoriesPage-DqLZ_Mom.js → CategoriesPage-fuYNiSmE.js} +2 -2
  10. package/template/dist/client/assets/ContentDetailPage-BvvFU1Mr.js +1 -0
  11. package/template/dist/client/assets/ContentListPage-ShPxo6WG.js +1 -0
  12. package/template/dist/client/assets/DashboardPage-C1rZzZo4.js +11 -0
  13. package/template/dist/client/assets/{DeveloperDashboardPage-Cum7zFwO.js → DeveloperDashboardPage-_WtmbVoA.js} +2 -2
  14. package/template/dist/client/assets/{EmptyState-BK7ttK8D.js → EmptyState-DEyOQjbY.js} +1 -1
  15. package/template/dist/client/assets/LoadingSpinner-BcHjaM1m.js +6 -0
  16. package/template/dist/client/assets/LoginPage-CjeQqDdO.js +1 -0
  17. package/template/dist/client/assets/LogoutOutlined-ColFAHdd.js +1 -0
  18. package/template/dist/client/assets/NotificationPage-DRkEv02s.js +1 -0
  19. package/template/dist/client/assets/OrdersPage-7I3vPWLP.js +11 -0
  20. package/template/dist/client/assets/{PluginDetailPage-Br24YS4P.js → PluginDetailPage-CWyxdVCg.js} +3 -13
  21. package/template/dist/client/assets/PluginsPage-DRgWLeJT.js +6 -0
  22. package/template/dist/client/assets/ProfilePage-2FFkaii8.js +16 -0
  23. package/template/dist/client/assets/PublishPage-DW7yvROx.js +1 -0
  24. package/template/dist/client/assets/{RegisterPage-rPFG4Sry.js → RegisterPage-Dvaf9b0e.js} +2 -2
  25. package/template/dist/client/assets/SaveOutlined-CLQ2tsSY.js +2 -0
  26. package/template/dist/client/assets/{SearchPage-DQl1U5Uy.js → SearchPage-DvnEyswS.js} +2 -2
  27. package/template/dist/client/assets/{SettingsPage-DaYE80wj.js → SettingsPage-IrU-L9Zr.js} +2 -2
  28. package/template/dist/client/assets/{StatusBadge-BJ3W2Zc7.js → StatusBadge-CG7wVqpu.js} +1 -1
  29. package/template/dist/client/assets/{TodoPage-zC5wWNBa.js → TodoPage-B7D-bl65.js} +3 -3
  30. package/template/dist/client/assets/TopicsPage-CYCNr-mn.js +6 -0
  31. package/template/dist/client/assets/{WebSocketPage-B4NLdz1w.js → WebSocketPage-CGEg6QJE.js} +2 -2
  32. package/template/dist/client/assets/{activity-B94BUAsD.js → activity-CgTz9Mrd.js} +1 -1
  33. package/template/dist/client/assets/admin-D2iHWNOg.js +1 -0
  34. package/template/dist/client/assets/api-request-DIJocPxr.js +356 -0
  35. package/template/dist/client/assets/{arrow-left-H5JH0iU1.js → arrow-left-DtLQ3tTk.js} +1 -1
  36. package/template/dist/client/assets/{chevron-down-DwRh_wjD.js → chevron-down-CpIAV_yr.js} +1 -1
  37. package/template/dist/client/assets/{chevron-right-CpIWaqAL.js → chevron-right-CnU7oPQs.js} +1 -1
  38. package/template/dist/client/assets/{circle-check-big-CSElLscG.js → circle-check-big-CrZdwS75.js} +1 -1
  39. package/template/dist/client/assets/{circle-x-CYxr4RAw.js → circle-x-CvN9r3fW.js} +1 -1
  40. package/template/dist/client/assets/{clock-BseUJ7ex.js → clock-CTeSZBiH.js} +1 -1
  41. package/template/dist/client/assets/{download-BsGC_Xhq.js → download-OSVfVuNV.js} +1 -1
  42. package/template/dist/client/assets/{external-link-UTDzdjq8.js → external-link-fBsuHMby.js} +1 -1
  43. package/template/dist/client/assets/{eye-nR10ui7i.js → eye-CwlZZEsj.js} +1 -1
  44. package/template/dist/client/assets/index-09IqiOaE.css +1 -0
  45. package/template/dist/client/assets/index-B3CRby6r.js +51 -0
  46. package/template/dist/client/assets/index-CC_zy73y.js +17 -0
  47. package/template/dist/client/assets/main-Cn4IDo2I.js +92 -0
  48. package/template/dist/client/assets/merchant-DDDN9bMu.js +40 -0
  49. package/template/dist/client/assets/{message-square-CwWGL-Bh.js → message-square-BRaZfgbJ.js} +1 -1
  50. package/template/dist/client/assets/pluginStore-DDsWJPe6.js +1 -0
  51. package/template/dist/client/assets/{plus-pZld_nUL.js → plus-DDZfPiDJ.js} +1 -1
  52. package/template/dist/client/assets/sse-client-DGQ072hl.js +64 -0
  53. package/template/dist/client/assets/star-C7tO6w4H.js +11 -0
  54. package/template/dist/client/assets/{tag-DsiUPF90.js → tag-DBfpQDuJ.js} +1 -1
  55. package/template/dist/client/assets/tenant-CizbLaLJ.js +1 -0
  56. package/template/dist/client/assets/{trash-2-DRblNbnA.js → trash-2-BP7fkd5b.js} +1 -1
  57. package/template/dist/client/assets/{triangle-alert-D1CLh-Vd.js → triangle-alert-CrOQEdJ2.js} +1 -1
  58. package/template/dist/client/assets/{wifi-BwXjnCqI.js → wifi-CwYSE0J4.js} +1 -1
  59. package/template/dist/client/assets/{x-BH2rJdFq.js → x-t615pnNR.js} +1 -1
  60. package/template/dist/client/content/index.html +5 -4
  61. package/template/dist/client/index.html +4 -3
  62. package/template/dist/client/merchant.html +18 -0
  63. package/template/dist/client/notifications/index.html +6 -5
  64. package/template/dist/client/tenant.html +18 -0
  65. package/template/dist/client/todos/index.html +6 -5
  66. package/template/dist/client/websocket/index.html +6 -5
  67. package/template/dist/cloudflare/chunk-HX7DVRDX.js +1 -0
  68. package/template/dist/cloudflare/{chunk-QBHAPWIA.js → chunk-IXJL2LE4.js} +1 -1
  69. package/template/dist/cloudflare/chunk-Q34AN3RF.js +14 -0
  70. package/template/dist/cloudflare/{chunk-BHPTQ4K2.js → chunk-ZAMVL4EG.js} +2 -2
  71. package/template/dist/cloudflare/cloudflare.js +35 -29
  72. package/template/dist/cloudflare/db-4AQOSFAX.js +1 -0
  73. package/template/dist/cloudflare/{migrator-2ZYYKNI5.js → migrator-TEPBVUFO.js} +1 -1
  74. package/template/dist/cloudflare/permission-service-impl-RE7NPW3Q.js +1 -0
  75. package/template/dist/cloudflare/schema-DVEMT3X2.js +1 -0
  76. package/template/dist/cloudflare/test-setup-Z2RYE5B4.js +265 -0
  77. package/template/dist/server/chunk-27SIJSPF.js +1 -0
  78. package/template/dist/server/chunk-37QNGBQU.js +1 -0
  79. package/template/dist/server/chunk-FIY4CGJJ.js +1 -0
  80. package/template/dist/server/chunk-HZUDBIT4.js +1 -0
  81. package/template/dist/server/chunk-I6OBDFDU.js +1 -0
  82. package/template/dist/server/chunk-JHNYLNG7.js +1 -0
  83. package/template/dist/server/chunk-MDOVVKKD.js +1 -0
  84. package/template/dist/server/chunk-NSOCT7E5.js +1 -0
  85. package/template/dist/server/chunk-OU5IGVVO.js +1 -0
  86. package/template/dist/server/chunk-OYCBNRMK.js +1 -0
  87. package/template/dist/server/chunk-P2RJNNGD.js +1 -0
  88. package/template/dist/server/chunk-UMAQLNPE.js +1 -0
  89. package/template/dist/server/chunk-XZZTSRSN.js +1 -0
  90. package/template/dist/server/content-service-5QVHDR5X.js +1 -0
  91. package/template/dist/server/db-FLI5L5DD.js +1 -0
  92. package/template/dist/server/dispute-service-E2FCYUEM.js +1 -0
  93. package/template/dist/server/init-72JXJV3I.js +46 -0
  94. package/template/dist/server/init-FWYXSKPX.js +46 -0
  95. package/template/dist/server/node.js +34 -28
  96. package/template/dist/server/order-service-TKGG5S5K.js +1 -0
  97. package/template/dist/server/permission-service-impl-M3AKEYNY.js +1 -0
  98. package/template/dist/server/schema-V4UG7HMU.js +1 -0
  99. package/template/dist/server/tenant-service-JG6UUWXQ.js +1 -0
  100. package/template/dist/server/tenant-service-XJWZSEDX.js +1 -0
  101. package/template/dist/{cloudflare/test-setup-NMZJZLRV.js → server/test-setup-VFOPBGYM.js} +83 -2
  102. package/template/dist/server/ticket-service-3RSW7V2Z.js +1 -0
  103. package/template/dist/server/todo-service-S6BGIO7D.js +1 -0
  104. package/template/src/merchant/pages/DisputesPage.tsx +11 -11
  105. package/template/src/merchant/pages/OrdersPage.tsx +4 -3
  106. package/template/src/merchant/pages/ProductsPage.tsx +2 -2
  107. package/template/src/merchant/stores/merchantStore.ts +11 -6
  108. package/template/src/server/db/init.ts +5 -642
  109. package/template/src/server/module-plugin/services/plugin-seed-service.ts +623 -0
  110. package/template/src/server/module-tenant/routes/tenant-routes.ts +2 -2
  111. package/template/src/server/module-tenant/services/tenant-service.ts +63 -17
  112. package/template/src/shared/modules/merchant/index.ts +9 -0
  113. package/template/src/shared/modules/merchant/schemas.ts +37 -0
  114. package/template/src/shared/modules/tenant/index.ts +2 -0
  115. package/template/src/shared/schemas/index.ts +27 -0
  116. package/template/src/tenant/layouts/Header.tsx +1 -1
  117. package/template/src/tenant/layouts/Sidebar.tsx +1 -1
  118. package/template/src/tenant/pages/SettingsPage.tsx +4 -8
  119. package/template/src/tenant/stores/tenantStore.ts +41 -302
  120. package/template/tsconfig.json +1 -0
  121. package/template/tsup.config.ts +11 -3
  122. package/template/dist/client/assets/ContentDetailPage-DdltMANL.js +0 -1
  123. package/template/dist/client/assets/ContentListPage-B63sUB6N.js +0 -1
  124. package/template/dist/client/assets/DashboardPage-tUMilc7Z.js +0 -11
  125. package/template/dist/client/assets/LoadingSpinner-DVYOLSRM.js +0 -6
  126. package/template/dist/client/assets/LoginPage-g9mSLIMC.js +0 -6
  127. package/template/dist/client/assets/NotificationPage-COTzp-HD.js +0 -1
  128. package/template/dist/client/assets/OrdersPage-BsPh4oEI.js +0 -11
  129. package/template/dist/client/assets/PluginsPage-BNtAe_yo.js +0 -6
  130. package/template/dist/client/assets/ProfilePage-dL_iSuZN.js +0 -16
  131. package/template/dist/client/assets/PublishPage-D96FnbLA.js +0 -1
  132. package/template/dist/client/assets/TopicsPage-DyLjZa4D.js +0 -6
  133. package/template/dist/client/assets/admin-Bh1vfz_L.js +0 -486
  134. package/template/dist/client/assets/index-1bA-ixFv.js +0 -114
  135. package/template/dist/client/assets/index-CWh3vXC_.css +0 -1
  136. package/template/dist/client/assets/main-DHnArIp_.js +0 -82
  137. package/template/dist/client/assets/pluginStore-XQfsm3iR.js +0 -1
  138. package/template/dist/client/content/content-1/index.html +0 -18
  139. package/template/dist/client/content/content-13/index.html +0 -18
  140. package/template/dist/client/content/content-14/index.html +0 -18
  141. package/template/dist/client/content/content-15/index.html +0 -18
  142. package/template/dist/client/content/content-19/index.html +0 -18
  143. package/template/dist/client/content/content-2/index.html +0 -18
  144. package/template/dist/client/content/content-20/index.html +0 -18
  145. package/template/dist/cloudflare/chunk-YY6FRMAQ.js +0 -14
  146. package/template/dist/cloudflare/db-7J42RQ3T.js +0 -1
  147. package/template/dist/cloudflare/permission-service-impl-TGXVSSSA.js +0 -1
@@ -13,6 +13,8 @@ export async function seedTenantsIfEmpty(): Promise<void> {
13
13
  if (existing.length === 0) {
14
14
  log.info({}, 'Seeding tenants...')
15
15
 
16
+ const now = new Date().toISOString()
17
+
16
18
  const sampleTenants: NewTenant[] = [
17
19
  {
18
20
  name: 'Demo Corp',
@@ -21,6 +23,8 @@ export async function seedTenantsIfEmpty(): Promise<void> {
21
23
  plan: 'pro',
22
24
  maxUsers: 50,
23
25
  settings: JSON.stringify({ theme: 'dark', language: 'en' }),
26
+ createdAt: now,
27
+ updatedAt: now,
24
28
  },
25
29
  {
26
30
  name: 'Test Inc',
@@ -29,6 +33,8 @@ export async function seedTenantsIfEmpty(): Promise<void> {
29
33
  plan: 'free',
30
34
  maxUsers: 5,
31
35
  settings: null,
36
+ createdAt: now,
37
+ updatedAt: now,
32
38
  },
33
39
  ]
34
40
 
@@ -50,12 +56,14 @@ export async function listTenants(
50
56
 
51
57
  if (filters.status) {
52
58
  baseQuery = baseQuery.where(
53
- eq(tenants.status, filters.status as TenantStatus)
59
+ eq(tenants.status, filters.status as 'active' | 'suspended' | 'trial')
54
60
  ) as typeof baseQuery
55
61
  }
56
62
 
57
63
  if (filters.plan) {
58
- baseQuery = baseQuery.where(eq(tenants.plan, filters.plan as TenantPlan)) as typeof baseQuery
64
+ baseQuery = baseQuery.where(
65
+ eq(tenants.plan, filters.plan as 'free' | 'starter' | 'pro' | 'enterprise')
66
+ ) as typeof baseQuery
59
67
  }
60
68
 
61
69
  if (filters.search) {
@@ -68,12 +76,14 @@ export async function listTenants(
68
76
 
69
77
  if (filters.status) {
70
78
  countQuery = countQuery.where(
71
- eq(tenants.status, filters.status as TenantStatus)
79
+ eq(tenants.status, filters.status as 'active' | 'suspended' | 'trial')
72
80
  ) as typeof countQuery
73
81
  }
74
82
 
75
83
  if (filters.plan) {
76
- countQuery = countQuery.where(eq(tenants.plan, filters.plan as TenantPlan)) as typeof countQuery
84
+ countQuery = countQuery.where(
85
+ eq(tenants.plan, filters.plan as 'free' | 'starter' | 'pro' | 'enterprise')
86
+ ) as typeof countQuery
77
87
  }
78
88
 
79
89
  if (filters.search) {
@@ -87,8 +97,8 @@ export async function listTenants(
87
97
  id: row.id,
88
98
  name: row.name,
89
99
  slug: row.slug,
90
- status: row.status as TenantStatus,
91
- plan: row.plan as TenantPlan,
100
+ status: row.status as 'active' | 'suspended' | 'trial',
101
+ plan: row.plan as 'free' | 'starter' | 'pro' | 'enterprise',
92
102
  maxUsers: row.maxUsers,
93
103
  settings: row.settings ? (JSON.parse(row.settings) as Record<string, unknown>) : null,
94
104
  createdAt: row.createdAt,
@@ -110,8 +120,8 @@ export async function getTenantBySlug(slug: string): Promise<Tenant | null> {
110
120
  id: row.id,
111
121
  name: row.name,
112
122
  slug: row.slug,
113
- status: row.status as TenantStatus,
114
- plan: row.plan as TenantPlan,
123
+ status: row.status as 'active' | 'suspended' | 'trial',
124
+ plan: row.plan as 'free' | 'starter' | 'pro' | 'enterprise',
115
125
  maxUsers: row.maxUsers,
116
126
  settings: row.settings ? (JSON.parse(row.settings) as Record<string, unknown>) : null,
117
127
  createdAt: row.createdAt,
@@ -131,8 +141,8 @@ export async function getTenantById(id: number): Promise<Tenant | null> {
131
141
  id: row.id,
132
142
  name: row.name,
133
143
  slug: row.slug,
134
- status: row.status as TenantStatus,
135
- plan: row.plan as TenantPlan,
144
+ status: row.status as 'active' | 'suspended' | 'trial',
145
+ plan: row.plan as 'free' | 'starter' | 'pro' | 'enterprise',
136
146
  maxUsers: row.maxUsers,
137
147
  settings: row.settings ? (JSON.parse(row.settings) as Record<string, unknown>) : null,
138
148
  createdAt: row.createdAt,
@@ -172,8 +182,8 @@ export async function createTenant(input: CreateTenantInput): Promise<Tenant> {
172
182
  id: row.id,
173
183
  name: row.name,
174
184
  slug: row.slug,
175
- status: row.status as TenantStatus,
176
- plan: row.plan as TenantPlan,
185
+ status: row.status as 'active' | 'suspended' | 'trial',
186
+ plan: row.plan as 'free' | 'starter' | 'pro' | 'enterprise',
177
187
  maxUsers: row.maxUsers,
178
188
  settings: row.settings ? (JSON.parse(row.settings) as Record<string, unknown>) : null,
179
189
  createdAt: row.createdAt,
@@ -196,18 +206,54 @@ export async function updateTenant(id: number, input: UpdateTenantInput): Promis
196
206
  updateData.name = input.name
197
207
  }
198
208
 
199
- if (input.status !== undefined) {
209
+ if (input.status !== undefined && input.status !== null) {
210
+ updateData.status = input.status
211
+ }
212
+
213
+ if (input.plan !== undefined && input.plan !== null) {
214
+ updateData.plan = input.plan
215
+ }
216
+
217
+ if (input.maxUsers !== undefined && input.maxUsers !== null) {
218
+ updateData.maxUsers = input.maxUsers
219
+ }
220
+
221
+ if (input.settings !== undefined) {
222
+ updateData.settings = input.settings ? JSON.stringify(input.settings) : null
223
+ }
224
+
225
+ if (input.name !== undefined) {
226
+ updateData.name = input.name
227
+ }
228
+
229
+ if (input.status !== undefined && input.status !== null) {
200
230
  updateData.status = input.status
201
231
  }
202
232
 
203
- if (input.plan !== undefined) {
233
+ if (input.plan !== undefined && input.plan !== null) {
204
234
  updateData.plan = input.plan
205
235
  }
206
236
 
207
- if (input.maxUsers !== undefined) {
237
+ if (input.maxUsers !== undefined && input.maxUsers !== null) {
208
238
  updateData.maxUsers = input.maxUsers
209
239
  }
210
240
 
241
+ if (input.name !== undefined) {
242
+ updateData.name = input.name
243
+ }
244
+
245
+ if (input.status !== undefined && input.status !== null) {
246
+ ;(updateData as Record<string, unknown>).status = input.status
247
+ }
248
+
249
+ if (input.plan !== undefined && input.plan !== null) {
250
+ ;(updateData as Record<string, unknown>).plan = input.plan
251
+ }
252
+
253
+ if (input.maxUsers !== undefined && input.maxUsers !== null) {
254
+ ;(updateData as Record<string, unknown>).maxUsers = input.maxUsers
255
+ }
256
+
211
257
  if (input.settings !== undefined) {
212
258
  updateData.settings = input.settings ? JSON.stringify(input.settings) : null
213
259
  }
@@ -224,8 +270,8 @@ export async function updateTenant(id: number, input: UpdateTenantInput): Promis
224
270
  id: row.id,
225
271
  name: row.name,
226
272
  slug: row.slug,
227
- status: row.status as TenantStatus,
228
- plan: row.plan as TenantPlan,
273
+ status: row.status as 'active' | 'suspended' | 'trial',
274
+ plan: row.plan as 'free' | 'starter' | 'pro' | 'enterprise',
229
275
  maxUsers: row.maxUsers,
230
276
  settings: row.settings ? (JSON.parse(row.settings) as Record<string, unknown>) : null,
231
277
  createdAt: row.createdAt,
@@ -0,0 +1,9 @@
1
+ export {
2
+ ProductSchema,
3
+ CreateProductSchema,
4
+ UpdateProductSchema,
5
+ ProductListSchema,
6
+ type Product,
7
+ type CreateProductInput,
8
+ type UpdateProductInput,
9
+ } from './schemas'
@@ -0,0 +1,37 @@
1
+ import { z } from '@hono/zod-openapi'
2
+
3
+ export const ProductSchema = z.object({
4
+ id: z.string(),
5
+ name: z.string().min(1).max(200),
6
+ description: z.string().max(1000),
7
+ price: z.number().positive(),
8
+ status: z.enum(['active', 'inactive', 'out_of_stock']),
9
+ stock: z.number().int().min(0),
10
+ imageUrl: z.string().url().nullable(),
11
+ createdAt: z.string().datetime(),
12
+ updatedAt: z.string().datetime(),
13
+ })
14
+
15
+ export const CreateProductSchema = z.object({
16
+ name: z.string().min(1).max(200),
17
+ description: z.string().max(1000),
18
+ price: z.number().positive(),
19
+ status: z.enum(['active', 'inactive', 'out_of_stock']).default('active'),
20
+ stock: z.number().int().min(0).default(0),
21
+ imageUrl: z.string().url().nullable(),
22
+ })
23
+
24
+ export const UpdateProductSchema = z.object({
25
+ name: z.string().min(1).max(200).nullish(),
26
+ description: z.string().max(1000).nullish(),
27
+ price: z.number().positive().nullish(),
28
+ status: z.enum(['active', 'inactive', 'out_of_stock']).nullish(),
29
+ stock: z.number().int().min(0).nullish(),
30
+ imageUrl: z.string().url().nullable().nullish(),
31
+ })
32
+
33
+ export const ProductListSchema = z.array(ProductSchema)
34
+
35
+ export type Product = z.infer<typeof ProductSchema>
36
+ export type CreateProductInput = z.infer<typeof CreateProductSchema>
37
+ export type UpdateProductInput = z.infer<typeof UpdateProductSchema>
@@ -9,6 +9,7 @@ export {
9
9
  TenantSlugSchema,
10
10
  TenantListResponseSchema,
11
11
  TenantQuerySchema,
12
+ TenantIdResponseSchema,
12
13
  type Tenant,
13
14
  type TenantStatus,
14
15
  type TenantPlan,
@@ -19,4 +20,5 @@ export {
19
20
  type TenantSlug,
20
21
  type TenantListResponse,
21
22
  type TenantQuery,
23
+ type TenantIdResponse,
22
24
  } from './schemas'
@@ -218,6 +218,7 @@ export {
218
218
  TenantSlugSchema,
219
219
  TenantListResponseSchema,
220
220
  TenantQuerySchema,
221
+ TenantIdResponseSchema,
221
222
  type Tenant,
222
223
  type TenantStatus,
223
224
  type TenantPlan,
@@ -228,4 +229,30 @@ export {
228
229
  type TenantSlug,
229
230
  type TenantListResponse,
230
231
  type TenantQuery,
232
+ type TenantIdResponse,
231
233
  } from '../modules/tenant'
234
+ export {
235
+ DisputeTypeSchema,
236
+ DisputeStatusSchema,
237
+ DisputeSchema,
238
+ CreateDisputeSchema,
239
+ UpdateDisputeSchema,
240
+ ResolveDisputeSchema,
241
+ DisputeListSchema,
242
+ type DisputeType,
243
+ type DisputeStatus,
244
+ type Dispute,
245
+ type CreateDisputeInput,
246
+ type UpdateDisputeInput,
247
+ type ResolveDisputeInput,
248
+ } from '../modules/dispute'
249
+ export {
250
+ ProductSchema,
251
+ CreateProductSchema,
252
+ UpdateProductSchema,
253
+ ProductListSchema,
254
+ type Product,
255
+ type CreateProductInput,
256
+ type UpdateProductInput,
257
+ } from '../modules/merchant'
258
+ export type { DeveloperProfile as User } from '../modules/auth'
@@ -1,4 +1,4 @@
1
- import { Layout as AntLayout } from 'antd'
1
+ import { Layout as AntLayout, Dropdown } from 'antd'
2
2
  import {
3
3
  MenuFoldOutlined,
4
4
  MenuUnfoldOutlined,
@@ -1,4 +1,4 @@
1
- import { Menu } from 'antd'
1
+ import { Menu, Layout as AntLayout } from 'antd'
2
2
  import type { MenuProps } from 'antd'
3
3
  import {
4
4
  DashboardOutlined,
@@ -13,8 +13,7 @@ export const SettingsPage: React.FC = () => {
13
13
  form.setFieldsValue({
14
14
  name: currentTenant.name,
15
15
  slug: currentTenant.slug,
16
- email: currentTenant.email,
17
- settings: currentTenant.settings ? JSON.parse(currentTenant.settings) : {},
16
+ settings: currentTenant.settings || {},
18
17
  })
19
18
  }
20
19
  }, [currentTenant, form])
@@ -25,10 +24,10 @@ export const SettingsPage: React.FC = () => {
25
24
  return
26
25
  }
27
26
 
27
+ const typedValues = values as { name: string; settings: Record<string, unknown> }
28
28
  const updateData: UpdateTenantInput = {
29
- name: (values as { name: string }).name,
30
- email: (values as { email: string }).email,
31
- settings: JSON.stringify((values as { settings: Record<string, unknown> }).settings),
29
+ name: typedValues.name,
30
+ settings: typedValues.settings,
32
31
  }
33
32
 
34
33
  const success = await updateTenant(currentTenant.id, updateData)
@@ -48,9 +47,6 @@ export const SettingsPage: React.FC = () => {
48
47
  <Form.Item name="slug" label="Slug" rules={[{ required: true }]}>
49
48
  <Input disabled />
50
49
  </Form.Item>
51
- <Form.Item name="email" label="Email" rules={[{ required: true, type: 'email' }]}>
52
- <Input />
53
- </Form.Item>
54
50
  <Form.Item name={['settings', 'logoUrl']} label="Logo URL">
55
51
  <Input />
56
52
  </Form.Item>