@maxim_mazurok/gapi.client.forms-v1 0.0.20220808

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/tests.ts ADDED
@@ -0,0 +1,1053 @@
1
+ /* This is stub file for gapi.client.forms-v1 definition tests */
2
+ // IMPORTANT
3
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
+
6
+ // Revision: 20220808
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://forms.googleapis.com/$discovery/rest?version=v1');
12
+ /** now we can use gapi.client.forms */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** See, edit, create, and delete all of your Google Drive files */
19
+ 'https://www.googleapis.com/auth/drive',
20
+ /** See, edit, create, and delete only the specific Google Drive files you use with this app */
21
+ 'https://www.googleapis.com/auth/drive.file',
22
+ /** See and download all your Google Drive files */
23
+ 'https://www.googleapis.com/auth/drive.readonly',
24
+ /** See, edit, create, and delete all your Google Forms forms */
25
+ 'https://www.googleapis.com/auth/forms.body',
26
+ /** See all your Google Forms forms */
27
+ 'https://www.googleapis.com/auth/forms.body.readonly',
28
+ /** See all responses to your Google Forms forms */
29
+ 'https://www.googleapis.com/auth/forms.responses.readonly',
30
+ ];
31
+ const immediate = false;
32
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
33
+ if (authResult && !authResult.error) {
34
+ /** handle successful authorization */
35
+ run();
36
+ } else {
37
+ /** handle authorization error */
38
+ }
39
+ });
40
+
41
+ async function run() {
42
+ /** Change the form with a batch of updates. */
43
+ await gapi.client.forms.forms.batchUpdate({
44
+ formId: "Test string",
45
+ }, {
46
+ includeFormInResponse: true,
47
+ requests: [
48
+ {
49
+ createItem: {
50
+ item: {
51
+ description: "Test string",
52
+ imageItem: {
53
+ image: {
54
+ altText: "Test string",
55
+ contentUri: "Test string",
56
+ properties: {
57
+ alignment: "Test string",
58
+ width: 42,
59
+ },
60
+ sourceUri: "Test string",
61
+ },
62
+ },
63
+ itemId: "Test string",
64
+ pageBreakItem: {
65
+ },
66
+ questionGroupItem: {
67
+ grid: {
68
+ columns: {
69
+ options: [
70
+ {
71
+ goToAction: "Test string",
72
+ goToSectionId: "Test string",
73
+ image: {
74
+ altText: "Test string",
75
+ contentUri: "Test string",
76
+ properties: {
77
+ alignment: "Test string",
78
+ width: 42,
79
+ },
80
+ sourceUri: "Test string",
81
+ },
82
+ isOther: true,
83
+ value: "Test string",
84
+ }
85
+ ],
86
+ shuffle: true,
87
+ type: "Test string",
88
+ },
89
+ shuffleQuestions: true,
90
+ },
91
+ image: {
92
+ altText: "Test string",
93
+ contentUri: "Test string",
94
+ properties: {
95
+ alignment: "Test string",
96
+ width: 42,
97
+ },
98
+ sourceUri: "Test string",
99
+ },
100
+ questions: [
101
+ {
102
+ choiceQuestion: {
103
+ options: [
104
+ {
105
+ goToAction: "Test string",
106
+ goToSectionId: "Test string",
107
+ image: {
108
+ altText: "Test string",
109
+ contentUri: "Test string",
110
+ properties: {
111
+ alignment: "Test string",
112
+ width: 42,
113
+ },
114
+ sourceUri: "Test string",
115
+ },
116
+ isOther: true,
117
+ value: "Test string",
118
+ }
119
+ ],
120
+ shuffle: true,
121
+ type: "Test string",
122
+ },
123
+ dateQuestion: {
124
+ includeTime: true,
125
+ includeYear: true,
126
+ },
127
+ fileUploadQuestion: {
128
+ folderId: "Test string",
129
+ maxFiles: 42,
130
+ maxFileSize: "Test string",
131
+ types: [
132
+ "Test string"
133
+ ],
134
+ },
135
+ grading: {
136
+ correctAnswers: {
137
+ answers: [
138
+ {
139
+ value: "Test string",
140
+ }
141
+ ],
142
+ },
143
+ generalFeedback: {
144
+ material: [
145
+ {
146
+ link: {
147
+ displayText: "Test string",
148
+ uri: "Test string",
149
+ },
150
+ video: {
151
+ displayText: "Test string",
152
+ youtubeUri: "Test string",
153
+ },
154
+ }
155
+ ],
156
+ text: "Test string",
157
+ },
158
+ pointValue: 42,
159
+ whenRight: {
160
+ material: [
161
+ {
162
+ link: {
163
+ displayText: "Test string",
164
+ uri: "Test string",
165
+ },
166
+ video: {
167
+ displayText: "Test string",
168
+ youtubeUri: "Test string",
169
+ },
170
+ }
171
+ ],
172
+ text: "Test string",
173
+ },
174
+ whenWrong: {
175
+ material: [
176
+ {
177
+ link: {
178
+ displayText: "Test string",
179
+ uri: "Test string",
180
+ },
181
+ video: {
182
+ displayText: "Test string",
183
+ youtubeUri: "Test string",
184
+ },
185
+ }
186
+ ],
187
+ text: "Test string",
188
+ },
189
+ },
190
+ questionId: "Test string",
191
+ required: true,
192
+ rowQuestion: {
193
+ title: "Test string",
194
+ },
195
+ scaleQuestion: {
196
+ high: 42,
197
+ highLabel: "Test string",
198
+ low: 42,
199
+ lowLabel: "Test string",
200
+ },
201
+ textQuestion: {
202
+ paragraph: true,
203
+ },
204
+ timeQuestion: {
205
+ duration: true,
206
+ },
207
+ }
208
+ ],
209
+ },
210
+ questionItem: {
211
+ image: {
212
+ altText: "Test string",
213
+ contentUri: "Test string",
214
+ properties: {
215
+ alignment: "Test string",
216
+ width: 42,
217
+ },
218
+ sourceUri: "Test string",
219
+ },
220
+ question: {
221
+ choiceQuestion: {
222
+ options: [
223
+ {
224
+ goToAction: "Test string",
225
+ goToSectionId: "Test string",
226
+ image: {
227
+ altText: "Test string",
228
+ contentUri: "Test string",
229
+ properties: {
230
+ alignment: "Test string",
231
+ width: 42,
232
+ },
233
+ sourceUri: "Test string",
234
+ },
235
+ isOther: true,
236
+ value: "Test string",
237
+ }
238
+ ],
239
+ shuffle: true,
240
+ type: "Test string",
241
+ },
242
+ dateQuestion: {
243
+ includeTime: true,
244
+ includeYear: true,
245
+ },
246
+ fileUploadQuestion: {
247
+ folderId: "Test string",
248
+ maxFiles: 42,
249
+ maxFileSize: "Test string",
250
+ types: [
251
+ "Test string"
252
+ ],
253
+ },
254
+ grading: {
255
+ correctAnswers: {
256
+ answers: [
257
+ {
258
+ value: "Test string",
259
+ }
260
+ ],
261
+ },
262
+ generalFeedback: {
263
+ material: [
264
+ {
265
+ link: {
266
+ displayText: "Test string",
267
+ uri: "Test string",
268
+ },
269
+ video: {
270
+ displayText: "Test string",
271
+ youtubeUri: "Test string",
272
+ },
273
+ }
274
+ ],
275
+ text: "Test string",
276
+ },
277
+ pointValue: 42,
278
+ whenRight: {
279
+ material: [
280
+ {
281
+ link: {
282
+ displayText: "Test string",
283
+ uri: "Test string",
284
+ },
285
+ video: {
286
+ displayText: "Test string",
287
+ youtubeUri: "Test string",
288
+ },
289
+ }
290
+ ],
291
+ text: "Test string",
292
+ },
293
+ whenWrong: {
294
+ material: [
295
+ {
296
+ link: {
297
+ displayText: "Test string",
298
+ uri: "Test string",
299
+ },
300
+ video: {
301
+ displayText: "Test string",
302
+ youtubeUri: "Test string",
303
+ },
304
+ }
305
+ ],
306
+ text: "Test string",
307
+ },
308
+ },
309
+ questionId: "Test string",
310
+ required: true,
311
+ rowQuestion: {
312
+ title: "Test string",
313
+ },
314
+ scaleQuestion: {
315
+ high: 42,
316
+ highLabel: "Test string",
317
+ low: 42,
318
+ lowLabel: "Test string",
319
+ },
320
+ textQuestion: {
321
+ paragraph: true,
322
+ },
323
+ timeQuestion: {
324
+ duration: true,
325
+ },
326
+ },
327
+ },
328
+ textItem: {
329
+ },
330
+ title: "Test string",
331
+ videoItem: {
332
+ caption: "Test string",
333
+ video: {
334
+ properties: {
335
+ alignment: "Test string",
336
+ width: 42,
337
+ },
338
+ youtubeUri: "Test string",
339
+ },
340
+ },
341
+ },
342
+ location: {
343
+ index: 42,
344
+ },
345
+ },
346
+ deleteItem: {
347
+ location: {
348
+ index: 42,
349
+ },
350
+ },
351
+ moveItem: {
352
+ newLocation: {
353
+ index: 42,
354
+ },
355
+ originalLocation: {
356
+ index: 42,
357
+ },
358
+ },
359
+ updateFormInfo: {
360
+ info: {
361
+ description: "Test string",
362
+ documentTitle: "Test string",
363
+ title: "Test string",
364
+ },
365
+ updateMask: "Test string",
366
+ },
367
+ updateItem: {
368
+ item: {
369
+ description: "Test string",
370
+ imageItem: {
371
+ image: {
372
+ altText: "Test string",
373
+ contentUri: "Test string",
374
+ properties: {
375
+ alignment: "Test string",
376
+ width: 42,
377
+ },
378
+ sourceUri: "Test string",
379
+ },
380
+ },
381
+ itemId: "Test string",
382
+ pageBreakItem: {
383
+ },
384
+ questionGroupItem: {
385
+ grid: {
386
+ columns: {
387
+ options: [
388
+ {
389
+ goToAction: "Test string",
390
+ goToSectionId: "Test string",
391
+ image: {
392
+ altText: "Test string",
393
+ contentUri: "Test string",
394
+ properties: {
395
+ alignment: "Test string",
396
+ width: 42,
397
+ },
398
+ sourceUri: "Test string",
399
+ },
400
+ isOther: true,
401
+ value: "Test string",
402
+ }
403
+ ],
404
+ shuffle: true,
405
+ type: "Test string",
406
+ },
407
+ shuffleQuestions: true,
408
+ },
409
+ image: {
410
+ altText: "Test string",
411
+ contentUri: "Test string",
412
+ properties: {
413
+ alignment: "Test string",
414
+ width: 42,
415
+ },
416
+ sourceUri: "Test string",
417
+ },
418
+ questions: [
419
+ {
420
+ choiceQuestion: {
421
+ options: [
422
+ {
423
+ goToAction: "Test string",
424
+ goToSectionId: "Test string",
425
+ image: {
426
+ altText: "Test string",
427
+ contentUri: "Test string",
428
+ properties: {
429
+ alignment: "Test string",
430
+ width: 42,
431
+ },
432
+ sourceUri: "Test string",
433
+ },
434
+ isOther: true,
435
+ value: "Test string",
436
+ }
437
+ ],
438
+ shuffle: true,
439
+ type: "Test string",
440
+ },
441
+ dateQuestion: {
442
+ includeTime: true,
443
+ includeYear: true,
444
+ },
445
+ fileUploadQuestion: {
446
+ folderId: "Test string",
447
+ maxFiles: 42,
448
+ maxFileSize: "Test string",
449
+ types: [
450
+ "Test string"
451
+ ],
452
+ },
453
+ grading: {
454
+ correctAnswers: {
455
+ answers: [
456
+ {
457
+ value: "Test string",
458
+ }
459
+ ],
460
+ },
461
+ generalFeedback: {
462
+ material: [
463
+ {
464
+ link: {
465
+ displayText: "Test string",
466
+ uri: "Test string",
467
+ },
468
+ video: {
469
+ displayText: "Test string",
470
+ youtubeUri: "Test string",
471
+ },
472
+ }
473
+ ],
474
+ text: "Test string",
475
+ },
476
+ pointValue: 42,
477
+ whenRight: {
478
+ material: [
479
+ {
480
+ link: {
481
+ displayText: "Test string",
482
+ uri: "Test string",
483
+ },
484
+ video: {
485
+ displayText: "Test string",
486
+ youtubeUri: "Test string",
487
+ },
488
+ }
489
+ ],
490
+ text: "Test string",
491
+ },
492
+ whenWrong: {
493
+ material: [
494
+ {
495
+ link: {
496
+ displayText: "Test string",
497
+ uri: "Test string",
498
+ },
499
+ video: {
500
+ displayText: "Test string",
501
+ youtubeUri: "Test string",
502
+ },
503
+ }
504
+ ],
505
+ text: "Test string",
506
+ },
507
+ },
508
+ questionId: "Test string",
509
+ required: true,
510
+ rowQuestion: {
511
+ title: "Test string",
512
+ },
513
+ scaleQuestion: {
514
+ high: 42,
515
+ highLabel: "Test string",
516
+ low: 42,
517
+ lowLabel: "Test string",
518
+ },
519
+ textQuestion: {
520
+ paragraph: true,
521
+ },
522
+ timeQuestion: {
523
+ duration: true,
524
+ },
525
+ }
526
+ ],
527
+ },
528
+ questionItem: {
529
+ image: {
530
+ altText: "Test string",
531
+ contentUri: "Test string",
532
+ properties: {
533
+ alignment: "Test string",
534
+ width: 42,
535
+ },
536
+ sourceUri: "Test string",
537
+ },
538
+ question: {
539
+ choiceQuestion: {
540
+ options: [
541
+ {
542
+ goToAction: "Test string",
543
+ goToSectionId: "Test string",
544
+ image: {
545
+ altText: "Test string",
546
+ contentUri: "Test string",
547
+ properties: {
548
+ alignment: "Test string",
549
+ width: 42,
550
+ },
551
+ sourceUri: "Test string",
552
+ },
553
+ isOther: true,
554
+ value: "Test string",
555
+ }
556
+ ],
557
+ shuffle: true,
558
+ type: "Test string",
559
+ },
560
+ dateQuestion: {
561
+ includeTime: true,
562
+ includeYear: true,
563
+ },
564
+ fileUploadQuestion: {
565
+ folderId: "Test string",
566
+ maxFiles: 42,
567
+ maxFileSize: "Test string",
568
+ types: [
569
+ "Test string"
570
+ ],
571
+ },
572
+ grading: {
573
+ correctAnswers: {
574
+ answers: [
575
+ {
576
+ value: "Test string",
577
+ }
578
+ ],
579
+ },
580
+ generalFeedback: {
581
+ material: [
582
+ {
583
+ link: {
584
+ displayText: "Test string",
585
+ uri: "Test string",
586
+ },
587
+ video: {
588
+ displayText: "Test string",
589
+ youtubeUri: "Test string",
590
+ },
591
+ }
592
+ ],
593
+ text: "Test string",
594
+ },
595
+ pointValue: 42,
596
+ whenRight: {
597
+ material: [
598
+ {
599
+ link: {
600
+ displayText: "Test string",
601
+ uri: "Test string",
602
+ },
603
+ video: {
604
+ displayText: "Test string",
605
+ youtubeUri: "Test string",
606
+ },
607
+ }
608
+ ],
609
+ text: "Test string",
610
+ },
611
+ whenWrong: {
612
+ material: [
613
+ {
614
+ link: {
615
+ displayText: "Test string",
616
+ uri: "Test string",
617
+ },
618
+ video: {
619
+ displayText: "Test string",
620
+ youtubeUri: "Test string",
621
+ },
622
+ }
623
+ ],
624
+ text: "Test string",
625
+ },
626
+ },
627
+ questionId: "Test string",
628
+ required: true,
629
+ rowQuestion: {
630
+ title: "Test string",
631
+ },
632
+ scaleQuestion: {
633
+ high: 42,
634
+ highLabel: "Test string",
635
+ low: 42,
636
+ lowLabel: "Test string",
637
+ },
638
+ textQuestion: {
639
+ paragraph: true,
640
+ },
641
+ timeQuestion: {
642
+ duration: true,
643
+ },
644
+ },
645
+ },
646
+ textItem: {
647
+ },
648
+ title: "Test string",
649
+ videoItem: {
650
+ caption: "Test string",
651
+ video: {
652
+ properties: {
653
+ alignment: "Test string",
654
+ width: 42,
655
+ },
656
+ youtubeUri: "Test string",
657
+ },
658
+ },
659
+ },
660
+ location: {
661
+ index: 42,
662
+ },
663
+ updateMask: "Test string",
664
+ },
665
+ updateSettings: {
666
+ settings: {
667
+ quizSettings: {
668
+ isQuiz: true,
669
+ },
670
+ },
671
+ updateMask: "Test string",
672
+ },
673
+ }
674
+ ],
675
+ writeControl: {
676
+ requiredRevisionId: "Test string",
677
+ targetRevisionId: "Test string",
678
+ },
679
+ });
680
+ /**
681
+ * Create a new form using the title given in the provided form message in the request. *Important:* Only the form.info.title and form.info.document_title fields are copied to the new
682
+ * form. All other fields including the form description, items and settings are disallowed. To create a new form and add items, you must first call forms.create to create an empty form
683
+ * with a title and (optional) document title, and then call forms.update to add the items.
684
+ */
685
+ await gapi.client.forms.forms.create({
686
+ }, {
687
+ formId: "Test string",
688
+ info: {
689
+ description: "Test string",
690
+ documentTitle: "Test string",
691
+ title: "Test string",
692
+ },
693
+ items: [
694
+ {
695
+ description: "Test string",
696
+ imageItem: {
697
+ image: {
698
+ altText: "Test string",
699
+ contentUri: "Test string",
700
+ properties: {
701
+ alignment: "Test string",
702
+ width: 42,
703
+ },
704
+ sourceUri: "Test string",
705
+ },
706
+ },
707
+ itemId: "Test string",
708
+ pageBreakItem: {
709
+ },
710
+ questionGroupItem: {
711
+ grid: {
712
+ columns: {
713
+ options: [
714
+ {
715
+ goToAction: "Test string",
716
+ goToSectionId: "Test string",
717
+ image: {
718
+ altText: "Test string",
719
+ contentUri: "Test string",
720
+ properties: {
721
+ alignment: "Test string",
722
+ width: 42,
723
+ },
724
+ sourceUri: "Test string",
725
+ },
726
+ isOther: true,
727
+ value: "Test string",
728
+ }
729
+ ],
730
+ shuffle: true,
731
+ type: "Test string",
732
+ },
733
+ shuffleQuestions: true,
734
+ },
735
+ image: {
736
+ altText: "Test string",
737
+ contentUri: "Test string",
738
+ properties: {
739
+ alignment: "Test string",
740
+ width: 42,
741
+ },
742
+ sourceUri: "Test string",
743
+ },
744
+ questions: [
745
+ {
746
+ choiceQuestion: {
747
+ options: [
748
+ {
749
+ goToAction: "Test string",
750
+ goToSectionId: "Test string",
751
+ image: {
752
+ altText: "Test string",
753
+ contentUri: "Test string",
754
+ properties: {
755
+ alignment: "Test string",
756
+ width: 42,
757
+ },
758
+ sourceUri: "Test string",
759
+ },
760
+ isOther: true,
761
+ value: "Test string",
762
+ }
763
+ ],
764
+ shuffle: true,
765
+ type: "Test string",
766
+ },
767
+ dateQuestion: {
768
+ includeTime: true,
769
+ includeYear: true,
770
+ },
771
+ fileUploadQuestion: {
772
+ folderId: "Test string",
773
+ maxFiles: 42,
774
+ maxFileSize: "Test string",
775
+ types: [
776
+ "Test string"
777
+ ],
778
+ },
779
+ grading: {
780
+ correctAnswers: {
781
+ answers: [
782
+ {
783
+ value: "Test string",
784
+ }
785
+ ],
786
+ },
787
+ generalFeedback: {
788
+ material: [
789
+ {
790
+ link: {
791
+ displayText: "Test string",
792
+ uri: "Test string",
793
+ },
794
+ video: {
795
+ displayText: "Test string",
796
+ youtubeUri: "Test string",
797
+ },
798
+ }
799
+ ],
800
+ text: "Test string",
801
+ },
802
+ pointValue: 42,
803
+ whenRight: {
804
+ material: [
805
+ {
806
+ link: {
807
+ displayText: "Test string",
808
+ uri: "Test string",
809
+ },
810
+ video: {
811
+ displayText: "Test string",
812
+ youtubeUri: "Test string",
813
+ },
814
+ }
815
+ ],
816
+ text: "Test string",
817
+ },
818
+ whenWrong: {
819
+ material: [
820
+ {
821
+ link: {
822
+ displayText: "Test string",
823
+ uri: "Test string",
824
+ },
825
+ video: {
826
+ displayText: "Test string",
827
+ youtubeUri: "Test string",
828
+ },
829
+ }
830
+ ],
831
+ text: "Test string",
832
+ },
833
+ },
834
+ questionId: "Test string",
835
+ required: true,
836
+ rowQuestion: {
837
+ title: "Test string",
838
+ },
839
+ scaleQuestion: {
840
+ high: 42,
841
+ highLabel: "Test string",
842
+ low: 42,
843
+ lowLabel: "Test string",
844
+ },
845
+ textQuestion: {
846
+ paragraph: true,
847
+ },
848
+ timeQuestion: {
849
+ duration: true,
850
+ },
851
+ }
852
+ ],
853
+ },
854
+ questionItem: {
855
+ image: {
856
+ altText: "Test string",
857
+ contentUri: "Test string",
858
+ properties: {
859
+ alignment: "Test string",
860
+ width: 42,
861
+ },
862
+ sourceUri: "Test string",
863
+ },
864
+ question: {
865
+ choiceQuestion: {
866
+ options: [
867
+ {
868
+ goToAction: "Test string",
869
+ goToSectionId: "Test string",
870
+ image: {
871
+ altText: "Test string",
872
+ contentUri: "Test string",
873
+ properties: {
874
+ alignment: "Test string",
875
+ width: 42,
876
+ },
877
+ sourceUri: "Test string",
878
+ },
879
+ isOther: true,
880
+ value: "Test string",
881
+ }
882
+ ],
883
+ shuffle: true,
884
+ type: "Test string",
885
+ },
886
+ dateQuestion: {
887
+ includeTime: true,
888
+ includeYear: true,
889
+ },
890
+ fileUploadQuestion: {
891
+ folderId: "Test string",
892
+ maxFiles: 42,
893
+ maxFileSize: "Test string",
894
+ types: [
895
+ "Test string"
896
+ ],
897
+ },
898
+ grading: {
899
+ correctAnswers: {
900
+ answers: [
901
+ {
902
+ value: "Test string",
903
+ }
904
+ ],
905
+ },
906
+ generalFeedback: {
907
+ material: [
908
+ {
909
+ link: {
910
+ displayText: "Test string",
911
+ uri: "Test string",
912
+ },
913
+ video: {
914
+ displayText: "Test string",
915
+ youtubeUri: "Test string",
916
+ },
917
+ }
918
+ ],
919
+ text: "Test string",
920
+ },
921
+ pointValue: 42,
922
+ whenRight: {
923
+ material: [
924
+ {
925
+ link: {
926
+ displayText: "Test string",
927
+ uri: "Test string",
928
+ },
929
+ video: {
930
+ displayText: "Test string",
931
+ youtubeUri: "Test string",
932
+ },
933
+ }
934
+ ],
935
+ text: "Test string",
936
+ },
937
+ whenWrong: {
938
+ material: [
939
+ {
940
+ link: {
941
+ displayText: "Test string",
942
+ uri: "Test string",
943
+ },
944
+ video: {
945
+ displayText: "Test string",
946
+ youtubeUri: "Test string",
947
+ },
948
+ }
949
+ ],
950
+ text: "Test string",
951
+ },
952
+ },
953
+ questionId: "Test string",
954
+ required: true,
955
+ rowQuestion: {
956
+ title: "Test string",
957
+ },
958
+ scaleQuestion: {
959
+ high: 42,
960
+ highLabel: "Test string",
961
+ low: 42,
962
+ lowLabel: "Test string",
963
+ },
964
+ textQuestion: {
965
+ paragraph: true,
966
+ },
967
+ timeQuestion: {
968
+ duration: true,
969
+ },
970
+ },
971
+ },
972
+ textItem: {
973
+ },
974
+ title: "Test string",
975
+ videoItem: {
976
+ caption: "Test string",
977
+ video: {
978
+ properties: {
979
+ alignment: "Test string",
980
+ width: 42,
981
+ },
982
+ youtubeUri: "Test string",
983
+ },
984
+ },
985
+ }
986
+ ],
987
+ linkedSheetId: "Test string",
988
+ responderUri: "Test string",
989
+ revisionId: "Test string",
990
+ settings: {
991
+ quizSettings: {
992
+ isQuiz: true,
993
+ },
994
+ },
995
+ });
996
+ /** Get a form. */
997
+ await gapi.client.forms.forms.get({
998
+ formId: "Test string",
999
+ });
1000
+ /** Get one response from the form. */
1001
+ await gapi.client.forms.forms.responses.get({
1002
+ formId: "Test string",
1003
+ responseId: "Test string",
1004
+ });
1005
+ /** List a form's responses. */
1006
+ await gapi.client.forms.forms.responses.list({
1007
+ filter: "Test string",
1008
+ formId: "Test string",
1009
+ pageSize: 42,
1010
+ pageToken: "Test string",
1011
+ });
1012
+ /**
1013
+ * Create a new watch. If a watch ID is provided, it must be unused. For each invoking project, the per form limit is one watch per Watch.EventType. A watch expires seven days after it is
1014
+ * created (see Watch.expire_time).
1015
+ */
1016
+ await gapi.client.forms.forms.watches.create({
1017
+ formId: "Test string",
1018
+ }, {
1019
+ watch: {
1020
+ createTime: "Test string",
1021
+ errorType: "Test string",
1022
+ eventType: "Test string",
1023
+ expireTime: "Test string",
1024
+ id: "Test string",
1025
+ state: "Test string",
1026
+ target: {
1027
+ topic: {
1028
+ topicName: "Test string",
1029
+ },
1030
+ },
1031
+ },
1032
+ watchId: "Test string",
1033
+ });
1034
+ /** Delete a watch. */
1035
+ await gapi.client.forms.forms.watches.delete({
1036
+ formId: "Test string",
1037
+ watchId: "Test string",
1038
+ });
1039
+ /** Return a list of the watches owned by the invoking project. The maximum number of watches is two: For each invoker, the limit is one for each event type per form. */
1040
+ await gapi.client.forms.forms.watches.list({
1041
+ formId: "Test string",
1042
+ });
1043
+ /**
1044
+ * Renew an existing watch for seven days. The state of the watch after renewal is `ACTIVE`, and the `expire_time` is seven days from the renewal. Renewing a watch in an error state (e.g.
1045
+ * `SUSPENDED`) succeeds if the error is no longer present, but fail otherwise. After a watch has expired, RenewWatch returns `NOT_FOUND`.
1046
+ */
1047
+ await gapi.client.forms.forms.watches.renew({
1048
+ formId: "Test string",
1049
+ watchId: "Test string",
1050
+ }, {
1051
+ });
1052
+ }
1053
+ });