Skip to content

Commit 56e32ac

Browse files
committed
Fix types
1 parent 0ddfe32 commit 56e32ac

File tree

5 files changed

+23
-0
lines changed

5 files changed

+23
-0
lines changed

sdk/e2e/utils/e2e-mocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const MOCK_USER = {
2525
referral_code: null,
2626
stripe_customer_id: null,
2727
banned: false,
28+
created_at: new Date('2024-01-01T00:00:00Z'),
2829
} as const
2930

3031
function buildMockAgentTemplate(params: {

sdk/src/__tests__/run-cancellation.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ describe('Run Cancellation Handling', () => {
3030
referral_code: null,
3131
stripe_customer_id: null,
3232
banned: false,
33+
created_at: new Date('2024-01-01T00:00:00Z'),
3334
})
3435
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
3536
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -98,6 +99,7 @@ describe('Run Cancellation Handling', () => {
9899
referral_code: null,
99100
stripe_customer_id: null,
100101
banned: false,
102+
created_at: new Date('2024-01-01T00:00:00Z'),
101103
})
102104
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
103105
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -192,6 +194,7 @@ describe('Run Cancellation Handling', () => {
192194
referral_code: null,
193195
stripe_customer_id: null,
194196
banned: false,
197+
created_at: new Date('2024-01-01T00:00:00Z'),
195198
})
196199
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
197200
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -234,6 +237,7 @@ describe('Run Cancellation Handling', () => {
234237
referral_code: null,
235238
stripe_customer_id: null,
236239
banned: false,
240+
created_at: new Date('2024-01-01T00:00:00Z'),
237241
})
238242
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
239243
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -272,6 +276,7 @@ describe('Run Cancellation Handling', () => {
272276
referral_code: null,
273277
stripe_customer_id: null,
274278
banned: false,
279+
created_at: new Date('2024-01-01T00:00:00Z'),
275280
})
276281
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
277282
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -307,6 +312,7 @@ describe('Run Cancellation Handling', () => {
307312
referral_code: null,
308313
stripe_customer_id: null,
309314
banned: false,
315+
created_at: new Date('2024-01-01T00:00:00Z'),
310316
})
311317
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
312318
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -358,6 +364,7 @@ describe('Run Cancellation Handling', () => {
358364
referral_code: null,
359365
stripe_customer_id: null,
360366
banned: false,
367+
created_at: new Date('2024-01-01T00:00:00Z'),
361368
})
362369
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
363370
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -439,6 +446,7 @@ describe('Run Cancellation Handling', () => {
439446
referral_code: null,
440447
stripe_customer_id: null,
441448
banned: false,
449+
created_at: new Date('2024-01-01T00:00:00Z'),
442450
})
443451
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
444452
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -509,6 +517,7 @@ describe('Run Cancellation Handling', () => {
509517
referral_code: null,
510518
stripe_customer_id: null,
511519
banned: false,
520+
created_at: new Date('2024-01-01T00:00:00Z'),
512521
})
513522
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
514523
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -637,6 +646,7 @@ describe('Run Cancellation Handling', () => {
637646
referral_code: null,
638647
stripe_customer_id: null,
639648
banned: false,
649+
created_at: new Date('2024-01-01T00:00:00Z'),
640650
})
641651
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
642652
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -720,6 +730,7 @@ describe('Run Cancellation Handling', () => {
720730
referral_code: null,
721731
stripe_customer_id: null,
722732
banned: false,
733+
created_at: new Date('2024-01-01T00:00:00Z'),
723734
})
724735

725736
const abortController = new AbortController()
@@ -748,6 +759,7 @@ describe('Run Cancellation Handling', () => {
748759
referral_code: null,
749760
stripe_customer_id: null,
750761
banned: false,
762+
created_at: new Date('2024-01-01T00:00:00Z'),
751763
})
752764
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
753765
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -814,6 +826,7 @@ describe('Run Cancellation Handling', () => {
814826
referral_code: null,
815827
stripe_customer_id: null,
816828
banned: false,
829+
created_at: new Date('2024-01-01T00:00:00Z'),
817830
})
818831
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
819832
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -904,6 +917,7 @@ describe('Run Cancellation Handling', () => {
904917
referral_code: null,
905918
stripe_customer_id: null,
906919
banned: false,
920+
created_at: new Date('2024-01-01T00:00:00Z'),
907921
})
908922
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
909923
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-2')
@@ -987,6 +1001,7 @@ describe('Run Cancellation Handling', () => {
9871001
referral_code: null,
9881002
stripe_customer_id: null,
9891003
banned: false,
1004+
created_at: new Date('2024-01-01T00:00:00Z'),
9901005
})
9911006
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
9921007
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')

sdk/src/__tests__/run-file-filter.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ describe('CodebuffClientOptions fileFilter', () => {
7474
referral_code: null,
7575
stripe_customer_id: null,
7676
banned: false,
77+
created_at: new Date('2024-01-01T00:00:00Z'),
7778
})
7879
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
7980
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -160,6 +161,7 @@ describe('CodebuffClientOptions fileFilter', () => {
160161
referral_code: null,
161162
stripe_customer_id: null,
162163
banned: false,
164+
created_at: new Date('2024-01-01T00:00:00Z'),
163165
})
164166
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
165167
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -243,6 +245,7 @@ describe('CodebuffClientOptions fileFilter', () => {
243245
referral_code: null,
244246
stripe_customer_id: null,
245247
banned: false,
248+
created_at: new Date('2024-01-01T00:00:00Z'),
246249
})
247250
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
248251
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -327,6 +330,7 @@ describe('CodebuffClientOptions fileFilter', () => {
327330
referral_code: null,
328331
stripe_customer_id: null,
329332
banned: false,
333+
created_at: new Date('2024-01-01T00:00:00Z'),
330334
})
331335
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
332336
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')
@@ -399,6 +403,7 @@ describe('CodebuffClientOptions fileFilter', () => {
399403
referral_code: null,
400404
stripe_customer_id: null,
401405
banned: false,
406+
created_at: new Date('2024-01-01T00:00:00Z'),
402407
})
403408
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
404409
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')

sdk/src/__tests__/run-handle-event.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ describe('CodebuffClient handleEvent / handleStreamChunk', () => {
2323
referral_code: null,
2424
stripe_customer_id: null,
2525
banned: false,
26+
created_at: new Date('2024-01-01T00:00:00Z'),
2627
})
2728
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
2829
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')

sdk/src/__tests__/run-mcp-tool-filter.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ describe('MCP tool filtering', () => {
4242
referral_code: null,
4343
stripe_customer_id: null,
4444
banned: false,
45+
created_at: new Date('2024-01-01T00:00:00Z'),
4546
})
4647
spyOn(databaseModule, 'fetchAgentFromDatabase').mockResolvedValue(null)
4748
spyOn(databaseModule, 'startAgentRun').mockResolvedValue('run-1')

0 commit comments

Comments
 (0)