files.com 1.0.190 → 1.0.193

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. package/_VERSION +1 -1
  2. package/docs/Errors.md +186 -0
  3. package/docs/models/AccountLineItem.md +53 -0
  4. package/docs/models/Action.md +37 -0
  5. package/docs/models/ActionNotificationExport.md +82 -0
  6. package/docs/models/ActionNotificationExportResult.md +49 -0
  7. package/docs/models/ActionWebhookFailure.md +16 -0
  8. package/docs/models/ApiKey.md +183 -0
  9. package/docs/models/App.md +66 -0
  10. package/docs/models/As2IncomingMessage.md +104 -0
  11. package/docs/models/As2OutgoingMessage.md +96 -0
  12. package/docs/models/As2Partner.md +141 -0
  13. package/docs/models/As2Station.md +142 -0
  14. package/docs/models/Auto.md +11 -0
  15. package/docs/models/Automation.md +257 -0
  16. package/docs/models/AutomationRun.md +61 -0
  17. package/docs/models/BandwidthSnapshot.md +50 -0
  18. package/docs/models/Behavior.md +195 -0
  19. package/docs/models/Bundle.md +330 -0
  20. package/docs/models/BundleDownload.md +44 -0
  21. package/docs/models/BundleRecipient.md +76 -0
  22. package/docs/models/BundleRegistration.md +53 -0
  23. package/docs/models/Clickwrap.md +120 -0
  24. package/docs/models/DnsRecord.md +33 -0
  25. package/docs/models/Errors.md +17 -0
  26. package/docs/models/ExternalEvent.md +84 -0
  27. package/docs/models/File.md +339 -0
  28. package/docs/models/FileAction.md +13 -0
  29. package/docs/models/FileComment.md +98 -0
  30. package/docs/models/FileCommentReaction.md +50 -0
  31. package/docs/models/FileMigration.md +40 -0
  32. package/docs/models/FileUploadPart.md +39 -0
  33. package/docs/models/Folder.md +90 -0
  34. package/docs/models/FormField.md +29 -0
  35. package/docs/models/FormFieldSet.md +170 -0
  36. package/docs/models/Group.md +140 -0
  37. package/docs/models/GroupUser.md +116 -0
  38. package/docs/models/History.md +151 -0
  39. package/docs/models/HistoryExport.md +130 -0
  40. package/docs/models/HistoryExportResult.md +75 -0
  41. package/docs/models/Image.md +13 -0
  42. package/docs/models/InboxRecipient.md +76 -0
  43. package/docs/models/InboxRegistration.md +47 -0
  44. package/docs/models/InboxUpload.md +42 -0
  45. package/docs/models/Invoice.md +82 -0
  46. package/docs/models/InvoiceLineItem.md +27 -0
  47. package/docs/models/IpAddress.md +51 -0
  48. package/docs/models/Lock.md +92 -0
  49. package/docs/models/Message.md +134 -0
  50. package/docs/models/MessageComment.md +114 -0
  51. package/docs/models/MessageCommentReaction.md +79 -0
  52. package/docs/models/MessageReaction.md +79 -0
  53. package/docs/models/Notification.md +241 -0
  54. package/docs/models/Payment.md +82 -0
  55. package/docs/models/PaymentLineItem.md +19 -0
  56. package/docs/models/Permission.md +94 -0
  57. package/docs/models/Preview.md +19 -0
  58. package/docs/models/Priority.md +30 -0
  59. package/docs/models/Project.md +98 -0
  60. package/docs/models/PublicIpAddress.md +17 -0
  61. package/docs/models/PublicKey.md +112 -0
  62. package/docs/models/RemoteBandwidthSnapshot.md +42 -0
  63. package/docs/models/RemoteServer.md +385 -0
  64. package/docs/models/Request.md +97 -0
  65. package/docs/models/Session.md +50 -0
  66. package/docs/models/SettingsChange.md +44 -0
  67. package/docs/models/Site.md +607 -0
  68. package/docs/models/SsoStrategy.md +139 -0
  69. package/docs/models/Status.md +30 -0
  70. package/docs/models/Style.md +76 -0
  71. package/docs/models/UsageDailySnapshot.md +56 -0
  72. package/docs/models/UsageSnapshot.md +63 -0
  73. package/docs/models/User.md +465 -0
  74. package/docs/models/UserCipherUse.md +39 -0
  75. package/docs/models/UserRequest.md +80 -0
  76. package/docs/models/WebhookTest.md +59 -0
  77. package/lib/Api.js +12 -11
  78. package/lib/Errors.js +3125 -0
  79. package/lib/models/AccountLineItem.js +8 -0
  80. package/lib/models/Action.js +8 -0
  81. package/lib/models/ActionNotificationExport.js +21 -13
  82. package/lib/models/ActionNotificationExportResult.js +13 -5
  83. package/lib/models/ActionWebhookFailure.js +12 -4
  84. package/lib/models/ApiKey.js +33 -25
  85. package/lib/models/App.js +10 -2
  86. package/lib/models/As2IncomingMessage.js +11 -3
  87. package/lib/models/As2OutgoingMessage.js +11 -3
  88. package/lib/models/As2Partner.js +34 -26
  89. package/lib/models/As2Station.js +32 -24
  90. package/lib/models/Auto.js +8 -0
  91. package/lib/models/Automation.js +51 -43
  92. package/lib/models/AutomationRun.js +16 -8
  93. package/lib/models/BandwidthSnapshot.js +10 -2
  94. package/lib/models/Behavior.js +46 -38
  95. package/lib/models/Bundle.js +51 -43
  96. package/lib/models/BundleDownload.js +12 -4
  97. package/lib/models/BundleRecipient.js +22 -14
  98. package/lib/models/BundleRegistration.js +12 -4
  99. package/lib/models/Clickwrap.js +31 -23
  100. package/lib/models/DnsRecord.js +10 -2
  101. package/lib/models/Errors.js +8 -0
  102. package/lib/models/ExternalEvent.js +18 -10
  103. package/lib/models/File.js +68 -60
  104. package/lib/models/FileAction.js +8 -0
  105. package/lib/models/FileComment.js +27 -19
  106. package/lib/models/FileCommentReaction.js +18 -10
  107. package/lib/models/FileMigration.js +11 -3
  108. package/lib/models/FileUploadPart.js +8 -0
  109. package/lib/models/Folder.js +19 -11
  110. package/lib/models/FormField.js +8 -0
  111. package/lib/models/FormFieldSet.js +27 -19
  112. package/lib/models/Group.js +30 -22
  113. package/lib/models/GroupUser.js +32 -24
  114. package/lib/models/History.js +42 -34
  115. package/lib/models/HistoryExport.js +34 -26
  116. package/lib/models/HistoryExportResult.js +13 -5
  117. package/lib/models/Image.js +8 -0
  118. package/lib/models/InboxRecipient.js +22 -14
  119. package/lib/models/InboxRegistration.js +11 -3
  120. package/lib/models/InboxUpload.js +12 -4
  121. package/lib/models/Invoice.js +13 -5
  122. package/lib/models/InvoiceLineItem.js +8 -0
  123. package/lib/models/IpAddress.js +12 -4
  124. package/lib/models/Lock.js +24 -16
  125. package/lib/models/Message.js +37 -29
  126. package/lib/models/MessageComment.js +29 -21
  127. package/lib/models/MessageCommentReaction.js +24 -16
  128. package/lib/models/MessageReaction.js +24 -16
  129. package/lib/models/Notification.js +38 -30
  130. package/lib/models/Payment.js +13 -5
  131. package/lib/models/PaymentLineItem.js +8 -0
  132. package/lib/models/Permission.js +23 -15
  133. package/lib/models/Preview.js +8 -0
  134. package/lib/models/Priority.js +13 -5
  135. package/lib/models/Project.js +25 -17
  136. package/lib/models/PublicIpAddress.js +8 -0
  137. package/lib/models/PublicKey.js +29 -21
  138. package/lib/models/RemoteBandwidthSnapshot.js +10 -2
  139. package/lib/models/RemoteServer.js +113 -105
  140. package/lib/models/Request.js +27 -19
  141. package/lib/models/Session.js +13 -5
  142. package/lib/models/SettingsChange.js +10 -2
  143. package/lib/models/Site.js +65 -57
  144. package/lib/models/SsoStrategy.js +17 -9
  145. package/lib/models/Status.js +8 -0
  146. package/lib/models/Style.js +20 -12
  147. package/lib/models/UsageDailySnapshot.js +10 -2
  148. package/lib/models/UsageSnapshot.js +10 -2
  149. package/lib/models/User.js +85 -77
  150. package/lib/models/UserCipherUse.js +11 -3
  151. package/lib/models/UserRequest.js +24 -16
  152. package/lib/models/WebhookTest.js +16 -8
  153. package/package.json +1 -1
  154. package/src/Api.js +4 -8
  155. package/src/Errors.js +221 -0
  156. package/src/models/AccountLineItem.js +1 -0
  157. package/src/models/Action.js +1 -0
  158. package/src/models/ActionNotificationExport.js +14 -13
  159. package/src/models/ActionNotificationExportResult.js +6 -5
  160. package/src/models/ActionWebhookFailure.js +5 -4
  161. package/src/models/ApiKey.js +26 -25
  162. package/src/models/App.js +3 -2
  163. package/src/models/As2IncomingMessage.js +4 -3
  164. package/src/models/As2OutgoingMessage.js +4 -3
  165. package/src/models/As2Partner.js +27 -26
  166. package/src/models/As2Station.js +25 -24
  167. package/src/models/Auto.js +1 -0
  168. package/src/models/Automation.js +44 -43
  169. package/src/models/AutomationRun.js +9 -8
  170. package/src/models/BandwidthSnapshot.js +3 -2
  171. package/src/models/Behavior.js +39 -38
  172. package/src/models/Bundle.js +44 -43
  173. package/src/models/BundleDownload.js +5 -4
  174. package/src/models/BundleRecipient.js +15 -14
  175. package/src/models/BundleRegistration.js +5 -4
  176. package/src/models/Clickwrap.js +24 -23
  177. package/src/models/DnsRecord.js +3 -2
  178. package/src/models/Errors.js +1 -0
  179. package/src/models/ExternalEvent.js +11 -10
  180. package/src/models/File.js +61 -60
  181. package/src/models/FileAction.js +1 -0
  182. package/src/models/FileComment.js +20 -19
  183. package/src/models/FileCommentReaction.js +11 -10
  184. package/src/models/FileMigration.js +4 -3
  185. package/src/models/FileUploadPart.js +1 -0
  186. package/src/models/Folder.js +12 -11
  187. package/src/models/FormField.js +1 -0
  188. package/src/models/FormFieldSet.js +20 -19
  189. package/src/models/Group.js +23 -22
  190. package/src/models/GroupUser.js +25 -24
  191. package/src/models/History.js +35 -34
  192. package/src/models/HistoryExport.js +27 -26
  193. package/src/models/HistoryExportResult.js +6 -5
  194. package/src/models/Image.js +1 -0
  195. package/src/models/InboxRecipient.js +15 -14
  196. package/src/models/InboxRegistration.js +4 -3
  197. package/src/models/InboxUpload.js +5 -4
  198. package/src/models/Invoice.js +6 -5
  199. package/src/models/InvoiceLineItem.js +1 -0
  200. package/src/models/IpAddress.js +5 -4
  201. package/src/models/Lock.js +17 -16
  202. package/src/models/Message.js +30 -29
  203. package/src/models/MessageComment.js +22 -21
  204. package/src/models/MessageCommentReaction.js +17 -16
  205. package/src/models/MessageReaction.js +17 -16
  206. package/src/models/Notification.js +31 -30
  207. package/src/models/Payment.js +6 -5
  208. package/src/models/PaymentLineItem.js +1 -0
  209. package/src/models/Permission.js +16 -15
  210. package/src/models/Preview.js +1 -0
  211. package/src/models/Priority.js +6 -5
  212. package/src/models/Project.js +18 -17
  213. package/src/models/PublicIpAddress.js +1 -0
  214. package/src/models/PublicKey.js +22 -21
  215. package/src/models/RemoteBandwidthSnapshot.js +3 -2
  216. package/src/models/RemoteServer.js +106 -105
  217. package/src/models/Request.js +20 -19
  218. package/src/models/Session.js +6 -5
  219. package/src/models/SettingsChange.js +3 -2
  220. package/src/models/Site.js +58 -57
  221. package/src/models/SsoStrategy.js +10 -9
  222. package/src/models/Status.js +1 -0
  223. package/src/models/Style.js +13 -12
  224. package/src/models/UsageDailySnapshot.js +3 -2
  225. package/src/models/UsageSnapshot.js +3 -2
  226. package/src/models/User.js +78 -77
  227. package/src/models/UserCipherUse.js +4 -3
  228. package/src/models/UserRequest.js +17 -16
  229. package/src/models/WebhookTest.js +9 -8
  230. package/test/src/index.js +46 -0
@@ -0,0 +1,84 @@
1
+ # ExternalEvent
2
+
3
+ ## Example ExternalEvent Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "event_type": "",
9
+ "status": "",
10
+ "body": "",
11
+ "created_at": "2000-01-01T01:00:00Z",
12
+ "body_url": "",
13
+ "folder_behavior_id": 1,
14
+ "successful_files": 1,
15
+ "errored_files": 1,
16
+ "bytes_synced": 1,
17
+ "remote_server_type": ""
18
+ }
19
+ ```
20
+
21
+ * `id` (int64): Event ID
22
+ * `event_type` (string): Type of event being recorded.
23
+ * `status` (string): Status of event.
24
+ * `body` (string): Event body
25
+ * `created_at` (date-time): External event create date/time
26
+ * `body_url` (string): Link to log file.
27
+ * `folder_behavior_id` (int64): Folder Behavior ID
28
+ * `successful_files` (int64): For sync events, the number of files handled successfully.
29
+ * `errored_files` (int64): For sync events, the number of files that encountered errors.
30
+ * `bytes_synced` (int64): For sync events, the total number of bytes synced.
31
+ * `remote_server_type` (string): Associated Remote Server type, if any
32
+
33
+ ---
34
+
35
+ ## List External Events
36
+
37
+ ```
38
+ await ExternalEvent.list({
39
+ 'per_page': 1,
40
+ })
41
+ ```
42
+
43
+
44
+ ### Parameters
45
+
46
+ * `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
47
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
48
+ * `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `remote_server_type`, `site_id`, `folder_behavior_id`, `event_type`, `created_at` or `status`.
49
+ * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
50
+ * `filter_gt` (object): If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
51
+ * `filter_gteq` (object): If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
52
+ * `filter_like` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
53
+ * `filter_lt` (object): If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
54
+ * `filter_lteq` (object): If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `created_at`, `event_type`, `remote_server_type`, `status` or `folder_behavior_id`. Valid field combinations are `[ event_type, status, created_at ]`, `[ event_type, created_at ]` or `[ status, created_at ]`.
55
+
56
+ ---
57
+
58
+ ## Show External Event
59
+
60
+ ```
61
+ await ExternalEvent.find(id)
62
+ ```
63
+
64
+
65
+ ### Parameters
66
+
67
+ * `id` (int64): Required - External Event ID.
68
+
69
+ ---
70
+
71
+ ## Create External Event
72
+
73
+ ```
74
+ await ExternalEvent.create({
75
+ 'status': "status",
76
+ 'body': "body",
77
+ })
78
+ ```
79
+
80
+
81
+ ### Parameters
82
+
83
+ * `status` (string): Required - Status of event.
84
+ * `body` (string): Required - Event body
@@ -0,0 +1,339 @@
1
+ # File
2
+
3
+ ## Example File Object
4
+
5
+ ```
6
+ {
7
+ "path": "path/file.txt",
8
+ "display_name": "file.txt",
9
+ "type": "file",
10
+ "size": 1024,
11
+ "mtime": "2000-01-01T01:00:00Z",
12
+ "provided_mtime": "2000-01-01T01:00:00Z",
13
+ "crc32": "70976923",
14
+ "md5": "17c54824e9931a4688ca032d03f6663c",
15
+ "mime_type": "application/octet-stream",
16
+ "region": "us-east-1",
17
+ "permissions": "rwd",
18
+ "subfolders_locked?": true,
19
+ "download_uri": "https://mysite.files.com/...",
20
+ "priority_color": "red",
21
+ "preview_id": 1,
22
+ "preview": {
23
+ "id": 1,
24
+ "status": "complete",
25
+ "download_uri": "https://mysite.files.com/...",
26
+ "type": "image",
27
+ "size": "large"
28
+ }
29
+ }
30
+ ```
31
+
32
+ * `path` (string): File/Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
33
+ * `display_name` (string): File/Folder display name
34
+ * `type` (string): Type: `directory` or `file`.
35
+ * `size` (int64): File/Folder size
36
+ * `mtime` (date-time): File last modified date/time, according to the server. This is the timestamp of the last Files.com operation of the file, regardless of what modified timestamp was sent.
37
+ * `provided_mtime` (date-time): File last modified date/time, according to the client who set it. Files.com allows desktop, FTP, SFTP, and WebDAV clients to set modified at times. This allows Desktop<->Cloud syncing to preserve modified at times.
38
+ * `crc32` (string): File CRC32 checksum. This is sometimes delayed, so if you get a blank response, wait and try again.
39
+ * `md5` (string): File MD5 checksum. This is sometimes delayed, so if you get a blank response, wait and try again.
40
+ * `mime_type` (string): MIME Type. This is determined by the filename extension and is not stored separately internally.
41
+ * `region` (string): Region location
42
+ * `permissions` (string): A short string representing the current user's permissions. Can be `r`,`w`,`d`, `l` or any combination
43
+ * `subfolders_locked?` (boolean): Are subfolders locked and unable to be modified?
44
+ * `download_uri` (string): Link to download file. Provided only in response to a download request.
45
+ * `priority_color` (string): Bookmark/priority color of file/folder
46
+ * `preview_id` (int64): File preview ID
47
+ * `preview` (Preview): File preview
48
+ * `action` (string): The action to perform. Can be `append`, `attachment`, `end`, `upload`, `put`, or may not exist
49
+ * `length` (int64): Length of file.
50
+ * `mkdir_parents` (boolean): Create parent directories if they do not exist?
51
+ * `part` (int64): Part if uploading a part.
52
+ * `parts` (int64): How many parts to fetch?
53
+ * `ref` (string):
54
+ * `restart` (int64): File byte offset to restart from.
55
+ * `structure` (string): If copying folder, copy just the structure?
56
+ * `with_rename` (boolean): Allow file rename instead of overwrite?
57
+
58
+ ---
59
+
60
+ ## Upload file
61
+
62
+ ```
63
+ await File.create(path, {
64
+ 'length': 1,
65
+ 'mkdir_parents': true,
66
+ 'part': 1,
67
+ 'parts': 1,
68
+ 'provided_mtime': "2000-01-01T01:00:00Z",
69
+ 'restart': 1,
70
+ 'size': 1,
71
+ 'with_rename': true,
72
+ })
73
+ ```
74
+
75
+
76
+ ### Parameters
77
+
78
+ * `path` (string): Required - Path to operate on.
79
+ * `action` (string): The action to perform. Can be `append`, `attachment`, `end`, `upload`, `put`, or may not exist
80
+ * `etags[etag]` (array(string)): etag identifier.
81
+ * `etags[part]` (array(int64)): Part number.
82
+ * `length` (int64): Length of file.
83
+ * `mkdir_parents` (boolean): Create parent directories if they do not exist?
84
+ * `part` (int64): Part if uploading a part.
85
+ * `parts` (int64): How many parts to fetch?
86
+ * `provided_mtime` (string): User provided modification time.
87
+ * `ref` (string):
88
+ * `restart` (int64): File byte offset to restart from.
89
+ * `size` (int64): Size of file.
90
+ * `structure` (string): If copying folder, copy just the structure?
91
+ * `with_rename` (boolean): Allow file rename instead of overwrite?
92
+
93
+ ---
94
+
95
+ ## Find file/folder by path
96
+
97
+ ```
98
+ await File.find(path, {
99
+ 'with_previews': true,
100
+ 'with_priority_color': true,
101
+ })
102
+ ```
103
+
104
+
105
+ ### Parameters
106
+
107
+ * `path` (string): Required - Path to operate on.
108
+ * `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
109
+ * `with_previews` (boolean): Include file preview information?
110
+ * `with_priority_color` (boolean): Include file priority color information?
111
+
112
+ ---
113
+
114
+ ## Download file
115
+
116
+ ```
117
+ const file = new File()
118
+ file.path = myFilePath
119
+
120
+ await file.download({
121
+ 'with_previews': true,
122
+ 'with_priority_color': true,
123
+ })
124
+ ```
125
+
126
+ ### Parameters
127
+
128
+ * `path` (string): Required - Path to operate on.
129
+ * `action` (string): Can be blank, `redirect` or `stat`. If set to `stat`, we will return file information but without a download URL, and without logging a download. If set to `redirect` we will serve a 302 redirect directly to the file. This is used for integrations with Zapier, and is not recommended for most integrations.
130
+ * `preview_size` (string): Request a preview size. Can be `small` (default), `large`, `xlarge`, or `pdf`.
131
+ * `with_previews` (boolean): Include file preview information?
132
+ * `with_priority_color` (boolean): Include file priority color information?
133
+
134
+ ### Example Response
135
+
136
+ ```json
137
+ {
138
+ "path": "path/file.txt",
139
+ "display_name": "file.txt",
140
+ "type": "file",
141
+ "size": 1024,
142
+ "mtime": "2000-01-01T01:00:00Z",
143
+ "provided_mtime": "2000-01-01T01:00:00Z",
144
+ "crc32": "70976923",
145
+ "md5": "17c54824e9931a4688ca032d03f6663c",
146
+ "mime_type": "application/octet-stream",
147
+ "region": "us-east-1",
148
+ "permissions": "rwd",
149
+ "subfolders_locked?": true,
150
+ "download_uri": "https://mysite.files.com/...",
151
+ "priority_color": "red",
152
+ "preview_id": 1,
153
+ "preview": {
154
+ "id": 1,
155
+ "status": "complete",
156
+ "download_uri": "https://mysite.files.com/...",
157
+ "type": "image",
158
+ "size": "large"
159
+ }
160
+ }
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Update file/folder metadata
166
+
167
+ ```
168
+ const file = new File()
169
+ file.path = myFilePath
170
+
171
+ await file.update({
172
+ 'provided_mtime': "2000-01-01T01:00:00Z",
173
+ 'priority_color': "red",
174
+ })
175
+ ```
176
+
177
+ ### Parameters
178
+
179
+ * `path` (string): Required - Path to operate on.
180
+ * `provided_mtime` (string): Modified time of file.
181
+ * `priority_color` (string): Priority/Bookmark color of file.
182
+
183
+ ### Example Response
184
+
185
+ ```json
186
+ {
187
+ "path": "path/file.txt",
188
+ "display_name": "file.txt",
189
+ "type": "file",
190
+ "size": 1024,
191
+ "mtime": "2000-01-01T01:00:00Z",
192
+ "provided_mtime": "2000-01-01T01:00:00Z",
193
+ "crc32": "70976923",
194
+ "md5": "17c54824e9931a4688ca032d03f6663c",
195
+ "mime_type": "application/octet-stream",
196
+ "region": "us-east-1",
197
+ "permissions": "rwd",
198
+ "subfolders_locked?": true,
199
+ "download_uri": "https://mysite.files.com/...",
200
+ "priority_color": "red",
201
+ "preview_id": 1,
202
+ "preview": {
203
+ "id": 1,
204
+ "status": "complete",
205
+ "download_uri": "https://mysite.files.com/...",
206
+ "type": "image",
207
+ "size": "large"
208
+ }
209
+ }
210
+ ```
211
+
212
+ ---
213
+
214
+ ## Delete file/folder
215
+
216
+ ```
217
+ const file = new File()
218
+ file.path = myFilePath
219
+
220
+ await file.delete({
221
+ 'recursive': true,
222
+ })
223
+ ```
224
+
225
+ ### Parameters
226
+
227
+ * `path` (string): Required - Path to operate on.
228
+ * `recursive` (boolean): If true, will recursively delete folers. Otherwise, will error on non-empty folders.
229
+
230
+
231
+ ---
232
+
233
+ ## Copy file/folder
234
+
235
+ ```
236
+ const file = new File()
237
+ file.path = myFilePath
238
+
239
+ await file.copy({
240
+ 'destination': "destination",
241
+ 'structure': true,
242
+ })
243
+ ```
244
+
245
+ ### Parameters
246
+
247
+ * `path` (string): Required - Path to operate on.
248
+ * `destination` (string): Required - Copy destination path.
249
+ * `structure` (boolean): Copy structure only?
250
+
251
+ ### Example Response
252
+
253
+ ```json
254
+ {
255
+ "status": "pending",
256
+ "file_migration_id": "123"
257
+ }
258
+ ```
259
+
260
+ ---
261
+
262
+ ## Move file/folder
263
+
264
+ ```
265
+ const file = new File()
266
+ file.path = myFilePath
267
+
268
+ await file.move({
269
+ 'destination': "destination",
270
+ })
271
+ ```
272
+
273
+ ### Parameters
274
+
275
+ * `path` (string): Required - Path to operate on.
276
+ * `destination` (string): Required - Move destination path.
277
+
278
+ ### Example Response
279
+
280
+ ```json
281
+ {
282
+ "status": "pending",
283
+ "file_migration_id": "123"
284
+ }
285
+ ```
286
+
287
+ ---
288
+
289
+ ## Begin file upload
290
+
291
+ ```
292
+ const file = new File()
293
+ file.path = myFilePath
294
+
295
+ await file.begin_upload({
296
+ 'mkdir_parents': true,
297
+ 'part': 1,
298
+ 'parts': 1,
299
+ 'ref': "upload-1",
300
+ 'restart': 1,
301
+ 'size': 1,
302
+ 'with_rename': true,
303
+ })
304
+ ```
305
+
306
+ ### Parameters
307
+
308
+ * `path` (string): Required - Path to operate on.
309
+ * `mkdir_parents` (boolean): Create parent directories if they do not exist?
310
+ * `part` (int64): Part if uploading a part.
311
+ * `parts` (int64): How many parts to fetch?
312
+ * `ref` (string):
313
+ * `restart` (int64): File byte offset to restart from.
314
+ * `size` (int64): Total bytes of file being uploaded (include bytes being retained if appending/restarting).
315
+ * `with_rename` (boolean): Allow file rename instead of overwrite?
316
+
317
+ ### Example Response
318
+
319
+ ```json
320
+ [
321
+ {
322
+ "send": "",
323
+ "action": "multipart",
324
+ "ask_about_overwrites": true,
325
+ "available_parts": 1,
326
+ "expires": "",
327
+ "headers": "",
328
+ "http_method": "PUT",
329
+ "next_partsize": 1,
330
+ "parallel_parts": true,
331
+ "parameters": "{}",
332
+ "part_number": 1,
333
+ "partsize": 1,
334
+ "path": "",
335
+ "ref": "upload-1",
336
+ "upload_uri": ""
337
+ }
338
+ ]
339
+ ```
@@ -0,0 +1,13 @@
1
+ # FileAction
2
+
3
+ ## Example FileAction Object
4
+
5
+ ```
6
+ {
7
+ "status": "pending",
8
+ "file_migration_id": "123"
9
+ }
10
+ ```
11
+
12
+ * `status` (string): Status of file operation.
13
+ * `file_migration_id` (int64): If status is pending, this is the id of the FileMigration to check for status updates.
@@ -0,0 +1,98 @@
1
+ # FileComment
2
+
3
+ ## Example FileComment Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "body": "What a great file!",
9
+ "reactions": {
10
+ "id": 1,
11
+ "emoji": "👍"
12
+ }
13
+ }
14
+ ```
15
+
16
+ * `id` (int64): File Comment ID
17
+ * `body` (string): Comment body.
18
+ * `reactions` (FileCommentReaction): Reactions to this comment.
19
+ * `path` (string): File path.
20
+
21
+ ---
22
+
23
+ ## List File Comments by path
24
+
25
+ ```
26
+ await FileComment.listFor(path, {
27
+ 'per_page': 1,
28
+ })
29
+ ```
30
+
31
+
32
+ ### Parameters
33
+
34
+ * `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
35
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
36
+ * `path` (string): Required - Path to operate on.
37
+
38
+ ---
39
+
40
+ ## Create File Comment
41
+
42
+ ```
43
+ await FileComment.create({
44
+ 'body': "body",
45
+ 'path': "path",
46
+ })
47
+ ```
48
+
49
+
50
+ ### Parameters
51
+
52
+ * `body` (string): Required - Comment body.
53
+ * `path` (string): Required - File path.
54
+
55
+ ---
56
+
57
+ ## Update File Comment
58
+
59
+ ```
60
+ const [file_comment] = await FileComment.list()
61
+
62
+ await file_comment.update({
63
+ 'body': "body",
64
+ })
65
+ ```
66
+
67
+ ### Parameters
68
+
69
+ * `id` (int64): Required - File Comment ID.
70
+ * `body` (string): Required - Comment body.
71
+
72
+ ### Example Response
73
+
74
+ ```json
75
+ {
76
+ "id": 1,
77
+ "body": "What a great file!",
78
+ "reactions": {
79
+ "id": 1,
80
+ "emoji": "👍"
81
+ }
82
+ }
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Delete File Comment
88
+
89
+ ```
90
+ const [file_comment] = await FileComment.list()
91
+
92
+ await file_comment.delete()
93
+ ```
94
+
95
+ ### Parameters
96
+
97
+ * `id` (int64): Required - File Comment ID.
98
+
@@ -0,0 +1,50 @@
1
+ # FileCommentReaction
2
+
3
+ ## Example FileCommentReaction Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "emoji": "👍"
9
+ }
10
+ ```
11
+
12
+ * `id` (int64): Reaction ID
13
+ * `emoji` (string): Emoji used in the reaction.
14
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
15
+ * `file_comment_id` (int64): ID of file comment to attach reaction to.
16
+
17
+ ---
18
+
19
+ ## Create File Comment Reaction
20
+
21
+ ```
22
+ await FileCommentReaction.create({
23
+ 'user_id': 1,
24
+ 'file_comment_id': 1,
25
+ 'emoji': "emoji",
26
+ })
27
+ ```
28
+
29
+
30
+ ### Parameters
31
+
32
+ * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
33
+ * `file_comment_id` (int64): Required - ID of file comment to attach reaction to.
34
+ * `emoji` (string): Required - Emoji to react with.
35
+
36
+ ---
37
+
38
+ ## Delete File Comment Reaction
39
+
40
+ ```
41
+ const file_comment_reaction = new FileCommentReaction()
42
+ file_comment_reaction.path = myFilePath
43
+
44
+ await file_comment_reaction.delete()
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ * `id` (int64): Required - File Comment Reaction ID.
50
+
@@ -0,0 +1,40 @@
1
+ # FileMigration
2
+
3
+ ## Example FileMigration Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "path": "MyFolder",
9
+ "dest_path": "MyFolder",
10
+ "files_moved": 1,
11
+ "files_total": 1,
12
+ "operation": "move",
13
+ "region": "USA",
14
+ "status": "complete",
15
+ "log_url": "https://www.example.com/log_file"
16
+ }
17
+ ```
18
+
19
+ * `id` (int64): File migration ID
20
+ * `path` (string): Source path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
21
+ * `dest_path` (string): Destination path
22
+ * `files_moved` (int64): Number of files processed
23
+ * `files_total` (int64): Total number of files to process
24
+ * `operation` (string): The type of operation
25
+ * `region` (string): Region
26
+ * `status` (string): Status
27
+ * `log_url` (string): Link to download the log file for this migration.
28
+
29
+ ---
30
+
31
+ ## Show File Migration
32
+
33
+ ```
34
+ await FileMigration.find(id)
35
+ ```
36
+
37
+
38
+ ### Parameters
39
+
40
+ * `id` (int64): Required - File Migration ID.
@@ -0,0 +1,39 @@
1
+ # FileUploadPart
2
+
3
+ ## Example FileUploadPart Object
4
+
5
+ ```
6
+ {
7
+ "send": "",
8
+ "action": "multipart",
9
+ "ask_about_overwrites": true,
10
+ "available_parts": 1,
11
+ "expires": "",
12
+ "headers": "",
13
+ "http_method": "PUT",
14
+ "next_partsize": 1,
15
+ "parallel_parts": true,
16
+ "parameters": "{}",
17
+ "part_number": 1,
18
+ "partsize": 1,
19
+ "path": "",
20
+ "ref": "upload-1",
21
+ "upload_uri": ""
22
+ }
23
+ ```
24
+
25
+ * `send` (object): Content-Type and File to send
26
+ * `action` (string): Type of upload
27
+ * `ask_about_overwrites` (boolean): If `true`, this file exists and you may wish to ask the user for overwrite confirmation
28
+ * `available_parts` (int64): Number of parts in the upload
29
+ * `expires` (string): Date/time of when this Upload part expires and the URL cannot be used any more
30
+ * `headers` (object): Additional upload headers to provide as part of the upload
31
+ * `http_method` (string): HTTP Method to use for uploading the part, usually `PUT`
32
+ * `next_partsize` (int64): Size in bytes for this part
33
+ * `parallel_parts` (boolean): If `true`, multiple parts may be uploaded in parallel. If `false`, be sure to only upload one part at a time, in order.
34
+ * `parameters` (object): Additional HTTP parameters to send with the upload
35
+ * `part_number` (int64): Number of this upload part
36
+ * `partsize` (int64): Size in bytes for the next upload part
37
+ * `path` (string): New file path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
38
+ * `ref` (string): Reference name for this upload part
39
+ * `upload_uri` (string): URI to upload this part to