blueticks 1.1.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 +7 -0
- data/CHANGELOG.md +21 -0
- data/LICENSE +21 -0
- data/README.md +85 -0
- data/lib/blueticks/base_resource.rb +12 -0
- data/lib/blueticks/client.rb +107 -0
- data/lib/blueticks/errors.rb +108 -0
- data/lib/blueticks/resources/account.rb +18 -0
- data/lib/blueticks/resources/audiences.rb +69 -0
- data/lib/blueticks/resources/campaigns.rb +52 -0
- data/lib/blueticks/resources/chats.rb +95 -0
- data/lib/blueticks/resources/contacts.rb +27 -0
- data/lib/blueticks/resources/engines.rb +32 -0
- data/lib/blueticks/resources/groups.rb +58 -0
- data/lib/blueticks/resources/messages.rb +48 -0
- data/lib/blueticks/resources/ping.rb +16 -0
- data/lib/blueticks/resources/scheduled_messages.rb +51 -0
- data/lib/blueticks/resources/utils.rb +23 -0
- data/lib/blueticks/resources/webhooks.rb +52 -0
- data/lib/blueticks/transport.rb +161 -0
- data/lib/blueticks/types/account.rb +15 -0
- data/lib/blueticks/types/audiences.rb +29 -0
- data/lib/blueticks/types/base.rb +158 -0
- data/lib/blueticks/types/campaigns.rb +28 -0
- data/lib/blueticks/types/chats.rb +51 -0
- data/lib/blueticks/types/contacts.rb +17 -0
- data/lib/blueticks/types/engines.rb +20 -0
- data/lib/blueticks/types/groups.rb +27 -0
- data/lib/blueticks/types/messages.rb +25 -0
- data/lib/blueticks/types/page.rb +45 -0
- data/lib/blueticks/types/ping.rb +14 -0
- data/lib/blueticks/types/scheduled_messages.rb +23 -0
- data/lib/blueticks/types/utils.rb +19 -0
- data/lib/blueticks/types/webhooks.rb +41 -0
- data/lib/blueticks/version.rb +5 -0
- data/lib/blueticks/webhooks.rb +112 -0
- data/lib/blueticks.rb +35 -0
- metadata +124 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base"
|
|
4
|
+
|
|
5
|
+
module Blueticks
|
|
6
|
+
module Types
|
|
7
|
+
MESSAGE_TYPES = %w[
|
|
8
|
+
chat image video document audio ptt sticker gif ptv
|
|
9
|
+
poll_creation location vcard revoked
|
|
10
|
+
].freeze
|
|
11
|
+
|
|
12
|
+
MEDIA_UNAVAILABLE_REASONS = %w[expired fetching awaiting_sender error no_media].freeze
|
|
13
|
+
|
|
14
|
+
class Chat < Base
|
|
15
|
+
field :id, :string
|
|
16
|
+
field :name, :string, nullable: true
|
|
17
|
+
field :is_group, :boolean
|
|
18
|
+
field :last_message_at, :string, nullable: true
|
|
19
|
+
field :unread_count, :integer, nullable: true
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
class Participant < Base
|
|
23
|
+
field :chat_id, :string
|
|
24
|
+
field :is_admin, :boolean
|
|
25
|
+
field :is_super_admin, :boolean, nullable: true
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
class ChatMessage < Base
|
|
29
|
+
field :key, :string
|
|
30
|
+
field :chat_id, :string
|
|
31
|
+
field :from, :string
|
|
32
|
+
field :timestamp, :string, nullable: true
|
|
33
|
+
field :text, :string, nullable: true
|
|
34
|
+
field :type, :string
|
|
35
|
+
field :from_me, :boolean
|
|
36
|
+
field :ack, :integer, nullable: true
|
|
37
|
+
field :media_url, :string, nullable: true
|
|
38
|
+
field :caption, :string, nullable: true
|
|
39
|
+
field :filename, :string, nullable: true
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
class ChatMedia < Base
|
|
43
|
+
field :url, :string, nullable: true
|
|
44
|
+
field :mimetype, :string, nullable: true
|
|
45
|
+
field :filename, :string, nullable: true
|
|
46
|
+
field :data_base64, :string, nullable: true
|
|
47
|
+
field :original_quality, :boolean, nullable: true
|
|
48
|
+
field :media_unavailable, [:enum, MEDIA_UNAVAILABLE_REASONS], nullable: true
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base"
|
|
4
|
+
|
|
5
|
+
module Blueticks
|
|
6
|
+
module Types
|
|
7
|
+
class WhatsAppContact < Base
|
|
8
|
+
field :chat_id, :string
|
|
9
|
+
field :name, :string, nullable: true
|
|
10
|
+
field :is_business, :boolean
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
class ProfilePicture < Base
|
|
14
|
+
field :url, :string, nullable: true
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base"
|
|
4
|
+
|
|
5
|
+
module Blueticks
|
|
6
|
+
module Types
|
|
7
|
+
class EngineStatus < Base
|
|
8
|
+
field :connected, :boolean
|
|
9
|
+
field :state, :string, nullable: true
|
|
10
|
+
field :stream, :string, nullable: true
|
|
11
|
+
field :has_synced, :boolean, nullable: true
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
class WhatsAppMe < Base
|
|
15
|
+
field :phone, :string, nullable: true
|
|
16
|
+
field :name, :string, nullable: true
|
|
17
|
+
field :platform, :string, nullable: true
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base"
|
|
4
|
+
|
|
5
|
+
module Blueticks
|
|
6
|
+
module Types
|
|
7
|
+
class GroupParticipant < Base
|
|
8
|
+
field :chat_id, :string
|
|
9
|
+
field :is_admin, :boolean
|
|
10
|
+
field :is_super_admin, :boolean
|
|
11
|
+
field :name, :string, nullable: true
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
class Group < Base
|
|
15
|
+
field :id, :string
|
|
16
|
+
field :name, :string, nullable: true
|
|
17
|
+
field :description, :string, nullable: true
|
|
18
|
+
field :owner, :string, nullable: true
|
|
19
|
+
field :created_at, :string, nullable: true
|
|
20
|
+
field :last_message_at, :string, nullable: true
|
|
21
|
+
field :participant_count, :integer, nullable: true
|
|
22
|
+
field :announce, :boolean, nullable: true
|
|
23
|
+
field :restrict, :boolean, nullable: true
|
|
24
|
+
field :participants, [:array, GroupParticipant], nullable: true
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base"
|
|
4
|
+
|
|
5
|
+
module Blueticks
|
|
6
|
+
module Types
|
|
7
|
+
MESSAGE_STATUSES = %w[scheduled queued sending delivered read failed].freeze
|
|
8
|
+
|
|
9
|
+
class Message < Base
|
|
10
|
+
field :id, :string
|
|
11
|
+
field :to, :string
|
|
12
|
+
field :from, :string, nullable: true
|
|
13
|
+
field :text, :string, nullable: true
|
|
14
|
+
field :media_url, :string, nullable: true
|
|
15
|
+
field :status, [:enum, MESSAGE_STATUSES]
|
|
16
|
+
field :send_at, :string, nullable: true
|
|
17
|
+
field :created_at, :string
|
|
18
|
+
field :sent_at, :string, nullable: true
|
|
19
|
+
field :delivered_at, :string, nullable: true
|
|
20
|
+
field :read_at, :string, nullable: true
|
|
21
|
+
field :failed_at, :string, nullable: true
|
|
22
|
+
field :failure_reason, :string, nullable: true
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base"
|
|
4
|
+
require_relative "../errors"
|
|
5
|
+
|
|
6
|
+
module Blueticks
|
|
7
|
+
module Types
|
|
8
|
+
# Cursor-paginated list envelope. Every v1 list endpoint returns this shape.
|
|
9
|
+
# Iterate `data` for the current page; pass `next_cursor` back as the
|
|
10
|
+
# `cursor:` keyword on the next list call to continue.
|
|
11
|
+
class Page
|
|
12
|
+
attr_reader :data, :has_more, :next_cursor
|
|
13
|
+
|
|
14
|
+
def initialize(data:, has_more:, next_cursor: nil)
|
|
15
|
+
@data = data
|
|
16
|
+
@has_more = has_more
|
|
17
|
+
@next_cursor = next_cursor
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Build a Page from a raw response, decoding each item via item_type.from_hash.
|
|
21
|
+
def self.from_hash(raw, item_type:)
|
|
22
|
+
raise Errors::ValidationError.new(message: "Expected Hash for Page, got #{raw.class}") unless raw.is_a?(Hash)
|
|
23
|
+
raise Errors::ValidationError.new(message: "Field 'data' must be array in Page") unless raw["data"].is_a?(Array)
|
|
24
|
+
unless [true, false].include?(raw["has_more"])
|
|
25
|
+
raise Errors::ValidationError.new(message: "Field 'has_more' must be boolean in Page")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
cursor = raw["next_cursor"]
|
|
29
|
+
unless cursor.nil? || cursor.is_a?(String)
|
|
30
|
+
raise Errors::ValidationError.new(message: "Field 'next_cursor' must be string or null in Page")
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
decoded = raw["data"].each_with_index.map do |item, i|
|
|
34
|
+
item_type.from_hash(item, context: "Page.data[#{i}]")
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
new(data: decoded, has_more: raw["has_more"], next_cursor: cursor)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_h
|
|
41
|
+
{ data: data.map { |d| d.respond_to?(:to_h) ? d.to_h : d }, has_more: has_more, next_cursor: next_cursor }
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base"
|
|
4
|
+
|
|
5
|
+
module Blueticks
|
|
6
|
+
module Types
|
|
7
|
+
# Response from GET /v1/ping.
|
|
8
|
+
class Ping < Base
|
|
9
|
+
field :account_id, :string
|
|
10
|
+
field :key_prefix, :string
|
|
11
|
+
field :scopes, %i[array string]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base"
|
|
4
|
+
|
|
5
|
+
module Blueticks
|
|
6
|
+
module Types
|
|
7
|
+
class ScheduledMessage < Base
|
|
8
|
+
field :id, :string
|
|
9
|
+
field :to, :string, nullable: true
|
|
10
|
+
field :text, :string, nullable: true
|
|
11
|
+
field :media_url, :string, nullable: true
|
|
12
|
+
field :media_caption, :string, nullable: true
|
|
13
|
+
field :media_filename, :string, nullable: true
|
|
14
|
+
field :media_mime_type, :string, nullable: true
|
|
15
|
+
field :send_at, :string, nullable: true
|
|
16
|
+
field :status, :string, nullable: true
|
|
17
|
+
field :is_recurring, :boolean
|
|
18
|
+
field :recurrence_rule, :string, nullable: true
|
|
19
|
+
field :created_at, :string, nullable: true
|
|
20
|
+
field :updated_at, :string, nullable: true
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base"
|
|
4
|
+
|
|
5
|
+
module Blueticks
|
|
6
|
+
module Types
|
|
7
|
+
class PhoneValidation < Base
|
|
8
|
+
field :valid, :boolean
|
|
9
|
+
field :formatted_chat_id, :string, nullable: true
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
class LinkPreview < Base
|
|
13
|
+
field :title, :string, nullable: true
|
|
14
|
+
field :description, :string, nullable: true
|
|
15
|
+
field :thumbnail, :string, nullable: true
|
|
16
|
+
field :canonical_url, :string, nullable: true
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base"
|
|
4
|
+
|
|
5
|
+
module Blueticks
|
|
6
|
+
module Types
|
|
7
|
+
WEBHOOK_STATUSES = %w[enabled disabled].freeze
|
|
8
|
+
|
|
9
|
+
WEBHOOK_EVENT_TYPES = %w[
|
|
10
|
+
message.queued message.sending message.delivered message.failed message.read
|
|
11
|
+
session.connected session.disconnected
|
|
12
|
+
campaign.started campaign.paused campaign.resumed campaign.completed campaign.aborted
|
|
13
|
+
].freeze
|
|
14
|
+
|
|
15
|
+
class Webhook < Base
|
|
16
|
+
field :id, :string
|
|
17
|
+
field :url, :string
|
|
18
|
+
field :events, %i[array string]
|
|
19
|
+
field :description, :string, nullable: true
|
|
20
|
+
field :status, [:enum, WEBHOOK_STATUSES]
|
|
21
|
+
field :created_at, :string
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
class WebhookCreateResult < Base
|
|
25
|
+
field :id, :string
|
|
26
|
+
field :url, :string
|
|
27
|
+
field :events, %i[array string]
|
|
28
|
+
field :description, :string, nullable: true
|
|
29
|
+
field :status, [:enum, WEBHOOK_STATUSES]
|
|
30
|
+
field :created_at, :string
|
|
31
|
+
field :secret, :string
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
class WebhookEvent < Base
|
|
35
|
+
field :id, :string
|
|
36
|
+
field :type, :string
|
|
37
|
+
field :created_at, :string
|
|
38
|
+
field :data, :hash
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "json"
|
|
4
|
+
require "openssl"
|
|
5
|
+
|
|
6
|
+
require_relative "errors"
|
|
7
|
+
require_relative "types/webhooks"
|
|
8
|
+
|
|
9
|
+
module Blueticks
|
|
10
|
+
# Webhook signature verification. Use this in your webhook handler to confirm
|
|
11
|
+
# requests really came from Blueticks before trusting the payload.
|
|
12
|
+
#
|
|
13
|
+
# event = Blueticks::Webhooks.verify(
|
|
14
|
+
# payload: raw_body,
|
|
15
|
+
# headers: request.headers,
|
|
16
|
+
# secret: ENV["BLUETICKS_WEBHOOK_SECRET"]
|
|
17
|
+
# )
|
|
18
|
+
#
|
|
19
|
+
# Returns a Blueticks::Types::WebhookEvent. Raises
|
|
20
|
+
# Blueticks::Errors::WebhookVerificationError on any mismatch.
|
|
21
|
+
module Webhooks
|
|
22
|
+
DEFAULT_TOLERANCE_SECONDS = 300
|
|
23
|
+
|
|
24
|
+
module_function
|
|
25
|
+
|
|
26
|
+
# Verify a webhook signature and return the parsed event.
|
|
27
|
+
#
|
|
28
|
+
# @param payload [String] the raw request body (bytes), exactly as received
|
|
29
|
+
# @param headers [Hash] the HTTP request headers (case-insensitive lookup)
|
|
30
|
+
# @param secret [String] the webhook signing secret (whsec_...)
|
|
31
|
+
# @param tolerance [Integer] max age of timestamp in seconds (default 300)
|
|
32
|
+
# @return [Blueticks::Types::WebhookEvent]
|
|
33
|
+
def verify(payload:, headers:, secret:, tolerance: DEFAULT_TOLERANCE_SECONDS)
|
|
34
|
+
timestamp_raw = lookup_header(headers, "Blueticks-Webhook-Timestamp")
|
|
35
|
+
signature_raw = lookup_header(headers, "Blueticks-Webhook-Signature")
|
|
36
|
+
|
|
37
|
+
if timestamp_raw.nil? || timestamp_raw.empty? || signature_raw.nil? || signature_raw.empty?
|
|
38
|
+
raise Errors::WebhookVerificationError, "missing required headers"
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
timestamp = parse_timestamp(timestamp_raw)
|
|
42
|
+
raise Errors::WebhookVerificationError, "expired timestamp" if (Time.now.to_i - timestamp).abs > tolerance
|
|
43
|
+
|
|
44
|
+
payload_str = payload.is_a?(String) ? payload : payload.to_s
|
|
45
|
+
signed = "#{timestamp}.#{payload_str}"
|
|
46
|
+
expected = OpenSSL::HMAC.hexdigest("SHA256", secret, signed)
|
|
47
|
+
|
|
48
|
+
supplied = extract_v1_signature(signature_raw)
|
|
49
|
+
raise Errors::WebhookVerificationError, "invalid_signature: missing v1 scheme" if supplied.nil?
|
|
50
|
+
|
|
51
|
+
raise Errors::WebhookVerificationError, "invalid_signature: mismatch" unless secure_equal?(expected, supplied)
|
|
52
|
+
|
|
53
|
+
parsed = parse_payload(payload_str)
|
|
54
|
+
Types::WebhookEvent.from_hash(parsed)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# @api private
|
|
58
|
+
def lookup_header(headers, name)
|
|
59
|
+
return nil if headers.nil?
|
|
60
|
+
|
|
61
|
+
direct = headers[name] || headers[name.to_sym]
|
|
62
|
+
return normalize_header(direct) unless direct.nil?
|
|
63
|
+
|
|
64
|
+
lower = name.downcase
|
|
65
|
+
headers.each do |k, v|
|
|
66
|
+
return normalize_header(v) if k.to_s.downcase == lower
|
|
67
|
+
end
|
|
68
|
+
nil
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# @api private
|
|
72
|
+
def normalize_header(value)
|
|
73
|
+
return value[0] if value.is_a?(Array)
|
|
74
|
+
|
|
75
|
+
value.to_s
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# @api private
|
|
79
|
+
def parse_timestamp(raw)
|
|
80
|
+
Integer(raw.to_s)
|
|
81
|
+
rescue ArgumentError, TypeError
|
|
82
|
+
raise Errors::WebhookVerificationError, "invalid timestamp"
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# @api private
|
|
86
|
+
def extract_v1_signature(signature_raw)
|
|
87
|
+
signature_raw.split(",").each do |part|
|
|
88
|
+
trimmed = part.strip
|
|
89
|
+
return trimmed[3..] if trimmed.start_with?("v1=")
|
|
90
|
+
end
|
|
91
|
+
nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# @api private
|
|
95
|
+
def parse_payload(payload_str)
|
|
96
|
+
data = JSON.parse(payload_str)
|
|
97
|
+
raise Errors::WebhookVerificationError, "invalid_signature: payload not JSON object" unless data.is_a?(Hash)
|
|
98
|
+
|
|
99
|
+
data
|
|
100
|
+
rescue JSON::ParserError
|
|
101
|
+
raise Errors::WebhookVerificationError, "invalid_signature: payload not JSON"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @api private
|
|
105
|
+
# Constant-time comparison to avoid timing leaks.
|
|
106
|
+
def secure_equal?(expected, supplied)
|
|
107
|
+
return false if expected.bytesize != supplied.bytesize
|
|
108
|
+
|
|
109
|
+
OpenSSL.fixed_length_secure_compare(expected, supplied)
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
data/lib/blueticks.rb
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "blueticks/version"
|
|
4
|
+
require_relative "blueticks/errors"
|
|
5
|
+
require_relative "blueticks/transport"
|
|
6
|
+
require_relative "blueticks/base_resource"
|
|
7
|
+
|
|
8
|
+
require_relative "blueticks/types/base"
|
|
9
|
+
require_relative "blueticks/types/page"
|
|
10
|
+
require_relative "blueticks/types/account"
|
|
11
|
+
require_relative "blueticks/types/ping"
|
|
12
|
+
require_relative "blueticks/types/messages"
|
|
13
|
+
require_relative "blueticks/types/webhooks"
|
|
14
|
+
require_relative "blueticks/types/chats"
|
|
15
|
+
require_relative "blueticks/types/audiences"
|
|
16
|
+
require_relative "blueticks/types/campaigns"
|
|
17
|
+
require_relative "blueticks/types/groups"
|
|
18
|
+
require_relative "blueticks/types/engines"
|
|
19
|
+
require_relative "blueticks/types/contacts"
|
|
20
|
+
require_relative "blueticks/types/utils"
|
|
21
|
+
|
|
22
|
+
require_relative "blueticks/resources/account"
|
|
23
|
+
require_relative "blueticks/resources/ping"
|
|
24
|
+
require_relative "blueticks/resources/messages"
|
|
25
|
+
require_relative "blueticks/resources/webhooks"
|
|
26
|
+
require_relative "blueticks/resources/chats"
|
|
27
|
+
require_relative "blueticks/resources/audiences"
|
|
28
|
+
require_relative "blueticks/resources/campaigns"
|
|
29
|
+
require_relative "blueticks/resources/groups"
|
|
30
|
+
require_relative "blueticks/resources/engines"
|
|
31
|
+
require_relative "blueticks/resources/contacts"
|
|
32
|
+
require_relative "blueticks/resources/utils"
|
|
33
|
+
|
|
34
|
+
require_relative "blueticks/client"
|
|
35
|
+
require_relative "blueticks/webhooks"
|
metadata
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: blueticks
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Blueticks
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: minitest
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '5.20'
|
|
19
|
+
type: :development
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '5.20'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: rake
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '13.0'
|
|
33
|
+
type: :development
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '13.0'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: rubocop
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '1.60'
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '1.60'
|
|
54
|
+
description: 'Ruby client for the Blueticks WhatsApp business automation API: send
|
|
55
|
+
messages, manage audiences, run campaigns, and verify webhooks.'
|
|
56
|
+
email:
|
|
57
|
+
- support@blueticks.co
|
|
58
|
+
executables: []
|
|
59
|
+
extensions: []
|
|
60
|
+
extra_rdoc_files: []
|
|
61
|
+
files:
|
|
62
|
+
- CHANGELOG.md
|
|
63
|
+
- LICENSE
|
|
64
|
+
- README.md
|
|
65
|
+
- lib/blueticks.rb
|
|
66
|
+
- lib/blueticks/base_resource.rb
|
|
67
|
+
- lib/blueticks/client.rb
|
|
68
|
+
- lib/blueticks/errors.rb
|
|
69
|
+
- lib/blueticks/resources/account.rb
|
|
70
|
+
- lib/blueticks/resources/audiences.rb
|
|
71
|
+
- lib/blueticks/resources/campaigns.rb
|
|
72
|
+
- lib/blueticks/resources/chats.rb
|
|
73
|
+
- lib/blueticks/resources/contacts.rb
|
|
74
|
+
- lib/blueticks/resources/engines.rb
|
|
75
|
+
- lib/blueticks/resources/groups.rb
|
|
76
|
+
- lib/blueticks/resources/messages.rb
|
|
77
|
+
- lib/blueticks/resources/ping.rb
|
|
78
|
+
- lib/blueticks/resources/scheduled_messages.rb
|
|
79
|
+
- lib/blueticks/resources/utils.rb
|
|
80
|
+
- lib/blueticks/resources/webhooks.rb
|
|
81
|
+
- lib/blueticks/transport.rb
|
|
82
|
+
- lib/blueticks/types/account.rb
|
|
83
|
+
- lib/blueticks/types/audiences.rb
|
|
84
|
+
- lib/blueticks/types/base.rb
|
|
85
|
+
- lib/blueticks/types/campaigns.rb
|
|
86
|
+
- lib/blueticks/types/chats.rb
|
|
87
|
+
- lib/blueticks/types/contacts.rb
|
|
88
|
+
- lib/blueticks/types/engines.rb
|
|
89
|
+
- lib/blueticks/types/groups.rb
|
|
90
|
+
- lib/blueticks/types/messages.rb
|
|
91
|
+
- lib/blueticks/types/page.rb
|
|
92
|
+
- lib/blueticks/types/ping.rb
|
|
93
|
+
- lib/blueticks/types/scheduled_messages.rb
|
|
94
|
+
- lib/blueticks/types/utils.rb
|
|
95
|
+
- lib/blueticks/types/webhooks.rb
|
|
96
|
+
- lib/blueticks/version.rb
|
|
97
|
+
- lib/blueticks/webhooks.rb
|
|
98
|
+
homepage: https://github.com/serenix-com/blueticks-ruby
|
|
99
|
+
licenses:
|
|
100
|
+
- MIT
|
|
101
|
+
metadata:
|
|
102
|
+
homepage_uri: https://github.com/serenix-com/blueticks-ruby
|
|
103
|
+
source_code_uri: https://github.com/serenix-com/blueticks-ruby
|
|
104
|
+
changelog_uri: https://github.com/serenix-com/blueticks-ruby/blob/main/CHANGELOG.md
|
|
105
|
+
documentation_uri: https://dev.blueticks.co/docs/api
|
|
106
|
+
rubygems_mfa_required: 'true'
|
|
107
|
+
rdoc_options: []
|
|
108
|
+
require_paths:
|
|
109
|
+
- lib
|
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
|
+
requirements:
|
|
112
|
+
- - ">="
|
|
113
|
+
- !ruby/object:Gem::Version
|
|
114
|
+
version: 3.0.0
|
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
|
+
requirements:
|
|
117
|
+
- - ">="
|
|
118
|
+
- !ruby/object:Gem::Version
|
|
119
|
+
version: '0'
|
|
120
|
+
requirements: []
|
|
121
|
+
rubygems_version: 3.6.9
|
|
122
|
+
specification_version: 4
|
|
123
|
+
summary: Official Ruby SDK for the Blueticks API
|
|
124
|
+
test_files: []
|