rasket 0.1.1

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,508 @@
1
+ # Code generated by scripts/sdk-codegen/run.mjs from packages/api/openapi.json and
2
+ # packages/sdk/surface.json. DO NOT EDIT.
3
+ # Document sha256: 3f790b5e9b4526641b1d17f9b3cdbfcef6fef890214ee69cbaf158bd8163bda8
4
+
5
+ module Rasket
6
+ module Types
7
+ type add_contact_to_segment_response_success = { object: String, contact_id: String, segment_id: String }
8
+ type ai_credits = { limit: Integer, used: Integer, remaining: Integer, purchased_remaining: Integer }
9
+ type ai_diagnosis = { object: String, summary: String, likely_causes: Array[String], next_steps: Array[String], cause: String?, created_at: String, stored: bool, credits_remaining: Integer, credits: Types::ai_credits }
10
+ type attachment = { ?content: String, ?filename: String, ?path: String, ?content_type: String, ?content_id: String }
11
+ type attachment_list = { object: String, has_more: bool, data: Array[Types::attachment_list_item] }
12
+ type attachment_list_item = { id: String, filename: String?, content_type: String, ?content_id: String, content_disposition: String, download_url: String, expires_at: String, size: Integer }
13
+ type autoconfigure_response = { object: String, id: String, created: Array[String], updated: Array[String], conflicts: Array[String], credential_kept: bool }
14
+ type batch_add_suppressions_request = { emails: Array[String] }
15
+ type batch_remove_suppressions_request = { ?emails: Array[String], ?ids: Array[String] }
16
+ type broadcast_compliance = { object: String, broadcast_id: String, sendable: bool, conditions: Array[Types::broadcast_compliance_condition] }
17
+ type broadcast_compliance_condition = { condition: String, passed: bool, ?name: String, ?message: String }
18
+ type broadcast_test = { object: String, broadcast_id: String, data: Array[Types::broadcast_test_email] }
19
+ type broadcast_test_email = { id: String, to: String }
20
+ type broadcast_test_options = { to: Array[String] }
21
+ type broadcasts_clicked_links_query = { ?limit: Integer, ?after: String, ?before: String }
22
+ type broadcasts_list_query = { ?limit: Integer, ?after: String, ?before: String, ?search: String, ?status: String, ?channel: String }
23
+ type broadcasts_recipients_query = { type: String, ?email: String, ?bounce_type: String, ?limit: Integer, ?after: String, ?before: String }
24
+ type cancel_broadcast_response_success = { id: String, object: String }
25
+ type consent_record = { object: String, id: String, channel: String, action: String, source: String, topic: Types::consent_record_topic?, platform: String?, occurred_at: String }
26
+ type consent_record_topic = { id: String, name: String }
27
+ type contact_import = { object: String, id: String, status: String, created_at: String, completed_at: String?, counts: Types::contact_import_counts }
28
+ type contact_import_counts = { total: Integer, created: Integer, updated: Integer, skipped: Integer, failed: Integer }
29
+ type contact_verification = { object: String, id: String, status: String, segment_id: String?, import_id: String?, addresses: Integer, estimated_checks: Integer, per_1000_cents: Integer?, estimated_cents: Integer, walked: Integer, queued: Integer, counts: Types::contact_verification_counts?, removed: Integer, tagged: Integer, error: String?, created_at: String, finished_at: String? }
30
+ type contact_verification_counts = { valid: Integer, invalid: Integer, risky: Integer, unknown: Integer }
31
+ type contact_verification_estimate = { object: String, segment_id: String?, import_id: String?, addresses: Integer, known: Integer, to_check: Integer, per_1000_cents: Integer?, estimated_cents: Integer }
32
+ type contact_verification_removal = { object: String, id: String, removed: Integer, remaining: Integer }
33
+ type contact_verification_tag = { object: String, id: String, tagged: Integer, segment_id: String }
34
+ type contact_verification_target = { ?segment_id: String, ?import_id: String }
35
+ type contacts_consent_list_query = { ?limit: Integer, ?after: String, ?before: String, ?channel: String }
36
+ type contacts_imports_list_query = { ?status: String, ?limit: Integer, ?after: String, ?before: String }
37
+ type contacts_list_query = { ?segment_id: String, ?sms_status: String, ?phone: String, ?limit: Integer, ?after: String, ?before: String }
38
+ type contacts_properties_list_query = { ?limit: Integer, ?after: String, ?before: String }
39
+ type contacts_segments_list_query = { ?limit: Integer, ?after: String, ?before: String }
40
+ type contacts_topics_list_query = { ?limit: Integer, ?after: String, ?before: String }
41
+ type create_batch_emails_response = { data: Array[Types::create_batch_emails_response_data_item] }
42
+ type create_batch_emails_response_data_item = { id: String }
43
+ type create_broadcast_options = { ?name: String, ?segment_id: String, ?audience_id: String, ?from: String, ?subject: String, ?reply_to: Array[String], ?preview_text: String, ?html: String, ?text: String, ?topic_id: String, ?media_urls: Array[String], ?local_send_time: String, ?channel: String, ?template: Types::create_broadcast_options_template, ?send: bool, ?scheduled_at: String, ?acknowledge_checks: bool }
44
+ type create_broadcast_options_template = { id: String }
45
+ type create_broadcast_response_success = { id: String, object: String }
46
+ type create_contact_import_options = { file: String, ?column_map: String, ?on_conflict: String, ?segments: String, ?topics: String }
47
+ type create_contact_import_response_success = { object: String, id: String }
48
+ type create_contact_options = { ?email: String, ?phone: String, ?first_name: String, ?last_name: String, ?unsubscribed: bool, ?subscription_status: String, ?properties: Hash[Symbol, untyped], ?segments: Array[Types::create_contact_options_segments_item], ?topics: Array[Types::create_contact_options_topics_item] }
49
+ type create_contact_options_segments_item = { id: String }
50
+ type create_contact_options_topics_item = { id: String, subscription: String }
51
+ type create_contact_property_options = { key: String, type: String, ?fallback_value: (String | Numeric | bool)? }
52
+ type create_contact_property_response_success = { object: String, id: String }
53
+ type create_contact_response_success = { object: String, id: String }
54
+ type create_domain_response = { id: String, name: String, created_at: String, status: String, capabilities: Types::domain_capabilities, managed: bool, records: Array[Types::domain_record], region: String, open_tracking: bool, click_tracking: bool, tracking_subdomain: String, receiving_host: String, custom_return_path: String }
55
+ type create_segment_options = { name: String, ?filter: Hash[Symbol, untyped]? }
56
+ type create_segment_response_success = { id: String, object: String }
57
+ type create_suppression_request = { ?channel: String, ?email: String, ?phone: String }
58
+ type create_template_response_success = { id: String, object: String }
59
+ type created_suppression = { object: String, id: String }
60
+ type created_suppression_list = { data: Array[Types::created_suppression] }
61
+ type delete_credential_response = { object: String, id: String, deleted: bool }
62
+ type delete_domain_brand_certificate_response = { object: String, domain_id: String, deleted: bool }
63
+ type delete_domain_brand_logo_response = { object: String, domain_id: String, deleted: bool }
64
+ type delete_domain_response = { object: String, id: String, deleted: bool }
65
+ type delete_email_share_response = { object: String, id: String, revoked_at: String }
66
+ type delete_received_email_response = { object: String, id: String, deleted: bool }
67
+ type delete_webhook_response = { object: String, id: String, deleted: bool }
68
+ type domain = { object: String, id: String, name: String, status: String, created_at: String, region: String, open_tracking: bool, click_tracking: bool, tracking_subdomain: String, receiving_host: String, custom_return_path: String, capabilities: Types::domain_capabilities, managed: bool, records: Array[Types::domain_record] }
69
+ type domain_brand_certificate = { object: String, domain_id: String, state: String, csr_pem: String?, subject: Types::domain_brand_certificate_subject?, requested_at: String?, url: String?, bytes: Integer?, sha256: String?, issuer: String?, expires_at: String?, installed_at: String?, published: bool, reason: String? }
70
+ type domain_brand_certificate_subject = { common_name: String, organization: String, organizational_unit: String?, locality: String, state: String, country: String }
71
+ type domain_brand_logo = { object: String, domain_id: String, url: String, bytes: Integer, sha256: String, uploaded_at: String }
72
+ type domain_capabilities = { sending: String, receiving: String }
73
+ type domain_claim = { object: String, id: String, name: String, status: String, domain_id: String?, region: String?, record: Types::domain_claim_record, blocked_reason: String?, failure_reason: String?, created_at: String, expires_at: String }
74
+ type domain_claim_record = { record: String, name: String, type: String, ttl: String, status: String, value: String }
75
+ type domain_list = { object: String, has_more: bool, data: Array[Types::list_domains_item] }
76
+ type domain_record = { record: String, name: String, type: String, ttl: String, status: String, value: String, ?priority: Integer }
77
+ type domain_record_observation = { record: String, name: String, type: String, ttl: String, value: String, ?priority: Integer, status: String, observed: Array[String], reason: String?, last_checked_at: String? }
78
+ type domain_records = { object: String, domain_id: String, sending_verified: bool, tracking_verified: bool, receiving_verified: bool, receiving_host: String, receiving_address: String?, records: Array[Types::domain_record_observation] }
79
+ type domain_ref = { object: String, id: String }
80
+ type domain_setup_link = { object: String, domain_id: String, url: String, created_at: String, expires_at: String }
81
+ type domain_setup_link_sent = { object: String, domain_id: String, sent_to: String }
82
+ type domains_autoconfigure_request = { provider: String, token: String, ?keep_token: bool }
83
+ type domains_claims_create_request = { name: String, ?region: String, ?custom_return_path: String, ?tracking_subdomain: String, ?receiving_host: String, ?open_tracking: bool, ?click_tracking: bool, ?tls: String, ?capabilities: Types::domains_claims_create_request_capabilities, ?confirm_replace_mx: bool }
84
+ type domains_claims_create_request_capabilities = { ?sending: String, ?receiving: String }
85
+ type domains_create_request = { name: String, ?region: String, ?custom_return_path: String, ?tracking_subdomain: String, ?receiving_host: String, ?open_tracking: bool, ?click_tracking: bool, ?tls: String, ?capabilities: Types::domains_create_request_capabilities, ?confirm_replace_mx: bool }
86
+ type domains_create_request_capabilities = { ?sending: String, ?receiving: String }
87
+ type domains_install_certificate_request = { pem: String }
88
+ type domains_list_query = { ?limit: Integer, ?after: String, ?before: String, ?search: String, ?status: String }
89
+ type domains_regenerate_dkim_request = { key_bits: Numeric }
90
+ type domains_request_certificate_request = { common_name: String, organization: String, ?organizational_unit: String, locality: String, state: String, country: String }
91
+ type domains_send_setup_link_request = { to: String, token: String }
92
+ type domains_update_request = { ?open_tracking: bool, ?click_tracking: bool, ?tls: String, ?tracking_subdomain: String, ?receiving_host: String, ?capabilities: Types::domains_update_request_capabilities, ?custom_return_path: String, ?confirm_replace_mx: bool, ?region: untyped }
93
+ type domains_update_request_capabilities = { ?sending: String, ?receiving: String }
94
+ type domains_upload_logo_request = { svg: String }
95
+ type duplicate_broadcast_response_success = { id: String, object: String }
96
+ type email = { object: String, id: String, message_id: String?, to: Array[String], from: String, created_at: String, subject: String, html: String?, text: String?, bcc: Array[String], cc: Array[String], reply_to: Array[String], last_event: String, scheduled_at: String?, ?tags: Hash[Symbol, String], ?inbox: Types::email_inbox_route, ?held_reason: String? }
97
+ type email_check = { code: String, status: String, title: String, message: String, ?block_id: String }
98
+ type email_checks = { object: String, checks: Array[Types::email_check] }
99
+ type email_event = { object: String, id: String, type: String, recipient: String?, occurred_at: String, ?data: untyped }
100
+ type email_event_list = { object: String, has_more: bool, data: Array[Types::email_event] }
101
+ type email_inbox_route = { channel_id: String, conversation_id: String? }
102
+ type email_list = { object: String, has_more: bool, data: Array[Types::email] }
103
+ type email_ref = { object: String, id: String }
104
+ type email_share = { id: String, email_id: String, status: String, created_at: String, expires_at: String, revoked_at: String?, created_by_user_id: String?, created_by_api_key_id: String? }
105
+ type email_share_list = { object: String, has_more: bool, data: Array[Types::email_share] }
106
+ type email_template_input = { id: String, ?variables: Hash[Symbol, (String | Numeric | bool)] }
107
+ type emails_attachments_list_query = { ?limit: Integer, ?after: String, ?before: String }
108
+ type emails_list_query = { ?limit: Integer, ?after: String, ?before: String, ?status: String, ?api_key_id: String, ?start_date: String, ?end_date: String, ?search: String, ?tags: String }
109
+ type emails_metrics_query = { ?start_date: String, ?end_date: String, ?timezone: String, ?granularity: String, ?metrics: String, ?dimensions: String, ?domain_id: String, ?email_id: String, ?broadcast_id: String }
110
+ type emails_receiving_attachments_list_query = { ?limit: Integer, ?after: String, ?before: String }
111
+ type emails_receiving_list_query = { ?limit: Integer, ?after: String, ?before: String, ?search: String, ?start_date: String, ?end_date: String }
112
+ type emails_shares_list_query = { ?limit: Integer, ?after: String, ?before: String }
113
+ type get_broadcast_response_success = { id: String, ?name: String, audience_id: String?, segment_id: String?, ?from: String, ?subject: String, reply_to: Array[String], ?preview_text: String, status: String, created_at: String, ?scheduled_at: String, ?sent_at: String, text: String?, html: String?, topic_id: String?, ?subject_variants: Array[String], channel: String, ?media_urls: Array[String], ?local_send_time: String }
114
+ type get_contact_property_response_success = { object: String, id: String, key: String, type: String, ?fallback_value: (String | Numeric | bool), created_at: String }
115
+ type get_contact_response_success = { object: String, id: String, email: String?, first_name: String?, last_name: String?, created_at: String, unsubscribed: bool, subscription_status: String, phone: String?, sms_status: String, properties: Hash[Symbol, (String | Numeric | bool)] }
116
+ type get_contact_topics_item = { id: String, name: String, description: String, subscription: String }
117
+ type get_contact_topics_response_success = { object: String, has_more: bool, data: Array[Types::get_contact_topics_item] }
118
+ type get_emails_metrics_response = { object: String, start_date: String, end_date: String, metrics: Array[String], dimensions: Array[String], granularity: String, totals: Hash[Symbol, Numeric], data_as_of: String, ?data: Array[Hash[Symbol, (String | Numeric | bool)]] }
119
+ type get_received_email_response = { object: String, id: String, to: Array[String], from: String, subject: String, message_id: String, bcc: Array[String]?, cc: Array[String]?, reply_to: Array[String]?, received_for: Array[String], html: String?, text: String?, headers: Hash[Symbol, (String | Array[String])]?, dropped_reason: String?, created_at: String, attachments: Array[Types::received_email_attachment] }
120
+ type get_segment_response_success = { id: String, object: String, name: String, filter: Hash[Symbol, untyped]?, created_at: String }
121
+ type list_attachments_response = { object: String, has_more: bool, data: Array[Types::received_attachment_list_item] }
122
+ type list_broadcast_clicked_links_item = { id: String, url: String, clicks: Integer, unique_clicks: Integer }
123
+ type list_broadcast_clicked_links_response_success = { object: String, has_more: bool, data: Array[Types::list_broadcast_clicked_links_item] }
124
+ type list_broadcast_recipients_item = { id: String, contact_id: String?, email: String, ?count: Integer, ?bounce_type: String, ?clicked_links: Array[Types::list_broadcast_recipients_item_clicked_links_item] }
125
+ type list_broadcast_recipients_item_clicked_links_item = { url: String, clicks: Integer }
126
+ type list_broadcast_recipients_response_success = { object: String, has_more: bool, data: Array[Types::list_broadcast_recipients_item] }
127
+ type list_broadcasts_item = { id: String, ?name: String, audience_id: String, segment_id: String, status: String, created_at: String, ?scheduled_at: String, ?sent_at: String, ?topic_id: String, ?channel: String }
128
+ type list_broadcasts_response_success = { object: String, has_more: bool, data: Array[Types::list_broadcasts_item] }
129
+ type list_contact_consent_response_success = { object: String, has_more: bool, data: Array[Types::consent_record] }
130
+ type list_contact_imports_response_success = { object: String, has_more: bool, data: Array[Types::contact_import] }
131
+ type list_contact_properties_item = { id: String, key: String, type: String, ?fallback_value: (String | Numeric | bool), created_at: String }
132
+ type list_contact_properties_response_success = { object: String, has_more: bool, data: Array[Types::list_contact_properties_item] }
133
+ type list_contact_segments_item = { id: String, name: String, created_at: String }
134
+ type list_contact_segments_response_success = { object: String, has_more: bool, data: Array[Types::list_contact_segments_item] }
135
+ type list_contacts_item = { id: String, email: String?, first_name: String?, last_name: String?, created_at: String, unsubscribed: bool, subscription_status: String, phone: String?, sms_status: String }
136
+ type list_contacts_response_success = { object: String, data: Array[Types::list_contacts_item] }
137
+ type list_domains_item = { id: String, name: String, status: String, created_at: String, region: String, open_tracking: bool, click_tracking: bool, capabilities: Types::domain_capabilities, managed: bool }
138
+ type list_received_emails_response = { object: String, has_more: bool, data: Array[Types::received_email_list_item] }
139
+ type list_segments_item = { id: String, name: String, created_at: String }
140
+ type list_segments_response_success = { object: String, has_more: bool, data: Array[Types::list_segments_item] }
141
+ type parked_delivery = { object: String, delivered: Integer, remaining: Integer, stopped_reason: String? }
142
+ type parked_webhook_event = { id: String, type: String, created_at: String, status: String, attempt_count: Integer, last_http_status: Integer? }
143
+ type parked_webhook_event_list = { object: String, has_more: bool, data: Array[Types::parked_webhook_event] }
144
+ type received_attachment = { object: String, id: String, filename: String?, content_type: String, ?content_id: String, content_disposition: String, size: Integer, ?download_url: String, ?expires_at: String }
145
+ type received_attachment_list_item = { id: String, filename: String?, content_type: String, ?content_id: String, content_disposition: String, size: Integer, ?download_url: String, ?expires_at: String }
146
+ type received_email_attachment = { id: String, filename: String?, content_type: String, ?content_id: String, content_disposition: String, size: Integer }
147
+ type received_email_list_item = { id: String, to: Array[String], from: String, subject: String?, message_id: String, bcc: Array[String]?, cc: Array[String]?, reply_to: Array[String]?, dropped_reason: String?, created_at: String, attachments: Array[Types::received_email_attachment] }
148
+ type remove_broadcast_response_success = { id: String, object: String, deleted: bool }
149
+ type remove_contact_from_segment_response_success = { object: String, contact_id: String, segment_id: String, deleted: bool }
150
+ type remove_contact_property_response_success = { object: String, id: String, deleted: bool }
151
+ type remove_contact_response_success = { object: String, id: String, deleted: bool }
152
+ type remove_segment_response_success = { id: String, object: String, deleted: bool }
153
+ type removed_suppression = { object: String, ?id: String, deleted: bool }
154
+ type removed_suppression_list = { data: Array[Types::removed_suppression] }
155
+ type retrieved_attachment = { object: String, id: String, filename: String?, content_type: String, ?content_id: String, content_disposition: String, download_url: String, expires_at: String, size: Integer }
156
+ type segment_contact_list = { object: String, has_more: bool, data: Array[Types::list_contacts_item] }
157
+ type segment_contacts_added = { object: String, segment_id: String, added: Integer }
158
+ type segment_contacts_batch_request = { contact_ids: Array[String] }
159
+ type segment_contacts_removed = { object: String, segment_id: String, removed: Integer }
160
+ type segment_metrics = { object: String, segment_id: String, contacts: Integer, subscribed: Integer, unsubscribed: Integer }
161
+ type segment_preview = { object: String, contacts: Integer }
162
+ type segment_preview_request = { filter: Hash[Symbol, untyped], ?segment_id: String }
163
+ type segments_contacts_query = { ?limit: Integer, ?after: String, ?before: String }
164
+ type segments_list_query = { ?limit: Integer, ?after: String, ?before: String }
165
+ type send_broadcast_options = { ?scheduled_at: String, ?acknowledge_checks: bool }
166
+ type send_broadcast_response_success = { id: String }
167
+ type send_email_request = { ?from: String, to: (String | Array[String]), ?subject: String, ?bcc: (String | Array[String]), ?cc: (String | Array[String]), ?reply_to: (String | Array[String]), ?inbox: String, ?html: String, ?text: String, ?template: Types::email_template_input, ?headers: Hash[Symbol, String], ?scheduled_at: String, ?attachments: Array[Types::attachment], ?tags: Array[Types::tag], ?topic_id: String }
168
+ type send_email_response = { id: String }
169
+ type share_email_options = { ?expires_in: String }
170
+ type share_email_response = { object: String, id: String, url: String, expires_at: String }
171
+ type suppression = { object: String, id: String, channel: String, email: String?, phone: String?, origin: String, source_id: String?, created_at: String }
172
+ type suppression_list = { object: String, has_more: bool, data: Array[Types::suppression_list_item] }
173
+ type suppression_list_item = { id: String, channel: String, email: String?, phone: String?, origin: String, source_id: String?, created_at: String }
174
+ type suppressions_list_query = { ?channel: String, ?origin: String, ?search: String, ?start_date: String, ?end_date: String, ?limit: Integer, ?after: String, ?before: String }
175
+ type tag = { name: String, value: String }
176
+ type update_broadcast_options = { ?name: String, ?segment_id: String, ?audience_id: String, ?from: String, ?subject: String, ?reply_to: Array[String], ?preview_text: String, ?html: String, ?text: String, ?topic_id: String, ?media_urls: Array[String]?, ?local_send_time: String?, ?subject_variants: Array[String]? }
177
+ type update_broadcast_response_success = { id: String, object: String }
178
+ type update_contact_options = { ?email: String, ?phone: String?, ?first_name: String, ?last_name: String, ?unsubscribed: bool, ?subscription_status: String, ?properties: Hash[Symbol, untyped] }
179
+ type update_contact_property_options = { ?key: String, ?type: String, ?fallback_value: (String | Numeric | bool)? }
180
+ type update_contact_property_response_success = { object: String, id: String }
181
+ type update_contact_response_success = { object: String, id: String }
182
+ type update_contact_sms_consent_options = { status: String, ?double_opt_in: bool, ?proof: Types::update_contact_sms_consent_options_proof }
183
+ type update_contact_sms_consent_options_proof = { method: String, occurred_at: String, ?page_url: String, disclosure_text: String, ?ip: String, ?user_agent: String }
184
+ type update_contact_topics_options = { topics: Array[Types::update_contact_topics_options_topics_item] }
185
+ type update_contact_topics_options_topics_item = { id: String, subscription: String }
186
+ type update_contact_topics_response_success = { object: String, contact_id: String, topics: Array[Types::update_contact_topics_response_success_topics_item] }
187
+ type update_contact_topics_response_success_topics_item = { id: String, subscription: String }
188
+ type update_email_options = { scheduled_at: String }
189
+ type update_segment_options = { name: String, ?filter: Hash[Symbol, untyped]? }
190
+ type update_segment_response_success = { id: String, object: String }
191
+ type verify_domain_response = { object: String, id: String, name: String, status: String, created_at: String, region: String, open_tracking: bool, click_tracking: bool, tracking_subdomain: String, receiving_host: String, custom_return_path: String, capabilities: Types::domain_capabilities, managed: bool, records: Array[Types::domain_record] }
192
+ type webhook_attempt = { id: String, attempt_number: Integer, http_status_code: Integer?, response: String?, duration_ms: Integer, error: String?, sent_at: String }
193
+ type webhook_attempt_list = { object: String, has_more: bool, data: Array[Types::webhook_attempt] }
194
+ type webhook_detail = { object: String, id: String, endpoint: String, events: Array[String], status: String, created_at: String, signing_secret: String }
195
+ type webhook_event = { object: String, id: String, type: String, created_at: String, status: String, attempt_count: Integer, next_attempt_at: String?, last_http_status: Integer?, ?payload: untyped }
196
+ type webhook_event_list = { object: String, has_more: bool, data: Array[Types::webhook_event_list_item] }
197
+ type webhook_event_list_item = { id: String, type: String, created_at: String, status: String }
198
+ type webhook_event_ref = { object: String, id: String }
199
+ type webhook_list = { object: String, has_more: bool, data: Array[Types::webhook_list_item] }
200
+ type webhook_list_item = { id: String, endpoint: String, events: Array[String], status: String, created_at: String }
201
+ type webhook_ref = { object: String, id: String }
202
+ type webhook_secret = { object: String, id: String, signing_secret: String }
203
+ type webhooks_create_request = { endpoint: String, events: Array[String] }
204
+ type webhooks_events_list_query = { ?limit: Integer, ?after: String, ?before: String, ?status: String, ?type: String, ?start_date: String, ?end_date: String }
205
+ type webhooks_list_query = { ?limit: Integer, ?after: String, ?before: String }
206
+ type webhooks_parked_list_query = { ?limit: Integer }
207
+ type webhooks_update_request = { ?endpoint: String, ?events: Array[String], ?status: String }
208
+ end
209
+
210
+ module ClientResources
211
+ attr_reader emails: Resources::Emails
212
+ attr_reader batch: Resources::Batch
213
+ attr_reader domains: Resources::Domains
214
+ attr_reader webhooks: Resources::Webhooks
215
+ attr_reader suppressions: Resources::Suppressions
216
+ attr_reader contacts: Resources::Contacts
217
+ attr_reader segments: Resources::Segments
218
+ attr_reader broadcasts: Resources::Broadcasts
219
+
220
+ private
221
+
222
+ def init_resources: (HttpClient http) -> void
223
+ end
224
+
225
+ module Resources
226
+ class Emails
227
+ attr_reader events: EmailsEvents
228
+ attr_reader shares: EmailsShares
229
+ attr_reader attachments: EmailsAttachments
230
+ attr_reader receiving: EmailsReceiving
231
+ def initialize: (HttpClient http) -> void
232
+ def send: (Types::send_email_request body, ?idempotency_key: String?, ?timeout: Numeric?) -> Response[Types::send_email_response]
233
+ def get: (String email_id, ?timeout: Numeric?) -> Response[Types::email]
234
+ def list: (?query: Types::emails_list_query?, ?timeout: Numeric?) -> Response[Types::email_list]
235
+ def list_all: (?query: Types::emails_list_query?, ?timeout: Numeric?) -> Enumerator[Types::email, void]
236
+ def update: (String email_id, Types::update_email_options body, ?timeout: Numeric?) -> Response[Types::email_ref]
237
+ def cancel: (String email_id, ?timeout: Numeric?) -> Response[Types::email_ref]
238
+ def share: (String email_id, ?Types::share_email_options? body, ?timeout: Numeric?) -> Response[Types::share_email_response]
239
+ def metrics: (?query: Types::emails_metrics_query?, ?timeout: Numeric?) -> Response[Types::get_emails_metrics_response]
240
+ def diagnose: (String email_id, ?timeout: Numeric?) -> Response[Types::ai_diagnosis]
241
+ end
242
+
243
+ class EmailsEvents
244
+ def initialize: (HttpClient http) -> void
245
+ def list: (String email_id, ?timeout: Numeric?) -> Response[Types::email_event_list]
246
+ end
247
+
248
+ class EmailsShares
249
+ def initialize: (HttpClient http) -> void
250
+ def list: (String email_id, ?query: Types::emails_shares_list_query?, ?timeout: Numeric?) -> Response[Types::email_share_list]
251
+ def list_all: (String email_id, ?query: Types::emails_shares_list_query?, ?timeout: Numeric?) -> Enumerator[Types::email_share, void]
252
+ def remove: (String email_id, String share_id, ?timeout: Numeric?) -> Response[Types::delete_email_share_response]
253
+ end
254
+
255
+ class EmailsAttachments
256
+ def initialize: (HttpClient http) -> void
257
+ def list: (String email_id, ?query: Types::emails_attachments_list_query?, ?timeout: Numeric?) -> Response[Types::attachment_list]
258
+ def list_all: (String email_id, ?query: Types::emails_attachments_list_query?, ?timeout: Numeric?) -> Enumerator[Types::attachment_list_item, void]
259
+ def get: (String email_id, String attachment_id, ?timeout: Numeric?) -> Response[Types::retrieved_attachment]
260
+ end
261
+
262
+ class EmailsReceiving
263
+ attr_reader attachments: EmailsReceivingAttachments
264
+ def initialize: (HttpClient http) -> void
265
+ def list: (?query: Types::emails_receiving_list_query?, ?timeout: Numeric?) -> Response[Types::list_received_emails_response]
266
+ def list_all: (?query: Types::emails_receiving_list_query?, ?timeout: Numeric?) -> Enumerator[Types::received_email_list_item, void]
267
+ def get: (String email_id, ?timeout: Numeric?) -> Response[Types::get_received_email_response]
268
+ def remove: (String email_id, ?timeout: Numeric?) -> Response[Types::delete_received_email_response]
269
+ end
270
+
271
+ class EmailsReceivingAttachments
272
+ def initialize: (HttpClient http) -> void
273
+ def list: (String email_id, ?query: Types::emails_receiving_attachments_list_query?, ?timeout: Numeric?) -> Response[Types::list_attachments_response]
274
+ def list_all: (String email_id, ?query: Types::emails_receiving_attachments_list_query?, ?timeout: Numeric?) -> Enumerator[Types::received_attachment_list_item, void]
275
+ def get: (String email_id, String attachment_id, ?timeout: Numeric?) -> Response[Types::received_attachment]
276
+ end
277
+
278
+ class Batch
279
+ def initialize: (HttpClient http) -> void
280
+ def send: (Array[Types::send_email_request] body, ?idempotency_key: String?, ?timeout: Numeric?) -> Response[Types::create_batch_emails_response]
281
+ end
282
+
283
+ class Domains
284
+ attr_reader claims: DomainsClaims
285
+ def initialize: (HttpClient http) -> void
286
+ def create: (Types::domains_create_request body, ?timeout: Numeric?) -> Response[Types::create_domain_response]
287
+ def get: (String domain_id, ?timeout: Numeric?) -> Response[Types::domain]
288
+ def list: (?query: Types::domains_list_query?, ?timeout: Numeric?) -> Response[Types::domain_list]
289
+ def list_all: (?query: Types::domains_list_query?, ?timeout: Numeric?) -> Enumerator[Types::list_domains_item, void]
290
+ def update: (String domain_id, Types::domains_update_request body, ?timeout: Numeric?) -> Response[Types::domain_ref]
291
+ def remove: (String domain_id, ?timeout: Numeric?) -> Response[Types::delete_domain_response]
292
+ def verify: (String domain_id, ?timeout: Numeric?) -> Response[Types::verify_domain_response]
293
+ def records: (String domain_id, ?timeout: Numeric?) -> Response[Types::domain_records]
294
+ def regenerate_dkim: (String domain_id, Types::domains_regenerate_dkim_request body, ?timeout: Numeric?) -> Response[Types::domain]
295
+ def create_setup_link: (String domain_id, ?timeout: Numeric?) -> Response[Types::domain_setup_link]
296
+ def send_setup_link: (String domain_id, Types::domains_send_setup_link_request body, ?timeout: Numeric?) -> Response[Types::domain_setup_link_sent]
297
+ def autoconfigure: (String domain_id, Types::domains_autoconfigure_request body, ?timeout: Numeric?) -> Response[Types::autoconfigure_response]
298
+ def upload_logo: (String domain_id, Types::domains_upload_logo_request body, ?timeout: Numeric?) -> Response[Types::domain_brand_logo]
299
+ def remove_logo: (String domain_id, ?timeout: Numeric?) -> Response[Types::delete_domain_brand_logo_response]
300
+ def get_certificate: (String domain_id, ?timeout: Numeric?) -> Response[Types::domain_brand_certificate]
301
+ def request_certificate: (String domain_id, Types::domains_request_certificate_request body, ?timeout: Numeric?) -> Response[Types::domain_brand_certificate]
302
+ def install_certificate: (String domain_id, Types::domains_install_certificate_request body, ?timeout: Numeric?) -> Response[Types::domain_brand_certificate]
303
+ def remove_certificate: (String domain_id, ?timeout: Numeric?) -> Response[Types::delete_domain_brand_certificate_response]
304
+ def remove_autoconfigure_credential: (String domain_id, ?timeout: Numeric?) -> Response[Types::delete_credential_response]
305
+ end
306
+
307
+ class DomainsClaims
308
+ def initialize: (HttpClient http) -> void
309
+ def create: (Types::domains_claims_create_request body, ?timeout: Numeric?) -> Response[Types::domain_claim]
310
+ def get: (String domain_id, ?timeout: Numeric?) -> Response[Types::domain_claim]
311
+ def verify: (String domain_id, ?timeout: Numeric?) -> Response[Types::domain_claim]
312
+ end
313
+
314
+ class Webhooks
315
+ attr_reader events: WebhooksEvents
316
+ attr_reader attempts: WebhooksAttempts
317
+ attr_reader parked: WebhooksParked
318
+ def initialize: (HttpClient http) -> void
319
+ def create: (Types::webhooks_create_request body, ?timeout: Numeric?) -> Response[Types::webhook_secret]
320
+ def get: (String webhook_id, ?timeout: Numeric?) -> Response[Types::webhook_detail]
321
+ def list: (?query: Types::webhooks_list_query?, ?timeout: Numeric?) -> Response[Types::webhook_list]
322
+ def list_all: (?query: Types::webhooks_list_query?, ?timeout: Numeric?) -> Enumerator[Types::webhook_list_item, void]
323
+ def update: (String webhook_id, Types::webhooks_update_request body, ?timeout: Numeric?) -> Response[Types::webhook_ref]
324
+ def remove: (String webhook_id, ?timeout: Numeric?) -> Response[Types::delete_webhook_response]
325
+ def rotate_secret: (String webhook_id, ?timeout: Numeric?) -> Response[Types::webhook_secret]
326
+ def verify: (String raw_body, Hash[untyped, untyped] headers, String secret, ?now: Time?) -> untyped
327
+ end
328
+
329
+ class WebhooksEvents
330
+ def initialize: (HttpClient http) -> void
331
+ def list: (String webhook_id, ?query: Types::webhooks_events_list_query?, ?timeout: Numeric?) -> Response[Types::webhook_event_list]
332
+ def list_all: (String webhook_id, ?query: Types::webhooks_events_list_query?, ?timeout: Numeric?) -> Enumerator[Types::webhook_event_list_item, void]
333
+ def get: (String webhook_id, String event_id, ?timeout: Numeric?) -> Response[Types::webhook_event]
334
+ def replay: (String webhook_id, String event_id, ?timeout: Numeric?) -> Response[Types::webhook_event_ref]
335
+ end
336
+
337
+ class WebhooksAttempts
338
+ def initialize: (HttpClient http) -> void
339
+ def list: (String webhook_id, String event_id, ?timeout: Numeric?) -> Response[Types::webhook_attempt_list]
340
+ end
341
+
342
+ class WebhooksParked
343
+ def initialize: (HttpClient http) -> void
344
+ def list: (String webhook_id, ?query: Types::webhooks_parked_list_query?, ?timeout: Numeric?) -> Response[Types::parked_webhook_event_list]
345
+ def deliver: (String webhook_id, ?timeout: Numeric?) -> Response[Types::parked_delivery]
346
+ end
347
+
348
+ class Suppressions
349
+ attr_reader batch: SuppressionsBatch
350
+ def initialize: (HttpClient http) -> void
351
+ def create: (Types::create_suppression_request body, ?timeout: Numeric?) -> Response[Types::created_suppression]
352
+ def get: (String suppression, ?timeout: Numeric?) -> Response[Types::suppression]
353
+ def list: (?query: Types::suppressions_list_query?, ?timeout: Numeric?) -> Response[Types::suppression_list]
354
+ def list_all: (?query: Types::suppressions_list_query?, ?timeout: Numeric?) -> Enumerator[Types::suppression_list_item, void]
355
+ def remove: (String suppression, ?timeout: Numeric?) -> Response[Types::removed_suppression]
356
+ end
357
+
358
+ class SuppressionsBatch
359
+ def initialize: (HttpClient http) -> void
360
+ def add: (Types::batch_add_suppressions_request body, ?timeout: Numeric?) -> Response[Types::created_suppression_list]
361
+ def remove: (Types::batch_remove_suppressions_request body, ?timeout: Numeric?) -> Response[Types::removed_suppression_list]
362
+ end
363
+
364
+ class Contacts
365
+ attr_reader properties: ContactsProperties
366
+ attr_reader segments: ContactsSegments
367
+ attr_reader topics: ContactsTopics
368
+ attr_reader consent: ContactsConsent
369
+ attr_reader imports: ContactsImports
370
+ attr_reader verifications: ContactsVerifications
371
+ attr_reader sms_consent: ContactsSmsConsent
372
+ def initialize: (HttpClient http) -> void
373
+ def create: (Types::create_contact_options body, ?timeout: Numeric?) -> Response[Types::create_contact_response_success]
374
+ def get: (String contact, ?timeout: Numeric?) -> Response[Types::get_contact_response_success]
375
+ def list: (?query: Types::contacts_list_query?, ?timeout: Numeric?) -> Response[Types::list_contacts_response_success]
376
+ def list_all: (?query: Types::contacts_list_query?, ?timeout: Numeric?) -> Enumerator[Types::list_contacts_item, void]
377
+ def update: (String contact, Types::update_contact_options body, ?timeout: Numeric?) -> Response[Types::update_contact_response_success]
378
+ def remove: (String contact, ?timeout: Numeric?) -> Response[Types::remove_contact_response_success]
379
+ end
380
+
381
+ class ContactsProperties
382
+ def initialize: (HttpClient http) -> void
383
+ def create: (Types::create_contact_property_options body, ?timeout: Numeric?) -> Response[Types::create_contact_property_response_success]
384
+ def get: (String contact_property_id, ?timeout: Numeric?) -> Response[Types::get_contact_property_response_success]
385
+ def list: (?query: Types::contacts_properties_list_query?, ?timeout: Numeric?) -> Response[Types::list_contact_properties_response_success]
386
+ def list_all: (?query: Types::contacts_properties_list_query?, ?timeout: Numeric?) -> Enumerator[Types::list_contact_properties_item, void]
387
+ def update: (String contact_property_id, Types::update_contact_property_options body, ?timeout: Numeric?) -> Response[Types::update_contact_property_response_success]
388
+ def remove: (String contact_property_id, ?timeout: Numeric?) -> Response[Types::remove_contact_property_response_success]
389
+ end
390
+
391
+ class ContactsSegments
392
+ def initialize: (HttpClient http) -> void
393
+ def list: (String contact, ?query: Types::contacts_segments_list_query?, ?timeout: Numeric?) -> Response[Types::list_contact_segments_response_success]
394
+ def list_all: (String contact, ?query: Types::contacts_segments_list_query?, ?timeout: Numeric?) -> Enumerator[Types::list_contact_segments_item, void]
395
+ def add: (String contact, String segment, ?timeout: Numeric?) -> Response[Types::add_contact_to_segment_response_success]
396
+ def remove: (String contact, String segment, ?timeout: Numeric?) -> Response[Types::remove_contact_from_segment_response_success]
397
+ end
398
+
399
+ class ContactsTopics
400
+ def initialize: (HttpClient http) -> void
401
+ def list: (String contact_id, ?query: Types::contacts_topics_list_query?, ?timeout: Numeric?) -> Response[Types::get_contact_topics_response_success]
402
+ def list_all: (String contact_id, ?query: Types::contacts_topics_list_query?, ?timeout: Numeric?) -> Enumerator[Types::get_contact_topics_item, void]
403
+ def update: (String contact_id, Types::update_contact_topics_options body, ?timeout: Numeric?) -> Response[Types::update_contact_topics_response_success]
404
+ end
405
+
406
+ class ContactsConsent
407
+ def initialize: (HttpClient http) -> void
408
+ def list: (String contact_id, ?query: Types::contacts_consent_list_query?, ?timeout: Numeric?) -> Response[Types::list_contact_consent_response_success]
409
+ def list_all: (String contact_id, ?query: Types::contacts_consent_list_query?, ?timeout: Numeric?) -> Enumerator[Types::consent_record, void]
410
+ end
411
+
412
+ class ContactsImports
413
+ def initialize: (HttpClient http) -> void
414
+ def create: (Types::create_contact_import_options body, ?timeout: Numeric?) -> Response[Types::create_contact_import_response_success]
415
+ def list: (?query: Types::contacts_imports_list_query?, ?timeout: Numeric?) -> Response[Types::list_contact_imports_response_success]
416
+ def list_all: (?query: Types::contacts_imports_list_query?, ?timeout: Numeric?) -> Enumerator[Types::contact_import, void]
417
+ def get: (String import_id, ?timeout: Numeric?) -> Response[Types::contact_import]
418
+ end
419
+
420
+ class ContactsVerifications
421
+ def initialize: (HttpClient http) -> void
422
+ def estimate: (Types::contact_verification_target body, ?timeout: Numeric?) -> Response[Types::contact_verification_estimate]
423
+ def create: (Types::contact_verification_target body, ?idempotency_key: String?, ?timeout: Numeric?) -> Response[Types::contact_verification]
424
+ def get: (String verification_id, ?timeout: Numeric?) -> Response[Types::contact_verification]
425
+ def remove_invalid: (String verification_id, ?timeout: Numeric?) -> Response[Types::contact_verification_removal]
426
+ def tag_risky: (String verification_id, ?timeout: Numeric?) -> Response[Types::contact_verification_tag]
427
+ end
428
+
429
+ class ContactsSmsConsent
430
+ def initialize: (HttpClient http) -> void
431
+ def update: (String contact_id, Types::update_contact_sms_consent_options body, ?timeout: Numeric?) -> Response[Types::get_contact_response_success]
432
+ end
433
+
434
+ class Segments
435
+ def initialize: (HttpClient http) -> void
436
+ def create: (Types::create_segment_options body, ?timeout: Numeric?) -> Response[Types::create_segment_response_success]
437
+ def get: (String segment, ?timeout: Numeric?) -> Response[Types::get_segment_response_success]
438
+ def list: (?query: Types::segments_list_query?, ?timeout: Numeric?) -> Response[Types::list_segments_response_success]
439
+ def list_all: (?query: Types::segments_list_query?, ?timeout: Numeric?) -> Enumerator[Types::list_segments_item, void]
440
+ def update: (String segment, Types::update_segment_options body, ?timeout: Numeric?) -> Response[Types::update_segment_response_success]
441
+ def remove: (String segment, ?timeout: Numeric?) -> Response[Types::remove_segment_response_success]
442
+ def contacts: (String segment, ?query: Types::segments_contacts_query?, ?timeout: Numeric?) -> Response[Types::segment_contact_list]
443
+ def contacts_all: (String segment, ?query: Types::segments_contacts_query?, ?timeout: Numeric?) -> Enumerator[Types::list_contacts_item, void]
444
+ def add_contacts: (String segment, Types::segment_contacts_batch_request body, ?timeout: Numeric?) -> Response[Types::segment_contacts_added]
445
+ def remove_contacts: (String segment, Types::segment_contacts_batch_request body, ?timeout: Numeric?) -> Response[Types::segment_contacts_removed]
446
+ def metrics: (String segment, ?timeout: Numeric?) -> Response[Types::segment_metrics]
447
+ def preview: (Types::segment_preview_request body, ?timeout: Numeric?) -> Response[Types::segment_preview]
448
+ end
449
+
450
+ class Broadcasts
451
+ def initialize: (HttpClient http) -> void
452
+ def create: (Types::create_broadcast_options body, ?timeout: Numeric?) -> Response[Types::create_broadcast_response_success]
453
+ def get: (String broadcast_id, ?timeout: Numeric?) -> Response[Types::get_broadcast_response_success]
454
+ def list: (?query: Types::broadcasts_list_query?, ?timeout: Numeric?) -> Response[Types::list_broadcasts_response_success]
455
+ def list_all: (?query: Types::broadcasts_list_query?, ?timeout: Numeric?) -> Enumerator[Types::list_broadcasts_item, void]
456
+ def update: (String broadcast_id, Types::update_broadcast_options body, ?timeout: Numeric?) -> Response[Types::update_broadcast_response_success]
457
+ def remove: (String broadcast_id, ?timeout: Numeric?) -> Response[Types::remove_broadcast_response_success]
458
+ def send: (String broadcast_id, ?Types::send_broadcast_options? body, ?timeout: Numeric?) -> Response[Types::send_broadcast_response_success]
459
+ def cancel: (String broadcast_id, ?timeout: Numeric?) -> Response[Types::cancel_broadcast_response_success]
460
+ def recipients: (String broadcast_id, query: Types::broadcasts_recipients_query, ?timeout: Numeric?) -> Response[Types::list_broadcast_recipients_response_success]
461
+ def recipients_all: (String broadcast_id, ?query: Types::broadcasts_recipients_query?, ?timeout: Numeric?) -> Enumerator[Types::list_broadcast_recipients_item, void]
462
+ def clicked_links: (String broadcast_id, ?query: Types::broadcasts_clicked_links_query?, ?timeout: Numeric?) -> Response[Types::list_broadcast_clicked_links_response_success]
463
+ def clicked_links_all: (String broadcast_id, ?query: Types::broadcasts_clicked_links_query?, ?timeout: Numeric?) -> Enumerator[Types::list_broadcast_clicked_links_item, void]
464
+ def checklist: (String broadcast_id, ?timeout: Numeric?) -> Response[Types::broadcast_compliance]
465
+ def checks: (String broadcast_id, ?timeout: Numeric?) -> Response[Types::email_checks]
466
+ def duplicate: (String broadcast_id, ?timeout: Numeric?) -> Response[Types::duplicate_broadcast_response_success]
467
+ def save_as_template: (String broadcast_id, ?timeout: Numeric?) -> Response[Types::create_template_response_success]
468
+ def send_test: (String broadcast_id, Types::broadcast_test_options body, ?idempotency_key: String?, ?timeout: Numeric?) -> Response[Types::broadcast_test]
469
+ end
470
+ end
471
+ end
472
+
473
+ module Rasket
474
+ module ErrorNames
475
+ INVALID_IDEMPOTENCY_KEY: String
476
+ VALIDATION_ERROR: String
477
+ MISSING_API_KEY: String
478
+ INVALID_API_KEY: String
479
+ RESTRICTED_API_KEY: String
480
+ EMAIL_ABOVE_QUOTA: String
481
+ INVALID_PERMISSION: String
482
+ SUSPENDED_API_KEY: String
483
+ INBOX_NOT_SET_UP: String
484
+ NOT_FOUND: String
485
+ METHOD_NOT_ALLOWED: String
486
+ CONCURRENT_IDEMPOTENT_REQUESTS: String
487
+ INVALID_IDEMPOTENT_REQUEST: String
488
+ RESOURCE_LOCKED: String
489
+ RECEIVING_MX_IN_USE: String
490
+ CONVERSATION_CONFLICT: String
491
+ SITE_MOVED: String
492
+ PRECONDITION_FAILED: String
493
+ INVALID_ATTACHMENT: String
494
+ UNSUPPORTED_DESTINATION: String
495
+ INVALID_PARAMETER: String
496
+ MISSING_REQUIRED_FIELD: String
497
+ MISSING_REQUIRED_PARAMETER: String
498
+ SNOOZE_NEEDS_A_PERSON: String
499
+ DAILY_QUOTA_EXCEEDED: String
500
+ MONTHLY_QUOTA_EXCEEDED: String
501
+ MARKETING_QUOTA_EXCEEDED: String
502
+ SMS_QUOTA_EXCEEDED: String
503
+ RATE_LIMIT_EXCEEDED: String
504
+ APPLICATION_ERROR: String
505
+ NOT_IMPLEMENTED: String
506
+ SERVICE_UNAVAILABLE: String
507
+ end
508
+ end
data/sig/rasket.rbs ADDED
@@ -0,0 +1,119 @@
1
+ # The hand-written half of the gem. sig/rasket/generated.rbs holds the resources and the types.
2
+ module Rasket
3
+ VERSION: String
4
+
5
+ class Error < StandardError
6
+ end
7
+
8
+ class RateLimit
9
+ attr_reader limit: Integer
10
+ attr_reader remaining: Integer
11
+ attr_reader reset_seconds: Integer
12
+ attr_reader retry_after_seconds: Integer?
13
+ def initialize: (limit: Integer, remaining: Integer, reset_seconds: Integer, retry_after_seconds: Integer?) -> void
14
+ end
15
+
16
+ class ValidationIssue
17
+ attr_reader path: String
18
+ attr_reader message: String
19
+ def initialize: (path: String, message: String) -> void
20
+ end
21
+
22
+ class SandboxRefusal
23
+ attr_reader recipient: String
24
+ attr_reader region: String
25
+ attr_reader allowed: Array[String]
26
+ def initialize: (recipient: String, region: String, allowed: Array[String]) -> void
27
+ end
28
+
29
+ class NextStepRefusal
30
+ attr_reader next_step: String
31
+ def initialize: (next_step: String) -> void
32
+ end
33
+
34
+ class EmailCheckResult
35
+ attr_reader code: String
36
+ attr_reader status: String
37
+ attr_reader title: String
38
+ attr_reader message: String
39
+ attr_reader block_id: String?
40
+ def initialize: (code: String, status: String, title: String, message: String, block_id: String?) -> void
41
+ end
42
+
43
+ class ChecksRefusal
44
+ attr_reader checks: Array[EmailCheckResult]
45
+ def initialize: (checks: Array[EmailCheckResult]) -> void
46
+ end
47
+
48
+ type error_details = SandboxRefusal | NextStepRefusal | ChecksRefusal
49
+
50
+ class ApiError < Error
51
+ UNKNOWN_ERROR: String
52
+ attr_reader status_code: Integer
53
+ attr_reader name: String
54
+ attr_reader source: (:server | :client)
55
+ attr_reader code: Integer?
56
+ attr_reader errors: Array[ValidationIssue]?
57
+ attr_reader claimable: bool?
58
+ attr_reader details: error_details?
59
+ attr_reader request_id: String?
60
+ attr_reader rate_limit: RateLimit?
61
+ def initialize: (status_code: Integer, name: String, message: String, source: (:server | :client), ?code: Integer?, ?errors: Array[ValidationIssue]?, ?claimable: bool?, ?details: error_details?, ?request_id: String?, ?rate_limit: RateLimit?) -> void
62
+ end
63
+
64
+ class ConnectionError < Error
65
+ attr_reader reason: (:network | :timeout)
66
+ def initialize: ((:network | :timeout) reason, String message) -> void
67
+ end
68
+
69
+ class WebhookVerificationError < Error
70
+ attr_reader reason: Symbol
71
+ def initialize: (Symbol reason, String message) -> void
72
+ end
73
+
74
+ class Response[T]
75
+ attr_reader body: T
76
+ attr_reader rate_limit: RateLimit?
77
+ attr_reader request_id: String?
78
+ attr_reader idempotent_replayed: bool
79
+ attr_reader etag: String?
80
+ def initialize: (body: T, rate_limit: RateLimit?, request_id: String?, idempotent_replayed: bool, etag: String?) -> void
81
+ end
82
+
83
+ class TransportResponse
84
+ attr_reader status: Integer
85
+ attr_reader headers: Hash[String, String]
86
+ attr_reader body: String
87
+ def initialize: (status: Integer, headers: Hash[String, String], body: String) -> void
88
+ end
89
+
90
+ interface _Transport
91
+ def call: (String method, String url, Hash[String, String] headers, String? body, Float timeout) -> TransportResponse
92
+ end
93
+
94
+ class NetHttpTransport
95
+ include _Transport
96
+ end
97
+
98
+ class HttpClient
99
+ DEFAULT_BASE_URL: String
100
+ MIN_IDEMPOTENCY_KEY: Integer
101
+ MAX_IDEMPOTENCY_KEY: Integer
102
+ def initialize: (api_key: String, ?base_url: String?, ?user_agent: String?, ?timeout: Numeric, ?retry_attempts: Integer, ?retry_min_delay: Numeric, ?retry_max_delay: Numeric, ?transport: _Transport?, ?sleep: ^(Float) -> void | nil, ?random: ^() -> Float | nil) -> void
103
+ def self.utf16_length: (String value) -> Integer
104
+ def self.assert_idempotency_key: (String key) -> void
105
+ def self.segment: (_ToS value) -> String
106
+ def self.paginate: (Hash[Symbol, untyped]? query, String mode) { (Hash[Symbol, untyped]) -> Response[untyped] } -> Enumerator[untyped, void]
107
+ def request: (String method, String path, ?query: Hash[Symbol, untyped]?, ?body: untyped, ?has_body: bool, ?file_fields: Array[String]?, ?idempotent: bool, ?idempotency_key: String?, ?timeout: Numeric?) -> Response[untyped]
108
+ end
109
+
110
+ module Webhooks
111
+ REPLAY_TOLERANCE_SECONDS: Integer
112
+ def self.verify: (String raw_body, Hash[untyped, untyped] headers, String secret, ?now: Time?, ?tolerance_seconds: Integer) -> untyped
113
+ end
114
+
115
+ class Client
116
+ include ClientResources
117
+ def initialize: (api_key: String, ?base_url: String?, ?user_agent: String?, ?timeout: Numeric, ?retry_attempts: Integer, ?retry_min_delay: Numeric, ?retry_max_delay: Numeric, ?transport: _Transport?, ?sleep: ^(Float) -> void | nil, ?random: ^() -> Float | nil) -> void
118
+ end
119
+ end