@maxim_mazurok/gapi.client.cloudtasks-v2beta2 0.0.20220906 → 0.0.20220909

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.
Files changed (3) hide show
  1. package/index.d.ts +65 -66
  2. package/package.json +1 -1
  3. package/tests.ts +18 -19
package/index.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
11
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
12
  // Generated from: https://cloudtasks.googleapis.com/$discovery/rest?version=v2beta2
13
- // Revision: 20220906
13
+ // Revision: 20220909
14
14
 
15
15
  /// <reference types="gapi.client" />
16
16
 
@@ -145,13 +145,13 @@ declare namespace gapi.client {
145
145
  /** Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. */
146
146
  role?: string;
147
147
  }
148
- interface BufferQueueRequest {
149
- /** Body of the HTTP request. The body can take any generic value. The value will be written to the HttpRequest of the [Task]. */
148
+ interface BufferTaskRequest {
149
+ /** Optional. Body of the HTTP request. The body can take any generic value. The value will be written to the HttpRequest of the [Task]. */
150
150
  body?: HttpBody;
151
151
  }
152
- interface BufferQueueResponse {
153
- /** The name of the created task. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. TASK_ID is randomly generated and is unique within the queue. */
154
- task?: string;
152
+ interface BufferTaskResponse {
153
+ /** The created task. */
154
+ task?: Task;
155
155
  }
156
156
  interface CancelLeaseRequest {
157
157
  /**
@@ -739,6 +739,65 @@ declare namespace gapi.client {
739
739
  uploadType?: string;
740
740
  },
741
741
  body: AcknowledgeTaskRequest): Request<{}>;
742
+ /**
743
+ * Creates and buffers a new task without the need to explicitly define a Task message. The queue must have HTTP target. Note: This feature is in its experimental stage. You must
744
+ * request access to the API through the [Cloud Tasks BufferTasks Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
745
+ */
746
+ buffer(request: {
747
+ /** V1 error format. */
748
+ "$.xgafv"?: string;
749
+ /** OAuth access token. */
750
+ access_token?: string;
751
+ /** Data format for response. */
752
+ alt?: string;
753
+ /** JSONP */
754
+ callback?: string;
755
+ /** Selector specifying which fields to include in a partial response. */
756
+ fields?: string;
757
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
758
+ key?: string;
759
+ /** OAuth 2.0 token for the current user. */
760
+ oauth_token?: string;
761
+ /** Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. */
762
+ parent: string;
763
+ /** Returns response with indentations and line breaks. */
764
+ prettyPrint?: boolean;
765
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
766
+ quotaUser?: string;
767
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
768
+ upload_protocol?: string;
769
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
770
+ uploadType?: string;
771
+ /** Request body */
772
+ resource: BufferTaskRequest;
773
+ }): Request<BufferTaskResponse>;
774
+ buffer(request: {
775
+ /** V1 error format. */
776
+ "$.xgafv"?: string;
777
+ /** OAuth access token. */
778
+ access_token?: string;
779
+ /** Data format for response. */
780
+ alt?: string;
781
+ /** JSONP */
782
+ callback?: string;
783
+ /** Selector specifying which fields to include in a partial response. */
784
+ fields?: string;
785
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
786
+ key?: string;
787
+ /** OAuth 2.0 token for the current user. */
788
+ oauth_token?: string;
789
+ /** Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. */
790
+ parent: string;
791
+ /** Returns response with indentations and line breaks. */
792
+ prettyPrint?: boolean;
793
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
794
+ quotaUser?: string;
795
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
796
+ upload_protocol?: string;
797
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
798
+ uploadType?: string;
799
+ },
800
+ body: BufferTaskRequest): Request<BufferTaskResponse>;
742
801
  /**
743
802
  * Cancel a pull task's lease. The worker can use this method to cancel a task's lease by setting its schedule_time to now. This will make the task available to be leased to the next
744
803
  * caller of LeaseTasks.
@@ -1148,66 +1207,6 @@ declare namespace gapi.client {
1148
1207
  body: RunTaskRequest): Request<Task>;
1149
1208
  }
1150
1209
  interface QueuesResource {
1151
- /**
1152
- * Note: This feature is in its experimental stage. You must request access to the API through the [Cloud Tasks BufferQueues Experiment Signup
1153
- * form](https://forms.gle/X8Zr5hiXH5tTGFqh8). Creates and buffers a new task without the need to explicitly define a Task message. The queue must be an http queue (i.e., must have
1154
- * HTTP target). This method is used for a simplified application of Cloud Tasks queues in buffer and rate limitting HTTP requests.
1155
- */
1156
- buffer(request: {
1157
- /** V1 error format. */
1158
- "$.xgafv"?: string;
1159
- /** OAuth access token. */
1160
- access_token?: string;
1161
- /** Data format for response. */
1162
- alt?: string;
1163
- /** JSONP */
1164
- callback?: string;
1165
- /** Selector specifying which fields to include in a partial response. */
1166
- fields?: string;
1167
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1168
- key?: string;
1169
- /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. */
1170
- name: string;
1171
- /** OAuth 2.0 token for the current user. */
1172
- oauth_token?: string;
1173
- /** Returns response with indentations and line breaks. */
1174
- prettyPrint?: boolean;
1175
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1176
- quotaUser?: string;
1177
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1178
- upload_protocol?: string;
1179
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1180
- uploadType?: string;
1181
- /** Request body */
1182
- resource: BufferQueueRequest;
1183
- }): Request<BufferQueueResponse>;
1184
- buffer(request: {
1185
- /** V1 error format. */
1186
- "$.xgafv"?: string;
1187
- /** OAuth access token. */
1188
- access_token?: string;
1189
- /** Data format for response. */
1190
- alt?: string;
1191
- /** JSONP */
1192
- callback?: string;
1193
- /** Selector specifying which fields to include in a partial response. */
1194
- fields?: string;
1195
- /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1196
- key?: string;
1197
- /** Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. */
1198
- name: string;
1199
- /** OAuth 2.0 token for the current user. */
1200
- oauth_token?: string;
1201
- /** Returns response with indentations and line breaks. */
1202
- prettyPrint?: boolean;
1203
- /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1204
- quotaUser?: string;
1205
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1206
- upload_protocol?: string;
1207
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1208
- uploadType?: string;
1209
- },
1210
- body: BufferQueueRequest): Request<BufferQueueResponse>;
1211
1210
  /**
1212
1211
  * Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was
1213
1212
  * dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.cloudtasks-v2beta2",
3
- "version": "0.0.20220906",
3
+ "version": "0.0.20220909",
4
4
  "description": "TypeScript typings for Cloud Tasks API v2beta2",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20220906
6
+ // Revision: 20220909
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -40,24 +40,6 @@ gapi.load('client', async () => {
40
40
  pageSize: 42,
41
41
  pageToken: "Test string",
42
42
  });
43
- /**
44
- * Note: This feature is in its experimental stage. You must request access to the API through the [Cloud Tasks BufferQueues Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
45
- * Creates and buffers a new task without the need to explicitly define a Task message. The queue must be an http queue (i.e., must have HTTP target). This method is used for a simplified
46
- * application of Cloud Tasks queues in buffer and rate limitting HTTP requests.
47
- */
48
- await gapi.client.cloudtasks.projects.locations.queues.buffer({
49
- name: "Test string",
50
- }, {
51
- body: {
52
- contentType: "Test string",
53
- data: "Test string",
54
- extensions: [
55
- {
56
- A: 42
57
- }
58
- ],
59
- },
60
- });
61
43
  /**
62
44
  * Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was
63
45
  * dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of
@@ -304,6 +286,23 @@ gapi.load('client', async () => {
304
286
  }, {
305
287
  scheduleTime: "Test string",
306
288
  });
289
+ /**
290
+ * Creates and buffers a new task without the need to explicitly define a Task message. The queue must have HTTP target. Note: This feature is in its experimental stage. You must request
291
+ * access to the API through the [Cloud Tasks BufferTasks Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8).
292
+ */
293
+ await gapi.client.cloudtasks.projects.locations.queues.tasks.buffer({
294
+ parent: "Test string",
295
+ }, {
296
+ body: {
297
+ contentType: "Test string",
298
+ data: "Test string",
299
+ extensions: [
300
+ {
301
+ A: 42
302
+ }
303
+ ],
304
+ },
305
+ });
307
306
  /**
308
307
  * Cancel a pull task's lease. The worker can use this method to cancel a task's lease by setting its schedule_time to now. This will make the task available to be leased to the next
309
308
  * caller of LeaseTasks.