zendesk_apps_support 4.31.0 → 4.33.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: '0358535696ec34c00e8eb9b6d2aa3c0575ddca2dec7df2f516e15099788f96c2'
|
|
4
|
+
data.tar.gz: 178611fb26e2bd7552c8e6b82c520854f40455ef71b3fa685690f2666df8e1a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a2cfbba4f1726d72874e64d4e59612b43cfc429a0d2944896824e8751ea8445953bb52576b885967b4601a0faa5a6c727667b8768b13d0bf06b8fdee5a1e104
|
|
7
|
+
data.tar.gz: dc364377373e42668dce9f13cb30abf30e64d360c18f2c0d7bd3401c4005c2b22c3774fdf56c77d26ab0e077416d2853562e7daed87e2f396faa74950b82e205
|
|
@@ -30,6 +30,7 @@ module ZendeskAppsSupport
|
|
|
30
30
|
errors << invalid_custom_fields(requirements)
|
|
31
31
|
errors << invalid_custom_objects(requirements)
|
|
32
32
|
errors << invalid_webhooks(requirements)
|
|
33
|
+
errors << invalid_target_types(requirements)
|
|
33
34
|
errors << missing_required_fields(requirements)
|
|
34
35
|
errors.flatten!
|
|
35
36
|
errors.compact!
|
|
@@ -113,18 +114,20 @@ module ZendeskAppsSupport
|
|
|
113
114
|
|
|
114
115
|
return if webhook_requirements.nil?
|
|
115
116
|
|
|
116
|
-
|
|
117
|
+
webhook_requirements.map do |identifier, requirement|
|
|
118
|
+
validate_webhook_keys(identifier, requirement)
|
|
119
|
+
end.flatten
|
|
117
120
|
end
|
|
118
121
|
|
|
119
|
-
def validate_webhook_keys(
|
|
122
|
+
def validate_webhook_keys(identifier, requirement)
|
|
120
123
|
required_keys = %w[name status endpoint http_method request_format]
|
|
121
124
|
|
|
122
|
-
missing_keys = required_keys -
|
|
125
|
+
missing_keys = required_keys - requirement.keys
|
|
123
126
|
|
|
124
127
|
missing_keys.map do |key|
|
|
125
128
|
ValidationError.new(:missing_required_fields,
|
|
126
129
|
field: key,
|
|
127
|
-
identifier:
|
|
130
|
+
identifier: identifier)
|
|
128
131
|
end
|
|
129
132
|
end
|
|
130
133
|
|
|
@@ -169,6 +172,18 @@ module ZendeskAppsSupport
|
|
|
169
172
|
identifier: identifier)
|
|
170
173
|
end
|
|
171
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
|
|
172
187
|
end
|
|
173
188
|
end
|
|
174
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.33.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-19 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: i18n
|