@taskcluster/client-web 100.3.0 → 100.5.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.
@@ -10,128 +10,104 @@ export default class Github extends Client {
10
10
  exchangePrefix: '',
11
11
  ...options,
12
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.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
17
- 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
18
- 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
19
- 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
20
- 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
21
- 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
22
- 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
23
- 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
24
- this.heartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"heartbeat","query":[],"route":"/__heartbeat__","stability":"stable","type":"function"}; // eslint-disable-line
13
+ this.ping.entry = {"args":[],"category":"Monitoring","method":"get","name":"ping","query":[],"route":"/ping","stability":"stable","type":"function"};
14
+ this.lbheartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"lbheartbeat","query":[],"route":"/__lbheartbeat__","stability":"stable","type":"function"};
15
+ this.version.entry = {"args":[],"category":"Monitoring","method":"get","name":"version","query":[],"route":"/__version__","stability":"stable","type":"function"};
16
+ 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"};
17
+ 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"};
18
+ 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"};
19
+ 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"};
20
+ 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"};
21
+ 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"};
22
+ 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"};
23
+ this.renderTaskclusterYml.entry = {"args":[],"category":"Github Service","input":true,"method":"post","name":"renderTaskclusterYml","output":true,"query":[],"route":"/taskcluster-yml","stability":"experimental","type":"function"};
24
+ this.heartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"heartbeat","query":[],"route":"/__heartbeat__","stability":"stable","type":"function"};
25
25
  }
26
- /* eslint-disable max-len */
27
26
  // Respond without doing anything.
28
27
  // This endpoint is used to check that the service is up.
29
- /* eslint-enable max-len */
30
28
  ping(...args) {
31
29
  this.validate(this.ping.entry, args);
32
30
 
33
31
  return this.request(this.ping.entry, args);
34
32
  }
35
- /* eslint-disable max-len */
36
33
  // Respond without doing anything.
37
34
  // This endpoint is used to check that the service is up.
38
- /* eslint-enable max-len */
39
35
  lbheartbeat(...args) {
40
36
  this.validate(this.lbheartbeat.entry, args);
41
37
 
42
38
  return this.request(this.lbheartbeat.entry, args);
43
39
  }
44
- /* eslint-disable max-len */
45
40
  // Respond with the JSON version object.
46
41
  // https://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md
47
- /* eslint-enable max-len */
48
42
  version(...args) {
49
43
  this.validate(this.version.entry, args);
50
44
 
51
45
  return this.request(this.version.entry, args);
52
46
  }
53
- /* eslint-disable max-len */
54
47
  // A paginated list of builds that have been run in
55
48
  // Taskcluster. Can be filtered on various git-specific
56
49
  // fields.
57
- /* eslint-enable max-len */
58
50
  builds(...args) {
59
51
  this.validate(this.builds.entry, args);
60
52
 
61
53
  return this.request(this.builds.entry, args);
62
54
  }
63
- /* eslint-disable max-len */
64
55
  // Cancel all running Task Groups associated with given repository and sha or pullRequest number
65
- /* eslint-enable max-len */
66
56
  cancelBuilds(...args) {
67
57
  this.validate(this.cancelBuilds.entry, args);
68
58
 
69
59
  return this.request(this.cancelBuilds.entry, args);
70
60
  }
71
- /* eslint-disable max-len */
72
61
  // Checks the status of the latest build of a given branch
73
62
  // and returns corresponding badge svg.
74
- /* eslint-enable max-len */
75
63
  badge(...args) {
76
64
  this.validate(this.badge.entry, args);
77
65
 
78
66
  return this.request(this.badge.entry, args);
79
67
  }
80
- /* eslint-disable max-len */
81
68
  // Returns any repository metadata that is
82
69
  // useful within Taskcluster related services.
83
- /* eslint-enable max-len */
84
70
  repository(...args) {
85
71
  this.validate(this.repository.entry, args);
86
72
 
87
73
  return this.request(this.repository.entry, args);
88
74
  }
89
- /* eslint-disable max-len */
90
75
  // For a given branch of a repository, this will always point
91
76
  // to a status page for the most recent task triggered by that
92
77
  // branch.
93
78
  // Note: This is a redirect rather than a direct link.
94
- /* eslint-enable max-len */
95
79
  latest(...args) {
96
80
  this.validate(this.latest.entry, args);
97
81
 
98
82
  return this.request(this.latest.entry, args);
99
83
  }
100
- /* eslint-disable max-len */
101
84
  // For a given changeset (SHA) of a repository, this will attach a "commit status"
102
85
  // on github. These statuses are links displayed next to each revision.
103
86
  // The status is either OK (green check) or FAILURE (red cross),
104
87
  // made of a custom title and link.
105
- /* eslint-enable max-len */
106
88
  createStatus(...args) {
107
89
  this.validate(this.createStatus.entry, args);
108
90
 
109
91
  return this.request(this.createStatus.entry, args);
110
92
  }
111
- /* eslint-disable max-len */
112
93
  // For a given Issue or Pull Request of a repository, this will write a new message.
113
- /* eslint-enable max-len */
114
94
  createComment(...args) {
115
95
  this.validate(this.createComment.entry, args);
116
96
 
117
97
  return this.request(this.createComment.entry, args);
118
98
  }
119
- /* eslint-disable max-len */
120
99
  // This endpoint allows to render the .taskcluster.yml file for a given event or payload.
121
100
  // This is useful to preview the result of the .taskcluster.yml file before pushing it to
122
101
  // the repository.
123
102
  // Read more about the .taskcluster.yml file in the [documentation](https://docs.taskcluster.net/docs/reference/integrations/github/taskcluster-yml-v1)
124
- /* eslint-enable max-len */
125
103
  renderTaskclusterYml(...args) {
126
104
  this.validate(this.renderTaskclusterYml.entry, args);
127
105
 
128
106
  return this.request(this.renderTaskclusterYml.entry, args);
129
107
  }
130
- /* eslint-disable max-len */
131
108
  // Respond with a service heartbeat.
132
109
  // This endpoint is used to check on backing services this service
133
110
  // depends on.
134
- /* eslint-enable max-len */
135
111
  heartbeat(...args) {
136
112
  this.validate(this.heartbeat.entry, args);
137
113
 
@@ -11,57 +11,47 @@ export default class GithubEvents extends Client {
11
11
  ...options,
12
12
  });
13
13
  }
14
- /* eslint-disable max-len */
15
14
  // When a GitHub pull request event is posted it will be broadcast on this
16
15
  // exchange with the designated `organization` and `repository`
17
16
  // in the routing-key along with event specific metadata in the payload.
18
- /* eslint-enable max-len */
19
17
  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
18
+ 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"};
21
19
 
22
20
  return this.normalizePattern(entry, pattern);
23
21
  }
24
- /* eslint-disable max-len */
25
22
  // When a GitHub push event is posted it will be broadcast on this
26
23
  // exchange with the designated `organization` and `repository`
27
24
  // in the routing-key along with event specific metadata in the payload.
28
- /* eslint-enable max-len */
29
25
  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
26
+ 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"};
31
27
 
32
28
  return this.normalizePattern(entry, pattern);
33
29
  }
34
- /* eslint-disable max-len */
35
30
  // When a GitHub release event is posted it will be broadcast on this
36
31
  // exchange with the designated `organization` and `repository`
37
32
  // in the routing-key along with event specific metadata in the payload.
38
- /* eslint-enable max-len */
39
33
  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
34
+ 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"};
41
35
 
42
36
  return this.normalizePattern(entry, pattern);
43
37
  }
44
- /* eslint-disable max-len */
45
38
  // When a GitHub check_run event with action="rerequested" is posted
46
39
  // it will be broadcast on this exchange with the designated
47
40
  // `organization` and `repository`
48
41
  // in the routing-key along with event specific metadata in the payload.
49
- /* eslint-enable max-len */
50
42
  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
43
+ 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"};
52
44
 
53
45
  return this.normalizePattern(entry, pattern);
54
46
  }
55
- /* eslint-disable max-len */
56
47
  // supposed to signal that taskCreate API has been called for every task in the task group
57
48
  // for this particular repo and this particular organization
58
49
  // currently used for creating initial status indicators in GitHub UI using Statuses API.
59
50
  // This particular exchange can also be bound to RabbitMQ queues by custom routes - for that,
60
51
  // Pass in the array of routes as a second argument to the publish method. Currently, we do
61
52
  // use the statuses routes to bind the handler that creates the initial status.
62
- /* eslint-enable max-len */
63
53
  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
54
+ 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"};
65
55
 
66
56
  return this.normalizePattern(entry, pattern);
67
57
  }
@@ -10,173 +10,141 @@ export default class Hooks extends Client {
10
10
  exchangePrefix: '',
11
11
  ...options,
12
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 */
13
+ this.ping.entry = {"args":[],"category":"Monitoring","method":"get","name":"ping","query":[],"route":"/ping","stability":"stable","type":"function"};
14
+ this.lbheartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"lbheartbeat","query":[],"route":"/__lbheartbeat__","stability":"stable","type":"function"};
15
+ this.version.entry = {"args":[],"category":"Monitoring","method":"get","name":"version","query":[],"route":"/__version__","stability":"stable","type":"function"};
16
+ this.listHookGroups.entry = {"args":[],"category":"Hooks","method":"get","name":"listHookGroups","output":true,"query":[],"route":"/hooks","scopes":"hooks:list-hooks:","stability":"stable","type":"function"};
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"};
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"};
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"};
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"};
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"};
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"};
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"};
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"};
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"};
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"};
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"};
28
+ this.heartbeat.entry = {"args":[],"category":"Monitoring","method":"get","name":"heartbeat","query":[],"route":"/__heartbeat__","stability":"stable","type":"function"};
29
+ }
31
30
  // Respond without doing anything.
32
31
  // This endpoint is used to check that the service is up.
33
- /* eslint-enable max-len */
34
32
  ping(...args) {
35
33
  this.validate(this.ping.entry, args);
36
34
 
37
35
  return this.request(this.ping.entry, args);
38
36
  }
39
- /* eslint-disable max-len */
40
37
  // Respond without doing anything.
41
38
  // This endpoint is used to check that the service is up.
42
- /* eslint-enable max-len */
43
39
  lbheartbeat(...args) {
44
40
  this.validate(this.lbheartbeat.entry, args);
45
41
 
46
42
  return this.request(this.lbheartbeat.entry, args);
47
43
  }
48
- /* eslint-disable max-len */
49
44
  // Respond with the JSON version object.
50
45
  // https://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md
51
- /* eslint-enable max-len */
52
46
  version(...args) {
53
47
  this.validate(this.version.entry, args);
54
48
 
55
49
  return this.request(this.version.entry, args);
56
50
  }
57
- /* eslint-disable max-len */
58
51
  // This endpoint will return a list of all hook groups with at least one hook.
59
- /* eslint-enable max-len */
60
52
  listHookGroups(...args) {
61
53
  this.validate(this.listHookGroups.entry, args);
62
54
 
63
55
  return this.request(this.listHookGroups.entry, args);
64
56
  }
65
- /* eslint-disable max-len */
66
57
  // This endpoint will return a list of all the hook definitions within a
67
58
  // given hook group.
68
- /* eslint-enable max-len */
69
59
  listHooks(...args) {
70
60
  this.validate(this.listHooks.entry, args);
71
61
 
72
62
  return this.request(this.listHooks.entry, args);
73
63
  }
74
- /* eslint-disable max-len */
75
64
  // This endpoint will return the hook definition for the given `hookGroupId`
76
65
  // and hookId.
77
- /* eslint-enable max-len */
78
66
  hook(...args) {
79
67
  this.validate(this.hook.entry, args);
80
68
 
81
69
  return this.request(this.hook.entry, args);
82
70
  }
83
- /* eslint-disable max-len */
84
71
  // This endpoint will return the current status of the hook. This represents a
85
72
  // snapshot in time and may vary from one call to the next.
86
73
  // This method is deprecated in favor of listLastFires.
87
- /* eslint-enable max-len */
88
74
  getHookStatus(...args) {
89
75
  this.validate(this.getHookStatus.entry, args);
90
76
 
91
77
  return this.request(this.getHookStatus.entry, args);
92
78
  }
93
- /* eslint-disable max-len */
94
79
  // This endpoint will create a new hook.
95
80
  // The caller's credentials must include the role that will be used to
96
81
  // create the task. That role must satisfy task.scopes as well as the
97
82
  // necessary scopes to add the task to the queue.
98
- /* eslint-enable max-len */
99
83
  createHook(...args) {
100
84
  this.validate(this.createHook.entry, args);
101
85
 
102
86
  return this.request(this.createHook.entry, args);
103
87
  }
104
- /* eslint-disable max-len */
105
88
  // This endpoint will update an existing hook. All fields except
106
89
  // `hookGroupId` and `hookId` can be modified.
107
- /* eslint-enable max-len */
108
90
  updateHook(...args) {
109
91
  this.validate(this.updateHook.entry, args);
110
92
 
111
93
  return this.request(this.updateHook.entry, args);
112
94
  }
113
- /* eslint-disable max-len */
114
95
  // This endpoint will remove a hook definition.
115
- /* eslint-enable max-len */
116
96
  removeHook(...args) {
117
97
  this.validate(this.removeHook.entry, args);
118
98
 
119
99
  return this.request(this.removeHook.entry, args);
120
100
  }
121
- /* eslint-disable max-len */
122
101
  // 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
102
+ // The HTTP payload must match the hook's `triggerSchema`. If it does, it is
124
103
  // provided as the `payload` property of the JSON-e context used to render the
125
104
  // task template.
126
105
  // Optionally, a `taskId` can be provided in the payload which the hook task
127
106
  // will use. It must be unique and follow the slugid format.
128
- /* eslint-enable max-len */
129
107
  triggerHook(...args) {
130
108
  this.validate(this.triggerHook.entry, args);
131
109
 
132
110
  return this.request(this.triggerHook.entry, args);
133
111
  }
134
- /* eslint-disable max-len */
135
112
  // Retrieve a unique secret token for triggering the specified hook. This
136
113
  // token can be deactivated with `resetTriggerToken`.
137
- /* eslint-enable max-len */
138
114
  getTriggerToken(...args) {
139
115
  this.validate(this.getTriggerToken.entry, args);
140
116
 
141
117
  return this.request(this.getTriggerToken.entry, args);
142
118
  }
143
- /* eslint-disable max-len */
144
119
  // Reset the token for triggering a given hook. This invalidates token that
145
120
  // may have been issued via getTriggerToken with a new token.
146
- /* eslint-enable max-len */
147
121
  resetTriggerToken(...args) {
148
122
  this.validate(this.resetTriggerToken.entry, args);
149
123
 
150
124
  return this.request(this.resetTriggerToken.entry, args);
151
125
  }
152
- /* eslint-disable max-len */
153
126
  // This endpoint triggers a defined hook with a valid token.
154
- // The HTTP payload must match the hooks `triggerSchema`. If it does, it is
127
+ // The HTTP payload must match the hook's `triggerSchema`. If it does, it is
155
128
  // provided as the `payload` property of the JSON-e context used to render the
156
129
  // task template.
157
130
  // Optionally, a `taskId` can be provided in the payload which the hook task
158
131
  // will use. It must be unique and follow the slugid format.
159
- /* eslint-enable max-len */
160
132
  triggerHookWithToken(...args) {
161
133
  this.validate(this.triggerHookWithToken.entry, args);
162
134
 
163
135
  return this.request(this.triggerHookWithToken.entry, args);
164
136
  }
165
- /* eslint-disable max-len */
166
137
  // This endpoint will return information about the the last few times this hook has been
167
138
  // fired, including whether the hook was fired successfully or not
168
139
  // By default this endpoint will return up to 1000 most recent fires in one request.
169
- /* eslint-enable max-len */
170
140
  listLastFires(...args) {
171
141
  this.validate(this.listLastFires.entry, args);
172
142
 
173
143
  return this.request(this.listLastFires.entry, args);
174
144
  }
175
- /* eslint-disable max-len */
176
145
  // Respond with a service heartbeat.
177
146
  // This endpoint is used to check on backing services this service
178
147
  // depends on.
179
- /* eslint-enable max-len */
180
148
  heartbeat(...args) {
181
149
  this.validate(this.heartbeat.entry, args);
182
150
 
@@ -11,27 +11,21 @@ export default class HooksEvents extends Client {
11
11
  ...options,
12
12
  });
13
13
  }
14
- /* eslint-disable max-len */
15
14
  // 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
15
  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
16
+ const entry = {"exchange":"hook-created","name":"hookCreated","routingKey":[{"multipleWords":true,"name":"reserved","required":false}],"schema":"v1/pulse-hook-changed-message.json#","type":"topic-exchange"};
19
17
 
20
18
  return this.normalizePattern(entry, pattern);
21
19
  }
22
- /* eslint-disable max-len */
23
20
  // 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
21
  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
22
+ const entry = {"exchange":"hook-updated","name":"hookUpdated","routingKey":[{"multipleWords":true,"name":"reserved","required":false}],"schema":"v1/pulse-hook-changed-message.json#","type":"topic-exchange"};
27
23
 
28
24
  return this.normalizePattern(entry, pattern);
29
25
  }
30
- /* eslint-disable max-len */
31
26
  // 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
27
  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
28
+ const entry = {"exchange":"hook-deleted","name":"hookDeleted","routingKey":[{"multipleWords":true,"name":"reserved","required":false}],"schema":"v1/pulse-hook-changed-message.json#","type":"topic-exchange"};
35
29
 
36
30
  return this.normalizePattern(entry, pattern);
37
31
  }