sentdm 0.44.0 → 0.46.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 +18 -0
- data/README.md +11 -11
- data/lib/sentdm/client.rb +66 -0
- data/lib/sentdm/internal/sender_profiles_page.rb +140 -0
- data/lib/sentdm/internal/type/enum.rb +11 -11
- data/lib/sentdm/models/account.rb +173 -0
- data/lib/sentdm/models/account_channels.rb +39 -0
- data/lib/sentdm/models/account_profile.rb +86 -0
- data/lib/sentdm/models/account_rcs_channel.rb +26 -0
- data/lib/sentdm/models/account_sms_channel.rb +26 -0
- data/lib/sentdm/models/account_whatsapp_channel.rb +35 -0
- data/lib/sentdm/models/api_response_of_account.rb +48 -0
- data/lib/sentdm/models/api_response_of_cancelled_message.rb +43 -0
- data/lib/sentdm/models/api_response_of_channels_state.rb +48 -0
- data/lib/sentdm/models/api_response_of_compliance_requirements.rb +47 -0
- data/lib/sentdm/models/api_response_of_contacts_list.rb +42 -0
- data/lib/sentdm/models/api_response_of_message.rb +51 -0
- data/lib/sentdm/models/api_response_of_message_activities.rb +43 -0
- data/lib/sentdm/models/api_response_of_number_lookup_result.rb +43 -0
- data/lib/sentdm/models/api_response_of_profile_completion_accepted.rb +47 -0
- data/lib/sentdm/models/api_response_of_profile_completion_result.rb +47 -0
- data/lib/sentdm/models/api_response_of_profiles_list.rb +43 -0
- data/lib/sentdm/models/api_response_of_sender_profile.rb +54 -0
- data/lib/sentdm/models/api_response_of_sender_profiles_list.rb +42 -0
- data/lib/sentdm/models/api_response_of_templates_list.rb +42 -0
- data/lib/sentdm/models/api_response_of_users_list.rb +43 -0
- data/lib/sentdm/models/api_response_of_webhook_event_types_list.rb +43 -0
- data/lib/sentdm/models/api_response_of_webhook_events_list.rb +42 -0
- data/lib/sentdm/models/{webhook_rotate_secret_response.rb → api_response_of_webhook_secret.rb} +4 -17
- data/lib/sentdm/models/{webhook_test_response.rb → api_response_of_webhook_test.rb} +4 -23
- data/lib/sentdm/models/api_response_of_webhooks_list.rb +42 -0
- data/lib/sentdm/models/billing_contact.rb +35 -0
- data/lib/sentdm/models/brand_business.rb +96 -0
- data/lib/sentdm/models/brand_business_info.rb +3 -20
- data/lib/sentdm/models/brand_compliance.rb +75 -0
- data/lib/sentdm/models/brand_contact.rb +56 -0
- data/lib/sentdm/models/brand_with_kyc.rb +129 -0
- data/lib/sentdm/models/cancelled_message.rb +28 -0
- data/lib/sentdm/models/channel_event_payload.rb +3 -114
- data/lib/sentdm/models/channel_list_params.rb +20 -0
- data/lib/sentdm/models/channel_score.rb +35 -0
- data/lib/sentdm/models/channels/api_response_of_list_of_sms_market.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_rcs_agent.rb +60 -0
- data/lib/sentdm/models/channels/api_response_of_sms_market.rb +54 -0
- data/lib/sentdm/models/channels/api_response_of_whatsapp_channel.rb +47 -0
- data/lib/sentdm/models/channels/market_compliance.rb +409 -0
- data/lib/sentdm/models/channels/rc_create_params.rb +260 -0
- data/lib/sentdm/models/channels/rcs_address.rb +43 -0
- data/lib/sentdm/models/channels/rcs_agent.rb +278 -0
- data/lib/sentdm/models/channels/sms_create_params.rb +173 -0
- data/lib/sentdm/models/channels/sms_list_params.rb +22 -0
- data/lib/sentdm/models/channels/sms_market.rb +158 -0
- data/lib/sentdm/models/channels/sms_number.rb +41 -0
- data/lib/sentdm/models/channels/sms_number_request.rb +33 -0
- data/lib/sentdm/models/channels/sms_retrieve_params.rb +34 -0
- data/lib/sentdm/models/channels/sms_update_params.rb +64 -0
- data/lib/sentdm/models/channels/supplied_compliance.rb +89 -0
- data/lib/sentdm/models/channels/supplied_document.rb +35 -0
- data/lib/sentdm/models/channels/whatsapp_channel.rb +109 -0
- data/lib/sentdm/models/channels/whatsapp_create_params.rb +65 -0
- data/lib/sentdm/models/channels_state.rb +89 -0
- data/lib/sentdm/models/compliance_attachment_template.rb +36 -0
- data/lib/sentdm/models/compliance_requirement.rb +112 -0
- data/lib/sentdm/models/compliance_requirements.rb +98 -0
- data/lib/sentdm/models/compliance_retrieve_requirements_params.rb +52 -0
- data/lib/sentdm/models/compliance_setup_step.rb +78 -0
- data/lib/sentdm/models/contact_message_summary.rb +3 -34
- data/lib/sentdm/models/contacts_list.rb +26 -0
- data/lib/sentdm/models/conversation_messages_list.rb +3 -430
- data/lib/sentdm/models/entity_type.rb +18 -0
- data/lib/sentdm/models/inbound_media.rb +53 -0
- data/lib/sentdm/models/inbound_message_event_payload.rb +3 -53
- data/lib/sentdm/models/link_event.rb +79 -0
- data/lib/sentdm/models/link_event_payload.rb +211 -0
- data/lib/sentdm/models/message.rb +168 -0
- data/lib/sentdm/models/message_activities.rb +34 -0
- data/lib/sentdm/models/message_activity.rb +105 -0
- data/lib/sentdm/models/message_body.rb +79 -0
- data/lib/sentdm/models/message_button.rb +33 -0
- data/lib/sentdm/models/message_cancel_params.rb +32 -0
- data/lib/sentdm/models/message_channel_options.rb +43 -0
- data/lib/sentdm/models/message_event_payload.rb +3 -2
- data/lib/sentdm/models/message_header_media.rb +31 -0
- data/lib/sentdm/models/message_media.rb +74 -0
- data/lib/sentdm/models/message_recipient.rb +46 -0
- data/lib/sentdm/models/message_send_params.rb +6 -90
- data/lib/sentdm/models/message_send_response.rb +3 -95
- data/lib/sentdm/models/message_send_result.rb +55 -0
- data/lib/sentdm/models/message_status_event.rb +54 -0
- data/lib/sentdm/models/mms_market.rb +48 -0
- data/lib/sentdm/models/number_lookup_result.rb +63 -0
- data/lib/sentdm/models/pagination_cursors.rb +27 -0
- data/lib/sentdm/models/pagination_meta.rb +3 -27
- data/lib/sentdm/models/profile_completion_accepted.rb +20 -0
- data/lib/sentdm/models/profile_completion_result.rb +31 -0
- data/lib/sentdm/models/profile_detail.rb +6 -408
- data/lib/sentdm/models/profiles/brand_campaign.rb +3 -15
- data/lib/sentdm/models/profiles_list.rb +26 -0
- data/lib/sentdm/models/sender_profile.rb +138 -0
- data/lib/sentdm/models/sender_profile_billing.rb +21 -0
- data/lib/sentdm/models/sender_profile_billing_request.rb +33 -0
- data/lib/sentdm/models/sender_profile_channels.rb +90 -0
- data/lib/sentdm/models/sender_profile_create_params.rb +116 -0
- data/lib/sentdm/models/sender_profile_delete_params.rb +20 -0
- data/lib/sentdm/models/sender_profile_list_params.rb +30 -0
- data/lib/sentdm/models/sender_profile_rcs.rb +209 -0
- data/lib/sentdm/models/sender_profile_retrieve_params.rb +20 -0
- data/lib/sentdm/models/sender_profile_sms.rb +106 -0
- data/lib/sentdm/models/sender_profile_update_params.rb +71 -0
- data/lib/sentdm/models/sender_profile_whatsapp.rb +61 -0
- data/lib/sentdm/models/sender_profiles_list.rb +26 -0
- data/lib/sentdm/models/tcr_brand_identity_status.rb +17 -0
- data/lib/sentdm/models/tcr_brand_status.rb +16 -0
- data/lib/sentdm/models/tcr_campaign_status.rb +16 -0
- data/lib/sentdm/models/template_body.rb +3 -70
- data/lib/sentdm/models/template_create_params.rb +11 -1
- data/lib/sentdm/models/template_header.rb +3 -37
- data/lib/sentdm/models/template_header_location.rb +38 -0
- data/lib/sentdm/models/template_media_item.rb +34 -0
- data/lib/sentdm/models/template_mms_body_content.rb +49 -0
- data/lib/sentdm/models/template_ref.rb +51 -0
- data/lib/sentdm/models/template_variable.rb +3 -64
- data/lib/sentdm/models/template_variable_props.rb +65 -0
- data/lib/sentdm/models/templates_list.rb +26 -0
- data/lib/sentdm/models/users_list.rb +26 -0
- data/lib/sentdm/models/voice/call.rb +3 -54
- data/lib/sentdm/models/voice/call_leg.rb +58 -0
- data/lib/sentdm/models/webhook_create_params.rb +3 -25
- data/lib/sentdm/models/webhook_delivery.rb +160 -0
- data/lib/sentdm/models/webhook_event_types_list.rb +26 -0
- data/lib/sentdm/models/webhook_events_list.rb +26 -0
- data/lib/sentdm/models/webhook_response.rb +3 -28
- data/lib/sentdm/models/webhook_secret.rb +15 -0
- data/lib/sentdm/models/webhook_sender_profile.rb +29 -0
- data/lib/sentdm/models/webhook_sender_profile_config.rb +27 -0
- data/lib/sentdm/models/webhook_test.rb +21 -0
- data/lib/sentdm/models/webhook_update_params.rb +3 -25
- data/lib/sentdm/models/webhooks_list.rb +26 -0
- data/lib/sentdm/models.rb +188 -0
- data/lib/sentdm/resources/channels/rcs.rb +177 -0
- data/lib/sentdm/resources/channels/sms.rb +417 -0
- data/lib/sentdm/resources/channels/whatsapp.rb +106 -0
- data/lib/sentdm/resources/channels.rb +162 -0
- data/lib/sentdm/resources/compliance.rb +127 -0
- data/lib/sentdm/resources/conversations.rb +4 -4
- data/lib/sentdm/resources/me.rb +2 -2
- data/lib/sentdm/resources/messages.rb +73 -7
- data/lib/sentdm/resources/numbers.rb +2 -2
- data/lib/sentdm/resources/profiles.rb +4 -4
- data/lib/sentdm/resources/sender_profiles.rb +463 -0
- data/lib/sentdm/resources/templates.rb +5 -3
- data/lib/sentdm/resources/users.rb +2 -2
- data/lib/sentdm/resources/webhooks.rb +10 -10
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +120 -11
- data/rbi/sentdm/client.rbi +64 -0
- data/rbi/sentdm/internal/sender_profiles_page.rbi +122 -0
- data/rbi/sentdm/models/account.rbi +242 -0
- data/rbi/sentdm/models/account_channels.rbi +66 -0
- data/rbi/sentdm/models/account_profile.rbi +116 -0
- data/rbi/sentdm/models/account_rcs_channel.rbi +45 -0
- data/rbi/sentdm/models/account_sms_channel.rbi +45 -0
- data/rbi/sentdm/models/account_whatsapp_channel.rbi +58 -0
- data/rbi/sentdm/models/api_response_of_account.rbi +78 -0
- data/rbi/sentdm/models/{webhook_rotate_secret_response.rbi → api_response_of_cancelled_message.rbi} +6 -41
- data/rbi/sentdm/models/api_response_of_channels_state.rbi +78 -0
- data/rbi/sentdm/models/api_response_of_compliance_requirements.rbi +81 -0
- data/rbi/sentdm/models/api_response_of_contacts_list.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_message.rbi +84 -0
- data/rbi/sentdm/models/api_response_of_message_activities.rbi +77 -0
- data/rbi/sentdm/models/{webhook_test_response.rbi → api_response_of_number_lookup_result.rbi} +9 -43
- data/rbi/sentdm/models/api_response_of_profile_completion_accepted.rbi +83 -0
- data/rbi/sentdm/models/{profile_complete_response.rbi → api_response_of_profile_completion_result.rbi} +6 -52
- data/rbi/sentdm/models/api_response_of_profiles_list.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_sender_profile.rbi +90 -0
- data/rbi/sentdm/models/api_response_of_sender_profiles_list.rbi +77 -0
- data/rbi/sentdm/models/api_response_of_templates_list.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_users_list.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_webhook_event_types_list.rbi +79 -0
- data/rbi/sentdm/models/api_response_of_webhook_events_list.rbi +77 -0
- data/rbi/sentdm/models/api_response_of_webhook_secret.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_webhook_test.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_webhooks_list.rbi +74 -0
- data/rbi/sentdm/models/billing_contact.rbi +49 -0
- data/rbi/sentdm/models/brand_business.rbi +115 -0
- data/rbi/sentdm/models/brand_business_info.rbi +3 -49
- data/rbi/sentdm/models/brand_compliance.rbi +108 -0
- data/rbi/sentdm/models/brand_contact.rbi +78 -0
- data/rbi/sentdm/models/brand_with_kyc.rbi +167 -0
- data/rbi/sentdm/models/cancelled_message.rbi +37 -0
- data/rbi/sentdm/models/channel_event_payload.rbi +4 -204
- data/rbi/sentdm/models/channel_list_params.rbi +38 -0
- data/rbi/sentdm/models/channel_score.rbi +56 -0
- data/rbi/sentdm/models/channels/api_response_of_list_of_sms_market.rbi +76 -0
- data/rbi/sentdm/models/channels/api_response_of_rcs_agent.rbi +103 -0
- data/rbi/sentdm/models/channels/api_response_of_sms_market.rbi +93 -0
- data/rbi/sentdm/models/channels/api_response_of_whatsapp_channel.rbi +85 -0
- data/rbi/sentdm/models/channels/market_compliance.rbi +770 -0
- data/rbi/sentdm/models/channels/rc_create_params.rbi +397 -0
- data/rbi/sentdm/models/channels/rcs_address.rbi +62 -0
- data/rbi/sentdm/models/channels/rcs_agent.rbi +320 -0
- data/rbi/sentdm/models/channels/sms_create_params.rbi +291 -0
- data/rbi/sentdm/models/channels/sms_list_params.rbi +40 -0
- data/rbi/sentdm/models/channels/sms_market.rbi +247 -0
- data/rbi/sentdm/models/channels/sms_number.rbi +60 -0
- data/rbi/sentdm/models/channels/sms_number_request.rbi +48 -0
- data/rbi/sentdm/models/channels/sms_retrieve_params.rbi +56 -0
- data/rbi/sentdm/models/channels/sms_update_params.rbi +93 -0
- data/rbi/sentdm/models/channels/supplied_compliance.rbi +140 -0
- data/rbi/sentdm/models/channels/supplied_document.rbi +57 -0
- data/rbi/sentdm/models/channels/whatsapp_channel.rbi +172 -0
- data/rbi/sentdm/models/channels/whatsapp_create_params.rbi +104 -0
- data/rbi/sentdm/models/channels_state.rbi +151 -0
- data/rbi/sentdm/models/compliance_attachment_template.rbi +56 -0
- data/rbi/sentdm/models/compliance_requirement.rbi +149 -0
- data/rbi/sentdm/models/compliance_requirements.rbi +165 -0
- data/rbi/sentdm/models/compliance_retrieve_requirements_params.rbi +79 -0
- data/rbi/sentdm/models/compliance_setup_step.rbi +115 -0
- data/rbi/sentdm/models/contact_message_summary.rbi +4 -69
- data/rbi/sentdm/models/contacts_list.rbi +50 -0
- data/rbi/sentdm/models/conversation_messages_list.rbi +4 -669
- data/rbi/sentdm/models/entity_type.rbi +23 -0
- data/rbi/sentdm/models/inbound_media.rbi +76 -0
- data/rbi/sentdm/models/inbound_message_event_payload.rbi +3 -85
- data/rbi/sentdm/models/link_event.rbi +128 -0
- data/rbi/sentdm/models/link_event_payload.rbi +279 -0
- data/rbi/sentdm/models/message.rbi +214 -0
- data/rbi/sentdm/models/message_activities.rbi +63 -0
- data/rbi/sentdm/models/message_activity.rbi +145 -0
- data/rbi/sentdm/models/message_body.rbi +104 -0
- data/rbi/sentdm/models/message_button.rbi +52 -0
- data/rbi/sentdm/models/message_cancel_params.rbi +59 -0
- data/rbi/sentdm/models/message_channel_options.rbi +65 -0
- data/rbi/sentdm/models/message_event_payload.rbi +4 -2
- data/rbi/sentdm/models/message_header_media.rbi +44 -0
- data/rbi/sentdm/models/message_media.rbi +95 -0
- data/rbi/sentdm/models/message_recipient.rbi +70 -0
- data/rbi/sentdm/models/message_send_params.rbi +7 -155
- data/rbi/sentdm/models/message_send_response.rbi +4 -163
- data/rbi/sentdm/models/message_send_result.rbi +85 -0
- data/rbi/sentdm/models/message_status_event.rbi +70 -0
- data/rbi/sentdm/models/mms_market.rbi +66 -0
- data/rbi/sentdm/models/number_lookup_result.rbi +89 -0
- data/rbi/sentdm/models/pagination_cursors.rbi +42 -0
- data/rbi/sentdm/models/pagination_meta.rbi +4 -43
- data/rbi/sentdm/models/profile_completion_accepted.rbi +33 -0
- data/rbi/sentdm/models/profile_completion_result.rbi +43 -0
- data/rbi/sentdm/models/profile_detail.rbi +8 -621
- data/rbi/sentdm/models/profiles/brand_campaign.rbi +3 -45
- data/rbi/sentdm/models/profiles_list.rbi +50 -0
- data/rbi/sentdm/models/sender_profile.rbi +204 -0
- data/rbi/sentdm/models/sender_profile_billing.rbi +34 -0
- data/rbi/sentdm/models/sender_profile_billing_request.rbi +46 -0
- data/rbi/sentdm/models/sender_profile_channels.rbi +163 -0
- data/rbi/sentdm/models/sender_profile_create_params.rbi +190 -0
- data/rbi/sentdm/models/sender_profile_delete_params.rbi +35 -0
- data/rbi/sentdm/models/sender_profile_list_params.rbi +57 -0
- data/rbi/sentdm/models/sender_profile_rcs.rbi +211 -0
- data/rbi/sentdm/models/sender_profile_retrieve_params.rbi +35 -0
- data/rbi/sentdm/models/sender_profile_sms.rbi +156 -0
- data/rbi/sentdm/models/sender_profile_update_params.rbi +96 -0
- data/rbi/sentdm/models/sender_profile_whatsapp.rbi +83 -0
- data/rbi/sentdm/models/sender_profiles_list.rbi +54 -0
- data/rbi/sentdm/models/tcr_brand_identity_status.rbi +27 -0
- data/rbi/sentdm/models/tcr_brand_status.rbi +20 -0
- data/rbi/sentdm/models/tcr_campaign_status.rbi +23 -0
- data/rbi/sentdm/models/template_body.rbi +6 -114
- data/rbi/sentdm/models/template_create_params.rbi +12 -0
- data/rbi/sentdm/models/template_header.rbi +4 -53
- data/rbi/sentdm/models/template_header_location.rbi +47 -0
- data/rbi/sentdm/models/template_media_item.rbi +51 -0
- data/rbi/sentdm/models/template_mms_body_content.rbi +73 -0
- data/rbi/sentdm/models/template_ref.rbi +79 -0
- data/rbi/sentdm/models/template_variable.rbi +4 -80
- data/rbi/sentdm/models/template_variable_props.rbi +81 -0
- data/rbi/sentdm/models/templates_list.rbi +50 -0
- data/rbi/sentdm/models/users_list.rbi +50 -0
- data/rbi/sentdm/models/voice/call.rbi +3 -86
- data/rbi/sentdm/models/voice/call_leg.rbi +90 -0
- data/rbi/sentdm/models/webhook_create_params.rbi +4 -49
- data/rbi/sentdm/models/webhook_delivery.rbi +211 -0
- data/rbi/sentdm/models/webhook_event_types_list.rbi +54 -0
- data/rbi/sentdm/models/webhook_events_list.rbi +52 -0
- data/rbi/sentdm/models/webhook_response.rbi +4 -50
- data/rbi/sentdm/models/webhook_secret.rbi +24 -0
- data/rbi/sentdm/models/webhook_sender_profile.rbi +46 -0
- data/rbi/sentdm/models/webhook_sender_profile_config.rbi +44 -0
- data/rbi/sentdm/models/webhook_test.rbi +32 -0
- data/rbi/sentdm/models/webhook_update_params.rbi +4 -49
- data/rbi/sentdm/models/webhooks_list.rbi +50 -0
- data/rbi/sentdm/models.rbi +197 -0
- data/rbi/sentdm/resources/channels/rcs.rbi +208 -0
- data/rbi/sentdm/resources/channels/sms.rbi +437 -0
- data/rbi/sentdm/resources/channels/whatsapp.rbi +108 -0
- data/rbi/sentdm/resources/channels.rbi +149 -0
- data/rbi/sentdm/resources/compliance.rbi +121 -0
- data/rbi/sentdm/resources/conversations.rbi +2 -10
- data/rbi/sentdm/resources/me.rbi +1 -1
- data/rbi/sentdm/resources/messages.rbi +66 -8
- data/rbi/sentdm/resources/numbers.rbi +1 -1
- data/rbi/sentdm/resources/profiles.rbi +2 -2
- data/rbi/sentdm/resources/sender_profiles.rbi +461 -0
- data/rbi/sentdm/resources/templates.rbi +7 -2
- data/rbi/sentdm/resources/users.rbi +1 -1
- data/rbi/sentdm/resources/webhooks.rbi +6 -12
- data/sig/sentdm/client.rbs +4 -0
- data/sig/sentdm/internal/sender_profiles_page.rbs +80 -0
- data/sig/sentdm/models/account.rbs +111 -0
- data/sig/sentdm/models/account_channels.rbs +38 -0
- data/sig/sentdm/models/account_profile.rbs +68 -0
- data/sig/sentdm/models/account_rcs_channel.rbs +17 -0
- data/sig/sentdm/models/account_sms_channel.rbs +17 -0
- data/sig/sentdm/models/account_whatsapp_channel.rbs +28 -0
- data/sig/sentdm/models/api_response_of_account.rbs +39 -0
- data/sig/sentdm/models/api_response_of_cancelled_message.rbs +39 -0
- data/sig/sentdm/models/api_response_of_channels_state.rbs +39 -0
- data/sig/sentdm/models/api_response_of_compliance_requirements.rbs +39 -0
- data/sig/sentdm/models/api_response_of_contacts_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_message.rbs +39 -0
- data/sig/sentdm/models/api_response_of_message_activities.rbs +39 -0
- data/sig/sentdm/models/api_response_of_number_lookup_result.rbs +39 -0
- data/sig/sentdm/models/api_response_of_profile_completion_accepted.rbs +39 -0
- data/sig/sentdm/models/api_response_of_profile_completion_result.rbs +39 -0
- data/sig/sentdm/models/api_response_of_profiles_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_sender_profile.rbs +39 -0
- data/sig/sentdm/models/api_response_of_sender_profiles_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_templates_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_users_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_webhook_event_types_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_webhook_events_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_webhook_secret.rbs +39 -0
- data/sig/sentdm/models/api_response_of_webhook_test.rbs +39 -0
- data/sig/sentdm/models/api_response_of_webhooks_list.rbs +39 -0
- data/sig/sentdm/models/billing_contact.rbs +30 -0
- data/sig/sentdm/models/brand_business.rbs +70 -0
- data/sig/sentdm/models/brand_business_info.rbs +4 -23
- data/sig/sentdm/models/brand_compliance.rbs +56 -0
- data/sig/sentdm/models/brand_contact.rbs +47 -0
- data/sig/sentdm/models/brand_with_kyc.rbs +93 -0
- data/sig/sentdm/models/cancelled_message.rbs +15 -0
- data/sig/sentdm/models/channel_event_payload.rbs +4 -56
- data/sig/sentdm/models/channel_list_params.rbs +25 -0
- data/sig/sentdm/models/channel_score.rbs +32 -0
- data/sig/sentdm/models/channels/api_response_of_list_of_sms_market.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_rcs_agent.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_sms_market.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_whatsapp_channel.rbs +43 -0
- data/sig/sentdm/models/channels/market_compliance.rbs +338 -0
- data/sig/sentdm/models/channels/rc_create_params.rbs +242 -0
- data/sig/sentdm/models/channels/rcs_address.rbs +42 -0
- data/sig/sentdm/models/channels/rcs_agent.rbs +181 -0
- data/sig/sentdm/models/channels/sms_create_params.rbs +116 -0
- data/sig/sentdm/models/channels/sms_list_params.rbs +27 -0
- data/sig/sentdm/models/channels/sms_market.rbs +85 -0
- data/sig/sentdm/models/channels/sms_number.rbs +28 -0
- data/sig/sentdm/models/channels/sms_number_request.rbs +17 -0
- data/sig/sentdm/models/channels/sms_retrieve_params.rbs +36 -0
- data/sig/sentdm/models/channels/sms_update_params.rbs +63 -0
- data/sig/sentdm/models/channels/supplied_compliance.rbs +32 -0
- data/sig/sentdm/models/channels/supplied_document.rbs +30 -0
- data/sig/sentdm/models/channels/whatsapp_channel.rbs +78 -0
- data/sig/sentdm/models/channels/whatsapp_create_params.rbs +56 -0
- data/sig/sentdm/models/channels_state.rbs +55 -0
- data/sig/sentdm/models/compliance_attachment_template.rbs +26 -0
- data/sig/sentdm/models/compliance_requirement.rbs +76 -0
- data/sig/sentdm/models/compliance_requirements.rbs +66 -0
- data/sig/sentdm/models/compliance_retrieve_requirements_params.rbs +43 -0
- data/sig/sentdm/models/compliance_setup_step.rbs +62 -0
- data/sig/sentdm/models/contact_message_summary.rbs +6 -35
- data/sig/sentdm/models/contacts_list.rbs +31 -0
- data/sig/sentdm/models/conversation_messages_list.rbs +5 -312
- data/sig/sentdm/models/entity_type.rbs +22 -0
- data/sig/sentdm/models/inbound_media.rbs +35 -0
- data/sig/sentdm/models/inbound_message_event_payload.rbs +4 -36
- data/sig/sentdm/models/link_event.rbs +44 -0
- data/sig/sentdm/models/link_event_payload.rbs +106 -0
- data/sig/sentdm/models/message.rbs +130 -0
- data/sig/sentdm/models/message_activities.rbs +38 -0
- data/sig/sentdm/models/message_activity.rbs +66 -0
- data/sig/sentdm/models/message_body.rbs +52 -0
- data/sig/sentdm/models/message_button.rbs +34 -0
- data/sig/sentdm/models/message_cancel_params.rbs +38 -0
- data/sig/sentdm/models/message_channel_options.rbs +26 -0
- data/sig/sentdm/models/message_header_media.rbs +19 -0
- data/sig/sentdm/models/message_media.rbs +40 -0
- data/sig/sentdm/models/message_recipient.rbs +34 -0
- data/sig/sentdm/models/message_send_params.rbs +8 -54
- data/sig/sentdm/models/message_send_response.rbs +4 -77
- data/sig/sentdm/models/message_send_result.rbs +45 -0
- data/sig/sentdm/models/message_status_event.rbs +40 -0
- data/sig/sentdm/models/mms_market.rbs +35 -0
- data/sig/sentdm/models/number_lookup_result.rbs +64 -0
- data/sig/sentdm/models/pagination_cursors.rbs +15 -0
- data/sig/sentdm/models/pagination_meta.rbs +4 -16
- data/sig/sentdm/models/profile_completion_accepted.rbs +15 -0
- data/sig/sentdm/models/profile_completion_result.rbs +19 -0
- data/sig/sentdm/models/profile_detail.rbs +8 -315
- data/sig/sentdm/models/profiles/brand_campaign.rbs +4 -16
- data/sig/sentdm/models/profiles_list.rbs +31 -0
- data/sig/sentdm/models/sender_profile.rbs +76 -0
- data/sig/sentdm/models/sender_profile_billing.rbs +15 -0
- data/sig/sentdm/models/sender_profile_billing_request.rbs +15 -0
- data/sig/sentdm/models/sender_profile_channels.rbs +30 -0
- data/sig/sentdm/models/sender_profile_create_params.rbs +78 -0
- data/sig/sentdm/models/sender_profile_delete_params.rbs +20 -0
- data/sig/sentdm/models/sender_profile_list_params.rbs +32 -0
- data/sig/sentdm/models/sender_profile_rcs.rbs +150 -0
- data/sig/sentdm/models/sender_profile_retrieve_params.rbs +20 -0
- data/sig/sentdm/models/sender_profile_sms.rbs +40 -0
- data/sig/sentdm/models/sender_profile_update_params.rbs +62 -0
- data/sig/sentdm/models/sender_profile_whatsapp.rbs +16 -0
- data/sig/sentdm/models/sender_profiles_list.rbs +31 -0
- data/sig/sentdm/models/tcr_brand_identity_status.rbs +17 -0
- data/sig/sentdm/models/tcr_brand_status.rbs +15 -0
- data/sig/sentdm/models/tcr_campaign_status.rbs +15 -0
- data/sig/sentdm/models/template_body.rbs +4 -43
- data/sig/sentdm/models/template_create_params.rbs +5 -0
- data/sig/sentdm/models/template_header.rbs +4 -31
- data/sig/sentdm/models/template_header_location.rbs +30 -0
- data/sig/sentdm/models/template_media_item.rbs +17 -0
- data/sig/sentdm/models/template_mms_body_content.rbs +28 -0
- data/sig/sentdm/models/template_ref.rbs +26 -0
- data/sig/sentdm/models/template_variable.rbs +4 -51
- data/sig/sentdm/models/template_variable_props.rbs +50 -0
- data/sig/sentdm/models/templates_list.rbs +29 -0
- data/sig/sentdm/models/users_list.rbs +31 -0
- data/sig/sentdm/models/voice/call.rbs +4 -49
- data/sig/sentdm/models/voice/call_leg.rbs +50 -0
- data/sig/sentdm/models/webhook_create_params.rbs +4 -28
- data/sig/sentdm/models/webhook_delivery.rbs +99 -0
- data/sig/sentdm/models/webhook_event_types_list.rbs +31 -0
- data/sig/sentdm/models/webhook_events_list.rbs +31 -0
- data/sig/sentdm/models/webhook_response.rbs +4 -28
- data/sig/sentdm/models/webhook_secret.rbs +15 -0
- data/sig/sentdm/models/webhook_sender_profile.rbs +27 -0
- data/sig/sentdm/models/webhook_sender_profile_config.rbs +27 -0
- data/sig/sentdm/models/webhook_test.rbs +19 -0
- data/sig/sentdm/models/webhook_update_params.rbs +4 -28
- data/sig/sentdm/models/webhooks_list.rbs +31 -0
- data/sig/sentdm/models.rbs +188 -0
- data/sig/sentdm/resources/channels/rcs.rbs +41 -0
- data/sig/sentdm/resources/channels/sms.rbs +44 -0
- data/sig/sentdm/resources/channels/whatsapp.rbs +18 -0
- data/sig/sentdm/resources/channels.rbs +11 -0
- data/sig/sentdm/resources/compliance.rbs +15 -0
- data/sig/sentdm/resources/conversations.rbs +2 -2
- data/sig/sentdm/resources/me.rbs +1 -1
- data/sig/sentdm/resources/messages.rbs +12 -4
- data/sig/sentdm/resources/numbers.rbs +1 -1
- data/sig/sentdm/resources/profiles.rbs +2 -2
- data/sig/sentdm/resources/sender_profiles.rbs +44 -0
- data/sig/sentdm/resources/templates.rbs +1 -0
- data/sig/sentdm/resources/users.rbs +1 -1
- data/sig/sentdm/resources/webhooks.rbs +6 -6
- metadata +362 -35
- data/lib/sentdm/models/me_retrieve_response.rb +0 -409
- data/lib/sentdm/models/message_retrieve_activities_response.rb +0 -175
- data/lib/sentdm/models/message_retrieve_status_response.rb +0 -477
- data/lib/sentdm/models/number_lookup_response.rb +0 -104
- data/lib/sentdm/models/profile_complete_response.rb +0 -74
- data/lib/sentdm/models/profile_list_response.rb +0 -65
- data/lib/sentdm/models/user_list_response.rb +0 -65
- data/lib/sentdm/models/webhook_list_event_types_response.rb +0 -65
- data/lib/sentdm/models/webhook_list_events_response.rb +0 -445
- data/rbi/sentdm/models/me_retrieve_response.rbi +0 -705
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +0 -319
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +0 -765
- data/rbi/sentdm/models/number_lookup_response.rbi +0 -166
- data/rbi/sentdm/models/profile_list_response.rbi +0 -128
- data/rbi/sentdm/models/user_list_response.rbi +0 -128
- data/rbi/sentdm/models/webhook_list_event_types_response.rbi +0 -142
- data/rbi/sentdm/models/webhook_list_events_response.rbi +0 -647
- data/sig/sentdm/models/me_retrieve_response.rbs +0 -306
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +0 -137
- data/sig/sentdm/models/message_retrieve_status_response.rbs +0 -341
- data/sig/sentdm/models/number_lookup_response.rbs +0 -100
- data/sig/sentdm/models/profile_complete_response.rbs +0 -55
- data/sig/sentdm/models/profile_list_response.rbs +0 -67
- data/sig/sentdm/models/user_list_response.rbs +0 -67
- data/sig/sentdm/models/webhook_list_event_types_response.rbs +0 -67
- data/sig/sentdm/models/webhook_list_events_response.rbs +0 -243
- data/sig/sentdm/models/webhook_rotate_secret_response.rbs +0 -51
- data/sig/sentdm/models/webhook_test_response.rbs +0 -55
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
module EntityType
|
|
6
|
+
extend Sentdm::Internal::Type::Enum
|
|
7
|
+
|
|
8
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Sentdm::EntityType) }
|
|
9
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
10
|
+
|
|
11
|
+
PRIVATE_PROFIT = T.let(:PRIVATE_PROFIT, Sentdm::EntityType::TaggedSymbol)
|
|
12
|
+
PUBLIC_PROFIT = T.let(:PUBLIC_PROFIT, Sentdm::EntityType::TaggedSymbol)
|
|
13
|
+
NON_PROFIT = T.let(:NON_PROFIT, Sentdm::EntityType::TaggedSymbol)
|
|
14
|
+
SOLE_PROPRIETOR =
|
|
15
|
+
T.let(:SOLE_PROPRIETOR, Sentdm::EntityType::TaggedSymbol)
|
|
16
|
+
GOVERNMENT = T.let(:GOVERNMENT, Sentdm::EntityType::TaggedSymbol)
|
|
17
|
+
|
|
18
|
+
sig { override.returns(T::Array[Sentdm::EntityType::TaggedSymbol]) }
|
|
19
|
+
def self.values
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class InboundMedia < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Sentdm::InboundMedia, Sentdm::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
# SHA-256 of the file as the carrier declared it, when it declares one. Verify
|
|
10
|
+
# what you download against this — sent.dm never reads the bytes, so it is the
|
|
11
|
+
# only integrity signal available.
|
|
12
|
+
sig { returns(T.nilable(String)) }
|
|
13
|
+
attr_accessor :hash_sha256
|
|
14
|
+
|
|
15
|
+
# Content type as the carrier reported it, for example image/jpeg.
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_accessor :mime_type
|
|
18
|
+
|
|
19
|
+
# Size in bytes as the carrier declared it. Absent when it declared none.
|
|
20
|
+
sig { returns(T.nilable(Integer)) }
|
|
21
|
+
attr_accessor :size_bytes
|
|
22
|
+
|
|
23
|
+
# Where the carrier hosts the attachment.
|
|
24
|
+
#
|
|
25
|
+
# This link expires and is not authenticated. sent.dm relays it rather than
|
|
26
|
+
# copying the file, so how long it stays fetchable is the carrier's decision and
|
|
27
|
+
# differs between them — assume days, not months. Anyone holding the URL can fetch
|
|
28
|
+
# it until it lapses. Copy the file on receipt if you need it to outlive that
|
|
29
|
+
# window; do not store this URL as a permanent reference.
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_accessor :url
|
|
32
|
+
|
|
33
|
+
# One attachment on an inbound message.
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
hash_sha256: T.nilable(String),
|
|
37
|
+
mime_type: T.nilable(String),
|
|
38
|
+
size_bytes: T.nilable(Integer),
|
|
39
|
+
url: T.nilable(String)
|
|
40
|
+
).returns(T.attached_class)
|
|
41
|
+
end
|
|
42
|
+
def self.new(
|
|
43
|
+
# SHA-256 of the file as the carrier declared it, when it declares one. Verify
|
|
44
|
+
# what you download against this — sent.dm never reads the bytes, so it is the
|
|
45
|
+
# only integrity signal available.
|
|
46
|
+
hash_sha256: nil,
|
|
47
|
+
# Content type as the carrier reported it, for example image/jpeg.
|
|
48
|
+
mime_type: nil,
|
|
49
|
+
# Size in bytes as the carrier declared it. Absent when it declared none.
|
|
50
|
+
size_bytes: nil,
|
|
51
|
+
# Where the carrier hosts the attachment.
|
|
52
|
+
#
|
|
53
|
+
# This link expires and is not authenticated. sent.dm relays it rather than
|
|
54
|
+
# copying the file, so how long it stays fetchable is the carrier's decision and
|
|
55
|
+
# differs between them — assume days, not months. Anyone holding the URL can fetch
|
|
56
|
+
# it until it lapses. Copy the file on receipt if you need it to outlive that
|
|
57
|
+
# window; do not store this URL as a permanent reference.
|
|
58
|
+
url: nil
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
override.returns(
|
|
64
|
+
{
|
|
65
|
+
hash_sha256: T.nilable(String),
|
|
66
|
+
mime_type: T.nilable(String),
|
|
67
|
+
size_bytes: T.nilable(Integer),
|
|
68
|
+
url: T.nilable(String)
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
def to_hash
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -40,9 +40,7 @@ module Sentdm
|
|
|
40
40
|
# /v3/messages/{id} returns the same stored link, not a fresh one, so once it
|
|
41
41
|
# lapses the entry remains with whatever the carrier declared about the file but
|
|
42
42
|
# the file is no longer reachable.
|
|
43
|
-
sig
|
|
44
|
-
returns(T.nilable(T::Array[Sentdm::InboundMessageEventPayload::Media]))
|
|
45
|
-
end
|
|
43
|
+
sig { returns(T.nilable(T::Array[Sentdm::InboundMedia])) }
|
|
46
44
|
attr_accessor :media
|
|
47
45
|
|
|
48
46
|
# The inbound message.
|
|
@@ -93,10 +91,7 @@ module Sentdm
|
|
|
93
91
|
received_at: String,
|
|
94
92
|
account_id: String,
|
|
95
93
|
channel: String,
|
|
96
|
-
media:
|
|
97
|
-
T.nilable(
|
|
98
|
-
T::Array[Sentdm::InboundMessageEventPayload::Media::OrHash]
|
|
99
|
-
),
|
|
94
|
+
media: T.nilable(T::Array[Sentdm::InboundMedia::OrHash]),
|
|
100
95
|
message_id: String,
|
|
101
96
|
outbound_number: String,
|
|
102
97
|
referral: T.nilable(T.anything),
|
|
@@ -155,8 +150,7 @@ module Sentdm
|
|
|
155
150
|
received_at: String,
|
|
156
151
|
account_id: String,
|
|
157
152
|
channel: String,
|
|
158
|
-
media:
|
|
159
|
-
T.nilable(T::Array[Sentdm::InboundMessageEventPayload::Media]),
|
|
153
|
+
media: T.nilable(T::Array[Sentdm::InboundMedia]),
|
|
160
154
|
message_id: String,
|
|
161
155
|
outbound_number: String,
|
|
162
156
|
referral: T.nilable(T.anything),
|
|
@@ -167,82 +161,6 @@ module Sentdm
|
|
|
167
161
|
end
|
|
168
162
|
def to_hash
|
|
169
163
|
end
|
|
170
|
-
|
|
171
|
-
class Media < Sentdm::Internal::Type::BaseModel
|
|
172
|
-
OrHash =
|
|
173
|
-
T.type_alias do
|
|
174
|
-
T.any(
|
|
175
|
-
Sentdm::InboundMessageEventPayload::Media,
|
|
176
|
-
Sentdm::Internal::AnyHash
|
|
177
|
-
)
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
# SHA-256 of the file as the carrier declared it, when it declares one. Verify
|
|
181
|
-
# what you download against this — sent.dm never reads the bytes, so it is the
|
|
182
|
-
# only integrity signal available.
|
|
183
|
-
sig { returns(T.nilable(String)) }
|
|
184
|
-
attr_accessor :hash_sha256
|
|
185
|
-
|
|
186
|
-
# Content type as the carrier reported it, for example image/jpeg.
|
|
187
|
-
sig { returns(T.nilable(String)) }
|
|
188
|
-
attr_accessor :mime_type
|
|
189
|
-
|
|
190
|
-
# Size in bytes as the carrier declared it. Absent when it declared none.
|
|
191
|
-
sig { returns(T.nilable(Integer)) }
|
|
192
|
-
attr_accessor :size_bytes
|
|
193
|
-
|
|
194
|
-
# Where the carrier hosts the attachment.
|
|
195
|
-
#
|
|
196
|
-
# This link expires and is not authenticated. sent.dm relays it rather than
|
|
197
|
-
# copying the file, so how long it stays fetchable is the carrier's decision and
|
|
198
|
-
# differs between them — assume days, not months. Anyone holding the URL can fetch
|
|
199
|
-
# it until it lapses. Copy the file on receipt if you need it to outlive that
|
|
200
|
-
# window; do not store this URL as a permanent reference.
|
|
201
|
-
sig { returns(T.nilable(String)) }
|
|
202
|
-
attr_accessor :url
|
|
203
|
-
|
|
204
|
-
# One attachment on an inbound message.
|
|
205
|
-
sig do
|
|
206
|
-
params(
|
|
207
|
-
hash_sha256: T.nilable(String),
|
|
208
|
-
mime_type: T.nilable(String),
|
|
209
|
-
size_bytes: T.nilable(Integer),
|
|
210
|
-
url: T.nilable(String)
|
|
211
|
-
).returns(T.attached_class)
|
|
212
|
-
end
|
|
213
|
-
def self.new(
|
|
214
|
-
# SHA-256 of the file as the carrier declared it, when it declares one. Verify
|
|
215
|
-
# what you download against this — sent.dm never reads the bytes, so it is the
|
|
216
|
-
# only integrity signal available.
|
|
217
|
-
hash_sha256: nil,
|
|
218
|
-
# Content type as the carrier reported it, for example image/jpeg.
|
|
219
|
-
mime_type: nil,
|
|
220
|
-
# Size in bytes as the carrier declared it. Absent when it declared none.
|
|
221
|
-
size_bytes: nil,
|
|
222
|
-
# Where the carrier hosts the attachment.
|
|
223
|
-
#
|
|
224
|
-
# This link expires and is not authenticated. sent.dm relays it rather than
|
|
225
|
-
# copying the file, so how long it stays fetchable is the carrier's decision and
|
|
226
|
-
# differs between them — assume days, not months. Anyone holding the URL can fetch
|
|
227
|
-
# it until it lapses. Copy the file on receipt if you need it to outlive that
|
|
228
|
-
# window; do not store this URL as a permanent reference.
|
|
229
|
-
url: nil
|
|
230
|
-
)
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
sig do
|
|
234
|
-
override.returns(
|
|
235
|
-
{
|
|
236
|
-
hash_sha256: T.nilable(String),
|
|
237
|
-
mime_type: T.nilable(String),
|
|
238
|
-
size_bytes: T.nilable(Integer),
|
|
239
|
-
url: T.nilable(String)
|
|
240
|
-
}
|
|
241
|
-
)
|
|
242
|
-
end
|
|
243
|
-
def to_hash
|
|
244
|
-
end
|
|
245
|
-
end
|
|
246
164
|
end
|
|
247
165
|
end
|
|
248
166
|
end
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class LinkEvent < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Sentdm::LinkEvent, Sentdm::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
# The specific event within the family, for example message.delivered,
|
|
10
|
+
# message.received or contact.opt_out. Absent on events that have no subtype, so
|
|
11
|
+
# treat it as optional.
|
|
12
|
+
sig { returns(T.nilable(String)) }
|
|
13
|
+
attr_accessor :event
|
|
14
|
+
|
|
15
|
+
# The event family, for example message, templates or contact. Route on this
|
|
16
|
+
# first, then on event for the specific change.
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_reader :field
|
|
19
|
+
|
|
20
|
+
sig { params(field: String).void }
|
|
21
|
+
attr_writer :field
|
|
22
|
+
|
|
23
|
+
# Body of a link event: something happened to a tracked link Sent published on the
|
|
24
|
+
# customer's behalf. A link points either at a URL the customer supplied or at a
|
|
25
|
+
# file Sent hosts for them; LinkKind says which. Delivered when an eligible
|
|
26
|
+
# request is served, or when a published link reaches the end of its life.
|
|
27
|
+
#
|
|
28
|
+
# A click is a request, not a read receipt. link.clicked means the redirect was
|
|
29
|
+
# served; link.downloaded means bytes went out. Neither proves a person saw
|
|
30
|
+
# anything — messaging providers and link scanners fetch URLs on their own, which
|
|
31
|
+
# is what TrafficClass exists to tell apart. Filter on it before reporting a
|
|
32
|
+
# click-through rate; treat likely_human as a hint, never as delivery
|
|
33
|
+
# confirmation.
|
|
34
|
+
#
|
|
35
|
+
# RecordId identifies the link; the X-Webhook-Event-ID header identifies the
|
|
36
|
+
# delivery. One link is hit many times, so those are the two keys a subscriber
|
|
37
|
+
# needs: group by the first, deduplicate on the second — exactly as on every other
|
|
38
|
+
# family. The payload carries no event identifier of its own, for the same reason
|
|
39
|
+
# none of the others do.
|
|
40
|
+
#
|
|
41
|
+
# Nothing here identifies the visitor. No IP address and no visitor token crosses
|
|
42
|
+
# this boundary. Country, Device and Browser are coarse buckets derived at the
|
|
43
|
+
# edge and are absent whenever the request did not supply enough to derive them.
|
|
44
|
+
sig { returns(T.nilable(Sentdm::LinkEventPayload)) }
|
|
45
|
+
attr_reader :payload
|
|
46
|
+
|
|
47
|
+
sig { params(payload: T.nilable(Sentdm::LinkEventPayload::OrHash)).void }
|
|
48
|
+
attr_writer :payload
|
|
49
|
+
|
|
50
|
+
# The event-specific body.
|
|
51
|
+
sig { returns(T.nilable(String)) }
|
|
52
|
+
attr_accessor :request_id
|
|
53
|
+
|
|
54
|
+
# When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
55
|
+
# time, not the time the underlying change happened. Use the timestamp inside the
|
|
56
|
+
# payload for the latter.
|
|
57
|
+
sig { returns(T.nilable(String)) }
|
|
58
|
+
attr_reader :timestamp
|
|
59
|
+
|
|
60
|
+
sig { params(timestamp: String).void }
|
|
61
|
+
attr_writer :timestamp
|
|
62
|
+
|
|
63
|
+
# The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
64
|
+
# this shape and varies only in Payload.
|
|
65
|
+
sig do
|
|
66
|
+
params(
|
|
67
|
+
event: T.nilable(String),
|
|
68
|
+
field: String,
|
|
69
|
+
payload: T.nilable(Sentdm::LinkEventPayload::OrHash),
|
|
70
|
+
request_id: T.nilable(String),
|
|
71
|
+
timestamp: String
|
|
72
|
+
).returns(T.attached_class)
|
|
73
|
+
end
|
|
74
|
+
def self.new(
|
|
75
|
+
# The specific event within the family, for example message.delivered,
|
|
76
|
+
# message.received or contact.opt_out. Absent on events that have no subtype, so
|
|
77
|
+
# treat it as optional.
|
|
78
|
+
event: nil,
|
|
79
|
+
# The event family, for example message, templates or contact. Route on this
|
|
80
|
+
# first, then on event for the specific change.
|
|
81
|
+
field: nil,
|
|
82
|
+
# Body of a link event: something happened to a tracked link Sent published on the
|
|
83
|
+
# customer's behalf. A link points either at a URL the customer supplied or at a
|
|
84
|
+
# file Sent hosts for them; LinkKind says which. Delivered when an eligible
|
|
85
|
+
# request is served, or when a published link reaches the end of its life.
|
|
86
|
+
#
|
|
87
|
+
# A click is a request, not a read receipt. link.clicked means the redirect was
|
|
88
|
+
# served; link.downloaded means bytes went out. Neither proves a person saw
|
|
89
|
+
# anything — messaging providers and link scanners fetch URLs on their own, which
|
|
90
|
+
# is what TrafficClass exists to tell apart. Filter on it before reporting a
|
|
91
|
+
# click-through rate; treat likely_human as a hint, never as delivery
|
|
92
|
+
# confirmation.
|
|
93
|
+
#
|
|
94
|
+
# RecordId identifies the link; the X-Webhook-Event-ID header identifies the
|
|
95
|
+
# delivery. One link is hit many times, so those are the two keys a subscriber
|
|
96
|
+
# needs: group by the first, deduplicate on the second — exactly as on every other
|
|
97
|
+
# family. The payload carries no event identifier of its own, for the same reason
|
|
98
|
+
# none of the others do.
|
|
99
|
+
#
|
|
100
|
+
# Nothing here identifies the visitor. No IP address and no visitor token crosses
|
|
101
|
+
# this boundary. Country, Device and Browser are coarse buckets derived at the
|
|
102
|
+
# edge and are absent whenever the request did not supply enough to derive them.
|
|
103
|
+
payload: nil,
|
|
104
|
+
# The event-specific body.
|
|
105
|
+
request_id: nil,
|
|
106
|
+
# When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
107
|
+
# time, not the time the underlying change happened. Use the timestamp inside the
|
|
108
|
+
# payload for the latter.
|
|
109
|
+
timestamp: nil
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
sig do
|
|
114
|
+
override.returns(
|
|
115
|
+
{
|
|
116
|
+
event: T.nilable(String),
|
|
117
|
+
field: String,
|
|
118
|
+
payload: T.nilable(Sentdm::LinkEventPayload),
|
|
119
|
+
request_id: T.nilable(String),
|
|
120
|
+
timestamp: String
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
def to_hash
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class LinkEventPayload < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Sentdm::LinkEventPayload, Sentdm::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# The link's public identifier — the eight-character code in the short URL, for
|
|
12
|
+
# example A78B2BU0. Unique across both kinds, and never reused, so it is the
|
|
13
|
+
# stable key to group one link's events by.
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :record_id
|
|
16
|
+
|
|
17
|
+
# Where the request appeared to come from, as an ISO 3166-1 alpha-2 code. Named
|
|
18
|
+
# separately from the country on a channel event, which is a destination market
|
|
19
|
+
# the customer registered for — this one is a property of a single visitor and is
|
|
20
|
+
# absent when the edge could not resolve it.
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_accessor :access_country
|
|
23
|
+
|
|
24
|
+
# How the request was served, when the edge recorded it. Free text describing the
|
|
25
|
+
# outcome — show it to a human rather than branching on it.
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_accessor :access_outcome
|
|
28
|
+
|
|
29
|
+
# The requesting browser family, for example chrome or safari, or unknown. Derived
|
|
30
|
+
# from the user agent.
|
|
31
|
+
sig { returns(T.nilable(String)) }
|
|
32
|
+
attr_accessor :browser
|
|
33
|
+
|
|
34
|
+
# How many bytes were served, for a file access. A ranged request reports the
|
|
35
|
+
# bytes in that range, not the size of the file, so several accesses of one file
|
|
36
|
+
# can each report a part.
|
|
37
|
+
sig { returns(T.nilable(Integer)) }
|
|
38
|
+
attr_accessor :bytes_served
|
|
39
|
+
|
|
40
|
+
# The channel the message carrying this link went out on: sms, whatsapp, or rcs.
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_accessor :channel
|
|
43
|
+
|
|
44
|
+
# The organization the link belongs to. Always the parent account, never a sender
|
|
45
|
+
# profile — read SenderProfileId for that.
|
|
46
|
+
#
|
|
47
|
+
# This family publishes the owner as an explicit pair rather than the single
|
|
48
|
+
# account_id the other families use. The pair says which organization and which
|
|
49
|
+
# profile without the subscriber deriving either, which is the trade: one more key
|
|
50
|
+
# against not having to know that account_id silently becomes the profile when one
|
|
51
|
+
# exists.
|
|
52
|
+
sig { returns(T.nilable(String)) }
|
|
53
|
+
attr_reader :customer_id
|
|
54
|
+
|
|
55
|
+
sig { params(customer_id: String).void }
|
|
56
|
+
attr_writer :customer_id
|
|
57
|
+
|
|
58
|
+
# The requesting device class: mobile, tablet, desktop or unknown. Derived from
|
|
59
|
+
# the user agent.
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
attr_accessor :device
|
|
62
|
+
|
|
63
|
+
# What the link points at: url for a destination the customer supplied, file for
|
|
64
|
+
# media Sent hosts. Always present, and implied by the event — link.clicked is
|
|
65
|
+
# always url and link.downloaded always file — but published as its own field so a
|
|
66
|
+
# subscriber can branch on the kind without parsing the event name, the same
|
|
67
|
+
# separation the channel family keeps between its event and its status.
|
|
68
|
+
sig { returns(T.nilable(String)) }
|
|
69
|
+
attr_reader :link_kind
|
|
70
|
+
|
|
71
|
+
sig { params(link_kind: String).void }
|
|
72
|
+
attr_writer :link_kind
|
|
73
|
+
|
|
74
|
+
# The message the link was published in.
|
|
75
|
+
#
|
|
76
|
+
# The event can arrive before the message is readable through GET /v3/messages: a
|
|
77
|
+
# provider may fetch a link within milliseconds of the send, and nothing here
|
|
78
|
+
# waits for the message row. Retry the read rather than treating an unknown id as
|
|
79
|
+
# an error.
|
|
80
|
+
sig { returns(T.nilable(String)) }
|
|
81
|
+
attr_accessor :message_id
|
|
82
|
+
|
|
83
|
+
# When the access or lifecycle change actually happened, in UTC
|
|
84
|
+
# (yyyy-MM-ddTHH:mm:ssZ). The envelope's timestamp is when Sent emitted the event;
|
|
85
|
+
# this is when the thing occurred, and the two differ by the ingest delay.
|
|
86
|
+
sig { returns(T.nilable(String)) }
|
|
87
|
+
attr_reader :occurred_at
|
|
88
|
+
|
|
89
|
+
sig { params(occurred_at: String).void }
|
|
90
|
+
attr_writer :occurred_at
|
|
91
|
+
|
|
92
|
+
# The caller-supplied label tying this link back to a position in the message, for
|
|
93
|
+
# example body:0 for the first link in the body. Present when the link was created
|
|
94
|
+
# with one.
|
|
95
|
+
sig { returns(T.nilable(String)) }
|
|
96
|
+
attr_accessor :reference_key
|
|
97
|
+
|
|
98
|
+
# The host of the page that linked here, when the request supplied one. The host
|
|
99
|
+
# only — never a full referring URL.
|
|
100
|
+
sig { returns(T.nilable(String)) }
|
|
101
|
+
attr_accessor :referrer_host
|
|
102
|
+
|
|
103
|
+
# The HTTP method of the request that was served, for an access event. Omitted on
|
|
104
|
+
# link.expired and link.revoked, which describe no request.
|
|
105
|
+
sig { returns(T.nilable(String)) }
|
|
106
|
+
attr_accessor :request_method
|
|
107
|
+
|
|
108
|
+
# The sender profile that owns the link, or null when the organization owns it
|
|
109
|
+
# directly. Always on the wire so a handler reads one shape rather than branching
|
|
110
|
+
# on whether the key arrived.
|
|
111
|
+
#
|
|
112
|
+
# sender_profile_id, not profile_id: the API already publishes
|
|
113
|
+
# messaging_profile_id and sending_phone_number_profile_id for provider-side
|
|
114
|
+
# profiles, which are a different thing entirely. The unqualified name would read
|
|
115
|
+
# as one of those.
|
|
116
|
+
sig { returns(T.nilable(String)) }
|
|
117
|
+
attr_accessor :sender_profile_id
|
|
118
|
+
|
|
119
|
+
# The HTTP status Sent answered the request with: 302 for a link, 200 or 206 for a
|
|
120
|
+
# file. Omitted on lifecycle events.
|
|
121
|
+
sig { returns(T.nilable(Integer)) }
|
|
122
|
+
attr_accessor :status_code
|
|
123
|
+
|
|
124
|
+
# A coarse guess at what made the request: likely_human, provider (a messaging
|
|
125
|
+
# platform prefetching the link), bot, or unknown. Derived from the user agent, so
|
|
126
|
+
# it is a hint for filtering noise rather than a fact to bill or report on.
|
|
127
|
+
sig { returns(T.nilable(String)) }
|
|
128
|
+
attr_accessor :traffic_class
|
|
129
|
+
|
|
130
|
+
# Body of a link event: something happened to a tracked link Sent published on the
|
|
131
|
+
# customer's behalf. A link points either at a URL the customer supplied or at a
|
|
132
|
+
# file Sent hosts for them; LinkKind says which. Delivered when an eligible
|
|
133
|
+
# request is served, or when a published link reaches the end of its life.
|
|
134
|
+
#
|
|
135
|
+
# A click is a request, not a read receipt. link.clicked means the redirect was
|
|
136
|
+
# served; link.downloaded means bytes went out. Neither proves a person saw
|
|
137
|
+
# anything — messaging providers and link scanners fetch URLs on their own, which
|
|
138
|
+
# is what TrafficClass exists to tell apart. Filter on it before reporting a
|
|
139
|
+
# click-through rate; treat likely_human as a hint, never as delivery
|
|
140
|
+
# confirmation.
|
|
141
|
+
#
|
|
142
|
+
# RecordId identifies the link; the X-Webhook-Event-ID header identifies the
|
|
143
|
+
# delivery. One link is hit many times, so those are the two keys a subscriber
|
|
144
|
+
# needs: group by the first, deduplicate on the second — exactly as on every other
|
|
145
|
+
# family. The payload carries no event identifier of its own, for the same reason
|
|
146
|
+
# none of the others do.
|
|
147
|
+
#
|
|
148
|
+
# Nothing here identifies the visitor. No IP address and no visitor token crosses
|
|
149
|
+
# this boundary. Country, Device and Browser are coarse buckets derived at the
|
|
150
|
+
# edge and are absent whenever the request did not supply enough to derive them.
|
|
151
|
+
sig do
|
|
152
|
+
params(
|
|
153
|
+
record_id: String,
|
|
154
|
+
access_country: T.nilable(String),
|
|
155
|
+
access_outcome: T.nilable(String),
|
|
156
|
+
browser: T.nilable(String),
|
|
157
|
+
bytes_served: T.nilable(Integer),
|
|
158
|
+
channel: T.nilable(String),
|
|
159
|
+
customer_id: String,
|
|
160
|
+
device: T.nilable(String),
|
|
161
|
+
link_kind: String,
|
|
162
|
+
message_id: T.nilable(String),
|
|
163
|
+
occurred_at: String,
|
|
164
|
+
reference_key: T.nilable(String),
|
|
165
|
+
referrer_host: T.nilable(String),
|
|
166
|
+
request_method: T.nilable(String),
|
|
167
|
+
sender_profile_id: T.nilable(String),
|
|
168
|
+
status_code: T.nilable(Integer),
|
|
169
|
+
traffic_class: T.nilable(String)
|
|
170
|
+
).returns(T.attached_class)
|
|
171
|
+
end
|
|
172
|
+
def self.new(
|
|
173
|
+
# The link's public identifier — the eight-character code in the short URL, for
|
|
174
|
+
# example A78B2BU0. Unique across both kinds, and never reused, so it is the
|
|
175
|
+
# stable key to group one link's events by.
|
|
176
|
+
record_id:,
|
|
177
|
+
# Where the request appeared to come from, as an ISO 3166-1 alpha-2 code. Named
|
|
178
|
+
# separately from the country on a channel event, which is a destination market
|
|
179
|
+
# the customer registered for — this one is a property of a single visitor and is
|
|
180
|
+
# absent when the edge could not resolve it.
|
|
181
|
+
access_country: nil,
|
|
182
|
+
# How the request was served, when the edge recorded it. Free text describing the
|
|
183
|
+
# outcome — show it to a human rather than branching on it.
|
|
184
|
+
access_outcome: nil,
|
|
185
|
+
# The requesting browser family, for example chrome or safari, or unknown. Derived
|
|
186
|
+
# from the user agent.
|
|
187
|
+
browser: nil,
|
|
188
|
+
# How many bytes were served, for a file access. A ranged request reports the
|
|
189
|
+
# bytes in that range, not the size of the file, so several accesses of one file
|
|
190
|
+
# can each report a part.
|
|
191
|
+
bytes_served: nil,
|
|
192
|
+
# The channel the message carrying this link went out on: sms, whatsapp, or rcs.
|
|
193
|
+
channel: nil,
|
|
194
|
+
# The organization the link belongs to. Always the parent account, never a sender
|
|
195
|
+
# profile — read SenderProfileId for that.
|
|
196
|
+
#
|
|
197
|
+
# This family publishes the owner as an explicit pair rather than the single
|
|
198
|
+
# account_id the other families use. The pair says which organization and which
|
|
199
|
+
# profile without the subscriber deriving either, which is the trade: one more key
|
|
200
|
+
# against not having to know that account_id silently becomes the profile when one
|
|
201
|
+
# exists.
|
|
202
|
+
customer_id: nil,
|
|
203
|
+
# The requesting device class: mobile, tablet, desktop or unknown. Derived from
|
|
204
|
+
# the user agent.
|
|
205
|
+
device: nil,
|
|
206
|
+
# What the link points at: url for a destination the customer supplied, file for
|
|
207
|
+
# media Sent hosts. Always present, and implied by the event — link.clicked is
|
|
208
|
+
# always url and link.downloaded always file — but published as its own field so a
|
|
209
|
+
# subscriber can branch on the kind without parsing the event name, the same
|
|
210
|
+
# separation the channel family keeps between its event and its status.
|
|
211
|
+
link_kind: nil,
|
|
212
|
+
# The message the link was published in.
|
|
213
|
+
#
|
|
214
|
+
# The event can arrive before the message is readable through GET /v3/messages: a
|
|
215
|
+
# provider may fetch a link within milliseconds of the send, and nothing here
|
|
216
|
+
# waits for the message row. Retry the read rather than treating an unknown id as
|
|
217
|
+
# an error.
|
|
218
|
+
message_id: nil,
|
|
219
|
+
# When the access or lifecycle change actually happened, in UTC
|
|
220
|
+
# (yyyy-MM-ddTHH:mm:ssZ). The envelope's timestamp is when Sent emitted the event;
|
|
221
|
+
# this is when the thing occurred, and the two differ by the ingest delay.
|
|
222
|
+
occurred_at: nil,
|
|
223
|
+
# The caller-supplied label tying this link back to a position in the message, for
|
|
224
|
+
# example body:0 for the first link in the body. Present when the link was created
|
|
225
|
+
# with one.
|
|
226
|
+
reference_key: nil,
|
|
227
|
+
# The host of the page that linked here, when the request supplied one. The host
|
|
228
|
+
# only — never a full referring URL.
|
|
229
|
+
referrer_host: nil,
|
|
230
|
+
# The HTTP method of the request that was served, for an access event. Omitted on
|
|
231
|
+
# link.expired and link.revoked, which describe no request.
|
|
232
|
+
request_method: nil,
|
|
233
|
+
# The sender profile that owns the link, or null when the organization owns it
|
|
234
|
+
# directly. Always on the wire so a handler reads one shape rather than branching
|
|
235
|
+
# on whether the key arrived.
|
|
236
|
+
#
|
|
237
|
+
# sender_profile_id, not profile_id: the API already publishes
|
|
238
|
+
# messaging_profile_id and sending_phone_number_profile_id for provider-side
|
|
239
|
+
# profiles, which are a different thing entirely. The unqualified name would read
|
|
240
|
+
# as one of those.
|
|
241
|
+
sender_profile_id: nil,
|
|
242
|
+
# The HTTP status Sent answered the request with: 302 for a link, 200 or 206 for a
|
|
243
|
+
# file. Omitted on lifecycle events.
|
|
244
|
+
status_code: nil,
|
|
245
|
+
# A coarse guess at what made the request: likely_human, provider (a messaging
|
|
246
|
+
# platform prefetching the link), bot, or unknown. Derived from the user agent, so
|
|
247
|
+
# it is a hint for filtering noise rather than a fact to bill or report on.
|
|
248
|
+
traffic_class: nil
|
|
249
|
+
)
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
sig do
|
|
253
|
+
override.returns(
|
|
254
|
+
{
|
|
255
|
+
record_id: String,
|
|
256
|
+
access_country: T.nilable(String),
|
|
257
|
+
access_outcome: T.nilable(String),
|
|
258
|
+
browser: T.nilable(String),
|
|
259
|
+
bytes_served: T.nilable(Integer),
|
|
260
|
+
channel: T.nilable(String),
|
|
261
|
+
customer_id: String,
|
|
262
|
+
device: T.nilable(String),
|
|
263
|
+
link_kind: String,
|
|
264
|
+
message_id: T.nilable(String),
|
|
265
|
+
occurred_at: String,
|
|
266
|
+
reference_key: T.nilable(String),
|
|
267
|
+
referrer_host: T.nilable(String),
|
|
268
|
+
request_method: T.nilable(String),
|
|
269
|
+
sender_profile_id: T.nilable(String),
|
|
270
|
+
status_code: T.nilable(Integer),
|
|
271
|
+
traffic_class: T.nilable(String)
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
end
|
|
275
|
+
def to_hash
|
|
276
|
+
end
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
end
|