files.com 1.1.281 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 277e804b31fa7a56ea56f43b4530e1975537c5f61e2fa7a6b5060eb6ac3c5cfc
4
- data.tar.gz: b2f8b3df404cc7f5693fd7c67b4f2d663c4ce2c9263953cf07b706d190a0ea55
3
+ metadata.gz: d9406f38cb6bde4af6c2f9ceb7701d7ec8dec08567cbd285d6d4625ba01dafb0
4
+ data.tar.gz: 55ad58d9c15b6edc56a78f2cf91e2f10974701dad5348f94b5941ad98d784dcf
5
5
  SHA512:
6
- metadata.gz: 58a16e0aad5987d0278448db3f8c8752b3ba83b40ccb6b3e4e912797929eca441290e0cb8304d80a0ee9af7a75c2ba503257824852095efa223fac61fad41469
7
- data.tar.gz: b93231b4bae81644b269acb0748bea33a72921afb5671568ebef62a1c2897417520c19d448065a4ff8fbbdc95a481ed312649b7f8f50814cab48803c14b37233
6
+ metadata.gz: 88bb48032e3d7cd4473dc3e25f581392b7450546c1fd8c92938b0824c4973ed0b5043043abad5632c0c393f637ba3cc3b0a3542bdb3a894693cac9d25c0bfbd6
7
+ data.tar.gz: 5348e54f4683c2b78e44be056746fc47590344d3199220c9589072c87a6e082d0bd2a2398196dfc2e56240221c1dad739bb88167fcacd2fa3dc3dddfdd2dce8c
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.281
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
- * `public_key` (string): Actual contents of SSH key.
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: "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): Required - Actual contents of SSH key.
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
  ---
@@ -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
- # string - Actual contents of SSH key.
81
- def public_key
82
- @attributes[:public_key]
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 public_key=(value)
86
- @attributes[:public_key] = value
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 (required) - string - Actual contents of SSH 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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.281"
4
+ VERSION = "1.1.282"
5
5
  end
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.281
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-18 00:00:00.000000000 Z
11
+ date: 2025-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable