@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,734 @@
1
+ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+
3
+ import Client from '../Client';
4
+
5
+ export default class Queue extends Client {
6
+ constructor(options = {}) {
7
+ super({
8
+ serviceName: 'queue',
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.task.entry = {"args":["taskId"],"category":"Tasks","method":"get","name":"task","output":true,"query":[],"route":"/task/<taskId>","scopes":"queue:get-task:<taskId>","stability":"stable","type":"function"}; // eslint-disable-line
17
+ this.tasks.entry = {"args":[],"category":"Tasks","input":true,"method":"post","name":"tasks","output":true,"query":["continuationToken","limit"],"route":"/tasks","scopes":{"AllOf":[{"each":"queue:get-task:<taskId>","for":"taskId","in":"taskIds"}]},"stability":"experimental","type":"function"}; // eslint-disable-line
18
+ this.statuses.entry = {"args":[],"category":"Tasks","input":true,"method":"post","name":"statuses","output":true,"query":["continuationToken","limit"],"route":"/tasks/status","scopes":{"AllOf":[{"each":"queue:status:<taskId>","for":"taskId","in":"taskIds"}]},"stability":"experimental","type":"function"}; // eslint-disable-line
19
+ this.status.entry = {"args":["taskId"],"category":"Tasks","method":"get","name":"status","output":true,"query":[],"route":"/task/<taskId>/status","scopes":"queue:status:<taskId>","stability":"stable","type":"function"}; // eslint-disable-line
20
+ this.listTaskGroup.entry = {"args":["taskGroupId"],"category":"Task Groups","method":"get","name":"listTaskGroup","output":true,"query":["continuationToken","limit"],"route":"/task-group/<taskGroupId>/list","scopes":"queue:list-task-group:<taskGroupId>","stability":"stable","type":"function"}; // eslint-disable-line
21
+ this.cancelTaskGroup.entry = {"args":["taskGroupId"],"category":"Tasks","method":"post","name":"cancelTaskGroup","output":true,"query":[],"route":"/task-group/<taskGroupId>/cancel","scopes":"queue:cancel-task-group:<schedulerId>/<taskGroupId>","stability":"experimental","type":"function"}; // eslint-disable-line
22
+ this.getTaskGroup.entry = {"args":["taskGroupId"],"category":"Task Groups","method":"get","name":"getTaskGroup","output":true,"query":[],"route":"/task-group/<taskGroupId>","scopes":"queue:list-task-group:<taskGroupId>","stability":"stable","type":"function"}; // eslint-disable-line
23
+ this.sealTaskGroup.entry = {"args":["taskGroupId"],"category":"Task Groups","method":"post","name":"sealTaskGroup","output":true,"query":[],"route":"/task-group/<taskGroupId>/seal","scopes":"queue:seal-task-group:<schedulerId>/<taskGroupId>","stability":"experimental","type":"function"}; // eslint-disable-line
24
+ this.listDependentTasks.entry = {"args":["taskId"],"category":"Tasks","method":"get","name":"listDependentTasks","output":true,"query":["continuationToken","limit"],"route":"/task/<taskId>/dependents","scopes":"queue:list-dependent-tasks:<taskId>","stability":"stable","type":"function"}; // eslint-disable-line
25
+ this.createTask.entry = {"args":["taskId"],"category":"Tasks","input":true,"method":"put","name":"createTask","output":true,"query":[],"route":"/task/<taskId>","scopes":{"AllOf":[{"each":"<scope>","for":"scope","in":"scopes"},{"each":"queue:route:<route>","for":"route","in":"routes"},"queue:create-task:project:<projectId>","queue:scheduler-id:<schedulerId>",{"AnyOf":[{"each":"queue:create-task:<priority>:<provisionerId>/<workerType>","for":"priority","in":"priorities"}]}]},"stability":"stable","type":"function"}; // eslint-disable-line
26
+ this.scheduleTask.entry = {"args":["taskId"],"category":"Tasks","method":"post","name":"scheduleTask","output":true,"query":[],"route":"/task/<taskId>/schedule","scopes":{"AnyOf":["queue:schedule-task:<schedulerId>/<taskGroupId>/<taskId>","queue:schedule-task-in-project:<projectId>",{"AllOf":["queue:schedule-task","assume:scheduler-id:<schedulerId>/<taskGroupId>"]}]},"stability":"stable","type":"function"}; // eslint-disable-line
27
+ this.rerunTask.entry = {"args":["taskId"],"category":"Tasks","method":"post","name":"rerunTask","output":true,"query":[],"route":"/task/<taskId>/rerun","scopes":{"AnyOf":["queue:rerun-task:<schedulerId>/<taskGroupId>/<taskId>","queue:rerun-task-in-project:<projectId>",{"AllOf":["queue:rerun-task","assume:scheduler-id:<schedulerId>/<taskGroupId>"]}]},"stability":"stable","type":"function"}; // eslint-disable-line
28
+ this.cancelTask.entry = {"args":["taskId"],"category":"Tasks","method":"post","name":"cancelTask","output":true,"query":[],"route":"/task/<taskId>/cancel","scopes":{"AnyOf":["queue:cancel-task:<schedulerId>/<taskGroupId>/<taskId>","queue:cancel-task-in-project:<projectId>",{"AllOf":["queue:cancel-task","assume:scheduler-id:<schedulerId>/<taskGroupId>"]}]},"stability":"stable","type":"function"}; // eslint-disable-line
29
+ this.claimWork.entry = {"args":["taskQueueId"],"category":"Worker Interface","input":true,"method":"post","name":"claimWork","output":true,"query":[],"route":"/claim-work/<taskQueueId>","scopes":{"AllOf":["queue:claim-work:<taskQueueId>","queue:worker-id:<workerGroup>/<workerId>"]},"stability":"stable","type":"function"}; // eslint-disable-line
30
+ this.claimTask.entry = {"args":["taskId","runId"],"category":"Worker Interface","input":true,"method":"post","name":"claimTask","output":true,"query":[],"route":"/task/<taskId>/runs/<runId>/claim","scopes":{"AllOf":["queue:claim-task:<provisionerId>/<workerType>","queue:worker-id:<workerGroup>/<workerId>"]},"stability":"deprecated","type":"function"}; // eslint-disable-line
31
+ this.reclaimTask.entry = {"args":["taskId","runId"],"category":"Worker Interface","method":"post","name":"reclaimTask","output":true,"query":[],"route":"/task/<taskId>/runs/<runId>/reclaim","scopes":"queue:reclaim-task:<taskId>/<runId>","stability":"stable","type":"function"}; // eslint-disable-line
32
+ this.reportCompleted.entry = {"args":["taskId","runId"],"category":"Worker Interface","method":"post","name":"reportCompleted","output":true,"query":[],"route":"/task/<taskId>/runs/<runId>/completed","scopes":"queue:resolve-task:<taskId>/<runId>","stability":"stable","type":"function"}; // eslint-disable-line
33
+ this.reportFailed.entry = {"args":["taskId","runId"],"category":"Worker Interface","method":"post","name":"reportFailed","output":true,"query":[],"route":"/task/<taskId>/runs/<runId>/failed","scopes":"queue:resolve-task:<taskId>/<runId>","stability":"stable","type":"function"}; // eslint-disable-line
34
+ this.reportException.entry = {"args":["taskId","runId"],"category":"Worker Interface","input":true,"method":"post","name":"reportException","output":true,"query":[],"route":"/task/<taskId>/runs/<runId>/exception","scopes":"queue:resolve-task:<taskId>/<runId>","stability":"stable","type":"function"}; // eslint-disable-line
35
+ this.createArtifact.entry = {"args":["taskId","runId","name"],"category":"Artifacts","input":true,"method":"post","name":"createArtifact","output":true,"query":[],"route":"/task/<taskId>/runs/<runId>/artifacts/<name>","scopes":"queue:create-artifact:<taskId>/<runId>","stability":"stable","type":"function"}; // eslint-disable-line
36
+ this.finishArtifact.entry = {"args":["taskId","runId","name"],"category":"Artifacts","input":true,"method":"put","name":"finishArtifact","query":[],"route":"/task/<taskId>/runs/<runId>/artifacts/<name>","scopes":"queue:create-artifact:<taskId>/<runId>","stability":"stable","type":"function"}; // eslint-disable-line
37
+ this.getArtifact.entry = {"args":["taskId","runId","name"],"category":"Artifacts","method":"get","name":"getArtifact","output":true,"query":[],"route":"/task/<taskId>/runs/<runId>/artifacts/<name>","scopes":{"AllOf":[{"each":"queue:get-artifact:<name>","for":"name","in":"names"}]},"stability":"stable","type":"function"}; // eslint-disable-line
38
+ this.getLatestArtifact.entry = {"args":["taskId","name"],"category":"Artifacts","method":"get","name":"getLatestArtifact","output":true,"query":[],"route":"/task/<taskId>/artifacts/<name>","scopes":{"AllOf":[{"each":"queue:get-artifact:<name>","for":"name","in":"names"}]},"stability":"stable","type":"function"}; // eslint-disable-line
39
+ this.listArtifacts.entry = {"args":["taskId","runId"],"category":"Artifacts","method":"get","name":"listArtifacts","output":true,"query":["continuationToken","limit"],"route":"/task/<taskId>/runs/<runId>/artifacts","scopes":"queue:list-artifacts:<taskId>:<runId>","stability":"stable","type":"function"}; // eslint-disable-line
40
+ this.listLatestArtifacts.entry = {"args":["taskId"],"category":"Artifacts","method":"get","name":"listLatestArtifacts","output":true,"query":["continuationToken","limit"],"route":"/task/<taskId>/artifacts","scopes":"queue:list-artifacts:<taskId>","stability":"stable","type":"function"}; // eslint-disable-line
41
+ this.artifactInfo.entry = {"args":["taskId","runId","name"],"category":"Artifacts","method":"get","name":"artifactInfo","output":true,"query":[],"route":"/task/<taskId>/runs/<runId>/artifact-info/<name>","scopes":"queue:list-artifacts:<taskId>:<runId>","stability":"stable","type":"function"}; // eslint-disable-line
42
+ this.latestArtifactInfo.entry = {"args":["taskId","name"],"category":"Artifacts","method":"get","name":"latestArtifactInfo","output":true,"query":[],"route":"/task/<taskId>/artifact-info/<name>","scopes":"queue:list-artifacts:<taskId>","stability":"stable","type":"function"}; // eslint-disable-line
43
+ this.artifact.entry = {"args":["taskId","runId","name"],"category":"Artifacts","method":"get","name":"artifact","output":true,"query":[],"route":"/task/<taskId>/runs/<runId>/artifact-content/<name>","scopes":{"AllOf":[{"each":"queue:get-artifact:<name>","for":"name","in":"names"}]},"stability":"stable","type":"function"}; // eslint-disable-line
44
+ this.latestArtifact.entry = {"args":["taskId","name"],"category":"Artifacts","method":"get","name":"latestArtifact","output":true,"query":[],"route":"/task/<taskId>/artifact-content/<name>","scopes":{"AllOf":[{"each":"queue:get-artifact:<name>","for":"name","in":"names"}]},"stability":"stable","type":"function"}; // eslint-disable-line
45
+ this.listProvisioners.entry = {"args":[],"category":"Worker Metadata","method":"get","name":"listProvisioners","output":true,"query":["continuationToken","limit"],"route":"/provisioners","scopes":"queue:list-provisioners","stability":"deprecated","type":"function"}; // eslint-disable-line
46
+ this.getProvisioner.entry = {"args":["provisionerId"],"category":"Worker Metadata","method":"get","name":"getProvisioner","output":true,"query":[],"route":"/provisioners/<provisionerId>","scopes":"queue:get-provisioner:<provisionerId>","stability":"deprecated","type":"function"}; // eslint-disable-line
47
+ this.declareProvisioner.entry = {"args":["provisionerId"],"category":"Worker Metadata","input":true,"method":"put","name":"declareProvisioner","output":true,"query":[],"route":"/provisioners/<provisionerId>","scopes":{"AllOf":[{"each":"queue:declare-provisioner:<provisionerId>#<property>","for":"property","in":"properties"}]},"stability":"deprecated","type":"function"}; // eslint-disable-line
48
+ this.pendingTasks.entry = {"args":["taskQueueId"],"category":"Worker Metadata","method":"get","name":"pendingTasks","output":true,"query":[],"route":"/pending/<taskQueueId>","scopes":"queue:pending-count:<taskQueueId>","stability":"deprecated","type":"function"}; // eslint-disable-line
49
+ this.taskQueueCounts.entry = {"args":["taskQueueId"],"category":"Worker Metadata","method":"get","name":"taskQueueCounts","output":true,"query":[],"route":"/task-queues/<taskQueueId>/counts","scopes":{"AllOf":["queue:pending-count:<taskQueueId>","queue:claimed-count:<taskQueueId>"]},"stability":"stable","type":"function"}; // eslint-disable-line
50
+ this.listPendingTasks.entry = {"args":["taskQueueId"],"category":"Worker Metadata","method":"get","name":"listPendingTasks","output":true,"query":["continuationToken","limit"],"route":"/task-queues/<taskQueueId>/pending","scopes":"queue:pending-list:<taskQueueId>","stability":"experimental","type":"function"}; // eslint-disable-line
51
+ this.listClaimedTasks.entry = {"args":["taskQueueId"],"category":"Worker Metadata","method":"get","name":"listClaimedTasks","output":true,"query":["continuationToken","limit"],"route":"/task-queues/<taskQueueId>/claimed","scopes":"queue:claimed-list:<taskQueueId>","stability":"experimental","type":"function"}; // eslint-disable-line
52
+ this.listWorkerTypes.entry = {"args":["provisionerId"],"category":"Worker Metadata","method":"get","name":"listWorkerTypes","output":true,"query":["continuationToken","limit"],"route":"/provisioners/<provisionerId>/worker-types","scopes":"queue:list-worker-types:<provisionerId>","stability":"deprecated","type":"function"}; // eslint-disable-line
53
+ this.getWorkerType.entry = {"args":["provisionerId","workerType"],"category":"Worker Metadata","method":"get","name":"getWorkerType","output":true,"query":[],"route":"/provisioners/<provisionerId>/worker-types/<workerType>","scopes":"queue:get-worker-type:<provisionerId>/<workerType>","stability":"deprecated","type":"function"}; // eslint-disable-line
54
+ this.declareWorkerType.entry = {"args":["provisionerId","workerType"],"category":"Worker Metadata","input":true,"method":"put","name":"declareWorkerType","output":true,"query":[],"route":"/provisioners/<provisionerId>/worker-types/<workerType>","scopes":{"AllOf":[{"each":"queue:declare-worker-type:<provisionerId>/<workerType>#<property>","for":"property","in":"properties"}]},"stability":"deprecated","type":"function"}; // eslint-disable-line
55
+ this.listTaskQueues.entry = {"args":[],"category":"Worker Metadata","method":"get","name":"listTaskQueues","output":true,"query":["continuationToken","limit"],"route":"/task-queues","scopes":"queue:list-task-queues","stability":"stable","type":"function"}; // eslint-disable-line
56
+ this.getTaskQueue.entry = {"args":["taskQueueId"],"category":"Worker Metadata","method":"get","name":"getTaskQueue","output":true,"query":[],"route":"/task-queues/<taskQueueId>","scopes":"queue:get-task-queue:<taskQueueId>","stability":"stable","type":"function"}; // eslint-disable-line
57
+ this.listWorkers.entry = {"args":["provisionerId","workerType"],"category":"Worker Metadata","method":"get","name":"listWorkers","output":true,"query":["continuationToken","limit","quarantined"],"route":"/provisioners/<provisionerId>/worker-types/<workerType>/workers","scopes":"queue:list-workers:<provisionerId>/<workerType>","stability":"deprecated","type":"function"}; // eslint-disable-line
58
+ this.getWorker.entry = {"args":["provisionerId","workerType","workerGroup","workerId"],"category":"Worker Metadata","method":"get","name":"getWorker","output":true,"query":[],"route":"/provisioners/<provisionerId>/worker-types/<workerType>/workers/<workerGroup>/<workerId>","scopes":"queue:get-worker:<provisionerId>/<workerType>/<workerGroup>/<workerId>","stability":"deprecated","type":"function"}; // eslint-disable-line
59
+ this.quarantineWorker.entry = {"args":["provisionerId","workerType","workerGroup","workerId"],"category":"Worker Metadata","input":true,"method":"put","name":"quarantineWorker","output":true,"query":[],"route":"/provisioners/<provisionerId>/worker-types/<workerType>/workers/<workerGroup>/<workerId>","scopes":{"AllOf":["queue:quarantine-worker:<provisionerId>/<workerType>/<workerGroup>/<workerId>"]},"stability":"experimental","type":"function"}; // eslint-disable-line
60
+ this.declareWorker.entry = {"args":["provisionerId","workerType","workerGroup","workerId"],"category":"Worker Metadata","input":true,"method":"put","name":"declareWorker","output":true,"query":[],"route":"/provisioners/<provisionerId>/worker-types/<workerType>/<workerGroup>/<workerId>","scopes":{"AllOf":[{"each":"queue:declare-worker:<provisionerId>/<workerType>/<workerGroup>/<workerId>#<property>","for":"property","in":"properties"}]},"stability":"experimental","type":"function"}; // eslint-disable-line
61
+ this.heartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"heartbeat","query":[],"route":"/__heartbeat__","stability":"stable","type":"function"}; // eslint-disable-line
62
+ }
63
+ /* eslint-disable max-len */
64
+ // Respond without doing anything.
65
+ // This endpoint is used to check that the service is up.
66
+ /* eslint-enable max-len */
67
+ ping(...args) {
68
+ this.validate(this.ping.entry, args);
69
+
70
+ return this.request(this.ping.entry, args);
71
+ }
72
+ /* eslint-disable max-len */
73
+ // Respond without doing anything.
74
+ // This endpoint is used to check that the service is up.
75
+ /* eslint-enable max-len */
76
+ lbheartbeat(...args) {
77
+ this.validate(this.lbheartbeat.entry, args);
78
+
79
+ return this.request(this.lbheartbeat.entry, args);
80
+ }
81
+ /* eslint-disable max-len */
82
+ // Respond with the JSON version object.
83
+ // https://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md
84
+ /* eslint-enable max-len */
85
+ version(...args) {
86
+ this.validate(this.version.entry, args);
87
+
88
+ return this.request(this.version.entry, args);
89
+ }
90
+ /* eslint-disable max-len */
91
+ // This end-point will return the task-definition. Notice that the task
92
+ // definition may have been modified by queue, if an optional property is
93
+ // not specified the queue may provide a default value.
94
+ /* eslint-enable max-len */
95
+ task(...args) {
96
+ this.validate(this.task.entry, args);
97
+
98
+ return this.request(this.task.entry, args);
99
+ }
100
+ /* eslint-disable max-len */
101
+ // This end-point will return the task definition for each input task id.
102
+ // Notice that the task definitions may have been modified by queue.
103
+ /* eslint-enable max-len */
104
+ tasks(...args) {
105
+ this.validate(this.tasks.entry, args);
106
+
107
+ return this.request(this.tasks.entry, args);
108
+ }
109
+ /* eslint-disable max-len */
110
+ // This end-point will return the task statuses for each input task id.
111
+ // If a given taskId does not match a task, it will be ignored,
112
+ // and callers will need to handle the difference.
113
+ /* eslint-enable max-len */
114
+ statuses(...args) {
115
+ this.validate(this.statuses.entry, args);
116
+
117
+ return this.request(this.statuses.entry, args);
118
+ }
119
+ /* eslint-disable max-len */
120
+ // Get task status structure from `taskId`
121
+ /* eslint-enable max-len */
122
+ status(...args) {
123
+ this.validate(this.status.entry, args);
124
+
125
+ return this.request(this.status.entry, args);
126
+ }
127
+ /* eslint-disable max-len */
128
+ // List tasks sharing the same `taskGroupId`.
129
+ // As a task-group may contain an unbounded number of tasks, this end-point
130
+ // may return a `continuationToken`. To continue listing tasks you must call
131
+ // the `listTaskGroup` again with the `continuationToken` as the
132
+ // query-string option `continuationToken`.
133
+ // By default this end-point will try to return up to 1000 members in one
134
+ // request. But it **may return less**, even if more tasks are available.
135
+ // It may also return a `continuationToken` even though there are no more
136
+ // results. However, you can only be sure to have seen all results if you
137
+ // keep calling `listTaskGroup` with the last `continuationToken` until you
138
+ // get a result without a `continuationToken`.
139
+ // If you are not interested in listing all the members at once, you may
140
+ // use the query-string option `limit` to return fewer.
141
+ // If you only want to to fetch task group metadata without the tasks,
142
+ // you can call the `getTaskGroup` method.
143
+ /* eslint-enable max-len */
144
+ listTaskGroup(...args) {
145
+ this.validate(this.listTaskGroup.entry, args);
146
+
147
+ return this.request(this.listTaskGroup.entry, args);
148
+ }
149
+ /* eslint-disable max-len */
150
+ // This method will cancel all unresolved tasks (`unscheduled`, `pending` or `running` states)
151
+ // with the given `taskGroupId`. Behaviour is similar to the `cancelTask` method.
152
+ // It is only possible to cancel a task group if it has been sealed using `sealTaskGroup`.
153
+ // If the task group is not sealed, this method will return a 409 response.
154
+ // It is possible to rerun a canceled task which will result in a new run.
155
+ // Calling `cancelTaskGroup` again in this case will only cancel the new run.
156
+ // Other tasks that were already canceled would not be canceled again.
157
+ /* eslint-enable max-len */
158
+ cancelTaskGroup(...args) {
159
+ this.validate(this.cancelTaskGroup.entry, args);
160
+
161
+ return this.request(this.cancelTaskGroup.entry, args);
162
+ }
163
+ /* eslint-disable max-len */
164
+ // Get task group information by `taskGroupId`.
165
+ // This will return meta-information associated with the task group.
166
+ // It contains information about task group expiry date or if it is sealed.
167
+ // If you also want to see which tasks belong to this task group, you can call
168
+ // `listTaskGroup` method.
169
+ /* eslint-enable max-len */
170
+ getTaskGroup(...args) {
171
+ this.validate(this.getTaskGroup.entry, args);
172
+
173
+ return this.request(this.getTaskGroup.entry, args);
174
+ }
175
+ /* eslint-disable max-len */
176
+ // Seal task group to prevent creation of new tasks.
177
+ // Task group can be sealed once and is irreversible. Calling it multiple times
178
+ // will return same result and will not update it again.
179
+ /* eslint-enable max-len */
180
+ sealTaskGroup(...args) {
181
+ this.validate(this.sealTaskGroup.entry, args);
182
+
183
+ return this.request(this.sealTaskGroup.entry, args);
184
+ }
185
+ /* eslint-disable max-len */
186
+ // List tasks that depend on the given `taskId`.
187
+ // As many tasks from different task-groups may dependent on a single tasks,
188
+ // this end-point may return a `continuationToken`. To continue listing
189
+ // tasks you must call `listDependentTasks` again with the
190
+ // `continuationToken` as the query-string option `continuationToken`.
191
+ // By default this end-point will try to return up to 1000 tasks in one
192
+ // request. But it **may return less**, even if more tasks are available.
193
+ // It may also return a `continuationToken` even though there are no more
194
+ // results. However, you can only be sure to have seen all results if you
195
+ // keep calling `listDependentTasks` with the last `continuationToken` until
196
+ // you get a result without a `continuationToken`.
197
+ // If you are not interested in listing all the tasks at once, you may
198
+ // use the query-string option `limit` to return fewer.
199
+ /* eslint-enable max-len */
200
+ listDependentTasks(...args) {
201
+ this.validate(this.listDependentTasks.entry, args);
202
+
203
+ return this.request(this.listDependentTasks.entry, args);
204
+ }
205
+ /* eslint-disable max-len */
206
+ // Create a new task, this is an **idempotent** operation, so repeat it if
207
+ // you get an internal server error or network connection is dropped.
208
+ // **Task `deadline`**: the deadline property can be no more than 5 days
209
+ // into the future. This is to limit the amount of pending tasks not being
210
+ // taken care of. Ideally, you should use a much shorter deadline.
211
+ // **Task expiration**: the `expires` property must be greater than the
212
+ // task `deadline`. If not provided it will default to `deadline` + one
213
+ // year. Notice that artifacts created by a task must expire before the
214
+ // task's expiration.
215
+ // **Task specific routing-keys**: using the `task.routes` property you may
216
+ // define task specific routing-keys. If a task has a task specific
217
+ // routing-key: `<route>`, then when the AMQP message about the task is
218
+ // published, the message will be CC'ed with the routing-key:
219
+ // `route.<route>`. This is useful if you want another component to listen
220
+ // for completed tasks you have posted. The caller must have scope
221
+ // `queue:route:<route>` for each route.
222
+ // **Dependencies**: any tasks referenced in `task.dependencies` must have
223
+ // already been created at the time of this call.
224
+ // **Scopes**: Note that the scopes required to complete this API call depend
225
+ // on the content of the `scopes`, `routes`, `schedulerId`, `priority`,
226
+ // `provisionerId`, and `workerType` properties of the task definition.
227
+ // If the task group was sealed, this end-point will return `409` reporting
228
+ // `RequestConflict` to indicate that it is no longer possible to add new tasks
229
+ // for this `taskGroupId`.
230
+ /* eslint-enable max-len */
231
+ createTask(...args) {
232
+ this.validate(this.createTask.entry, args);
233
+
234
+ return this.request(this.createTask.entry, args);
235
+ }
236
+ /* eslint-disable max-len */
237
+ // scheduleTask will schedule a task to be executed, even if it has
238
+ // unresolved dependencies. A task would otherwise only be scheduled if
239
+ // its dependencies were resolved.
240
+ // This is useful if you have defined a task that depends on itself or on
241
+ // some other task that has not been resolved, but you wish the task to be
242
+ // scheduled immediately.
243
+ // This will announce the task as pending and workers will be allowed to
244
+ // claim it and resolve the task.
245
+ // **Note** this operation is **idempotent** and will not fail or complain
246
+ // if called with a `taskId` that is already scheduled, or even resolved.
247
+ // To reschedule a task previously resolved, use `rerunTask`.
248
+ /* eslint-enable max-len */
249
+ scheduleTask(...args) {
250
+ this.validate(this.scheduleTask.entry, args);
251
+
252
+ return this.request(this.scheduleTask.entry, args);
253
+ }
254
+ /* eslint-disable max-len */
255
+ // This method _reruns_ a previously resolved task, even if it was
256
+ // _completed_. This is useful if your task completes unsuccessfully, and
257
+ // you just want to run it from scratch again. This will also reset the
258
+ // number of `retries` allowed. It will schedule a task that is _unscheduled_
259
+ // regardless of the state of its dependencies.
260
+ // Remember that `retries` in the task status counts the number of runs that
261
+ // the queue have started because the worker stopped responding, for example
262
+ // because a spot node died.
263
+ // **Remark** this operation is idempotent: if it is invoked for a task that
264
+ // is `pending` or `running`, it will just return the current task status.
265
+ /* eslint-enable max-len */
266
+ rerunTask(...args) {
267
+ this.validate(this.rerunTask.entry, args);
268
+
269
+ return this.request(this.rerunTask.entry, args);
270
+ }
271
+ /* eslint-disable max-len */
272
+ // This method will cancel a task that is either `unscheduled`, `pending` or
273
+ // `running`. It will resolve the current run as `exception` with
274
+ // `reasonResolved` set to `canceled`. If the task isn't scheduled yet, ie.
275
+ // it doesn't have any runs, an initial run will be added and resolved as
276
+ // described above. Hence, after canceling a task, it cannot be scheduled
277
+ // with `queue.scheduleTask`, but a new run can be created with
278
+ // `queue.rerun`. These semantics is equivalent to calling
279
+ // `queue.scheduleTask` immediately followed by `queue.cancelTask`.
280
+ // **Remark** this operation is idempotent, if you try to cancel a task that
281
+ // isn't `unscheduled`, `pending` or `running`, this operation will just
282
+ // return the current task status.
283
+ /* eslint-enable max-len */
284
+ cancelTask(...args) {
285
+ this.validate(this.cancelTask.entry, args);
286
+
287
+ return this.request(this.cancelTask.entry, args);
288
+ }
289
+ /* eslint-disable max-len */
290
+ // Claim pending task(s) for the given task queue.
291
+ // If any work is available (even if fewer than the requested number of
292
+ // tasks, this will return immediately. Otherwise, it will block for tens of
293
+ // seconds waiting for work. If no work appears, it will return an emtpy
294
+ // list of tasks. Callers should sleep a short while (to avoid denial of
295
+ // service in an error condition) and call the endpoint again. This is a
296
+ // simple implementation of "long polling".
297
+ /* eslint-enable max-len */
298
+ claimWork(...args) {
299
+ this.validate(this.claimWork.entry, args);
300
+
301
+ return this.request(this.claimWork.entry, args);
302
+ }
303
+ /* eslint-disable max-len */
304
+ // claim a task - never documented
305
+ /* eslint-enable max-len */
306
+ claimTask(...args) {
307
+ this.validate(this.claimTask.entry, args);
308
+
309
+ return this.request(this.claimTask.entry, args);
310
+ }
311
+ /* eslint-disable max-len */
312
+ // Refresh the claim for a specific `runId` for given `taskId`. This updates
313
+ // the `takenUntil` property and returns a new set of temporary credentials
314
+ // for performing requests on behalf of the task. These credentials should
315
+ // be used in-place of the credentials returned by `claimWork`.
316
+ // The `reclaimTask` requests serves to:
317
+ // * Postpone `takenUntil` preventing the queue from resolving
318
+ // `claim-expired`,
319
+ // * Refresh temporary credentials used for processing the task, and
320
+ // * Abort execution if the task/run have been resolved.
321
+ // If the `takenUntil` timestamp is exceeded the queue will resolve the run
322
+ // as _exception_ with reason `claim-expired`, and proceeded to retry to the
323
+ // task. This ensures that tasks are retried, even if workers disappear
324
+ // without warning.
325
+ // If the task is resolved, this end-point will return `409` reporting
326
+ // `RequestConflict`. This typically happens if the task have been canceled
327
+ // or the `task.deadline` have been exceeded. If reclaiming fails, workers
328
+ // should abort the task and forget about the given `runId`. There is no
329
+ // need to resolve the run or upload artifacts.
330
+ /* eslint-enable max-len */
331
+ reclaimTask(...args) {
332
+ this.validate(this.reclaimTask.entry, args);
333
+
334
+ return this.request(this.reclaimTask.entry, args);
335
+ }
336
+ /* eslint-disable max-len */
337
+ // Report a task completed, resolving the run as `completed`.
338
+ /* eslint-enable max-len */
339
+ reportCompleted(...args) {
340
+ this.validate(this.reportCompleted.entry, args);
341
+
342
+ return this.request(this.reportCompleted.entry, args);
343
+ }
344
+ /* eslint-disable max-len */
345
+ // Report a run failed, resolving the run as `failed`. Use this to resolve
346
+ // a run that failed because the task specific code behaved unexpectedly.
347
+ // For example the task exited non-zero, or didn't produce expected output.
348
+ // Do not use this if the task couldn't be run because if malformed
349
+ // payload, or other unexpected condition. In these cases we have a task
350
+ // exception, which should be reported with `reportException`.
351
+ /* eslint-enable max-len */
352
+ reportFailed(...args) {
353
+ this.validate(this.reportFailed.entry, args);
354
+
355
+ return this.request(this.reportFailed.entry, args);
356
+ }
357
+ /* eslint-disable max-len */
358
+ // Resolve a run as _exception_. Generally, you will want to report tasks as
359
+ // failed instead of exception. You should `reportException` if,
360
+ // * The `task.payload` is invalid,
361
+ // * Non-existent resources are referenced,
362
+ // * Declared actions cannot be executed due to unavailable resources,
363
+ // * The worker had to shutdown prematurely,
364
+ // * The worker experienced an unknown error, or,
365
+ // * The task explicitly requested a retry.
366
+ // Do not use this to signal that some user-specified code crashed for any
367
+ // reason specific to this code. If user-specific code hits a resource that
368
+ // is temporarily unavailable worker should report task _failed_.
369
+ /* eslint-enable max-len */
370
+ reportException(...args) {
371
+ this.validate(this.reportException.entry, args);
372
+
373
+ return this.request(this.reportException.entry, args);
374
+ }
375
+ /* eslint-disable max-len */
376
+ // This API end-point creates an artifact for a specific run of a task. This
377
+ // should **only** be used by a worker currently operating on this task, or
378
+ // from a process running within the task (ie. on the worker).
379
+ // All artifacts must specify when they expire. The queue will
380
+ // automatically take care of deleting artifacts past their
381
+ // expiration point. This feature makes it feasible to upload large
382
+ // intermediate artifacts from data processing applications, as the
383
+ // artifacts can be set to expire a few days later.
384
+ /* eslint-enable max-len */
385
+ createArtifact(...args) {
386
+ this.validate(this.createArtifact.entry, args);
387
+
388
+ return this.request(this.createArtifact.entry, args);
389
+ }
390
+ /* eslint-disable max-len */
391
+ // This endpoint marks an artifact as present for the given task, and
392
+ // should be called when the artifact data is fully uploaded.
393
+ // The storage types `reference`, `link`, and `error` do not need to
394
+ // be finished, as they are finished immediately by `createArtifact`.
395
+ // The storage type `s3` does not support this functionality and cannot
396
+ // be finished. In all such cases, calling this method is an input error
397
+ // (400).
398
+ /* eslint-enable max-len */
399
+ finishArtifact(...args) {
400
+ this.validate(this.finishArtifact.entry, args);
401
+
402
+ return this.request(this.finishArtifact.entry, args);
403
+ }
404
+ /* eslint-disable max-len */
405
+ // Get artifact by `<name>` from a specific run.
406
+ // **Artifact Access**, in order to get an artifact you need the scope
407
+ // `queue:get-artifact:<name>`, where `<name>` is the name of the artifact.
408
+ // To allow access to fetch artifacts with a client like `curl` or a web
409
+ // browser, without using Taskcluster credentials, include a scope in the
410
+ // `anonymous` role. The convention is to include
411
+ // `queue:get-artifact:public/*`.
412
+ // **Response**: the HTTP response to this method is a 303 redirect to the
413
+ // URL from which the artifact can be downloaded. The body of that response
414
+ // contains the data described in the output schema, contianing the same URL.
415
+ // Callers are encouraged to use whichever method of gathering the URL is
416
+ // most convenient. Standard HTTP clients will follow the redirect, while
417
+ // API client libraries will return the JSON body.
418
+ // In order to download an artifact the following must be done:
419
+ // 1. Obtain queue url. Building a signed url with a taskcluster client is
420
+ // recommended
421
+ // 1. Make a GET request which does not follow redirects
422
+ // 1. In all cases, if specified, the
423
+ // x-taskcluster-location-{content,transfer}-{sha256,length} values must be
424
+ // validated to be equal to the Content-Length and Sha256 checksum of the
425
+ // final artifact downloaded. as well as any intermediate redirects
426
+ // 1. If this response is a 500-series error, retry using an exponential
427
+ // backoff. No more than 5 retries should be attempted
428
+ // 1. If this response is a 400-series error, treat it appropriately for
429
+ // your context. This might be an error in responding to this request or
430
+ // an Error storage type body. This request should not be retried.
431
+ // 1. If this response is a 200-series response, the response body is the artifact.
432
+ // If the x-taskcluster-location-{content,transfer}-{sha256,length} and
433
+ // x-taskcluster-location-content-encoding are specified, they should match
434
+ // this response body
435
+ // 1. If the response type is a 300-series redirect, the artifact will be at the
436
+ // location specified by the `Location` header. There are multiple artifact storage
437
+ // types which use a 300-series redirect.
438
+ // 1. For all redirects followed, the user must verify that the content-sha256, content-length,
439
+ // transfer-sha256, transfer-length and content-encoding match every further request. The final
440
+ // artifact must also be validated against the values specified in the original queue response
441
+ // 1. Caching of requests with an x-taskcluster-artifact-storage-type value of `reference`
442
+ // must not occur
443
+ // **Headers**
444
+ // The following important headers are set on the response to this method:
445
+ // * location: the url of the artifact if a redirect is to be performed
446
+ // * x-taskcluster-artifact-storage-type: the storage type. Example: s3
447
+ /* eslint-enable max-len */
448
+ getArtifact(...args) {
449
+ this.validate(this.getArtifact.entry, args);
450
+
451
+ return this.request(this.getArtifact.entry, args);
452
+ }
453
+ /* eslint-disable max-len */
454
+ // Get artifact by `<name>` from the last run of a task.
455
+ // **Artifact Access**, in order to get an artifact you need the scope
456
+ // `queue:get-artifact:<name>`, where `<name>` is the name of the artifact.
457
+ // To allow access to fetch artifacts with a client like `curl` or a web
458
+ // browser, without using Taskcluster credentials, include a scope in the
459
+ // `anonymous` role. The convention is to include
460
+ // `queue:get-artifact:public/*`.
461
+ // **API Clients**, this method will redirect you to the artifact, if it is
462
+ // stored externally. Either way, the response may not be JSON. So API
463
+ // client users might want to generate a signed URL for this end-point and
464
+ // use that URL with a normal HTTP client.
465
+ // **Remark**, this end-point is slightly slower than
466
+ // `queue.getArtifact`, so consider that if you already know the `runId` of
467
+ // the latest run. Otherwise, just us the most convenient API end-point.
468
+ /* eslint-enable max-len */
469
+ getLatestArtifact(...args) {
470
+ this.validate(this.getLatestArtifact.entry, args);
471
+
472
+ return this.request(this.getLatestArtifact.entry, args);
473
+ }
474
+ /* eslint-disable max-len */
475
+ // Returns a list of artifacts and associated meta-data for a given run.
476
+ // As a task may have many artifacts paging may be necessary. If this
477
+ // end-point returns a `continuationToken`, you should call the end-point
478
+ // again with the `continuationToken` as the query-string option:
479
+ // `continuationToken`.
480
+ // By default this end-point will list up-to 1000 artifacts in a single page
481
+ // you may limit this with the query-string parameter `limit`.
482
+ /* eslint-enable max-len */
483
+ listArtifacts(...args) {
484
+ this.validate(this.listArtifacts.entry, args);
485
+
486
+ return this.request(this.listArtifacts.entry, args);
487
+ }
488
+ /* eslint-disable max-len */
489
+ // Returns a list of artifacts and associated meta-data for the latest run
490
+ // from the given task.
491
+ // As a task may have many artifacts paging may be necessary. If this
492
+ // end-point returns a `continuationToken`, you should call the end-point
493
+ // again with the `continuationToken` as the query-string option:
494
+ // `continuationToken`.
495
+ // By default this end-point will list up-to 1000 artifacts in a single page
496
+ // you may limit this with the query-string parameter `limit`.
497
+ /* eslint-enable max-len */
498
+ listLatestArtifacts(...args) {
499
+ this.validate(this.listLatestArtifacts.entry, args);
500
+
501
+ return this.request(this.listLatestArtifacts.entry, args);
502
+ }
503
+ /* eslint-disable max-len */
504
+ // Returns associated metadata for a given artifact, in the given task run.
505
+ // The metadata is the same as that returned from `listArtifacts`, and does
506
+ // not grant access to the artifact data.
507
+ // Note that this method does *not* automatically follow link artifacts.
508
+ /* eslint-enable max-len */
509
+ artifactInfo(...args) {
510
+ this.validate(this.artifactInfo.entry, args);
511
+
512
+ return this.request(this.artifactInfo.entry, args);
513
+ }
514
+ /* eslint-disable max-len */
515
+ // Returns associated metadata for a given artifact, in the latest run of the
516
+ // task. The metadata is the same as that returned from `listArtifacts`,
517
+ // and does not grant access to the artifact data.
518
+ // Note that this method does *not* automatically follow link artifacts.
519
+ /* eslint-enable max-len */
520
+ latestArtifactInfo(...args) {
521
+ this.validate(this.latestArtifactInfo.entry, args);
522
+
523
+ return this.request(this.latestArtifactInfo.entry, args);
524
+ }
525
+ /* eslint-disable max-len */
526
+ // Returns information about the content of the artifact, in the given task run.
527
+ // Depending on the storage type, the endpoint returns the content of the artifact
528
+ // or enough information to access that content.
529
+ // This method follows link artifacts, so it will not return content
530
+ // for a link artifact.
531
+ /* eslint-enable max-len */
532
+ artifact(...args) {
533
+ this.validate(this.artifact.entry, args);
534
+
535
+ return this.request(this.artifact.entry, args);
536
+ }
537
+ /* eslint-disable max-len */
538
+ // Returns information about the content of the artifact, in the latest task run.
539
+ // Depending on the storage type, the endpoint returns the content of the artifact
540
+ // or enough information to access that content.
541
+ // This method follows link artifacts, so it will not return content
542
+ // for a link artifact.
543
+ /* eslint-enable max-len */
544
+ latestArtifact(...args) {
545
+ this.validate(this.latestArtifact.entry, args);
546
+
547
+ return this.request(this.latestArtifact.entry, args);
548
+ }
549
+ /* eslint-disable max-len */
550
+ // Get all active provisioners.
551
+ // The term "provisioner" is taken broadly to mean anything with a provisionerId.
552
+ // This does not necessarily mean there is an associated service performing any
553
+ // provisioning activity.
554
+ // The response is paged. If this end-point returns a `continuationToken`, you
555
+ // should call the end-point again with the `continuationToken` as a query-string
556
+ // option. By default this end-point will list up to 1000 provisioners in a single
557
+ // page. You may limit this with the query-string parameter `limit`.
558
+ /* eslint-enable max-len */
559
+ listProvisioners(...args) {
560
+ this.validate(this.listProvisioners.entry, args);
561
+
562
+ return this.request(this.listProvisioners.entry, args);
563
+ }
564
+ /* eslint-disable max-len */
565
+ // Get an active provisioner.
566
+ // The term "provisioner" is taken broadly to mean anything with a provisionerId.
567
+ // This does not necessarily mean there is an associated service performing any
568
+ // provisioning activity.
569
+ /* eslint-enable max-len */
570
+ getProvisioner(...args) {
571
+ this.validate(this.getProvisioner.entry, args);
572
+
573
+ return this.request(this.getProvisioner.entry, args);
574
+ }
575
+ /* eslint-disable max-len */
576
+ // Declare a provisioner, supplying some details about it.
577
+ // `declareProvisioner` allows updating one or more properties of a provisioner as long as the required scopes are
578
+ // possessed. For example, a request to update the `my-provisioner`
579
+ // provisioner with a body `{description: 'This provisioner is great'}` would require you to have the scope
580
+ // `queue:declare-provisioner:my-provisioner#description`.
581
+ // The term "provisioner" is taken broadly to mean anything with a provisionerId.
582
+ // This does not necessarily mean there is an associated service performing any
583
+ // provisioning activity.
584
+ /* eslint-enable max-len */
585
+ declareProvisioner(...args) {
586
+ this.validate(this.declareProvisioner.entry, args);
587
+
588
+ return this.request(this.declareProvisioner.entry, args);
589
+ }
590
+ /* eslint-disable max-len */
591
+ // Get an approximate number of pending tasks for the given `taskQueueId`.
592
+ // As task states may change rapidly, this number may not represent the exact
593
+ // number of pending tasks, but a very good approximation.
594
+ // This method is **deprecated**, use queue.taskQueueCounts instead.
595
+ /* eslint-enable max-len */
596
+ pendingTasks(...args) {
597
+ this.validate(this.pendingTasks.entry, args);
598
+
599
+ return this.request(this.pendingTasks.entry, args);
600
+ }
601
+ /* eslint-disable max-len */
602
+ // Get an approximate number of pending and claimed tasks for the given `taskQueueId`.
603
+ // As task states may change rapidly, this number may not represent the exact
604
+ // number of pending and claimed tasks, but a very good approximation.
605
+ /* eslint-enable max-len */
606
+ taskQueueCounts(...args) {
607
+ this.validate(this.taskQueueCounts.entry, args);
608
+
609
+ return this.request(this.taskQueueCounts.entry, args);
610
+ }
611
+ /* eslint-disable max-len */
612
+ // List pending tasks for the given `taskQueueId`.
613
+ // As task states may change rapidly, this information might not represent the exact
614
+ // state of such tasks, but a very good approximation.
615
+ /* eslint-enable max-len */
616
+ listPendingTasks(...args) {
617
+ this.validate(this.listPendingTasks.entry, args);
618
+
619
+ return this.request(this.listPendingTasks.entry, args);
620
+ }
621
+ /* eslint-disable max-len */
622
+ // List claimed tasks for the given `taskQueueId`.
623
+ // As task states may change rapidly, this information might not represent the exact
624
+ // state of such tasks, but a very good approximation.
625
+ /* eslint-enable max-len */
626
+ listClaimedTasks(...args) {
627
+ this.validate(this.listClaimedTasks.entry, args);
628
+
629
+ return this.request(this.listClaimedTasks.entry, args);
630
+ }
631
+ /* eslint-disable max-len */
632
+ // Get all active worker-types for the given provisioner.
633
+ // The response is paged. If this end-point returns a `continuationToken`, you
634
+ // should call the end-point again with the `continuationToken` as a query-string
635
+ // option. By default this end-point will list up to 1000 worker-types in a single
636
+ // page. You may limit this with the query-string parameter `limit`.
637
+ /* eslint-enable max-len */
638
+ listWorkerTypes(...args) {
639
+ this.validate(this.listWorkerTypes.entry, args);
640
+
641
+ return this.request(this.listWorkerTypes.entry, args);
642
+ }
643
+ /* eslint-disable max-len */
644
+ // Get a worker-type from a provisioner.
645
+ /* eslint-enable max-len */
646
+ getWorkerType(...args) {
647
+ this.validate(this.getWorkerType.entry, args);
648
+
649
+ return this.request(this.getWorkerType.entry, args);
650
+ }
651
+ /* eslint-disable max-len */
652
+ // Declare a workerType, supplying some details about it.
653
+ // `declareWorkerType` allows updating one or more properties of a worker-type as long as the required scopes are
654
+ // possessed. For example, a request to update the `highmem` worker-type within the `my-provisioner`
655
+ // provisioner with a body `{description: 'This worker type is great'}` would require you to have the scope
656
+ // `queue:declare-worker-type:my-provisioner/highmem#description`.
657
+ /* eslint-enable max-len */
658
+ declareWorkerType(...args) {
659
+ this.validate(this.declareWorkerType.entry, args);
660
+
661
+ return this.request(this.declareWorkerType.entry, args);
662
+ }
663
+ /* eslint-disable max-len */
664
+ // Get all active task queues.
665
+ // The response is paged. If this end-point returns a `continuationToken`, you
666
+ // should call the end-point again with the `continuationToken` as a query-string
667
+ // option. By default this end-point will list up to 1000 task queues in a single
668
+ // page. You may limit this with the query-string parameter `limit`.
669
+ /* eslint-enable max-len */
670
+ listTaskQueues(...args) {
671
+ this.validate(this.listTaskQueues.entry, args);
672
+
673
+ return this.request(this.listTaskQueues.entry, args);
674
+ }
675
+ /* eslint-disable max-len */
676
+ // Get a task queue.
677
+ /* eslint-enable max-len */
678
+ getTaskQueue(...args) {
679
+ this.validate(this.getTaskQueue.entry, args);
680
+
681
+ return this.request(this.getTaskQueue.entry, args);
682
+ }
683
+ /* eslint-disable max-len */
684
+ // Get a list of all active workers of a workerType.
685
+ // `listWorkers` allows a response to be filtered by quarantined and non quarantined workers.
686
+ // To filter the query, you should call the end-point with `quarantined` as a query-string option with a
687
+ // true or false value.
688
+ // The response is paged. If this end-point returns a `continuationToken`, you
689
+ // should call the end-point again with the `continuationToken` as a query-string
690
+ // option. By default this end-point will list up to 1000 workers in a single
691
+ // page. You may limit this with the query-string parameter `limit`.
692
+ /* eslint-enable max-len */
693
+ listWorkers(...args) {
694
+ this.validate(this.listWorkers.entry, args);
695
+
696
+ return this.request(this.listWorkers.entry, args);
697
+ }
698
+ /* eslint-disable max-len */
699
+ // Get a worker from a worker-type.
700
+ /* eslint-enable max-len */
701
+ getWorker(...args) {
702
+ this.validate(this.getWorker.entry, args);
703
+
704
+ return this.request(this.getWorker.entry, args);
705
+ }
706
+ /* eslint-disable max-len */
707
+ // Quarantine a worker
708
+ /* eslint-enable max-len */
709
+ quarantineWorker(...args) {
710
+ this.validate(this.quarantineWorker.entry, args);
711
+
712
+ return this.request(this.quarantineWorker.entry, args);
713
+ }
714
+ /* eslint-disable max-len */
715
+ // Declare a worker, supplying some details about it.
716
+ // `declareWorker` allows updating one or more properties of a worker as long as the required scopes are
717
+ // possessed.
718
+ /* eslint-enable max-len */
719
+ declareWorker(...args) {
720
+ this.validate(this.declareWorker.entry, args);
721
+
722
+ return this.request(this.declareWorker.entry, args);
723
+ }
724
+ /* eslint-disable max-len */
725
+ // Respond with a service heartbeat.
726
+ // This endpoint is used to check on backing services this service
727
+ // depends on.
728
+ /* eslint-enable max-len */
729
+ heartbeat(...args) {
730
+ this.validate(this.heartbeat.entry, args);
731
+
732
+ return this.request(this.heartbeat.entry, args);
733
+ }
734
+ }