haskimail 1.0.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.
@@ -0,0 +1,247 @@
1
+ module Haskimail
2
+ class ApiObject
3
+ def method_missing: (Symbol name, *untyped args) ?{ (?) -> untyped } -> untyped
4
+ def respond_to_missing?: (Symbol name, ?bool include_private) -> bool
5
+ private def reader_name?: (untyped name) -> untyped
6
+ private def exact: (untyped key) -> untyped
7
+ private def setup: (untyped frozen_data) -> untyped
8
+ private def resolve: (untyped key) -> String?
9
+ # @api private (protected in Ruby)
10
+ def data: () -> Hash[String, untyped]
11
+ end
12
+ end
13
+ module Haskimail
14
+ class Attachment
15
+ def inspect: () -> ::String
16
+ def self.header_text!: (untyped value, untyped label) -> untyped
17
+ end
18
+ end
19
+ module Haskimail
20
+ class BaseClient
21
+ def token_header: () -> untyped
22
+ def build_resources: () -> nil
23
+ private def build_request: (untyped method, untyped path, untyped query, untyped body, untyped idempotent) -> untyped
24
+ private def build_url: (untyped path, untyped query) -> untyped
25
+ private def checked: (untyped request, untyped response, untyped data) -> untyped
26
+ private def attempt_request: (untyped request, untyped attempt) -> untyped
27
+ private def pause: (untyped attempt, untyped response, untyped reason) -> untyped
28
+ private def log_path: (untyped request) -> untyped
29
+ private def log: (untyped level) { (?) -> untyped } -> untyped
30
+ private def monotonic_now: () -> untyped
31
+ private def build_user_agent: () -> untyped
32
+ end
33
+ end
34
+ module Haskimail
35
+ class ServerClient
36
+ def token_header: () -> untyped
37
+ def build_resources: () -> untyped
38
+ end
39
+ class AccountClient
40
+ def token_header: () -> untyped
41
+ def build_resources: () -> untyped
42
+ end
43
+ end
44
+ module Haskimail
45
+ class Configuration
46
+ private def redacted_proxy: () -> (nil | untyped | ::String)
47
+ private def positive_number!: (untyped name, untyped value) -> untyped
48
+ end
49
+ end
50
+ module Haskimail
51
+ module HTTP
52
+ class NetHttpTransport
53
+ class ResponseTooLarge < StandardError
54
+ end
55
+ CONNECT_ERRORS: ::Array[untyped]
56
+ EXCHANGE_ERRORS: ::Array[untyped]
57
+ METHODS: { get: untyped, post: untyped, put: untyped, patch: untyped, delete: untyped }
58
+ def inspect: () -> ::String
59
+ private def connect: (untyped http, untyped uri) -> untyped
60
+ private def exchange: (untyped http, untyped net_request, untyped uri) -> untyped
61
+ private def build_http: (untyped uri, untyped open_timeout, untyped read_timeout, untyped write_timeout) -> untyped
62
+ private def build_request: (untyped request, untyped uri) -> untyped
63
+ private def decode: (String? value) -> String?
64
+ private def use_proxy?: (URI::Generic uri) -> bool
65
+ def self.cert_store: (String ca_file) -> OpenSSL::X509::Store
66
+ def self.normalize_no_proxy: (String? value) -> (String | false)
67
+ private def resolve: (String host) -> String?
68
+ end
69
+ end
70
+ end
71
+ module Haskimail
72
+ module HTTP
73
+ module ResponseParser
74
+ private def parse: (untyped response) -> untyped
75
+ private def blank_body?: (untyped body) -> untyped
76
+ private def error_code: (untyped data) -> untyped
77
+ private def malformed_error_code?: (untyped data) -> untyped
78
+ private def success?: (untyped response, untyped data) -> (false | true | untyped)
79
+ private def api_error: (untyped response, untyped data) -> untyped
80
+ private def unexpected_body_error: (untyped request, untyped response, ?::String reason) -> untyped
81
+ private def error_class: (untyped status) -> untyped
82
+ end
83
+ end
84
+ end
85
+ module Haskimail
86
+ module HTTP
87
+ class RetryPolicy
88
+ private def retry_after: (untyped response) -> untyped
89
+ end
90
+ end
91
+ end
92
+ module Haskimail
93
+ module Resources
94
+ class Servers
95
+ private def validate!: (untyped payload) -> untyped
96
+ private def check_value!: (untyped payload, untyped key, untyped allowed) ?{ (untyped) -> untyped } -> (nil | untyped)
97
+ end
98
+ end
99
+ end
100
+ module Haskimail
101
+ module Resources
102
+ class Base
103
+ def inspect: () -> ::String
104
+ private def api_get: (untyped path, ?untyped? query) -> untyped
105
+ private def api_post: (untyped path, ?untyped? body, ?idempotent: untyped?) -> untyped
106
+ private def api_put: (untyped path, ?untyped? body, ?idempotent: untyped?) -> untyped
107
+ private def api_patch: (untyped path, ?untyped? body) -> untyped
108
+ private def api_delete: (untyped path) -> untyped
109
+ private def object: (untyped data) -> untyped
110
+ private def send_result: (untyped data) -> untyped
111
+ private def run: (untyped paginator, untyped block) -> untyped
112
+ private def path: (untyped template, *untyped segments) -> untyped
113
+ private def query: (untyped params, untyped mapping) -> untyped
114
+ private def merge_params: (untyped params, untyped fields) -> untyped
115
+ private def paginate: (untyped items_key, page_size: untyped, ?max_window: untyped?) { (untyped, untyped) -> untyped } -> untyped
116
+ private def check_paging!: (untyped count, untyped offset, ?max_count: untyped?, ?max_window: untyped?) -> (nil | untyped)
117
+ private def check_integer!: (untyped name, untyped value, untyped min, untyped max) -> (nil | untyped)
118
+ private def check_page_size!: (untyped page_size, Integer max) -> void
119
+ private def reject_paging!: (untyped filters) -> (nil | untyped)
120
+ end
121
+ end
122
+ class Paginator
123
+ def inspect: () -> ::String
124
+ end
125
+ end
126
+ module Haskimail
127
+ module Resources
128
+ class Emails
129
+ private def prepare: (untyped message) -> untyped
130
+ private def prepare_plain: (untyped message) -> untyped
131
+ private def prepare_template: (untyped message) -> untyped
132
+ private def prepare_batch_item: (untyped message) -> untyped
133
+ private def api_fields: (untyped message) -> untyped
134
+ private def canonicalize: (untyped hash, untyped fields, untyped label) -> untyped
135
+ private def field_key: (untyped key) -> String?
136
+ private def prepare_batch: (untyped messages) { (untyped) -> untyped } -> untyped
137
+ private def check_batch_size!: (untyped payload) -> untyped
138
+ private def expand_headers: (untyped message) -> untyped
139
+ private def headers_key?: (untyped key) -> untyped
140
+ private def join_addresses!: (untyped payload) -> untyped
141
+ private def check_header_fields!: (untyped payload) -> untyped
142
+ private def check_limits!: (untyped payload) -> (nil | untyped)
143
+ private def utf16_length: (untyped value) -> (0 | untyped)
144
+ private def unsafe?: (untyped value) -> untyped
145
+ private def normalize_headers!: (untyped payload) -> (nil | untyped)
146
+ private def check_size!: (untyped payload) -> (nil | untyped)
147
+ private def normalize_attachments!: (untyped payload) -> (nil | untyped)
148
+ private def batch_result: (untyped data, untyped expected) -> untyped
149
+ end
150
+ end
151
+ end
152
+ module Haskimail
153
+ module Resources
154
+ class OutboundSearch
155
+ private def search: (untyped endpoint, untyped filters, untyped mapping) -> untyped
156
+ private def iterate: (untyped endpoint, untyped items_key, untyped filters, untyped mapping, untyped page_size) -> untyped
157
+ end
158
+ class InboundMessages
159
+ private def build_query: (untyped filters) -> untyped
160
+ end
161
+ end
162
+ end
163
+ module Haskimail
164
+ module Resources
165
+ class Bounces
166
+ private def build_query: (untyped filters) -> untyped
167
+ end
168
+ class Suppressions
169
+ private def payload: (untyped emails) -> { "Suppressions" => untyped }
170
+ end
171
+ class Webhooks
172
+ private def check_url!: (untyped url) -> untyped
173
+ private def normalize_triggers: (untyped triggers) -> untyped
174
+ private def enabled_flag: (untyped name, untyped value) -> untyped
175
+ end
176
+ end
177
+ end
178
+ module Haskimail
179
+ # @api private
180
+ module Util
181
+ IRREGULAR_KEYS: Hash[Symbol, String]
182
+ OPAQUE_KEYS: Array[String]
183
+ MOSCOW_OFFSET: String
184
+ MOSCOW_UTC_OFFSET: Integer
185
+ UNSAFE_HEADER_CHARS: Regexp
186
+ def self?.api_key: (untyped key) -> String
187
+ def self?.to_api: (untyped value, ?Integer depth) -> untyped
188
+ def self?.utf8: (String text) -> String
189
+ def self?.utf8_strings: (untyped value, ?Integer depth) -> untyped
190
+ MAX_DEPTH: Integer
191
+ def self?.check_depth!: (Integer depth) -> void
192
+ def self?.blank?: (untyped value) -> bool
193
+ def self?.strip_text: (untyped value, String field) -> String
194
+ def self?.path: (String template, *untyped segments) -> String
195
+ def self?.escape_segment: (untyped value) -> String
196
+ def self?.query: (Hash[untyped, untyped] params, Hash[Symbol, String] mapping) -> Hash[String, String]
197
+ def self?.query_value: (untyped value) -> String
198
+ def self?.format_time: (Time time, ?separator: String) -> String
199
+ def self?.format_date: (untyped value) -> String?
200
+ def self?.parse_time: (untyped value) -> Time?
201
+ def self?.deep_freeze: (untyped value) -> untyped
202
+ def self?.deep_dup: (untyped value) -> untyped
203
+ def self?.parse_json: (String body) -> untyped
204
+ def self?.generate_json: (untyped value) -> String
205
+ end
206
+ end
207
+ module Haskimail
208
+ module Webhook
209
+ private def construct_event: (untyped payload, signing_key: untyped, ?max_size: untyped) -> untyped
210
+ private def parse_event: (untyped payload, ?max_size: untyped) -> untyped
211
+ private def valid_signature?: (untyped event, signing_key: untyped) -> (false | untyped)
212
+ private def parse_inbound: (untyped payload, ?max_size: untyped) -> untyped
213
+ private def parse_object: (untyped payload, untyped limit) -> untyped
214
+ def self.parse_object: (untyped payload, Integer limit) -> Hash[String, untyped]
215
+ def self.huge_number?: (String text) -> bool
216
+ private def huge_number?: (String text) -> bool
217
+ end
218
+ end
219
+ module Haskimail
220
+ # @api private
221
+ module Redacted : Object
222
+ def encode_with: (untyped coder) -> void
223
+ def marshal_dump: () -> bot
224
+ def as_json: (*untyped) -> String
225
+ def to_json: (*untyped args) -> String
226
+ end
227
+
228
+ class BaseClient
229
+ include Redacted
230
+ end
231
+
232
+ module HTTP
233
+ class Request
234
+ include Redacted
235
+ end
236
+
237
+ class NetHttpTransport
238
+ include Redacted
239
+ end
240
+ end
241
+
242
+ module Resources
243
+ class Base
244
+ include Redacted
245
+ end
246
+ end
247
+ end