@opensoftware/contracts 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/formats.js +2 -0
- package/dist/formats.js.map +1 -1
- package/dist/generated/types.d.ts +568 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js.map +1 -1
- package/events/asyncapi.yaml +42 -0
- package/events/issue-labeled/issue-labeled.schema.json +128 -0
- package/events/run-started/run-started.schema.json +139 -0
- package/factory-definition/factory-definition.schema.json +9 -0
- package/openapi/openapi.json +974 -132
- package/package.json +2 -2
- package/typespec/events.tsp +47 -0
- package/typespec/factory-definition.tsp +10 -0
- package/typespec/foreman-api.tsp +45 -0
- package/typespec/foreman.tsp +110 -0
- package/typespec/intake-api.tsp +40 -0
- package/typespec/intake.tsp +52 -0
- package/typespec/main.tsp +4 -0
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type RunRecord = Schemas["RunRecord"];
|
|
|
11
11
|
export type EvidenceManifest = Schemas["EvidenceManifest"];
|
|
12
12
|
export type Score = Schemas["Score"];
|
|
13
13
|
export type WorkReceived = Schemas["WorkReceived"];
|
|
14
|
+
export type RunStarted = Schemas["RunStarted"];
|
|
14
15
|
export type RunCompleted = Schemas["RunCompleted"];
|
|
15
16
|
export type GateRequested = Schemas["GateRequested"];
|
|
16
17
|
export type GateDecided = Schemas["GateDecided"];
|
|
@@ -18,10 +19,18 @@ export type ScoreRecorded = Schemas["ScoreRecorded"];
|
|
|
18
19
|
export type PrOpened = Schemas["PrOpened"];
|
|
19
20
|
export type PrReviewed = Schemas["PrReviewed"];
|
|
20
21
|
export type PrClosed = Schemas["PrClosed"];
|
|
22
|
+
export type IssueLabeled = Schemas["IssueLabeled"];
|
|
21
23
|
export type GateRecord = Schemas["GateRecord"];
|
|
22
24
|
export type GateRequest = Schemas["GateRequest"];
|
|
23
25
|
export type GateView = Schemas["GateView"];
|
|
24
26
|
export type ApiProblem = Schemas["ApiProblem"];
|
|
27
|
+
export type WorkSubmission = Schemas["WorkSubmission"];
|
|
28
|
+
export type WorkItemView = Schemas["WorkItemView"];
|
|
29
|
+
export type WorkRequest = Schemas["WorkRequest"];
|
|
30
|
+
export type RunView = Schemas["RunView"];
|
|
31
|
+
export type StageView = Schemas["StageView"];
|
|
32
|
+
export type CheckView = Schemas["CheckView"];
|
|
33
|
+
export type RunSignal = Schemas["RunSignal"];
|
|
25
34
|
export type SandboxSpec = Schemas["SandboxSpec"];
|
|
26
35
|
/** One reason a document does not match its format. `path` is a JSON Pointer into the document. */
|
|
27
36
|
export interface Problem {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,OAAO,EAAE,EAA2C,MAAM,kBAAkB,CAAC;AACpF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAe,WAAW,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,IAAI,IAAI,eAAe,EAAe,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,OAAO,EAAe,WAAW,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAqC,QAAQ,EAAuB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC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C7F,KAAK,UAAU;YACb,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,CAAC;QAClG,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,IAAI,GAAG,EAAE,OAAO,EAAE,6CAA6C,EAAE,CAAC;QACrG;YACE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,YAAY,IAAI,GAAG,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;IACxF,CAAC;AACH,CAAC"}
|
package/events/asyncapi.yaml
CHANGED
|
@@ -19,6 +19,12 @@ channels:
|
|
|
19
19
|
messages:
|
|
20
20
|
WorkReceived:
|
|
21
21
|
$ref: '#/components/messages/WorkReceived'
|
|
22
|
+
run-started:
|
|
23
|
+
address: osf.run.started.v1
|
|
24
|
+
description: A run started.
|
|
25
|
+
messages:
|
|
26
|
+
RunStarted:
|
|
27
|
+
$ref: '#/components/messages/RunStarted'
|
|
22
28
|
run-completed:
|
|
23
29
|
address: osf.run.completed.v1
|
|
24
30
|
description: A run ended.
|
|
@@ -61,6 +67,12 @@ channels:
|
|
|
61
67
|
messages:
|
|
62
68
|
PrClosed:
|
|
63
69
|
$ref: '#/components/messages/PrClosed'
|
|
70
|
+
issue-labeled:
|
|
71
|
+
address: osf.issue.labeled.v1
|
|
72
|
+
description: A label was added to an issue.
|
|
73
|
+
messages:
|
|
74
|
+
IssueLabeled:
|
|
75
|
+
$ref: '#/components/messages/IssueLabeled'
|
|
64
76
|
operations:
|
|
65
77
|
publishWorkReceived:
|
|
66
78
|
action: send
|
|
@@ -69,6 +81,13 @@ operations:
|
|
|
69
81
|
$ref: '#/channels/work-received'
|
|
70
82
|
messages:
|
|
71
83
|
- $ref: '#/channels/work-received/messages/WorkReceived'
|
|
84
|
+
publishRunStarted:
|
|
85
|
+
action: send
|
|
86
|
+
summary: Published by foreman.
|
|
87
|
+
channel:
|
|
88
|
+
$ref: '#/channels/run-started'
|
|
89
|
+
messages:
|
|
90
|
+
- $ref: '#/channels/run-started/messages/RunStarted'
|
|
72
91
|
publishRunCompleted:
|
|
73
92
|
action: send
|
|
74
93
|
summary: Published by foreman.
|
|
@@ -118,6 +137,13 @@ operations:
|
|
|
118
137
|
$ref: '#/channels/pr-closed'
|
|
119
138
|
messages:
|
|
120
139
|
- $ref: '#/channels/pr-closed/messages/PrClosed'
|
|
140
|
+
publishIssueLabeled:
|
|
141
|
+
action: send
|
|
142
|
+
summary: Published by forge adapters.
|
|
143
|
+
channel:
|
|
144
|
+
$ref: '#/channels/issue-labeled'
|
|
145
|
+
messages:
|
|
146
|
+
- $ref: '#/channels/issue-labeled/messages/IssueLabeled'
|
|
121
147
|
components:
|
|
122
148
|
messages:
|
|
123
149
|
WorkReceived:
|
|
@@ -128,6 +154,14 @@ components:
|
|
|
128
154
|
schemaFormat: application/schema+json;version=draft-2020-12
|
|
129
155
|
schema:
|
|
130
156
|
$ref: './work-received/work-received.schema.json'
|
|
157
|
+
RunStarted:
|
|
158
|
+
name: run.started@v1
|
|
159
|
+
title: run.started@v1
|
|
160
|
+
contentType: application/cloudevents+json
|
|
161
|
+
payload:
|
|
162
|
+
schemaFormat: application/schema+json;version=draft-2020-12
|
|
163
|
+
schema:
|
|
164
|
+
$ref: './run-started/run-started.schema.json'
|
|
131
165
|
RunCompleted:
|
|
132
166
|
name: run.completed@v1
|
|
133
167
|
title: run.completed@v1
|
|
@@ -184,3 +218,11 @@ components:
|
|
|
184
218
|
schemaFormat: application/schema+json;version=draft-2020-12
|
|
185
219
|
schema:
|
|
186
220
|
$ref: './pr-closed/pr-closed.schema.json'
|
|
221
|
+
IssueLabeled:
|
|
222
|
+
name: issue.labeled@v1
|
|
223
|
+
title: issue.labeled@v1
|
|
224
|
+
contentType: application/cloudevents+json
|
|
225
|
+
payload:
|
|
226
|
+
schemaFormat: application/schema+json;version=draft-2020-12
|
|
227
|
+
schema:
|
|
228
|
+
$ref: './issue-labeled/issue-labeled.schema.json'
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/events/issue-labeled/issue-labeled.schema.json",
|
|
4
|
+
"title": "IssueLabeled",
|
|
5
|
+
"$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"specversion": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"const": "1.0"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"maxLength": 128,
|
|
16
|
+
"description": "Unique per source. A consumer that sees the same source and id twice handles the event once."
|
|
17
|
+
},
|
|
18
|
+
"source": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "The producing module, for example \"/osf/intake\"."
|
|
22
|
+
},
|
|
23
|
+
"type": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"const": "issue.labeled@v1"
|
|
26
|
+
},
|
|
27
|
+
"time": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": "date-time"
|
|
30
|
+
},
|
|
31
|
+
"subject": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The ID of the thing the event is about: work item, gate, run, score or pull request."
|
|
34
|
+
},
|
|
35
|
+
"datacontenttype": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"const": "application/json"
|
|
38
|
+
},
|
|
39
|
+
"dataschema": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"format": "uri"
|
|
42
|
+
},
|
|
43
|
+
"traceparent": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "W3C trace context (CloudEvents distributed tracing extension)."
|
|
46
|
+
},
|
|
47
|
+
"data": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"url": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"format": "uri",
|
|
53
|
+
"description": "The issue."
|
|
54
|
+
},
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"format": "uri"
|
|
58
|
+
},
|
|
59
|
+
"number": {
|
|
60
|
+
"type": "integer",
|
|
61
|
+
"minimum": 1
|
|
62
|
+
},
|
|
63
|
+
"title": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1
|
|
66
|
+
},
|
|
67
|
+
"body": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
"author": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"properties": {
|
|
73
|
+
"kind": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"enum": [
|
|
76
|
+
"person",
|
|
77
|
+
"trigger"
|
|
78
|
+
],
|
|
79
|
+
"description": "Who caused something: a person, or an automated trigger such as a cron rule or an alert."
|
|
80
|
+
},
|
|
81
|
+
"id": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"minLength": 1,
|
|
84
|
+
"description": "Stable ID in the source system, prefixed with the source, for example \"slack:U024BE7LH\"."
|
|
85
|
+
},
|
|
86
|
+
"displayName": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "Shown to people, for example \"Varun\"."
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": [
|
|
92
|
+
"kind",
|
|
93
|
+
"id"
|
|
94
|
+
],
|
|
95
|
+
"description": "The person who opened the issue."
|
|
96
|
+
},
|
|
97
|
+
"labels": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"description": "Every label of the issue after the change."
|
|
103
|
+
},
|
|
104
|
+
"label": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "The label that was added, when the forge names it."
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"required": [
|
|
110
|
+
"url",
|
|
111
|
+
"repository",
|
|
112
|
+
"number",
|
|
113
|
+
"title",
|
|
114
|
+
"author",
|
|
115
|
+
"labels"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"required": [
|
|
120
|
+
"specversion",
|
|
121
|
+
"id",
|
|
122
|
+
"source",
|
|
123
|
+
"type",
|
|
124
|
+
"time",
|
|
125
|
+
"data"
|
|
126
|
+
],
|
|
127
|
+
"description": "forge adapters: a label was added to an issue."
|
|
128
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/sesigl/open-software-factory/main/contracts/events/run-started/run-started.schema.json",
|
|
4
|
+
"title": "RunStarted",
|
|
5
|
+
"$comment": "Generated by `pnpm build` in contracts/ from typespec/. Do not edit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"specversion": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"const": "1.0"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"maxLength": 128,
|
|
16
|
+
"description": "Unique per source. A consumer that sees the same source and id twice handles the event once."
|
|
17
|
+
},
|
|
18
|
+
"source": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "The producing module, for example \"/osf/intake\"."
|
|
22
|
+
},
|
|
23
|
+
"type": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"const": "run.started@v1"
|
|
26
|
+
},
|
|
27
|
+
"time": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"format": "date-time"
|
|
30
|
+
},
|
|
31
|
+
"subject": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The ID of the thing the event is about: work item, gate, run, score or pull request."
|
|
34
|
+
},
|
|
35
|
+
"datacontenttype": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"const": "application/json"
|
|
38
|
+
},
|
|
39
|
+
"dataschema": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"format": "uri"
|
|
42
|
+
},
|
|
43
|
+
"traceparent": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "W3C trace context (CloudEvents distributed tracing extension)."
|
|
46
|
+
},
|
|
47
|
+
"data": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"runId": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 1,
|
|
53
|
+
"maxLength": 128,
|
|
54
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
55
|
+
},
|
|
56
|
+
"workItemId": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"minLength": 1,
|
|
59
|
+
"maxLength": 128,
|
|
60
|
+
"description": "An identifier chosen by the producer. ULIDs are recommended; consumers treat it as opaque."
|
|
61
|
+
},
|
|
62
|
+
"factory": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
65
|
+
"description": "The name of the factory."
|
|
66
|
+
},
|
|
67
|
+
"factoryVersion": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^[0-9a-f]{7,40}$",
|
|
70
|
+
"description": "A Git commit hash, abbreviated (7+) or full. The factory version is the commit of the factory definition."
|
|
71
|
+
},
|
|
72
|
+
"stages": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
77
|
+
"description": "A lowercase name: letters, digits and hyphens, starting with a letter. Agents, stages, adapters, sources."
|
|
78
|
+
},
|
|
79
|
+
"description": "The stages of the run's workflow, in order."
|
|
80
|
+
},
|
|
81
|
+
"startedAt": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"format": "date-time"
|
|
84
|
+
},
|
|
85
|
+
"requester": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"kind": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"enum": [
|
|
91
|
+
"person",
|
|
92
|
+
"trigger"
|
|
93
|
+
],
|
|
94
|
+
"description": "Who caused something: a person, or an automated trigger such as a cron rule or an alert."
|
|
95
|
+
},
|
|
96
|
+
"id": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"description": "Stable ID in the source system, prefixed with the source, for example \"slack:U024BE7LH\"."
|
|
100
|
+
},
|
|
101
|
+
"displayName": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"description": "Shown to people, for example \"Varun\"."
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": [
|
|
107
|
+
"kind",
|
|
108
|
+
"id"
|
|
109
|
+
],
|
|
110
|
+
"description": "A person or trigger. RUNTIME-008: every run is attributed to one."
|
|
111
|
+
},
|
|
112
|
+
"source": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"pattern": "^[a-z][a-z0-9-]{0,62}$",
|
|
115
|
+
"description": "A lowercase name: letters, digits and hyphens, starting with a letter. Agents, stages, adapters, sources."
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": [
|
|
119
|
+
"runId",
|
|
120
|
+
"workItemId",
|
|
121
|
+
"factory",
|
|
122
|
+
"factoryVersion",
|
|
123
|
+
"stages",
|
|
124
|
+
"startedAt",
|
|
125
|
+
"requester",
|
|
126
|
+
"source"
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"required": [
|
|
131
|
+
"specversion",
|
|
132
|
+
"id",
|
|
133
|
+
"source",
|
|
134
|
+
"type",
|
|
135
|
+
"time",
|
|
136
|
+
"data"
|
|
137
|
+
],
|
|
138
|
+
"description": "foreman: a run started (ADR 0067)."
|
|
139
|
+
}
|
|
@@ -247,6 +247,15 @@
|
|
|
247
247
|
"additionalProperties": false,
|
|
248
248
|
"description": "The stage waits for a decision before it starts."
|
|
249
249
|
},
|
|
250
|
+
"checks": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"items": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"minLength": 1,
|
|
255
|
+
"description": "The name of a check on the forge: a commit status context."
|
|
256
|
+
},
|
|
257
|
+
"description": "Checks that must succeed on the run's pull request before the stage starts, by their names on the forge, for\nexample \"verify\" (ADR 0069)."
|
|
258
|
+
},
|
|
250
259
|
"evidence": {
|
|
251
260
|
"type": "string",
|
|
252
261
|
"enum": [
|