files.com 1.0.474 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. package/_VERSION +1 -1
  2. package/lib/Files.js +1 -1
  3. package/lib/models/ActionNotificationExport.js +63 -49
  4. package/lib/models/ActionWebhookFailure.js +1 -1
  5. package/lib/models/ApiKey.js +113 -94
  6. package/lib/models/As2Partner.js +81 -62
  7. package/lib/models/As2Station.js +79 -60
  8. package/lib/models/Automation.js +90 -71
  9. package/lib/models/Behavior.js +114 -95
  10. package/lib/models/Bundle.js +90 -71
  11. package/lib/models/BundleNotification.js +75 -56
  12. package/lib/models/BundleRecipient.js +61 -47
  13. package/lib/models/Clickwrap.js +77 -58
  14. package/lib/models/ExternalEvent.js +71 -57
  15. package/lib/models/File.js +166 -154
  16. package/lib/models/FileComment.js +65 -46
  17. package/lib/models/FileCommentReaction.js +44 -30
  18. package/lib/models/Folder.js +58 -46
  19. package/lib/models/FormFieldSet.js +76 -57
  20. package/lib/models/GpgKey.js +79 -60
  21. package/lib/models/Group.js +78 -59
  22. package/lib/models/GroupUser.js +63 -44
  23. package/lib/models/HistoryExport.js +76 -62
  24. package/lib/models/InboxRecipient.js +61 -47
  25. package/lib/models/Lock.js +56 -44
  26. package/lib/models/Message.js +82 -63
  27. package/lib/models/MessageComment.js +78 -59
  28. package/lib/models/MessageCommentReaction.js +73 -59
  29. package/lib/models/MessageReaction.js +73 -59
  30. package/lib/models/Notification.js +84 -65
  31. package/lib/models/Permission.js +60 -46
  32. package/lib/models/Project.js +74 -55
  33. package/lib/models/PublicKey.js +78 -59
  34. package/lib/models/RemoteServer.js +147 -128
  35. package/lib/models/Request.js +76 -62
  36. package/lib/models/Session.js +53 -39
  37. package/lib/models/SftpHostKey.js +74 -55
  38. package/lib/models/ShareGroup.js +79 -60
  39. package/lib/models/Snapshot.js +75 -56
  40. package/lib/models/SsoStrategy.js +1 -1
  41. package/lib/models/Style.js +37 -23
  42. package/lib/models/User.js +104 -85
  43. package/lib/models/UserRequest.js +73 -59
  44. package/lib/models/WebhookTest.js +46 -32
  45. package/package.json +1 -1
  46. package/src/Files.js +1 -1
  47. package/src/models/ActionNotificationExport.js +2 -2
  48. package/src/models/ActionWebhookFailure.js +1 -1
  49. package/src/models/ApiKey.js +7 -5
  50. package/src/models/As2Partner.js +6 -4
  51. package/src/models/As2Station.js +6 -4
  52. package/src/models/Automation.js +7 -5
  53. package/src/models/Behavior.js +7 -5
  54. package/src/models/Bundle.js +7 -5
  55. package/src/models/BundleNotification.js +6 -4
  56. package/src/models/BundleRecipient.js +2 -2
  57. package/src/models/Clickwrap.js +6 -4
  58. package/src/models/ExternalEvent.js +2 -2
  59. package/src/models/File.js +3 -3
  60. package/src/models/FileComment.js +6 -4
  61. package/src/models/FileCommentReaction.js +3 -3
  62. package/src/models/Folder.js +2 -2
  63. package/src/models/FormFieldSet.js +6 -4
  64. package/src/models/GpgKey.js +6 -4
  65. package/src/models/Group.js +6 -4
  66. package/src/models/GroupUser.js +6 -4
  67. package/src/models/HistoryExport.js +2 -2
  68. package/src/models/InboxRecipient.js +2 -2
  69. package/src/models/Lock.js +3 -3
  70. package/src/models/Message.js +6 -4
  71. package/src/models/MessageComment.js +6 -4
  72. package/src/models/MessageCommentReaction.js +3 -3
  73. package/src/models/MessageReaction.js +3 -3
  74. package/src/models/Notification.js +6 -4
  75. package/src/models/Permission.js +3 -3
  76. package/src/models/Project.js +6 -4
  77. package/src/models/PublicKey.js +6 -4
  78. package/src/models/RemoteServer.js +6 -4
  79. package/src/models/Request.js +3 -3
  80. package/src/models/Session.js +3 -3
  81. package/src/models/SftpHostKey.js +6 -4
  82. package/src/models/ShareGroup.js +6 -4
  83. package/src/models/Snapshot.js +6 -4
  84. package/src/models/SsoStrategy.js +1 -1
  85. package/src/models/Style.js +6 -3
  86. package/src/models/User.js +9 -7
  87. package/src/models/UserRequest.js +3 -3
  88. package/src/models/WebhookTest.js +2 -2
@@ -74,11 +74,11 @@ class BundleRecipient {
74
74
  }
75
75
 
76
76
 
77
- save = () => {
77
+ save = async () => {
78
78
  if (this.attributes['id']) {
79
79
  throw new errors.NotImplementedError('The BundleRecipient object doesn\'t support updates.')
80
80
  } else {
81
- const newObject = BundleRecipient.create(this.attributes, this.options)
81
+ const newObject = await BundleRecipient.create(this.attributes, this.options)
82
82
  this.attributes = { ...newObject.attributes }
83
83
  return true
84
84
  }
@@ -140,17 +140,19 @@ class Clickwrap {
140
140
 
141
141
  const response = await Api.sendRequest(`/clickwraps/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
142
142
 
143
- return response?.data
143
+ return
144
144
  }
145
145
 
146
146
  destroy = (params = {}) =>
147
147
  this.delete(params)
148
148
 
149
- save = () => {
149
+ save = async () => {
150
150
  if (this.attributes['id']) {
151
- return this.update(this.attributes)
151
+ const newObject = await this.update(this.attributes)
152
+ this.attributes = { ...newObject.attributes }
153
+ return true
152
154
  } else {
153
- const newObject = Clickwrap.create(this.attributes, this.options)
155
+ const newObject = await Clickwrap.create(this.attributes, this.options)
154
156
  this.attributes = { ...newObject.attributes }
155
157
  return true
156
158
  }
@@ -98,11 +98,11 @@ class ExternalEvent {
98
98
  }
99
99
 
100
100
 
101
- save = () => {
101
+ save = async () => {
102
102
  if (this.attributes['id']) {
103
103
  throw new errors.NotImplementedError('The ExternalEvent object doesn\'t support updates.')
104
104
  } else {
105
- const newObject = ExternalEvent.create(this.attributes, this.options)
105
+ const newObject = await ExternalEvent.create(this.attributes, this.options)
106
106
  this.attributes = { ...newObject.attributes }
107
107
  return true
108
108
  }
@@ -595,7 +595,7 @@ class File {
595
595
 
596
596
  const response = await Api.sendRequest(`/files/${encodeURIComponent(params['path'])}`, 'DELETE', params, this.options)
597
597
 
598
- return response?.data
598
+ return
599
599
  }
600
600
 
601
601
  destroy = (params = {}) =>
@@ -741,8 +741,8 @@ class File {
741
741
  return response?.data?.map(obj => new FileUploadPart(obj, this.options)) || []
742
742
  }
743
743
 
744
- save = () => {
745
- const newObject = File.create(this.attributes.path, this.attributes, this.options)
744
+ save = async () => {
745
+ const newObject = await File.create(this.attributes.path, this.attributes, this.options)
746
746
  this.attributes = { ...newObject.attributes }
747
747
  return true
748
748
  }
@@ -118,17 +118,19 @@ class FileComment {
118
118
 
119
119
  const response = await Api.sendRequest(`/file_comments/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
120
120
 
121
- return response?.data
121
+ return
122
122
  }
123
123
 
124
124
  destroy = (params = {}) =>
125
125
  this.delete(params)
126
126
 
127
- save = () => {
127
+ save = async () => {
128
128
  if (this.attributes['id']) {
129
- return this.update(this.attributes)
129
+ const newObject = await this.update(this.attributes)
130
+ this.attributes = { ...newObject.attributes }
131
+ return true
130
132
  } else {
131
- const newObject = FileComment.create(this.attributes, this.options)
133
+ const newObject = await FileComment.create(this.attributes, this.options)
132
134
  this.attributes = { ...newObject.attributes }
133
135
  return true
134
136
  }
@@ -77,17 +77,17 @@ class FileCommentReaction {
77
77
 
78
78
  const response = await Api.sendRequest(`/file_comment_reactions/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
79
79
 
80
- return response?.data
80
+ return
81
81
  }
82
82
 
83
83
  destroy = (params = {}) =>
84
84
  this.delete(params)
85
85
 
86
- save = () => {
86
+ save = async () => {
87
87
  if (this.attributes['id']) {
88
88
  throw new errors.NotImplementedError('The FileCommentReaction object doesn\'t support updates.')
89
89
  } else {
90
- const newObject = FileCommentReaction.create(this.attributes, this.options)
90
+ const newObject = await FileCommentReaction.create(this.attributes, this.options)
91
91
  this.attributes = { ...newObject.attributes }
92
92
  return true
93
93
  }
@@ -154,8 +154,8 @@ class Folder {
154
154
  }
155
155
 
156
156
 
157
- save = () => {
158
- const newObject = Folder.create(this.attributes.path, this.attributes, this.options)
157
+ save = async () => {
158
+ const newObject = await Folder.create(this.attributes.path, this.attributes, this.options)
159
159
  this.attributes = { ...newObject.attributes }
160
160
  return true
161
161
  }
@@ -145,17 +145,19 @@ class FormFieldSet {
145
145
 
146
146
  const response = await Api.sendRequest(`/form_field_sets/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
147
147
 
148
- return response?.data
148
+ return
149
149
  }
150
150
 
151
151
  destroy = (params = {}) =>
152
152
  this.delete(params)
153
153
 
154
- save = () => {
154
+ save = async () => {
155
155
  if (this.attributes['id']) {
156
- return this.update(this.attributes)
156
+ const newObject = await this.update(this.attributes)
157
+ this.attributes = { ...newObject.attributes }
158
+ return true
157
159
  } else {
158
- const newObject = FormFieldSet.create(this.attributes, this.options)
160
+ const newObject = await FormFieldSet.create(this.attributes, this.options)
159
161
  this.attributes = { ...newObject.attributes }
160
162
  return true
161
163
  }
@@ -143,17 +143,19 @@ class GpgKey {
143
143
 
144
144
  const response = await Api.sendRequest(`/gpg_keys/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
145
145
 
146
- return response?.data
146
+ return
147
147
  }
148
148
 
149
149
  destroy = (params = {}) =>
150
150
  this.delete(params)
151
151
 
152
- save = () => {
152
+ save = async () => {
153
153
  if (this.attributes['id']) {
154
- return this.update(this.attributes)
154
+ const newObject = await this.update(this.attributes)
155
+ this.attributes = { ...newObject.attributes }
156
+ return true
155
157
  } else {
156
- const newObject = GpgKey.create(this.attributes, this.options)
158
+ const newObject = await GpgKey.create(this.attributes, this.options)
157
159
  this.attributes = { ...newObject.attributes }
158
160
  return true
159
161
  }
@@ -136,17 +136,19 @@ class Group {
136
136
 
137
137
  const response = await Api.sendRequest(`/groups/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
138
138
 
139
- return response?.data
139
+ return
140
140
  }
141
141
 
142
142
  destroy = (params = {}) =>
143
143
  this.delete(params)
144
144
 
145
- save = () => {
145
+ save = async () => {
146
146
  if (this.attributes['id']) {
147
- return this.update(this.attributes)
147
+ const newObject = await this.update(this.attributes)
148
+ this.attributes = { ...newObject.attributes }
149
+ return true
148
150
  } else {
149
- const newObject = Group.create(this.attributes, this.options)
151
+ const newObject = await Group.create(this.attributes, this.options)
150
152
  this.attributes = { ...newObject.attributes }
151
153
  return true
152
154
  }
@@ -170,17 +170,19 @@ class GroupUser {
170
170
 
171
171
  const response = await Api.sendRequest(`/group_users/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
172
172
 
173
- return response?.data
173
+ return
174
174
  }
175
175
 
176
176
  destroy = (params = {}) =>
177
177
  this.delete(params)
178
178
 
179
- save = () => {
179
+ save = async () => {
180
180
  if (this.attributes['id']) {
181
- return this.update(this.attributes)
181
+ const newObject = await this.update(this.attributes)
182
+ this.attributes = { ...newObject.attributes }
183
+ return true
182
184
  } else {
183
- const newObject = GroupUser.create(this.attributes, this.options)
185
+ const newObject = await GroupUser.create(this.attributes, this.options)
184
186
  this.attributes = { ...newObject.attributes }
185
187
  return true
186
188
  }
@@ -207,11 +207,11 @@ class HistoryExport {
207
207
  }
208
208
 
209
209
 
210
- save = () => {
210
+ save = async () => {
211
211
  if (this.attributes['id']) {
212
212
  throw new errors.NotImplementedError('The HistoryExport object doesn\'t support updates.')
213
213
  } else {
214
- const newObject = HistoryExport.create(this.attributes, this.options)
214
+ const newObject = await HistoryExport.create(this.attributes, this.options)
215
215
  this.attributes = { ...newObject.attributes }
216
216
  return true
217
217
  }
@@ -74,11 +74,11 @@ class InboxRecipient {
74
74
  }
75
75
 
76
76
 
77
- save = () => {
77
+ save = async () => {
78
78
  if (this.attributes['id']) {
79
79
  throw new errors.NotImplementedError('The InboxRecipient object doesn\'t support updates.')
80
80
  } else {
81
- const newObject = InboxRecipient.create(this.attributes, this.options)
81
+ const newObject = await InboxRecipient.create(this.attributes, this.options)
82
82
  this.attributes = { ...newObject.attributes }
83
83
  return true
84
84
  }
@@ -146,14 +146,14 @@ class Lock {
146
146
 
147
147
  const response = await Api.sendRequest(`/locks/${encodeURIComponent(params['path'])}`, 'DELETE', params, this.options)
148
148
 
149
- return response?.data
149
+ return
150
150
  }
151
151
 
152
152
  destroy = (params = {}) =>
153
153
  this.delete(params)
154
154
 
155
- save = () => {
156
- const newObject = Lock.create(this.attributes.path, this.attributes, this.options)
155
+ save = async () => {
156
+ const newObject = await Lock.create(this.attributes.path, this.attributes, this.options)
157
157
  this.attributes = { ...newObject.attributes }
158
158
  return true
159
159
  }
@@ -156,17 +156,19 @@ class Message {
156
156
 
157
157
  const response = await Api.sendRequest(`/messages/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
158
158
 
159
- return response?.data
159
+ return
160
160
  }
161
161
 
162
162
  destroy = (params = {}) =>
163
163
  this.delete(params)
164
164
 
165
- save = () => {
165
+ save = async () => {
166
166
  if (this.attributes['id']) {
167
- return this.update(this.attributes)
167
+ const newObject = await this.update(this.attributes)
168
+ this.attributes = { ...newObject.attributes }
169
+ return true
168
170
  } else {
169
- const newObject = Message.create(this.attributes, this.options)
171
+ const newObject = await Message.create(this.attributes, this.options)
170
172
  this.attributes = { ...newObject.attributes }
171
173
  return true
172
174
  }
@@ -118,17 +118,19 @@ class MessageComment {
118
118
 
119
119
  const response = await Api.sendRequest(`/message_comments/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
120
120
 
121
- return response?.data
121
+ return
122
122
  }
123
123
 
124
124
  destroy = (params = {}) =>
125
125
  this.delete(params)
126
126
 
127
- save = () => {
127
+ save = async () => {
128
128
  if (this.attributes['id']) {
129
- return this.update(this.attributes)
129
+ const newObject = await this.update(this.attributes)
130
+ this.attributes = { ...newObject.attributes }
131
+ return true
130
132
  } else {
131
- const newObject = MessageComment.create(this.attributes, this.options)
133
+ const newObject = await MessageComment.create(this.attributes, this.options)
132
134
  this.attributes = { ...newObject.attributes }
133
135
  return true
134
136
  }
@@ -70,17 +70,17 @@ class MessageCommentReaction {
70
70
 
71
71
  const response = await Api.sendRequest(`/message_comment_reactions/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
72
72
 
73
- return response?.data
73
+ return
74
74
  }
75
75
 
76
76
  destroy = (params = {}) =>
77
77
  this.delete(params)
78
78
 
79
- save = () => {
79
+ save = async () => {
80
80
  if (this.attributes['id']) {
81
81
  throw new errors.NotImplementedError('The MessageCommentReaction object doesn\'t support updates.')
82
82
  } else {
83
- const newObject = MessageCommentReaction.create(this.attributes, this.options)
83
+ const newObject = await MessageCommentReaction.create(this.attributes, this.options)
84
84
  this.attributes = { ...newObject.attributes }
85
85
  return true
86
86
  }
@@ -70,17 +70,17 @@ class MessageReaction {
70
70
 
71
71
  const response = await Api.sendRequest(`/message_reactions/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
72
72
 
73
- return response?.data
73
+ return
74
74
  }
75
75
 
76
76
  destroy = (params = {}) =>
77
77
  this.delete(params)
78
78
 
79
- save = () => {
79
+ save = async () => {
80
80
  if (this.attributes['id']) {
81
81
  throw new errors.NotImplementedError('The MessageReaction object doesn\'t support updates.')
82
82
  } else {
83
- const newObject = MessageReaction.create(this.attributes, this.options)
83
+ const newObject = await MessageReaction.create(this.attributes, this.options)
84
84
  this.attributes = { ...newObject.attributes }
85
85
  return true
86
86
  }
@@ -260,17 +260,19 @@ class Notification {
260
260
 
261
261
  const response = await Api.sendRequest(`/notifications/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
262
262
 
263
- return response?.data
263
+ return
264
264
  }
265
265
 
266
266
  destroy = (params = {}) =>
267
267
  this.delete(params)
268
268
 
269
- save = () => {
269
+ save = async () => {
270
270
  if (this.attributes['id']) {
271
- return this.update(this.attributes)
271
+ const newObject = await this.update(this.attributes)
272
+ this.attributes = { ...newObject.attributes }
273
+ return true
272
274
  } else {
273
- const newObject = Notification.create(this.attributes, this.options)
275
+ const newObject = await Notification.create(this.attributes, this.options)
274
276
  this.attributes = { ...newObject.attributes }
275
277
  return true
276
278
  }
@@ -105,17 +105,17 @@ class Permission {
105
105
 
106
106
  const response = await Api.sendRequest(`/permissions/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
107
107
 
108
- return response?.data
108
+ return
109
109
  }
110
110
 
111
111
  destroy = (params = {}) =>
112
112
  this.delete(params)
113
113
 
114
- save = () => {
114
+ save = async () => {
115
115
  if (this.attributes['id']) {
116
116
  throw new errors.NotImplementedError('The Permission object doesn\'t support updates.')
117
117
  } else {
118
- const newObject = Permission.create(this.attributes, this.options)
118
+ const newObject = await Permission.create(this.attributes, this.options)
119
119
  this.attributes = { ...newObject.attributes }
120
120
  return true
121
121
  }
@@ -104,17 +104,19 @@ class Project {
104
104
 
105
105
  const response = await Api.sendRequest(`/projects/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
106
106
 
107
- return response?.data
107
+ return
108
108
  }
109
109
 
110
110
  destroy = (params = {}) =>
111
111
  this.delete(params)
112
112
 
113
- save = () => {
113
+ save = async () => {
114
114
  if (this.attributes['id']) {
115
- return this.update(this.attributes)
115
+ const newObject = await this.update(this.attributes)
116
+ this.attributes = { ...newObject.attributes }
117
+ return true
116
118
  } else {
117
- const newObject = Project.create(this.attributes, this.options)
119
+ const newObject = await Project.create(this.attributes, this.options)
118
120
  this.attributes = { ...newObject.attributes }
119
121
  return true
120
122
  }
@@ -135,17 +135,19 @@ class PublicKey {
135
135
 
136
136
  const response = await Api.sendRequest(`/public_keys/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
137
137
 
138
- return response?.data
138
+ return
139
139
  }
140
140
 
141
141
  destroy = (params = {}) =>
142
142
  this.delete(params)
143
143
 
144
- save = () => {
144
+ save = async () => {
145
145
  if (this.attributes['id']) {
146
- return this.update(this.attributes)
146
+ const newObject = await this.update(this.attributes)
147
+ this.attributes = { ...newObject.attributes }
148
+ return true
147
149
  } else {
148
- const newObject = PublicKey.create(this.attributes, this.options)
150
+ const newObject = await PublicKey.create(this.attributes, this.options)
149
151
  this.attributes = { ...newObject.attributes }
150
152
  return true
151
153
  }
@@ -916,17 +916,19 @@ class RemoteServer {
916
916
 
917
917
  const response = await Api.sendRequest(`/remote_servers/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
918
918
 
919
- return response?.data
919
+ return
920
920
  }
921
921
 
922
922
  destroy = (params = {}) =>
923
923
  this.delete(params)
924
924
 
925
- save = () => {
925
+ save = async () => {
926
926
  if (this.attributes['id']) {
927
- return this.update(this.attributes)
927
+ const newObject = await this.update(this.attributes)
928
+ this.attributes = { ...newObject.attributes }
929
+ return true
928
930
  } else {
929
- const newObject = RemoteServer.create(this.attributes, this.options)
931
+ const newObject = await RemoteServer.create(this.attributes, this.options)
930
932
  this.attributes = { ...newObject.attributes }
931
933
  return true
932
934
  }
@@ -105,17 +105,17 @@ class Request {
105
105
 
106
106
  const response = await Api.sendRequest(`/requests/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
107
107
 
108
- return response?.data
108
+ return
109
109
  }
110
110
 
111
111
  destroy = (params = {}) =>
112
112
  this.delete(params)
113
113
 
114
- save = () => {
114
+ save = async () => {
115
115
  if (this.attributes['id']) {
116
116
  throw new errors.NotImplementedError('The Request object doesn\'t support updates.')
117
117
  } else {
118
- const newObject = Request.create(this.attributes, this.options)
118
+ const newObject = await Request.create(this.attributes, this.options)
119
119
  this.attributes = { ...newObject.attributes }
120
120
  return true
121
121
  }
@@ -81,11 +81,11 @@ class Session {
81
81
  }
82
82
 
83
83
 
84
- save = () => {
84
+ save = async () => {
85
85
  if (this.attributes['id']) {
86
86
  throw new errors.NotImplementedError('The Session object doesn\'t support updates.')
87
87
  } else {
88
- const newObject = Session.create(this.attributes, this.options)
88
+ const newObject = await Session.create(this.attributes, this.options)
89
89
  this.attributes = { ...newObject.attributes }
90
90
  return true
91
91
  }
@@ -122,7 +122,7 @@ class Session {
122
122
  static delete = async (options = {}) => {
123
123
  const response = await Api.sendRequest(`/sessions`, 'DELETE', {}, options)
124
124
 
125
- return response?.data
125
+ return
126
126
  }
127
127
 
128
128
  static destroy = (params = {}, options = {}) =>
@@ -121,17 +121,19 @@ class SftpHostKey {
121
121
 
122
122
  const response = await Api.sendRequest(`/sftp_host_keys/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
123
123
 
124
- return response?.data
124
+ return
125
125
  }
126
126
 
127
127
  destroy = (params = {}) =>
128
128
  this.delete(params)
129
129
 
130
- save = () => {
130
+ save = async () => {
131
131
  if (this.attributes['id']) {
132
- return this.update(this.attributes)
132
+ const newObject = await this.update(this.attributes)
133
+ this.attributes = { ...newObject.attributes }
134
+ return true
133
135
  } else {
134
- const newObject = SftpHostKey.create(this.attributes, this.options)
136
+ const newObject = await SftpHostKey.create(this.attributes, this.options)
135
137
  this.attributes = { ...newObject.attributes }
136
138
  return true
137
139
  }
@@ -125,17 +125,19 @@ class ShareGroup {
125
125
 
126
126
  const response = await Api.sendRequest(`/share_groups/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
127
127
 
128
- return response?.data
128
+ return
129
129
  }
130
130
 
131
131
  destroy = (params = {}) =>
132
132
  this.delete(params)
133
133
 
134
- save = () => {
134
+ save = async () => {
135
135
  if (this.attributes['id']) {
136
- return this.update(this.attributes)
136
+ const newObject = await this.update(this.attributes)
137
+ this.attributes = { ...newObject.attributes }
138
+ return true
137
139
  } else {
138
- const newObject = ShareGroup.create(this.attributes, this.options)
140
+ const newObject = await ShareGroup.create(this.attributes, this.options)
139
141
  this.attributes = { ...newObject.attributes }
140
142
  return true
141
143
  }
@@ -139,17 +139,19 @@ class Snapshot {
139
139
 
140
140
  const response = await Api.sendRequest(`/snapshots/${encodeURIComponent(params['id'])}`, 'DELETE', params, this.options)
141
141
 
142
- return response?.data
142
+ return
143
143
  }
144
144
 
145
145
  destroy = (params = {}) =>
146
146
  this.delete(params)
147
147
 
148
- save = () => {
148
+ save = async () => {
149
149
  if (this.attributes['id']) {
150
- return this.update(this.attributes)
150
+ const newObject = await this.update(this.attributes)
151
+ this.attributes = { ...newObject.attributes }
152
+ return true
151
153
  } else {
152
- const newObject = Snapshot.create(this.attributes, this.options)
154
+ const newObject = await Snapshot.create(this.attributes, this.options)
153
155
  this.attributes = { ...newObject.attributes }
154
156
  return true
155
157
  }
@@ -182,7 +182,7 @@ class SsoStrategy {
182
182
 
183
183
  const response = await Api.sendRequest(`/sso_strategies/${encodeURIComponent(params['id'])}/sync`, 'POST', params, this.options)
184
184
 
185
- return response?.data
185
+ return
186
186
  }
187
187
 
188
188
  // Parameters:
@@ -122,14 +122,17 @@ class Style {
122
122
 
123
123
  const response = await Api.sendRequest(`/styles/${encodeURIComponent(params['path'])}`, 'DELETE', params, this.options)
124
124
 
125
- return response?.data
125
+ return
126
126
  }
127
127
 
128
128
  destroy = (params = {}) =>
129
129
  this.delete(params)
130
130
 
131
- save = () =>
132
- this.update(this.attributes)
131
+ save = async () => {
132
+ const newObject = await this.update(this.attributes)
133
+ this.attributes = { ...newObject.attributes }
134
+ return true
135
+ }
133
136
 
134
137
  // Parameters:
135
138
  // path (required) - string - Style path.