@openvtc/trust-tasks 0.20.2 → 0.20.3
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 +51 -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,462 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/git-ns/bridge/result/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext, ForgeId, RepoResource } from "../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* The bridge reports how a job ended. Exactly one result is sent per job; the VTC updates the repository's state, bootstrap status and forge id from it.
|
|
8
|
+
*/
|
|
9
|
+
export interface GitNamespacesBridgeJobResultPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The job, as git-ns/bridge/job named it.
|
|
12
|
+
*/
|
|
13
|
+
jobId: string;
|
|
14
|
+
/**
|
|
15
|
+
* `succeeded` — every step was applied. `failed` — nothing was applied. `partial` — some steps were applied and at least one failed; `steps` says which. Every step is check-then-apply, so the VTC may send the job again.
|
|
16
|
+
*/
|
|
17
|
+
outcome: "succeeded" | "failed" | "partial";
|
|
18
|
+
/**
|
|
19
|
+
* The repository the job touched, as the forge now reports it. Present whenever the job reached a repository.
|
|
20
|
+
*/
|
|
21
|
+
repo?: {
|
|
22
|
+
resource: RepoResource;
|
|
23
|
+
forgeId: ForgeId;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Per-step outcomes, in the order they ran.
|
|
27
|
+
*/
|
|
28
|
+
steps?: {
|
|
29
|
+
/**
|
|
30
|
+
* The step name, from the adapter's plan.
|
|
31
|
+
*/
|
|
32
|
+
step: string;
|
|
33
|
+
/**
|
|
34
|
+
* `applied` — changed the forge. `unchanged` — already as required. `failed` — could not be applied. `skipped` — not attempted because an earlier step failed.
|
|
35
|
+
*/
|
|
36
|
+
outcome: "applied" | "unchanged" | "failed" | "skipped";
|
|
37
|
+
/**
|
|
38
|
+
* Human-readable detail, typically for a failure.
|
|
39
|
+
*/
|
|
40
|
+
detail?: string;
|
|
41
|
+
}[];
|
|
42
|
+
/**
|
|
43
|
+
* Why the job failed or stopped partway. Present when `outcome` is not `succeeded`.
|
|
44
|
+
*/
|
|
45
|
+
error?: {
|
|
46
|
+
/**
|
|
47
|
+
* Forge-neutral: `nameTaken`, `notFound`, `forbidden` (the bridge's forge credentials lack a permission), `notCapable` (this forge or namespace cannot do it), `rateLimited`, `expired` (a begin* job's person never completed it), `forgeError`. A bridge MAY use others.
|
|
48
|
+
*/
|
|
49
|
+
code: string;
|
|
50
|
+
message?: string;
|
|
51
|
+
};
|
|
52
|
+
ext?: Ext;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The VTC has recorded the result.
|
|
56
|
+
*/
|
|
57
|
+
export interface GitNamespacesBridgeJobResultResponsePayload {
|
|
58
|
+
jobId: string;
|
|
59
|
+
ext?: Ext;
|
|
60
|
+
}
|
|
61
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
62
|
+
export type { Ext, ForgeId, RepoResource };
|
|
63
|
+
/** Trust Task type URI. */
|
|
64
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/git-ns/bridge/result/0.1";
|
|
65
|
+
/** Stable alias for this specification's request payload shape. */
|
|
66
|
+
export type Payload = GitNamespacesBridgeJobResultPayload;
|
|
67
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
68
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/git-ns/bridge/result/0.1#response";
|
|
69
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
70
|
+
export type Response = GitNamespacesBridgeJobResultResponsePayload;
|
|
71
|
+
/**
|
|
72
|
+
* This specification's payload schema, as a value.
|
|
73
|
+
*
|
|
74
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
75
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
76
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
77
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
78
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
79
|
+
*/
|
|
80
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
81
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
82
|
+
readonly $id: "https://trusttasks.org/spec/git-ns/bridge/result/0.1";
|
|
83
|
+
readonly title: "Git Namespaces — Bridge Job Result — payload";
|
|
84
|
+
readonly description: "The bridge reports how a job ended. Exactly one result is sent per job; the VTC updates the repository's state, bootstrap status and forge id from it.";
|
|
85
|
+
readonly type: "object";
|
|
86
|
+
readonly additionalProperties: false;
|
|
87
|
+
readonly required: readonly ["jobId", "outcome"];
|
|
88
|
+
readonly properties: {
|
|
89
|
+
readonly jobId: {
|
|
90
|
+
readonly type: "string";
|
|
91
|
+
readonly minLength: 1;
|
|
92
|
+
readonly maxLength: 128;
|
|
93
|
+
readonly description: "The job, as git-ns/bridge/job named it.";
|
|
94
|
+
};
|
|
95
|
+
readonly outcome: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly enum: readonly ["succeeded", "failed", "partial"];
|
|
98
|
+
readonly description: "`succeeded` — every step was applied. `failed` — nothing was applied. `partial` — some steps were applied and at least one failed; `steps` says which. Every step is check-then-apply, so the VTC may send the job again.";
|
|
99
|
+
};
|
|
100
|
+
readonly repo: {
|
|
101
|
+
readonly type: "object";
|
|
102
|
+
readonly additionalProperties: false;
|
|
103
|
+
readonly required: readonly ["resource", "forgeId"];
|
|
104
|
+
readonly description: "The repository the job touched, as the forge now reports it. Present whenever the job reached a repository.";
|
|
105
|
+
readonly properties: {
|
|
106
|
+
readonly resource: {
|
|
107
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
108
|
+
};
|
|
109
|
+
readonly forgeId: {
|
|
110
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly steps: {
|
|
115
|
+
readonly type: "array";
|
|
116
|
+
readonly items: {
|
|
117
|
+
readonly type: "object";
|
|
118
|
+
readonly additionalProperties: false;
|
|
119
|
+
readonly required: readonly ["step", "outcome"];
|
|
120
|
+
readonly properties: {
|
|
121
|
+
readonly step: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly minLength: 1;
|
|
124
|
+
readonly maxLength: 64;
|
|
125
|
+
readonly pattern: "^[a-z][A-Za-z0-9]*$";
|
|
126
|
+
readonly description: "The step name, from the adapter's plan.";
|
|
127
|
+
};
|
|
128
|
+
readonly outcome: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly enum: readonly ["applied", "unchanged", "failed", "skipped"];
|
|
131
|
+
readonly description: "`applied` — changed the forge. `unchanged` — already as required. `failed` — could not be applied. `skipped` — not attempted because an earlier step failed.";
|
|
132
|
+
};
|
|
133
|
+
readonly detail: {
|
|
134
|
+
readonly type: "string";
|
|
135
|
+
readonly maxLength: 1024;
|
|
136
|
+
readonly description: "Human-readable detail, typically for a failure.";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly description: "Per-step outcomes, in the order they ran.";
|
|
141
|
+
};
|
|
142
|
+
readonly error: {
|
|
143
|
+
readonly type: "object";
|
|
144
|
+
readonly additionalProperties: false;
|
|
145
|
+
readonly required: readonly ["code"];
|
|
146
|
+
readonly description: "Why the job failed or stopped partway. Present when `outcome` is not `succeeded`.";
|
|
147
|
+
readonly properties: {
|
|
148
|
+
readonly code: {
|
|
149
|
+
readonly type: "string";
|
|
150
|
+
readonly minLength: 1;
|
|
151
|
+
readonly maxLength: 64;
|
|
152
|
+
readonly pattern: "^[a-z][A-Za-z0-9]*$";
|
|
153
|
+
readonly description: "Forge-neutral: `nameTaken`, `notFound`, `forbidden` (the bridge's forge credentials lack a permission), `notCapable` (this forge or namespace cannot do it), `rateLimited`, `expired` (a begin* job's person never completed it), `forgeError`. A bridge MAY use others.";
|
|
154
|
+
};
|
|
155
|
+
readonly message: {
|
|
156
|
+
readonly type: "string";
|
|
157
|
+
readonly maxLength: 1024;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
readonly ext: {
|
|
162
|
+
readonly $ref: "#/$defs/Ext";
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
readonly $defs: {
|
|
166
|
+
readonly Response: {
|
|
167
|
+
readonly $anchor: "response";
|
|
168
|
+
readonly title: "Git Namespaces — Bridge Job Result — response payload";
|
|
169
|
+
readonly description: "The VTC has recorded the result.";
|
|
170
|
+
readonly type: "object";
|
|
171
|
+
readonly additionalProperties: false;
|
|
172
|
+
readonly required: readonly ["jobId"];
|
|
173
|
+
readonly properties: {
|
|
174
|
+
readonly jobId: {
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
readonly minLength: 1;
|
|
177
|
+
readonly maxLength: 128;
|
|
178
|
+
};
|
|
179
|
+
readonly ext: {
|
|
180
|
+
readonly $ref: "#/$defs/Ext";
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
readonly Ext: {
|
|
185
|
+
readonly title: "Ext";
|
|
186
|
+
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.";
|
|
187
|
+
readonly type: "object";
|
|
188
|
+
readonly minProperties: 1;
|
|
189
|
+
readonly additionalProperties: true;
|
|
190
|
+
readonly propertyNames: {
|
|
191
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
readonly ForgeId: {
|
|
195
|
+
readonly title: "ForgeId";
|
|
196
|
+
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.";
|
|
197
|
+
readonly type: "string";
|
|
198
|
+
readonly minLength: 1;
|
|
199
|
+
readonly maxLength: 64;
|
|
200
|
+
};
|
|
201
|
+
readonly RepoResource: {
|
|
202
|
+
readonly title: "RepoResource";
|
|
203
|
+
readonly description: "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.";
|
|
204
|
+
readonly type: "string";
|
|
205
|
+
readonly maxLength: 455;
|
|
206
|
+
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}$";
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
211
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
212
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
213
|
+
readonly $ref: "#/$defs/Response";
|
|
214
|
+
readonly $defs: {
|
|
215
|
+
readonly Response: {
|
|
216
|
+
readonly $anchor: "response";
|
|
217
|
+
readonly title: "Git Namespaces — Bridge Job Result — response payload";
|
|
218
|
+
readonly description: "The VTC has recorded the result.";
|
|
219
|
+
readonly type: "object";
|
|
220
|
+
readonly additionalProperties: false;
|
|
221
|
+
readonly required: readonly ["jobId"];
|
|
222
|
+
readonly properties: {
|
|
223
|
+
readonly jobId: {
|
|
224
|
+
readonly type: "string";
|
|
225
|
+
readonly minLength: 1;
|
|
226
|
+
readonly maxLength: 128;
|
|
227
|
+
};
|
|
228
|
+
readonly ext: {
|
|
229
|
+
readonly $ref: "#/$defs/Ext";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
readonly Ext: {
|
|
234
|
+
readonly title: "Ext";
|
|
235
|
+
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.";
|
|
236
|
+
readonly type: "object";
|
|
237
|
+
readonly minProperties: 1;
|
|
238
|
+
readonly additionalProperties: true;
|
|
239
|
+
readonly propertyNames: {
|
|
240
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
readonly ForgeId: {
|
|
244
|
+
readonly title: "ForgeId";
|
|
245
|
+
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.";
|
|
246
|
+
readonly type: "string";
|
|
247
|
+
readonly minLength: 1;
|
|
248
|
+
readonly maxLength: 64;
|
|
249
|
+
};
|
|
250
|
+
readonly RepoResource: {
|
|
251
|
+
readonly title: "RepoResource";
|
|
252
|
+
readonly description: "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.";
|
|
253
|
+
readonly type: "string";
|
|
254
|
+
readonly maxLength: 455;
|
|
255
|
+
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}$";
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
261
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
262
|
+
* per-specification and cannot be derived from the document alone, and
|
|
263
|
+
* item 2 needs the schema this carries.
|
|
264
|
+
*/
|
|
265
|
+
export declare const SPEC: {
|
|
266
|
+
readonly typeUri: "https://trusttasks.org/spec/git-ns/bridge/result/0.1";
|
|
267
|
+
readonly isBearer: false;
|
|
268
|
+
readonly isProofRequired: true;
|
|
269
|
+
readonly isRecipientRequired: true;
|
|
270
|
+
readonly isIssuedAtRequired: true;
|
|
271
|
+
readonly payloadSchema: {
|
|
272
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
273
|
+
readonly $id: "https://trusttasks.org/spec/git-ns/bridge/result/0.1";
|
|
274
|
+
readonly title: "Git Namespaces — Bridge Job Result — payload";
|
|
275
|
+
readonly description: "The bridge reports how a job ended. Exactly one result is sent per job; the VTC updates the repository's state, bootstrap status and forge id from it.";
|
|
276
|
+
readonly type: "object";
|
|
277
|
+
readonly additionalProperties: false;
|
|
278
|
+
readonly required: readonly ["jobId", "outcome"];
|
|
279
|
+
readonly properties: {
|
|
280
|
+
readonly jobId: {
|
|
281
|
+
readonly type: "string";
|
|
282
|
+
readonly minLength: 1;
|
|
283
|
+
readonly maxLength: 128;
|
|
284
|
+
readonly description: "The job, as git-ns/bridge/job named it.";
|
|
285
|
+
};
|
|
286
|
+
readonly outcome: {
|
|
287
|
+
readonly type: "string";
|
|
288
|
+
readonly enum: readonly ["succeeded", "failed", "partial"];
|
|
289
|
+
readonly description: "`succeeded` — every step was applied. `failed` — nothing was applied. `partial` — some steps were applied and at least one failed; `steps` says which. Every step is check-then-apply, so the VTC may send the job again.";
|
|
290
|
+
};
|
|
291
|
+
readonly repo: {
|
|
292
|
+
readonly type: "object";
|
|
293
|
+
readonly additionalProperties: false;
|
|
294
|
+
readonly required: readonly ["resource", "forgeId"];
|
|
295
|
+
readonly description: "The repository the job touched, as the forge now reports it. Present whenever the job reached a repository.";
|
|
296
|
+
readonly properties: {
|
|
297
|
+
readonly resource: {
|
|
298
|
+
readonly $ref: "#/$defs/RepoResource";
|
|
299
|
+
};
|
|
300
|
+
readonly forgeId: {
|
|
301
|
+
readonly $ref: "#/$defs/ForgeId";
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
readonly steps: {
|
|
306
|
+
readonly type: "array";
|
|
307
|
+
readonly items: {
|
|
308
|
+
readonly type: "object";
|
|
309
|
+
readonly additionalProperties: false;
|
|
310
|
+
readonly required: readonly ["step", "outcome"];
|
|
311
|
+
readonly properties: {
|
|
312
|
+
readonly step: {
|
|
313
|
+
readonly type: "string";
|
|
314
|
+
readonly minLength: 1;
|
|
315
|
+
readonly maxLength: 64;
|
|
316
|
+
readonly pattern: "^[a-z][A-Za-z0-9]*$";
|
|
317
|
+
readonly description: "The step name, from the adapter's plan.";
|
|
318
|
+
};
|
|
319
|
+
readonly outcome: {
|
|
320
|
+
readonly type: "string";
|
|
321
|
+
readonly enum: readonly ["applied", "unchanged", "failed", "skipped"];
|
|
322
|
+
readonly description: "`applied` — changed the forge. `unchanged` — already as required. `failed` — could not be applied. `skipped` — not attempted because an earlier step failed.";
|
|
323
|
+
};
|
|
324
|
+
readonly detail: {
|
|
325
|
+
readonly type: "string";
|
|
326
|
+
readonly maxLength: 1024;
|
|
327
|
+
readonly description: "Human-readable detail, typically for a failure.";
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
readonly description: "Per-step outcomes, in the order they ran.";
|
|
332
|
+
};
|
|
333
|
+
readonly error: {
|
|
334
|
+
readonly type: "object";
|
|
335
|
+
readonly additionalProperties: false;
|
|
336
|
+
readonly required: readonly ["code"];
|
|
337
|
+
readonly description: "Why the job failed or stopped partway. Present when `outcome` is not `succeeded`.";
|
|
338
|
+
readonly properties: {
|
|
339
|
+
readonly code: {
|
|
340
|
+
readonly type: "string";
|
|
341
|
+
readonly minLength: 1;
|
|
342
|
+
readonly maxLength: 64;
|
|
343
|
+
readonly pattern: "^[a-z][A-Za-z0-9]*$";
|
|
344
|
+
readonly description: "Forge-neutral: `nameTaken`, `notFound`, `forbidden` (the bridge's forge credentials lack a permission), `notCapable` (this forge or namespace cannot do it), `rateLimited`, `expired` (a begin* job's person never completed it), `forgeError`. A bridge MAY use others.";
|
|
345
|
+
};
|
|
346
|
+
readonly message: {
|
|
347
|
+
readonly type: "string";
|
|
348
|
+
readonly maxLength: 1024;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
readonly ext: {
|
|
353
|
+
readonly $ref: "#/$defs/Ext";
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
readonly $defs: {
|
|
357
|
+
readonly Response: {
|
|
358
|
+
readonly $anchor: "response";
|
|
359
|
+
readonly title: "Git Namespaces — Bridge Job Result — response payload";
|
|
360
|
+
readonly description: "The VTC has recorded the result.";
|
|
361
|
+
readonly type: "object";
|
|
362
|
+
readonly additionalProperties: false;
|
|
363
|
+
readonly required: readonly ["jobId"];
|
|
364
|
+
readonly properties: {
|
|
365
|
+
readonly jobId: {
|
|
366
|
+
readonly type: "string";
|
|
367
|
+
readonly minLength: 1;
|
|
368
|
+
readonly maxLength: 128;
|
|
369
|
+
};
|
|
370
|
+
readonly ext: {
|
|
371
|
+
readonly $ref: "#/$defs/Ext";
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
readonly Ext: {
|
|
376
|
+
readonly title: "Ext";
|
|
377
|
+
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.";
|
|
378
|
+
readonly type: "object";
|
|
379
|
+
readonly minProperties: 1;
|
|
380
|
+
readonly additionalProperties: true;
|
|
381
|
+
readonly propertyNames: {
|
|
382
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
readonly ForgeId: {
|
|
386
|
+
readonly title: "ForgeId";
|
|
387
|
+
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.";
|
|
388
|
+
readonly type: "string";
|
|
389
|
+
readonly minLength: 1;
|
|
390
|
+
readonly maxLength: 64;
|
|
391
|
+
};
|
|
392
|
+
readonly RepoResource: {
|
|
393
|
+
readonly title: "RepoResource";
|
|
394
|
+
readonly description: "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.";
|
|
395
|
+
readonly type: "string";
|
|
396
|
+
readonly maxLength: 455;
|
|
397
|
+
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}$";
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
/**
|
|
403
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
404
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
405
|
+
* parties (§7.3 item 5).
|
|
406
|
+
*/
|
|
407
|
+
export declare const RESPONSE_SPEC: {
|
|
408
|
+
readonly typeUri: "https://trusttasks.org/spec/git-ns/bridge/result/0.1#response";
|
|
409
|
+
readonly isBearer: false;
|
|
410
|
+
readonly isProofRequired: true;
|
|
411
|
+
readonly isRecipientRequired: true;
|
|
412
|
+
readonly isIssuedAtRequired: true;
|
|
413
|
+
readonly payloadSchema: {
|
|
414
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
415
|
+
readonly $ref: "#/$defs/Response";
|
|
416
|
+
readonly $defs: {
|
|
417
|
+
readonly Response: {
|
|
418
|
+
readonly $anchor: "response";
|
|
419
|
+
readonly title: "Git Namespaces — Bridge Job Result — response payload";
|
|
420
|
+
readonly description: "The VTC has recorded the result.";
|
|
421
|
+
readonly type: "object";
|
|
422
|
+
readonly additionalProperties: false;
|
|
423
|
+
readonly required: readonly ["jobId"];
|
|
424
|
+
readonly properties: {
|
|
425
|
+
readonly jobId: {
|
|
426
|
+
readonly type: "string";
|
|
427
|
+
readonly minLength: 1;
|
|
428
|
+
readonly maxLength: 128;
|
|
429
|
+
};
|
|
430
|
+
readonly ext: {
|
|
431
|
+
readonly $ref: "#/$defs/Ext";
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
readonly Ext: {
|
|
436
|
+
readonly title: "Ext";
|
|
437
|
+
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.";
|
|
438
|
+
readonly type: "object";
|
|
439
|
+
readonly minProperties: 1;
|
|
440
|
+
readonly additionalProperties: true;
|
|
441
|
+
readonly propertyNames: {
|
|
442
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
readonly ForgeId: {
|
|
446
|
+
readonly title: "ForgeId";
|
|
447
|
+
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.";
|
|
448
|
+
readonly type: "string";
|
|
449
|
+
readonly minLength: 1;
|
|
450
|
+
readonly maxLength: 64;
|
|
451
|
+
};
|
|
452
|
+
readonly RepoResource: {
|
|
453
|
+
readonly title: "RepoResource";
|
|
454
|
+
readonly description: "A forge-qualified resource naming exactly one repository: `<forge-host>/<owner>/<repo>`, lowercase.";
|
|
455
|
+
readonly type: "string";
|
|
456
|
+
readonly maxLength: 455;
|
|
457
|
+
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}$";
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../src/git-ns/bridge/result/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAGpF;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC5C;;OAEG;IACH,IAAI,CAAC,EAAE;QACL,QAAQ,EAAE,YAAY,CAAC;QACvB,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IACF;;OAEG;IACH,KAAK,CAAC,EAAE;QACN;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;QACxD;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;IACJ;;OAEG;IACH,KAAK,CAAC,EAAE;QACN;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD;;GAEG;AACH,MAAM,WAAW,2CAA2C;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;AAE3C,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,sDAA+D,CAAC;AAExF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAE1D,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,+DAAwE,CAAC;AAE1G,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,2CAA2C,CAAC;AAEnE;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuJjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiD1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|