@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
|
@@ -45,6 +45,7 @@ export type AiUsageLogMinAggregateOutputType = {
|
|
|
45
45
|
workspaceId: string | null
|
|
46
46
|
userId: string | null
|
|
47
47
|
source: string | null
|
|
48
|
+
activity: string | null
|
|
48
49
|
provider: string | null
|
|
49
50
|
model: string | null
|
|
50
51
|
inputTokens: number | null
|
|
@@ -61,6 +62,7 @@ export type AiUsageLogMaxAggregateOutputType = {
|
|
|
61
62
|
workspaceId: string | null
|
|
62
63
|
userId: string | null
|
|
63
64
|
source: string | null
|
|
65
|
+
activity: string | null
|
|
64
66
|
provider: string | null
|
|
65
67
|
model: string | null
|
|
66
68
|
inputTokens: number | null
|
|
@@ -77,6 +79,7 @@ export type AiUsageLogCountAggregateOutputType = {
|
|
|
77
79
|
workspaceId: number
|
|
78
80
|
userId: number
|
|
79
81
|
source: number
|
|
82
|
+
activity: number
|
|
80
83
|
provider: number
|
|
81
84
|
model: number
|
|
82
85
|
inputTokens: number
|
|
@@ -109,6 +112,7 @@ export type AiUsageLogMinAggregateInputType = {
|
|
|
109
112
|
workspaceId?: true
|
|
110
113
|
userId?: true
|
|
111
114
|
source?: true
|
|
115
|
+
activity?: true
|
|
112
116
|
provider?: true
|
|
113
117
|
model?: true
|
|
114
118
|
inputTokens?: true
|
|
@@ -125,6 +129,7 @@ export type AiUsageLogMaxAggregateInputType = {
|
|
|
125
129
|
workspaceId?: true
|
|
126
130
|
userId?: true
|
|
127
131
|
source?: true
|
|
132
|
+
activity?: true
|
|
128
133
|
provider?: true
|
|
129
134
|
model?: true
|
|
130
135
|
inputTokens?: true
|
|
@@ -141,6 +146,7 @@ export type AiUsageLogCountAggregateInputType = {
|
|
|
141
146
|
workspaceId?: true
|
|
142
147
|
userId?: true
|
|
143
148
|
source?: true
|
|
149
|
+
activity?: true
|
|
144
150
|
provider?: true
|
|
145
151
|
model?: true
|
|
146
152
|
inputTokens?: true
|
|
@@ -241,9 +247,10 @@ export type AiUsageLogGroupByArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
|
|
241
247
|
|
|
242
248
|
export type AiUsageLogGroupByOutputType = {
|
|
243
249
|
id: string
|
|
244
|
-
workspaceId: string
|
|
250
|
+
workspaceId: string | null
|
|
245
251
|
userId: string
|
|
246
252
|
source: string
|
|
253
|
+
activity: string | null
|
|
247
254
|
provider: string
|
|
248
255
|
model: string
|
|
249
256
|
inputTokens: number
|
|
@@ -280,9 +287,10 @@ export type AiUsageLogWhereInput = {
|
|
|
280
287
|
OR?: Prisma.AiUsageLogWhereInput[]
|
|
281
288
|
NOT?: Prisma.AiUsageLogWhereInput | Prisma.AiUsageLogWhereInput[]
|
|
282
289
|
id?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
283
|
-
workspaceId?: Prisma.
|
|
290
|
+
workspaceId?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
284
291
|
userId?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
285
292
|
source?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
293
|
+
activity?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
286
294
|
provider?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
287
295
|
model?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
288
296
|
inputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
|
|
@@ -292,15 +300,16 @@ export type AiUsageLogWhereInput = {
|
|
|
292
300
|
errorMessage?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
293
301
|
durationMs?: Prisma.IntNullableFilter<"AiUsageLog"> | number | null
|
|
294
302
|
createdAt?: Prisma.DateTimeFilter<"AiUsageLog"> | Date | string
|
|
295
|
-
workspace?: Prisma.XOR<Prisma.
|
|
303
|
+
workspace?: Prisma.XOR<Prisma.WorkspaceNullableScalarRelationFilter, Prisma.WorkspaceWhereInput> | null
|
|
296
304
|
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
|
297
305
|
}
|
|
298
306
|
|
|
299
307
|
export type AiUsageLogOrderByWithRelationInput = {
|
|
300
308
|
id?: Prisma.SortOrder
|
|
301
|
-
workspaceId?: Prisma.SortOrder
|
|
309
|
+
workspaceId?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
302
310
|
userId?: Prisma.SortOrder
|
|
303
311
|
source?: Prisma.SortOrder
|
|
312
|
+
activity?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
304
313
|
provider?: Prisma.SortOrder
|
|
305
314
|
model?: Prisma.SortOrder
|
|
306
315
|
inputTokens?: Prisma.SortOrder
|
|
@@ -319,9 +328,10 @@ export type AiUsageLogWhereUniqueInput = Prisma.AtLeast<{
|
|
|
319
328
|
AND?: Prisma.AiUsageLogWhereInput | Prisma.AiUsageLogWhereInput[]
|
|
320
329
|
OR?: Prisma.AiUsageLogWhereInput[]
|
|
321
330
|
NOT?: Prisma.AiUsageLogWhereInput | Prisma.AiUsageLogWhereInput[]
|
|
322
|
-
workspaceId?: Prisma.
|
|
331
|
+
workspaceId?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
323
332
|
userId?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
324
333
|
source?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
334
|
+
activity?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
325
335
|
provider?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
326
336
|
model?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
327
337
|
inputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
|
|
@@ -331,15 +341,16 @@ export type AiUsageLogWhereUniqueInput = Prisma.AtLeast<{
|
|
|
331
341
|
errorMessage?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
332
342
|
durationMs?: Prisma.IntNullableFilter<"AiUsageLog"> | number | null
|
|
333
343
|
createdAt?: Prisma.DateTimeFilter<"AiUsageLog"> | Date | string
|
|
334
|
-
workspace?: Prisma.XOR<Prisma.
|
|
344
|
+
workspace?: Prisma.XOR<Prisma.WorkspaceNullableScalarRelationFilter, Prisma.WorkspaceWhereInput> | null
|
|
335
345
|
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
|
336
346
|
}, "id">
|
|
337
347
|
|
|
338
348
|
export type AiUsageLogOrderByWithAggregationInput = {
|
|
339
349
|
id?: Prisma.SortOrder
|
|
340
|
-
workspaceId?: Prisma.SortOrder
|
|
350
|
+
workspaceId?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
341
351
|
userId?: Prisma.SortOrder
|
|
342
352
|
source?: Prisma.SortOrder
|
|
353
|
+
activity?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
343
354
|
provider?: Prisma.SortOrder
|
|
344
355
|
model?: Prisma.SortOrder
|
|
345
356
|
inputTokens?: Prisma.SortOrder
|
|
@@ -361,9 +372,10 @@ export type AiUsageLogScalarWhereWithAggregatesInput = {
|
|
|
361
372
|
OR?: Prisma.AiUsageLogScalarWhereWithAggregatesInput[]
|
|
362
373
|
NOT?: Prisma.AiUsageLogScalarWhereWithAggregatesInput | Prisma.AiUsageLogScalarWhereWithAggregatesInput[]
|
|
363
374
|
id?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
|
|
364
|
-
workspaceId?: Prisma.
|
|
375
|
+
workspaceId?: Prisma.StringNullableWithAggregatesFilter<"AiUsageLog"> | string | null
|
|
365
376
|
userId?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
|
|
366
377
|
source?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
|
|
378
|
+
activity?: Prisma.StringNullableWithAggregatesFilter<"AiUsageLog"> | string | null
|
|
367
379
|
provider?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
|
|
368
380
|
model?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
|
|
369
381
|
inputTokens?: Prisma.IntWithAggregatesFilter<"AiUsageLog"> | number
|
|
@@ -378,6 +390,7 @@ export type AiUsageLogScalarWhereWithAggregatesInput = {
|
|
|
378
390
|
export type AiUsageLogCreateInput = {
|
|
379
391
|
id?: string
|
|
380
392
|
source?: string
|
|
393
|
+
activity?: string | null
|
|
381
394
|
provider: string
|
|
382
395
|
model: string
|
|
383
396
|
inputTokens?: number
|
|
@@ -387,15 +400,16 @@ export type AiUsageLogCreateInput = {
|
|
|
387
400
|
errorMessage?: string | null
|
|
388
401
|
durationMs?: number | null
|
|
389
402
|
createdAt?: Date | string
|
|
390
|
-
workspace
|
|
403
|
+
workspace?: Prisma.WorkspaceCreateNestedOneWithoutAiUsageLogsInput
|
|
391
404
|
user: Prisma.UserCreateNestedOneWithoutAiUsageLogsInput
|
|
392
405
|
}
|
|
393
406
|
|
|
394
407
|
export type AiUsageLogUncheckedCreateInput = {
|
|
395
408
|
id?: string
|
|
396
|
-
workspaceId
|
|
409
|
+
workspaceId?: string | null
|
|
397
410
|
userId: string
|
|
398
411
|
source?: string
|
|
412
|
+
activity?: string | null
|
|
399
413
|
provider: string
|
|
400
414
|
model: string
|
|
401
415
|
inputTokens?: number
|
|
@@ -410,6 +424,7 @@ export type AiUsageLogUncheckedCreateInput = {
|
|
|
410
424
|
export type AiUsageLogUpdateInput = {
|
|
411
425
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
412
426
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
427
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
413
428
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
414
429
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
415
430
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -419,15 +434,16 @@ export type AiUsageLogUpdateInput = {
|
|
|
419
434
|
errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
420
435
|
durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
421
436
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
422
|
-
workspace?: Prisma.
|
|
437
|
+
workspace?: Prisma.WorkspaceUpdateOneWithoutAiUsageLogsNestedInput
|
|
423
438
|
user?: Prisma.UserUpdateOneRequiredWithoutAiUsageLogsNestedInput
|
|
424
439
|
}
|
|
425
440
|
|
|
426
441
|
export type AiUsageLogUncheckedUpdateInput = {
|
|
427
442
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
428
|
-
workspaceId?: Prisma.
|
|
443
|
+
workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
429
444
|
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
430
445
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
446
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
431
447
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
432
448
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
433
449
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -441,9 +457,10 @@ export type AiUsageLogUncheckedUpdateInput = {
|
|
|
441
457
|
|
|
442
458
|
export type AiUsageLogCreateManyInput = {
|
|
443
459
|
id?: string
|
|
444
|
-
workspaceId
|
|
460
|
+
workspaceId?: string | null
|
|
445
461
|
userId: string
|
|
446
462
|
source?: string
|
|
463
|
+
activity?: string | null
|
|
447
464
|
provider: string
|
|
448
465
|
model: string
|
|
449
466
|
inputTokens?: number
|
|
@@ -458,6 +475,7 @@ export type AiUsageLogCreateManyInput = {
|
|
|
458
475
|
export type AiUsageLogUpdateManyMutationInput = {
|
|
459
476
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
460
477
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
478
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
461
479
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
462
480
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
463
481
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -471,9 +489,10 @@ export type AiUsageLogUpdateManyMutationInput = {
|
|
|
471
489
|
|
|
472
490
|
export type AiUsageLogUncheckedUpdateManyInput = {
|
|
473
491
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
474
|
-
workspaceId?: Prisma.
|
|
492
|
+
workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
475
493
|
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
476
494
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
495
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
477
496
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
478
497
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
479
498
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -500,6 +519,7 @@ export type AiUsageLogCountOrderByAggregateInput = {
|
|
|
500
519
|
workspaceId?: Prisma.SortOrder
|
|
501
520
|
userId?: Prisma.SortOrder
|
|
502
521
|
source?: Prisma.SortOrder
|
|
522
|
+
activity?: Prisma.SortOrder
|
|
503
523
|
provider?: Prisma.SortOrder
|
|
504
524
|
model?: Prisma.SortOrder
|
|
505
525
|
inputTokens?: Prisma.SortOrder
|
|
@@ -523,6 +543,7 @@ export type AiUsageLogMaxOrderByAggregateInput = {
|
|
|
523
543
|
workspaceId?: Prisma.SortOrder
|
|
524
544
|
userId?: Prisma.SortOrder
|
|
525
545
|
source?: Prisma.SortOrder
|
|
546
|
+
activity?: Prisma.SortOrder
|
|
526
547
|
provider?: Prisma.SortOrder
|
|
527
548
|
model?: Prisma.SortOrder
|
|
528
549
|
inputTokens?: Prisma.SortOrder
|
|
@@ -539,6 +560,7 @@ export type AiUsageLogMinOrderByAggregateInput = {
|
|
|
539
560
|
workspaceId?: Prisma.SortOrder
|
|
540
561
|
userId?: Prisma.SortOrder
|
|
541
562
|
source?: Prisma.SortOrder
|
|
563
|
+
activity?: Prisma.SortOrder
|
|
542
564
|
provider?: Prisma.SortOrder
|
|
543
565
|
model?: Prisma.SortOrder
|
|
544
566
|
inputTokens?: Prisma.SortOrder
|
|
@@ -652,6 +674,7 @@ export type NullableDecimalFieldUpdateOperationsInput = {
|
|
|
652
674
|
export type AiUsageLogCreateWithoutUserInput = {
|
|
653
675
|
id?: string
|
|
654
676
|
source?: string
|
|
677
|
+
activity?: string | null
|
|
655
678
|
provider: string
|
|
656
679
|
model: string
|
|
657
680
|
inputTokens?: number
|
|
@@ -661,13 +684,14 @@ export type AiUsageLogCreateWithoutUserInput = {
|
|
|
661
684
|
errorMessage?: string | null
|
|
662
685
|
durationMs?: number | null
|
|
663
686
|
createdAt?: Date | string
|
|
664
|
-
workspace
|
|
687
|
+
workspace?: Prisma.WorkspaceCreateNestedOneWithoutAiUsageLogsInput
|
|
665
688
|
}
|
|
666
689
|
|
|
667
690
|
export type AiUsageLogUncheckedCreateWithoutUserInput = {
|
|
668
691
|
id?: string
|
|
669
|
-
workspaceId
|
|
692
|
+
workspaceId?: string | null
|
|
670
693
|
source?: string
|
|
694
|
+
activity?: string | null
|
|
671
695
|
provider: string
|
|
672
696
|
model: string
|
|
673
697
|
inputTokens?: number
|
|
@@ -710,9 +734,10 @@ export type AiUsageLogScalarWhereInput = {
|
|
|
710
734
|
OR?: Prisma.AiUsageLogScalarWhereInput[]
|
|
711
735
|
NOT?: Prisma.AiUsageLogScalarWhereInput | Prisma.AiUsageLogScalarWhereInput[]
|
|
712
736
|
id?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
713
|
-
workspaceId?: Prisma.
|
|
737
|
+
workspaceId?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
714
738
|
userId?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
715
739
|
source?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
740
|
+
activity?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
|
|
716
741
|
provider?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
717
742
|
model?: Prisma.StringFilter<"AiUsageLog"> | string
|
|
718
743
|
inputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
|
|
@@ -727,6 +752,7 @@ export type AiUsageLogScalarWhereInput = {
|
|
|
727
752
|
export type AiUsageLogCreateWithoutWorkspaceInput = {
|
|
728
753
|
id?: string
|
|
729
754
|
source?: string
|
|
755
|
+
activity?: string | null
|
|
730
756
|
provider: string
|
|
731
757
|
model: string
|
|
732
758
|
inputTokens?: number
|
|
@@ -743,6 +769,7 @@ export type AiUsageLogUncheckedCreateWithoutWorkspaceInput = {
|
|
|
743
769
|
id?: string
|
|
744
770
|
userId: string
|
|
745
771
|
source?: string
|
|
772
|
+
activity?: string | null
|
|
746
773
|
provider: string
|
|
747
774
|
model: string
|
|
748
775
|
inputTokens?: number
|
|
@@ -782,8 +809,9 @@ export type AiUsageLogUpdateManyWithWhereWithoutWorkspaceInput = {
|
|
|
782
809
|
|
|
783
810
|
export type AiUsageLogCreateManyUserInput = {
|
|
784
811
|
id?: string
|
|
785
|
-
workspaceId
|
|
812
|
+
workspaceId?: string | null
|
|
786
813
|
source?: string
|
|
814
|
+
activity?: string | null
|
|
787
815
|
provider: string
|
|
788
816
|
model: string
|
|
789
817
|
inputTokens?: number
|
|
@@ -798,6 +826,7 @@ export type AiUsageLogCreateManyUserInput = {
|
|
|
798
826
|
export type AiUsageLogUpdateWithoutUserInput = {
|
|
799
827
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
800
828
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
829
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
801
830
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
802
831
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
803
832
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -807,13 +836,14 @@ export type AiUsageLogUpdateWithoutUserInput = {
|
|
|
807
836
|
errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
808
837
|
durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
809
838
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
810
|
-
workspace?: Prisma.
|
|
839
|
+
workspace?: Prisma.WorkspaceUpdateOneWithoutAiUsageLogsNestedInput
|
|
811
840
|
}
|
|
812
841
|
|
|
813
842
|
export type AiUsageLogUncheckedUpdateWithoutUserInput = {
|
|
814
843
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
815
|
-
workspaceId?: Prisma.
|
|
844
|
+
workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
816
845
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
846
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
817
847
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
818
848
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
819
849
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -827,8 +857,9 @@ export type AiUsageLogUncheckedUpdateWithoutUserInput = {
|
|
|
827
857
|
|
|
828
858
|
export type AiUsageLogUncheckedUpdateManyWithoutUserInput = {
|
|
829
859
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
830
|
-
workspaceId?: Prisma.
|
|
860
|
+
workspaceId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
831
861
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
862
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
832
863
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
833
864
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
834
865
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -844,6 +875,7 @@ export type AiUsageLogCreateManyWorkspaceInput = {
|
|
|
844
875
|
id?: string
|
|
845
876
|
userId: string
|
|
846
877
|
source?: string
|
|
878
|
+
activity?: string | null
|
|
847
879
|
provider: string
|
|
848
880
|
model: string
|
|
849
881
|
inputTokens?: number
|
|
@@ -858,6 +890,7 @@ export type AiUsageLogCreateManyWorkspaceInput = {
|
|
|
858
890
|
export type AiUsageLogUpdateWithoutWorkspaceInput = {
|
|
859
891
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
860
892
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
893
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
861
894
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
862
895
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
863
896
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -874,6 +907,7 @@ export type AiUsageLogUncheckedUpdateWithoutWorkspaceInput = {
|
|
|
874
907
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
875
908
|
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
876
909
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
910
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
877
911
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
878
912
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
879
913
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -889,6 +923,7 @@ export type AiUsageLogUncheckedUpdateManyWithoutWorkspaceInput = {
|
|
|
889
923
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
890
924
|
userId?: Prisma.StringFieldUpdateOperationsInput | string
|
|
891
925
|
source?: Prisma.StringFieldUpdateOperationsInput | string
|
|
926
|
+
activity?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
892
927
|
provider?: Prisma.StringFieldUpdateOperationsInput | string
|
|
893
928
|
model?: Prisma.StringFieldUpdateOperationsInput | string
|
|
894
929
|
inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
|
|
@@ -907,6 +942,7 @@ export type AiUsageLogSelect<ExtArgs extends runtime.Types.Extensions.InternalAr
|
|
|
907
942
|
workspaceId?: boolean
|
|
908
943
|
userId?: boolean
|
|
909
944
|
source?: boolean
|
|
945
|
+
activity?: boolean
|
|
910
946
|
provider?: boolean
|
|
911
947
|
model?: boolean
|
|
912
948
|
inputTokens?: boolean
|
|
@@ -916,7 +952,7 @@ export type AiUsageLogSelect<ExtArgs extends runtime.Types.Extensions.InternalAr
|
|
|
916
952
|
errorMessage?: boolean
|
|
917
953
|
durationMs?: boolean
|
|
918
954
|
createdAt?: boolean
|
|
919
|
-
workspace?: boolean | Prisma.
|
|
955
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
920
956
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
921
957
|
}, ExtArgs["result"]["aiUsageLog"]>
|
|
922
958
|
|
|
@@ -925,6 +961,7 @@ export type AiUsageLogSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Ex
|
|
|
925
961
|
workspaceId?: boolean
|
|
926
962
|
userId?: boolean
|
|
927
963
|
source?: boolean
|
|
964
|
+
activity?: boolean
|
|
928
965
|
provider?: boolean
|
|
929
966
|
model?: boolean
|
|
930
967
|
inputTokens?: boolean
|
|
@@ -934,7 +971,7 @@ export type AiUsageLogSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Ex
|
|
|
934
971
|
errorMessage?: boolean
|
|
935
972
|
durationMs?: boolean
|
|
936
973
|
createdAt?: boolean
|
|
937
|
-
workspace?: boolean | Prisma.
|
|
974
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
938
975
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
939
976
|
}, ExtArgs["result"]["aiUsageLog"]>
|
|
940
977
|
|
|
@@ -943,6 +980,7 @@ export type AiUsageLogSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Ex
|
|
|
943
980
|
workspaceId?: boolean
|
|
944
981
|
userId?: boolean
|
|
945
982
|
source?: boolean
|
|
983
|
+
activity?: boolean
|
|
946
984
|
provider?: boolean
|
|
947
985
|
model?: boolean
|
|
948
986
|
inputTokens?: boolean
|
|
@@ -952,7 +990,7 @@ export type AiUsageLogSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Ex
|
|
|
952
990
|
errorMessage?: boolean
|
|
953
991
|
durationMs?: boolean
|
|
954
992
|
createdAt?: boolean
|
|
955
|
-
workspace?: boolean | Prisma.
|
|
993
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
956
994
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
957
995
|
}, ExtArgs["result"]["aiUsageLog"]>
|
|
958
996
|
|
|
@@ -961,6 +999,7 @@ export type AiUsageLogSelectScalar = {
|
|
|
961
999
|
workspaceId?: boolean
|
|
962
1000
|
userId?: boolean
|
|
963
1001
|
source?: boolean
|
|
1002
|
+
activity?: boolean
|
|
964
1003
|
provider?: boolean
|
|
965
1004
|
model?: boolean
|
|
966
1005
|
inputTokens?: boolean
|
|
@@ -972,31 +1011,32 @@ export type AiUsageLogSelectScalar = {
|
|
|
972
1011
|
createdAt?: boolean
|
|
973
1012
|
}
|
|
974
1013
|
|
|
975
|
-
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"]>
|
|
1014
|
+
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"]>
|
|
976
1015
|
export type AiUsageLogInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
977
|
-
workspace?: boolean | Prisma.
|
|
1016
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
978
1017
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
979
1018
|
}
|
|
980
1019
|
export type AiUsageLogIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
981
|
-
workspace?: boolean | Prisma.
|
|
1020
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
982
1021
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
983
1022
|
}
|
|
984
1023
|
export type AiUsageLogIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
985
|
-
workspace?: boolean | Prisma.
|
|
1024
|
+
workspace?: boolean | Prisma.AiUsageLog$workspaceArgs<ExtArgs>
|
|
986
1025
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
987
1026
|
}
|
|
988
1027
|
|
|
989
1028
|
export type $AiUsageLogPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
990
1029
|
name: "AiUsageLog"
|
|
991
1030
|
objects: {
|
|
992
|
-
workspace: Prisma.$WorkspacePayload<ExtArgs>
|
|
1031
|
+
workspace: Prisma.$WorkspacePayload<ExtArgs> | null
|
|
993
1032
|
user: Prisma.$UserPayload<ExtArgs>
|
|
994
1033
|
}
|
|
995
1034
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
|
996
1035
|
id: string
|
|
997
|
-
workspaceId: string
|
|
1036
|
+
workspaceId: string | null
|
|
998
1037
|
userId: string
|
|
999
1038
|
source: string
|
|
1039
|
+
activity: string | null
|
|
1000
1040
|
provider: string
|
|
1001
1041
|
model: string
|
|
1002
1042
|
inputTokens: number
|
|
@@ -1400,7 +1440,7 @@ readonly fields: AiUsageLogFieldRefs;
|
|
|
1400
1440
|
*/
|
|
1401
1441
|
export interface Prisma__AiUsageLogClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
|
1402
1442
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
|
1403
|
-
workspace<T extends Prisma.
|
|
1443
|
+
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>
|
|
1404
1444
|
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>
|
|
1405
1445
|
/**
|
|
1406
1446
|
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
|
@@ -1435,6 +1475,7 @@ export interface AiUsageLogFieldRefs {
|
|
|
1435
1475
|
readonly workspaceId: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1436
1476
|
readonly userId: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1437
1477
|
readonly source: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1478
|
+
readonly activity: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1438
1479
|
readonly provider: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1439
1480
|
readonly model: Prisma.FieldRef<"AiUsageLog", 'String'>
|
|
1440
1481
|
readonly inputTokens: Prisma.FieldRef<"AiUsageLog", 'Int'>
|
|
@@ -1844,6 +1885,25 @@ export type AiUsageLogDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.In
|
|
|
1844
1885
|
limit?: number
|
|
1845
1886
|
}
|
|
1846
1887
|
|
|
1888
|
+
/**
|
|
1889
|
+
* AiUsageLog.workspace
|
|
1890
|
+
*/
|
|
1891
|
+
export type AiUsageLog$workspaceArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
1892
|
+
/**
|
|
1893
|
+
* Select specific fields to fetch from the Workspace
|
|
1894
|
+
*/
|
|
1895
|
+
select?: Prisma.WorkspaceSelect<ExtArgs> | null
|
|
1896
|
+
/**
|
|
1897
|
+
* Omit specific fields from the Workspace
|
|
1898
|
+
*/
|
|
1899
|
+
omit?: Prisma.WorkspaceOmit<ExtArgs> | null
|
|
1900
|
+
/**
|
|
1901
|
+
* Choose, which related nodes to fetch as well
|
|
1902
|
+
*/
|
|
1903
|
+
include?: Prisma.WorkspaceInclude<ExtArgs> | null
|
|
1904
|
+
where?: Prisma.WorkspaceWhereInput
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1847
1907
|
/**
|
|
1848
1908
|
* AiUsageLog without action
|
|
1849
1909
|
*/
|