Skip to content

Commit 6238bc6

Browse files
chore: wip
1 parent c9ced15 commit 6238bc6

34 files changed

+418
-30
lines changed

app/Actions/Commerce/DriverIndexAction.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { DriverRequestType } from '@stacksjs/orm'
21
import { Action } from '@stacksjs/actions'
32

43
import { drivers } from '@stacksjs/commerce'
@@ -9,7 +8,7 @@ export default new Action({
98
name: 'Driver Index',
109
description: 'Driver Index ORM Action',
1110
method: 'GET',
12-
async handle(request: DriverRequestType) {
11+
async handle() {
1312
const results = await drivers.fetchAll()
1413

1514
return response.json(results)

app/Actions/Commerce/GiftCardIndexAction.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { GiftCardRequestType } from '@stacksjs/orm'
21
import { Action } from '@stacksjs/actions'
32

43
import { giftCards } from '@stacksjs/commerce'
@@ -9,7 +8,7 @@ export default new Action({
98
name: 'GiftCard Index',
109
description: 'GiftCard Index ORM Action',
1110
method: 'GET',
12-
async handle(request: GiftCardRequestType) {
11+
async handle() {
1312
const results = await giftCards.fetchAll()
1413

1514
return response.json(results)

app/Actions/Commerce/LicenseKeyIndexAction.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { LicenseKeyRequestType } from '@stacksjs/orm'
21
import { Action } from '@stacksjs/actions'
32

43
import { licenses } from '@stacksjs/commerce'
@@ -9,7 +8,7 @@ export default new Action({
98
name: 'LicenseKey Index',
109
description: 'LicenseKey Index ORM Action',
1110
method: 'GET',
12-
async handle(request: LicenseKeyRequestType) {
11+
async handle() {
1312
const results = await licenses.fetchAll()
1413

1514
return response.json(results)

app/Actions/Commerce/PaymentIndexAction.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { PaymentRequestType } from '@stacksjs/orm'
21
import { Action } from '@stacksjs/actions'
32
import { payments } from '@stacksjs/commerce'
43
import { response } from '@stacksjs/router'
@@ -8,7 +7,7 @@ export default new Action({
87
description: 'Payment Index ORM Action',
98
method: 'GET',
109

11-
async handle(request: PaymentRequestType) {
10+
async handle() {
1211
const results = await payments.fetchAll()
1312

1413
return response.json(results)

storage/framework/core/commerce/src/index.ts

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,47 @@ import * as digital from './digital'
66
import * as drivers from './drivers'
77
import * as giftCards from './gift-cards'
88
import * as licenses from './licenses'
9-
import * as manufacturer from './manufacturer'
109
import * as orders from './orders'
1110
import * as payments from './payments'
11+
import * as products from './products'
1212
import * as rates from './rates'
1313
import * as restaurant from './restaurant'
14-
import * as reviews from './reviews'
1514
import * as deliveryRoutes from './routes'
1615
import * as shipping from './shipping'
1716
import * as tax from './tax'
18-
import * as unit from './unit'
19-
import * as variants from './variants'
2017
import * as waitlist from './waitlist'
2118
import * as zones from './zones'
2219

2320
type CouponsModule = typeof coupons
2421
type CustomersModule = typeof customers
2522
type GiftCardsModule = typeof giftCards
26-
type ManufacturerModule = typeof manufacturer
2723
type OrdersModule = typeof orders
2824
type PaymentsModule = typeof payments
29-
type ReviewsModule = typeof reviews
25+
type ProductsModule = typeof products
3026
type RestaurantModule = typeof restaurant
31-
type UnitModule = typeof unit
3227
type ShippingModule = typeof shipping
3328
type RatesModule = typeof rates
3429
type ZonesModule = typeof zones
35-
type VariantsModule = typeof variants
3630
type DriversModule = typeof drivers
3731
type LicensesModule = typeof licenses
3832
type DigitalModule = typeof digital
3933
type TaxModule = typeof tax
4034
type DeliveryRoutesModule = typeof deliveryRoutes
4135
type WaitlistModule = typeof waitlist
4236
type DevicesModule = typeof devices
37+
4338
export interface EcommerceNamespace {
4439
coupons: CouponsModule
4540
customers: CustomersModule
4641
giftCards: GiftCardsModule
47-
manufacturer: ManufacturerModule
4842
orders: OrdersModule
4943
drivers: DriversModule
5044
payments: PaymentsModule
51-
reviews: ReviewsModule
45+
products: ProductsModule
5246
restaurant: RestaurantModule
5347
shipping: ShippingModule
5448
rates: RatesModule
5549
zones: ZonesModule
56-
variants: VariantsModule
57-
unit: UnitModule
5850
deliveryRoutes: DeliveryRoutesModule
5951
licenses: LicensesModule
6052
digital: DigitalModule
@@ -67,19 +59,16 @@ export const ecommerce: EcommerceNamespace = {
6759
coupons,
6860
customers,
6961
giftCards,
70-
manufacturer,
7162
drivers,
7263
orders,
7364
payments,
74-
reviews,
65+
products,
7566
restaurant,
7667
shipping,
7768
deliveryRoutes,
7869
rates,
7970
zones,
80-
variants,
8171
licenses,
82-
unit,
8372
digital,
8473
devices,
8574
tax,
@@ -97,16 +86,13 @@ export {
9786
drivers,
9887
giftCards,
9988
licenses,
100-
manufacturer,
10189
orders,
10290
payments,
91+
products,
10392
rates,
10493
restaurant,
105-
reviews,
10694
shipping,
10795
tax,
108-
unit,
109-
variants,
11096
waitlist,
11197
zones,
11298
}

storage/framework/core/commerce/src/categories/fetch.ts renamed to storage/framework/core/commerce/src/products/categories/fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { CategoryJsonResponse } from '@stacksjs/orm'
2-
import type { CategoryStats } from '../types'
2+
import type { CategoryStats } from '../../types'
33
import { db } from '@stacksjs/database'
44
import { formatDate } from '@stacksjs/orm'
55

storage/framework/core/commerce/src/categories/store.ts renamed to storage/framework/core/commerce/src/products/categories/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { CategoryRequestType } from '@stacksjs/orm'
2-
import type { CategoryJsonResponse, NewCategory } from '../../../../orm/src/models/Category'
2+
import type { CategoryJsonResponse, NewCategory } from '../../../../../orm/src/models/Category'
33
import { randomUUIDv7 } from 'bun'
44
import { db } from '@stacksjs/database'
55

0 commit comments

Comments
 (0)