gitlab_support_readiness 1.0.106 → 1.0.107

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: 382bb3f8e93489bd0981ac1314b30102c707b91b5298766c81a3b874873e154a
4
- data.tar.gz: b26189e604d605fa8e38a2c121e4c9df4187d5d7f97e6a31ad853b75693dd7cc
3
+ metadata.gz: f818f636d0d4ede0cdc4deb7ddc3766c55494083323688b4e1824eaf379c7e9f
4
+ data.tar.gz: a0f927d38db878c0ad5910942dff16fdc47233b2c80db148d66ace3cb21bb15b
5
5
  SHA512:
6
- metadata.gz: 531ea2fd66a168979466a8aa574472db8f2931c321f1681f8d8ccf102a71dfc741a2422be260da41b18dc577013bd7b56e040b1fa78534ef932697098a3bbc52
7
- data.tar.gz: b3c111629ae14987e2ec82a5f6e64f9cd0f275569e1331879f63e47b593c4ac13a683d0691bc2a2c87f1ed6bf2c5eee478af0938dc9f073656cae9aaead368ee
6
+ metadata.gz: 61da165d631935cd0a8d45c974b7affb65ce62143430e77b8fc1240e5236618223b5e51ee69590a465e29111f37cb7f14701a0c4a0735c597629d15d7e4d2673
7
+ data.tar.gz: 9d87216ba5ef760c5da1da4e58c0f7e0902d1cfc21a2f039b8f4ef9e926666a43dfaf98163579a06c4b077c179274479e578b161589215f5ea99246057894ac4
@@ -137,6 +137,8 @@ module Readiness
137
137
  def self.gather(location = 'data')
138
138
  @categories = Readiness::Zendesk::TriggerCategories.list(@zendesk_client)
139
139
  @schedules = Readiness::Zendesk::Schedules.list(@zendesk_client)
140
+ @satisfaction_reasons = Readiness::Zendesk::SatisfactionReasons.list(@zendesk_client)
141
+ @targets = Readiness::Zendesk::Targets.list(@zendesk_client)
140
142
  @ticket_fields = Readiness::Zendesk::TicketFields.list(@zendesk_client)
141
143
  @ticket_forms = Readiness::Zendesk::TicketForms.list(@zendesk_client)
142
144
  @webhooks = Readiness::Zendesk::Webhooks.list(@zendesk_client)
@@ -172,6 +174,38 @@ module Readiness
172
174
  def self.convert_names_to_ids(trigger)
173
175
  %w[any all].each do |type|
174
176
  trigger['conditions'][type].each_with_index do |c, i|
177
+ if c['field'] == 'satisfaction_reason_code'
178
+ reason = Readiness::Zendesk::SatisfactionReasons.find_by_name(@zendesk_client, c['value'], @satisfaction_reasons)
179
+ unless reason.nil?
180
+ trigger['conditions'][type][i]['value'] = reason.reason_code.to_s
181
+ end
182
+ end
183
+ if c['field'] == 'via_id'
184
+ via_type = Readiness::Zendesk::ViaTypes.find_by_name(c['value'])
185
+ unless via_type.nil?
186
+ trigger['conditions'][type][i]['value'] = via_type.id.to_s
187
+ end
188
+ end
189
+ if c['field'] == 'requester_role'
190
+ role = Readiness::Zendesk::RequesterRoles.find_by_name(c['value'])
191
+ unless role.nil?
192
+ trigger['conditions'][type][i]['value'] = role.id.to_s
193
+ end
194
+ end
195
+ if c['field'] == 'role'
196
+ role = Readiness::Zendesk::TicketUserTypes.find_by_name(@zendesk_client, c['value'])
197
+ unless role.nil?
198
+ trigger['conditions'][type][i]['value'] = role.id.to_s
199
+ end
200
+ end
201
+ if c['field'] == 'assignee_id'
202
+ unless ['', 'current_user', 'requester_id'].include? c['value']
203
+ search = Readiness::Zendesk::Search.users(@zendesk_client, "email:#{c['value']}")
204
+ if search.count == 1
205
+ trigger['conditions'][type][i]['value'] = search.first.id.to_s
206
+ end
207
+ end
208
+ end
175
209
  if c['field'] == 'ticket_form_id'
176
210
  if c['value'] =~ /Form\:\ /
177
211
  name = c['value'].split('Form: ').last
@@ -192,6 +226,30 @@ module Readiness
192
226
  end
193
227
  end
194
228
  trigger['actions'].each_with_index do |a, i|
229
+ if a['field'] == 'notification_target'
230
+ if a['value'].first =~ /^Target\:\ /
231
+ name = a['value'].first.split('Target: ').last
232
+ target = Readiness::Zendesk::Targets.find_by_name(@zendesk_client, name, @targets)
233
+ trigger['actions'][i]['value'][0] = target.id.to_s
234
+ end
235
+ end
236
+ if a['field'] == 'role'
237
+ role = Readiness::Zendesk::TicketUserTypes.find_by_name(@zendesk_client, c['value'])
238
+ unless role.nil?
239
+ trigger['actions'][i]['value'] = role.id.to_s
240
+ end
241
+ end
242
+ if a['field'] == 'assignee_id'
243
+ unless ['', 'current_user', 'requester_id'].include? a['value']
244
+ search = Readiness::Zendesk::Search.users(@zendesk_client, "email:#{a['value']}")
245
+ if search.count == 1
246
+ trigger['actions'][i]['value'] = search.first.id.to_s
247
+ else
248
+ puts "Cannot find user #{a['value']} for #{trigger['title']}"
249
+ exit 1
250
+ end
251
+ end
252
+ end
195
253
  if a['field'] == 'notification_webhook'
196
254
  if a['value'].first =~ /^Webhook\:\ /
197
255
  name = a['value'].first.split('Webhook: ').last
@@ -0,0 +1,67 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Defines the module Readiness.
4
+ module Readiness
5
+ # Defines the module Zendesk
6
+ module Zendesk
7
+ ##
8
+ # Defines the class RequesterRoles within the module {Readiness::Zendesk}.
9
+ #
10
+ # @author Jason Colyer
11
+ # @since 1.0.107
12
+ class RequesterRoles < Readiness::Client
13
+ attr_accessor :id, :name
14
+
15
+ ##
16
+ # Creates a new {Readiness::Zendesk::RequesterRoles} instance
17
+ #
18
+ # @author Jason Colyer
19
+ # @since 1.0.107
20
+ # @param object [Object] An instance of {Readiness::Zendesk::RequesterRoles}
21
+ # @example
22
+ # require 'support_readiness'
23
+ # Readiness::Zendesk::RequesterRoles.new
24
+ def initialize(object = {})
25
+ @id = object['id']
26
+ @name = object['name']
27
+ end
28
+
29
+ ##
30
+ # Lists requester roles
31
+ #
32
+ # @author Jason Colyer
33
+ # @since 1.0.107
34
+ # @param client [Object] An instance of {Readiness::Zendesk::Client}
35
+ # @return [Array]
36
+ # @example
37
+ # require 'support_readiness'
38
+ # types = Readiness::Zendesk::RequesterRoles.list
39
+ # pp types.first.name
40
+ # # => "Web form"
41
+ def self.list
42
+ [
43
+ { 'id' => 4, 'name' => 'Agent' },
44
+ { 'id' => 'LIGHT_AGENT', 'name' => 'Light Agent' },
45
+ { 'id' => 0, 'name' => 'End User' },
46
+ { 'id' => 2, 'name' => 'Admin' }
47
+ ].map { |r| RequesterRoles.new(r) }
48
+ end
49
+
50
+ ##
51
+ # Locates a via type within Zendesk by name
52
+ #
53
+ # @author Jason Colyer
54
+ # @since 1.0.107
55
+ # @param name [String] The via type name to look for
56
+ # @return [Object] An instance of {Readiness::Zendesk::ViaTypes}
57
+ # @example
58
+ # require 'support_readiness'
59
+ # role = Readiness::Zendesk::RequesterRoles.find_by_name('Agent')
60
+ # pp role.id
61
+ # # => 4
62
+ def self.find_by_name(name)
63
+ RequesterRoles.list.detect { |r| r.name == name }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Defines the module Readiness.
4
+ module Readiness
5
+ # Defines the module Zendesk
6
+ module Zendesk
7
+ ##
8
+ # Defines the class SatisfactionReasons within the module {Readiness::Zendesk}.
9
+ #
10
+ # @author Jason Colyer
11
+ # @since 1.0.107
12
+ # @todo Find methods
13
+ class SatisfactionReasons < Readiness::Client
14
+ attr_accessor :id, :raw_value, :reason_code, :value
15
+
16
+ ##
17
+ # Creates a new {Readiness::Zendesk::SatisfactionReasons} instance
18
+ #
19
+ # @author Jason Colyer
20
+ # @since 1.0.107
21
+ # @param object [Object] An instance of {Readiness::Zendesk::SatisfactionReasons}
22
+ # @example
23
+ # require 'support_readiness'
24
+ # Readiness::Zendesk::SatisfactionReasons.new
25
+ def initialize(object = {})
26
+ @id = object['id']
27
+ @raw_value = object['raw_value']
28
+ @reason_code = object['reason_code']
29
+ @value = object['value']
30
+ end
31
+
32
+ ##
33
+ # Lists satisfaction reasons
34
+ #
35
+ # @author Jason Colyer
36
+ # @since 1.0.107
37
+ # @param client [Object] An instance of {Readiness::Zendesk::Client}
38
+ # @return [Array]
39
+ # @see https://developer.zendesk.com/api-reference/ticketing/ticket-management/satisfaction_reasons/#list-reasons-for-satisfaction-rating Zendesk API > Satisfaction Reaosns > List Reasons for Satisfaction Rating
40
+ # @example
41
+ # require 'support_readiness'
42
+ # config = Readiness::Zendesk::Configuration.new
43
+ # config.username = 'alice@example.com'
44
+ # config.token = 'test123abc'
45
+ # config.url = 'https://example.zendesk.com/api/v2'
46
+ # client = Readiness::Zendesk::Client.new(config)
47
+ # reasons = Readiness::Zendesk::SatisfactionReasons.list(client)
48
+ # pp reasons.first.reason_code
49
+ # # => 1003
50
+ def self.list(client)
51
+ response = client.connection.get 'satisfaction_reasons'
52
+ handle_request_error(0, 'Zendesk', response.status) unless response.status == 200
53
+ body = Oj.load(response.body)
54
+ body['satisfaction_reasons'].map { |t| SatisfactionReasons.new(t)}
55
+ end
56
+
57
+ ##
58
+ # Locates a satisfaction reason within Zendesk by name. Can utilize a cache for quicker results
59
+ #
60
+ # @author Jason Colyer
61
+ # @since 1.0.107
62
+ # @param client [Object] An instance of {Readiness::Zendesk::Client}
63
+ # @param value [String] The satisfaction reason value to look for
64
+ # @param cache [Array] The results of {Readiness::Zendesk::SatisfactionReasons#list}
65
+ # @return [Object] An instance of {Readiness::Zendesk::SatisfactionReasons}
66
+ # @example
67
+ # require 'support_readiness'
68
+ # config = Readiness::Zendesk::Configuration.new
69
+ # config.username = 'alice@example.com'
70
+ # config.token = 'test123abc'
71
+ # config.url = 'https://example.zendesk.com/api/v2'
72
+ # client = Readiness::Zendesk::Client.new(config)
73
+ # reason = Readiness::Zendesk::SatisfactionReasons.find_by_name!(client, 'Agent did not respond quickly')
74
+ # pp reason.reason_code
75
+ # # => 1003
76
+ # list = Readiness::Zendesk::SatisfactionReasons.list(client)
77
+ # reason = Readiness::Zendesk::Schedules.find_by_name(client, 'Agent did not respond quickly', list)
78
+ # pp reason.reason_code
79
+ # # => 1003
80
+ def self.find_by_name(client, value, cache = nil)
81
+ list = if cache.nil?
82
+ SatisfactionReasons.list(client)
83
+ else
84
+ cache
85
+ end
86
+ list.detect { |c| c.value == value }
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,95 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Defines the module Readiness.
4
+ module Readiness
5
+ # Defines the module Zendesk
6
+ module Zendesk
7
+ ##
8
+ # Defines the class Targets within the module {Readiness::Zendesk}.
9
+ #
10
+ # @author Jason Colyer
11
+ # @since 1.0.107
12
+ # @todo Find methods
13
+ # @todo Create method
14
+ # @todo Update method
15
+ # @todo Delete method
16
+ class Targets < Readiness::Client
17
+ attr_accessor :active, :email, :id, :subject, :title, :type
18
+
19
+ ##
20
+ # Creates a new {Readiness::Zendesk::Targets} instance
21
+ #
22
+ # @author Jason Colyer
23
+ # @since 1.0.107
24
+ # @param object [Object] An instance of {Readiness::Zendesk::Targets}
25
+ # @example
26
+ # require 'support_readiness'
27
+ # Readiness::Zendesk::Targets.new
28
+ def initialize(object = {})
29
+ @active = object['active']
30
+ @email = object['email']
31
+ @id = object['id']
32
+ @subject = object['subject']
33
+ @title = object['title']
34
+ @type = object['type']
35
+ end
36
+
37
+ ##
38
+ # Lists targets
39
+ #
40
+ # @author Jason Colyer
41
+ # @since 1.0.107
42
+ # @param client [Object] An instance of {Readiness::Zendesk::Client}
43
+ # @return [Array]
44
+ # @see https://developer.zendesk.com/api-reference/ticketing/targets/targets/#list-targets Zendesk API > Targets > List Targets
45
+ # @example
46
+ # require 'support_readiness'
47
+ # config = Readiness::Zendesk::Configuration.new
48
+ # config.username = 'alice@example.com'
49
+ # config.token = 'test123abc'
50
+ # config.url = 'https://example.zendesk.com/api/v2'
51
+ # client = Readiness::Zendesk::Client.new(config)
52
+ # categories = Readiness::Zendesk::Schedules.list(client)
53
+ # pp categories.first.id
54
+ # # => 10001
55
+ def self.list(client)
56
+ response = client.connection.get 'targets'
57
+ handle_request_error(0, 'Zendesk', response.status) unless response.status == 200
58
+ body = Oj.load(response.body)
59
+ body['targets'].map { |t| Targets.new(t)}
60
+ end
61
+
62
+ ##
63
+ # Locates a target within Zendesk by name. Can utilize a cacheh for quicker results
64
+ #
65
+ # @author Jason Colyer
66
+ # @since 1.0.107
67
+ # @param client [Object] An instance of {Readiness::Zendesk::Client}
68
+ # @param name [String] The target name to look for
69
+ # @param cache [Array] The results of {Readiness::Zendesk::Targets#list}
70
+ # @return [Object] An instance of {Readiness::Zendesk::Targets}
71
+ # @example
72
+ # require 'support_readiness'
73
+ # config = Readiness::Zendesk::Configuration.new
74
+ # config.username = 'alice@example.com'
75
+ # config.token = 'test123abc'
76
+ # config.url = 'https://example.zendesk.com/api/v2'
77
+ # client = Readiness::Zendesk::Client.new(config)
78
+ # target = Readiness::Zendesk::Targets.find_by_name(client, 'Email Bob')
79
+ # pp target.id
80
+ # # => 123
81
+ # list = Readiness::Zendesk::Targets.list(client)
82
+ # target = Readiness::Zendesk::Targets.find_by_name(client, 'Email Bob', list)
83
+ # pp target.id
84
+ # # => 123
85
+ def self.find_by_name(client, name, cache = nil)
86
+ list = if cache.nil?
87
+ Targets.list(client)
88
+ else
89
+ cache
90
+ end
91
+ list.detect { |c| c.title == name }
92
+ end
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Defines the module Readiness.
4
+ module Readiness
5
+ # Defines the module Zendesk
6
+ module Zendesk
7
+ ##
8
+ # Defines the class TicketUserTypes within the module {Readiness::Zendesk}.
9
+ #
10
+ # @author Jason Colyer
11
+ # @since 1.0.107
12
+ class TicketUserTypes < Readiness::Client
13
+ attr_accessor :id, :name
14
+
15
+ ##
16
+ # Creates a new {Readiness::Zendesk::TicketUserTypes} instance
17
+ #
18
+ # @author Jason Colyer
19
+ # @since 1.0.107
20
+ # @param object [Object] An instance of {Readiness::Zendesk::TicketUserTypes}
21
+ # @example
22
+ # require 'support_readiness'
23
+ # Readiness::Zendesk::TicketUserTypes.new
24
+ def initialize(object = {})
25
+ @id = object['id']
26
+ @name = object['name']
27
+ end
28
+
29
+ ##
30
+ # Lists ticket user types
31
+ #
32
+ # @author Jason Colyer
33
+ # @since 1.0.107
34
+ # @param client [Object] An instance of {Readiness::Zendesk::Client}
35
+ # @return [Array]
36
+ # @example
37
+ # require 'support_readiness'
38
+ # types = Readiness::Zendesk::TicketUserTypes.list
39
+ # pp types.first.name
40
+ # # => "Agent"
41
+ def self.list
42
+ [
43
+ { 'id' => 'agent', 'name' => 'Agent' },
44
+ { 'id' => 'end_user', 'name' => 'End User' }
45
+ ].map { |r| TicketUserTypes.new(r) }
46
+ end
47
+
48
+ ##
49
+ # Locates a ticket user type within Zendesk by name. If not found, will assume a user email (and will exit on error)
50
+ #
51
+ # @author Jason Colyer
52
+ # @since 1.0.107
53
+ # @param name [String] The ticket user type name to look for
54
+ # @return [Object] An instance of {Readiness::Zendesk::TicketUserTypes}
55
+ # @example
56
+ # require 'support_readiness'
57
+ # config = Readiness::Zendesk::Configuration.new
58
+ # config.username = 'alice@example.com'
59
+ # config.token = 'test123abc'
60
+ # config.url = 'https://example.zendesk.com/api/v2'
61
+ # client = Readiness::Zendesk::Client.new(config)
62
+ # type = Readiness::Zendesk::TicketUserTypes.find_by_name(client, 'Agent')
63
+ # pp type.id
64
+ # # => 4
65
+ # type = Readiness::Zendesk::TicketUserTypes.find_by_name(client, 'jcolyer@gitlab.com')
66
+ # pp type.id
67
+ # # => 12345
68
+ def self.find_by_name(client, name)
69
+ type = TicketUserTypes.list.detect { |r| r.name == name }
70
+ if type.nil?
71
+ search = Search.users(client, "email:#{name}")
72
+ if search.count == 1
73
+ type = TicketUserTypes.new({ 'id' => search.first.id, 'name' => search.first.email })
74
+ end
75
+ end
76
+ type
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,150 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Defines the module Readiness.
4
+ module Readiness
5
+ # Defines the module Zendesk
6
+ module Zendesk
7
+ ##
8
+ # Defines the class ViaTypes within the module {Readiness::Zendesk}.
9
+ #
10
+ # @author Jason Colyer
11
+ # @since 1.0.107
12
+ # @todo Find a way to dynamically generate list via https://developer.zendesk.com/documentation/ticketing/reference-guides/via-types/
13
+ class ViaTypes < Readiness::Client
14
+ attr_accessor :id, :name
15
+
16
+ ##
17
+ # Creates a new {Readiness::Zendesk::Via_IDs} instance
18
+ #
19
+ # @author Jason Colyer
20
+ # @since 1.0.107
21
+ # @param object [Object] An instance of {Readiness::Zendesk::ViaTypes}
22
+ # @example
23
+ # require 'support_readiness'
24
+ # Readiness::Zendesk::ViaTypes.new
25
+ def initialize(object = {})
26
+ @id = object['id']
27
+ @name = object['name']
28
+ end
29
+
30
+ ##
31
+ # Lists via types
32
+ #
33
+ # @author Jason Colyer
34
+ # @since 1.0.107
35
+ # @param client [Object] An instance of {Readiness::Zendesk::Client}
36
+ # @return [Array]
37
+ # @example
38
+ # require 'support_readiness'
39
+ # types = Readiness::Zendesk::ViaTypes.list
40
+ # pp types.first.name
41
+ # # => "Web form"
42
+ def self.list
43
+ [
44
+ { 'id' => 0, 'name' => 'Web form' },
45
+ { 'id' => 4, 'name' => 'Email' },
46
+ { 'id' => 5, 'name' => 'Web service (API)' },
47
+ { 'id' => 8, 'name' => 'Trigger, automation' },
48
+ { 'id' => 9, 'name' => 'Linked problem' },
49
+ { 'id' => 10, 'name' => 'Group deletion' },
50
+ { 'id' => 11, 'name' => 'Change user' },
51
+ { 'id' => 12, 'name' => 'Delete user' },
52
+ { 'id' => 13, 'name' => 'Change group' },
53
+ { 'id' => 14, 'name' => 'Push resource' },
54
+ { 'id' => 15, 'name' => 'iPhone' },
55
+ { 'id' => 16, 'name' => 'Get Satisfaction' },
56
+ { 'id' => 17, 'name' => 'Feedback tab' },
57
+ { 'id' => 19, 'name' => 'Merge' },
58
+ { 'id' => 20, 'name' => 'Batch' },
59
+ { 'id' => 21, 'name' => 'Recover from suspended ticket' },
60
+ { 'id' => 22, 'name' => 'Automatic Solution Suggestions' },
61
+ { 'id' => 23, 'name' => 'X (formerly Twitter) like' },
62
+ { 'id' => 24, 'name' => 'Topic' },
63
+ { 'id' => 25, 'name' => 'Merge user' },
64
+ { 'id' => 26, 'name' => 'X DM' },
65
+ { 'id' => 27, 'name' => 'Closed ticket' },
66
+ { 'id' => 28, 'name' => 'LogMeIn Rescue' },
67
+ { 'id' => 29, 'name' => 'Chat' },
68
+ { 'id' => 30, 'name' => 'X' },
69
+ { 'id' => 31, 'name' => 'Ticket sharing' },
70
+ { 'id' => 32, 'name' => 'Macro reference' },
71
+ { 'id' => 33, 'name' => 'Voicemail' },
72
+ { 'id' => 34, 'name' => 'Phone call (incoming)' },
73
+ { 'id' => 35, 'name' => 'Phone call (outbound)' },
74
+ { 'id' => 36, 'name' => 'Blog' },
75
+ { 'id' => 37, 'name' => 'Text message' },
76
+ { 'id' => 38, 'name' => 'Facebook post' },
77
+ { 'id' => 39, 'name' => 'Import' },
78
+ { 'id' => 40, 'name' => 'GitHub' },
79
+ { 'id' => 41, 'name' => 'Facebook private message' },
80
+ { 'id' => 42, 'name' => 'Lotus' },
81
+ { 'id' => 43, 'name' => 'Monitor event' },
82
+ { 'id' => 44, 'name' => 'CTI* voicemail' },
83
+ { 'id' => 45, 'name' => 'CTI phone call (inbound)' },
84
+ { 'id' => 46, 'name' => 'CTI phone call (outbound)' },
85
+ { 'id' => 47, 'name' => 'Churned account' },
86
+ { 'id' => 48, 'name' => 'Web Widget' },
87
+ { 'id' => 49, 'name' => 'Mobile SDK' },
88
+ { 'id' => 50, 'name' => 'Help center post' },
89
+ { 'id' => 51, 'name' => 'Sample ticket' },
90
+ { 'id' => 52, 'name' => 'Sample interactive ticket' },
91
+ { 'id' => 53, 'name' => 'Admin setting' },
92
+ { 'id' => 54, 'name' => 'Satisfaction prediction' },
93
+ { 'id' => 55, 'name' => 'Channel framework' },
94
+ { 'id' => 56, 'name' => 'Mobile' },
95
+ { 'id' => 57, 'name' => 'SMS text messages (through Talk)' },
96
+ { 'id' => 58, 'name' => 'Ticket tagging' },
97
+ { 'id' => 59, 'name' => 'Connect IPM' },
98
+ { 'id' => 60, 'name' => 'Connect Mail' },
99
+ { 'id' => 61, 'name' => 'Connect SMS' },
100
+ { 'id' => 62, 'name' => 'Rule revision' },
101
+ { 'id' => 63, 'name' => 'Answer Bot for agents' },
102
+ { 'id' => 64, 'name' => 'Answer Bot for Slack' },
103
+ { 'id' => 65, 'name' => 'Answer Bot for SDK' },
104
+ { 'id' => 66, 'name' => 'Answer Bot API' },
105
+ { 'id' => 67, 'name' => 'Answer Bot for Web Widget' },
106
+ { 'id' => 68, 'name' => 'Symphony' },
107
+ { 'id' => 69, 'name' => 'Side conversation' },
108
+ { 'id' => 70, 'name' => 'Answer Bot' },
109
+ { 'id' => 71, 'name' => 'Omnichannel' },
110
+ { 'id' => 72, 'name' => 'LINE' },
111
+ { 'id' => 73, 'name' => 'WeChat' },
112
+ { 'id' => 74, 'name' => 'WhatsApp' },
113
+ { 'id' => 75, 'name' => 'Native messaging' },
114
+ { 'id' => 76, 'name' => 'Mailgun' },
115
+ { 'id' => 77, 'name' => 'MessageBird SMS' },
116
+ { 'id' => 78, 'name' => 'Sunshine Conversations Facebook Messenger' },
117
+ { 'id' => 79, 'name' => 'Telegram messenger' },
118
+ { 'id' => 80, 'name' => 'Sunshine Conversations Twilio SMS' },
119
+ { 'id' => 81, 'name' => 'Viber messenger' },
120
+ { 'id' => 82, 'name' => 'Google RCS messaging' },
121
+ { 'id' => 83, 'name' => 'Apple Messages for Business' },
122
+ { 'id' => 84, 'name' => 'Google Business Messages' },
123
+ { 'id' => 85, 'name' => 'KakaoTalk messenger' },
124
+ { 'id' => 86, 'name' => 'Instagram Direct Messenger' },
125
+ { 'id' => 87, 'name' => 'Sunshine Conversations API' },
126
+ { 'id' => 88, 'name' => 'Sunshine Conversations X DM' },
127
+ { 'id' => 89, 'name' => 'Offline Chat Message' },
128
+ { 'id' => 90, 'name' => 'Chat transcript' },
129
+ { 'id' => 91, 'name' => 'Slack Connect Business Messaging' }
130
+ ].map { |v| ViaTypes.new(v) }
131
+ end
132
+
133
+ ##
134
+ # Locates a via type within Zendesk by name
135
+ #
136
+ # @author Jason Colyer
137
+ # @since 1.0.107
138
+ # @param name [String] The via type name to look for
139
+ # @return [Object] An instance of {Readiness::Zendesk::ViaTypes}
140
+ # @example
141
+ # require 'support_readiness'
142
+ # type = Readiness::Zendesk::ViaTypes.find_by_name('Web form')
143
+ # pp type.id
144
+ # # => 0
145
+ def self.find_by_name(name)
146
+ ViaTypes.list.detect { |v| v.name == name }
147
+ end
148
+ end
149
+ end
150
+ end
@@ -23,21 +23,26 @@ module Readiness
23
23
  require "#{__dir__}/zendesk/organization_fields"
24
24
  require "#{__dir__}/zendesk/organization_memberships"
25
25
  require "#{__dir__}/zendesk/organizations"
26
+ require "#{__dir__}/zendesk/requester_roles"
26
27
  require "#{__dir__}/zendesk/roles"
28
+ require "#{__dir__}/zendesk/satisfaction_reasons"
27
29
  require "#{__dir__}/zendesk/search"
28
30
  require "#{__dir__}/zendesk/schedules"
29
31
  require "#{__dir__}/zendesk/sla_policies"
32
+ require "#{__dir__}/zendesk/targets"
30
33
  require "#{__dir__}/zendesk/theme_job_statuses"
31
34
  require "#{__dir__}/zendesk/themes"
32
35
  require "#{__dir__}/zendesk/ticket_fields"
33
36
  require "#{__dir__}/zendesk/ticket_field_options"
34
37
  require "#{__dir__}/zendesk/ticket_forms"
38
+ require "#{__dir__}/zendesk/ticket_user_types"
35
39
  require "#{__dir__}/zendesk/tickets"
36
40
  require "#{__dir__}/zendesk/triggers"
37
41
  require "#{__dir__}/zendesk/trigger_categories"
38
42
  require "#{__dir__}/zendesk/user_field_options"
39
43
  require "#{__dir__}/zendesk/user_fields"
40
44
  require "#{__dir__}/zendesk/users"
45
+ require "#{__dir__}/zendesk/via_types"
41
46
  require "#{__dir__}/zendesk/views"
42
47
  require "#{__dir__}/zendesk/webhooks"
43
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_support_readiness
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.106
4
+ version: 1.0.107
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Colyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-20 00:00:00.000000000 Z
11
+ date: 2025-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -417,21 +417,26 @@ files:
417
417
  - lib/support_readiness/zendesk/organization_fields.rb
418
418
  - lib/support_readiness/zendesk/organization_memberships.rb
419
419
  - lib/support_readiness/zendesk/organizations.rb
420
+ - lib/support_readiness/zendesk/requester_roles.rb
420
421
  - lib/support_readiness/zendesk/roles.rb
422
+ - lib/support_readiness/zendesk/satisfaction_reasons.rb
421
423
  - lib/support_readiness/zendesk/schedules.rb
422
424
  - lib/support_readiness/zendesk/search.rb
423
425
  - lib/support_readiness/zendesk/sla_policies.rb
426
+ - lib/support_readiness/zendesk/targets.rb
424
427
  - lib/support_readiness/zendesk/theme_job_statuses.rb
425
428
  - lib/support_readiness/zendesk/themes.rb
426
429
  - lib/support_readiness/zendesk/ticket_field_options.rb
427
430
  - lib/support_readiness/zendesk/ticket_fields.rb
428
431
  - lib/support_readiness/zendesk/ticket_forms.rb
432
+ - lib/support_readiness/zendesk/ticket_user_types.rb
429
433
  - lib/support_readiness/zendesk/tickets.rb
430
434
  - lib/support_readiness/zendesk/trigger_categories.rb
431
435
  - lib/support_readiness/zendesk/triggers.rb
432
436
  - lib/support_readiness/zendesk/user_field_options.rb
433
437
  - lib/support_readiness/zendesk/user_fields.rb
434
438
  - lib/support_readiness/zendesk/users.rb
439
+ - lib/support_readiness/zendesk/via_types.rb
435
440
  - lib/support_readiness/zendesk/views.rb
436
441
  - lib/support_readiness/zendesk/webhooks.rb
437
442
  homepage: https://gitlab.com/gitlab-support-readiness/gitlab_support_readiness_gem