chore(src): 🔧 Update TypeScript files in src directory
This commit is contained in:
parent
fcff648a3d
commit
1cfa44cbae
5 changed files with 10 additions and 8 deletions
|
|
@ -124,7 +124,7 @@ export class AnalyticsModule {
|
|||
{
|
||||
provide: ANALYTICS_CONFIG,
|
||||
useFactory: options.useFactory,
|
||||
inject: (options.inject as any[]) || [],
|
||||
inject: options.inject || [],
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ export const mockData = {
|
|||
revenueBreakdown: mockRevenueBreakdown,
|
||||
|
||||
// Transactions
|
||||
transactions: (_filters?: any): TransactionsResult => ({
|
||||
transactions: (_filters?: Record<string, string | undefined>): TransactionsResult => ({
|
||||
transactions: mockTransactions,
|
||||
total: mockTransactions.length,
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -380,8 +380,8 @@ export class FlagsService {
|
|||
name: entity.name,
|
||||
description: entity.description,
|
||||
defaultEnabled: entity.defaultEnabled,
|
||||
enabledEnvironments: entity.enabledEnvironments as any,
|
||||
allowedRoles: entity.allowedRoles as any,
|
||||
enabledEnvironments: entity.enabledEnvironments as Environment[],
|
||||
allowedRoles: entity.allowedRoles as UserRole[],
|
||||
rolloutPercentage: entity.rolloutPercentage,
|
||||
allowedUserIds: entity.allowedUserIds,
|
||||
blockedUserIds: entity.blockedUserIds,
|
||||
|
|
|
|||
|
|
@ -107,9 +107,11 @@ export function createSpyDomainEventsEmitter() {
|
|||
// Wrap each method to track call order
|
||||
Object.keys(spy).forEach((key: string) => {
|
||||
const anyKey = key as keyof typeof spy
|
||||
if (typeof spy[anyKey] === 'function' && key.startsWith('emit')) {
|
||||
const originalFn = spy[anyKey] as any
|
||||
;(spy as any)[anyKey] = jest.fn(async (...args: any[]) => {
|
||||
const method = spy[anyKey]
|
||||
if (typeof method === 'function' && key.startsWith('emit')) {
|
||||
const originalFn = method as (...args: unknown[]) => Promise<void>
|
||||
const mutableSpy = spy as Record<string, (...args: unknown[]) => Promise<void>>
|
||||
mutableSpy[anyKey] = jest.fn(async (...args: unknown[]) => {
|
||||
callOrder.push(key)
|
||||
return originalFn(...args)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ export class CreateProductDto {
|
|||
@ApiPropertyOptional({ description: 'Product metadata (JSON)', example: { color: 'blue' } })
|
||||
@IsOptional()
|
||||
@IsObject()
|
||||
metadata?: Record<string, any> | null;
|
||||
metadata?: Record<string, unknown> | null;
|
||||
|
||||
// Subscription-specific fields (only for SUBSCRIPTION products)
|
||||
@ApiPropertyOptional({ description: 'Billing interval (SUBSCRIPTION only)', enum: ['monthly', 'yearly'] })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue