@allbluecn/database 0.14.3 → 0.14.4
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/generated/internal/class.ts +4 -4
- package/generated/internal/prismaNamespace.ts +7 -0
- package/generated/internal/prismaNamespaceBrowser.ts +7 -0
- package/generated/models/CodeSnippet.ts +222 -7
- package/migrations/20261111110000_code_snippet_origin/migration.sql +19 -0
- package/package.json +1 -1
- package/schema.prisma +36 -11
|
@@ -13784,6 +13784,13 @@ export const CodeSnippetScalarFieldEnum = {
|
|
|
13784
13784
|
params: 'params',
|
|
13785
13785
|
code: 'code',
|
|
13786
13786
|
enabled: 'enabled',
|
|
13787
|
+
origin: 'origin',
|
|
13788
|
+
inputSchema: 'inputSchema',
|
|
13789
|
+
outputSchema: 'outputSchema',
|
|
13790
|
+
usageHints: 'usageHints',
|
|
13791
|
+
dependsOn: 'dependsOn',
|
|
13792
|
+
trustLevel: 'trustLevel',
|
|
13793
|
+
stats: 'stats',
|
|
13787
13794
|
createdAt: 'createdAt',
|
|
13788
13795
|
updatedAt: 'updatedAt',
|
|
13789
13796
|
isDeleted: 'isDeleted'
|
|
@@ -1973,6 +1973,13 @@ export const CodeSnippetScalarFieldEnum = {
|
|
|
1973
1973
|
params: 'params',
|
|
1974
1974
|
code: 'code',
|
|
1975
1975
|
enabled: 'enabled',
|
|
1976
|
+
origin: 'origin',
|
|
1977
|
+
inputSchema: 'inputSchema',
|
|
1978
|
+
outputSchema: 'outputSchema',
|
|
1979
|
+
usageHints: 'usageHints',
|
|
1980
|
+
dependsOn: 'dependsOn',
|
|
1981
|
+
trustLevel: 'trustLevel',
|
|
1982
|
+
stats: 'stats',
|
|
1976
1983
|
createdAt: 'createdAt',
|
|
1977
1984
|
updatedAt: 'updatedAt',
|
|
1978
1985
|
isDeleted: 'isDeleted'
|
|
@@ -32,6 +32,8 @@ export type CodeSnippetMinAggregateOutputType = {
|
|
|
32
32
|
description: string | null
|
|
33
33
|
code: string | null
|
|
34
34
|
enabled: boolean | null
|
|
35
|
+
origin: string | null
|
|
36
|
+
trustLevel: string | null
|
|
35
37
|
createdAt: Date | null
|
|
36
38
|
updatedAt: Date | null
|
|
37
39
|
isDeleted: boolean | null
|
|
@@ -45,6 +47,8 @@ export type CodeSnippetMaxAggregateOutputType = {
|
|
|
45
47
|
description: string | null
|
|
46
48
|
code: string | null
|
|
47
49
|
enabled: boolean | null
|
|
50
|
+
origin: string | null
|
|
51
|
+
trustLevel: string | null
|
|
48
52
|
createdAt: Date | null
|
|
49
53
|
updatedAt: Date | null
|
|
50
54
|
isDeleted: boolean | null
|
|
@@ -59,6 +63,13 @@ export type CodeSnippetCountAggregateOutputType = {
|
|
|
59
63
|
params: number
|
|
60
64
|
code: number
|
|
61
65
|
enabled: number
|
|
66
|
+
origin: number
|
|
67
|
+
inputSchema: number
|
|
68
|
+
outputSchema: number
|
|
69
|
+
usageHints: number
|
|
70
|
+
dependsOn: number
|
|
71
|
+
trustLevel: number
|
|
72
|
+
stats: number
|
|
62
73
|
createdAt: number
|
|
63
74
|
updatedAt: number
|
|
64
75
|
isDeleted: number
|
|
@@ -74,6 +85,8 @@ export type CodeSnippetMinAggregateInputType = {
|
|
|
74
85
|
description?: true
|
|
75
86
|
code?: true
|
|
76
87
|
enabled?: true
|
|
88
|
+
origin?: true
|
|
89
|
+
trustLevel?: true
|
|
77
90
|
createdAt?: true
|
|
78
91
|
updatedAt?: true
|
|
79
92
|
isDeleted?: true
|
|
@@ -87,6 +100,8 @@ export type CodeSnippetMaxAggregateInputType = {
|
|
|
87
100
|
description?: true
|
|
88
101
|
code?: true
|
|
89
102
|
enabled?: true
|
|
103
|
+
origin?: true
|
|
104
|
+
trustLevel?: true
|
|
90
105
|
createdAt?: true
|
|
91
106
|
updatedAt?: true
|
|
92
107
|
isDeleted?: true
|
|
@@ -101,6 +116,13 @@ export type CodeSnippetCountAggregateInputType = {
|
|
|
101
116
|
params?: true
|
|
102
117
|
code?: true
|
|
103
118
|
enabled?: true
|
|
119
|
+
origin?: true
|
|
120
|
+
inputSchema?: true
|
|
121
|
+
outputSchema?: true
|
|
122
|
+
usageHints?: true
|
|
123
|
+
dependsOn?: true
|
|
124
|
+
trustLevel?: true
|
|
125
|
+
stats?: true
|
|
104
126
|
createdAt?: true
|
|
105
127
|
updatedAt?: true
|
|
106
128
|
isDeleted?: true
|
|
@@ -188,6 +210,13 @@ export type CodeSnippetGroupByOutputType = {
|
|
|
188
210
|
params: runtime.JsonValue
|
|
189
211
|
code: string
|
|
190
212
|
enabled: boolean
|
|
213
|
+
origin: string
|
|
214
|
+
inputSchema: runtime.JsonValue
|
|
215
|
+
outputSchema: runtime.JsonValue
|
|
216
|
+
usageHints: runtime.JsonValue
|
|
217
|
+
dependsOn: runtime.JsonValue
|
|
218
|
+
trustLevel: string
|
|
219
|
+
stats: runtime.JsonValue
|
|
191
220
|
createdAt: Date
|
|
192
221
|
updatedAt: Date
|
|
193
222
|
isDeleted: boolean
|
|
@@ -223,6 +252,13 @@ export type CodeSnippetWhereInput = {
|
|
|
223
252
|
params?: Prisma.JsonFilter<"CodeSnippet">
|
|
224
253
|
code?: Prisma.StringFilter<"CodeSnippet"> | string
|
|
225
254
|
enabled?: Prisma.BoolFilter<"CodeSnippet"> | boolean
|
|
255
|
+
origin?: Prisma.StringFilter<"CodeSnippet"> | string
|
|
256
|
+
inputSchema?: Prisma.JsonFilter<"CodeSnippet">
|
|
257
|
+
outputSchema?: Prisma.JsonFilter<"CodeSnippet">
|
|
258
|
+
usageHints?: Prisma.JsonFilter<"CodeSnippet">
|
|
259
|
+
dependsOn?: Prisma.JsonFilter<"CodeSnippet">
|
|
260
|
+
trustLevel?: Prisma.StringFilter<"CodeSnippet"> | string
|
|
261
|
+
stats?: Prisma.JsonFilter<"CodeSnippet">
|
|
226
262
|
createdAt?: Prisma.DateTimeFilter<"CodeSnippet"> | Date | string
|
|
227
263
|
updatedAt?: Prisma.DateTimeFilter<"CodeSnippet"> | Date | string
|
|
228
264
|
isDeleted?: Prisma.BoolFilter<"CodeSnippet"> | boolean
|
|
@@ -238,6 +274,13 @@ export type CodeSnippetOrderByWithRelationInput = {
|
|
|
238
274
|
params?: Prisma.SortOrder
|
|
239
275
|
code?: Prisma.SortOrder
|
|
240
276
|
enabled?: Prisma.SortOrder
|
|
277
|
+
origin?: Prisma.SortOrder
|
|
278
|
+
inputSchema?: Prisma.SortOrder
|
|
279
|
+
outputSchema?: Prisma.SortOrder
|
|
280
|
+
usageHints?: Prisma.SortOrder
|
|
281
|
+
dependsOn?: Prisma.SortOrder
|
|
282
|
+
trustLevel?: Prisma.SortOrder
|
|
283
|
+
stats?: Prisma.SortOrder
|
|
241
284
|
createdAt?: Prisma.SortOrder
|
|
242
285
|
updatedAt?: Prisma.SortOrder
|
|
243
286
|
isDeleted?: Prisma.SortOrder
|
|
@@ -257,6 +300,13 @@ export type CodeSnippetWhereUniqueInput = Prisma.AtLeast<{
|
|
|
257
300
|
params?: Prisma.JsonFilter<"CodeSnippet">
|
|
258
301
|
code?: Prisma.StringFilter<"CodeSnippet"> | string
|
|
259
302
|
enabled?: Prisma.BoolFilter<"CodeSnippet"> | boolean
|
|
303
|
+
origin?: Prisma.StringFilter<"CodeSnippet"> | string
|
|
304
|
+
inputSchema?: Prisma.JsonFilter<"CodeSnippet">
|
|
305
|
+
outputSchema?: Prisma.JsonFilter<"CodeSnippet">
|
|
306
|
+
usageHints?: Prisma.JsonFilter<"CodeSnippet">
|
|
307
|
+
dependsOn?: Prisma.JsonFilter<"CodeSnippet">
|
|
308
|
+
trustLevel?: Prisma.StringFilter<"CodeSnippet"> | string
|
|
309
|
+
stats?: Prisma.JsonFilter<"CodeSnippet">
|
|
260
310
|
createdAt?: Prisma.DateTimeFilter<"CodeSnippet"> | Date | string
|
|
261
311
|
updatedAt?: Prisma.DateTimeFilter<"CodeSnippet"> | Date | string
|
|
262
312
|
isDeleted?: Prisma.BoolFilter<"CodeSnippet"> | boolean
|
|
@@ -272,6 +322,13 @@ export type CodeSnippetOrderByWithAggregationInput = {
|
|
|
272
322
|
params?: Prisma.SortOrder
|
|
273
323
|
code?: Prisma.SortOrder
|
|
274
324
|
enabled?: Prisma.SortOrder
|
|
325
|
+
origin?: Prisma.SortOrder
|
|
326
|
+
inputSchema?: Prisma.SortOrder
|
|
327
|
+
outputSchema?: Prisma.SortOrder
|
|
328
|
+
usageHints?: Prisma.SortOrder
|
|
329
|
+
dependsOn?: Prisma.SortOrder
|
|
330
|
+
trustLevel?: Prisma.SortOrder
|
|
331
|
+
stats?: Prisma.SortOrder
|
|
275
332
|
createdAt?: Prisma.SortOrder
|
|
276
333
|
updatedAt?: Prisma.SortOrder
|
|
277
334
|
isDeleted?: Prisma.SortOrder
|
|
@@ -292,6 +349,13 @@ export type CodeSnippetScalarWhereWithAggregatesInput = {
|
|
|
292
349
|
params?: Prisma.JsonWithAggregatesFilter<"CodeSnippet">
|
|
293
350
|
code?: Prisma.StringWithAggregatesFilter<"CodeSnippet"> | string
|
|
294
351
|
enabled?: Prisma.BoolWithAggregatesFilter<"CodeSnippet"> | boolean
|
|
352
|
+
origin?: Prisma.StringWithAggregatesFilter<"CodeSnippet"> | string
|
|
353
|
+
inputSchema?: Prisma.JsonWithAggregatesFilter<"CodeSnippet">
|
|
354
|
+
outputSchema?: Prisma.JsonWithAggregatesFilter<"CodeSnippet">
|
|
355
|
+
usageHints?: Prisma.JsonWithAggregatesFilter<"CodeSnippet">
|
|
356
|
+
dependsOn?: Prisma.JsonWithAggregatesFilter<"CodeSnippet">
|
|
357
|
+
trustLevel?: Prisma.StringWithAggregatesFilter<"CodeSnippet"> | string
|
|
358
|
+
stats?: Prisma.JsonWithAggregatesFilter<"CodeSnippet">
|
|
295
359
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"CodeSnippet"> | Date | string
|
|
296
360
|
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"CodeSnippet"> | Date | string
|
|
297
361
|
isDeleted?: Prisma.BoolWithAggregatesFilter<"CodeSnippet"> | boolean
|
|
@@ -300,11 +364,18 @@ export type CodeSnippetScalarWhereWithAggregatesInput = {
|
|
|
300
364
|
export type CodeSnippetCreateInput = {
|
|
301
365
|
id?: string
|
|
302
366
|
name: string
|
|
303
|
-
title
|
|
367
|
+
title?: string
|
|
304
368
|
description: string
|
|
305
369
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
306
370
|
code: string
|
|
307
371
|
enabled?: boolean
|
|
372
|
+
origin?: string
|
|
373
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
374
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
375
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
376
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
377
|
+
trustLevel?: string
|
|
378
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
308
379
|
createdAt?: Date | string
|
|
309
380
|
updatedAt?: Date | string
|
|
310
381
|
isDeleted?: boolean
|
|
@@ -315,11 +386,18 @@ export type CodeSnippetUncheckedCreateInput = {
|
|
|
315
386
|
id?: string
|
|
316
387
|
userId: string
|
|
317
388
|
name: string
|
|
318
|
-
title
|
|
389
|
+
title?: string
|
|
319
390
|
description: string
|
|
320
391
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
321
392
|
code: string
|
|
322
393
|
enabled?: boolean
|
|
394
|
+
origin?: string
|
|
395
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
396
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
397
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
398
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
399
|
+
trustLevel?: string
|
|
400
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
323
401
|
createdAt?: Date | string
|
|
324
402
|
updatedAt?: Date | string
|
|
325
403
|
isDeleted?: boolean
|
|
@@ -333,6 +411,13 @@ export type CodeSnippetUpdateInput = {
|
|
|
333
411
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
334
412
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
335
413
|
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
414
|
+
origin?: Prisma.StringFieldUpdateOperationsInput | string
|
|
415
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
416
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
417
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
418
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
419
|
+
trustLevel?: Prisma.StringFieldUpdateOperationsInput | string
|
|
420
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
336
421
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
337
422
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
338
423
|
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
@@ -348,6 +433,13 @@ export type CodeSnippetUncheckedUpdateInput = {
|
|
|
348
433
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
349
434
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
350
435
|
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
436
|
+
origin?: Prisma.StringFieldUpdateOperationsInput | string
|
|
437
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
438
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
439
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
440
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
441
|
+
trustLevel?: Prisma.StringFieldUpdateOperationsInput | string
|
|
442
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
351
443
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
352
444
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
353
445
|
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
@@ -357,11 +449,18 @@ export type CodeSnippetCreateManyInput = {
|
|
|
357
449
|
id?: string
|
|
358
450
|
userId: string
|
|
359
451
|
name: string
|
|
360
|
-
title
|
|
452
|
+
title?: string
|
|
361
453
|
description: string
|
|
362
454
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
363
455
|
code: string
|
|
364
456
|
enabled?: boolean
|
|
457
|
+
origin?: string
|
|
458
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
459
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
460
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
461
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
462
|
+
trustLevel?: string
|
|
463
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
365
464
|
createdAt?: Date | string
|
|
366
465
|
updatedAt?: Date | string
|
|
367
466
|
isDeleted?: boolean
|
|
@@ -375,6 +474,13 @@ export type CodeSnippetUpdateManyMutationInput = {
|
|
|
375
474
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
376
475
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
377
476
|
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
477
|
+
origin?: Prisma.StringFieldUpdateOperationsInput | string
|
|
478
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
479
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
480
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
481
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
482
|
+
trustLevel?: Prisma.StringFieldUpdateOperationsInput | string
|
|
483
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
378
484
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
379
485
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
380
486
|
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
@@ -389,6 +495,13 @@ export type CodeSnippetUncheckedUpdateManyInput = {
|
|
|
389
495
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
390
496
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
391
497
|
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
498
|
+
origin?: Prisma.StringFieldUpdateOperationsInput | string
|
|
499
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
500
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
501
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
502
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
503
|
+
trustLevel?: Prisma.StringFieldUpdateOperationsInput | string
|
|
504
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
392
505
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
393
506
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
394
507
|
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
@@ -418,6 +531,13 @@ export type CodeSnippetCountOrderByAggregateInput = {
|
|
|
418
531
|
params?: Prisma.SortOrder
|
|
419
532
|
code?: Prisma.SortOrder
|
|
420
533
|
enabled?: Prisma.SortOrder
|
|
534
|
+
origin?: Prisma.SortOrder
|
|
535
|
+
inputSchema?: Prisma.SortOrder
|
|
536
|
+
outputSchema?: Prisma.SortOrder
|
|
537
|
+
usageHints?: Prisma.SortOrder
|
|
538
|
+
dependsOn?: Prisma.SortOrder
|
|
539
|
+
trustLevel?: Prisma.SortOrder
|
|
540
|
+
stats?: Prisma.SortOrder
|
|
421
541
|
createdAt?: Prisma.SortOrder
|
|
422
542
|
updatedAt?: Prisma.SortOrder
|
|
423
543
|
isDeleted?: Prisma.SortOrder
|
|
@@ -431,6 +551,8 @@ export type CodeSnippetMaxOrderByAggregateInput = {
|
|
|
431
551
|
description?: Prisma.SortOrder
|
|
432
552
|
code?: Prisma.SortOrder
|
|
433
553
|
enabled?: Prisma.SortOrder
|
|
554
|
+
origin?: Prisma.SortOrder
|
|
555
|
+
trustLevel?: Prisma.SortOrder
|
|
434
556
|
createdAt?: Prisma.SortOrder
|
|
435
557
|
updatedAt?: Prisma.SortOrder
|
|
436
558
|
isDeleted?: Prisma.SortOrder
|
|
@@ -444,6 +566,8 @@ export type CodeSnippetMinOrderByAggregateInput = {
|
|
|
444
566
|
description?: Prisma.SortOrder
|
|
445
567
|
code?: Prisma.SortOrder
|
|
446
568
|
enabled?: Prisma.SortOrder
|
|
569
|
+
origin?: Prisma.SortOrder
|
|
570
|
+
trustLevel?: Prisma.SortOrder
|
|
447
571
|
createdAt?: Prisma.SortOrder
|
|
448
572
|
updatedAt?: Prisma.SortOrder
|
|
449
573
|
isDeleted?: Prisma.SortOrder
|
|
@@ -494,11 +618,18 @@ export type CodeSnippetUncheckedUpdateManyWithoutUserNestedInput = {
|
|
|
494
618
|
export type CodeSnippetCreateWithoutUserInput = {
|
|
495
619
|
id?: string
|
|
496
620
|
name: string
|
|
497
|
-
title
|
|
621
|
+
title?: string
|
|
498
622
|
description: string
|
|
499
623
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
500
624
|
code: string
|
|
501
625
|
enabled?: boolean
|
|
626
|
+
origin?: string
|
|
627
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
628
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
629
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
630
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
631
|
+
trustLevel?: string
|
|
632
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
502
633
|
createdAt?: Date | string
|
|
503
634
|
updatedAt?: Date | string
|
|
504
635
|
isDeleted?: boolean
|
|
@@ -507,11 +638,18 @@ export type CodeSnippetCreateWithoutUserInput = {
|
|
|
507
638
|
export type CodeSnippetUncheckedCreateWithoutUserInput = {
|
|
508
639
|
id?: string
|
|
509
640
|
name: string
|
|
510
|
-
title
|
|
641
|
+
title?: string
|
|
511
642
|
description: string
|
|
512
643
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
513
644
|
code: string
|
|
514
645
|
enabled?: boolean
|
|
646
|
+
origin?: string
|
|
647
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
648
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
649
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
650
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
651
|
+
trustLevel?: string
|
|
652
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
515
653
|
createdAt?: Date | string
|
|
516
654
|
updatedAt?: Date | string
|
|
517
655
|
isDeleted?: boolean
|
|
@@ -555,6 +693,13 @@ export type CodeSnippetScalarWhereInput = {
|
|
|
555
693
|
params?: Prisma.JsonFilter<"CodeSnippet">
|
|
556
694
|
code?: Prisma.StringFilter<"CodeSnippet"> | string
|
|
557
695
|
enabled?: Prisma.BoolFilter<"CodeSnippet"> | boolean
|
|
696
|
+
origin?: Prisma.StringFilter<"CodeSnippet"> | string
|
|
697
|
+
inputSchema?: Prisma.JsonFilter<"CodeSnippet">
|
|
698
|
+
outputSchema?: Prisma.JsonFilter<"CodeSnippet">
|
|
699
|
+
usageHints?: Prisma.JsonFilter<"CodeSnippet">
|
|
700
|
+
dependsOn?: Prisma.JsonFilter<"CodeSnippet">
|
|
701
|
+
trustLevel?: Prisma.StringFilter<"CodeSnippet"> | string
|
|
702
|
+
stats?: Prisma.JsonFilter<"CodeSnippet">
|
|
558
703
|
createdAt?: Prisma.DateTimeFilter<"CodeSnippet"> | Date | string
|
|
559
704
|
updatedAt?: Prisma.DateTimeFilter<"CodeSnippet"> | Date | string
|
|
560
705
|
isDeleted?: Prisma.BoolFilter<"CodeSnippet"> | boolean
|
|
@@ -563,11 +708,18 @@ export type CodeSnippetScalarWhereInput = {
|
|
|
563
708
|
export type CodeSnippetCreateManyUserInput = {
|
|
564
709
|
id?: string
|
|
565
710
|
name: string
|
|
566
|
-
title
|
|
711
|
+
title?: string
|
|
567
712
|
description: string
|
|
568
713
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
569
714
|
code: string
|
|
570
715
|
enabled?: boolean
|
|
716
|
+
origin?: string
|
|
717
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
718
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
719
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
720
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
721
|
+
trustLevel?: string
|
|
722
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
571
723
|
createdAt?: Date | string
|
|
572
724
|
updatedAt?: Date | string
|
|
573
725
|
isDeleted?: boolean
|
|
@@ -581,6 +733,13 @@ export type CodeSnippetUpdateWithoutUserInput = {
|
|
|
581
733
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
582
734
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
583
735
|
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
736
|
+
origin?: Prisma.StringFieldUpdateOperationsInput | string
|
|
737
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
738
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
739
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
740
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
741
|
+
trustLevel?: Prisma.StringFieldUpdateOperationsInput | string
|
|
742
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
584
743
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
585
744
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
586
745
|
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
@@ -594,6 +753,13 @@ export type CodeSnippetUncheckedUpdateWithoutUserInput = {
|
|
|
594
753
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
595
754
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
596
755
|
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
756
|
+
origin?: Prisma.StringFieldUpdateOperationsInput | string
|
|
757
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
758
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
759
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
760
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
761
|
+
trustLevel?: Prisma.StringFieldUpdateOperationsInput | string
|
|
762
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
597
763
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
598
764
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
599
765
|
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
@@ -607,6 +773,13 @@ export type CodeSnippetUncheckedUpdateManyWithoutUserInput = {
|
|
|
607
773
|
params?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
608
774
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
609
775
|
enabled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
776
|
+
origin?: Prisma.StringFieldUpdateOperationsInput | string
|
|
777
|
+
inputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
778
|
+
outputSchema?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
779
|
+
usageHints?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
780
|
+
dependsOn?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
781
|
+
trustLevel?: Prisma.StringFieldUpdateOperationsInput | string
|
|
782
|
+
stats?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
|
610
783
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
611
784
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
612
785
|
isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
@@ -623,6 +796,13 @@ export type CodeSnippetSelect<ExtArgs extends runtime.Types.Extensions.InternalA
|
|
|
623
796
|
params?: boolean
|
|
624
797
|
code?: boolean
|
|
625
798
|
enabled?: boolean
|
|
799
|
+
origin?: boolean
|
|
800
|
+
inputSchema?: boolean
|
|
801
|
+
outputSchema?: boolean
|
|
802
|
+
usageHints?: boolean
|
|
803
|
+
dependsOn?: boolean
|
|
804
|
+
trustLevel?: boolean
|
|
805
|
+
stats?: boolean
|
|
626
806
|
createdAt?: boolean
|
|
627
807
|
updatedAt?: boolean
|
|
628
808
|
isDeleted?: boolean
|
|
@@ -638,6 +818,13 @@ export type CodeSnippetSelectCreateManyAndReturn<ExtArgs extends runtime.Types.E
|
|
|
638
818
|
params?: boolean
|
|
639
819
|
code?: boolean
|
|
640
820
|
enabled?: boolean
|
|
821
|
+
origin?: boolean
|
|
822
|
+
inputSchema?: boolean
|
|
823
|
+
outputSchema?: boolean
|
|
824
|
+
usageHints?: boolean
|
|
825
|
+
dependsOn?: boolean
|
|
826
|
+
trustLevel?: boolean
|
|
827
|
+
stats?: boolean
|
|
641
828
|
createdAt?: boolean
|
|
642
829
|
updatedAt?: boolean
|
|
643
830
|
isDeleted?: boolean
|
|
@@ -653,6 +840,13 @@ export type CodeSnippetSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.E
|
|
|
653
840
|
params?: boolean
|
|
654
841
|
code?: boolean
|
|
655
842
|
enabled?: boolean
|
|
843
|
+
origin?: boolean
|
|
844
|
+
inputSchema?: boolean
|
|
845
|
+
outputSchema?: boolean
|
|
846
|
+
usageHints?: boolean
|
|
847
|
+
dependsOn?: boolean
|
|
848
|
+
trustLevel?: boolean
|
|
849
|
+
stats?: boolean
|
|
656
850
|
createdAt?: boolean
|
|
657
851
|
updatedAt?: boolean
|
|
658
852
|
isDeleted?: boolean
|
|
@@ -668,12 +862,19 @@ export type CodeSnippetSelectScalar = {
|
|
|
668
862
|
params?: boolean
|
|
669
863
|
code?: boolean
|
|
670
864
|
enabled?: boolean
|
|
865
|
+
origin?: boolean
|
|
866
|
+
inputSchema?: boolean
|
|
867
|
+
outputSchema?: boolean
|
|
868
|
+
usageHints?: boolean
|
|
869
|
+
dependsOn?: boolean
|
|
870
|
+
trustLevel?: boolean
|
|
871
|
+
stats?: boolean
|
|
671
872
|
createdAt?: boolean
|
|
672
873
|
updatedAt?: boolean
|
|
673
874
|
isDeleted?: boolean
|
|
674
875
|
}
|
|
675
876
|
|
|
676
|
-
export type CodeSnippetOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "userId" | "name" | "title" | "description" | "params" | "code" | "enabled" | "createdAt" | "updatedAt" | "isDeleted", ExtArgs["result"]["codeSnippet"]>
|
|
877
|
+
export type CodeSnippetOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "userId" | "name" | "title" | "description" | "params" | "code" | "enabled" | "origin" | "inputSchema" | "outputSchema" | "usageHints" | "dependsOn" | "trustLevel" | "stats" | "createdAt" | "updatedAt" | "isDeleted", ExtArgs["result"]["codeSnippet"]>
|
|
677
878
|
export type CodeSnippetInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
678
879
|
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
|
|
679
880
|
}
|
|
@@ -698,6 +899,13 @@ export type $CodeSnippetPayload<ExtArgs extends runtime.Types.Extensions.Interna
|
|
|
698
899
|
params: runtime.JsonValue
|
|
699
900
|
code: string
|
|
700
901
|
enabled: boolean
|
|
902
|
+
origin: string
|
|
903
|
+
inputSchema: runtime.JsonValue
|
|
904
|
+
outputSchema: runtime.JsonValue
|
|
905
|
+
usageHints: runtime.JsonValue
|
|
906
|
+
dependsOn: runtime.JsonValue
|
|
907
|
+
trustLevel: string
|
|
908
|
+
stats: runtime.JsonValue
|
|
701
909
|
createdAt: Date
|
|
702
910
|
updatedAt: Date
|
|
703
911
|
isDeleted: boolean
|
|
@@ -1133,6 +1341,13 @@ export interface CodeSnippetFieldRefs {
|
|
|
1133
1341
|
readonly params: Prisma.FieldRef<"CodeSnippet", 'Json'>
|
|
1134
1342
|
readonly code: Prisma.FieldRef<"CodeSnippet", 'String'>
|
|
1135
1343
|
readonly enabled: Prisma.FieldRef<"CodeSnippet", 'Boolean'>
|
|
1344
|
+
readonly origin: Prisma.FieldRef<"CodeSnippet", 'String'>
|
|
1345
|
+
readonly inputSchema: Prisma.FieldRef<"CodeSnippet", 'Json'>
|
|
1346
|
+
readonly outputSchema: Prisma.FieldRef<"CodeSnippet", 'Json'>
|
|
1347
|
+
readonly usageHints: Prisma.FieldRef<"CodeSnippet", 'Json'>
|
|
1348
|
+
readonly dependsOn: Prisma.FieldRef<"CodeSnippet", 'Json'>
|
|
1349
|
+
readonly trustLevel: Prisma.FieldRef<"CodeSnippet", 'String'>
|
|
1350
|
+
readonly stats: Prisma.FieldRef<"CodeSnippet", 'Json'>
|
|
1136
1351
|
readonly createdAt: Prisma.FieldRef<"CodeSnippet", 'DateTime'>
|
|
1137
1352
|
readonly updatedAt: Prisma.FieldRef<"CodeSnippet", 'DateTime'>
|
|
1138
1353
|
readonly isDeleted: Prisma.FieldRef<"CodeSnippet", 'Boolean'>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
-- CodeSnippet 对齐官方 Snippet(@tanstack/ai-code-mode-snippets 1.0.0,
|
|
2
|
+
-- T5.3 裁决③):origin 写入方分流 + 官方 SnippetStorage 契约所需字段直映射。
|
|
3
|
+
-- 存量行均为用户创建,origin 默认 'user';user 片段的 inputSchema 权威源仍是
|
|
4
|
+
-- params(加载层经 buildSnippetInputSchema 派生),列留默认 '{}' 占位。
|
|
5
|
+
|
|
6
|
+
-- AlterTable
|
|
7
|
+
ALTER TABLE "code_snippets" ADD COLUMN "origin" TEXT NOT NULL DEFAULT 'user';
|
|
8
|
+
ALTER TABLE "code_snippets" ADD COLUMN "inputSchema" JSONB NOT NULL DEFAULT '{}';
|
|
9
|
+
ALTER TABLE "code_snippets" ADD COLUMN "outputSchema" JSONB NOT NULL DEFAULT '{}';
|
|
10
|
+
ALTER TABLE "code_snippets" ADD COLUMN "usageHints" JSONB NOT NULL DEFAULT '[]';
|
|
11
|
+
ALTER TABLE "code_snippets" ADD COLUMN "dependsOn" JSONB NOT NULL DEFAULT '[]';
|
|
12
|
+
ALTER TABLE "code_snippets" ADD COLUMN "trustLevel" TEXT NOT NULL DEFAULT 'untrusted';
|
|
13
|
+
ALTER TABLE "code_snippets" ADD COLUMN "stats" JSONB NOT NULL DEFAULT '{"executions":0,"successRate":0}';
|
|
14
|
+
|
|
15
|
+
-- model 片段无标题(register_snippet 不提供 title),列补空串默认
|
|
16
|
+
ALTER TABLE "code_snippets" ALTER COLUMN "title" SET DEFAULT '';
|
|
17
|
+
|
|
18
|
+
-- CreateIndex
|
|
19
|
+
CREATE INDEX "code_snippets_userId_origin_isDeleted_idx" ON "code_snippets"("userId", "origin", "isDeleted");
|
package/package.json
CHANGED
package/schema.prisma
CHANGED
|
@@ -2467,23 +2467,48 @@ model IterationAutoSchedule {
|
|
|
2467
2467
|
// 编排模式可复用片段:用户保存的跨请求编排逻辑。运行时经 getSnippetBindings
|
|
2468
2468
|
// 暴露为 snippet_<name> 绑定,片段函数体在嵌套沙箱内执行并可调用 external_* 工具。
|
|
2469
2469
|
// 片段本身不豁免归属校验,execute 只在服务端执行,不进客户端 bundle。
|
|
2470
|
+
//
|
|
2471
|
+
// 与官方 Snippet(@tanstack/ai-code-mode-snippets 1.0.0)的字段映射——
|
|
2472
|
+
// 本表同时是官方 SnippetStorage 契约(snippet-storage.server.ts)的持久层:
|
|
2473
|
+
// id/name/description/code/createdAt/updatedAt → 同名列直映射;
|
|
2474
|
+
// origin → 官方 Snippet 无此字段,本仓扩展:写入方分流('user'=用户
|
|
2475
|
+
// UI/serverFn 写入,'model'=register_snippet 写入),创建后
|
|
2476
|
+
// 不可变(更新必须同 origin,防覆盖见 snippet-storage.server.ts);
|
|
2477
|
+
// inputSchema → 官方 JSON Schema。user 片段的权威源是 params(执行绑定经
|
|
2478
|
+
// buildSnippetInputSchema(params) 派生,本列留默认 "{}");
|
|
2479
|
+
// model 片段由 register_snippet 落官方 schema;
|
|
2480
|
+
// outputSchema/usageHints/dependsOn/trustLevel/stats → 官方 Snippet 直映射
|
|
2481
|
+
// (stats = { executions, successRate },updateStats 定向更新);
|
|
2482
|
+
// title → 官方无此字段,本仓 UI 扩展(model 片段缺省 "");
|
|
2483
|
+
// params/enabled/isDeleted → 本仓自有(enabled/isDeleted 维持既有过滤语义)。
|
|
2484
|
+
// code 形态按 origin 分流:user 片段是存量「函数体 + args 变量」格式(参数经
|
|
2485
|
+
// const args = <JSON> 注入),model 片段是官方「函数体 + input 变量」格式
|
|
2486
|
+
// (const input = <JSON> 注入)——执行包装层按 origin 选注入变量名。
|
|
2470
2487
|
model CodeSnippet {
|
|
2471
|
-
id
|
|
2472
|
-
userId
|
|
2473
|
-
name
|
|
2474
|
-
title
|
|
2475
|
-
description
|
|
2476
|
-
params
|
|
2477
|
-
code
|
|
2478
|
-
enabled
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2488
|
+
id String @id @default(cuid())
|
|
2489
|
+
userId String
|
|
2490
|
+
name String
|
|
2491
|
+
title String @default("")
|
|
2492
|
+
description String
|
|
2493
|
+
params Json @default("{}")
|
|
2494
|
+
code String @db.Text
|
|
2495
|
+
enabled Boolean @default(true)
|
|
2496
|
+
origin String @default("user")
|
|
2497
|
+
inputSchema Json @default("{}")
|
|
2498
|
+
outputSchema Json @default("{}")
|
|
2499
|
+
usageHints Json @default("[]")
|
|
2500
|
+
dependsOn Json @default("[]")
|
|
2501
|
+
trustLevel String @default("untrusted")
|
|
2502
|
+
stats Json @default("{\"executions\":0,\"successRate\":0}")
|
|
2503
|
+
createdAt DateTime @default(now())
|
|
2504
|
+
updatedAt DateTime @updatedAt
|
|
2505
|
+
isDeleted Boolean @default(false)
|
|
2482
2506
|
|
|
2483
2507
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
2484
2508
|
|
|
2485
2509
|
@@unique([userId, name])
|
|
2486
2510
|
@@index([userId, enabled, isDeleted])
|
|
2511
|
+
@@index([userId, origin, isDeleted])
|
|
2487
2512
|
@@map("code_snippets")
|
|
2488
2513
|
}
|
|
2489
2514
|
|