zendesk_apps_support 4.50.0 → 4.51.0.alpha.1

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: 4c15ea4bafff914946cdb8690a7357447f9b02c91806fa7b4fec6766c1a327b7
4
- data.tar.gz: 167ba11debabf6de1dc4d76a772e36dbf6b9c9753dce174a36866783c124b5ce
3
+ metadata.gz: bbe9d3c1dd86e4e85156e9362d93e98bdd4930c24ae9a1936381ad1f22c7eb28
4
+ data.tar.gz: fe03b96eabca49cbd865c7af1790efe1622908ee26f8e585e0ba85d47f266e60
5
5
  SHA512:
6
- metadata.gz: 79359a73f2af9256af3337be7696561bd213b9dd842cd7d46c867a694216adfe715a8c4523c477cfadc34d7a1b5cea00088cb850b9eca781e119cc0fd74803ba
7
- data.tar.gz: 86d32a1526b471ccbd78c83a71f6fda82b2546c5317be74d92f409ed984b8089a9ee16e24c2a97ad607a171ba0cad767c4a967f49ac5a12d9aac8ba55a479ca7
6
+ metadata.gz: 9590ab75e91345a87710d49372cf6951e950bcc6dc699ea4d8c5f2214eced46882a4485c3d18ec96b7f4c611630f1229bce0e756a94c65689887a74f3941fb1b
7
+ data.tar.gz: 169e4b7ed9c2d94db1be6c21a2214b88b62b542dcfd22eecf0a01037173967b4590540dc98bc90c7052b98e53db85c3d3b0e7d1522bfe08ecdb4f5bf5ba397cb
@@ -268,6 +268,9 @@ en:
268
268
  do not match products in translations (%{translation_products})
269
269
  insecure_token_parameter_in_manifest: 'Make sure to set secure to true
270
270
  when using keys in Settings. Learn more: %{link}'
271
+ password_parameter_deprecated: 'Password parameter type is deprecated
272
+ and will not be accepted in the future. Use Basic Access Authentication
273
+ instead. Learn more: %{link}.'
271
274
  default_secure_or_hidden_parameter_in_manifest: Default values for secure
272
275
  or hidden parameters are not stored securely. Be sure to review them
273
276
  and confirm they do not contain sensitive data
@@ -295,11 +298,22 @@ en:
295
298
  oauth_parameter_cannot_be_secure: oauth parameter cannot be set to be
296
299
  secure.
297
300
  invalid_url: '%{field} must be a valid URL, got "%{value}".'
301
+ password_parameter_type_deprecated: 'Password parameter type can no longer
302
+ be used. Use Secure settings instead. Learn more: %{link}.'
298
303
  field_requires_secure_parameter: "%{field} cannot be defined in a non-secure
299
304
  parameter."
300
305
  field_cannot_be_empty: "%{field} cannot be empty."
301
306
  field_contains_invalid_values: "%{field} contains invalid values: %{values}."
302
307
  field_contains_invalid_keys: "%{field} contains invalid keys: %{keys}."
308
+ object_types_must_be_array: objectTypes must be an array of strings for
309
+ the %{location} location, but it was %{value}.
310
+ object_types_empty: objectTypes cannot be empty for the %{location} location.
311
+ Specify at least one object type.
312
+ object_types_invalid_entries: objectTypes must contain only non-empty
313
+ strings for the %{location} location.
314
+ object_types_not_supported: objectTypes is not supported for the %{location}
315
+ location.
316
+ object_types_required: objectTypes is required for the %{location} location.
303
317
  warning:
304
318
  app_build:
305
319
  deprecated_version: You are targeting a deprecated version of the framework.
@@ -657,7 +657,7 @@ parts:
657
657
  key: "txt.apps.admin.error.app_build.password_parameter_type_deprecated"
658
658
  title: "App builder job: Password parameter type is deprecated"
659
659
  value: "Password parameter type can no longer be used. Use Secure settings instead. Learn more: %{link}."
660
- obesolete: "2026-08-31"
660
+ obsolete: "2026-08-31"
661
661
  - translation:
662
662
  key: "txt.apps.admin.error.app_build.field_requires_secure_parameter"
663
663
  title: "App builder job: Error when parameter field requires secure setting set to true. Placeholder %{field} shows parameter field along with parameter name like \"parameter[name='param'].scopes\" found in the supplied manifest file."
@@ -674,6 +674,26 @@ parts:
674
674
  key: "txt.apps.admin.error.app_build.field_contains_invalid_keys"
675
675
  title: "App builder job: Error for invalid field keys. Placeholder %{field} shows parameter fields like \"parameter[name='param'].scopes\" provided in the supplied manifest file, %{keys} shows the invalid keys found within the field."
676
676
  value: "%{field} contains invalid keys: %{keys}."
677
+ - translation:
678
+ key: "txt.apps.admin.error.app_build.object_types_must_be_array"
679
+ title: "App builder job: objectTypes must be an array of strings for the given location. Do not translate 'objectTypes' as it is a manifest property."
680
+ value: "objectTypes must be an array of strings for the %{location} location, but it was %{value}."
681
+ - translation:
682
+ key: "txt.apps.admin.error.app_build.object_types_empty"
683
+ title: "App builder job: objectTypes cannot be empty for the given location. Do not translate 'objectTypes' as it is a manifest property."
684
+ value: "objectTypes cannot be empty for the %{location} location. Specify at least one object type."
685
+ - translation:
686
+ key: "txt.apps.admin.error.app_build.object_types_invalid_entries"
687
+ title: "App builder job: objectTypes must contain only non-empty strings for the given location. Do not translate 'objectTypes' as it is a manifest property."
688
+ value: "objectTypes must contain only non-empty strings for the %{location} location."
689
+ - translation:
690
+ key: "txt.apps.admin.error.app_build.object_types_not_supported"
691
+ title: "App builder job: objectTypes is not supported for the given location. Do not translate 'objectTypes' as it is a manifest property."
692
+ value: "objectTypes is not supported for the %{location} location."
693
+ - translation:
694
+ key: "txt.apps.admin.error.app_build.object_types_required"
695
+ title: "App builder job: objectTypes is required for the given location. Do not translate 'objectTypes' as it is a manifest property."
696
+ value: "objectTypes is required for the %{location} location."
677
697
  - translation:
678
698
  key: "txt.apps.admin.error.app_build.translation.secure_parameters_with_no_scopes_in_manifest"
679
699
  title: "Validation message to indicate missing scopes field in manifest's secure parameter.
@@ -5,6 +5,8 @@ module ZendeskAppsSupport
5
5
  extend ZendeskAppsSupport::Finders
6
6
  attr_reader :id, :name, :orderable, :collapsible, :visible, :product_code, :v2_only
7
7
 
8
+ CUSTOM_OBJECT_RECORD_SIDEBAR_LOCATION = 'custom_object_record_sidebar'
9
+
8
10
  def self.unique_ids
9
11
  @ids ||= Set.new
10
12
  end
@@ -65,7 +67,9 @@ module ZendeskAppsSupport
65
67
  Location.new(id: 23, name: 'call_log_editor', product_code: Product::SELL.code, visible: true),
66
68
  Location.new(id: 24, name: 'email_editor', product_code: Product::SELL.code, visible: true),
67
69
  Location.new(id: 25, name: 'top_bar', product_code: Product::SELL.code, visible: true),
68
- Location.new(id: 26, name: 'visit_editor', product_code: Product::SELL.code, visible: true)
70
+ Location.new(id: 26, name: 'visit_editor', product_code: Product::SELL.code, visible: true),
71
+ Location.new(id: 27, orderable: true, collapsible: true, name: CUSTOM_OBJECT_RECORD_SIDEBAR_LOCATION,
72
+ product_code: Product::SUPPORT.code, visible: true)
69
73
  ].freeze
70
74
  end
71
75
  end
@@ -10,7 +10,8 @@ module ZendeskAppsSupport
10
10
  flexible: 'flexible',
11
11
  signed: 'signed',
12
12
  url: 'url',
13
- size: 'size'
13
+ size: 'size',
14
+ object_types: 'objectTypes'
14
15
  }.freeze
15
16
 
16
17
  attr_reader :location
@@ -34,9 +34,10 @@ module ZendeskAppsSupport
34
34
  def validate(options = {})
35
35
  marketplace = options.fetch(:marketplace, true)
36
36
  skip_marketplace_translations = options.fetch(:skip_marketplace_translations, false)
37
+ validate_custom_object_record_sidebar_location = options.fetch(:validate_custom_object_record_sidebar_location, false)
37
38
 
38
39
  errors = []
39
- errors << Validations::Manifest.call(self)
40
+ errors << Validations::Manifest.call(self, validate_custom_object_record_sidebar_location: validate_custom_object_record_sidebar_location)
40
41
 
41
42
  if has_valid_manifest?(errors)
42
43
  errors << Validations::Marketplace.call(self) if marketplace
@@ -14,7 +14,7 @@ module ZendeskAppsSupport
14
14
  SECURE_PARAM_SCOPES = %w[header body url jwt_secret_key jwt_claim basic_auth_username basic_auth_password].freeze
15
15
 
16
16
  class << self
17
- def call(package)
17
+ def call(package, validate_custom_object_record_sidebar_location: false)
18
18
  unless package.has_file?('manifest.json')
19
19
  nested_manifest = package.files.find { |file| file =~ %r{\A[^/]+?/manifest\.json\Z} }
20
20
  if nested_manifest
@@ -22,7 +22,8 @@ module ZendeskAppsSupport
22
22
  end
23
23
  return [ValidationError.new(:missing_manifest)]
24
24
  end
25
- collate_manifest_errors(package)
25
+ collate_manifest_errors(package,
26
+ validate_custom_object_record_sidebar_location: validate_custom_object_record_sidebar_location)
26
27
  rescue JSON::ParserError => e
27
28
  return [ValidationError.new(:manifest_not_json, errors: e)]
28
29
  rescue ZendeskAppsSupport::Manifest::OverrideError => e
@@ -31,7 +32,7 @@ module ZendeskAppsSupport
31
32
 
32
33
  private
33
34
 
34
- def collate_manifest_errors(package)
35
+ def collate_manifest_errors(package, validate_custom_object_record_sidebar_location: false)
35
36
  manifest = package.manifest
36
37
 
37
38
  errors = [
@@ -45,7 +46,8 @@ module ZendeskAppsSupport
45
46
  [ ban_location(manifest),
46
47
  ban_framework_version(manifest) ]
47
48
  else
48
- [ validate_location(package),
49
+ [ validate_location(package,
50
+ validate_custom_object_record_sidebar_location: validate_custom_object_record_sidebar_location),
49
51
  missing_framework_version(manifest),
50
52
  invalid_version_error(manifest) ]
51
53
  end,
@@ -54,13 +56,15 @@ module ZendeskAppsSupport
54
56
  errors.flatten.compact
55
57
  end
56
58
 
57
- def validate_location(package)
59
+ def validate_location(package, validate_custom_object_record_sidebar_location: false)
58
60
  manifest = package.manifest
59
61
  [
60
62
  missing_location_error(package),
61
- invalid_location_error(package),
63
+ invalid_location_error(package,
64
+ validate_custom_object_record_sidebar_location: validate_custom_object_record_sidebar_location),
62
65
  invalid_v1_location(package),
63
- location_framework_mismatch(manifest)
66
+ location_framework_mismatch(manifest),
67
+ (validate_object_types(manifest) if validate_custom_object_record_sidebar_location)
64
68
  ]
65
69
  end
66
70
 
@@ -313,8 +317,10 @@ module ZendeskAppsSupport
313
317
  missing_keys_validation_error(['location']) if package.manifest.location_options.empty?
314
318
  end
315
319
 
316
- def invalid_location_error(package)
320
+ def invalid_location_error(package, validate_custom_object_record_sidebar_location: false)
317
321
  errors = []
322
+ custom_object_record_sidebar = ZendeskAppsSupport::Location::CUSTOM_OBJECT_RECORD_SIDEBAR_LOCATION
323
+
318
324
  package.manifest.location_options.each do |location_options|
319
325
  if location_options.url.is_a?(String) && !location_options.url.empty?
320
326
  errors << invalid_location_uri_error(package, location_options)
@@ -329,6 +335,16 @@ module ZendeskAppsSupport
329
335
 
330
336
  Product::PRODUCTS_AVAILABLE.each do |product|
331
337
  invalid_locations = package.manifest.unknown_locations(product.name)
338
+
339
+ unless validate_custom_object_record_sidebar_location
340
+ requested_locations = package.manifest.location_options
341
+ .select { |lo| lo.location&.product_code == product.code }
342
+ .map { |lo| lo.location&.name }
343
+ if requested_locations.include?(custom_object_record_sidebar)
344
+ invalid_locations << custom_object_record_sidebar
345
+ end
346
+ end
347
+
332
348
  next if invalid_locations.empty?
333
349
  errors << ValidationError.new(:invalid_location,
334
350
  invalid_locations: invalid_locations.join(', '),
@@ -379,6 +395,47 @@ module ZendeskAppsSupport
379
395
  validation_error
380
396
  end
381
397
 
398
+ def validate_object_types(manifest)
399
+ custom_object_record_sidebar = ZendeskAppsSupport::Location::CUSTOM_OBJECT_RECORD_SIDEBAR_LOCATION
400
+ manifest.location_options.each do |location_options|
401
+ object_types = location_options.object_types
402
+ next if location_options.location.nil?
403
+
404
+ location_name = location_options.location.name
405
+
406
+ if object_types.nil?
407
+ if location_name == custom_object_record_sidebar
408
+ return ValidationError.new(:object_types_required,
409
+ location: location_name)
410
+ end
411
+ next
412
+ end
413
+
414
+ if location_name != custom_object_record_sidebar
415
+ return ValidationError.new(:object_types_not_supported,
416
+ location: location_name)
417
+ end
418
+
419
+ unless object_types.is_a?(Array)
420
+ return ValidationError.new(:object_types_must_be_array,
421
+ location: location_name,
422
+ value: object_types.class.to_s)
423
+ end
424
+
425
+ if object_types.empty?
426
+ return ValidationError.new(:object_types_empty,
427
+ location: location_name)
428
+ end
429
+
430
+ non_strings = object_types.reject { |t| t.is_a?(String) && !t.strip.empty? }
431
+ unless non_strings.empty?
432
+ return ValidationError.new(:object_types_invalid_entries,
433
+ location: location_name)
434
+ end
435
+ end
436
+ nil
437
+ end
438
+
382
439
  def valid_absolute_uri?(uri)
383
440
  uri.scheme == 'https' || uri.host == 'localhost'
384
441
  end
@@ -1,3 +1,3 @@
1
1
  module ZendeskAppsSupport
2
- VERSION = '4.50.0'
2
+ VERSION = '4.51.0.alpha.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk_apps_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.50.0
4
+ version: 4.51.0.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James A. Rosen
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2026-04-30 00:00:00.000000000 Z
14
+ date: 2026-07-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: i18n