@googleapis/tasks 7.0.4 → 9.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.
package/v1.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -310,6 +310,47 @@ export namespace tasks_v1 {
310
310
 
311
311
  /**
312
312
  * Deletes the authenticated user's specified task list. If the list contains assigned tasks, both the assigned tasks and the original tasks in the assignment surface (Docs, Chat Spaces) are deleted.
313
+ * @example
314
+ * ```js
315
+ * // Before running the sample:
316
+ * // - Enable the API at:
317
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
318
+ * // - Login into gcloud by running:
319
+ * // ```sh
320
+ * // $ gcloud auth application-default login
321
+ * // ```
322
+ * // - Install the npm module by running:
323
+ * // ```sh
324
+ * // $ npm install googleapis
325
+ * // ```
326
+ *
327
+ * const {google} = require('googleapis');
328
+ * const tasks = google.tasks('v1');
329
+ *
330
+ * async function main() {
331
+ * const auth = new google.auth.GoogleAuth({
332
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
333
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
334
+ * });
335
+ *
336
+ * // Acquire an auth client, and bind it to all future calls
337
+ * const authClient = await auth.getClient();
338
+ * google.options({auth: authClient});
339
+ *
340
+ * // Do the magic
341
+ * const res = await tasks.tasklists.delete({
342
+ * // Task list identifier.
343
+ * tasklist: 'placeholder-value',
344
+ * });
345
+ * console.log(res.data);
346
+ * }
347
+ *
348
+ * main().catch(e => {
349
+ * console.error(e);
350
+ * throw e;
351
+ * });
352
+ *
353
+ * ```
313
354
  *
314
355
  * @param params - Parameters for request
315
356
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -319,11 +360,11 @@ export namespace tasks_v1 {
319
360
  delete(
320
361
  params: Params$Resource$Tasklists$Delete,
321
362
  options: StreamMethodOptions
322
- ): GaxiosPromise<Readable>;
363
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
323
364
  delete(
324
365
  params?: Params$Resource$Tasklists$Delete,
325
366
  options?: MethodOptions
326
- ): GaxiosPromise<void>;
367
+ ): Promise<GaxiosResponseWithHTTP2<void>>;
327
368
  delete(
328
369
  params: Params$Resource$Tasklists$Delete,
329
370
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -350,7 +391,10 @@ export namespace tasks_v1 {
350
391
  | BodyResponseCallback<void>
351
392
  | BodyResponseCallback<Readable>,
352
393
  callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
353
- ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
394
+ ):
395
+ | void
396
+ | Promise<GaxiosResponseWithHTTP2<void>>
397
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
354
398
  let params = (paramsOrCallback || {}) as Params$Resource$Tasklists$Delete;
355
399
  let options = (optionsOrCallback || {}) as MethodOptions;
356
400
 
@@ -395,6 +439,60 @@ export namespace tasks_v1 {
395
439
 
396
440
  /**
397
441
  * Returns the authenticated user's specified task list.
442
+ * @example
443
+ * ```js
444
+ * // Before running the sample:
445
+ * // - Enable the API at:
446
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
447
+ * // - Login into gcloud by running:
448
+ * // ```sh
449
+ * // $ gcloud auth application-default login
450
+ * // ```
451
+ * // - Install the npm module by running:
452
+ * // ```sh
453
+ * // $ npm install googleapis
454
+ * // ```
455
+ *
456
+ * const {google} = require('googleapis');
457
+ * const tasks = google.tasks('v1');
458
+ *
459
+ * async function main() {
460
+ * const auth = new google.auth.GoogleAuth({
461
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
462
+ * scopes: [
463
+ * 'https://www.googleapis.com/auth/tasks',
464
+ * 'https://www.googleapis.com/auth/tasks.readonly',
465
+ * ],
466
+ * });
467
+ *
468
+ * // Acquire an auth client, and bind it to all future calls
469
+ * const authClient = await auth.getClient();
470
+ * google.options({auth: authClient});
471
+ *
472
+ * // Do the magic
473
+ * const res = await tasks.tasklists.get({
474
+ * // Task list identifier.
475
+ * tasklist: 'placeholder-value',
476
+ * });
477
+ * console.log(res.data);
478
+ *
479
+ * // Example response
480
+ * // {
481
+ * // "etag": "my_etag",
482
+ * // "id": "my_id",
483
+ * // "kind": "my_kind",
484
+ * // "selfLink": "my_selfLink",
485
+ * // "title": "my_title",
486
+ * // "updated": "my_updated"
487
+ * // }
488
+ * }
489
+ *
490
+ * main().catch(e => {
491
+ * console.error(e);
492
+ * throw e;
493
+ * });
494
+ *
495
+ * ```
398
496
  *
399
497
  * @param params - Parameters for request
400
498
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -404,11 +502,11 @@ export namespace tasks_v1 {
404
502
  get(
405
503
  params: Params$Resource$Tasklists$Get,
406
504
  options: StreamMethodOptions
407
- ): GaxiosPromise<Readable>;
505
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
408
506
  get(
409
507
  params?: Params$Resource$Tasklists$Get,
410
508
  options?: MethodOptions
411
- ): GaxiosPromise<Schema$TaskList>;
509
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TaskList>>;
412
510
  get(
413
511
  params: Params$Resource$Tasklists$Get,
414
512
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -437,7 +535,10 @@ export namespace tasks_v1 {
437
535
  callback?:
438
536
  | BodyResponseCallback<Schema$TaskList>
439
537
  | BodyResponseCallback<Readable>
440
- ): void | GaxiosPromise<Schema$TaskList> | GaxiosPromise<Readable> {
538
+ ):
539
+ | void
540
+ | Promise<GaxiosResponseWithHTTP2<Schema$TaskList>>
541
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
441
542
  let params = (paramsOrCallback || {}) as Params$Resource$Tasklists$Get;
442
543
  let options = (optionsOrCallback || {}) as MethodOptions;
443
544
 
@@ -482,6 +583,67 @@ export namespace tasks_v1 {
482
583
 
483
584
  /**
484
585
  * Creates a new task list and adds it to the authenticated user's task lists. A user can have up to 2000 lists at a time.
586
+ * @example
587
+ * ```js
588
+ * // Before running the sample:
589
+ * // - Enable the API at:
590
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
591
+ * // - Login into gcloud by running:
592
+ * // ```sh
593
+ * // $ gcloud auth application-default login
594
+ * // ```
595
+ * // - Install the npm module by running:
596
+ * // ```sh
597
+ * // $ npm install googleapis
598
+ * // ```
599
+ *
600
+ * const {google} = require('googleapis');
601
+ * const tasks = google.tasks('v1');
602
+ *
603
+ * async function main() {
604
+ * const auth = new google.auth.GoogleAuth({
605
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
606
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
607
+ * });
608
+ *
609
+ * // Acquire an auth client, and bind it to all future calls
610
+ * const authClient = await auth.getClient();
611
+ * google.options({auth: authClient});
612
+ *
613
+ * // Do the magic
614
+ * const res = await tasks.tasklists.insert({
615
+ * // Request body metadata
616
+ * requestBody: {
617
+ * // request body parameters
618
+ * // {
619
+ * // "etag": "my_etag",
620
+ * // "id": "my_id",
621
+ * // "kind": "my_kind",
622
+ * // "selfLink": "my_selfLink",
623
+ * // "title": "my_title",
624
+ * // "updated": "my_updated"
625
+ * // }
626
+ * },
627
+ * });
628
+ * console.log(res.data);
629
+ *
630
+ * // Example response
631
+ * // {
632
+ * // "etag": "my_etag",
633
+ * // "id": "my_id",
634
+ * // "kind": "my_kind",
635
+ * // "selfLink": "my_selfLink",
636
+ * // "title": "my_title",
637
+ * // "updated": "my_updated"
638
+ * // }
639
+ * }
640
+ *
641
+ * main().catch(e => {
642
+ * console.error(e);
643
+ * throw e;
644
+ * });
645
+ *
646
+ * ```
485
647
  *
486
648
  * @param params - Parameters for request
487
649
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -491,11 +653,11 @@ export namespace tasks_v1 {
491
653
  insert(
492
654
  params: Params$Resource$Tasklists$Insert,
493
655
  options: StreamMethodOptions
494
- ): GaxiosPromise<Readable>;
656
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
495
657
  insert(
496
658
  params?: Params$Resource$Tasklists$Insert,
497
659
  options?: MethodOptions
498
- ): GaxiosPromise<Schema$TaskList>;
660
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TaskList>>;
499
661
  insert(
500
662
  params: Params$Resource$Tasklists$Insert,
501
663
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -524,7 +686,10 @@ export namespace tasks_v1 {
524
686
  callback?:
525
687
  | BodyResponseCallback<Schema$TaskList>
526
688
  | BodyResponseCallback<Readable>
527
- ): void | GaxiosPromise<Schema$TaskList> | GaxiosPromise<Readable> {
689
+ ):
690
+ | void
691
+ | Promise<GaxiosResponseWithHTTP2<Schema$TaskList>>
692
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
528
693
  let params = (paramsOrCallback || {}) as Params$Resource$Tasklists$Insert;
529
694
  let options = (optionsOrCallback || {}) as MethodOptions;
530
695
 
@@ -569,6 +734,60 @@ export namespace tasks_v1 {
569
734
 
570
735
  /**
571
736
  * Returns all the authenticated user's task lists. A user can have up to 2000 lists at a time.
737
+ * @example
738
+ * ```js
739
+ * // Before running the sample:
740
+ * // - Enable the API at:
741
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
742
+ * // - Login into gcloud by running:
743
+ * // ```sh
744
+ * // $ gcloud auth application-default login
745
+ * // ```
746
+ * // - Install the npm module by running:
747
+ * // ```sh
748
+ * // $ npm install googleapis
749
+ * // ```
750
+ *
751
+ * const {google} = require('googleapis');
752
+ * const tasks = google.tasks('v1');
753
+ *
754
+ * async function main() {
755
+ * const auth = new google.auth.GoogleAuth({
756
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
757
+ * scopes: [
758
+ * 'https://www.googleapis.com/auth/tasks',
759
+ * 'https://www.googleapis.com/auth/tasks.readonly',
760
+ * ],
761
+ * });
762
+ *
763
+ * // Acquire an auth client, and bind it to all future calls
764
+ * const authClient = await auth.getClient();
765
+ * google.options({auth: authClient});
766
+ *
767
+ * // Do the magic
768
+ * const res = await tasks.tasklists.list({
769
+ * // Maximum number of task lists returned on one page. Optional. The default is 1000 (max allowed: 1000).
770
+ * maxResults: 'placeholder-value',
771
+ * // Token specifying the result page to return. Optional.
772
+ * pageToken: 'placeholder-value',
773
+ * });
774
+ * console.log(res.data);
775
+ *
776
+ * // Example response
777
+ * // {
778
+ * // "etag": "my_etag",
779
+ * // "items": [],
780
+ * // "kind": "my_kind",
781
+ * // "nextPageToken": "my_nextPageToken"
782
+ * // }
783
+ * }
784
+ *
785
+ * main().catch(e => {
786
+ * console.error(e);
787
+ * throw e;
788
+ * });
789
+ *
790
+ * ```
572
791
  *
573
792
  * @param params - Parameters for request
574
793
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -578,11 +797,11 @@ export namespace tasks_v1 {
578
797
  list(
579
798
  params: Params$Resource$Tasklists$List,
580
799
  options: StreamMethodOptions
581
- ): GaxiosPromise<Readable>;
800
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
582
801
  list(
583
802
  params?: Params$Resource$Tasklists$List,
584
803
  options?: MethodOptions
585
- ): GaxiosPromise<Schema$TaskLists>;
804
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TaskLists>>;
586
805
  list(
587
806
  params: Params$Resource$Tasklists$List,
588
807
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -611,7 +830,10 @@ export namespace tasks_v1 {
611
830
  callback?:
612
831
  | BodyResponseCallback<Schema$TaskLists>
613
832
  | BodyResponseCallback<Readable>
614
- ): void | GaxiosPromise<Schema$TaskLists> | GaxiosPromise<Readable> {
833
+ ):
834
+ | void
835
+ | Promise<GaxiosResponseWithHTTP2<Schema$TaskLists>>
836
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
615
837
  let params = (paramsOrCallback || {}) as Params$Resource$Tasklists$List;
616
838
  let options = (optionsOrCallback || {}) as MethodOptions;
617
839
 
@@ -656,6 +878,70 @@ export namespace tasks_v1 {
656
878
 
657
879
  /**
658
880
  * Updates the authenticated user's specified task list. This method supports patch semantics.
881
+ * @example
882
+ * ```js
883
+ * // Before running the sample:
884
+ * // - Enable the API at:
885
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
886
+ * // - Login into gcloud by running:
887
+ * // ```sh
888
+ * // $ gcloud auth application-default login
889
+ * // ```
890
+ * // - Install the npm module by running:
891
+ * // ```sh
892
+ * // $ npm install googleapis
893
+ * // ```
894
+ *
895
+ * const {google} = require('googleapis');
896
+ * const tasks = google.tasks('v1');
897
+ *
898
+ * async function main() {
899
+ * const auth = new google.auth.GoogleAuth({
900
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
901
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
902
+ * });
903
+ *
904
+ * // Acquire an auth client, and bind it to all future calls
905
+ * const authClient = await auth.getClient();
906
+ * google.options({auth: authClient});
907
+ *
908
+ * // Do the magic
909
+ * const res = await tasks.tasklists.patch({
910
+ * // Task list identifier.
911
+ * tasklist: 'placeholder-value',
912
+ *
913
+ * // Request body metadata
914
+ * requestBody: {
915
+ * // request body parameters
916
+ * // {
917
+ * // "etag": "my_etag",
918
+ * // "id": "my_id",
919
+ * // "kind": "my_kind",
920
+ * // "selfLink": "my_selfLink",
921
+ * // "title": "my_title",
922
+ * // "updated": "my_updated"
923
+ * // }
924
+ * },
925
+ * });
926
+ * console.log(res.data);
927
+ *
928
+ * // Example response
929
+ * // {
930
+ * // "etag": "my_etag",
931
+ * // "id": "my_id",
932
+ * // "kind": "my_kind",
933
+ * // "selfLink": "my_selfLink",
934
+ * // "title": "my_title",
935
+ * // "updated": "my_updated"
936
+ * // }
937
+ * }
938
+ *
939
+ * main().catch(e => {
940
+ * console.error(e);
941
+ * throw e;
942
+ * });
943
+ *
944
+ * ```
659
945
  *
660
946
  * @param params - Parameters for request
661
947
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -665,11 +951,11 @@ export namespace tasks_v1 {
665
951
  patch(
666
952
  params: Params$Resource$Tasklists$Patch,
667
953
  options: StreamMethodOptions
668
- ): GaxiosPromise<Readable>;
954
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
669
955
  patch(
670
956
  params?: Params$Resource$Tasklists$Patch,
671
957
  options?: MethodOptions
672
- ): GaxiosPromise<Schema$TaskList>;
958
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TaskList>>;
673
959
  patch(
674
960
  params: Params$Resource$Tasklists$Patch,
675
961
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -698,7 +984,10 @@ export namespace tasks_v1 {
698
984
  callback?:
699
985
  | BodyResponseCallback<Schema$TaskList>
700
986
  | BodyResponseCallback<Readable>
701
- ): void | GaxiosPromise<Schema$TaskList> | GaxiosPromise<Readable> {
987
+ ):
988
+ | void
989
+ | Promise<GaxiosResponseWithHTTP2<Schema$TaskList>>
990
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
702
991
  let params = (paramsOrCallback || {}) as Params$Resource$Tasklists$Patch;
703
992
  let options = (optionsOrCallback || {}) as MethodOptions;
704
993
 
@@ -743,6 +1032,70 @@ export namespace tasks_v1 {
743
1032
 
744
1033
  /**
745
1034
  * Updates the authenticated user's specified task list.
1035
+ * @example
1036
+ * ```js
1037
+ * // Before running the sample:
1038
+ * // - Enable the API at:
1039
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1040
+ * // - Login into gcloud by running:
1041
+ * // ```sh
1042
+ * // $ gcloud auth application-default login
1043
+ * // ```
1044
+ * // - Install the npm module by running:
1045
+ * // ```sh
1046
+ * // $ npm install googleapis
1047
+ * // ```
1048
+ *
1049
+ * const {google} = require('googleapis');
1050
+ * const tasks = google.tasks('v1');
1051
+ *
1052
+ * async function main() {
1053
+ * const auth = new google.auth.GoogleAuth({
1054
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1055
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
1056
+ * });
1057
+ *
1058
+ * // Acquire an auth client, and bind it to all future calls
1059
+ * const authClient = await auth.getClient();
1060
+ * google.options({auth: authClient});
1061
+ *
1062
+ * // Do the magic
1063
+ * const res = await tasks.tasklists.update({
1064
+ * // Task list identifier.
1065
+ * tasklist: 'placeholder-value',
1066
+ *
1067
+ * // Request body metadata
1068
+ * requestBody: {
1069
+ * // request body parameters
1070
+ * // {
1071
+ * // "etag": "my_etag",
1072
+ * // "id": "my_id",
1073
+ * // "kind": "my_kind",
1074
+ * // "selfLink": "my_selfLink",
1075
+ * // "title": "my_title",
1076
+ * // "updated": "my_updated"
1077
+ * // }
1078
+ * },
1079
+ * });
1080
+ * console.log(res.data);
1081
+ *
1082
+ * // Example response
1083
+ * // {
1084
+ * // "etag": "my_etag",
1085
+ * // "id": "my_id",
1086
+ * // "kind": "my_kind",
1087
+ * // "selfLink": "my_selfLink",
1088
+ * // "title": "my_title",
1089
+ * // "updated": "my_updated"
1090
+ * // }
1091
+ * }
1092
+ *
1093
+ * main().catch(e => {
1094
+ * console.error(e);
1095
+ * throw e;
1096
+ * });
1097
+ *
1098
+ * ```
746
1099
  *
747
1100
  * @param params - Parameters for request
748
1101
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -752,11 +1105,11 @@ export namespace tasks_v1 {
752
1105
  update(
753
1106
  params: Params$Resource$Tasklists$Update,
754
1107
  options: StreamMethodOptions
755
- ): GaxiosPromise<Readable>;
1108
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
756
1109
  update(
757
1110
  params?: Params$Resource$Tasklists$Update,
758
1111
  options?: MethodOptions
759
- ): GaxiosPromise<Schema$TaskList>;
1112
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TaskList>>;
760
1113
  update(
761
1114
  params: Params$Resource$Tasklists$Update,
762
1115
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -785,7 +1138,10 @@ export namespace tasks_v1 {
785
1138
  callback?:
786
1139
  | BodyResponseCallback<Schema$TaskList>
787
1140
  | BodyResponseCallback<Readable>
788
- ): void | GaxiosPromise<Schema$TaskList> | GaxiosPromise<Readable> {
1141
+ ):
1142
+ | void
1143
+ | Promise<GaxiosResponseWithHTTP2<Schema$TaskList>>
1144
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
789
1145
  let params = (paramsOrCallback || {}) as Params$Resource$Tasklists$Update;
790
1146
  let options = (optionsOrCallback || {}) as MethodOptions;
791
1147
 
@@ -888,6 +1244,47 @@ export namespace tasks_v1 {
888
1244
 
889
1245
  /**
890
1246
  * Clears all completed tasks from the specified task list. The affected tasks will be marked as 'hidden' and no longer be returned by default when retrieving all tasks for a task list.
1247
+ * @example
1248
+ * ```js
1249
+ * // Before running the sample:
1250
+ * // - Enable the API at:
1251
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1252
+ * // - Login into gcloud by running:
1253
+ * // ```sh
1254
+ * // $ gcloud auth application-default login
1255
+ * // ```
1256
+ * // - Install the npm module by running:
1257
+ * // ```sh
1258
+ * // $ npm install googleapis
1259
+ * // ```
1260
+ *
1261
+ * const {google} = require('googleapis');
1262
+ * const tasks = google.tasks('v1');
1263
+ *
1264
+ * async function main() {
1265
+ * const auth = new google.auth.GoogleAuth({
1266
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1267
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
1268
+ * });
1269
+ *
1270
+ * // Acquire an auth client, and bind it to all future calls
1271
+ * const authClient = await auth.getClient();
1272
+ * google.options({auth: authClient});
1273
+ *
1274
+ * // Do the magic
1275
+ * const res = await tasks.tasks.clear({
1276
+ * // Task list identifier.
1277
+ * tasklist: 'placeholder-value',
1278
+ * });
1279
+ * console.log(res.data);
1280
+ * }
1281
+ *
1282
+ * main().catch(e => {
1283
+ * console.error(e);
1284
+ * throw e;
1285
+ * });
1286
+ *
1287
+ * ```
891
1288
  *
892
1289
  * @param params - Parameters for request
893
1290
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -897,11 +1294,11 @@ export namespace tasks_v1 {
897
1294
  clear(
898
1295
  params: Params$Resource$Tasks$Clear,
899
1296
  options: StreamMethodOptions
900
- ): GaxiosPromise<Readable>;
1297
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
901
1298
  clear(
902
1299
  params?: Params$Resource$Tasks$Clear,
903
1300
  options?: MethodOptions
904
- ): GaxiosPromise<void>;
1301
+ ): Promise<GaxiosResponseWithHTTP2<void>>;
905
1302
  clear(
906
1303
  params: Params$Resource$Tasks$Clear,
907
1304
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -928,7 +1325,10 @@ export namespace tasks_v1 {
928
1325
  | BodyResponseCallback<void>
929
1326
  | BodyResponseCallback<Readable>,
930
1327
  callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
931
- ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
1328
+ ):
1329
+ | void
1330
+ | Promise<GaxiosResponseWithHTTP2<void>>
1331
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
932
1332
  let params = (paramsOrCallback || {}) as Params$Resource$Tasks$Clear;
933
1333
  let options = (optionsOrCallback || {}) as MethodOptions;
934
1334
 
@@ -973,6 +1373,49 @@ export namespace tasks_v1 {
973
1373
 
974
1374
  /**
975
1375
  * Deletes the specified task from the task list. If the task is assigned, both the assigned task and the original task (in Docs, Chat Spaces) are deleted. To delete the assigned task only, navigate to the assignment surface and unassign the task from there.
1376
+ * @example
1377
+ * ```js
1378
+ * // Before running the sample:
1379
+ * // - Enable the API at:
1380
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1381
+ * // - Login into gcloud by running:
1382
+ * // ```sh
1383
+ * // $ gcloud auth application-default login
1384
+ * // ```
1385
+ * // - Install the npm module by running:
1386
+ * // ```sh
1387
+ * // $ npm install googleapis
1388
+ * // ```
1389
+ *
1390
+ * const {google} = require('googleapis');
1391
+ * const tasks = google.tasks('v1');
1392
+ *
1393
+ * async function main() {
1394
+ * const auth = new google.auth.GoogleAuth({
1395
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1396
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
1397
+ * });
1398
+ *
1399
+ * // Acquire an auth client, and bind it to all future calls
1400
+ * const authClient = await auth.getClient();
1401
+ * google.options({auth: authClient});
1402
+ *
1403
+ * // Do the magic
1404
+ * const res = await tasks.tasks.delete({
1405
+ * // Task identifier.
1406
+ * task: 'placeholder-value',
1407
+ * // Task list identifier.
1408
+ * tasklist: 'placeholder-value',
1409
+ * });
1410
+ * console.log(res.data);
1411
+ * }
1412
+ *
1413
+ * main().catch(e => {
1414
+ * console.error(e);
1415
+ * throw e;
1416
+ * });
1417
+ *
1418
+ * ```
976
1419
  *
977
1420
  * @param params - Parameters for request
978
1421
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -982,11 +1425,11 @@ export namespace tasks_v1 {
982
1425
  delete(
983
1426
  params: Params$Resource$Tasks$Delete,
984
1427
  options: StreamMethodOptions
985
- ): GaxiosPromise<Readable>;
1428
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
986
1429
  delete(
987
1430
  params?: Params$Resource$Tasks$Delete,
988
1431
  options?: MethodOptions
989
- ): GaxiosPromise<void>;
1432
+ ): Promise<GaxiosResponseWithHTTP2<void>>;
990
1433
  delete(
991
1434
  params: Params$Resource$Tasks$Delete,
992
1435
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1013,7 +1456,10 @@ export namespace tasks_v1 {
1013
1456
  | BodyResponseCallback<void>
1014
1457
  | BodyResponseCallback<Readable>,
1015
1458
  callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
1016
- ): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
1459
+ ):
1460
+ | void
1461
+ | Promise<GaxiosResponseWithHTTP2<void>>
1462
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1017
1463
  let params = (paramsOrCallback || {}) as Params$Resource$Tasks$Delete;
1018
1464
  let options = (optionsOrCallback || {}) as MethodOptions;
1019
1465
 
@@ -1058,6 +1504,73 @@ export namespace tasks_v1 {
1058
1504
 
1059
1505
  /**
1060
1506
  * Returns the specified task.
1507
+ * @example
1508
+ * ```js
1509
+ * // Before running the sample:
1510
+ * // - Enable the API at:
1511
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1512
+ * // - Login into gcloud by running:
1513
+ * // ```sh
1514
+ * // $ gcloud auth application-default login
1515
+ * // ```
1516
+ * // - Install the npm module by running:
1517
+ * // ```sh
1518
+ * // $ npm install googleapis
1519
+ * // ```
1520
+ *
1521
+ * const {google} = require('googleapis');
1522
+ * const tasks = google.tasks('v1');
1523
+ *
1524
+ * async function main() {
1525
+ * const auth = new google.auth.GoogleAuth({
1526
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1527
+ * scopes: [
1528
+ * 'https://www.googleapis.com/auth/tasks',
1529
+ * 'https://www.googleapis.com/auth/tasks.readonly',
1530
+ * ],
1531
+ * });
1532
+ *
1533
+ * // Acquire an auth client, and bind it to all future calls
1534
+ * const authClient = await auth.getClient();
1535
+ * google.options({auth: authClient});
1536
+ *
1537
+ * // Do the magic
1538
+ * const res = await tasks.tasks.get({
1539
+ * // Task identifier.
1540
+ * task: 'placeholder-value',
1541
+ * // Task list identifier.
1542
+ * tasklist: 'placeholder-value',
1543
+ * });
1544
+ * console.log(res.data);
1545
+ *
1546
+ * // Example response
1547
+ * // {
1548
+ * // "assignmentInfo": {},
1549
+ * // "completed": "my_completed",
1550
+ * // "deleted": false,
1551
+ * // "due": "my_due",
1552
+ * // "etag": "my_etag",
1553
+ * // "hidden": false,
1554
+ * // "id": "my_id",
1555
+ * // "kind": "my_kind",
1556
+ * // "links": [],
1557
+ * // "notes": "my_notes",
1558
+ * // "parent": "my_parent",
1559
+ * // "position": "my_position",
1560
+ * // "selfLink": "my_selfLink",
1561
+ * // "status": "my_status",
1562
+ * // "title": "my_title",
1563
+ * // "updated": "my_updated",
1564
+ * // "webViewLink": "my_webViewLink"
1565
+ * // }
1566
+ * }
1567
+ *
1568
+ * main().catch(e => {
1569
+ * console.error(e);
1570
+ * throw e;
1571
+ * });
1572
+ *
1573
+ * ```
1061
1574
  *
1062
1575
  * @param params - Parameters for request
1063
1576
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1067,11 +1580,11 @@ export namespace tasks_v1 {
1067
1580
  get(
1068
1581
  params: Params$Resource$Tasks$Get,
1069
1582
  options: StreamMethodOptions
1070
- ): GaxiosPromise<Readable>;
1583
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1071
1584
  get(
1072
1585
  params?: Params$Resource$Tasks$Get,
1073
1586
  options?: MethodOptions
1074
- ): GaxiosPromise<Schema$Task>;
1587
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Task>>;
1075
1588
  get(
1076
1589
  params: Params$Resource$Tasks$Get,
1077
1590
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1100,7 +1613,10 @@ export namespace tasks_v1 {
1100
1613
  callback?:
1101
1614
  | BodyResponseCallback<Schema$Task>
1102
1615
  | BodyResponseCallback<Readable>
1103
- ): void | GaxiosPromise<Schema$Task> | GaxiosPromise<Readable> {
1616
+ ):
1617
+ | void
1618
+ | Promise<GaxiosResponseWithHTTP2<Schema$Task>>
1619
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1104
1620
  let params = (paramsOrCallback || {}) as Params$Resource$Tasks$Get;
1105
1621
  let options = (optionsOrCallback || {}) as MethodOptions;
1106
1622
 
@@ -1145,6 +1661,96 @@ export namespace tasks_v1 {
1145
1661
 
1146
1662
  /**
1147
1663
  * Creates a new task on the specified task list. Tasks assigned from Docs or Chat Spaces cannot be inserted from Tasks Public API; they can only be created by assigning them from Docs or Chat Spaces. A user can have up to 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.
1664
+ * @example
1665
+ * ```js
1666
+ * // Before running the sample:
1667
+ * // - Enable the API at:
1668
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1669
+ * // - Login into gcloud by running:
1670
+ * // ```sh
1671
+ * // $ gcloud auth application-default login
1672
+ * // ```
1673
+ * // - Install the npm module by running:
1674
+ * // ```sh
1675
+ * // $ npm install googleapis
1676
+ * // ```
1677
+ *
1678
+ * const {google} = require('googleapis');
1679
+ * const tasks = google.tasks('v1');
1680
+ *
1681
+ * async function main() {
1682
+ * const auth = new google.auth.GoogleAuth({
1683
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1684
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
1685
+ * });
1686
+ *
1687
+ * // Acquire an auth client, and bind it to all future calls
1688
+ * const authClient = await auth.getClient();
1689
+ * google.options({auth: authClient});
1690
+ *
1691
+ * // Do the magic
1692
+ * const res = await tasks.tasks.insert({
1693
+ * // Parent task identifier. If the task is created at the top level, this parameter is omitted. An assigned task cannot be a parent task, nor can it have a parent. Setting the parent to an assigned task results in failure of the request. Optional.
1694
+ * parent: 'placeholder-value',
1695
+ * // Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted. Optional.
1696
+ * previous: 'placeholder-value',
1697
+ * // Task list identifier.
1698
+ * tasklist: 'placeholder-value',
1699
+ *
1700
+ * // Request body metadata
1701
+ * requestBody: {
1702
+ * // request body parameters
1703
+ * // {
1704
+ * // "assignmentInfo": {},
1705
+ * // "completed": "my_completed",
1706
+ * // "deleted": false,
1707
+ * // "due": "my_due",
1708
+ * // "etag": "my_etag",
1709
+ * // "hidden": false,
1710
+ * // "id": "my_id",
1711
+ * // "kind": "my_kind",
1712
+ * // "links": [],
1713
+ * // "notes": "my_notes",
1714
+ * // "parent": "my_parent",
1715
+ * // "position": "my_position",
1716
+ * // "selfLink": "my_selfLink",
1717
+ * // "status": "my_status",
1718
+ * // "title": "my_title",
1719
+ * // "updated": "my_updated",
1720
+ * // "webViewLink": "my_webViewLink"
1721
+ * // }
1722
+ * },
1723
+ * });
1724
+ * console.log(res.data);
1725
+ *
1726
+ * // Example response
1727
+ * // {
1728
+ * // "assignmentInfo": {},
1729
+ * // "completed": "my_completed",
1730
+ * // "deleted": false,
1731
+ * // "due": "my_due",
1732
+ * // "etag": "my_etag",
1733
+ * // "hidden": false,
1734
+ * // "id": "my_id",
1735
+ * // "kind": "my_kind",
1736
+ * // "links": [],
1737
+ * // "notes": "my_notes",
1738
+ * // "parent": "my_parent",
1739
+ * // "position": "my_position",
1740
+ * // "selfLink": "my_selfLink",
1741
+ * // "status": "my_status",
1742
+ * // "title": "my_title",
1743
+ * // "updated": "my_updated",
1744
+ * // "webViewLink": "my_webViewLink"
1745
+ * // }
1746
+ * }
1747
+ *
1748
+ * main().catch(e => {
1749
+ * console.error(e);
1750
+ * throw e;
1751
+ * });
1752
+ *
1753
+ * ```
1148
1754
  *
1149
1755
  * @param params - Parameters for request
1150
1756
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1154,11 +1760,11 @@ export namespace tasks_v1 {
1154
1760
  insert(
1155
1761
  params: Params$Resource$Tasks$Insert,
1156
1762
  options: StreamMethodOptions
1157
- ): GaxiosPromise<Readable>;
1763
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1158
1764
  insert(
1159
1765
  params?: Params$Resource$Tasks$Insert,
1160
1766
  options?: MethodOptions
1161
- ): GaxiosPromise<Schema$Task>;
1767
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Task>>;
1162
1768
  insert(
1163
1769
  params: Params$Resource$Tasks$Insert,
1164
1770
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1187,7 +1793,10 @@ export namespace tasks_v1 {
1187
1793
  callback?:
1188
1794
  | BodyResponseCallback<Schema$Task>
1189
1795
  | BodyResponseCallback<Readable>
1190
- ): void | GaxiosPromise<Schema$Task> | GaxiosPromise<Readable> {
1796
+ ):
1797
+ | void
1798
+ | Promise<GaxiosResponseWithHTTP2<Schema$Task>>
1799
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1191
1800
  let params = (paramsOrCallback || {}) as Params$Resource$Tasks$Insert;
1192
1801
  let options = (optionsOrCallback || {}) as MethodOptions;
1193
1802
 
@@ -1232,6 +1841,80 @@ export namespace tasks_v1 {
1232
1841
 
1233
1842
  /**
1234
1843
  * Returns all tasks in the specified task list. Doesn't return assigned tasks by default (from Docs, Chat Spaces). A user can have up to 20,000 non-hidden tasks per list and up to 100,000 tasks in total at a time.
1844
+ * @example
1845
+ * ```js
1846
+ * // Before running the sample:
1847
+ * // - Enable the API at:
1848
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
1849
+ * // - Login into gcloud by running:
1850
+ * // ```sh
1851
+ * // $ gcloud auth application-default login
1852
+ * // ```
1853
+ * // - Install the npm module by running:
1854
+ * // ```sh
1855
+ * // $ npm install googleapis
1856
+ * // ```
1857
+ *
1858
+ * const {google} = require('googleapis');
1859
+ * const tasks = google.tasks('v1');
1860
+ *
1861
+ * async function main() {
1862
+ * const auth = new google.auth.GoogleAuth({
1863
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1864
+ * scopes: [
1865
+ * 'https://www.googleapis.com/auth/tasks',
1866
+ * 'https://www.googleapis.com/auth/tasks.readonly',
1867
+ * ],
1868
+ * });
1869
+ *
1870
+ * // Acquire an auth client, and bind it to all future calls
1871
+ * const authClient = await auth.getClient();
1872
+ * google.options({auth: authClient});
1873
+ *
1874
+ * // Do the magic
1875
+ * const res = await tasks.tasks.list({
1876
+ * // Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date.
1877
+ * completedMax: 'placeholder-value',
1878
+ * // Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date.
1879
+ * completedMin: 'placeholder-value',
1880
+ * // Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date.
1881
+ * dueMax: 'placeholder-value',
1882
+ * // Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date.
1883
+ * dueMin: 'placeholder-value',
1884
+ * // Maximum number of tasks returned on one page. Optional. The default is 20 (max allowed: 100).
1885
+ * maxResults: 'placeholder-value',
1886
+ * // Token specifying the result page to return. Optional.
1887
+ * pageToken: 'placeholder-value',
1888
+ * // Optional. Flag indicating whether tasks assigned to the current user are returned in the result. Optional. The default is False.
1889
+ * showAssigned: 'placeholder-value',
1890
+ * // Flag indicating whether completed tasks are returned in the result. Note that showHidden must also be True to show tasks completed in first party clients, such as the web UI and Google's mobile apps. Optional. The default is True.
1891
+ * showCompleted: 'placeholder-value',
1892
+ * // Flag indicating whether deleted tasks are returned in the result. Optional. The default is False.
1893
+ * showDeleted: 'placeholder-value',
1894
+ * // Flag indicating whether hidden tasks are returned in the result. Optional. The default is False.
1895
+ * showHidden: 'placeholder-value',
1896
+ * // Task list identifier.
1897
+ * tasklist: 'placeholder-value',
1898
+ * // Lower bound for a task's last modification time (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by last modification time.
1899
+ * updatedMin: 'placeholder-value',
1900
+ * });
1901
+ * console.log(res.data);
1902
+ *
1903
+ * // Example response
1904
+ * // {
1905
+ * // "etag": "my_etag",
1906
+ * // "items": [],
1907
+ * // "kind": "my_kind",
1908
+ * // "nextPageToken": "my_nextPageToken"
1909
+ * // }
1910
+ * }
1911
+ *
1912
+ * main().catch(e => {
1913
+ * console.error(e);
1914
+ * throw e;
1915
+ * });
1916
+ *
1917
+ * ```
1235
1918
  *
1236
1919
  * @param params - Parameters for request
1237
1920
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1241,11 +1924,11 @@ export namespace tasks_v1 {
1241
1924
  list(
1242
1925
  params: Params$Resource$Tasks$List,
1243
1926
  options: StreamMethodOptions
1244
- ): GaxiosPromise<Readable>;
1927
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1245
1928
  list(
1246
1929
  params?: Params$Resource$Tasks$List,
1247
1930
  options?: MethodOptions
1248
- ): GaxiosPromise<Schema$Tasks>;
1931
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Tasks>>;
1249
1932
  list(
1250
1933
  params: Params$Resource$Tasks$List,
1251
1934
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1274,7 +1957,10 @@ export namespace tasks_v1 {
1274
1957
  callback?:
1275
1958
  | BodyResponseCallback<Schema$Tasks>
1276
1959
  | BodyResponseCallback<Readable>
1277
- ): void | GaxiosPromise<Schema$Tasks> | GaxiosPromise<Readable> {
1960
+ ):
1961
+ | void
1962
+ | Promise<GaxiosResponseWithHTTP2<Schema$Tasks>>
1963
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1278
1964
  let params = (paramsOrCallback || {}) as Params$Resource$Tasks$List;
1279
1965
  let options = (optionsOrCallback || {}) as MethodOptions;
1280
1966
 
@@ -1319,6 +2005,76 @@ export namespace tasks_v1 {
1319
2005
 
1320
2006
  /**
1321
2007
  * Moves the specified task to another position in the destination task list. If the destination list is not specified, the task is moved within its current list. This can include putting it as a child task under a new parent and/or move it to a different position among its sibling tasks. A user can have up to 2,000 subtasks per task.
2008
+ * @example
2009
+ * ```js
2010
+ * // Before running the sample:
2011
+ * // - Enable the API at:
2012
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
2013
+ * // - Login into gcloud by running:
2014
+ * // ```sh
2015
+ * // $ gcloud auth application-default login
2016
+ * // ```
2017
+ * // - Install the npm module by running:
2018
+ * // ```sh
2019
+ * // $ npm install googleapis
2020
+ * // ```
2021
+ *
2022
+ * const {google} = require('googleapis');
2023
+ * const tasks = google.tasks('v1');
2024
+ *
2025
+ * async function main() {
2026
+ * const auth = new google.auth.GoogleAuth({
2027
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2028
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
2029
+ * });
2030
+ *
2031
+ * // Acquire an auth client, and bind it to all future calls
2032
+ * const authClient = await auth.getClient();
2033
+ * google.options({auth: authClient});
2034
+ *
2035
+ * // Do the magic
2036
+ * const res = await tasks.tasks.move({
2037
+ * // Optional. Destination task list identifier. If set, the task is moved from tasklist to the destinationTasklist list. Otherwise the task is moved within its current list. Recurrent tasks cannot currently be moved between lists.
2038
+ * destinationTasklist: 'placeholder-value',
2039
+ * // Optional. New parent task identifier. If the task is moved to the top level, this parameter is omitted. The task set as parent must exist in the task list and can not be hidden. Exceptions: 1. Assigned and repeating tasks cannot be set as parent tasks (have subtasks), or be moved under a parent task (become subtasks). 2. Tasks that are both completed and hidden cannot be nested, so the parent field must be empty.
2040
+ * parent: 'placeholder-value',
2041
+ * // Optional. New previous sibling task identifier. If the task is moved to the first position among its siblings, this parameter is omitted. The task set as previous must exist in the task list and can not be hidden. Exceptions: 1. Tasks that are both completed and hidden can only be moved to position 0, so the previous field must be empty.
2042
+ * previous: 'placeholder-value',
2043
+ * // Task identifier.
2044
+ * task: 'placeholder-value',
2045
+ * // Task list identifier.
2046
+ * tasklist: 'placeholder-value',
2047
+ * });
2048
+ * console.log(res.data);
2049
+ *
2050
+ * // Example response
2051
+ * // {
2052
+ * // "assignmentInfo": {},
2053
+ * // "completed": "my_completed",
2054
+ * // "deleted": false,
2055
+ * // "due": "my_due",
2056
+ * // "etag": "my_etag",
2057
+ * // "hidden": false,
2058
+ * // "id": "my_id",
2059
+ * // "kind": "my_kind",
2060
+ * // "links": [],
2061
+ * // "notes": "my_notes",
2062
+ * // "parent": "my_parent",
2063
+ * // "position": "my_position",
2064
+ * // "selfLink": "my_selfLink",
2065
+ * // "status": "my_status",
2066
+ * // "title": "my_title",
2067
+ * // "updated": "my_updated",
2068
+ * // "webViewLink": "my_webViewLink"
2069
+ * // }
2070
+ * }
2071
+ *
2072
+ * main().catch(e => {
2073
+ * console.error(e);
2074
+ * throw e;
2075
+ * });
2076
+ *
2077
+ * ```
1322
2078
  *
1323
2079
  * @param params - Parameters for request
1324
2080
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1328,11 +2084,11 @@ export namespace tasks_v1 {
1328
2084
  move(
1329
2085
  params: Params$Resource$Tasks$Move,
1330
2086
  options: StreamMethodOptions
1331
- ): GaxiosPromise<Readable>;
2087
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1332
2088
  move(
1333
2089
  params?: Params$Resource$Tasks$Move,
1334
2090
  options?: MethodOptions
1335
- ): GaxiosPromise<Schema$Task>;
2091
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Task>>;
1336
2092
  move(
1337
2093
  params: Params$Resource$Tasks$Move,
1338
2094
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1361,7 +2117,10 @@ export namespace tasks_v1 {
1361
2117
  callback?:
1362
2118
  | BodyResponseCallback<Schema$Task>
1363
2119
  | BodyResponseCallback<Readable>
1364
- ): void | GaxiosPromise<Schema$Task> | GaxiosPromise<Readable> {
2120
+ ):
2121
+ | void
2122
+ | Promise<GaxiosResponseWithHTTP2<Schema$Task>>
2123
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1365
2124
  let params = (paramsOrCallback || {}) as Params$Resource$Tasks$Move;
1366
2125
  let options = (optionsOrCallback || {}) as MethodOptions;
1367
2126
 
@@ -1405,6 +2164,94 @@ export namespace tasks_v1 {
1405
2164
 
1406
2165
  /**
1407
2166
  * Updates the specified task. This method supports patch semantics.
2167
+ * @example
2168
+ * ```js
2169
+ * // Before running the sample:
2170
+ * // - Enable the API at:
2171
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
2172
+ * // - Login into gcloud by running:
2173
+ * // ```sh
2174
+ * // $ gcloud auth application-default login
2175
+ * // ```
2176
+ * // - Install the npm module by running:
2177
+ * // ```sh
2178
+ * // $ npm install googleapis
2179
+ * // ```
2180
+ *
2181
+ * const {google} = require('googleapis');
2182
+ * const tasks = google.tasks('v1');
2183
+ *
2184
+ * async function main() {
2185
+ * const auth = new google.auth.GoogleAuth({
2186
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2187
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
2188
+ * });
2189
+ *
2190
+ * // Acquire an auth client, and bind it to all future calls
2191
+ * const authClient = await auth.getClient();
2192
+ * google.options({auth: authClient});
2193
+ *
2194
+ * // Do the magic
2195
+ * const res = await tasks.tasks.patch({
2196
+ * // Task identifier.
2197
+ * task: 'placeholder-value',
2198
+ * // Task list identifier.
2199
+ * tasklist: 'placeholder-value',
2200
+ *
2201
+ * // Request body metadata
2202
+ * requestBody: {
2203
+ * // request body parameters
2204
+ * // {
2205
+ * // "assignmentInfo": {},
2206
+ * // "completed": "my_completed",
2207
+ * // "deleted": false,
2208
+ * // "due": "my_due",
2209
+ * // "etag": "my_etag",
2210
+ * // "hidden": false,
2211
+ * // "id": "my_id",
2212
+ * // "kind": "my_kind",
2213
+ * // "links": [],
2214
+ * // "notes": "my_notes",
2215
+ * // "parent": "my_parent",
2216
+ * // "position": "my_position",
2217
+ * // "selfLink": "my_selfLink",
2218
+ * // "status": "my_status",
2219
+ * // "title": "my_title",
2220
+ * // "updated": "my_updated",
2221
+ * // "webViewLink": "my_webViewLink"
2222
+ * // }
2223
+ * },
2224
+ * });
2225
+ * console.log(res.data);
2226
+ *
2227
+ * // Example response
2228
+ * // {
2229
+ * // "assignmentInfo": {},
2230
+ * // "completed": "my_completed",
2231
+ * // "deleted": false,
2232
+ * // "due": "my_due",
2233
+ * // "etag": "my_etag",
2234
+ * // "hidden": false,
2235
+ * // "id": "my_id",
2236
+ * // "kind": "my_kind",
2237
+ * // "links": [],
2238
+ * // "notes": "my_notes",
2239
+ * // "parent": "my_parent",
2240
+ * // "position": "my_position",
2241
+ * // "selfLink": "my_selfLink",
2242
+ * // "status": "my_status",
2243
+ * // "title": "my_title",
2244
+ * // "updated": "my_updated",
2245
+ * // "webViewLink": "my_webViewLink"
2246
+ * // }
2247
+ * }
2248
+ *
2249
+ * main().catch(e => {
2250
+ * console.error(e);
2251
+ * throw e;
2252
+ * });
2253
+ *
2254
+ * ```
1408
2255
  *
1409
2256
  * @param params - Parameters for request
1410
2257
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1414,11 +2261,11 @@ export namespace tasks_v1 {
1414
2261
  patch(
1415
2262
  params: Params$Resource$Tasks$Patch,
1416
2263
  options: StreamMethodOptions
1417
- ): GaxiosPromise<Readable>;
2264
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1418
2265
  patch(
1419
2266
  params?: Params$Resource$Tasks$Patch,
1420
2267
  options?: MethodOptions
1421
- ): GaxiosPromise<Schema$Task>;
2268
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Task>>;
1422
2269
  patch(
1423
2270
  params: Params$Resource$Tasks$Patch,
1424
2271
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1447,7 +2294,10 @@ export namespace tasks_v1 {
1447
2294
  callback?:
1448
2295
  | BodyResponseCallback<Schema$Task>
1449
2296
  | BodyResponseCallback<Readable>
1450
- ): void | GaxiosPromise<Schema$Task> | GaxiosPromise<Readable> {
2297
+ ):
2298
+ | void
2299
+ | Promise<GaxiosResponseWithHTTP2<Schema$Task>>
2300
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1451
2301
  let params = (paramsOrCallback || {}) as Params$Resource$Tasks$Patch;
1452
2302
  let options = (optionsOrCallback || {}) as MethodOptions;
1453
2303
 
@@ -1492,6 +2342,94 @@ export namespace tasks_v1 {
1492
2342
 
1493
2343
  /**
1494
2344
  * Updates the specified task.
2345
+ * @example
2346
+ * ```js
2347
+ * // Before running the sample:
2348
+ * // - Enable the API at:
2349
+ * // https://console.developers.google.com/apis/api/tasks.googleapis.com
2350
+ * // - Login into gcloud by running:
2351
+ * // ```sh
2352
+ * // $ gcloud auth application-default login
2353
+ * // ```
2354
+ * // - Install the npm module by running:
2355
+ * // ```sh
2356
+ * // $ npm install googleapis
2357
+ * // ```
2358
+ *
2359
+ * const {google} = require('googleapis');
2360
+ * const tasks = google.tasks('v1');
2361
+ *
2362
+ * async function main() {
2363
+ * const auth = new google.auth.GoogleAuth({
2364
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2365
+ * scopes: ['https://www.googleapis.com/auth/tasks'],
2366
+ * });
2367
+ *
2368
+ * // Acquire an auth client, and bind it to all future calls
2369
+ * const authClient = await auth.getClient();
2370
+ * google.options({auth: authClient});
2371
+ *
2372
+ * // Do the magic
2373
+ * const res = await tasks.tasks.update({
2374
+ * // Task identifier.
2375
+ * task: 'placeholder-value',
2376
+ * // Task list identifier.
2377
+ * tasklist: 'placeholder-value',
2378
+ *
2379
+ * // Request body metadata
2380
+ * requestBody: {
2381
+ * // request body parameters
2382
+ * // {
2383
+ * // "assignmentInfo": {},
2384
+ * // "completed": "my_completed",
2385
+ * // "deleted": false,
2386
+ * // "due": "my_due",
2387
+ * // "etag": "my_etag",
2388
+ * // "hidden": false,
2389
+ * // "id": "my_id",
2390
+ * // "kind": "my_kind",
2391
+ * // "links": [],
2392
+ * // "notes": "my_notes",
2393
+ * // "parent": "my_parent",
2394
+ * // "position": "my_position",
2395
+ * // "selfLink": "my_selfLink",
2396
+ * // "status": "my_status",
2397
+ * // "title": "my_title",
2398
+ * // "updated": "my_updated",
2399
+ * // "webViewLink": "my_webViewLink"
2400
+ * // }
2401
+ * },
2402
+ * });
2403
+ * console.log(res.data);
2404
+ *
2405
+ * // Example response
2406
+ * // {
2407
+ * // "assignmentInfo": {},
2408
+ * // "completed": "my_completed",
2409
+ * // "deleted": false,
2410
+ * // "due": "my_due",
2411
+ * // "etag": "my_etag",
2412
+ * // "hidden": false,
2413
+ * // "id": "my_id",
2414
+ * // "kind": "my_kind",
2415
+ * // "links": [],
2416
+ * // "notes": "my_notes",
2417
+ * // "parent": "my_parent",
2418
+ * // "position": "my_position",
2419
+ * // "selfLink": "my_selfLink",
2420
+ * // "status": "my_status",
2421
+ * // "title": "my_title",
2422
+ * // "updated": "my_updated",
2423
+ * // "webViewLink": "my_webViewLink"
2424
+ * // }
2425
+ * }
2426
+ *
2427
+ * main().catch(e => {
2428
+ * console.error(e);
2429
+ * throw e;
2430
+ * });
2431
+ *
2432
+ * ```
1495
2433
  *
1496
2434
  * @param params - Parameters for request
1497
2435
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1501,11 +2439,11 @@ export namespace tasks_v1 {
1501
2439
  update(
1502
2440
  params: Params$Resource$Tasks$Update,
1503
2441
  options: StreamMethodOptions
1504
- ): GaxiosPromise<Readable>;
2442
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1505
2443
  update(
1506
2444
  params?: Params$Resource$Tasks$Update,
1507
2445
  options?: MethodOptions
1508
- ): GaxiosPromise<Schema$Task>;
2446
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Task>>;
1509
2447
  update(
1510
2448
  params: Params$Resource$Tasks$Update,
1511
2449
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1534,7 +2472,10 @@ export namespace tasks_v1 {
1534
2472
  callback?:
1535
2473
  | BodyResponseCallback<Schema$Task>
1536
2474
  | BodyResponseCallback<Readable>
1537
- ): void | GaxiosPromise<Schema$Task> | GaxiosPromise<Readable> {
2475
+ ):
2476
+ | void
2477
+ | Promise<GaxiosResponseWithHTTP2<Schema$Task>>
2478
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1538
2479
  let params = (paramsOrCallback || {}) as Params$Resource$Tasks$Update;
1539
2480
  let options = (optionsOrCallback || {}) as MethodOptions;
1540
2481
 
@@ -1679,7 +2620,7 @@ export namespace tasks_v1 {
1679
2620
  */
1680
2621
  destinationTasklist?: string;
1681
2622
  /**
1682
- * Optional. New parent task identifier. If the task is moved to the top level, this parameter is omitted. The task set as parent must exist in the task list and can not be hidden. Exceptions: 1. Assigned tasks can not be set as parent task (have subtasks) or be moved under a parent task (become subtasks). 2. Tasks that are both completed and hidden cannot be nested, so the parent field must be empty.
2623
+ * Optional. New parent task identifier. If the task is moved to the top level, this parameter is omitted. The task set as parent must exist in the task list and can not be hidden. Exceptions: 1. Assigned and repeating tasks cannot be set as parent tasks (have subtasks), or be moved under a parent task (become subtasks). 2. Tasks that are both completed and hidden cannot be nested, so the parent field must be empty.
1683
2624
  */
1684
2625
  parent?: string;
1685
2626
  /**