forges 0.0.0 → 0.1.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.
Files changed (152) hide show
  1. package/LICENCE +21 -0
  2. package/README.md +72 -0
  3. package/dist/azure-devops/index.d.mts +2 -0
  4. package/dist/azure-devops/index.mjs +1 -0
  5. package/dist/azure-devops-DwQvL4TV.mjs +1355 -0
  6. package/dist/bitbucket/index.d.mts +2 -0
  7. package/dist/bitbucket/index.mjs +1 -0
  8. package/dist/bitbucket-CpcfJlYi.mjs +1171 -0
  9. package/dist/crypto-CQNEyYHD.mjs +156 -0
  10. package/dist/cursor-origin/index.d.mts +2 -0
  11. package/dist/cursor-origin/index.mjs +1 -0
  12. package/dist/cursor-origin-BhqYx2oW.mjs +980 -0
  13. package/dist/define-B2_4ob2i.d.mts +307 -0
  14. package/dist/define-D3yEXtKK.mjs +2276 -0
  15. package/dist/env.d.mts +46 -0
  16. package/dist/env.mjs +283 -0
  17. package/dist/fake/index.d.mts +227 -0
  18. package/dist/fake/index.mjs +1001 -0
  19. package/dist/fetch-D4pSRvvA.d.mts +1723 -0
  20. package/dist/forgejo/index.d.mts +2 -0
  21. package/dist/forgejo/index.mjs +1 -0
  22. package/dist/forgejo-BCefbHUN.mjs +2005 -0
  23. package/dist/gitea/index.d.mts +2 -0
  24. package/dist/gitea/index.mjs +22 -0
  25. package/dist/gitee/index.d.mts +2 -0
  26. package/dist/gitee/index.mjs +1 -0
  27. package/dist/gitee-CA-f7Rs8.mjs +1272 -0
  28. package/dist/github/index.d.mts +2 -0
  29. package/dist/github/index.mjs +1 -0
  30. package/dist/github-B0umL8_f.mjs +3259 -0
  31. package/dist/gitlab/index.d.mts +2 -0
  32. package/dist/gitlab/index.mjs +1 -0
  33. package/dist/gitlab-Bsr__Z0C.mjs +2378 -0
  34. package/dist/graphql-D7uGzZTf.mjs +366 -0
  35. package/dist/index-BQ6VS31s.d.mts +32 -0
  36. package/dist/index-C-jz9Mo3.d.mts +16 -0
  37. package/dist/index-C4fYzmK3.d.mts +102 -0
  38. package/dist/index-CQiIX4SH.d.mts +27 -0
  39. package/dist/index-CTj5gQzl.d.mts +35 -0
  40. package/dist/index-CliBWzOF.d.mts +23 -0
  41. package/dist/index-Cz_y-t3d.d.mts +36 -0
  42. package/dist/index-DEt25E1w.d.mts +77 -0
  43. package/dist/index-DIuS0EOy.d.mts +43 -0
  44. package/dist/index-uSpsMCrC.d.mts +26 -0
  45. package/dist/index.d.mts +41 -0
  46. package/dist/index.mjs +13 -0
  47. package/dist/kit.d.mts +183 -0
  48. package/dist/kit.mjs +4 -0
  49. package/dist/provider-CoZ7cCxp.d.mts +1439 -0
  50. package/dist/provider-Ed1YhkQN.mjs +169 -0
  51. package/dist/pushin/index.d.mts +2 -0
  52. package/dist/pushin/index.mjs +1 -0
  53. package/dist/pushin-CkxgJ2cU.mjs +343 -0
  54. package/dist/schema/Actor.json +96 -0
  55. package/dist/schema/AlertSupport.json +49 -0
  56. package/dist/schema/AuthKind.json +15 -0
  57. package/dist/schema/Branch.json +31 -0
  58. package/dist/schema/ChangedFile.json +58 -0
  59. package/dist/schema/Check.json +169 -0
  60. package/dist/schema/CheckRef.json +114 -0
  61. package/dist/schema/CheckState.json +14 -0
  62. package/dist/schema/ChecksSummary.json +34 -0
  63. package/dist/schema/CiJob.json +186 -0
  64. package/dist/schema/CiJobRef.json +132 -0
  65. package/dist/schema/CiRun.json +234 -0
  66. package/dist/schema/CiRunRef.json +103 -0
  67. package/dist/schema/CodeFragment.json +19 -0
  68. package/dist/schema/CodeMatch.json +128 -0
  69. package/dist/schema/Collaborator.json +169 -0
  70. package/dist/schema/Comment.json +336 -0
  71. package/dist/schema/CommentRef.json +158 -0
  72. package/dist/schema/Commit.json +307 -0
  73. package/dist/schema/CommitRef.json +104 -0
  74. package/dist/schema/CommitSignature.json +118 -0
  75. package/dist/schema/Comparison.json +355 -0
  76. package/dist/schema/Cursor.json +21 -0
  77. package/dist/schema/EventAction.json +33 -0
  78. package/dist/schema/EventDetail.json +649 -0
  79. package/dist/schema/EventKind.json +26 -0
  80. package/dist/schema/FileContent.json +73 -0
  81. package/dist/schema/FileStatus.json +15 -0
  82. package/dist/schema/ForgeCapabilities.json +737 -0
  83. package/dist/schema/ForgeEvent.json +789 -0
  84. package/dist/schema/ForgeInstance.json +7 -0
  85. package/dist/schema/ForgeKind.json +32 -0
  86. package/dist/schema/ForgeWarning.json +49 -0
  87. package/dist/schema/ForgeWarningCode.json +7 -0
  88. package/dist/schema/GetManyResult.json +699 -0
  89. package/dist/schema/Installation.json +131 -0
  90. package/dist/schema/InstallationToken.json +31 -0
  91. package/dist/schema/KnownForgeKind.json +19 -0
  92. package/dist/schema/Label.json +22 -0
  93. package/dist/schema/MergeMethod.json +14 -0
  94. package/dist/schema/Milestone.json +40 -0
  95. package/dist/schema/Notification.json +498 -0
  96. package/dist/schema/NotificationReason.json +28 -0
  97. package/dist/schema/NotificationRef.json +60 -0
  98. package/dist/schema/NotificationSubject.json +376 -0
  99. package/dist/schema/PerKind.json +49 -0
  100. package/dist/schema/PullBranches.json +125 -0
  101. package/dist/schema/PushCommit.json +24 -0
  102. package/dist/schema/Reaction.json +148 -0
  103. package/dist/schema/ReactionContent.json +17 -0
  104. package/dist/schema/ReactionSummary.json +70 -0
  105. package/dist/schema/Release.json +286 -0
  106. package/dist/schema/ReleaseAsset.json +169 -0
  107. package/dist/schema/ReleaseAssetRef.json +138 -0
  108. package/dist/schema/ReleaseRef.json +107 -0
  109. package/dist/schema/Repo.json +354 -0
  110. package/dist/schema/RepoFeatures.json +35 -0
  111. package/dist/schema/RepoPermissions.json +35 -0
  112. package/dist/schema/RepoRef.json +77 -0
  113. package/dist/schema/RepoRole.json +15 -0
  114. package/dist/schema/RepoVisibility.json +12 -0
  115. package/dist/schema/Review.json +371 -0
  116. package/dist/schema/ReviewComment.json +280 -0
  117. package/dist/schema/ReviewCommentInput.json +34 -0
  118. package/dist/schema/ReviewRef.json +158 -0
  119. package/dist/schema/ReviewState.json +15 -0
  120. package/dist/schema/Reviewer.json +133 -0
  121. package/dist/schema/SecurityAlert.json +219 -0
  122. package/dist/schema/SecurityAlertKind.json +14 -0
  123. package/dist/schema/SecurityAlertRef.json +122 -0
  124. package/dist/schema/SecuritySeverity.json +14 -0
  125. package/dist/schema/SourceKind.json +12 -0
  126. package/dist/schema/SubscriptionState.json +12 -0
  127. package/dist/schema/Support.json +23 -0
  128. package/dist/schema/Tag.json +25 -0
  129. package/dist/schema/TextLimits.json +18 -0
  130. package/dist/schema/Thread.json +653 -0
  131. package/dist/schema/ThreadKind.json +14 -0
  132. package/dist/schema/ThreadRef.json +131 -0
  133. package/dist/schema/ThreadStack.json +146 -0
  134. package/dist/schema/ThreadState.json +13 -0
  135. package/dist/schema/TreeEntry.json +46 -0
  136. package/dist/schema/TreeEntryType.json +13 -0
  137. package/dist/schema/UpsertCommentResult.json +355 -0
  138. package/dist/schema/User.json +123 -0
  139. package/dist/schema/Webhook.json +188 -0
  140. package/dist/schema/WebhookDeliveryRecord.json +173 -0
  141. package/dist/schema/WebhookDeliveryRef.json +135 -0
  142. package/dist/schema/WebhookRef.json +105 -0
  143. package/dist/schema/index.d.mts +4 -0
  144. package/dist/schema/index.mjs +3219 -0
  145. package/dist/tangled/index.d.mts +2 -0
  146. package/dist/tangled/index.mjs +1 -0
  147. package/dist/tangled-ChdPmiv-.mjs +1570 -0
  148. package/dist/testing/index.d.mts +123 -0
  149. package/dist/testing/index.mjs +242 -0
  150. package/dist/webhooks-rn9-8lxT.mjs +70 -0
  151. package/package.json +115 -3
  152. package/dist/.gitkeep +0 -0
@@ -0,0 +1,148 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "content": {
6
+ "anyOf": [
7
+ {
8
+ "$ref": "#/definitions/ReactionContent"
9
+ },
10
+ {
11
+ "type": "string",
12
+ "const": "other"
13
+ }
14
+ ],
15
+ "description": "`'other'` where the forge's name has no entry in {@link ReactionContent}."
16
+ },
17
+ "contentRaw": {
18
+ "type": "string",
19
+ "description": "The forge's own name for the reaction, such as a GitLab award emoji or a Forgejo emoji."
20
+ },
21
+ "actor": {
22
+ "$ref": "#/definitions/Actor"
23
+ },
24
+ "createdAt": {
25
+ "type": "string",
26
+ "format": "date-time"
27
+ },
28
+ "raw": {}
29
+ },
30
+ "required": [
31
+ "content",
32
+ "contentRaw",
33
+ "actor",
34
+ "raw"
35
+ ],
36
+ "description": "One reaction left on a thread or a comment, as `threads.reactions()` lists them.",
37
+ "x-forges-type": "Reaction",
38
+ "definitions": {
39
+ "Actor": {
40
+ "type": "object",
41
+ "properties": {
42
+ "forge": {
43
+ "$ref": "#/definitions/ForgeKind"
44
+ },
45
+ "instance": {
46
+ "$ref": "#/definitions/ForgeInstance",
47
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
48
+ },
49
+ "login": {
50
+ "type": "string"
51
+ },
52
+ "id": {
53
+ "type": "string"
54
+ },
55
+ "name": {
56
+ "type": "string"
57
+ },
58
+ "avatarUrl": {
59
+ "type": "string"
60
+ },
61
+ "url": {
62
+ "type": "string"
63
+ },
64
+ "typeRaw": {
65
+ "type": "string",
66
+ "description": "Forge-reported account type, retained verbatim for callers that classify further."
67
+ },
68
+ "isBotHint": {
69
+ "type": "boolean",
70
+ "description": "Hint derived from forge metadata that the actor is automation. Callers own the classification policy."
71
+ },
72
+ "app": {
73
+ "type": "object",
74
+ "properties": {
75
+ "slug": {
76
+ "type": "string"
77
+ },
78
+ "id": {
79
+ "type": "string"
80
+ }
81
+ },
82
+ "required": [
83
+ "slug"
84
+ ],
85
+ "description": "The app behind a bot account, where the forge ties one to it (GitHub Apps' `slug[bot]` users)."
86
+ }
87
+ },
88
+ "required": [
89
+ "forge",
90
+ "id",
91
+ "instance",
92
+ "isBotHint",
93
+ "login"
94
+ ],
95
+ "description": "An account: a user, an organisation or a bot.",
96
+ "x-forges-type": "Actor"
97
+ },
98
+ "ForgeInstance": {
99
+ "type": "string",
100
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
101
+ "x-forges-type": "ForgeInstance"
102
+ },
103
+ "ForgeKind": {
104
+ "anyOf": [
105
+ {
106
+ "$ref": "#/definitions/KnownForgeKind"
107
+ },
108
+ {
109
+ "type": "string"
110
+ }
111
+ ],
112
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
113
+ "x-forges-type": "ForgeKind"
114
+ },
115
+ "KnownForgeKind": {
116
+ "type": "string",
117
+ "enum": [
118
+ "github",
119
+ "gitlab",
120
+ "bitbucket",
121
+ "forgejo",
122
+ "gitea",
123
+ "tangled",
124
+ "gitee",
125
+ "azure-devops",
126
+ "cursor-origin",
127
+ "pushin"
128
+ ],
129
+ "description": "The forges this package ships providers for.",
130
+ "x-forges-type": "KnownForgeKind"
131
+ },
132
+ "ReactionContent": {
133
+ "type": "string",
134
+ "enum": [
135
+ "+1",
136
+ "-1",
137
+ "laugh",
138
+ "confused",
139
+ "heart",
140
+ "hooray",
141
+ "rocket",
142
+ "eyes"
143
+ ],
144
+ "description": "The reactions every forge with reactions has in common, named as GitHub names them. A {@link Reaction} whose forge-native name has no entry here has `content: 'other'`, with the forge-native name in `contentRaw`.",
145
+ "x-forges-type": "ReactionContent"
146
+ }
147
+ }
148
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "string",
4
+ "enum": [
5
+ "+1",
6
+ "-1",
7
+ "laugh",
8
+ "confused",
9
+ "heart",
10
+ "hooray",
11
+ "rocket",
12
+ "eyes"
13
+ ],
14
+ "description": "The reactions every forge with reactions has in common, named as GitHub names them. A {@link Reaction} whose forge-native name has no entry here has `content: 'other'`, with the forge-native name in `contentRaw`.",
15
+ "x-forges-type": "ReactionContent",
16
+ "definitions": {}
17
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "total": {
6
+ "type": "number",
7
+ "description": "The number of reactions of every kind."
8
+ },
9
+ "counts": {
10
+ "type": "object",
11
+ "properties": {
12
+ "+1": {
13
+ "type": "number"
14
+ },
15
+ "-1": {
16
+ "type": "number"
17
+ },
18
+ "laugh": {
19
+ "type": "number"
20
+ },
21
+ "confused": {
22
+ "type": "number"
23
+ },
24
+ "heart": {
25
+ "type": "number"
26
+ },
27
+ "hooray": {
28
+ "type": "number"
29
+ },
30
+ "rocket": {
31
+ "type": "number"
32
+ },
33
+ "eyes": {
34
+ "type": "number"
35
+ }
36
+ },
37
+ "description": "The number of reactions of each kind. A reaction with no {@link ReactionContent} entry has no key here."
38
+ },
39
+ "viewerReacted": {
40
+ "type": "array",
41
+ "items": {
42
+ "$ref": "#/definitions/ReactionContent"
43
+ },
44
+ "description": "Reactions the authenticated account has left. Absent when the forge does not report them."
45
+ }
46
+ },
47
+ "required": [
48
+ "total",
49
+ "counts"
50
+ ],
51
+ "description": "The reactions on a thread or comment, counted.",
52
+ "x-forges-type": "ReactionSummary",
53
+ "definitions": {
54
+ "ReactionContent": {
55
+ "type": "string",
56
+ "enum": [
57
+ "+1",
58
+ "-1",
59
+ "laugh",
60
+ "confused",
61
+ "heart",
62
+ "hooray",
63
+ "rocket",
64
+ "eyes"
65
+ ],
66
+ "description": "The reactions every forge with reactions has in common, named as GitHub names them. A {@link Reaction} whose forge-native name has no entry here has `content: 'other'`, with the forge-native name in `contentRaw`.",
67
+ "x-forges-type": "ReactionContent"
68
+ }
69
+ }
70
+ }
@@ -0,0 +1,286 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "ref": {
6
+ "$ref": "#/definitions/ReleaseRef"
7
+ },
8
+ "name": {
9
+ "type": "string"
10
+ },
11
+ "tag": {
12
+ "type": "string"
13
+ },
14
+ "body": {
15
+ "type": "string",
16
+ "description": "The release notes."
17
+ },
18
+ "isDraft": {
19
+ "type": "boolean"
20
+ },
21
+ "isPrerelease": {
22
+ "type": "boolean"
23
+ },
24
+ "immutable": {
25
+ "type": "boolean",
26
+ "description": "The release is immutable: its tag and assets are locked. `true` where the forge supports immutable releases and this one is published as immutable (GitHub). The name, notes, prerelease and latest flags stay editable."
27
+ },
28
+ "author": {
29
+ "$ref": "#/definitions/Actor"
30
+ },
31
+ "publishedAt": {
32
+ "type": "string",
33
+ "format": "date-time"
34
+ },
35
+ "createdAt": {
36
+ "type": "string",
37
+ "format": "date-time"
38
+ },
39
+ "url": {
40
+ "type": "string"
41
+ },
42
+ "assets": {
43
+ "type": "array",
44
+ "items": {
45
+ "$ref": "#/definitions/ReleaseAsset"
46
+ }
47
+ },
48
+ "raw": {}
49
+ },
50
+ "required": [
51
+ "ref",
52
+ "tag",
53
+ "isDraft",
54
+ "isPrerelease",
55
+ "raw"
56
+ ],
57
+ "description": "A release of a repository.",
58
+ "x-forges-type": "Release",
59
+ "definitions": {
60
+ "Actor": {
61
+ "type": "object",
62
+ "properties": {
63
+ "forge": {
64
+ "$ref": "#/definitions/ForgeKind"
65
+ },
66
+ "instance": {
67
+ "$ref": "#/definitions/ForgeInstance",
68
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
69
+ },
70
+ "login": {
71
+ "type": "string"
72
+ },
73
+ "id": {
74
+ "type": "string"
75
+ },
76
+ "name": {
77
+ "type": "string"
78
+ },
79
+ "avatarUrl": {
80
+ "type": "string"
81
+ },
82
+ "url": {
83
+ "type": "string"
84
+ },
85
+ "typeRaw": {
86
+ "type": "string",
87
+ "description": "Forge-reported account type, retained verbatim for callers that classify further."
88
+ },
89
+ "isBotHint": {
90
+ "type": "boolean",
91
+ "description": "Hint derived from forge metadata that the actor is automation. Callers own the classification policy."
92
+ },
93
+ "app": {
94
+ "type": "object",
95
+ "properties": {
96
+ "slug": {
97
+ "type": "string"
98
+ },
99
+ "id": {
100
+ "type": "string"
101
+ }
102
+ },
103
+ "required": [
104
+ "slug"
105
+ ],
106
+ "description": "The app behind a bot account, where the forge ties one to it (GitHub Apps' `slug[bot]` users)."
107
+ }
108
+ },
109
+ "required": [
110
+ "forge",
111
+ "id",
112
+ "instance",
113
+ "isBotHint",
114
+ "login"
115
+ ],
116
+ "description": "An account: a user, an organisation or a bot.",
117
+ "x-forges-type": "Actor"
118
+ },
119
+ "ForgeInstance": {
120
+ "type": "string",
121
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
122
+ "x-forges-type": "ForgeInstance"
123
+ },
124
+ "ForgeKind": {
125
+ "anyOf": [
126
+ {
127
+ "$ref": "#/definitions/KnownForgeKind"
128
+ },
129
+ {
130
+ "type": "string"
131
+ }
132
+ ],
133
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
134
+ "x-forges-type": "ForgeKind"
135
+ },
136
+ "KnownForgeKind": {
137
+ "type": "string",
138
+ "enum": [
139
+ "github",
140
+ "gitlab",
141
+ "bitbucket",
142
+ "forgejo",
143
+ "gitea",
144
+ "tangled",
145
+ "gitee",
146
+ "azure-devops",
147
+ "cursor-origin",
148
+ "pushin"
149
+ ],
150
+ "description": "The forges this package ships providers for.",
151
+ "x-forges-type": "KnownForgeKind"
152
+ },
153
+ "ReleaseAsset": {
154
+ "type": "object",
155
+ "properties": {
156
+ "ref": {
157
+ "$ref": "#/definitions/ReleaseAssetRef",
158
+ "description": "Absent where the forge publishes a download URL but nothing to address the asset by."
159
+ },
160
+ "name": {
161
+ "type": "string"
162
+ },
163
+ "url": {
164
+ "type": "string"
165
+ },
166
+ "size": {
167
+ "type": "number"
168
+ },
169
+ "downloadCount": {
170
+ "type": "number"
171
+ },
172
+ "contentType": {
173
+ "type": "string",
174
+ "description": "The media type."
175
+ }
176
+ },
177
+ "required": [
178
+ "name",
179
+ "url"
180
+ ],
181
+ "description": "A file attached to a release.",
182
+ "x-forges-type": "ReleaseAsset"
183
+ },
184
+ "ReleaseAssetRef": {
185
+ "type": "object",
186
+ "properties": {
187
+ "forge": {
188
+ "$ref": "#/definitions/ForgeKind"
189
+ },
190
+ "instance": {
191
+ "$ref": "#/definitions/ForgeInstance",
192
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
193
+ },
194
+ "repo": {
195
+ "$ref": "#/definitions/RepoRef"
196
+ },
197
+ "release": {
198
+ "$ref": "#/definitions/ReleaseRef"
199
+ },
200
+ "id": {
201
+ "type": "string",
202
+ "description": "Forge-native asset id; the asset name, or the link id, on forges that have no asset id."
203
+ }
204
+ },
205
+ "required": [
206
+ "forge",
207
+ "id",
208
+ "instance",
209
+ "release",
210
+ "repo"
211
+ ],
212
+ "description": "A release asset, addressable for download with `releases.downloadAsset`.",
213
+ "x-forges-type": "ReleaseAssetRef"
214
+ },
215
+ "ReleaseRef": {
216
+ "type": "object",
217
+ "properties": {
218
+ "forge": {
219
+ "$ref": "#/definitions/ForgeKind"
220
+ },
221
+ "instance": {
222
+ "$ref": "#/definitions/ForgeInstance",
223
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
224
+ },
225
+ "repo": {
226
+ "$ref": "#/definitions/RepoRef"
227
+ },
228
+ "id": {
229
+ "type": "string",
230
+ "description": "Forge-native release id; the tag name on forges that key releases by tag."
231
+ },
232
+ "tag": {
233
+ "type": "string"
234
+ }
235
+ },
236
+ "required": [
237
+ "forge",
238
+ "id",
239
+ "instance",
240
+ "repo"
241
+ ],
242
+ "description": "A release, as a notification subject or event target.",
243
+ "x-forges-type": "ReleaseRef"
244
+ },
245
+ "RepoRef": {
246
+ "type": "object",
247
+ "properties": {
248
+ "forge": {
249
+ "$ref": "#/definitions/ForgeKind"
250
+ },
251
+ "instance": {
252
+ "$ref": "#/definitions/ForgeInstance",
253
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
254
+ },
255
+ "owner": {
256
+ "type": "string",
257
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
258
+ },
259
+ "name": {
260
+ "type": "string",
261
+ "description": "Repository name. Empty for namespace-scoped refs."
262
+ },
263
+ "kind": {
264
+ "type": "string",
265
+ "enum": [
266
+ "repo",
267
+ "namespace"
268
+ ],
269
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
270
+ },
271
+ "externalId": {
272
+ "type": "string",
273
+ "description": "Stable forge-native identifier that survives renames and transfers: a GitHub, Forgejo or Gitea numeric id, a GitLab project or group id, a Bitbucket UUID or a Tangled repo DID. {@link repoKey} prefers it over `owner` and `name`."
274
+ }
275
+ },
276
+ "required": [
277
+ "forge",
278
+ "instance",
279
+ "name",
280
+ "owner"
281
+ ],
282
+ "description": "Addresses a repository by its forge, instance, owner and name.",
283
+ "x-forges-type": "RepoRef"
284
+ }
285
+ }
286
+ }
@@ -0,0 +1,169 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "ref": {
6
+ "$ref": "#/definitions/ReleaseAssetRef",
7
+ "description": "Absent where the forge publishes a download URL but nothing to address the asset by."
8
+ },
9
+ "name": {
10
+ "type": "string"
11
+ },
12
+ "url": {
13
+ "type": "string"
14
+ },
15
+ "size": {
16
+ "type": "number"
17
+ },
18
+ "downloadCount": {
19
+ "type": "number"
20
+ },
21
+ "contentType": {
22
+ "type": "string",
23
+ "description": "The media type."
24
+ }
25
+ },
26
+ "required": [
27
+ "name",
28
+ "url"
29
+ ],
30
+ "description": "A file attached to a release.",
31
+ "x-forges-type": "ReleaseAsset",
32
+ "definitions": {
33
+ "ForgeInstance": {
34
+ "type": "string",
35
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
36
+ "x-forges-type": "ForgeInstance"
37
+ },
38
+ "ForgeKind": {
39
+ "anyOf": [
40
+ {
41
+ "$ref": "#/definitions/KnownForgeKind"
42
+ },
43
+ {
44
+ "type": "string"
45
+ }
46
+ ],
47
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
48
+ "x-forges-type": "ForgeKind"
49
+ },
50
+ "KnownForgeKind": {
51
+ "type": "string",
52
+ "enum": [
53
+ "github",
54
+ "gitlab",
55
+ "bitbucket",
56
+ "forgejo",
57
+ "gitea",
58
+ "tangled",
59
+ "gitee",
60
+ "azure-devops",
61
+ "cursor-origin",
62
+ "pushin"
63
+ ],
64
+ "description": "The forges this package ships providers for.",
65
+ "x-forges-type": "KnownForgeKind"
66
+ },
67
+ "ReleaseAssetRef": {
68
+ "type": "object",
69
+ "properties": {
70
+ "forge": {
71
+ "$ref": "#/definitions/ForgeKind"
72
+ },
73
+ "instance": {
74
+ "$ref": "#/definitions/ForgeInstance",
75
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
76
+ },
77
+ "repo": {
78
+ "$ref": "#/definitions/RepoRef"
79
+ },
80
+ "release": {
81
+ "$ref": "#/definitions/ReleaseRef"
82
+ },
83
+ "id": {
84
+ "type": "string",
85
+ "description": "Forge-native asset id; the asset name, or the link id, on forges that have no asset id."
86
+ }
87
+ },
88
+ "required": [
89
+ "forge",
90
+ "id",
91
+ "instance",
92
+ "release",
93
+ "repo"
94
+ ],
95
+ "description": "A release asset, addressable for download with `releases.downloadAsset`.",
96
+ "x-forges-type": "ReleaseAssetRef"
97
+ },
98
+ "ReleaseRef": {
99
+ "type": "object",
100
+ "properties": {
101
+ "forge": {
102
+ "$ref": "#/definitions/ForgeKind"
103
+ },
104
+ "instance": {
105
+ "$ref": "#/definitions/ForgeInstance",
106
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
107
+ },
108
+ "repo": {
109
+ "$ref": "#/definitions/RepoRef"
110
+ },
111
+ "id": {
112
+ "type": "string",
113
+ "description": "Forge-native release id; the tag name on forges that key releases by tag."
114
+ },
115
+ "tag": {
116
+ "type": "string"
117
+ }
118
+ },
119
+ "required": [
120
+ "forge",
121
+ "id",
122
+ "instance",
123
+ "repo"
124
+ ],
125
+ "description": "A release, as a notification subject or event target.",
126
+ "x-forges-type": "ReleaseRef"
127
+ },
128
+ "RepoRef": {
129
+ "type": "object",
130
+ "properties": {
131
+ "forge": {
132
+ "$ref": "#/definitions/ForgeKind"
133
+ },
134
+ "instance": {
135
+ "$ref": "#/definitions/ForgeInstance",
136
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
137
+ },
138
+ "owner": {
139
+ "type": "string",
140
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
141
+ },
142
+ "name": {
143
+ "type": "string",
144
+ "description": "Repository name. Empty for namespace-scoped refs."
145
+ },
146
+ "kind": {
147
+ "type": "string",
148
+ "enum": [
149
+ "repo",
150
+ "namespace"
151
+ ],
152
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
153
+ },
154
+ "externalId": {
155
+ "type": "string",
156
+ "description": "Stable forge-native identifier that survives renames and transfers: a GitHub, Forgejo or Gitea numeric id, a GitLab project or group id, a Bitbucket UUID or a Tangled repo DID. {@link repoKey} prefers it over `owner` and `name`."
157
+ }
158
+ },
159
+ "required": [
160
+ "forge",
161
+ "instance",
162
+ "name",
163
+ "owner"
164
+ ],
165
+ "description": "Addresses a repository by its forge, instance, owner and name.",
166
+ "x-forges-type": "RepoRef"
167
+ }
168
+ }
169
+ }