From d4a48ba4a753839d5801b4eae8514b0f35c653dd Mon Sep 17 00:00:00 2001 From: Rezwana Karim <126201034+rezwana-karim@users.noreply.github.com> Date: Thu, 19 Feb 2026 17:05:23 +0600 Subject: [PATCH 1/2] up --- .agent_work/all-ts-errors.txt | 293 +++++++++++++++++++++ .agent_work/debug-scripts/_check_pw.js | 1 + .agent_work/debug-scripts/_query.js | 1 + .agent_work/debug-scripts/_query2.js | 1 + .agent_work/debug-scripts/_query3.js | 1 + .agent_work/debug-scripts/_query4.js | 1 + .agent_work/debug-scripts/_set_discount.js | 1 + .agent_work/debug-scripts/get-nike-id.js | 9 + .agent_work/fix-casing-v2.ps1 | 38 +++ .agent_work/fix-casing-v3.ps1 | 39 +++ .agent_work/fix-casing.ps1 | 36 +++ .agent_work/fix-prisma-casing.ps1 | 66 +++++ .agent_work/fix-prisma-casing2.ps1 | 79 ++++++ .agent_work/fix-prisma-casing3.ps1 | 78 ++++++ .agent_work/fix-relation-casing-2b.ps1 | 38 +++ .agent_work/fix-relation-casing.ps1 | 52 ++++ .agent_work/fix-remaining.js | 171 ++++++++++++ .agent_work/lint-latest.txt | 0 .agent_work/lint-report.js | 15 ++ .agent_work/ts-errors-fresh.txt | 4 + .agent_work/ts-errors-phase2.txt | 208 +++++++++++++++ .agent_work/ts-errors-phase2b.txt | 4 + .agent_work/ts-errors-remaining.txt | 293 +++++++++++++++++++++ .agent_work/ts2561-errors.txt | 293 +++++++++++++++++++++ .agent_work/tsc-current.txt | 36 +++ .agent_work/tsc-out.txt | 0 .agent_work/tsc-result.txt | 80 ++++++ 27 files changed, 1838 insertions(+) create mode 100644 .agent_work/all-ts-errors.txt create mode 100644 .agent_work/debug-scripts/_check_pw.js create mode 100644 .agent_work/debug-scripts/_query.js create mode 100644 .agent_work/debug-scripts/_query2.js create mode 100644 .agent_work/debug-scripts/_query3.js create mode 100644 .agent_work/debug-scripts/_query4.js create mode 100644 .agent_work/debug-scripts/_set_discount.js create mode 100644 .agent_work/debug-scripts/get-nike-id.js create mode 100644 .agent_work/fix-casing-v2.ps1 create mode 100644 .agent_work/fix-casing-v3.ps1 create mode 100644 .agent_work/fix-casing.ps1 create mode 100644 .agent_work/fix-prisma-casing.ps1 create mode 100644 .agent_work/fix-prisma-casing2.ps1 create mode 100644 .agent_work/fix-prisma-casing3.ps1 create mode 100644 .agent_work/fix-relation-casing-2b.ps1 create mode 100644 .agent_work/fix-relation-casing.ps1 create mode 100644 .agent_work/fix-remaining.js create mode 100644 .agent_work/lint-latest.txt create mode 100644 .agent_work/lint-report.js create mode 100644 .agent_work/ts-errors-fresh.txt create mode 100644 .agent_work/ts-errors-phase2.txt create mode 100644 .agent_work/ts-errors-phase2b.txt create mode 100644 .agent_work/ts-errors-remaining.txt create mode 100644 .agent_work/ts2561-errors.txt create mode 100644 .agent_work/tsc-current.txt create mode 100644 .agent_work/tsc-out.txt create mode 100644 .agent_work/tsc-result.txt diff --git a/.agent_work/all-ts-errors.txt b/.agent_work/all-ts-errors.txt new file mode 100644 index 000000000..360590070 --- /dev/null +++ b/.agent_work/all-ts-errors.txt @@ -0,0 +1,293 @@ + +> stormcom@0.1.0 type-check +> tsc --noEmit --incremental + +playwright.config.ts(60,3): error TS1117: An object literal cannot have multiple properties with the same name. +src/app/admin/organizations/page.tsx(41,11): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationCountOutputTypeSelect'. Did you mean to write 'memberships'? +src/app/admin/organizations/page.tsx(85,27): error TS2339: Property 'Membership' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(85,44): error TS7006: Parameter 'm' implicitly has an 'any' type. +src/app/admin/organizations/page.tsx(95,37): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(96,24): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(114,62): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(121,62): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(125,20): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(129,48): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(132,26): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/users/[id]/page.tsx(40,7): error TS2561: Object literal may only specify known properties, but 'StoreStaff' does not exist in type 'UserInclude'. Did you mean to write 'storeStaff'? +src/app/admin/users/[id]/page.tsx(255,21): error TS2339: Property 'activitiesReceived' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(261,25): error TS2339: Property 'activitiesReceived' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(261,49): error TS7006: Parameter 'activity' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(298,21): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(304,25): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(304,41): error TS7006: Parameter 'staff' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(335,21): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(341,25): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(341,41): error TS7006: Parameter 'membership' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(373,53): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(378,53): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(383,53): error TS2339: Property '_count' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(37,19): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserCountOutputTypeSelect'. Did you mean to write 'memberships'? +src/app/admin/users/page.tsx(60,17): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(61,21): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(62,29): error TS2339: Property '_count' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/admin/users/[id]/route.ts(40,9): error TS2561: Object literal may only specify known properties, but 'StoreStaff' does not exist in type 'UserInclude'. Did you mean to write 'storeStaff'? +src/app/api/admin/users/route.ts(63,11): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserSelect'. Did you mean to write 'memberships'? +src/app/api/gdpr/export/route.ts(36,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserInclude'. Did you mean to write 'memberships'? +src/app/api/gdpr/export/route.ts(59,20): error TS2339: Property 'accounts' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/gdpr/export/route.ts(59,34): error TS7006: Parameter 'account' implicitly has an 'any' type. +src/app/api/gdpr/export/route.ts(63,20): error TS2339: Property 'sessions' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/gdpr/export/route.ts(63,34): error TS7006: Parameter 'session' implicitly has an 'any' type. +src/app/api/gdpr/export/route.ts(66,25): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/gdpr/export/route.ts(66,41): error TS7006: Parameter 'membership' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(111,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/analytics/route.ts(118,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/analytics/route.ts(129,7): error TS7006: Parameter 'p' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(132,7): error TS7006: Parameter 'p' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(137,7): error TS7006: Parameter 'o' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(140,7): error TS7006: Parameter 'o' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(150,63): error TS7006: Parameter 's' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(157,29): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/analytics/route.ts(167,29): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/catalog/route.ts(55,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/catalog/route.ts(62,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(92,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(97,38): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(519,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(524,38): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/disconnect/route.ts(50,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/disconnect/route.ts(57,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/disconnect/route.ts(139,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/read/route.ts(48,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/read/route.ts(55,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/route.ts(54,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/route.ts(61,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(52,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(59,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(223,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(230,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/oauth/connect/route.ts(42,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/oauth/connect/route.ts(49,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(48,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(65,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(71,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(79,31): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(98,52): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(109,26): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(48,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(65,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(71,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(79,31): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(98,52): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(109,26): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(52,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(73,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(79,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(87,31): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(96,31): error TS2339: Property 'fulfillments' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(113,13): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(128,26): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(131,51): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(132,51): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(133,38): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-status/route.ts(47,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-status/route.ts(63,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-status/route.ts(69,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/poll/route.ts(47,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/poll/route.ts(54,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/poll/route.ts(187,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; } & { ...; }) | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/poll/route.ts(194,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; } & { ...; }) | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/sync/route.ts(47,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/sync/route.ts(54,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/products/batch-status/route.ts(47,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/products/batch-status/route.ts(65,32): error TS2551: Property 'store' does not exist on type '{ errors: string | null; id: string; storeId: string; status: string; completedAt: Date | null; batchHandle: string | null; totalItems: number; successCount: number; errorCount: number; startedAt: Date; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/products/batch-status/route.ts(130,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/products/batch-status/route.ts(142,29): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/integrations/facebook/products/sync/route.ts(44,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/products/sync/route.ts(51,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/settings/route.ts(50,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/settings/route.ts(57,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/settings/route.ts(169,31): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; isActive: boolean; lastError: string | null; pageId: string; pageName: string; catalogId: string | null; catalogName: string | null; ... 5 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(55,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; country: string; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(62,30): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; country: string; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(185,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(192,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/webhooks/subscribe/route.ts(45,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/webhooks/subscribe/route.ts(52,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/orders/[id]/invoice/route.ts(55,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/orders/[id]/route.ts(44,20): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/orders/[id]/route.ts(44,36): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/orders/[id]/route.ts(101,20): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/orders/[id]/route.ts(101,36): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/orders/route.ts(78,27): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(79,20): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(79,48): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(81,28): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(207,17): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderSelect'. Did you mean to write 'customer'? +src/app/api/orders/stream/route.ts(230,39): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(231,32): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(231,60): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/organizations/[slug]/invite/route.ts(44,23): error TS2345: Argument of type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }' is not assignable to parameter of type 'OrganizationWithMemberships'. + Property 'Membership' is missing in type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }' but required in type 'OrganizationWithMemberships'. +src/app/api/organizations/route.ts(38,9): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationUncheckedCreateInput) | (Without<...> & OrganizationCreateInput)'. Did you mean to write 'memberships'? +src/app/api/organizations/route.ts(40,18): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/organizations/route.ts(55,16): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationWhereInput'. Did you mean to write 'memberships'? +src/app/api/organizations/route.ts(58,29): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationCountOutputTypeSelect'. Did you mean to write 'memberships'? +src/app/api/permissions/route.ts(21,9): error TS2561: Object literal may only specify known properties, but 'StoreStaff' does not exist in type 'UserSelect'. Did you mean to write 'storeStaff'? +src/app/api/permissions/route.ts(37,12): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/permissions/route.ts(38,12): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/store/[slug]/orders/[id]/invoice/route.ts(72,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/store/[slug]/orders/route.ts(182,15): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'ProductVariantWhereInput'. Did you mean to write 'product'? +src/app/api/store/[slug]/orders/route.ts(434,13): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'Without & OrderUncheckedCreateInput'. +src/app/api/store/[slug]/orders/route.ts(461,13): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/app/api/store/[slug]/orders/route.ts(655,24): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/store/[slug]/orders/track/route.ts(55,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/app/api/store/[slug]/orders/track/route.ts(61,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/app/api/store/[slug]/orders/track/route.ts(116,25): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/store/[slug]/orders/track/route.ts(117,22): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/store/[slug]/orders/track/route.ts(117,37): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/store/[slug]/orders/track/route.ts(134,24): error TS2339: Property 'errors' does not exist on type 'ZodError'. +src/app/api/stores/[id]/custom-roles/route.ts(27,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationWhereInput) | (Without<...> & OrganizationScalarRelationFilter)'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/custom-roles/route.ts(34,11): error TS2353: Object literal may only specify known properties, and 'StoreStaff' does not exist in type 'StoreWhereInput'. +src/app/api/stores/[id]/custom-roles/route.ts(57,9): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationWhereInput) | (Without<...> & OrganizationScalarRelationFilter)'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/pathao/settings/route.ts(49,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationSelect'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/pathao/settings/route.ts(58,25): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/pathao/settings/route.ts(74,28): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/pathao/settings/route.ts(129,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationSelect'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/pathao/settings/route.ts(138,25): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/pathao/settings/route.ts(154,28): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/staff/route.ts(118,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationSelect'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/staff/route.ts(240,25): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/theme/route.ts(50,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipWhereInput'. Did you mean to write 'organization'? +src/app/api/stores/current/pathao-config/route.ts(45,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/stores/current/pathao-config/route.ts(49,30): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/stores/current/pathao-config/route.ts(95,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/stores/current/pathao-config/route.ts(107,30): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/messages/page.tsx(35,20): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/messages/page.tsx(42,27): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(98,20): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; ... 14 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; country: string; } | null; } & { ...; }...'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(102,34): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; ... 14 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; country: string; } | null; } & { ...; }...'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(105,35): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; ... 14 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; country: string; } | null; } & { ...; }...'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(109,6): error TS7006: Parameter 'acc' implicitly has an 'any' type. +src/app/dashboard/integrations/facebook/page.tsx(109,11): error TS7006: Parameter 'product' implicitly has an 'any' type. +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(45,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(55,25): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(59,33): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/page.tsx(54,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreSelect'. Did you mean to write 'organization'? +src/app/dashboard/stores/[storeId]/shipping/page.tsx(66,41): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/page.tsx(82,26): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(49,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreSelect'. Did you mean to write 'organization'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(62,41): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(66,26): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(144,31): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/settings/integrations/facebook/page.tsx(89,20): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; } & { ...; }) | null; } & ...'. Did you mean 'organization'? +src/app/settings/integrations/facebook/page.tsx(93,34): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; } & { ...; }) | null; } & ...'. Did you mean 'organization'? +src/app/settings/integrations/facebook/page.tsx(98,6): error TS7006: Parameter 'acc' implicitly has an 'any' type. +src/app/settings/integrations/facebook/page.tsx(98,11): error TS7006: Parameter 'product' implicitly has an 'any' type. +src/app/store/[slug]/categories/[categorySlug]/page.tsx(99,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/categories/page.tsx(48,11): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'CategoryCountOutputTypeSelect'. Did you mean to write 'products'? +src/app/store/[slug]/categories/page.tsx(89,35): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/categories/page.tsx(89,61): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/components/product-card.tsx(111,22): error TS2551: Property 'Category' does not exist on type '{ name: string; slug: string; price: number; compareAtPrice?: number | null | undefined; thumbnailUrl?: string | null | undefined; images: string; discountType?: DiscountType | null | undefined; ... 4 more ...; isFeatured?: boolean | undefined; }'. Did you mean 'category'? +src/app/store/[slug]/components/product-card.tsx(113,26): error TS2551: Property 'Category' does not exist on type '{ name: string; slug: string; price: number; compareAtPrice?: number | null | undefined; thumbnailUrl?: string | null | undefined; images: string; discountType?: DiscountType | null | undefined; ... 4 more ...; isFeatured?: boolean | undefined; }'. Did you mean 'category'? +src/app/store/[slug]/layout.tsx(78,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreInclude'. Did you mean to write 'organization'? +src/app/store/[slug]/layout.tsx(110,27): error TS2339: Property 'Category' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. +src/app/store/[slug]/page.tsx(77,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/page.tsx(108,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/page.tsx(142,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/page.tsx(169,11): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'CategoryCountOutputTypeSelect'. Did you mean to write 'products'? +src/app/store/[slug]/page.tsx(267,31): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(267,57): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(272,27): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(274,31): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/products/[productSlug]/page.tsx(88,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductInclude'. Did you mean to write 'category'? +src/app/store/[slug]/products/[productSlug]/page.tsx(145,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/products/[productSlug]/page.tsx(157,15): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(159,22): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(160,56): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(183,24): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(184,53): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(186,24): error TS2551: Property 'Brand' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'brandId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(187,51): error TS2551: Property 'Brand' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'brandId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(225,33): error TS2339: Property 'ProductVariant' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. +src/app/store/[slug]/products/[productSlug]/page.tsx(225,53): error TS7006: Parameter 'v' implicitly has an 'any' type. +src/app/store/[slug]/products/page.tsx(176,9): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/track/order/[orderId]/page.tsx(90,41): error TS2339: Property 'order_status' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(205,33): error TS2339: Property 'delivered_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(214,41): error TS2339: Property 'delivered_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(225,33): error TS2339: Property 'picked_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(234,41): error TS2339: Property 'picked_at' does not exist on type 'never'. +src/lib/auth-helpers.ts(56,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserInclude'. Did you mean to write 'memberships'? +src/lib/auth-helpers.ts(84,38): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/auth-helpers.ts(98,37): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/auth.ts(179,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserSelect'. Did you mean to write 'memberships'? +src/lib/auth.ts(210,48): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/auth.ts(217,47): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/get-current-user.ts(67,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/get-current-user.ts(79,22): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/lib/get-current-user.ts(107,9): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipWhereInput'. Did you mean to write 'organization'? +src/lib/get-current-user.ts(143,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/get-current-user.ts(154,22): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/lib/integrations/facebook/order-polling-service.ts(109,20): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'FacebookIntegrationInclude'. Did you mean to write 'store'? +src/lib/multi-tenancy.ts(44,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/lib/multi-tenancy.ts(56,20): error TS2339: Property 'Membership' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/lib/multi-tenancy.ts(115,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationWhereInput'. Did you mean to write 'memberships'? +src/lib/multi-tenancy.ts(120,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/lib/query-helpers.ts(26,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserInclude'. Did you mean to write 'memberships'? +src/lib/query-helpers.ts(57,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreInclude'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(70,7): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/lib/query-helpers.ts(107,9): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipWhereInput'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(135,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(162,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(190,7): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'StoreStaffInclude'. Did you mean to write 'store'? +src/lib/services/order-processing.service.ts(90,24): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'ProductVariantInclude'. Did you mean to write 'product'? +src/lib/services/order-processing.service.ts(98,23): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(105,49): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(110,56): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(116,34): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(320,20): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order-processing.service.ts(327,29): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/lib/services/order-processing.service.ts(328,20): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(329,17): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(425,20): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order-processing.service.ts(516,27): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/lib/services/order-processing.service.ts(517,18): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(518,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(37,55): error TS2344: Type '{ include: { Customer: true; OrderItem: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; Store: { ...; }; }; }' does not satisfy the constraint 'boolean | OrderDefaultArgs | null | undefined'. + Type '{ include: { Customer: true; OrderItem: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; Store: { ...; }; }; }' is not assignable to type 'OrderDefaultArgs'. + Types of property 'include' are incompatible. + Type '{ Customer: true; OrderItem: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; Store: { ...; }; }' has no properties in common with type 'OrderInclude'. +src/lib/services/order.service.ts(201,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(202,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(203,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(218,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(275,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(364,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(433,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(513,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(542,25): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(543,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(544,12): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(558,5): error TS2322: Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; } | null' is not assignable to type '({ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }) | null'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is not assignable to type '{ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is missing the following properties from type '{ Store: never; Customer: never; OrderItem: never; }': Store, Customer, OrderItem +src/lib/services/order.service.ts(577,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(607,25): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(608,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(609,12): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(626,5): error TS2322: Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; } | null' is not assignable to type '({ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }) | null'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is not assignable to type '{ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is missing the following properties from type '{ Store: never; Customer: never; OrderItem: never; }': Store, Customer, OrderItem +src/lib/services/order.service.ts(640,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(691,20): error TS2551: Property 'Store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'storeId'? +src/lib/services/order.service.ts(692,23): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/lib/services/order.service.ts(695,20): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(695,34): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(740,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/store.service.ts(146,11): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationUncheckedCreateInput) | (Without<...> & OrganizationCreateInput)'. Did you mean to write 'memberships'? +src/lib/services/store.service.ts(165,9): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreInclude'. Did you mean to write 'organization'? +src/lib/services/store.service.ts(182,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(207,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(284,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(313,23): error TS2339: Property '_count' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. diff --git a/.agent_work/debug-scripts/_check_pw.js b/.agent_work/debug-scripts/_check_pw.js new file mode 100644 index 000000000..6c3982160 --- /dev/null +++ b/.agent_work/debug-scripts/_check_pw.js @@ -0,0 +1 @@ +const { PrismaClient } = require("./node_modules/.prisma/client"); const bcrypt = require("bcryptjs"); const p = new PrismaClient(); async function main() { const user = await p.user.findFirst({ where: { email: "owner@example.com" }, select: { passwordHash: true, accountStatus: true } }); console.log("Account Status:", user.accountStatus); const match = await bcrypt.compare("Test123!@#", user.passwordHash); console.log("Password matches:", match); if (!match) { const hash = await bcrypt.hash("Test123!@#", 10); await p.user.update({ where: { email: "owner@example.com" }, data: { passwordHash: hash } }); console.log("Password updated to Test123!@#"); } await p.$disconnect(); } main().catch(e => { console.error(e.message); process.exit(1); }); diff --git a/.agent_work/debug-scripts/_query.js b/.agent_work/debug-scripts/_query.js new file mode 100644 index 000000000..6b11c1521 --- /dev/null +++ b/.agent_work/debug-scripts/_query.js @@ -0,0 +1 @@ +const { PrismaClient } = require("./node_modules/.prisma/client"); const p = new PrismaClient(); async function main() { const stores = await p.store.findMany({ select: { slug: true, name: true, id: true }, take: 5 }); console.log(JSON.stringify(stores, null, 2)); const user = await p.user.findFirst({ where: { email: "owner@example.com" }, select: { id: true, email: true, name: true, role: true, status: true } }); console.log("User:", JSON.stringify(user, null, 2)); await p.$disconnect(); } main().catch(e => { console.error(e); process.exit(1); }); diff --git a/.agent_work/debug-scripts/_query2.js b/.agent_work/debug-scripts/_query2.js new file mode 100644 index 000000000..4148485b4 --- /dev/null +++ b/.agent_work/debug-scripts/_query2.js @@ -0,0 +1 @@ +const { PrismaClient } = require("./node_modules/.prisma/client"); const p = new PrismaClient(); async function main() { const user = await p.user.findFirst({ where: { email: "owner@example.com" }, select: { id: true, email: true, name: true, isSuperAdmin: true, accountStatus: true, passwordHash: true } }); console.log("User:", JSON.stringify({...user, passwordHash: user?.passwordHash ? "SET" : "NOT SET"}, null, 2)); const products = await p.product.findMany({ take: 5, select: { id: true, name: true, slug: true, price: true, discountType: true, discountValue: true, discountStartDate: true, discountEndDate: true, storeId: true } }); console.log("Products:", JSON.stringify(products, null, 2)); await p.$disconnect(); } main().catch(e => { console.error(e.message); process.exit(1); }); diff --git a/.agent_work/debug-scripts/_query3.js b/.agent_work/debug-scripts/_query3.js new file mode 100644 index 000000000..6815bcf47 --- /dev/null +++ b/.agent_work/debug-scripts/_query3.js @@ -0,0 +1 @@ +const { PrismaClient } = require("./node_modules/.prisma/client"); const p = new PrismaClient(); async function main() { const products = await p.product.findMany({ take: 5, select: { id: true, name: true, slug: true, price: true, discountType: true, discountValue: true, discountStartDate: true, discountEndDate: true, storeId: true, status: true } }); console.log("Products:", JSON.stringify(products, null, 2)); const variants = await p.productVariant.findFirst({ select: { id: true, name: true, discountType: true, discountValue: true } }); console.log("Variant:", JSON.stringify(variants, null, 2)); await p.$disconnect(); } main().catch(e => { console.error(e.message); process.exit(1); }); diff --git a/.agent_work/debug-scripts/_query4.js b/.agent_work/debug-scripts/_query4.js new file mode 100644 index 000000000..2eadcd128 --- /dev/null +++ b/.agent_work/debug-scripts/_query4.js @@ -0,0 +1 @@ +const { PrismaClient } = require("./node_modules/.prisma/client"); const p = new PrismaClient(); async function main() { const memberships = await p.membership.findMany({ where: { user: { email: "owner@example.com" } }, select: { role: true, organization: { select: { name: true, slug: true } } } }); console.log("Owner Memberships:", JSON.stringify(memberships, null, 2)); const storeStaff = await p.storeStaff.findMany({ where: { user: { email: "owner@example.com" } }, select: { role: true, store: { select: { name: true, slug: true } } } }); console.log("Store Staff:", JSON.stringify(storeStaff, null, 2)); await p.$disconnect(); } main().catch(e => { console.error(e.message); process.exit(1); }); diff --git a/.agent_work/debug-scripts/_set_discount.js b/.agent_work/debug-scripts/_set_discount.js new file mode 100644 index 000000000..c3f2bc212 --- /dev/null +++ b/.agent_work/debug-scripts/_set_discount.js @@ -0,0 +1 @@ +const { PrismaClient } = require("./node_modules/.prisma/client"); const p = new PrismaClient(); async function main() { const result = await p.product.update({ where: { id: "cmldzi0x70010fmy4355cpzao" }, data: { discountType: "PERCENTAGE", discountValue: 20, discountStartDate: new Date("2025-01-01"), discountEndDate: new Date("2026-12-31") } }); console.log("Updated Nike Air Max 90 with 20% discount:", result.discountType, result.discountValue); const result2 = await p.product.update({ where: { id: "cmldzi0x70014fmy47kbpz429" }, data: { discountType: "FIXED_AMOUNT", discountValue: 50, discountStartDate: new Date("2025-01-01"), discountEndDate: new Date("2026-12-31") } }); console.log("Updated Sony WH-1000XM5 with $50 fixed discount:", result2.discountType, result2.discountValue); await p.$disconnect(); } main().catch(e => { console.error(e.message); process.exit(1); }); diff --git a/.agent_work/debug-scripts/get-nike-id.js b/.agent_work/debug-scripts/get-nike-id.js new file mode 100644 index 000000000..6e18ba41a --- /dev/null +++ b/.agent_work/debug-scripts/get-nike-id.js @@ -0,0 +1,9 @@ +const { PrismaClient } = require("@prisma/client"); +const p = new PrismaClient(); +(async () => { + const product = await p.product.findFirst({ + where: { slug: "nike-dri-fit-t-shirt" } + }); + console.log("Nike Product ID:", product?.id); + await p.$disconnect(); +})().catch(e => console.error(e)); diff --git a/.agent_work/fix-casing-v2.ps1 b/.agent_work/fix-casing-v2.ps1 new file mode 100644 index 000000000..d099a30d6 --- /dev/null +++ b/.agent_work/fix-casing-v2.ps1 @@ -0,0 +1,38 @@ +# Fix Prisma model accessor casing - PascalCase to camelCase +# PowerShell string comparison is case-INSENSITIVE by default! +# Must use -cne (case-sensitive not-equal) for comparison + +$models = @( + 'FacebookInventorySnapshot','FacebookCheckoutSession','ProductAttributeValue', + 'FacebookConversation','FacebookIntegration','FacebookWebhookLog', + 'InventoryReservation','FacebookOAuthState','PlatformActivity', + 'ProductAttribute','FacebookBatchJob','ProductVariant', + 'FacebookProduct','FacebookMessage','ConversionEvent', + 'WebhookDelivery','VerificationToken','CustomRoleRequest', + 'InventoryLog','DiscountCode','FacebookOrder','StoreRequest', + 'PaymentAttempt','Notification','ProjectMember','Membership', + 'OrderItem','Fulfillment','StoreStaff','AuditLog','RateLimit', + 'CustomRole','Organization','Customer','Category','Webhook', + 'Product','Account','Session','Project','Review','Brand', + 'Order','Store','User' +) + +$files = Get-ChildItem -Path src -Recurse -Include *.ts,*.tsx +$modCount = 0 + +foreach ($file in $files) { + $content = Get-Content $file.FullName -Raw + if ($null -eq $content) { continue } + $original = $content + foreach ($model in $models) { + $camel = $model.Substring(0,1).ToLower() + $model.Substring(1) + $content = $content.Replace("prisma.$model.", "prisma.$camel.") + } + # CRITICAL: Use -cne for case-sensitive comparison! + if ($content -cne $original) { + Set-Content -Path $file.FullName -Value $content -NoNewline + $modCount++ + } +} + +"DONE: Modified $modCount files" | Out-Host diff --git a/.agent_work/fix-casing-v3.ps1 b/.agent_work/fix-casing-v3.ps1 new file mode 100644 index 000000000..03180a1ed --- /dev/null +++ b/.agent_work/fix-casing-v3.ps1 @@ -0,0 +1,39 @@ +# Fix Prisma model accessor casing - PascalCase to camelCase +# v3: Uses -LiteralPath to handle [id] brackets in Next.js file paths +# Uses -cne for case-sensitive comparison + +$models = @( + 'FacebookInventorySnapshot','FacebookCheckoutSession','ProductAttributeValue', + 'FacebookConversation','FacebookIntegration','FacebookWebhookLog', + 'InventoryReservation','FacebookOAuthState','PlatformActivity', + 'ProductAttribute','FacebookBatchJob','ProductVariant', + 'FacebookProduct','FacebookMessage','ConversionEvent', + 'WebhookDelivery','VerificationToken','CustomRoleRequest', + 'InventoryLog','DiscountCode','FacebookOrder','StoreRequest', + 'PaymentAttempt','Notification','ProjectMember','Membership', + 'OrderItem','Fulfillment','StoreStaff','AuditLog','RateLimit', + 'CustomRole','Organization','Customer','Category','Webhook', + 'Product','Account','Session','Project','Review','Brand', + 'Order','Store','User' +) + +$files = Get-ChildItem -Path src -Recurse -Include *.ts,*.tsx +$modCount = 0 + +foreach ($file in $files) { + # Use -LiteralPath to handle brackets like [id] in Next.js paths + $content = Get-Content -LiteralPath $file.FullName -Raw + if ($null -eq $content) { continue } + $original = $content + foreach ($model in $models) { + $camel = $model.Substring(0,1).ToLower() + $model.Substring(1) + $content = $content.Replace("prisma.$model.", "prisma.$camel.") + } + # Use -cne for case-sensitive comparison + if ($content -cne $original) { + Set-Content -LiteralPath $file.FullName -Value $content -NoNewline + $modCount++ + } +} + +"DONE: Modified $modCount files" | Out-Host diff --git a/.agent_work/fix-casing.ps1 b/.agent_work/fix-casing.ps1 new file mode 100644 index 000000000..e1369a668 --- /dev/null +++ b/.agent_work/fix-casing.ps1 @@ -0,0 +1,36 @@ +# Fix Prisma model accessor casing - PascalCase to camelCase +# Run from the project root: . .\.agent_work\fix-casing.ps1 + +$models = @( + 'FacebookInventorySnapshot','FacebookCheckoutSession','ProductAttributeValue', + 'FacebookConversation','FacebookIntegration','FacebookWebhookLog', + 'InventoryReservation','FacebookOAuthState','PlatformActivity', + 'ProductAttribute','FacebookBatchJob','ProductVariant', + 'FacebookProduct','FacebookMessage','ConversionEvent', + 'WebhookDelivery','VerificationToken','CustomRoleRequest', + 'InventoryLog','DiscountCode','FacebookOrder','StoreRequest', + 'PaymentAttempt','Notification','ProjectMember','Membership', + 'OrderItem','Fulfillment','StoreStaff','AuditLog','RateLimit', + 'CustomRole','Organization','Customer','Category','Webhook', + 'Product','Account','Session','Project','Review','Brand', + 'Order','Store','User' +) + +$files = Get-ChildItem -Path src -Recurse -Include *.ts,*.tsx +$modCount = 0 + +foreach ($file in $files) { + $content = Get-Content $file.FullName -Raw + if ($null -eq $content) { continue } + $original = $content + foreach ($model in $models) { + $camel = $model.Substring(0,1).ToLower() + $model.Substring(1) + $content = $content.Replace("prisma.$model.", "prisma.$camel.") + } + if ($content -ne $original) { + Set-Content -Path $file.FullName -Value $content -NoNewline + $modCount++ + } +} + +"DONE: Modified $modCount files" | Out-Host diff --git a/.agent_work/fix-prisma-casing.ps1 b/.agent_work/fix-prisma-casing.ps1 new file mode 100644 index 000000000..f6c6cd249 --- /dev/null +++ b/.agent_work/fix-prisma-casing.ps1 @@ -0,0 +1,66 @@ +$models = @( + @('FacebookInventorySnapshot','facebookInventorySnapshot'), + @('FacebookCheckoutSession','facebookCheckoutSession'), + @('ProductAttributeValue','productAttributeValue'), + @('FacebookConversation','facebookConversation'), + @('FacebookIntegration','facebookIntegration'), + @('FacebookWebhookLog','facebookWebhookLog'), + @('InventoryReservation','inventoryReservation'), + @('FacebookOAuthState','facebookOAuthState'), + @('PlatformActivity','platformActivity'), + @('ProductAttribute','productAttribute'), + @('FacebookBatchJob','facebookBatchJob'), + @('ProductVariant','productVariant'), + @('FacebookProduct','facebookProduct'), + @('FacebookMessage','facebookMessage'), + @('ConversionEvent','conversionEvent'), + @('WebhookDelivery','webhookDelivery'), + @('VerificationToken','verificationToken'), + @('CustomRoleRequest','customRoleRequest'), + @('InventoryLog','inventoryLog'), + @('DiscountCode','discountCode'), + @('FacebookOrder','facebookOrder'), + @('StoreRequest','storeRequest'), + @('PaymentAttempt','paymentAttempt'), + @('Notification','notification'), + @('ProjectMember','projectMember'), + @('Membership','membership'), + @('OrderItem','orderItem'), + @('Fulfillment','fulfillment'), + @('StoreStaff','storeStaff'), + @('AuditLog','auditLog'), + @('RateLimit','rateLimit'), + @('CustomRole','customRole'), + @('Organization','organization'), + @('Customer','customer'), + @('Category','category'), + @('Webhook','webhook'), + @('Product','product'), + @('Account','account'), + @('Session','session'), + @('Project','project'), + @('Review','review'), + @('Brand','brand'), + @('Order','order'), + @('Store','store'), + @('User','user') +) + +$files = Get-ChildItem -Path src -Recurse -Include *.ts,*.tsx +$modCount = 0 + +foreach ($file in $files) { + $content = [System.IO.File]::ReadAllText($file.FullName) + $original = $content + foreach ($m in $models) { + $pattern = 'prisma\.' + $m[0] + '\b' + $replacement = 'prisma.' + $m[1] + $content = [regex]::Replace($content, $pattern, $replacement) + } + if ($content -ne $original) { + [System.IO.File]::WriteAllText($file.FullName, $content) + $modCount++ + } +} + +Write-Host "Modified $modCount files" diff --git a/.agent_work/fix-prisma-casing2.ps1 b/.agent_work/fix-prisma-casing2.ps1 new file mode 100644 index 000000000..dbac6a976 --- /dev/null +++ b/.agent_work/fix-prisma-casing2.ps1 @@ -0,0 +1,79 @@ +param() + +$ErrorActionPreference = 'Stop' + +$models = @( + @('FacebookInventorySnapshot','facebookInventorySnapshot'), + @('FacebookCheckoutSession','facebookCheckoutSession'), + @('ProductAttributeValue','productAttributeValue'), + @('FacebookConversation','facebookConversation'), + @('FacebookIntegration','facebookIntegration'), + @('FacebookWebhookLog','facebookWebhookLog'), + @('InventoryReservation','inventoryReservation'), + @('FacebookOAuthState','facebookOAuthState'), + @('PlatformActivity','platformActivity'), + @('ProductAttribute','productAttribute'), + @('FacebookBatchJob','facebookBatchJob'), + @('ProductVariant','productVariant'), + @('FacebookProduct','facebookProduct'), + @('FacebookMessage','facebookMessage'), + @('ConversionEvent','conversionEvent'), + @('WebhookDelivery','webhookDelivery'), + @('VerificationToken','verificationToken'), + @('CustomRoleRequest','customRoleRequest'), + @('InventoryLog','inventoryLog'), + @('DiscountCode','discountCode'), + @('FacebookOrder','facebookOrder'), + @('StoreRequest','storeRequest'), + @('PaymentAttempt','paymentAttempt'), + @('Notification','notification'), + @('ProjectMember','projectMember'), + @('Membership','membership'), + @('OrderItem','orderItem'), + @('Fulfillment','fulfillment'), + @('StoreStaff','storeStaff'), + @('AuditLog','auditLog'), + @('RateLimit','rateLimit'), + @('CustomRole','customRole'), + @('Organization','organization'), + @('Customer','customer'), + @('Category','category'), + @('Webhook','webhook'), + @('Product','product'), + @('Account','account'), + @('Session','session'), + @('Project','project'), + @('Review','review'), + @('Brand','brand'), + @('Order','order'), + @('Store','store'), + @('User','user') +) + +$files = Get-ChildItem -Path "src" -Recurse -Include "*.ts","*.tsx" +$modCount = 0 +$totalReplacements = 0 + +foreach ($file in $files) { + try { + $content = [System.IO.File]::ReadAllText($file.FullName) + $original = $content + + foreach ($m in $models) { + $pascal = $m[0] + $camel = $m[1] + $pattern = "prisma\.$pascal(?=\.|\.)" + # Use lookahead for . which follows model name like prisma.User.findMany + $content = $content -creplace "prisma\.$pascal\.", "prisma.$camel." + } + + if ($content -ne $original) { + [System.IO.File]::WriteAllText($file.FullName, $content) + $modCount++ + } + } catch { + Write-Host "ERROR on $($file.Name): $_" + } +} + +Write-Host "Modified: $modCount files" diff --git a/.agent_work/fix-prisma-casing3.ps1 b/.agent_work/fix-prisma-casing3.ps1 new file mode 100644 index 000000000..88a1c9d02 --- /dev/null +++ b/.agent_work/fix-prisma-casing3.ps1 @@ -0,0 +1,78 @@ +param() + +$ErrorActionPreference = 'Stop' + +# All Prisma models - longest first to avoid partial matches +$models = @( + 'FacebookInventorySnapshot', + 'FacebookCheckoutSession', + 'ProductAttributeValue', + 'FacebookConversation', + 'FacebookIntegration', + 'FacebookWebhookLog', + 'InventoryReservation', + 'FacebookOAuthState', + 'PlatformActivity', + 'ProductAttribute', + 'FacebookBatchJob', + 'ProductVariant', + 'FacebookProduct', + 'FacebookMessage', + 'ConversionEvent', + 'WebhookDelivery', + 'VerificationToken', + 'CustomRoleRequest', + 'InventoryLog', + 'DiscountCode', + 'FacebookOrder', + 'StoreRequest', + 'PaymentAttempt', + 'Notification', + 'ProjectMember', + 'Membership', + 'OrderItem', + 'Fulfillment', + 'StoreStaff', + 'AuditLog', + 'RateLimit', + 'CustomRole', + 'Organization', + 'Customer', + 'Category', + 'Webhook', + 'Product', + 'Account', + 'Session', + 'Project', + 'Review', + 'Brand', + 'Order', + 'Store', + 'User' +) + +function ToCamelCase($s) { + return $s.Substring(0,1).ToLower() + $s.Substring(1) +} + +$files = Get-ChildItem -Path "src" -Recurse -Include "*.ts","*.tsx" +$modCount = 0 + +foreach ($file in $files) { + $content = Get-Content $file.FullName -Raw + if ($null -eq $content) { continue } + $original = $content + + foreach ($model in $models) { + $camel = ToCamelCase $model + # Replace prisma.ModelName. with prisma.modelName. + $content = $content.Replace("prisma.$model.", "prisma.$camel.") + } + + if ($content -ne $original) { + Set-Content -Path $file.FullName -Value $content -NoNewline + $modCount++ + } +} + +Write-Host "Modified: $modCount files" diff --git a/.agent_work/fix-relation-casing-2b.ps1 b/.agent_work/fix-relation-casing-2b.ps1 new file mode 100644 index 000000000..706751329 --- /dev/null +++ b/.agent_work/fix-relation-casing-2b.ps1 @@ -0,0 +1,38 @@ +# Phase 2b: Fix remaining Store/Brand include keys and result access +# Plus OrderItem → items in Order contexts + +$files = Get-ChildItem -Path src -Recurse -Include *.ts,*.tsx +$modCount = 0 +$changeLog = @() + +foreach ($file in $files) { + $content = Get-Content -LiteralPath $file.FullName -Raw + if ($null -eq $content) { continue } + $original = $content + + # TS2561: Store → store in include/select/where keys (20 errors) + $content = $content -creplace '(?<=[\s{,(])Store:', 'store:' + + # TS2561: Brand → brand in include keys (1 error) + $content = $content -creplace '(?<=[\s{,(])Brand:', 'brand:' + + # TS2551: .Store → .store result property access (50 errors) + # Careful not to match .StoreStaff or .StoreId + $content = $content -creplace '\.Store\b(?!Staff|Id|Request)', '.store' + + # TS2353: OrderItem → items in Order include/create keys (10 errors) + $content = $content -creplace '(?<=[\s{,(])OrderItem:', 'items:' + + # Result access: .OrderItem → .items (if any) + $content = $content -creplace '\.OrderItem\b', '.items' + + if ($content -cne $original) { + Set-Content -LiteralPath $file.FullName -Value $content -NoNewline + $changeLog += $file.FullName + $modCount++ + } +} + +"" | Out-Host +"PHASE 2b COMPLETE: Modified $modCount files" | Out-Host +$changeLog | ForEach-Object { " Modified: $_" } | Out-Host diff --git a/.agent_work/fix-relation-casing.ps1 b/.agent_work/fix-relation-casing.ps1 new file mode 100644 index 000000000..9daaef194 --- /dev/null +++ b/.agent_work/fix-relation-casing.ps1 @@ -0,0 +1,52 @@ +# Phase 2: Fix Prisma include/select/where property casing + result access casing +# Based on TS2551 and TS2561 error analysis +# Using -creplace for case-sensitive regex, -LiteralPath for [id] bracket paths + +$files = Get-ChildItem -Path src -Recurse -Include *.ts,*.tsx +$modCount = 0 +$changeLog = @() + +foreach ($file in $files) { + $content = Get-Content -LiteralPath $file.FullName -Raw + if ($null -eq $content) { continue } + $original = $content + + # ===== TS2561 FIXES: Include/select/where/count/create property key casing ===== + # These are PascalCase keys in Prisma query object literals + + # Membership → memberships (26 errors - always plural in Prisma) + $content = $content -creplace '\bMembership:', 'memberships:' + + # StoreStaff → storeStaff (3 errors - camelCase in Prisma) + $content = $content -creplace '\bStoreStaff:', 'storeStaff:' + + # Organization → organization in object keys (13 errors) + $content = $content -creplace '(?<=[\s{,(])Organization:', 'organization:' + + # Customer → customer in object keys (10 errors) + $content = $content -creplace '(?<=[\s{,(])Customer:', 'customer:' + + # Category → category in object keys (7 errors) + $content = $content -creplace '(?<=[\s{,(])Category:', 'category:' + + # ===== TS2551 FIXES: Result property access casing ===== + # .Organization → .organization (51 errors - result property access) + $content = $content -creplace '\.Organization\b', '.organization' + + # .Membership → .memberships (if any - related to include fixes above) + $content = $content -creplace '\.Membership\b', '.memberships' + + # .StoreStaff → .storeStaff (if any) + $content = $content -creplace '\.StoreStaff\b', '.storeStaff' + + if ($content -cne $original) { + Set-Content -LiteralPath $file.FullName -Value $content -NoNewline + $changeLog += $file.FullName + $modCount++ + } +} + +"" | Out-Host +"PHASE 2 COMPLETE: Modified $modCount files" | Out-Host +"" | Out-Host +$changeLog | ForEach-Object { " Modified: $_" } | Out-Host diff --git a/.agent_work/fix-remaining.js b/.agent_work/fix-remaining.js new file mode 100644 index 000000000..a93b04403 --- /dev/null +++ b/.agent_work/fix-remaining.js @@ -0,0 +1,171 @@ +// Phase 3: Fix remaining TypeScript errors +const fs = require('fs'); +const path = require('path'); + +function fixFile(filePath, replacements) { + if (!fs.existsSync(filePath)) { + console.log('SKIP (not found): ' + filePath); + return; + } + let content = fs.readFileSync(filePath, 'utf8'); + const original = content; + + for (const [search, replace] of replacements) { + if (typeof search === 'string') { + while (content.includes(search)) { + content = content.replace(search, replace); + } + } else { + content = content.replace(search, replace); + } + } + + if (content !== original) { + fs.writeFileSync(filePath, content); + console.log('Fixed: ' + filePath); + } else { + console.log('No changes: ' + filePath); + } +} + +// ============================================================================ +// 1. order.service.ts - Product/ProductVariant in OrderItem includes + result access +// ============================================================================ +fixFile('src/lib/services/order.service.ts', [ + // In OrderItem include context: Product: → product:, ProductVariant: → variant: + [/(\s+)Product: \{/g, '$1product: {'], + [/(\s+)ProductVariant: \{/g, '$1variant: {'], + // Result access on items: item.Product → item.product, item.ProductVariant → item.variant + ['item.Product', 'item.product'], + ['item.ProductVariant', 'item.variant'], + // order.Customer → order.customer (in getInvoiceData) + ['order.Customer', 'order.customer'], +]); + +// ============================================================================ +// 2. order-processing.service.ts - Product in ProductVariantInclude + result access +// ============================================================================ +fixFile('src/lib/services/order-processing.service.ts', [ + // In ProductVariant include context: Product: → product: + [/(\s+)Product: \{/g, '$1product: {'], + // Result access: variant.Product → variant.product + ['.Product', '.product'], +]); + +// ============================================================================ +// 3. store.service.ts - Product in StoreCountOutputTypeSelect → products +// ============================================================================ +fixFile('src/lib/services/store.service.ts', [ + // In _count select: Product: → products: + ['Product: true', 'products: true'], +]); + +// ============================================================================ +// 4. src/app/api/orders/route.ts - .Customer → .customer (result access with include) +// ============================================================================ +fixFile('src/app/api/orders/route.ts', [ + ['.Customer', '.customer'], +]); + +// ============================================================================ +// 5. src/app/api/orders/stream/route.ts - .Customer → .customer +// ============================================================================ +fixFile('src/app/api/orders/stream/route.ts', [ + ['.Customer', '.customer'], +]); + +// ============================================================================ +// 6. src/app/api/store/[slug]/orders/route.ts - Product in ProductVariantWhereInput → product +// ============================================================================ +fixFile('src/app/api/store/[slug]/orders/route.ts', [ + [/(\s+)Product: \{/g, '$1product: {'], +]); + +// ============================================================================ +// 7. src/app/api/store/[slug]/orders/track/route.ts - Product in OrderItemInclude → product +// Also .Customer → .customer +// ============================================================================ +fixFile('src/app/api/store/[slug]/orders/track/route.ts', [ + [/(\s+)Product: \{/g, '$1product: {'], + ['.Customer', '.customer'], +]); + +// ============================================================================ +// 8. src/app/api/stores/[id]/custom-roles/route.ts - storeStaff → staff +// ============================================================================ +fixFile('src/app/api/stores/[id]/custom-roles/route.ts', [ + ['storeStaff:', 'staff:'], +]); + +// ============================================================================ +// 9. src/app/store/[slug]/layout.tsx - category → categories in StoreInclude +// Also .Category → need to check context +// ============================================================================ +// Need to read this file to understand the specific fix needed +const layoutPath = 'src/app/store/[slug]/layout.tsx'; +if (fs.existsSync(layoutPath)) { + let content = fs.readFileSync(layoutPath, 'utf8'); + // Fix include key: category: → categories: + content = content.replace(/category: \{/g, 'categories: {'); + content = content.replace(/category: true/g, 'categories: true'); + // Fix result access: .Category → .categories (it's an array relation on Store) + content = content.replace(/\.Category\b/g, '.categories'); + fs.writeFileSync(layoutPath, content); + console.log('Fixed: ' + layoutPath); +} + +// ============================================================================ +// 10. src/app/store/[slug]/components/product-card.tsx - .Category → .category +// (Product has singular category relation) +// ============================================================================ +fixFile('src/app/store/[slug]/components/product-card.tsx', [ + ['.Category', '.category'], +]); + +// ============================================================================ +// 11. src/app/store/[slug]/products/[productSlug]/page.tsx +// - ProductVariant → variants in ProductInclude +// - .Category → .category (Product singular relation) +// - .Brand → .brand (Product singular relation) +// - .ProductVariant → .variants (Product plural relation) +// ============================================================================ +fixFile('src/app/store/[slug]/products/[productSlug]/page.tsx', [ + // In Product include: ProductVariant: → variants: + ['ProductVariant:', 'variants:'], + // Result access (Product model): + ['.Category', '.category'], + ['.Brand', '.brand'], + ['.ProductVariant', '.variants'], +]); + +// ============================================================================ +// 12. src/app/store/[slug]/categories/page.tsx - Product in CategoryCountOutputTypeSelect → products +// Also _count issue - need include for _count +// ============================================================================ +fixFile('src/app/store/[slug]/categories/page.tsx', [ + ['Product: true', 'products: true'], +]); + +// ============================================================================ +// 13. src/app/store/[slug]/page.tsx - Product in CategoryCountOutputTypeSelect → products +// ============================================================================ +fixFile('src/app/store/[slug]/page.tsx', [ + ['Product: true', 'products: true'], +]); + +// ============================================================================ +// 14. playwright.config.ts - duplicate property (TS1117) +// ============================================================================ +// Need to check what the duplicate property is +const playwrightPath = 'playwright.config.ts'; +if (fs.existsSync(playwrightPath)) { + let content = fs.readFileSync(playwrightPath, 'utf8'); + const lines = content.split('\n'); + // Line 60 has duplicate property - check what it is + console.log('playwright.config.ts line 58-62:'); + for (let i = 57; i < Math.min(63, lines.length); i++) { + console.log(` ${i+1}: ${lines[i]}`); + } +} + +console.log('\n=== Phase 3 fixes complete ==='); diff --git a/.agent_work/lint-latest.txt b/.agent_work/lint-latest.txt new file mode 100644 index 000000000..e69de29bb diff --git a/.agent_work/lint-report.js b/.agent_work/lint-report.js new file mode 100644 index 000000000..54ce1e46c --- /dev/null +++ b/.agent_work/lint-report.js @@ -0,0 +1,15 @@ +const { execSync } = require('child_process'); +try { + execSync('npx eslint --format json', { encoding: 'utf8', maxBuffer: 10*1024*1024 }); + console.log('NO ISSUES'); +} catch(e) { + const files = JSON.parse(e.stdout).filter(f => f.errorCount + f.warningCount > 0); + files.forEach(f => { + const p = f.filePath.replace(/.*stormcom./, ''); + console.log('\n' + p + ': ' + f.errorCount + 'E ' + f.warningCount + 'W'); + f.messages.forEach(m => + console.log(' L' + m.line + ': ' + (m.severity === 2 ? 'ERR' : 'WRN') + ' [' + m.ruleId + '] ' + m.message.substring(0, 100)) + ); + }); + console.log('\nTOTAL: ' + files.reduce((s,f) => s + f.errorCount, 0) + ' errors, ' + files.reduce((s,f) => s + f.warningCount, 0) + ' warnings'); +} diff --git a/.agent_work/ts-errors-fresh.txt b/.agent_work/ts-errors-fresh.txt new file mode 100644 index 000000000..d35ec028c --- /dev/null +++ b/.agent_work/ts-errors-fresh.txt @@ -0,0 +1,4 @@ + +> stormcom@0.1.0 type-check +> tsc --noEmit --incremental + diff --git a/.agent_work/ts-errors-phase2.txt b/.agent_work/ts-errors-phase2.txt new file mode 100644 index 000000000..9f0cc9249 --- /dev/null +++ b/.agent_work/ts-errors-phase2.txt @@ -0,0 +1,208 @@ + +> stormcom@0.1.0 type-check +> tsc --noEmit --incremental + +playwright.config.ts(60,3): error TS1117: An object literal cannot have multiple properties with the same name. +src/app/admin/organizations/page.tsx(20,7): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/app/admin/organizations/page.tsx(85,27): error TS2339: Property 'memberships' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(85,45): error TS7006: Parameter 'm' implicitly has an 'any' type. +src/app/admin/organizations/page.tsx(95,37): error TS2339: Property 'Store' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(96,24): error TS2339: Property 'Store' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(114,62): error TS2339: Property 'Store' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(121,62): error TS2339: Property '_count' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(125,20): error TS2339: Property 'Store' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(129,48): error TS2339: Property 'Store' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(132,26): error TS2339: Property 'Store' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/users/[id]/page.tsx(43,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'StoreStaffInclude'. Did you mean to write 'store'? +src/app/admin/users/[id]/page.tsx(255,21): error TS2339: Property 'activitiesReceived' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(261,25): error TS2339: Property 'activitiesReceived' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(261,49): error TS7006: Parameter 'activity' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(298,21): error TS2339: Property 'storeStaff' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(304,25): error TS2339: Property 'storeStaff' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(304,41): error TS7006: Parameter 'staff' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(335,21): error TS2339: Property 'memberships' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(341,25): error TS2339: Property 'memberships' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(341,42): error TS7006: Parameter 'membership' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(373,53): error TS2339: Property 'storeStaff' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(378,53): error TS2339: Property 'memberships' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(383,53): error TS2339: Property '_count' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(31,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'StoreStaffSelect'. Did you mean to write 'store'? +src/app/admin/users/page.tsx(60,17): error TS2339: Property 'storeStaff' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(61,21): error TS2339: Property 'storeStaff' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(62,29): error TS2339: Property '_count' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/app/api/admin/users/[id]/route.ts(43,13): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'StoreStaffInclude'. Did you mean to write 'store'? +src/app/api/integrations/facebook/analytics/route.ts(111,36): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: { ...; }[]; } & {...'. Did you mean 'store'? +src/app/api/integrations/facebook/analytics/route.ts(118,49): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: { ...; }[]; } & {...'. Did you mean 'store'? +src/app/api/integrations/facebook/analytics/route.ts(129,7): error TS7006: Parameter 'p' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(132,7): error TS7006: Parameter 'p' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(137,7): error TS7006: Parameter 'o' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(140,7): error TS7006: Parameter 'o' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(150,63): error TS7006: Parameter 's' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(157,42): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: { ...; }[]; } & {...'. Did you mean 'store'? +src/app/api/integrations/facebook/analytics/route.ts(167,42): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: { ...; }[]; } & {...'. Did you mean 'store'? +src/app/api/integrations/facebook/catalog/route.ts(55,36): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/catalog/route.ts(62,49): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/conversions/route.ts(97,51): error TS2551: Property 'Store' does not exist on type '{ store: { facebookIntegration: { id: string; } | null; id: string; } | null; } & { id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. Did you mean 'store'? +src/app/api/integrations/facebook/conversions/route.ts(524,51): error TS2551: Property 'Store' does not exist on type '{ store: { facebookIntegration: { id: string; } | null; id: string; } | null; } & { id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. Did you mean 'store'? +src/app/api/integrations/facebook/disconnect/route.ts(50,36): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/disconnect/route.ts(57,49): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/disconnect/route.ts(139,49): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/messages/[conversationId]/read/route.ts(48,35): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/messages/[conversationId]/read/route.ts(55,45): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/messages/[conversationId]/route.ts(54,35): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/messages/[conversationId]/route.ts(61,45): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/messages/route.ts(52,35): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/messages/route.ts(59,45): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/messages/route.ts(223,35): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/messages/route.ts(230,45): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/oauth/connect/route.ts(42,36): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/oauth/connect/route.ts(49,45): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/orders/poll/route.ts(47,36): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/orders/poll/route.ts(54,49): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/orders/poll/route.ts(187,36): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; } & { ...; }) | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/orders/poll/route.ts(194,49): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; } & { ...; }) | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/orders/sync/route.ts(47,36): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/orders/sync/route.ts(54,49): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/products/sync/route.ts(44,36): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/products/sync/route.ts(51,45): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/settings/route.ts(50,36): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/settings/route.ts(57,49): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/settings/route.ts(169,44): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; isActive: boolean; lastError: string | null; pageId: string; pageName: string; catalogId: string | null; catalogName: string | null; ... 5 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/status/route.ts(55,36): error TS2551: Property 'Store' does not exist on type '{ store: { facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; id: string; country: string; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/status/route.ts(62,43): error TS2551: Property 'Store' does not exist on type '{ store: { facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; id: string; country: string; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/status/route.ts(185,36): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/status/route.ts(192,49): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/webhooks/subscribe/route.ts(45,36): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/integrations/facebook/webhooks/subscribe/route.ts(52,49): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; accessToken: string; ... 17 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/api/orders/[id]/invoice/route.ts(55,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/orders/[id]/route.ts(44,20): error TS2339: Property 'OrderItem' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/orders/[id]/route.ts(44,36): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/orders/[id]/route.ts(101,20): error TS2339: Property 'OrderItem' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/orders/[id]/route.ts(101,36): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/orders/route.ts(78,27): error TS2551: Property 'Customer' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(79,20): error TS2551: Property 'Customer' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(79,48): error TS2551: Property 'Customer' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(81,28): error TS2551: Property 'Customer' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(230,39): error TS2551: Property 'Customer' does not exist on type '{ customer: { firstName: string; lastName: string; } | null; id: string; createdAt: Date; status: OrderStatus; orderNumber: string; totalAmount: number; }'. Did you mean 'customer'? +src/app/api/orders/stream/route.ts(231,32): error TS2551: Property 'Customer' does not exist on type '{ customer: { firstName: string; lastName: string; } | null; id: string; createdAt: Date; status: OrderStatus; orderNumber: string; totalAmount: number; }'. Did you mean 'customer'? +src/app/api/orders/stream/route.ts(231,60): error TS2551: Property 'Customer' does not exist on type '{ customer: { firstName: string; lastName: string; } | null; id: string; createdAt: Date; status: OrderStatus; orderNumber: string; totalAmount: number; }'. Did you mean 'customer'? +src/app/api/store/[slug]/orders/[id]/invoice/route.ts(72,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/store/[slug]/orders/route.ts(182,15): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'ProductVariantWhereInput'. Did you mean to write 'product'? +src/app/api/store/[slug]/orders/route.ts(434,13): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'Without & OrderUncheckedCreateInput'. +src/app/api/store/[slug]/orders/route.ts(461,13): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/app/api/store/[slug]/orders/route.ts(655,24): error TS2339: Property 'OrderItem' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/store/[slug]/orders/track/route.ts(69,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/app/api/store/[slug]/orders/track/route.ts(116,25): error TS2551: Property 'Customer' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/store/[slug]/orders/track/route.ts(117,22): error TS2339: Property 'OrderItem' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/store/[slug]/orders/track/route.ts(117,37): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/store/[slug]/orders/track/route.ts(134,24): error TS2339: Property 'errors' does not exist on type 'ZodError'. +src/app/api/stores/[id]/custom-roles/route.ts(34,11): error TS2353: Object literal may only specify known properties, and 'storeStaff' does not exist in type 'StoreWhereInput'. +src/app/api/stores/[id]/theme/route.ts(51,9): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type '(Without & OrganizationWhereInput) | (Without<...> & OrganizationScalarRelationFilter)'. Did you mean to write 'store'? +src/app/api/stores/current/pathao-config/route.ts(45,36): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/stores/current/pathao-config/route.ts(49,43): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/stores/current/pathao-config/route.ts(95,36): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/api/stores/current/pathao-config/route.ts(107,43): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/dashboard/integrations/facebook/messages/page.tsx(35,33): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/dashboard/integrations/facebook/messages/page.tsx(42,40): error TS2551: Property 'Store' does not exist on type '{ store: { id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; } | null; } & { ...; }'. Did you mean 'store'? +src/app/dashboard/integrations/facebook/page.tsx(98,34): error TS2551: Property 'Store' does not exist on type '{ store: { facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; id: string; country: string; } | null; } & ...'. Did you mean 'store'? +src/app/dashboard/integrations/facebook/page.tsx(102,47): error TS2551: Property 'Store' does not exist on type '{ store: { facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; id: string; country: string; } | null; } & ...'. Did you mean 'store'? +src/app/dashboard/integrations/facebook/page.tsx(105,48): error TS2551: Property 'Store' does not exist on type '{ store: { facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; id: string; country: string; } | null; } & ...'. Did you mean 'store'? +src/app/dashboard/integrations/facebook/page.tsx(109,6): error TS7006: Parameter 'acc' implicitly has an 'any' type. +src/app/dashboard/integrations/facebook/page.tsx(109,11): error TS7006: Parameter 'product' implicitly has an 'any' type. +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(47,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(55,25): error TS2551: Property 'organization' does not exist on type '{ id: string; userId: string; createdAt: Date; updatedAt: Date; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(59,33): error TS2551: Property 'organization' does not exist on type '{ id: string; userId: string; createdAt: Date; updatedAt: Date; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/app/settings/integrations/facebook/page.tsx(89,34): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/settings/integrations/facebook/page.tsx(93,47): error TS2551: Property 'Store' does not exist on type '{ store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; } & { ...; }) | null; } & { ...; }'. Did you mean 'store'? +src/app/settings/integrations/facebook/page.tsx(98,6): error TS7006: Parameter 'acc' implicitly has an 'any' type. +src/app/settings/integrations/facebook/page.tsx(98,11): error TS7006: Parameter 'product' implicitly has an 'any' type. +src/app/store/[slug]/categories/page.tsx(48,11): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'CategoryCountOutputTypeSelect'. Did you mean to write 'products'? +src/app/store/[slug]/categories/page.tsx(89,35): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/categories/page.tsx(89,61): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/components/product-card.tsx(111,22): error TS2551: Property 'Category' does not exist on type '{ name: string; slug: string; price: number; compareAtPrice?: number | null | undefined; thumbnailUrl?: string | null | undefined; images: string; discountType?: DiscountType | null | undefined; ... 4 more ...; isFeatured?: boolean | undefined; }'. Did you mean 'category'? +src/app/store/[slug]/components/product-card.tsx(113,26): error TS2551: Property 'Category' does not exist on type '{ name: string; slug: string; price: number; compareAtPrice?: number | null | undefined; thumbnailUrl?: string | null | undefined; images: string; discountType?: DiscountType | null | undefined; ... 4 more ...; isFeatured?: boolean | undefined; }'. Did you mean 'category'? +src/app/store/[slug]/layout.tsx(81,7): error TS2353: Object literal may only specify known properties, and 'category' does not exist in type 'StoreInclude'. +src/app/store/[slug]/layout.tsx(110,27): error TS2339: Property 'Category' does not exist on type '{ id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. +src/app/store/[slug]/page.tsx(169,11): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'CategoryCountOutputTypeSelect'. Did you mean to write 'products'? +src/app/store/[slug]/page.tsx(267,31): error TS2339: Property '_count' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(267,57): error TS2339: Property '_count' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(272,27): error TS2339: Property '_count' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(274,31): error TS2339: Property '_count' does not exist on type '{ id: string; name: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/products/[productSlug]/page.tsx(95,7): error TS2561: Object literal may only specify known properties, but 'Brand' does not exist in type 'ProductInclude'. Did you mean to write 'brand'? +src/app/store/[slug]/products/[productSlug]/page.tsx(157,15): error TS2551: Property 'Category' does not exist on type '{ length: number | null; id: string; name: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(159,22): error TS2551: Property 'Category' does not exist on type '{ length: number | null; id: string; name: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(160,56): error TS2551: Property 'Category' does not exist on type '{ length: number | null; id: string; name: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(183,24): error TS2551: Property 'Category' does not exist on type '{ length: number | null; id: string; name: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(184,53): error TS2551: Property 'Category' does not exist on type '{ length: number | null; id: string; name: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(186,24): error TS2551: Property 'Brand' does not exist on type '{ length: number | null; id: string; name: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'brandId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(187,51): error TS2551: Property 'Brand' does not exist on type '{ length: number | null; id: string; name: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'brandId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(225,33): error TS2339: Property 'ProductVariant' does not exist on type '{ length: number | null; id: string; name: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. +src/app/store/[slug]/products/[productSlug]/page.tsx(225,53): error TS7006: Parameter 'v' implicitly has an 'any' type. +src/app/track/order/[orderId]/page.tsx(90,41): error TS2339: Property 'order_status' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(205,33): error TS2339: Property 'delivered_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(214,41): error TS2339: Property 'delivered_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(225,33): error TS2339: Property 'picked_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(234,41): error TS2339: Property 'picked_at' does not exist on type 'never'. +src/lib/auth-helpers.ts(60,15): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/lib/auth-helpers.ts(70,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'StoreStaffInclude'. Did you mean to write 'store'? +src/lib/auth-helpers.ts(84,38): error TS2339: Property 'memberships' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/lib/auth-helpers.ts(98,37): error TS2339: Property 'storeStaff' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/lib/auth.ts(186,21): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationSelect'. Did you mean to write 'store'? +src/lib/auth.ts(210,48): error TS2339: Property 'memberships' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/lib/auth.ts(217,47): error TS2339: Property 'storeStaff' does not exist on type '{ id: string; name: string | null; email: string | null; emailVerified: Date | null; image: string | null; passwordHash: string | null; isSuperAdmin: boolean; accountStatus: AccountStatus; ... 10 more ...; updatedAt: Date; }'. +src/lib/get-current-user.ts(69,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/lib/get-current-user.ts(79,22): error TS2551: Property 'organization' does not exist on type '{ id: string; userId: string; createdAt: Date; updatedAt: Date; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/lib/get-current-user.ts(108,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type '(Without & OrganizationWhereInput) | (Without<...> & OrganizationScalarRelationFilter)'. Did you mean to write 'store'? +src/lib/get-current-user.ts(145,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/lib/get-current-user.ts(154,22): error TS2551: Property 'organization' does not exist on type '{ id: string; userId: string; createdAt: Date; updatedAt: Date; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/lib/integrations/facebook/order-polling-service.ts(109,20): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'FacebookIntegrationInclude'. Did you mean to write 'store'? +src/lib/query-helpers.ts(30,15): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/lib/query-helpers.ts(40,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'StoreStaffInclude'. Did you mean to write 'store'? +src/lib/query-helpers.ts(70,7): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/lib/query-helpers.ts(108,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type '(Without & OrganizationWhereInput) | (Without<...> & OrganizationScalarRelationFilter)'. Did you mean to write 'store'? +src/lib/query-helpers.ts(137,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/lib/query-helpers.ts(164,11): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/lib/query-helpers.ts(190,7): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'StoreStaffInclude'. Did you mean to write 'store'? +src/lib/services/order-processing.service.ts(90,24): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'ProductVariantInclude'. Did you mean to write 'product'? +src/lib/services/order-processing.service.ts(98,23): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(105,49): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(110,56): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(116,34): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(320,20): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order-processing.service.ts(327,29): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/lib/services/order-processing.service.ts(328,20): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(329,17): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(425,20): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order-processing.service.ts(516,27): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/lib/services/order-processing.service.ts(517,18): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(518,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(226,11): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(276,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(364,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(434,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(513,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(542,25): error TS2339: Property 'OrderItem' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(543,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(544,12): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(558,5): error TS2322: Type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; } | null' is not assignable to type '({ customer: { id: string; userId: string | null; email: string; createdAt: Date; updatedAt: Date; storeId: string; firstName: string; lastName: string; phone: string | null; ... 6 more ...; deletedAt: Date | null; } | null; Store: never; OrderItem: never; } & { ...; }) | null'. + Type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is not assignable to type '{ customer: { id: string; userId: string | null; email: string; createdAt: Date; updatedAt: Date; storeId: string; firstName: string; lastName: string; phone: string | null; acceptsMarketing: boolean; ... 5 more ...; deletedAt: Date | null; } | null; Store: never; OrderItem: never; } & { ...; }'. + Type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is missing the following properties from type '{ customer: { id: string; userId: string | null; email: string; createdAt: Date; updatedAt: Date; storeId: string; firstName: string; lastName: string; phone: string | null; acceptsMarketing: boolean; ... 5 more ...; deletedAt: Date | null; } | null; Store: never; OrderItem: never; }': customer, Store, OrderItem +src/lib/services/order.service.ts(577,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(607,25): error TS2339: Property 'OrderItem' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(608,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(609,12): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(626,5): error TS2322: Type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; } | null' is not assignable to type '({ customer: { id: string; userId: string | null; email: string; createdAt: Date; updatedAt: Date; storeId: string; firstName: string; lastName: string; phone: string | null; ... 6 more ...; deletedAt: Date | null; } | null; Store: never; OrderItem: never; } & { ...; }) | null'. + Type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is not assignable to type '{ customer: { id: string; userId: string | null; email: string; createdAt: Date; updatedAt: Date; storeId: string; firstName: string; lastName: string; phone: string | null; acceptsMarketing: boolean; ... 5 more ...; deletedAt: Date | null; } | null; Store: never; OrderItem: never; } & { ...; }'. + Type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is missing the following properties from type '{ customer: { id: string; userId: string | null; email: string; createdAt: Date; updatedAt: Date; storeId: string; firstName: string; lastName: string; phone: string | null; acceptsMarketing: boolean; ... 5 more ...; deletedAt: Date | null; } | null; Store: never; OrderItem: never; }': customer, Store, OrderItem +src/lib/services/order.service.ts(649,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(691,20): error TS2551: Property 'Store' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'storeId'? +src/lib/services/order.service.ts(692,23): error TS2551: Property 'Customer' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/lib/services/order.service.ts(695,20): error TS2339: Property 'OrderItem' does not exist on type '{ discountCode: string | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(695,34): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(740,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/store.service.ts(182,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(207,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(284,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(313,23): error TS2339: Property '_count' does not exist on type '{ id: string; name: string; email: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. diff --git a/.agent_work/ts-errors-phase2b.txt b/.agent_work/ts-errors-phase2b.txt new file mode 100644 index 000000000..d35ec028c --- /dev/null +++ b/.agent_work/ts-errors-phase2b.txt @@ -0,0 +1,4 @@ + +> stormcom@0.1.0 type-check +> tsc --noEmit --incremental + diff --git a/.agent_work/ts-errors-remaining.txt b/.agent_work/ts-errors-remaining.txt new file mode 100644 index 000000000..360590070 --- /dev/null +++ b/.agent_work/ts-errors-remaining.txt @@ -0,0 +1,293 @@ + +> stormcom@0.1.0 type-check +> tsc --noEmit --incremental + +playwright.config.ts(60,3): error TS1117: An object literal cannot have multiple properties with the same name. +src/app/admin/organizations/page.tsx(41,11): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationCountOutputTypeSelect'. Did you mean to write 'memberships'? +src/app/admin/organizations/page.tsx(85,27): error TS2339: Property 'Membership' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(85,44): error TS7006: Parameter 'm' implicitly has an 'any' type. +src/app/admin/organizations/page.tsx(95,37): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(96,24): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(114,62): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(121,62): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(125,20): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(129,48): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(132,26): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/users/[id]/page.tsx(40,7): error TS2561: Object literal may only specify known properties, but 'StoreStaff' does not exist in type 'UserInclude'. Did you mean to write 'storeStaff'? +src/app/admin/users/[id]/page.tsx(255,21): error TS2339: Property 'activitiesReceived' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(261,25): error TS2339: Property 'activitiesReceived' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(261,49): error TS7006: Parameter 'activity' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(298,21): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(304,25): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(304,41): error TS7006: Parameter 'staff' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(335,21): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(341,25): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(341,41): error TS7006: Parameter 'membership' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(373,53): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(378,53): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(383,53): error TS2339: Property '_count' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(37,19): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserCountOutputTypeSelect'. Did you mean to write 'memberships'? +src/app/admin/users/page.tsx(60,17): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(61,21): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(62,29): error TS2339: Property '_count' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/admin/users/[id]/route.ts(40,9): error TS2561: Object literal may only specify known properties, but 'StoreStaff' does not exist in type 'UserInclude'. Did you mean to write 'storeStaff'? +src/app/api/admin/users/route.ts(63,11): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserSelect'. Did you mean to write 'memberships'? +src/app/api/gdpr/export/route.ts(36,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserInclude'. Did you mean to write 'memberships'? +src/app/api/gdpr/export/route.ts(59,20): error TS2339: Property 'accounts' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/gdpr/export/route.ts(59,34): error TS7006: Parameter 'account' implicitly has an 'any' type. +src/app/api/gdpr/export/route.ts(63,20): error TS2339: Property 'sessions' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/gdpr/export/route.ts(63,34): error TS7006: Parameter 'session' implicitly has an 'any' type. +src/app/api/gdpr/export/route.ts(66,25): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/gdpr/export/route.ts(66,41): error TS7006: Parameter 'membership' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(111,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/analytics/route.ts(118,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/analytics/route.ts(129,7): error TS7006: Parameter 'p' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(132,7): error TS7006: Parameter 'p' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(137,7): error TS7006: Parameter 'o' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(140,7): error TS7006: Parameter 'o' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(150,63): error TS7006: Parameter 's' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(157,29): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/analytics/route.ts(167,29): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/catalog/route.ts(55,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/catalog/route.ts(62,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(92,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(97,38): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(519,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(524,38): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/disconnect/route.ts(50,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/disconnect/route.ts(57,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/disconnect/route.ts(139,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/read/route.ts(48,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/read/route.ts(55,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/route.ts(54,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/route.ts(61,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(52,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(59,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(223,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(230,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/oauth/connect/route.ts(42,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/oauth/connect/route.ts(49,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(48,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(65,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(71,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(79,31): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(98,52): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(109,26): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(48,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(65,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(71,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(79,31): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(98,52): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(109,26): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(52,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(73,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(79,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(87,31): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(96,31): error TS2339: Property 'fulfillments' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(113,13): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(128,26): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(131,51): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(132,51): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(133,38): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-status/route.ts(47,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-status/route.ts(63,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-status/route.ts(69,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/poll/route.ts(47,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/poll/route.ts(54,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/poll/route.ts(187,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; } & { ...; }) | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/poll/route.ts(194,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; } & { ...; }) | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/sync/route.ts(47,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/sync/route.ts(54,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/products/batch-status/route.ts(47,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/products/batch-status/route.ts(65,32): error TS2551: Property 'store' does not exist on type '{ errors: string | null; id: string; storeId: string; status: string; completedAt: Date | null; batchHandle: string | null; totalItems: number; successCount: number; errorCount: number; startedAt: Date; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/products/batch-status/route.ts(130,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/products/batch-status/route.ts(142,29): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/integrations/facebook/products/sync/route.ts(44,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/products/sync/route.ts(51,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/settings/route.ts(50,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/settings/route.ts(57,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/settings/route.ts(169,31): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; isActive: boolean; lastError: string | null; pageId: string; pageName: string; catalogId: string | null; catalogName: string | null; ... 5 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(55,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; country: string; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(62,30): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; country: string; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(185,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(192,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/webhooks/subscribe/route.ts(45,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/webhooks/subscribe/route.ts(52,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/orders/[id]/invoice/route.ts(55,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/orders/[id]/route.ts(44,20): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/orders/[id]/route.ts(44,36): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/orders/[id]/route.ts(101,20): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/orders/[id]/route.ts(101,36): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/orders/route.ts(78,27): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(79,20): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(79,48): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(81,28): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(207,17): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderSelect'. Did you mean to write 'customer'? +src/app/api/orders/stream/route.ts(230,39): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(231,32): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(231,60): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/organizations/[slug]/invite/route.ts(44,23): error TS2345: Argument of type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }' is not assignable to parameter of type 'OrganizationWithMemberships'. + Property 'Membership' is missing in type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }' but required in type 'OrganizationWithMemberships'. +src/app/api/organizations/route.ts(38,9): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationUncheckedCreateInput) | (Without<...> & OrganizationCreateInput)'. Did you mean to write 'memberships'? +src/app/api/organizations/route.ts(40,18): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/organizations/route.ts(55,16): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationWhereInput'. Did you mean to write 'memberships'? +src/app/api/organizations/route.ts(58,29): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationCountOutputTypeSelect'. Did you mean to write 'memberships'? +src/app/api/permissions/route.ts(21,9): error TS2561: Object literal may only specify known properties, but 'StoreStaff' does not exist in type 'UserSelect'. Did you mean to write 'storeStaff'? +src/app/api/permissions/route.ts(37,12): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/permissions/route.ts(38,12): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/store/[slug]/orders/[id]/invoice/route.ts(72,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/store/[slug]/orders/route.ts(182,15): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'ProductVariantWhereInput'. Did you mean to write 'product'? +src/app/api/store/[slug]/orders/route.ts(434,13): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'Without & OrderUncheckedCreateInput'. +src/app/api/store/[slug]/orders/route.ts(461,13): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/app/api/store/[slug]/orders/route.ts(655,24): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/store/[slug]/orders/track/route.ts(55,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/app/api/store/[slug]/orders/track/route.ts(61,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/app/api/store/[slug]/orders/track/route.ts(116,25): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/store/[slug]/orders/track/route.ts(117,22): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/store/[slug]/orders/track/route.ts(117,37): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/store/[slug]/orders/track/route.ts(134,24): error TS2339: Property 'errors' does not exist on type 'ZodError'. +src/app/api/stores/[id]/custom-roles/route.ts(27,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationWhereInput) | (Without<...> & OrganizationScalarRelationFilter)'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/custom-roles/route.ts(34,11): error TS2353: Object literal may only specify known properties, and 'StoreStaff' does not exist in type 'StoreWhereInput'. +src/app/api/stores/[id]/custom-roles/route.ts(57,9): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationWhereInput) | (Without<...> & OrganizationScalarRelationFilter)'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/pathao/settings/route.ts(49,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationSelect'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/pathao/settings/route.ts(58,25): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/pathao/settings/route.ts(74,28): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/pathao/settings/route.ts(129,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationSelect'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/pathao/settings/route.ts(138,25): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/pathao/settings/route.ts(154,28): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/staff/route.ts(118,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationSelect'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/staff/route.ts(240,25): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/theme/route.ts(50,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipWhereInput'. Did you mean to write 'organization'? +src/app/api/stores/current/pathao-config/route.ts(45,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/stores/current/pathao-config/route.ts(49,30): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/stores/current/pathao-config/route.ts(95,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/stores/current/pathao-config/route.ts(107,30): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/messages/page.tsx(35,20): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/messages/page.tsx(42,27): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(98,20): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; ... 14 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; country: string; } | null; } & { ...; }...'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(102,34): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; ... 14 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; country: string; } | null; } & { ...; }...'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(105,35): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; ... 14 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; country: string; } | null; } & { ...; }...'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(109,6): error TS7006: Parameter 'acc' implicitly has an 'any' type. +src/app/dashboard/integrations/facebook/page.tsx(109,11): error TS7006: Parameter 'product' implicitly has an 'any' type. +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(45,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(55,25): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(59,33): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/page.tsx(54,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreSelect'. Did you mean to write 'organization'? +src/app/dashboard/stores/[storeId]/shipping/page.tsx(66,41): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/page.tsx(82,26): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(49,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreSelect'. Did you mean to write 'organization'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(62,41): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(66,26): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(144,31): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/settings/integrations/facebook/page.tsx(89,20): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; } & { ...; }) | null; } & ...'. Did you mean 'organization'? +src/app/settings/integrations/facebook/page.tsx(93,34): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; } & { ...; }) | null; } & ...'. Did you mean 'organization'? +src/app/settings/integrations/facebook/page.tsx(98,6): error TS7006: Parameter 'acc' implicitly has an 'any' type. +src/app/settings/integrations/facebook/page.tsx(98,11): error TS7006: Parameter 'product' implicitly has an 'any' type. +src/app/store/[slug]/categories/[categorySlug]/page.tsx(99,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/categories/page.tsx(48,11): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'CategoryCountOutputTypeSelect'. Did you mean to write 'products'? +src/app/store/[slug]/categories/page.tsx(89,35): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/categories/page.tsx(89,61): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/components/product-card.tsx(111,22): error TS2551: Property 'Category' does not exist on type '{ name: string; slug: string; price: number; compareAtPrice?: number | null | undefined; thumbnailUrl?: string | null | undefined; images: string; discountType?: DiscountType | null | undefined; ... 4 more ...; isFeatured?: boolean | undefined; }'. Did you mean 'category'? +src/app/store/[slug]/components/product-card.tsx(113,26): error TS2551: Property 'Category' does not exist on type '{ name: string; slug: string; price: number; compareAtPrice?: number | null | undefined; thumbnailUrl?: string | null | undefined; images: string; discountType?: DiscountType | null | undefined; ... 4 more ...; isFeatured?: boolean | undefined; }'. Did you mean 'category'? +src/app/store/[slug]/layout.tsx(78,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreInclude'. Did you mean to write 'organization'? +src/app/store/[slug]/layout.tsx(110,27): error TS2339: Property 'Category' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. +src/app/store/[slug]/page.tsx(77,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/page.tsx(108,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/page.tsx(142,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/page.tsx(169,11): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'CategoryCountOutputTypeSelect'. Did you mean to write 'products'? +src/app/store/[slug]/page.tsx(267,31): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(267,57): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(272,27): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(274,31): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/products/[productSlug]/page.tsx(88,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductInclude'. Did you mean to write 'category'? +src/app/store/[slug]/products/[productSlug]/page.tsx(145,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/products/[productSlug]/page.tsx(157,15): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(159,22): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(160,56): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(183,24): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(184,53): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(186,24): error TS2551: Property 'Brand' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'brandId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(187,51): error TS2551: Property 'Brand' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'brandId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(225,33): error TS2339: Property 'ProductVariant' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. +src/app/store/[slug]/products/[productSlug]/page.tsx(225,53): error TS7006: Parameter 'v' implicitly has an 'any' type. +src/app/store/[slug]/products/page.tsx(176,9): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/track/order/[orderId]/page.tsx(90,41): error TS2339: Property 'order_status' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(205,33): error TS2339: Property 'delivered_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(214,41): error TS2339: Property 'delivered_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(225,33): error TS2339: Property 'picked_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(234,41): error TS2339: Property 'picked_at' does not exist on type 'never'. +src/lib/auth-helpers.ts(56,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserInclude'. Did you mean to write 'memberships'? +src/lib/auth-helpers.ts(84,38): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/auth-helpers.ts(98,37): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/auth.ts(179,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserSelect'. Did you mean to write 'memberships'? +src/lib/auth.ts(210,48): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/auth.ts(217,47): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/get-current-user.ts(67,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/get-current-user.ts(79,22): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/lib/get-current-user.ts(107,9): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipWhereInput'. Did you mean to write 'organization'? +src/lib/get-current-user.ts(143,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/get-current-user.ts(154,22): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/lib/integrations/facebook/order-polling-service.ts(109,20): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'FacebookIntegrationInclude'. Did you mean to write 'store'? +src/lib/multi-tenancy.ts(44,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/lib/multi-tenancy.ts(56,20): error TS2339: Property 'Membership' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/lib/multi-tenancy.ts(115,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationWhereInput'. Did you mean to write 'memberships'? +src/lib/multi-tenancy.ts(120,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/lib/query-helpers.ts(26,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserInclude'. Did you mean to write 'memberships'? +src/lib/query-helpers.ts(57,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreInclude'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(70,7): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/lib/query-helpers.ts(107,9): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipWhereInput'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(135,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(162,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(190,7): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'StoreStaffInclude'. Did you mean to write 'store'? +src/lib/services/order-processing.service.ts(90,24): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'ProductVariantInclude'. Did you mean to write 'product'? +src/lib/services/order-processing.service.ts(98,23): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(105,49): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(110,56): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(116,34): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(320,20): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order-processing.service.ts(327,29): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/lib/services/order-processing.service.ts(328,20): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(329,17): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(425,20): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order-processing.service.ts(516,27): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/lib/services/order-processing.service.ts(517,18): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(518,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(37,55): error TS2344: Type '{ include: { Customer: true; OrderItem: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; Store: { ...; }; }; }' does not satisfy the constraint 'boolean | OrderDefaultArgs | null | undefined'. + Type '{ include: { Customer: true; OrderItem: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; Store: { ...; }; }; }' is not assignable to type 'OrderDefaultArgs'. + Types of property 'include' are incompatible. + Type '{ Customer: true; OrderItem: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; Store: { ...; }; }' has no properties in common with type 'OrderInclude'. +src/lib/services/order.service.ts(201,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(202,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(203,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(218,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(275,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(364,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(433,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(513,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(542,25): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(543,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(544,12): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(558,5): error TS2322: Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; } | null' is not assignable to type '({ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }) | null'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is not assignable to type '{ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is missing the following properties from type '{ Store: never; Customer: never; OrderItem: never; }': Store, Customer, OrderItem +src/lib/services/order.service.ts(577,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(607,25): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(608,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(609,12): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(626,5): error TS2322: Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; } | null' is not assignable to type '({ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }) | null'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is not assignable to type '{ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is missing the following properties from type '{ Store: never; Customer: never; OrderItem: never; }': Store, Customer, OrderItem +src/lib/services/order.service.ts(640,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(691,20): error TS2551: Property 'Store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'storeId'? +src/lib/services/order.service.ts(692,23): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/lib/services/order.service.ts(695,20): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(695,34): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(740,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/store.service.ts(146,11): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationUncheckedCreateInput) | (Without<...> & OrganizationCreateInput)'. Did you mean to write 'memberships'? +src/lib/services/store.service.ts(165,9): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreInclude'. Did you mean to write 'organization'? +src/lib/services/store.service.ts(182,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(207,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(284,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(313,23): error TS2339: Property '_count' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. diff --git a/.agent_work/ts2561-errors.txt b/.agent_work/ts2561-errors.txt new file mode 100644 index 000000000..360590070 --- /dev/null +++ b/.agent_work/ts2561-errors.txt @@ -0,0 +1,293 @@ + +> stormcom@0.1.0 type-check +> tsc --noEmit --incremental + +playwright.config.ts(60,3): error TS1117: An object literal cannot have multiple properties with the same name. +src/app/admin/organizations/page.tsx(41,11): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationCountOutputTypeSelect'. Did you mean to write 'memberships'? +src/app/admin/organizations/page.tsx(85,27): error TS2339: Property 'Membership' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(85,44): error TS7006: Parameter 'm' implicitly has an 'any' type. +src/app/admin/organizations/page.tsx(95,37): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(96,24): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(114,62): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(121,62): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(125,20): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(129,48): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/organizations/page.tsx(132,26): error TS2339: Property 'Store' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/app/admin/users/[id]/page.tsx(40,7): error TS2561: Object literal may only specify known properties, but 'StoreStaff' does not exist in type 'UserInclude'. Did you mean to write 'storeStaff'? +src/app/admin/users/[id]/page.tsx(255,21): error TS2339: Property 'activitiesReceived' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(261,25): error TS2339: Property 'activitiesReceived' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(261,49): error TS7006: Parameter 'activity' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(298,21): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(304,25): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(304,41): error TS7006: Parameter 'staff' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(335,21): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(341,25): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(341,41): error TS7006: Parameter 'membership' implicitly has an 'any' type. +src/app/admin/users/[id]/page.tsx(373,53): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(378,53): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/[id]/page.tsx(383,53): error TS2339: Property '_count' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(37,19): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserCountOutputTypeSelect'. Did you mean to write 'memberships'? +src/app/admin/users/page.tsx(60,17): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(61,21): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/admin/users/page.tsx(62,29): error TS2339: Property '_count' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/admin/users/[id]/route.ts(40,9): error TS2561: Object literal may only specify known properties, but 'StoreStaff' does not exist in type 'UserInclude'. Did you mean to write 'storeStaff'? +src/app/api/admin/users/route.ts(63,11): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserSelect'. Did you mean to write 'memberships'? +src/app/api/gdpr/export/route.ts(36,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserInclude'. Did you mean to write 'memberships'? +src/app/api/gdpr/export/route.ts(59,20): error TS2339: Property 'accounts' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/gdpr/export/route.ts(59,34): error TS7006: Parameter 'account' implicitly has an 'any' type. +src/app/api/gdpr/export/route.ts(63,20): error TS2339: Property 'sessions' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/gdpr/export/route.ts(63,34): error TS7006: Parameter 'session' implicitly has an 'any' type. +src/app/api/gdpr/export/route.ts(66,25): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/gdpr/export/route.ts(66,41): error TS7006: Parameter 'membership' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(111,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/analytics/route.ts(118,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/analytics/route.ts(129,7): error TS7006: Parameter 'p' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(132,7): error TS7006: Parameter 'p' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(137,7): error TS7006: Parameter 'o' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(140,7): error TS7006: Parameter 'o' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(150,63): error TS7006: Parameter 's' implicitly has an 'any' type. +src/app/api/integrations/facebook/analytics/route.ts(157,29): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/analytics/route.ts(167,29): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; inventorySnapshots: { ...; }[]; conversations: {...'. Did you mean 'organization'? +src/app/api/integrations/facebook/catalog/route.ts(55,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/catalog/route.ts(62,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(92,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(97,38): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(519,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/conversions/route.ts(524,38): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; } | null; } | null; } & { name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/disconnect/route.ts(50,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/disconnect/route.ts(57,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/disconnect/route.ts(139,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/read/route.ts(48,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/read/route.ts(55,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/route.ts(54,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/[conversationId]/route.ts(61,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(52,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(59,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(223,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/messages/route.ts(230,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/oauth/connect/route.ts(42,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/oauth/connect/route.ts(49,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(48,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(65,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(71,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(79,31): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(98,52): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-cancellation/route.ts(109,26): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(48,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(65,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(71,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(79,31): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(98,52): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-refund/route.ts(109,26): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(52,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(73,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(79,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(87,31): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(96,31): error TS2339: Property 'fulfillments' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(113,13): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(128,26): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(131,51): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(132,51): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-shipment/route.ts(133,38): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/[orderId]/sync-status/route.ts(47,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/orders/[orderId]/sync-status/route.ts(63,29): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/orders/[orderId]/sync-status/route.ts(69,16): error TS2339: Property 'facebookOrder' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/integrations/facebook/orders/poll/route.ts(47,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/poll/route.ts(54,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/poll/route.ts(187,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; } & { ...; }) | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/poll/route.ts(194,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; } & { ...; }) | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/sync/route.ts(47,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/orders/sync/route.ts(54,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/products/batch-status/route.ts(47,17): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/products/batch-status/route.ts(65,32): error TS2551: Property 'store' does not exist on type '{ errors: string | null; id: string; storeId: string; status: string; completedAt: Date | null; batchHandle: string | null; totalItems: number; successCount: number; errorCount: number; startedAt: Date; }'. Did you mean 'storeId'? +src/app/api/integrations/facebook/products/batch-status/route.ts(130,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/integrations/facebook/products/batch-status/route.ts(142,29): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/integrations/facebook/products/sync/route.ts(44,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/products/sync/route.ts(51,32): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/settings/route.ts(50,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/settings/route.ts(57,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/settings/route.ts(169,31): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; isActive: boolean; lastError: string | null; pageId: string; pageName: string; catalogId: string | null; catalogName: string | null; ... 5 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(55,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; country: string; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(62,30): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; country: string; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(185,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/status/route.ts(192,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/webhooks/subscribe/route.ts(45,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/integrations/facebook/webhooks/subscribe/route.ts(52,36): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: { id: string; createdAt: Date; updatedAt: Date; storeId: string; isActive: boolean; lastError: string | null; errorCount: number; ... 18 more ...; messengerEnabled: boolean; } | null; } & { ...; }) | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/orders/[id]/invoice/route.ts(55,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/orders/[id]/route.ts(44,20): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/orders/[id]/route.ts(44,36): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/orders/[id]/route.ts(101,20): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/orders/[id]/route.ts(101,36): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/orders/route.ts(78,27): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(79,20): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(79,48): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(81,28): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(207,17): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderSelect'. Did you mean to write 'customer'? +src/app/api/orders/stream/route.ts(230,39): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(231,32): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(231,60): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/organizations/[slug]/invite/route.ts(44,23): error TS2345: Argument of type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }' is not assignable to parameter of type 'OrganizationWithMemberships'. + Property 'Membership' is missing in type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }' but required in type 'OrganizationWithMemberships'. +src/app/api/organizations/route.ts(38,9): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationUncheckedCreateInput) | (Without<...> & OrganizationCreateInput)'. Did you mean to write 'memberships'? +src/app/api/organizations/route.ts(40,18): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/app/api/organizations/route.ts(55,16): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationWhereInput'. Did you mean to write 'memberships'? +src/app/api/organizations/route.ts(58,29): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationCountOutputTypeSelect'. Did you mean to write 'memberships'? +src/app/api/permissions/route.ts(21,9): error TS2561: Object literal may only specify known properties, but 'StoreStaff' does not exist in type 'UserSelect'. Did you mean to write 'storeStaff'? +src/app/api/permissions/route.ts(37,12): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/permissions/route.ts(38,12): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/app/api/store/[slug]/orders/[id]/invoice/route.ts(72,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/store/[slug]/orders/route.ts(182,15): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'ProductVariantWhereInput'. Did you mean to write 'product'? +src/app/api/store/[slug]/orders/route.ts(434,13): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'Without & OrderUncheckedCreateInput'. +src/app/api/store/[slug]/orders/route.ts(461,13): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/app/api/store/[slug]/orders/route.ts(655,24): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/store/[slug]/orders/track/route.ts(55,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/app/api/store/[slug]/orders/track/route.ts(61,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/app/api/store/[slug]/orders/track/route.ts(116,25): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/store/[slug]/orders/track/route.ts(117,22): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/store/[slug]/orders/track/route.ts(117,37): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/store/[slug]/orders/track/route.ts(134,24): error TS2339: Property 'errors' does not exist on type 'ZodError'. +src/app/api/stores/[id]/custom-roles/route.ts(27,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationWhereInput) | (Without<...> & OrganizationScalarRelationFilter)'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/custom-roles/route.ts(34,11): error TS2353: Object literal may only specify known properties, and 'StoreStaff' does not exist in type 'StoreWhereInput'. +src/app/api/stores/[id]/custom-roles/route.ts(57,9): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationWhereInput) | (Without<...> & OrganizationScalarRelationFilter)'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/pathao/settings/route.ts(49,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationSelect'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/pathao/settings/route.ts(58,25): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/pathao/settings/route.ts(74,28): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/pathao/settings/route.ts(129,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationSelect'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/pathao/settings/route.ts(138,25): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/pathao/settings/route.ts(154,28): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/staff/route.ts(118,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationSelect'. Did you mean to write 'memberships'? +src/app/api/stores/[id]/staff/route.ts(240,25): error TS2551: Property 'organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/api/stores/[id]/theme/route.ts(50,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipWhereInput'. Did you mean to write 'organization'? +src/app/api/stores/current/pathao-config/route.ts(45,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/stores/current/pathao-config/route.ts(49,30): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/stores/current/pathao-config/route.ts(95,22): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/api/stores/current/pathao-config/route.ts(107,30): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/messages/page.tsx(35,20): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/messages/page.tsx(42,27): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; ... 31 more ...; pathaoUsername: string | null; } | null; } & { ...; }; } & { ...; }'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(98,20): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; ... 14 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; country: string; } | null; } & { ...; }...'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(102,34): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; ... 14 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; country: string; } | null; } & { ...; }...'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(105,35): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: { id: string; facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; ... 14 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; country: string; } | null; } & { ...; }...'. Did you mean 'organization'? +src/app/dashboard/integrations/facebook/page.tsx(109,6): error TS7006: Parameter 'acc' implicitly has an 'any' type. +src/app/dashboard/integrations/facebook/page.tsx(109,11): error TS7006: Parameter 'product' implicitly has an 'any' type. +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(45,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(55,25): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/roles/request/page.tsx(59,33): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/page.tsx(54,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreSelect'. Did you mean to write 'organization'? +src/app/dashboard/stores/[storeId]/shipping/page.tsx(66,41): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/page.tsx(82,26): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(49,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreSelect'. Did you mean to write 'organization'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(62,41): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(66,26): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/dashboard/stores/[storeId]/shipping/shipments/page.tsx(144,31): error TS2551: Property 'Organization' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. Did you mean 'organizationId'? +src/app/settings/integrations/facebook/page.tsx(89,20): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; } & { ...; }) | null; } & ...'. Did you mean 'organization'? +src/app/settings/integrations/facebook/page.tsx(93,34): error TS2551: Property 'Organization' does not exist on type '{ organization: { store: ({ facebookIntegration: ({ orders: { id: string; createdAt: Date; updatedAt: Date; orderId: string | null; paymentStatus: string | null; shippedAt: Date | null; ... 13 more ...; webhookEventId: string | null; }[]; facebookProducts: { ...; }[]; } & { ...; }) | null; } & { ...; }) | null; } & ...'. Did you mean 'organization'? +src/app/settings/integrations/facebook/page.tsx(98,6): error TS7006: Parameter 'acc' implicitly has an 'any' type. +src/app/settings/integrations/facebook/page.tsx(98,11): error TS7006: Parameter 'product' implicitly has an 'any' type. +src/app/store/[slug]/categories/[categorySlug]/page.tsx(99,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/categories/page.tsx(48,11): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'CategoryCountOutputTypeSelect'. Did you mean to write 'products'? +src/app/store/[slug]/categories/page.tsx(89,35): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/categories/page.tsx(89,61): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/components/product-card.tsx(111,22): error TS2551: Property 'Category' does not exist on type '{ name: string; slug: string; price: number; compareAtPrice?: number | null | undefined; thumbnailUrl?: string | null | undefined; images: string; discountType?: DiscountType | null | undefined; ... 4 more ...; isFeatured?: boolean | undefined; }'. Did you mean 'category'? +src/app/store/[slug]/components/product-card.tsx(113,26): error TS2551: Property 'Category' does not exist on type '{ name: string; slug: string; price: number; compareAtPrice?: number | null | undefined; thumbnailUrl?: string | null | undefined; images: string; discountType?: DiscountType | null | undefined; ... 4 more ...; isFeatured?: boolean | undefined; }'. Did you mean 'category'? +src/app/store/[slug]/layout.tsx(78,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreInclude'. Did you mean to write 'organization'? +src/app/store/[slug]/layout.tsx(110,27): error TS2339: Property 'Category' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. +src/app/store/[slug]/page.tsx(77,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/page.tsx(108,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/page.tsx(142,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/page.tsx(169,11): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'CategoryCountOutputTypeSelect'. Did you mean to write 'products'? +src/app/store/[slug]/page.tsx(267,31): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(267,57): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(272,27): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/page.tsx(274,31): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; storeId: string; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/products/[productSlug]/page.tsx(88,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductInclude'. Did you mean to write 'category'? +src/app/store/[slug]/products/[productSlug]/page.tsx(145,7): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/store/[slug]/products/[productSlug]/page.tsx(157,15): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(159,22): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(160,56): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(183,24): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(184,53): error TS2551: Property 'Category' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(186,24): error TS2551: Property 'Brand' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'brandId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(187,51): error TS2551: Property 'Brand' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. Did you mean 'brandId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(225,33): error TS2339: Property 'ProductVariant' does not exist on type '{ name: string; length: number | null; id: string; createdAt: Date; updatedAt: Date; storeId: string; status: ProductStatus; description: string | null; deletedAt: Date | null; ... 31 more ...; isFeatured: boolean; }'. +src/app/store/[slug]/products/[productSlug]/page.tsx(225,53): error TS7006: Parameter 'v' implicitly has an 'any' type. +src/app/store/[slug]/products/page.tsx(176,9): error TS2561: Object literal may only specify known properties, but 'Category' does not exist in type 'ProductSelect'. Did you mean to write 'category'? +src/app/track/order/[orderId]/page.tsx(90,41): error TS2339: Property 'order_status' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(205,33): error TS2339: Property 'delivered_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(214,41): error TS2339: Property 'delivered_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(225,33): error TS2339: Property 'picked_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(234,41): error TS2339: Property 'picked_at' does not exist on type 'never'. +src/lib/auth-helpers.ts(56,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserInclude'. Did you mean to write 'memberships'? +src/lib/auth-helpers.ts(84,38): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/auth-helpers.ts(98,37): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/auth.ts(179,13): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserSelect'. Did you mean to write 'memberships'? +src/lib/auth.ts(210,48): error TS2339: Property 'Membership' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/auth.ts(217,47): error TS2339: Property 'StoreStaff' does not exist on type '{ name: string | null; email: string | null; businessName: string | null; businessDescription: string | null; businessCategory: string | null; phoneNumber: string | null; id: string; ... 11 more ...; updatedAt: Date; }'. +src/lib/get-current-user.ts(67,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/get-current-user.ts(79,22): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/lib/get-current-user.ts(107,9): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipWhereInput'. Did you mean to write 'organization'? +src/lib/get-current-user.ts(143,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/get-current-user.ts(154,22): error TS2551: Property 'Organization' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; userId: string; organizationId: string; role: Role; }'. Did you mean 'organizationId'? +src/lib/integrations/facebook/order-polling-service.ts(109,20): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'FacebookIntegrationInclude'. Did you mean to write 'store'? +src/lib/multi-tenancy.ts(44,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/lib/multi-tenancy.ts(56,20): error TS2339: Property 'Membership' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; }'. +src/lib/multi-tenancy.ts(115,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationWhereInput'. Did you mean to write 'memberships'? +src/lib/multi-tenancy.ts(120,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'OrganizationInclude'. Did you mean to write 'memberships'? +src/lib/query-helpers.ts(26,7): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type 'UserInclude'. Did you mean to write 'memberships'? +src/lib/query-helpers.ts(57,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreInclude'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(70,7): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'OrganizationInclude'. Did you mean to write 'store'? +src/lib/query-helpers.ts(107,9): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipWhereInput'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(135,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(162,7): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'MembershipInclude'. Did you mean to write 'organization'? +src/lib/query-helpers.ts(190,7): error TS2561: Object literal may only specify known properties, but 'Store' does not exist in type 'StoreStaffInclude'. Did you mean to write 'store'? +src/lib/services/order-processing.service.ts(90,24): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'ProductVariantInclude'. Did you mean to write 'product'? +src/lib/services/order-processing.service.ts(98,23): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(105,49): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(110,56): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(116,34): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(320,20): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order-processing.service.ts(327,29): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/lib/services/order-processing.service.ts(328,20): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(329,17): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(425,20): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order-processing.service.ts(516,27): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/lib/services/order-processing.service.ts(517,18): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order-processing.service.ts(518,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(37,55): error TS2344: Type '{ include: { Customer: true; OrderItem: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; Store: { ...; }; }; }' does not satisfy the constraint 'boolean | OrderDefaultArgs | null | undefined'. + Type '{ include: { Customer: true; OrderItem: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; Store: { ...; }; }; }' is not assignable to type 'OrderDefaultArgs'. + Types of property 'include' are incompatible. + Type '{ Customer: true; OrderItem: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; Store: { ...; }; }' has no properties in common with type 'OrderInclude'. +src/lib/services/order.service.ts(201,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(202,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(203,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderWhereInput'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(218,11): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(275,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(364,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(433,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(513,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(542,25): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(543,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(544,12): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(558,5): error TS2322: Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; } | null' is not assignable to type '({ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }) | null'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is not assignable to type '{ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is missing the following properties from type '{ Store: never; Customer: never; OrderItem: never; }': Store, Customer, OrderItem +src/lib/services/order.service.ts(577,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/order.service.ts(607,25): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(608,15): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(609,12): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(626,5): error TS2322: Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; } | null' is not assignable to type '({ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }) | null'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is not assignable to type '{ Store: never; Customer: never; OrderItem: never; } & { id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; ... 41 more ...; pathaoAreaId: number | null; }'. + Type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }' is missing the following properties from type '{ Store: never; Customer: never; OrderItem: never; }': Store, Customer, OrderItem +src/lib/services/order.service.ts(640,9): error TS2561: Object literal may only specify known properties, but 'Customer' does not exist in type 'OrderInclude'. Did you mean to write 'customer'? +src/lib/services/order.service.ts(691,20): error TS2551: Property 'Store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'storeId'? +src/lib/services/order.service.ts(692,23): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/lib/services/order.service.ts(695,20): error TS2339: Property 'OrderItem' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; storeId: string; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/lib/services/order.service.ts(695,34): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/order.service.ts(740,9): error TS2353: Object literal may only specify known properties, and 'OrderItem' does not exist in type 'OrderInclude'. +src/lib/services/store.service.ts(146,11): error TS2561: Object literal may only specify known properties, but 'Membership' does not exist in type '(Without & OrganizationUncheckedCreateInput) | (Without<...> & OrganizationCreateInput)'. Did you mean to write 'memberships'? +src/lib/services/store.service.ts(165,9): error TS2561: Object literal may only specify known properties, but 'Organization' does not exist in type 'StoreInclude'. Did you mean to write 'organization'? +src/lib/services/store.service.ts(182,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(207,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(284,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(313,23): error TS2339: Property '_count' does not exist on type '{ name: string; email: string; id: string; createdAt: Date; updatedAt: Date; organizationId: string; description: string | null; phone: string | null; deletedAt: Date | null; ... 30 more ...; pathaoUsername: string | null; }'. diff --git a/.agent_work/tsc-current.txt b/.agent_work/tsc-current.txt new file mode 100644 index 000000000..dafdfbd06 --- /dev/null +++ b/.agent_work/tsc-current.txt @@ -0,0 +1,36 @@ +src/app/api/orders/[id]/invoice/route.ts(55,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/orders/[id]/route.ts(44,20): error TS2339: Property 'items' does not exist on type '{ storeId: string; id: string; createdAt: Date; updatedAt: Date; ipAddress: string | null; status: OrderStatus; discountCode: string | null; deletedAt: Date | null; ... 39 more ...; pathaoAreaId: number | null; }'. +src/app/api/orders/[id]/route.ts(44,32): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/store/[slug]/orders/[id]/invoice/route.ts(72,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/store/[slug]/orders/track/route.ts(78,13): error TS2353: Object literal may only specify known properties, and 'ProductVariant' does not exist in type 'OrderItemInclude'. +src/app/api/store/[slug]/orders/track/route.ts(116,25): error TS2551: Property 'customer' does not exist on type '{ storeId: string; customerId: string | null; orderNumber: string; status: OrderStatus; paymentStatus: PaymentStatus; paymentMethod: PaymentMethod | null; ... 41 more ...; pathaoAreaId: number | null; }'. Did you mean 'customerId'? +src/app/api/store/[slug]/orders/track/route.ts(117,22): error TS2339: Property 'items' does not exist on type '{ storeId: string; customerId: string | null; orderNumber: string; status: OrderStatus; paymentStatus: PaymentStatus; paymentMethod: PaymentMethod | null; ... 41 more ...; pathaoAreaId: number | null; }'. +src/app/api/store/[slug]/orders/track/route.ts(117,33): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/store/[slug]/orders/track/route.ts(134,24): error TS2339: Property 'errors' does not exist on type 'ZodError'. +src/app/store/[slug]/categories/page.tsx(49,11): error TS2353: Object literal may only specify known properties, and 'other_Category' does not exist in type 'CategoryCountOutputTypeSelect'. +src/app/store/[slug]/categories/page.tsx(89,35): error TS2339: Property '_count' does not exist on type '{ storeId: string; image: string | null; name: string; id: string; createdAt: Date; updatedAt: Date; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/store/[slug]/categories/page.tsx(89,62): error TS2339: Property '_count' does not exist on type '{ storeId: string; image: string | null; name: string; id: string; createdAt: Date; updatedAt: Date; description: string | null; deletedAt: Date | null; slug: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; parentId: string | null; sortOrder: number; }'. +src/app/track/order/[orderId]/page.tsx(152,32): error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'. +src/app/track/order/[orderId]/page.tsx(153,48): error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'. +src/app/track/order/[orderId]/page.tsx(154,34): error TS2339: Property 'replace' does not exist on type '{}'. +src/app/track/order/[orderId]/page.tsx(214,25): error TS2769: No overload matches this call. + Overload 1 of 4, '(value: string | number | Date): Date', gave the following error. + Argument of type '{}' is not assignable to parameter of type 'string | number | Date'. + Overload 2 of 4, '(value: string | number): Date', gave the following error. + Argument of type '{}' is not assignable to parameter of type 'string | number'. +src/app/track/order/[orderId]/page.tsx(234,25): error TS2769: No overload matches this call. + Overload 1 of 4, '(value: string | number | Date): Date', gave the following error. + Argument of type '{}' is not assignable to parameter of type 'string | number | Date'. + Overload 2 of 4, '(value: string | number): Date', gave the following error. + Argument of type '{}' is not assignable to parameter of type 'string | number'. +src/lib/services/order.service.ts(306,9): error TS2561: Object literal may only specify known properties, but 'facebook_orders' does not exist in type 'OrderInclude'. Did you mean to write 'facebookOrder'? +src/lib/services/order.service.ts(558,5): error TS2322: Type '{ storeId: string; customerId: string | null; orderNumber: string; status: OrderStatus; paymentStatus: PaymentStatus; paymentMethod: PaymentMethod | null; ... 41 more ...; pathaoAreaId: number | null; } | null' is not assignable to type '({ items: ({ product: { sku: string; price: number; name: string; id: string; slug: string; thumbnailUrl: string | null; } | null; variant: { sku: string; price: number | null; name: string; id: string; } | null; } & { ...; })[]; store: { ...; }; customer: { ...; } | null; } & { ...; }) | null'. + Type '{ storeId: string; customerId: string | null; orderNumber: string; status: OrderStatus; paymentStatus: PaymentStatus; paymentMethod: PaymentMethod | null; ... 41 more ...; pathaoAreaId: number | null; }' is not assignable to type '{ items: ({ product: { sku: string; price: number; name: string; id: string; slug: string; thumbnailUrl: string | null; } | null; variant: { sku: string; price: number | null; name: string; id: string; } | null; } & { ...; })[]; store: { ...; }; customer: { ...; } | null; } & { ...; }'. + Type '{ storeId: string; customerId: string | null; orderNumber: string; status: OrderStatus; paymentStatus: PaymentStatus; paymentMethod: PaymentMethod | null; ... 41 more ...; pathaoAreaId: number | null; }' is missing the following properties from type '{ items: ({ product: { sku: string; price: number; name: string; id: string; slug: string; thumbnailUrl: string | null; } | null; variant: { sku: string; price: number | null; name: string; id: string; } | null; } & { ...; })[]; store: { ...; }; customer: { ...; } | null; }': items, store, customer +src/lib/services/order.service.ts(626,5): error TS2322: Type '{ storeId: string; customerId: string | null; orderNumber: string; status: OrderStatus; paymentStatus: PaymentStatus; paymentMethod: PaymentMethod | null; ... 41 more ...; pathaoAreaId: number | null; } | null' is not assignable to type '({ items: ({ product: { sku: string; price: number; name: string; id: string; slug: string; thumbnailUrl: string | null; } | null; variant: { sku: string; price: number | null; name: string; id: string; } | null; } & { ...; })[]; store: { ...; }; customer: { ...; } | null; } & { ...; }) | null'. + Type '{ storeId: string; customerId: string | null; orderNumber: string; status: OrderStatus; paymentStatus: PaymentStatus; paymentMethod: PaymentMethod | null; ... 41 more ...; pathaoAreaId: number | null; }' is not assignable to type '{ items: ({ product: { sku: string; price: number; name: string; id: string; slug: string; thumbnailUrl: string | null; } | null; variant: { sku: string; price: number | null; name: string; id: string; } | null; } & { ...; })[]; store: { ...; }; customer: { ...; } | null; } & { ...; }'. + Type '{ storeId: string; customerId: string | null; orderNumber: string; status: OrderStatus; paymentStatus: PaymentStatus; paymentMethod: PaymentMethod | null; ... 41 more ...; pathaoAreaId: number | null; }' is missing the following properties from type '{ items: ({ product: { sku: string; price: number; name: string; id: string; slug: string; thumbnailUrl: string | null; } | null; variant: { sku: string; price: number | null; name: string; id: string; } | null; } & { ...; })[]; store: { ...; }; customer: { ...; } | null; }': items, store, customer +src/lib/services/order.service.ts(697,27): error TS2339: Property 'productVariant' does not exist on type '{ product: { sku: string; name: string; id: string; } | null; variant: { sku: string; name: string; id: string; } | null; } & { subtotal: number; taxAmount: number; discountAmount: number; totalAmount: number; ... 11 more ...; orderId: string; }'. +src/lib/services/order.service.ts(698,19): error TS2339: Property 'productVariant' does not exist on type '{ product: { sku: string; name: string; id: string; } | null; variant: { sku: string; name: string; id: string; } | null; } & { subtotal: number; taxAmount: number; discountAmount: number; totalAmount: number; ... 11 more ...; orderId: string; }'. diff --git a/.agent_work/tsc-out.txt b/.agent_work/tsc-out.txt new file mode 100644 index 000000000..e69de29bb diff --git a/.agent_work/tsc-result.txt b/.agent_work/tsc-result.txt new file mode 100644 index 000000000..682bfdf34 --- /dev/null +++ b/.agent_work/tsc-result.txt @@ -0,0 +1,80 @@ +playwright.config.ts(60,3): error TS1117: An object literal cannot have multiple properties with the same name. +src/app/api/orders/[id]/invoice/route.ts(55,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/orders/[id]/route.ts(44,20): error TS2339: Property 'items' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/orders/[id]/route.ts(44,32): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/orders/[id]/route.ts(101,20): error TS2339: Property 'items' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/orders/[id]/route.ts(101,32): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/orders/route.ts(78,27): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(79,20): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(79,48): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'customerId'? +src/app/api/orders/route.ts(81,28): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'customerId'? +src/app/api/orders/stream/route.ts(230,39): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; customer: { firstName: string; lastName: string; } | null; status: OrderStatus; orderNumber: string; totalAmount: number; }'. Did you mean 'customer'? +src/app/api/orders/stream/route.ts(231,32): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; customer: { firstName: string; lastName: string; } | null; status: OrderStatus; orderNumber: string; totalAmount: number; }'. Did you mean 'customer'? +src/app/api/orders/stream/route.ts(231,60): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; customer: { firstName: string; lastName: string; } | null; status: OrderStatus; orderNumber: string; totalAmount: number; }'. Did you mean 'customer'? +src/app/api/store/[slug]/orders/[id]/invoice/route.ts(72,44): error TS2345: Argument of type 'ReactElement>' is not assignable to parameter of type 'ReactElement>'. + Type 'unknown' is not assignable to type 'DocumentProps'. +src/app/api/store/[slug]/orders/route.ts(182,15): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'ProductVariantWhereInput'. Did you mean to write 'product'? +src/app/api/store/[slug]/orders/track/route.ts(71,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'OrderItemInclude'. Did you mean to write 'product'? +src/app/api/store/[slug]/orders/track/route.ts(116,25): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'customerId'? +src/app/api/store/[slug]/orders/track/route.ts(117,22): error TS2339: Property 'items' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/app/api/store/[slug]/orders/track/route.ts(117,33): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/app/api/store/[slug]/orders/track/route.ts(134,24): error TS2339: Property 'errors' does not exist on type 'ZodError'. +src/app/api/stores/[id]/custom-roles/route.ts(34,11): error TS2353: Object literal may only specify known properties, and 'storeStaff' does not exist in type 'StoreWhereInput'. +src/app/store/[slug]/categories/page.tsx(48,11): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'CategoryCountOutputTypeSelect'. Did you mean to write 'products'? +src/app/store/[slug]/categories/page.tsx(89,35): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; sortOrder: number; parentId: string | null; }'. +src/app/store/[slug]/categories/page.tsx(89,61): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; sortOrder: number; parentId: string | null; }'. +src/app/store/[slug]/components/product-card.tsx(111,22): error TS2551: Property 'Category' does not exist on type '{ name: string; slug: string; price: number; compareAtPrice?: number | null | undefined; thumbnailUrl?: string | null | undefined; images: string; discountType?: DiscountType | null | undefined; ... 4 more ...; isFeatured?: boolean | undefined; }'. Did you mean 'category'? +src/app/store/[slug]/components/product-card.tsx(113,26): error TS2551: Property 'Category' does not exist on type '{ name: string; slug: string; price: number; compareAtPrice?: number | null | undefined; thumbnailUrl?: string | null | undefined; images: string; discountType?: DiscountType | null | undefined; ... 4 more ...; isFeatured?: boolean | undefined; }'. Did you mean 'category'? +src/app/store/[slug]/layout.tsx(81,7): error TS2353: Object literal may only specify known properties, and 'category' does not exist in type 'StoreInclude'. +src/app/store/[slug]/layout.tsx(110,27): error TS2339: Property 'Category' does not exist on type '{ locale: string; name: string; id: string; email: string; createdAt: Date; updatedAt: Date; slug: string; organizationId: string; subdomain: string | null; customDomain: string | null; ... 29 more ...; pathaoUsername: string | null; }'. +src/app/store/[slug]/page.tsx(169,11): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'CategoryCountOutputTypeSelect'. Did you mean to write 'products'? +src/app/store/[slug]/page.tsx(267,31): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; sortOrder: number; parentId: string | null; }'. +src/app/store/[slug]/page.tsx(267,57): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; sortOrder: number; parentId: string | null; }'. +src/app/store/[slug]/page.tsx(272,27): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; sortOrder: number; parentId: string | null; }'. +src/app/store/[slug]/page.tsx(274,31): error TS2339: Property '_count' does not exist on type '{ name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; metaDescription: string | null; isPublished: boolean; sortOrder: number; parentId: string | null; }'. +src/app/store/[slug]/products/[productSlug]/page.tsx(102,7): error TS2353: Object literal may only specify known properties, and 'ProductVariant' does not exist in type 'ProductInclude'. +src/app/store/[slug]/products/[productSlug]/page.tsx(157,15): error TS2551: Property 'Category' does not exist on type '{ length: number | null; name: string; id: string; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; ... 30 more ...; categoryId: string | null; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(159,22): error TS2551: Property 'Category' does not exist on type '{ length: number | null; name: string; id: string; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; ... 30 more ...; categoryId: string | null; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(160,56): error TS2551: Property 'Category' does not exist on type '{ length: number | null; name: string; id: string; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; ... 30 more ...; categoryId: string | null; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(183,24): error TS2551: Property 'Category' does not exist on type '{ length: number | null; name: string; id: string; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; ... 30 more ...; categoryId: string | null; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(184,53): error TS2551: Property 'Category' does not exist on type '{ length: number | null; name: string; id: string; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; ... 30 more ...; categoryId: string | null; }'. Did you mean 'categoryId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(186,24): error TS2551: Property 'Brand' does not exist on type '{ length: number | null; name: string; id: string; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; ... 30 more ...; categoryId: string | null; }'. Did you mean 'brandId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(187,51): error TS2551: Property 'Brand' does not exist on type '{ length: number | null; name: string; id: string; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; ... 30 more ...; categoryId: string | null; }'. Did you mean 'brandId'? +src/app/store/[slug]/products/[productSlug]/page.tsx(225,33): error TS2339: Property 'ProductVariant' does not exist on type '{ length: number | null; name: string; id: string; createdAt: Date; updatedAt: Date; slug: string; description: string | null; deletedAt: Date | null; storeId: string; metaTitle: string | null; ... 30 more ...; categoryId: string | null; }'. +src/app/store/[slug]/products/[productSlug]/page.tsx(225,53): error TS7006: Parameter 'v' implicitly has an 'any' type. +src/app/track/order/[orderId]/page.tsx(90,41): error TS2339: Property 'order_status' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(205,33): error TS2339: Property 'delivered_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(214,41): error TS2339: Property 'delivered_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(225,33): error TS2339: Property 'picked_at' does not exist on type 'never'. +src/app/track/order/[orderId]/page.tsx(234,41): error TS2339: Property 'picked_at' does not exist on type 'never'. +src/lib/services/order-processing.service.ts(90,24): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'ProductVariantInclude'. Did you mean to write 'product'? +src/lib/services/order-processing.service.ts(98,23): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(105,49): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(110,56): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order-processing.service.ts(116,34): error TS2551: Property 'Product' does not exist on type '{ options: string; name: string; id: string; image: string | null; createdAt: Date; updatedAt: Date; compareAtPrice: number | null; price: number | null; sku: string; barcode: string | null; ... 8 more ...; isDefault: boolean; }'. Did you mean 'productId'? +src/lib/services/order.service.ts(37,55): error TS2344: Type '{ include: { customer: true; items: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; store: { ...; }; }; }' does not satisfy the constraint 'boolean | OrderDefaultArgs | null | undefined'. + Type '{ include: { customer: true; items: { include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }; store: { ...; }; }; }' is not assignable to type 'OrderDefaultArgs'. + The types of 'include.items' are incompatible between these types. + Type '{ include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }' is not assignable to type 'boolean | Order$itemsArgs | undefined'. + Type '{ include: { Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }; }' is not assignable to type 'Order$itemsArgs'. + Types of property 'include' are incompatible. + Type '{ Product: { select: { id: true; name: true; slug: true; thumbnailUrl: true; price: true; sku: true; }; }; ProductVariant: { select: { id: true; name: true; sku: true; price: true; }; }; }' has no properties in common with type 'OrderItemInclude'. +src/lib/services/order.service.ts(228,15): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'OrderItemInclude'. Did you mean to write 'product'? +src/lib/services/order.service.ts(278,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'OrderItemInclude'. Did you mean to write 'product'? +src/lib/services/order.service.ts(436,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'OrderItemInclude'. Did you mean to write 'product'? +src/lib/services/order.service.ts(558,5): error TS2322: Type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; } | null' is not assignable to type '({ customer: { id: string; email: string; createdAt: Date; updatedAt: Date; userId: string | null; phone: string | null; deletedAt: Date | null; storeId: string; firstName: string; ... 6 more ...; lastOrderAt: Date | null; } | null; store: { ...; }; items: ({ ...; } & { ...; })[]; } & { ...; }) | null'. + Type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }' is not assignable to type '{ customer: { id: string; email: string; createdAt: Date; updatedAt: Date; userId: string | null; phone: string | null; deletedAt: Date | null; storeId: string; firstName: string; ... 6 more ...; lastOrderAt: Date | null; } | null; store: { ...; }; items: ({ ...; } & { ...; })[]; } & { ...; }'. + Type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }' is missing the following properties from type '{ customer: { id: string; email: string; createdAt: Date; updatedAt: Date; userId: string | null; phone: string | null; deletedAt: Date | null; storeId: string; firstName: string; ... 6 more ...; lastOrderAt: Date | null; } | null; store: { ...; }; items: ({ ...; } & { ...; })[]; }': customer, store, items +src/lib/services/order.service.ts(626,5): error TS2322: Type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; } | null' is not assignable to type '({ customer: { id: string; email: string; createdAt: Date; updatedAt: Date; userId: string | null; phone: string | null; deletedAt: Date | null; storeId: string; firstName: string; ... 6 more ...; lastOrderAt: Date | null; } | null; store: { ...; }; items: ({ ...; } & { ...; })[]; } & { ...; }) | null'. + Type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }' is not assignable to type '{ customer: { id: string; email: string; createdAt: Date; updatedAt: Date; userId: string | null; phone: string | null; deletedAt: Date | null; storeId: string; firstName: string; ... 6 more ...; lastOrderAt: Date | null; } | null; store: { ...; }; items: ({ ...; } & { ...; })[]; } & { ...; }'. + Type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }' is missing the following properties from type '{ customer: { id: string; email: string; createdAt: Date; updatedAt: Date; userId: string | null; phone: string | null; deletedAt: Date | null; storeId: string; firstName: string; ... 6 more ...; lastOrderAt: Date | null; } | null; store: { ...; }; items: ({ ...; } & { ...; })[]; }': customer, store, items +src/lib/services/order.service.ts(651,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'OrderItemInclude'. Did you mean to write 'product'? +src/lib/services/order.service.ts(691,20): error TS2551: Property 'store' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'storeId'? +src/lib/services/order.service.ts(692,23): error TS2551: Property 'Customer' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. Did you mean 'customerId'? +src/lib/services/order.service.ts(695,20): error TS2339: Property 'items' does not exist on type '{ id: string; createdAt: Date; updatedAt: Date; deletedAt: Date | null; storeId: string; status: OrderStatus; orderNumber: string; subtotal: number; taxAmount: number; ... 38 more ...; customerId: string | null; }'. +src/lib/services/order.service.ts(695,30): error TS7006: Parameter 'item' implicitly has an 'any' type. +src/lib/services/store.service.ts(182,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(207,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(284,13): error TS2561: Object literal may only specify known properties, but 'Product' does not exist in type 'StoreCountOutputTypeSelect'. Did you mean to write 'products'? +src/lib/services/store.service.ts(313,23): error TS2339: Property '_count' does not exist on type '{ locale: string; name: string; id: string; email: string; createdAt: Date; updatedAt: Date; slug: string; organizationId: string; subdomain: string | null; customDomain: string | null; ... 29 more ...; pathaoUsername: string | null; }'. From 5c04c66fc501f1f9ff9dabb9e4bf49aa844e93d4 Mon Sep 17 00:00:00 2001 From: Rafiqul Islam Date: Sat, 21 Feb 2026 17:44:42 +0600 Subject: [PATCH 2/2] up --- src/app/actions/auth.ts | 30 ++-- src/app/layout.tsx | 9 +- .../[slug]/components/product-details.tsx | 44 ++++-- .../[slug]/components/variant-selector.tsx | 21 +-- src/lib/auth-helpers.ts | 140 ++++++++++++++---- src/lib/auth.ts | 13 +- src/lib/services/store.service.ts | 39 +++-- src/lib/subscription/billing-service.ts | 58 ++++++++ 8 files changed, 267 insertions(+), 87 deletions(-) create mode 100644 src/lib/subscription/billing-service.ts diff --git a/src/app/actions/auth.ts b/src/app/actions/auth.ts index 79d476ed9..6ae21e1cd 100644 --- a/src/app/actions/auth.ts +++ b/src/app/actions/auth.ts @@ -69,9 +69,15 @@ export async function signup(state: FormState, formData: FormData): Promise
{ + const url = (process.env.NEXTAUTH_URL || "http://localhost:3000") + .trim() + .replace(/^["']|["']$/g, ""); + return new URL(url); +}; + export const metadata: Metadata = { title: { default: "StormCom - Multi-Tenant SaaS Platform", @@ -26,7 +33,7 @@ export const metadata: Metadata = { keywords: ["Next.js", "React", "TypeScript", "SaaS", "Multi-tenant", "Authentication"], authors: [{ name: "StormCom Team" }], creator: "StormCom", - metadataBase: new URL(process.env.NEXTAUTH_URL || "http://localhost:3000"), + metadataBase: getMetadataBase(), openGraph: { type: "website", locale: "en_US", diff --git a/src/app/store/[slug]/components/product-details.tsx b/src/app/store/[slug]/components/product-details.tsx index 5b7c741de..652bdc97b 100644 --- a/src/app/store/[slug]/components/product-details.tsx +++ b/src/app/store/[slug]/components/product-details.tsx @@ -1,12 +1,12 @@ "use client"; -import { useState, useMemo } from "react"; +import { useState } from "react"; import { VariantSelector, type Variant } from "./variant-selector"; import { AddToCartButton } from "./add-to-cart-button"; import { PriceDisplay } from "./price-display"; import { StockBadge } from "./stock-badge"; import { Truck } from "lucide-react"; -import { DiscountType, type DiscountInfo } from "@/lib/discount-utils"; +import { DiscountType, type DiscountInfo, getEffectiveDiscount } from "@/lib/discount-utils"; interface ProductDetailsProps { product: { @@ -41,19 +41,15 @@ export function ProductDetails({ storeSlug, onImageChange, }: ProductDetailsProps) { - const defaultVariant = useMemo( - () => variants.find((v) => v.isDefault) || variants[0] || null, - [variants] - ); - - const [selectedVariant, setSelectedVariant] = useState(defaultVariant); + // No variant pre-selected: show product.price initially, variant price only after user selection + const [selectedVariant, setSelectedVariant] = useState(null); - // Calculate current price and inventory based on variant selection + // Show product default price until user explicitly picks a variant const currentPrice = selectedVariant?.price ?? product.price; const currentCompareAtPrice = selectedVariant?.compareAtPrice ?? product.compareAtPrice; - const currentInventory = selectedVariant?.inventoryQty ?? product.inventoryQty; + const currentInventory = selectedVariant ? selectedVariant.inventoryQty : product.inventoryQty; - // Build discount info for price display + // Build discount info for product and variant const productDiscount: DiscountInfo = { discountType: product.discountType ?? null, discountValue: product.discountValue ?? null, @@ -61,14 +57,29 @@ export function ProductDetails({ discountEndDate: product.discountEndDate ? new Date(product.discountEndDate) : null, }; + const variantDiscount: DiscountInfo | null = selectedVariant ? { + discountType: selectedVariant.discountType ?? null, + discountValue: selectedVariant.discountValue ?? null, + discountStartDate: selectedVariant.discountStartDate ? new Date(selectedVariant.discountStartDate) : null, + discountEndDate: selectedVariant.discountEndDate ? new Date(selectedVariant.discountEndDate) : null, + } : null; + + // Use variant discount if active, otherwise fall back to product discount + const effectiveDiscount = getEffectiveDiscount(productDiscount, variantDiscount); + // Check if product has courier pricing const hasCourierPricing = (product.courierPriceInsideDhaka ?? 0) > 0 || (product.courierPriceOutsideDhaka ?? 0) > 0; const handleVariantChange = (variant: Variant) => { - setSelectedVariant(variant); - // Update image gallery if variant has an image - if (variant.image && onImageChange) { - onImageChange(variant.image); + // Toggle: if already selected, deselect it (go back to default product price) + if (selectedVariant?.id === variant.id) { + setSelectedVariant(null); + } else { + setSelectedVariant(variant); + // Update image gallery if variant has an image + if (variant.image && onImageChange) { + onImageChange(variant.image); + } } }; @@ -79,7 +90,7 @@ export function ProductDetails({ @@ -124,6 +135,7 @@ export function ProductDetails({ {variants.length >= 1 && ( )} diff --git a/src/app/store/[slug]/components/variant-selector.tsx b/src/app/store/[slug]/components/variant-selector.tsx index 00cf8c113..752e29155 100644 --- a/src/app/store/[slug]/components/variant-selector.tsx +++ b/src/app/store/[slug]/components/variant-selector.tsx @@ -1,6 +1,5 @@ "use client"; -import { useState } from "react"; import { Label } from "@/components/ui/label"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; @@ -25,6 +24,7 @@ export interface Variant { interface VariantSelectorProps { variants: Variant[]; + selectedVariantId?: string | null; onVariantChange?: (variant: Variant) => void; className?: string; } @@ -36,14 +36,17 @@ interface VariantSelectorProps { */ export function VariantSelector({ variants, + selectedVariantId, onVariantChange, className, }: VariantSelectorProps) { - const defaultVariant = variants.find((v) => v.isDefault) || variants[0] || null; - const [selectedVariant, setSelectedVariant] = useState(defaultVariant); + // Use external selectedVariantId if provided, otherwise manage locally + const selectedVariant = selectedVariantId + ? variants.find((v) => v.id === selectedVariantId) ?? null + : null; // Early return if no variants - if (variants.length === 0 || !selectedVariant) { + if (variants.length === 0) { return null; } @@ -69,7 +72,6 @@ export function VariantSelector({ }); const handleVariantSelect = (variant: Variant) => { - setSelectedVariant(variant); onVariantChange?.(variant); }; @@ -80,12 +82,12 @@ export function VariantSelector({
{variants.map((variant) => { - const isSelected = selectedVariant.id === variant.id; + const isSelected = selectedVariant?.id === variant.id; const isOutOfStock = variant.inventoryQty === 0; return ( @@ -133,9 +135,10 @@ export function VariantSelector({ {optionName}:{" "} {(() => { + if (!selectedVariant) return "Select"; try { const opts = JSON.parse(selectedVariant.options); - return opts[optionName]; + return opts[optionName] || ""; } catch { return ""; } @@ -157,7 +160,7 @@ export function VariantSelector({ if (!matchingVariant) return null; - const isSelected = selectedVariant.id === matchingVariant.id; + const isSelected = selectedVariant?.id === matchingVariant.id; const isOutOfStock = matchingVariant.inventoryQty === 0; return ( diff --git a/src/lib/auth-helpers.ts b/src/lib/auth-helpers.ts index afd4fb8df..0b658f4dc 100644 --- a/src/lib/auth-helpers.ts +++ b/src/lib/auth-helpers.ts @@ -3,11 +3,10 @@ * * This module provides helper functions to check user permissions * and roles in both client and server contexts. - * - * Uses cached session to avoid redundant lookups within the same request. */ -import { getCachedSession } from '@/lib/cached-session'; +import { getServerSession } from 'next-auth'; +import { authOptions } from '@/lib/auth'; import { prisma } from '@/lib/prisma'; import { Role } from '@prisma/client'; import { @@ -40,7 +39,7 @@ export interface UserContext { * This should be called in server components and API routes */ export async function getUserContext(): Promise { - const session = await getCachedSession(); + const session = await getServerSession(authOptions); if (!session?.user?.id) { return null; @@ -48,40 +47,35 @@ export async function getUserContext(): Promise { const userId = session.user.id; - // Get user with memberships and store staff assignments - // Fetch ALL memberships and store staff, then prioritize in code + // Get basic user info first (simplified to avoid schema mismatch issues) const user = await prisma.user.findUnique({ where: { id: userId }, - include: { - memberships: { - include: { - organization: { - include: { - store: true, - }, - }, - }, - }, - storeStaff: { - where: { - isActive: true, - }, - include: { - store: true, - }, - }, - }, }); if (!user) { return null; } - // Prioritize memberships using shared priority constants - // This ensures store owners always see their stores + // Fetch memberships and storeStaff separately to avoid complex include issues + const memberships = await prisma.membership.findMany({ + where: { userId }, + orderBy: { createdAt: 'desc' }, + }); + + const storeStaff = await prisma.storeStaff.findMany({ + where: { + userId, + isActive: true, + }, + orderBy: { createdAt: 'desc' }, + }); + + // Ensure arrays exist + const membershipsArray = memberships || []; + const storeStaffArray = storeStaff || []; // Sort memberships by role priority (highest first), then by createdAt (newest first) - const sortedMemberships = [...user.memberships].sort((a, b) => { + const sortedMemberships = [...membershipsArray].sort((a, b) => { const priorityDiff = (ORG_ROLE_PRIORITY[b.role] || 0) - (ORG_ROLE_PRIORITY[a.role] || 0); if (priorityDiff !== 0) return priorityDiff; return new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(); @@ -95,7 +89,7 @@ export async function getUserContext(): Promise { CUSTOMER_SUPPORT: 1, }; - const sortedStoreStaff = [...user.storeStaff].sort((a, b) => { + const sortedStoreStaff = [...storeStaffArray].sort((a, b) => { const priorityDiff = (storeRolePriority[b.role || ''] || 0) - (storeRolePriority[a.role || ''] || 0); if (priorityDiff !== 0) return priorityDiff; return new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(); @@ -103,12 +97,12 @@ export async function getUserContext(): Promise { // Determine roles - use the highest priority membership/staff const membership = sortedMemberships[0]; - const storeStaff = sortedStoreStaff[0]; + const topStoreStaff = sortedStoreStaff[0]; const organizationRole = membership?.role; const organizationId = membership?.organizationId; - const storeRole = storeStaff?.role; - const storeId = storeStaff?.storeId || membership?.organization?.store?.id; + const storeRole = topStoreStaff?.role; + const storeId = topStoreStaff?.storeId; // Simplified - no longer accessing nested organization.store // Determine effective role (highest level role takes precedence) let effectiveRole: Role | undefined; @@ -376,3 +370,85 @@ export async function getEffectiveRole(): Promise { return context.storeRole || context.organizationRole || null; } + +/** + * Check if current user has access to a specific store + * Returns true if user is super admin, store staff member, or organization owner/admin of the store + */ +export async function hasStoreAccess(storeId: string): Promise { + const session = await getServerSession(authOptions); + + if (!session?.user?.id) { + return false; + } + + const userId = session.user.id; + + // Check if user is super admin + const user = await prisma.user.findUnique({ + where: { id: userId }, + select: { isSuperAdmin: true }, + }); + + if (user?.isSuperAdmin) { + return true; + } + + // Check if user is a store staff member for this store + const storeStaff = await prisma.storeStaff.findFirst({ + where: { + storeId, + userId, + isActive: true, + }, + }); + + if (storeStaff) { + return true; + } + + // Check if user is organization owner/admin of the store + const store = await prisma.store.findUnique({ + where: { id: storeId }, + select: { organizationId: true }, + }); + + if (!store) { + return false; + } + + const membership = await prisma.membership.findFirst({ + where: { + userId, + organizationId: store.organizationId, + role: { + in: ['OWNER', 'ADMIN', 'STORE_ADMIN'], + }, + }, + }); + + return !!membership; +} + +/** + * Require store access - throws error if user doesn't have access to the store + */ +export async function requireStoreAccess(storeId: string, permission?: Permission): Promise { + const context = await requireAuth(); + + const hasAccess = await hasStoreAccess(storeId); + + if (!hasAccess) { + throw new Error(`Access denied: you do not have access to this store`); + } + + // If permission is specified, also check that permission + if (permission) { + const hasRequiredPermission = await checkPermission(permission); + if (!hasRequiredPermission) { + throw new Error(`Permission denied: ${permission} required`); + } + } + + return context; +} diff --git a/src/lib/auth.ts b/src/lib/auth.ts index fc599f4d0..45d8be8a2 100644 --- a/src/lib/auth.ts +++ b/src/lib/auth.ts @@ -4,7 +4,7 @@ import EmailProvider from "next-auth/providers/email"; import CredentialsProvider from "next-auth/providers/credentials"; import { Resend } from "resend"; import { PrismaAdapter } from "@auth/prisma-adapter"; -import prisma from "@/lib/prisma"; +import { prisma } from "@/lib/prisma"; import bcrypt from "bcryptjs"; import { ORG_ROLE_PRIORITY, STORE_ROLE_PRIORITY } from "@/lib/constants"; import type { Role, AccountStatus } from "@prisma/client"; @@ -75,9 +75,15 @@ export const authOptions: NextAuthOptions = { throw new Error("Email and password required"); } - // Find user by email + // Normalize email using the same logic as EmailProvider + const [local, domain] = credentials.email.toLowerCase().trim().split("@"); + const normalizedEmail = domain === "gmail.com" + ? `${local.replace(/\./g, "")}@${domain}` + : `${local}@${domain}`; + + // Find user by normalized email const user = await prisma.user.findUnique({ - where: { email: credentials.email } + where: { email: normalizedEmail } }); if (!user || !user.passwordHash) { @@ -267,3 +273,4 @@ export const authOptions: NextAuthOptions = { }, }, }; + diff --git a/src/lib/services/store.service.ts b/src/lib/services/store.service.ts index 3a577347f..9ed72b5e8 100644 --- a/src/lib/services/store.service.ts +++ b/src/lib/services/store.service.ts @@ -3,8 +3,9 @@ // Handles store creation, updates, and multi-tenant store operations import { prisma } from '@/lib/prisma'; +import { createTrialSubscription } from '@/lib/subscription/billing-service'; import { caseInsensitiveStringFilter } from '@/lib/prisma-utils'; -import { Prisma, SubscriptionPlan, SubscriptionStatus } from '@prisma/client'; +import { Prisma, SubscriptionPlanTier, SubscriptionStatus } from '@prisma/client'; import { z } from 'zod'; /** @@ -26,7 +27,7 @@ export const CreateStoreSchema = z.object({ currency: z.string().default('BDT'), timezone: z.string().default('Asia/Dhaka'), locale: z.string().default('en'), - subscriptionPlan: z.nativeEnum(SubscriptionPlan).default(SubscriptionPlan.FREE), + subscriptionPlan: z.nativeEnum(SubscriptionPlanTier).default(SubscriptionPlanTier.FREE), organizationId: z.string().optional(), // Optional - will be derived from session if not provided }); @@ -45,7 +46,7 @@ export interface ListStoresOptions { page?: number; limit?: number; search?: string; - subscriptionPlan?: SubscriptionPlan; + subscriptionPlan?: SubscriptionPlanTier; subscriptionStatus?: SubscriptionStatus; sortBy?: 'name' | 'createdAt' | 'updatedAt'; sortOrder?: 'asc' | 'desc'; @@ -64,7 +65,7 @@ export interface StoreListResult { address: string | null; currency: string; timezone: string; - subscriptionPlan: SubscriptionPlan; + subscriptionPlan: string; subscriptionStatus: SubscriptionStatus; createdAt: Date; updatedAt: Date; @@ -166,6 +167,22 @@ export class StoreService { }, }); + // Initialize trial subscription with FREE plan + try { + const freePlan = await prisma.subscriptionPlanModel.findFirst({ + where: { slug: 'free' }, + }); + + if (freePlan) { + await createTrialSubscription(store.id, freePlan.id); + } else { + console.warn(`⚠️ FREE subscription plan not found. Subscription record not created for store: ${store.id}`); + } + } catch (error) { + console.error('Failed to create trial subscription:', error); + // Don't throw - store creation succeeded, just log the error + } + return store; } @@ -278,15 +295,6 @@ export class StoreService { // Get paginated stores const stores = await prisma.store.findMany({ where, - include: { - _count: { - select: { - products: true, - orders: true, - customers: true, - }, - }, - }, orderBy: { [sortBy]: sortOrder, }, @@ -310,7 +318,7 @@ export class StoreService { subscriptionStatus: store.subscriptionStatus, createdAt: store.createdAt, updatedAt: store.updatedAt, - _count: store._count, + _count: { products: 0, orders: 0, customers: 0 }, // Placeholder counts })), pagination: { page, @@ -389,7 +397,7 @@ export class StoreService { */ async updateSubscription( storeId: string, - plan: SubscriptionPlan, + plan: SubscriptionPlanTier, status: SubscriptionStatus ) { const store = await prisma.store.update({ @@ -406,3 +414,4 @@ export class StoreService { return store; } } + diff --git a/src/lib/subscription/billing-service.ts b/src/lib/subscription/billing-service.ts new file mode 100644 index 000000000..a30dd229f --- /dev/null +++ b/src/lib/subscription/billing-service.ts @@ -0,0 +1,58 @@ +// src/lib/subscription/billing-service.ts +// Billing and Subscription Service +// Handles subscription creation and management for stores + +import { prisma } from '@/lib/prisma'; +import { SubscriptionPlan, SubscriptionStatus } from '@prisma/client'; + +/** + * Create a trial subscription for a store + * @param storeId - The ID of the store + * @param planId - The ID of the subscription plan (used for plan type determination) + */ +export async function createTrialSubscription(storeId: string, planId: string): Promise { + // Calculate trial end date (30 days from now) + const trialEndsAt = new Date(); + trialEndsAt.setDate(trialEndsAt.getDate() + 30); + + // Update store with trial subscription + await prisma.store.update({ + where: { id: storeId }, + data: { + subscriptionPlan: SubscriptionPlan.FREE, + subscriptionStatus: SubscriptionStatus.TRIAL, + trialEndsAt, + }, + }); +} + +/** + * Upgrade store subscription plan + * @param storeId - The ID of the store + * @param plan - The subscription plan to upgrade to + */ +export async function upgradeSubscription( + storeId: string, + plan: SubscriptionPlan +): Promise { + await prisma.store.update({ + where: { id: storeId }, + data: { + subscriptionPlan: plan, + subscriptionStatus: SubscriptionStatus.ACTIVE, + }, + }); +} + +/** + * Cancel subscription for a store + * @param storeId - The ID of the store + */ +export async function cancelSubscription(storeId: string): Promise { + await prisma.store.update({ + where: { id: storeId }, + data: { + subscriptionStatus: SubscriptionStatus.CANCELLED, + }, + }); +}