@@ -1332,13 +1332,13 @@ export async function generateModelString(
1332
1332
1333
1333
async setDefaultPaymentMethod(pmId: number): Promise<Stripe.Response<Stripe.Customer>> {
1334
1334
const updatedCustomer = await managePaymentMethod.setDefaultPaymentMethod(this, pmId)
1335
-
1335
+
1336
1336
return updatedCustomer
1337
1337
}
1338
1338
1339
1339
async setUserDefaultPaymentMethod(paymentMethodId: string): Promise<Stripe.Response<Stripe.Customer>> {
1340
1340
const updatedCustomer = await managePaymentMethod.setUserDefaultPayment(this, paymentMethodId)
1341
-
1341
+
1342
1342
return updatedCustomer
1343
1343
}
1344
1344
@@ -1441,11 +1441,11 @@ export async function generateModelString(
1441
1441
async isIncomplete(type: string): Promise<boolean> {
1442
1442
return await manageSubscription.isIncomplete(this, type)
1443
1443
}
1444
-
1444
+
1445
1445
async paymentMethods(cardType?: string): Promise<PaymentMethodModel[]> {
1446
1446
return await managePaymentMethod.listPaymentMethods(this, cardType)
1447
1447
}
1448
-
1448
+
1449
1449
async newSubscriptionInvoice(
1450
1450
type: string,
1451
1451
lookupKey: string,
@@ -1466,7 +1466,7 @@ export async function generateModelString(
1466
1466
1467
1467
return { subscription, paymentIntent }
1468
1468
}
1469
-
1469
+
1470
1470
async updateSubscription(
1471
1471
type: string,
1472
1472
lookupKey: string,
@@ -1495,10 +1495,10 @@ export async function generateModelString(
1495
1495
const defaultOptions: Partial<Stripe.SetupIntentCreateParams> = {
1496
1496
metadata: options.metadata,
1497
1497
}
1498
-
1498
+
1499
1499
// Merge any additional provided options
1500
1500
const mergedOptions = { ...defaultOptions, ...options }
1501
-
1501
+
1502
1502
// Call Stripe to create the SetupIntent
1503
1503
return await manageSetupIntent.create(this, mergedOptions)
1504
1504
}
@@ -1691,7 +1691,7 @@ export async function generateModelString(
1691
1691
}
1692
1692
next_cursor: number | null
1693
1693
}
1694
-
1694
+
1695
1695
export type ${ modelName } Type = Selectable<${ formattedTableName } Table>
1696
1696
export type New${ modelName } = Partial<Insertable<${ formattedTableName } Table>>
1697
1697
export type ${ modelName } Update = Updateable<${ formattedTableName } Table>
@@ -1765,7 +1765,7 @@ export async function generateModelString(
1765
1765
1766
1766
if (!model)
1767
1767
return undefined
1768
-
1768
+
1769
1769
const instance = new ${ modelName } Model(null)
1770
1770
1771
1771
const result = await instance.mapWith(model)
@@ -1852,7 +1852,7 @@ export async function generateModelString(
1852
1852
const instance = new ${ modelName } Model(null)
1853
1853
1854
1854
let models
1855
-
1855
+
1856
1856
if (instance.hasSelect) {
1857
1857
${ instanceSoftDeleteStatements }
1858
1858
@@ -1870,7 +1870,7 @@ export async function generateModelString(
1870
1870
1871
1871
return new ${ modelName } Model(results)
1872
1872
}))
1873
-
1873
+
1874
1874
return data
1875
1875
}
1876
1876
@@ -2031,7 +2031,7 @@ export async function generateModelString(
2031
2031
)
2032
2032
2033
2033
${ uuidQueryMany }
2034
-
2034
+
2035
2035
await db.insertInto('${ tableName } ')
2036
2036
.values(filteredValues)
2037
2037
.executeTakeFirst()
@@ -2058,7 +2058,7 @@ export async function generateModelString(
2058
2058
${ instanceSoftDeleteStatementsUpdateFrom }
2059
2059
2060
2060
${ mittDeleteStatement }
2061
-
2061
+
2062
2062
return await db.deleteFrom('${ tableName } ')
2063
2063
.where('id', '=', id)
2064
2064
.execute()
@@ -2079,7 +2079,7 @@ export async function generateModelString(
2079
2079
}
2080
2080
2081
2081
this.selectFromQuery = this.selectFromQuery.where(column, operator, value)
2082
-
2082
+
2083
2083
this.updateFromQuery = this.updateFromQuery.where(column, operator, value)
2084
2084
this.deleteFromQuery = this.deleteFromQuery.where(column, operator, value)
2085
2085
@@ -2404,15 +2404,15 @@ export async function generateModelString(
2404
2404
2405
2405
with(relations: string[]): ${ modelName } Model {
2406
2406
this.withRelations = relations
2407
-
2407
+
2408
2408
return this
2409
2409
}
2410
2410
2411
2411
static with(relations: string[]): ${ modelName } Model {
2412
2412
const instance = new ${ modelName } Model(null)
2413
2413
2414
2414
instance.withRelations = relations
2415
-
2415
+
2416
2416
return instance
2417
2417
}
2418
2418
@@ -2857,7 +2857,7 @@ async function ensureCodeStyle(): Promise<void> {
2857
2857
const exitCode = await proc . exited
2858
2858
2859
2859
if ( exitCode !== 0 ) {
2860
- log . debug ( 'There was an error fixing your code style but we are ignoring it because we fixed the auto-generated code already. Run bunx eslint . --fix to fix the rest of the code.' )
2860
+ log . debug ( 'There was an error fixing your code style but we are ignoring it because we fixed the auto-generated code already. Run ` bunx eslint . --fix` to fix the rest of the code.' )
2861
2861
}
2862
2862
else {
2863
2863
log . debug ( 'Code style fixed successfully.' )
0 commit comments