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,498 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "ref": {
6
+ "$ref": "#/definitions/NotificationRef"
7
+ },
8
+ "subject": {
9
+ "$ref": "#/definitions/NotificationSubject"
10
+ },
11
+ "reason": {
12
+ "$ref": "#/definitions/NotificationReason",
13
+ "description": "Why the account got the notification."
14
+ },
15
+ "reasonRaw": {
16
+ "type": "string",
17
+ "description": "Forge-native reason string. Absent when the forge reports no reason at all."
18
+ },
19
+ "subjectTypeRaw": {
20
+ "type": "string",
21
+ "description": "Forge-native subject type, for example `PullRequest`, `Release` or `followed`."
22
+ },
23
+ "unread": {
24
+ "type": "boolean"
25
+ },
26
+ "title": {
27
+ "type": "string"
28
+ },
29
+ "subjectState": {
30
+ "$ref": "#/definitions/ThreadState",
31
+ "description": "State of a thread subject as reported by the notification payload."
32
+ },
33
+ "subjectStateRaw": {
34
+ "type": "string"
35
+ },
36
+ "updatedAt": {
37
+ "type": "string",
38
+ "format": "date-time"
39
+ },
40
+ "lastReadAt": {
41
+ "type": "string",
42
+ "format": "date-time"
43
+ },
44
+ "url": {
45
+ "type": "string"
46
+ },
47
+ "raw": {
48
+ "description": "Unnormalised forge payload, retained for fidelity."
49
+ }
50
+ },
51
+ "required": [
52
+ "ref",
53
+ "subject",
54
+ "reason",
55
+ "unread",
56
+ "title",
57
+ "subjectState",
58
+ "updatedAt",
59
+ "raw"
60
+ ],
61
+ "description": "A notification of the authenticated account.",
62
+ "x-forges-type": "Notification",
63
+ "definitions": {
64
+ "Actor": {
65
+ "type": "object",
66
+ "properties": {
67
+ "forge": {
68
+ "$ref": "#/definitions/ForgeKind"
69
+ },
70
+ "instance": {
71
+ "$ref": "#/definitions/ForgeInstance",
72
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
73
+ },
74
+ "login": {
75
+ "type": "string"
76
+ },
77
+ "id": {
78
+ "type": "string"
79
+ },
80
+ "name": {
81
+ "type": "string"
82
+ },
83
+ "avatarUrl": {
84
+ "type": "string"
85
+ },
86
+ "url": {
87
+ "type": "string"
88
+ },
89
+ "typeRaw": {
90
+ "type": "string",
91
+ "description": "Forge-reported account type, retained verbatim for callers that classify further."
92
+ },
93
+ "isBotHint": {
94
+ "type": "boolean",
95
+ "description": "Hint derived from forge metadata that the actor is automation. Callers own the classification policy."
96
+ },
97
+ "app": {
98
+ "type": "object",
99
+ "properties": {
100
+ "slug": {
101
+ "type": "string"
102
+ },
103
+ "id": {
104
+ "type": "string"
105
+ }
106
+ },
107
+ "required": [
108
+ "slug"
109
+ ],
110
+ "description": "The app behind a bot account, where the forge ties one to it (GitHub Apps' `slug[bot]` users)."
111
+ }
112
+ },
113
+ "required": [
114
+ "forge",
115
+ "id",
116
+ "instance",
117
+ "isBotHint",
118
+ "login"
119
+ ],
120
+ "description": "An account: a user, an organisation or a bot.",
121
+ "x-forges-type": "Actor"
122
+ },
123
+ "ForgeInstance": {
124
+ "type": "string",
125
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
126
+ "x-forges-type": "ForgeInstance"
127
+ },
128
+ "ForgeKind": {
129
+ "anyOf": [
130
+ {
131
+ "$ref": "#/definitions/KnownForgeKind"
132
+ },
133
+ {
134
+ "type": "string"
135
+ }
136
+ ],
137
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
138
+ "x-forges-type": "ForgeKind"
139
+ },
140
+ "KnownForgeKind": {
141
+ "type": "string",
142
+ "enum": [
143
+ "github",
144
+ "gitlab",
145
+ "bitbucket",
146
+ "forgejo",
147
+ "gitea",
148
+ "tangled",
149
+ "gitee",
150
+ "azure-devops",
151
+ "cursor-origin",
152
+ "pushin"
153
+ ],
154
+ "description": "The forges this package ships providers for.",
155
+ "x-forges-type": "KnownForgeKind"
156
+ },
157
+ "NotificationReason": {
158
+ "type": "string",
159
+ "enum": [
160
+ "access_requested",
161
+ "approval_requested",
162
+ "assigned",
163
+ "author",
164
+ "ci_activity",
165
+ "comment",
166
+ "followed",
167
+ "invitation",
168
+ "manual",
169
+ "mention",
170
+ "merge_blocked",
171
+ "review_requested",
172
+ "review_submitted",
173
+ "security_alert",
174
+ "starred",
175
+ "state_change",
176
+ "subscribed",
177
+ "team_mention",
178
+ "unknown"
179
+ ],
180
+ "description": "Why a notification was delivered. `'unknown'` covers forges that report no reason and native reasons with no normalised equivalent; `reasonRaw` keeps the original.",
181
+ "x-forges-type": "NotificationReason"
182
+ },
183
+ "NotificationRef": {
184
+ "type": "object",
185
+ "properties": {
186
+ "forge": {
187
+ "$ref": "#/definitions/ForgeKind"
188
+ },
189
+ "instance": {
190
+ "$ref": "#/definitions/ForgeInstance",
191
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
192
+ },
193
+ "id": {
194
+ "type": "string",
195
+ "description": "Forge-native notification identifier, used for read/done/unsubscribe writes."
196
+ }
197
+ },
198
+ "required": [
199
+ "forge",
200
+ "id",
201
+ "instance"
202
+ ],
203
+ "description": "Reference to a notification. Distinct from {@link ThreadRef}: a notification is a per-user delivery record whose lifetime and identity are independent of the thread it points at.",
204
+ "x-forges-type": "NotificationRef"
205
+ },
206
+ "NotificationSubject": {
207
+ "anyOf": [
208
+ {
209
+ "type": "object",
210
+ "properties": {
211
+ "type": {
212
+ "type": "string",
213
+ "const": "thread"
214
+ },
215
+ "thread": {
216
+ "$ref": "#/definitions/ThreadRef"
217
+ }
218
+ },
219
+ "required": [
220
+ "type",
221
+ "thread"
222
+ ]
223
+ },
224
+ {
225
+ "type": "object",
226
+ "properties": {
227
+ "type": {
228
+ "type": "string",
229
+ "const": "repo"
230
+ },
231
+ "repo": {
232
+ "$ref": "#/definitions/RepoRef"
233
+ }
234
+ },
235
+ "required": [
236
+ "type",
237
+ "repo"
238
+ ]
239
+ },
240
+ {
241
+ "type": "object",
242
+ "properties": {
243
+ "type": {
244
+ "type": "string",
245
+ "const": "actor"
246
+ },
247
+ "actor": {
248
+ "$ref": "#/definitions/Actor"
249
+ }
250
+ },
251
+ "required": [
252
+ "type",
253
+ "actor"
254
+ ]
255
+ },
256
+ {
257
+ "type": "object",
258
+ "properties": {
259
+ "type": {
260
+ "type": "string",
261
+ "const": "release"
262
+ },
263
+ "release": {
264
+ "$ref": "#/definitions/ReleaseRef"
265
+ }
266
+ },
267
+ "required": [
268
+ "type",
269
+ "release"
270
+ ]
271
+ },
272
+ {
273
+ "type": "object",
274
+ "properties": {
275
+ "type": {
276
+ "type": "string",
277
+ "const": "security_alert"
278
+ },
279
+ "alert": {
280
+ "$ref": "#/definitions/SecurityAlertRef"
281
+ }
282
+ },
283
+ "required": [
284
+ "type",
285
+ "alert"
286
+ ]
287
+ },
288
+ {
289
+ "type": "object",
290
+ "properties": {
291
+ "type": {
292
+ "type": "string",
293
+ "const": "other"
294
+ },
295
+ "typeRaw": {
296
+ "type": "string"
297
+ },
298
+ "repo": {
299
+ "$ref": "#/definitions/RepoRef"
300
+ },
301
+ "id": {
302
+ "type": "string"
303
+ },
304
+ "url": {
305
+ "type": "string"
306
+ }
307
+ },
308
+ "required": [
309
+ "type",
310
+ "typeRaw"
311
+ ]
312
+ }
313
+ ],
314
+ "description": "What a notification is about. Not every notification concerns a thread.",
315
+ "x-forges-type": "NotificationSubject"
316
+ },
317
+ "ReleaseRef": {
318
+ "type": "object",
319
+ "properties": {
320
+ "forge": {
321
+ "$ref": "#/definitions/ForgeKind"
322
+ },
323
+ "instance": {
324
+ "$ref": "#/definitions/ForgeInstance",
325
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
326
+ },
327
+ "repo": {
328
+ "$ref": "#/definitions/RepoRef"
329
+ },
330
+ "id": {
331
+ "type": "string",
332
+ "description": "Forge-native release id; the tag name on forges that key releases by tag."
333
+ },
334
+ "tag": {
335
+ "type": "string"
336
+ }
337
+ },
338
+ "required": [
339
+ "forge",
340
+ "id",
341
+ "instance",
342
+ "repo"
343
+ ],
344
+ "description": "A release, as a notification subject or event target.",
345
+ "x-forges-type": "ReleaseRef"
346
+ },
347
+ "RepoRef": {
348
+ "type": "object",
349
+ "properties": {
350
+ "forge": {
351
+ "$ref": "#/definitions/ForgeKind"
352
+ },
353
+ "instance": {
354
+ "$ref": "#/definitions/ForgeInstance",
355
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
356
+ },
357
+ "owner": {
358
+ "type": "string",
359
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
360
+ },
361
+ "name": {
362
+ "type": "string",
363
+ "description": "Repository name. Empty for namespace-scoped refs."
364
+ },
365
+ "kind": {
366
+ "type": "string",
367
+ "enum": [
368
+ "repo",
369
+ "namespace"
370
+ ],
371
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
372
+ },
373
+ "externalId": {
374
+ "type": "string",
375
+ "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`."
376
+ }
377
+ },
378
+ "required": [
379
+ "forge",
380
+ "instance",
381
+ "name",
382
+ "owner"
383
+ ],
384
+ "description": "Addresses a repository by its forge, instance, owner and name.",
385
+ "x-forges-type": "RepoRef"
386
+ },
387
+ "SecurityAlertKind": {
388
+ "type": "string",
389
+ "enum": [
390
+ "dependency",
391
+ "code_scanning",
392
+ "secret",
393
+ "advisory",
394
+ "other"
395
+ ],
396
+ "description": "What an alert is about. `other` is a kind that the model does not name.",
397
+ "x-forges-type": "SecurityAlertKind"
398
+ },
399
+ "SecurityAlertRef": {
400
+ "type": "object",
401
+ "properties": {
402
+ "forge": {
403
+ "$ref": "#/definitions/ForgeKind"
404
+ },
405
+ "instance": {
406
+ "$ref": "#/definitions/ForgeInstance",
407
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
408
+ },
409
+ "repo": {
410
+ "$ref": "#/definitions/RepoRef"
411
+ },
412
+ "id": {
413
+ "type": "string",
414
+ "description": "Forge-native alert id. GitHub numbers each alert kind separately, so `kind` is needed to address one."
415
+ },
416
+ "kind": {
417
+ "$ref": "#/definitions/SecurityAlertKind"
418
+ },
419
+ "severityRaw": {
420
+ "type": "string"
421
+ }
422
+ },
423
+ "required": [
424
+ "forge",
425
+ "id",
426
+ "instance",
427
+ "repo"
428
+ ],
429
+ "description": "A security alert: a vulnerable dependency, a code scanning result, a leaked secret or an advisory.",
430
+ "x-forges-type": "SecurityAlertRef"
431
+ },
432
+ "ThreadKind": {
433
+ "type": "string",
434
+ "enum": [
435
+ "issue",
436
+ "pull_request",
437
+ "discussion",
438
+ "commit",
439
+ "other"
440
+ ],
441
+ "description": "Kind of thread. `'other'` holds forge-specific subjects with no shared kind (check suites, epics); `ThreadRef.typeRaw` names them.",
442
+ "x-forges-type": "ThreadKind"
443
+ },
444
+ "ThreadRef": {
445
+ "type": "object",
446
+ "properties": {
447
+ "forge": {
448
+ "$ref": "#/definitions/ForgeKind"
449
+ },
450
+ "instance": {
451
+ "$ref": "#/definitions/ForgeInstance",
452
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
453
+ },
454
+ "repo": {
455
+ "$ref": "#/definitions/RepoRef"
456
+ },
457
+ "kind": {
458
+ "$ref": "#/definitions/ThreadKind"
459
+ },
460
+ "typeRaw": {
461
+ "type": "string",
462
+ "description": "Forge-native subject type, for example `PullRequest` or `MergeRequest`."
463
+ },
464
+ "number": {
465
+ "type": "string",
466
+ "description": "Per-repo thread number, the commit sha for `kind: 'commit'`, or the forge-native id for `kind: 'other'`. Absent when the forge did not identify the thread; such a ref cannot be fetched or keyed until enriched."
467
+ },
468
+ "displayNumber": {
469
+ "type": "string",
470
+ "description": "Human-facing per-repo number, when it differs from `number`. Tangled identifies threads by AT-URI but shows numbers in its UI and webhooks."
471
+ },
472
+ "externalId": {
473
+ "type": "string",
474
+ "description": "Globally unique forge-native identifier, where one exists: a GitHub `node_id`, a GitLab global id, or an atproto record URI."
475
+ }
476
+ },
477
+ "required": [
478
+ "forge",
479
+ "instance",
480
+ "kind",
481
+ "repo"
482
+ ],
483
+ "description": "Reference to a thread. A thread `number` is unique only within its repo, so the repo is always carried alongside it.",
484
+ "x-forges-type": "ThreadRef"
485
+ },
486
+ "ThreadState": {
487
+ "type": "string",
488
+ "enum": [
489
+ "open",
490
+ "closed",
491
+ "merged",
492
+ "unknown"
493
+ ],
494
+ "description": "Thread state. `'unknown'` is distinct from any real state and signals that the value was not present in the payload, so the caller may enrich it with `threads.get()`. Draft status is orthogonal; see `Thread.isDraft`.",
495
+ "x-forges-type": "ThreadState"
496
+ }
497
+ }
498
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "string",
4
+ "enum": [
5
+ "access_requested",
6
+ "approval_requested",
7
+ "assigned",
8
+ "author",
9
+ "ci_activity",
10
+ "comment",
11
+ "followed",
12
+ "invitation",
13
+ "manual",
14
+ "mention",
15
+ "merge_blocked",
16
+ "review_requested",
17
+ "review_submitted",
18
+ "security_alert",
19
+ "starred",
20
+ "state_change",
21
+ "subscribed",
22
+ "team_mention",
23
+ "unknown"
24
+ ],
25
+ "description": "Why a notification was delivered. `'unknown'` covers forges that report no reason and native reasons with no normalised equivalent; `reasonRaw` keeps the original.",
26
+ "x-forges-type": "NotificationReason",
27
+ "definitions": {}
28
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "forge": {
6
+ "$ref": "#/definitions/ForgeKind"
7
+ },
8
+ "instance": {
9
+ "$ref": "#/definitions/ForgeInstance",
10
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
11
+ },
12
+ "id": {
13
+ "type": "string",
14
+ "description": "Forge-native notification identifier, used for read/done/unsubscribe writes."
15
+ }
16
+ },
17
+ "required": [
18
+ "forge",
19
+ "id",
20
+ "instance"
21
+ ],
22
+ "description": "Reference to a notification. Distinct from {@link ThreadRef}: a notification is a per-user delivery record whose lifetime and identity are independent of the thread it points at.",
23
+ "x-forges-type": "NotificationRef",
24
+ "definitions": {
25
+ "ForgeInstance": {
26
+ "type": "string",
27
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
28
+ "x-forges-type": "ForgeInstance"
29
+ },
30
+ "ForgeKind": {
31
+ "anyOf": [
32
+ {
33
+ "$ref": "#/definitions/KnownForgeKind"
34
+ },
35
+ {
36
+ "type": "string"
37
+ }
38
+ ],
39
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
40
+ "x-forges-type": "ForgeKind"
41
+ },
42
+ "KnownForgeKind": {
43
+ "type": "string",
44
+ "enum": [
45
+ "github",
46
+ "gitlab",
47
+ "bitbucket",
48
+ "forgejo",
49
+ "gitea",
50
+ "tangled",
51
+ "gitee",
52
+ "azure-devops",
53
+ "cursor-origin",
54
+ "pushin"
55
+ ],
56
+ "description": "The forges this package ships providers for.",
57
+ "x-forges-type": "KnownForgeKind"
58
+ }
59
+ }
60
+ }