@happyvertical/smrt-projects 0.55.6 → 0.55.8

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,8 +2,123 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-projects",
5
- "packageVersion": "0.55.6",
5
+ "packageVersion": "0.55.8",
6
6
  "objects": {
7
+ "@happyvertical/smrt-projects:CommentCollection": {
8
+ "name": "commentcollection",
9
+ "className": "CommentCollection",
10
+ "qualifiedName": "@happyvertical/smrt-projects:CommentCollection",
11
+ "collection": "comments",
12
+ "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/collections/Comments.ts",
13
+ "packageName": "@happyvertical/smrt-projects",
14
+ "fields": {},
15
+ "methods": {},
16
+ "decoratorConfig": {},
17
+ "extends": "SmrtCollection",
18
+ "extendsTypeArg": "Comment",
19
+ "exportName": "CommentCollection",
20
+ "collectionExportName": "CommentCollectionCollection",
21
+ "schema": {
22
+ "tableName": "comments",
23
+ "ddl": "CREATE TABLE IF NOT EXISTS \"comments\" (\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 \"issue_id\" UUID,\n \"comment_id\" TEXT DEFAULT '',\n \"body\" TEXT DEFAULT '',\n \"author\" TEXT DEFAULT '',\n \"url\" TEXT DEFAULT ''\n);",
24
+ "columns": {
25
+ "id": {
26
+ "type": "UUID",
27
+ "primaryKey": true,
28
+ "referenceKind": "id",
29
+ "notNull": true
30
+ },
31
+ "slug": {
32
+ "type": "TEXT",
33
+ "notNull": true
34
+ },
35
+ "context": {
36
+ "type": "TEXT",
37
+ "notNull": true,
38
+ "default": ""
39
+ },
40
+ "created_at": {
41
+ "type": "TIMESTAMP",
42
+ "notNull": true,
43
+ "default": "current_timestamp"
44
+ },
45
+ "updated_at": {
46
+ "type": "TIMESTAMP",
47
+ "notNull": true,
48
+ "default": "current_timestamp"
49
+ },
50
+ "tenant_id": {
51
+ "type": "UUID",
52
+ "referenceKind": "tenantId",
53
+ "notNull": false,
54
+ "unique": false
55
+ },
56
+ "issue_id": {
57
+ "type": "UUID",
58
+ "referenceKind": "foreignKey",
59
+ "notNull": false,
60
+ "unique": false,
61
+ "foreignKey": {
62
+ "table": "issues",
63
+ "column": "id",
64
+ "onDelete": "NO ACTION",
65
+ "onUpdate": "CASCADE"
66
+ }
67
+ },
68
+ "comment_id": {
69
+ "type": "TEXT",
70
+ "notNull": false,
71
+ "unique": false,
72
+ "default": ""
73
+ },
74
+ "body": {
75
+ "type": "TEXT",
76
+ "notNull": false,
77
+ "unique": false,
78
+ "default": ""
79
+ },
80
+ "author": {
81
+ "type": "TEXT",
82
+ "notNull": false,
83
+ "unique": false,
84
+ "default": ""
85
+ },
86
+ "url": {
87
+ "type": "TEXT",
88
+ "notNull": false,
89
+ "unique": false,
90
+ "default": ""
91
+ }
92
+ },
93
+ "indexes": [
94
+ {
95
+ "name": "comments_slug_context_idx",
96
+ "columns": [
97
+ "tenant_id",
98
+ "slug",
99
+ "context"
100
+ ],
101
+ "unique": true,
102
+ "nullsNotDistinct": true
103
+ },
104
+ {
105
+ "name": "comments_tenant_id_created_at_idx",
106
+ "columns": [
107
+ "tenant_id",
108
+ "created_at"
109
+ ]
110
+ },
111
+ {
112
+ "name": "comments_issue_id_idx",
113
+ "columns": [
114
+ "issue_id"
115
+ ]
116
+ }
117
+ ],
118
+ "version": "ffcc1937"
119
+ },
120
+ "importPath": "@happyvertical/smrt-projects"
121
+ },
7
122
  "@happyvertical/smrt-projects:DevelopmentRequestHistoryCollection": {
8
123
  "name": "developmentrequesthistorycollection",
9
124
  "className": "DevelopmentRequestHistoryCollection",
@@ -411,6 +526,20 @@
411
526
  "isStatic": false,
412
527
  "isPublic": true
413
528
  },
529
+ "findByProject": {
530
+ "name": "findByProject",
531
+ "async": true,
532
+ "parameters": [
533
+ {
534
+ "name": "projectId",
535
+ "type": "string",
536
+ "optional": false
537
+ }
538
+ ],
539
+ "returnType": "Promise<Issue[]>",
540
+ "isStatic": false,
541
+ "isPublic": true
542
+ },
414
543
  "findByRepository": {
415
544
  "name": "findByRepository",
416
545
  "async": true,
@@ -590,7 +719,7 @@
590
719
  "collectionExportName": "IssueCollectionCollection",
591
720
  "schema": {
592
721
  "tableName": "issues",
593
- "ddl": "CREATE TABLE IF NOT EXISTS \"issues\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"repository_id\" UUID,\n \"number\" INTEGER DEFAULT 0,\n \"node_id\" TEXT DEFAULT '',\n \"title\" TEXT DEFAULT '',\n \"body\" TEXT DEFAULT '',\n \"state\" TEXT DEFAULT 'open',\n \"author\" TEXT DEFAULT '',\n \"labels\" JSON DEFAULT '[]',\n \"assignees\" JSON DEFAULT '[]',\n \"comments_count\" INTEGER DEFAULT 0,\n \"last_synced_at\" TIMESTAMP,\n \"original_body\" TEXT DEFAULT '',\n \"synthesis_count\" INTEGER DEFAULT 0,\n \"head_ref\" TEXT DEFAULT '',\n \"base_ref\" TEXT DEFAULT '',\n \"merged\" BOOLEAN DEFAULT FALSE,\n \"merged_at\" TIMESTAMP,\n \"mergeable\" BOOLEAN DEFAULT TRUE,\n \"draft\" BOOLEAN DEFAULT FALSE,\n \"additions\" INTEGER DEFAULT 0,\n \"deletions\" INTEGER DEFAULT 0,\n \"changed_files\" INTEGER DEFAULT 0\n);",
722
+ "ddl": "CREATE TABLE IF NOT EXISTS \"issues\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"repository_id\" UUID,\n \"project_id\" UUID,\n \"number\" INTEGER DEFAULT 0,\n \"node_id\" TEXT DEFAULT '',\n \"title\" TEXT DEFAULT '',\n \"body\" TEXT DEFAULT '',\n \"state\" TEXT DEFAULT 'open',\n \"author\" TEXT DEFAULT '',\n \"labels\" JSON DEFAULT '[]',\n \"assignees\" JSON DEFAULT '[]',\n \"comments_count\" INTEGER DEFAULT 0,\n \"last_synced_at\" TIMESTAMP,\n \"original_body\" TEXT DEFAULT '',\n \"synthesis_count\" INTEGER DEFAULT 0,\n \"head_ref\" TEXT DEFAULT '',\n \"base_ref\" TEXT DEFAULT '',\n \"merged\" BOOLEAN DEFAULT FALSE,\n \"merged_at\" TIMESTAMP,\n \"mergeable\" BOOLEAN DEFAULT TRUE,\n \"draft\" BOOLEAN DEFAULT FALSE,\n \"additions\" INTEGER DEFAULT 0,\n \"deletions\" INTEGER DEFAULT 0,\n \"changed_files\" INTEGER DEFAULT 0\n);",
594
723
  "columns": {
595
724
  "id": {
596
725
  "type": "UUID",
@@ -641,6 +770,17 @@
641
770
  "onUpdate": "CASCADE"
642
771
  }
643
772
  },
773
+ "project_id": {
774
+ "type": "UUID",
775
+ "referenceKind": "foreignKey",
776
+ "notNull": false,
777
+ "foreignKey": {
778
+ "table": "projects",
779
+ "column": "id",
780
+ "onDelete": "NO ACTION",
781
+ "onUpdate": "CASCADE"
782
+ }
783
+ },
644
784
  "number": {
645
785
  "type": "INTEGER",
646
786
  "notNull": false,
@@ -775,9 +915,15 @@
775
915
  "columns": [
776
916
  "repository_id"
777
917
  ]
918
+ },
919
+ {
920
+ "name": "issues_project_id_idx",
921
+ "columns": [
922
+ "project_id"
923
+ ]
778
924
  }
779
925
  ],
780
- "version": "c3d5425b"
926
+ "version": "83fb5e05"
781
927
  },
782
928
  "importPath": "@happyvertical/smrt-projects"
783
929
  },
@@ -1670,7 +1816,7 @@
1670
1816
  "collectionExportName": "PullRequestCollectionCollection",
1671
1817
  "schema": {
1672
1818
  "tableName": "issues",
1673
- "ddl": "CREATE TABLE IF NOT EXISTS \"issues\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"repository_id\" UUID,\n \"number\" INTEGER DEFAULT 0,\n \"node_id\" TEXT DEFAULT '',\n \"title\" TEXT DEFAULT '',\n \"body\" TEXT DEFAULT '',\n \"state\" TEXT DEFAULT 'open',\n \"author\" TEXT DEFAULT '',\n \"labels\" JSON DEFAULT '[]',\n \"assignees\" JSON DEFAULT '[]',\n \"comments_count\" INTEGER DEFAULT 0,\n \"last_synced_at\" TIMESTAMP,\n \"original_body\" TEXT DEFAULT '',\n \"synthesis_count\" INTEGER DEFAULT 0,\n \"head_ref\" TEXT DEFAULT '',\n \"base_ref\" TEXT DEFAULT '',\n \"merged\" BOOLEAN DEFAULT FALSE,\n \"merged_at\" TIMESTAMP,\n \"mergeable\" BOOLEAN DEFAULT TRUE,\n \"draft\" BOOLEAN DEFAULT FALSE,\n \"additions\" INTEGER DEFAULT 0,\n \"deletions\" INTEGER DEFAULT 0,\n \"changed_files\" INTEGER DEFAULT 0\n);",
1819
+ "ddl": "CREATE TABLE IF NOT EXISTS \"issues\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"repository_id\" UUID,\n \"project_id\" UUID,\n \"number\" INTEGER DEFAULT 0,\n \"node_id\" TEXT DEFAULT '',\n \"title\" TEXT DEFAULT '',\n \"body\" TEXT DEFAULT '',\n \"state\" TEXT DEFAULT 'open',\n \"author\" TEXT DEFAULT '',\n \"labels\" JSON DEFAULT '[]',\n \"assignees\" JSON DEFAULT '[]',\n \"comments_count\" INTEGER DEFAULT 0,\n \"last_synced_at\" TIMESTAMP,\n \"original_body\" TEXT DEFAULT '',\n \"synthesis_count\" INTEGER DEFAULT 0,\n \"head_ref\" TEXT DEFAULT '',\n \"base_ref\" TEXT DEFAULT '',\n \"merged\" BOOLEAN DEFAULT FALSE,\n \"merged_at\" TIMESTAMP,\n \"mergeable\" BOOLEAN DEFAULT TRUE,\n \"draft\" BOOLEAN DEFAULT FALSE,\n \"additions\" INTEGER DEFAULT 0,\n \"deletions\" INTEGER DEFAULT 0,\n \"changed_files\" INTEGER DEFAULT 0\n);",
1674
1820
  "columns": {
1675
1821
  "id": {
1676
1822
  "type": "UUID",
@@ -1721,6 +1867,17 @@
1721
1867
  "onUpdate": "CASCADE"
1722
1868
  }
1723
1869
  },
1870
+ "project_id": {
1871
+ "type": "UUID",
1872
+ "referenceKind": "foreignKey",
1873
+ "notNull": false,
1874
+ "foreignKey": {
1875
+ "table": "projects",
1876
+ "column": "id",
1877
+ "onDelete": "NO ACTION",
1878
+ "onUpdate": "CASCADE"
1879
+ }
1880
+ },
1724
1881
  "number": {
1725
1882
  "type": "INTEGER",
1726
1883
  "notNull": false,
@@ -1855,9 +2012,15 @@
1855
2012
  "columns": [
1856
2013
  "repository_id"
1857
2014
  ]
2015
+ },
2016
+ {
2017
+ "name": "issues_project_id_idx",
2018
+ "columns": [
2019
+ "project_id"
2020
+ ]
1858
2021
  }
1859
2022
  ],
1860
- "version": "3f16e583"
2023
+ "version": "0ebf6fbd"
1861
2024
  },
1862
2025
  "importPath": "@happyvertical/smrt-projects"
1863
2026
  },
@@ -2159,7 +2322,11 @@
2159
2322
  "issueId": {
2160
2323
  "type": "foreignKey",
2161
2324
  "required": false,
2162
- "related": "Issue"
2325
+ "related": "Issue",
2326
+ "description": "The issue this comment is on.",
2327
+ "_meta": {
2328
+ "description": "The issue this comment is on."
2329
+ }
2163
2330
  },
2164
2331
  "commentId": {
2165
2332
  "type": "text",
@@ -2169,12 +2336,20 @@
2169
2336
  "body": {
2170
2337
  "type": "text",
2171
2338
  "required": false,
2172
- "default": ""
2339
+ "default": "",
2340
+ "description": "The comment text.",
2341
+ "_meta": {
2342
+ "description": "The comment text."
2343
+ }
2173
2344
  },
2174
2345
  "author": {
2175
2346
  "type": "text",
2176
2347
  "required": false,
2177
- "default": ""
2348
+ "default": "",
2349
+ "description": "Who wrote it.",
2350
+ "_meta": {
2351
+ "description": "Who wrote it."
2352
+ }
2178
2353
  },
2179
2354
  "createdAt": {
2180
2355
  "type": "datetime",
@@ -2908,10 +3083,16 @@
2908
3083
  },
2909
3084
  "repositoryId": {
2910
3085
  "type": "foreignKey",
2911
- "required": true,
2912
- "related": "Repository",
3086
+ "required": false,
3087
+ "related": "Repository"
3088
+ },
3089
+ "projectId": {
3090
+ "type": "foreignKey",
3091
+ "required": false,
3092
+ "related": "Project",
3093
+ "description": "The project this issue belongs to.",
2913
3094
  "_meta": {
2914
- "required": true
3095
+ "description": "The project this issue belongs to."
2915
3096
  }
2916
3097
  },
2917
3098
  "number": {
@@ -2927,17 +3108,29 @@
2927
3108
  "title": {
2928
3109
  "type": "text",
2929
3110
  "required": false,
2930
- "default": ""
3111
+ "default": "",
3112
+ "description": "A short summary of the issue.",
3113
+ "_meta": {
3114
+ "description": "A short summary of the issue."
3115
+ }
2931
3116
  },
2932
3117
  "body": {
2933
3118
  "type": "text",
2934
3119
  "required": false,
2935
- "default": ""
3120
+ "default": "",
3121
+ "description": "The full description.",
3122
+ "_meta": {
3123
+ "description": "The full description."
3124
+ }
2936
3125
  },
2937
3126
  "state": {
2938
3127
  "type": "text",
2939
3128
  "required": false,
2940
3129
  "default": "open",
3130
+ "description": "open or closed.",
3131
+ "_meta": {
3132
+ "description": "open or closed."
3133
+ },
2941
3134
  "enum": [
2942
3135
  "open",
2943
3136
  "closed"
@@ -2946,17 +3139,29 @@
2946
3139
  "author": {
2947
3140
  "type": "text",
2948
3141
  "required": false,
2949
- "default": ""
3142
+ "default": "",
3143
+ "description": "Who raised the issue.",
3144
+ "_meta": {
3145
+ "description": "Who raised the issue."
3146
+ }
2950
3147
  },
2951
3148
  "labels": {
2952
3149
  "type": "json",
2953
3150
  "required": false,
2954
- "default": []
3151
+ "default": [],
3152
+ "description": "The labels attached to the issue.",
3153
+ "_meta": {
3154
+ "description": "The labels attached to the issue."
3155
+ }
2955
3156
  },
2956
3157
  "assignees": {
2957
3158
  "type": "json",
2958
3159
  "required": false,
2959
- "default": []
3160
+ "default": [],
3161
+ "description": "The people working on it.",
3162
+ "_meta": {
3163
+ "description": "The people working on it."
3164
+ }
2960
3165
  },
2961
3166
  "commentsCount": {
2962
3167
  "type": "integer",
@@ -2979,6 +3184,14 @@
2979
3184
  }
2980
3185
  },
2981
3186
  "methods": {
3187
+ "hasRepository": {
3188
+ "name": "hasRepository",
3189
+ "async": false,
3190
+ "parameters": [],
3191
+ "returnType": "boolean",
3192
+ "isStatic": false,
3193
+ "isPublic": true
3194
+ },
2982
3195
  "getRepository": {
2983
3196
  "name": "getRepository",
2984
3197
  "async": true,
@@ -3200,16 +3413,9 @@
3200
3413
  "exportName": "Issue",
3201
3414
  "collectionExportName": "IssueCollection",
3202
3415
  "displayLabelField": "title",
3203
- "validationRules": [
3204
- {
3205
- "field": "repositoryId",
3206
- "rule": "required",
3207
- "fieldType": "foreignKey"
3208
- }
3209
- ],
3210
3416
  "schema": {
3211
3417
  "tableName": "issues",
3212
- "ddl": "CREATE TABLE IF NOT EXISTS \"issues\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"repository_id\" UUID,\n \"number\" INTEGER DEFAULT 0,\n \"node_id\" TEXT DEFAULT '',\n \"title\" TEXT DEFAULT '',\n \"body\" TEXT DEFAULT '',\n \"state\" TEXT DEFAULT 'open',\n \"author\" TEXT DEFAULT '',\n \"labels\" JSON DEFAULT '[]',\n \"assignees\" JSON DEFAULT '[]',\n \"comments_count\" INTEGER DEFAULT 0,\n \"last_synced_at\" TIMESTAMP,\n \"original_body\" TEXT DEFAULT '',\n \"synthesis_count\" INTEGER DEFAULT 0,\n \"head_ref\" TEXT DEFAULT '',\n \"base_ref\" TEXT DEFAULT '',\n \"merged\" BOOLEAN DEFAULT FALSE,\n \"merged_at\" TIMESTAMP,\n \"mergeable\" BOOLEAN DEFAULT TRUE,\n \"draft\" BOOLEAN DEFAULT FALSE,\n \"additions\" INTEGER DEFAULT 0,\n \"deletions\" INTEGER DEFAULT 0,\n \"changed_files\" INTEGER DEFAULT 0\n);",
3418
+ "ddl": "CREATE TABLE IF NOT EXISTS \"issues\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"repository_id\" UUID,\n \"project_id\" UUID,\n \"number\" INTEGER DEFAULT 0,\n \"node_id\" TEXT DEFAULT '',\n \"title\" TEXT DEFAULT '',\n \"body\" TEXT DEFAULT '',\n \"state\" TEXT DEFAULT 'open',\n \"author\" TEXT DEFAULT '',\n \"labels\" JSON DEFAULT '[]',\n \"assignees\" JSON DEFAULT '[]',\n \"comments_count\" INTEGER DEFAULT 0,\n \"last_synced_at\" TIMESTAMP,\n \"original_body\" TEXT DEFAULT '',\n \"synthesis_count\" INTEGER DEFAULT 0,\n \"head_ref\" TEXT DEFAULT '',\n \"base_ref\" TEXT DEFAULT '',\n \"merged\" BOOLEAN DEFAULT FALSE,\n \"merged_at\" TIMESTAMP,\n \"mergeable\" BOOLEAN DEFAULT TRUE,\n \"draft\" BOOLEAN DEFAULT FALSE,\n \"additions\" INTEGER DEFAULT 0,\n \"deletions\" INTEGER DEFAULT 0,\n \"changed_files\" INTEGER DEFAULT 0\n);",
3213
3419
  "columns": {
3214
3420
  "id": {
3215
3421
  "type": "UUID",
@@ -3260,6 +3466,17 @@
3260
3466
  "onUpdate": "CASCADE"
3261
3467
  }
3262
3468
  },
3469
+ "project_id": {
3470
+ "type": "UUID",
3471
+ "referenceKind": "foreignKey",
3472
+ "notNull": false,
3473
+ "foreignKey": {
3474
+ "table": "projects",
3475
+ "column": "id",
3476
+ "onDelete": "NO ACTION",
3477
+ "onUpdate": "CASCADE"
3478
+ }
3479
+ },
3263
3480
  "number": {
3264
3481
  "type": "INTEGER",
3265
3482
  "notNull": false,
@@ -3394,9 +3611,15 @@
3394
3611
  "columns": [
3395
3612
  "repository_id"
3396
3613
  ]
3614
+ },
3615
+ {
3616
+ "name": "issues_project_id_idx",
3617
+ "columns": [
3618
+ "project_id"
3619
+ ]
3397
3620
  }
3398
3621
  ],
3399
- "version": "c3d5425b"
3622
+ "version": "83fb5e05"
3400
3623
  },
3401
3624
  "importPath": "@happyvertical/smrt-projects"
3402
3625
  },
@@ -3413,20 +3636,41 @@
3413
3636
  "required": false,
3414
3637
  "related": "Repository"
3415
3638
  },
3639
+ "projectId": {
3640
+ "type": "foreignKey",
3641
+ "required": false,
3642
+ "related": "Project",
3643
+ "description": "The project this label belongs to.",
3644
+ "_meta": {
3645
+ "description": "The project this label belongs to."
3646
+ }
3647
+ },
3416
3648
  "name": {
3417
3649
  "type": "text",
3418
3650
  "required": false,
3419
- "default": ""
3651
+ "default": "",
3652
+ "description": "The label's name, for example bug.",
3653
+ "_meta": {
3654
+ "description": "The label's name, for example bug."
3655
+ }
3420
3656
  },
3421
3657
  "color": {
3422
3658
  "type": "text",
3423
3659
  "required": false,
3424
- "default": ""
3660
+ "default": "",
3661
+ "description": "The label's colour.",
3662
+ "_meta": {
3663
+ "description": "The label's colour."
3664
+ }
3425
3665
  },
3426
3666
  "description": {
3427
3667
  "type": "text",
3428
3668
  "required": false,
3429
- "default": ""
3669
+ "default": "",
3670
+ "description": "What the label means.",
3671
+ "_meta": {
3672
+ "description": "What the label means."
3673
+ }
3430
3674
  }
3431
3675
  },
3432
3676
  "methods": {
@@ -3528,7 +3772,7 @@
3528
3772
  "displayLabelField": "name",
3529
3773
  "schema": {
3530
3774
  "tableName": "labels",
3531
- "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);",
3775
+ "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 \"project_id\" UUID,\n \"name\" TEXT DEFAULT '',\n \"color\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT ''\n);",
3532
3776
  "columns": {
3533
3777
  "id": {
3534
3778
  "type": "UUID",
@@ -3567,6 +3811,18 @@
3567
3811
  "onUpdate": "CASCADE"
3568
3812
  }
3569
3813
  },
3814
+ "project_id": {
3815
+ "type": "UUID",
3816
+ "referenceKind": "foreignKey",
3817
+ "notNull": false,
3818
+ "unique": false,
3819
+ "foreignKey": {
3820
+ "table": "projects",
3821
+ "column": "id",
3822
+ "onDelete": "NO ACTION",
3823
+ "onUpdate": "CASCADE"
3824
+ }
3825
+ },
3570
3826
  "name": {
3571
3827
  "type": "TEXT",
3572
3828
  "notNull": false,
@@ -3606,9 +3862,15 @@
3606
3862
  "columns": [
3607
3863
  "repository_id"
3608
3864
  ]
3865
+ },
3866
+ {
3867
+ "name": "labels_project_id_idx",
3868
+ "columns": [
3869
+ "project_id"
3870
+ ]
3609
3871
  }
3610
3872
  ],
3611
- "version": "d1e8d236"
3873
+ "version": "664f110a"
3612
3874
  },
3613
3875
  "importPath": "@happyvertical/smrt-projects"
3614
3876
  },
@@ -3651,22 +3913,38 @@
3651
3913
  "title": {
3652
3914
  "type": "text",
3653
3915
  "required": false,
3654
- "default": ""
3916
+ "default": "",
3917
+ "description": "The project's name.",
3918
+ "_meta": {
3919
+ "description": "The project's name."
3920
+ }
3655
3921
  },
3656
3922
  "description": {
3657
3923
  "type": "text",
3658
3924
  "required": false,
3659
- "default": ""
3925
+ "default": "",
3926
+ "description": "What the project is about.",
3927
+ "_meta": {
3928
+ "description": "What the project is about."
3929
+ }
3660
3930
  },
3661
3931
  "owner": {
3662
3932
  "type": "text",
3663
3933
  "required": false,
3664
- "default": ""
3934
+ "default": "",
3935
+ "description": "Who owns or runs the project.",
3936
+ "_meta": {
3937
+ "description": "Who owns or runs the project."
3938
+ }
3665
3939
  },
3666
3940
  "url": {
3667
3941
  "type": "text",
3668
3942
  "required": false,
3669
- "default": ""
3943
+ "default": "",
3944
+ "description": "A link to the project elsewhere.",
3945
+ "_meta": {
3946
+ "description": "A link to the project elsewhere."
3947
+ }
3670
3948
  },
3671
3949
  "providerType": {
3672
3950
  "type": "text",
@@ -4528,10 +4806,16 @@
4528
4806
  },
4529
4807
  "repositoryId": {
4530
4808
  "type": "foreignKey",
4531
- "required": true,
4532
- "related": "Repository",
4809
+ "required": false,
4810
+ "related": "Repository"
4811
+ },
4812
+ "projectId": {
4813
+ "type": "foreignKey",
4814
+ "required": false,
4815
+ "related": "Project",
4816
+ "description": "The project this issue belongs to.",
4533
4817
  "_meta": {
4534
- "required": true
4818
+ "description": "The project this issue belongs to."
4535
4819
  }
4536
4820
  },
4537
4821
  "number": {
@@ -4547,17 +4831,29 @@
4547
4831
  "title": {
4548
4832
  "type": "text",
4549
4833
  "required": false,
4550
- "default": ""
4834
+ "default": "",
4835
+ "description": "A short summary of the issue.",
4836
+ "_meta": {
4837
+ "description": "A short summary of the issue."
4838
+ }
4551
4839
  },
4552
4840
  "body": {
4553
4841
  "type": "text",
4554
4842
  "required": false,
4555
- "default": ""
4843
+ "default": "",
4844
+ "description": "The full description.",
4845
+ "_meta": {
4846
+ "description": "The full description."
4847
+ }
4556
4848
  },
4557
4849
  "state": {
4558
4850
  "type": "text",
4559
4851
  "required": false,
4560
4852
  "default": "open",
4853
+ "description": "open or closed.",
4854
+ "_meta": {
4855
+ "description": "open or closed."
4856
+ },
4561
4857
  "enum": [
4562
4858
  "open",
4563
4859
  "closed"
@@ -4566,17 +4862,29 @@
4566
4862
  "author": {
4567
4863
  "type": "text",
4568
4864
  "required": false,
4569
- "default": ""
4865
+ "default": "",
4866
+ "description": "Who raised the issue.",
4867
+ "_meta": {
4868
+ "description": "Who raised the issue."
4869
+ }
4570
4870
  },
4571
4871
  "labels": {
4572
4872
  "type": "json",
4573
4873
  "required": false,
4574
- "default": []
4874
+ "default": [],
4875
+ "description": "The labels attached to the issue.",
4876
+ "_meta": {
4877
+ "description": "The labels attached to the issue."
4878
+ }
4575
4879
  },
4576
4880
  "assignees": {
4577
4881
  "type": "json",
4578
4882
  "required": false,
4579
- "default": []
4883
+ "default": [],
4884
+ "description": "The people working on it.",
4885
+ "_meta": {
4886
+ "description": "The people working on it."
4887
+ }
4580
4888
  },
4581
4889
  "commentsCount": {
4582
4890
  "type": "integer",
@@ -4643,6 +4951,14 @@
4643
4951
  }
4644
4952
  },
4645
4953
  "methods": {
4954
+ "hasRepository": {
4955
+ "name": "hasRepository",
4956
+ "async": false,
4957
+ "parameters": [],
4958
+ "returnType": "boolean",
4959
+ "isStatic": false,
4960
+ "isPublic": true
4961
+ },
4646
4962
  "getRepository": {
4647
4963
  "name": "getRepository",
4648
4964
  "async": true,
@@ -4946,16 +5262,9 @@
4946
5262
  "exportName": "PullRequest",
4947
5263
  "collectionExportName": "PullRequestCollection",
4948
5264
  "displayLabelField": "title",
4949
- "validationRules": [
4950
- {
4951
- "field": "repositoryId",
4952
- "rule": "required",
4953
- "fieldType": "foreignKey"
4954
- }
4955
- ],
4956
5265
  "schema": {
4957
5266
  "tableName": "issues",
4958
- "ddl": "CREATE TABLE IF NOT EXISTS \"issues\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"repository_id\" UUID,\n \"number\" INTEGER DEFAULT 0,\n \"node_id\" TEXT DEFAULT '',\n \"title\" TEXT DEFAULT '',\n \"body\" TEXT DEFAULT '',\n \"state\" TEXT DEFAULT 'open',\n \"author\" TEXT DEFAULT '',\n \"labels\" JSON DEFAULT '[]',\n \"assignees\" JSON DEFAULT '[]',\n \"comments_count\" INTEGER DEFAULT 0,\n \"last_synced_at\" TIMESTAMP,\n \"original_body\" TEXT DEFAULT '',\n \"synthesis_count\" INTEGER DEFAULT 0,\n \"head_ref\" TEXT DEFAULT '',\n \"base_ref\" TEXT DEFAULT '',\n \"merged\" BOOLEAN DEFAULT FALSE,\n \"merged_at\" TIMESTAMP,\n \"mergeable\" BOOLEAN DEFAULT TRUE,\n \"draft\" BOOLEAN DEFAULT FALSE,\n \"additions\" INTEGER DEFAULT 0,\n \"deletions\" INTEGER DEFAULT 0,\n \"changed_files\" INTEGER DEFAULT 0\n);",
5267
+ "ddl": "CREATE TABLE IF NOT EXISTS \"issues\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"repository_id\" UUID,\n \"project_id\" UUID,\n \"number\" INTEGER DEFAULT 0,\n \"node_id\" TEXT DEFAULT '',\n \"title\" TEXT DEFAULT '',\n \"body\" TEXT DEFAULT '',\n \"state\" TEXT DEFAULT 'open',\n \"author\" TEXT DEFAULT '',\n \"labels\" JSON DEFAULT '[]',\n \"assignees\" JSON DEFAULT '[]',\n \"comments_count\" INTEGER DEFAULT 0,\n \"last_synced_at\" TIMESTAMP,\n \"original_body\" TEXT DEFAULT '',\n \"synthesis_count\" INTEGER DEFAULT 0,\n \"head_ref\" TEXT DEFAULT '',\n \"base_ref\" TEXT DEFAULT '',\n \"merged\" BOOLEAN DEFAULT FALSE,\n \"merged_at\" TIMESTAMP,\n \"mergeable\" BOOLEAN DEFAULT TRUE,\n \"draft\" BOOLEAN DEFAULT FALSE,\n \"additions\" INTEGER DEFAULT 0,\n \"deletions\" INTEGER DEFAULT 0,\n \"changed_files\" INTEGER DEFAULT 0\n);",
4959
5268
  "columns": {
4960
5269
  "id": {
4961
5270
  "type": "UUID",
@@ -5006,6 +5315,17 @@
5006
5315
  "onUpdate": "CASCADE"
5007
5316
  }
5008
5317
  },
5318
+ "project_id": {
5319
+ "type": "UUID",
5320
+ "referenceKind": "foreignKey",
5321
+ "notNull": false,
5322
+ "foreignKey": {
5323
+ "table": "projects",
5324
+ "column": "id",
5325
+ "onDelete": "NO ACTION",
5326
+ "onUpdate": "CASCADE"
5327
+ }
5328
+ },
5009
5329
  "number": {
5010
5330
  "type": "INTEGER",
5011
5331
  "notNull": false,
@@ -5140,9 +5460,15 @@
5140
5460
  "columns": [
5141
5461
  "repository_id"
5142
5462
  ]
5463
+ },
5464
+ {
5465
+ "name": "issues_project_id_idx",
5466
+ "columns": [
5467
+ "project_id"
5468
+ ]
5143
5469
  }
5144
5470
  ],
5145
- "version": "3f16e583"
5471
+ "version": "0ebf6fbd"
5146
5472
  },
5147
5473
  "importPath": "@happyvertical/smrt-projects"
5148
5474
  },
@@ -5523,6 +5849,7 @@
5523
5849
  "className": "DevelopmentRequestWorkLink",
5524
5850
  "qualifiedName": "@happyvertical/smrt-projects:DevelopmentRequestWorkLink",
5525
5851
  "collection": "developmentrequestworklinks",
5852
+ "description": "Provider-neutral connection from a Development Request to canonical work.",
5526
5853
  "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/delivery-control-plane.ts",
5527
5854
  "packageName": "@happyvertical/smrt-projects",
5528
5855
  "fields": {
@@ -5719,6 +6046,7 @@
5719
6046
  "className": "ProjectDeliveryEvent",
5720
6047
  "qualifiedName": "@happyvertical/smrt-projects:ProjectDeliveryEvent",
5721
6048
  "collection": "projectdeliveryevents",
6049
+ "description": "Ordered, idempotent delivery update emitted by the control plane.",
5722
6050
  "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/delivery-control-plane.ts",
5723
6051
  "packageName": "@happyvertical/smrt-projects",
5724
6052
  "fields": {
@@ -5976,6 +6304,7 @@
5976
6304
  "className": "PreviewApproval",
5977
6305
  "qualifiedName": "@happyvertical/smrt-projects:PreviewApproval",
5978
6306
  "collection": "previewapprovals",
6307
+ "description": "Client decision state for one preview produced during delivery.",
5979
6308
  "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/delivery-control-plane.ts",
5980
6309
  "packageName": "@happyvertical/smrt-projects",
5981
6310
  "fields": {
@@ -6189,6 +6518,7 @@
6189
6518
  "className": "AssistanceRequest",
6190
6519
  "qualifiedName": "@happyvertical/smrt-projects:AssistanceRequest",
6191
6520
  "collection": "assistancerequests",
6521
+ "description": "Lossless conversational intake before support/development classification.",
6192
6522
  "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/delivery-control-plane.ts",
6193
6523
  "packageName": "@happyvertical/smrt-projects",
6194
6524
  "fields": {
@@ -6423,6 +6753,7 @@
6423
6753
  "className": "AssistanceRequestEvent",
6424
6754
  "qualifiedName": "@happyvertical/smrt-projects:AssistanceRequestEvent",
6425
6755
  "collection": "assistancerequestevents",
6756
+ "description": "Append-only explanation of Assistance Request routing decisions.",
6426
6757
  "filePath": "/home/runner/work/smrt/smrt/packages/projects/src/models/delivery-control-plane.ts",
6427
6758
  "packageName": "@happyvertical/smrt-projects",
6428
6759
  "fields": {
@@ -7305,6 +7636,145 @@
7305
7636
  }
7306
7637
  },
7307
7638
  "moduleType": "smrt",
7639
+ "recipes": [
7640
+ {
7641
+ "id": "projects.tracker",
7642
+ "className": "ProjectTrackerRecipe",
7643
+ "label": "Projects",
7644
+ "summary": "Track projects and the issues, labels and comments inside them.",
7645
+ "synonyms": [
7646
+ "issues",
7647
+ "tasks",
7648
+ "tickets",
7649
+ "bugs",
7650
+ "kanban"
7651
+ ],
7652
+ "models": [
7653
+ "@happyvertical/smrt-projects:Project",
7654
+ "@happyvertical/smrt-projects:Issue",
7655
+ "@happyvertical/smrt-projects:Label",
7656
+ "@happyvertical/smrt-projects:Comment"
7657
+ ],
7658
+ "nav": [
7659
+ {
7660
+ "label": "Projects",
7661
+ "model": "@happyvertical/smrt-projects:Project",
7662
+ "icon": "folder",
7663
+ "description": "Bigger jobs broken into steps you can follow."
7664
+ },
7665
+ {
7666
+ "label": "Issues",
7667
+ "model": "@happyvertical/smrt-projects:Issue",
7668
+ "icon": "wrench",
7669
+ "description": "Problems and to-dos to track until they are done."
7670
+ },
7671
+ {
7672
+ "label": "Labels",
7673
+ "model": "@happyvertical/smrt-projects:Label",
7674
+ "icon": "tag",
7675
+ "description": "Tags to sort your projects and issues your way."
7676
+ }
7677
+ ],
7678
+ "requires": [],
7679
+ "section": {
7680
+ "id": "projects",
7681
+ "label": "Projects",
7682
+ "icon": "briefcase",
7683
+ "description": "Projects, their issues, labels and comments."
7684
+ },
7685
+ "options": {
7686
+ "@happyvertical/smrt-projects:Project": {
7687
+ "fields": {
7688
+ "projectId": {
7689
+ "visibility": "hidden"
7690
+ },
7691
+ "projectNumber": {
7692
+ "visibility": "hidden"
7693
+ },
7694
+ "providerType": {
7695
+ "visibility": "hidden"
7696
+ },
7697
+ "tokenConfigKey": {
7698
+ "visibility": "hidden"
7699
+ },
7700
+ "statuses": {
7701
+ "visibility": "hidden"
7702
+ },
7703
+ "fields": {
7704
+ "visibility": "hidden"
7705
+ },
7706
+ "statusFieldId": {
7707
+ "visibility": "hidden"
7708
+ },
7709
+ "statusOptions": {
7710
+ "visibility": "hidden"
7711
+ },
7712
+ "lastSyncedAt": {
7713
+ "visibility": "hidden"
7714
+ }
7715
+ }
7716
+ },
7717
+ "@happyvertical/smrt-projects:Issue": {
7718
+ "fields": {
7719
+ "nodeId": {
7720
+ "visibility": "hidden"
7721
+ },
7722
+ "originalBody": {
7723
+ "visibility": "hidden"
7724
+ },
7725
+ "synthesisCount": {
7726
+ "visibility": "hidden"
7727
+ },
7728
+ "lastSyncedAt": {
7729
+ "visibility": "hidden"
7730
+ },
7731
+ "commentsCount": {
7732
+ "visibility": "hidden"
7733
+ },
7734
+ "repositoryId": {
7735
+ "visibility": "hidden"
7736
+ },
7737
+ "number": {
7738
+ "visibility": "hidden"
7739
+ }
7740
+ }
7741
+ },
7742
+ "@happyvertical/smrt-projects:Comment": {
7743
+ "fields": {
7744
+ "commentId": {
7745
+ "visibility": "hidden"
7746
+ },
7747
+ "url": {
7748
+ "visibility": "hidden"
7749
+ }
7750
+ }
7751
+ },
7752
+ "@happyvertical/smrt-projects:Label": {
7753
+ "fields": {
7754
+ "repositoryId": {
7755
+ "visibility": "hidden"
7756
+ }
7757
+ }
7758
+ }
7759
+ },
7760
+ "help": {
7761
+ "markdown": "## Overview\n\nProjects tracks the work you are planning: projects, the issues in them, and\nthe labels and comments that organise them.\n\n## Tasks\n\n### Start a project\n\n1. Create a new project.\n2. Give it a **{field:title}** and a **{field:description}**.\n\n### Log an issue\n\n1. Create a new issue and pick the **{field:projectId}**.\n2. Write a **{field:title}** and a **{field:body}**.\n3. Close it by setting **{field:state}** to closed. Comments are attached to the\n issue.\n",
7762
+ "fieldRefs": [
7763
+ "body",
7764
+ "description",
7765
+ "projectId",
7766
+ "state",
7767
+ "title"
7768
+ ]
7769
+ },
7770
+ "demo": {
7771
+ "mode": "server",
7772
+ "reasons": [
7773
+ "Needs a server because its package does not build for a browser: node:crypto/async_hooks; core migrations; repos and ai SDKs; and its package depends on @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, @happyvertical/smrt-timesheets, which do not build for a browser (#3624, #3626, #3627)."
7774
+ ]
7775
+ }
7776
+ }
7777
+ ],
7308
7778
  "smrtDependencies": [
7309
7779
  "@happyvertical/smrt-core",
7310
7780
  "@happyvertical/smrt-prompts",
@@ -7312,5 +7782,19 @@
7312
7782
  "@happyvertical/smrt-tenancy",
7313
7783
  "@happyvertical/smrt-timesheets"
7314
7784
  ],
7785
+ "browser": {
7786
+ "status": "server-only",
7787
+ "issues": [
7788
+ "#3624",
7789
+ "#3626",
7790
+ "#3627"
7791
+ ],
7792
+ "reason": "node:crypto/async_hooks; core migrations; repos and ai SDKs",
7793
+ "via": [
7794
+ "@happyvertical/smrt-subscriptions",
7795
+ "@happyvertical/smrt-tenancy",
7796
+ "@happyvertical/smrt-timesheets"
7797
+ ]
7798
+ },
7315
7799
  "stampsConstructors": true
7316
7800
  }