files.com 1.0.194 → 1.0.197

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. package/_VERSION +1 -1
  2. package/lib/Errors.js +7 -3
  3. package/lib/models/ActionNotificationExport.js +11 -11
  4. package/lib/models/ActionNotificationExportResult.js +4 -4
  5. package/lib/models/ActionWebhookFailure.js +1 -1
  6. package/lib/models/ApiKey.js +15 -15
  7. package/lib/models/App.js +2 -2
  8. package/lib/models/As2IncomingMessage.js +3 -3
  9. package/lib/models/As2OutgoingMessage.js +3 -3
  10. package/lib/models/As2Partner.js +11 -11
  11. package/lib/models/As2Station.js +10 -10
  12. package/lib/models/Automation.js +21 -21
  13. package/lib/models/AutomationRun.js +6 -6
  14. package/lib/models/BandwidthSnapshot.js +2 -2
  15. package/lib/models/Behavior.js +22 -22
  16. package/lib/models/Bundle.js +19 -19
  17. package/lib/models/BundleDownload.js +4 -4
  18. package/lib/models/BundleRecipient.js +10 -10
  19. package/lib/models/BundleRegistration.js +4 -4
  20. package/lib/models/Clickwrap.js +11 -11
  21. package/lib/models/DnsRecord.js +2 -2
  22. package/lib/models/ExternalEvent.js +6 -6
  23. package/lib/models/File.js +20 -20
  24. package/lib/models/FileComment.js +8 -8
  25. package/lib/models/FileCommentReaction.js +4 -4
  26. package/lib/models/FileMigration.js +2 -2
  27. package/lib/models/Folder.js +9 -9
  28. package/lib/models/FormFieldSet.js +10 -10
  29. package/lib/models/Group.js +11 -11
  30. package/lib/models/GroupUser.js +8 -8
  31. package/lib/models/History.js +31 -31
  32. package/lib/models/HistoryExport.js +24 -24
  33. package/lib/models/HistoryExportResult.js +4 -4
  34. package/lib/models/InboxRecipient.js +10 -10
  35. package/lib/models/InboxRegistration.js +3 -3
  36. package/lib/models/InboxUpload.js +4 -4
  37. package/lib/models/Invoice.js +4 -4
  38. package/lib/models/IpAddress.js +4 -4
  39. package/lib/models/Lock.js +9 -9
  40. package/lib/models/Message.js +12 -12
  41. package/lib/models/MessageComment.js +10 -10
  42. package/lib/models/MessageCommentReaction.js +9 -9
  43. package/lib/models/MessageReaction.js +9 -9
  44. package/lib/models/Notification.js +18 -18
  45. package/lib/models/Payment.js +4 -4
  46. package/lib/models/Permission.js +11 -11
  47. package/lib/models/Priority.js +3 -3
  48. package/lib/models/Project.js +7 -7
  49. package/lib/models/PublicKey.js +10 -10
  50. package/lib/models/RemoteBandwidthSnapshot.js +2 -2
  51. package/lib/models/RemoteServer.js +52 -52
  52. package/lib/models/Request.js +12 -12
  53. package/lib/models/Session.js +4 -4
  54. package/lib/models/SettingsChange.js +2 -2
  55. package/lib/models/Site.js +57 -57
  56. package/lib/models/SsoStrategy.js +5 -5
  57. package/lib/models/Style.js +4 -4
  58. package/lib/models/UsageDailySnapshot.js +2 -2
  59. package/lib/models/UsageSnapshot.js +2 -2
  60. package/lib/models/User.js +36 -36
  61. package/lib/models/UserCipherUse.js +3 -3
  62. package/lib/models/UserRequest.js +8 -8
  63. package/lib/models/WebhookTest.js +6 -6
  64. package/package.json +1 -1
  65. package/src/Errors.js +7 -3
  66. package/src/models/ActionNotificationExport.js +11 -11
  67. package/src/models/ActionNotificationExportResult.js +4 -4
  68. package/src/models/ActionWebhookFailure.js +1 -1
  69. package/src/models/ApiKey.js +15 -15
  70. package/src/models/App.js +2 -2
  71. package/src/models/As2IncomingMessage.js +3 -3
  72. package/src/models/As2OutgoingMessage.js +3 -3
  73. package/src/models/As2Partner.js +11 -11
  74. package/src/models/As2Station.js +10 -10
  75. package/src/models/Automation.js +21 -21
  76. package/src/models/AutomationRun.js +6 -6
  77. package/src/models/BandwidthSnapshot.js +2 -2
  78. package/src/models/Behavior.js +22 -22
  79. package/src/models/Bundle.js +19 -19
  80. package/src/models/BundleDownload.js +4 -4
  81. package/src/models/BundleRecipient.js +10 -10
  82. package/src/models/BundleRegistration.js +4 -4
  83. package/src/models/Clickwrap.js +11 -11
  84. package/src/models/DnsRecord.js +2 -2
  85. package/src/models/ExternalEvent.js +6 -6
  86. package/src/models/File.js +20 -20
  87. package/src/models/FileComment.js +8 -8
  88. package/src/models/FileCommentReaction.js +4 -4
  89. package/src/models/FileMigration.js +2 -2
  90. package/src/models/Folder.js +9 -9
  91. package/src/models/FormFieldSet.js +10 -10
  92. package/src/models/Group.js +11 -11
  93. package/src/models/GroupUser.js +8 -8
  94. package/src/models/History.js +31 -31
  95. package/src/models/HistoryExport.js +24 -24
  96. package/src/models/HistoryExportResult.js +4 -4
  97. package/src/models/InboxRecipient.js +10 -10
  98. package/src/models/InboxRegistration.js +3 -3
  99. package/src/models/InboxUpload.js +4 -4
  100. package/src/models/Invoice.js +4 -4
  101. package/src/models/IpAddress.js +4 -4
  102. package/src/models/Lock.js +9 -9
  103. package/src/models/Message.js +12 -12
  104. package/src/models/MessageComment.js +10 -10
  105. package/src/models/MessageCommentReaction.js +9 -9
  106. package/src/models/MessageReaction.js +9 -9
  107. package/src/models/Notification.js +18 -18
  108. package/src/models/Payment.js +4 -4
  109. package/src/models/Permission.js +11 -11
  110. package/src/models/Priority.js +3 -3
  111. package/src/models/Project.js +7 -7
  112. package/src/models/PublicKey.js +10 -10
  113. package/src/models/RemoteBandwidthSnapshot.js +2 -2
  114. package/src/models/RemoteServer.js +52 -52
  115. package/src/models/Request.js +12 -12
  116. package/src/models/Session.js +4 -4
  117. package/src/models/SettingsChange.js +2 -2
  118. package/src/models/Site.js +57 -57
  119. package/src/models/SsoStrategy.js +5 -5
  120. package/src/models/Style.js +4 -4
  121. package/src/models/UsageDailySnapshot.js +2 -2
  122. package/src/models/UsageSnapshot.js +2 -2
  123. package/src/models/User.js +36 -36
  124. package/src/models/UserCipherUse.js +3 -3
  125. package/src/models/UserRequest.js +8 -8
  126. package/src/models/WebhookTest.js +6 -6
@@ -260,7 +260,7 @@ class Bundle {
260
260
  }
261
261
  }
262
262
 
263
- const response = await Api.sendRequest(`/bundles/${params['id']}/share`, 'POST', params, this.options)
263
+ const response = await Api.sendRequest(`/bundles/${encodeURIComponent(params['id'])}/share`, 'POST', params, this.options)
264
264
 
265
265
  return response?.data
266
266
  }
@@ -336,7 +336,7 @@ class Bundle {
336
336
  }
337
337
  }
338
338
 
339
- const response = await Api.sendRequest(`/bundles/${params['id']}`, 'PATCH', params, this.options)
339
+ const response = await Api.sendRequest(`/bundles/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
340
340
 
341
341
  return new Bundle(response?.data, this.options)
342
342
  }
@@ -363,7 +363,7 @@ class Bundle {
363
363
  }
364
364
  }
365
365
 
366
- const response = await Api.sendRequest(`/bundles/${params['id']}`, 'DELETE', params, this.options)
366
+ const response = await Api.sendRequest(`/bundles/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
367
367
 
368
368
  return response?.data
369
369
  }
@@ -394,15 +394,15 @@ class Bundle {
394
394
  // 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`.
395
395
  static list = async (params = {}, options = {}) => {
396
396
  if (params['user_id'] && !isInt(params['user_id'])) {
397
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
397
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
398
398
  }
399
399
 
400
400
  if (params['cursor'] && !isString(params['cursor'])) {
401
- throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
401
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
402
402
  }
403
403
 
404
404
  if (params['per_page'] && !isInt(params['per_page'])) {
405
- throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
405
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params['per_page'])}`)
406
406
  }
407
407
 
408
408
  const response = await Api.sendRequest(`/bundles`, 'GET', params, options)
@@ -427,10 +427,10 @@ class Bundle {
427
427
  }
428
428
 
429
429
  if (params['id'] && !isInt(params['id'])) {
430
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
430
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
431
431
  }
432
432
 
433
- const response = await Api.sendRequest(`/bundles/${params['id']}`, 'GET', params, options)
433
+ const response = await Api.sendRequest(`/bundles/${encodeURIComponent(params['id'])}`, 'GET', params, options)
434
434
 
435
435
  return new Bundle(response?.data, options)
436
436
  }
@@ -463,47 +463,47 @@ class Bundle {
463
463
  }
464
464
 
465
465
  if (params['user_id'] && !isInt(params['user_id'])) {
466
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
466
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
467
467
  }
468
468
 
469
469
  if (params['paths'] && !isArray(params['paths'])) {
470
- throw new errors.InvalidParameterError(`Bad parameter: paths must be of type Array, received ${getType(paths)}`)
470
+ throw new errors.InvalidParameterError(`Bad parameter: paths must be of type Array, received ${getType(params['paths'])}`)
471
471
  }
472
472
 
473
473
  if (params['password'] && !isString(params['password'])) {
474
- throw new errors.InvalidParameterError(`Bad parameter: password must be of type String, received ${getType(password)}`)
474
+ throw new errors.InvalidParameterError(`Bad parameter: password must be of type String, received ${getType(params['password'])}`)
475
475
  }
476
476
 
477
477
  if (params['form_field_set_id'] && !isInt(params['form_field_set_id'])) {
478
- throw new errors.InvalidParameterError(`Bad parameter: form_field_set_id must be of type Int, received ${getType(form_field_set_id)}`)
478
+ throw new errors.InvalidParameterError(`Bad parameter: form_field_set_id must be of type Int, received ${getType(params['form_field_set_id'])}`)
479
479
  }
480
480
 
481
481
  if (params['expires_at'] && !isString(params['expires_at'])) {
482
- throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(expires_at)}`)
482
+ throw new errors.InvalidParameterError(`Bad parameter: expires_at must be of type String, received ${getType(params['expires_at'])}`)
483
483
  }
484
484
 
485
485
  if (params['max_uses'] && !isInt(params['max_uses'])) {
486
- throw new errors.InvalidParameterError(`Bad parameter: max_uses must be of type Int, received ${getType(max_uses)}`)
486
+ throw new errors.InvalidParameterError(`Bad parameter: max_uses must be of type Int, received ${getType(params['max_uses'])}`)
487
487
  }
488
488
 
489
489
  if (params['description'] && !isString(params['description'])) {
490
- throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(description)}`)
490
+ throw new errors.InvalidParameterError(`Bad parameter: description must be of type String, received ${getType(params['description'])}`)
491
491
  }
492
492
 
493
493
  if (params['note'] && !isString(params['note'])) {
494
- throw new errors.InvalidParameterError(`Bad parameter: note must be of type String, received ${getType(note)}`)
494
+ throw new errors.InvalidParameterError(`Bad parameter: note must be of type String, received ${getType(params['note'])}`)
495
495
  }
496
496
 
497
497
  if (params['code'] && !isString(params['code'])) {
498
- throw new errors.InvalidParameterError(`Bad parameter: code must be of type String, received ${getType(code)}`)
498
+ throw new errors.InvalidParameterError(`Bad parameter: code must be of type String, received ${getType(params['code'])}`)
499
499
  }
500
500
 
501
501
  if (params['clickwrap_id'] && !isInt(params['clickwrap_id'])) {
502
- throw new errors.InvalidParameterError(`Bad parameter: clickwrap_id must be of type Int, received ${getType(clickwrap_id)}`)
502
+ throw new errors.InvalidParameterError(`Bad parameter: clickwrap_id must be of type Int, received ${getType(params['clickwrap_id'])}`)
503
503
  }
504
504
 
505
505
  if (params['inbox_id'] && !isInt(params['inbox_id'])) {
506
- throw new errors.InvalidParameterError(`Bad parameter: inbox_id must be of type Int, received ${getType(inbox_id)}`)
506
+ throw new errors.InvalidParameterError(`Bad parameter: inbox_id must be of type Int, received ${getType(params['inbox_id'])}`)
507
507
  }
508
508
 
509
509
  const response = await Api.sendRequest(`/bundles`, 'POST', params, options)
@@ -50,19 +50,19 @@ class BundleDownload {
50
50
  // bundle_registration_id - int64 - BundleRegistration ID
51
51
  static list = async (params = {}, options = {}) => {
52
52
  if (params['cursor'] && !isString(params['cursor'])) {
53
- throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
53
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
54
54
  }
55
55
 
56
56
  if (params['per_page'] && !isInt(params['per_page'])) {
57
- throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
57
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params['per_page'])}`)
58
58
  }
59
59
 
60
60
  if (params['bundle_id'] && !isInt(params['bundle_id'])) {
61
- throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(bundle_id)}`)
61
+ throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(params['bundle_id'])}`)
62
62
  }
63
63
 
64
64
  if (params['bundle_registration_id'] && !isInt(params['bundle_registration_id'])) {
65
- throw new errors.InvalidParameterError(`Bad parameter: bundle_registration_id must be of type Int, received ${getType(bundle_registration_id)}`)
65
+ throw new errors.InvalidParameterError(`Bad parameter: bundle_registration_id must be of type Int, received ${getType(params['bundle_registration_id'])}`)
66
66
  }
67
67
 
68
68
  const response = await Api.sendRequest(`/bundle_downloads`, 'GET', params, options)
@@ -108,19 +108,19 @@ class BundleRecipient {
108
108
  }
109
109
 
110
110
  if (params['user_id'] && !isInt(params['user_id'])) {
111
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
111
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
112
112
  }
113
113
 
114
114
  if (params['cursor'] && !isString(params['cursor'])) {
115
- throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
115
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
116
116
  }
117
117
 
118
118
  if (params['per_page'] && !isInt(params['per_page'])) {
119
- throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
119
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params['per_page'])}`)
120
120
  }
121
121
 
122
122
  if (params['bundle_id'] && !isInt(params['bundle_id'])) {
123
- throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(bundle_id)}`)
123
+ throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(params['bundle_id'])}`)
124
124
  }
125
125
 
126
126
  const response = await Api.sendRequest(`/bundle_recipients`, 'GET', params, options)
@@ -149,27 +149,27 @@ class BundleRecipient {
149
149
  }
150
150
 
151
151
  if (params['user_id'] && !isInt(params['user_id'])) {
152
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
152
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
153
153
  }
154
154
 
155
155
  if (params['bundle_id'] && !isInt(params['bundle_id'])) {
156
- throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(bundle_id)}`)
156
+ throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(params['bundle_id'])}`)
157
157
  }
158
158
 
159
159
  if (params['recipient'] && !isString(params['recipient'])) {
160
- throw new errors.InvalidParameterError(`Bad parameter: recipient must be of type String, received ${getType(recipient)}`)
160
+ throw new errors.InvalidParameterError(`Bad parameter: recipient must be of type String, received ${getType(params['recipient'])}`)
161
161
  }
162
162
 
163
163
  if (params['name'] && !isString(params['name'])) {
164
- throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
164
+ throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params['name'])}`)
165
165
  }
166
166
 
167
167
  if (params['company'] && !isString(params['company'])) {
168
- throw new errors.InvalidParameterError(`Bad parameter: company must be of type String, received ${getType(company)}`)
168
+ throw new errors.InvalidParameterError(`Bad parameter: company must be of type String, received ${getType(params['company'])}`)
169
169
  }
170
170
 
171
171
  if (params['note'] && !isString(params['note'])) {
172
- throw new errors.InvalidParameterError(`Bad parameter: note must be of type String, received ${getType(note)}`)
172
+ throw new errors.InvalidParameterError(`Bad parameter: note must be of type String, received ${getType(params['note'])}`)
173
173
  }
174
174
 
175
175
  const response = await Api.sendRequest(`/bundle_recipients`, 'POST', params, options)
@@ -67,19 +67,19 @@ class BundleRegistration {
67
67
  // bundle_id - int64 - ID of the associated Bundle
68
68
  static list = async (params = {}, options = {}) => {
69
69
  if (params['user_id'] && !isInt(params['user_id'])) {
70
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
70
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
71
71
  }
72
72
 
73
73
  if (params['cursor'] && !isString(params['cursor'])) {
74
- throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
74
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
75
75
  }
76
76
 
77
77
  if (params['per_page'] && !isInt(params['per_page'])) {
78
- throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
78
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params['per_page'])}`)
79
79
  }
80
80
 
81
81
  if (params['bundle_id'] && !isInt(params['bundle_id'])) {
82
- throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(bundle_id)}`)
82
+ throw new errors.InvalidParameterError(`Bad parameter: bundle_id must be of type Int, received ${getType(params['bundle_id'])}`)
83
83
  }
84
84
 
85
85
  const response = await Api.sendRequest(`/bundle_registrations`, 'GET', params, options)
@@ -109,7 +109,7 @@ class Clickwrap {
109
109
  }
110
110
  }
111
111
 
112
- const response = await Api.sendRequest(`/clickwraps/${params['id']}`, 'PATCH', params, this.options)
112
+ const response = await Api.sendRequest(`/clickwraps/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
113
113
 
114
114
  return new Clickwrap(response?.data, this.options)
115
115
  }
@@ -136,7 +136,7 @@ class Clickwrap {
136
136
  }
137
137
  }
138
138
 
139
- const response = await Api.sendRequest(`/clickwraps/${params['id']}`, 'DELETE', params, this.options)
139
+ const response = await Api.sendRequest(`/clickwraps/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
140
140
 
141
141
  return response?.data
142
142
  }
@@ -159,11 +159,11 @@ class Clickwrap {
159
159
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
160
160
  static list = async (params = {}, options = {}) => {
161
161
  if (params['cursor'] && !isString(params['cursor'])) {
162
- throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
162
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
163
163
  }
164
164
 
165
165
  if (params['per_page'] && !isInt(params['per_page'])) {
166
- throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
166
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params['per_page'])}`)
167
167
  }
168
168
 
169
169
  const response = await Api.sendRequest(`/clickwraps`, 'GET', params, options)
@@ -188,10 +188,10 @@ class Clickwrap {
188
188
  }
189
189
 
190
190
  if (params['id'] && !isInt(params['id'])) {
191
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
191
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
192
192
  }
193
193
 
194
- const response = await Api.sendRequest(`/clickwraps/${params['id']}`, 'GET', params, options)
194
+ const response = await Api.sendRequest(`/clickwraps/${encodeURIComponent(params['id'])}`, 'GET', params, options)
195
195
 
196
196
  return new Clickwrap(response?.data, options)
197
197
  }
@@ -207,23 +207,23 @@ class Clickwrap {
207
207
  // use_with_users - string - Use this Clickwrap for User Registrations? Note: This only applies to User Registrations where the User is invited to your Files.com site using an E-Mail invitation process where they then set their own password.
208
208
  static create = async (params = {}, options = {}) => {
209
209
  if (params['name'] && !isString(params['name'])) {
210
- throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(name)}`)
210
+ throw new errors.InvalidParameterError(`Bad parameter: name must be of type String, received ${getType(params['name'])}`)
211
211
  }
212
212
 
213
213
  if (params['body'] && !isString(params['body'])) {
214
- throw new errors.InvalidParameterError(`Bad parameter: body must be of type String, received ${getType(body)}`)
214
+ throw new errors.InvalidParameterError(`Bad parameter: body must be of type String, received ${getType(params['body'])}`)
215
215
  }
216
216
 
217
217
  if (params['use_with_bundles'] && !isString(params['use_with_bundles'])) {
218
- throw new errors.InvalidParameterError(`Bad parameter: use_with_bundles must be of type String, received ${getType(use_with_bundles)}`)
218
+ throw new errors.InvalidParameterError(`Bad parameter: use_with_bundles must be of type String, received ${getType(params['use_with_bundles'])}`)
219
219
  }
220
220
 
221
221
  if (params['use_with_inboxes'] && !isString(params['use_with_inboxes'])) {
222
- throw new errors.InvalidParameterError(`Bad parameter: use_with_inboxes must be of type String, received ${getType(use_with_inboxes)}`)
222
+ throw new errors.InvalidParameterError(`Bad parameter: use_with_inboxes must be of type String, received ${getType(params['use_with_inboxes'])}`)
223
223
  }
224
224
 
225
225
  if (params['use_with_users'] && !isString(params['use_with_users'])) {
226
- throw new errors.InvalidParameterError(`Bad parameter: use_with_users must be of type String, received ${getType(use_with_users)}`)
226
+ throw new errors.InvalidParameterError(`Bad parameter: use_with_users must be of type String, received ${getType(params['use_with_users'])}`)
227
227
  }
228
228
 
229
229
  const response = await Api.sendRequest(`/clickwraps`, 'POST', params, options)
@@ -41,11 +41,11 @@ class DnsRecord {
41
41
  // per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
42
42
  static list = async (params = {}, options = {}) => {
43
43
  if (params['cursor'] && !isString(params['cursor'])) {
44
- throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
44
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
45
45
  }
46
46
 
47
47
  if (params['per_page'] && !isInt(params['per_page'])) {
48
- throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
48
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params['per_page'])}`)
49
49
  }
50
50
 
51
51
  const response = await Api.sendRequest(`/dns_records`, 'GET', params, options)
@@ -119,11 +119,11 @@ class ExternalEvent {
119
119
  // 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 ]`.
120
120
  static list = async (params = {}, options = {}) => {
121
121
  if (params['cursor'] && !isString(params['cursor'])) {
122
- throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
122
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
123
123
  }
124
124
 
125
125
  if (params['per_page'] && !isInt(params['per_page'])) {
126
- throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
126
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params['per_page'])}`)
127
127
  }
128
128
 
129
129
  const response = await Api.sendRequest(`/external_events`, 'GET', params, options)
@@ -148,10 +148,10 @@ class ExternalEvent {
148
148
  }
149
149
 
150
150
  if (params['id'] && !isInt(params['id'])) {
151
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
151
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
152
152
  }
153
153
 
154
- const response = await Api.sendRequest(`/external_events/${params['id']}`, 'GET', params, options)
154
+ const response = await Api.sendRequest(`/external_events/${encodeURIComponent(params['id'])}`, 'GET', params, options)
155
155
 
156
156
  return new ExternalEvent(response?.data, options)
157
157
  }
@@ -172,11 +172,11 @@ class ExternalEvent {
172
172
  }
173
173
 
174
174
  if (params['status'] && !isString(params['status'])) {
175
- throw new errors.InvalidParameterError(`Bad parameter: status must be of type String, received ${getType(status)}`)
175
+ throw new errors.InvalidParameterError(`Bad parameter: status must be of type String, received ${getType(params['status'])}`)
176
176
  }
177
177
 
178
178
  if (params['body'] && !isString(params['body'])) {
179
- throw new errors.InvalidParameterError(`Bad parameter: body must be of type String, received ${getType(body)}`)
179
+ throw new errors.InvalidParameterError(`Bad parameter: body must be of type String, received ${getType(params['body'])}`)
180
180
  }
181
181
 
182
182
  const response = await Api.sendRequest(`/external_events`, 'POST', params, options)
@@ -404,7 +404,7 @@ class File {
404
404
  }
405
405
  }
406
406
 
407
- const response = await Api.sendRequest(`/files/${params['path']}`, 'GET', params, this.options)
407
+ const response = await Api.sendRequest(`/files/${encodeURIComponent(params['path'])}`, 'GET', params, this.options)
408
408
 
409
409
  return new File(response?.data, this.options)
410
410
  }
@@ -440,7 +440,7 @@ class File {
440
440
  }
441
441
  }
442
442
 
443
- const response = await Api.sendRequest(`/files/${params['path']}`, 'PATCH', params, this.options)
443
+ const response = await Api.sendRequest(`/files/${encodeURIComponent(params['path'])}`, 'PATCH', params, this.options)
444
444
 
445
445
  return new File(response?.data, this.options)
446
446
  }
@@ -469,7 +469,7 @@ class File {
469
469
  }
470
470
  }
471
471
 
472
- const response = await Api.sendRequest(`/files/${params['path']}`, 'DELETE', params, this.options)
472
+ const response = await Api.sendRequest(`/files/${encodeURIComponent(params['path'])}`, 'DELETE', params, this.options)
473
473
 
474
474
  return response?.data
475
475
  }
@@ -515,7 +515,7 @@ class File {
515
515
  }
516
516
  }
517
517
 
518
- const response = await Api.sendRequest(`/file_actions/copy/${params['path']}`, 'POST', params, this.options)
518
+ const response = await Api.sendRequest(`/file_actions/copy/${encodeURIComponent(params['path'])}`, 'POST', params, this.options)
519
519
 
520
520
  return new FileAction(response?.data, this.options)
521
521
  }
@@ -557,7 +557,7 @@ class File {
557
557
  }
558
558
  }
559
559
 
560
- const response = await Api.sendRequest(`/file_actions/move/${params['path']}`, 'POST', params, this.options)
560
+ const response = await Api.sendRequest(`/file_actions/move/${encodeURIComponent(params['path'])}`, 'POST', params, this.options)
561
561
 
562
562
  return new FileAction(response?.data, this.options)
563
563
  }
@@ -609,7 +609,7 @@ class File {
609
609
  }
610
610
  }
611
611
 
612
- const response = await Api.sendRequest(`/file_actions/begin_upload/${params['path']}`, 'POST', params, this.options)
612
+ const response = await Api.sendRequest(`/file_actions/begin_upload/${encodeURIComponent(params['path'])}`, 'POST', params, this.options)
613
613
 
614
614
  return response?.data?.map(obj => new FileUploadPart(obj, this.options)) || []
615
615
  }
@@ -647,46 +647,46 @@ class File {
647
647
  }
648
648
 
649
649
  if (params['path'] && !isString(params['path'])) {
650
- throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(path)}`)
650
+ throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params['path'])}`)
651
651
  }
652
652
 
653
653
  if (params['action'] && !isString(params['action'])) {
654
- throw new errors.InvalidParameterError(`Bad parameter: action must be of type String, received ${getType(action)}`)
654
+ throw new errors.InvalidParameterError(`Bad parameter: action must be of type String, received ${getType(params['action'])}`)
655
655
  }
656
656
 
657
657
  if (params['length'] && !isInt(params['length'])) {
658
- throw new errors.InvalidParameterError(`Bad parameter: length must be of type Int, received ${getType(length)}`)
658
+ throw new errors.InvalidParameterError(`Bad parameter: length must be of type Int, received ${getType(params['length'])}`)
659
659
  }
660
660
 
661
661
  if (params['part'] && !isInt(params['part'])) {
662
- throw new errors.InvalidParameterError(`Bad parameter: part must be of type Int, received ${getType(part)}`)
662
+ throw new errors.InvalidParameterError(`Bad parameter: part must be of type Int, received ${getType(params['part'])}`)
663
663
  }
664
664
 
665
665
  if (params['parts'] && !isInt(params['parts'])) {
666
- throw new errors.InvalidParameterError(`Bad parameter: parts must be of type Int, received ${getType(parts)}`)
666
+ throw new errors.InvalidParameterError(`Bad parameter: parts must be of type Int, received ${getType(params['parts'])}`)
667
667
  }
668
668
 
669
669
  if (params['provided_mtime'] && !isString(params['provided_mtime'])) {
670
- throw new errors.InvalidParameterError(`Bad parameter: provided_mtime must be of type String, received ${getType(provided_mtime)}`)
670
+ throw new errors.InvalidParameterError(`Bad parameter: provided_mtime must be of type String, received ${getType(params['provided_mtime'])}`)
671
671
  }
672
672
 
673
673
  if (params['ref'] && !isString(params['ref'])) {
674
- throw new errors.InvalidParameterError(`Bad parameter: ref must be of type String, received ${getType(ref)}`)
674
+ throw new errors.InvalidParameterError(`Bad parameter: ref must be of type String, received ${getType(params['ref'])}`)
675
675
  }
676
676
 
677
677
  if (params['restart'] && !isInt(params['restart'])) {
678
- throw new errors.InvalidParameterError(`Bad parameter: restart must be of type Int, received ${getType(restart)}`)
678
+ throw new errors.InvalidParameterError(`Bad parameter: restart must be of type Int, received ${getType(params['restart'])}`)
679
679
  }
680
680
 
681
681
  if (params['size'] && !isInt(params['size'])) {
682
- throw new errors.InvalidParameterError(`Bad parameter: size must be of type Int, received ${getType(size)}`)
682
+ throw new errors.InvalidParameterError(`Bad parameter: size must be of type Int, received ${getType(params['size'])}`)
683
683
  }
684
684
 
685
685
  if (params['structure'] && !isString(params['structure'])) {
686
- throw new errors.InvalidParameterError(`Bad parameter: structure must be of type String, received ${getType(structure)}`)
686
+ throw new errors.InvalidParameterError(`Bad parameter: structure must be of type String, received ${getType(params['structure'])}`)
687
687
  }
688
688
 
689
- const response = await Api.sendRequest(`/files/${params['path']}`, 'POST', params, options)
689
+ const response = await Api.sendRequest(`/files/${encodeURIComponent(params['path'])}`, 'POST', params, options)
690
690
 
691
691
  return new File(response?.data, options)
692
692
  }
@@ -708,14 +708,14 @@ class File {
708
708
  }
709
709
 
710
710
  if (params['path'] && !isString(params['path'])) {
711
- throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(path)}`)
711
+ throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params['path'])}`)
712
712
  }
713
713
 
714
714
  if (params['preview_size'] && !isString(params['preview_size'])) {
715
- throw new errors.InvalidParameterError(`Bad parameter: preview_size must be of type String, received ${getType(preview_size)}`)
715
+ throw new errors.InvalidParameterError(`Bad parameter: preview_size must be of type String, received ${getType(params['preview_size'])}`)
716
716
  }
717
717
 
718
- const response = await Api.sendRequest(`/file_actions/metadata/${params['path']}`, 'GET', params, options)
718
+ const response = await Api.sendRequest(`/file_actions/metadata/${encodeURIComponent(params['path'])}`, 'GET', params, options)
719
719
 
720
720
  return new File(response?.data, options)
721
721
  }
@@ -87,7 +87,7 @@ class FileComment {
87
87
  }
88
88
  }
89
89
 
90
- const response = await Api.sendRequest(`/file_comments/${params['id']}`, 'PATCH', params, this.options)
90
+ const response = await Api.sendRequest(`/file_comments/${encodeURIComponent(params['id'])}`, 'PATCH', params, this.options)
91
91
 
92
92
  return new FileComment(response?.data, this.options)
93
93
  }
@@ -114,7 +114,7 @@ class FileComment {
114
114
  }
115
115
  }
116
116
 
117
- const response = await Api.sendRequest(`/file_comments/${params['id']}`, 'DELETE', params, this.options)
117
+ const response = await Api.sendRequest(`/file_comments/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
118
118
 
119
119
  return response?.data
120
120
  }
@@ -148,18 +148,18 @@ class FileComment {
148
148
  }
149
149
 
150
150
  if (params['cursor'] && !isString(params['cursor'])) {
151
- throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(cursor)}`)
151
+ throw new errors.InvalidParameterError(`Bad parameter: cursor must be of type String, received ${getType(params['cursor'])}`)
152
152
  }
153
153
 
154
154
  if (params['per_page'] && !isInt(params['per_page'])) {
155
- throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(per_page)}`)
155
+ throw new errors.InvalidParameterError(`Bad parameter: per_page must be of type Int, received ${getType(params['per_page'])}`)
156
156
  }
157
157
 
158
158
  if (params['path'] && !isString(params['path'])) {
159
- throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(path)}`)
159
+ throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params['path'])}`)
160
160
  }
161
161
 
162
- const response = await Api.sendRequest(`/file_comments/files/${params['path']}`, 'GET', params, options)
162
+ const response = await Api.sendRequest(`/file_comments/files/${encodeURIComponent(params['path'])}`, 'GET', params, options)
163
163
 
164
164
  return response?.data?.map(obj => new FileComment(obj, options)) || []
165
165
  }
@@ -177,11 +177,11 @@ class FileComment {
177
177
  }
178
178
 
179
179
  if (params['body'] && !isString(params['body'])) {
180
- throw new errors.InvalidParameterError(`Bad parameter: body must be of type String, received ${getType(body)}`)
180
+ throw new errors.InvalidParameterError(`Bad parameter: body must be of type String, received ${getType(params['body'])}`)
181
181
  }
182
182
 
183
183
  if (params['path'] && !isString(params['path'])) {
184
- throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(path)}`)
184
+ throw new errors.InvalidParameterError(`Bad parameter: path must be of type String, received ${getType(params['path'])}`)
185
185
  }
186
186
 
187
187
  const response = await Api.sendRequest(`/file_comments`, 'POST', params, options)
@@ -74,7 +74,7 @@ class FileCommentReaction {
74
74
  }
75
75
  }
76
76
 
77
- const response = await Api.sendRequest(`/file_comment_reactions/${params['id']}`, 'DELETE', params, this.options)
77
+ const response = await Api.sendRequest(`/file_comment_reactions/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
78
78
 
79
79
  return response?.data
80
80
  }
@@ -106,15 +106,15 @@ class FileCommentReaction {
106
106
  }
107
107
 
108
108
  if (params['user_id'] && !isInt(params['user_id'])) {
109
- throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(user_id)}`)
109
+ throw new errors.InvalidParameterError(`Bad parameter: user_id must be of type Int, received ${getType(params['user_id'])}`)
110
110
  }
111
111
 
112
112
  if (params['file_comment_id'] && !isInt(params['file_comment_id'])) {
113
- throw new errors.InvalidParameterError(`Bad parameter: file_comment_id must be of type Int, received ${getType(file_comment_id)}`)
113
+ throw new errors.InvalidParameterError(`Bad parameter: file_comment_id must be of type Int, received ${getType(params['file_comment_id'])}`)
114
114
  }
115
115
 
116
116
  if (params['emoji'] && !isString(params['emoji'])) {
117
- throw new errors.InvalidParameterError(`Bad parameter: emoji must be of type String, received ${getType(emoji)}`)
117
+ throw new errors.InvalidParameterError(`Bad parameter: emoji must be of type String, received ${getType(params['emoji'])}`)
118
118
  }
119
119
 
120
120
  const response = await Api.sendRequest(`/file_comment_reactions`, 'POST', params, options)
@@ -65,10 +65,10 @@ class FileMigration {
65
65
  }
66
66
 
67
67
  if (params['id'] && !isInt(params['id'])) {
68
- throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(id)}`)
68
+ throw new errors.InvalidParameterError(`Bad parameter: id must be of type Int, received ${getType(params['id'])}`)
69
69
  }
70
70
 
71
- const response = await Api.sendRequest(`/file_migrations/${params['id']}`, 'GET', params, options)
71
+ const response = await Api.sendRequest(`/file_migrations/${encodeURIComponent(params['id'])}`, 'GET', params, options)
72
72
 
73
73
  return new FileMigration(response?.data, options)
74
74
  }