crowdin-api 1.14.0 → 1.15.0

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.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -0
  3. data/.rubocop_todo.yml +1 -0
  4. data/AGENTS.md +63 -0
  5. data/CLAUDE.md +1 -0
  6. data/Gemfile.lock +1 -1
  7. data/README.md +1 -1
  8. data/lib/crowdin-api/api_resources/advisor.rb +86 -0
  9. data/lib/crowdin-api/api_resources/ai.rb +974 -0
  10. data/lib/crowdin-api/api_resources/applications.rb +247 -10
  11. data/lib/crowdin-api/api_resources/bundles.rb +45 -29
  12. data/lib/crowdin-api/api_resources/clients.rb +23 -0
  13. data/lib/crowdin-api/api_resources/custom_spellcheckers.rb +36 -0
  14. data/lib/crowdin-api/api_resources/dictionaries.rb +5 -5
  15. data/lib/crowdin-api/api_resources/distributions.rb +15 -15
  16. data/lib/crowdin-api/api_resources/external_qa_checks.rb +36 -0
  17. data/lib/crowdin-api/api_resources/fields.rb +78 -0
  18. data/lib/crowdin-api/api_resources/glossaries.rb +62 -50
  19. data/lib/crowdin-api/api_resources/integrations.rb +201 -0
  20. data/lib/crowdin-api/api_resources/labels.rb +32 -0
  21. data/lib/crowdin-api/api_resources/languages.rb +16 -0
  22. data/lib/crowdin-api/api_resources/machine_translation_engines.rb +17 -0
  23. data/lib/crowdin-api/api_resources/notifications.rb +15 -6
  24. data/lib/crowdin-api/api_resources/organization.rb +33 -0
  25. data/lib/crowdin-api/api_resources/organization_webhooks.rb +71 -0
  26. data/lib/crowdin-api/api_resources/placeholders.rb +182 -0
  27. data/lib/crowdin-api/api_resources/projects.rb +137 -41
  28. data/lib/crowdin-api/api_resources/reports.rb +310 -26
  29. data/lib/crowdin-api/api_resources/screenshots.rb +48 -0
  30. data/lib/crowdin-api/api_resources/security_logs.rb +63 -0
  31. data/lib/crowdin-api/api_resources/source_files.rb +370 -65
  32. data/lib/crowdin-api/api_resources/source_strings.rb +62 -0
  33. data/lib/crowdin-api/api_resources/storages.rb +11 -11
  34. data/lib/crowdin-api/api_resources/string_comments.rb +46 -0
  35. data/lib/crowdin-api/api_resources/string_corrections.rb +21 -6
  36. data/lib/crowdin-api/api_resources/string_translations.rb +96 -0
  37. data/lib/crowdin-api/api_resources/style_guides.rb +71 -0
  38. data/lib/crowdin-api/api_resources/tasks.rb +140 -10
  39. data/lib/crowdin-api/api_resources/teams.rb +99 -0
  40. data/lib/crowdin-api/api_resources/translation_memory.rb +138 -0
  41. data/lib/crowdin-api/api_resources/translation_status.rb +65 -0
  42. data/lib/crowdin-api/api_resources/translations.rb +122 -2
  43. data/lib/crowdin-api/api_resources/users.rb +136 -6
  44. data/lib/crowdin-api/api_resources/vendors.rb +2 -0
  45. data/lib/crowdin-api/api_resources/webhooks.rb +16 -0
  46. data/lib/crowdin-api/api_resources/workflows.rb +24 -0
  47. data/lib/crowdin-api/client/version.rb +1 -1
  48. data/lib/crowdin-api/core/request.rb +1 -1
  49. data/lib/crowdin-api.rb +3 -1
  50. data/spec/api_resources/advisor_spec.rb +45 -0
  51. data/spec/api_resources/ai_spec.rb +863 -0
  52. data/spec/api_resources/applications_spec.rb +138 -0
  53. data/spec/api_resources/bundles_spec.rb +8 -0
  54. data/spec/api_resources/clients_spec.rb +13 -0
  55. data/spec/api_resources/custom_spellcheckers_spec.rb +21 -0
  56. data/spec/api_resources/external_qa_checks_spec.rb +21 -0
  57. data/spec/api_resources/fields_spec.rb +45 -0
  58. data/spec/api_resources/glossaries_spec.rb +18 -0
  59. data/spec/api_resources/integrations_spec.rb +117 -0
  60. data/spec/api_resources/organization_spec.rb +21 -0
  61. data/spec/api_resources/organization_webhooks_spec.rb +45 -0
  62. data/spec/api_resources/placeholders_spec.rb +103 -0
  63. data/spec/api_resources/projects_spec.rb +58 -0
  64. data/spec/api_resources/reports_spec.rb +221 -0
  65. data/spec/api_resources/security_logs_spec.rb +39 -0
  66. data/spec/api_resources/source_files_spec.rb +182 -0
  67. data/spec/api_resources/source_strings_spec.rb +26 -0
  68. data/spec/api_resources/string_comments_spec.rb +18 -0
  69. data/spec/api_resources/string_corrections_spec.rb +25 -19
  70. data/spec/api_resources/string_translations_spec.rb +26 -0
  71. data/spec/api_resources/style_guides_spec.rb +45 -0
  72. data/spec/api_resources/tasks_spec.rb +60 -0
  73. data/spec/api_resources/teams_spec.rb +42 -0
  74. data/spec/api_resources/translation_memory_spec.rb +58 -0
  75. data/spec/api_resources/translation_status_spec.rb +26 -0
  76. data/spec/api_resources/translations_spec.rb +42 -0
  77. data/spec/api_resources/users_spec.rb +84 -0
  78. data/spec/api_resources/workflows_spec.rb +10 -0
  79. metadata +27 -1
@@ -3,8 +3,10 @@
3
3
  module Crowdin
4
4
  module ApiResources
5
5
  module Applications
6
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.applications.api.get API Documentation}
7
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.applications.api.get API Documentation}
6
+ # @param application_identifier [String] Identifier of the application
7
+ # @param path [String] The path is implemented by the application
8
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.api.get API Documentation}
9
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.api.get Enterprise API Documentation}
8
10
  def get_application_data(application_identifier = nil, path = nil)
9
11
  application_identifier || raise_parameter_is_required_error(:application_identifier)
10
12
  path || raise_parameter_is_required_error(:path)
@@ -17,8 +19,11 @@ module Crowdin
17
19
  Web::SendRequest.new(request).perform
18
20
  end
19
21
 
20
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.applications.api.put API Documentation}
21
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.applications.api.put API Documentation}
22
+ # @param query [Hash] Request Body
23
+ # @param application_identifier [String] Identifier of the application
24
+ # @param path [String] The path is implemented by the application
25
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.api.put API Documentation}
26
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.api.put Enterprise API Documentation}
22
27
  def update_or_restore_application_data(query = {}, application_identifier = nil, path = nil)
23
28
  application_identifier || raise_parameter_is_required_error(:application_identifier)
24
29
  path || raise_parameter_is_required_error(:path)
@@ -32,8 +37,11 @@ module Crowdin
32
37
  Web::SendRequest.new(request).perform
33
38
  end
34
39
 
35
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.applications.api.put API Documentation}
36
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.applications.api.put API Documentation}
40
+ # @param query [Hash] Request Body
41
+ # @param application_identifier [String] Identifier of the application
42
+ # @param path [String] The path is implemented by the application
43
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.api.post API Documentation}
44
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.api.post Enterprise API Documentation}
37
45
  def add_application_data(query = {}, application_identifier = nil, path = nil)
38
46
  application_identifier || raise_parameter_is_required_error(:application_identifier)
39
47
  path || raise_parameter_is_required_error(:path)
@@ -47,8 +55,11 @@ module Crowdin
47
55
  Web::SendRequest.new(request).perform
48
56
  end
49
57
 
50
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.applications.api.delete API Documentation}
51
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.applications.api.delete API Documentation}
58
+ # @param query [Hash] Request Query Parameters
59
+ # @param application_identifier [String] Identifier of the application
60
+ # @param path [String] The path is implemented by the application
61
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.api.delete API Documentation}
62
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.api.delete Enterprise API Documentation}
52
63
  def delete_application_data(query = {}, application_identifier = nil, path = nil)
53
64
  application_identifier || raise_parameter_is_required_error(:application_identifier)
54
65
  path || raise_parameter_is_required_error(:path)
@@ -62,8 +73,11 @@ module Crowdin
62
73
  Web::SendRequest.new(request).perform
63
74
  end
64
75
 
65
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.applications.api.patch API Documentation}
66
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.applications.api.patch API Documentation}
76
+ # @param query [Hash] Request Body
77
+ # @param application_identifier [String] Identifier of the application
78
+ # @param path [String] The path is implemented by the application
79
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.api.patch API Documentation}
80
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.api.patch Enterprise API Documentation}
67
81
  def edit_application_data(query = {}, application_identifier = nil, path = nil)
68
82
  application_identifier || raise_parameter_is_required_error(:application_identifier)
69
83
  path || raise_parameter_is_required_error(:path)
@@ -76,6 +90,229 @@ module Crowdin
76
90
  )
77
91
  Web::SendRequest.new(request).perform
78
92
  end
93
+
94
+ # @param query [Hash] Request Query Parameters
95
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.consents.getMany API Documentation}
96
+ def list_application_consent_decisions(query = {})
97
+ request = Web::Request.new(
98
+ connection,
99
+ :get,
100
+ "#{config.target_api_url}/applications/consents",
101
+ { params: query }
102
+ )
103
+ Web::SendRequest.new(request).perform
104
+ end
105
+
106
+ # @param body [Hash] Request Body
107
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.consents.post API Documentation}
108
+ def create_application_consent_decision(body = {})
109
+ request = Web::Request.new(
110
+ connection,
111
+ :post,
112
+ "#{config.target_api_url}/applications/consents",
113
+ { params: body }
114
+ )
115
+ Web::SendRequest.new(request).perform
116
+ end
117
+
118
+ # @param consent_id [Integer] Consent Decision Identifier
119
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.consents.delete API Documentation}
120
+ def delete_application_consent_decision(consent_id)
121
+ request = Web::Request.new(
122
+ connection,
123
+ :delete,
124
+ "#{config.target_api_url}/applications/consents/#{consent_id}"
125
+ )
126
+ Web::SendRequest.new(request).perform
127
+ end
128
+
129
+ # @param consent_id [Integer] Consent Decision Identifier
130
+ # @param body [Array] Request Body
131
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.consents.patch API Documentation}
132
+ def edit_application_consent_decision(consent_id, body = [])
133
+ request = Web::Request.new(
134
+ connection,
135
+ :patch,
136
+ "#{config.target_api_url}/applications/consents/#{consent_id}",
137
+ { params: body }
138
+ )
139
+ Web::SendRequest.new(request).perform
140
+ end
141
+
142
+ # @param query [Hash] Request Query Parameters
143
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.installations.getMany API Documentation}
144
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.installations.getMany Enterprise API Documentation}
145
+ def list_application_installations(query = {})
146
+ request = Web::Request.new(
147
+ connection,
148
+ :get,
149
+ "#{config.target_api_url}/applications/installations",
150
+ { params: query }
151
+ )
152
+ Web::SendRequest.new(request).perform
153
+ end
154
+
155
+ # @param body [Hash] Request Body
156
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.installations.post API Documentation}
157
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.installations.post Enterprise API Documentation}
158
+ def install_application(body = {})
159
+ request = Web::Request.new(
160
+ connection,
161
+ :post,
162
+ "#{config.target_api_url}/applications/installations",
163
+ { params: body }
164
+ )
165
+ Web::SendRequest.new(request).perform
166
+ end
167
+
168
+ # @param identifier [String] Application Identifier
169
+ # @param query [Hash] Request Query Parameters
170
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.installations.delete API Documentation}
171
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.installations.delete Enterprise API Documentation}
172
+ def delete_application_installation(identifier, query = {})
173
+ request = Web::Request.new(
174
+ connection,
175
+ :delete,
176
+ "#{config.target_api_url}/applications/installations/#{identifier}",
177
+ { params: query }
178
+ )
179
+ Web::SendRequest.new(request).perform
180
+ end
181
+
182
+ # @param identifier [String] Application Identifier
183
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.installations.get API Documentation}
184
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.installations.get Enterprise API Documentation}
185
+ def get_application_installation(identifier)
186
+ request = Web::Request.new(
187
+ connection,
188
+ :get,
189
+ "#{config.target_api_url}/applications/installations/#{identifier}"
190
+ )
191
+ Web::SendRequest.new(request).perform
192
+ end
193
+
194
+ # @param identifier [String] Application Identifier
195
+ # @param body [Array] Request Body
196
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.installations.patch API Documentation}
197
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.installations.patch Enterprise API Documentation}
198
+ def edit_application_installation(identifier, body = [])
199
+ request = Web::Request.new(
200
+ connection,
201
+ :patch,
202
+ "#{config.target_api_url}/applications/installations/#{identifier}",
203
+ { params: body }
204
+ )
205
+ Web::SendRequest.new(request).perform
206
+ end
207
+
208
+ # @param identifier [String] Application Identifier
209
+ # @param body [Hash] Request Body
210
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.installations.bundles.post API Documentation}
211
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.installations.bundles.post Enterprise API Documentation}
212
+ def upload_application_bundle(identifier, body = {})
213
+ request = Web::Request.new(
214
+ connection,
215
+ :post,
216
+ "#{config.target_api_url}/applications/installations/#{identifier}/bundles",
217
+ { params: body }
218
+ )
219
+ Web::SendRequest.new(request).perform
220
+ end
221
+
222
+ # @param identifier [String] Application Identifier
223
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.installations.update.get API Documentation}
224
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.installations.update.get Enterprise API Documentation}
225
+ def get_application_installation_update(identifier)
226
+ request = Web::Request.new(
227
+ connection,
228
+ :get,
229
+ "#{config.target_api_url}/applications/installations/#{identifier}/update"
230
+ )
231
+ Web::SendRequest.new(request).perform
232
+ end
233
+
234
+ # @param identifier [String] Application Identifier
235
+ # @param body [Hash] Request Body
236
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.installations.update.post API Documentation}
237
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.installations.update.post Enterprise API Documentation}
238
+ def apply_application_installation_update(identifier, body = {})
239
+ request = Web::Request.new(
240
+ connection,
241
+ :post,
242
+ "#{config.target_api_url}/applications/installations/#{identifier}/update",
243
+ { params: body }
244
+ )
245
+ Web::SendRequest.new(request).perform
246
+ end
247
+
248
+ # @param application_identifier [String] Identifier of the application
249
+ # @param query [Hash] Request Query Parameters
250
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.storage.kv.records.getMany API Documentation}
251
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.storage.kv.records.getMany Enterprise API Documentation}
252
+ def list_application_kv_records(application_identifier, query = {})
253
+ request = Web::Request.new(
254
+ connection,
255
+ :get,
256
+ "#{config.target_api_url}/applications/#{application_identifier}/storage/kv/records",
257
+ { params: query }
258
+ )
259
+ Web::SendRequest.new(request).perform
260
+ end
261
+
262
+ # @param application_identifier [String] Identifier of the application
263
+ # @param body [Hash] Request Body
264
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.storage.kv.records.post API Documentation}
265
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.storage.kv.records.post Enterprise API Documentation}
266
+ def add_application_kv_record(application_identifier, body = {})
267
+ request = Web::Request.new(
268
+ connection,
269
+ :post,
270
+ "#{config.target_api_url}/applications/#{application_identifier}/storage/kv/records",
271
+ { params: body }
272
+ )
273
+ Web::SendRequest.new(request).perform
274
+ end
275
+
276
+ # @param application_identifier [String] Identifier of the application
277
+ # @param key [String] Key of the record
278
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.storage.kv.records.delete API Documentation}
279
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.storage.kv.records.delete Enterprise API Documentation}
280
+ def delete_application_kv_record(application_identifier, key)
281
+ request = Web::Request.new(
282
+ connection,
283
+ :delete,
284
+ "#{config.target_api_url}/applications/#{application_identifier}/storage/kv/records/#{key}"
285
+ )
286
+ Web::SendRequest.new(request).perform
287
+ end
288
+
289
+ # @param application_identifier [String] Identifier of the application
290
+ # @param key [String] Key of the record
291
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.storage.kv.records.get API Documentation}
292
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.storage.kv.records.get Enterprise API Documentation}
293
+ def get_application_kv_record(application_identifier, key)
294
+ request = Web::Request.new(
295
+ connection,
296
+ :get,
297
+ "#{config.target_api_url}/applications/#{application_identifier}/storage/kv/records/#{key}"
298
+ )
299
+ Web::SendRequest.new(request).perform
300
+ end
301
+
302
+ # @param application_identifier [String] Identifier of the application
303
+ # @param key [String] Key of the record
304
+ # @param body [Array] Request Body
305
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.applications.storage.kv.records.patch API Documentation}
306
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.applications.storage.kv.records.patch Enterprise API Documentation}
307
+ def edit_application_kv_record(application_identifier, key, body = [])
308
+ request = Web::Request.new(
309
+ connection,
310
+ :patch,
311
+ "#{config.target_api_url}/applications/#{application_identifier}/storage/kv/records/#{key}",
312
+ { params: body }
313
+ )
314
+ Web::SendRequest.new(request).perform
315
+ end
79
316
  end
80
317
  end
81
318
  end
@@ -3,9 +3,9 @@
3
3
  module Crowdin
4
4
  module ApiResources
5
5
  module Bundles
6
- # @param query [Hash] Request Body
7
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.getMany API Documentation}
8
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.bundles.getMany Enterprise API Documentation}
6
+ # @param query [Hash] Request Query Parameters
7
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.bundles.getMany API Documentation}
8
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.bundles.getMany Enterprise API Documentation}
9
9
  def list_bundles(query = {}, project_id = config.project_id)
10
10
  project_id || raise_project_id_is_required_error
11
11
 
@@ -19,8 +19,8 @@ module Crowdin
19
19
  end
20
20
 
21
21
  # @param query [Hash] Request Body
22
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.post API Documentation}
23
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.bundles.post Enterprise API Documentation}
22
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.bundles.post API Documentation}
23
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.bundles.post Enterprise API Documentation}
24
24
  def add_bundle(query = {}, project_id = config.project_id)
25
25
  project_id || raise_project_id_is_required_error
26
26
  %i[name format sourcePatterns exportPattern].each do |param|
@@ -36,9 +36,9 @@ module Crowdin
36
36
  Web::SendRequest.new(request).perform
37
37
  end
38
38
 
39
- # @param bundle_id [Integer] Bundle ID
40
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.exports.post API Documentation}
41
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.bundles.exports.post Enterprise API Documentation}
39
+ # @param bundle_id [Integer] Bundle Identifier
40
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.bundles.exports.post API Documentation}
41
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.bundles.exports.post Enterprise API Documentation}
42
42
  def export_bundle(bundle_id, project_id = config.project_id)
43
43
  bundle_id || raise_parameter_is_required_error(:bundle_id)
44
44
  project_id || raise_project_id_is_required_error
@@ -51,10 +51,10 @@ module Crowdin
51
51
  Web::SendRequest.new(request).perform
52
52
  end
53
53
 
54
- # @param bundle_id [Integer] Bundle ID
55
- # @param export_id [String] Export ID
56
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.exports.get API Documentation}
57
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.bundles.exports.get Enterprise API Documentation}
54
+ # @param bundle_id [Integer] Bundle Identifier
55
+ # @param export_id [String] Export Identifier, consists of 36 characters
56
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.bundles.exports.get API Documentation}
57
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.bundles.exports.get Enterprise API Documentation}
58
58
  def check_bundle_export_status(bundle_id, export_id, project_id = config.project_id)
59
59
  bundle_id || raise_parameter_is_required_error(:bundle_id)
60
60
  export_id || raise_parameter_is_required_error(:export_id)
@@ -68,11 +68,11 @@ module Crowdin
68
68
  Web::SendRequest.new(request).perform
69
69
  end
70
70
 
71
- # @param bundle_id [Integer] Bundle ID
72
- # @param export_id [String] Export ID
71
+ # @param bundle_id [Integer] Bundle Identifier
72
+ # @param export_id [String] Export Identifier, consists of 36 characters
73
73
  # @param destination [String] Destination of File
74
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.exports.download.get API Documentation}
75
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.bundles.exports.download.get Enterprise API Documentation}
74
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.bundles.exports.download.get API Documentation}
75
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.bundles.exports.download.get Enterprise API Documentation}
76
76
  def download_bundle(bundle_id, export_id, destination = nil, project_id = config.project_id)
77
77
  bundle_id || raise_parameter_is_required_error(:bundle_id)
78
78
  export_id || raise_parameter_is_required_error(:export_id)
@@ -86,9 +86,9 @@ module Crowdin
86
86
  Web::SendRequest.new(request, destination).perform
87
87
  end
88
88
 
89
- # @param bundle_id [Integer] Bundle ID
90
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.get API Documentation}
91
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.bundles.get Enterprise API Documentation}
89
+ # @param bundle_id [Integer] Bundle Identifier
90
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.bundles.get API Documentation}
91
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.bundles.get Enterprise API Documentation}
92
92
  def get_bundle(bundle_id, project_id = config.project_id)
93
93
  bundle_id || raise_parameter_is_required_error(:bundle_id)
94
94
  project_id || raise_project_id_is_required_error
@@ -101,9 +101,9 @@ module Crowdin
101
101
  Web::SendRequest.new(request).perform
102
102
  end
103
103
 
104
- # @param bundle_id [Integer] Bundle ID
105
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.delete API Documentation}
106
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.bundles.delete Enterprise API Documentation}
104
+ # @param bundle_id [Integer] Bundle Identifier
105
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.bundles.delete API Documentation}
106
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.bundles.delete Enterprise API Documentation}
107
107
  def delete_bundle(bundle_id, project_id = config.project_id)
108
108
  bundle_id || raise_parameter_is_required_error(:bundle_id)
109
109
  project_id || raise_project_id_is_required_error
@@ -116,10 +116,10 @@ module Crowdin
116
116
  Web::SendRequest.new(request).perform
117
117
  end
118
118
 
119
- # @param bundle_id [Integer] Bundle ID
119
+ # @param bundle_id [Integer] Bundle Identifier
120
120
  # @param query [Hash] Request Body
121
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.patch API Documentation}
122
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.bundles.patch Enterprise API Documentation}
121
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.bundles.patch API Documentation}
122
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.bundles.patch Enterprise API Documentation}
123
123
  def edit_bundle(bundle_id, query = {}, project_id = config.project_id)
124
124
  bundle_id || raise_parameter_is_required_error(:bundle_id)
125
125
  project_id || raise_project_id_is_required_error
@@ -133,10 +133,10 @@ module Crowdin
133
133
  Web::SendRequest.new(request).perform
134
134
  end
135
135
 
136
- # @param bundle_id [Integer] Bundle ID
137
- # @param query [Hash] Request Body
138
- # * {https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.files.getMany API Documentation}
139
- # * {https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.bundles.files.getMany Enterprise API Documentation}
136
+ # @param bundle_id [Integer] Bundle Identifier
137
+ # @param query [Hash] Request Query Parameters
138
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.bundles.files.getMany API Documentation}
139
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.bundles.files.getMany Enterprise API Documentation}
140
140
  def bundle_list_files(bundle_id, query = {}, project_id = config.project_id)
141
141
  bundle_id || raise_parameter_is_required_error(:bundle_id)
142
142
  project_id || raise_project_id_is_required_error
@@ -149,6 +149,22 @@ module Crowdin
149
149
  )
150
150
  Web::SendRequest.new(request).perform
151
151
  end
152
+
153
+ # @param bundle_id [Integer] Bundle Identifier
154
+ # @param query [Hash] Request Query Parameters
155
+ # * {https://support.crowdin.com/developer/api/v2/string-based/#operation/api.projects.bundles.branches.getMany API Documentation}
156
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/string-based/#operation/api.projects.bundles.branches.getMany Enterprise API Documentation}
157
+ def bundle_list_branches(bundle_id, query = {}, project_id = config.project_id)
158
+ project_id || raise_project_id_is_required_error
159
+
160
+ request = Web::Request.new(
161
+ connection,
162
+ :get,
163
+ "#{config.target_api_url}/projects/#{project_id}/bundles/#{bundle_id}/branches",
164
+ { params: query }
165
+ )
166
+ Web::SendRequest.new(request).perform
167
+ end
152
168
  end
153
169
  end
154
170
  end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crowdin
4
+ module ApiResources
5
+ module Clients
6
+ # -- For Enterprise mode only --
7
+
8
+ # @param query [Hash] Request Query Parameters
9
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.clients.getMany Enterprise API Documentation}
10
+ def list_clients(query = {})
11
+ enterprise_mode? || raise_only_for_enterprise_mode_error
12
+
13
+ request = Web::Request.new(
14
+ connection,
15
+ :get,
16
+ "#{config.target_api_url}/clients",
17
+ { params: query }
18
+ )
19
+ Web::SendRequest.new(request).perform
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crowdin
4
+ module ApiResources
5
+ module CustomSpellcheckers
6
+ # -- For Enterprise mode only --
7
+
8
+ # @param query [Hash] Request Query Parameters
9
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.custom-spellcheckers.getMany Enterprise API Documentation}
10
+ def list_custom_spellcheckers(query = {})
11
+ enterprise_mode? || raise_only_for_enterprise_mode_error
12
+
13
+ request = Web::Request.new(
14
+ connection,
15
+ :get,
16
+ "#{config.target_api_url}/custom-spellcheckers",
17
+ { params: query }
18
+ )
19
+ Web::SendRequest.new(request).perform
20
+ end
21
+
22
+ # @param custom_spellchecker_id [Integer] Custom Spellchecker Identifier
23
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.custom-spellcheckers.get Enterprise API Documentation}
24
+ def get_custom_spellchecker(custom_spellchecker_id)
25
+ enterprise_mode? || raise_only_for_enterprise_mode_error
26
+
27
+ request = Web::Request.new(
28
+ connection,
29
+ :get,
30
+ "#{config.target_api_url}/custom-spellcheckers/#{custom_spellchecker_id}"
31
+ )
32
+ Web::SendRequest.new(request).perform
33
+ end
34
+ end
35
+ end
36
+ end
@@ -3,9 +3,9 @@
3
3
  module Crowdin
4
4
  module ApiResources
5
5
  module Dictionaries
6
- # @param query [Hash] Request Body
7
- # * {https://support.crowdin.com/developer/api/v2/#tag/Dictionaries/operation/api.projects.dictionaries.getMany API Documentation}
8
- # * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Dictionaries/operation/api.projects.dictionaries.getMany Enterprise API Documentation}
6
+ # @param query [Hash] Request Query Parameters
7
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.dictionaries.getMany API Documentation}
8
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.dictionaries.getMany Enterprise API Documentation}
9
9
  def list_dictionaries(query = {}, project_id = config.project_id)
10
10
  project_id || raise_project_id_is_required_error
11
11
 
@@ -20,8 +20,8 @@ module Crowdin
20
20
 
21
21
  # @param language_id [String] Language Identifier
22
22
  # @param query [Hash] Request Body
23
- # * {https://support.crowdin.com/developer/api/v2/#tag/Dictionaries/operation/api.projects.dictionaries.patch API Documentation}
24
- # * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Dictionaries/operation/api.projects.dictionaries.patch Enterprise API Documentation}
23
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.dictionaries.patch API Documentation}
24
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.dictionaries.patch Enterprise API Documentation}
25
25
  def edit_dictionary(language_id = nil, query = {}, project_id = config.project_id)
26
26
  language_id || raise_parameter_is_required_error(:language_id)
27
27
  project_id || raise_project_id_is_required_error
@@ -3,9 +3,9 @@
3
3
  module Crowdin
4
4
  module ApiResources
5
5
  module Distributions
6
- # @param query [Hash] Request Body
7
- # * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.getMany API Documentation}
8
- # * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.getMany Enterprise API Documentation}
6
+ # @param query [Hash] Request Query Parameters
7
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.distributions.getMany API Documentation}
8
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.distributions.getMany Enterprise API Documentation}
9
9
  def list_distributions(query = {}, project_id = config.project_id)
10
10
  project_id || raise_project_id_is_required_error
11
11
 
@@ -19,8 +19,8 @@ module Crowdin
19
19
  end
20
20
 
21
21
  # @param query [Hash] Request Body
22
- # * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.post API Documentation}
23
- # * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.post Enterprise API Documentation}
22
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.distributions.post API Documentation}
23
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.distributions.post Enterprise API Documentation}
24
24
  def add_distribution(query = {}, project_id = config.project_id)
25
25
  project_id || raise_project_id_is_required_error
26
26
 
@@ -34,8 +34,8 @@ module Crowdin
34
34
  end
35
35
 
36
36
  # @param hash [String] Hash
37
- # * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.get API Documentation}
38
- # * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.get Enterprise API Documentation}
37
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.distributions.get API Documentation}
38
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.distributions.get Enterprise API Documentation}
39
39
  def get_distribution(hash = nil, project_id = config.project_id)
40
40
  hash || raise_parameter_is_required_error(:hash)
41
41
  project_id || raise_project_id_is_required_error
@@ -49,8 +49,8 @@ module Crowdin
49
49
  end
50
50
 
51
51
  # @param hash [String] Hash
52
- # * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.delete API Documentation}
53
- # * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.delete Enterprise API Documentation}
52
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.distributions.delete API Documentation}
53
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.distributions.delete Enterprise API Documentation}
54
54
  def delete_distribution(hash = nil, project_id = config.project_id)
55
55
  hash || raise_parameter_is_required_error(:hash)
56
56
  project_id || raise_project_id_is_required_error
@@ -65,8 +65,8 @@ module Crowdin
65
65
 
66
66
  # @param hash [String] Hash
67
67
  # @param query [Hash] Request Body
68
- # * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.patch API Documentation}
69
- # * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.patch Enterprise API Documentation}
68
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.distributions.patch API Documentation}
69
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.distributions.patch Enterprise API Documentation}
70
70
  def edit_distribution(hash = nil, query = {}, project_id = config.project_id)
71
71
  hash || raise_parameter_is_required_error(:hash)
72
72
  project_id || raise_project_id_is_required_error
@@ -81,8 +81,8 @@ module Crowdin
81
81
  end
82
82
 
83
83
  # @param hash [String] Hash
84
- # * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.release.get API Documentation}
85
- # * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.release.get Enterprise API Documentation}
84
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.distributions.release.get API Documentation}
85
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.distributions.release.get Enterprise API Documentation}
86
86
  def get_distribution_release(hash = nil, project_id = config.project_id)
87
87
  hash || raise_parameter_is_required_error(:hash)
88
88
  project_id || raise_project_id_is_required_error
@@ -96,8 +96,8 @@ module Crowdin
96
96
  end
97
97
 
98
98
  # @param hash [String] Hash
99
- # * {https://support.crowdin.com/developer/api/v2/#tag/Distributions/operation/api.projects.distributions.release.post API Documentation}
100
- # * {https://support.crowdin.com/developer/enterprise/api/v2/#tag/Distributions/operation/api.projects.distributions.release.post Enterprise API Documentation}
99
+ # * {https://support.crowdin.com/developer/api/v2/#operation/api.projects.distributions.release.post API Documentation}
100
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.distributions.release.post Enterprise API Documentation}
101
101
  def release_distribution(hash = nil, project_id = config.project_id)
102
102
  hash || raise_parameter_is_required_error(:hash)
103
103
  project_id || raise_project_id_is_required_error
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crowdin
4
+ module ApiResources
5
+ module ExternalQaChecks
6
+ # -- For Enterprise mode only --
7
+
8
+ # @param query [Hash] Request Query Parameters
9
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.external-qa-checks.getMany Enterprise API Documentation}
10
+ def list_external_qa_checks(query = {})
11
+ enterprise_mode? || raise_only_for_enterprise_mode_error
12
+
13
+ request = Web::Request.new(
14
+ connection,
15
+ :get,
16
+ "#{config.target_api_url}/external-qa-checks",
17
+ { params: query }
18
+ )
19
+ Web::SendRequest.new(request).perform
20
+ end
21
+
22
+ # @param external_qa_check_id [Integer] External QA check identifier
23
+ # * {https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.external-qa-checks.get Enterprise API Documentation}
24
+ def get_external_qa_check(external_qa_check_id)
25
+ enterprise_mode? || raise_only_for_enterprise_mode_error
26
+
27
+ request = Web::Request.new(
28
+ connection,
29
+ :get,
30
+ "#{config.target_api_url}/external-qa-checks/#{external_qa_check_id}"
31
+ )
32
+ Web::SendRequest.new(request).perform
33
+ end
34
+ end
35
+ end
36
+ end