qismo 0.12.1 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,25 @@
1
+ module Qismo
2
+ module Objects
3
+ class Tag < Qismo::Object
4
+ # @!attribute [r] created_at
5
+ # @return [String]
6
+ attribute? :created_at, Types::String.optional
7
+
8
+ # @!attribute [r] id
9
+ # @return [Integer]
10
+ attribute? :id, Types::Int.optional
11
+
12
+ # @!attribute [r] name
13
+ # @return [String]
14
+ attribute? :name, Types::String.optional
15
+
16
+ # @!attribute [r] room_tag_created_at
17
+ # @return [String]
18
+ attribute? :room_tag_created, Types::DateTime.optional
19
+
20
+ # @!attribute [r] updated_at
21
+ # @return [String]
22
+ attribute? :updated_at, Types::DateTime.optional
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,93 @@
1
+ module Qismo
2
+ module Objects
3
+ class User < Qismo::Object
4
+ class Channel < Qismo::Object
5
+ # @!attribute [r] id
6
+ # @return [Integer]
7
+ attribute? :id, Types::Int.optional
8
+
9
+ # @!attribute [r] name
10
+ # @return [String]
11
+ attribute? :name, Types::String.optional
12
+ end
13
+
14
+ class Role < Qismo::Object
15
+ # @!attribute [r] id
16
+ # @return [Integer]
17
+ attribute? :id, Types::Int.optional
18
+
19
+ # @!attribute [r] name
20
+ # @return [String]
21
+ attribute? :name, Types::String.optional
22
+ end
23
+
24
+ # @!attribute [r] user_channels
25
+ # @return [Array<Qismo::Objects::User::Channel>]
26
+ attribute? :user_channels, Types.Array(Channel.optional).optional
27
+
28
+ # @!attribute [r] user_roles
29
+ # @return [Array<Qismo::Objects::User::Role>]
30
+ attribute? :user_roles, Types.Array(Role.optional).optional
31
+
32
+ # @!attribute [r] avatar_url
33
+ # @return [String]
34
+ attribute? :avatar_url, Types::String.optional
35
+
36
+ # @!attribute [r] created_at
37
+ # @return [String]
38
+ attribute? :created_at, Types::String.optional
39
+
40
+ # @!attribute [r] email
41
+ # @return [String]
42
+ attribute? :email, Types::String.optional
43
+
44
+ # @!attribute [r] force_offline
45
+ # @return [TrueClass,FalseClass]
46
+ attribute? :force_offline, Types::Bool.optional
47
+
48
+ # @!attribute [r] id
49
+ # @return [Integer]
50
+ attribute? :id, Types::Int.optional
51
+
52
+ # @!attribute [r] is_available
53
+ # @return [TrueClass,FalseClass]
54
+ attribute? :is_available, Types::Bool.optional
55
+
56
+ # @!attribute [r] is_verified
57
+ # @return [TrueClass,FalseClass]
58
+ attribute? :is_verified, Types::Bool.optional
59
+
60
+ # @!attribute [r] last_login
61
+ # @return [String]
62
+ attribute? :last_login, Types::String.optional
63
+
64
+ # @!attribute [r] name
65
+ # @return [String]
66
+ attribute? :name, Types::String.optional
67
+
68
+ # @!attribute [r] sdk_email
69
+ # @return [String]
70
+ attribute? :sdk_email, Types::String.optional
71
+
72
+ # @!attribute [r] sdk_key
73
+ # @return [String]
74
+ attribute? :sdk_key, Types::String.optional
75
+
76
+ # @!attribute [r] type
77
+ # @return [String]
78
+ attribute? :type, Types::Int.optional
79
+
80
+ # @!attribute [r] type_as_string
81
+ # @return [String]
82
+ attribute? :type_as_string, Types::String.optional
83
+
84
+ # @!attribute [r] updated_at
85
+ # @return [String]
86
+ attribute? :updated_at, Types::String.optional
87
+
88
+ # @!attribute [r] current_customer_count
89
+ # @return [Integer]
90
+ attribute? :current_customer_count, Types::Int.optional
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,65 @@
1
+ module Qismo
2
+ module Objects
3
+ class WaCreditInfo < Qismo::Object
4
+ class Channel < Qismo::Object
5
+ class LastPayment < Qismo::Object
6
+ # @!attribute [r] credit
7
+ # @return [String]
8
+ attribute? :credit, Types::String.optional
9
+
10
+ # @!attribute [r] due_date
11
+ # @return [String]
12
+ attribute? :due_date, Types::String.optional
13
+
14
+ # @!attribute [r] id
15
+ # @return [Integer]
16
+ attribute? :id, Types::Int.optional
17
+
18
+ # @!attribute [r] issued_date
19
+ # @return [String]
20
+ attribute? :issued_date, Types::String.optional
21
+
22
+ # @!attribute [r] status
23
+ # @return [Integer]
24
+ attribute? :status, Types::Int.optional
25
+
26
+ # @!attribute [r] status_string
27
+ # @return [String]
28
+ attribute? :status_string, Types::String.optional
29
+
30
+ # @!attribute [r] updated_at
31
+ # @return [String]
32
+ attribute? :updated_at, Types::String.optional
33
+ end
34
+
35
+ # @!attribute [r] balance
36
+ # @return [Integer]
37
+ attribute? :balance, Types::Int.optional
38
+
39
+ # @!attribute [r] id
40
+ # @return [Integer]
41
+ attribute? :id, Types::Int.optional
42
+
43
+ # @!attribute [r] is_bsp_qiscus
44
+ # @return [TrueClass,FalseClass]
45
+ attribute? :is_bsp_qiscus, Types::Bool.optional
46
+
47
+ # @!attribute [r] last_payment
48
+ # @return [Qismo::Objects::WaCreditInfo::Channel]
49
+ attribute? :last_payment, LastPayment.optional
50
+
51
+ # @!attribute [r] name
52
+ # @return [String]
53
+ attribute? :name, Types::String.optional
54
+ end
55
+
56
+ # @!attribute [r] channels
57
+ # @return [Array<Qismo::Objects::WaCreditInfo::Channel>]
58
+ attribute? :channels, Types.Array(Channel.optional).optional
59
+
60
+ # @!attribute [r] free_sessions
61
+ # @return [Integer]
62
+ attribute? :free_sessions, Types::Int.optional
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,13 @@
1
+ module Qismo
2
+ module Objects
3
+ class Webhook < Qismo::Object
4
+ # @!attribute [r] url
5
+ # @return [String]
6
+ attribute? :url, Types::String.optional
7
+
8
+ # @!attribute [r] enabled
9
+ # @return [TrueClass,FalseClass]
10
+ attribute? :enabled, Types::Bool.optional
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,10 @@
1
+ module Qismo
2
+ module Types
3
+ include Dry.Types()
4
+
5
+ Int = Params::Integer
6
+ String = Coercible::String
7
+ Bool = Params::Bool
8
+ Hash = Params::Hash
9
+ end
10
+ end
data/lib/qismo/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Qismo
4
4
  # @return [String]
5
- VERSION = "0.12.1"
5
+ VERSION = "0.14.0"
6
6
  end
@@ -0,0 +1,75 @@
1
+ module Qismo
2
+ module WebhookRequests
3
+ class OnAgentAllocationNeeded < Qismo::Object
4
+ # @!attribute [r] avatar_url
5
+ # @return [String]
6
+ # @!attribute [r] created_at
7
+ # @return [String]
8
+ # @!attribute [r] email
9
+ # @return [String]
10
+ # @!attribute [r] force_offline
11
+ # @return [TrueClass,FalseClass]
12
+ # @!attribute [r] id
13
+ # @return [Integer]
14
+ # @!attribute [r] is_available
15
+ # @return [TrueClass,FalseClass]
16
+ # @!attribute [r] is_verified
17
+ # @return [TrueClass,FalseClass]
18
+ # @!attribute [r] last_login
19
+ # @return [String]
20
+ # @!attribute [r] name
21
+ # @return [String]
22
+ # @!attribute [r] sdk_email
23
+ # @return [String]
24
+ # @!attribute [r] sdk_key
25
+ # @return [String]
26
+ # @!attribute [r] updated_at
27
+ # @return [String]
28
+ class CandidateAgent < Qismo::Object
29
+ attribute? :avatar_url, Types::String.optional
30
+ attribute? :created_at, Types::String.optional
31
+ attribute? :email, Types::String.optional
32
+ attribute? :force_offline, Types::Bool.optional
33
+ attribute? :id, Types::Int.optional
34
+ attribute? :is_available, Types::Bool.optional
35
+ attribute? :is_verified, Types::Bool.optional
36
+ attribute? :last_login, Types::String.optional
37
+ attribute? :name, Types::String.optional
38
+ attribute? :sdk_email, Types::String.optional
39
+ attribute? :sdk_key, Types::String.optional
40
+ attribute? :updated_at, Types::String.optional
41
+ end
42
+
43
+ # @!attribute [r] app_id
44
+ # @return [String]
45
+ # @!attribute [r] avatar_url
46
+ # @return [String]
47
+ # @!attribute [r] candidate_agent
48
+ # @return [CandidateAgent]
49
+ # @!attribute [r] email
50
+ # @return [String]
51
+ # @!attribute [r] extras
52
+ # @return [String]
53
+ # @!attribute [r] is_new_session
54
+ # @return [TrueClass,FalseClass]
55
+ # @!attribute [r] is_resolved
56
+ # @return [TrueClass,FalseClass]
57
+ # @!attribute [r] name
58
+ # @return [String]
59
+ # @!attribute [r] room_id
60
+ # @return [String]
61
+ # @!attribute [r] source
62
+ # @return [String]
63
+ attribute? :app_id, Types::String.optional
64
+ attribute? :avatar_url, Types::String.optional
65
+ attribute? :candidate_agent, CandidateAgent
66
+ attribute? :email, Types::String.optional
67
+ attribute? :extras, Types::String.optional
68
+ attribute? :is_new_session, Types::Bool.optional
69
+ attribute? :is_resolved, Types::Bool.optional
70
+ attribute? :name, Types::String.optional
71
+ attribute? :room_id, Types::String.optional
72
+ attribute? :source, Types::String.optional
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,86 @@
1
+ module Qismo
2
+ module WebhookRequests
3
+ # @!attribute [r] additional_info
4
+ # @return [Array<AdditionalInfo>]
5
+ # @!attribute [r] agent
6
+ # @return [Agent]
7
+ # @!attribute [r] channel_id
8
+ # @return [Integer]
9
+ # @!attribute [r] channel_name
10
+ # @return [String]
11
+ # @!attribute [r] channel_type
12
+ # @return [String]
13
+ # @!attribute [r] customer
14
+ # @return [Customer]
15
+ # @!attribute [r] notes
16
+ # @return [String]
17
+ # @!attribute [r] room_id
18
+ # @return [Integer]
19
+ # @!attribute [r] tag
20
+ # @return [Array<Tag>]
21
+ class OnCustomButtonClicked < Qismo::Object
22
+ # @!parse include Qismo::Models
23
+
24
+ # @!attribute [r] key
25
+ # @return [String]
26
+ # @!attribute [r] value
27
+ # @return [String,Integer,TrueClass,FalseClass]
28
+ class AdditionalInfo < Qismo::Object
29
+ attribute? :key, Types::String.optional
30
+ attribute? :value, (Types::String.optional | Types::Int.optional | Types::Params::Bool.optional)
31
+ end
32
+
33
+ # @!attribute [r] email
34
+ # @return [String]
35
+ # @!attribute [r] name
36
+ # @return [String]
37
+ # @!attribute [r] type
38
+ # @return [String]
39
+ class Agent < Qismo::Object
40
+ attribute? :email, Types::String.optional
41
+ attribute? :name, Types::String.optional
42
+ attribute? :type, Types::String.optional
43
+ end
44
+
45
+ # @!attribute [r] avatar
46
+ # @return [String]
47
+ # @!attribute [r] name
48
+ # @return [String]
49
+ # @!attribute [r] user_id
50
+ # @return [String]
51
+ class Customer < Qismo::Object
52
+ attribute? :avatar, Types::String.optional
53
+ attribute? :name, Types::String.optional
54
+ attribute? :user_id, Types::String.optional
55
+ end
56
+
57
+ # @!attribute [r] id
58
+ # @return [Integer]
59
+ # @!attribute [r] name
60
+ # @return [String]
61
+ # @!attribute [r] created_at
62
+ # @return [String]
63
+ # @!attribute [r] updated_at
64
+ # @return [String]
65
+ # @!attribute [r] room_tag_created_at
66
+ # @return [String]
67
+ class Tag < Qismo::Object
68
+ attribute? :id, Types::Int.optional
69
+ attribute? :name, Types::String.optional
70
+ attribute? :created_at, Types::String.optional
71
+ attribute? :updated_at, Types::String.optional
72
+ attribute? :room_tag_created, Types::String.optional
73
+ end
74
+
75
+ attribute? :additional_info, Types.Array(AdditionalInfo.optional).optional
76
+ attribute? :agent, Agent.optional
77
+ attribute? :channel_id, Types::Int.optional
78
+ attribute? :channel_name, Types::String.optional
79
+ attribute? :channel_type, Types::String.optional
80
+ attribute? :customer, Customer.optional
81
+ attribute? :notes, Types::String.optional
82
+ attribute? :room_id, Types::Int.optional
83
+ attribute? :tag, Types.Array(Tag.optional).optional
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,95 @@
1
+ module Qismo
2
+ module WebhookRequests
3
+ # @!attribute [r] payload
4
+ # @return [Payload]
5
+ class OnCustomChannelMessageSent < Qismo::Object
6
+ # @!attribute [r] avatar_url
7
+ # @return [String]
8
+ # @!attribute [r] email
9
+ # @return [String]
10
+ # @!attribute [r] id
11
+ # @return [Integer]
12
+ # @!attribute [r] name
13
+ # @return [String]
14
+ class From < Qismo::Object
15
+ attribute? :avatar_url, Types::String.optional
16
+ attribute? :email, Types::String.optional
17
+ attribute? :id, Types::Int.optional
18
+ attribute? :name, Types::String.optional
19
+ end
20
+
21
+ # @!attribute [r] comment_before_id
22
+ # @return [Integer]
23
+ # @!attribute [r] created_at
24
+ # @return [String]
25
+ # @!attribute [r] id
26
+ # @return [Integer]
27
+ # @!attribute [r] payload
28
+ # @return [Hash]
29
+ # @!attribute [r] text
30
+ # @return [String]
31
+ # @!attribute [r] timestamp
32
+ # @return [String]
33
+ # @!attribute [r] type
34
+ # @return [String]
35
+ # @!attribute [r] unique_temp_id
36
+ # @return [String]
37
+ # @!attribute [r] unix_nano_timestamp
38
+ # @return [String]
39
+ # @!attribute [r] unix_timestamp
40
+ # @return [String]
41
+ class Message < Qismo::Object
42
+ attribute? :comment_before_id, Types::Int.optional
43
+ attribute? :created_at, Types::String.optional
44
+ attribute? :id, Types::Int.optional
45
+ attribute? :payload, Types::Hash.optional
46
+ attribute? :text, Types::String.optional
47
+ attribute? :timestamp, Types::String.optional
48
+ attribute? :type, Types::String.optional
49
+ attribute? :unique_temp_id, Types::String.optional
50
+ attribute? :unix_nano_timestamp, Types::String.optional
51
+ attribute? :unix_timestamp, Types::String.optional
52
+ end
53
+
54
+ # @!attribute [r] email
55
+ # @return [String]
56
+ class Participant < Qismo::Object
57
+ attribute? :email, Types::String.optional
58
+ end
59
+
60
+ # @!attribute [r] id
61
+ # @return [String]
62
+ # @!attribute [r] name
63
+ # @return [String]
64
+ # @!attribute [r] options
65
+ # @return [String]
66
+ # @!attribute [r] participants
67
+ # @return [Array<Participant>]
68
+ # @!attribute [r] room_avatar
69
+ # @return [String]
70
+ class Room < Qismo::Object
71
+ attribute? :id, Types::String.optional
72
+ attribute? :name, Types::String.optional
73
+ attribute? :options, Types::String.optional
74
+ attribute? :participants, Types.Array(Participant.optional).optional
75
+ attribute? :room_avatar, Types::String.optional
76
+ end
77
+
78
+ # @!attribute [r] from
79
+ # @return [From]
80
+ # @!attribute [r] message
81
+ # @return [Message]
82
+ # @!attribute [r] room
83
+ # @return [Room]
84
+ # @!attribute [r] type
85
+ # @return [String]
86
+ class Payload < Qismo::Object
87
+ attribute? :from, From.optional
88
+ attribute? :message, Message.optional
89
+ attribute? :room, Room.optional
90
+ end
91
+
92
+ attribute? :payload, Payload.optional
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,95 @@
1
+ module Qismo
2
+ module WebhookRequests
3
+ class OnMessageForBotSent < Qismo::Object
4
+ # @!attribute [r] avatar_url
5
+ # @return [String]
6
+ # @!attribute [r] email
7
+ # @return [String]
8
+ # @!attribute [r] id
9
+ # @return [Integer]
10
+ # @!attribute [r] name
11
+ # @return [String]
12
+ class From < Qismo::Object
13
+ attribute? :avatar_url, Types::String.optional
14
+ attribute? :email, Types::String.optional
15
+ attribute? :id, Types::Int.optional
16
+ attribute? :name, Types::String.optional
17
+ end
18
+
19
+ # @!attribute [r] comment_before_id
20
+ # @return [Integer]
21
+ # @!attribute [r] created_at
22
+ # @return [String]
23
+ # @!attribute [r] id
24
+ # @return [Integer]
25
+ # @!attribute [r] payload
26
+ # @return [Hash]
27
+ # @!attribute [r] text
28
+ # @return [String]
29
+ # @!attribute [r] timestamp
30
+ # @return [String]
31
+ # @!attribute [r] type
32
+ # @return [String]
33
+ # @!attribute [r] unique_temp_id
34
+ # @return [String]
35
+ # @!attribute [r] unix_nano_timestamp
36
+ # @return [String]
37
+ # @!attribute [r] unix_timestamp
38
+ # @return [String]
39
+ class Message < Qismo::Object
40
+ attribute? :comment_before_id, Types::Int.optional
41
+ attribute? :created_at, Types::String.optional
42
+ attribute? :id, Types::Int.optional
43
+ attribute? :payload, Types::Hash.optional
44
+ attribute? :text, Types::String.optional
45
+ attribute? :timestamp, Types::String.optional
46
+ attribute? :type, Types::String.optional
47
+ attribute? :unique_temp_id, Types::String.optional
48
+ attribute? :unix_nano_timestamp, Types::String.optional
49
+ attribute? :unix_timestamp, Types::String.optional
50
+ end
51
+
52
+ # @!attribute [r] email
53
+ # @return [String]
54
+ class Participant < Qismo::Object
55
+ attribute? :email, Types::String.optional
56
+ end
57
+
58
+ # @!attribute [r] id
59
+ # @return [String]
60
+ # @!attribute [r] name
61
+ # @return [String]
62
+ # @!attribute [r] options
63
+ # @return [String]
64
+ # @!attribute [r] participants
65
+ # @return [Array<Participant>]
66
+ # @!attribute [r] room_avatar
67
+ # @return [String]
68
+ class Room < Qismo::Object
69
+ attribute? :id, Types::String.optional
70
+ attribute? :name, Types::String.optional
71
+ attribute? :options, Types::String.optional
72
+ attribute? :participants, Types.Array(Participant.optional).optional
73
+ attribute? :room_avatar, Types::String.optional
74
+ end
75
+
76
+ # @!attribute [r] from
77
+ # @return [From]
78
+ # @!attribute [r] message
79
+ # @return [Message]
80
+ # @!attribute [r] room
81
+ # @return [Room]
82
+ # @!attribute [r] type
83
+ # @return [String]
84
+ class Payload < Qismo::Object
85
+ attribute? :from, From.optional
86
+ attribute? :message, Message.optional
87
+ attribute? :room, Room.optional
88
+ end
89
+
90
+ # @!attribute [r] payload
91
+ # @return [Payload]
92
+ attribute? :payload, Payload.optional
93
+ end
94
+ end
95
+ end