files.com 1.1.280 → 1.1.282
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/gpg_key.md +13 -1
- data/docs/public_key.md +20 -3
- data/docs/user.md +1 -3
- data/lib/files.com/models/gpg_key.rb +43 -0
- data/lib/files.com/models/public_key.rb +67 -7
- data/lib/files.com/models/user.rb +0 -9
- data/lib/files.com/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9406f38cb6bde4af6c2f9ceb7701d7ec8dec08567cbd285d6d4625ba01dafb0
|
4
|
+
data.tar.gz: 55ad58d9c15b6edc56a78f2cf91e2f10974701dad5348f94b5941ad98d784dcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88bb48032e3d7cd4473dc3e25f581392b7450546c1fd8c92938b0824c4973ed0b5043043abad5632c0c393f637ba3cc3b0a3542bdb3a894693cac9d25c0bfbd6
|
7
|
+
data.tar.gz: 5348e54f4683c2b78e44be056746fc47590344d3199220c9589072c87a6e082d0bd2a2398196dfc2e56240221c1dad739bb88167fcacd2fa3dc3dddfdd2dce8c
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.282
|
data/docs/gpg_key.md
CHANGED
@@ -21,6 +21,10 @@
|
|
21
21
|
* `public_key` (string): Your GPG public key
|
22
22
|
* `private_key` (string): Your GPG private key.
|
23
23
|
* `private_key_password` (string): Your GPG private key password. Only required for password protected keys.
|
24
|
+
* `generate_expires_at` (string): Expiration date of the key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
25
|
+
* `generate_keypair` (boolean): If true, generate a new GPG key pair. Can not be used with `public_key`/`private_key`
|
26
|
+
* `generate_full_name` (string): Full name of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
27
|
+
* `generate_email` (string): Email address of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
24
28
|
|
25
29
|
|
26
30
|
---
|
@@ -64,7 +68,11 @@ Files::GpgKey.create(
|
|
64
68
|
public_key: "7f8bc1210b09b9ddf469e6b6b8920e76",
|
65
69
|
private_key: "ab236cfe4a195f0226bc2e674afdd6b0",
|
66
70
|
private_key_password: "[your GPG private key password]",
|
67
|
-
name: "key name"
|
71
|
+
name: "key name",
|
72
|
+
generate_expires_at: "2025-06-19 12:00:00",
|
73
|
+
generate_keypair: false,
|
74
|
+
generate_full_name: "John Doe",
|
75
|
+
generate_email: "jdoe@example.com"
|
68
76
|
)
|
69
77
|
```
|
70
78
|
|
@@ -75,6 +83,10 @@ Files::GpgKey.create(
|
|
75
83
|
* `private_key` (string): Your GPG private key.
|
76
84
|
* `private_key_password` (string): Your GPG private key password. Only required for password protected keys.
|
77
85
|
* `name` (string): Required - Your GPG key name.
|
86
|
+
* `generate_expires_at` (string): Expiration date of the key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
87
|
+
* `generate_keypair` (boolean): If true, generate a new GPG key pair. Can not be used with `public_key`/`private_key`
|
88
|
+
* `generate_full_name` (string): Full name of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
89
|
+
* `generate_email` (string): Email address of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
78
90
|
|
79
91
|
|
80
92
|
---
|
data/docs/public_key.md
CHANGED
@@ -9,7 +9,10 @@
|
|
9
9
|
"created_at": "2000-01-01T01:00:00Z",
|
10
10
|
"fingerprint": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8",
|
11
11
|
"fingerprint_sha256": "V5Q5t/ghT3R8Tol5GX9385bzmpygWVRnLuI9EXNrjCX",
|
12
|
+
"status": "complete",
|
12
13
|
"last_login_at": "2000-01-01T01:00:00Z",
|
14
|
+
"private_key": "example",
|
15
|
+
"public_key": "example",
|
13
16
|
"username": "User",
|
14
17
|
"user_id": 1
|
15
18
|
}
|
@@ -20,10 +23,16 @@
|
|
20
23
|
* `created_at` (date-time): Public key created at date/time
|
21
24
|
* `fingerprint` (string): Public key fingerprint (MD5)
|
22
25
|
* `fingerprint_sha256` (string): Public key fingerprint (SHA256)
|
26
|
+
* `status` (string): Can be invalid, not_generated, generating, complete
|
23
27
|
* `last_login_at` (date-time): Key's most recent login time via SFTP
|
28
|
+
* `private_key` (string): Private key generated for the user.
|
29
|
+
* `public_key` (string): Public key generated for the user.
|
24
30
|
* `username` (string): Username of the user this public key is associated with
|
25
31
|
* `user_id` (int64): User ID this public key is associated with
|
26
|
-
* `
|
32
|
+
* `generate_keypair` (boolean): If true, generate a new SSH key pair. Can not be used with `public_key`
|
33
|
+
* `generate_private_key_password` (string): Password for the private key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
34
|
+
* `generate_algorithm` (string): Type of key to generate. One of rsa, dsa, ecdsa, ed25519. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
35
|
+
* `generate_length` (int64): Length of key to generate. If algorithm is ecdsa, this is the signature size. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
27
36
|
|
28
37
|
|
29
38
|
---
|
@@ -69,7 +78,11 @@ Files::PublicKey.find(id)
|
|
69
78
|
Files::PublicKey.create(
|
70
79
|
user_id: 1,
|
71
80
|
title: "My Main Key",
|
72
|
-
public_key: "
|
81
|
+
public_key: "example",
|
82
|
+
generate_keypair: false,
|
83
|
+
generate_private_key_password: "[your private key password]",
|
84
|
+
generate_algorithm: "rsa",
|
85
|
+
generate_length: 4096
|
73
86
|
)
|
74
87
|
```
|
75
88
|
|
@@ -77,7 +90,11 @@ Files::PublicKey.create(
|
|
77
90
|
|
78
91
|
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
79
92
|
* `title` (string): Required - Internal reference for key.
|
80
|
-
* `public_key` (string):
|
93
|
+
* `public_key` (string): Actual contents of SSH key.
|
94
|
+
* `generate_keypair` (boolean): If true, generate a new SSH key pair. Can not be used with `public_key`
|
95
|
+
* `generate_private_key_password` (string): Password for the private key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
96
|
+
* `generate_algorithm` (string): Type of key to generate. One of rsa, dsa, ecdsa, ed25519. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
97
|
+
* `generate_length` (int64): Length of key to generate. If algorithm is ecdsa, this is the signature size. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
81
98
|
|
82
99
|
|
83
100
|
---
|
data/docs/user.md
CHANGED
@@ -71,8 +71,7 @@
|
|
71
71
|
"user_root": "example",
|
72
72
|
"user_home": "example",
|
73
73
|
"days_remaining_until_password_expire": 1,
|
74
|
-
"password_expire_at": "2000-01-01T01:00:00Z"
|
75
|
-
"has_reassignable_associations": true
|
74
|
+
"password_expire_at": "2000-01-01T01:00:00Z"
|
76
75
|
}
|
77
76
|
```
|
78
77
|
|
@@ -142,7 +141,6 @@
|
|
142
141
|
* `user_home` (string): Home folder for FTP/SFTP. Note that this is not used for API, Desktop, or Web interface.
|
143
142
|
* `days_remaining_until_password_expire` (int64): Number of days remaining until password expires
|
144
143
|
* `password_expire_at` (date-time): Password expiration datetime
|
145
|
-
* `has_reassignable_associations` (boolean): Does this user have any associations that can be reassigned on delete?
|
146
144
|
* `avatar_file` (file): An image file for your user avatar.
|
147
145
|
* `avatar_delete` (boolean): If true, the avatar will be deleted.
|
148
146
|
* `change_password` (string): Used for changing a password on an existing user.
|
@@ -72,6 +72,42 @@ module Files
|
|
72
72
|
@attributes[:private_key_password] = value
|
73
73
|
end
|
74
74
|
|
75
|
+
# string - Expiration date of the key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
76
|
+
def generate_expires_at
|
77
|
+
@attributes[:generate_expires_at]
|
78
|
+
end
|
79
|
+
|
80
|
+
def generate_expires_at=(value)
|
81
|
+
@attributes[:generate_expires_at] = value
|
82
|
+
end
|
83
|
+
|
84
|
+
# boolean - If true, generate a new GPG key pair. Can not be used with `public_key`/`private_key`
|
85
|
+
def generate_keypair
|
86
|
+
@attributes[:generate_keypair]
|
87
|
+
end
|
88
|
+
|
89
|
+
def generate_keypair=(value)
|
90
|
+
@attributes[:generate_keypair] = value
|
91
|
+
end
|
92
|
+
|
93
|
+
# string - Full name of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
94
|
+
def generate_full_name
|
95
|
+
@attributes[:generate_full_name]
|
96
|
+
end
|
97
|
+
|
98
|
+
def generate_full_name=(value)
|
99
|
+
@attributes[:generate_full_name] = value
|
100
|
+
end
|
101
|
+
|
102
|
+
# string - Email address of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
103
|
+
def generate_email
|
104
|
+
@attributes[:generate_email]
|
105
|
+
end
|
106
|
+
|
107
|
+
def generate_email=(value)
|
108
|
+
@attributes[:generate_email] = value
|
109
|
+
end
|
110
|
+
|
75
111
|
# Parameters:
|
76
112
|
# public_key - string - Your GPG public key
|
77
113
|
# private_key - string - Your GPG private key.
|
@@ -159,12 +195,19 @@ module Files
|
|
159
195
|
# private_key - string - Your GPG private key.
|
160
196
|
# private_key_password - string - Your GPG private key password. Only required for password protected keys.
|
161
197
|
# name (required) - string - Your GPG key name.
|
198
|
+
# generate_expires_at - string - Expiration date of the key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
199
|
+
# generate_keypair - boolean - If true, generate a new GPG key pair. Can not be used with `public_key`/`private_key`
|
200
|
+
# generate_full_name - string - Full name of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
201
|
+
# generate_email - string - Email address of the key owner. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
162
202
|
def self.create(params = {}, options = {})
|
163
203
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
164
204
|
raise InvalidParameterError.new("Bad parameter: public_key must be an String") if params[:public_key] and !params[:public_key].is_a?(String)
|
165
205
|
raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String)
|
166
206
|
raise InvalidParameterError.new("Bad parameter: private_key_password must be an String") if params[:private_key_password] and !params[:private_key_password].is_a?(String)
|
167
207
|
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
208
|
+
raise InvalidParameterError.new("Bad parameter: generate_expires_at must be an String") if params[:generate_expires_at] and !params[:generate_expires_at].is_a?(String)
|
209
|
+
raise InvalidParameterError.new("Bad parameter: generate_full_name must be an String") if params[:generate_full_name] and !params[:generate_full_name].is_a?(String)
|
210
|
+
raise InvalidParameterError.new("Bad parameter: generate_email must be an String") if params[:generate_email] and !params[:generate_email].is_a?(String)
|
168
211
|
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
169
212
|
|
170
213
|
response, options = Api.send_request("/gpg_keys", :post, params, options)
|
@@ -50,6 +50,15 @@ module Files
|
|
50
50
|
@attributes[:fingerprint_sha256] = value
|
51
51
|
end
|
52
52
|
|
53
|
+
# string - Can be invalid, not_generated, generating, complete
|
54
|
+
def status
|
55
|
+
@attributes[:status]
|
56
|
+
end
|
57
|
+
|
58
|
+
def status=(value)
|
59
|
+
@attributes[:status] = value
|
60
|
+
end
|
61
|
+
|
53
62
|
# date-time - Key's most recent login time via SFTP
|
54
63
|
def last_login_at
|
55
64
|
@attributes[:last_login_at]
|
@@ -59,6 +68,24 @@ module Files
|
|
59
68
|
@attributes[:last_login_at] = value
|
60
69
|
end
|
61
70
|
|
71
|
+
# string - Private key generated for the user.
|
72
|
+
def private_key
|
73
|
+
@attributes[:private_key]
|
74
|
+
end
|
75
|
+
|
76
|
+
def private_key=(value)
|
77
|
+
@attributes[:private_key] = value
|
78
|
+
end
|
79
|
+
|
80
|
+
# string - Public key generated for the user.
|
81
|
+
def public_key
|
82
|
+
@attributes[:public_key]
|
83
|
+
end
|
84
|
+
|
85
|
+
def public_key=(value)
|
86
|
+
@attributes[:public_key] = value
|
87
|
+
end
|
88
|
+
|
62
89
|
# string - Username of the user this public key is associated with
|
63
90
|
def username
|
64
91
|
@attributes[:username]
|
@@ -77,13 +104,40 @@ module Files
|
|
77
104
|
@attributes[:user_id] = value
|
78
105
|
end
|
79
106
|
|
80
|
-
#
|
81
|
-
def
|
82
|
-
@attributes[:
|
107
|
+
# boolean - If true, generate a new SSH key pair. Can not be used with `public_key`
|
108
|
+
def generate_keypair
|
109
|
+
@attributes[:generate_keypair]
|
83
110
|
end
|
84
111
|
|
85
|
-
def
|
86
|
-
@attributes[:
|
112
|
+
def generate_keypair=(value)
|
113
|
+
@attributes[:generate_keypair] = value
|
114
|
+
end
|
115
|
+
|
116
|
+
# string - Password for the private key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
117
|
+
def generate_private_key_password
|
118
|
+
@attributes[:generate_private_key_password]
|
119
|
+
end
|
120
|
+
|
121
|
+
def generate_private_key_password=(value)
|
122
|
+
@attributes[:generate_private_key_password] = value
|
123
|
+
end
|
124
|
+
|
125
|
+
# string - Type of key to generate. One of rsa, dsa, ecdsa, ed25519. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
126
|
+
def generate_algorithm
|
127
|
+
@attributes[:generate_algorithm]
|
128
|
+
end
|
129
|
+
|
130
|
+
def generate_algorithm=(value)
|
131
|
+
@attributes[:generate_algorithm] = value
|
132
|
+
end
|
133
|
+
|
134
|
+
# int64 - Length of key to generate. If algorithm is ecdsa, this is the signature size. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
135
|
+
def generate_length
|
136
|
+
@attributes[:generate_length]
|
137
|
+
end
|
138
|
+
|
139
|
+
def generate_length=(value)
|
140
|
+
@attributes[:generate_length] = value
|
87
141
|
end
|
88
142
|
|
89
143
|
# Parameters:
|
@@ -173,13 +227,19 @@ module Files
|
|
173
227
|
# Parameters:
|
174
228
|
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
175
229
|
# title (required) - string - Internal reference for key.
|
176
|
-
# public_key
|
230
|
+
# public_key - string - Actual contents of SSH key.
|
231
|
+
# generate_keypair - boolean - If true, generate a new SSH key pair. Can not be used with `public_key`
|
232
|
+
# generate_private_key_password - string - Password for the private key. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
233
|
+
# generate_algorithm - string - Type of key to generate. One of rsa, dsa, ecdsa, ed25519. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
234
|
+
# generate_length - int64 - Length of key to generate. If algorithm is ecdsa, this is the signature size. Used for the generation of the key. Will be ignored if `generate_keypair` is false.
|
177
235
|
def self.create(params = {}, options = {})
|
178
236
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
179
237
|
raise InvalidParameterError.new("Bad parameter: title must be an String") if params[:title] and !params[:title].is_a?(String)
|
180
238
|
raise InvalidParameterError.new("Bad parameter: public_key must be an String") if params[:public_key] and !params[:public_key].is_a?(String)
|
239
|
+
raise InvalidParameterError.new("Bad parameter: generate_private_key_password must be an String") if params[:generate_private_key_password] and !params[:generate_private_key_password].is_a?(String)
|
240
|
+
raise InvalidParameterError.new("Bad parameter: generate_algorithm must be an String") if params[:generate_algorithm] and !params[:generate_algorithm].is_a?(String)
|
241
|
+
raise InvalidParameterError.new("Bad parameter: generate_length must be an Integer") if params[:generate_length] and !params[:generate_length].is_a?(Integer)
|
181
242
|
raise MissingParameterError.new("Parameter missing: title") unless params[:title]
|
182
|
-
raise MissingParameterError.new("Parameter missing: public_key") unless params[:public_key]
|
183
243
|
|
184
244
|
response, options = Api.send_request("/public_keys", :post, params, options)
|
185
245
|
PublicKey.new(response.data, options)
|
@@ -599,15 +599,6 @@ module Files
|
|
599
599
|
@attributes[:password_expire_at] = value
|
600
600
|
end
|
601
601
|
|
602
|
-
# boolean - Does this user have any associations that can be reassigned on delete?
|
603
|
-
def has_reassignable_associations
|
604
|
-
@attributes[:has_reassignable_associations]
|
605
|
-
end
|
606
|
-
|
607
|
-
def has_reassignable_associations=(value)
|
608
|
-
@attributes[:has_reassignable_associations] = value
|
609
|
-
end
|
610
|
-
|
611
602
|
# file - An image file for your user avatar.
|
612
603
|
def avatar_file
|
613
604
|
@attributes[:avatar_file]
|
data/lib/files.com/version.rb
CHANGED
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.1.
|
4
|
+
version: 1.1.282
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-06-
|
11
|
+
date: 2025-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|