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,173 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "ref": {
6
+ "$ref": "#/definitions/WebhookDeliveryRef"
7
+ },
8
+ "event": {
9
+ "type": "string",
10
+ "description": "Forge-native event name of the delivery."
11
+ },
12
+ "status": {
13
+ "type": "number",
14
+ "description": "The HTTP status that the receiver answered with."
15
+ },
16
+ "ok": {
17
+ "type": "boolean",
18
+ "description": "`true` when the forge considered the delivery successful."
19
+ },
20
+ "deliveredAt": {
21
+ "type": "string",
22
+ "format": "date-time"
23
+ },
24
+ "duration": {
25
+ "type": "number",
26
+ "description": "Round trip in milliseconds, where the forge reports it."
27
+ },
28
+ "raw": {}
29
+ },
30
+ "required": [
31
+ "ref",
32
+ "event",
33
+ "status",
34
+ "ok",
35
+ "raw"
36
+ ],
37
+ "description": "One recorded delivery attempt.",
38
+ "x-forges-type": "WebhookDeliveryRecord",
39
+ "definitions": {
40
+ "ForgeInstance": {
41
+ "type": "string",
42
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
43
+ "x-forges-type": "ForgeInstance"
44
+ },
45
+ "ForgeKind": {
46
+ "anyOf": [
47
+ {
48
+ "$ref": "#/definitions/KnownForgeKind"
49
+ },
50
+ {
51
+ "type": "string"
52
+ }
53
+ ],
54
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
55
+ "x-forges-type": "ForgeKind"
56
+ },
57
+ "KnownForgeKind": {
58
+ "type": "string",
59
+ "enum": [
60
+ "github",
61
+ "gitlab",
62
+ "bitbucket",
63
+ "forgejo",
64
+ "gitea",
65
+ "tangled",
66
+ "gitee",
67
+ "azure-devops",
68
+ "cursor-origin",
69
+ "pushin"
70
+ ],
71
+ "description": "The forges this package ships providers for.",
72
+ "x-forges-type": "KnownForgeKind"
73
+ },
74
+ "RepoRef": {
75
+ "type": "object",
76
+ "properties": {
77
+ "forge": {
78
+ "$ref": "#/definitions/ForgeKind"
79
+ },
80
+ "instance": {
81
+ "$ref": "#/definitions/ForgeInstance",
82
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
83
+ },
84
+ "owner": {
85
+ "type": "string",
86
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
87
+ },
88
+ "name": {
89
+ "type": "string",
90
+ "description": "Repository name. Empty for namespace-scoped refs."
91
+ },
92
+ "kind": {
93
+ "type": "string",
94
+ "enum": [
95
+ "repo",
96
+ "namespace"
97
+ ],
98
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
99
+ },
100
+ "externalId": {
101
+ "type": "string",
102
+ "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`."
103
+ }
104
+ },
105
+ "required": [
106
+ "forge",
107
+ "instance",
108
+ "name",
109
+ "owner"
110
+ ],
111
+ "description": "Addresses a repository by its forge, instance, owner and name.",
112
+ "x-forges-type": "RepoRef"
113
+ },
114
+ "WebhookDeliveryRef": {
115
+ "type": "object",
116
+ "properties": {
117
+ "forge": {
118
+ "$ref": "#/definitions/ForgeKind"
119
+ },
120
+ "instance": {
121
+ "$ref": "#/definitions/ForgeInstance",
122
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
123
+ },
124
+ "hook": {
125
+ "$ref": "#/definitions/WebhookRef"
126
+ },
127
+ "id": {
128
+ "type": "string"
129
+ },
130
+ "guid": {
131
+ "type": "string",
132
+ "description": "Delivery guid, where the forge needs it to redeliver."
133
+ }
134
+ },
135
+ "required": [
136
+ "forge",
137
+ "hook",
138
+ "id",
139
+ "instance"
140
+ ],
141
+ "description": "Reference to one delivery of a webhook.",
142
+ "x-forges-type": "WebhookDeliveryRef"
143
+ },
144
+ "WebhookRef": {
145
+ "type": "object",
146
+ "properties": {
147
+ "forge": {
148
+ "$ref": "#/definitions/ForgeKind"
149
+ },
150
+ "instance": {
151
+ "$ref": "#/definitions/ForgeInstance",
152
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
153
+ },
154
+ "target": {
155
+ "$ref": "#/definitions/RepoRef",
156
+ "description": "The repository or namespace that the hook is registered on."
157
+ },
158
+ "id": {
159
+ "type": "string",
160
+ "description": "Forge-native hook id."
161
+ }
162
+ },
163
+ "required": [
164
+ "forge",
165
+ "id",
166
+ "instance",
167
+ "target"
168
+ ],
169
+ "description": "Reference to a registered webhook. `target` is the repository, or a namespace ref (`kind: 'namespace'`, empty `name`) for an organisation or workspace hook.",
170
+ "x-forges-type": "WebhookRef"
171
+ }
172
+ }
173
+ }
@@ -0,0 +1,135 @@
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
+ "hook": {
13
+ "$ref": "#/definitions/WebhookRef"
14
+ },
15
+ "id": {
16
+ "type": "string"
17
+ },
18
+ "guid": {
19
+ "type": "string",
20
+ "description": "Delivery guid, where the forge needs it to redeliver."
21
+ }
22
+ },
23
+ "required": [
24
+ "forge",
25
+ "hook",
26
+ "id",
27
+ "instance"
28
+ ],
29
+ "description": "Reference to one delivery of a webhook.",
30
+ "x-forges-type": "WebhookDeliveryRef",
31
+ "definitions": {
32
+ "ForgeInstance": {
33
+ "type": "string",
34
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
35
+ "x-forges-type": "ForgeInstance"
36
+ },
37
+ "ForgeKind": {
38
+ "anyOf": [
39
+ {
40
+ "$ref": "#/definitions/KnownForgeKind"
41
+ },
42
+ {
43
+ "type": "string"
44
+ }
45
+ ],
46
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
47
+ "x-forges-type": "ForgeKind"
48
+ },
49
+ "KnownForgeKind": {
50
+ "type": "string",
51
+ "enum": [
52
+ "github",
53
+ "gitlab",
54
+ "bitbucket",
55
+ "forgejo",
56
+ "gitea",
57
+ "tangled",
58
+ "gitee",
59
+ "azure-devops",
60
+ "cursor-origin",
61
+ "pushin"
62
+ ],
63
+ "description": "The forges this package ships providers for.",
64
+ "x-forges-type": "KnownForgeKind"
65
+ },
66
+ "RepoRef": {
67
+ "type": "object",
68
+ "properties": {
69
+ "forge": {
70
+ "$ref": "#/definitions/ForgeKind"
71
+ },
72
+ "instance": {
73
+ "$ref": "#/definitions/ForgeInstance",
74
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
75
+ },
76
+ "owner": {
77
+ "type": "string",
78
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
79
+ },
80
+ "name": {
81
+ "type": "string",
82
+ "description": "Repository name. Empty for namespace-scoped refs."
83
+ },
84
+ "kind": {
85
+ "type": "string",
86
+ "enum": [
87
+ "repo",
88
+ "namespace"
89
+ ],
90
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
91
+ },
92
+ "externalId": {
93
+ "type": "string",
94
+ "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`."
95
+ }
96
+ },
97
+ "required": [
98
+ "forge",
99
+ "instance",
100
+ "name",
101
+ "owner"
102
+ ],
103
+ "description": "Addresses a repository by its forge, instance, owner and name.",
104
+ "x-forges-type": "RepoRef"
105
+ },
106
+ "WebhookRef": {
107
+ "type": "object",
108
+ "properties": {
109
+ "forge": {
110
+ "$ref": "#/definitions/ForgeKind"
111
+ },
112
+ "instance": {
113
+ "$ref": "#/definitions/ForgeInstance",
114
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
115
+ },
116
+ "target": {
117
+ "$ref": "#/definitions/RepoRef",
118
+ "description": "The repository or namespace that the hook is registered on."
119
+ },
120
+ "id": {
121
+ "type": "string",
122
+ "description": "Forge-native hook id."
123
+ }
124
+ },
125
+ "required": [
126
+ "forge",
127
+ "id",
128
+ "instance",
129
+ "target"
130
+ ],
131
+ "description": "Reference to a registered webhook. `target` is the repository, or a namespace ref (`kind: 'namespace'`, empty `name`) for an organisation or workspace hook.",
132
+ "x-forges-type": "WebhookRef"
133
+ }
134
+ }
135
+ }
@@ -0,0 +1,105 @@
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
+ "target": {
13
+ "$ref": "#/definitions/RepoRef",
14
+ "description": "The repository or namespace that the hook is registered on."
15
+ },
16
+ "id": {
17
+ "type": "string",
18
+ "description": "Forge-native hook id."
19
+ }
20
+ },
21
+ "required": [
22
+ "forge",
23
+ "id",
24
+ "instance",
25
+ "target"
26
+ ],
27
+ "description": "Reference to a registered webhook. `target` is the repository, or a namespace ref (`kind: 'namespace'`, empty `name`) for an organisation or workspace hook.",
28
+ "x-forges-type": "WebhookRef",
29
+ "definitions": {
30
+ "ForgeInstance": {
31
+ "type": "string",
32
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
33
+ "x-forges-type": "ForgeInstance"
34
+ },
35
+ "ForgeKind": {
36
+ "anyOf": [
37
+ {
38
+ "$ref": "#/definitions/KnownForgeKind"
39
+ },
40
+ {
41
+ "type": "string"
42
+ }
43
+ ],
44
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
45
+ "x-forges-type": "ForgeKind"
46
+ },
47
+ "KnownForgeKind": {
48
+ "type": "string",
49
+ "enum": [
50
+ "github",
51
+ "gitlab",
52
+ "bitbucket",
53
+ "forgejo",
54
+ "gitea",
55
+ "tangled",
56
+ "gitee",
57
+ "azure-devops",
58
+ "cursor-origin",
59
+ "pushin"
60
+ ],
61
+ "description": "The forges this package ships providers for.",
62
+ "x-forges-type": "KnownForgeKind"
63
+ },
64
+ "RepoRef": {
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
+ "owner": {
75
+ "type": "string",
76
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
77
+ },
78
+ "name": {
79
+ "type": "string",
80
+ "description": "Repository name. Empty for namespace-scoped refs."
81
+ },
82
+ "kind": {
83
+ "type": "string",
84
+ "enum": [
85
+ "repo",
86
+ "namespace"
87
+ ],
88
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
89
+ },
90
+ "externalId": {
91
+ "type": "string",
92
+ "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`."
93
+ }
94
+ },
95
+ "required": [
96
+ "forge",
97
+ "instance",
98
+ "name",
99
+ "owner"
100
+ ],
101
+ "description": "Addresses a repository by its forge, instance, owner and name.",
102
+ "x-forges-type": "RepoRef"
103
+ }
104
+ }
105
+ }
@@ -0,0 +1,4 @@
1
+ //#region src/schema/index.d.ts
2
+ /** A JSON Schema (draft-07) for each public model type, keyed by type name. References point at `#/components/schemas/<Type>`. */
3
+ export declare const schemas: Record<string, Record<string, unknown>>;
4
+ //#endregion