files.com 1.0.293 → 1.0.295

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a7c1894e3c11ea836975ed21710a96b519e20d8ea2b3436afe55a86d66282dd
4
- data.tar.gz: e05de7df9599f5d25e8a840a334ca3b1e85ab6099087432eceeb8b5e542d2eb5
3
+ metadata.gz: 82443d7ca9d90f9c75a2ffbec984dc28f875d9b2017d1ef4678da0bb53b31dfc
4
+ data.tar.gz: fcff7ee54c6248b30113e496d7a3d0216b39172d7d6b54bfcc1f5ce54d388e3b
5
5
  SHA512:
6
- metadata.gz: c110a200edd32818fff150b93c38ef909cedd46425ec60130e4a8051457cbfe47d4306e87830f255274920bf7a85f498099f7dfcdf7a1e92ddd5c8f8ed77fbc6
7
- data.tar.gz: b944c8e5639997f124b64e043eb79ba0d4e0d3369465e3eff44f19b4b9ada244b1d1f776efe01afbb735b15f5b4109ff555f4272779bb9773b11dc197f4d468b
6
+ metadata.gz: 914a9e15f726f4459e6ed2c353cdad5ce893aa4ad689d6d4fa303bf0e9cd7c00e43222f13d11540de3542a848193e208e85c2d4810c8f3eb81fc3f367b7d147b
7
+ data.tar.gz: 345a767395649169913f54f6cab4ada5e0118c085da8986181dba594c28e12f18f0fc97f3a4dd14f4ccb89190d5241399b3a633746919ede7ae283e8fbdfa973
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.293
1
+ 1.0.295
data/docs/api_key.md CHANGED
@@ -6,6 +6,7 @@
6
6
  {
7
7
  "id": 1,
8
8
  "descriptive_label": "Site-wide API key for https://site.files.com/ (key ID #1)",
9
+ "description": "",
9
10
  "created_at": "2000-01-01T01:00:00Z",
10
11
  "expires_at": "2000-01-01T01:00:00Z",
11
12
  "key": "[key]",
@@ -20,6 +21,7 @@
20
21
 
21
22
  * `id` (int64): API Key ID
22
23
  * `descriptive_label` (string): Unique label that describes this API key. Useful for external systems where you may have API keys from multiple accounts and want a human-readable label for each key.
24
+ * `description` (string): User-supplied description of API key.
23
25
  * `created_at` (date-time): Time which API Key was created
24
26
  * `expires_at` (date-time): API Key expiration date
25
27
  * `key` (string): API Key actual key string
@@ -96,6 +98,7 @@ Files::ApiKey.create(
96
98
 
97
99
  * `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
98
100
  * `name` (string): Internal name for the API Key. For your use.
101
+ * `description` (string): User-supplied description of API key.
99
102
  * `expires_at` (string): API Key expiration date
100
103
  * `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
101
104
  * `path` (string): Folder path restriction for this api key.
@@ -136,6 +139,7 @@ Files::ApiKey.update(id,
136
139
 
137
140
  * `id` (int64): Required - Api Key ID.
138
141
  * `name` (string): Internal name for the API Key. For your use.
142
+ * `description` (string): User-supplied description of API key.
139
143
  * `expires_at` (string): API Key expiration date
140
144
  * `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
141
145
 
@@ -180,6 +184,7 @@ api_key.update(
180
184
 
181
185
  * `id` (int64): Required - Api Key ID.
182
186
  * `name` (string): Internal name for the API Key. For your use.
187
+ * `description` (string): User-supplied description of API key.
183
188
  * `expires_at` (string): API Key expiration date
184
189
  * `permission_set` (string): Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
185
190
 
@@ -0,0 +1,130 @@
1
+ # SftpHostKey
2
+
3
+ ## Example SftpHostKey Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "name": "",
9
+ "fingerprint_md5": "",
10
+ "fingerprint_sha256": ""
11
+ }
12
+ ```
13
+
14
+ * `id` (int64): Sftp Host Key ID
15
+ * `name` (string): The friendly name of this SFTP Host Key.
16
+ * `fingerprint_md5` (string): MD5 Fingerpint of the public key
17
+ * `fingerprint_sha256` (string): SHA256 Fingerpint of the public key
18
+ * `private_key` (string): The private key data.
19
+
20
+
21
+ ---
22
+
23
+ ## List Sftp Host Keys
24
+
25
+ ```
26
+ Files::SftpHostKey.list(
27
+ per_page: 1
28
+ )
29
+ ```
30
+
31
+ ### Parameters
32
+
33
+ * `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.
34
+ * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
35
+
36
+
37
+ ---
38
+
39
+ ## Show Sftp Host Key
40
+
41
+ ```
42
+ Files::SftpHostKey.find(id)
43
+ ```
44
+
45
+ ### Parameters
46
+
47
+ * `id` (int64): Required - Sftp Host Key ID.
48
+
49
+
50
+ ---
51
+
52
+ ## Create Sftp Host Key
53
+
54
+ ```
55
+ Files::SftpHostKey.create(
56
+ name: "",
57
+ private_key: ""
58
+ )
59
+ ```
60
+
61
+ ### Parameters
62
+
63
+ * `name` (string): The friendly name of this SFTP Host Key.
64
+ * `private_key` (string): The private key data.
65
+
66
+
67
+ ---
68
+
69
+ ## Update Sftp Host Key
70
+
71
+ ```
72
+ Files::SftpHostKey.update(id,
73
+ name: "",
74
+ private_key: ""
75
+ )
76
+ ```
77
+
78
+ ### Parameters
79
+
80
+ * `id` (int64): Required - Sftp Host Key ID.
81
+ * `name` (string): The friendly name of this SFTP Host Key.
82
+ * `private_key` (string): The private key data.
83
+
84
+
85
+ ---
86
+
87
+ ## Delete Sftp Host Key
88
+
89
+ ```
90
+ Files::SftpHostKey.delete(id)
91
+ ```
92
+
93
+ ### Parameters
94
+
95
+ * `id` (int64): Required - Sftp Host Key ID.
96
+
97
+
98
+ ---
99
+
100
+ ## Update Sftp Host Key
101
+
102
+ ```
103
+ sftp_host_key = Files::SftpHostKey.list.first
104
+
105
+ sftp_host_key.update(
106
+ name: "",
107
+ private_key: ""
108
+ )
109
+ ```
110
+
111
+ ### Parameters
112
+
113
+ * `id` (int64): Required - Sftp Host Key ID.
114
+ * `name` (string): The friendly name of this SFTP Host Key.
115
+ * `private_key` (string): The private key data.
116
+
117
+
118
+ ---
119
+
120
+ ## Delete Sftp Host Key
121
+
122
+ ```
123
+ sftp_host_key = Files::SftpHostKey.list.first
124
+
125
+ sftp_host_key.delete
126
+ ```
127
+
128
+ ### Parameters
129
+
130
+ * `id` (int64): Required - Sftp Host Key ID.
@@ -27,6 +27,15 @@ module Files
27
27
  @attributes[:descriptive_label] = value
28
28
  end
29
29
 
30
+ # string - User-supplied description of API key.
31
+ def description
32
+ @attributes[:description]
33
+ end
34
+
35
+ def description=(value)
36
+ @attributes[:description] = value
37
+ end
38
+
30
39
  # date-time - Time which API Key was created
31
40
  def created_at
32
41
  @attributes[:created_at]
@@ -106,6 +115,7 @@ module Files
106
115
 
107
116
  # Parameters:
108
117
  # name - string - Internal name for the API Key. For your use.
118
+ # description - string - User-supplied description of API key.
109
119
  # expires_at - string - API Key expiration date
110
120
  # permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
111
121
  def update(params = {})
@@ -114,6 +124,7 @@ module Files
114
124
  raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
115
125
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
116
126
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
127
+ raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
117
128
  raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
118
129
  raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
119
130
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
@@ -200,12 +211,14 @@ module Files
200
211
  # Parameters:
201
212
  # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
202
213
  # name - string - Internal name for the API Key. For your use.
214
+ # description - string - User-supplied description of API key.
203
215
  # expires_at - string - API Key expiration date
204
216
  # permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
205
217
  # path - string - Folder path restriction for this api key.
206
218
  def self.create(params = {}, options = {})
207
219
  raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
208
220
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
221
+ raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
209
222
  raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
210
223
  raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
211
224
  raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
@@ -229,6 +242,7 @@ module Files
229
242
 
230
243
  # Parameters:
231
244
  # name - string - Internal name for the API Key. For your use.
245
+ # description - string - User-supplied description of API key.
232
246
  # expires_at - string - API Key expiration date
233
247
  # permission_set - string - Permissions for this API Key. Keys with the `desktop_app` permission set only have the ability to do the functions provided in our Desktop App (File and Share Link operations). Additional permission sets may become available in the future, such as for a Site Admin to give a key with no administrator privileges. If you have ideas for permission sets, please let us know.
234
248
  def self.update(id, params = {}, options = {})
@@ -236,6 +250,7 @@ module Files
236
250
  params[:id] = id
237
251
  raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
238
252
  raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
253
+ raise InvalidParameterError.new("Bad parameter: description must be an String") if params[:description] and !params[:description].is_a?(String)
239
254
  raise InvalidParameterError.new("Bad parameter: expires_at must be an String") if params[:expires_at] and !params[:expires_at].is_a?(String)
240
255
  raise InvalidParameterError.new("Bad parameter: permission_set must be an String") if params[:permission_set] and !params[:permission_set].is_a?(String)
241
256
  raise MissingParameterError.new("Parameter missing: id") unless params[:id]
@@ -0,0 +1,167 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class SftpHostKey
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - Sftp Host Key ID
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ def id=(value)
18
+ @attributes[:id] = value
19
+ end
20
+
21
+ # string - The friendly name of this SFTP Host Key.
22
+ def name
23
+ @attributes[:name]
24
+ end
25
+
26
+ def name=(value)
27
+ @attributes[:name] = value
28
+ end
29
+
30
+ # string - MD5 Fingerpint of the public key
31
+ def fingerprint_md5
32
+ @attributes[:fingerprint_md5]
33
+ end
34
+
35
+ def fingerprint_md5=(value)
36
+ @attributes[:fingerprint_md5] = value
37
+ end
38
+
39
+ # string - SHA256 Fingerpint of the public key
40
+ def fingerprint_sha256
41
+ @attributes[:fingerprint_sha256]
42
+ end
43
+
44
+ def fingerprint_sha256=(value)
45
+ @attributes[:fingerprint_sha256] = value
46
+ end
47
+
48
+ # string - The private key data.
49
+ def private_key
50
+ @attributes[:private_key]
51
+ end
52
+
53
+ def private_key=(value)
54
+ @attributes[:private_key] = value
55
+ end
56
+
57
+ # Parameters:
58
+ # name - string - The friendly name of this SFTP Host Key.
59
+ # private_key - string - The private key data.
60
+ def update(params = {})
61
+ params ||= {}
62
+ params[:id] = @attributes[:id]
63
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
64
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
65
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
66
+ raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String)
67
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
68
+
69
+ Api.send_request("/sftp_host_keys/#{@attributes[:id]}", :patch, params, @options)
70
+ end
71
+
72
+ def delete(params = {})
73
+ params ||= {}
74
+ params[:id] = @attributes[:id]
75
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
76
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
77
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
78
+
79
+ Api.send_request("/sftp_host_keys/#{@attributes[:id]}", :delete, params, @options)
80
+ end
81
+
82
+ def destroy(params = {})
83
+ delete(params)
84
+ end
85
+
86
+ def save
87
+ if @attributes[:id]
88
+ update(@attributes)
89
+ else
90
+ new_obj = SftpHostKey.create(@attributes, @options)
91
+ @attributes = new_obj.attributes
92
+ end
93
+ end
94
+
95
+ # Parameters:
96
+ # 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.
97
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
98
+ def self.list(params = {}, options = {})
99
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
100
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
101
+
102
+ List.new(SftpHostKey, params) do
103
+ Api.send_request("/sftp_host_keys", :get, params, options)
104
+ end
105
+ end
106
+
107
+ def self.all(params = {}, options = {})
108
+ list(params, options)
109
+ end
110
+
111
+ # Parameters:
112
+ # id (required) - int64 - Sftp Host Key ID.
113
+ def self.find(id, params = {}, options = {})
114
+ params ||= {}
115
+ params[:id] = id
116
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
117
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
118
+
119
+ response, options = Api.send_request("/sftp_host_keys/#{params[:id]}", :get, params, options)
120
+ SftpHostKey.new(response.data, options)
121
+ end
122
+
123
+ def self.get(id, params = {}, options = {})
124
+ find(id, params, options)
125
+ end
126
+
127
+ # Parameters:
128
+ # name - string - The friendly name of this SFTP Host Key.
129
+ # private_key - string - The private key data.
130
+ def self.create(params = {}, options = {})
131
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
132
+ raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String)
133
+
134
+ response, options = Api.send_request("/sftp_host_keys", :post, params, options)
135
+ SftpHostKey.new(response.data, options)
136
+ end
137
+
138
+ # Parameters:
139
+ # name - string - The friendly name of this SFTP Host Key.
140
+ # private_key - string - The private key data.
141
+ def self.update(id, params = {}, options = {})
142
+ params ||= {}
143
+ params[:id] = id
144
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
145
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
146
+ raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String)
147
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
148
+
149
+ response, options = Api.send_request("/sftp_host_keys/#{params[:id]}", :patch, params, options)
150
+ SftpHostKey.new(response.data, options)
151
+ end
152
+
153
+ def self.delete(id, params = {}, options = {})
154
+ params ||= {}
155
+ params[:id] = id
156
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
157
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
158
+
159
+ response, _options = Api.send_request("/sftp_host_keys/#{params[:id]}", :delete, params, options)
160
+ response.data
161
+ end
162
+
163
+ def self.destroy(id, params = {}, options = {})
164
+ delete(id, params, options)
165
+ end
166
+ end
167
+ end
data/lib/files.com.rb CHANGED
@@ -95,6 +95,7 @@ require "files.com/models/remote_server"
95
95
  require "files.com/models/request"
96
96
  require "files.com/models/session"
97
97
  require "files.com/models/settings_change"
98
+ require "files.com/models/sftp_host_key"
98
99
  require "files.com/models/site"
99
100
  require "files.com/models/sso_strategy"
100
101
  require "files.com/models/status"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.293
4
+ version: 1.0.295
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-20 00:00:00.000000000 Z
11
+ date: 2022-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -179,6 +179,7 @@ files:
179
179
  - docs/request.md
180
180
  - docs/session.md
181
181
  - docs/settings_change.md
182
+ - docs/sftp_host_key.md
182
183
  - docs/site.md
183
184
  - docs/sso_strategy.md
184
185
  - docs/status.md
@@ -261,6 +262,7 @@ files:
261
262
  - lib/files.com/models/request.rb
262
263
  - lib/files.com/models/session.rb
263
264
  - lib/files.com/models/settings_change.rb
265
+ - lib/files.com/models/sftp_host_key.rb
264
266
  - lib/files.com/models/site.rb
265
267
  - lib/files.com/models/sso_strategy.rb
266
268
  - lib/files.com/models/status.rb