@taskcluster/client-web 88.0.1

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.
@@ -0,0 +1,150 @@
1
+ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+
3
+ import Client from '../Client';
4
+
5
+ export default class Github extends Client {
6
+ constructor(options = {}) {
7
+ super({
8
+ serviceName: 'github',
9
+ serviceVersion: 'v1',
10
+ exchangePrefix: '',
11
+ ...options,
12
+ });
13
+ this.ping.entry = {"args":[],"category":"Monitoring","method":"get","name":"ping","query":[],"route":"/ping","stability":"stable","type":"function"}; // eslint-disable-line
14
+ this.lbheartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"lbheartbeat","query":[],"route":"/__lbheartbeat__","stability":"stable","type":"function"}; // eslint-disable-line
15
+ this.version.entry = {"args":[],"category":"Monitoring","method":"get","name":"version","query":[],"route":"/__version__","stability":"stable","type":"function"}; // eslint-disable-line
16
+ this.githubWebHookConsumer.entry = {"args":[],"category":"Github Service","method":"post","name":"githubWebHookConsumer","query":[],"route":"/github","stability":"stable","type":"function"}; // eslint-disable-line
17
+ this.builds.entry = {"args":[],"category":"Github Service","method":"get","name":"builds","output":true,"query":["continuationToken","limit","organization","repository","sha","pullRequest"],"route":"/builds","scopes":"github:list-builds","stability":"stable","type":"function"}; // eslint-disable-line
18
+ this.cancelBuilds.entry = {"args":["owner","repo"],"category":"Github Service","method":"post","name":"cancelBuilds","output":true,"query":["sha","pullRequest"],"route":"/builds/<owner>/<repo>/cancel","scopes":"github:cancel-builds:<owner>:<repo>","stability":"stable","type":"function"}; // eslint-disable-line
19
+ this.badge.entry = {"args":["owner","repo","branch"],"category":"Github Service","method":"get","name":"badge","query":[],"route":"/repository/<owner>/<repo>/<branch>/badge.svg","scopes":"github:get-badge:<owner>:<repo>:<branch>","stability":"experimental","type":"function"}; // eslint-disable-line
20
+ this.repository.entry = {"args":["owner","repo"],"category":"Github Service","method":"get","name":"repository","output":true,"query":[],"route":"/repository/<owner>/<repo>","scopes":"github:get-repository:<owner>:<repo>","stability":"experimental","type":"function"}; // eslint-disable-line
21
+ this.latest.entry = {"args":["owner","repo","branch"],"category":"Github Service","method":"get","name":"latest","query":[],"route":"/repository/<owner>/<repo>/<branch>/latest","scopes":"github:latest-status:<owner>:<repo>:<branch>","stability":"stable","type":"function"}; // eslint-disable-line
22
+ this.createStatus.entry = {"args":["owner","repo","sha"],"category":"Github Service","input":true,"method":"post","name":"createStatus","query":[],"route":"/repository/<owner>/<repo>/statuses/<sha>","scopes":"github:create-status:<owner>/<repo>","stability":"experimental","type":"function"}; // eslint-disable-line
23
+ this.createComment.entry = {"args":["owner","repo","number"],"category":"Github Service","input":true,"method":"post","name":"createComment","query":[],"route":"/repository/<owner>/<repo>/issues/<number>/comments","scopes":"github:create-comment:<owner>/<repo>","stability":"stable","type":"function"}; // eslint-disable-line
24
+ this.renderTaskclusterYml.entry = {"args":[],"category":"Github Service","input":true,"method":"post","name":"renderTaskclusterYml","output":true,"query":[],"route":"/taskcluster-yml","stability":"experimental","type":"function"}; // eslint-disable-line
25
+ this.heartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"heartbeat","query":[],"route":"/__heartbeat__","stability":"stable","type":"function"}; // eslint-disable-line
26
+ }
27
+ /* eslint-disable max-len */
28
+ // Respond without doing anything.
29
+ // This endpoint is used to check that the service is up.
30
+ /* eslint-enable max-len */
31
+ ping(...args) {
32
+ this.validate(this.ping.entry, args);
33
+
34
+ return this.request(this.ping.entry, args);
35
+ }
36
+ /* eslint-disable max-len */
37
+ // Respond without doing anything.
38
+ // This endpoint is used to check that the service is up.
39
+ /* eslint-enable max-len */
40
+ lbheartbeat(...args) {
41
+ this.validate(this.lbheartbeat.entry, args);
42
+
43
+ return this.request(this.lbheartbeat.entry, args);
44
+ }
45
+ /* eslint-disable max-len */
46
+ // Respond with the JSON version object.
47
+ // https://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md
48
+ /* eslint-enable max-len */
49
+ version(...args) {
50
+ this.validate(this.version.entry, args);
51
+
52
+ return this.request(this.version.entry, args);
53
+ }
54
+ /* eslint-disable max-len */
55
+ // Capture a GitHub event and publish it via pulse, if it's a push,
56
+ // release, check run or pull request.
57
+ /* eslint-enable max-len */
58
+ githubWebHookConsumer(...args) {
59
+ this.validate(this.githubWebHookConsumer.entry, args);
60
+
61
+ return this.request(this.githubWebHookConsumer.entry, args);
62
+ }
63
+ /* eslint-disable max-len */
64
+ // A paginated list of builds that have been run in
65
+ // Taskcluster. Can be filtered on various git-specific
66
+ // fields.
67
+ /* eslint-enable max-len */
68
+ builds(...args) {
69
+ this.validate(this.builds.entry, args);
70
+
71
+ return this.request(this.builds.entry, args);
72
+ }
73
+ /* eslint-disable max-len */
74
+ // Cancel all running Task Groups associated with given repository and sha or pullRequest number
75
+ /* eslint-enable max-len */
76
+ cancelBuilds(...args) {
77
+ this.validate(this.cancelBuilds.entry, args);
78
+
79
+ return this.request(this.cancelBuilds.entry, args);
80
+ }
81
+ /* eslint-disable max-len */
82
+ // Checks the status of the latest build of a given branch
83
+ // and returns corresponding badge svg.
84
+ /* eslint-enable max-len */
85
+ badge(...args) {
86
+ this.validate(this.badge.entry, args);
87
+
88
+ return this.request(this.badge.entry, args);
89
+ }
90
+ /* eslint-disable max-len */
91
+ // Returns any repository metadata that is
92
+ // useful within Taskcluster related services.
93
+ /* eslint-enable max-len */
94
+ repository(...args) {
95
+ this.validate(this.repository.entry, args);
96
+
97
+ return this.request(this.repository.entry, args);
98
+ }
99
+ /* eslint-disable max-len */
100
+ // For a given branch of a repository, this will always point
101
+ // to a status page for the most recent task triggered by that
102
+ // branch.
103
+ // Note: This is a redirect rather than a direct link.
104
+ /* eslint-enable max-len */
105
+ latest(...args) {
106
+ this.validate(this.latest.entry, args);
107
+
108
+ return this.request(this.latest.entry, args);
109
+ }
110
+ /* eslint-disable max-len */
111
+ // For a given changeset (SHA) of a repository, this will attach a "commit status"
112
+ // on github. These statuses are links displayed next to each revision.
113
+ // The status is either OK (green check) or FAILURE (red cross),
114
+ // made of a custom title and link.
115
+ /* eslint-enable max-len */
116
+ createStatus(...args) {
117
+ this.validate(this.createStatus.entry, args);
118
+
119
+ return this.request(this.createStatus.entry, args);
120
+ }
121
+ /* eslint-disable max-len */
122
+ // For a given Issue or Pull Request of a repository, this will write a new message.
123
+ /* eslint-enable max-len */
124
+ createComment(...args) {
125
+ this.validate(this.createComment.entry, args);
126
+
127
+ return this.request(this.createComment.entry, args);
128
+ }
129
+ /* eslint-disable max-len */
130
+ // This endpoint allows to render the .taskcluster.yml file for a given event or payload.
131
+ // This is useful to preview the result of the .taskcluster.yml file before pushing it to
132
+ // the repository.
133
+ // Read more about the .taskcluster.yml file in the [documentation](https://docs.taskcluster.net/docs/reference/integrations/github/taskcluster-yml-v1)
134
+ /* eslint-enable max-len */
135
+ renderTaskclusterYml(...args) {
136
+ this.validate(this.renderTaskclusterYml.entry, args);
137
+
138
+ return this.request(this.renderTaskclusterYml.entry, args);
139
+ }
140
+ /* eslint-disable max-len */
141
+ // Respond with a service heartbeat.
142
+ // This endpoint is used to check on backing services this service
143
+ // depends on.
144
+ /* eslint-enable max-len */
145
+ heartbeat(...args) {
146
+ this.validate(this.heartbeat.entry, args);
147
+
148
+ return this.request(this.heartbeat.entry, args);
149
+ }
150
+ }
@@ -0,0 +1,68 @@
1
+ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+
3
+ import Client from '../Client';
4
+
5
+ export default class GithubEvents extends Client {
6
+ constructor(options = {}) {
7
+ super({
8
+ serviceName: 'github',
9
+ serviceVersion: 'v1',
10
+ exchangePrefix: 'exchange/taskcluster-github/v1/',
11
+ ...options,
12
+ });
13
+ }
14
+ /* eslint-disable max-len */
15
+ // When a GitHub pull request event is posted it will be broadcast on this
16
+ // exchange with the designated `organization` and `repository`
17
+ // in the routing-key along with event specific metadata in the payload.
18
+ /* eslint-enable max-len */
19
+ pullRequest(pattern) {
20
+ const entry = {"exchange":"pull-request","name":"pullRequest","routingKey":[{"constant":"primary","multipleWords":false,"name":"routingKeyKind","required":true},{"multipleWords":false,"name":"organization","required":true},{"multipleWords":false,"name":"repository","required":true},{"multipleWords":false,"name":"action","required":true}],"schema":"v1/github-pull-request-message.json#","type":"topic-exchange"}; // eslint-disable-line
21
+
22
+ return this.normalizePattern(entry, pattern);
23
+ }
24
+ /* eslint-disable max-len */
25
+ // When a GitHub push event is posted it will be broadcast on this
26
+ // exchange with the designated `organization` and `repository`
27
+ // in the routing-key along with event specific metadata in the payload.
28
+ /* eslint-enable max-len */
29
+ push(pattern) {
30
+ const entry = {"exchange":"push","name":"push","routingKey":[{"constant":"primary","multipleWords":false,"name":"routingKeyKind","required":true},{"multipleWords":false,"name":"organization","required":true},{"multipleWords":false,"name":"repository","required":true}],"schema":"v1/github-push-message.json#","type":"topic-exchange"}; // eslint-disable-line
31
+
32
+ return this.normalizePattern(entry, pattern);
33
+ }
34
+ /* eslint-disable max-len */
35
+ // When a GitHub release event is posted it will be broadcast on this
36
+ // exchange with the designated `organization` and `repository`
37
+ // in the routing-key along with event specific metadata in the payload.
38
+ /* eslint-enable max-len */
39
+ release(pattern) {
40
+ const entry = {"exchange":"release","name":"release","routingKey":[{"constant":"primary","multipleWords":false,"name":"routingKeyKind","required":true},{"multipleWords":false,"name":"organization","required":true},{"multipleWords":false,"name":"repository","required":true}],"schema":"v1/github-release-message.json#","type":"topic-exchange"}; // eslint-disable-line
41
+
42
+ return this.normalizePattern(entry, pattern);
43
+ }
44
+ /* eslint-disable max-len */
45
+ // When a GitHub check_run event with action="rerequested" is posted
46
+ // it will be broadcast on this exchange with the designated
47
+ // `organization` and `repository`
48
+ // in the routing-key along with event specific metadata in the payload.
49
+ /* eslint-enable max-len */
50
+ rerun(pattern) {
51
+ const entry = {"exchange":"rerun","name":"rerun","routingKey":[{"constant":"primary","multipleWords":false,"name":"routingKeyKind","required":true},{"multipleWords":false,"name":"organization","required":true},{"multipleWords":false,"name":"repository","required":true}],"schema":"v1/github-rerun-message.json#","type":"topic-exchange"}; // eslint-disable-line
52
+
53
+ return this.normalizePattern(entry, pattern);
54
+ }
55
+ /* eslint-disable max-len */
56
+ // supposed to signal that taskCreate API has been called for every task in the task group
57
+ // for this particular repo and this particular organization
58
+ // currently used for creating initial status indicators in GitHub UI using Statuses API.
59
+ // This particular exchange can also be bound to RabbitMQ queues by custom routes - for that,
60
+ // Pass in the array of routes as a second argument to the publish method. Currently, we do
61
+ // use the statuses routes to bind the handler that creates the initial status.
62
+ /* eslint-enable max-len */
63
+ taskGroupCreationRequested(pattern) {
64
+ const entry = {"exchange":"task-group-creation-requested","name":"taskGroupCreationRequested","routingKey":[{"constant":"primary","multipleWords":false,"name":"routingKeyKind","required":true},{"multipleWords":false,"name":"organization","required":true},{"multipleWords":false,"name":"repository","required":true}],"schema":"v1/task-group-creation-requested.json#","type":"topic-exchange"}; // eslint-disable-line
65
+
66
+ return this.normalizePattern(entry, pattern);
67
+ }
68
+ }
@@ -0,0 +1,181 @@
1
+ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+
3
+ import Client from '../Client';
4
+
5
+ export default class Hooks extends Client {
6
+ constructor(options = {}) {
7
+ super({
8
+ serviceName: 'hooks',
9
+ serviceVersion: 'v1',
10
+ exchangePrefix: '',
11
+ ...options,
12
+ });
13
+ this.ping.entry = {"args":[],"category":"Monitoring","method":"get","name":"ping","query":[],"route":"/ping","stability":"stable","type":"function"}; // eslint-disable-line
14
+ this.lbheartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"lbheartbeat","query":[],"route":"/__lbheartbeat__","stability":"stable","type":"function"}; // eslint-disable-line
15
+ this.version.entry = {"args":[],"category":"Monitoring","method":"get","name":"version","query":[],"route":"/__version__","stability":"stable","type":"function"}; // eslint-disable-line
16
+ this.listHookGroups.entry = {"args":[],"category":"Hooks","method":"get","name":"listHookGroups","output":true,"query":[],"route":"/hooks","scopes":"hooks:list-hooks:","stability":"stable","type":"function"}; // eslint-disable-line
17
+ this.listHooks.entry = {"args":["hookGroupId"],"category":"Hooks","method":"get","name":"listHooks","output":true,"query":[],"route":"/hooks/<hookGroupId>","scopes":"hooks:list-hooks:<hookGroupId>","stability":"stable","type":"function"}; // eslint-disable-line
18
+ this.hook.entry = {"args":["hookGroupId","hookId"],"category":"Hooks","method":"get","name":"hook","output":true,"query":[],"route":"/hooks/<hookGroupId>/<hookId>","scopes":"hooks:get:<hookGroupId>:<hookId>","stability":"stable","type":"function"}; // eslint-disable-line
19
+ this.getHookStatus.entry = {"args":["hookGroupId","hookId"],"category":"Hook Status","method":"get","name":"getHookStatus","output":true,"query":[],"route":"/hooks/<hookGroupId>/<hookId>/status","scopes":"hooks:status:<hookGroupId>/<hookId>","stability":"deprecated","type":"function"}; // eslint-disable-line
20
+ this.createHook.entry = {"args":["hookGroupId","hookId"],"category":"Hooks","input":true,"method":"put","name":"createHook","output":true,"query":[],"route":"/hooks/<hookGroupId>/<hookId>","scopes":{"AllOf":["hooks:modify-hook:<hookGroupId>/<hookId>","assume:hook-id:<hookGroupId>/<hookId>"]},"stability":"stable","type":"function"}; // eslint-disable-line
21
+ this.updateHook.entry = {"args":["hookGroupId","hookId"],"category":"Hooks","input":true,"method":"post","name":"updateHook","output":true,"query":[],"route":"/hooks/<hookGroupId>/<hookId>","scopes":{"AllOf":["hooks:modify-hook:<hookGroupId>/<hookId>","assume:hook-id:<hookGroupId>/<hookId>"]},"stability":"stable","type":"function"}; // eslint-disable-line
22
+ this.removeHook.entry = {"args":["hookGroupId","hookId"],"category":"Hooks","method":"delete","name":"removeHook","query":[],"route":"/hooks/<hookGroupId>/<hookId>","scopes":"hooks:modify-hook:<hookGroupId>/<hookId>","stability":"stable","type":"function"}; // eslint-disable-line
23
+ this.triggerHook.entry = {"args":["hookGroupId","hookId"],"category":"Hooks","input":true,"method":"post","name":"triggerHook","output":true,"query":[],"route":"/hooks/<hookGroupId>/<hookId>/trigger","scopes":"hooks:trigger-hook:<hookGroupId>/<hookId>","stability":"stable","type":"function"}; // eslint-disable-line
24
+ this.getTriggerToken.entry = {"args":["hookGroupId","hookId"],"category":"Hooks","method":"get","name":"getTriggerToken","output":true,"query":[],"route":"/hooks/<hookGroupId>/<hookId>/token","scopes":"hooks:get-trigger-token:<hookGroupId>/<hookId>","stability":"stable","type":"function"}; // eslint-disable-line
25
+ this.resetTriggerToken.entry = {"args":["hookGroupId","hookId"],"category":"Hooks","method":"post","name":"resetTriggerToken","output":true,"query":[],"route":"/hooks/<hookGroupId>/<hookId>/token","scopes":"hooks:reset-trigger-token:<hookGroupId>/<hookId>","stability":"stable","type":"function"}; // eslint-disable-line
26
+ this.triggerHookWithToken.entry = {"args":["hookGroupId","hookId","token"],"category":"Hooks","input":true,"method":"post","name":"triggerHookWithToken","output":true,"query":[],"route":"/hooks/<hookGroupId>/<hookId>/trigger/<token>","stability":"stable","type":"function"}; // eslint-disable-line
27
+ this.listLastFires.entry = {"args":["hookGroupId","hookId"],"category":"Hook Status","method":"get","name":"listLastFires","output":true,"query":["continuationToken","limit"],"route":"/hooks/<hookGroupId>/<hookId>/last-fires","scopes":"hooks:list-last-fires:<hookGroupId>/<hookId>","stability":"stable","type":"function"}; // eslint-disable-line
28
+ this.heartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"heartbeat","query":[],"route":"/__heartbeat__","stability":"stable","type":"function"}; // eslint-disable-line
29
+ }
30
+ /* eslint-disable max-len */
31
+ // Respond without doing anything.
32
+ // This endpoint is used to check that the service is up.
33
+ /* eslint-enable max-len */
34
+ ping(...args) {
35
+ this.validate(this.ping.entry, args);
36
+
37
+ return this.request(this.ping.entry, args);
38
+ }
39
+ /* eslint-disable max-len */
40
+ // Respond without doing anything.
41
+ // This endpoint is used to check that the service is up.
42
+ /* eslint-enable max-len */
43
+ lbheartbeat(...args) {
44
+ this.validate(this.lbheartbeat.entry, args);
45
+
46
+ return this.request(this.lbheartbeat.entry, args);
47
+ }
48
+ /* eslint-disable max-len */
49
+ // Respond with the JSON version object.
50
+ // https://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md
51
+ /* eslint-enable max-len */
52
+ version(...args) {
53
+ this.validate(this.version.entry, args);
54
+
55
+ return this.request(this.version.entry, args);
56
+ }
57
+ /* eslint-disable max-len */
58
+ // This endpoint will return a list of all hook groups with at least one hook.
59
+ /* eslint-enable max-len */
60
+ listHookGroups(...args) {
61
+ this.validate(this.listHookGroups.entry, args);
62
+
63
+ return this.request(this.listHookGroups.entry, args);
64
+ }
65
+ /* eslint-disable max-len */
66
+ // This endpoint will return a list of all the hook definitions within a
67
+ // given hook group.
68
+ /* eslint-enable max-len */
69
+ listHooks(...args) {
70
+ this.validate(this.listHooks.entry, args);
71
+
72
+ return this.request(this.listHooks.entry, args);
73
+ }
74
+ /* eslint-disable max-len */
75
+ // This endpoint will return the hook definition for the given `hookGroupId`
76
+ // and hookId.
77
+ /* eslint-enable max-len */
78
+ hook(...args) {
79
+ this.validate(this.hook.entry, args);
80
+
81
+ return this.request(this.hook.entry, args);
82
+ }
83
+ /* eslint-disable max-len */
84
+ // This endpoint will return the current status of the hook. This represents a
85
+ // snapshot in time and may vary from one call to the next.
86
+ // This method is deprecated in favor of listLastFires.
87
+ /* eslint-enable max-len */
88
+ getHookStatus(...args) {
89
+ this.validate(this.getHookStatus.entry, args);
90
+
91
+ return this.request(this.getHookStatus.entry, args);
92
+ }
93
+ /* eslint-disable max-len */
94
+ // This endpoint will create a new hook.
95
+ // The caller's credentials must include the role that will be used to
96
+ // create the task. That role must satisfy task.scopes as well as the
97
+ // necessary scopes to add the task to the queue.
98
+ /* eslint-enable max-len */
99
+ createHook(...args) {
100
+ this.validate(this.createHook.entry, args);
101
+
102
+ return this.request(this.createHook.entry, args);
103
+ }
104
+ /* eslint-disable max-len */
105
+ // This endpoint will update an existing hook. All fields except
106
+ // `hookGroupId` and `hookId` can be modified.
107
+ /* eslint-enable max-len */
108
+ updateHook(...args) {
109
+ this.validate(this.updateHook.entry, args);
110
+
111
+ return this.request(this.updateHook.entry, args);
112
+ }
113
+ /* eslint-disable max-len */
114
+ // This endpoint will remove a hook definition.
115
+ /* eslint-enable max-len */
116
+ removeHook(...args) {
117
+ this.validate(this.removeHook.entry, args);
118
+
119
+ return this.request(this.removeHook.entry, args);
120
+ }
121
+ /* eslint-disable max-len */
122
+ // This endpoint will trigger the creation of a task from a hook definition.
123
+ // The HTTP payload must match the hooks `triggerSchema`. If it does, it is
124
+ // provided as the `payload` property of the JSON-e context used to render the
125
+ // task template.
126
+ /* eslint-enable max-len */
127
+ triggerHook(...args) {
128
+ this.validate(this.triggerHook.entry, args);
129
+
130
+ return this.request(this.triggerHook.entry, args);
131
+ }
132
+ /* eslint-disable max-len */
133
+ // Retrieve a unique secret token for triggering the specified hook. This
134
+ // token can be deactivated with `resetTriggerToken`.
135
+ /* eslint-enable max-len */
136
+ getTriggerToken(...args) {
137
+ this.validate(this.getTriggerToken.entry, args);
138
+
139
+ return this.request(this.getTriggerToken.entry, args);
140
+ }
141
+ /* eslint-disable max-len */
142
+ // Reset the token for triggering a given hook. This invalidates token that
143
+ // may have been issued via getTriggerToken with a new token.
144
+ /* eslint-enable max-len */
145
+ resetTriggerToken(...args) {
146
+ this.validate(this.resetTriggerToken.entry, args);
147
+
148
+ return this.request(this.resetTriggerToken.entry, args);
149
+ }
150
+ /* eslint-disable max-len */
151
+ // This endpoint triggers a defined hook with a valid token.
152
+ // The HTTP payload must match the hooks `triggerSchema`. If it does, it is
153
+ // provided as the `payload` property of the JSON-e context used to render the
154
+ // task template.
155
+ /* eslint-enable max-len */
156
+ triggerHookWithToken(...args) {
157
+ this.validate(this.triggerHookWithToken.entry, args);
158
+
159
+ return this.request(this.triggerHookWithToken.entry, args);
160
+ }
161
+ /* eslint-disable max-len */
162
+ // This endpoint will return information about the the last few times this hook has been
163
+ // fired, including whether the hook was fired successfully or not
164
+ // By default this endpoint will return up to 1000 most recent fires in one request.
165
+ /* eslint-enable max-len */
166
+ listLastFires(...args) {
167
+ this.validate(this.listLastFires.entry, args);
168
+
169
+ return this.request(this.listLastFires.entry, args);
170
+ }
171
+ /* eslint-disable max-len */
172
+ // Respond with a service heartbeat.
173
+ // This endpoint is used to check on backing services this service
174
+ // depends on.
175
+ /* eslint-enable max-len */
176
+ heartbeat(...args) {
177
+ this.validate(this.heartbeat.entry, args);
178
+
179
+ return this.request(this.heartbeat.entry, args);
180
+ }
181
+ }
@@ -0,0 +1,38 @@
1
+ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+
3
+ import Client from '../Client';
4
+
5
+ export default class HooksEvents extends Client {
6
+ constructor(options = {}) {
7
+ super({
8
+ serviceName: 'hooks',
9
+ serviceVersion: 'v1',
10
+ exchangePrefix: 'exchange/taskcluster-hooks/v1/',
11
+ ...options,
12
+ });
13
+ }
14
+ /* eslint-disable max-len */
15
+ // Whenever the api receives a request to create apulse based hook, a message is posted to this exchange andthe receiver creates a listener with the bindings, to create a task
16
+ /* eslint-enable max-len */
17
+ hookCreated(pattern) {
18
+ const entry = {"exchange":"hook-created","name":"hookCreated","routingKey":[{"multipleWords":true,"name":"reserved","required":false}],"schema":"v1/pulse-hook-changed-message.json#","type":"topic-exchange"}; // eslint-disable-line
19
+
20
+ return this.normalizePattern(entry, pattern);
21
+ }
22
+ /* eslint-disable max-len */
23
+ // Whenever the api receives a request to update apulse based hook, a message is posted to this exchange andthe receiver updates the listener associated with that hook.
24
+ /* eslint-enable max-len */
25
+ hookUpdated(pattern) {
26
+ const entry = {"exchange":"hook-updated","name":"hookUpdated","routingKey":[{"multipleWords":true,"name":"reserved","required":false}],"schema":"v1/pulse-hook-changed-message.json#","type":"topic-exchange"}; // eslint-disable-line
27
+
28
+ return this.normalizePattern(entry, pattern);
29
+ }
30
+ /* eslint-disable max-len */
31
+ // Whenever the api receives a request to delete apulse based hook, a message is posted to this exchange andthe receiver deletes the listener associated with that hook.
32
+ /* eslint-enable max-len */
33
+ hookDeleted(pattern) {
34
+ const entry = {"exchange":"hook-deleted","name":"hookDeleted","routingKey":[{"multipleWords":true,"name":"reserved","required":false}],"schema":"v1/pulse-hook-changed-message.json#","type":"topic-exchange"}; // eslint-disable-line
35
+
36
+ return this.normalizePattern(entry, pattern);
37
+ }
38
+ }
@@ -0,0 +1,152 @@
1
+ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+
3
+ import Client from '../Client';
4
+
5
+ export default class Index extends Client {
6
+ constructor(options = {}) {
7
+ super({
8
+ serviceName: 'index',
9
+ serviceVersion: 'v1',
10
+ exchangePrefix: '',
11
+ ...options,
12
+ });
13
+ this.ping.entry = {"args":[],"category":"Monitoring","method":"get","name":"ping","query":[],"route":"/ping","stability":"stable","type":"function"}; // eslint-disable-line
14
+ this.lbheartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"lbheartbeat","query":[],"route":"/__lbheartbeat__","stability":"stable","type":"function"}; // eslint-disable-line
15
+ this.version.entry = {"args":[],"category":"Monitoring","method":"get","name":"version","query":[],"route":"/__version__","stability":"stable","type":"function"}; // eslint-disable-line
16
+ this.findTask.entry = {"args":["indexPath"],"category":"Index Service","method":"get","name":"findTask","output":true,"query":[],"route":"/task/<indexPath>","scopes":"index:find-task:<indexPath>","stability":"stable","type":"function"}; // eslint-disable-line
17
+ this.findTasksAtIndex.entry = {"args":[],"category":"Index Service","input":true,"method":"post","name":"findTasksAtIndex","output":true,"query":["continuationToken","limit"],"route":"/tasks/indexes","scopes":{"AllOf":[{"each":"index:find-task:<indexPath>","for":"indexPath","in":"indexPaths"}]},"stability":"experimental","type":"function"}; // eslint-disable-line
18
+ this.listNamespaces.entry = {"args":["namespace"],"category":"Index Service","method":"get","name":"listNamespaces","output":true,"query":["continuationToken","limit"],"route":"/namespaces/<namespace>","scopes":"index:list-namespaces:<namespace>","stability":"stable","type":"function"}; // eslint-disable-line
19
+ this.listTasks.entry = {"args":["namespace"],"category":"Index Service","method":"get","name":"listTasks","output":true,"query":["continuationToken","limit"],"route":"/tasks/<namespace>","scopes":"index:list-tasks:<namespace>","stability":"stable","type":"function"}; // eslint-disable-line
20
+ this.insertTask.entry = {"args":["namespace"],"category":"Index Service","input":true,"method":"put","name":"insertTask","output":true,"query":[],"route":"/task/<namespace>","scopes":"index:insert-task:<namespace>","stability":"stable","type":"function"}; // eslint-disable-line
21
+ this.deleteTask.entry = {"args":["namespace"],"category":"Index Service","method":"delete","name":"deleteTask","query":[],"route":"/task/<namespace>","scopes":"index:delete-task:<namespace>","stability":"stable","type":"function"}; // eslint-disable-line
22
+ this.findArtifactFromTask.entry = {"args":["indexPath","name"],"category":"Index Service","method":"get","name":"findArtifactFromTask","query":[],"route":"/task/<indexPath>/artifacts/<name>","scopes":"queue:get-artifact:<name>","stability":"stable","type":"function"}; // eslint-disable-line
23
+ this.heartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"heartbeat","query":[],"route":"/__heartbeat__","stability":"stable","type":"function"}; // eslint-disable-line
24
+ }
25
+ /* eslint-disable max-len */
26
+ // Respond without doing anything.
27
+ // This endpoint is used to check that the service is up.
28
+ /* eslint-enable max-len */
29
+ ping(...args) {
30
+ this.validate(this.ping.entry, args);
31
+
32
+ return this.request(this.ping.entry, args);
33
+ }
34
+ /* eslint-disable max-len */
35
+ // Respond without doing anything.
36
+ // This endpoint is used to check that the service is up.
37
+ /* eslint-enable max-len */
38
+ lbheartbeat(...args) {
39
+ this.validate(this.lbheartbeat.entry, args);
40
+
41
+ return this.request(this.lbheartbeat.entry, args);
42
+ }
43
+ /* eslint-disable max-len */
44
+ // Respond with the JSON version object.
45
+ // https://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md
46
+ /* eslint-enable max-len */
47
+ version(...args) {
48
+ this.validate(this.version.entry, args);
49
+
50
+ return this.request(this.version.entry, args);
51
+ }
52
+ /* eslint-disable max-len */
53
+ // Find a task by index path, returning the highest-rank task with that path. If no
54
+ // task exists for the given path, this API end-point will respond with a 404 status.
55
+ /* eslint-enable max-len */
56
+ findTask(...args) {
57
+ this.validate(this.findTask.entry, args);
58
+
59
+ return this.request(this.findTask.entry, args);
60
+ }
61
+ /* eslint-disable max-len */
62
+ // List the tasks given their labels
63
+ // This endpoint
64
+ // lists up to 1000 tasks. If more tasks are present, a
65
+ // `continuationToken` will be returned, which can be given in the next
66
+ // request, along with the same input data. If the input data is different
67
+ // the continuationToken will have no effect.
68
+ /* eslint-enable max-len */
69
+ findTasksAtIndex(...args) {
70
+ this.validate(this.findTasksAtIndex.entry, args);
71
+
72
+ return this.request(this.findTasksAtIndex.entry, args);
73
+ }
74
+ /* eslint-disable max-len */
75
+ // List the namespaces immediately under a given namespace.
76
+ // This endpoint
77
+ // lists up to 1000 namespaces. If more namespaces are present, a
78
+ // `continuationToken` will be returned, which can be given in the next
79
+ // request. For the initial request, the payload should be an empty JSON
80
+ // object.
81
+ /* eslint-enable max-len */
82
+ listNamespaces(...args) {
83
+ this.validate(this.listNamespaces.entry, args);
84
+
85
+ return this.request(this.listNamespaces.entry, args);
86
+ }
87
+ /* eslint-disable max-len */
88
+ // List the tasks immediately under a given namespace.
89
+ // This endpoint
90
+ // lists up to 1000 tasks. If more tasks are present, a
91
+ // `continuationToken` will be returned, which can be given in the next
92
+ // request. For the initial request, the payload should be an empty JSON
93
+ // object.
94
+ // **Remark**, this end-point is designed for humans browsing for tasks, not
95
+ // services, as that makes little sense.
96
+ /* eslint-enable max-len */
97
+ listTasks(...args) {
98
+ this.validate(this.listTasks.entry, args);
99
+
100
+ return this.request(this.listTasks.entry, args);
101
+ }
102
+ /* eslint-disable max-len */
103
+ // Insert a task into the index. If the new rank is less than the existing rank
104
+ // at the given index path, the task is not indexed but the response is still 200 OK.
105
+ // Please see the introduction above for information
106
+ // about indexing successfully completed tasks automatically using custom routes.
107
+ /* eslint-enable max-len */
108
+ insertTask(...args) {
109
+ this.validate(this.insertTask.entry, args);
110
+
111
+ return this.request(this.insertTask.entry, args);
112
+ }
113
+ /* eslint-disable max-len */
114
+ // Remove a task from the index. This is intended for administrative use,
115
+ // where an index entry is no longer appropriate. The parent namespace is
116
+ // not automatically deleted. Index entries with lower rank that were
117
+ // previously inserted will not re-appear, as they were never stored.
118
+ /* eslint-enable max-len */
119
+ deleteTask(...args) {
120
+ this.validate(this.deleteTask.entry, args);
121
+
122
+ return this.request(this.deleteTask.entry, args);
123
+ }
124
+ /* eslint-disable max-len */
125
+ // Find a task by index path and redirect to the artifact on the most recent
126
+ // run with the given `name`.
127
+ // Note that multiple calls to this endpoint may return artifacts from differen tasks
128
+ // if a new task is inserted into the index between calls. Avoid using this method as
129
+ // a stable link to multiple, connected files if the index path does not contain a
130
+ // unique identifier. For example, the following two links may return unrelated files:
131
+ // * https://tc.example.com/api/index/v1/task/some-app.win64.latest.installer/artifacts/public/installer.exe`
132
+ // * https://tc.example.com/api/index/v1/task/some-app.win64.latest.installer/artifacts/public/debug-symbols.zip`
133
+ // This problem be remedied by including the revision in the index path or by bundling both
134
+ // installer and debug symbols into a single artifact.
135
+ // If no task exists for the given index path, this API end-point responds with 404.
136
+ /* eslint-enable max-len */
137
+ findArtifactFromTask(...args) {
138
+ this.validate(this.findArtifactFromTask.entry, args);
139
+
140
+ return this.request(this.findArtifactFromTask.entry, args);
141
+ }
142
+ /* eslint-disable max-len */
143
+ // Respond with a service heartbeat.
144
+ // This endpoint is used to check on backing services this service
145
+ // depends on.
146
+ /* eslint-enable max-len */
147
+ heartbeat(...args) {
148
+ this.validate(this.heartbeat.entry, args);
149
+
150
+ return this.request(this.heartbeat.entry, args);
151
+ }
152
+ }