zendesk_apps_support 4.30.1 → 4.32.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10d6271886136ebf1422ffac35331cf0a6f0ee416fc45c122126cfab170c6d1a
|
4
|
+
data.tar.gz: ee79d3867a3e6f959d6a692a6eb9bd39c8b15663cf89cb35887ef5aa92ad2106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24b854a106b6d9d29bac321e7b76fe685db0b800fc1da73f95da40ad12c45f5d6a548c10418b048f89d45af1dfdc31ca6f40199088217453873dc2450d7cf3ee
|
7
|
+
data.tar.gz: 020f26d213b85c16ea3a9154320a7c11c176f17fe6c33e7eeb4c182eea1441e09e633169cb072c768e22d5ba133ca1f1d232d194f7fd336dbf38775e31366310
|
@@ -29,6 +29,8 @@ module ZendeskAppsSupport
|
|
29
29
|
errors << invalid_channel_integrations(requirements)
|
30
30
|
errors << invalid_custom_fields(requirements)
|
31
31
|
errors << invalid_custom_objects(requirements)
|
32
|
+
errors << invalid_webhooks(requirements)
|
33
|
+
errors << invalid_target_types(requirements)
|
32
34
|
errors << missing_required_fields(requirements)
|
33
35
|
errors.flatten!
|
34
36
|
errors.compact!
|
@@ -107,6 +109,28 @@ module ZendeskAppsSupport
|
|
107
109
|
end
|
108
110
|
end
|
109
111
|
|
112
|
+
def invalid_webhooks(requirements)
|
113
|
+
webhook_requirements = requirements[AppRequirement::WEBHOOKS_KEY]
|
114
|
+
|
115
|
+
return if webhook_requirements.nil?
|
116
|
+
|
117
|
+
webhook_requirements.map do |identifier, requirement|
|
118
|
+
validate_webhook_keys(identifier, requirement)
|
119
|
+
end.flatten
|
120
|
+
end
|
121
|
+
|
122
|
+
def validate_webhook_keys(identifier, requirement)
|
123
|
+
required_keys = %w[name status endpoint http_method request_format]
|
124
|
+
|
125
|
+
missing_keys = required_keys - requirement.keys
|
126
|
+
|
127
|
+
missing_keys.map do |key|
|
128
|
+
ValidationError.new(:missing_required_fields,
|
129
|
+
field: key,
|
130
|
+
identifier: identifier)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
110
134
|
def invalid_custom_objects(requirements)
|
111
135
|
custom_objects = requirements[AppRequirement::CUSTOM_OBJECTS_KEY]
|
112
136
|
return if custom_objects.nil?
|
@@ -148,6 +172,18 @@ module ZendeskAppsSupport
|
|
148
172
|
identifier: identifier)
|
149
173
|
end
|
150
174
|
end
|
175
|
+
|
176
|
+
def invalid_target_types(requirements)
|
177
|
+
invalid_target_types = %w[http_target]
|
178
|
+
|
179
|
+
requirements['targets']&.map do |_identifier, requirement|
|
180
|
+
if invalid_target_types.include?(requirement['type'])
|
181
|
+
ValidationError.new(:invalid_requirements_types,
|
182
|
+
invalid_types: "targets -> #{requirement['type']}",
|
183
|
+
count: 1)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
151
187
|
end
|
152
188
|
end
|
153
189
|
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.
|
4
|
+
version: 4.32.0
|
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: 2022-
|
14
|
+
date: 2022-05-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: i18n
|
@@ -347,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
347
347
|
- !ruby/object:Gem::Version
|
348
348
|
version: 1.3.6
|
349
349
|
requirements: []
|
350
|
-
rubygems_version: 3.0.1
|
350
|
+
rubygems_version: 3.0.3.1
|
351
351
|
signing_key:
|
352
352
|
specification_version: 4
|
353
353
|
summary: Support to help you develop Zendesk Apps.
|