@openvtc/trust-tasks 0.20.2 → 0.20.4
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.
- package/CHANGELOG.md +65 -0
- package/dist/_shared/components.d.ts +175 -0
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/git-ns/_shared/0.1/git-ns.d.ts +16 -0
- package/dist/git-ns/_shared/0.1/git-ns.d.ts.map +1 -0
- package/dist/git-ns/_shared/0.1/git-ns.js +6 -0
- package/dist/git-ns/_shared/0.1/git-ns.js.map +1 -0
- package/dist/git-ns/account/link/0.1/payload.d.ts +355 -0
- package/dist/git-ns/account/link/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/account/link/0.1/payload.js +192 -0
- package/dist/git-ns/account/link/0.1/payload.js.map +1 -0
- package/dist/git-ns/account/link-status/0.1/payload.d.ts +403 -0
- package/dist/git-ns/account/link-status/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/account/link-status/0.1/payload.js +234 -0
- package/dist/git-ns/account/link-status/0.1/payload.js.map +1 -0
- package/dist/git-ns/bridge/event/0.1/payload.d.ts +1348 -0
- package/dist/git-ns/bridge/event/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/event/0.1/payload.js +785 -0
- package/dist/git-ns/bridge/event/0.1/payload.js.map +1 -0
- package/dist/git-ns/bridge/job/0.1/payload.d.ts +1044 -0
- package/dist/git-ns/bridge/job/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/job/0.1/payload.js +564 -0
- package/dist/git-ns/bridge/job/0.1/payload.js.map +1 -0
- package/dist/git-ns/bridge/result/0.1/payload.d.ts +462 -0
- package/dist/git-ns/bridge/result/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/result/0.1/payload.js +248 -0
- package/dist/git-ns/bridge/result/0.1/payload.js.map +1 -0
- package/dist/git-ns/namespace/bind/0.1/payload.d.ts +547 -0
- package/dist/git-ns/namespace/bind/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/namespace/bind/0.1/payload.js +322 -0
- package/dist/git-ns/namespace/bind/0.1/payload.js.map +1 -0
- package/dist/git-ns/namespace/unbind/0.1/payload.d.ts +300 -0
- package/dist/git-ns/namespace/unbind/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/namespace/unbind/0.1/payload.js +168 -0
- package/dist/git-ns/namespace/unbind/0.1/payload.js.map +1 -0
- package/dist/git-ns/repo/adopt/0.1/payload.d.ts +962 -0
- package/dist/git-ns/repo/adopt/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/adopt/0.1/payload.js +583 -0
- package/dist/git-ns/repo/adopt/0.1/payload.js.map +1 -0
- package/dist/git-ns/repo/archive/0.1/payload.d.ts +959 -0
- package/dist/git-ns/repo/archive/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/archive/0.1/payload.js +584 -0
- package/dist/git-ns/repo/archive/0.1/payload.js.map +1 -0
- package/dist/git-ns/repo/create/0.1/payload.d.ts +1074 -0
- package/dist/git-ns/repo/create/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/create/0.1/payload.js +636 -0
- package/dist/git-ns/repo/create/0.1/payload.js.map +1 -0
- package/dist/git-ns/repo/transfer/0.1/payload.d.ts +947 -0
- package/dist/git-ns/repo/transfer/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/transfer/0.1/payload.js +577 -0
- package/dist/git-ns/repo/transfer/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/grant/0.1/payload.d.ts +506 -0
- package/dist/git-ns/right/grant/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/grant/0.1/payload.js +289 -0
- package/dist/git-ns/right/grant/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/revoke/0.1/payload.d.ts +492 -0
- package/dist/git-ns/right/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/revoke/0.1/payload.js +284 -0
- package/dist/git-ns/right/revoke/0.1/payload.js.map +1 -0
- package/dist/git-ns/view/0.1/payload.d.ts +1407 -0
- package/dist/git-ns/view/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/view/0.1/payload.js +860 -0
- package/dist/git-ns/view/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +181 -0
- package/src/git-ns/_shared/0.1/git-ns.ts +17 -0
- package/src/git-ns/account/link/0.1/payload.ts +242 -0
- package/src/git-ns/account/link-status/0.1/payload.ts +276 -0
- package/src/git-ns/bridge/event/0.1/payload.ts +902 -0
- package/src/git-ns/bridge/job/0.1/payload.ts +676 -0
- package/src/git-ns/bridge/result/0.1/payload.ts +321 -0
- package/src/git-ns/namespace/bind/0.1/payload.ts +374 -0
- package/src/git-ns/namespace/unbind/0.1/payload.ts +211 -0
- package/src/git-ns/repo/adopt/0.1/payload.ts +628 -0
- package/src/git-ns/repo/archive/0.1/payload.ts +626 -0
- package/src/git-ns/repo/create/0.1/payload.ts +689 -0
- package/src/git-ns/repo/transfer/0.1/payload.ts +619 -0
- package/src/git-ns/right/grant/0.1/payload.ts +340 -0
- package/src/git-ns/right/revoke/0.1/payload.ts +331 -0
- package/src/git-ns/view/0.1/payload.ts +906 -0
- package/src/index.ts +15 -0
|
@@ -0,0 +1,1348 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/git-ns/bridge/event/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { DriftItem, Ext, ForgeAccount, ForgeHost, ForgeId, NamespaceId, RepoResource } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* One forge-neutral event, discriminated by `type`. The specification's event table says what each type means and what the VTC does with it.
|
|
8
|
+
*/
|
|
9
|
+
export type ForgeEvent = RepoRenamed | RepoTransferred | RepoCreatedUnmanaged | RepoDeleted | RoleChanged | ProtectionChanged | InstallationRemoved | AccountLinked | BindCompleted;
|
|
10
|
+
/**
|
|
11
|
+
* The bridge tells the VTC something happened on the forge — translated from the forge's webhook or found by an inspection sweep — together with any drift it now sees.
|
|
12
|
+
*/
|
|
13
|
+
export interface GitNamespacesBridgeEventPayload {
|
|
14
|
+
/**
|
|
15
|
+
* The namespace the event happened in.
|
|
16
|
+
*/
|
|
17
|
+
namespace: NamespaceId;
|
|
18
|
+
event: ForgeEvent;
|
|
19
|
+
/**
|
|
20
|
+
* The complete outstanding drift for each repository the event concerns, replacing what the VTC held for those repositories. Absent: the event changes no repository's drift.
|
|
21
|
+
*/
|
|
22
|
+
drift?: DriftItem[];
|
|
23
|
+
ext?: Ext;
|
|
24
|
+
}
|
|
25
|
+
export interface RepoRenamed {
|
|
26
|
+
type: "repoRenamed";
|
|
27
|
+
forgeId: ForgeId;
|
|
28
|
+
from: RepoResource;
|
|
29
|
+
to: RepoResource;
|
|
30
|
+
}
|
|
31
|
+
export interface RepoTransferred {
|
|
32
|
+
type: "repoTransferred";
|
|
33
|
+
forgeId: ForgeId;
|
|
34
|
+
from: RepoResource;
|
|
35
|
+
to: RepoResource;
|
|
36
|
+
}
|
|
37
|
+
export interface RepoCreatedUnmanaged {
|
|
38
|
+
type: "repoCreatedUnmanaged";
|
|
39
|
+
forgeId: ForgeId;
|
|
40
|
+
resource: RepoResource;
|
|
41
|
+
}
|
|
42
|
+
export interface RepoDeleted {
|
|
43
|
+
type: "repoDeleted";
|
|
44
|
+
forgeId: ForgeId;
|
|
45
|
+
resource: RepoResource;
|
|
46
|
+
}
|
|
47
|
+
export interface RoleChanged {
|
|
48
|
+
type: "roleChanged";
|
|
49
|
+
forgeId: ForgeId;
|
|
50
|
+
resource: RepoResource;
|
|
51
|
+
account: ForgeAccount;
|
|
52
|
+
/**
|
|
53
|
+
* The role the account now holds. Absent: the account holds no role now.
|
|
54
|
+
*/
|
|
55
|
+
role?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ProtectionChanged {
|
|
58
|
+
type: "protectionChanged";
|
|
59
|
+
forgeId: ForgeId;
|
|
60
|
+
resource: RepoResource;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the forge still refuses merges without a passing verify-trust check, with no bypass.
|
|
63
|
+
*/
|
|
64
|
+
requiredCheck: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface InstallationRemoved {
|
|
67
|
+
type: "installationRemoved";
|
|
68
|
+
}
|
|
69
|
+
export interface AccountLinked {
|
|
70
|
+
type: "accountLinked";
|
|
71
|
+
/**
|
|
72
|
+
* The beginAccountLink job.
|
|
73
|
+
*/
|
|
74
|
+
jobId: string;
|
|
75
|
+
account: ForgeAccount;
|
|
76
|
+
}
|
|
77
|
+
export interface BindCompleted {
|
|
78
|
+
type: "bindCompleted";
|
|
79
|
+
/**
|
|
80
|
+
* The beginBind job.
|
|
81
|
+
*/
|
|
82
|
+
jobId: string;
|
|
83
|
+
/**
|
|
84
|
+
* The forge's id for the owner, which survives renames.
|
|
85
|
+
*/
|
|
86
|
+
ownerId: ForgeId;
|
|
87
|
+
kind: "organization" | "user";
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The VTC has recorded the event. Nothing else is returned.
|
|
91
|
+
*/
|
|
92
|
+
export interface GitNamespacesBridgeEventResponsePayload {
|
|
93
|
+
ext?: Ext;
|
|
94
|
+
}
|
|
95
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
96
|
+
export type { DriftItem, Ext, ForgeAccount, ForgeHost, ForgeId, NamespaceId, RepoResource };
|
|
97
|
+
/** Trust Task type URI. */
|
|
98
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/git-ns/bridge/event/0.1";
|
|
99
|
+
/** Stable alias for this specification's request payload shape. */
|
|
100
|
+
export type Payload = GitNamespacesBridgeEventPayload;
|
|
101
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
102
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/git-ns/bridge/event/0.1#response";
|
|
103
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
104
|
+
export type Response = GitNamespacesBridgeEventResponsePayload;
|
|
105
|
+
/**
|
|
106
|
+
* This specification's payload schema, as a value.
|
|
107
|
+
*
|
|
108
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
109
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
110
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
111
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
112
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
113
|
+
*/
|
|
114
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
115
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
116
|
+
readonly $id: "https://trusttasks.org/spec/git-ns/bridge/event/0.1";
|
|
117
|
+
readonly title: "Git Namespaces — Bridge Event — payload";
|
|
118
|
+
readonly description: "The bridge tells the VTC something happened on the forge — translated from the forge's webhook or found by an inspection sweep — together with any drift it now sees.";
|
|
119
|
+
readonly type: "object";
|
|
120
|
+
readonly additionalProperties: false;
|
|
121
|
+
readonly required: readonly ["namespace", "event"];
|
|
122
|
+
readonly properties: {
|
|
123
|
+
readonly namespace: {
|
|
124
|
+
readonly $ref: "#/$defs/NamespaceId";
|
|
125
|
+
readonly description: "The namespace the event happened in.";
|
|
126
|
+
};
|
|
127
|
+
readonly event: {
|
|
128
|
+
readonly $ref: "#/$defs/ForgeEvent";
|
|
129
|
+
};
|
|
130
|
+
readonly drift: {
|
|
131
|
+
readonly type: "array";
|
|
132
|
+
readonly items: {
|
|
133
|
+
readonly $ref: "#/$defs/DriftItem";
|
|
134
|
+
};
|
|
135
|
+
readonly description: "The complete outstanding drift for each repository the event concerns, replacing what the VTC held for those repositories. Absent: the event changes no repository's drift.";
|
|
136
|
+
};
|
|
137
|
+
readonly ext: {
|
|
138
|
+
readonly $ref: "#/$defs/Ext";
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
readonly $defs: {
|
|
142
|
+
readonly JobId: {
|
|
143
|
+
readonly type: "string";
|
|
144
|
+
readonly minLength: 1;
|
|
145
|
+
readonly maxLength: 128;
|
|
146
|
+
readonly description: "The VTC's identifier for a job, unique across the VTC's jobs.";
|
|
147
|
+
};
|
|
148
|
+
readonly ForgeRole: {
|
|
149
|
+
readonly type: "string";
|
|
150
|
+
readonly minLength: 1;
|
|
151
|
+
readonly maxLength: 64;
|
|
152
|
+
readonly description: "A role in the forge's own vocabulary (`maintain`, `write`).";
|
|
153
|
+
};
|
|
154
|
+
readonly ForgeEvent: {
|
|
155
|
+
readonly title: "ForgeEvent";
|
|
156
|
+
readonly description: "One forge-neutral event, discriminated by `type`. The specification's event table says what each type means and what the VTC does with it.";
|
|
157
|
+
readonly type: "object";
|
|
158
|
+
readonly oneOf: readonly [{
|
|
159
|
+
readonly title: "RepoRenamed";
|
|
160
|
+
readonly type: "object";
|
|
161
|
+
readonly additionalProperties: false;
|
|
162
|
+
readonly required: readonly ["type", "forgeId", "from", "to"];
|
|
163
|
+
readonly properties: {
|
|
164
|
+
readonly type: {
|
|
165
|
+
readonly const: "repoRenamed";
|
|
166
|
+
};
|
|
167
|
+
readonly forgeId: {
|
|
168
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
169
|
+
};
|
|
170
|
+
readonly from: {
|
|
171
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
172
|
+
};
|
|
173
|
+
readonly to: {
|
|
174
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
}, {
|
|
178
|
+
readonly title: "RepoTransferred";
|
|
179
|
+
readonly type: "object";
|
|
180
|
+
readonly additionalProperties: false;
|
|
181
|
+
readonly required: readonly ["type", "forgeId", "from", "to"];
|
|
182
|
+
readonly properties: {
|
|
183
|
+
readonly type: {
|
|
184
|
+
readonly const: "repoTransferred";
|
|
185
|
+
};
|
|
186
|
+
readonly forgeId: {
|
|
187
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
188
|
+
};
|
|
189
|
+
readonly from: {
|
|
190
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
191
|
+
};
|
|
192
|
+
readonly to: {
|
|
193
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
}, {
|
|
197
|
+
readonly title: "RepoCreatedUnmanaged";
|
|
198
|
+
readonly type: "object";
|
|
199
|
+
readonly additionalProperties: false;
|
|
200
|
+
readonly required: readonly ["type", "forgeId", "resource"];
|
|
201
|
+
readonly properties: {
|
|
202
|
+
readonly type: {
|
|
203
|
+
readonly const: "repoCreatedUnmanaged";
|
|
204
|
+
};
|
|
205
|
+
readonly forgeId: {
|
|
206
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
207
|
+
};
|
|
208
|
+
readonly resource: {
|
|
209
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
}, {
|
|
213
|
+
readonly title: "RepoDeleted";
|
|
214
|
+
readonly type: "object";
|
|
215
|
+
readonly additionalProperties: false;
|
|
216
|
+
readonly required: readonly ["type", "forgeId", "resource"];
|
|
217
|
+
readonly properties: {
|
|
218
|
+
readonly type: {
|
|
219
|
+
readonly const: "repoDeleted";
|
|
220
|
+
};
|
|
221
|
+
readonly forgeId: {
|
|
222
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
223
|
+
};
|
|
224
|
+
readonly resource: {
|
|
225
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
}, {
|
|
229
|
+
readonly title: "RoleChanged";
|
|
230
|
+
readonly type: "object";
|
|
231
|
+
readonly additionalProperties: false;
|
|
232
|
+
readonly required: readonly ["type", "forgeId", "resource", "account"];
|
|
233
|
+
readonly properties: {
|
|
234
|
+
readonly type: {
|
|
235
|
+
readonly const: "roleChanged";
|
|
236
|
+
};
|
|
237
|
+
readonly forgeId: {
|
|
238
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
239
|
+
};
|
|
240
|
+
readonly resource: {
|
|
241
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
242
|
+
};
|
|
243
|
+
readonly account: {
|
|
244
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
245
|
+
};
|
|
246
|
+
readonly role: {
|
|
247
|
+
readonly $ref: "#/$defs/ForgeRole";
|
|
248
|
+
readonly description: "The role the account now holds. Absent: the account holds no role now.";
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
}, {
|
|
252
|
+
readonly title: "ProtectionChanged";
|
|
253
|
+
readonly type: "object";
|
|
254
|
+
readonly additionalProperties: false;
|
|
255
|
+
readonly required: readonly ["type", "forgeId", "resource", "requiredCheck"];
|
|
256
|
+
readonly properties: {
|
|
257
|
+
readonly type: {
|
|
258
|
+
readonly const: "protectionChanged";
|
|
259
|
+
};
|
|
260
|
+
readonly forgeId: {
|
|
261
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
262
|
+
};
|
|
263
|
+
readonly resource: {
|
|
264
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
265
|
+
};
|
|
266
|
+
readonly requiredCheck: {
|
|
267
|
+
readonly type: "boolean";
|
|
268
|
+
readonly description: "Whether the forge still refuses merges without a passing verify-trust check, with no bypass.";
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
}, {
|
|
272
|
+
readonly title: "InstallationRemoved";
|
|
273
|
+
readonly type: "object";
|
|
274
|
+
readonly additionalProperties: false;
|
|
275
|
+
readonly required: readonly ["type"];
|
|
276
|
+
readonly properties: {
|
|
277
|
+
readonly type: {
|
|
278
|
+
readonly const: "installationRemoved";
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
}, {
|
|
282
|
+
readonly title: "AccountLinked";
|
|
283
|
+
readonly type: "object";
|
|
284
|
+
readonly additionalProperties: false;
|
|
285
|
+
readonly required: readonly ["type", "jobId", "account"];
|
|
286
|
+
readonly properties: {
|
|
287
|
+
readonly type: {
|
|
288
|
+
readonly const: "accountLinked";
|
|
289
|
+
};
|
|
290
|
+
readonly jobId: {
|
|
291
|
+
readonly $ref: "#/$defs/JobId";
|
|
292
|
+
readonly description: "The beginAccountLink job.";
|
|
293
|
+
};
|
|
294
|
+
readonly account: {
|
|
295
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
}, {
|
|
299
|
+
readonly title: "BindCompleted";
|
|
300
|
+
readonly type: "object";
|
|
301
|
+
readonly additionalProperties: false;
|
|
302
|
+
readonly required: readonly ["type", "jobId", "ownerId", "kind"];
|
|
303
|
+
readonly properties: {
|
|
304
|
+
readonly type: {
|
|
305
|
+
readonly const: "bindCompleted";
|
|
306
|
+
};
|
|
307
|
+
readonly jobId: {
|
|
308
|
+
readonly $ref: "#/$defs/JobId";
|
|
309
|
+
readonly description: "The beginBind job.";
|
|
310
|
+
};
|
|
311
|
+
readonly ownerId: {
|
|
312
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
313
|
+
readonly description: "The forge's id for the owner, which survives renames.";
|
|
314
|
+
};
|
|
315
|
+
readonly kind: {
|
|
316
|
+
readonly type: "string";
|
|
317
|
+
readonly enum: readonly ["organization", "user"];
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
}];
|
|
321
|
+
};
|
|
322
|
+
readonly Response: {
|
|
323
|
+
readonly $anchor: "response";
|
|
324
|
+
readonly title: "Git Namespaces — Bridge Event — response payload";
|
|
325
|
+
readonly description: "The VTC has recorded the event. Nothing else is returned.";
|
|
326
|
+
readonly type: "object";
|
|
327
|
+
readonly additionalProperties: false;
|
|
328
|
+
readonly required: readonly [];
|
|
329
|
+
readonly properties: {
|
|
330
|
+
readonly ext: {
|
|
331
|
+
readonly $ref: "#/$defs/Ext";
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
readonly Ext: {
|
|
336
|
+
readonly title: "Ext";
|
|
337
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
338
|
+
readonly type: "object";
|
|
339
|
+
readonly minProperties: 1;
|
|
340
|
+
readonly additionalProperties: true;
|
|
341
|
+
readonly propertyNames: {
|
|
342
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
readonly ForgeId: {
|
|
346
|
+
readonly title: "ForgeId";
|
|
347
|
+
readonly description: "An identifier the forge itself assigns — a repository id, a user or organisation id — carried as a string so a forge whose ids are not numbers needs no new version. GitHub and Forgejo ids are decimal integers written as strings (`\"812736451\"`). Unlike a name, it survives renames and transfers, which is why rights and bindings are keyed by it.";
|
|
348
|
+
readonly type: "string";
|
|
349
|
+
readonly minLength: 1;
|
|
350
|
+
readonly maxLength: 64;
|
|
351
|
+
};
|
|
352
|
+
readonly ForgeAccount: {
|
|
353
|
+
readonly title: "ForgeAccount";
|
|
354
|
+
readonly description: "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.";
|
|
355
|
+
readonly type: "object";
|
|
356
|
+
readonly additionalProperties: false;
|
|
357
|
+
readonly required: readonly ["forge", "id", "login"];
|
|
358
|
+
readonly properties: {
|
|
359
|
+
readonly forge: {
|
|
360
|
+
readonly $ref: "#/$defs/ForgeHost";
|
|
361
|
+
};
|
|
362
|
+
readonly id: {
|
|
363
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
364
|
+
};
|
|
365
|
+
readonly login: {
|
|
366
|
+
readonly type: "string";
|
|
367
|
+
readonly minLength: 1;
|
|
368
|
+
readonly maxLength: 100;
|
|
369
|
+
readonly description: "The account's current login, as the forge reported it when last seen. Display only.";
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
readonly ForgeHost: {
|
|
374
|
+
readonly title: "ForgeHost";
|
|
375
|
+
readonly description: "The lowercased DNS host of a forge: `github.com`, a GitHub Enterprise Server host, `codeberg.org`, or a self-hosted Forgejo instance such as `git.example.org`. No scheme, no port, no path. The host is a segment of every resource, so a right never crosses forges.";
|
|
376
|
+
readonly type: "string";
|
|
377
|
+
readonly minLength: 3;
|
|
378
|
+
readonly maxLength: 253;
|
|
379
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
|
|
380
|
+
};
|
|
381
|
+
readonly RepoResource: {
|
|
382
|
+
readonly title: "RepoResource";
|
|
383
|
+
readonly description: "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.";
|
|
384
|
+
readonly type: "string";
|
|
385
|
+
readonly maxLength: 455;
|
|
386
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+/[a-z0-9_-][a-z0-9._-]{0,99}/[a-z0-9_-][a-z0-9._-]{0,99}$";
|
|
387
|
+
};
|
|
388
|
+
readonly DriftItem: {
|
|
389
|
+
readonly title: "DriftItem";
|
|
390
|
+
readonly description: "One difference between the forge's observed state and the VTC's projection of a repository.";
|
|
391
|
+
readonly type: "object";
|
|
392
|
+
readonly additionalProperties: false;
|
|
393
|
+
readonly required: readonly ["type", "resource"];
|
|
394
|
+
readonly properties: {
|
|
395
|
+
readonly type: {
|
|
396
|
+
readonly type: "string";
|
|
397
|
+
readonly enum: readonly ["roleAdded", "roleRemoved", "roleChanged", "requiredCheckMissing", "protectionWeakened", "bootstrapMissing"];
|
|
398
|
+
readonly description: "`roleAdded` — someone holds a forge role the projection does not give them. `roleRemoved` — a projected role is missing. `roleChanged` — a projected role is present at another level. `requiredCheckMissing` — the verify-trust check is no longer required. `protectionWeakened` — branch protection or a ruleset is weaker than the projection in another way (force-push allowed, bypass actors added). `bootstrapMissing` — a bootstrap file or variable is gone.";
|
|
399
|
+
};
|
|
400
|
+
readonly resource: {
|
|
401
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
402
|
+
};
|
|
403
|
+
readonly account: {
|
|
404
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
405
|
+
readonly description: "Whose role differs, for the three role types.";
|
|
406
|
+
};
|
|
407
|
+
readonly observed: {
|
|
408
|
+
readonly type: "string";
|
|
409
|
+
readonly maxLength: 256;
|
|
410
|
+
readonly description: "What the forge shows, in the forge's own vocabulary (a role name such as `maintain`, a setting name). Absent when nothing is there.";
|
|
411
|
+
};
|
|
412
|
+
readonly expected: {
|
|
413
|
+
readonly type: "string";
|
|
414
|
+
readonly maxLength: 256;
|
|
415
|
+
readonly description: "What the projection calls for, in the forge's own vocabulary. Absent when the projection calls for nothing.";
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
readonly NamespaceId: {
|
|
420
|
+
readonly title: "NamespaceId";
|
|
421
|
+
readonly description: "The VTC's opaque identifier for a namespace, assigned when it is bound. Stable for the life of the binding; never reused for another binding.";
|
|
422
|
+
readonly type: "string";
|
|
423
|
+
readonly minLength: 1;
|
|
424
|
+
readonly maxLength: 128;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
429
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
430
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
431
|
+
readonly $ref: "#/$defs/Response";
|
|
432
|
+
readonly $defs: {
|
|
433
|
+
readonly JobId: {
|
|
434
|
+
readonly type: "string";
|
|
435
|
+
readonly minLength: 1;
|
|
436
|
+
readonly maxLength: 128;
|
|
437
|
+
readonly description: "The VTC's identifier for a job, unique across the VTC's jobs.";
|
|
438
|
+
};
|
|
439
|
+
readonly ForgeRole: {
|
|
440
|
+
readonly type: "string";
|
|
441
|
+
readonly minLength: 1;
|
|
442
|
+
readonly maxLength: 64;
|
|
443
|
+
readonly description: "A role in the forge's own vocabulary (`maintain`, `write`).";
|
|
444
|
+
};
|
|
445
|
+
readonly ForgeEvent: {
|
|
446
|
+
readonly title: "ForgeEvent";
|
|
447
|
+
readonly description: "One forge-neutral event, discriminated by `type`. The specification's event table says what each type means and what the VTC does with it.";
|
|
448
|
+
readonly type: "object";
|
|
449
|
+
readonly oneOf: readonly [{
|
|
450
|
+
readonly title: "RepoRenamed";
|
|
451
|
+
readonly type: "object";
|
|
452
|
+
readonly additionalProperties: false;
|
|
453
|
+
readonly required: readonly ["type", "forgeId", "from", "to"];
|
|
454
|
+
readonly properties: {
|
|
455
|
+
readonly type: {
|
|
456
|
+
readonly const: "repoRenamed";
|
|
457
|
+
};
|
|
458
|
+
readonly forgeId: {
|
|
459
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
460
|
+
};
|
|
461
|
+
readonly from: {
|
|
462
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
463
|
+
};
|
|
464
|
+
readonly to: {
|
|
465
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
}, {
|
|
469
|
+
readonly title: "RepoTransferred";
|
|
470
|
+
readonly type: "object";
|
|
471
|
+
readonly additionalProperties: false;
|
|
472
|
+
readonly required: readonly ["type", "forgeId", "from", "to"];
|
|
473
|
+
readonly properties: {
|
|
474
|
+
readonly type: {
|
|
475
|
+
readonly const: "repoTransferred";
|
|
476
|
+
};
|
|
477
|
+
readonly forgeId: {
|
|
478
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
479
|
+
};
|
|
480
|
+
readonly from: {
|
|
481
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
482
|
+
};
|
|
483
|
+
readonly to: {
|
|
484
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
}, {
|
|
488
|
+
readonly title: "RepoCreatedUnmanaged";
|
|
489
|
+
readonly type: "object";
|
|
490
|
+
readonly additionalProperties: false;
|
|
491
|
+
readonly required: readonly ["type", "forgeId", "resource"];
|
|
492
|
+
readonly properties: {
|
|
493
|
+
readonly type: {
|
|
494
|
+
readonly const: "repoCreatedUnmanaged";
|
|
495
|
+
};
|
|
496
|
+
readonly forgeId: {
|
|
497
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
498
|
+
};
|
|
499
|
+
readonly resource: {
|
|
500
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
}, {
|
|
504
|
+
readonly title: "RepoDeleted";
|
|
505
|
+
readonly type: "object";
|
|
506
|
+
readonly additionalProperties: false;
|
|
507
|
+
readonly required: readonly ["type", "forgeId", "resource"];
|
|
508
|
+
readonly properties: {
|
|
509
|
+
readonly type: {
|
|
510
|
+
readonly const: "repoDeleted";
|
|
511
|
+
};
|
|
512
|
+
readonly forgeId: {
|
|
513
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
514
|
+
};
|
|
515
|
+
readonly resource: {
|
|
516
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
}, {
|
|
520
|
+
readonly title: "RoleChanged";
|
|
521
|
+
readonly type: "object";
|
|
522
|
+
readonly additionalProperties: false;
|
|
523
|
+
readonly required: readonly ["type", "forgeId", "resource", "account"];
|
|
524
|
+
readonly properties: {
|
|
525
|
+
readonly type: {
|
|
526
|
+
readonly const: "roleChanged";
|
|
527
|
+
};
|
|
528
|
+
readonly forgeId: {
|
|
529
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
530
|
+
};
|
|
531
|
+
readonly resource: {
|
|
532
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
533
|
+
};
|
|
534
|
+
readonly account: {
|
|
535
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
536
|
+
};
|
|
537
|
+
readonly role: {
|
|
538
|
+
readonly $ref: "#/$defs/ForgeRole";
|
|
539
|
+
readonly description: "The role the account now holds. Absent: the account holds no role now.";
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
}, {
|
|
543
|
+
readonly title: "ProtectionChanged";
|
|
544
|
+
readonly type: "object";
|
|
545
|
+
readonly additionalProperties: false;
|
|
546
|
+
readonly required: readonly ["type", "forgeId", "resource", "requiredCheck"];
|
|
547
|
+
readonly properties: {
|
|
548
|
+
readonly type: {
|
|
549
|
+
readonly const: "protectionChanged";
|
|
550
|
+
};
|
|
551
|
+
readonly forgeId: {
|
|
552
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
553
|
+
};
|
|
554
|
+
readonly resource: {
|
|
555
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
556
|
+
};
|
|
557
|
+
readonly requiredCheck: {
|
|
558
|
+
readonly type: "boolean";
|
|
559
|
+
readonly description: "Whether the forge still refuses merges without a passing verify-trust check, with no bypass.";
|
|
560
|
+
};
|
|
561
|
+
};
|
|
562
|
+
}, {
|
|
563
|
+
readonly title: "InstallationRemoved";
|
|
564
|
+
readonly type: "object";
|
|
565
|
+
readonly additionalProperties: false;
|
|
566
|
+
readonly required: readonly ["type"];
|
|
567
|
+
readonly properties: {
|
|
568
|
+
readonly type: {
|
|
569
|
+
readonly const: "installationRemoved";
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
}, {
|
|
573
|
+
readonly title: "AccountLinked";
|
|
574
|
+
readonly type: "object";
|
|
575
|
+
readonly additionalProperties: false;
|
|
576
|
+
readonly required: readonly ["type", "jobId", "account"];
|
|
577
|
+
readonly properties: {
|
|
578
|
+
readonly type: {
|
|
579
|
+
readonly const: "accountLinked";
|
|
580
|
+
};
|
|
581
|
+
readonly jobId: {
|
|
582
|
+
readonly $ref: "#/$defs/JobId";
|
|
583
|
+
readonly description: "The beginAccountLink job.";
|
|
584
|
+
};
|
|
585
|
+
readonly account: {
|
|
586
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
587
|
+
};
|
|
588
|
+
};
|
|
589
|
+
}, {
|
|
590
|
+
readonly title: "BindCompleted";
|
|
591
|
+
readonly type: "object";
|
|
592
|
+
readonly additionalProperties: false;
|
|
593
|
+
readonly required: readonly ["type", "jobId", "ownerId", "kind"];
|
|
594
|
+
readonly properties: {
|
|
595
|
+
readonly type: {
|
|
596
|
+
readonly const: "bindCompleted";
|
|
597
|
+
};
|
|
598
|
+
readonly jobId: {
|
|
599
|
+
readonly $ref: "#/$defs/JobId";
|
|
600
|
+
readonly description: "The beginBind job.";
|
|
601
|
+
};
|
|
602
|
+
readonly ownerId: {
|
|
603
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
604
|
+
readonly description: "The forge's id for the owner, which survives renames.";
|
|
605
|
+
};
|
|
606
|
+
readonly kind: {
|
|
607
|
+
readonly type: "string";
|
|
608
|
+
readonly enum: readonly ["organization", "user"];
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
}];
|
|
612
|
+
};
|
|
613
|
+
readonly Response: {
|
|
614
|
+
readonly $anchor: "response";
|
|
615
|
+
readonly title: "Git Namespaces — Bridge Event — response payload";
|
|
616
|
+
readonly description: "The VTC has recorded the event. Nothing else is returned.";
|
|
617
|
+
readonly type: "object";
|
|
618
|
+
readonly additionalProperties: false;
|
|
619
|
+
readonly required: readonly [];
|
|
620
|
+
readonly properties: {
|
|
621
|
+
readonly ext: {
|
|
622
|
+
readonly $ref: "#/$defs/Ext";
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
readonly Ext: {
|
|
627
|
+
readonly title: "Ext";
|
|
628
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
629
|
+
readonly type: "object";
|
|
630
|
+
readonly minProperties: 1;
|
|
631
|
+
readonly additionalProperties: true;
|
|
632
|
+
readonly propertyNames: {
|
|
633
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
readonly ForgeId: {
|
|
637
|
+
readonly title: "ForgeId";
|
|
638
|
+
readonly description: "An identifier the forge itself assigns — a repository id, a user or organisation id — carried as a string so a forge whose ids are not numbers needs no new version. GitHub and Forgejo ids are decimal integers written as strings (`\"812736451\"`). Unlike a name, it survives renames and transfers, which is why rights and bindings are keyed by it.";
|
|
639
|
+
readonly type: "string";
|
|
640
|
+
readonly minLength: 1;
|
|
641
|
+
readonly maxLength: 64;
|
|
642
|
+
};
|
|
643
|
+
readonly ForgeAccount: {
|
|
644
|
+
readonly title: "ForgeAccount";
|
|
645
|
+
readonly description: "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.";
|
|
646
|
+
readonly type: "object";
|
|
647
|
+
readonly additionalProperties: false;
|
|
648
|
+
readonly required: readonly ["forge", "id", "login"];
|
|
649
|
+
readonly properties: {
|
|
650
|
+
readonly forge: {
|
|
651
|
+
readonly $ref: "#/$defs/ForgeHost";
|
|
652
|
+
};
|
|
653
|
+
readonly id: {
|
|
654
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
655
|
+
};
|
|
656
|
+
readonly login: {
|
|
657
|
+
readonly type: "string";
|
|
658
|
+
readonly minLength: 1;
|
|
659
|
+
readonly maxLength: 100;
|
|
660
|
+
readonly description: "The account's current login, as the forge reported it when last seen. Display only.";
|
|
661
|
+
};
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
readonly ForgeHost: {
|
|
665
|
+
readonly title: "ForgeHost";
|
|
666
|
+
readonly description: "The lowercased DNS host of a forge: `github.com`, a GitHub Enterprise Server host, `codeberg.org`, or a self-hosted Forgejo instance such as `git.example.org`. No scheme, no port, no path. The host is a segment of every resource, so a right never crosses forges.";
|
|
667
|
+
readonly type: "string";
|
|
668
|
+
readonly minLength: 3;
|
|
669
|
+
readonly maxLength: 253;
|
|
670
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
|
|
671
|
+
};
|
|
672
|
+
readonly RepoResource: {
|
|
673
|
+
readonly title: "RepoResource";
|
|
674
|
+
readonly description: "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.";
|
|
675
|
+
readonly type: "string";
|
|
676
|
+
readonly maxLength: 455;
|
|
677
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+/[a-z0-9_-][a-z0-9._-]{0,99}/[a-z0-9_-][a-z0-9._-]{0,99}$";
|
|
678
|
+
};
|
|
679
|
+
readonly DriftItem: {
|
|
680
|
+
readonly title: "DriftItem";
|
|
681
|
+
readonly description: "One difference between the forge's observed state and the VTC's projection of a repository.";
|
|
682
|
+
readonly type: "object";
|
|
683
|
+
readonly additionalProperties: false;
|
|
684
|
+
readonly required: readonly ["type", "resource"];
|
|
685
|
+
readonly properties: {
|
|
686
|
+
readonly type: {
|
|
687
|
+
readonly type: "string";
|
|
688
|
+
readonly enum: readonly ["roleAdded", "roleRemoved", "roleChanged", "requiredCheckMissing", "protectionWeakened", "bootstrapMissing"];
|
|
689
|
+
readonly description: "`roleAdded` — someone holds a forge role the projection does not give them. `roleRemoved` — a projected role is missing. `roleChanged` — a projected role is present at another level. `requiredCheckMissing` — the verify-trust check is no longer required. `protectionWeakened` — branch protection or a ruleset is weaker than the projection in another way (force-push allowed, bypass actors added). `bootstrapMissing` — a bootstrap file or variable is gone.";
|
|
690
|
+
};
|
|
691
|
+
readonly resource: {
|
|
692
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
693
|
+
};
|
|
694
|
+
readonly account: {
|
|
695
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
696
|
+
readonly description: "Whose role differs, for the three role types.";
|
|
697
|
+
};
|
|
698
|
+
readonly observed: {
|
|
699
|
+
readonly type: "string";
|
|
700
|
+
readonly maxLength: 256;
|
|
701
|
+
readonly description: "What the forge shows, in the forge's own vocabulary (a role name such as `maintain`, a setting name). Absent when nothing is there.";
|
|
702
|
+
};
|
|
703
|
+
readonly expected: {
|
|
704
|
+
readonly type: "string";
|
|
705
|
+
readonly maxLength: 256;
|
|
706
|
+
readonly description: "What the projection calls for, in the forge's own vocabulary. Absent when the projection calls for nothing.";
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
};
|
|
710
|
+
readonly NamespaceId: {
|
|
711
|
+
readonly title: "NamespaceId";
|
|
712
|
+
readonly description: "The VTC's opaque identifier for a namespace, assigned when it is bound. Stable for the life of the binding; never reused for another binding.";
|
|
713
|
+
readonly type: "string";
|
|
714
|
+
readonly minLength: 1;
|
|
715
|
+
readonly maxLength: 128;
|
|
716
|
+
};
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
/**
|
|
720
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
721
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
722
|
+
* per-specification and cannot be derived from the document alone, and
|
|
723
|
+
* item 2 needs the schema this carries.
|
|
724
|
+
*/
|
|
725
|
+
export declare const SPEC: {
|
|
726
|
+
readonly typeUri: "https://trusttasks.org/spec/git-ns/bridge/event/0.1";
|
|
727
|
+
readonly isBearer: false;
|
|
728
|
+
readonly isProofRequired: true;
|
|
729
|
+
readonly isRecipientRequired: true;
|
|
730
|
+
readonly isIssuedAtRequired: true;
|
|
731
|
+
readonly payloadSchema: {
|
|
732
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
733
|
+
readonly $id: "https://trusttasks.org/spec/git-ns/bridge/event/0.1";
|
|
734
|
+
readonly title: "Git Namespaces — Bridge Event — payload";
|
|
735
|
+
readonly description: "The bridge tells the VTC something happened on the forge — translated from the forge's webhook or found by an inspection sweep — together with any drift it now sees.";
|
|
736
|
+
readonly type: "object";
|
|
737
|
+
readonly additionalProperties: false;
|
|
738
|
+
readonly required: readonly ["namespace", "event"];
|
|
739
|
+
readonly properties: {
|
|
740
|
+
readonly namespace: {
|
|
741
|
+
readonly $ref: "#/$defs/NamespaceId";
|
|
742
|
+
readonly description: "The namespace the event happened in.";
|
|
743
|
+
};
|
|
744
|
+
readonly event: {
|
|
745
|
+
readonly $ref: "#/$defs/ForgeEvent";
|
|
746
|
+
};
|
|
747
|
+
readonly drift: {
|
|
748
|
+
readonly type: "array";
|
|
749
|
+
readonly items: {
|
|
750
|
+
readonly $ref: "#/$defs/DriftItem";
|
|
751
|
+
};
|
|
752
|
+
readonly description: "The complete outstanding drift for each repository the event concerns, replacing what the VTC held for those repositories. Absent: the event changes no repository's drift.";
|
|
753
|
+
};
|
|
754
|
+
readonly ext: {
|
|
755
|
+
readonly $ref: "#/$defs/Ext";
|
|
756
|
+
};
|
|
757
|
+
};
|
|
758
|
+
readonly $defs: {
|
|
759
|
+
readonly JobId: {
|
|
760
|
+
readonly type: "string";
|
|
761
|
+
readonly minLength: 1;
|
|
762
|
+
readonly maxLength: 128;
|
|
763
|
+
readonly description: "The VTC's identifier for a job, unique across the VTC's jobs.";
|
|
764
|
+
};
|
|
765
|
+
readonly ForgeRole: {
|
|
766
|
+
readonly type: "string";
|
|
767
|
+
readonly minLength: 1;
|
|
768
|
+
readonly maxLength: 64;
|
|
769
|
+
readonly description: "A role in the forge's own vocabulary (`maintain`, `write`).";
|
|
770
|
+
};
|
|
771
|
+
readonly ForgeEvent: {
|
|
772
|
+
readonly title: "ForgeEvent";
|
|
773
|
+
readonly description: "One forge-neutral event, discriminated by `type`. The specification's event table says what each type means and what the VTC does with it.";
|
|
774
|
+
readonly type: "object";
|
|
775
|
+
readonly oneOf: readonly [{
|
|
776
|
+
readonly title: "RepoRenamed";
|
|
777
|
+
readonly type: "object";
|
|
778
|
+
readonly additionalProperties: false;
|
|
779
|
+
readonly required: readonly ["type", "forgeId", "from", "to"];
|
|
780
|
+
readonly properties: {
|
|
781
|
+
readonly type: {
|
|
782
|
+
readonly const: "repoRenamed";
|
|
783
|
+
};
|
|
784
|
+
readonly forgeId: {
|
|
785
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
786
|
+
};
|
|
787
|
+
readonly from: {
|
|
788
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
789
|
+
};
|
|
790
|
+
readonly to: {
|
|
791
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
}, {
|
|
795
|
+
readonly title: "RepoTransferred";
|
|
796
|
+
readonly type: "object";
|
|
797
|
+
readonly additionalProperties: false;
|
|
798
|
+
readonly required: readonly ["type", "forgeId", "from", "to"];
|
|
799
|
+
readonly properties: {
|
|
800
|
+
readonly type: {
|
|
801
|
+
readonly const: "repoTransferred";
|
|
802
|
+
};
|
|
803
|
+
readonly forgeId: {
|
|
804
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
805
|
+
};
|
|
806
|
+
readonly from: {
|
|
807
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
808
|
+
};
|
|
809
|
+
readonly to: {
|
|
810
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
}, {
|
|
814
|
+
readonly title: "RepoCreatedUnmanaged";
|
|
815
|
+
readonly type: "object";
|
|
816
|
+
readonly additionalProperties: false;
|
|
817
|
+
readonly required: readonly ["type", "forgeId", "resource"];
|
|
818
|
+
readonly properties: {
|
|
819
|
+
readonly type: {
|
|
820
|
+
readonly const: "repoCreatedUnmanaged";
|
|
821
|
+
};
|
|
822
|
+
readonly forgeId: {
|
|
823
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
824
|
+
};
|
|
825
|
+
readonly resource: {
|
|
826
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
827
|
+
};
|
|
828
|
+
};
|
|
829
|
+
}, {
|
|
830
|
+
readonly title: "RepoDeleted";
|
|
831
|
+
readonly type: "object";
|
|
832
|
+
readonly additionalProperties: false;
|
|
833
|
+
readonly required: readonly ["type", "forgeId", "resource"];
|
|
834
|
+
readonly properties: {
|
|
835
|
+
readonly type: {
|
|
836
|
+
readonly const: "repoDeleted";
|
|
837
|
+
};
|
|
838
|
+
readonly forgeId: {
|
|
839
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
840
|
+
};
|
|
841
|
+
readonly resource: {
|
|
842
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
843
|
+
};
|
|
844
|
+
};
|
|
845
|
+
}, {
|
|
846
|
+
readonly title: "RoleChanged";
|
|
847
|
+
readonly type: "object";
|
|
848
|
+
readonly additionalProperties: false;
|
|
849
|
+
readonly required: readonly ["type", "forgeId", "resource", "account"];
|
|
850
|
+
readonly properties: {
|
|
851
|
+
readonly type: {
|
|
852
|
+
readonly const: "roleChanged";
|
|
853
|
+
};
|
|
854
|
+
readonly forgeId: {
|
|
855
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
856
|
+
};
|
|
857
|
+
readonly resource: {
|
|
858
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
859
|
+
};
|
|
860
|
+
readonly account: {
|
|
861
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
862
|
+
};
|
|
863
|
+
readonly role: {
|
|
864
|
+
readonly $ref: "#/$defs/ForgeRole";
|
|
865
|
+
readonly description: "The role the account now holds. Absent: the account holds no role now.";
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
}, {
|
|
869
|
+
readonly title: "ProtectionChanged";
|
|
870
|
+
readonly type: "object";
|
|
871
|
+
readonly additionalProperties: false;
|
|
872
|
+
readonly required: readonly ["type", "forgeId", "resource", "requiredCheck"];
|
|
873
|
+
readonly properties: {
|
|
874
|
+
readonly type: {
|
|
875
|
+
readonly const: "protectionChanged";
|
|
876
|
+
};
|
|
877
|
+
readonly forgeId: {
|
|
878
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
879
|
+
};
|
|
880
|
+
readonly resource: {
|
|
881
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
882
|
+
};
|
|
883
|
+
readonly requiredCheck: {
|
|
884
|
+
readonly type: "boolean";
|
|
885
|
+
readonly description: "Whether the forge still refuses merges without a passing verify-trust check, with no bypass.";
|
|
886
|
+
};
|
|
887
|
+
};
|
|
888
|
+
}, {
|
|
889
|
+
readonly title: "InstallationRemoved";
|
|
890
|
+
readonly type: "object";
|
|
891
|
+
readonly additionalProperties: false;
|
|
892
|
+
readonly required: readonly ["type"];
|
|
893
|
+
readonly properties: {
|
|
894
|
+
readonly type: {
|
|
895
|
+
readonly const: "installationRemoved";
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
}, {
|
|
899
|
+
readonly title: "AccountLinked";
|
|
900
|
+
readonly type: "object";
|
|
901
|
+
readonly additionalProperties: false;
|
|
902
|
+
readonly required: readonly ["type", "jobId", "account"];
|
|
903
|
+
readonly properties: {
|
|
904
|
+
readonly type: {
|
|
905
|
+
readonly const: "accountLinked";
|
|
906
|
+
};
|
|
907
|
+
readonly jobId: {
|
|
908
|
+
readonly $ref: "#/$defs/JobId";
|
|
909
|
+
readonly description: "The beginAccountLink job.";
|
|
910
|
+
};
|
|
911
|
+
readonly account: {
|
|
912
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
}, {
|
|
916
|
+
readonly title: "BindCompleted";
|
|
917
|
+
readonly type: "object";
|
|
918
|
+
readonly additionalProperties: false;
|
|
919
|
+
readonly required: readonly ["type", "jobId", "ownerId", "kind"];
|
|
920
|
+
readonly properties: {
|
|
921
|
+
readonly type: {
|
|
922
|
+
readonly const: "bindCompleted";
|
|
923
|
+
};
|
|
924
|
+
readonly jobId: {
|
|
925
|
+
readonly $ref: "#/$defs/JobId";
|
|
926
|
+
readonly description: "The beginBind job.";
|
|
927
|
+
};
|
|
928
|
+
readonly ownerId: {
|
|
929
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
930
|
+
readonly description: "The forge's id for the owner, which survives renames.";
|
|
931
|
+
};
|
|
932
|
+
readonly kind: {
|
|
933
|
+
readonly type: "string";
|
|
934
|
+
readonly enum: readonly ["organization", "user"];
|
|
935
|
+
};
|
|
936
|
+
};
|
|
937
|
+
}];
|
|
938
|
+
};
|
|
939
|
+
readonly Response: {
|
|
940
|
+
readonly $anchor: "response";
|
|
941
|
+
readonly title: "Git Namespaces — Bridge Event — response payload";
|
|
942
|
+
readonly description: "The VTC has recorded the event. Nothing else is returned.";
|
|
943
|
+
readonly type: "object";
|
|
944
|
+
readonly additionalProperties: false;
|
|
945
|
+
readonly required: readonly [];
|
|
946
|
+
readonly properties: {
|
|
947
|
+
readonly ext: {
|
|
948
|
+
readonly $ref: "#/$defs/Ext";
|
|
949
|
+
};
|
|
950
|
+
};
|
|
951
|
+
};
|
|
952
|
+
readonly Ext: {
|
|
953
|
+
readonly title: "Ext";
|
|
954
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
955
|
+
readonly type: "object";
|
|
956
|
+
readonly minProperties: 1;
|
|
957
|
+
readonly additionalProperties: true;
|
|
958
|
+
readonly propertyNames: {
|
|
959
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
960
|
+
};
|
|
961
|
+
};
|
|
962
|
+
readonly ForgeId: {
|
|
963
|
+
readonly title: "ForgeId";
|
|
964
|
+
readonly description: "An identifier the forge itself assigns — a repository id, a user or organisation id — carried as a string so a forge whose ids are not numbers needs no new version. GitHub and Forgejo ids are decimal integers written as strings (`\"812736451\"`). Unlike a name, it survives renames and transfers, which is why rights and bindings are keyed by it.";
|
|
965
|
+
readonly type: "string";
|
|
966
|
+
readonly minLength: 1;
|
|
967
|
+
readonly maxLength: 64;
|
|
968
|
+
};
|
|
969
|
+
readonly ForgeAccount: {
|
|
970
|
+
readonly title: "ForgeAccount";
|
|
971
|
+
readonly description: "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.";
|
|
972
|
+
readonly type: "object";
|
|
973
|
+
readonly additionalProperties: false;
|
|
974
|
+
readonly required: readonly ["forge", "id", "login"];
|
|
975
|
+
readonly properties: {
|
|
976
|
+
readonly forge: {
|
|
977
|
+
readonly $ref: "#/$defs/ForgeHost";
|
|
978
|
+
};
|
|
979
|
+
readonly id: {
|
|
980
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
981
|
+
};
|
|
982
|
+
readonly login: {
|
|
983
|
+
readonly type: "string";
|
|
984
|
+
readonly minLength: 1;
|
|
985
|
+
readonly maxLength: 100;
|
|
986
|
+
readonly description: "The account's current login, as the forge reported it when last seen. Display only.";
|
|
987
|
+
};
|
|
988
|
+
};
|
|
989
|
+
};
|
|
990
|
+
readonly ForgeHost: {
|
|
991
|
+
readonly title: "ForgeHost";
|
|
992
|
+
readonly description: "The lowercased DNS host of a forge: `github.com`, a GitHub Enterprise Server host, `codeberg.org`, or a self-hosted Forgejo instance such as `git.example.org`. No scheme, no port, no path. The host is a segment of every resource, so a right never crosses forges.";
|
|
993
|
+
readonly type: "string";
|
|
994
|
+
readonly minLength: 3;
|
|
995
|
+
readonly maxLength: 253;
|
|
996
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
|
|
997
|
+
};
|
|
998
|
+
readonly RepoResource: {
|
|
999
|
+
readonly title: "RepoResource";
|
|
1000
|
+
readonly description: "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.";
|
|
1001
|
+
readonly type: "string";
|
|
1002
|
+
readonly maxLength: 455;
|
|
1003
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+/[a-z0-9_-][a-z0-9._-]{0,99}/[a-z0-9_-][a-z0-9._-]{0,99}$";
|
|
1004
|
+
};
|
|
1005
|
+
readonly DriftItem: {
|
|
1006
|
+
readonly title: "DriftItem";
|
|
1007
|
+
readonly description: "One difference between the forge's observed state and the VTC's projection of a repository.";
|
|
1008
|
+
readonly type: "object";
|
|
1009
|
+
readonly additionalProperties: false;
|
|
1010
|
+
readonly required: readonly ["type", "resource"];
|
|
1011
|
+
readonly properties: {
|
|
1012
|
+
readonly type: {
|
|
1013
|
+
readonly type: "string";
|
|
1014
|
+
readonly enum: readonly ["roleAdded", "roleRemoved", "roleChanged", "requiredCheckMissing", "protectionWeakened", "bootstrapMissing"];
|
|
1015
|
+
readonly description: "`roleAdded` — someone holds a forge role the projection does not give them. `roleRemoved` — a projected role is missing. `roleChanged` — a projected role is present at another level. `requiredCheckMissing` — the verify-trust check is no longer required. `protectionWeakened` — branch protection or a ruleset is weaker than the projection in another way (force-push allowed, bypass actors added). `bootstrapMissing` — a bootstrap file or variable is gone.";
|
|
1016
|
+
};
|
|
1017
|
+
readonly resource: {
|
|
1018
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
1019
|
+
};
|
|
1020
|
+
readonly account: {
|
|
1021
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
1022
|
+
readonly description: "Whose role differs, for the three role types.";
|
|
1023
|
+
};
|
|
1024
|
+
readonly observed: {
|
|
1025
|
+
readonly type: "string";
|
|
1026
|
+
readonly maxLength: 256;
|
|
1027
|
+
readonly description: "What the forge shows, in the forge's own vocabulary (a role name such as `maintain`, a setting name). Absent when nothing is there.";
|
|
1028
|
+
};
|
|
1029
|
+
readonly expected: {
|
|
1030
|
+
readonly type: "string";
|
|
1031
|
+
readonly maxLength: 256;
|
|
1032
|
+
readonly description: "What the projection calls for, in the forge's own vocabulary. Absent when the projection calls for nothing.";
|
|
1033
|
+
};
|
|
1034
|
+
};
|
|
1035
|
+
};
|
|
1036
|
+
readonly NamespaceId: {
|
|
1037
|
+
readonly title: "NamespaceId";
|
|
1038
|
+
readonly description: "The VTC's opaque identifier for a namespace, assigned when it is bound. Stable for the life of the binding; never reused for another binding.";
|
|
1039
|
+
readonly type: "string";
|
|
1040
|
+
readonly minLength: 1;
|
|
1041
|
+
readonly maxLength: 128;
|
|
1042
|
+
};
|
|
1043
|
+
};
|
|
1044
|
+
};
|
|
1045
|
+
};
|
|
1046
|
+
/**
|
|
1047
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
1048
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
1049
|
+
* parties (§7.3 item 5).
|
|
1050
|
+
*/
|
|
1051
|
+
export declare const RESPONSE_SPEC: {
|
|
1052
|
+
readonly typeUri: "https://trusttasks.org/spec/git-ns/bridge/event/0.1#response";
|
|
1053
|
+
readonly isBearer: false;
|
|
1054
|
+
readonly isProofRequired: true;
|
|
1055
|
+
readonly isRecipientRequired: true;
|
|
1056
|
+
readonly isIssuedAtRequired: true;
|
|
1057
|
+
readonly payloadSchema: {
|
|
1058
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1059
|
+
readonly $ref: "#/$defs/Response";
|
|
1060
|
+
readonly $defs: {
|
|
1061
|
+
readonly JobId: {
|
|
1062
|
+
readonly type: "string";
|
|
1063
|
+
readonly minLength: 1;
|
|
1064
|
+
readonly maxLength: 128;
|
|
1065
|
+
readonly description: "The VTC's identifier for a job, unique across the VTC's jobs.";
|
|
1066
|
+
};
|
|
1067
|
+
readonly ForgeRole: {
|
|
1068
|
+
readonly type: "string";
|
|
1069
|
+
readonly minLength: 1;
|
|
1070
|
+
readonly maxLength: 64;
|
|
1071
|
+
readonly description: "A role in the forge's own vocabulary (`maintain`, `write`).";
|
|
1072
|
+
};
|
|
1073
|
+
readonly ForgeEvent: {
|
|
1074
|
+
readonly title: "ForgeEvent";
|
|
1075
|
+
readonly description: "One forge-neutral event, discriminated by `type`. The specification's event table says what each type means and what the VTC does with it.";
|
|
1076
|
+
readonly type: "object";
|
|
1077
|
+
readonly oneOf: readonly [{
|
|
1078
|
+
readonly title: "RepoRenamed";
|
|
1079
|
+
readonly type: "object";
|
|
1080
|
+
readonly additionalProperties: false;
|
|
1081
|
+
readonly required: readonly ["type", "forgeId", "from", "to"];
|
|
1082
|
+
readonly properties: {
|
|
1083
|
+
readonly type: {
|
|
1084
|
+
readonly const: "repoRenamed";
|
|
1085
|
+
};
|
|
1086
|
+
readonly forgeId: {
|
|
1087
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
1088
|
+
};
|
|
1089
|
+
readonly from: {
|
|
1090
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
1091
|
+
};
|
|
1092
|
+
readonly to: {
|
|
1093
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
1094
|
+
};
|
|
1095
|
+
};
|
|
1096
|
+
}, {
|
|
1097
|
+
readonly title: "RepoTransferred";
|
|
1098
|
+
readonly type: "object";
|
|
1099
|
+
readonly additionalProperties: false;
|
|
1100
|
+
readonly required: readonly ["type", "forgeId", "from", "to"];
|
|
1101
|
+
readonly properties: {
|
|
1102
|
+
readonly type: {
|
|
1103
|
+
readonly const: "repoTransferred";
|
|
1104
|
+
};
|
|
1105
|
+
readonly forgeId: {
|
|
1106
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
1107
|
+
};
|
|
1108
|
+
readonly from: {
|
|
1109
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
1110
|
+
};
|
|
1111
|
+
readonly to: {
|
|
1112
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
}, {
|
|
1116
|
+
readonly title: "RepoCreatedUnmanaged";
|
|
1117
|
+
readonly type: "object";
|
|
1118
|
+
readonly additionalProperties: false;
|
|
1119
|
+
readonly required: readonly ["type", "forgeId", "resource"];
|
|
1120
|
+
readonly properties: {
|
|
1121
|
+
readonly type: {
|
|
1122
|
+
readonly const: "repoCreatedUnmanaged";
|
|
1123
|
+
};
|
|
1124
|
+
readonly forgeId: {
|
|
1125
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
1126
|
+
};
|
|
1127
|
+
readonly resource: {
|
|
1128
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
}, {
|
|
1132
|
+
readonly title: "RepoDeleted";
|
|
1133
|
+
readonly type: "object";
|
|
1134
|
+
readonly additionalProperties: false;
|
|
1135
|
+
readonly required: readonly ["type", "forgeId", "resource"];
|
|
1136
|
+
readonly properties: {
|
|
1137
|
+
readonly type: {
|
|
1138
|
+
readonly const: "repoDeleted";
|
|
1139
|
+
};
|
|
1140
|
+
readonly forgeId: {
|
|
1141
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
1142
|
+
};
|
|
1143
|
+
readonly resource: {
|
|
1144
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
}, {
|
|
1148
|
+
readonly title: "RoleChanged";
|
|
1149
|
+
readonly type: "object";
|
|
1150
|
+
readonly additionalProperties: false;
|
|
1151
|
+
readonly required: readonly ["type", "forgeId", "resource", "account"];
|
|
1152
|
+
readonly properties: {
|
|
1153
|
+
readonly type: {
|
|
1154
|
+
readonly const: "roleChanged";
|
|
1155
|
+
};
|
|
1156
|
+
readonly forgeId: {
|
|
1157
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
1158
|
+
};
|
|
1159
|
+
readonly resource: {
|
|
1160
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
1161
|
+
};
|
|
1162
|
+
readonly account: {
|
|
1163
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
1164
|
+
};
|
|
1165
|
+
readonly role: {
|
|
1166
|
+
readonly $ref: "#/$defs/ForgeRole";
|
|
1167
|
+
readonly description: "The role the account now holds. Absent: the account holds no role now.";
|
|
1168
|
+
};
|
|
1169
|
+
};
|
|
1170
|
+
}, {
|
|
1171
|
+
readonly title: "ProtectionChanged";
|
|
1172
|
+
readonly type: "object";
|
|
1173
|
+
readonly additionalProperties: false;
|
|
1174
|
+
readonly required: readonly ["type", "forgeId", "resource", "requiredCheck"];
|
|
1175
|
+
readonly properties: {
|
|
1176
|
+
readonly type: {
|
|
1177
|
+
readonly const: "protectionChanged";
|
|
1178
|
+
};
|
|
1179
|
+
readonly forgeId: {
|
|
1180
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
1181
|
+
};
|
|
1182
|
+
readonly resource: {
|
|
1183
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
1184
|
+
};
|
|
1185
|
+
readonly requiredCheck: {
|
|
1186
|
+
readonly type: "boolean";
|
|
1187
|
+
readonly description: "Whether the forge still refuses merges without a passing verify-trust check, with no bypass.";
|
|
1188
|
+
};
|
|
1189
|
+
};
|
|
1190
|
+
}, {
|
|
1191
|
+
readonly title: "InstallationRemoved";
|
|
1192
|
+
readonly type: "object";
|
|
1193
|
+
readonly additionalProperties: false;
|
|
1194
|
+
readonly required: readonly ["type"];
|
|
1195
|
+
readonly properties: {
|
|
1196
|
+
readonly type: {
|
|
1197
|
+
readonly const: "installationRemoved";
|
|
1198
|
+
};
|
|
1199
|
+
};
|
|
1200
|
+
}, {
|
|
1201
|
+
readonly title: "AccountLinked";
|
|
1202
|
+
readonly type: "object";
|
|
1203
|
+
readonly additionalProperties: false;
|
|
1204
|
+
readonly required: readonly ["type", "jobId", "account"];
|
|
1205
|
+
readonly properties: {
|
|
1206
|
+
readonly type: {
|
|
1207
|
+
readonly const: "accountLinked";
|
|
1208
|
+
};
|
|
1209
|
+
readonly jobId: {
|
|
1210
|
+
readonly $ref: "#/$defs/JobId";
|
|
1211
|
+
readonly description: "The beginAccountLink job.";
|
|
1212
|
+
};
|
|
1213
|
+
readonly account: {
|
|
1214
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
1215
|
+
};
|
|
1216
|
+
};
|
|
1217
|
+
}, {
|
|
1218
|
+
readonly title: "BindCompleted";
|
|
1219
|
+
readonly type: "object";
|
|
1220
|
+
readonly additionalProperties: false;
|
|
1221
|
+
readonly required: readonly ["type", "jobId", "ownerId", "kind"];
|
|
1222
|
+
readonly properties: {
|
|
1223
|
+
readonly type: {
|
|
1224
|
+
readonly const: "bindCompleted";
|
|
1225
|
+
};
|
|
1226
|
+
readonly jobId: {
|
|
1227
|
+
readonly $ref: "#/$defs/JobId";
|
|
1228
|
+
readonly description: "The beginBind job.";
|
|
1229
|
+
};
|
|
1230
|
+
readonly ownerId: {
|
|
1231
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
1232
|
+
readonly description: "The forge's id for the owner, which survives renames.";
|
|
1233
|
+
};
|
|
1234
|
+
readonly kind: {
|
|
1235
|
+
readonly type: "string";
|
|
1236
|
+
readonly enum: readonly ["organization", "user"];
|
|
1237
|
+
};
|
|
1238
|
+
};
|
|
1239
|
+
}];
|
|
1240
|
+
};
|
|
1241
|
+
readonly Response: {
|
|
1242
|
+
readonly $anchor: "response";
|
|
1243
|
+
readonly title: "Git Namespaces — Bridge Event — response payload";
|
|
1244
|
+
readonly description: "The VTC has recorded the event. Nothing else is returned.";
|
|
1245
|
+
readonly type: "object";
|
|
1246
|
+
readonly additionalProperties: false;
|
|
1247
|
+
readonly required: readonly [];
|
|
1248
|
+
readonly properties: {
|
|
1249
|
+
readonly ext: {
|
|
1250
|
+
readonly $ref: "#/$defs/Ext";
|
|
1251
|
+
};
|
|
1252
|
+
};
|
|
1253
|
+
};
|
|
1254
|
+
readonly Ext: {
|
|
1255
|
+
readonly title: "Ext";
|
|
1256
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
1257
|
+
readonly type: "object";
|
|
1258
|
+
readonly minProperties: 1;
|
|
1259
|
+
readonly additionalProperties: true;
|
|
1260
|
+
readonly propertyNames: {
|
|
1261
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1262
|
+
};
|
|
1263
|
+
};
|
|
1264
|
+
readonly ForgeId: {
|
|
1265
|
+
readonly title: "ForgeId";
|
|
1266
|
+
readonly description: "An identifier the forge itself assigns — a repository id, a user or organisation id — carried as a string so a forge whose ids are not numbers needs no new version. GitHub and Forgejo ids are decimal integers written as strings (`\"812736451\"`). Unlike a name, it survives renames and transfers, which is why rights and bindings are keyed by it.";
|
|
1267
|
+
readonly type: "string";
|
|
1268
|
+
readonly minLength: 1;
|
|
1269
|
+
readonly maxLength: 64;
|
|
1270
|
+
};
|
|
1271
|
+
readonly ForgeAccount: {
|
|
1272
|
+
readonly title: "ForgeAccount";
|
|
1273
|
+
readonly description: "A person's account on one forge. `id` is authoritative; `login` is for display only, because logins can be renamed and re-registered.";
|
|
1274
|
+
readonly type: "object";
|
|
1275
|
+
readonly additionalProperties: false;
|
|
1276
|
+
readonly required: readonly ["forge", "id", "login"];
|
|
1277
|
+
readonly properties: {
|
|
1278
|
+
readonly forge: {
|
|
1279
|
+
readonly $ref: "#/$defs/ForgeHost";
|
|
1280
|
+
};
|
|
1281
|
+
readonly id: {
|
|
1282
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
1283
|
+
};
|
|
1284
|
+
readonly login: {
|
|
1285
|
+
readonly type: "string";
|
|
1286
|
+
readonly minLength: 1;
|
|
1287
|
+
readonly maxLength: 100;
|
|
1288
|
+
readonly description: "The account's current login, as the forge reported it when last seen. Display only.";
|
|
1289
|
+
};
|
|
1290
|
+
};
|
|
1291
|
+
};
|
|
1292
|
+
readonly ForgeHost: {
|
|
1293
|
+
readonly title: "ForgeHost";
|
|
1294
|
+
readonly description: "The lowercased DNS host of a forge: `github.com`, a GitHub Enterprise Server host, `codeberg.org`, or a self-hosted Forgejo instance such as `git.example.org`. No scheme, no port, no path. The host is a segment of every resource, so a right never crosses forges.";
|
|
1295
|
+
readonly type: "string";
|
|
1296
|
+
readonly minLength: 3;
|
|
1297
|
+
readonly maxLength: 253;
|
|
1298
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$";
|
|
1299
|
+
};
|
|
1300
|
+
readonly RepoResource: {
|
|
1301
|
+
readonly title: "RepoResource";
|
|
1302
|
+
readonly description: "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.";
|
|
1303
|
+
readonly type: "string";
|
|
1304
|
+
readonly maxLength: 455;
|
|
1305
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+/[a-z0-9_-][a-z0-9._-]{0,99}/[a-z0-9_-][a-z0-9._-]{0,99}$";
|
|
1306
|
+
};
|
|
1307
|
+
readonly DriftItem: {
|
|
1308
|
+
readonly title: "DriftItem";
|
|
1309
|
+
readonly description: "One difference between the forge's observed state and the VTC's projection of a repository.";
|
|
1310
|
+
readonly type: "object";
|
|
1311
|
+
readonly additionalProperties: false;
|
|
1312
|
+
readonly required: readonly ["type", "resource"];
|
|
1313
|
+
readonly properties: {
|
|
1314
|
+
readonly type: {
|
|
1315
|
+
readonly type: "string";
|
|
1316
|
+
readonly enum: readonly ["roleAdded", "roleRemoved", "roleChanged", "requiredCheckMissing", "protectionWeakened", "bootstrapMissing"];
|
|
1317
|
+
readonly description: "`roleAdded` — someone holds a forge role the projection does not give them. `roleRemoved` — a projected role is missing. `roleChanged` — a projected role is present at another level. `requiredCheckMissing` — the verify-trust check is no longer required. `protectionWeakened` — branch protection or a ruleset is weaker than the projection in another way (force-push allowed, bypass actors added). `bootstrapMissing` — a bootstrap file or variable is gone.";
|
|
1318
|
+
};
|
|
1319
|
+
readonly resource: {
|
|
1320
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
1321
|
+
};
|
|
1322
|
+
readonly account: {
|
|
1323
|
+
readonly $ref: "#/$defs/ForgeAccount";
|
|
1324
|
+
readonly description: "Whose role differs, for the three role types.";
|
|
1325
|
+
};
|
|
1326
|
+
readonly observed: {
|
|
1327
|
+
readonly type: "string";
|
|
1328
|
+
readonly maxLength: 256;
|
|
1329
|
+
readonly description: "What the forge shows, in the forge's own vocabulary (a role name such as `maintain`, a setting name). Absent when nothing is there.";
|
|
1330
|
+
};
|
|
1331
|
+
readonly expected: {
|
|
1332
|
+
readonly type: "string";
|
|
1333
|
+
readonly maxLength: 256;
|
|
1334
|
+
readonly description: "What the projection calls for, in the forge's own vocabulary. Absent when the projection calls for nothing.";
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
1337
|
+
};
|
|
1338
|
+
readonly NamespaceId: {
|
|
1339
|
+
readonly title: "NamespaceId";
|
|
1340
|
+
readonly description: "The VTC's opaque identifier for a namespace, assigned when it is bound. Stable for the life of the binding; never reused for another binding.";
|
|
1341
|
+
readonly type: "string";
|
|
1342
|
+
readonly minLength: 1;
|
|
1343
|
+
readonly maxLength: 128;
|
|
1344
|
+
};
|
|
1345
|
+
};
|
|
1346
|
+
};
|
|
1347
|
+
};
|
|
1348
|
+
//# sourceMappingURL=payload.d.ts.map
|