files.com 1.1.649 → 1.1.651

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: f762883ff6e320131d7226422ae25f1800e1fbe172e47364e4af6551a32545a0
4
- data.tar.gz: 2869f62037e0932d98f81023013b9ed08f180cba307a137f5b6fad728dbd2f65
3
+ metadata.gz: 8564cc68092dabc88ac19623420dda160c04d5647b1ec5d9410fa317ce64057a
4
+ data.tar.gz: 2cc0bbfa760bbccdf14d4aee45da8f3d2ed2c653387400f5b1f82bbedea0c501
5
5
  SHA512:
6
- metadata.gz: 826dc59eaa2592234e807c00d047e4323efb3a1dc6c511413b349ebe4a78b385a8dbeb6d4733eb8a9000bbf280a7ac94f5cf764c4a5f72bf399f4a7b1a3530b7
7
- data.tar.gz: db29182d2dee5cf4c7896f84521e9a0b79bb2a6ef42bf0ada476d7d2407bd5d36faa3fa0bed0bf4ed7fd2f9322621c4be49c27da103b25540f431641750c7e8d
6
+ metadata.gz: 036bbd87171d4d8c1a52fa11c8ce13396090a675ea5388e2732057ee018d7ecd045643f68d8b1396e10269a41b33a29a5a43c3722a817312f451c32f1ace7972
7
+ data.tar.gz: 4e663811a724db8d42b2fb095421873f82aa0e76c63e05c6220835ea8cca784cbf18c10ee2cf29f50a0f054e389ff4f9de3fa292c475751e5949aa2315acff0a
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.649
1
+ 1.1.651
@@ -0,0 +1,150 @@
1
+ # CustomDomain
2
+
3
+ ## Example CustomDomain Object
4
+
5
+ ```
6
+ {
7
+ "id": 1,
8
+ "domain": "files.example.com",
9
+ "destination": "site_alias",
10
+ "dns_status": "correct",
11
+ "ssl_certificate_id": 1,
12
+ "brick_managed": true,
13
+ "folder_behavior_id": 1,
14
+ "created_at": "2000-01-01T01:00:00Z",
15
+ "updated_at": "2000-01-01T01:00:00Z"
16
+ }
17
+ ```
18
+
19
+ * `id` (int64): Custom Domain ID.
20
+ * `domain` (string): Customer-owned domain name.
21
+ * `destination` (string): Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
22
+ * `dns_status` (string): Current DNS verification status.
23
+ * `ssl_certificate_id` (int64): Current SSL certificate ID.
24
+ * `brick_managed` (boolean): Is this domain's SSL certificate automatically managed and renewed by Files.com?
25
+ * `folder_behavior_id` (int64): Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
26
+ * `created_at` (date-time): When this Custom Domain was created.
27
+ * `updated_at` (date-time): When this Custom Domain was last updated.
28
+
29
+
30
+ ---
31
+
32
+ ## List Custom Domains
33
+
34
+ ```
35
+ Files::CustomDomain.list
36
+ ```
37
+
38
+ ### Parameters
39
+
40
+ * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
41
+ * `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
42
+ * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `id`.
43
+
44
+
45
+ ---
46
+
47
+ ## Show Custom Domain
48
+
49
+ ```
50
+ Files::CustomDomain.find(id)
51
+ ```
52
+
53
+ ### Parameters
54
+
55
+ * `id` (int64): Required - Custom Domain ID.
56
+
57
+
58
+ ---
59
+
60
+ ## Create Custom Domain
61
+
62
+ ```
63
+ Files::CustomDomain.create(
64
+ destination: "site_alias",
65
+ folder_behavior_id: 1,
66
+ ssl_certificate_id: 1,
67
+ domain: "files.example.com"
68
+ )
69
+ ```
70
+
71
+ ### Parameters
72
+
73
+ * `destination` (string): Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
74
+ * `folder_behavior_id` (int64): Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
75
+ * `ssl_certificate_id` (int64): Current SSL certificate ID.
76
+ * `domain` (string): Required - Customer-owned domain name.
77
+
78
+
79
+ ---
80
+
81
+ ## Update Custom Domain
82
+
83
+ ```
84
+ Files::CustomDomain.update(id,
85
+ destination: "site_alias",
86
+ folder_behavior_id: 1,
87
+ ssl_certificate_id: 1,
88
+ domain: "files.example.com"
89
+ )
90
+ ```
91
+
92
+ ### Parameters
93
+
94
+ * `id` (int64): Required - Custom Domain ID.
95
+ * `destination` (string): Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
96
+ * `folder_behavior_id` (int64): Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
97
+ * `ssl_certificate_id` (int64): Current SSL certificate ID.
98
+ * `domain` (string): Customer-owned domain name.
99
+
100
+
101
+ ---
102
+
103
+ ## Delete Custom Domain
104
+
105
+ ```
106
+ Files::CustomDomain.delete(id)
107
+ ```
108
+
109
+ ### Parameters
110
+
111
+ * `id` (int64): Required - Custom Domain ID.
112
+
113
+
114
+ ---
115
+
116
+ ## Update Custom Domain
117
+
118
+ ```
119
+ custom_domain = Files::CustomDomain.find(id)
120
+
121
+ custom_domain.update(
122
+ destination: "site_alias",
123
+ folder_behavior_id: 1,
124
+ ssl_certificate_id: 1,
125
+ domain: "files.example.com"
126
+ )
127
+ ```
128
+
129
+ ### Parameters
130
+
131
+ * `id` (int64): Required - Custom Domain ID.
132
+ * `destination` (string): Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
133
+ * `folder_behavior_id` (int64): Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
134
+ * `ssl_certificate_id` (int64): Current SSL certificate ID.
135
+ * `domain` (string): Customer-owned domain name.
136
+
137
+
138
+ ---
139
+
140
+ ## Delete Custom Domain
141
+
142
+ ```
143
+ custom_domain = Files::CustomDomain.find(id)
144
+
145
+ custom_domain.delete
146
+ ```
147
+
148
+ ### Parameters
149
+
150
+ * `id` (int64): Required - Custom Domain ID.
data/docs/file.md CHANGED
@@ -268,6 +268,56 @@ Files::File.move(path,
268
268
  * `overwrite` (boolean): Overwrite existing file(s) in the destination?
269
269
 
270
270
 
271
+ ---
272
+
273
+ ## Decrypt a GPG-encrypted file and save it to a destination path
274
+
275
+ ```
276
+ Files::File.gpg_decrypt(path,
277
+ destination: "destination",
278
+ gpg_key_partner_id: 1,
279
+ use_all_private_keys: false,
280
+ ignore_mdc_error: false,
281
+ overwrite: false
282
+ )
283
+ ```
284
+
285
+ ### Parameters
286
+
287
+ * `path` (string): Required - Path to operate on.
288
+ * `destination` (string): Required - Destination file path for the decrypted file.
289
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
290
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for decryption.
291
+ * `use_all_private_keys` (boolean): Use every accessible private GPG key in the source workspace for decryption.
292
+ * `ignore_mdc_error` (boolean): Ignore errors from the MDC (modification detection code) check.
293
+ * `overwrite` (boolean): Overwrite existing file in the destination?
294
+
295
+
296
+ ---
297
+
298
+ ## Encrypt a file with GPG and save it to a destination path
299
+
300
+ ```
301
+ Files::File.gpg_encrypt(path,
302
+ destination: "destination",
303
+ gpg_key_partner_id: 1,
304
+ signing_key_id: 1,
305
+ armor: false,
306
+ overwrite: false
307
+ )
308
+ ```
309
+
310
+ ### Parameters
311
+
312
+ * `path` (string): Required - Path to operate on.
313
+ * `destination` (string): Required - Destination file path for the encrypted file.
314
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to encrypt with.
315
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for encryption.
316
+ * `signing_key_id` (int64): Optional GPG Key ID to sign with.
317
+ * `armor` (boolean): Output ASCII-armored encrypted data.
318
+ * `overwrite` (boolean): Overwrite existing file in the destination?
319
+
320
+
271
321
  ---
272
322
 
273
323
  ## Extract a ZIP file to a destination folder
@@ -457,6 +507,60 @@ file.move(
457
507
  * `overwrite` (boolean): Overwrite existing file(s) in the destination?
458
508
 
459
509
 
510
+ ---
511
+
512
+ ## Decrypt a GPG-encrypted file and save it to a destination path
513
+
514
+ ```
515
+ file = Files::File.find(path)
516
+
517
+ file.gpg_decrypt(
518
+ destination: "destination",
519
+ gpg_key_partner_id: 1,
520
+ use_all_private_keys: false,
521
+ ignore_mdc_error: false,
522
+ overwrite: false
523
+ )
524
+ ```
525
+
526
+ ### Parameters
527
+
528
+ * `path` (string): Required - Path to operate on.
529
+ * `destination` (string): Required - Destination file path for the decrypted file.
530
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
531
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for decryption.
532
+ * `use_all_private_keys` (boolean): Use every accessible private GPG key in the source workspace for decryption.
533
+ * `ignore_mdc_error` (boolean): Ignore errors from the MDC (modification detection code) check.
534
+ * `overwrite` (boolean): Overwrite existing file in the destination?
535
+
536
+
537
+ ---
538
+
539
+ ## Encrypt a file with GPG and save it to a destination path
540
+
541
+ ```
542
+ file = Files::File.find(path)
543
+
544
+ file.gpg_encrypt(
545
+ destination: "destination",
546
+ gpg_key_partner_id: 1,
547
+ signing_key_id: 1,
548
+ armor: false,
549
+ overwrite: false
550
+ )
551
+ ```
552
+
553
+ ### Parameters
554
+
555
+ * `path` (string): Required - Path to operate on.
556
+ * `destination` (string): Required - Destination file path for the encrypted file.
557
+ * `gpg_key_ids` (array(int64)): GPG Key IDs to encrypt with.
558
+ * `gpg_key_partner_id` (int64): Partner ID whose GPG keys should be used for encryption.
559
+ * `signing_key_id` (int64): Optional GPG Key ID to sign with.
560
+ * `armor` (boolean): Output ASCII-armored encrypted data.
561
+ * `overwrite` (boolean): Overwrite existing file in the destination?
562
+
563
+
460
564
  ---
461
565
 
462
566
  ## Extract a ZIP file to a destination folder
@@ -0,0 +1,214 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class CustomDomain
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - Custom Domain ID.
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ def id=(value)
18
+ @attributes[:id] = value
19
+ end
20
+
21
+ # string - Customer-owned domain name.
22
+ def domain
23
+ @attributes[:domain]
24
+ end
25
+
26
+ def domain=(value)
27
+ @attributes[:domain] = value
28
+ end
29
+
30
+ # string - Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
31
+ def destination
32
+ @attributes[:destination]
33
+ end
34
+
35
+ def destination=(value)
36
+ @attributes[:destination] = value
37
+ end
38
+
39
+ # string - Current DNS verification status.
40
+ def dns_status
41
+ @attributes[:dns_status]
42
+ end
43
+
44
+ def dns_status=(value)
45
+ @attributes[:dns_status] = value
46
+ end
47
+
48
+ # int64 - Current SSL certificate ID.
49
+ def ssl_certificate_id
50
+ @attributes[:ssl_certificate_id]
51
+ end
52
+
53
+ def ssl_certificate_id=(value)
54
+ @attributes[:ssl_certificate_id] = value
55
+ end
56
+
57
+ # boolean - Is this domain's SSL certificate automatically managed and renewed by Files.com?
58
+ def brick_managed
59
+ @attributes[:brick_managed]
60
+ end
61
+
62
+ def brick_managed=(value)
63
+ @attributes[:brick_managed] = value
64
+ end
65
+
66
+ # int64 - Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
67
+ def folder_behavior_id
68
+ @attributes[:folder_behavior_id]
69
+ end
70
+
71
+ def folder_behavior_id=(value)
72
+ @attributes[:folder_behavior_id] = value
73
+ end
74
+
75
+ # date-time - When this Custom Domain was created.
76
+ def created_at
77
+ @attributes[:created_at]
78
+ end
79
+
80
+ # date-time - When this Custom Domain was last updated.
81
+ def updated_at
82
+ @attributes[:updated_at]
83
+ end
84
+
85
+ # Parameters:
86
+ # destination - string - Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
87
+ # folder_behavior_id - int64 - Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
88
+ # ssl_certificate_id - int64 - Current SSL certificate ID.
89
+ # domain - string - Customer-owned domain name.
90
+ def update(params = {})
91
+ params ||= {}
92
+ params[:id] = @attributes[:id]
93
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
94
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
95
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
96
+ raise InvalidParameterError.new("Bad parameter: folder_behavior_id must be an Integer") if params[:folder_behavior_id] and !params[:folder_behavior_id].is_a?(Integer)
97
+ raise InvalidParameterError.new("Bad parameter: ssl_certificate_id must be an Integer") if params[:ssl_certificate_id] and !params[:ssl_certificate_id].is_a?(Integer)
98
+ raise InvalidParameterError.new("Bad parameter: domain must be an String") if params[:domain] and !params[:domain].is_a?(String)
99
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
100
+
101
+ Api.send_request("/custom_domains/#{@attributes[:id]}", :patch, params, @options)
102
+ end
103
+
104
+ def delete(params = {})
105
+ params ||= {}
106
+ params[:id] = @attributes[:id]
107
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
108
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
109
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
110
+
111
+ Api.send_request("/custom_domains/#{@attributes[:id]}", :delete, params, @options)
112
+ end
113
+
114
+ def destroy(params = {})
115
+ delete(params)
116
+ nil
117
+ end
118
+
119
+ def save
120
+ if @attributes[:id]
121
+ new_obj = update(@attributes)
122
+ else
123
+ new_obj = CustomDomain.create(@attributes, @options)
124
+ end
125
+
126
+ @attributes = new_obj.attributes
127
+ true
128
+ end
129
+
130
+ # Parameters:
131
+ # cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
132
+ # per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
133
+ # sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `id`.
134
+ def self.list(params = {}, options = {})
135
+ raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
136
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
137
+ raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
138
+
139
+ List.new(CustomDomain, params) do
140
+ Api.send_request("/custom_domains", :get, params, options)
141
+ end
142
+ end
143
+
144
+ def self.all(params = {}, options = {})
145
+ list(params, options)
146
+ end
147
+
148
+ # Parameters:
149
+ # id (required) - int64 - Custom Domain ID.
150
+ def self.find(id, params = {}, options = {})
151
+ params ||= {}
152
+ params[:id] = id
153
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
154
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
155
+
156
+ response, options = Api.send_request("/custom_domains/#{params[:id]}", :get, params, options)
157
+ CustomDomain.new(response.data, options)
158
+ end
159
+
160
+ def self.get(id, params = {}, options = {})
161
+ find(id, params, options)
162
+ end
163
+
164
+ # Parameters:
165
+ # destination - string - Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
166
+ # folder_behavior_id - int64 - Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
167
+ # ssl_certificate_id - int64 - Current SSL certificate ID.
168
+ # domain (required) - string - Customer-owned domain name.
169
+ def self.create(params = {}, options = {})
170
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
171
+ raise InvalidParameterError.new("Bad parameter: folder_behavior_id must be an Integer") if params[:folder_behavior_id] and !params[:folder_behavior_id].is_a?(Integer)
172
+ raise InvalidParameterError.new("Bad parameter: ssl_certificate_id must be an Integer") if params[:ssl_certificate_id] and !params[:ssl_certificate_id].is_a?(Integer)
173
+ raise InvalidParameterError.new("Bad parameter: domain must be an String") if params[:domain] and !params[:domain].is_a?(String)
174
+ raise MissingParameterError.new("Parameter missing: domain") unless params[:domain]
175
+
176
+ response, options = Api.send_request("/custom_domains", :post, params, options)
177
+ CustomDomain.new(response.data, options)
178
+ end
179
+
180
+ # Parameters:
181
+ # destination - string - Where this custom domain routes. Can be `site_alias`, `public_hosting`, or `s3_endpoint`.
182
+ # folder_behavior_id - int64 - Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior.
183
+ # ssl_certificate_id - int64 - Current SSL certificate ID.
184
+ # domain - string - Customer-owned domain name.
185
+ def self.update(id, params = {}, options = {})
186
+ params ||= {}
187
+ params[:id] = id
188
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
189
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
190
+ raise InvalidParameterError.new("Bad parameter: folder_behavior_id must be an Integer") if params[:folder_behavior_id] and !params[:folder_behavior_id].is_a?(Integer)
191
+ raise InvalidParameterError.new("Bad parameter: ssl_certificate_id must be an Integer") if params[:ssl_certificate_id] and !params[:ssl_certificate_id].is_a?(Integer)
192
+ raise InvalidParameterError.new("Bad parameter: domain must be an String") if params[:domain] and !params[:domain].is_a?(String)
193
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
194
+
195
+ response, options = Api.send_request("/custom_domains/#{params[:id]}", :patch, params, options)
196
+ CustomDomain.new(response.data, options)
197
+ end
198
+
199
+ def self.delete(id, params = {}, options = {})
200
+ params ||= {}
201
+ params[:id] = id
202
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
203
+ raise MissingParameterError.new("Parameter missing: id") unless params[:id]
204
+
205
+ Api.send_request("/custom_domains/#{params[:id]}", :delete, params, options)
206
+ nil
207
+ end
208
+
209
+ def self.destroy(id, params = {}, options = {})
210
+ delete(id, params, options)
211
+ nil
212
+ end
213
+ end
214
+ end
@@ -1075,6 +1075,53 @@ module Files
1075
1075
  Api.send_request("/file_actions/move/#{@attributes[:path]}", :post, params, @options)
1076
1076
  end
1077
1077
 
1078
+ # Decrypt a GPG-encrypted file and save it to a destination path
1079
+ #
1080
+ # Parameters:
1081
+ # destination (required) - string - Destination file path for the decrypted file.
1082
+ # gpg_key_ids - array(int64) - GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
1083
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for decryption.
1084
+ # use_all_private_keys - boolean - Use every accessible private GPG key in the source workspace for decryption.
1085
+ # ignore_mdc_error - boolean - Ignore errors from the MDC (modification detection code) check.
1086
+ # overwrite - boolean - Overwrite existing file in the destination?
1087
+ def gpg_decrypt(params = {})
1088
+ params ||= {}
1089
+ params[:path] = @attributes[:path]
1090
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
1091
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1092
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1093
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1094
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1095
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1096
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1097
+
1098
+ Api.send_request("/file_actions/gpg_decrypt/#{@attributes[:path]}", :post, params, @options)
1099
+ end
1100
+
1101
+ # Encrypt a file with GPG and save it to a destination path
1102
+ #
1103
+ # Parameters:
1104
+ # destination (required) - string - Destination file path for the encrypted file.
1105
+ # gpg_key_ids - array(int64) - GPG Key IDs to encrypt with.
1106
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for encryption.
1107
+ # signing_key_id - int64 - Optional GPG Key ID to sign with.
1108
+ # armor - boolean - Output ASCII-armored encrypted data.
1109
+ # overwrite - boolean - Overwrite existing file in the destination?
1110
+ def gpg_encrypt(params = {})
1111
+ params ||= {}
1112
+ params[:path] = @attributes[:path]
1113
+ raise MissingParameterError.new("Current object doesn't have a path") unless @attributes[:path]
1114
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1115
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1116
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1117
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1118
+ raise InvalidParameterError.new("Bad parameter: signing_key_id must be an Integer") if params[:signing_key_id] and !params[:signing_key_id].is_a?(Integer)
1119
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1120
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1121
+
1122
+ Api.send_request("/file_actions/gpg_encrypt/#{@attributes[:path]}", :post, params, @options)
1123
+ end
1124
+
1078
1125
  # Extract a ZIP file to a destination folder
1079
1126
  #
1080
1127
  # Parameters:
@@ -1284,6 +1331,53 @@ module Files
1284
1331
  FileAction.new(response.data, options)
1285
1332
  end
1286
1333
 
1334
+ # Decrypt a GPG-encrypted file and save it to a destination path
1335
+ #
1336
+ # Parameters:
1337
+ # destination (required) - string - Destination file path for the decrypted file.
1338
+ # gpg_key_ids - array(int64) - GPG Key IDs to decrypt with. If omitted, every accessible private GPG key in the source workspace is used.
1339
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for decryption.
1340
+ # use_all_private_keys - boolean - Use every accessible private GPG key in the source workspace for decryption.
1341
+ # ignore_mdc_error - boolean - Ignore errors from the MDC (modification detection code) check.
1342
+ # overwrite - boolean - Overwrite existing file in the destination?
1343
+ def self.gpg_decrypt(path, params = {}, options = {})
1344
+ params ||= {}
1345
+ params[:path] = path
1346
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1347
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1348
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1349
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1350
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1351
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1352
+
1353
+ response, options = Api.send_request("/file_actions/gpg_decrypt/#{params[:path]}", :post, params, options)
1354
+ FileAction.new(response.data, options)
1355
+ end
1356
+
1357
+ # Encrypt a file with GPG and save it to a destination path
1358
+ #
1359
+ # Parameters:
1360
+ # destination (required) - string - Destination file path for the encrypted file.
1361
+ # gpg_key_ids - array(int64) - GPG Key IDs to encrypt with.
1362
+ # gpg_key_partner_id - int64 - Partner ID whose GPG keys should be used for encryption.
1363
+ # signing_key_id - int64 - Optional GPG Key ID to sign with.
1364
+ # armor - boolean - Output ASCII-armored encrypted data.
1365
+ # overwrite - boolean - Overwrite existing file in the destination?
1366
+ def self.gpg_encrypt(path, params = {}, options = {})
1367
+ params ||= {}
1368
+ params[:path] = path
1369
+ raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
1370
+ raise InvalidParameterError.new("Bad parameter: destination must be an String") if params[:destination] and !params[:destination].is_a?(String)
1371
+ raise InvalidParameterError.new("Bad parameter: gpg_key_ids must be an Array") if params[:gpg_key_ids] and !params[:gpg_key_ids].is_a?(Array)
1372
+ raise InvalidParameterError.new("Bad parameter: gpg_key_partner_id must be an Integer") if params[:gpg_key_partner_id] and !params[:gpg_key_partner_id].is_a?(Integer)
1373
+ raise InvalidParameterError.new("Bad parameter: signing_key_id must be an Integer") if params[:signing_key_id] and !params[:signing_key_id].is_a?(Integer)
1374
+ raise MissingParameterError.new("Parameter missing: path") unless params[:path]
1375
+ raise MissingParameterError.new("Parameter missing: destination") unless params[:destination]
1376
+
1377
+ response, options = Api.send_request("/file_actions/gpg_encrypt/#{params[:path]}", :post, params, options)
1378
+ FileAction.new(response.data, options)
1379
+ end
1380
+
1287
1381
  # Extract a ZIP file to a destination folder
1288
1382
  #
1289
1383
  # Parameters:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Files
4
- VERSION = "1.1.649"
4
+ VERSION = "1.1.651"
5
5
  end
data/lib/files.com.rb CHANGED
@@ -60,6 +60,7 @@ require "files.com/models/bundle_recipient"
60
60
  require "files.com/models/bundle_registration"
61
61
  require "files.com/models/child_site_management_policy"
62
62
  require "files.com/models/clickwrap"
63
+ require "files.com/models/custom_domain"
63
64
  require "files.com/models/desktop_configuration_profile"
64
65
  require "files.com/models/dns_record"
65
66
  require "files.com/models/email_incoming_message"
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.649
4
+ version: 1.1.651
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-16 00:00:00.000000000 Z
11
+ date: 2026-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -198,6 +198,7 @@ files:
198
198
  - docs/bundle_registration.md
199
199
  - docs/child_site_management_policy.md
200
200
  - docs/clickwrap.md
201
+ - docs/custom_domain.md
201
202
  - docs/desktop_configuration_profile.md
202
203
  - docs/dns_record.md
203
204
  - docs/email_incoming_message.md
@@ -336,6 +337,7 @@ files:
336
337
  - lib/files.com/models/bundle_registration.rb
337
338
  - lib/files.com/models/child_site_management_policy.rb
338
339
  - lib/files.com/models/clickwrap.rb
340
+ - lib/files.com/models/custom_domain.rb
339
341
  - lib/files.com/models/desktop_configuration_profile.rb
340
342
  - lib/files.com/models/dir.rb
341
343
  - lib/files.com/models/dns_record.rb