@allbluecn/database 0.6.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/dist/get-prisma.d.ts +1 -0
- package/dist/get-prisma.js +7 -0
- package/generated/browser.ts +85 -0
- package/generated/client.ts +85 -0
- package/generated/commonInputTypes.ts +106 -46
- package/generated/internal/class.ts +174 -4
- package/generated/internal/prismaNamespace.ts +1698 -151
- package/generated/internal/prismaNamespaceBrowser.ts +279 -7
- package/generated/models/AiProviderConfig.ts +100 -1
- package/generated/models/AiStreamChunk.ts +1159 -0
- package/generated/models/AiUsageLog.ts +91 -31
- package/generated/models/Blob.ts +1428 -0
- package/generated/models/BusinessAgentBinding.ts +1553 -0
- package/generated/models/ChatInterrupt.ts +42 -1
- package/generated/models/ChatMessage.ts +58 -29
- package/generated/models/ChatPersistenceMeta.ts +1121 -0
- package/generated/models/ChatRun.ts +166 -1
- package/generated/models/ChatThread.ts +294 -1
- package/generated/models/CodeSnippet.ts +1555 -0
- package/generated/models/DesktopSetting.ts +1059 -0
- package/generated/models/EmailLog.ts +1345 -0
- package/generated/models/EmailPreference.ts +1257 -0
- package/generated/models/EmailSubscriber.ts +1233 -0
- package/generated/models/EmailVerificationToken.ts +1380 -0
- package/generated/models/GenerationRun.ts +193 -1
- package/generated/models/HarnessPlugin.ts +1677 -0
- package/generated/models/HarnessWorkspace.ts +1650 -0
- package/generated/models/InvitationCode.ts +65 -9
- package/generated/models/NotificationPreference.ts +27 -1
- package/generated/models/OAuthProviderConfig.ts +1227 -0
- package/generated/models/Plan.ts +115 -1
- package/generated/models/SandboxInstance.ts +1277 -0
- package/generated/models/SystemPromptTemplate.ts +1583 -0
- package/generated/models/SystemPromptVersion.ts +1459 -0
- package/generated/models/User.ts +5759 -823
- package/generated/models/UserAgent.ts +250 -1
- package/generated/models/Workspace.ts +3 -1
- package/generated/models/WorkspaceFile.ts +1535 -0
- package/generated/models.ts +17 -0
- package/generated-sqlite/browser.ts +90 -0
- package/generated-sqlite/client.ts +90 -0
- package/generated-sqlite/commonInputTypes.ts +192 -78
- package/generated-sqlite/internal/class.ts +184 -4
- package/generated-sqlite/internal/prismaNamespace.ts +1786 -138
- package/generated-sqlite/internal/prismaNamespaceBrowser.ts +291 -7
- package/generated-sqlite/models/AiProviderConfig.ts +100 -1
- package/generated-sqlite/models/AiStreamChunk.ts +1157 -0
- package/generated-sqlite/models/AiUsageLog.ts +91 -31
- package/generated-sqlite/models/Blob.ts +1425 -0
- package/generated-sqlite/models/BusinessAgentBinding.ts +1549 -0
- package/generated-sqlite/models/ChatInterrupt.ts +42 -1
- package/generated-sqlite/models/ChatMessage.ts +58 -29
- package/generated-sqlite/models/ChatPersistenceMeta.ts +1119 -0
- package/generated-sqlite/models/ChatRun.ts +174 -1
- package/generated-sqlite/models/ChatThread.ts +293 -1
- package/generated-sqlite/models/CodeSnippet.ts +1552 -0
- package/generated-sqlite/models/DesktopSetting.ts +1057 -0
- package/generated-sqlite/models/EmailLog.ts +1343 -0
- package/generated-sqlite/models/EmailPreference.ts +1255 -0
- package/generated-sqlite/models/EmailSubscriber.ts +1231 -0
- package/generated-sqlite/models/EmailVerificationToken.ts +1377 -0
- package/generated-sqlite/models/GenerationRun.ts +193 -1
- package/generated-sqlite/models/HarnessPlugin.ts +1674 -0
- package/generated-sqlite/models/HarnessWorkspace.ts +1647 -0
- package/generated-sqlite/models/InvitationCode.ts +65 -9
- package/generated-sqlite/models/NotificationPreference.ts +1313 -0
- package/generated-sqlite/models/OAuthProviderConfig.ts +1225 -0
- package/generated-sqlite/models/PageVersion.ts +0 -8
- package/generated-sqlite/models/Plan.ts +115 -1
- package/generated-sqlite/models/SandboxInstance.ts +1283 -0
- package/generated-sqlite/models/SystemPromptTemplate.ts +1581 -0
- package/generated-sqlite/models/SystemPromptVersion.ts +1456 -0
- package/generated-sqlite/models/User.ts +5345 -701
- package/generated-sqlite/models/UserAgent.ts +250 -1
- package/generated-sqlite/models/Workspace.ts +3 -1
- package/generated-sqlite/models/WorkspaceFile.ts +1532 -0
- package/generated-sqlite/models.ts +18 -0
- package/get-prisma.ts +6 -0
- package/index.ts +11 -6
- package/migrations/20260911120000_add_pgvector_tables/migration.sql +28 -0
- package/migrations/20260911171433_email_auth_invitation/migration.sql +80 -0
- package/migrations/20260912032616_email_p4_p8/migration.sql +42 -0
- package/migrations/20260914002427_ai_p0_durable_runs_meta/migration.sql +15 -0
- package/migrations/20260914041010_ai_p0_interrupt_requested_at/migration.sql +15 -0
- package/migrations/20260914041909_ai_p0_message_tool_call_id/migration.sql +2 -0
- package/migrations/20260914042448_ai_p0_message_content_json/migration.sql +27 -0
- package/migrations/20260914150229_harness_plugin/migration.sql +27 -0
- package/migrations/20260914174404_prompt_platform_agents/migration.sql +67 -0
- package/migrations/20260915090000_add_memory_facts/migration.sql +22 -0
- package/migrations/20260915124417_ai_p3_sandbox_durable/migration.sql +48 -0
- package/migrations/20260915150034_sandbox_instance_updatedat_bigint/migration.sql +2 -0
- package/migrations/20260915154000_add_code_snippets/migration.sql +31 -0
- package/migrations/20260916090000_ai_usage_log_nullable_workspace/migration.sql +10 -0
- package/migrations/20260916192752_add_ai_source_mode/migration.sql +13 -0
- package/migrations/20260917044512_harness_workspace/migration.sql +47 -0
- package/migrations/20260917100000_add_media_plan_limits/migration.sql +3 -0
- package/migrations/20260917163433_add_generation_run_linked_target/migration.sql +2 -0
- package/migrations/20260920050606_add_blob_table/migration.sql +17 -0
- package/migrations/20260920093412_add_byteplus_voice_fields/migration.sql +3 -0
- package/package.json +8 -3
- package/schema.prisma +413 -99
- package/schema.sqlite.prisma +865 -543
|
@@ -43,6 +43,7 @@ export type AiUsageLogMinAggregateOutputType = {
|
|
|
43
43
|
workspaceId: string | null
|
|
44
44
|
userId: string | null
|
|
45
45
|
source: string | null
|
|
46
|
+
activity: string | null
|
|
46
47
|
provider: string | null
|
|
47
48
|
model: string | null
|
|
48
49
|
inputTokens: number | null
|
|
@@ -59,6 +60,7 @@ export type AiUsageLogMaxAggregateOutputType = {
|
|
|
59
60
|
workspaceId: string | null
|
|
60
61
|
userId: string | null
|
|
61
62
|
source: string | null
|
|
63
|
+
activity: string | null
|
|
62
64
|
provider: string | null
|
|
63
65
|
model: string | null
|
|
64
66
|
inputTokens: number | null
|
|
@@ -75,6 +77,7 @@ export type AiUsageLogCountAggregateOutputType = {
|
|
|
75
77
|
workspaceId: number
|
|
76
78
|
userId: number
|
|
77
79
|
source: number
|
|
80
|
+
activity: number
|
|
78
81
|
provider: number
|
|
79
82
|
model: number
|
|
80
83
|
inputTokens: number
|
|
@@ -105,6 +108,7 @@ export type AiUsageLogMinAggregateInputType = {
|
|
|
105
108
|
workspaceId?: true
|
|
106
109
|
userId?: true
|
|
107
110
|
source?: true
|
|
111
|
+
activity?: true
|
|
108
112
|
provider?: true
|
|
109
113
|
model?: true
|
|
110
114
|
inputTokens?: true
|
|
@@ -121,6 +125,7 @@ export type AiUsageLogMaxAggregateInputType = {
|
|
|
121
125
|
workspaceId?: true
|
|
122
126
|
userId?: true
|
|
123
127
|
source?: true
|
|
128
|
+
activity?: true
|
|
124
129
|
provider?: true
|
|
125
130
|
model?: true
|
|
126
131
|
inputTokens?: true
|
|
@@ -137,6 +142,7 @@ export type AiUsageLogCountAggregateInputType = {
|
|
|
137
142
|
workspaceId?: true
|
|
138
143
|
userId?: true
|
|
139
144
|
source?: true
|
|
145
|
+
activity?: true
|
|
140
146
|
provider?: true
|
|
141
147
|
model?: true
|
|
142
148
|
inputTokens?: true
|
|
@@ -237,9 +243,10 @@ export type AiUsageLogGroupByArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
|
|
237
243
|
|
|
238
244
|
export type AiUsageLogGroupByOutputType = {
|
|
239
245
|
id: string
|
|
240
|
-
workspaceId: string
|
|
246
|
+
workspaceId: string | null
|
|
241
247
|
userId: string
|
|
242
248
|
source: string
|
|
249
|
+
activity: string | null
|
|
243
250
|
provider: string
|
|
244
251
|
model: string
|
|
245
252
|
inputTokens: number
|
|
@@ -276,9 +283,10 @@ export type AiUsageLogWhereInput = {
|
|
|
276
283
|
OR?: Prisma.AiUsageLogWhereInput[]
|
|
277
284
|
NOT?: Prisma.AiUsageLogWhereInput | Prisma.AiUsageLogWhereInput[]
|
|
278
285
|
id?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
279
|
-
workspaceId?: Prisma.
|
|
286
|
+
workspaceId?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
280
287
|
userId?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
281
288
|
source?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
289
|
+
activity?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
282
290
|
provider?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
283
291
|
model?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
284
292
|
inputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
|
|
@@ -288,15 +296,16 @@ export type AiUsageLogWhereInput = {
|
|
|
288
296
|
errorMessage?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
289
297
|
durationMs?: Prisma.IntNullableFilter<"AiUsageLog"> | number | null
|
|
290
298
|
createdAt?: Prisma.DateTimeFilter<"AiUsageLog"> | Date | string
|
|
291
|
-
workspace?: Prisma.XOR<Prisma.
|
|
299
|
+
workspace?: Prisma.XOR<Prisma.WorkspaceNullableScalarRelationFilter, Prisma.WorkspaceWhereInput> | null
|
|
292
300
|
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
|
293
301
|
}
|
|
294
302
|
|
|
295
303
|
export type AiUsageLogOrderByWithRelationInput = {
|
|
296
304
|
id?: Prisma.SortOrder
|
|
297
|
-
workspaceId?: Prisma.SortOrder
|
|
305
|
+
workspaceId?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
298
306
|
userId?: Prisma.SortOrder
|
|
299
307
|
source?: Prisma.SortOrder
|
|
308
|
+
activity?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
300
309
|
provider?: Prisma.SortOrder
|
|
301
310
|
model?: Prisma.SortOrder
|
|
302
311
|
inputTokens?: Prisma.SortOrder
|
|
@@ -315,9 +324,10 @@ export type AiUsageLogWhereUniqueInput = Prisma.AtLeast<{
|
|
|
315
324
|
AND?: Prisma.AiUsageLogWhereInput | Prisma.AiUsageLogWhereInput[]
|
|
316
325
|
OR?: Prisma.AiUsageLogWhereInput[]
|
|
317
326
|
NOT?: Prisma.AiUsageLogWhereInput | Prisma.AiUsageLogWhereInput[]
|
|
318
|
-
workspaceId?: Prisma.
|
|
327
|
+
workspaceId?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
319
328
|
userId?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
320
329
|
source?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
330
|
+
activity?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
321
331
|
provider?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
322
332
|
model?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
323
333
|
inputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
|
|
@@ -327,15 +337,16 @@ export type AiUsageLogWhereUniqueInput = Prisma.AtLeast<{
|
|
|
327
337
|
errorMessage?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
328
338
|
durationMs?: Prisma.IntNullableFilter<"AiUsageLog"> | number | null
|
|
329
339
|
createdAt?: Prisma.DateTimeFilter<"AiUsageLog"> | Date | string
|
|
330
|
-
workspace?: Prisma.XOR<Prisma.
|
|
340
|
+
workspace?: Prisma.XOR<Prisma.WorkspaceNullableScalarRelationFilter, Prisma.WorkspaceWhereInput> | null
|
|
331
341
|
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
|
332
342
|
}, "id">
|
|
333
343
|
|
|
334
344
|
export type AiUsageLogOrderByWithAggregationInput = {
|
|
335
345
|
id?: Prisma.SortOrder
|
|
336
|
-
workspaceId?: Prisma.SortOrder
|
|
346
|
+
workspaceId?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
337
347
|
userId?: Prisma.SortOrder
|
|
338
348
|
source?: Prisma.SortOrder
|
|
349
|
+
activity?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
339
350
|
provider?: Prisma.SortOrder
|
|
340
351
|
model?: Prisma.SortOrder
|
|
341
352
|
inputTokens?: Prisma.SortOrder
|
|
@@ -357,9 +368,10 @@ export type AiUsageLogScalarWhereWithAggregatesInput = {
|
|
|
357
368
|
OR?: Prisma.AiUsageLogScalarWhereWithAggregatesInput[]
|
|
358
369
|
NOT?: Prisma.AiUsageLogScalarWhereWithAggregatesInput | Prisma.AiUsageLogScalarWhereWithAggregatesInput[]
|
|
359
370
|
id?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
|
|
360
|
-
workspaceId?: Prisma.
|
|
371
|
+
workspaceId?: Prisma.StringNullableWithAggregatesFilter<"AiUsageLog"> | string | null
|
|
361
372
|
userId?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
|
|
362
373
|
source?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
|
|
374
|
+
activity?: Prisma.StringNullableWithAggregatesFilter<"AiUsageLog"> | string | null
|
|
363
375
|
provider?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
|
|
364
376
|
model?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
|
|
365
377
|
inputTokens?: Prisma.IntWithAggregatesFilter<"AiUsageLog"> | number
|
|
@@ -374,6 +386,7 @@ export type AiUsageLogScalarWhereWithAggregatesInput = {
|
|
|
374
386
|
export type AiUsageLogCreateInput = {
|
|
375
387
|
id?: string
|
|
376
388
|
source?: string
|
|
389
|
+
activity?: string | null
|
|
377
390
|
provider: string
|
|
378
391
|
model: string
|
|
379
392
|
inputTokens?: number
|
|
@@ -383,15 +396,16 @@ export type AiUsageLogCreateInput = {
|
|
|
383
396
|
errorMessage?: string | null
|
|
384
397
|
durationMs?: number | null
|
|
385
398
|
createdAt?: Date | string
|
|
386
|
-
workspace
|
|
399
|
+
workspace?: Prisma.WorkspaceCreateNestedOneWithoutAiUsageLogsInput
|
|
387
400
|
user: Prisma.UserCreateNestedOneWithoutAiUsageLogsInput
|
|
388
401
|
}
|
|
389
402
|
|
|
390
403
|
export type AiUsageLogUncheckedCreateInput = {
|
|
391
404
|
id?: string
|
|
392
|
-
workspaceId
|
|
405
|
+
workspaceId?: string | null
|
|
393
406
|
userId: string
|
|
394
407
|
source?: string
|
|
408
|
+
activity?: string | null
|
|
395
409
|
provider: string
|
|
396
410
|
model: string
|
|
397
411
|
inputTokens?: number
|
|
@@ -406,6 +420,7 @@ export type AiUsageLogUncheckedCreateInput = {
|
|
|
406
420
|
export type AiUsageLogUpdateInput = {
|
|
407
421
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
408
422
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
423
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
409
424
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
410
425
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
411
426
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -415,15 +430,16 @@ export type AiUsageLogUpdateInput = {
|
|
|
415
430
|
errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
416
431
|
durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
417
432
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
418
|
-
workspace?: Prisma.
|
|
433
|
+
workspace?: Prisma.WorkspaceUpdateOneWithoutAiUsageLogsNestedInput
|
|
419
434
|
user?: Prisma.UserUpdateOneRequiredWithoutAiUsageLogsNestedInput
|
|
420
435
|
}
|
|
421
436
|
|
|
422
437
|
export type AiUsageLogUncheckedUpdateInput = {
|
|
423
438
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
424
|
-
workspaceId?: Prisma.
|
|
439
|
+
workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
425
440
|
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
426
441
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
442
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
427
443
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
428
444
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
429
445
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -437,9 +453,10 @@ export type AiUsageLogUncheckedUpdateInput = {
|
|
|
437
453
|
|
|
438
454
|
export type AiUsageLogCreateManyInput = {
|
|
439
455
|
id?: string
|
|
440
|
-
workspaceId
|
|
456
|
+
workspaceId?: string | null
|
|
441
457
|
userId: string
|
|
442
458
|
source?: string
|
|
459
|
+
activity?: string | null
|
|
443
460
|
provider: string
|
|
444
461
|
model: string
|
|
445
462
|
inputTokens?: number
|
|
@@ -454,6 +471,7 @@ export type AiUsageLogCreateManyInput = {
|
|
|
454
471
|
export type AiUsageLogUpdateManyMutationInput = {
|
|
455
472
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
456
473
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
474
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
457
475
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
458
476
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
459
477
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -467,9 +485,10 @@ export type AiUsageLogUpdateManyMutationInput = {
|
|
|
467
485
|
|
|
468
486
|
export type AiUsageLogUncheckedUpdateManyInput = {
|
|
469
487
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
470
|
-
workspaceId?: Prisma.
|
|
488
|
+
workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
471
489
|
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
472
490
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
491
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
473
492
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
474
493
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
475
494
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -496,6 +515,7 @@ export type AiUsageLogCountOrderByAggregateInput = {
|
|
|
496
515
|
workspaceId?: Prisma.SortOrder
|
|
497
516
|
userId?: Prisma.SortOrder
|
|
498
517
|
source?: Prisma.SortOrder
|
|
518
|
+
activity?: Prisma.SortOrder
|
|
499
519
|
provider?: Prisma.SortOrder
|
|
500
520
|
model?: Prisma.SortOrder
|
|
501
521
|
inputTokens?: Prisma.SortOrder
|
|
@@ -518,6 +538,7 @@ export type AiUsageLogMaxOrderByAggregateInput = {
|
|
|
518
538
|
workspaceId?: Prisma.SortOrder
|
|
519
539
|
userId?: Prisma.SortOrder
|
|
520
540
|
source?: Prisma.SortOrder
|
|
541
|
+
activity?: Prisma.SortOrder
|
|
521
542
|
provider?: Prisma.SortOrder
|
|
522
543
|
model?: Prisma.SortOrder
|
|
523
544
|
inputTokens?: Prisma.SortOrder
|
|
@@ -534,6 +555,7 @@ export type AiUsageLogMinOrderByAggregateInput = {
|
|
|
534
555
|
workspaceId?: Prisma.SortOrder
|
|
535
556
|
userId?: Prisma.SortOrder
|
|
536
557
|
source?: Prisma.SortOrder
|
|
558
|
+
activity?: Prisma.SortOrder
|
|
537
559
|
provider?: Prisma.SortOrder
|
|
538
560
|
model?: Prisma.SortOrder
|
|
539
561
|
inputTokens?: Prisma.SortOrder
|
|
@@ -638,6 +660,7 @@ export type AiUsageLogUncheckedUpdateManyWithoutWorkspaceNestedInput = {
|
|
|
638
660
|
export type AiUsageLogCreateWithoutUserInput = {
|
|
639
661
|
id?: string
|
|
640
662
|
source?: string
|
|
663
|
+
activity?: string | null
|
|
641
664
|
provider: string
|
|
642
665
|
model: string
|
|
643
666
|
inputTokens?: number
|
|
@@ -647,13 +670,14 @@ export type AiUsageLogCreateWithoutUserInput = {
|
|
|
647
670
|
errorMessage?: string | null
|
|
648
671
|
durationMs?: number | null
|
|
649
672
|
createdAt?: Date | string
|
|
650
|
-
workspace
|
|
673
|
+
workspace?: Prisma.WorkspaceCreateNestedOneWithoutAiUsageLogsInput
|
|
651
674
|
}
|
|
652
675
|
|
|
653
676
|
export type AiUsageLogUncheckedCreateWithoutUserInput = {
|
|
654
677
|
id?: string
|
|
655
|
-
workspaceId
|
|
678
|
+
workspaceId?: string | null
|
|
656
679
|
source?: string
|
|
680
|
+
activity?: string | null
|
|
657
681
|
provider: string
|
|
658
682
|
model: string
|
|
659
683
|
inputTokens?: number
|
|
@@ -695,9 +719,10 @@ export type AiUsageLogScalarWhereInput = {
|
|
|
695
719
|
OR?: Prisma.AiUsageLogScalarWhereInput[]
|
|
696
720
|
NOT?: Prisma.AiUsageLogScalarWhereInput | Prisma.AiUsageLogScalarWhereInput[]
|
|
697
721
|
id?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
698
|
-
workspaceId?: Prisma.
|
|
722
|
+
workspaceId?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
699
723
|
userId?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
700
724
|
source?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
725
|
+
activity?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
701
726
|
provider?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
702
727
|
model?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
703
728
|
inputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
|
|
@@ -712,6 +737,7 @@ export type AiUsageLogScalarWhereInput = {
|
|
|
712
737
|
export type AiUsageLogCreateWithoutWorkspaceInput = {
|
|
713
738
|
id?: string
|
|
714
739
|
source?: string
|
|
740
|
+
activity?: string | null
|
|
715
741
|
provider: string
|
|
716
742
|
model: string
|
|
717
743
|
inputTokens?: number
|
|
@@ -728,6 +754,7 @@ export type AiUsageLogUncheckedCreateWithoutWorkspaceInput = {
|
|
|
728
754
|
id?: string
|
|
729
755
|
userId: string
|
|
730
756
|
source?: string
|
|
757
|
+
activity?: string | null
|
|
731
758
|
provider: string
|
|
732
759
|
model: string
|
|
733
760
|
inputTokens?: number
|
|
@@ -766,8 +793,9 @@ export type AiUsageLogUpdateManyWithWhereWithoutWorkspaceInput = {
|
|
|
766
793
|
|
|
767
794
|
export type AiUsageLogCreateManyUserInput = {
|
|
768
795
|
id?: string
|
|
769
|
-
workspaceId
|
|
796
|
+
workspaceId?: string | null
|
|
770
797
|
source?: string
|
|
798
|
+
activity?: string | null
|
|
771
799
|
provider: string
|
|
772
800
|
model: string
|
|
773
801
|
inputTokens?: number
|
|
@@ -782,6 +810,7 @@ export type AiUsageLogCreateManyUserInput = {
|
|
|
782
810
|
export type AiUsageLogUpdateWithoutUserInput = {
|
|
783
811
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
784
812
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
813
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
785
814
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
786
815
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
787
816
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -791,13 +820,14 @@ export type AiUsageLogUpdateWithoutUserInput = {
|
|
|
791
820
|
errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
792
821
|
durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
793
822
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
794
|
-
workspace?: Prisma.
|
|
823
|
+
workspace?: Prisma.WorkspaceUpdateOneWithoutAiUsageLogsNestedInput
|
|
795
824
|
}
|
|
796
825
|
|
|
797
826
|
export type AiUsageLogUncheckedUpdateWithoutUserInput = {
|
|
798
827
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
799
|
-
workspaceId?: Prisma.
|
|
828
|
+
workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
800
829
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
830
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
801
831
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
802
832
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
803
833
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -811,8 +841,9 @@ export type AiUsageLogUncheckedUpdateWithoutUserInput = {
|
|
|
811
841
|
|
|
812
842
|
export type AiUsageLogUncheckedUpdateManyWithoutUserInput = {
|
|
813
843
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
814
|
-
workspaceId?: Prisma.
|
|
844
|
+
workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
815
845
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
846
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
816
847
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
817
848
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
818
849
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -828,6 +859,7 @@ export type AiUsageLogCreateManyWorkspaceInput = {
|
|
|
828
859
|
id?: string
|
|
829
860
|
userId: string
|
|
830
861
|
source?: string
|
|
862
|
+
activity?: string | null
|
|
831
863
|
provider: string
|
|
832
864
|
model: string
|
|
833
865
|
inputTokens?: number
|
|
@@ -842,6 +874,7 @@ export type AiUsageLogCreateManyWorkspaceInput = {
|
|
|
842
874
|
export type AiUsageLogUpdateWithoutWorkspaceInput = {
|
|
843
875
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
844
876
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
877
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
845
878
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
846
879
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
847
880
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -858,6 +891,7 @@ export type AiUsageLogUncheckedUpdateWithoutWorkspaceInput = {
|
|
|
858
891
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
859
892
|
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
860
893
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
894
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
861
895
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
862
896
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
863
897
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -873,6 +907,7 @@ export type AiUsageLogUncheckedUpdateManyWithoutWorkspaceInput = {
|
|
|
873
907
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
874
908
|
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
875
909
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
910
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
876
911
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
877
912
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
878
913
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -891,6 +926,7 @@ export type AiUsageLogSelect<ExtArgs extends runtime.Types.Extensions.InternalAr
|
|
|
891
926
|
workspaceId?: boolean
|
|
892
927
|
userId?: boolean
|
|
893
928
|
source?: boolean
|
|
929
|
+
activity?: boolean
|
|
894
930
|
provider?: boolean
|
|
895
931
|
model?: boolean
|
|
896
932
|
inputTokens?: boolean
|
|
@@ -900,7 +936,7 @@ export type AiUsageLogSelect<ExtArgs extends runtime.Types.Extensions.InternalAr
|
|
|
900
936
|
errorMessage?: boolean
|
|
901
937
|
durationMs?: boolean
|
|
902
938
|
createdAt?: boolean
|
|
903
|
-
workspace?: boolean | Prisma.
|
|
939
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
904
940
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
905
941
|
}, ExtArgs["result"]["aiUsageLog"]>
|
|
906
942
|
|
|
@@ -909,6 +945,7 @@ export type AiUsageLogSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Ex
|
|
|
909
945
|
workspaceId?: boolean
|
|
910
946
|
userId?: boolean
|
|
911
947
|
source?: boolean
|
|
948
|
+
activity?: boolean
|
|
912
949
|
provider?: boolean
|
|
913
950
|
model?: boolean
|
|
914
951
|
inputTokens?: boolean
|
|
@@ -918,7 +955,7 @@ export type AiUsageLogSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Ex
|
|
|
918
955
|
errorMessage?: boolean
|
|
919
956
|
durationMs?: boolean
|
|
920
957
|
createdAt?: boolean
|
|
921
|
-
workspace?: boolean | Prisma.
|
|
958
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
922
959
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
923
960
|
}, ExtArgs["result"]["aiUsageLog"]>
|
|
924
961
|
|
|
@@ -927,6 +964,7 @@ export type AiUsageLogSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Ex
|
|
|
927
964
|
workspaceId?: boolean
|
|
928
965
|
userId?: boolean
|
|
929
966
|
source?: boolean
|
|
967
|
+
activity?: boolean
|
|
930
968
|
provider?: boolean
|
|
931
969
|
model?: boolean
|
|
932
970
|
inputTokens?: boolean
|
|
@@ -936,7 +974,7 @@ export type AiUsageLogSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Ex
|
|
|
936
974
|
errorMessage?: boolean
|
|
937
975
|
durationMs?: boolean
|
|
938
976
|
createdAt?: boolean
|
|
939
|
-
workspace?: boolean | Prisma.
|
|
977
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
940
978
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
941
979
|
}, ExtArgs["result"]["aiUsageLog"]>
|
|
942
980
|
|
|
@@ -945,6 +983,7 @@ export type AiUsageLogSelectScalar = {
|
|
|
945
983
|
workspaceId?: boolean
|
|
946
984
|
userId?: boolean
|
|
947
985
|
source?: boolean
|
|
986
|
+
activity?: boolean
|
|
948
987
|
provider?: boolean
|
|
949
988
|
model?: boolean
|
|
950
989
|
inputTokens?: boolean
|
|
@@ -956,31 +995,32 @@ export type AiUsageLogSelectScalar = {
|
|
|
956
995
|
createdAt?: boolean
|
|
957
996
|
}
|
|
958
997
|
|
|
959
|
-
export type AiUsageLogOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "workspaceId" | "userId" | "source" | "provider" | "model" | "inputTokens" | "outputTokens" | "costUsd" | "success" | "errorMessage" | "durationMs" | "createdAt", ExtArgs["result"]["aiUsageLog"]>
|
|
998
|
+
export type AiUsageLogOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "workspaceId" | "userId" | "source" | "activity" | "provider" | "model" | "inputTokens" | "outputTokens" | "costUsd" | "success" | "errorMessage" | "durationMs" | "createdAt", ExtArgs["result"]["aiUsageLog"]>
|
|
960
999
|
export type AiUsageLogInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
961
|
-
workspace?: boolean | Prisma.
|
|
1000
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
962
1001
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
963
1002
|
}
|
|
964
1003
|
export type AiUsageLogIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
965
|
-
workspace?: boolean | Prisma.
|
|
1004
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
966
1005
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
967
1006
|
}
|
|
968
1007
|
export type AiUsageLogIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
969
|
-
workspace?: boolean | Prisma.
|
|
1008
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
970
1009
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
971
1010
|
}
|
|
972
1011
|
|
|
973
1012
|
export type $AiUsageLogPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
974
1013
|
name: "AiUsageLog"
|
|
975
1014
|
objects: {
|
|
976
|
-
workspace: Prisma.$WorkspacePayload<ExtArgs>
|
|
1015
|
+
workspace: Prisma.$WorkspacePayload<ExtArgs> | null
|
|
977
1016
|
user: Prisma.$UserPayload<ExtArgs>
|
|
978
1017
|
}
|
|
979
1018
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
|
980
1019
|
id: string
|
|
981
|
-
workspaceId: string
|
|
1020
|
+
workspaceId: string | null
|
|
982
1021
|
userId: string
|
|
983
1022
|
source: string
|
|
1023
|
+
activity: string | null
|
|
984
1024
|
provider: string
|
|
985
1025
|
model: string
|
|
986
1026
|
inputTokens: number
|
|
@@ -1384,7 +1424,7 @@ readonly fields: AiUsageLogFieldRefs;
|
|
|
1384
1424
|
*/
|
|
1385
1425
|
export interface Prisma__AiUsageLogClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
|
1386
1426
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
1387
|
-
workspace<T extends Prisma.
|
|
1427
|
+
workspace<T extends Prisma.AiUsageLog$workspaceArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AiUsageLog$workspaceArgs<ExtArgs>>): Prisma.Prisma__WorkspaceClient<runtime.Types.Result.GetResult<Prisma.$WorkspacePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
1388
1428
|
user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
|
1389
1429
|
/**
|
|
1390
1430
|
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
|
@@ -1419,6 +1459,7 @@ export interface AiUsageLogFieldRefs {
|
|
|
1419
1459
|
readonly workspaceId: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1420
1460
|
readonly userId: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1421
1461
|
readonly source: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1462
|
+
readonly activity: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1422
1463
|
readonly provider: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1423
1464
|
readonly model: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1424
1465
|
readonly inputTokens: Prisma.FieldRef<"AiUsageLog", 'Int'>
|
|
@@ -1826,6 +1867,25 @@ export type AiUsageLogDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.In
|
|
|
1826
1867
|
limit?: number
|
|
1827
1868
|
}
|
|
1828
1869
|
|
|
1870
|
+
/**
|
|
1871
|
+
* AiUsageLog.workspace
|
|
1872
|
+
*/
|
|
1873
|
+
export type AiUsageLog$workspaceArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
1874
|
+
/**
|
|
1875
|
+
* Select specific fields to fetch from the Workspace
|
|
1876
|
+
*/
|
|
1877
|
+
select?: Prisma.WorkspaceSelect<ExtArgs> | null
|
|
1878
|
+
/**
|
|
1879
|
+
* Omit specific fields from the Workspace
|
|
1880
|
+
*/
|
|
1881
|
+
omit?: Prisma.WorkspaceOmit<ExtArgs> | null
|
|
1882
|
+
/**
|
|
1883
|
+
* Choose, which related nodes to fetch as well
|
|
1884
|
+
*/
|
|
1885
|
+
include?: Prisma.WorkspaceInclude<ExtArgs> | null
|
|
1886
|
+
where?: Prisma.WorkspaceWhereInput
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1829
1889
|
/**
|
|
1830
1890
|
* AiUsageLog without action
|
|
1831
1891
|
*/
|