Skip to content

Commit 14c36e4

Browse files
chore: wip
1 parent f274d13 commit 14c36e4

31 files changed

+89
-49
lines changed

storage/framework/core/commerce/src/receipts/printer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ class TSPIVPrinter implements PrinterDriver {
3737
// Implement actual printing logic here
3838
}
3939

40-
async cleanUp(printer: Printer): Promise<void> {
40+
async cleanUp(_printer: Printer): Promise<void> {
4141
// eslint-disable-next-line no-console
4242
console.log('TSP IV Printer: Cleaning up print job...')
4343
// Implement actual cleanup logic here
4444
}
4545

46-
async checkStatus(printer: Printer): Promise<boolean> {
46+
async checkStatus(_printer: Printer): Promise<boolean> {
4747
// eslint-disable-next-line no-console
4848
console.log('TSP IV Printer: Checking online status...')
4949
// Implement actual status check logic here
@@ -56,7 +56,7 @@ class TSPIVPrinter implements PrinterDriver {
5656
return [] // Return actual printers
5757
}
5858

59-
async setup(printer: Printer): Promise<void> {
59+
async setup(_printer: Printer): Promise<void> {
6060
// eslint-disable-next-line no-console
6161
console.log('TSP IV Printer: Setting up printer...')
6262
// Implement actual setup logic here
@@ -68,7 +68,7 @@ class TSPIVPrinter implements PrinterDriver {
6868
// Implement actual restart logic here
6969
}
7070

71-
async canInteractWithPrinter(printer: Printer): Promise<boolean> {
71+
async canInteractWithPrinter(_printer: Printer): Promise<boolean> {
7272
// eslint-disable-next-line no-console
7373
console.log('TSP IV Printer: Checking if can interact with printer...')
7474
return true // Return actual capability

storage/framework/core/orm/src/utils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,32 +1871,32 @@ export interface ${formattedTableName}Table {
18711871
const relationName = relation.relationName || formattedModelName + modelRelation
18721872
if (relation.throughModel !== undefined) {
18731873
modelTypeInterface += `
1874-
${relationName}: () => Promise<${modelRelation}Type | undefined>`
1874+
${relationName}: () => Promise<${modelRelation}ModelType | undefined>`
18751875
}
18761876
}
18771877

18781878
if (relationType === 'morphType' && relationCount === 'one') {
18791879
const morphName = relation.relationName || `${formattedModelName}able`
18801880
modelTypeInterface += `
1881-
${morphName}: () => Promise<${modelRelation}Type | undefined>`
1881+
${morphName}: () => Promise<${modelRelation}ModelType | undefined>`
18821882
}
18831883

18841884
if (relationType === 'morphType' && relationCount === 'many') {
18851885
const morphName = relation.relationName || `${formattedModelName}able`
18861886
modelTypeInterface += `
1887-
${morphName}: () => Promise<${modelRelation}Type[]>`
1887+
${morphName}: () => Promise<${modelRelation}ModelType[]>`
18881888
}
18891889

18901890
if (relationType === 'belongsType' && !relationCount) {
18911891
const relationName = camelCase(relation.relationName || formattedModelRelation)
18921892
modelTypeInterface += `
1893-
${relationName}Belong: () => Promise<${modelRelation}Type>`
1893+
${relationName}Belong: () => Promise<${modelRelation}ModelType>`
18941894
}
18951895

18961896
if (relationType === 'belongsType' && relationCount === 'many') {
18971897
const relationName = relation.relationName || formattedModelName + plural(pascalCase(modelRelation))
18981898
modelTypeInterface += `
1899-
${relationName}: () => Promise<${modelRelation}Type[]>`
1899+
${relationName}: () => Promise<${modelRelation}ModelType[]>`
19001900
}
19011901
}
19021902

storage/framework/orm/src/types/AuthorType.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Generated, Insertable, RawBuilder, Selectable, Updateable } from '@stacksjs/database'
22
import type { Operator } from '@stacksjs/orm'
33
import type { PostModelType } from './PostType'
4+
import type { UserModelType } from './UserType'
45

56
export interface AuthorsTable {
67
id: Generated<number>
@@ -119,5 +120,5 @@ export interface AuthorModelType {
119120
toJSON: () => AuthorJsonResponse
120121
parseResult: (model: AuthorModelType) => AuthorModelType
121122

122-
userBelong: () => Promise<UserType>
123+
userBelong: () => Promise<UserModelType>
123124
}

storage/framework/orm/src/types/CartItemType.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Generated, Insertable, RawBuilder, Selectable, Updateable } from '@stacksjs/database'
22
import type { Operator } from '@stacksjs/orm'
3+
import type { CartModelType } from './CartType'
34

45
export interface CartItemsTable {
56
id: Generated<number>
@@ -144,5 +145,5 @@ export interface CartItemModelType {
144145
toJSON: () => CartItemJsonResponse
145146
parseResult: (model: CartItemModelType) => CartItemModelType
146147

147-
cartBelong: () => Promise<CartType>
148+
cartBelong: () => Promise<CartModelType>
148149
}

storage/framework/orm/src/types/CartType.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type { Generated, Insertable, RawBuilder, Selectable, Updateable } from '@stacksjs/database'
22
import type { Operator } from '@stacksjs/orm'
33
import type { CartItemModelType } from './CartItemType'
4+
import type { CouponModelType } from './CouponType'
5+
import type { CustomerModelType } from './CustomerType'
46

57
export interface CartsTable {
68
id: Generated<number>
@@ -145,6 +147,6 @@ export interface CartModelType {
145147
toJSON: () => CartJsonResponse
146148
parseResult: (model: CartModelType) => CartModelType
147149

148-
customerBelong: () => Promise<CustomerType>
149-
couponBelong: () => Promise<CouponType>
150+
customerBelong: () => Promise<CustomerModelType>
151+
couponBelong: () => Promise<CouponModelType>
150152
}

storage/framework/orm/src/types/CouponType.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Generated, Insertable, RawBuilder, Selectable, Updateable } from '@stacksjs/database'
22
import type { Operator } from '@stacksjs/orm'
33
import type { OrderModelType } from './OrderType'
4+
import type { ProductModelType } from './ProductType'
45

56
export interface CouponsTable {
67
id: Generated<number>
@@ -152,5 +153,5 @@ export interface CouponModelType {
152153
toJSON: () => CouponJsonResponse
153154
parseResult: (model: CouponModelType) => CouponModelType
154155

155-
productBelong: () => Promise<ProductType>
156+
productBelong: () => Promise<ProductModelType>
156157
}

storage/framework/orm/src/types/CustomerType.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { LicenseKeyModelType } from './LicenseKeyType'
55
import type { OrderModelType } from './OrderType'
66
import type { PaymentModelType } from './PaymentType'
77
import type { ReviewModelType } from './ReviewType'
8+
import type { UserModelType } from './UserType'
89
import type { WaitlistProductModelType } from './WaitlistProductType'
910
import type { WaitlistRestaurantModelType } from './WaitlistRestaurantType'
1011

@@ -146,5 +147,5 @@ export interface CustomerModelType {
146147
toJSON: () => CustomerJsonResponse
147148
parseResult: (model: CustomerModelType) => CustomerModelType
148149

149-
userBelong: () => Promise<UserType>
150+
userBelong: () => Promise<UserModelType>
150151
}

storage/framework/orm/src/types/DeploymentType.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Generated, Insertable, RawBuilder, Selectable, Updateable } from '@stacksjs/database'
22
import type { Operator } from '@stacksjs/orm'
3+
import type { UserModelType } from './UserType'
34

45
export interface DeploymentsTable {
56
id: Generated<number>
@@ -132,5 +133,5 @@ export interface DeploymentModelType {
132133
toJSON: () => DeploymentJsonResponse
133134
parseResult: (model: DeploymentModelType) => DeploymentModelType
134135

135-
userBelong: () => Promise<UserType>
136+
userBelong: () => Promise<UserModelType>
136137
}

storage/framework/orm/src/types/DriverType.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Generated, Insertable, RawBuilder, Selectable, Updateable } from '@stacksjs/database'
22
import type { Operator } from '@stacksjs/orm'
33
import type { DeliveryRouteModelType } from './DeliveryRouteType'
4+
import type { UserModelType } from './UserType'
45

56
export interface DriversTable {
67
id: Generated<number>
@@ -128,5 +129,5 @@ export interface DriverModelType {
128129
toJSON: () => DriverJsonResponse
129130
parseResult: (model: DriverModelType) => DriverModelType
130131

131-
userBelong: () => Promise<UserType>
132+
userBelong: () => Promise<UserModelType>
132133
}

storage/framework/orm/src/types/GiftCardType.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Generated, Insertable, RawBuilder, Selectable, Updateable } from '@stacksjs/database'
22
import type { Operator } from '@stacksjs/orm'
3+
import type { CustomerModelType } from './CustomerType'
34
import type { OrderModelType } from './OrderType'
45

56
export interface GiftCardsTable {
@@ -158,5 +159,5 @@ export interface GiftCardModelType {
158159
toJSON: () => GiftCardJsonResponse
159160
parseResult: (model: GiftCardModelType) => GiftCardModelType
160161

161-
customerBelong: () => Promise<CustomerType>
162+
customerBelong: () => Promise<CustomerModelType>
162163
}

0 commit comments

Comments
 (0)