files.com 1.0.166 → 1.0.167
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/README.md +9 -5
- package/_VERSION +1 -1
- package/lib/models/ActionWebhookFailure.js +8 -2
- package/lib/models/ApiKey.js +16 -4
- package/lib/models/As2Partner.js +16 -4
- package/lib/models/As2Station.js +16 -4
- package/lib/models/Automation.js +16 -4
- package/lib/models/Behavior.js +16 -4
- package/lib/models/Bundle.js +24 -6
- package/lib/models/Clickwrap.js +16 -4
- package/lib/models/File.js +309 -311
- package/lib/models/FileComment.js +16 -4
- package/lib/models/FileCommentReaction.js +8 -2
- package/lib/models/FormFieldSet.js +16 -4
- package/lib/models/Group.js +16 -4
- package/lib/models/GroupUser.js +16 -4
- package/lib/models/Lock.js +8 -2
- package/lib/models/Message.js +16 -4
- package/lib/models/MessageComment.js +16 -4
- package/lib/models/MessageCommentReaction.js +8 -2
- package/lib/models/MessageReaction.js +8 -2
- package/lib/models/Notification.js +16 -4
- package/lib/models/Permission.js +8 -2
- package/lib/models/Project.js +16 -4
- package/lib/models/PublicKey.js +16 -4
- package/lib/models/RemoteServer.js +16 -4
- package/lib/models/Request.js +8 -2
- package/lib/models/SsoStrategy.js +8 -2
- package/lib/models/Style.js +16 -4
- package/lib/models/User.js +40 -10
- package/lib/models/UserRequest.js +8 -2
- package/package.json +1 -1
- package/src/models/ActionWebhookFailure.js +3 -1
- package/src/models/ApiKey.js +6 -2
- package/src/models/As2Partner.js +6 -2
- package/src/models/As2Station.js +6 -2
- package/src/models/Automation.js +6 -2
- package/src/models/Behavior.js +6 -2
- package/src/models/Bundle.js +9 -3
- package/src/models/Clickwrap.js +6 -2
- package/src/models/File.js +26 -19
- package/src/models/FileComment.js +6 -2
- package/src/models/FileCommentReaction.js +3 -1
- package/src/models/FormFieldSet.js +6 -2
- package/src/models/Group.js +6 -2
- package/src/models/GroupUser.js +6 -2
- package/src/models/Lock.js +3 -1
- package/src/models/Message.js +6 -2
- package/src/models/MessageComment.js +6 -2
- package/src/models/MessageCommentReaction.js +3 -1
- package/src/models/MessageReaction.js +3 -1
- package/src/models/Notification.js +6 -2
- package/src/models/Permission.js +3 -1
- package/src/models/Project.js +6 -2
- package/src/models/PublicKey.js +6 -2
- package/src/models/RemoteServer.js +6 -2
- package/src/models/Request.js +3 -1
- package/src/models/SsoStrategy.js +3 -1
- package/src/models/Style.js +6 -2
- package/src/models/User.js +15 -5
- package/src/models/UserRequest.js +3 -1
- package/test/src/index.js +7 -3
@@ -86,7 +86,9 @@ class MessageComment {
|
|
86
86
|
}
|
87
87
|
}
|
88
88
|
|
89
|
-
|
89
|
+
const response = await Api.sendRequest(`/message_comments/${params['id']}`, 'PATCH', params, this.options)
|
90
|
+
|
91
|
+
return new MessageComment(response?.data, this.options)
|
90
92
|
}
|
91
93
|
|
92
94
|
delete = async (params = {}) => {
|
@@ -111,7 +113,9 @@ class MessageComment {
|
|
111
113
|
}
|
112
114
|
}
|
113
115
|
|
114
|
-
|
116
|
+
const response = await Api.sendRequest(`/message_comments/${params['id']}`, 'DELETE', params, this.options)
|
117
|
+
|
118
|
+
return response?.data
|
115
119
|
}
|
116
120
|
|
117
121
|
destroy = (params = {}) =>
|
@@ -66,7 +66,9 @@ class MessageCommentReaction {
|
|
66
66
|
}
|
67
67
|
}
|
68
68
|
|
69
|
-
|
69
|
+
const response = await Api.sendRequest(`/message_comment_reactions/${params['id']}`, 'DELETE', params, this.options)
|
70
|
+
|
71
|
+
return response?.data
|
70
72
|
}
|
71
73
|
|
72
74
|
destroy = (params = {}) =>
|
@@ -66,7 +66,9 @@ class MessageReaction {
|
|
66
66
|
}
|
67
67
|
}
|
68
68
|
|
69
|
-
|
69
|
+
const response = await Api.sendRequest(`/message_reactions/${params['id']}`, 'DELETE', params, this.options)
|
70
|
+
|
71
|
+
return response?.data
|
70
72
|
}
|
71
73
|
|
72
74
|
destroy = (params = {}) =>
|
@@ -144,7 +144,9 @@ class Notification {
|
|
144
144
|
}
|
145
145
|
}
|
146
146
|
|
147
|
-
|
147
|
+
const response = await Api.sendRequest(`/notifications/${params['id']}`, 'PATCH', params, this.options)
|
148
|
+
|
149
|
+
return new Notification(response?.data, this.options)
|
148
150
|
}
|
149
151
|
|
150
152
|
delete = async (params = {}) => {
|
@@ -169,7 +171,9 @@ class Notification {
|
|
169
171
|
}
|
170
172
|
}
|
171
173
|
|
172
|
-
|
174
|
+
const response = await Api.sendRequest(`/notifications/${params['id']}`, 'DELETE', params, this.options)
|
175
|
+
|
176
|
+
return response?.data
|
173
177
|
}
|
174
178
|
|
175
179
|
destroy = (params = {}) =>
|
package/src/models/Permission.js
CHANGED
@@ -101,7 +101,9 @@ class Permission {
|
|
101
101
|
}
|
102
102
|
}
|
103
103
|
|
104
|
-
|
104
|
+
const response = await Api.sendRequest(`/permissions/${params['id']}`, 'DELETE', params, this.options)
|
105
|
+
|
106
|
+
return response?.data
|
105
107
|
}
|
106
108
|
|
107
109
|
destroy = (params = {}) =>
|
package/src/models/Project.js
CHANGED
@@ -72,7 +72,9 @@ class Project {
|
|
72
72
|
}
|
73
73
|
}
|
74
74
|
|
75
|
-
|
75
|
+
const response = await Api.sendRequest(`/projects/${params['id']}`, 'PATCH', params, this.options)
|
76
|
+
|
77
|
+
return new Project(response?.data, this.options)
|
76
78
|
}
|
77
79
|
|
78
80
|
delete = async (params = {}) => {
|
@@ -97,7 +99,9 @@ class Project {
|
|
97
99
|
}
|
98
100
|
}
|
99
101
|
|
100
|
-
|
102
|
+
const response = await Api.sendRequest(`/projects/${params['id']}`, 'DELETE', params, this.options)
|
103
|
+
|
104
|
+
return response?.data
|
101
105
|
}
|
102
106
|
|
103
107
|
destroy = (params = {}) =>
|
package/src/models/PublicKey.js
CHANGED
@@ -96,7 +96,9 @@ class PublicKey {
|
|
96
96
|
}
|
97
97
|
}
|
98
98
|
|
99
|
-
|
99
|
+
const response = await Api.sendRequest(`/public_keys/${params['id']}`, 'PATCH', params, this.options)
|
100
|
+
|
101
|
+
return new PublicKey(response?.data, this.options)
|
100
102
|
}
|
101
103
|
|
102
104
|
delete = async (params = {}) => {
|
@@ -121,7 +123,9 @@ class PublicKey {
|
|
121
123
|
}
|
122
124
|
}
|
123
125
|
|
124
|
-
|
126
|
+
const response = await Api.sendRequest(`/public_keys/${params['id']}`, 'DELETE', params, this.options)
|
127
|
+
|
128
|
+
return response?.data
|
125
129
|
}
|
126
130
|
|
127
131
|
destroy = (params = {}) =>
|
@@ -551,7 +551,9 @@ class RemoteServer {
|
|
551
551
|
}
|
552
552
|
}
|
553
553
|
|
554
|
-
|
554
|
+
const response = await Api.sendRequest(`/remote_servers/${params['id']}`, 'PATCH', params, this.options)
|
555
|
+
|
556
|
+
return new RemoteServer(response?.data, this.options)
|
555
557
|
}
|
556
558
|
|
557
559
|
delete = async (params = {}) => {
|
@@ -576,7 +578,9 @@ class RemoteServer {
|
|
576
578
|
}
|
577
579
|
}
|
578
580
|
|
579
|
-
|
581
|
+
const response = await Api.sendRequest(`/remote_servers/${params['id']}`, 'DELETE', params, this.options)
|
582
|
+
|
583
|
+
return response?.data
|
580
584
|
}
|
581
585
|
|
582
586
|
destroy = (params = {}) =>
|
package/src/models/Request.js
CHANGED
@@ -101,7 +101,9 @@ class Request {
|
|
101
101
|
}
|
102
102
|
}
|
103
103
|
|
104
|
-
|
104
|
+
const response = await Api.sendRequest(`/requests/${params['id']}`, 'DELETE', params, this.options)
|
105
|
+
|
106
|
+
return response?.data
|
105
107
|
}
|
106
108
|
|
107
109
|
destroy = (params = {}) =>
|
@@ -175,7 +175,9 @@ class SsoStrategy {
|
|
175
175
|
}
|
176
176
|
}
|
177
177
|
|
178
|
-
|
178
|
+
const response = await Api.sendRequest(`/sso_strategies/${params['id']}/sync`, 'POST', params, this.options)
|
179
|
+
|
180
|
+
return response?.data
|
179
181
|
}
|
180
182
|
|
181
183
|
// Parameters:
|
package/src/models/Style.js
CHANGED
@@ -90,7 +90,9 @@ class Style {
|
|
90
90
|
}
|
91
91
|
}
|
92
92
|
|
93
|
-
|
93
|
+
const response = await Api.sendRequest(`/styles/${params['path']}`, 'PATCH', params, this.options)
|
94
|
+
|
95
|
+
return new Style(response?.data, this.options)
|
94
96
|
}
|
95
97
|
|
96
98
|
delete = async (params = {}) => {
|
@@ -115,7 +117,9 @@ class Style {
|
|
115
117
|
}
|
116
118
|
}
|
117
119
|
|
118
|
-
|
120
|
+
const response = await Api.sendRequest(`/styles/${params['path']}`, 'DELETE', params, this.options)
|
121
|
+
|
122
|
+
return response?.data
|
119
123
|
}
|
120
124
|
|
121
125
|
destroy = (params = {}) =>
|
package/src/models/User.js
CHANGED
@@ -448,7 +448,9 @@ class User {
|
|
448
448
|
}
|
449
449
|
}
|
450
450
|
|
451
|
-
|
451
|
+
const response = await Api.sendRequest(`/users/${params['id']}/unlock`, 'POST', params, this.options)
|
452
|
+
|
453
|
+
return response?.data
|
452
454
|
}
|
453
455
|
|
454
456
|
// Resend user welcome email
|
@@ -474,7 +476,9 @@ class User {
|
|
474
476
|
}
|
475
477
|
}
|
476
478
|
|
477
|
-
|
479
|
+
const response = await Api.sendRequest(`/users/${params['id']}/resend_welcome_email`, 'POST', params, this.options)
|
480
|
+
|
481
|
+
return response?.data
|
478
482
|
}
|
479
483
|
|
480
484
|
// Trigger 2FA Reset process for user who has lost access to their existing 2FA methods
|
@@ -500,7 +504,9 @@ class User {
|
|
500
504
|
}
|
501
505
|
}
|
502
506
|
|
503
|
-
|
507
|
+
const response = await Api.sendRequest(`/users/${params['id']}/2fa/reset`, 'POST', params, this.options)
|
508
|
+
|
509
|
+
return response?.data
|
504
510
|
}
|
505
511
|
|
506
512
|
// Parameters:
|
@@ -645,7 +651,9 @@ class User {
|
|
645
651
|
}
|
646
652
|
}
|
647
653
|
|
648
|
-
|
654
|
+
const response = await Api.sendRequest(`/users/${params['id']}`, 'PATCH', params, this.options)
|
655
|
+
|
656
|
+
return new User(response?.data, this.options)
|
649
657
|
}
|
650
658
|
|
651
659
|
delete = async (params = {}) => {
|
@@ -670,7 +678,9 @@ class User {
|
|
670
678
|
}
|
671
679
|
}
|
672
680
|
|
673
|
-
|
681
|
+
const response = await Api.sendRequest(`/users/${params['id']}`, 'DELETE', params, this.options)
|
682
|
+
|
683
|
+
return response?.data
|
674
684
|
}
|
675
685
|
|
676
686
|
destroy = (params = {}) =>
|
@@ -73,7 +73,9 @@ class UserRequest {
|
|
73
73
|
}
|
74
74
|
}
|
75
75
|
|
76
|
-
|
76
|
+
const response = await Api.sendRequest(`/user_requests/${params['id']}`, 'DELETE', params, this.options)
|
77
|
+
|
78
|
+
return response?.data
|
77
79
|
}
|
78
80
|
|
79
81
|
destroy = (params = {}) =>
|
package/test/src/index.js
CHANGED
@@ -70,14 +70,18 @@ const testSuite = async () => {
|
|
70
70
|
assert(!!file.path)
|
71
71
|
assert(file.display_name === displayName)
|
72
72
|
|
73
|
-
const foundFile = await File.
|
74
|
-
|
73
|
+
const foundFile = await File.find(destinationPath)
|
74
|
+
|
75
75
|
assert(foundFile.path === destinationPath)
|
76
76
|
assert(foundFile.display_name === displayName)
|
77
|
+
assert(typeof foundFile.getDownloadUri() === 'undefined')
|
77
78
|
|
78
79
|
if (!isBrowser()) {
|
80
|
+
const downloadableFile = await foundFile.download()
|
81
|
+
assert(typeof downloadableFile.getDownloadUri() !== 'undefined')
|
82
|
+
|
79
83
|
const downloadPath = `./${displayName}`
|
80
|
-
await
|
84
|
+
await downloadableFile.downloadToFile(downloadPath)
|
81
85
|
|
82
86
|
const fs = require('fs')
|
83
87
|
const originalBuffer = fs.readFileSync(sourceFilePath)
|