@happyvertical/smrt-projects 0.44.1 → 0.45.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.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-projects",
5
- "packageVersion": "0.44.1",
5
+ "packageVersion": "0.45.0",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-projects:DevelopmentRequestHistoryCollection": {
8
8
  "name": "developmentrequesthistorycollection",
@@ -2195,754 +2195,206 @@
2195
2195
  }
2196
2196
  },
2197
2197
  "methods": {
2198
- "withDatabase": {
2199
- "name": "withDatabase",
2198
+ "getRepository": {
2199
+ "name": "getRepository",
2200
2200
  "async": true,
2201
- "parameters": [
2202
- {
2203
- "name": "db",
2204
- "type": "DatabaseInterface",
2205
- "optional": false
2206
- },
2207
- {
2208
- "name": "operation",
2209
- "type": "Function",
2210
- "optional": false
2211
- }
2212
- ],
2213
- "returnType": "Promise<T>",
2214
- "isStatic": false,
2215
- "isPublic": true
2216
- },
2217
- "getAiUsageSnapshot": {
2218
- "name": "getAiUsageSnapshot",
2219
- "async": false,
2220
- "parameters": [],
2221
- "returnType": "AiUsageSnapshot | undefined",
2222
- "isStatic": false,
2223
- "isPublic": true
2224
- },
2225
- "resetAiUsage": {
2226
- "name": "resetAiUsage",
2227
- "async": false,
2228
2201
  "parameters": [],
2229
- "returnType": "void",
2230
- "isStatic": false,
2231
- "isPublic": true
2232
- },
2233
- "listAiUsage": {
2234
- "name": "listAiUsage",
2235
- "async": true,
2236
- "parameters": [
2237
- {
2238
- "name": "options",
2239
- "type": "AiUsageListOptions",
2240
- "optional": true
2241
- }
2242
- ],
2243
- "returnType": "Promise<SmrtAiUsageRecord[]>",
2202
+ "returnType": "Promise<Repository>",
2244
2203
  "isStatic": false,
2245
2204
  "isPublic": true
2246
2205
  },
2247
- "summarizeAiUsage": {
2248
- "name": "summarizeAiUsage",
2206
+ "getClient": {
2207
+ "name": "getClient",
2249
2208
  "async": true,
2250
- "parameters": [
2251
- {
2252
- "name": "options",
2253
- "type": "AiUsageSummaryOptions",
2254
- "optional": true
2255
- }
2256
- ],
2257
- "returnType": "Promise<Record<string, AiUsageStats>>",
2258
- "isStatic": false,
2259
- "isPublic": true
2260
- },
2261
- "destroy": {
2262
- "name": "destroy",
2263
- "async": false,
2264
- "parameters": [],
2265
- "returnType": "void",
2266
- "isStatic": false,
2267
- "isPublic": true
2268
- },
2269
- "markAsPersisted": {
2270
- "name": "markAsPersisted",
2271
- "async": false,
2272
2209
  "parameters": [],
2273
- "returnType": "void",
2210
+ "returnType": "Promise<IRepository>",
2274
2211
  "isStatic": false,
2275
2212
  "isPublic": true
2276
2213
  },
2277
- "requireInsertOnSave": {
2278
- "name": "requireInsertOnSave",
2214
+ "clearCache": {
2215
+ "name": "clearCache",
2279
2216
  "async": false,
2280
2217
  "parameters": [],
2281
2218
  "returnType": "void",
2282
2219
  "isStatic": false,
2283
2220
  "isPublic": true
2284
2221
  },
2285
- "withTransaction": {
2286
- "name": "withTransaction",
2222
+ "sync": {
2223
+ "name": "sync",
2287
2224
  "async": true,
2288
2225
  "parameters": [
2289
2226
  {
2290
- "name": "operation",
2291
- "type": "Function",
2292
- "optional": false
2227
+ "name": "options",
2228
+ "type": "SyncOptions",
2229
+ "optional": true
2293
2230
  }
2294
2231
  ],
2295
- "returnType": "Promise<T>",
2232
+ "returnType": "Promise",
2296
2233
  "isStatic": false,
2297
2234
  "isPublic": true
2298
2235
  },
2299
- "initialize": {
2300
- "name": "initialize",
2236
+ "getComments": {
2237
+ "name": "getComments",
2301
2238
  "async": true,
2302
2239
  "parameters": [],
2303
- "returnType": "Promise",
2240
+ "returnType": "Promise<Comment[]>",
2304
2241
  "isStatic": false,
2305
2242
  "isPublic": true
2306
2243
  },
2307
- "loadDataFromDb": {
2308
- "name": "loadDataFromDb",
2244
+ "addComment": {
2245
+ "name": "addComment",
2309
2246
  "async": true,
2310
2247
  "parameters": [
2311
2248
  {
2312
- "name": "data",
2313
- "type": "Record<string>",
2249
+ "name": "body",
2250
+ "type": "string",
2314
2251
  "optional": false
2315
2252
  }
2316
2253
  ],
2317
- "returnType": "any",
2254
+ "returnType": "Promise<Comment>",
2318
2255
  "isStatic": false,
2319
2256
  "isPublic": true
2320
2257
  },
2321
- "getFields": {
2322
- "name": "getFields",
2258
+ "incorporateFeedback": {
2259
+ "name": "incorporateFeedback",
2323
2260
  "async": true,
2324
- "parameters": [],
2325
- "returnType": "Promise<any>",
2326
- "isStatic": false,
2327
- "isPublic": true
2328
- },
2329
- "toJSON": {
2330
- "name": "toJSON",
2331
- "async": false,
2332
- "parameters": [],
2333
- "returnType": "any",
2334
- "isStatic": false,
2335
- "isPublic": true
2336
- },
2337
- "toPlainObject": {
2338
- "name": "toPlainObject",
2339
- "async": false,
2340
- "parameters": [],
2341
- "returnType": "Record<string>",
2342
- "isStatic": false,
2343
- "isPublic": true
2344
- },
2345
- "toPublicJSON": {
2346
- "name": "toPublicJSON",
2347
- "async": false,
2348
2261
  "parameters": [
2349
2262
  {
2350
2263
  "name": "options",
2351
- "type": "PublicJsonOptions",
2264
+ "type": "IncorporateFeedbackOptions",
2352
2265
  "optional": true
2353
2266
  }
2354
2267
  ],
2355
- "returnType": "Record<string>",
2268
+ "returnType": "Promise<IncorporateFeedbackResult>",
2356
2269
  "isStatic": false,
2357
2270
  "isPublic": true
2358
2271
  },
2359
- "getId": {
2360
- "name": "getId",
2272
+ "rollback": {
2273
+ "name": "rollback",
2361
2274
  "async": true,
2362
2275
  "parameters": [],
2363
- "returnType": "any",
2276
+ "returnType": "Promise<object>",
2364
2277
  "isStatic": false,
2365
2278
  "isPublic": true
2366
2279
  },
2367
- "getSlug": {
2368
- "name": "getSlug",
2280
+ "needsReview": {
2281
+ "name": "needsReview",
2369
2282
  "async": true,
2370
2283
  "parameters": [],
2371
- "returnType": "any",
2284
+ "returnType": "Promise<boolean>",
2372
2285
  "isStatic": false,
2373
2286
  "isPublic": true
2374
2287
  },
2375
- "getSavedId": {
2376
- "name": "getSavedId",
2288
+ "isBugReport": {
2289
+ "name": "isBugReport",
2377
2290
  "async": true,
2378
2291
  "parameters": [],
2379
- "returnType": "any",
2292
+ "returnType": "Promise<boolean>",
2380
2293
  "isStatic": false,
2381
2294
  "isPublic": true
2382
2295
  },
2383
- "isSaved": {
2384
- "name": "isSaved",
2296
+ "isFeatureRequest": {
2297
+ "name": "isFeatureRequest",
2385
2298
  "async": true,
2386
2299
  "parameters": [],
2387
- "returnType": "any",
2388
- "isStatic": false,
2389
- "isPublic": true
2390
- },
2391
- "save": {
2392
- "name": "save",
2393
- "async": true,
2394
- "parameters": [
2395
- {
2396
- "name": "options",
2397
- "type": "SmrtSaveOptions",
2398
- "optional": true
2399
- }
2400
- ],
2401
- "returnType": "any",
2402
- "isStatic": false,
2403
- "isPublic": true
2404
- },
2405
- "claimRevision": {
2406
- "name": "claimRevision",
2407
- "async": true,
2408
- "parameters": [
2409
- {
2410
- "name": "expectedUpdatedAt",
2411
- "type": "Date | string",
2412
- "optional": false
2413
- }
2414
- ],
2415
- "returnType": "Promise",
2300
+ "returnType": "Promise<boolean>",
2416
2301
  "isStatic": false,
2417
2302
  "isPublic": true
2418
2303
  },
2419
- "classifyConstraintError": {
2420
- "name": "classifyConstraintError",
2421
- "async": false,
2422
- "parameters": [
2423
- {
2424
- "name": "message",
2425
- "type": "string",
2426
- "optional": false
2427
- }
2428
- ],
2429
- "returnType": "'unique' | 'not_null' | null",
2430
- "isStatic": true,
2431
- "isPublic": true
2432
- },
2433
- "loadFromId": {
2434
- "name": "loadFromId",
2304
+ "suggestLabels": {
2305
+ "name": "suggestLabels",
2435
2306
  "async": true,
2436
2307
  "parameters": [],
2437
- "returnType": "any",
2308
+ "returnType": "Promise<string[]>",
2438
2309
  "isStatic": false,
2439
2310
  "isPublic": true
2440
2311
  },
2441
- "loadFromSlug": {
2442
- "name": "loadFromSlug",
2312
+ "close": {
2313
+ "name": "close",
2443
2314
  "async": true,
2444
2315
  "parameters": [],
2445
- "returnType": "any",
2316
+ "returnType": "Promise<void>",
2446
2317
  "isStatic": false,
2447
2318
  "isPublic": true
2448
2319
  },
2449
- "is": {
2450
- "name": "is",
2320
+ "addLabels": {
2321
+ "name": "addLabels",
2451
2322
  "async": true,
2452
2323
  "parameters": [
2453
2324
  {
2454
- "name": "criteria",
2455
- "type": "string",
2325
+ "name": "labels",
2326
+ "type": "string[]",
2456
2327
  "optional": false
2457
- },
2458
- {
2459
- "name": "options",
2460
- "type": "AiOperationOptions",
2461
- "optional": true
2462
2328
  }
2463
2329
  ],
2464
- "returnType": "any",
2330
+ "returnType": "Promise<void>",
2465
2331
  "isStatic": false,
2466
2332
  "isPublic": true
2467
2333
  },
2468
- "do": {
2469
- "name": "do",
2334
+ "removeLabel": {
2335
+ "name": "removeLabel",
2470
2336
  "async": true,
2471
2337
  "parameters": [
2472
2338
  {
2473
- "name": "instructions",
2339
+ "name": "label",
2474
2340
  "type": "string",
2475
2341
  "optional": false
2476
- },
2477
- {
2478
- "name": "options",
2479
- "type": "AiOperationOptions",
2480
- "optional": true
2481
- }
2482
- ],
2483
- "returnType": "any",
2484
- "isStatic": false,
2485
- "isPublic": true
2486
- },
2487
- "describe": {
2488
- "name": "describe",
2489
- "async": true,
2490
- "parameters": [
2491
- {
2492
- "name": "options",
2493
- "type": "AiOperationOptions",
2494
- "optional": true
2495
2342
  }
2496
2343
  ],
2497
- "returnType": "any",
2344
+ "returnType": "Promise<void>",
2498
2345
  "isStatic": false,
2499
2346
  "isPublic": true
2500
2347
  },
2501
- "delete": {
2502
- "name": "delete",
2348
+ "assign": {
2349
+ "name": "assign",
2503
2350
  "async": true,
2504
2351
  "parameters": [
2505
2352
  {
2506
- "name": "options",
2507
- "type": "SmrtDeleteOptions",
2508
- "optional": true
2353
+ "name": "assignees",
2354
+ "type": "string[]",
2355
+ "optional": false
2509
2356
  }
2510
2357
  ],
2511
2358
  "returnType": "Promise<void>",
2512
2359
  "isStatic": false,
2513
2360
  "isPublic": true
2514
2361
  },
2515
- "isRelatedLoaded": {
2516
- "name": "isRelatedLoaded",
2362
+ "getUrl": {
2363
+ "name": "getUrl",
2517
2364
  "async": false,
2518
- "parameters": [
2519
- {
2520
- "name": "fieldName",
2521
- "type": "string",
2522
- "optional": false
2523
- }
2524
- ],
2525
- "returnType": "boolean",
2365
+ "parameters": [],
2366
+ "returnType": "string",
2526
2367
  "isStatic": false,
2527
2368
  "isPublic": true
2369
+ }
2370
+ },
2371
+ "decoratorConfig": {
2372
+ "tableStrategy": "sti",
2373
+ "api": {
2374
+ "include": [
2375
+ "list",
2376
+ "get",
2377
+ "create",
2378
+ "update"
2379
+ ]
2528
2380
  },
2529
- "_setLoadedRelationship": {
2530
- "name": "_setLoadedRelationship",
2531
- "async": false,
2532
- "parameters": [
2533
- {
2534
- "name": "fieldName",
2535
- "type": "string",
2536
- "optional": false
2537
- },
2538
- {
2539
- "name": "value",
2540
- "type": "any",
2541
- "optional": false
2542
- }
2543
- ],
2544
- "returnType": "void",
2545
- "isStatic": false,
2546
- "isPublic": true
2381
+ "mcp": {
2382
+ "include": [
2383
+ "list",
2384
+ "get",
2385
+ "sync",
2386
+ "incorporateFeedback"
2387
+ ]
2547
2388
  },
2548
- "loadRelated": {
2549
- "name": "loadRelated",
2550
- "async": true,
2551
- "parameters": [
2552
- {
2553
- "name": "fieldName",
2554
- "type": "string",
2555
- "optional": false
2556
- },
2557
- {
2558
- "name": "opts",
2559
- "type": "LoadRelatedOptions",
2560
- "optional": true
2561
- }
2389
+ "cli": {
2390
+ "include": [
2391
+ "list",
2392
+ "get",
2393
+ "sync",
2394
+ "incorporateFeedback",
2395
+ "rollback"
2562
2396
  ],
2563
- "returnType": "Promise<any>",
2564
- "isStatic": false,
2565
- "isPublic": true
2566
- },
2567
- "loadRelatedMany": {
2568
- "name": "loadRelatedMany",
2569
- "async": true,
2570
- "parameters": [
2571
- {
2572
- "name": "fieldName",
2573
- "type": "string",
2574
- "optional": false
2575
- },
2576
- {
2577
- "name": "opts",
2578
- "type": "LoadRelatedOptions",
2579
- "optional": true
2580
- }
2581
- ],
2582
- "returnType": "Promise<any[]>",
2583
- "isStatic": false,
2584
- "isPublic": true
2585
- },
2586
- "getRelated": {
2587
- "name": "getRelated",
2588
- "async": true,
2589
- "parameters": [
2590
- {
2591
- "name": "fieldName",
2592
- "type": "string",
2593
- "optional": false
2594
- },
2595
- {
2596
- "name": "opts",
2597
- "type": "LoadRelatedOptions",
2598
- "optional": true
2599
- }
2600
- ],
2601
- "returnType": "Promise<any>",
2602
- "isStatic": false,
2603
- "isPublic": true
2604
- },
2605
- "getAvailableTools": {
2606
- "name": "getAvailableTools",
2607
- "async": false,
2608
- "parameters": [],
2609
- "returnType": "AITool[]",
2610
- "isStatic": false,
2611
- "isPublic": true
2612
- },
2613
- "executeToolCall": {
2614
- "name": "executeToolCall",
2615
- "async": true,
2616
- "parameters": [
2617
- {
2618
- "name": "toolCall",
2619
- "type": "ToolCall",
2620
- "optional": false
2621
- }
2622
- ],
2623
- "returnType": "Promise<ToolCallResult>",
2624
- "isStatic": false,
2625
- "isPublic": true
2626
- },
2627
- "remember": {
2628
- "name": "remember",
2629
- "async": true,
2630
- "parameters": [
2631
- {
2632
- "name": "options",
2633
- "type": "object",
2634
- "optional": false
2635
- }
2636
- ],
2637
- "returnType": "Promise<void>",
2638
- "isStatic": false,
2639
- "isPublic": true
2640
- },
2641
- "recall": {
2642
- "name": "recall",
2643
- "async": true,
2644
- "parameters": [
2645
- {
2646
- "name": "options",
2647
- "type": "object",
2648
- "optional": false
2649
- }
2650
- ],
2651
- "returnType": "Promise",
2652
- "isStatic": false,
2653
- "isPublic": true
2654
- },
2655
- "recallAll": {
2656
- "name": "recallAll",
2657
- "async": true,
2658
- "parameters": [
2659
- {
2660
- "name": "options",
2661
- "type": "object",
2662
- "optional": true
2663
- }
2664
- ],
2665
- "returnType": "Promise<Map<string>>",
2666
- "isStatic": false,
2667
- "isPublic": true
2668
- },
2669
- "forget": {
2670
- "name": "forget",
2671
- "async": true,
2672
- "parameters": [
2673
- {
2674
- "name": "options",
2675
- "type": "object",
2676
- "optional": false
2677
- }
2678
- ],
2679
- "returnType": "Promise<void>",
2680
- "isStatic": false,
2681
- "isPublic": true
2682
- },
2683
- "forgetScope": {
2684
- "name": "forgetScope",
2685
- "async": true,
2686
- "parameters": [
2687
- {
2688
- "name": "options",
2689
- "type": "object",
2690
- "optional": false
2691
- }
2692
- ],
2693
- "returnType": "Promise<number>",
2694
- "isStatic": false,
2695
- "isPublic": true
2696
- },
2697
- "generateEmbeddings": {
2698
- "name": "generateEmbeddings",
2699
- "async": true,
2700
- "parameters": [
2701
- {
2702
- "name": "options",
2703
- "type": "GenerateEmbeddingsOptions",
2704
- "optional": true
2705
- }
2706
- ],
2707
- "returnType": "Promise<void>",
2708
- "isStatic": false,
2709
- "isPublic": true
2710
- },
2711
- "getEmbedding": {
2712
- "name": "getEmbedding",
2713
- "async": true,
2714
- "parameters": [
2715
- {
2716
- "name": "fieldName",
2717
- "type": "string",
2718
- "optional": false
2719
- },
2720
- {
2721
- "name": "model",
2722
- "type": "string",
2723
- "optional": true
2724
- }
2725
- ],
2726
- "returnType": "Promise<number[] | null>",
2727
- "isStatic": false,
2728
- "isPublic": true
2729
- },
2730
- "hasStaleEmbeddings": {
2731
- "name": "hasStaleEmbeddings",
2732
- "async": true,
2733
- "parameters": [],
2734
- "returnType": "Promise<boolean>",
2735
- "isStatic": false,
2736
- "isPublic": true
2737
- },
2738
- "clearEmbeddings": {
2739
- "name": "clearEmbeddings",
2740
- "async": true,
2741
- "parameters": [],
2742
- "returnType": "Promise<void>",
2743
- "isStatic": false,
2744
- "isPublic": true
2745
- },
2746
- "getRepository": {
2747
- "name": "getRepository",
2748
- "async": true,
2749
- "parameters": [],
2750
- "returnType": "Promise<Repository>",
2751
- "isStatic": false,
2752
- "isPublic": true
2753
- },
2754
- "getClient": {
2755
- "name": "getClient",
2756
- "async": true,
2757
- "parameters": [],
2758
- "returnType": "Promise<IRepository>",
2759
- "isStatic": false,
2760
- "isPublic": true
2761
- },
2762
- "clearCache": {
2763
- "name": "clearCache",
2764
- "async": false,
2765
- "parameters": [],
2766
- "returnType": "void",
2767
- "isStatic": false,
2768
- "isPublic": true
2769
- },
2770
- "sync": {
2771
- "name": "sync",
2772
- "async": true,
2773
- "parameters": [
2774
- {
2775
- "name": "options",
2776
- "type": "SyncOptions",
2777
- "optional": true
2778
- }
2779
- ],
2780
- "returnType": "Promise",
2781
- "isStatic": false,
2782
- "isPublic": true
2783
- },
2784
- "getComments": {
2785
- "name": "getComments",
2786
- "async": true,
2787
- "parameters": [],
2788
- "returnType": "Promise<Comment[]>",
2789
- "isStatic": false,
2790
- "isPublic": true
2791
- },
2792
- "addComment": {
2793
- "name": "addComment",
2794
- "async": true,
2795
- "parameters": [
2796
- {
2797
- "name": "body",
2798
- "type": "string",
2799
- "optional": false
2800
- }
2801
- ],
2802
- "returnType": "Promise<Comment>",
2803
- "isStatic": false,
2804
- "isPublic": true
2805
- },
2806
- "incorporateFeedback": {
2807
- "name": "incorporateFeedback",
2808
- "async": true,
2809
- "parameters": [
2810
- {
2811
- "name": "options",
2812
- "type": "IncorporateFeedbackOptions",
2813
- "optional": true
2814
- }
2815
- ],
2816
- "returnType": "Promise<IncorporateFeedbackResult>",
2817
- "isStatic": false,
2818
- "isPublic": true
2819
- },
2820
- "rollback": {
2821
- "name": "rollback",
2822
- "async": true,
2823
- "parameters": [],
2824
- "returnType": "Promise<object>",
2825
- "isStatic": false,
2826
- "isPublic": true
2827
- },
2828
- "needsReview": {
2829
- "name": "needsReview",
2830
- "async": true,
2831
- "parameters": [],
2832
- "returnType": "Promise<boolean>",
2833
- "isStatic": false,
2834
- "isPublic": true
2835
- },
2836
- "isBugReport": {
2837
- "name": "isBugReport",
2838
- "async": true,
2839
- "parameters": [],
2840
- "returnType": "Promise<boolean>",
2841
- "isStatic": false,
2842
- "isPublic": true
2843
- },
2844
- "isFeatureRequest": {
2845
- "name": "isFeatureRequest",
2846
- "async": true,
2847
- "parameters": [],
2848
- "returnType": "Promise<boolean>",
2849
- "isStatic": false,
2850
- "isPublic": true
2851
- },
2852
- "suggestLabels": {
2853
- "name": "suggestLabels",
2854
- "async": true,
2855
- "parameters": [],
2856
- "returnType": "Promise<string[]>",
2857
- "isStatic": false,
2858
- "isPublic": true
2859
- },
2860
- "close": {
2861
- "name": "close",
2862
- "async": true,
2863
- "parameters": [],
2864
- "returnType": "Promise<void>",
2865
- "isStatic": false,
2866
- "isPublic": true
2867
- },
2868
- "addLabels": {
2869
- "name": "addLabels",
2870
- "async": true,
2871
- "parameters": [
2872
- {
2873
- "name": "labels",
2874
- "type": "string[]",
2875
- "optional": false
2876
- }
2877
- ],
2878
- "returnType": "Promise<void>",
2879
- "isStatic": false,
2880
- "isPublic": true
2881
- },
2882
- "removeLabel": {
2883
- "name": "removeLabel",
2884
- "async": true,
2885
- "parameters": [
2886
- {
2887
- "name": "label",
2888
- "type": "string",
2889
- "optional": false
2890
- }
2891
- ],
2892
- "returnType": "Promise<void>",
2893
- "isStatic": false,
2894
- "isPublic": true
2895
- },
2896
- "assign": {
2897
- "name": "assign",
2898
- "async": true,
2899
- "parameters": [
2900
- {
2901
- "name": "assignees",
2902
- "type": "string[]",
2903
- "optional": false
2904
- }
2905
- ],
2906
- "returnType": "Promise<void>",
2907
- "isStatic": false,
2908
- "isPublic": true
2909
- },
2910
- "getUrl": {
2911
- "name": "getUrl",
2912
- "async": false,
2913
- "parameters": [],
2914
- "returnType": "string",
2915
- "isStatic": false,
2916
- "isPublic": true
2917
- }
2918
- },
2919
- "decoratorConfig": {
2920
- "tableStrategy": "sti",
2921
- "api": {
2922
- "include": [
2923
- "list",
2924
- "get",
2925
- "create",
2926
- "update"
2927
- ]
2928
- },
2929
- "mcp": {
2930
- "include": [
2931
- "list",
2932
- "get",
2933
- "sync",
2934
- "incorporateFeedback"
2935
- ]
2936
- },
2937
- "cli": {
2938
- "include": [
2939
- "list",
2940
- "get",
2941
- "sync",
2942
- "incorporateFeedback",
2943
- "rollback"
2944
- ],
2945
- "skipApiCheck": true
2397
+ "skipApiCheck": true
2946
2398
  },
2947
2399
  "tenantScoped": {
2948
2400
  "mode": "optional"
@@ -3044,623 +2496,210 @@
3044
2496
  },
3045
2497
  "author": {
3046
2498
  "type": "TEXT",
3047
- "notNull": false,
3048
- "default": ""
3049
- },
3050
- "labels": {
3051
- "type": "JSON",
3052
- "notNull": false,
3053
- "default": []
3054
- },
3055
- "assignees": {
3056
- "type": "JSON",
3057
- "notNull": false,
3058
- "default": []
3059
- },
3060
- "comments_count": {
3061
- "type": "INTEGER",
3062
- "notNull": false,
3063
- "default": 0
3064
- },
3065
- "last_synced_at": {
3066
- "type": "TIMESTAMP",
3067
- "notNull": false
3068
- },
3069
- "original_body": {
3070
- "type": "TEXT",
3071
- "notNull": false,
3072
- "default": ""
3073
- },
3074
- "synthesis_count": {
3075
- "type": "INTEGER",
3076
- "notNull": false,
3077
- "default": 0
3078
- },
3079
- "head_ref": {
3080
- "type": "TEXT",
3081
- "notNull": false,
3082
- "default": ""
3083
- },
3084
- "base_ref": {
3085
- "type": "TEXT",
3086
- "notNull": false,
3087
- "default": ""
3088
- },
3089
- "merged": {
3090
- "type": "BOOLEAN",
3091
- "notNull": false,
3092
- "default": false
3093
- },
3094
- "merged_at": {
3095
- "type": "TIMESTAMP",
3096
- "notNull": false
3097
- },
3098
- "mergeable": {
3099
- "type": "BOOLEAN",
3100
- "notNull": false,
3101
- "default": true
3102
- },
3103
- "draft": {
3104
- "type": "BOOLEAN",
3105
- "notNull": false,
3106
- "default": false
3107
- },
3108
- "additions": {
3109
- "type": "INTEGER",
3110
- "notNull": false,
3111
- "default": 0
3112
- },
3113
- "deletions": {
3114
- "type": "INTEGER",
3115
- "notNull": false,
3116
- "default": 0
3117
- },
3118
- "changed_files": {
3119
- "type": "INTEGER",
3120
- "notNull": false,
3121
- "default": 0
3122
- }
3123
- },
3124
- "indexes": [
3125
- {
3126
- "name": "issues_slug_context_meta_type_idx",
3127
- "columns": [
3128
- "tenant_id",
3129
- "slug",
3130
- "context",
3131
- "_meta_type"
3132
- ],
3133
- "unique": true
3134
- },
3135
- {
3136
- "name": "issues_meta_type_idx",
3137
- "columns": [
3138
- "_meta_type"
3139
- ]
3140
- },
3141
- {
3142
- "name": "issues_tenant_id_created_at_idx",
3143
- "columns": [
3144
- "tenant_id",
3145
- "created_at"
3146
- ]
3147
- },
3148
- {
3149
- "name": "issues_repository_id_idx",
3150
- "columns": [
3151
- "repository_id"
3152
- ]
3153
- }
3154
- ],
3155
- "version": "c3d5425b"
3156
- }
3157
- },
3158
- "@happyvertical/smrt-projects:Label": {
3159
- "name": "label",
3160
- "className": "Label",
3161
- "qualifiedName": "@happyvertical/smrt-projects:Label",
3162
- "collection": "labels",
3163
- "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/Label.ts",
3164
- "packageName": "@happyvertical/smrt-projects",
3165
- "fields": {
3166
- "repositoryId": {
3167
- "type": "foreignKey",
3168
- "required": false,
3169
- "related": "Repository"
3170
- },
3171
- "name": {
3172
- "type": "text",
3173
- "required": false,
3174
- "default": ""
3175
- },
3176
- "color": {
3177
- "type": "text",
3178
- "required": false,
3179
- "default": ""
3180
- },
3181
- "description": {
3182
- "type": "text",
3183
- "required": false,
3184
- "default": ""
3185
- }
3186
- },
3187
- "methods": {
3188
- "isTypeLabel": {
3189
- "name": "isTypeLabel",
3190
- "async": false,
3191
- "parameters": [],
3192
- "returnType": "boolean",
3193
- "isStatic": false,
3194
- "isPublic": true
3195
- },
3196
- "isPriorityLabel": {
3197
- "name": "isPriorityLabel",
3198
- "async": false,
3199
- "parameters": [],
3200
- "returnType": "boolean",
3201
- "isStatic": false,
3202
- "isPublic": true
3203
- },
3204
- "isStatusLabel": {
3205
- "name": "isStatusLabel",
3206
- "async": false,
3207
- "parameters": [],
3208
- "returnType": "boolean",
3209
- "isStatic": false,
3210
- "isPublic": true
3211
- },
3212
- "getCategory": {
3213
- "name": "getCategory",
3214
- "async": false,
3215
- "parameters": [],
3216
- "returnType": "'type' | 'priority' | 'status' | 'area' | 'other'",
3217
- "isStatic": false,
3218
- "isPublic": true
3219
- },
3220
- "getPriorityLevel": {
3221
- "name": "getPriorityLevel",
3222
- "async": false,
3223
- "parameters": [],
3224
- "returnType": "number | null",
3225
- "isStatic": false,
3226
- "isPublic": true
3227
- },
3228
- "getHexColor": {
3229
- "name": "getHexColor",
3230
- "async": false,
3231
- "parameters": [],
3232
- "returnType": "string",
3233
- "isStatic": false,
3234
- "isPublic": true
3235
- },
3236
- "createInRepository": {
3237
- "name": "createInRepository",
3238
- "async": true,
3239
- "parameters": [],
3240
- "returnType": "Promise<void>",
3241
- "isStatic": false,
3242
- "isPublic": true
3243
- },
3244
- "updateInRepository": {
3245
- "name": "updateInRepository",
3246
- "async": true,
3247
- "parameters": [],
3248
- "returnType": "Promise<void>",
3249
- "isStatic": false,
3250
- "isPublic": true
3251
- }
3252
- },
3253
- "decoratorConfig": {
3254
- "api": {
3255
- "include": [
3256
- "list",
3257
- "get",
3258
- "create",
3259
- "update",
3260
- "delete"
3261
- ]
3262
- },
3263
- "mcp": {
3264
- "include": [
3265
- "list",
3266
- "get",
3267
- "create"
3268
- ]
3269
- },
3270
- "cli": {
3271
- "include": [
3272
- "list",
3273
- "get",
3274
- "create",
3275
- "update",
3276
- "delete"
3277
- ]
3278
- }
3279
- },
3280
- "extends": "SmrtObject",
3281
- "exportName": "Label",
3282
- "collectionExportName": "LabelCollection",
3283
- "schema": {
3284
- "tableName": "labels",
3285
- "ddl": "CREATE TABLE IF NOT EXISTS \"labels\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"repository_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"color\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT ''\n);",
3286
- "columns": {
3287
- "id": {
3288
- "type": "UUID",
3289
- "primaryKey": true,
3290
- "referenceKind": "id",
3291
- "notNull": true
3292
- },
3293
- "slug": {
3294
- "type": "TEXT",
3295
- "notNull": true
3296
- },
3297
- "context": {
3298
- "type": "TEXT",
3299
- "notNull": true,
2499
+ "notNull": false,
3300
2500
  "default": ""
3301
2501
  },
3302
- "created_at": {
3303
- "type": "TIMESTAMP",
3304
- "notNull": true,
3305
- "default": "current_timestamp"
2502
+ "labels": {
2503
+ "type": "JSON",
2504
+ "notNull": false,
2505
+ "default": []
3306
2506
  },
3307
- "updated_at": {
3308
- "type": "TIMESTAMP",
3309
- "notNull": true,
3310
- "default": "current_timestamp"
2507
+ "assignees": {
2508
+ "type": "JSON",
2509
+ "notNull": false,
2510
+ "default": []
3311
2511
  },
3312
- "repository_id": {
3313
- "type": "UUID",
3314
- "referenceKind": "foreignKey",
2512
+ "comments_count": {
2513
+ "type": "INTEGER",
3315
2514
  "notNull": false,
3316
- "unique": false,
3317
- "foreignKey": {
3318
- "table": "repositories",
3319
- "column": "id",
3320
- "onDelete": "NO ACTION",
3321
- "onUpdate": "CASCADE"
3322
- }
2515
+ "default": 0
3323
2516
  },
3324
- "name": {
2517
+ "last_synced_at": {
2518
+ "type": "TIMESTAMP",
2519
+ "notNull": false
2520
+ },
2521
+ "original_body": {
3325
2522
  "type": "TEXT",
3326
2523
  "notNull": false,
3327
- "unique": false,
3328
2524
  "default": ""
3329
2525
  },
3330
- "color": {
2526
+ "synthesis_count": {
2527
+ "type": "INTEGER",
2528
+ "notNull": false,
2529
+ "default": 0
2530
+ },
2531
+ "head_ref": {
3331
2532
  "type": "TEXT",
3332
2533
  "notNull": false,
3333
- "unique": false,
3334
2534
  "default": ""
3335
2535
  },
3336
- "description": {
2536
+ "base_ref": {
3337
2537
  "type": "TEXT",
3338
2538
  "notNull": false,
3339
- "unique": false,
3340
2539
  "default": ""
2540
+ },
2541
+ "merged": {
2542
+ "type": "BOOLEAN",
2543
+ "notNull": false,
2544
+ "default": false
2545
+ },
2546
+ "merged_at": {
2547
+ "type": "TIMESTAMP",
2548
+ "notNull": false
2549
+ },
2550
+ "mergeable": {
2551
+ "type": "BOOLEAN",
2552
+ "notNull": false,
2553
+ "default": true
2554
+ },
2555
+ "draft": {
2556
+ "type": "BOOLEAN",
2557
+ "notNull": false,
2558
+ "default": false
2559
+ },
2560
+ "additions": {
2561
+ "type": "INTEGER",
2562
+ "notNull": false,
2563
+ "default": 0
2564
+ },
2565
+ "deletions": {
2566
+ "type": "INTEGER",
2567
+ "notNull": false,
2568
+ "default": 0
2569
+ },
2570
+ "changed_files": {
2571
+ "type": "INTEGER",
2572
+ "notNull": false,
2573
+ "default": 0
3341
2574
  }
3342
2575
  },
3343
2576
  "indexes": [
3344
2577
  {
3345
- "name": "labels_slug_context_idx",
2578
+ "name": "issues_slug_context_meta_type_idx",
3346
2579
  "columns": [
2580
+ "tenant_id",
3347
2581
  "slug",
3348
- "context"
2582
+ "context",
2583
+ "_meta_type"
3349
2584
  ],
3350
2585
  "unique": true
3351
2586
  },
3352
2587
  {
3353
- "name": "labels_created_at_idx",
2588
+ "name": "issues_meta_type_idx",
2589
+ "columns": [
2590
+ "_meta_type"
2591
+ ]
2592
+ },
2593
+ {
2594
+ "name": "issues_tenant_id_created_at_idx",
3354
2595
  "columns": [
2596
+ "tenant_id",
3355
2597
  "created_at"
3356
2598
  ]
3357
2599
  },
3358
2600
  {
3359
- "name": "labels_repository_id_idx",
2601
+ "name": "issues_repository_id_idx",
3360
2602
  "columns": [
3361
2603
  "repository_id"
3362
2604
  ]
3363
2605
  }
3364
2606
  ],
3365
- "version": "d1e8d236"
2607
+ "version": "c3d5425b"
3366
2608
  }
3367
2609
  },
3368
- "@happyvertical/smrt-projects:Project": {
3369
- "name": "project",
3370
- "className": "Project",
3371
- "qualifiedName": "@happyvertical/smrt-projects:Project",
3372
- "collection": "projects",
3373
- "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/Project.ts",
2610
+ "@happyvertical/smrt-projects:Label": {
2611
+ "name": "label",
2612
+ "className": "Label",
2613
+ "qualifiedName": "@happyvertical/smrt-projects:Label",
2614
+ "collection": "labels",
2615
+ "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/Label.ts",
3374
2616
  "packageName": "@happyvertical/smrt-projects",
3375
2617
  "fields": {
3376
- "tenantId": {
3377
- "type": "text",
3378
- "required": false,
3379
- "_meta": {
3380
- "sqlType": "UUID",
3381
- "nullable": true,
3382
- "__tenancy": {
3383
- "isTenantIdField": true,
3384
- "autoFilter": true,
3385
- "required": false,
3386
- "autoPopulate": true,
3387
- "nullable": true,
3388
- "mode": "optional",
3389
- "field": "tenantId",
3390
- "allowSuperAdminBypass": false
3391
- }
3392
- }
3393
- },
3394
- "projectId": {
3395
- "type": "text",
3396
- "required": false,
3397
- "default": ""
3398
- },
3399
- "projectNumber": {
3400
- "type": "integer",
3401
- "required": false,
3402
- "default": 0
3403
- },
3404
- "title": {
3405
- "type": "text",
3406
- "required": false,
3407
- "default": ""
3408
- },
3409
- "description": {
3410
- "type": "text",
3411
- "required": false,
3412
- "default": ""
3413
- },
3414
- "owner": {
3415
- "type": "text",
3416
- "required": false,
3417
- "default": ""
3418
- },
3419
- "url": {
3420
- "type": "text",
3421
- "required": false,
3422
- "default": ""
3423
- },
3424
- "providerType": {
3425
- "type": "text",
3426
- "required": false,
3427
- "default": "github"
3428
- },
3429
- "tokenConfigKey": {
3430
- "type": "text",
3431
- "required": false,
3432
- "default": "GITHUB_TOKEN"
3433
- },
3434
- "statuses": {
3435
- "type": "json",
3436
- "required": false,
3437
- "default": []
3438
- },
3439
- "fields": {
3440
- "type": "json",
3441
- "required": false,
3442
- "default": []
3443
- },
3444
- "statusFieldId": {
3445
- "type": "text",
3446
- "required": false,
3447
- "default": ""
3448
- },
3449
- "statusOptions": {
3450
- "type": "json",
2618
+ "repositoryId": {
2619
+ "type": "foreignKey",
3451
2620
  "required": false,
3452
- "default": {}
3453
- },
3454
- "lastSyncedAt": {
3455
- "type": "datetime",
3456
- "required": false
3457
- }
3458
- },
3459
- "methods": {
3460
- "getClient": {
3461
- "name": "getClient",
3462
- "async": true,
3463
- "parameters": [],
3464
- "returnType": "Promise<IProject>",
3465
- "isStatic": false,
3466
- "isPublic": true
3467
- },
3468
- "clearClient": {
3469
- "name": "clearClient",
3470
- "async": false,
3471
- "parameters": [],
3472
- "returnType": "void",
3473
- "isStatic": false,
3474
- "isPublic": true
3475
- },
3476
- "sync": {
3477
- "name": "sync",
3478
- "async": true,
3479
- "parameters": [
3480
- {
3481
- "name": "options",
3482
- "type": "SyncOptions",
3483
- "optional": true
3484
- }
3485
- ],
3486
- "returnType": "Promise",
3487
- "isStatic": false,
3488
- "isPublic": true
3489
- },
3490
- "addItem": {
3491
- "name": "addItem",
3492
- "async": true,
3493
- "parameters": [
3494
- {
3495
- "name": "item",
3496
- "type": "Issue | PullRequest",
3497
- "optional": false
3498
- }
3499
- ],
3500
- "returnType": "Promise<ProjectItem>",
3501
- "isStatic": false,
3502
- "isPublic": true
2621
+ "related": "Repository"
3503
2622
  },
3504
- "removeItem": {
3505
- "name": "removeItem",
3506
- "async": true,
3507
- "parameters": [
3508
- {
3509
- "name": "itemId",
3510
- "type": "string",
3511
- "optional": false
3512
- }
3513
- ],
3514
- "returnType": "Promise<void>",
3515
- "isStatic": false,
3516
- "isPublic": true
2623
+ "name": {
2624
+ "type": "text",
2625
+ "required": false,
2626
+ "default": ""
3517
2627
  },
3518
- "getItem": {
3519
- "name": "getItem",
3520
- "async": true,
3521
- "parameters": [
3522
- {
3523
- "name": "itemId",
3524
- "type": "string",
3525
- "optional": false
3526
- }
3527
- ],
3528
- "returnType": "Promise<ProjectItem | null>",
3529
- "isStatic": false,
3530
- "isPublic": true
2628
+ "color": {
2629
+ "type": "text",
2630
+ "required": false,
2631
+ "default": ""
3531
2632
  },
3532
- "listItems": {
3533
- "name": "listItems",
3534
- "async": true,
3535
- "parameters": [
3536
- {
3537
- "name": "filters",
3538
- "type": "ItemFilters",
3539
- "optional": true
3540
- }
3541
- ],
3542
- "returnType": "Promise<ProjectItem[]>",
2633
+ "description": {
2634
+ "type": "text",
2635
+ "required": false,
2636
+ "default": ""
2637
+ }
2638
+ },
2639
+ "methods": {
2640
+ "isTypeLabel": {
2641
+ "name": "isTypeLabel",
2642
+ "async": false,
2643
+ "parameters": [],
2644
+ "returnType": "boolean",
3543
2645
  "isStatic": false,
3544
2646
  "isPublic": true
3545
2647
  },
3546
- "updateItemStatus": {
3547
- "name": "updateItemStatus",
3548
- "async": true,
3549
- "parameters": [
3550
- {
3551
- "name": "itemId",
3552
- "type": "string",
3553
- "optional": false
3554
- },
3555
- {
3556
- "name": "status",
3557
- "type": "string",
3558
- "optional": false
3559
- }
3560
- ],
3561
- "returnType": "Promise<void>",
2648
+ "isPriorityLabel": {
2649
+ "name": "isPriorityLabel",
2650
+ "async": false,
2651
+ "parameters": [],
2652
+ "returnType": "boolean",
3562
2653
  "isStatic": false,
3563
2654
  "isPublic": true
3564
2655
  },
3565
- "updateItemField": {
3566
- "name": "updateItemField",
3567
- "async": true,
3568
- "parameters": [
3569
- {
3570
- "name": "itemId",
3571
- "type": "string",
3572
- "optional": false
3573
- },
3574
- {
3575
- "name": "fieldId",
3576
- "type": "string",
3577
- "optional": false
3578
- },
3579
- {
3580
- "name": "value",
3581
- "type": "any",
3582
- "optional": false
3583
- }
3584
- ],
3585
- "returnType": "Promise<void>",
2656
+ "isStatusLabel": {
2657
+ "name": "isStatusLabel",
2658
+ "async": false,
2659
+ "parameters": [],
2660
+ "returnType": "boolean",
3586
2661
  "isStatic": false,
3587
2662
  "isPublic": true
3588
2663
  },
3589
- "getStatuses": {
3590
- "name": "getStatuses",
3591
- "async": true,
2664
+ "getCategory": {
2665
+ "name": "getCategory",
2666
+ "async": false,
3592
2667
  "parameters": [],
3593
- "returnType": "Promise<ProjectStatus[]>",
2668
+ "returnType": "'type' | 'priority' | 'status' | 'area' | 'other'",
3594
2669
  "isStatic": false,
3595
2670
  "isPublic": true
3596
2671
  },
3597
- "getFields": {
3598
- "name": "getFields",
3599
- "async": true,
2672
+ "getPriorityLevel": {
2673
+ "name": "getPriorityLevel",
2674
+ "async": false,
3600
2675
  "parameters": [],
3601
- "returnType": "Promise<ProjectField[]>",
2676
+ "returnType": "number | null",
3602
2677
  "isStatic": false,
3603
2678
  "isPublic": true
3604
2679
  },
3605
- "getItemsByStatus": {
3606
- "name": "getItemsByStatus",
3607
- "async": true,
3608
- "parameters": [
3609
- {
3610
- "name": "status",
3611
- "type": "string",
3612
- "optional": false
3613
- }
3614
- ],
3615
- "returnType": "Promise<ProjectItem[]>",
2680
+ "getHexColor": {
2681
+ "name": "getHexColor",
2682
+ "async": false,
2683
+ "parameters": [],
2684
+ "returnType": "string",
3616
2685
  "isStatic": false,
3617
2686
  "isPublic": true
3618
2687
  },
3619
- "moveItem": {
3620
- "name": "moveItem",
2688
+ "createInRepository": {
2689
+ "name": "createInRepository",
3621
2690
  "async": true,
3622
- "parameters": [
3623
- {
3624
- "name": "item",
3625
- "type": "Issue | PullRequest",
3626
- "optional": false
3627
- },
3628
- {
3629
- "name": "status",
3630
- "type": "string",
3631
- "optional": false
3632
- }
3633
- ],
2691
+ "parameters": [],
3634
2692
  "returnType": "Promise<void>",
3635
2693
  "isStatic": false,
3636
2694
  "isPublic": true
3637
2695
  },
3638
- "analyzeHealth": {
3639
- "name": "analyzeHealth",
2696
+ "updateInRepository": {
2697
+ "name": "updateInRepository",
3640
2698
  "async": true,
3641
2699
  "parameters": [],
3642
- "returnType": "Promise<string>",
2700
+ "returnType": "Promise<void>",
3643
2701
  "isStatic": false,
3644
2702
  "isPublic": true
3645
- },
3646
- "getByTitle": {
3647
- "name": "getByTitle",
3648
- "async": true,
3649
- "parameters": [
3650
- {
3651
- "name": "title",
3652
- "type": "string",
3653
- "optional": false
3654
- },
3655
- {
3656
- "name": "options",
3657
- "type": "SmrtObjectOptions",
3658
- "optional": true
3659
- }
3660
- ],
3661
- "returnType": "Promise<Project | null>",
3662
- "isStatic": true,
3663
- "isPublic": true
3664
2703
  }
3665
2704
  },
3666
2705
  "decoratorConfig": {
@@ -3669,44 +2708,33 @@
3669
2708
  "list",
3670
2709
  "get",
3671
2710
  "create",
3672
- "update"
2711
+ "update",
2712
+ "delete"
3673
2713
  ]
3674
2714
  },
3675
2715
  "mcp": {
3676
2716
  "include": [
3677
2717
  "list",
3678
2718
  "get",
3679
- "sync",
3680
- "addItem",
3681
- "updateItemStatus"
2719
+ "create"
3682
2720
  ]
3683
2721
  },
3684
2722
  "cli": {
3685
2723
  "include": [
3686
2724
  "list",
3687
2725
  "get",
3688
- "sync",
3689
- "addItem",
3690
- "updateItemStatus",
3691
- "listItems"
3692
- ],
3693
- "skipApiCheck": true
3694
- },
3695
- "tenantScoped": {
3696
- "mode": "optional"
3697
- },
3698
- "conflictColumns": [
3699
- "tenant_id",
3700
- "slug",
3701
- "context"
3702
- ]
2726
+ "create",
2727
+ "update",
2728
+ "delete"
2729
+ ]
2730
+ }
3703
2731
  },
3704
2732
  "extends": "SmrtObject",
3705
- "exportName": "Project",
3706
- "collectionExportName": "ProjectCollection",
2733
+ "exportName": "Label",
2734
+ "collectionExportName": "LabelCollection",
3707
2735
  "schema": {
3708
- "tableName": "projects",
3709
- "ddl": "CREATE TABLE IF NOT EXISTS \"projects\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"project_id\" TEXT DEFAULT '',\n \"project_number\" INTEGER DEFAULT 0,\n \"title\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"owner\" TEXT DEFAULT '',\n \"url\" TEXT DEFAULT '',\n \"provider_type\" TEXT DEFAULT 'github',\n \"token_config_key\" TEXT DEFAULT 'GITHUB_TOKEN',\n \"statuses\" JSON DEFAULT '[]',\n \"fields\" JSON DEFAULT '[]',\n \"status_field_id\" TEXT DEFAULT '',\n \"status_options\" JSON DEFAULT '{}',\n \"last_synced_at\" TIMESTAMP\n);",
2736
+ "tableName": "labels",
2737
+ "ddl": "CREATE TABLE IF NOT EXISTS \"labels\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"repository_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"color\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT ''\n);",
3710
2738
  "columns": {
3711
2739
  "id": {
3712
2740
  "type": "UUID",
@@ -3733,131 +2761,83 @@
3733
2761
  "notNull": true,
3734
2762
  "default": "current_timestamp"
3735
2763
  },
3736
- "tenant_id": {
2764
+ "repository_id": {
3737
2765
  "type": "UUID",
3738
- "referenceKind": "tenantId",
3739
- "notNull": false,
3740
- "unique": false
3741
- },
3742
- "project_id": {
3743
- "type": "TEXT",
3744
- "notNull": false,
3745
- "unique": false,
3746
- "default": ""
3747
- },
3748
- "project_number": {
3749
- "type": "INTEGER",
3750
- "notNull": false,
3751
- "unique": false,
3752
- "default": 0
3753
- },
3754
- "title": {
3755
- "type": "TEXT",
3756
- "notNull": false,
3757
- "unique": false,
3758
- "default": ""
3759
- },
3760
- "description": {
3761
- "type": "TEXT",
3762
- "notNull": false,
3763
- "unique": false,
3764
- "default": ""
3765
- },
3766
- "owner": {
3767
- "type": "TEXT",
3768
- "notNull": false,
3769
- "unique": false,
3770
- "default": ""
3771
- },
3772
- "url": {
3773
- "type": "TEXT",
3774
- "notNull": false,
3775
- "unique": false,
3776
- "default": ""
3777
- },
3778
- "provider_type": {
3779
- "type": "TEXT",
3780
- "notNull": false,
3781
- "unique": false,
3782
- "default": "github"
3783
- },
3784
- "token_config_key": {
3785
- "type": "TEXT",
3786
- "notNull": false,
3787
- "unique": false,
3788
- "default": "GITHUB_TOKEN"
3789
- },
3790
- "statuses": {
3791
- "type": "JSON",
2766
+ "referenceKind": "foreignKey",
3792
2767
  "notNull": false,
3793
2768
  "unique": false,
3794
- "default": []
2769
+ "foreignKey": {
2770
+ "table": "repositories",
2771
+ "column": "id",
2772
+ "onDelete": "NO ACTION",
2773
+ "onUpdate": "CASCADE"
2774
+ }
3795
2775
  },
3796
- "fields": {
3797
- "type": "JSON",
2776
+ "name": {
2777
+ "type": "TEXT",
3798
2778
  "notNull": false,
3799
2779
  "unique": false,
3800
- "default": []
2780
+ "default": ""
3801
2781
  },
3802
- "status_field_id": {
2782
+ "color": {
3803
2783
  "type": "TEXT",
3804
2784
  "notNull": false,
3805
2785
  "unique": false,
3806
2786
  "default": ""
3807
2787
  },
3808
- "status_options": {
3809
- "type": "JSON",
2788
+ "description": {
2789
+ "type": "TEXT",
3810
2790
  "notNull": false,
3811
2791
  "unique": false,
3812
- "default": {}
3813
- },
3814
- "last_synced_at": {
3815
- "type": "TIMESTAMP",
3816
- "notNull": false,
3817
- "unique": false
2792
+ "default": ""
3818
2793
  }
3819
2794
  },
3820
2795
  "indexes": [
3821
2796
  {
3822
- "name": "projects_slug_context_idx",
2797
+ "name": "labels_slug_context_idx",
3823
2798
  "columns": [
3824
- "tenant_id",
3825
2799
  "slug",
3826
2800
  "context"
3827
2801
  ],
3828
2802
  "unique": true
3829
2803
  },
3830
2804
  {
3831
- "name": "projects_tenant_id_created_at_idx",
2805
+ "name": "labels_created_at_idx",
3832
2806
  "columns": [
3833
- "tenant_id",
3834
2807
  "created_at"
3835
2808
  ]
2809
+ },
2810
+ {
2811
+ "name": "labels_repository_id_idx",
2812
+ "columns": [
2813
+ "repository_id"
2814
+ ]
3836
2815
  }
3837
2816
  ],
3838
- "version": "2e8c344a"
2817
+ "version": "d1e8d236"
3839
2818
  }
3840
2819
  },
3841
- "@happyvertical/smrt-projects:ProjectIntegration": {
3842
- "name": "projectintegration",
3843
- "className": "ProjectIntegration",
3844
- "qualifiedName": "@happyvertical/smrt-projects:ProjectIntegration",
3845
- "collection": "projectintegrations",
3846
- "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/ProjectIntegration.ts",
2820
+ "@happyvertical/smrt-projects:Project": {
2821
+ "name": "project",
2822
+ "className": "Project",
2823
+ "qualifiedName": "@happyvertical/smrt-projects:Project",
2824
+ "collection": "projects",
2825
+ "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/Project.ts",
3847
2826
  "packageName": "@happyvertical/smrt-projects",
3848
2827
  "fields": {
3849
2828
  "tenantId": {
3850
2829
  "type": "text",
3851
- "required": true,
2830
+ "required": false,
3852
2831
  "_meta": {
3853
2832
  "sqlType": "UUID",
2833
+ "nullable": true,
3854
2834
  "__tenancy": {
3855
2835
  "isTenantIdField": true,
3856
2836
  "autoFilter": true,
3857
- "required": true,
2837
+ "required": false,
3858
2838
  "autoPopulate": true,
3859
- "nullable": false,
3860
- "mode": "required",
2839
+ "nullable": true,
2840
+ "mode": "optional",
3861
2841
  "field": "tenantId",
3862
2842
  "allowSuperAdminBypass": false
3863
2843
  }
@@ -3868,95 +2848,317 @@
3868
2848
  "required": false,
3869
2849
  "default": ""
3870
2850
  },
3871
- "name": {
2851
+ "projectNumber": {
2852
+ "type": "integer",
2853
+ "required": false,
2854
+ "default": 0
2855
+ },
2856
+ "title": {
3872
2857
  "type": "text",
3873
2858
  "required": false,
3874
2859
  "default": ""
3875
2860
  },
3876
- "credentialHash": {
2861
+ "description": {
3877
2862
  "type": "text",
3878
2863
  "required": false,
3879
- "default": "",
3880
- "_meta": {
3881
- "sensitive": true
3882
- },
3883
- "sensitive": true
2864
+ "default": ""
3884
2865
  },
3885
- "capabilities": {
2866
+ "owner": {
2867
+ "type": "text",
2868
+ "required": false,
2869
+ "default": ""
2870
+ },
2871
+ "url": {
2872
+ "type": "text",
2873
+ "required": false,
2874
+ "default": ""
2875
+ },
2876
+ "providerType": {
2877
+ "type": "text",
2878
+ "required": false,
2879
+ "default": "github"
2880
+ },
2881
+ "tokenConfigKey": {
2882
+ "type": "text",
2883
+ "required": false,
2884
+ "default": "GITHUB_TOKEN"
2885
+ },
2886
+ "statuses": {
2887
+ "type": "json",
2888
+ "required": false,
2889
+ "default": []
2890
+ },
2891
+ "fields": {
3886
2892
  "type": "json",
3887
2893
  "required": false,
3888
2894
  "default": []
3889
2895
  },
3890
- "status": {
3891
- "type": "text",
3892
- "required": false,
3893
- "default": "active"
2896
+ "statusFieldId": {
2897
+ "type": "text",
2898
+ "required": false,
2899
+ "default": ""
2900
+ },
2901
+ "statusOptions": {
2902
+ "type": "json",
2903
+ "required": false,
2904
+ "default": {}
2905
+ },
2906
+ "lastSyncedAt": {
2907
+ "type": "datetime",
2908
+ "required": false
2909
+ }
2910
+ },
2911
+ "methods": {
2912
+ "getClient": {
2913
+ "name": "getClient",
2914
+ "async": true,
2915
+ "parameters": [],
2916
+ "returnType": "Promise<IProject>",
2917
+ "isStatic": false,
2918
+ "isPublic": true
2919
+ },
2920
+ "clearClient": {
2921
+ "name": "clearClient",
2922
+ "async": false,
2923
+ "parameters": [],
2924
+ "returnType": "void",
2925
+ "isStatic": false,
2926
+ "isPublic": true
2927
+ },
2928
+ "sync": {
2929
+ "name": "sync",
2930
+ "async": true,
2931
+ "parameters": [
2932
+ {
2933
+ "name": "options",
2934
+ "type": "SyncOptions",
2935
+ "optional": true
2936
+ }
2937
+ ],
2938
+ "returnType": "Promise",
2939
+ "isStatic": false,
2940
+ "isPublic": true
2941
+ },
2942
+ "addItem": {
2943
+ "name": "addItem",
2944
+ "async": true,
2945
+ "parameters": [
2946
+ {
2947
+ "name": "item",
2948
+ "type": "Issue | PullRequest",
2949
+ "optional": false
2950
+ }
2951
+ ],
2952
+ "returnType": "Promise<ProjectItem>",
2953
+ "isStatic": false,
2954
+ "isPublic": true
2955
+ },
2956
+ "removeItem": {
2957
+ "name": "removeItem",
2958
+ "async": true,
2959
+ "parameters": [
2960
+ {
2961
+ "name": "itemId",
2962
+ "type": "string",
2963
+ "optional": false
2964
+ }
2965
+ ],
2966
+ "returnType": "Promise<void>",
2967
+ "isStatic": false,
2968
+ "isPublic": true
2969
+ },
2970
+ "getItem": {
2971
+ "name": "getItem",
2972
+ "async": true,
2973
+ "parameters": [
2974
+ {
2975
+ "name": "itemId",
2976
+ "type": "string",
2977
+ "optional": false
2978
+ }
2979
+ ],
2980
+ "returnType": "Promise<ProjectItem | null>",
2981
+ "isStatic": false,
2982
+ "isPublic": true
2983
+ },
2984
+ "listItems": {
2985
+ "name": "listItems",
2986
+ "async": true,
2987
+ "parameters": [
2988
+ {
2989
+ "name": "filters",
2990
+ "type": "ItemFilters",
2991
+ "optional": true
2992
+ }
2993
+ ],
2994
+ "returnType": "Promise<ProjectItem[]>",
2995
+ "isStatic": false,
2996
+ "isPublic": true
2997
+ },
2998
+ "updateItemStatus": {
2999
+ "name": "updateItemStatus",
3000
+ "async": true,
3001
+ "parameters": [
3002
+ {
3003
+ "name": "itemId",
3004
+ "type": "string",
3005
+ "optional": false
3006
+ },
3007
+ {
3008
+ "name": "status",
3009
+ "type": "string",
3010
+ "optional": false
3011
+ }
3012
+ ],
3013
+ "returnType": "Promise<void>",
3014
+ "isStatic": false,
3015
+ "isPublic": true
3016
+ },
3017
+ "updateItemField": {
3018
+ "name": "updateItemField",
3019
+ "async": true,
3020
+ "parameters": [
3021
+ {
3022
+ "name": "itemId",
3023
+ "type": "string",
3024
+ "optional": false
3025
+ },
3026
+ {
3027
+ "name": "fieldId",
3028
+ "type": "string",
3029
+ "optional": false
3030
+ },
3031
+ {
3032
+ "name": "value",
3033
+ "type": "any",
3034
+ "optional": false
3035
+ }
3036
+ ],
3037
+ "returnType": "Promise<void>",
3038
+ "isStatic": false,
3039
+ "isPublic": true
3040
+ },
3041
+ "getStatuses": {
3042
+ "name": "getStatuses",
3043
+ "async": true,
3044
+ "parameters": [],
3045
+ "returnType": "Promise<ProjectStatus[]>",
3046
+ "isStatic": false,
3047
+ "isPublic": true
3048
+ },
3049
+ "getFields": {
3050
+ "name": "getFields",
3051
+ "async": true,
3052
+ "parameters": [],
3053
+ "returnType": "Promise<ProjectField[]>",
3054
+ "isStatic": false,
3055
+ "isPublic": true
3894
3056
  },
3895
- "revokedAt": {
3896
- "type": "datetime",
3897
- "required": false
3898
- }
3899
- },
3900
- "methods": {
3901
- "hasCapability": {
3902
- "name": "hasCapability",
3903
- "async": false,
3057
+ "getItemsByStatus": {
3058
+ "name": "getItemsByStatus",
3059
+ "async": true,
3904
3060
  "parameters": [
3905
3061
  {
3906
- "name": "capability",
3907
- "type": "ProjectIntegrationCapability",
3062
+ "name": "status",
3063
+ "type": "string",
3908
3064
  "optional": false
3909
3065
  }
3910
3066
  ],
3911
- "returnType": "boolean",
3067
+ "returnType": "Promise<ProjectItem[]>",
3912
3068
  "isStatic": false,
3913
3069
  "isPublic": true
3914
3070
  },
3915
- "isActive": {
3916
- "name": "isActive",
3917
- "async": false,
3071
+ "moveItem": {
3072
+ "name": "moveItem",
3073
+ "async": true,
3074
+ "parameters": [
3075
+ {
3076
+ "name": "item",
3077
+ "type": "Issue | PullRequest",
3078
+ "optional": false
3079
+ },
3080
+ {
3081
+ "name": "status",
3082
+ "type": "string",
3083
+ "optional": false
3084
+ }
3085
+ ],
3086
+ "returnType": "Promise<void>",
3087
+ "isStatic": false,
3088
+ "isPublic": true
3089
+ },
3090
+ "analyzeHealth": {
3091
+ "name": "analyzeHealth",
3092
+ "async": true,
3918
3093
  "parameters": [],
3919
- "returnType": "boolean",
3094
+ "returnType": "Promise<string>",
3920
3095
  "isStatic": false,
3921
3096
  "isPublic": true
3097
+ },
3098
+ "getByTitle": {
3099
+ "name": "getByTitle",
3100
+ "async": true,
3101
+ "parameters": [
3102
+ {
3103
+ "name": "title",
3104
+ "type": "string",
3105
+ "optional": false
3106
+ },
3107
+ {
3108
+ "name": "options",
3109
+ "type": "SmrtObjectOptions",
3110
+ "optional": true
3111
+ }
3112
+ ],
3113
+ "returnType": "Promise<Project | null>",
3114
+ "isStatic": true,
3115
+ "isPublic": true
3922
3116
  }
3923
3117
  },
3924
3118
  "decoratorConfig": {
3925
- "tableName": "project_integrations",
3926
- "conflictColumns": [
3927
- "tenant_id",
3928
- "project_id",
3929
- "name"
3930
- ],
3931
3119
  "api": {
3932
3120
  "include": [
3933
3121
  "list",
3934
- "get"
3122
+ "get",
3123
+ "create",
3124
+ "update"
3935
3125
  ]
3936
3126
  },
3937
3127
  "mcp": {
3938
3128
  "include": [
3939
3129
  "list",
3940
- "get"
3130
+ "get",
3131
+ "sync",
3132
+ "addItem",
3133
+ "updateItemStatus"
3941
3134
  ]
3942
3135
  },
3943
3136
  "cli": {
3944
3137
  "include": [
3945
3138
  "list",
3946
- "get"
3947
- ]
3139
+ "get",
3140
+ "sync",
3141
+ "addItem",
3142
+ "updateItemStatus",
3143
+ "listItems"
3144
+ ],
3145
+ "skipApiCheck": true
3948
3146
  },
3949
3147
  "tenantScoped": {
3950
- "mode": "required"
3951
- }
3148
+ "mode": "optional"
3149
+ },
3150
+ "conflictColumns": [
3151
+ "tenant_id",
3152
+ "slug",
3153
+ "context"
3154
+ ]
3952
3155
  },
3953
3156
  "extends": "SmrtObject",
3954
- "exportName": "ProjectIntegration",
3955
- "collectionExportName": "ProjectIntegrationCollection",
3956
- "validationRules": [],
3157
+ "exportName": "Project",
3158
+ "collectionExportName": "ProjectCollection",
3957
3159
  "schema": {
3958
- "tableName": "project_integrations",
3959
- "ddl": "CREATE TABLE IF NOT EXISTS \"project_integrations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"project_id\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"credential_hash\" TEXT DEFAULT '',\n \"capabilities\" JSON DEFAULT '[]',\n \"status\" TEXT DEFAULT 'active',\n \"revoked_at\" TIMESTAMP\n);",
3160
+ "tableName": "projects",
3161
+ "ddl": "CREATE TABLE IF NOT EXISTS \"projects\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"project_id\" TEXT DEFAULT '',\n \"project_number\" INTEGER DEFAULT 0,\n \"title\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"owner\" TEXT DEFAULT '',\n \"url\" TEXT DEFAULT '',\n \"provider_type\" TEXT DEFAULT 'github',\n \"token_config_key\" TEXT DEFAULT 'GITHUB_TOKEN',\n \"statuses\" JSON DEFAULT '[]',\n \"fields\" JSON DEFAULT '[]',\n \"status_field_id\" TEXT DEFAULT '',\n \"status_options\" JSON DEFAULT '{}',\n \"last_synced_at\" TIMESTAMP\n);",
3960
3162
  "columns": {
3961
3163
  "id": {
3962
3164
  "type": "UUID",
@@ -3986,7 +3188,7 @@
3986
3188
  "tenant_id": {
3987
3189
  "type": "UUID",
3988
3190
  "referenceKind": "tenantId",
3989
- "notNull": true,
3191
+ "notNull": false,
3990
3192
  "unique": false
3991
3193
  },
3992
3194
  "project_id": {
@@ -3995,194 +3197,81 @@
3995
3197
  "unique": false,
3996
3198
  "default": ""
3997
3199
  },
3998
- "name": {
3999
- "type": "TEXT",
3200
+ "project_number": {
3201
+ "type": "INTEGER",
4000
3202
  "notNull": false,
4001
3203
  "unique": false,
4002
- "default": ""
3204
+ "default": 0
4003
3205
  },
4004
- "credential_hash": {
3206
+ "title": {
4005
3207
  "type": "TEXT",
4006
3208
  "notNull": false,
4007
3209
  "unique": false,
4008
3210
  "default": ""
4009
3211
  },
4010
- "capabilities": {
4011
- "type": "JSON",
3212
+ "description": {
3213
+ "type": "TEXT",
4012
3214
  "notNull": false,
4013
3215
  "unique": false,
4014
- "default": []
3216
+ "default": ""
4015
3217
  },
4016
- "status": {
3218
+ "owner": {
4017
3219
  "type": "TEXT",
4018
3220
  "notNull": false,
4019
3221
  "unique": false,
4020
- "default": "active"
4021
- },
4022
- "revoked_at": {
4023
- "type": "TIMESTAMP",
4024
- "notNull": false,
4025
- "unique": false
4026
- }
4027
- },
4028
- "indexes": [
4029
- {
4030
- "name": "project_integrations_tenant_id_project_id_idx",
4031
- "columns": [
4032
- "tenant_id",
4033
- "project_id",
4034
- "name"
4035
- ],
4036
- "unique": true
4037
- },
4038
- {
4039
- "name": "project_integrations_slug_context_idx",
4040
- "columns": [
4041
- "slug",
4042
- "context"
4043
- ]
4044
- },
4045
- {
4046
- "name": "project_integrations_tenant_id_created_at_idx",
4047
- "columns": [
4048
- "tenant_id",
4049
- "created_at"
4050
- ]
4051
- }
4052
- ],
4053
- "version": "bfbaa783"
4054
- }
4055
- },
4056
- "@happyvertical/smrt-projects:ProjectIntegrationAudit": {
4057
- "name": "projectintegrationaudit",
4058
- "className": "ProjectIntegrationAudit",
4059
- "qualifiedName": "@happyvertical/smrt-projects:ProjectIntegrationAudit",
4060
- "collection": "projectintegrationaudits",
4061
- "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/ProjectIntegrationAudit.ts",
4062
- "packageName": "@happyvertical/smrt-projects",
4063
- "fields": {
4064
- "tenantId": {
4065
- "type": "text",
4066
- "required": true,
4067
- "_meta": {
4068
- "sqlType": "UUID",
4069
- "__tenancy": {
4070
- "isTenantIdField": true,
4071
- "autoFilter": true,
4072
- "required": true,
4073
- "autoPopulate": true,
4074
- "nullable": false,
4075
- "mode": "required",
4076
- "field": "tenantId",
4077
- "allowSuperAdminBypass": false
4078
- }
4079
- }
4080
- },
4081
- "integrationId": {
4082
- "type": "foreignKey",
4083
- "required": true,
4084
- "related": "ProjectIntegration",
4085
- "_meta": {
4086
- "required": true
4087
- }
4088
- },
4089
- "action": {
4090
- "type": "text",
4091
- "required": false,
4092
- "default": "created"
4093
- },
4094
- "note": {
4095
- "type": "text",
4096
- "required": false
4097
- }
4098
- },
4099
- "methods": {},
4100
- "decoratorConfig": {
4101
- "tableName": "project_integration_audits",
4102
- "api": false,
4103
- "mcp": false,
4104
- "cli": false,
4105
- "tenantScoped": {
4106
- "mode": "required"
4107
- },
4108
- "conflictColumns": [
4109
- "tenant_id",
4110
- "slug",
4111
- "context"
4112
- ]
4113
- },
4114
- "extends": "SmrtObject",
4115
- "exportName": "ProjectIntegrationAudit",
4116
- "collectionExportName": "ProjectIntegrationAuditCollection",
4117
- "validationRules": [
4118
- {
4119
- "field": "integrationId",
4120
- "rule": "required",
4121
- "fieldType": "foreignKey"
4122
- }
4123
- ],
4124
- "schema": {
4125
- "tableName": "project_integration_audits",
4126
- "ddl": "CREATE TABLE IF NOT EXISTS \"project_integration_audits\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"integration_id\" UUID NOT NULL,\n \"action\" TEXT DEFAULT 'created',\n \"note\" TEXT\n);",
4127
- "columns": {
4128
- "id": {
4129
- "type": "UUID",
4130
- "primaryKey": true,
4131
- "referenceKind": "id",
4132
- "notNull": true
4133
- },
4134
- "slug": {
4135
- "type": "TEXT",
4136
- "notNull": true
3222
+ "default": ""
4137
3223
  },
4138
- "context": {
3224
+ "url": {
4139
3225
  "type": "TEXT",
4140
- "notNull": true,
3226
+ "notNull": false,
3227
+ "unique": false,
4141
3228
  "default": ""
4142
3229
  },
4143
- "created_at": {
4144
- "type": "TIMESTAMP",
4145
- "notNull": true,
4146
- "default": "current_timestamp"
3230
+ "provider_type": {
3231
+ "type": "TEXT",
3232
+ "notNull": false,
3233
+ "unique": false,
3234
+ "default": "github"
4147
3235
  },
4148
- "updated_at": {
4149
- "type": "TIMESTAMP",
4150
- "notNull": true,
4151
- "default": "current_timestamp"
3236
+ "token_config_key": {
3237
+ "type": "TEXT",
3238
+ "notNull": false,
3239
+ "unique": false,
3240
+ "default": "GITHUB_TOKEN"
4152
3241
  },
4153
- "tenant_id": {
4154
- "type": "UUID",
4155
- "referenceKind": "tenantId",
4156
- "notNull": true,
4157
- "unique": false
3242
+ "statuses": {
3243
+ "type": "JSON",
3244
+ "notNull": false,
3245
+ "unique": false,
3246
+ "default": []
4158
3247
  },
4159
- "integration_id": {
4160
- "type": "UUID",
4161
- "referenceKind": "foreignKey",
4162
- "notNull": true,
3248
+ "fields": {
3249
+ "type": "JSON",
3250
+ "notNull": false,
4163
3251
  "unique": false,
4164
- "foreignKey": {
4165
- "table": "project_integrations",
4166
- "column": "id",
4167
- "onDelete": "NO ACTION",
4168
- "onUpdate": "CASCADE"
4169
- }
3252
+ "default": []
4170
3253
  },
4171
- "action": {
3254
+ "status_field_id": {
4172
3255
  "type": "TEXT",
4173
3256
  "notNull": false,
4174
3257
  "unique": false,
4175
- "default": "created"
3258
+ "default": ""
4176
3259
  },
4177
- "note": {
4178
- "type": "TEXT",
3260
+ "status_options": {
3261
+ "type": "JSON",
3262
+ "notNull": false,
3263
+ "unique": false,
3264
+ "default": {}
3265
+ },
3266
+ "last_synced_at": {
3267
+ "type": "TIMESTAMP",
4179
3268
  "notNull": false,
4180
3269
  "unique": false
4181
3270
  }
4182
3271
  },
4183
3272
  "indexes": [
4184
3273
  {
4185
- "name": "project_integration_audits_slug_context_idx",
3274
+ "name": "projects_slug_context_idx",
4186
3275
  "columns": [
4187
3276
  "tenant_id",
4188
3277
  "slug",
@@ -4191,717 +3280,532 @@
4191
3280
  "unique": true
4192
3281
  },
4193
3282
  {
4194
- "name": "project_integration_audits_tenant_id_created_at_idx",
3283
+ "name": "projects_tenant_id_created_at_idx",
4195
3284
  "columns": [
4196
3285
  "tenant_id",
4197
3286
  "created_at"
4198
3287
  ]
4199
- },
4200
- {
4201
- "name": "project_integration_audits_integration_id_idx",
4202
- "columns": [
4203
- "integration_id"
4204
- ]
4205
3288
  }
4206
3289
  ],
4207
- "version": "03cc10a2"
3290
+ "version": "2e8c344a"
4208
3291
  }
4209
3292
  },
4210
- "@happyvertical/smrt-projects:PullRequest": {
4211
- "name": "pullrequest",
4212
- "className": "PullRequest",
4213
- "qualifiedName": "@happyvertical/smrt-projects:PullRequest",
4214
- "collection": "issues",
4215
- "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/PullRequest.ts",
3293
+ "@happyvertical/smrt-projects:ProjectIntegration": {
3294
+ "name": "projectintegration",
3295
+ "className": "ProjectIntegration",
3296
+ "qualifiedName": "@happyvertical/smrt-projects:ProjectIntegration",
3297
+ "collection": "projectintegrations",
3298
+ "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/ProjectIntegration.ts",
4216
3299
  "packageName": "@happyvertical/smrt-projects",
4217
3300
  "fields": {
4218
- "created_at": {
4219
- "type": "datetime",
4220
- "required": false
4221
- },
4222
- "updated_at": {
4223
- "type": "datetime",
4224
- "required": false
4225
- },
4226
3301
  "tenantId": {
4227
3302
  "type": "text",
4228
- "required": false,
4229
- "_meta": {
4230
- "sqlType": "UUID",
4231
- "nullable": true,
4232
- "__tenancy": {
4233
- "isTenantIdField": true,
4234
- "autoFilter": true,
4235
- "required": false,
4236
- "autoPopulate": true,
4237
- "nullable": true,
4238
- "mode": "optional",
4239
- "field": "tenantId",
4240
- "allowSuperAdminBypass": false
4241
- }
4242
- }
4243
- },
4244
- "repositoryId": {
4245
- "type": "foreignKey",
4246
3303
  "required": true,
4247
- "related": "Repository",
4248
- "_meta": {
4249
- "required": true
4250
- }
4251
- },
4252
- "number": {
4253
- "type": "integer",
4254
- "required": false,
4255
- "default": 0
4256
- },
4257
- "nodeId": {
4258
- "type": "text",
4259
- "required": false,
4260
- "default": ""
4261
- },
4262
- "title": {
4263
- "type": "text",
4264
- "required": false,
4265
- "default": ""
4266
- },
4267
- "body": {
4268
- "type": "text",
4269
- "required": false,
4270
- "default": ""
4271
- },
4272
- "state": {
4273
- "type": "text",
4274
- "required": false,
4275
- "default": "open"
4276
- },
4277
- "author": {
4278
- "type": "text",
4279
- "required": false,
4280
- "default": ""
4281
- },
4282
- "labels": {
4283
- "type": "json",
4284
- "required": false,
4285
- "default": []
4286
- },
4287
- "assignees": {
4288
- "type": "json",
4289
- "required": false,
4290
- "default": []
4291
- },
4292
- "commentsCount": {
4293
- "type": "integer",
4294
- "required": false,
4295
- "default": 0
4296
- },
4297
- "lastSyncedAt": {
4298
- "type": "datetime",
4299
- "required": false
4300
- },
4301
- "originalBody": {
4302
- "type": "text",
4303
- "required": false,
4304
- "default": ""
4305
- },
4306
- "synthesisCount": {
4307
- "type": "integer",
4308
- "required": false,
4309
- "default": 0
4310
- },
4311
- "headRef": {
4312
- "type": "text",
4313
- "required": false,
4314
- "default": ""
4315
- },
4316
- "baseRef": {
4317
- "type": "text",
4318
- "required": false,
4319
- "default": ""
4320
- },
4321
- "merged": {
4322
- "type": "boolean",
4323
- "required": false,
4324
- "default": false
4325
- },
4326
- "mergedAt": {
4327
- "type": "datetime",
4328
- "required": false
4329
- },
4330
- "mergeable": {
4331
- "type": "boolean",
4332
- "required": false,
4333
- "default": true
4334
- },
4335
- "draft": {
4336
- "type": "boolean",
4337
- "required": false,
4338
- "default": false
4339
- },
4340
- "additions": {
4341
- "type": "integer",
4342
- "required": false,
4343
- "default": 0
4344
- },
4345
- "deletions": {
4346
- "type": "integer",
4347
- "required": false,
4348
- "default": 0
4349
- },
4350
- "changedFiles": {
4351
- "type": "integer",
4352
- "required": false,
4353
- "default": 0
4354
- }
4355
- },
4356
- "methods": {
4357
- "withDatabase": {
4358
- "name": "withDatabase",
4359
- "async": true,
4360
- "parameters": [
4361
- {
4362
- "name": "db",
4363
- "type": "DatabaseInterface",
4364
- "optional": false
4365
- },
4366
- {
4367
- "name": "operation",
4368
- "type": "Function",
4369
- "optional": false
4370
- }
4371
- ],
4372
- "returnType": "Promise<T>",
4373
- "isStatic": false,
4374
- "isPublic": true
4375
- },
4376
- "getAiUsageSnapshot": {
4377
- "name": "getAiUsageSnapshot",
4378
- "async": false,
4379
- "parameters": [],
4380
- "returnType": "AiUsageSnapshot | undefined",
4381
- "isStatic": false,
4382
- "isPublic": true
4383
- },
4384
- "resetAiUsage": {
4385
- "name": "resetAiUsage",
4386
- "async": false,
4387
- "parameters": [],
4388
- "returnType": "void",
4389
- "isStatic": false,
4390
- "isPublic": true
4391
- },
4392
- "listAiUsage": {
4393
- "name": "listAiUsage",
4394
- "async": true,
4395
- "parameters": [
4396
- {
4397
- "name": "options",
4398
- "type": "AiUsageListOptions",
4399
- "optional": true
4400
- }
4401
- ],
4402
- "returnType": "Promise<SmrtAiUsageRecord[]>",
4403
- "isStatic": false,
4404
- "isPublic": true
4405
- },
4406
- "summarizeAiUsage": {
4407
- "name": "summarizeAiUsage",
4408
- "async": true,
4409
- "parameters": [
4410
- {
4411
- "name": "options",
4412
- "type": "AiUsageSummaryOptions",
4413
- "optional": true
3304
+ "_meta": {
3305
+ "sqlType": "UUID",
3306
+ "__tenancy": {
3307
+ "isTenantIdField": true,
3308
+ "autoFilter": true,
3309
+ "required": true,
3310
+ "autoPopulate": true,
3311
+ "nullable": false,
3312
+ "mode": "required",
3313
+ "field": "tenantId",
3314
+ "allowSuperAdminBypass": false
4414
3315
  }
4415
- ],
4416
- "returnType": "Promise<Record<string, AiUsageStats>>",
4417
- "isStatic": false,
4418
- "isPublic": true
3316
+ }
4419
3317
  },
4420
- "destroy": {
4421
- "name": "destroy",
4422
- "async": false,
4423
- "parameters": [],
4424
- "returnType": "void",
4425
- "isStatic": false,
4426
- "isPublic": true
3318
+ "projectId": {
3319
+ "type": "text",
3320
+ "required": false,
3321
+ "default": ""
4427
3322
  },
4428
- "markAsPersisted": {
4429
- "name": "markAsPersisted",
4430
- "async": false,
4431
- "parameters": [],
4432
- "returnType": "void",
4433
- "isStatic": false,
4434
- "isPublic": true
3323
+ "name": {
3324
+ "type": "text",
3325
+ "required": false,
3326
+ "default": ""
4435
3327
  },
4436
- "requireInsertOnSave": {
4437
- "name": "requireInsertOnSave",
4438
- "async": false,
4439
- "parameters": [],
4440
- "returnType": "void",
4441
- "isStatic": false,
4442
- "isPublic": true
3328
+ "credentialHash": {
3329
+ "type": "text",
3330
+ "required": false,
3331
+ "default": "",
3332
+ "_meta": {
3333
+ "sensitive": true
3334
+ },
3335
+ "sensitive": true
4443
3336
  },
4444
- "withTransaction": {
4445
- "name": "withTransaction",
4446
- "async": true,
4447
- "parameters": [
4448
- {
4449
- "name": "operation",
4450
- "type": "Function",
4451
- "optional": false
4452
- }
4453
- ],
4454
- "returnType": "Promise<T>",
4455
- "isStatic": false,
4456
- "isPublic": true
3337
+ "capabilities": {
3338
+ "type": "json",
3339
+ "required": false,
3340
+ "default": []
4457
3341
  },
4458
- "initialize": {
4459
- "name": "initialize",
4460
- "async": true,
4461
- "parameters": [],
4462
- "returnType": "Promise",
4463
- "isStatic": false,
4464
- "isPublic": true
3342
+ "status": {
3343
+ "type": "text",
3344
+ "required": false,
3345
+ "default": "active"
4465
3346
  },
4466
- "loadDataFromDb": {
4467
- "name": "loadDataFromDb",
4468
- "async": true,
3347
+ "revokedAt": {
3348
+ "type": "datetime",
3349
+ "required": false
3350
+ }
3351
+ },
3352
+ "methods": {
3353
+ "hasCapability": {
3354
+ "name": "hasCapability",
3355
+ "async": false,
4469
3356
  "parameters": [
4470
3357
  {
4471
- "name": "data",
4472
- "type": "Record<string>",
3358
+ "name": "capability",
3359
+ "type": "ProjectIntegrationCapability",
4473
3360
  "optional": false
4474
3361
  }
4475
3362
  ],
4476
- "returnType": "any",
4477
- "isStatic": false,
4478
- "isPublic": true
4479
- },
4480
- "getFields": {
4481
- "name": "getFields",
4482
- "async": true,
4483
- "parameters": [],
4484
- "returnType": "Promise<any>",
3363
+ "returnType": "boolean",
4485
3364
  "isStatic": false,
4486
3365
  "isPublic": true
4487
3366
  },
4488
- "toJSON": {
4489
- "name": "toJSON",
3367
+ "isActive": {
3368
+ "name": "isActive",
4490
3369
  "async": false,
4491
3370
  "parameters": [],
4492
- "returnType": "any",
3371
+ "returnType": "boolean",
4493
3372
  "isStatic": false,
4494
3373
  "isPublic": true
3374
+ }
3375
+ },
3376
+ "decoratorConfig": {
3377
+ "tableName": "project_integrations",
3378
+ "conflictColumns": [
3379
+ "tenant_id",
3380
+ "project_id",
3381
+ "name"
3382
+ ],
3383
+ "api": {
3384
+ "include": [
3385
+ "list",
3386
+ "get"
3387
+ ]
4495
3388
  },
4496
- "toPlainObject": {
4497
- "name": "toPlainObject",
4498
- "async": false,
4499
- "parameters": [],
4500
- "returnType": "Record<string>",
4501
- "isStatic": false,
4502
- "isPublic": true
3389
+ "mcp": {
3390
+ "include": [
3391
+ "list",
3392
+ "get"
3393
+ ]
4503
3394
  },
4504
- "toPublicJSON": {
4505
- "name": "toPublicJSON",
4506
- "async": false,
4507
- "parameters": [
4508
- {
4509
- "name": "options",
4510
- "type": "PublicJsonOptions",
4511
- "optional": true
3395
+ "cli": {
3396
+ "include": [
3397
+ "list",
3398
+ "get"
3399
+ ]
3400
+ },
3401
+ "tenantScoped": {
3402
+ "mode": "required"
3403
+ }
3404
+ },
3405
+ "extends": "SmrtObject",
3406
+ "exportName": "ProjectIntegration",
3407
+ "collectionExportName": "ProjectIntegrationCollection",
3408
+ "validationRules": [],
3409
+ "schema": {
3410
+ "tableName": "project_integrations",
3411
+ "ddl": "CREATE TABLE IF NOT EXISTS \"project_integrations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"project_id\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"credential_hash\" TEXT DEFAULT '',\n \"capabilities\" JSON DEFAULT '[]',\n \"status\" TEXT DEFAULT 'active',\n \"revoked_at\" TIMESTAMP\n);",
3412
+ "columns": {
3413
+ "id": {
3414
+ "type": "UUID",
3415
+ "primaryKey": true,
3416
+ "referenceKind": "id",
3417
+ "notNull": true
3418
+ },
3419
+ "slug": {
3420
+ "type": "TEXT",
3421
+ "notNull": true
3422
+ },
3423
+ "context": {
3424
+ "type": "TEXT",
3425
+ "notNull": true,
3426
+ "default": ""
3427
+ },
3428
+ "created_at": {
3429
+ "type": "TIMESTAMP",
3430
+ "notNull": true,
3431
+ "default": "current_timestamp"
3432
+ },
3433
+ "updated_at": {
3434
+ "type": "TIMESTAMP",
3435
+ "notNull": true,
3436
+ "default": "current_timestamp"
3437
+ },
3438
+ "tenant_id": {
3439
+ "type": "UUID",
3440
+ "referenceKind": "tenantId",
3441
+ "notNull": true,
3442
+ "unique": false
3443
+ },
3444
+ "project_id": {
3445
+ "type": "TEXT",
3446
+ "notNull": false,
3447
+ "unique": false,
3448
+ "default": ""
3449
+ },
3450
+ "name": {
3451
+ "type": "TEXT",
3452
+ "notNull": false,
3453
+ "unique": false,
3454
+ "default": ""
3455
+ },
3456
+ "credential_hash": {
3457
+ "type": "TEXT",
3458
+ "notNull": false,
3459
+ "unique": false,
3460
+ "default": ""
3461
+ },
3462
+ "capabilities": {
3463
+ "type": "JSON",
3464
+ "notNull": false,
3465
+ "unique": false,
3466
+ "default": []
3467
+ },
3468
+ "status": {
3469
+ "type": "TEXT",
3470
+ "notNull": false,
3471
+ "unique": false,
3472
+ "default": "active"
3473
+ },
3474
+ "revoked_at": {
3475
+ "type": "TIMESTAMP",
3476
+ "notNull": false,
3477
+ "unique": false
3478
+ }
3479
+ },
3480
+ "indexes": [
3481
+ {
3482
+ "name": "project_integrations_tenant_id_project_id_idx",
3483
+ "columns": [
3484
+ "tenant_id",
3485
+ "project_id",
3486
+ "name"
3487
+ ],
3488
+ "unique": true
3489
+ },
3490
+ {
3491
+ "name": "project_integrations_slug_context_idx",
3492
+ "columns": [
3493
+ "slug",
3494
+ "context"
3495
+ ]
3496
+ },
3497
+ {
3498
+ "name": "project_integrations_tenant_id_created_at_idx",
3499
+ "columns": [
3500
+ "tenant_id",
3501
+ "created_at"
3502
+ ]
3503
+ }
3504
+ ],
3505
+ "version": "bfbaa783"
3506
+ }
3507
+ },
3508
+ "@happyvertical/smrt-projects:ProjectIntegrationAudit": {
3509
+ "name": "projectintegrationaudit",
3510
+ "className": "ProjectIntegrationAudit",
3511
+ "qualifiedName": "@happyvertical/smrt-projects:ProjectIntegrationAudit",
3512
+ "collection": "projectintegrationaudits",
3513
+ "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/ProjectIntegrationAudit.ts",
3514
+ "packageName": "@happyvertical/smrt-projects",
3515
+ "fields": {
3516
+ "tenantId": {
3517
+ "type": "text",
3518
+ "required": true,
3519
+ "_meta": {
3520
+ "sqlType": "UUID",
3521
+ "__tenancy": {
3522
+ "isTenantIdField": true,
3523
+ "autoFilter": true,
3524
+ "required": true,
3525
+ "autoPopulate": true,
3526
+ "nullable": false,
3527
+ "mode": "required",
3528
+ "field": "tenantId",
3529
+ "allowSuperAdminBypass": false
4512
3530
  }
4513
- ],
4514
- "returnType": "Record<string>",
4515
- "isStatic": false,
4516
- "isPublic": true
4517
- },
4518
- "getId": {
4519
- "name": "getId",
4520
- "async": true,
4521
- "parameters": [],
4522
- "returnType": "any",
4523
- "isStatic": false,
4524
- "isPublic": true
3531
+ }
4525
3532
  },
4526
- "getSlug": {
4527
- "name": "getSlug",
4528
- "async": true,
4529
- "parameters": [],
4530
- "returnType": "any",
4531
- "isStatic": false,
4532
- "isPublic": true
3533
+ "integrationId": {
3534
+ "type": "foreignKey",
3535
+ "required": true,
3536
+ "related": "ProjectIntegration",
3537
+ "_meta": {
3538
+ "required": true
3539
+ }
4533
3540
  },
4534
- "getSavedId": {
4535
- "name": "getSavedId",
4536
- "async": true,
4537
- "parameters": [],
4538
- "returnType": "any",
4539
- "isStatic": false,
4540
- "isPublic": true
3541
+ "action": {
3542
+ "type": "text",
3543
+ "required": false,
3544
+ "default": "created"
4541
3545
  },
4542
- "isSaved": {
4543
- "name": "isSaved",
4544
- "async": true,
4545
- "parameters": [],
4546
- "returnType": "any",
4547
- "isStatic": false,
4548
- "isPublic": true
3546
+ "note": {
3547
+ "type": "text",
3548
+ "required": false
3549
+ }
3550
+ },
3551
+ "methods": {},
3552
+ "decoratorConfig": {
3553
+ "tableName": "project_integration_audits",
3554
+ "api": false,
3555
+ "mcp": false,
3556
+ "cli": false,
3557
+ "tenantScoped": {
3558
+ "mode": "required"
4549
3559
  },
4550
- "save": {
4551
- "name": "save",
4552
- "async": true,
4553
- "parameters": [
4554
- {
4555
- "name": "options",
4556
- "type": "SmrtSaveOptions",
4557
- "optional": true
3560
+ "conflictColumns": [
3561
+ "tenant_id",
3562
+ "slug",
3563
+ "context"
3564
+ ]
3565
+ },
3566
+ "extends": "SmrtObject",
3567
+ "exportName": "ProjectIntegrationAudit",
3568
+ "collectionExportName": "ProjectIntegrationAuditCollection",
3569
+ "validationRules": [
3570
+ {
3571
+ "field": "integrationId",
3572
+ "rule": "required",
3573
+ "fieldType": "foreignKey"
3574
+ }
3575
+ ],
3576
+ "schema": {
3577
+ "tableName": "project_integration_audits",
3578
+ "ddl": "CREATE TABLE IF NOT EXISTS \"project_integration_audits\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"integration_id\" UUID NOT NULL,\n \"action\" TEXT DEFAULT 'created',\n \"note\" TEXT\n);",
3579
+ "columns": {
3580
+ "id": {
3581
+ "type": "UUID",
3582
+ "primaryKey": true,
3583
+ "referenceKind": "id",
3584
+ "notNull": true
3585
+ },
3586
+ "slug": {
3587
+ "type": "TEXT",
3588
+ "notNull": true
3589
+ },
3590
+ "context": {
3591
+ "type": "TEXT",
3592
+ "notNull": true,
3593
+ "default": ""
3594
+ },
3595
+ "created_at": {
3596
+ "type": "TIMESTAMP",
3597
+ "notNull": true,
3598
+ "default": "current_timestamp"
3599
+ },
3600
+ "updated_at": {
3601
+ "type": "TIMESTAMP",
3602
+ "notNull": true,
3603
+ "default": "current_timestamp"
3604
+ },
3605
+ "tenant_id": {
3606
+ "type": "UUID",
3607
+ "referenceKind": "tenantId",
3608
+ "notNull": true,
3609
+ "unique": false
3610
+ },
3611
+ "integration_id": {
3612
+ "type": "UUID",
3613
+ "referenceKind": "foreignKey",
3614
+ "notNull": true,
3615
+ "unique": false,
3616
+ "foreignKey": {
3617
+ "table": "project_integrations",
3618
+ "column": "id",
3619
+ "onDelete": "NO ACTION",
3620
+ "onUpdate": "CASCADE"
4558
3621
  }
4559
- ],
4560
- "returnType": "any",
4561
- "isStatic": false,
4562
- "isPublic": true
3622
+ },
3623
+ "action": {
3624
+ "type": "TEXT",
3625
+ "notNull": false,
3626
+ "unique": false,
3627
+ "default": "created"
3628
+ },
3629
+ "note": {
3630
+ "type": "TEXT",
3631
+ "notNull": false,
3632
+ "unique": false
3633
+ }
4563
3634
  },
4564
- "claimRevision": {
4565
- "name": "claimRevision",
4566
- "async": true,
4567
- "parameters": [
4568
- {
4569
- "name": "expectedUpdatedAt",
4570
- "type": "Date | string",
4571
- "optional": false
4572
- }
4573
- ],
4574
- "returnType": "Promise",
4575
- "isStatic": false,
4576
- "isPublic": true
3635
+ "indexes": [
3636
+ {
3637
+ "name": "project_integration_audits_slug_context_idx",
3638
+ "columns": [
3639
+ "tenant_id",
3640
+ "slug",
3641
+ "context"
3642
+ ],
3643
+ "unique": true
3644
+ },
3645
+ {
3646
+ "name": "project_integration_audits_tenant_id_created_at_idx",
3647
+ "columns": [
3648
+ "tenant_id",
3649
+ "created_at"
3650
+ ]
3651
+ },
3652
+ {
3653
+ "name": "project_integration_audits_integration_id_idx",
3654
+ "columns": [
3655
+ "integration_id"
3656
+ ]
3657
+ }
3658
+ ],
3659
+ "version": "03cc10a2"
3660
+ }
3661
+ },
3662
+ "@happyvertical/smrt-projects:PullRequest": {
3663
+ "name": "pullrequest",
3664
+ "className": "PullRequest",
3665
+ "qualifiedName": "@happyvertical/smrt-projects:PullRequest",
3666
+ "collection": "issues",
3667
+ "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/PullRequest.ts",
3668
+ "packageName": "@happyvertical/smrt-projects",
3669
+ "fields": {
3670
+ "created_at": {
3671
+ "type": "datetime",
3672
+ "required": false
4577
3673
  },
4578
- "classifyConstraintError": {
4579
- "name": "classifyConstraintError",
4580
- "async": false,
4581
- "parameters": [
4582
- {
4583
- "name": "message",
4584
- "type": "string",
4585
- "optional": false
4586
- }
4587
- ],
4588
- "returnType": "'unique' | 'not_null' | null",
4589
- "isStatic": true,
4590
- "isPublic": true
3674
+ "updated_at": {
3675
+ "type": "datetime",
3676
+ "required": false
4591
3677
  },
4592
- "loadFromId": {
4593
- "name": "loadFromId",
4594
- "async": true,
4595
- "parameters": [],
4596
- "returnType": "any",
4597
- "isStatic": false,
4598
- "isPublic": true
3678
+ "tenantId": {
3679
+ "type": "text",
3680
+ "required": false,
3681
+ "_meta": {
3682
+ "sqlType": "UUID",
3683
+ "nullable": true,
3684
+ "__tenancy": {
3685
+ "isTenantIdField": true,
3686
+ "autoFilter": true,
3687
+ "required": false,
3688
+ "autoPopulate": true,
3689
+ "nullable": true,
3690
+ "mode": "optional",
3691
+ "field": "tenantId",
3692
+ "allowSuperAdminBypass": false
3693
+ }
3694
+ }
4599
3695
  },
4600
- "loadFromSlug": {
4601
- "name": "loadFromSlug",
4602
- "async": true,
4603
- "parameters": [],
4604
- "returnType": "any",
4605
- "isStatic": false,
4606
- "isPublic": true
3696
+ "repositoryId": {
3697
+ "type": "foreignKey",
3698
+ "required": true,
3699
+ "related": "Repository",
3700
+ "_meta": {
3701
+ "required": true
3702
+ }
4607
3703
  },
4608
- "is": {
4609
- "name": "is",
4610
- "async": true,
4611
- "parameters": [
4612
- {
4613
- "name": "criteria",
4614
- "type": "string",
4615
- "optional": false
4616
- },
4617
- {
4618
- "name": "options",
4619
- "type": "AiOperationOptions",
4620
- "optional": true
4621
- }
4622
- ],
4623
- "returnType": "any",
4624
- "isStatic": false,
4625
- "isPublic": true
3704
+ "number": {
3705
+ "type": "integer",
3706
+ "required": false,
3707
+ "default": 0
4626
3708
  },
4627
- "do": {
4628
- "name": "do",
4629
- "async": true,
4630
- "parameters": [
4631
- {
4632
- "name": "instructions",
4633
- "type": "string",
4634
- "optional": false
4635
- },
4636
- {
4637
- "name": "options",
4638
- "type": "AiOperationOptions",
4639
- "optional": true
4640
- }
4641
- ],
4642
- "returnType": "any",
4643
- "isStatic": false,
4644
- "isPublic": true
3709
+ "nodeId": {
3710
+ "type": "text",
3711
+ "required": false,
3712
+ "default": ""
4645
3713
  },
4646
- "describe": {
4647
- "name": "describe",
4648
- "async": true,
4649
- "parameters": [
4650
- {
4651
- "name": "options",
4652
- "type": "AiOperationOptions",
4653
- "optional": true
4654
- }
4655
- ],
4656
- "returnType": "any",
4657
- "isStatic": false,
4658
- "isPublic": true
3714
+ "title": {
3715
+ "type": "text",
3716
+ "required": false,
3717
+ "default": ""
4659
3718
  },
4660
- "delete": {
4661
- "name": "delete",
4662
- "async": true,
4663
- "parameters": [
4664
- {
4665
- "name": "options",
4666
- "type": "SmrtDeleteOptions",
4667
- "optional": true
4668
- }
4669
- ],
4670
- "returnType": "Promise<void>",
4671
- "isStatic": false,
4672
- "isPublic": true
3719
+ "body": {
3720
+ "type": "text",
3721
+ "required": false,
3722
+ "default": ""
4673
3723
  },
4674
- "isRelatedLoaded": {
4675
- "name": "isRelatedLoaded",
4676
- "async": false,
4677
- "parameters": [
4678
- {
4679
- "name": "fieldName",
4680
- "type": "string",
4681
- "optional": false
4682
- }
4683
- ],
4684
- "returnType": "boolean",
4685
- "isStatic": false,
4686
- "isPublic": true
3724
+ "state": {
3725
+ "type": "text",
3726
+ "required": false,
3727
+ "default": "open"
4687
3728
  },
4688
- "_setLoadedRelationship": {
4689
- "name": "_setLoadedRelationship",
4690
- "async": false,
4691
- "parameters": [
4692
- {
4693
- "name": "fieldName",
4694
- "type": "string",
4695
- "optional": false
4696
- },
4697
- {
4698
- "name": "value",
4699
- "type": "any",
4700
- "optional": false
4701
- }
4702
- ],
4703
- "returnType": "void",
4704
- "isStatic": false,
4705
- "isPublic": true
3729
+ "author": {
3730
+ "type": "text",
3731
+ "required": false,
3732
+ "default": ""
4706
3733
  },
4707
- "loadRelated": {
4708
- "name": "loadRelated",
4709
- "async": true,
4710
- "parameters": [
4711
- {
4712
- "name": "fieldName",
4713
- "type": "string",
4714
- "optional": false
4715
- },
4716
- {
4717
- "name": "opts",
4718
- "type": "LoadRelatedOptions",
4719
- "optional": true
4720
- }
4721
- ],
4722
- "returnType": "Promise<any>",
4723
- "isStatic": false,
4724
- "isPublic": true
3734
+ "labels": {
3735
+ "type": "json",
3736
+ "required": false,
3737
+ "default": []
4725
3738
  },
4726
- "loadRelatedMany": {
4727
- "name": "loadRelatedMany",
4728
- "async": true,
4729
- "parameters": [
4730
- {
4731
- "name": "fieldName",
4732
- "type": "string",
4733
- "optional": false
4734
- },
4735
- {
4736
- "name": "opts",
4737
- "type": "LoadRelatedOptions",
4738
- "optional": true
4739
- }
4740
- ],
4741
- "returnType": "Promise<any[]>",
4742
- "isStatic": false,
4743
- "isPublic": true
3739
+ "assignees": {
3740
+ "type": "json",
3741
+ "required": false,
3742
+ "default": []
4744
3743
  },
4745
- "getRelated": {
4746
- "name": "getRelated",
4747
- "async": true,
4748
- "parameters": [
4749
- {
4750
- "name": "fieldName",
4751
- "type": "string",
4752
- "optional": false
4753
- },
4754
- {
4755
- "name": "opts",
4756
- "type": "LoadRelatedOptions",
4757
- "optional": true
4758
- }
4759
- ],
4760
- "returnType": "Promise<any>",
4761
- "isStatic": false,
4762
- "isPublic": true
3744
+ "commentsCount": {
3745
+ "type": "integer",
3746
+ "required": false,
3747
+ "default": 0
4763
3748
  },
4764
- "getAvailableTools": {
4765
- "name": "getAvailableTools",
4766
- "async": false,
4767
- "parameters": [],
4768
- "returnType": "AITool[]",
4769
- "isStatic": false,
4770
- "isPublic": true
3749
+ "lastSyncedAt": {
3750
+ "type": "datetime",
3751
+ "required": false
4771
3752
  },
4772
- "executeToolCall": {
4773
- "name": "executeToolCall",
4774
- "async": true,
4775
- "parameters": [
4776
- {
4777
- "name": "toolCall",
4778
- "type": "ToolCall",
4779
- "optional": false
4780
- }
4781
- ],
4782
- "returnType": "Promise<ToolCallResult>",
4783
- "isStatic": false,
4784
- "isPublic": true
3753
+ "originalBody": {
3754
+ "type": "text",
3755
+ "required": false,
3756
+ "default": ""
4785
3757
  },
4786
- "remember": {
4787
- "name": "remember",
4788
- "async": true,
4789
- "parameters": [
4790
- {
4791
- "name": "options",
4792
- "type": "object",
4793
- "optional": false
4794
- }
4795
- ],
4796
- "returnType": "Promise<void>",
4797
- "isStatic": false,
4798
- "isPublic": true
3758
+ "synthesisCount": {
3759
+ "type": "integer",
3760
+ "required": false,
3761
+ "default": 0
4799
3762
  },
4800
- "recall": {
4801
- "name": "recall",
4802
- "async": true,
4803
- "parameters": [
4804
- {
4805
- "name": "options",
4806
- "type": "object",
4807
- "optional": false
4808
- }
4809
- ],
4810
- "returnType": "Promise",
4811
- "isStatic": false,
4812
- "isPublic": true
3763
+ "headRef": {
3764
+ "type": "text",
3765
+ "required": false,
3766
+ "default": ""
4813
3767
  },
4814
- "recallAll": {
4815
- "name": "recallAll",
4816
- "async": true,
4817
- "parameters": [
4818
- {
4819
- "name": "options",
4820
- "type": "object",
4821
- "optional": true
4822
- }
4823
- ],
4824
- "returnType": "Promise<Map<string>>",
4825
- "isStatic": false,
4826
- "isPublic": true
3768
+ "baseRef": {
3769
+ "type": "text",
3770
+ "required": false,
3771
+ "default": ""
4827
3772
  },
4828
- "forget": {
4829
- "name": "forget",
4830
- "async": true,
4831
- "parameters": [
4832
- {
4833
- "name": "options",
4834
- "type": "object",
4835
- "optional": false
4836
- }
4837
- ],
4838
- "returnType": "Promise<void>",
4839
- "isStatic": false,
4840
- "isPublic": true
3773
+ "merged": {
3774
+ "type": "boolean",
3775
+ "required": false,
3776
+ "default": false
4841
3777
  },
4842
- "forgetScope": {
4843
- "name": "forgetScope",
4844
- "async": true,
4845
- "parameters": [
4846
- {
4847
- "name": "options",
4848
- "type": "object",
4849
- "optional": false
4850
- }
4851
- ],
4852
- "returnType": "Promise<number>",
4853
- "isStatic": false,
4854
- "isPublic": true
3778
+ "mergedAt": {
3779
+ "type": "datetime",
3780
+ "required": false
4855
3781
  },
4856
- "generateEmbeddings": {
4857
- "name": "generateEmbeddings",
4858
- "async": true,
4859
- "parameters": [
4860
- {
4861
- "name": "options",
4862
- "type": "GenerateEmbeddingsOptions",
4863
- "optional": true
4864
- }
4865
- ],
4866
- "returnType": "Promise<void>",
4867
- "isStatic": false,
4868
- "isPublic": true
3782
+ "mergeable": {
3783
+ "type": "boolean",
3784
+ "required": false,
3785
+ "default": true
4869
3786
  },
4870
- "getEmbedding": {
4871
- "name": "getEmbedding",
4872
- "async": true,
4873
- "parameters": [
4874
- {
4875
- "name": "fieldName",
4876
- "type": "string",
4877
- "optional": false
4878
- },
4879
- {
4880
- "name": "model",
4881
- "type": "string",
4882
- "optional": true
4883
- }
4884
- ],
4885
- "returnType": "Promise<number[] | null>",
4886
- "isStatic": false,
4887
- "isPublic": true
3787
+ "draft": {
3788
+ "type": "boolean",
3789
+ "required": false,
3790
+ "default": false
4888
3791
  },
4889
- "hasStaleEmbeddings": {
4890
- "name": "hasStaleEmbeddings",
4891
- "async": true,
4892
- "parameters": [],
4893
- "returnType": "Promise<boolean>",
4894
- "isStatic": false,
4895
- "isPublic": true
3792
+ "additions": {
3793
+ "type": "integer",
3794
+ "required": false,
3795
+ "default": 0
4896
3796
  },
4897
- "clearEmbeddings": {
4898
- "name": "clearEmbeddings",
4899
- "async": true,
4900
- "parameters": [],
4901
- "returnType": "Promise<void>",
4902
- "isStatic": false,
4903
- "isPublic": true
3797
+ "deletions": {
3798
+ "type": "integer",
3799
+ "required": false,
3800
+ "default": 0
4904
3801
  },
3802
+ "changedFiles": {
3803
+ "type": "integer",
3804
+ "required": false,
3805
+ "default": 0
3806
+ }
3807
+ },
3808
+ "methods": {
4905
3809
  "getRepository": {
4906
3810
  "name": "getRepository",
4907
3811
  "async": true,