@taskcluster/client-web 108.0.0 → 109.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taskcluster/client-web",
3
- "version": "108.0.0",
3
+ "version": "109.0.0",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "exports": "./src/index.js",
@@ -28,7 +28,7 @@
28
28
  "crypto-js": "^4.2.0",
29
29
  "hawk": "^9.0.2",
30
30
  "query-string": "^9.5.0",
31
- "taskcluster-lib-urls": "^13.0.2"
31
+ "taskcluster-lib-urls": "^13.1.0"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
@@ -33,11 +33,6 @@ export default class Auth extends Client {
33
33
  this.expandScopes.entry = {"args":[],"category":"Scopes and Auth","input":true,"method":"post","name":"expandScopes","output":true,"query":[],"route":"/scopes/expand","scopes":"auth:expand-scopes","stability":"stable","type":"function"};
34
34
  this.currentScopes.entry = {"args":[],"category":"Scopes and Auth","method":"get","name":"currentScopes","output":true,"query":[],"route":"/scopes/current","scopes":"auth:current-scopes","stability":"stable","type":"function"};
35
35
  this.awsS3Credentials.entry = {"args":["level","bucket","prefix"],"category":"AWS Credentials","method":"get","name":"awsS3Credentials","output":true,"query":["format"],"route":"/aws/s3/<level>/<bucket>/<prefix>","scopes":{"else":"auth:aws-s3:read-write:<bucket>/<prefix>","if":"levelIsReadOnly","then":{"AnyOf":["auth:aws-s3:read-only:<bucket>/<prefix>","auth:aws-s3:read-write:<bucket>/<prefix>"]}},"stability":"stable","type":"function"};
36
- this.azureAccounts.entry = {"args":[],"category":"Azure Credentials","method":"get","name":"azureAccounts","output":true,"query":[],"route":"/azure/accounts","scopes":"auth:azure-table:list-accounts","stability":"deprecated","type":"function"};
37
- this.azureTables.entry = {"args":["account"],"category":"Azure Credentials","method":"get","name":"azureTables","output":true,"query":["continuationToken"],"route":"/azure/<account>/tables","scopes":"auth:azure-table:list-tables:<account>","stability":"deprecated","type":"function"};
38
- this.azureTableSAS.entry = {"args":["account","table","level"],"category":"Azure Credentials","method":"get","name":"azureTableSAS","output":true,"query":[],"route":"/azure/<account>/table/<table>/<level>","scopes":{"else":"auth:azure-table:read-write:<account>/<table>","if":"levelIsReadOnly","then":{"AnyOf":["auth:azure-table:read-only:<account>/<table>","auth:azure-table:read-write:<account>/<table>"]}},"stability":"deprecated","type":"function"};
39
- this.azureContainers.entry = {"args":["account"],"category":"Azure Credentials","method":"get","name":"azureContainers","output":true,"query":["continuationToken"],"route":"/azure/<account>/containers","scopes":"auth:azure-container:list-containers:<account>","stability":"deprecated","type":"function"};
40
- this.azureContainerSAS.entry = {"args":["account","container","level"],"category":"Azure Credentials","method":"get","name":"azureContainerSAS","output":true,"query":[],"route":"/azure/<account>/containers/<container>/<level>","scopes":{"else":"auth:azure-container:read-write:<account>/<container>","if":"levelIsReadOnly","then":{"AnyOf":["auth:azure-container:read-only:<account>/<container>","auth:azure-container:read-write:<account>/<container>"]}},"stability":"deprecated","type":"function"};
41
36
  this.sentryDSN.entry = {"args":["project"],"category":"Sentry Credentials","method":"get","name":"sentryDSN","output":true,"query":[],"route":"/sentry/<project>/dsn","scopes":"auth:sentry:<project>","stability":"stable","type":"function"};
42
37
  this.websocktunnelToken.entry = {"args":["wstAudience","wstClient"],"category":"Websocktunnel Credentials","method":"get","name":"websocktunnelToken","output":true,"query":[],"route":"/websocktunnel/<wstAudience>/<wstClient>","scopes":"auth:websocktunnel-token:<wstAudience>/<wstClient>","stability":"stable","type":"function"};
43
38
  this.gcpCredentials.entry = {"args":["projectId","serviceAccount"],"category":"GCP Credentials","method":"get","name":"gcpCredentials","output":true,"query":[],"route":"/gcp/credentials/<projectId>/<serviceAccount>","scopes":"auth:gcp:access-token:<projectId>/<serviceAccount>","stability":"stable","type":"function"};
@@ -271,44 +266,6 @@ export default class Auth extends Client {
271
266
 
272
267
  return this.request(this.awsS3Credentials.entry, args);
273
268
  }
274
- // Retrieve a list of all Azure accounts managed by Taskcluster Auth.
275
- azureAccounts(...args) {
276
- this.validate(this.azureAccounts.entry, args);
277
-
278
- return this.request(this.azureAccounts.entry, args);
279
- }
280
- // Retrieve a list of all tables in an account.
281
- azureTables(...args) {
282
- this.validate(this.azureTables.entry, args);
283
-
284
- return this.request(this.azureTables.entry, args);
285
- }
286
- // Get a shared access signature (SAS) string for use with a specific Azure
287
- // Table Storage table.
288
- // The `level` parameter can be `read-write` or `read-only` and determines
289
- // which type of credentials are returned. If level is read-write, it will create the
290
- // table if it doesn't already exist.
291
- azureTableSAS(...args) {
292
- this.validate(this.azureTableSAS.entry, args);
293
-
294
- return this.request(this.azureTableSAS.entry, args);
295
- }
296
- // Retrieve a list of all containers in an account.
297
- azureContainers(...args) {
298
- this.validate(this.azureContainers.entry, args);
299
-
300
- return this.request(this.azureContainers.entry, args);
301
- }
302
- // Get a shared access signature (SAS) string for use with a specific Azure
303
- // Blob Storage container.
304
- // The `level` parameter can be `read-write` or `read-only` and determines
305
- // which type of credentials are returned. If level is read-write, it will create the
306
- // container if it doesn't already exist.
307
- azureContainerSAS(...args) {
308
- this.validate(this.azureContainerSAS.entry, args);
309
-
310
- return this.request(this.azureContainerSAS.entry, args);
311
- }
312
269
  // Get temporary DSN (access credentials) for a sentry project.
313
270
  // The credentials returned can be used with any Sentry client for up to
314
271
  // 24 hours, after which the credentials will be automatically disabled.
@@ -27,6 +27,19 @@ export default class GithubEvents extends Client {
27
27
 
28
28
  return this.normalizePattern(entry, pattern);
29
29
  }
30
+ // When a GitHub push event changes a repository's `.taskcluster.yml` it will
31
+ // be broadcast on this exchange with the designated `organization` and
32
+ // `repository` in the routing-key.
33
+ // The payload names the repository and the ref that was pushed to, and
34
+ // nothing more. The file itself does not travel with the message, so a
35
+ // consumer reading it cannot be steered by the pushed commits.
36
+ // Detection is best effort. A force push that drops a commit reports no
37
+ // changed files to GitHub, so reverting the file that way sends no message.
38
+ taskclusterYmlUpdate(pattern) {
39
+ const entry = {"exchange":"taskcluster-yml-update","name":"taskclusterYmlUpdate","routingKey":[{"constant":"primary","multipleWords":false,"name":"routingKeyKind","required":true},{"multipleWords":false,"name":"organization","required":true},{"multipleWords":false,"name":"repository","required":true}],"schema":"v1/taskcluster-yml-update-message.json#","type":"topic-exchange"};
40
+
41
+ return this.normalizePattern(entry, pattern);
42
+ }
30
43
  // When a GitHub release event is posted it will be broadcast on this
31
44
  // exchange with the designated `organization` and `repository`
32
45
  // in the routing-key along with event specific metadata in the payload.
@@ -47,6 +47,7 @@ export default class Queue extends Client {
47
47
  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"};
48
48
  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"};
49
49
  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"};
50
+ this.taskQueueCountsBatch.entry = {"args":[],"category":"Worker Metadata","input":true,"method":"post","name":"taskQueueCountsBatch","output":true,"query":[],"route":"/task-queues/counts","scopes":{"AllOf":[{"each":"queue:pending-count:<taskQueueId>","for":"taskQueueId","in":"taskQueueIds"},{"each":"queue:claimed-count:<taskQueueId>","for":"taskQueueId","in":"taskQueueIds"}]},"stability":"experimental","type":"function"};
50
51
  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"};
51
52
  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"};
52
53
  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"};
@@ -565,6 +566,17 @@ export default class Queue extends Client {
565
566
 
566
567
  return this.request(this.pendingTasks.entry, args);
567
568
  }
569
+ // Get approximate pending and claimed task counts for the given task queues.
570
+ // The caller must have both `queue:pending-count:<taskQueueId>` and
571
+ // `queue:claimed-count:<taskQueueId>` scopes for every requested task queue.
572
+ // If any task queue is unauthorized, the entire request will fail.
573
+ // As task states may change rapidly, these counts may not represent the exact
574
+ // number of pending and claimed tasks, but are very good approximations.
575
+ taskQueueCountsBatch(...args) {
576
+ this.validate(this.taskQueueCountsBatch.entry, args);
577
+
578
+ return this.request(this.taskQueueCountsBatch.entry, args);
579
+ }
568
580
  // Get an approximate number of pending and claimed tasks for the given `taskQueueId`.
569
581
  // As task states may change rapidly, this number may not represent the exact
570
582
  // number of pending and claimed tasks, but a very good approximation.