sentdm 0.1.0 → 0.3.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 +96 -39
- data/lib/sentdm/client.rb +29 -36
- data/lib/sentdm/internal/type/base_model.rb +5 -5
- data/lib/sentdm/internal/type/enum.rb +25 -0
- data/lib/sentdm/models/api_error.rb +42 -0
- data/lib/sentdm/models/api_meta.rb +42 -0
- data/lib/sentdm/models/api_response_brand_with_kyc.rb +43 -0
- data/lib/sentdm/models/api_response_contact.rb +43 -0
- data/lib/sentdm/models/api_response_of_profile_detail.rb +43 -0
- data/lib/sentdm/models/api_response_of_user.rb +43 -0
- data/lib/sentdm/models/api_response_template.rb +43 -0
- data/lib/sentdm/models/api_response_webhook.rb +43 -0
- data/lib/sentdm/models/brand_create_params.rb +41 -0
- data/lib/sentdm/models/brand_data.rb +237 -0
- data/lib/sentdm/models/brand_delete_params.rb +27 -0
- data/lib/sentdm/models/brand_list_params.rb +14 -0
- data/lib/sentdm/models/brand_list_response.rb +43 -0
- data/lib/sentdm/models/brand_update_params.rb +41 -0
- data/lib/sentdm/models/brand_with_kyc.rb +335 -0
- data/lib/sentdm/models/brands/api_response_tcr_campaign_with_use_cases.rb +45 -0
- data/lib/sentdm/models/brands/base_dto.rb +32 -0
- data/lib/sentdm/models/brands/campaign_create_params.rb +43 -0
- data/lib/sentdm/models/brands/campaign_data.rb +123 -0
- data/lib/sentdm/models/brands/campaign_delete_params.rb +36 -0
- data/lib/sentdm/models/brands/campaign_list_params.rb +16 -0
- data/lib/sentdm/models/brands/campaign_list_response.rb +47 -0
- data/lib/sentdm/models/brands/campaign_update_params.rb +50 -0
- data/lib/sentdm/models/brands/messaging_use_case_us.rb +28 -0
- data/lib/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rb +30 -0
- data/lib/sentdm/models/brands/tcr_campaign_with_use_cases.rb +236 -0
- data/lib/sentdm/models/contact.rb +122 -0
- data/lib/sentdm/models/contact_create_params.rb +41 -0
- data/lib/sentdm/models/contact_delete_params.rb +27 -0
- data/lib/sentdm/models/contact_list_params.rb +28 -5
- data/lib/sentdm/models/contact_list_response.rb +46 -21
- data/lib/sentdm/models/{message_retrieve_params.rb → contact_retrieve_params.rb} +2 -2
- data/lib/sentdm/models/contact_update_params.rb +49 -0
- data/lib/sentdm/models/destination_country.rb +21 -0
- data/lib/sentdm/models/lookup_retrieve_phone_info_params.rb +14 -0
- data/lib/sentdm/models/lookup_retrieve_phone_info_response.rb +104 -0
- data/lib/sentdm/models/me_retrieve_params.rb +14 -0
- data/lib/sentdm/models/me_retrieve_response.rb +200 -0
- data/lib/sentdm/models/message_retrieve_activities_params.rb +14 -0
- data/lib/sentdm/models/message_retrieve_activities_response.rb +103 -0
- data/lib/sentdm/models/message_retrieve_status_params.rb +14 -0
- data/lib/sentdm/models/message_retrieve_status_response.rb +237 -0
- data/lib/sentdm/models/message_send_params.rb +88 -0
- data/lib/sentdm/models/message_send_response.rb +123 -0
- data/lib/sentdm/models/mutation_request.rb +20 -0
- data/lib/sentdm/models/pagination_meta.rb +80 -0
- data/lib/sentdm/models/profile_complete_params.rb +41 -0
- data/lib/sentdm/models/profile_complete_response.rb +8 -0
- data/lib/sentdm/models/profile_create_params.rb +122 -0
- data/lib/sentdm/models/profile_delete_params.rb +34 -0
- data/lib/sentdm/models/profile_detail.rb +200 -0
- data/lib/sentdm/models/profile_list_params.rb +14 -0
- data/lib/sentdm/models/profile_list_response.rb +57 -0
- data/lib/sentdm/models/profile_retrieve_params.rb +14 -0
- data/lib/sentdm/models/profile_settings.rb +66 -0
- data/lib/sentdm/models/profile_update_params.rb +169 -0
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rb +34 -0
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rb +40 -0
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rb +38 -0
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rb +81 -0
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rb +34 -0
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rb +39 -0
- data/lib/sentdm/models/tcr_brand_relationship.rb +18 -0
- data/lib/sentdm/models/tcr_vertical.rb +36 -0
- data/lib/sentdm/models/template.rb +90 -0
- data/lib/sentdm/models/template_create_params.rb +40 -19
- data/lib/sentdm/models/template_definition.rb +15 -255
- data/lib/sentdm/models/template_delete_params.rb +22 -1
- data/lib/sentdm/models/template_list_params.rb +9 -10
- data/lib/sentdm/models/template_list_response.rb +46 -21
- data/lib/sentdm/models/template_update_params.rb +73 -0
- data/lib/sentdm/models/user_invite_params.rb +57 -0
- data/lib/sentdm/models/user_list_params.rb +14 -0
- data/lib/sentdm/models/user_list_response.rb +57 -0
- data/lib/sentdm/models/user_remove_params.rb +34 -0
- data/lib/sentdm/models/user_response.rb +82 -0
- data/lib/sentdm/models/user_retrieve_params.rb +14 -0
- data/lib/sentdm/models/user_update_role_params.rb +49 -0
- data/lib/sentdm/models/webhook_create_params.rb +68 -0
- data/lib/sentdm/models/webhook_delete_params.rb +14 -0
- data/lib/sentdm/models/webhook_list_event_types_params.rb +14 -0
- data/lib/sentdm/models/webhook_list_event_types_response.rb +85 -0
- data/lib/sentdm/models/webhook_list_events_params.rb +32 -0
- data/lib/sentdm/models/webhook_list_events_response.rb +135 -0
- data/lib/sentdm/models/webhook_list_params.rb +38 -0
- data/lib/sentdm/models/webhook_list_response.rb +64 -0
- data/lib/sentdm/models/webhook_response.rb +87 -0
- data/lib/sentdm/models/webhook_retrieve_params.rb +14 -0
- data/lib/sentdm/models/webhook_rotate_secret_params.rb +30 -0
- data/lib/sentdm/models/webhook_rotate_secret_response.rb +56 -0
- data/lib/sentdm/models/webhook_test_params.rb +40 -0
- data/lib/sentdm/models/webhook_test_response.rb +62 -0
- data/lib/sentdm/models/webhook_toggle_status_params.rb +40 -0
- data/lib/sentdm/models/webhook_update_params.rb +68 -0
- data/lib/sentdm/models.rb +124 -10
- data/lib/sentdm/resources/brands/campaigns.rb +144 -0
- data/lib/sentdm/resources/brands.rb +128 -0
- data/lib/sentdm/resources/contacts.rb +111 -38
- data/lib/sentdm/resources/lookup.rb +35 -0
- data/lib/sentdm/resources/me.rb +34 -0
- data/lib/sentdm/resources/messages.rb +42 -77
- data/lib/sentdm/resources/profiles.rb +254 -0
- data/lib/sentdm/resources/templates.rb +94 -45
- data/lib/sentdm/resources/users.rb +158 -0
- data/lib/sentdm/resources/webhooks.rb +295 -0
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +94 -14
- data/rbi/sentdm/client.rbi +22 -25
- data/rbi/sentdm/models/api_error.rbi +66 -0
- data/rbi/sentdm/models/api_meta.rbi +69 -0
- data/rbi/sentdm/models/api_response_brand_with_kyc.rbi +74 -0
- data/rbi/sentdm/models/api_response_contact.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_profile_detail.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_user.rbi +74 -0
- data/rbi/sentdm/models/api_response_template.rbi +74 -0
- data/rbi/sentdm/models/api_response_webhook.rbi +74 -0
- data/rbi/sentdm/models/brand_create_params.rbi +68 -0
- data/rbi/sentdm/models/brand_data.rbi +266 -0
- data/rbi/sentdm/models/brand_delete_params.rbi +62 -0
- data/rbi/sentdm/models/brand_list_params.rbi +27 -0
- data/rbi/sentdm/models/brand_list_response.rbi +71 -0
- data/rbi/sentdm/models/brand_update_params.rbi +68 -0
- data/rbi/sentdm/models/brand_with_kyc.rbi +398 -0
- data/rbi/sentdm/models/brands/api_response_tcr_campaign_with_use_cases.rbi +83 -0
- data/rbi/sentdm/models/brands/base_dto.rbi +53 -0
- data/rbi/sentdm/models/brands/campaign_create_params.rbi +73 -0
- data/rbi/sentdm/models/brands/campaign_data.rbi +148 -0
- data/rbi/sentdm/models/brands/campaign_delete_params.rbi +78 -0
- data/rbi/sentdm/models/brands/campaign_list_params.rbi +29 -0
- data/rbi/sentdm/models/brands/campaign_list_response.rbi +82 -0
- data/rbi/sentdm/models/brands/campaign_update_params.rbi +79 -0
- data/rbi/sentdm/models/brands/messaging_use_case_us.rbi +69 -0
- data/rbi/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbi +52 -0
- data/rbi/sentdm/models/brands/tcr_campaign_with_use_cases.rbi +404 -0
- data/rbi/sentdm/models/contact.rbi +179 -0
- data/rbi/sentdm/models/contact_create_params.rbi +68 -0
- data/rbi/sentdm/models/contact_delete_params.rbi +62 -0
- data/rbi/sentdm/models/contact_list_params.rbi +26 -4
- data/rbi/sentdm/models/contact_list_response.rbi +91 -37
- data/rbi/sentdm/models/{message_retrieve_params.rbi → contact_retrieve_params.rbi} +2 -2
- data/rbi/sentdm/models/contact_update_params.rbi +73 -0
- data/rbi/sentdm/models/destination_country.rbi +32 -0
- data/rbi/sentdm/models/lookup_retrieve_phone_info_params.rbi +30 -0
- data/rbi/sentdm/models/lookup_retrieve_phone_info_response.rbi +183 -0
- data/rbi/sentdm/models/me_retrieve_params.rbi +27 -0
- data/rbi/sentdm/models/me_retrieve_response.rbi +314 -0
- data/rbi/sentdm/models/message_retrieve_activities_params.rbi +30 -0
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +234 -0
- data/rbi/sentdm/models/message_retrieve_status_params.rbi +27 -0
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +434 -0
- data/rbi/sentdm/models/message_send_params.rbi +143 -0
- data/rbi/sentdm/models/message_send_response.rbi +231 -0
- data/rbi/sentdm/models/mutation_request.rbi +32 -0
- data/rbi/sentdm/models/pagination_meta.rbi +135 -0
- data/rbi/sentdm/models/profile_complete_params.rbi +65 -0
- data/rbi/sentdm/models/profile_complete_response.rbi +8 -0
- data/rbi/sentdm/models/profile_create_params.rbi +156 -0
- data/rbi/sentdm/models/profile_delete_params.rbi +59 -0
- data/rbi/sentdm/models/profile_detail.rbi +273 -0
- data/rbi/sentdm/models/profile_list_params.rbi +27 -0
- data/rbi/sentdm/models/profile_list_response.rbi +111 -0
- data/rbi/sentdm/models/profile_retrieve_params.rbi +27 -0
- data/rbi/sentdm/models/profile_settings.rbi +86 -0
- data/rbi/sentdm/models/profile_update_params.rbi +196 -0
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rbi +56 -0
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbi +76 -0
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbi +79 -0
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rbi +104 -0
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rbi +60 -0
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbi +62 -0
- data/rbi/sentdm/models/tcr_brand_relationship.rbi +30 -0
- data/rbi/sentdm/models/tcr_vertical.rbi +41 -0
- data/rbi/sentdm/models/template.rbi +129 -0
- data/rbi/sentdm/models/template_create_params.rbi +47 -23
- data/rbi/sentdm/models/template_definition.rbi +74 -405
- data/rbi/sentdm/models/template_delete_params.rbi +36 -5
- data/rbi/sentdm/models/template_list_params.rbi +8 -10
- data/rbi/sentdm/models/template_list_response.rbi +91 -37
- data/rbi/sentdm/models/template_update_params.rbi +105 -0
- data/rbi/sentdm/models/user_invite_params.rbi +90 -0
- data/rbi/sentdm/models/user_list_params.rbi +27 -0
- data/rbi/sentdm/models/user_list_response.rbi +111 -0
- data/rbi/sentdm/models/user_remove_params.rbi +59 -0
- data/rbi/sentdm/models/user_response.rbi +118 -0
- data/rbi/sentdm/models/user_retrieve_params.rbi +27 -0
- data/rbi/sentdm/models/user_update_role_params.rbi +79 -0
- data/rbi/sentdm/models/webhook_create_params.rbi +102 -0
- data/rbi/sentdm/models/webhook_delete_params.rbi +27 -0
- data/rbi/sentdm/models/webhook_list_event_types_params.rbi +27 -0
- data/rbi/sentdm/models/webhook_list_event_types_response.rbi +206 -0
- data/rbi/sentdm/models/webhook_list_events_params.rbi +48 -0
- data/rbi/sentdm/models/webhook_list_events_response.rbi +263 -0
- data/rbi/sentdm/models/webhook_list_params.rbi +59 -0
- data/rbi/sentdm/models/webhook_list_response.rbi +126 -0
- data/rbi/sentdm/models/webhook_response.rbi +134 -0
- data/rbi/sentdm/models/webhook_retrieve_params.rbi +27 -0
- data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +67 -0
- data/rbi/sentdm/models/webhook_rotate_secret_response.rbi +112 -0
- data/rbi/sentdm/models/webhook_test_params.rbi +66 -0
- data/rbi/sentdm/models/webhook_test_response.rbi +111 -0
- data/rbi/sentdm/models/webhook_toggle_status_params.rbi +66 -0
- data/rbi/sentdm/models/webhook_update_params.rbi +102 -0
- data/rbi/sentdm/models.rbi +125 -10
- data/rbi/sentdm/resources/brands/campaigns.rbi +108 -0
- data/rbi/sentdm/resources/brands.rbi +93 -0
- data/rbi/sentdm/resources/contacts.rbi +89 -26
- data/rbi/sentdm/resources/lookup.rbi +24 -0
- data/rbi/sentdm/resources/me.rbi +23 -0
- data/rbi/sentdm/resources/messages.rbi +41 -60
- data/rbi/sentdm/resources/profiles.rbi +238 -0
- data/rbi/sentdm/resources/templates.rbi +94 -41
- data/rbi/sentdm/resources/users.rbi +116 -0
- data/rbi/sentdm/resources/webhooks.rbi +218 -0
- data/sig/sentdm/client.rbs +9 -8
- data/sig/sentdm/models/api_error.rbs +39 -0
- data/sig/sentdm/models/api_meta.rbs +41 -0
- data/sig/sentdm/models/api_response_brand_with_kyc.rbs +39 -0
- data/sig/sentdm/models/api_response_contact.rbs +39 -0
- data/sig/sentdm/models/api_response_of_profile_detail.rbs +39 -0
- data/sig/sentdm/models/api_response_of_user.rbs +39 -0
- data/sig/sentdm/models/api_response_template.rbs +39 -0
- data/sig/sentdm/models/api_response_webhook.rbs +39 -0
- data/sig/sentdm/models/brand_create_params.rbs +36 -0
- data/sig/sentdm/models/brand_data.rbs +164 -0
- data/sig/sentdm/models/brand_delete_params.rbs +32 -0
- data/sig/sentdm/models/brand_list_params.rbs +14 -0
- data/sig/sentdm/models/brand_list_response.rbs +39 -0
- data/sig/sentdm/models/brand_update_params.rbs +36 -0
- data/sig/sentdm/models/brand_with_kyc.rbs +237 -0
- data/sig/sentdm/models/brands/api_response_tcr_campaign_with_use_cases.rbs +41 -0
- data/sig/sentdm/models/brands/base_dto.rbs +27 -0
- data/sig/sentdm/models/brands/campaign_create_params.rbs +42 -0
- data/sig/sentdm/models/brands/campaign_data.rbs +82 -0
- data/sig/sentdm/models/brands/campaign_delete_params.rbs +38 -0
- data/sig/sentdm/models/brands/campaign_list_params.rbs +17 -0
- data/sig/sentdm/models/brands/campaign_list_response.rbs +41 -0
- data/sig/sentdm/models/brands/campaign_update_params.rbs +47 -0
- data/sig/sentdm/models/brands/messaging_use_case_us.rbs +40 -0
- data/sig/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbs +27 -0
- data/sig/sentdm/models/brands/tcr_campaign_with_use_cases.rbs +285 -0
- data/sig/sentdm/models/{contact_list_item.rbs → contact.rbs} +31 -5
- data/sig/sentdm/models/contact_create_params.rbs +38 -0
- data/sig/sentdm/models/contact_delete_params.rbs +32 -0
- data/sig/sentdm/models/contact_list_params.rbs +19 -1
- data/sig/sentdm/models/contact_list_response.rbs +44 -31
- data/sig/sentdm/models/{message_retrieve_params.rbs → contact_retrieve_params.rbs} +2 -2
- data/sig/sentdm/models/contact_update_params.rbs +45 -0
- data/sig/sentdm/models/destination_country.rbs +19 -0
- data/sig/sentdm/models/lookup_retrieve_phone_info_params.rbs +15 -0
- data/sig/sentdm/models/lookup_retrieve_phone_info_response.rbs +102 -0
- data/sig/sentdm/models/me_retrieve_params.rbs +14 -0
- data/sig/sentdm/models/me_retrieve_response.rbs +162 -0
- data/sig/sentdm/models/message_retrieve_activities_params.rbs +15 -0
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +105 -0
- data/sig/sentdm/models/message_retrieve_status_params.rbs +15 -0
- data/sig/sentdm/models/message_retrieve_status_response.rbs +224 -0
- data/sig/sentdm/models/message_send_params.rbs +79 -0
- data/sig/sentdm/models/message_send_response.rbs +108 -0
- data/sig/sentdm/models/mutation_request.rbs +15 -0
- data/sig/sentdm/models/pagination_meta.rbs +67 -0
- data/sig/sentdm/models/profile_complete_params.rbs +36 -0
- data/sig/sentdm/models/profile_complete_response.rbs +5 -0
- data/sig/sentdm/models/profile_create_params.rbs +96 -0
- data/sig/sentdm/models/profile_delete_params.rbs +32 -0
- data/sig/sentdm/models/profile_detail.rbs +168 -0
- data/sig/sentdm/models/profile_list_params.rbs +14 -0
- data/sig/sentdm/models/profile_list_response.rbs +53 -0
- data/sig/sentdm/models/profile_retrieve_params.rbs +15 -0
- data/sig/sentdm/models/profile_settings.rbs +50 -0
- data/sig/sentdm/models/profile_update_params.rbs +122 -0
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rbs +24 -0
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbs +30 -0
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbs +38 -0
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rbs +75 -0
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rbs +32 -0
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbs +32 -0
- data/sig/sentdm/models/tcr_brand_relationship.rbs +22 -0
- data/sig/sentdm/models/tcr_vertical.rbs +58 -0
- data/sig/sentdm/models/{template_response.rbs → template.rbs} +18 -31
- data/sig/sentdm/models/template_create_params.rbs +29 -6
- data/sig/sentdm/models/template_definition.rbs +20 -233
- data/sig/sentdm/models/template_delete_params.rbs +18 -3
- data/sig/sentdm/models/template_list_response.rbs +44 -31
- data/sig/sentdm/models/template_update_params.rbs +62 -0
- data/sig/sentdm/models/user_invite_params.rbs +56 -0
- data/sig/sentdm/models/user_list_params.rbs +14 -0
- data/sig/sentdm/models/user_list_response.rbs +53 -0
- data/sig/sentdm/models/user_remove_params.rbs +32 -0
- data/sig/sentdm/models/user_response.rbs +72 -0
- data/sig/sentdm/models/user_retrieve_params.rbs +15 -0
- data/sig/sentdm/models/user_update_role_params.rbs +49 -0
- data/sig/sentdm/models/webhook_create_params.rbs +70 -0
- data/sig/sentdm/models/webhook_delete_params.rbs +15 -0
- data/sig/sentdm/models/webhook_list_event_types_params.rbs +15 -0
- data/sig/sentdm/models/webhook_list_event_types_response.rbs +98 -0
- data/sig/sentdm/models/webhook_list_events_params.rbs +32 -0
- data/sig/sentdm/models/webhook_list_events_response.rbs +146 -0
- data/sig/sentdm/models/webhook_list_params.rbs +36 -0
- data/sig/sentdm/models/webhook_list_response.rbs +67 -0
- data/sig/sentdm/models/webhook_response.rbs +98 -0
- data/sig/sentdm/models/webhook_retrieve_params.rbs +15 -0
- data/sig/sentdm/models/webhook_rotate_secret_params.rbs +38 -0
- data/sig/sentdm/models/webhook_rotate_secret_response.rbs +51 -0
- data/sig/sentdm/models/webhook_test_params.rbs +38 -0
- data/sig/sentdm/models/webhook_test_response.rbs +55 -0
- data/sig/sentdm/models/webhook_toggle_status_params.rbs +38 -0
- data/sig/sentdm/models/webhook_update_params.rbs +70 -0
- data/sig/sentdm/models.rbs +118 -10
- data/sig/sentdm/resources/brands/campaigns.rbs +38 -0
- data/sig/sentdm/resources/brands.rbs +34 -0
- data/sig/sentdm/resources/contacts.rbs +28 -8
- data/sig/sentdm/resources/lookup.rbs +12 -0
- data/sig/sentdm/resources/{number_lookup.rbs → me.rbs} +2 -3
- data/sig/sentdm/resources/messages.rbs +12 -18
- data/sig/sentdm/resources/profiles.rbs +72 -0
- data/sig/sentdm/resources/templates.rbs +24 -4
- data/sig/sentdm/resources/users.rbs +41 -0
- data/sig/sentdm/resources/webhooks.rbs +80 -0
- metadata +284 -44
- data/lib/sentdm/models/contact_list_item.rb +0 -96
- data/lib/sentdm/models/contact_retrieve_by_phone_params.rb +0 -22
- data/lib/sentdm/models/contact_retrieve_id_params.rb +0 -22
- data/lib/sentdm/models/message_retrieve_response.rb +0 -227
- data/lib/sentdm/models/message_send_quick_message_params.rb +0 -34
- data/lib/sentdm/models/message_send_to_contact_params.rb +0 -46
- data/lib/sentdm/models/message_send_to_phone_params.rb +0 -47
- data/lib/sentdm/models/number_lookup_retrieve_params.rb +0 -20
- data/lib/sentdm/models/number_lookup_retrieve_response.rb +0 -83
- data/lib/sentdm/models/template_response.rb +0 -100
- data/lib/sentdm/resources/number_lookup.rb +0 -37
- data/lib/sentdm/resources/organizations/users.rb +0 -16
- data/lib/sentdm/resources/organizations.rb +0 -18
- data/rbi/sentdm/models/contact_list_item.rbi +0 -144
- data/rbi/sentdm/models/contact_retrieve_by_phone_params.rbi +0 -40
- data/rbi/sentdm/models/contact_retrieve_id_params.rbi +0 -40
- data/rbi/sentdm/models/message_retrieve_response.rbi +0 -376
- data/rbi/sentdm/models/message_send_quick_message_params.rbi +0 -56
- data/rbi/sentdm/models/message_send_to_contact_params.rbi +0 -63
- data/rbi/sentdm/models/message_send_to_phone_params.rbi +0 -65
- data/rbi/sentdm/models/number_lookup_retrieve_params.rbi +0 -35
- data/rbi/sentdm/models/number_lookup_retrieve_response.rbi +0 -132
- data/rbi/sentdm/models/template_response.rbi +0 -149
- data/rbi/sentdm/resources/number_lookup.rbi +0 -24
- data/rbi/sentdm/resources/organizations/users.rbi +0 -14
- data/rbi/sentdm/resources/organizations.rbi +0 -15
- data/sig/sentdm/models/contact_retrieve_by_phone_params.rbs +0 -23
- data/sig/sentdm/models/contact_retrieve_id_params.rbs +0 -20
- data/sig/sentdm/models/message_retrieve_response.rbs +0 -188
- data/sig/sentdm/models/message_send_quick_message_params.rbs +0 -28
- data/sig/sentdm/models/message_send_to_contact_params.rbs +0 -36
- data/sig/sentdm/models/message_send_to_phone_params.rbs +0 -36
- data/sig/sentdm/models/number_lookup_retrieve_params.rbs +0 -23
- data/sig/sentdm/models/number_lookup_retrieve_response.rbs +0 -78
- data/sig/sentdm/resources/organizations/users.rbs +0 -9
- data/sig/sentdm/resources/organizations.rbs +0 -9
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Profiles
|
|
6
|
+
# Creates a new sender profile within an organization. Profiles represent
|
|
7
|
+
# different brands, departments, or use cases, each with their own messaging
|
|
8
|
+
# configuration and settings. Requires admin role in the organization.
|
|
9
|
+
sig do
|
|
10
|
+
params(
|
|
11
|
+
allow_contact_sharing: T::Boolean,
|
|
12
|
+
allow_template_sharing: T::Boolean,
|
|
13
|
+
billing_model: T.nilable(String),
|
|
14
|
+
description: T.nilable(String),
|
|
15
|
+
icon: T.nilable(String),
|
|
16
|
+
inherit_contacts: T.nilable(T::Boolean),
|
|
17
|
+
inherit_tcr_brand: T.nilable(T::Boolean),
|
|
18
|
+
inherit_tcr_campaign: T.nilable(T::Boolean),
|
|
19
|
+
inherit_templates: T.nilable(T::Boolean),
|
|
20
|
+
name: String,
|
|
21
|
+
short_name: T.nilable(String),
|
|
22
|
+
test_mode: T::Boolean,
|
|
23
|
+
idempotency_key: String,
|
|
24
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
25
|
+
).returns(Sentdm::APIResponseOfProfileDetail)
|
|
26
|
+
end
|
|
27
|
+
def create(
|
|
28
|
+
# Body param: Whether contacts are shared across profiles (default: false)
|
|
29
|
+
allow_contact_sharing: nil,
|
|
30
|
+
# Body param: Whether templates are shared across profiles (default: false)
|
|
31
|
+
allow_template_sharing: nil,
|
|
32
|
+
# Body param: Billing model: profile, organization, or profile_and_organization
|
|
33
|
+
# (default: profile)
|
|
34
|
+
billing_model: nil,
|
|
35
|
+
# Body param: Profile description (optional)
|
|
36
|
+
description: nil,
|
|
37
|
+
# Body param: Profile icon URL (optional)
|
|
38
|
+
icon: nil,
|
|
39
|
+
# Body param: Whether this profile inherits contacts from organization (default:
|
|
40
|
+
# true)
|
|
41
|
+
inherit_contacts: nil,
|
|
42
|
+
# Body param: Whether this profile inherits TCR brand from organization (default:
|
|
43
|
+
# true)
|
|
44
|
+
inherit_tcr_brand: nil,
|
|
45
|
+
# Body param: Whether this profile inherits TCR campaign from organization
|
|
46
|
+
# (default: true)
|
|
47
|
+
inherit_tcr_campaign: nil,
|
|
48
|
+
# Body param: Whether this profile inherits templates from organization (default:
|
|
49
|
+
# true)
|
|
50
|
+
inherit_templates: nil,
|
|
51
|
+
# Body param: Profile name (required)
|
|
52
|
+
name: nil,
|
|
53
|
+
# Body param: Profile short name/abbreviation (optional)
|
|
54
|
+
short_name: nil,
|
|
55
|
+
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
56
|
+
# effects Useful for testing integrations without actual execution
|
|
57
|
+
test_mode: nil,
|
|
58
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
59
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
60
|
+
# hours per key per customer.
|
|
61
|
+
idempotency_key: nil,
|
|
62
|
+
request_options: {}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Retrieves detailed information about a specific sender profile within an
|
|
67
|
+
# organization.
|
|
68
|
+
sig do
|
|
69
|
+
params(
|
|
70
|
+
profile_id: String,
|
|
71
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
72
|
+
).returns(Sentdm::APIResponseOfProfileDetail)
|
|
73
|
+
end
|
|
74
|
+
def retrieve(profile_id, request_options: {})
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Updates a profile's configuration and settings. Requires admin role in the
|
|
78
|
+
# organization. Only provided fields will be updated (partial update).
|
|
79
|
+
sig do
|
|
80
|
+
params(
|
|
81
|
+
path_profile_id: String,
|
|
82
|
+
allow_contact_sharing: T.nilable(T::Boolean),
|
|
83
|
+
allow_number_change_during_onboarding: T.nilable(T::Boolean),
|
|
84
|
+
allow_template_sharing: T.nilable(T::Boolean),
|
|
85
|
+
billing_model: T.nilable(String),
|
|
86
|
+
description: T.nilable(String),
|
|
87
|
+
icon: T.nilable(String),
|
|
88
|
+
inherit_contacts: T.nilable(T::Boolean),
|
|
89
|
+
inherit_tcr_brand: T.nilable(T::Boolean),
|
|
90
|
+
inherit_tcr_campaign: T.nilable(T::Boolean),
|
|
91
|
+
inherit_templates: T.nilable(T::Boolean),
|
|
92
|
+
name: T.nilable(String),
|
|
93
|
+
body_profile_id: String,
|
|
94
|
+
sending_phone_number: T.nilable(String),
|
|
95
|
+
sending_phone_number_profile_id: T.nilable(String),
|
|
96
|
+
sending_whatsapp_number_profile_id: T.nilable(String),
|
|
97
|
+
short_name: T.nilable(String),
|
|
98
|
+
test_mode: T::Boolean,
|
|
99
|
+
whatsapp_phone_number: T.nilable(String),
|
|
100
|
+
idempotency_key: String,
|
|
101
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
102
|
+
).returns(Sentdm::APIResponseOfProfileDetail)
|
|
103
|
+
end
|
|
104
|
+
def update(
|
|
105
|
+
# Path param
|
|
106
|
+
path_profile_id,
|
|
107
|
+
# Body param: Whether contacts are shared across profiles (optional)
|
|
108
|
+
allow_contact_sharing: nil,
|
|
109
|
+
# Body param: Whether number changes are allowed during onboarding (optional)
|
|
110
|
+
allow_number_change_during_onboarding: nil,
|
|
111
|
+
# Body param: Whether templates are shared across profiles (optional)
|
|
112
|
+
allow_template_sharing: nil,
|
|
113
|
+
# Body param: Billing model: profile, organization, or profile_and_organization
|
|
114
|
+
# (optional)
|
|
115
|
+
billing_model: nil,
|
|
116
|
+
# Body param: Profile description (optional)
|
|
117
|
+
description: nil,
|
|
118
|
+
# Body param: Profile icon URL (optional)
|
|
119
|
+
icon: nil,
|
|
120
|
+
# Body param: Whether this profile inherits contacts from organization (optional)
|
|
121
|
+
inherit_contacts: nil,
|
|
122
|
+
# Body param: Whether this profile inherits TCR brand from organization (optional)
|
|
123
|
+
inherit_tcr_brand: nil,
|
|
124
|
+
# Body param: Whether this profile inherits TCR campaign from organization
|
|
125
|
+
# (optional)
|
|
126
|
+
inherit_tcr_campaign: nil,
|
|
127
|
+
# Body param: Whether this profile inherits templates from organization (optional)
|
|
128
|
+
inherit_templates: nil,
|
|
129
|
+
# Body param: Profile name (optional)
|
|
130
|
+
name: nil,
|
|
131
|
+
# Body param: Profile ID from route parameter
|
|
132
|
+
body_profile_id: nil,
|
|
133
|
+
# Body param: Direct phone number for SMS sending (optional)
|
|
134
|
+
sending_phone_number: nil,
|
|
135
|
+
# Body param: Reference to another profile to use for SMS/Telnyx configuration
|
|
136
|
+
# (optional)
|
|
137
|
+
sending_phone_number_profile_id: nil,
|
|
138
|
+
# Body param: Reference to another profile to use for WhatsApp configuration
|
|
139
|
+
# (optional)
|
|
140
|
+
sending_whatsapp_number_profile_id: nil,
|
|
141
|
+
# Body param: Profile short name/abbreviation (optional)
|
|
142
|
+
short_name: nil,
|
|
143
|
+
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
144
|
+
# effects Useful for testing integrations without actual execution
|
|
145
|
+
test_mode: nil,
|
|
146
|
+
# Body param: Direct phone number for WhatsApp sending (optional)
|
|
147
|
+
whatsapp_phone_number: nil,
|
|
148
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
149
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
150
|
+
# hours per key per customer.
|
|
151
|
+
idempotency_key: nil,
|
|
152
|
+
request_options: {}
|
|
153
|
+
)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Retrieves all sender profiles within an organization. Profiles represent
|
|
157
|
+
# different brands, departments, or use cases within an organization, each with
|
|
158
|
+
# their own messaging configuration.
|
|
159
|
+
sig do
|
|
160
|
+
params(request_options: Sentdm::RequestOptions::OrHash).returns(
|
|
161
|
+
Sentdm::Models::ProfileListResponse
|
|
162
|
+
)
|
|
163
|
+
end
|
|
164
|
+
def list(request_options: {})
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Soft deletes a sender profile. The profile will be marked as deleted but data is
|
|
168
|
+
# retained. Requires admin role in the organization.
|
|
169
|
+
sig do
|
|
170
|
+
params(
|
|
171
|
+
path_profile_id: String,
|
|
172
|
+
body_profile_id: String,
|
|
173
|
+
test_mode: T::Boolean,
|
|
174
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
175
|
+
).void
|
|
176
|
+
end
|
|
177
|
+
def delete(
|
|
178
|
+
path_profile_id,
|
|
179
|
+
# Profile ID from route parameter
|
|
180
|
+
body_profile_id: nil,
|
|
181
|
+
# Test mode flag - when true, the operation is simulated without side effects
|
|
182
|
+
# Useful for testing integrations without actual execution
|
|
183
|
+
test_mode: nil,
|
|
184
|
+
request_options: {}
|
|
185
|
+
)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Final step in profile compliance workflow. Validates all prerequisites (general
|
|
189
|
+
# data, brand, campaigns), connects profile to Telnyx/WhatsApp, and sets status
|
|
190
|
+
# based on configuration. The process runs in the background and calls the
|
|
191
|
+
# provided webhook URL when finished.
|
|
192
|
+
#
|
|
193
|
+
# Prerequisites:
|
|
194
|
+
# - Profile must be completed
|
|
195
|
+
# - If inheritTcrBrand=false: Profile must have existing brand
|
|
196
|
+
# - If inheritTcrBrand=true: Parent must have existing brand
|
|
197
|
+
# - If TCR application: Must have at least one campaign (own or inherited)
|
|
198
|
+
# - If inheritTcrCampaign=false: Profile should have campaigns
|
|
199
|
+
# - If inheritTcrCampaign=true: Parent must have campaigns
|
|
200
|
+
#
|
|
201
|
+
# Status Logic:
|
|
202
|
+
# - If both SMS and WhatsApp channels are missing → SUBMITTED
|
|
203
|
+
# - If TCR application and not inheriting brand/campaigns → SUBMITTED
|
|
204
|
+
# - If non-TCR with destination country (IsMain=true) → SUBMITTED
|
|
205
|
+
# - Otherwise → COMPLETED
|
|
206
|
+
sig do
|
|
207
|
+
params(
|
|
208
|
+
profile_id: String,
|
|
209
|
+
web_hook_url: String,
|
|
210
|
+
test_mode: T::Boolean,
|
|
211
|
+
idempotency_key: String,
|
|
212
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
213
|
+
).returns(T.anything)
|
|
214
|
+
end
|
|
215
|
+
def complete(
|
|
216
|
+
# Path param: Profile ID from route
|
|
217
|
+
profile_id,
|
|
218
|
+
# Body param: Webhook URL to call when profile completion finishes (success or
|
|
219
|
+
# failure)
|
|
220
|
+
web_hook_url:,
|
|
221
|
+
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
222
|
+
# effects Useful for testing integrations without actual execution
|
|
223
|
+
test_mode: nil,
|
|
224
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
225
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
226
|
+
# hours per key per customer.
|
|
227
|
+
idempotency_key: nil,
|
|
228
|
+
request_options: {}
|
|
229
|
+
)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# @api private
|
|
233
|
+
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
234
|
+
def self.new(client:)
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
end
|
|
@@ -3,55 +3,103 @@
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
5
|
class Templates
|
|
6
|
-
# Creates a new message template
|
|
7
|
-
# template
|
|
8
|
-
#
|
|
9
|
-
# category). Optionally submits the template for WhatsApp review. The customer ID
|
|
10
|
-
# is extracted from the authentication token.
|
|
6
|
+
# Creates a new message template with header, body, footer, and buttons. The
|
|
7
|
+
# template can be submitted for review immediately or saved as draft for later
|
|
8
|
+
# submission.
|
|
11
9
|
sig do
|
|
12
10
|
params(
|
|
13
|
-
definition: Sentdm::TemplateDefinition::OrHash,
|
|
14
11
|
category: T.nilable(String),
|
|
12
|
+
creation_source: T.nilable(String),
|
|
13
|
+
definition: Sentdm::TemplateDefinition::OrHash,
|
|
15
14
|
language: T.nilable(String),
|
|
16
15
|
submit_for_review: T::Boolean,
|
|
16
|
+
test_mode: T::Boolean,
|
|
17
|
+
idempotency_key: String,
|
|
17
18
|
request_options: Sentdm::RequestOptions::OrHash
|
|
18
|
-
).returns(Sentdm::
|
|
19
|
+
).returns(Sentdm::APIResponseTemplate)
|
|
19
20
|
end
|
|
20
21
|
def create(
|
|
21
|
-
#
|
|
22
|
-
|
|
23
|
-
# The template category (e.g., MARKETING, UTILITY, AUTHENTICATION). Can only be
|
|
24
|
-
# set when creating a new template. If not provided, will be auto-generated using
|
|
25
|
-
# AI.
|
|
22
|
+
# Body param: Template category: MARKETING, UTILITY, AUTHENTICATION (optional,
|
|
23
|
+
# auto-detected if not provided)
|
|
26
24
|
category: nil,
|
|
27
|
-
#
|
|
28
|
-
|
|
25
|
+
# Body param: Source of template creation (default: from-api)
|
|
26
|
+
creation_source: nil,
|
|
27
|
+
# Body param: Template definition including header, body, footer, and buttons
|
|
28
|
+
definition: nil,
|
|
29
|
+
# Body param: Template language code (e.g., en_US) (optional, auto-detected if not
|
|
30
|
+
# provided)
|
|
29
31
|
language: nil,
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
+
# Body param: Whether to submit the template for review after creation (default:
|
|
33
|
+
# false)
|
|
32
34
|
submit_for_review: nil,
|
|
35
|
+
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
36
|
+
# effects Useful for testing integrations without actual execution
|
|
37
|
+
test_mode: nil,
|
|
38
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
39
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
40
|
+
# hours per key per customer.
|
|
41
|
+
idempotency_key: nil,
|
|
42
|
+
request_options: {}
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Retrieves a specific template by its ID. Returns template details including
|
|
47
|
+
# name, category, language, status, and definition.
|
|
48
|
+
sig do
|
|
49
|
+
params(
|
|
50
|
+
id: String,
|
|
51
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
52
|
+
).returns(Sentdm::APIResponseTemplate)
|
|
53
|
+
end
|
|
54
|
+
def retrieve(
|
|
55
|
+
# Template ID from route parameter
|
|
56
|
+
id,
|
|
33
57
|
request_options: {}
|
|
34
58
|
)
|
|
35
59
|
end
|
|
36
60
|
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
# headers, body, footer, and interactive buttons. The customer ID is extracted
|
|
40
|
-
# from the authentication token.
|
|
61
|
+
# Updates an existing template's name, category, language, definition, or submits
|
|
62
|
+
# it for review.
|
|
41
63
|
sig do
|
|
42
64
|
params(
|
|
43
65
|
id: String,
|
|
66
|
+
category: T.nilable(String),
|
|
67
|
+
definition: T.nilable(Sentdm::TemplateDefinition::OrHash),
|
|
68
|
+
language: T.nilable(String),
|
|
69
|
+
name: T.nilable(String),
|
|
70
|
+
submit_for_review: T::Boolean,
|
|
71
|
+
test_mode: T::Boolean,
|
|
72
|
+
idempotency_key: String,
|
|
44
73
|
request_options: Sentdm::RequestOptions::OrHash
|
|
45
|
-
).returns(Sentdm::
|
|
74
|
+
).returns(Sentdm::APIResponseTemplate)
|
|
46
75
|
end
|
|
47
|
-
def
|
|
76
|
+
def update(
|
|
77
|
+
# Path param: Template ID from route parameter
|
|
78
|
+
id,
|
|
79
|
+
# Body param: Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
80
|
+
category: nil,
|
|
81
|
+
# Body param: Template definition including header, body, footer, and buttons
|
|
82
|
+
definition: nil,
|
|
83
|
+
# Body param: Template language code (e.g., en_US)
|
|
84
|
+
language: nil,
|
|
85
|
+
# Body param: Template display name
|
|
86
|
+
name: nil,
|
|
87
|
+
# Body param: Whether to submit the template for review after updating (default:
|
|
88
|
+
# false)
|
|
89
|
+
submit_for_review: nil,
|
|
90
|
+
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
91
|
+
# effects Useful for testing integrations without actual execution
|
|
92
|
+
test_mode: nil,
|
|
93
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
94
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
95
|
+
# hours per key per customer.
|
|
96
|
+
idempotency_key: nil,
|
|
97
|
+
request_options: {}
|
|
98
|
+
)
|
|
48
99
|
end
|
|
49
100
|
|
|
50
|
-
# Retrieves
|
|
51
|
-
#
|
|
52
|
-
# interactive buttons. Supports advanced filtering by search term, status, and
|
|
53
|
-
# category, plus pagination. The customer ID is extracted from the authentication
|
|
54
|
-
# token.
|
|
101
|
+
# Retrieves a paginated list of message templates for the authenticated customer.
|
|
102
|
+
# Supports filtering by status, category, and search term.
|
|
55
103
|
sig do
|
|
56
104
|
params(
|
|
57
105
|
page: Integer,
|
|
@@ -63,33 +111,38 @@ module Sentdm
|
|
|
63
111
|
).returns(Sentdm::Models::TemplateListResponse)
|
|
64
112
|
end
|
|
65
113
|
def list(
|
|
66
|
-
#
|
|
114
|
+
# Page number (1-indexed)
|
|
67
115
|
page:,
|
|
68
|
-
# The number of items per page (1-1000). Default is 100.
|
|
69
116
|
page_size:,
|
|
70
|
-
# Optional
|
|
117
|
+
# Optional category filter: MARKETING, UTILITY, AUTHENTICATION
|
|
71
118
|
category: nil,
|
|
72
|
-
# Optional search term
|
|
119
|
+
# Optional search term for filtering templates
|
|
73
120
|
search: nil,
|
|
74
|
-
# Optional
|
|
121
|
+
# Optional status filter: APPROVED, PENDING, REJECTED
|
|
75
122
|
status: nil,
|
|
76
123
|
request_options: {}
|
|
77
124
|
)
|
|
78
125
|
end
|
|
79
126
|
|
|
80
|
-
# Deletes a
|
|
81
|
-
#
|
|
82
|
-
# template has NO messages: Permanently deleted from database (hard delete). - If
|
|
83
|
-
# template has messages: Marked as deleted but preserved for message history (soft
|
|
84
|
-
# delete with snapshot). The template must exist and belong to the authenticated
|
|
85
|
-
# customer to be deleted successfully. The customer ID is extracted from the
|
|
86
|
-
# authentication token.
|
|
127
|
+
# Deletes a template by ID. Optionally, you can also delete the template from
|
|
128
|
+
# WhatsApp/Meta by setting delete_from_meta=true.
|
|
87
129
|
sig do
|
|
88
|
-
params(
|
|
130
|
+
params(
|
|
131
|
+
id: String,
|
|
132
|
+
delete_from_meta: T.nilable(T::Boolean),
|
|
133
|
+
test_mode: T::Boolean,
|
|
134
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
135
|
+
).void
|
|
89
136
|
end
|
|
90
137
|
def delete(
|
|
91
|
-
#
|
|
138
|
+
# Template ID from route parameter
|
|
92
139
|
id,
|
|
140
|
+
# Whether to also delete the template from WhatsApp/Meta (optional, defaults to
|
|
141
|
+
# false)
|
|
142
|
+
delete_from_meta: nil,
|
|
143
|
+
# Test mode flag - when true, the operation is simulated without side effects
|
|
144
|
+
# Useful for testing integrations without actual execution
|
|
145
|
+
test_mode: nil,
|
|
93
146
|
request_options: {}
|
|
94
147
|
)
|
|
95
148
|
end
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Users
|
|
6
|
+
# Retrieves detailed information about a specific user in an organization or
|
|
7
|
+
# profile. Requires developer role or higher.
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
user_id: String,
|
|
11
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
12
|
+
).returns(Sentdm::APIResponseOfUser)
|
|
13
|
+
end
|
|
14
|
+
def retrieve(user_id, request_options: {})
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Retrieves all users who have access to the organization or profile identified by
|
|
18
|
+
# the API key, including their roles and status. Shows invited users (pending
|
|
19
|
+
# acceptance) and active users. Requires developer role or higher.
|
|
20
|
+
sig do
|
|
21
|
+
params(request_options: Sentdm::RequestOptions::OrHash).returns(
|
|
22
|
+
Sentdm::Models::UserListResponse
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
def list(request_options: {})
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Sends an invitation to a user to join the organization or profile with a
|
|
29
|
+
# specific role. Requires admin role. The user will receive an invitation email
|
|
30
|
+
# with a token to accept. Invitation tokens expire after 7 days.
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
email: String,
|
|
34
|
+
name: String,
|
|
35
|
+
role: String,
|
|
36
|
+
test_mode: T::Boolean,
|
|
37
|
+
idempotency_key: String,
|
|
38
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
39
|
+
).returns(Sentdm::APIResponseOfUser)
|
|
40
|
+
end
|
|
41
|
+
def invite(
|
|
42
|
+
# Body param: User email address (required)
|
|
43
|
+
email: nil,
|
|
44
|
+
# Body param: User full name (required)
|
|
45
|
+
name: nil,
|
|
46
|
+
# Body param: User role: admin, billing, or developer (required)
|
|
47
|
+
role: nil,
|
|
48
|
+
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
49
|
+
# effects Useful for testing integrations without actual execution
|
|
50
|
+
test_mode: nil,
|
|
51
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
52
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
53
|
+
# hours per key per customer.
|
|
54
|
+
idempotency_key: nil,
|
|
55
|
+
request_options: {}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Removes a user's access to an organization or profile. Requires admin role. You
|
|
60
|
+
# cannot remove yourself or remove the last admin.
|
|
61
|
+
sig do
|
|
62
|
+
params(
|
|
63
|
+
path_user_id: String,
|
|
64
|
+
test_mode: T::Boolean,
|
|
65
|
+
body_user_id: String,
|
|
66
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
67
|
+
).void
|
|
68
|
+
end
|
|
69
|
+
def remove(
|
|
70
|
+
path_user_id,
|
|
71
|
+
# Test mode flag - when true, the operation is simulated without side effects
|
|
72
|
+
# Useful for testing integrations without actual execution
|
|
73
|
+
test_mode: nil,
|
|
74
|
+
# User ID from route parameter
|
|
75
|
+
body_user_id: nil,
|
|
76
|
+
request_options: {}
|
|
77
|
+
)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Updates a user's role in the organization or profile. Requires admin role. You
|
|
81
|
+
# cannot change your own role or demote the last admin.
|
|
82
|
+
sig do
|
|
83
|
+
params(
|
|
84
|
+
path_user_id: String,
|
|
85
|
+
role: String,
|
|
86
|
+
test_mode: T::Boolean,
|
|
87
|
+
body_user_id: String,
|
|
88
|
+
idempotency_key: String,
|
|
89
|
+
request_options: Sentdm::RequestOptions::OrHash
|
|
90
|
+
).returns(Sentdm::APIResponseOfUser)
|
|
91
|
+
end
|
|
92
|
+
def update_role(
|
|
93
|
+
# Path param
|
|
94
|
+
path_user_id,
|
|
95
|
+
# Body param: User role: admin, billing, or developer (required)
|
|
96
|
+
role: nil,
|
|
97
|
+
# Body param: Test mode flag - when true, the operation is simulated without side
|
|
98
|
+
# effects Useful for testing integrations without actual execution
|
|
99
|
+
test_mode: nil,
|
|
100
|
+
# Body param: User ID from route parameter
|
|
101
|
+
body_user_id: nil,
|
|
102
|
+
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
103
|
+
# alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
104
|
+
# hours per key per customer.
|
|
105
|
+
idempotency_key: nil,
|
|
106
|
+
request_options: {}
|
|
107
|
+
)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# @api private
|
|
111
|
+
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
112
|
+
def self.new(client:)
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|