whatsapp_sdk 0.12.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.cursorrules +53 -0
- data/.github/workflows/codeql-analysis.yml +8 -6
- data/.gitignore +1 -0
- data/.rubocop.yml +0 -3
- data/CHANGELOG.md +19 -7
- data/Gemfile +1 -4
- data/Gemfile.lock +9 -23
- data/README.md +148 -223
- data/SECURITY.md +21 -0
- data/example.rb +217 -125
- data/lib/whatsapp_sdk/api/api_configuration.rb +2 -5
- data/lib/whatsapp_sdk/api/business_profile.rb +12 -26
- data/lib/whatsapp_sdk/api/client.rb +31 -43
- data/lib/whatsapp_sdk/api/medias.rb +31 -46
- data/lib/whatsapp_sdk/api/messages.rb +28 -142
- data/lib/whatsapp_sdk/api/phone_numbers.rb +32 -36
- data/lib/whatsapp_sdk/api/request.rb +2 -2
- data/lib/whatsapp_sdk/api/responses/generic_error_response.rb +12 -30
- data/lib/whatsapp_sdk/api/responses/http_response_error.rb +18 -0
- data/lib/whatsapp_sdk/api/responses/id_response.rb +15 -0
- data/lib/whatsapp_sdk/api/responses/message_data_response.rb +18 -37
- data/lib/whatsapp_sdk/api/responses/pagination_records.rb +17 -0
- data/lib/whatsapp_sdk/api/responses/success_response.rb +3 -20
- data/lib/whatsapp_sdk/api/templates.rb +30 -63
- data/lib/whatsapp_sdk/configuration.rb +2 -24
- data/lib/whatsapp_sdk/error.rb +0 -1
- data/lib/whatsapp_sdk/resource/address.rb +1 -30
- data/lib/whatsapp_sdk/resource/address_type.rb +3 -8
- data/lib/whatsapp_sdk/resource/business_profile.rb +28 -3
- data/lib/whatsapp_sdk/resource/button_parameter.rb +4 -20
- data/lib/whatsapp_sdk/resource/component.rb +12 -43
- data/lib/whatsapp_sdk/resource/contact.rb +1 -30
- data/lib/whatsapp_sdk/resource/contact_response.rb +1 -9
- data/lib/whatsapp_sdk/resource/currency.rb +0 -8
- data/lib/whatsapp_sdk/resource/date_time.rb +0 -6
- data/lib/whatsapp_sdk/resource/email.rb +1 -10
- data/lib/whatsapp_sdk/resource/errors.rb +3 -17
- data/lib/whatsapp_sdk/resource/interactive.rb +6 -27
- data/lib/whatsapp_sdk/resource/interactive_action.rb +10 -24
- data/lib/whatsapp_sdk/resource/interactive_action_reply_button.rb +5 -19
- data/lib/whatsapp_sdk/resource/interactive_action_section.rb +1 -11
- data/lib/whatsapp_sdk/resource/interactive_action_section_row.rb +0 -11
- data/lib/whatsapp_sdk/resource/interactive_body.rb +0 -10
- data/lib/whatsapp_sdk/resource/interactive_footer.rb +0 -10
- data/lib/whatsapp_sdk/resource/interactive_header.rb +25 -53
- data/lib/whatsapp_sdk/resource/location.rb +44 -0
- data/lib/whatsapp_sdk/resource/media.rb +28 -114
- data/lib/whatsapp_sdk/resource/media_component.rb +89 -0
- data/lib/whatsapp_sdk/resource/media_types.rb +0 -3
- data/lib/whatsapp_sdk/resource/message.rb +0 -5
- data/lib/whatsapp_sdk/resource/message_template_namespace.rb +17 -0
- data/lib/whatsapp_sdk/resource/name.rb +1 -28
- data/lib/whatsapp_sdk/resource/org.rb +1 -13
- data/lib/whatsapp_sdk/resource/parameter_object.rb +71 -74
- data/lib/whatsapp_sdk/resource/phone_number.rb +40 -22
- data/lib/whatsapp_sdk/resource/phone_number_component.rb +25 -0
- data/lib/whatsapp_sdk/resource/template.rb +43 -36
- data/lib/whatsapp_sdk/resource/url.rb +1 -10
- data/lib/whatsapp_sdk/version.rb +1 -2
- data/lib/whatsapp_sdk.rb +0 -4
- data/whatsapp_sdk.gemspec +1 -4
- metadata +13 -62
- data/lib/whatsapp_sdk/api/response.rb +0 -51
- data/lib/whatsapp_sdk/api/responses/business_profile_data_response.rb +0 -56
- data/lib/whatsapp_sdk/api/responses/data_response.rb +0 -26
- data/lib/whatsapp_sdk/api/responses/error_response.rb +0 -32
- data/lib/whatsapp_sdk/api/responses/media_data_response.rb +0 -48
- data/lib/whatsapp_sdk/api/responses/message_error_response.rb +0 -13
- data/lib/whatsapp_sdk/api/responses/message_template_namespace_data_response.rb +0 -37
- data/lib/whatsapp_sdk/api/responses/phone_number_data_response.rb +0 -60
- data/lib/whatsapp_sdk/api/responses/phone_numbers_data_response.rb +0 -39
- data/lib/whatsapp_sdk/api/responses/read_message_data_response.rb +0 -34
- data/lib/whatsapp_sdk/api/responses/template_data_response.rb +0 -51
- data/lib/whatsapp_sdk/api/responses/templates_data_response.rb +0 -39
- data/sorbet/config +0 -6
- data/sorbet/rbi/annotations/faraday.rbi +0 -17
- data/sorbet/rbi/annotations/mocha.rbi +0 -34
- data/sorbet/rbi/annotations/rainbow.rbi +0 -269
- data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +0 -270
- data/sorbet/rbi/gems/faraday-net_http@2.0.3.rbi +0 -182
- data/sorbet/rbi/gems/faraday@2.3.0.rbi +0 -2494
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -272
- data/sorbet/rbi/gems/minitest@5.16.1.rbi +0 -1459
- data/sorbet/rbi/gems/mocha@1.14.0.rbi +0 -60
- data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +0 -239
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -150
- data/sorbet/rbi/gems/oj@3.13.14.rbi +0 -589
- data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +0 -867
- data/sorbet/rbi/todo.rbi +0 -8
- data/sorbet/shims/request.rbi +0 -10
- data/sorbet/tapioca/config.yml +0 -13
- data/sorbet/tapioca/require.rb +0 -4
@@ -1,182 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `faraday-net_http` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem faraday-net_http`.
|
6
|
-
|
7
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:12
|
8
|
-
module Faraday
|
9
|
-
class << self
|
10
|
-
# source://faraday-2.3.0/lib/faraday.rb:55
|
11
|
-
def default_adapter; end
|
12
|
-
|
13
|
-
# source://faraday-2.3.0/lib/faraday.rb:102
|
14
|
-
def default_adapter=(adapter); end
|
15
|
-
|
16
|
-
# source://faraday-2.3.0/lib/faraday.rb:59
|
17
|
-
def default_adapter_options; end
|
18
|
-
|
19
|
-
# source://faraday-2.3.0/lib/faraday.rb:59
|
20
|
-
def default_adapter_options=(_arg0); end
|
21
|
-
|
22
|
-
# source://faraday-2.3.0/lib/faraday.rb:120
|
23
|
-
def default_connection; end
|
24
|
-
|
25
|
-
# source://faraday-2.3.0/lib/faraday.rb:62
|
26
|
-
def default_connection=(_arg0); end
|
27
|
-
|
28
|
-
# source://faraday-2.3.0/lib/faraday.rb:127
|
29
|
-
def default_connection_options; end
|
30
|
-
|
31
|
-
# source://faraday-2.3.0/lib/faraday.rb:134
|
32
|
-
def default_connection_options=(options); end
|
33
|
-
|
34
|
-
# source://faraday-2.3.0/lib/faraday.rb:67
|
35
|
-
def ignore_env_proxy; end
|
36
|
-
|
37
|
-
# source://faraday-2.3.0/lib/faraday.rb:67
|
38
|
-
def ignore_env_proxy=(_arg0); end
|
39
|
-
|
40
|
-
# source://faraday-2.3.0/lib/faraday.rb:46
|
41
|
-
def lib_path; end
|
42
|
-
|
43
|
-
# source://faraday-2.3.0/lib/faraday.rb:46
|
44
|
-
def lib_path=(_arg0); end
|
45
|
-
|
46
|
-
# source://faraday-2.3.0/lib/faraday.rb:96
|
47
|
-
def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end
|
48
|
-
|
49
|
-
# source://faraday-2.3.0/lib/faraday.rb:107
|
50
|
-
def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end
|
51
|
-
|
52
|
-
# source://faraday-2.3.0/lib/faraday.rb:42
|
53
|
-
def root_path; end
|
54
|
-
|
55
|
-
# source://faraday-2.3.0/lib/faraday.rb:42
|
56
|
-
def root_path=(_arg0); end
|
57
|
-
|
58
|
-
private
|
59
|
-
|
60
|
-
# source://faraday-2.3.0/lib/faraday.rb:143
|
61
|
-
def method_missing(name, *args, &block); end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:13
|
66
|
-
class Faraday::Adapter
|
67
|
-
# source://faraday-2.3.0/lib/faraday/adapter.rb:28
|
68
|
-
def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end
|
69
|
-
|
70
|
-
# source://faraday-2.3.0/lib/faraday/adapter.rb:55
|
71
|
-
def call(env); end
|
72
|
-
|
73
|
-
# source://faraday-2.3.0/lib/faraday/adapter.rb:50
|
74
|
-
def close; end
|
75
|
-
|
76
|
-
# source://faraday-2.3.0/lib/faraday/adapter.rb:41
|
77
|
-
def connection(env); end
|
78
|
-
|
79
|
-
private
|
80
|
-
|
81
|
-
# source://faraday-2.3.0/lib/faraday/adapter.rb:86
|
82
|
-
def request_timeout(type, options); end
|
83
|
-
|
84
|
-
# source://faraday-2.3.0/lib/faraday/adapter.rb:62
|
85
|
-
def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil)); end
|
86
|
-
end
|
87
|
-
|
88
|
-
# source://faraday-2.3.0/lib/faraday/adapter.rb:9
|
89
|
-
Faraday::Adapter::CONTENT_LENGTH = T.let(T.unsafe(nil), String)
|
90
|
-
|
91
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:14
|
92
|
-
class Faraday::Adapter::NetHttp < ::Faraday::Adapter
|
93
|
-
# @return [NetHttp] a new instance of NetHttp
|
94
|
-
#
|
95
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:38
|
96
|
-
def initialize(app = T.unsafe(nil), opts = T.unsafe(nil), &block); end
|
97
|
-
|
98
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:43
|
99
|
-
def build_connection(env); end
|
100
|
-
|
101
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:63
|
102
|
-
def call(env); end
|
103
|
-
|
104
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:51
|
105
|
-
def net_http_connection(env); end
|
106
|
-
|
107
|
-
private
|
108
|
-
|
109
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:172
|
110
|
-
def configure_request(http, req); end
|
111
|
-
|
112
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:156
|
113
|
-
def configure_ssl(http, ssl); end
|
114
|
-
|
115
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:88
|
116
|
-
def create_request(env); end
|
117
|
-
|
118
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:211
|
119
|
-
def encoded_body(http_response); end
|
120
|
-
|
121
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:104
|
122
|
-
def perform_request(http, env); end
|
123
|
-
|
124
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:134
|
125
|
-
def request_via_get_method(http, env, &block); end
|
126
|
-
|
127
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:142
|
128
|
-
def request_via_request_method(http, env, &block); end
|
129
|
-
|
130
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:125
|
131
|
-
def request_with_wrapped_block(http, env, &block); end
|
132
|
-
|
133
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:192
|
134
|
-
def ssl_cert_store(ssl); end
|
135
|
-
|
136
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:201
|
137
|
-
def ssl_verify_mode(ssl); end
|
138
|
-
end
|
139
|
-
|
140
|
-
# source://faraday-net_http-2.0.3/lib/faraday/adapter/net_http.rb:36
|
141
|
-
Faraday::Adapter::NetHttp::NET_HTTP_EXCEPTIONS = T.let(T.unsafe(nil), Array)
|
142
|
-
|
143
|
-
# source://faraday-2.3.0/lib/faraday/adapter.rb:94
|
144
|
-
Faraday::Adapter::TIMEOUT_KEYS = T.let(T.unsafe(nil), Hash)
|
145
|
-
|
146
|
-
# source://faraday-2.3.0/lib/faraday.rb:34
|
147
|
-
Faraday::CONTENT_TYPE = T.let(T.unsafe(nil), String)
|
148
|
-
|
149
|
-
# source://faraday-multipart-1.0.4/lib/faraday/multipart.rb:18
|
150
|
-
Faraday::CompositeReadIO = Faraday::Multipart::CompositeReadIO
|
151
|
-
|
152
|
-
# Aliases for Faraday v1, these are all deprecated and will be removed in v2 of this middleware
|
153
|
-
#
|
154
|
-
# source://faraday-multipart-1.0.4/lib/faraday/multipart.rb:15
|
155
|
-
Faraday::FilePart = Multipart::Post::UploadIO
|
156
|
-
|
157
|
-
# source://faraday-2.3.0/lib/faraday/methods.rb:5
|
158
|
-
Faraday::METHODS_WITH_BODY = T.let(T.unsafe(nil), Array)
|
159
|
-
|
160
|
-
# source://faraday-2.3.0/lib/faraday/methods.rb:4
|
161
|
-
Faraday::METHODS_WITH_QUERY = T.let(T.unsafe(nil), Array)
|
162
|
-
|
163
|
-
# source://faraday-net_http-2.0.3/lib/faraday/net_http/version.rb:4
|
164
|
-
module Faraday::NetHttp; end
|
165
|
-
|
166
|
-
# source://faraday-net_http-2.0.3/lib/faraday/net_http/version.rb:5
|
167
|
-
Faraday::NetHttp::VERSION = T.let(T.unsafe(nil), String)
|
168
|
-
|
169
|
-
# source://faraday-multipart-1.0.4/lib/faraday/multipart.rb:16
|
170
|
-
Faraday::ParamPart = Faraday::Multipart::ParamPart
|
171
|
-
|
172
|
-
# source://faraday-multipart-1.0.4/lib/faraday/multipart.rb:17
|
173
|
-
Faraday::Parts = Multipart::Post::Parts
|
174
|
-
|
175
|
-
# multipart-post v2.2.0 introduces a new class hierarchy for classes like Parts and UploadIO
|
176
|
-
# For backwards compatibility, detect the gem version and use the right class
|
177
|
-
#
|
178
|
-
# source://faraday-multipart-1.0.4/lib/faraday/multipart.rb:21
|
179
|
-
Faraday::UploadIO = Multipart::Post::UploadIO
|
180
|
-
|
181
|
-
# source://faraday-2.3.0/lib/faraday/version.rb:4
|
182
|
-
Faraday::VERSION = T.let(T.unsafe(nil), String)
|