zavudev 0.14.0 → 0.15.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 +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/lib/zavudev/models/invitation.rb +27 -1
- data/lib/zavudev/models/invitation_create_params.rb +28 -1
- data/lib/zavudev/models/message_send_params.rb +6 -3
- data/lib/zavudev/resources/invitations.rb +15 -4
- data/lib/zavudev/resources/messages.rb +1 -1
- data/lib/zavudev/version.rb +1 -1
- data/rbi/zavudev/models/invitation.rbi +48 -0
- data/rbi/zavudev/models/invitation_create_params.rbi +63 -0
- data/rbi/zavudev/models/message_send_params.rbi +10 -4
- data/rbi/zavudev/resources/invitations.rbi +19 -3
- data/rbi/zavudev/resources/messages.rbi +5 -2
- data/sig/zavudev/models/invitation.rbs +20 -0
- data/sig/zavudev/models/invitation_create_params.rbs +20 -0
- data/sig/zavudev/resources/invitations.rbs +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c47655af05e478984221142dbae0a305261b0e154bda36ba6d11370540f4b159
|
|
4
|
+
data.tar.gz: 61f9fb898a158c74137d0222bea09e68257115df2d451cf2b9d152bc76348000
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 037ef7d5bd90239e10bf70596a6bf95041d0b80ca05f3086281e97e117464559ca1607cab6a6a315b541dcfeae46371c3adec06aff60dd4fc835e8d0715ee17d
|
|
7
|
+
data.tar.gz: 9a81cc375e69f7280ce8e49677582bf3d1cb1d227bf05f37c87ef697d8446af7b1b3ed61571cbc8a8973c128263a95850519ad2bbb3d33d2195515cbba8ba70e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.15.0 (2026-07-05)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.14.0...v0.15.0](https://github.com/zavudev/sdk-ruby/compare/v0.14.0...v0.15.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([0afbaaf](https://github.com/zavudev/sdk-ruby/commit/0afbaaf775796e6901f790329e5ead6b623fbae6))
|
|
10
|
+
* **api:** api update ([ae16782](https://github.com/zavudev/sdk-ruby/commit/ae16782c53d59b8eb136ed27e9df09b1d889fd2c))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Chores
|
|
14
|
+
|
|
15
|
+
* **internal:** bound formatter parallelism to CPU count ([40b3e99](https://github.com/zavudev/sdk-ruby/commit/40b3e99d17ef2297beb30ff8af97fd0b43fb0d75))
|
|
16
|
+
|
|
3
17
|
## 0.14.0 (2026-06-24)
|
|
4
18
|
|
|
5
19
|
Full Changelog: [v0.13.0...v0.14.0](https://github.com/zavudev/sdk-ruby/compare/v0.13.0...v0.14.0)
|
data/README.md
CHANGED
|
@@ -62,6 +62,13 @@ module Zavudev
|
|
|
62
62
|
# @return [Time, nil]
|
|
63
63
|
optional :completed_at, Time, api_name: :completedAt, nil?: true
|
|
64
64
|
|
|
65
|
+
# @!attribute connection_type
|
|
66
|
+
# How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
|
|
67
|
+
# embedded signup) or `whatsapp_alt` (QR-linked).
|
|
68
|
+
#
|
|
69
|
+
# @return [Symbol, Zavudev::Models::Invitation::ConnectionType, nil]
|
|
70
|
+
optional :connection_type, enum: -> { Zavudev::Invitation::ConnectionType }, api_name: :connectionType
|
|
71
|
+
|
|
65
72
|
# @!attribute phone_number_id
|
|
66
73
|
# ID of a pre-assigned Zavu phone number for WhatsApp registration.
|
|
67
74
|
#
|
|
@@ -84,7 +91,10 @@ module Zavudev
|
|
|
84
91
|
# @return [Time, nil]
|
|
85
92
|
optional :viewed_at, Time, api_name: :viewedAt, nil?: true
|
|
86
93
|
|
|
87
|
-
# @!method initialize(id:, token:, created_at:, expires_at:, status:, updated_at:, url:, client_email: nil, client_name: nil, client_phone: nil, completed_at: nil, phone_number_id: nil, sender_id: nil, started_at: nil, viewed_at: nil)
|
|
94
|
+
# @!method initialize(id:, token:, created_at:, expires_at:, status:, updated_at:, url:, client_email: nil, client_name: nil, client_phone: nil, completed_at: nil, connection_type: nil, phone_number_id: nil, sender_id: nil, started_at: nil, viewed_at: nil)
|
|
95
|
+
# Some parameter documentations has been truncated, see
|
|
96
|
+
# {Zavudev::Models::Invitation} for more details.
|
|
97
|
+
#
|
|
88
98
|
# @param id [String]
|
|
89
99
|
#
|
|
90
100
|
# @param token [String] Unique invitation token.
|
|
@@ -107,6 +117,8 @@ module Zavudev
|
|
|
107
117
|
#
|
|
108
118
|
# @param completed_at [Time, nil]
|
|
109
119
|
#
|
|
120
|
+
# @param connection_type [Symbol, Zavudev::Models::Invitation::ConnectionType] How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via embedd
|
|
121
|
+
#
|
|
110
122
|
# @param phone_number_id [String, nil] ID of a pre-assigned Zavu phone number for WhatsApp registration.
|
|
111
123
|
#
|
|
112
124
|
# @param sender_id [String, nil] ID of the sender created when invitation is completed.
|
|
@@ -130,6 +142,20 @@ module Zavudev
|
|
|
130
142
|
# @!method self.values
|
|
131
143
|
# @return [Array<Symbol>]
|
|
132
144
|
end
|
|
145
|
+
|
|
146
|
+
# How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
|
|
147
|
+
# embedded signup) or `whatsapp_alt` (QR-linked).
|
|
148
|
+
#
|
|
149
|
+
# @see Zavudev::Models::Invitation#connection_type
|
|
150
|
+
module ConnectionType
|
|
151
|
+
extend Zavudev::Internal::Type::Enum
|
|
152
|
+
|
|
153
|
+
WHATSAPP_WABA = :whatsapp_waba
|
|
154
|
+
WHATSAPP_ALT = :whatsapp_alt
|
|
155
|
+
|
|
156
|
+
# @!method self.values
|
|
157
|
+
# @return [Array<Symbol>]
|
|
158
|
+
end
|
|
133
159
|
end
|
|
134
160
|
end
|
|
135
161
|
end
|
|
@@ -33,6 +33,17 @@ module Zavudev
|
|
|
33
33
|
# @return [String, nil]
|
|
34
34
|
optional :client_phone, String, api_name: :clientPhone
|
|
35
35
|
|
|
36
|
+
# @!attribute connection_type
|
|
37
|
+
# How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
|
|
38
|
+
# signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
|
|
39
|
+
# number by scanning a QR code — available only to teams with the WhatsApp
|
|
40
|
+
# Alternative feature enabled.
|
|
41
|
+
#
|
|
42
|
+
# @return [Symbol, Zavudev::Models::InvitationCreateParams::ConnectionType, nil]
|
|
43
|
+
optional :connection_type,
|
|
44
|
+
enum: -> { Zavudev::InvitationCreateParams::ConnectionType },
|
|
45
|
+
api_name: :connectionType
|
|
46
|
+
|
|
36
47
|
# @!attribute expires_in_days
|
|
37
48
|
# Number of days until the invitation expires.
|
|
38
49
|
#
|
|
@@ -46,7 +57,7 @@ module Zavudev
|
|
|
46
57
|
# @return [String, nil]
|
|
47
58
|
optional :phone_number_id, String, api_name: :phoneNumberId
|
|
48
59
|
|
|
49
|
-
# @!method initialize(allowed_phone_countries: nil, client_email: nil, client_name: nil, client_phone: nil, expires_in_days: nil, phone_number_id: nil, request_options: {})
|
|
60
|
+
# @!method initialize(allowed_phone_countries: nil, client_email: nil, client_name: nil, client_phone: nil, connection_type: nil, expires_in_days: nil, phone_number_id: nil, request_options: {})
|
|
50
61
|
# Some parameter documentations has been truncated, see
|
|
51
62
|
# {Zavudev::Models::InvitationCreateParams} for more details.
|
|
52
63
|
#
|
|
@@ -58,11 +69,27 @@ module Zavudev
|
|
|
58
69
|
#
|
|
59
70
|
# @param client_phone [String] Phone number of the client in E.164 format.
|
|
60
71
|
#
|
|
72
|
+
# @param connection_type [Symbol, Zavudev::Models::InvitationCreateParams::ConnectionType] How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
|
|
73
|
+
#
|
|
61
74
|
# @param expires_in_days [Integer] Number of days until the invitation expires.
|
|
62
75
|
#
|
|
63
76
|
# @param phone_number_id [String] ID of a Zavu phone number to pre-assign for WhatsApp registration. If provided,
|
|
64
77
|
#
|
|
65
78
|
# @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
|
|
79
|
+
|
|
80
|
+
# How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
|
|
81
|
+
# signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
|
|
82
|
+
# number by scanning a QR code — available only to teams with the WhatsApp
|
|
83
|
+
# Alternative feature enabled.
|
|
84
|
+
module ConnectionType
|
|
85
|
+
extend Zavudev::Internal::Type::Enum
|
|
86
|
+
|
|
87
|
+
WHATSAPP_WABA = :whatsapp_waba
|
|
88
|
+
WHATSAPP_ALT = :whatsapp_alt
|
|
89
|
+
|
|
90
|
+
# @!method self.values
|
|
91
|
+
# @return [Array<Symbol>]
|
|
92
|
+
end
|
|
66
93
|
end
|
|
67
94
|
end
|
|
68
95
|
end
|
|
@@ -8,8 +8,11 @@ module Zavudev
|
|
|
8
8
|
include Zavudev::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute to
|
|
11
|
-
# Recipient phone number in E.164 format, email address,
|
|
12
|
-
#
|
|
11
|
+
# Recipient phone number in E.164 format, email address, WhatsApp business-scoped
|
|
12
|
+
# user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat ID (for
|
|
13
|
+
# Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent via the
|
|
14
|
+
# `recipient` field; use it to message a contact who adopted a username and whose
|
|
15
|
+
# phone number is hidden.
|
|
13
16
|
#
|
|
14
17
|
# @return [String]
|
|
15
18
|
required :to, String
|
|
@@ -101,7 +104,7 @@ module Zavudev
|
|
|
101
104
|
# Some parameter documentations has been truncated, see
|
|
102
105
|
# {Zavudev::Models::MessageSendParams} for more details.
|
|
103
106
|
#
|
|
104
|
-
# @param to [String] Recipient phone number in E.164 format, email address,
|
|
107
|
+
# @param to [String] Recipient phone number in E.164 format, email address, WhatsApp business-scoped
|
|
105
108
|
#
|
|
106
109
|
# @param attachments [Array<Zavudev::Models::MessageSendParams::Attachment>] Email attachments. Only supported when channel is 'email'. Maximum 40MB total si
|
|
107
110
|
#
|
|
@@ -6,11 +6,20 @@ module Zavudev
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {Zavudev::Models::InvitationCreateParams} for more details.
|
|
8
8
|
#
|
|
9
|
-
# Create a partner invitation link for a client to connect
|
|
10
|
-
#
|
|
11
|
-
#
|
|
9
|
+
# Create a partner invitation link for a client to connect WhatsApp. The client
|
|
10
|
+
# opens the returned `url` and connects. Set `connectionType` to choose how they
|
|
11
|
+
# connect:
|
|
12
12
|
#
|
|
13
|
-
#
|
|
13
|
+
# - `whatsapp_waba` (default): the client completes Meta's embedded signup,
|
|
14
|
+
# linking an official WhatsApp Business Account.
|
|
15
|
+
# - `whatsapp_alt`: the client links their number by scanning a QR code. Requires
|
|
16
|
+
# the WhatsApp Alternative feature to be enabled for your team (otherwise
|
|
17
|
+
# returns 400).
|
|
18
|
+
#
|
|
19
|
+
# Either way, the resulting sender is created in your project when the client
|
|
20
|
+
# completes the flow, and the invitation transitions to `completed`.
|
|
21
|
+
#
|
|
22
|
+
# @overload create(allowed_phone_countries: nil, client_email: nil, client_name: nil, client_phone: nil, connection_type: nil, expires_in_days: nil, phone_number_id: nil, request_options: {})
|
|
14
23
|
#
|
|
15
24
|
# @param allowed_phone_countries [Array<String>] ISO country codes for allowed phone numbers.
|
|
16
25
|
#
|
|
@@ -20,6 +29,8 @@ module Zavudev
|
|
|
20
29
|
#
|
|
21
30
|
# @param client_phone [String] Phone number of the client in E.164 format.
|
|
22
31
|
#
|
|
32
|
+
# @param connection_type [Symbol, Zavudev::Models::InvitationCreateParams::ConnectionType] How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
|
|
33
|
+
#
|
|
23
34
|
# @param expires_in_days [Integer] Number of days until the invitation expires.
|
|
24
35
|
#
|
|
25
36
|
# @param phone_number_id [String] ID of a Zavu phone number to pre-assign for WhatsApp registration. If provided,
|
|
@@ -109,7 +109,7 @@ module Zavudev
|
|
|
109
109
|
#
|
|
110
110
|
# @overload send_(to:, attachments: nil, channel: nil, content: nil, fallback_enabled: nil, html_body: nil, idempotency_key: nil, message_type: nil, metadata: nil, reply_to: nil, subject: nil, text: nil, voice_language: nil, zavu_sender: nil, request_options: {})
|
|
111
111
|
#
|
|
112
|
-
# @param to [String] Body param: Recipient phone number in E.164 format, email address,
|
|
112
|
+
# @param to [String] Body param: Recipient phone number in E.164 format, email address, WhatsApp busi
|
|
113
113
|
#
|
|
114
114
|
# @param attachments [Array<Zavudev::Models::MessageSendParams::Attachment>] Body param: Email attachments. Only supported when channel is 'email'. Maximum 4
|
|
115
115
|
#
|
data/lib/zavudev/version.rb
CHANGED
|
@@ -42,6 +42,20 @@ module Zavudev
|
|
|
42
42
|
sig { returns(T.nilable(Time)) }
|
|
43
43
|
attr_accessor :completed_at
|
|
44
44
|
|
|
45
|
+
# How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
|
|
46
|
+
# embedded signup) or `whatsapp_alt` (QR-linked).
|
|
47
|
+
sig do
|
|
48
|
+
returns(T.nilable(Zavudev::Invitation::ConnectionType::TaggedSymbol))
|
|
49
|
+
end
|
|
50
|
+
attr_reader :connection_type
|
|
51
|
+
|
|
52
|
+
sig do
|
|
53
|
+
params(
|
|
54
|
+
connection_type: Zavudev::Invitation::ConnectionType::OrSymbol
|
|
55
|
+
).void
|
|
56
|
+
end
|
|
57
|
+
attr_writer :connection_type
|
|
58
|
+
|
|
45
59
|
# ID of a pre-assigned Zavu phone number for WhatsApp registration.
|
|
46
60
|
sig { returns(T.nilable(String)) }
|
|
47
61
|
attr_accessor :phone_number_id
|
|
@@ -69,6 +83,7 @@ module Zavudev
|
|
|
69
83
|
client_name: T.nilable(String),
|
|
70
84
|
client_phone: T.nilable(String),
|
|
71
85
|
completed_at: T.nilable(Time),
|
|
86
|
+
connection_type: Zavudev::Invitation::ConnectionType::OrSymbol,
|
|
72
87
|
phone_number_id: T.nilable(String),
|
|
73
88
|
sender_id: T.nilable(String),
|
|
74
89
|
started_at: T.nilable(Time),
|
|
@@ -90,6 +105,9 @@ module Zavudev
|
|
|
90
105
|
client_name: nil,
|
|
91
106
|
client_phone: nil,
|
|
92
107
|
completed_at: nil,
|
|
108
|
+
# How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
|
|
109
|
+
# embedded signup) or `whatsapp_alt` (QR-linked).
|
|
110
|
+
connection_type: nil,
|
|
93
111
|
# ID of a pre-assigned Zavu phone number for WhatsApp registration.
|
|
94
112
|
phone_number_id: nil,
|
|
95
113
|
# ID of the sender created when invitation is completed.
|
|
@@ -113,6 +131,7 @@ module Zavudev
|
|
|
113
131
|
client_name: T.nilable(String),
|
|
114
132
|
client_phone: T.nilable(String),
|
|
115
133
|
completed_at: T.nilable(Time),
|
|
134
|
+
connection_type: Zavudev::Invitation::ConnectionType::TaggedSymbol,
|
|
116
135
|
phone_number_id: T.nilable(String),
|
|
117
136
|
sender_id: T.nilable(String),
|
|
118
137
|
started_at: T.nilable(Time),
|
|
@@ -144,6 +163,35 @@ module Zavudev
|
|
|
144
163
|
def self.values
|
|
145
164
|
end
|
|
146
165
|
end
|
|
166
|
+
|
|
167
|
+
# How the client connects WhatsApp: `whatsapp_waba` (official Cloud API via
|
|
168
|
+
# embedded signup) or `whatsapp_alt` (QR-linked).
|
|
169
|
+
module ConnectionType
|
|
170
|
+
extend Zavudev::Internal::Type::Enum
|
|
171
|
+
|
|
172
|
+
TaggedSymbol =
|
|
173
|
+
T.type_alias { T.all(Symbol, Zavudev::Invitation::ConnectionType) }
|
|
174
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
175
|
+
|
|
176
|
+
WHATSAPP_WABA =
|
|
177
|
+
T.let(
|
|
178
|
+
:whatsapp_waba,
|
|
179
|
+
Zavudev::Invitation::ConnectionType::TaggedSymbol
|
|
180
|
+
)
|
|
181
|
+
WHATSAPP_ALT =
|
|
182
|
+
T.let(
|
|
183
|
+
:whatsapp_alt,
|
|
184
|
+
Zavudev::Invitation::ConnectionType::TaggedSymbol
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
sig do
|
|
188
|
+
override.returns(
|
|
189
|
+
T::Array[Zavudev::Invitation::ConnectionType::TaggedSymbol]
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
def self.values
|
|
193
|
+
end
|
|
194
|
+
end
|
|
147
195
|
end
|
|
148
196
|
end
|
|
149
197
|
end
|
|
@@ -39,6 +39,25 @@ module Zavudev
|
|
|
39
39
|
sig { params(client_phone: String).void }
|
|
40
40
|
attr_writer :client_phone
|
|
41
41
|
|
|
42
|
+
# How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
|
|
43
|
+
# signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
|
|
44
|
+
# number by scanning a QR code — available only to teams with the WhatsApp
|
|
45
|
+
# Alternative feature enabled.
|
|
46
|
+
sig do
|
|
47
|
+
returns(
|
|
48
|
+
T.nilable(Zavudev::InvitationCreateParams::ConnectionType::OrSymbol)
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
attr_reader :connection_type
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
params(
|
|
55
|
+
connection_type:
|
|
56
|
+
Zavudev::InvitationCreateParams::ConnectionType::OrSymbol
|
|
57
|
+
).void
|
|
58
|
+
end
|
|
59
|
+
attr_writer :connection_type
|
|
60
|
+
|
|
42
61
|
# Number of days until the invitation expires.
|
|
43
62
|
sig { returns(T.nilable(Integer)) }
|
|
44
63
|
attr_reader :expires_in_days
|
|
@@ -60,6 +79,8 @@ module Zavudev
|
|
|
60
79
|
client_email: String,
|
|
61
80
|
client_name: String,
|
|
62
81
|
client_phone: String,
|
|
82
|
+
connection_type:
|
|
83
|
+
Zavudev::InvitationCreateParams::ConnectionType::OrSymbol,
|
|
63
84
|
expires_in_days: Integer,
|
|
64
85
|
phone_number_id: String,
|
|
65
86
|
request_options: Zavudev::RequestOptions::OrHash
|
|
@@ -74,6 +95,11 @@ module Zavudev
|
|
|
74
95
|
client_name: nil,
|
|
75
96
|
# Phone number of the client in E.164 format.
|
|
76
97
|
client_phone: nil,
|
|
98
|
+
# How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
|
|
99
|
+
# signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
|
|
100
|
+
# number by scanning a QR code — available only to teams with the WhatsApp
|
|
101
|
+
# Alternative feature enabled.
|
|
102
|
+
connection_type: nil,
|
|
77
103
|
# Number of days until the invitation expires.
|
|
78
104
|
expires_in_days: nil,
|
|
79
105
|
# ID of a Zavu phone number to pre-assign for WhatsApp registration. If provided,
|
|
@@ -90,6 +116,8 @@ module Zavudev
|
|
|
90
116
|
client_email: String,
|
|
91
117
|
client_name: String,
|
|
92
118
|
client_phone: String,
|
|
119
|
+
connection_type:
|
|
120
|
+
Zavudev::InvitationCreateParams::ConnectionType::OrSymbol,
|
|
93
121
|
expires_in_days: Integer,
|
|
94
122
|
phone_number_id: String,
|
|
95
123
|
request_options: Zavudev::RequestOptions
|
|
@@ -98,6 +126,41 @@ module Zavudev
|
|
|
98
126
|
end
|
|
99
127
|
def to_hash
|
|
100
128
|
end
|
|
129
|
+
|
|
130
|
+
# How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
|
|
131
|
+
# signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
|
|
132
|
+
# number by scanning a QR code — available only to teams with the WhatsApp
|
|
133
|
+
# Alternative feature enabled.
|
|
134
|
+
module ConnectionType
|
|
135
|
+
extend Zavudev::Internal::Type::Enum
|
|
136
|
+
|
|
137
|
+
TaggedSymbol =
|
|
138
|
+
T.type_alias do
|
|
139
|
+
T.all(Symbol, Zavudev::InvitationCreateParams::ConnectionType)
|
|
140
|
+
end
|
|
141
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
142
|
+
|
|
143
|
+
WHATSAPP_WABA =
|
|
144
|
+
T.let(
|
|
145
|
+
:whatsapp_waba,
|
|
146
|
+
Zavudev::InvitationCreateParams::ConnectionType::TaggedSymbol
|
|
147
|
+
)
|
|
148
|
+
WHATSAPP_ALT =
|
|
149
|
+
T.let(
|
|
150
|
+
:whatsapp_alt,
|
|
151
|
+
Zavudev::InvitationCreateParams::ConnectionType::TaggedSymbol
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
sig do
|
|
155
|
+
override.returns(
|
|
156
|
+
T::Array[
|
|
157
|
+
Zavudev::InvitationCreateParams::ConnectionType::TaggedSymbol
|
|
158
|
+
]
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
def self.values
|
|
162
|
+
end
|
|
163
|
+
end
|
|
101
164
|
end
|
|
102
165
|
end
|
|
103
166
|
end
|
|
@@ -11,8 +11,11 @@ module Zavudev
|
|
|
11
11
|
T.any(Zavudev::MessageSendParams, Zavudev::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Recipient phone number in E.164 format, email address,
|
|
15
|
-
#
|
|
14
|
+
# Recipient phone number in E.164 format, email address, WhatsApp business-scoped
|
|
15
|
+
# user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat ID (for
|
|
16
|
+
# Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent via the
|
|
17
|
+
# `recipient` field; use it to message a contact who adopted a username and whose
|
|
18
|
+
# phone number is hidden.
|
|
16
19
|
sig { returns(String) }
|
|
17
20
|
attr_accessor :to
|
|
18
21
|
|
|
@@ -138,8 +141,11 @@ module Zavudev
|
|
|
138
141
|
).returns(T.attached_class)
|
|
139
142
|
end
|
|
140
143
|
def self.new(
|
|
141
|
-
# Recipient phone number in E.164 format, email address,
|
|
142
|
-
#
|
|
144
|
+
# Recipient phone number in E.164 format, email address, WhatsApp business-scoped
|
|
145
|
+
# user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat ID (for
|
|
146
|
+
# Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent via the
|
|
147
|
+
# `recipient` field; use it to message a contact who adopted a username and whose
|
|
148
|
+
# phone number is hidden.
|
|
143
149
|
to:,
|
|
144
150
|
# Email attachments. Only supported when channel is 'email'. Maximum 40MB total
|
|
145
151
|
# size.
|
|
@@ -3,15 +3,26 @@
|
|
|
3
3
|
module Zavudev
|
|
4
4
|
module Resources
|
|
5
5
|
class Invitations
|
|
6
|
-
# Create a partner invitation link for a client to connect
|
|
7
|
-
#
|
|
8
|
-
#
|
|
6
|
+
# Create a partner invitation link for a client to connect WhatsApp. The client
|
|
7
|
+
# opens the returned `url` and connects. Set `connectionType` to choose how they
|
|
8
|
+
# connect:
|
|
9
|
+
#
|
|
10
|
+
# - `whatsapp_waba` (default): the client completes Meta's embedded signup,
|
|
11
|
+
# linking an official WhatsApp Business Account.
|
|
12
|
+
# - `whatsapp_alt`: the client links their number by scanning a QR code. Requires
|
|
13
|
+
# the WhatsApp Alternative feature to be enabled for your team (otherwise
|
|
14
|
+
# returns 400).
|
|
15
|
+
#
|
|
16
|
+
# Either way, the resulting sender is created in your project when the client
|
|
17
|
+
# completes the flow, and the invitation transitions to `completed`.
|
|
9
18
|
sig do
|
|
10
19
|
params(
|
|
11
20
|
allowed_phone_countries: T::Array[String],
|
|
12
21
|
client_email: String,
|
|
13
22
|
client_name: String,
|
|
14
23
|
client_phone: String,
|
|
24
|
+
connection_type:
|
|
25
|
+
Zavudev::InvitationCreateParams::ConnectionType::OrSymbol,
|
|
15
26
|
expires_in_days: Integer,
|
|
16
27
|
phone_number_id: String,
|
|
17
28
|
request_options: Zavudev::RequestOptions::OrHash
|
|
@@ -26,6 +37,11 @@ module Zavudev
|
|
|
26
37
|
client_name: nil,
|
|
27
38
|
# Phone number of the client in E.164 format.
|
|
28
39
|
client_phone: nil,
|
|
40
|
+
# How the client connects WhatsApp. `whatsapp_waba` (default) runs Meta's embedded
|
|
41
|
+
# signup to link an official WhatsApp Business Account. `whatsapp_alt` links the
|
|
42
|
+
# number by scanning a QR code — available only to teams with the WhatsApp
|
|
43
|
+
# Alternative feature enabled.
|
|
44
|
+
connection_type: nil,
|
|
29
45
|
# Number of days until the invitation expires.
|
|
30
46
|
expires_in_days: nil,
|
|
31
47
|
# ID of a Zavu phone number to pre-assign for WhatsApp registration. If provided,
|
|
@@ -94,8 +94,11 @@ module Zavudev
|
|
|
94
94
|
).returns(Zavudev::MessageResponse)
|
|
95
95
|
end
|
|
96
96
|
def send_(
|
|
97
|
-
# Body param: Recipient phone number in E.164 format, email address,
|
|
98
|
-
#
|
|
97
|
+
# Body param: Recipient phone number in E.164 format, email address, WhatsApp
|
|
98
|
+
# business-scoped user ID (BSUID, e.g. `US.13491208655302741918`), or numeric chat
|
|
99
|
+
# ID (for Telegram/Instagram/Messenger). A BSUID is routed to WhatsApp and sent
|
|
100
|
+
# via the `recipient` field; use it to message a contact who adopted a username
|
|
101
|
+
# and whose phone number is hidden.
|
|
99
102
|
to:,
|
|
100
103
|
# Body param: Email attachments. Only supported when channel is 'email'. Maximum
|
|
101
104
|
# 40MB total size.
|
|
@@ -13,6 +13,7 @@ module Zavudev
|
|
|
13
13
|
client_name: String?,
|
|
14
14
|
client_phone: String?,
|
|
15
15
|
completed_at: Time?,
|
|
16
|
+
connection_type: Zavudev::Models::Invitation::connection_type,
|
|
16
17
|
phone_number_id: String?,
|
|
17
18
|
sender_id: String?,
|
|
18
19
|
started_at: Time?,
|
|
@@ -42,6 +43,12 @@ module Zavudev
|
|
|
42
43
|
|
|
43
44
|
attr_accessor completed_at: Time?
|
|
44
45
|
|
|
46
|
+
attr_reader connection_type: Zavudev::Models::Invitation::connection_type?
|
|
47
|
+
|
|
48
|
+
def connection_type=: (
|
|
49
|
+
Zavudev::Models::Invitation::connection_type
|
|
50
|
+
) -> Zavudev::Models::Invitation::connection_type
|
|
51
|
+
|
|
45
52
|
attr_accessor phone_number_id: String?
|
|
46
53
|
|
|
47
54
|
attr_accessor sender_id: String?
|
|
@@ -62,6 +69,7 @@ module Zavudev
|
|
|
62
69
|
?client_name: String?,
|
|
63
70
|
?client_phone: String?,
|
|
64
71
|
?completed_at: Time?,
|
|
72
|
+
?connection_type: Zavudev::Models::Invitation::connection_type,
|
|
65
73
|
?phone_number_id: String?,
|
|
66
74
|
?sender_id: String?,
|
|
67
75
|
?started_at: Time?,
|
|
@@ -80,6 +88,7 @@ module Zavudev
|
|
|
80
88
|
client_name: String?,
|
|
81
89
|
client_phone: String?,
|
|
82
90
|
completed_at: Time?,
|
|
91
|
+
connection_type: Zavudev::Models::Invitation::connection_type,
|
|
83
92
|
phone_number_id: String?,
|
|
84
93
|
sender_id: String?,
|
|
85
94
|
started_at: Time?,
|
|
@@ -99,6 +108,17 @@ module Zavudev
|
|
|
99
108
|
|
|
100
109
|
def self?.values: -> ::Array[Zavudev::Models::Invitation::status]
|
|
101
110
|
end
|
|
111
|
+
|
|
112
|
+
type connection_type = :whatsapp_waba | :whatsapp_alt
|
|
113
|
+
|
|
114
|
+
module ConnectionType
|
|
115
|
+
extend Zavudev::Internal::Type::Enum
|
|
116
|
+
|
|
117
|
+
WHATSAPP_WABA: :whatsapp_waba
|
|
118
|
+
WHATSAPP_ALT: :whatsapp_alt
|
|
119
|
+
|
|
120
|
+
def self?.values: -> ::Array[Zavudev::Models::Invitation::connection_type]
|
|
121
|
+
end
|
|
102
122
|
end
|
|
103
123
|
end
|
|
104
124
|
end
|
|
@@ -6,6 +6,7 @@ module Zavudev
|
|
|
6
6
|
client_email: String,
|
|
7
7
|
client_name: String,
|
|
8
8
|
client_phone: String,
|
|
9
|
+
connection_type: Zavudev::Models::InvitationCreateParams::connection_type,
|
|
9
10
|
expires_in_days: Integer,
|
|
10
11
|
phone_number_id: String
|
|
11
12
|
}
|
|
@@ -31,6 +32,12 @@ module Zavudev
|
|
|
31
32
|
|
|
32
33
|
def client_phone=: (String) -> String
|
|
33
34
|
|
|
35
|
+
attr_reader connection_type: Zavudev::Models::InvitationCreateParams::connection_type?
|
|
36
|
+
|
|
37
|
+
def connection_type=: (
|
|
38
|
+
Zavudev::Models::InvitationCreateParams::connection_type
|
|
39
|
+
) -> Zavudev::Models::InvitationCreateParams::connection_type
|
|
40
|
+
|
|
34
41
|
attr_reader expires_in_days: Integer?
|
|
35
42
|
|
|
36
43
|
def expires_in_days=: (Integer) -> Integer
|
|
@@ -44,6 +51,7 @@ module Zavudev
|
|
|
44
51
|
?client_email: String,
|
|
45
52
|
?client_name: String,
|
|
46
53
|
?client_phone: String,
|
|
54
|
+
?connection_type: Zavudev::Models::InvitationCreateParams::connection_type,
|
|
47
55
|
?expires_in_days: Integer,
|
|
48
56
|
?phone_number_id: String,
|
|
49
57
|
?request_options: Zavudev::request_opts
|
|
@@ -54,10 +62,22 @@ module Zavudev
|
|
|
54
62
|
client_email: String,
|
|
55
63
|
client_name: String,
|
|
56
64
|
client_phone: String,
|
|
65
|
+
connection_type: Zavudev::Models::InvitationCreateParams::connection_type,
|
|
57
66
|
expires_in_days: Integer,
|
|
58
67
|
phone_number_id: String,
|
|
59
68
|
request_options: Zavudev::RequestOptions
|
|
60
69
|
}
|
|
70
|
+
|
|
71
|
+
type connection_type = :whatsapp_waba | :whatsapp_alt
|
|
72
|
+
|
|
73
|
+
module ConnectionType
|
|
74
|
+
extend Zavudev::Internal::Type::Enum
|
|
75
|
+
|
|
76
|
+
WHATSAPP_WABA: :whatsapp_waba
|
|
77
|
+
WHATSAPP_ALT: :whatsapp_alt
|
|
78
|
+
|
|
79
|
+
def self?.values: -> ::Array[Zavudev::Models::InvitationCreateParams::connection_type]
|
|
80
|
+
end
|
|
61
81
|
end
|
|
62
82
|
end
|
|
63
83
|
end
|
|
@@ -6,6 +6,7 @@ module Zavudev
|
|
|
6
6
|
?client_email: String,
|
|
7
7
|
?client_name: String,
|
|
8
8
|
?client_phone: String,
|
|
9
|
+
?connection_type: Zavudev::Models::InvitationCreateParams::connection_type,
|
|
9
10
|
?expires_in_days: Integer,
|
|
10
11
|
?phone_number_id: String,
|
|
11
12
|
?request_options: Zavudev::request_opts
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zavudev
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zavudev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|