files.com 1.0.146 → 1.0.150
Sign up to get free protection for your applications and to get access to all the features.
- package/_VERSION +1 -1
- package/lib/Api.js +6 -5
- package/lib/Files.js +4 -4
- package/lib/Logger.js +4 -3
- package/lib/models/AccountLineItem.js +6 -5
- package/lib/models/Action.js +6 -5
- package/lib/models/ActionNotificationExport.js +6 -5
- package/lib/models/ActionNotificationExportResult.js +6 -5
- package/lib/models/ActionWebhookFailure.js +6 -5
- package/lib/models/ApiKey.js +6 -5
- package/lib/models/App.js +6 -5
- package/lib/models/As2IncomingMessage.js +160 -0
- package/lib/models/As2OutgoingMessage.js +151 -0
- package/lib/models/{As2Key.js → As2Partner.js} +109 -91
- package/lib/models/As2Station.js +504 -0
- package/lib/models/Auto.js +6 -5
- package/lib/models/Automation.js +6 -5
- package/lib/models/AutomationRun.js +6 -5
- package/lib/models/BandwidthSnapshot.js +6 -5
- package/lib/models/Behavior.js +6 -5
- package/lib/models/Bundle.js +6 -5
- package/lib/models/BundleDownload.js +6 -5
- package/lib/models/BundleRecipient.js +6 -5
- package/lib/models/BundleRegistration.js +6 -5
- package/lib/models/Clickwrap.js +6 -5
- package/lib/models/DnsRecord.js +6 -5
- package/lib/models/Errors.js +6 -5
- package/lib/models/ExternalEvent.js +6 -5
- package/lib/models/File.js +6 -5
- package/lib/models/FileAction.js +6 -5
- package/lib/models/FileComment.js +6 -5
- package/lib/models/FileCommentReaction.js +6 -5
- package/lib/models/FileMigration.js +6 -5
- package/lib/models/FileUploadPart.js +6 -5
- package/lib/models/Folder.js +6 -5
- package/lib/models/FormField.js +6 -5
- package/lib/models/FormFieldSet.js +6 -5
- package/lib/models/Group.js +6 -5
- package/lib/models/GroupUser.js +6 -5
- package/lib/models/History.js +6 -5
- package/lib/models/HistoryExport.js +6 -5
- package/lib/models/HistoryExportResult.js +6 -5
- package/lib/models/Image.js +6 -5
- package/lib/models/InboxRecipient.js +6 -5
- package/lib/models/InboxRegistration.js +6 -5
- package/lib/models/InboxUpload.js +6 -5
- package/lib/models/Invoice.js +6 -5
- package/lib/models/InvoiceLineItem.js +6 -5
- package/lib/models/IpAddress.js +6 -5
- package/lib/models/Lock.js +6 -5
- package/lib/models/Message.js +6 -5
- package/lib/models/MessageComment.js +6 -5
- package/lib/models/MessageCommentReaction.js +6 -5
- package/lib/models/MessageReaction.js +6 -5
- package/lib/models/Notification.js +6 -5
- package/lib/models/Payment.js +6 -5
- package/lib/models/PaymentLineItem.js +6 -5
- package/lib/models/Permission.js +6 -5
- package/lib/models/Preview.js +6 -5
- package/lib/models/Priority.js +6 -5
- package/lib/models/Project.js +6 -5
- package/lib/models/PublicIpAddress.js +6 -5
- package/lib/models/PublicKey.js +6 -5
- package/lib/models/RemoteServer.js +6 -5
- package/lib/models/Request.js +6 -5
- package/lib/models/Session.js +6 -5
- package/lib/models/SettingsChange.js +6 -5
- package/lib/models/Site.js +6 -5
- package/lib/models/SsoStrategy.js +6 -5
- package/lib/models/Status.js +6 -5
- package/lib/models/Style.js +6 -5
- package/lib/models/SyncJob.js +6 -5
- package/lib/models/UsageDailySnapshot.js +6 -5
- package/lib/models/UsageSnapshot.js +6 -5
- package/lib/models/User.js +6 -5
- package/lib/models/UserCipherUse.js +6 -5
- package/lib/models/UserRequest.js +6 -5
- package/lib/models/WebhookTest.js +6 -5
- package/package.json +1 -1
- package/src/models/App.js +6 -6
- package/src/models/As2IncomingMessage.js +94 -0
- package/src/models/As2OutgoingMessage.js +85 -0
- package/src/models/As2Partner.js +233 -0
- package/src/models/As2Station.js +264 -0
- package/src/models/ExternalEvent.js +6 -6
- package/src/models/Folder.js +1 -1
- package/src/models/HistoryExport.js +2 -2
- package/src/models/HistoryExportResult.js +1 -1
- package/src/models/Permission.js +6 -6
- package/src/models/UsageDailySnapshot.js +6 -6
- package/src/models/User.js +6 -6
- package/src/models/As2Key.js +0 -221
@@ -39,12 +39,12 @@ class UsageDailySnapshot {
|
|
39
39
|
// 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.
|
40
40
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
41
41
|
// 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 `date` and `usage_snapshot_id`.
|
42
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
43
|
-
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
44
|
-
// filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
45
|
-
// filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
46
|
-
// filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
47
|
-
// filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`.
|
42
|
+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
43
|
+
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
44
|
+
// filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
45
|
+
// filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
46
|
+
// filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
47
|
+
// filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `date` and `usage_snapshot_id`. Valid field combinations are `[ usage_snapshot_id, date ]`.
|
48
48
|
static list = async (params = {}, options = {}) => {
|
49
49
|
if (params['cursor'] && !isString(params['cursor'])) {
|
50
50
|
throw new Error(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
|
package/src/models/User.js
CHANGED
@@ -690,12 +690,12 @@ class User {
|
|
690
690
|
// 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.
|
691
691
|
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
692
692
|
// 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 `authenticate_until`, `email`, `last_desktop_login_at`, `last_login_at`, `username`, `company`, `name`, `site_admin`, `receive_admin_alerts`, `password_validity_days`, `ssl_required` or `not_site_admin`.
|
693
|
-
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
694
|
-
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
695
|
-
// filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
696
|
-
// filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
697
|
-
// filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
698
|
-
// filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`.
|
693
|
+
// filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
694
|
+
// filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
695
|
+
// filter_gteq - object - If set, return records where the specified field is greater than or equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
696
|
+
// filter_like - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
697
|
+
// filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
698
|
+
// filter_lteq - object - If set, return records where the specified field is less than or equal to the supplied value. Valid fields are `username`, `email`, `company`, `site_admin`, `password_validity_days`, `ssl_required`, `last_login_at`, `authenticate_until` or `not_site_admin`. Valid field combinations are `[ not_site_admin, username ]`.
|
699
699
|
// ids - string - comma-separated list of User IDs
|
700
700
|
// q[username] - string - List users matching username.
|
701
701
|
// q[email] - string - List users matching email.
|
package/src/models/As2Key.js
DELETED
@@ -1,221 +0,0 @@
|
|
1
|
-
import Api from '../Api'
|
2
|
-
import Logger from '../Logger'
|
3
|
-
import { getType, isArray, isBrowser, isInt, isObject, isString } from '../utils'
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Class As2Key
|
7
|
-
*/
|
8
|
-
class As2Key {
|
9
|
-
attributes = {}
|
10
|
-
options = {}
|
11
|
-
|
12
|
-
constructor(attributes = {}, options = {}) {
|
13
|
-
Object.entries(attributes).forEach(([key, value]) => {
|
14
|
-
const normalizedKey = key.replace('?', '')
|
15
|
-
|
16
|
-
this.attributes[normalizedKey] = value
|
17
|
-
|
18
|
-
Object.defineProperty(this, normalizedKey, { value, writable: false })
|
19
|
-
})
|
20
|
-
|
21
|
-
this.options = { ...options }
|
22
|
-
}
|
23
|
-
|
24
|
-
isLoaded = () => !!this.attributes.id
|
25
|
-
// int64 # AS2 Key ID
|
26
|
-
getId = () => this.attributes.id
|
27
|
-
|
28
|
-
setId = value => {
|
29
|
-
this.attributes.id = value
|
30
|
-
}
|
31
|
-
|
32
|
-
// string # AS2 Partnership Name
|
33
|
-
getAs2PartnershipName = () => this.attributes.as2_partnership_name
|
34
|
-
|
35
|
-
setAs2PartnershipName = value => {
|
36
|
-
this.attributes.as2_partnership_name = value
|
37
|
-
}
|
38
|
-
|
39
|
-
// date-time # AS2 Key created at date/time
|
40
|
-
getCreatedAt = () => this.attributes.created_at
|
41
|
-
|
42
|
-
// string # Public key fingerprint
|
43
|
-
getFingerprint = () => this.attributes.fingerprint
|
44
|
-
|
45
|
-
setFingerprint = value => {
|
46
|
-
this.attributes.fingerprint = value
|
47
|
-
}
|
48
|
-
|
49
|
-
// int64 # User ID. Provide a value of `0` to operate the current session's user.
|
50
|
-
getUserId = () => this.attributes.user_id
|
51
|
-
|
52
|
-
setUserId = value => {
|
53
|
-
this.attributes.user_id = value
|
54
|
-
}
|
55
|
-
|
56
|
-
// string # Actual contents of Public key.
|
57
|
-
getPublicKey = () => this.attributes.public_key
|
58
|
-
|
59
|
-
setPublicKey = value => {
|
60
|
-
this.attributes.public_key = value
|
61
|
-
}
|
62
|
-
|
63
|
-
|
64
|
-
// Parameters:
|
65
|
-
// as2_partnership_name (required) - string - AS2 Partnership Name
|
66
|
-
update = async (params = {}) => {
|
67
|
-
if (!this.attributes.id) {
|
68
|
-
throw new Error('Current object has no id')
|
69
|
-
}
|
70
|
-
|
71
|
-
if (!isObject(params)) {
|
72
|
-
throw new Error(`Bad parameter: params must be of type object, received ${getType(params)}`)
|
73
|
-
}
|
74
|
-
|
75
|
-
params.id = this.attributes.id
|
76
|
-
if (params['id'] && !isInt(params['id'])) {
|
77
|
-
throw new Error(`Bad parameter: id must be of type Int, received ${getType(id)}`)
|
78
|
-
}
|
79
|
-
if (params['as2_partnership_name'] && !isString(params['as2_partnership_name'])) {
|
80
|
-
throw new Error(`Bad parameter: as2_partnership_name must be of type String, received ${getType(as2_partnership_name)}`)
|
81
|
-
}
|
82
|
-
|
83
|
-
if (!params['id']) {
|
84
|
-
if (this.attributes.id) {
|
85
|
-
params['id'] = this.id
|
86
|
-
} else {
|
87
|
-
throw new Error('Parameter missing: id')
|
88
|
-
}
|
89
|
-
}
|
90
|
-
|
91
|
-
if (!params['as2_partnership_name']) {
|
92
|
-
if (this.attributes.as2_partnership_name) {
|
93
|
-
params['as2_partnership_name'] = this.as2_partnership_name
|
94
|
-
} else {
|
95
|
-
throw new Error('Parameter missing: as2_partnership_name')
|
96
|
-
}
|
97
|
-
}
|
98
|
-
|
99
|
-
return Api.sendRequest(`/as2_keys/${params['id']}`, 'PATCH', params, this.options)
|
100
|
-
}
|
101
|
-
|
102
|
-
delete = async (params = {}) => {
|
103
|
-
if (!this.attributes.id) {
|
104
|
-
throw new Error('Current object has no id')
|
105
|
-
}
|
106
|
-
|
107
|
-
if (!isObject(params)) {
|
108
|
-
throw new Error(`Bad parameter: params must be of type object, received ${getType(params)}`)
|
109
|
-
}
|
110
|
-
|
111
|
-
params.id = this.attributes.id
|
112
|
-
if (params['id'] && !isInt(params['id'])) {
|
113
|
-
throw new Error(`Bad parameter: id must be of type Int, received ${getType(id)}`)
|
114
|
-
}
|
115
|
-
|
116
|
-
if (!params['id']) {
|
117
|
-
if (this.attributes.id) {
|
118
|
-
params['id'] = this.id
|
119
|
-
} else {
|
120
|
-
throw new Error('Parameter missing: id')
|
121
|
-
}
|
122
|
-
}
|
123
|
-
|
124
|
-
return Api.sendRequest(`/as2_keys/${params['id']}`, 'DELETE', params, this.options)
|
125
|
-
}
|
126
|
-
|
127
|
-
destroy = (params = {}) =>
|
128
|
-
this.delete(params)
|
129
|
-
|
130
|
-
save = () => {
|
131
|
-
if (this.attributes['id']) {
|
132
|
-
return this.update(this.attributes)
|
133
|
-
} else {
|
134
|
-
const newObject = As2Key.create(this.attributes, this.options)
|
135
|
-
this.attributes = { ...newObject.attributes }
|
136
|
-
return true
|
137
|
-
}
|
138
|
-
}
|
139
|
-
|
140
|
-
// Parameters:
|
141
|
-
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
142
|
-
// 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.
|
143
|
-
// per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
144
|
-
static list = async (params = {}, options = {}) => {
|
145
|
-
if (params['user_id'] && !isInt(params['user_id'])) {
|
146
|
-
throw new Error(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
|
147
|
-
}
|
148
|
-
|
149
|
-
if (params['cursor'] && !isString(params['cursor'])) {
|
150
|
-
throw new Error(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
|
151
|
-
}
|
152
|
-
|
153
|
-
if (params['per_page'] && !isInt(params['per_page'])) {
|
154
|
-
throw new Error(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
|
155
|
-
}
|
156
|
-
|
157
|
-
const response = await Api.sendRequest(`/as2_keys`, 'GET', params, options)
|
158
|
-
|
159
|
-
return response?.data?.map(obj => new As2Key(obj, options)) || []
|
160
|
-
}
|
161
|
-
|
162
|
-
static all = (params = {}, options = {}) =>
|
163
|
-
As2Key.list(params, options)
|
164
|
-
|
165
|
-
// Parameters:
|
166
|
-
// id (required) - int64 - As2 Key ID.
|
167
|
-
static find = async (id, params = {}, options = {}) => {
|
168
|
-
if (!isObject(params)) {
|
169
|
-
throw new Error(`Bad parameter: params must be of type object, received ${getType(params)}`)
|
170
|
-
}
|
171
|
-
|
172
|
-
params['id'] = id
|
173
|
-
|
174
|
-
if (!params['id']) {
|
175
|
-
throw new Error('Parameter missing: id')
|
176
|
-
}
|
177
|
-
|
178
|
-
if (params['id'] && !isInt(params['id'])) {
|
179
|
-
throw new Error(`Bad parameter: id must be of type Int, received ${getType(id)}`)
|
180
|
-
}
|
181
|
-
|
182
|
-
const response = await Api.sendRequest(`/as2_keys/${params['id']}`, 'GET', params, options)
|
183
|
-
|
184
|
-
return new As2Key(response?.data, options)
|
185
|
-
}
|
186
|
-
|
187
|
-
static get = (id, params = {}, options = {}) =>
|
188
|
-
As2Key.find(id, params, options)
|
189
|
-
|
190
|
-
// Parameters:
|
191
|
-
// user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
192
|
-
// as2_partnership_name (required) - string - AS2 Partnership Name
|
193
|
-
// public_key (required) - string - Actual contents of Public key.
|
194
|
-
static create = async (params = {}, options = {}) => {
|
195
|
-
if (!params['as2_partnership_name']) {
|
196
|
-
throw new Error('Parameter missing: as2_partnership_name')
|
197
|
-
}
|
198
|
-
|
199
|
-
if (!params['public_key']) {
|
200
|
-
throw new Error('Parameter missing: public_key')
|
201
|
-
}
|
202
|
-
|
203
|
-
if (params['user_id'] && !isInt(params['user_id'])) {
|
204
|
-
throw new Error(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
|
205
|
-
}
|
206
|
-
|
207
|
-
if (params['as2_partnership_name'] && !isString(params['as2_partnership_name'])) {
|
208
|
-
throw new Error(`Bad parameter: as2_partnership_name must be of type String, received ${getType(as2_partnership_name)}`)
|
209
|
-
}
|
210
|
-
|
211
|
-
if (params['public_key'] && !isString(params['public_key'])) {
|
212
|
-
throw new Error(`Bad parameter: public_key must be of type String, received ${getType(public_key)}`)
|
213
|
-
}
|
214
|
-
|
215
|
-
const response = await Api.sendRequest(`/as2_keys`, 'POST', params, options)
|
216
|
-
|
217
|
-
return new As2Key(response?.data, options)
|
218
|
-
}
|
219
|
-
}
|
220
|
-
|
221
|
-
export default As2Key
|