-
Notifications
You must be signed in to change notification settings - Fork 351
/
routes.js
3001 lines (2760 loc) · 136 KB
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Auto-generated by Stone, do not modify.
var routes = {};
/**
* Sets a user's profile photo.
* @function Dropbox#accountSetProfilePhoto
* @arg {AccountSetProfilePhotoArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<AccountSetProfilePhotoResult>, Error.<AccountSetProfilePhotoError>>}
*/
routes.accountSetProfilePhoto = function (arg) {
return this.request('account/set_profile_photo', arg, 'user', 'api', 'rpc');
};
/**
* Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token.
* @function Dropbox#authTokenFromOauth1
* @arg {AuthTokenFromOAuth1Arg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<AuthTokenFromOAuth1Result>, Error.<AuthTokenFromOAuth1Error>>}
*/
routes.authTokenFromOauth1 = function (arg) {
return this.request('auth/token/from_oauth1', arg, 'app', 'api', 'rpc');
};
/**
* Disables the access token used to authenticate the call.
* @function Dropbox#authTokenRevoke
* @returns {Promise.<DropboxResponse<void>, Error.<void>>}
*/
routes.authTokenRevoke = function () {
return this.request('auth/token/revoke', null, 'user', 'api', 'rpc');
};
/**
* This endpoint performs App Authentication, validating the supplied app key
* and secret, and returns the supplied string, to allow you to test your code
* and connection to the Dropbox API. It has no other effect. If you receive an
* HTTP 200 response with the supplied query, it indicates at least part of the
* Dropbox API infrastructure is working and that the app key and secret valid.
* @function Dropbox#checkApp
* @arg {CheckEchoArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<CheckEchoResult>, Error.<void>>}
*/
routes.checkApp = function (arg) {
return this.request('check/app', arg, 'app', 'api', 'rpc');
};
/**
* This endpoint performs User Authentication, validating the supplied access
* token, and returns the supplied string, to allow you to test your code and
* connection to the Dropbox API. It has no other effect. If you receive an HTTP
* 200 response with the supplied query, it indicates at least part of the
* Dropbox API infrastructure is working and that the access token is valid.
* @function Dropbox#checkUser
* @arg {CheckEchoArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<CheckEchoResult>, Error.<void>>}
*/
routes.checkUser = function (arg) {
return this.request('check/user', arg, 'user', 'api', 'rpc');
};
/**
* Removes all manually added contacts. You'll still keep contacts who are on
* your team or who you imported. New contacts will be added when you share.
* @function Dropbox#contactsDeleteManualContacts
* @returns {Promise.<DropboxResponse<void>, Error.<void>>}
*/
routes.contactsDeleteManualContacts = function () {
return this.request('contacts/delete_manual_contacts', null, 'user', 'api', 'rpc');
};
/**
* Removes manually added contacts from the given list.
* @function Dropbox#contactsDeleteManualContactsBatch
* @arg {ContactsDeleteManualContactsArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<ContactsDeleteManualContactsError>>}
*/
routes.contactsDeleteManualContactsBatch = function (arg) {
return this.request('contacts/delete_manual_contacts_batch', arg, 'user', 'api', 'rpc');
};
/**
* Add property groups to a Dropbox file. See templates/add_for_user or
* templates/add_for_team to create new templates.
* @function Dropbox#filePropertiesPropertiesAdd
* @arg {FilePropertiesAddPropertiesArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilePropertiesAddPropertiesError>>}
*/
routes.filePropertiesPropertiesAdd = function (arg) {
return this.request('file_properties/properties/add', arg, 'user', 'api', 'rpc');
};
/**
* Overwrite property groups associated with a file. This endpoint should be
* used instead of properties/update when property groups are being updated via
* a "snapshot" instead of via a "delta". In other words, this endpoint will
* delete all omitted fields from a property group, whereas properties/update
* will only delete fields that are explicitly marked for deletion.
* @function Dropbox#filePropertiesPropertiesOverwrite
* @arg {FilePropertiesOverwritePropertyGroupArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilePropertiesInvalidPropertyGroupError>>}
*/
routes.filePropertiesPropertiesOverwrite = function (arg) {
return this.request('file_properties/properties/overwrite', arg, 'user', 'api', 'rpc');
};
/**
* Permanently removes the specified property group from the file. To remove
* specific property field key value pairs, see properties/update. To update a
* template, see templates/update_for_user or templates/update_for_team. To
* remove a template, see templates/remove_for_user or
* templates/remove_for_team.
* @function Dropbox#filePropertiesPropertiesRemove
* @arg {FilePropertiesRemovePropertiesArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilePropertiesRemovePropertiesError>>}
*/
routes.filePropertiesPropertiesRemove = function (arg) {
return this.request('file_properties/properties/remove', arg, 'user', 'api', 'rpc');
};
/**
* Search across property templates for particular property field values.
* @function Dropbox#filePropertiesPropertiesSearch
* @arg {FilePropertiesPropertiesSearchArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilePropertiesPropertiesSearchResult>, Error.<FilePropertiesPropertiesSearchError>>}
*/
routes.filePropertiesPropertiesSearch = function (arg) {
return this.request('file_properties/properties/search', arg, 'user', 'api', 'rpc');
};
/**
* Once a cursor has been retrieved from properties/search, use this to paginate
* through all search results.
* @function Dropbox#filePropertiesPropertiesSearchContinue
* @arg {FilePropertiesPropertiesSearchContinueArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilePropertiesPropertiesSearchResult>, Error.<FilePropertiesPropertiesSearchContinueError>>}
*/
routes.filePropertiesPropertiesSearchContinue = function (arg) {
return this.request('file_properties/properties/search/continue', arg, 'user', 'api', 'rpc');
};
/**
* Add, update or remove properties associated with the supplied file and
* templates. This endpoint should be used instead of properties/overwrite when
* property groups are being updated via a "delta" instead of via a "snapshot" .
* In other words, this endpoint will not delete any omitted fields from a
* property group, whereas properties/overwrite will delete any fields that are
* omitted from a property group.
* @function Dropbox#filePropertiesPropertiesUpdate
* @arg {FilePropertiesUpdatePropertiesArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilePropertiesUpdatePropertiesError>>}
*/
routes.filePropertiesPropertiesUpdate = function (arg) {
return this.request('file_properties/properties/update', arg, 'user', 'api', 'rpc');
};
/**
* Add a template associated with a team. See properties/add to add properties
* to a file or folder. Note: this endpoint will create team-owned templates.
* @function Dropbox#filePropertiesTemplatesAddForTeam
* @arg {FilePropertiesAddTemplateArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilePropertiesAddTemplateResult>, Error.<FilePropertiesModifyTemplateError>>}
*/
routes.filePropertiesTemplatesAddForTeam = function (arg) {
return this.request('file_properties/templates/add_for_team', arg, 'team', 'api', 'rpc');
};
/**
* Add a template associated with a user. See properties/add to add properties
* to a file. This endpoint can't be called on a team member or admin's behalf.
* @function Dropbox#filePropertiesTemplatesAddForUser
* @arg {FilePropertiesAddTemplateArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilePropertiesAddTemplateResult>, Error.<FilePropertiesModifyTemplateError>>}
*/
routes.filePropertiesTemplatesAddForUser = function (arg) {
return this.request('file_properties/templates/add_for_user', arg, 'user', 'api', 'rpc');
};
/**
* Get the schema for a specified template.
* @function Dropbox#filePropertiesTemplatesGetForTeam
* @arg {FilePropertiesGetTemplateArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilePropertiesGetTemplateResult>, Error.<FilePropertiesTemplateError>>}
*/
routes.filePropertiesTemplatesGetForTeam = function (arg) {
return this.request('file_properties/templates/get_for_team', arg, 'team', 'api', 'rpc');
};
/**
* Get the schema for a specified template. This endpoint can't be called on a
* team member or admin's behalf.
* @function Dropbox#filePropertiesTemplatesGetForUser
* @arg {FilePropertiesGetTemplateArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilePropertiesGetTemplateResult>, Error.<FilePropertiesTemplateError>>}
*/
routes.filePropertiesTemplatesGetForUser = function (arg) {
return this.request('file_properties/templates/get_for_user', arg, 'user', 'api', 'rpc');
};
/**
* Get the template identifiers for a team. To get the schema of each template
* use templates/get_for_team.
* @function Dropbox#filePropertiesTemplatesListForTeam
* @returns {Promise.<DropboxResponse<FilePropertiesListTemplateResult>, Error.<FilePropertiesTemplateError>>}
*/
routes.filePropertiesTemplatesListForTeam = function () {
return this.request('file_properties/templates/list_for_team', null, 'team', 'api', 'rpc');
};
/**
* Get the template identifiers for a team. To get the schema of each template
* use templates/get_for_user. This endpoint can't be called on a team member or
* admin's behalf.
* @function Dropbox#filePropertiesTemplatesListForUser
* @returns {Promise.<DropboxResponse<FilePropertiesListTemplateResult>, Error.<FilePropertiesTemplateError>>}
*/
routes.filePropertiesTemplatesListForUser = function () {
return this.request('file_properties/templates/list_for_user', null, 'user', 'api', 'rpc');
};
/**
* Permanently removes the specified template created from
* templates/add_for_user. All properties associated with the template will also
* be removed. This action cannot be undone.
* @function Dropbox#filePropertiesTemplatesRemoveForTeam
* @arg {FilePropertiesRemoveTemplateArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilePropertiesTemplateError>>}
*/
routes.filePropertiesTemplatesRemoveForTeam = function (arg) {
return this.request('file_properties/templates/remove_for_team', arg, 'team', 'api', 'rpc');
};
/**
* Permanently removes the specified template created from
* templates/add_for_user. All properties associated with the template will also
* be removed. This action cannot be undone.
* @function Dropbox#filePropertiesTemplatesRemoveForUser
* @arg {FilePropertiesRemoveTemplateArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilePropertiesTemplateError>>}
*/
routes.filePropertiesTemplatesRemoveForUser = function (arg) {
return this.request('file_properties/templates/remove_for_user', arg, 'user', 'api', 'rpc');
};
/**
* Update a template associated with a team. This route can update the template
* name, the template description and add optional properties to templates.
* @function Dropbox#filePropertiesTemplatesUpdateForTeam
* @arg {FilePropertiesUpdateTemplateArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilePropertiesUpdateTemplateResult>, Error.<FilePropertiesModifyTemplateError>>}
*/
routes.filePropertiesTemplatesUpdateForTeam = function (arg) {
return this.request('file_properties/templates/update_for_team', arg, 'team', 'api', 'rpc');
};
/**
* Update a template associated with a user. This route can update the template
* name, the template description and add optional properties to templates. This
* endpoint can't be called on a team member or admin's behalf.
* @function Dropbox#filePropertiesTemplatesUpdateForUser
* @arg {FilePropertiesUpdateTemplateArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilePropertiesUpdateTemplateResult>, Error.<FilePropertiesModifyTemplateError>>}
*/
routes.filePropertiesTemplatesUpdateForUser = function (arg) {
return this.request('file_properties/templates/update_for_user', arg, 'user', 'api', 'rpc');
};
/**
* Returns the total number of file requests owned by this user. Includes both
* open and closed file requests.
* @function Dropbox#fileRequestsCount
* @returns {Promise.<DropboxResponse<FileRequestsCountFileRequestsResult>, Error.<FileRequestsCountFileRequestsError>>}
*/
routes.fileRequestsCount = function () {
return this.request('file_requests/count', null, 'user', 'api', 'rpc');
};
/**
* Creates a file request for this user.
* @function Dropbox#fileRequestsCreate
* @arg {FileRequestsCreateFileRequestArgs} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FileRequestsFileRequest>, Error.<FileRequestsCreateFileRequestError>>}
*/
routes.fileRequestsCreate = function (arg) {
return this.request('file_requests/create', arg, 'user', 'api', 'rpc');
};
/**
* Delete a batch of closed file requests.
* @function Dropbox#fileRequestsDelete
* @arg {FileRequestsDeleteFileRequestArgs} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FileRequestsDeleteFileRequestsResult>, Error.<FileRequestsDeleteFileRequestError>>}
*/
routes.fileRequestsDelete = function (arg) {
return this.request('file_requests/delete', arg, 'user', 'api', 'rpc');
};
/**
* Delete all closed file requests owned by this user.
* @function Dropbox#fileRequestsDeleteAllClosed
* @returns {Promise.<DropboxResponse<FileRequestsDeleteAllClosedFileRequestsResult>, Error.<FileRequestsDeleteAllClosedFileRequestsError>>}
*/
routes.fileRequestsDeleteAllClosed = function () {
return this.request('file_requests/delete_all_closed', null, 'user', 'api', 'rpc');
};
/**
* Returns the specified file request.
* @function Dropbox#fileRequestsGet
* @arg {FileRequestsGetFileRequestArgs} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FileRequestsFileRequest>, Error.<FileRequestsGetFileRequestError>>}
*/
routes.fileRequestsGet = function (arg) {
return this.request('file_requests/get', arg, 'user', 'api', 'rpc');
};
/**
* Returns a list of file requests owned by this user. For apps with the app
* folder permission, this will only return file requests with destinations in
* the app folder.
* @function Dropbox#fileRequestsListV2
* @arg {FileRequestsListFileRequestsArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FileRequestsListFileRequestsV2Result>, Error.<FileRequestsListFileRequestsError>>}
*/
routes.fileRequestsListV2 = function (arg) {
return this.request('file_requests/list_v2', arg, 'user', 'api', 'rpc');
};
/**
* Returns a list of file requests owned by this user. For apps with the app
* folder permission, this will only return file requests with destinations in
* the app folder.
* @function Dropbox#fileRequestsList
* @returns {Promise.<DropboxResponse<FileRequestsListFileRequestsResult>, Error.<FileRequestsListFileRequestsError>>}
*/
routes.fileRequestsList = function () {
return this.request('file_requests/list', null, 'user', 'api', 'rpc');
};
/**
* Once a cursor has been retrieved from list_v2, use this to paginate through
* all file requests. The cursor must come from a previous call to list_v2 or
* list/continue.
* @function Dropbox#fileRequestsListContinue
* @arg {FileRequestsListFileRequestsContinueArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FileRequestsListFileRequestsV2Result>, Error.<FileRequestsListFileRequestsContinueError>>}
*/
routes.fileRequestsListContinue = function (arg) {
return this.request('file_requests/list/continue', arg, 'user', 'api', 'rpc');
};
/**
* Update a file request.
* @function Dropbox#fileRequestsUpdate
* @arg {FileRequestsUpdateFileRequestArgs} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FileRequestsFileRequest>, Error.<FileRequestsUpdateFileRequestError>>}
*/
routes.fileRequestsUpdate = function (arg) {
return this.request('file_requests/update', arg, 'user', 'api', 'rpc');
};
/**
* Returns the metadata for a file or folder. This is an alpha endpoint
* compatible with the properties API. Note: Metadata for the root folder is
* unsupported.
* @function Dropbox#filesAlphaGetMetadata
* @deprecated
* @arg {FilesAlphaGetMetadataArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata)>, Error.<FilesAlphaGetMetadataError>>}
*/
routes.filesAlphaGetMetadata = function (arg) {
return this.request('files/alpha/get_metadata', arg, 'user', 'api', 'rpc');
};
/**
* Create a new file with the contents provided in the request. Note that this
* endpoint is part of the properties API alpha and is slightly different from
* upload. Do not use this to upload a file larger than 150 MB. Instead, create
* an upload session with upload_session/start.
* @function Dropbox#filesAlphaUpload
* @deprecated
* @arg {FilesCommitInfoWithProperties} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesFileMetadata>, Error.<FilesUploadErrorWithProperties>>}
*/
routes.filesAlphaUpload = function (arg) {
return this.request('files/alpha/upload', arg, 'user', 'content', 'upload');
};
/**
* Copy a file or folder to a different location in the user's Dropbox. If the
* source path is a folder all its contents will be copied.
* @function Dropbox#filesCopyV2
* @arg {FilesRelocationArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesRelocationResult>, Error.<FilesRelocationError>>}
*/
routes.filesCopyV2 = function (arg) {
return this.request('files/copy_v2', arg, 'user', 'api', 'rpc');
};
/**
* Copy a file or folder to a different location in the user's Dropbox. If the
* source path is a folder all its contents will be copied.
* @function Dropbox#filesCopy
* @deprecated
* @arg {FilesRelocationArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata)>, Error.<FilesRelocationError>>}
*/
routes.filesCopy = function (arg) {
return this.request('files/copy', arg, 'user', 'api', 'rpc');
};
/**
* Copy multiple files or folders to different locations at once in the user's
* Dropbox. This route will replace copy_batch. The main difference is this
* route will return status for each entry, while copy_batch raises failure if
* any entry fails. This route will either finish synchronously, or return a job
* ID and do the async copy job in background. Please use copy_batch/check_v2 to
* check the job status.
* @function Dropbox#filesCopyBatchV2
* @arg {Object} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesRelocationBatchV2Launch>, Error.<void>>}
*/
routes.filesCopyBatchV2 = function (arg) {
return this.request('files/copy_batch_v2', arg, 'user', 'api', 'rpc');
};
/**
* Copy multiple files or folders to different locations at once in the user's
* Dropbox. This route will return job ID immediately and do the async copy job
* in background. Please use copy_batch/check to check the job status.
* @function Dropbox#filesCopyBatch
* @deprecated
* @arg {FilesRelocationBatchArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesRelocationBatchLaunch>, Error.<void>>}
*/
routes.filesCopyBatch = function (arg) {
return this.request('files/copy_batch', arg, 'user', 'api', 'rpc');
};
/**
* Returns the status of an asynchronous job for copy_batch_v2. It returns list
* of results for each entry.
* @function Dropbox#filesCopyBatchCheckV2
* @arg {AsyncPollArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesRelocationBatchV2JobStatus>, Error.<AsyncPollError>>}
*/
routes.filesCopyBatchCheckV2 = function (arg) {
return this.request('files/copy_batch/check_v2', arg, 'user', 'api', 'rpc');
};
/**
* Returns the status of an asynchronous job for copy_batch. If success, it
* returns list of results for each entry.
* @function Dropbox#filesCopyBatchCheck
* @deprecated
* @arg {AsyncPollArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesRelocationBatchJobStatus>, Error.<AsyncPollError>>}
*/
routes.filesCopyBatchCheck = function (arg) {
return this.request('files/copy_batch/check', arg, 'user', 'api', 'rpc');
};
/**
* Get a copy reference to a file or folder. This reference string can be used
* to save that file or folder to another user's Dropbox by passing it to
* copy_reference/save.
* @function Dropbox#filesCopyReferenceGet
* @arg {FilesGetCopyReferenceArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesGetCopyReferenceResult>, Error.<FilesGetCopyReferenceError>>}
*/
routes.filesCopyReferenceGet = function (arg) {
return this.request('files/copy_reference/get', arg, 'user', 'api', 'rpc');
};
/**
* Save a copy reference returned by copy_reference/get to the user's Dropbox.
* @function Dropbox#filesCopyReferenceSave
* @arg {FilesSaveCopyReferenceArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesSaveCopyReferenceResult>, Error.<FilesSaveCopyReferenceError>>}
*/
routes.filesCopyReferenceSave = function (arg) {
return this.request('files/copy_reference/save', arg, 'user', 'api', 'rpc');
};
/**
* Create a folder at a given path.
* @function Dropbox#filesCreateFolderV2
* @arg {FilesCreateFolderArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesCreateFolderResult>, Error.<FilesCreateFolderError>>}
*/
routes.filesCreateFolderV2 = function (arg) {
return this.request('files/create_folder_v2', arg, 'user', 'api', 'rpc');
};
/**
* Create a folder at a given path.
* @function Dropbox#filesCreateFolder
* @deprecated
* @arg {FilesCreateFolderArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesFolderMetadata>, Error.<FilesCreateFolderError>>}
*/
routes.filesCreateFolder = function (arg) {
return this.request('files/create_folder', arg, 'user', 'api', 'rpc');
};
/**
* Create multiple folders at once. This route is asynchronous for large
* batches, which returns a job ID immediately and runs the create folder batch
* asynchronously. Otherwise, creates the folders and returns the result
* synchronously for smaller inputs. You can force asynchronous behaviour by
* using the CreateFolderBatchArg.force_async flag. Use
* create_folder_batch/check to check the job status.
* @function Dropbox#filesCreateFolderBatch
* @arg {FilesCreateFolderBatchArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesCreateFolderBatchLaunch>, Error.<void>>}
*/
routes.filesCreateFolderBatch = function (arg) {
return this.request('files/create_folder_batch', arg, 'user', 'api', 'rpc');
};
/**
* Returns the status of an asynchronous job for create_folder_batch. If
* success, it returns list of result for each entry.
* @function Dropbox#filesCreateFolderBatchCheck
* @arg {AsyncPollArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesCreateFolderBatchJobStatus>, Error.<AsyncPollError>>}
*/
routes.filesCreateFolderBatchCheck = function (arg) {
return this.request('files/create_folder_batch/check', arg, 'user', 'api', 'rpc');
};
/**
* Delete the file or folder at a given path. If the path is a folder, all its
* contents will be deleted too. A successful response indicates that the file
* or folder was deleted. The returned metadata will be the corresponding
* FileMetadata or FolderMetadata for the item at time of deletion, and not a
* DeletedMetadata object.
* @function Dropbox#filesDeleteV2
* @arg {FilesDeleteArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesDeleteResult>, Error.<FilesDeleteError>>}
*/
routes.filesDeleteV2 = function (arg) {
return this.request('files/delete_v2', arg, 'user', 'api', 'rpc');
};
/**
* Delete the file or folder at a given path. If the path is a folder, all its
* contents will be deleted too. A successful response indicates that the file
* or folder was deleted. The returned metadata will be the corresponding
* FileMetadata or FolderMetadata for the item at time of deletion, and not a
* DeletedMetadata object.
* @function Dropbox#filesDelete
* @deprecated
* @arg {FilesDeleteArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata)>, Error.<FilesDeleteError>>}
*/
routes.filesDelete = function (arg) {
return this.request('files/delete', arg, 'user', 'api', 'rpc');
};
/**
* Delete multiple files/folders at once. This route is asynchronous, which
* returns a job ID immediately and runs the delete batch asynchronously. Use
* delete_batch/check to check the job status.
* @function Dropbox#filesDeleteBatch
* @arg {FilesDeleteBatchArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesDeleteBatchLaunch>, Error.<void>>}
*/
routes.filesDeleteBatch = function (arg) {
return this.request('files/delete_batch', arg, 'user', 'api', 'rpc');
};
/**
* Returns the status of an asynchronous job for delete_batch. If success, it
* returns list of result for each entry.
* @function Dropbox#filesDeleteBatchCheck
* @arg {AsyncPollArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesDeleteBatchJobStatus>, Error.<AsyncPollError>>}
*/
routes.filesDeleteBatchCheck = function (arg) {
return this.request('files/delete_batch/check', arg, 'user', 'api', 'rpc');
};
/**
* Download a file from a user's Dropbox.
* @function Dropbox#filesDownload
* @arg {FilesDownloadArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesFileMetadata>, Error.<FilesDownloadError>>}
*/
routes.filesDownload = function (arg) {
return this.request('files/download', arg, 'user', 'content', 'download');
};
/**
* Download a folder from the user's Dropbox, as a zip file. The folder must be
* less than 20 GB in size and have fewer than 10,000 total files. The input
* cannot be a single file. Any single file must be less than 4GB in size.
* @function Dropbox#filesDownloadZip
* @arg {FilesDownloadZipArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesDownloadZipResult>, Error.<FilesDownloadZipError>>}
*/
routes.filesDownloadZip = function (arg) {
return this.request('files/download_zip', arg, 'user', 'content', 'download');
};
/**
* Export a file from a user's Dropbox. This route only supports exporting files
* that cannot be downloaded directly and whose ExportResult.file_metadata has
* ExportInfo.export_as populated.
* @function Dropbox#filesExport
* @arg {FilesExportArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesExportResult>, Error.<FilesExportError>>}
*/
routes.filesExport = function (arg) {
return this.request('files/export', arg, 'user', 'content', 'download');
};
/**
* Return the lock metadata for the given list of paths.
* @function Dropbox#filesGetFileLockBatch
* @arg {FilesLockFileBatchArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesLockFileBatchResult>, Error.<FilesLockFileError>>}
*/
routes.filesGetFileLockBatch = function (arg) {
return this.request('files/get_file_lock_batch', arg, 'user', 'api', 'rpc');
};
/**
* Returns the metadata for a file or folder. Note: Metadata for the root folder
* is unsupported.
* @function Dropbox#filesGetMetadata
* @arg {FilesGetMetadataArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata)>, Error.<FilesGetMetadataError>>}
*/
routes.filesGetMetadata = function (arg) {
return this.request('files/get_metadata', arg, 'user', 'api', 'rpc');
};
/**
* Get a preview for a file. Currently, PDF previews are generated for files
* with the following extensions: .ai, .doc, .docm, .docx, .eps, .gdoc,
* .gslides, .odp, .odt, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .rtf. HTML
* previews are generated for files with the following extensions: .csv, .ods,
* .xls, .xlsm, .gsheet, .xlsx. Other formats will return an unsupported
* extension error.
* @function Dropbox#filesGetPreview
* @arg {FilesPreviewArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesFileMetadata>, Error.<FilesPreviewError>>}
*/
routes.filesGetPreview = function (arg) {
return this.request('files/get_preview', arg, 'user', 'content', 'download');
};
/**
* Get a temporary link to stream content of a file. This link will expire in
* four hours and afterwards you will get 410 Gone. This URL should not be used
* to display content directly in the browser. The Content-Type of the link is
* determined automatically by the file's mime type.
* @function Dropbox#filesGetTemporaryLink
* @arg {FilesGetTemporaryLinkArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesGetTemporaryLinkResult>, Error.<FilesGetTemporaryLinkError>>}
*/
routes.filesGetTemporaryLink = function (arg) {
return this.request('files/get_temporary_link', arg, 'user', 'api', 'rpc');
};
/**
* Get a one-time use temporary upload link to upload a file to a Dropbox
* location. This endpoint acts as a delayed upload. The returned temporary
* upload link may be used to make a POST request with the data to be uploaded.
* The upload will then be perfomed with the CommitInfo previously provided to
* get_temporary_upload_link but evaluated only upon consumption. Hence, errors
* stemming from invalid CommitInfo with respect to the state of the user's
* Dropbox will only be communicated at consumption time. Additionally, these
* errors are surfaced as generic HTTP 409 Conflict responses, potentially
* hiding issue details. The maximum temporary upload link duration is 4 hours.
* Upon consumption or expiration, a new link will have to be generated.
* Multiple links may exist for a specific upload path at any given time. The
* POST request on the temporary upload link must have its Content-Type set to
* "application/octet-stream". Example temporary upload link consumption
* request: curl -X POST
* https://content.dropboxapi.com/apitul/1/bNi2uIYF51cVBND --header
* "Content-Type: application/octet-stream" --data-binary @local_file.txt A
* successful temporary upload link consumption request returns the content hash
* of the uploaded data in JSON format. Example succesful temporary upload link
* consumption response: {"content-hash":
* "599d71033d700ac892a0e48fa61b125d2f5994"} An unsuccessful temporary upload
* link consumption request returns any of the following status codes: HTTP 400
* Bad Request: Content-Type is not one of application/octet-stream and
* text/plain or request is invalid. HTTP 409 Conflict: The temporary upload
* link does not exist or is currently unavailable, the upload failed, or
* another error happened. HTTP 410 Gone: The temporary upload link is expired
* or consumed. Example unsuccessful temporary upload link consumption
* response: Temporary upload link has been recently consumed.
* @function Dropbox#filesGetTemporaryUploadLink
* @arg {FilesGetTemporaryUploadLinkArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesGetTemporaryUploadLinkResult>, Error.<void>>}
*/
routes.filesGetTemporaryUploadLink = function (arg) {
return this.request('files/get_temporary_upload_link', arg, 'user', 'api', 'rpc');
};
/**
* Get a thumbnail for an image. This method currently supports files with the
* following file extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos
* that are larger than 20MB in size won't be converted to a thumbnail.
* @function Dropbox#filesGetThumbnail
* @arg {FilesThumbnailArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesFileMetadata>, Error.<FilesThumbnailError>>}
*/
routes.filesGetThumbnail = function (arg) {
return this.request('files/get_thumbnail', arg, 'user', 'content', 'download');
};
/**
* Get a thumbnail for a file.
* @function Dropbox#filesGetThumbnailV2
* @arg {FilesThumbnailV2Arg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesPreviewResult>, Error.<FilesThumbnailV2Error>>}
*/
routes.filesGetThumbnailV2 = function (arg) {
return this.request('files/get_thumbnail_v2', arg, 'app, user', 'content', 'download');
};
/**
* Get thumbnails for a list of images. We allow up to 25 thumbnails in a single
* batch. This method currently supports files with the following file
* extensions: jpg, jpeg, png, tiff, tif, gif and bmp. Photos that are larger
* than 20MB in size won't be converted to a thumbnail.
* @function Dropbox#filesGetThumbnailBatch
* @arg {FilesGetThumbnailBatchArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesGetThumbnailBatchResult>, Error.<FilesGetThumbnailBatchError>>}
*/
routes.filesGetThumbnailBatch = function (arg) {
return this.request('files/get_thumbnail_batch', arg, 'user', 'content', 'rpc');
};
/**
* Starts returning the contents of a folder. If the result's
* ListFolderResult.has_more field is true, call list_folder/continue with the
* returned ListFolderResult.cursor to retrieve more entries. If you're using
* ListFolderArg.recursive set to true to keep a local cache of the contents of
* a Dropbox account, iterate through each entry in order and process them as
* follows to keep your local state in sync: For each FileMetadata, store the
* new entry at the given path in your local state. If the required parent
* folders don't exist yet, create them. If there's already something else at
* the given path, replace it and remove all its children. For each
* FolderMetadata, store the new entry at the given path in your local state. If
* the required parent folders don't exist yet, create them. If there's already
* something else at the given path, replace it but leave the children as they
* are. Check the new entry's FolderSharingInfo.read_only and set all its
* children's read-only statuses to match. For each DeletedMetadata, if your
* local state has something at the given path, remove it and all its children.
* If there's nothing at the given path, ignore this entry. Note:
* auth.RateLimitError may be returned if multiple list_folder or
* list_folder/continue calls with same parameters are made simultaneously by
* same API app for same user. If your app implements retry logic, please hold
* off the retry until the previous request finishes.
* @function Dropbox#filesListFolder
* @arg {FilesListFolderArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesListFolderResult>, Error.<FilesListFolderError>>}
*/
routes.filesListFolder = function (arg) {
return this.request('files/list_folder', arg, 'user', 'api', 'rpc');
};
/**
* Once a cursor has been retrieved from list_folder, use this to paginate
* through all files and retrieve updates to the folder, following the same
* rules as documented for list_folder.
* @function Dropbox#filesListFolderContinue
* @arg {FilesListFolderContinueArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesListFolderResult>, Error.<FilesListFolderContinueError>>}
*/
routes.filesListFolderContinue = function (arg) {
return this.request('files/list_folder/continue', arg, 'user', 'api', 'rpc');
};
/**
* A way to quickly get a cursor for the folder's state. Unlike list_folder,
* list_folder/get_latest_cursor doesn't return any entries. This endpoint is
* for app which only needs to know about new files and modifications and
* doesn't need to know about files that already exist in Dropbox.
* @function Dropbox#filesListFolderGetLatestCursor
* @arg {FilesListFolderArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesListFolderGetLatestCursorResult>, Error.<FilesListFolderError>>}
*/
routes.filesListFolderGetLatestCursor = function (arg) {
return this.request('files/list_folder/get_latest_cursor', arg, 'user', 'api', 'rpc');
};
/**
* A longpoll endpoint to wait for changes on an account. In conjunction with
* list_folder/continue, this call gives you a low-latency way to monitor an
* account for file changes. The connection will block until there are changes
* available or a timeout occurs. This endpoint is useful mostly for client-side
* apps. If you're looking for server-side notifications, check out our webhooks
* documentation https://www.dropbox.com/developers/reference/webhooks.
* @function Dropbox#filesListFolderLongpoll
* @arg {FilesListFolderLongpollArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesListFolderLongpollResult>, Error.<FilesListFolderLongpollError>>}
*/
routes.filesListFolderLongpoll = function (arg) {
return this.request('files/list_folder/longpoll', arg, 'noauth', 'notify', 'rpc');
};
/**
* Returns revisions for files based on a file path or a file id. The file path
* or file id is identified from the latest file entry at the given file path or
* id. This end point allows your app to query either by file path or file id by
* setting the mode parameter appropriately. In the ListRevisionsMode.path
* (default) mode, all revisions at the same file path as the latest file entry
* are returned. If revisions with the same file id are desired, then mode must
* be set to ListRevisionsMode.id. The ListRevisionsMode.id mode is useful to
* retrieve revisions for a given file across moves or renames.
* @function Dropbox#filesListRevisions
* @arg {FilesListRevisionsArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesListRevisionsResult>, Error.<FilesListRevisionsError>>}
*/
routes.filesListRevisions = function (arg) {
return this.request('files/list_revisions', arg, 'user', 'api', 'rpc');
};
/**
* Lock the files at the given paths. A locked file will be writable only by the
* lock holder. A successful response indicates that the file has been locked.
* Returns a list of the locked file paths and their metadata after this
* operation.
* @function Dropbox#filesLockFileBatch
* @arg {FilesLockFileBatchArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesLockFileBatchResult>, Error.<FilesLockFileError>>}
*/
routes.filesLockFileBatch = function (arg) {
return this.request('files/lock_file_batch', arg, 'user', 'api', 'rpc');
};
/**
* Move a file or folder to a different location in the user's Dropbox. If the
* source path is a folder all its contents will be moved. Note that we do not
* currently support case-only renaming.
* @function Dropbox#filesMoveV2
* @arg {FilesRelocationArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesRelocationResult>, Error.<FilesRelocationError>>}
*/
routes.filesMoveV2 = function (arg) {
return this.request('files/move_v2', arg, 'user', 'api', 'rpc');
};
/**
* Move a file or folder to a different location in the user's Dropbox. If the
* source path is a folder all its contents will be moved.
* @function Dropbox#filesMove
* @deprecated
* @arg {FilesRelocationArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<(FilesFileMetadata|FilesFolderMetadata|FilesDeletedMetadata)>, Error.<FilesRelocationError>>}
*/
routes.filesMove = function (arg) {
return this.request('files/move', arg, 'user', 'api', 'rpc');
};
/**
* Move multiple files or folders to different locations at once in the user's
* Dropbox. Note that we do not currently support case-only renaming. This route
* will replace move_batch. The main difference is this route will return status
* for each entry, while move_batch raises failure if any entry fails. This
* route will either finish synchronously, or return a job ID and do the async
* move job in background. Please use move_batch/check_v2 to check the job
* status.
* @function Dropbox#filesMoveBatchV2
* @arg {FilesMoveBatchArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesRelocationBatchV2Launch>, Error.<void>>}
*/
routes.filesMoveBatchV2 = function (arg) {
return this.request('files/move_batch_v2', arg, 'user', 'api', 'rpc');
};
/**
* Move multiple files or folders to different locations at once in the user's
* Dropbox. This route will return job ID immediately and do the async moving
* job in background. Please use move_batch/check to check the job status.
* @function Dropbox#filesMoveBatch
* @deprecated
* @arg {FilesRelocationBatchArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesRelocationBatchLaunch>, Error.<void>>}
*/
routes.filesMoveBatch = function (arg) {
return this.request('files/move_batch', arg, 'user', 'api', 'rpc');
};
/**
* Returns the status of an asynchronous job for move_batch_v2. It returns list
* of results for each entry.
* @function Dropbox#filesMoveBatchCheckV2
* @arg {AsyncPollArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesRelocationBatchV2JobStatus>, Error.<AsyncPollError>>}
*/
routes.filesMoveBatchCheckV2 = function (arg) {
return this.request('files/move_batch/check_v2', arg, 'user', 'api', 'rpc');
};
/**
* Returns the status of an asynchronous job for move_batch. If success, it
* returns list of results for each entry.
* @function Dropbox#filesMoveBatchCheck
* @deprecated
* @arg {AsyncPollArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesRelocationBatchJobStatus>, Error.<AsyncPollError>>}
*/
routes.filesMoveBatchCheck = function (arg) {
return this.request('files/move_batch/check', arg, 'user', 'api', 'rpc');
};
/**
* Permanently delete the file or folder at a given path (see
* https://www.dropbox.com/en/help/40). If the given file or folder is not yet
* deleted, this route will first delete it. It is possible for this route to
* successfully delete, then fail to permanently delete. Note: This endpoint is
* only available for Dropbox Business apps.
* @function Dropbox#filesPermanentlyDelete
* @arg {FilesDeleteArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilesDeleteError>>}
*/
routes.filesPermanentlyDelete = function (arg) {
return this.request('files/permanently_delete', arg, 'user', 'api', 'rpc');
};
/**
* @function Dropbox#filesPropertiesAdd
* @deprecated
* @arg {FilePropertiesAddPropertiesArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilePropertiesAddPropertiesError>>}
*/
routes.filesPropertiesAdd = function (arg) {
return this.request('files/properties/add', arg, 'user', 'api', 'rpc');
};
/**
* @function Dropbox#filesPropertiesOverwrite
* @deprecated
* @arg {FilePropertiesOverwritePropertyGroupArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilePropertiesInvalidPropertyGroupError>>}
*/
routes.filesPropertiesOverwrite = function (arg) {
return this.request('files/properties/overwrite', arg, 'user', 'api', 'rpc');
};
/**
* @function Dropbox#filesPropertiesRemove
* @deprecated
* @arg {FilePropertiesRemovePropertiesArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilePropertiesRemovePropertiesError>>}
*/
routes.filesPropertiesRemove = function (arg) {
return this.request('files/properties/remove', arg, 'user', 'api', 'rpc');
};
/**
* @function Dropbox#filesPropertiesTemplateGet
* @deprecated
* @arg {FilePropertiesGetTemplateArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilePropertiesGetTemplateResult>, Error.<FilePropertiesTemplateError>>}
*/
routes.filesPropertiesTemplateGet = function (arg) {
return this.request('files/properties/template/get', arg, 'user', 'api', 'rpc');
};
/**
* @function Dropbox#filesPropertiesTemplateList
* @deprecated
* @returns {Promise.<DropboxResponse<FilePropertiesListTemplateResult>, Error.<FilePropertiesTemplateError>>}
*/
routes.filesPropertiesTemplateList = function () {
return this.request('files/properties/template/list', null, 'user', 'api', 'rpc');
};
/**
* @function Dropbox#filesPropertiesUpdate
* @deprecated
* @arg {FilePropertiesUpdatePropertiesArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<void>, Error.<FilePropertiesUpdatePropertiesError>>}
*/
routes.filesPropertiesUpdate = function (arg) {
return this.request('files/properties/update', arg, 'user', 'api', 'rpc');
};
/**
* Restore a specific revision of a file to the given path.
* @function Dropbox#filesRestore
* @arg {FilesRestoreArg} arg - The request parameters.
* @returns {Promise.<DropboxResponse<FilesFileMetadata>, Error.<FilesRestoreError>>}
*/
routes.filesRestore = function (arg) {
return this.request('files/restore', arg, 'user', 'api', 'rpc');
};
/**
* Save the data from a specified URL into a file in user's Dropbox. Note that
* the transfer from the URL must complete within 5 minutes, or the operation
* will time out and the job will fail. If the given path already exists, the
* file will be renamed to avoid the conflict (e.g. myfile (1).txt).
* @function Dropbox#filesSaveUrl