trycourier 4.7.1 → 4.9.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 +63 -0
- data/README.md +25 -235
- data/lib/courier/client.rb +12 -0
- data/lib/courier/internal/util.rb +50 -6
- data/lib/courier/models/audience_delete_params.rb +7 -1
- data/lib/courier/models/audience_list_members_params.rb +8 -1
- data/lib/courier/models/audience_retrieve_params.rb +7 -1
- data/lib/courier/models/audience_update_params.rb +8 -1
- data/lib/courier/models/audit_event_retrieve_params.rb +7 -1
- data/lib/courier/models/automations/invoke_invoke_by_template_params.rb +7 -1
- data/lib/courier/models/brand_delete_params.rb +7 -1
- data/lib/courier/models/brand_retrieve_params.rb +7 -1
- data/lib/courier/models/brand_update_params.rb +8 -1
- data/lib/courier/models/bulk_add_users_params.rb +7 -1
- data/lib/courier/models/bulk_list_users_params.rb +8 -1
- data/lib/courier/models/bulk_retrieve_job_params.rb +7 -1
- data/lib/courier/models/bulk_run_job_params.rb +7 -1
- data/lib/courier/models/channel.rb +75 -0
- data/lib/courier/models/channel_metadata.rb +15 -0
- data/lib/courier/models/elemental_content.rb +3 -10
- data/lib/courier/models/elemental_html_node_with_type.rb +24 -0
- data/lib/courier/models/elemental_node.rb +3 -1
- data/lib/courier/models/journey.rb +63 -0
- data/lib/courier/models/journey_invoke_params.rb +20 -0
- data/lib/courier/models/journey_list_params.rb +47 -0
- data/lib/courier/models/journeys_invoke_request.rb +49 -0
- data/lib/courier/models/journeys_invoke_response.rb +17 -0
- data/lib/courier/models/journeys_list_response.rb +24 -0
- data/lib/courier/models/list_delete_params.rb +7 -1
- data/lib/courier/models/list_restore_params.rb +7 -1
- data/lib/courier/models/list_retrieve_params.rb +7 -1
- data/lib/courier/models/list_update_params.rb +7 -1
- data/lib/courier/models/lists/subscription_add_params.rb +7 -1
- data/lib/courier/models/lists/subscription_list_params.rb +8 -1
- data/lib/courier/models/lists/subscription_subscribe_params.rb +7 -1
- data/lib/courier/models/lists/subscription_subscribe_user_params.rb +7 -1
- data/lib/courier/models/lists/subscription_unsubscribe_user_params.rb +7 -1
- data/lib/courier/models/message_cancel_params.rb +7 -1
- data/lib/courier/models/message_channels.rb +8 -0
- data/lib/courier/models/message_content_params.rb +7 -1
- data/lib/courier/models/message_details.rb +37 -37
- data/lib/courier/models/message_history_params.rb +8 -1
- data/lib/courier/models/message_providers.rb +8 -0
- data/lib/courier/models/message_providers_type.rb +38 -0
- data/lib/courier/models/message_retrieve_params.rb +7 -1
- data/lib/courier/models/metadata.rb +15 -0
- data/lib/courier/models/notification_archive_params.rb +20 -0
- data/lib/courier/models/notification_create_params.rb +14 -0
- data/lib/courier/models/notification_list_params.rb +13 -4
- data/lib/courier/models/notification_list_response.rb +108 -93
- data/lib/courier/models/notification_list_versions_params.rb +37 -0
- data/lib/courier/models/notification_publish_params.rb +20 -0
- data/lib/courier/models/notification_replace_params.rb +20 -0
- data/lib/courier/models/notification_retrieve_content_params.rb +7 -1
- data/lib/courier/models/notification_retrieve_params.rb +33 -0
- data/lib/courier/models/notification_template_create_request.rb +45 -0
- data/lib/courier/models/notification_template_get_response.rb +92 -0
- data/lib/courier/models/notification_template_mutation_response.rb +51 -0
- data/lib/courier/models/notification_template_payload.rb +98 -0
- data/lib/courier/models/notification_template_publish_request.rb +19 -0
- data/lib/courier/models/notification_template_summary.rb +81 -0
- data/lib/courier/models/notification_template_update_request.rb +46 -0
- data/lib/courier/models/notification_template_version_list_response.rb +22 -0
- data/lib/courier/models/notifications/check_delete_params.rb +7 -1
- data/lib/courier/models/notifications/check_list_params.rb +7 -1
- data/lib/courier/models/notifications/check_update_params.rb +7 -1
- data/lib/courier/models/notifications/draft_retrieve_content_params.rb +7 -1
- data/lib/courier/models/profile_create_params.rb +7 -1
- data/lib/courier/models/profile_delete_params.rb +7 -1
- data/lib/courier/models/profile_replace_params.rb +7 -1
- data/lib/courier/models/profile_retrieve_params.rb +7 -1
- data/lib/courier/models/profile_update_params.rb +8 -1
- data/lib/courier/models/profiles/list_delete_params.rb +7 -1
- data/lib/courier/models/profiles/list_retrieve_params.rb +8 -1
- data/lib/courier/models/profiles/list_subscribe_params.rb +7 -1
- data/lib/courier/models/provider.rb +67 -0
- data/lib/courier/models/provider_create_params.rb +52 -0
- data/lib/courier/models/provider_delete_params.rb +20 -0
- data/lib/courier/models/provider_list_params.rb +22 -0
- data/lib/courier/models/provider_list_response.rb +24 -0
- data/lib/courier/models/provider_retrieve_params.rb +20 -0
- data/lib/courier/models/provider_update_params.rb +58 -0
- data/lib/courier/models/providers/catalog_list_params.rb +44 -0
- data/lib/courier/models/providers/catalog_list_response.rb +26 -0
- data/lib/courier/models/providers_catalog_entry.rb +86 -0
- data/lib/courier/models/request_archive_params.rb +7 -1
- data/lib/courier/models/routing_strategy_archive_params.rb +20 -0
- data/lib/courier/models/routing_strategy_create_params.rb +14 -0
- data/lib/courier/models/routing_strategy_create_request.rb +58 -0
- data/lib/courier/models/routing_strategy_get_response.rb +99 -0
- data/lib/courier/models/routing_strategy_list_params.rb +30 -0
- data/lib/courier/models/routing_strategy_list_response.rb +24 -0
- data/lib/courier/models/routing_strategy_mutation_response.rb +19 -0
- data/lib/courier/models/routing_strategy_replace_params.rb +20 -0
- data/lib/courier/models/routing_strategy_replace_request.rb +59 -0
- data/lib/courier/models/routing_strategy_retrieve_params.rb +20 -0
- data/lib/courier/models/routing_strategy_summary.rb +75 -0
- data/lib/courier/models/send_message_params.rb +6 -154
- data/lib/courier/models/tenant_delete_params.rb +7 -1
- data/lib/courier/models/tenant_list_users_params.rb +8 -1
- data/lib/courier/models/tenant_retrieve_params.rb +7 -1
- data/lib/courier/models/tenant_template_input.rb +6 -152
- data/lib/courier/models/tenant_update_params.rb +8 -1
- data/lib/courier/models/tenants/preferences/item_delete_params.rb +7 -1
- data/lib/courier/models/tenants/preferences/item_update_params.rb +7 -1
- data/lib/courier/models/tenants/template_list_params.rb +8 -1
- data/lib/courier/models/tenants/template_publish_params.rb +7 -1
- data/lib/courier/models/tenants/template_replace_params.rb +7 -1
- data/lib/courier/models/tenants/template_retrieve_params.rb +7 -1
- data/lib/courier/models/tenants/templates/version_retrieve_params.rb +7 -1
- data/lib/courier/models/timeouts.rb +21 -0
- data/lib/courier/models/translation_retrieve_params.rb +7 -1
- data/lib/courier/models/translation_update_params.rb +7 -1
- data/lib/courier/models/users/preference_retrieve_params.rb +8 -1
- data/lib/courier/models/users/preference_retrieve_topic_params.rb +8 -1
- data/lib/courier/models/users/preference_update_or_create_topic_params.rb +8 -1
- data/lib/courier/models/users/tenant_add_multiple_params.rb +7 -1
- data/lib/courier/models/users/tenant_add_single_params.rb +7 -1
- data/lib/courier/models/users/tenant_list_params.rb +8 -1
- data/lib/courier/models/users/tenant_remove_all_params.rb +7 -1
- data/lib/courier/models/users/tenant_remove_single_params.rb +7 -1
- data/lib/courier/models/users/token_add_multiple_params.rb +7 -1
- data/lib/courier/models/users/token_add_single_params.rb +168 -2
- data/lib/courier/models/users/token_delete_params.rb +7 -1
- data/lib/courier/models/users/token_list_params.rb +7 -1
- data/lib/courier/models/users/token_retrieve_params.rb +7 -1
- data/lib/courier/models/users/token_update_params.rb +7 -1
- data/lib/courier/models/version_node.rb +46 -0
- data/lib/courier/models.rb +98 -0
- data/lib/courier/resources/audiences.rb +4 -2
- data/lib/courier/resources/audit_events.rb +2 -1
- data/lib/courier/resources/automations.rb +2 -1
- data/lib/courier/resources/brands.rb +2 -1
- data/lib/courier/resources/bulk.rb +2 -1
- data/lib/courier/resources/journeys.rb +73 -0
- data/lib/courier/resources/lists/subscriptions.rb +2 -1
- data/lib/courier/resources/lists.rb +2 -1
- data/lib/courier/resources/messages.rb +4 -2
- data/lib/courier/resources/notifications.rb +167 -4
- data/lib/courier/resources/profiles/lists.rb +2 -1
- data/lib/courier/resources/providers/catalog.rb +49 -0
- data/lib/courier/resources/providers.rb +150 -0
- data/lib/courier/resources/routing_strategies.rb +151 -0
- data/lib/courier/resources/tenants/templates.rb +2 -1
- data/lib/courier/resources/tenants.rb +4 -2
- data/lib/courier/resources/users/preferences.rb +7 -4
- data/lib/courier/resources/users/tenants.rb +2 -1
- data/lib/courier/resources/users/tokens.rb +7 -9
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +54 -0
- data/rbi/courier/client.rbi +9 -0
- data/rbi/courier/internal/util.rbi +28 -0
- data/rbi/courier/models/audience_delete_params.rbi +13 -5
- data/rbi/courier/models/audience_list_members_params.rbi +6 -0
- data/rbi/courier/models/audience_retrieve_params.rbi +13 -5
- data/rbi/courier/models/audience_update_params.rbi +6 -0
- data/rbi/courier/models/audit_event_retrieve_params.rbi +13 -5
- data/rbi/courier/models/automations/invoke_invoke_by_template_params.rbi +6 -0
- data/rbi/courier/models/brand_delete_params.rbi +13 -5
- data/rbi/courier/models/brand_retrieve_params.rbi +13 -5
- data/rbi/courier/models/brand_update_params.rbi +6 -0
- data/rbi/courier/models/bulk_add_users_params.rbi +6 -1
- data/rbi/courier/models/bulk_list_users_params.rbi +6 -0
- data/rbi/courier/models/bulk_retrieve_job_params.rbi +13 -5
- data/rbi/courier/models/bulk_run_job_params.rbi +13 -5
- data/rbi/courier/models/channel.rbi +106 -0
- data/rbi/courier/models/channel_metadata.rbi +28 -0
- data/rbi/courier/models/elemental_content.rbi +9 -12
- data/rbi/courier/models/elemental_html_node_with_type.rbi +59 -0
- data/rbi/courier/models/elemental_node.rbi +2 -1
- data/rbi/courier/models/journey.rbi +91 -0
- data/rbi/courier/models/journey_invoke_params.rbi +35 -0
- data/rbi/courier/models/journey_list_params.rbi +85 -0
- data/rbi/courier/models/journeys_invoke_request.rbi +84 -0
- data/rbi/courier/models/journeys_invoke_response.rbi +27 -0
- data/rbi/courier/models/journeys_list_response.rbi +46 -0
- data/rbi/courier/models/list_delete_params.rbi +13 -5
- data/rbi/courier/models/list_restore_params.rbi +13 -5
- data/rbi/courier/models/list_retrieve_params.rbi +13 -5
- data/rbi/courier/models/list_update_params.rbi +6 -1
- data/rbi/courier/models/lists/subscription_add_params.rbi +6 -1
- data/rbi/courier/models/lists/subscription_list_params.rbi +6 -0
- data/rbi/courier/models/lists/subscription_subscribe_params.rbi +6 -1
- data/rbi/courier/models/lists/subscription_subscribe_user_params.rbi +6 -1
- data/rbi/courier/models/lists/subscription_unsubscribe_user_params.rbi +10 -2
- data/rbi/courier/models/message_cancel_params.rbi +13 -5
- data/rbi/courier/models/message_channels.rbi +11 -0
- data/rbi/courier/models/message_content_params.rbi +13 -5
- data/rbi/courier/models/message_details.rbi +55 -43
- data/rbi/courier/models/message_history_params.rbi +10 -1
- data/rbi/courier/models/message_providers.rbi +11 -0
- data/rbi/courier/models/message_providers_type.rbi +60 -0
- data/rbi/courier/models/message_retrieve_params.rbi +13 -5
- data/rbi/courier/models/metadata.rbi +26 -0
- data/rbi/courier/models/notification_archive_params.rbi +35 -0
- data/rbi/courier/models/notification_create_params.rbi +27 -0
- data/rbi/courier/models/notification_list_params.rbi +15 -2
- data/rbi/courier/models/notification_list_response.rbi +159 -119
- data/rbi/courier/models/notification_list_versions_params.rbi +66 -0
- data/rbi/courier/models/notification_publish_params.rbi +35 -0
- data/rbi/courier/models/notification_replace_params.rbi +35 -0
- data/rbi/courier/models/notification_retrieve_content_params.rbi +13 -5
- data/rbi/courier/models/notification_retrieve_params.rbi +54 -0
- data/rbi/courier/models/notification_template_create_request.rbi +102 -0
- data/rbi/courier/models/notification_template_get_response.rbi +162 -0
- data/rbi/courier/models/notification_template_mutation_response.rbi +121 -0
- data/rbi/courier/models/notification_template_payload.rbi +183 -0
- data/rbi/courier/models/notification_template_publish_request.rbi +35 -0
- data/rbi/courier/models/notification_template_summary.rbi +124 -0
- data/rbi/courier/models/notification_template_update_request.rbi +103 -0
- data/rbi/courier/models/notification_template_version_list_response.rbi +41 -0
- data/rbi/courier/models/notifications/check_delete_params.rbi +10 -2
- data/rbi/courier/models/notifications/check_list_params.rbi +10 -2
- data/rbi/courier/models/notifications/check_update_params.rbi +6 -1
- data/rbi/courier/models/notifications/draft_retrieve_content_params.rbi +13 -5
- data/rbi/courier/models/profile_create_params.rbi +6 -1
- data/rbi/courier/models/profile_delete_params.rbi +13 -5
- data/rbi/courier/models/profile_replace_params.rbi +6 -1
- data/rbi/courier/models/profile_retrieve_params.rbi +13 -5
- data/rbi/courier/models/profile_update_params.rbi +6 -0
- data/rbi/courier/models/profiles/list_delete_params.rbi +13 -5
- data/rbi/courier/models/profiles/list_retrieve_params.rbi +6 -0
- data/rbi/courier/models/profiles/list_subscribe_params.rbi +6 -1
- data/rbi/courier/models/provider.rbi +87 -0
- data/rbi/courier/models/provider_create_params.rbi +82 -0
- data/rbi/courier/models/provider_delete_params.rbi +35 -0
- data/rbi/courier/models/provider_list_params.rbi +43 -0
- data/rbi/courier/models/provider_list_response.rbi +42 -0
- data/rbi/courier/models/provider_retrieve_params.rbi +35 -0
- data/rbi/courier/models/provider_update_params.rbi +86 -0
- data/rbi/courier/models/providers/catalog_list_params.rbi +75 -0
- data/rbi/courier/models/providers/catalog_list_response.rbi +47 -0
- data/rbi/courier/models/providers_catalog_entry.rbi +129 -0
- data/rbi/courier/models/request_archive_params.rbi +13 -5
- data/rbi/courier/models/routing_strategy_archive_params.rbi +38 -0
- data/rbi/courier/models/routing_strategy_create_params.rbi +30 -0
- data/rbi/courier/models/routing_strategy_create_request.rbi +86 -0
- data/rbi/courier/models/routing_strategy_get_response.rbi +121 -0
- data/rbi/courier/models/routing_strategy_list_params.rbi +54 -0
- data/rbi/courier/models/routing_strategy_list_response.rbi +45 -0
- data/rbi/courier/models/routing_strategy_mutation_response.rbi +31 -0
- data/rbi/courier/models/routing_strategy_replace_params.rbi +38 -0
- data/rbi/courier/models/routing_strategy_replace_request.rbi +87 -0
- data/rbi/courier/models/routing_strategy_retrieve_params.rbi +38 -0
- data/rbi/courier/models/routing_strategy_summary.rbi +95 -0
- data/rbi/courier/models/send_message_params.rbi +6 -362
- data/rbi/courier/models/tenant_delete_params.rbi +13 -5
- data/rbi/courier/models/tenant_list_users_params.rbi +6 -0
- data/rbi/courier/models/tenant_retrieve_params.rbi +13 -5
- data/rbi/courier/models/tenant_template_input.rbi +8 -336
- data/rbi/courier/models/tenant_update_params.rbi +6 -0
- data/rbi/courier/models/tenants/preferences/item_delete_params.rbi +10 -2
- data/rbi/courier/models/tenants/preferences/item_update_params.rbi +10 -2
- data/rbi/courier/models/tenants/template_list_params.rbi +6 -0
- data/rbi/courier/models/tenants/template_publish_params.rbi +10 -2
- data/rbi/courier/models/tenants/template_replace_params.rbi +10 -2
- data/rbi/courier/models/tenants/template_retrieve_params.rbi +10 -2
- data/rbi/courier/models/tenants/templates/version_retrieve_params.rbi +6 -1
- data/rbi/courier/models/timeouts.rbi +33 -0
- data/rbi/courier/models/translation_retrieve_params.rbi +10 -2
- data/rbi/courier/models/translation_update_params.rbi +6 -1
- data/rbi/courier/models/users/preference_retrieve_params.rbi +6 -0
- data/rbi/courier/models/users/preference_retrieve_topic_params.rbi +6 -0
- data/rbi/courier/models/users/preference_update_or_create_topic_params.rbi +6 -0
- data/rbi/courier/models/users/tenant_add_multiple_params.rbi +6 -1
- data/rbi/courier/models/users/tenant_add_single_params.rbi +6 -1
- data/rbi/courier/models/users/tenant_list_params.rbi +6 -0
- data/rbi/courier/models/users/tenant_remove_all_params.rbi +13 -5
- data/rbi/courier/models/users/tenant_remove_single_params.rbi +10 -2
- data/rbi/courier/models/users/token_add_multiple_params.rbi +13 -5
- data/rbi/courier/models/users/token_add_single_params.rbi +290 -3
- data/rbi/courier/models/users/token_delete_params.rbi +10 -2
- data/rbi/courier/models/users/token_list_params.rbi +13 -5
- data/rbi/courier/models/users/token_retrieve_params.rbi +10 -2
- data/rbi/courier/models/users/token_update_params.rbi +6 -1
- data/rbi/courier/models/version_node.rbi +65 -0
- data/rbi/courier/models.rbi +106 -0
- data/rbi/courier/resources/journeys.rbi +64 -0
- data/rbi/courier/resources/notifications.rbi +119 -1
- data/rbi/courier/resources/providers/catalog.rbi +38 -0
- data/rbi/courier/resources/providers.rbi +116 -0
- data/rbi/courier/resources/routing_strategies.rbi +126 -0
- data/rbi/courier/resources/users/tokens.rbi +11 -9
- data/sig/courier/client.rbs +6 -0
- data/sig/courier/internal/util.rbs +14 -0
- data/sig/courier/models/audience_delete_params.rbs +11 -3
- data/sig/courier/models/audience_list_members_params.rbs +6 -1
- data/sig/courier/models/audience_retrieve_params.rbs +11 -3
- data/sig/courier/models/audience_update_params.rbs +5 -0
- data/sig/courier/models/audit_event_retrieve_params.rbs +11 -3
- data/sig/courier/models/automations/invoke_invoke_by_template_params.rbs +5 -0
- data/sig/courier/models/brand_delete_params.rbs +11 -3
- data/sig/courier/models/brand_retrieve_params.rbs +11 -3
- data/sig/courier/models/brand_update_params.rbs +5 -0
- data/sig/courier/models/bulk_add_users_params.rbs +5 -1
- data/sig/courier/models/bulk_list_users_params.rbs +6 -1
- data/sig/courier/models/bulk_retrieve_job_params.rbs +11 -3
- data/sig/courier/models/bulk_run_job_params.rbs +11 -3
- data/sig/courier/models/channel.rbs +61 -0
- data/sig/courier/models/channel_metadata.rbs +13 -0
- data/sig/courier/models/elemental_content.rbs +3 -11
- data/sig/courier/models/elemental_html_node_with_type.rbs +32 -0
- data/sig/courier/models/elemental_node.rbs +1 -0
- data/sig/courier/models/journey.rbs +55 -0
- data/sig/courier/models/journey_invoke_params.rbs +25 -0
- data/sig/courier/models/journey_list_params.rbs +45 -0
- data/sig/courier/models/journeys_invoke_request.rbs +36 -0
- data/sig/courier/models/journeys_invoke_response.rbs +13 -0
- data/sig/courier/models/journeys_list_response.rbs +23 -0
- data/sig/courier/models/list_delete_params.rbs +12 -3
- data/sig/courier/models/list_restore_params.rbs +11 -3
- data/sig/courier/models/list_retrieve_params.rbs +11 -3
- data/sig/courier/models/list_update_params.rbs +9 -1
- data/sig/courier/models/lists/subscription_add_params.rbs +8 -1
- data/sig/courier/models/lists/subscription_list_params.rbs +6 -1
- data/sig/courier/models/lists/subscription_subscribe_params.rbs +8 -1
- data/sig/courier/models/lists/subscription_subscribe_user_params.rbs +9 -1
- data/sig/courier/models/lists/subscription_unsubscribe_user_params.rbs +6 -1
- data/sig/courier/models/message_cancel_params.rbs +11 -3
- data/sig/courier/models/message_channels.rbs +7 -0
- data/sig/courier/models/message_content_params.rbs +11 -3
- data/sig/courier/models/message_details.rbs +31 -23
- data/sig/courier/models/message_history_params.rbs +6 -1
- data/sig/courier/models/message_providers.rbs +7 -0
- data/sig/courier/models/message_providers_type.rbs +35 -0
- data/sig/courier/models/message_retrieve_params.rbs +11 -3
- data/sig/courier/models/metadata.rbs +13 -0
- data/sig/courier/models/notification_archive_params.rbs +20 -0
- data/sig/courier/models/notification_create_params.rbs +15 -0
- data/sig/courier/models/notification_list_params.rbs +7 -1
- data/sig/courier/models/notification_list_response.rbs +81 -71
- data/sig/courier/models/notification_list_versions_params.rbs +36 -0
- data/sig/courier/models/notification_publish_params.rbs +22 -0
- data/sig/courier/models/notification_replace_params.rbs +22 -0
- data/sig/courier/models/notification_retrieve_content_params.rbs +8 -3
- data/sig/courier/models/notification_retrieve_params.rbs +30 -0
- data/sig/courier/models/notification_template_create_request.rbs +40 -0
- data/sig/courier/models/notification_template_get_response.rbs +72 -0
- data/sig/courier/models/notification_template_mutation_response.rbs +46 -0
- data/sig/courier/models/notification_template_payload.rbs +75 -0
- data/sig/courier/models/notification_template_publish_request.rbs +15 -0
- data/sig/courier/models/notification_template_summary.rbs +70 -0
- data/sig/courier/models/notification_template_update_request.rbs +40 -0
- data/sig/courier/models/notification_template_version_list_response.rbs +22 -0
- data/sig/courier/models/notifications/check_delete_params.rbs +10 -2
- data/sig/courier/models/notifications/check_list_params.rbs +10 -2
- data/sig/courier/models/notifications/check_update_params.rbs +9 -1
- data/sig/courier/models/notifications/draft_retrieve_content_params.rbs +8 -3
- data/sig/courier/models/profile_create_params.rbs +5 -1
- data/sig/courier/models/profile_delete_params.rbs +11 -3
- data/sig/courier/models/profile_replace_params.rbs +5 -1
- data/sig/courier/models/profile_retrieve_params.rbs +11 -3
- data/sig/courier/models/profile_update_params.rbs +5 -1
- data/sig/courier/models/profiles/list_delete_params.rbs +11 -3
- data/sig/courier/models/profiles/list_retrieve_params.rbs +6 -1
- data/sig/courier/models/profiles/list_subscribe_params.rbs +8 -1
- data/sig/courier/models/provider.rbs +52 -0
- data/sig/courier/models/provider_create_params.rbs +47 -0
- data/sig/courier/models/provider_delete_params.rbs +20 -0
- data/sig/courier/models/provider_list_params.rbs +25 -0
- data/sig/courier/models/provider_list_response.rbs +22 -0
- data/sig/courier/models/provider_retrieve_params.rbs +20 -0
- data/sig/courier/models/provider_update_params.rbs +52 -0
- data/sig/courier/models/providers/catalog_list_params.rbs +40 -0
- data/sig/courier/models/providers/catalog_list_response.rbs +27 -0
- data/sig/courier/models/providers_catalog_entry.rbs +64 -0
- data/sig/courier/models/request_archive_params.rbs +11 -3
- data/sig/courier/models/routing_strategy_archive_params.rbs +20 -0
- data/sig/courier/models/routing_strategy_create_params.rbs +15 -0
- data/sig/courier/models/routing_strategy_create_request.rbs +45 -0
- data/sig/courier/models/routing_strategy_get_response.rbs +70 -0
- data/sig/courier/models/routing_strategy_list_params.rbs +30 -0
- data/sig/courier/models/routing_strategy_list_response.rbs +25 -0
- data/sig/courier/models/routing_strategy_mutation_response.rbs +13 -0
- data/sig/courier/models/routing_strategy_replace_params.rbs +22 -0
- data/sig/courier/models/routing_strategy_replace_request.rbs +45 -0
- data/sig/courier/models/routing_strategy_retrieve_params.rbs +20 -0
- data/sig/courier/models/routing_strategy_summary.rbs +55 -0
- data/sig/courier/models/send_message_params.rbs +8 -130
- data/sig/courier/models/tenant_delete_params.rbs +11 -3
- data/sig/courier/models/tenant_list_users_params.rbs +5 -1
- data/sig/courier/models/tenant_retrieve_params.rbs +11 -3
- data/sig/courier/models/tenant_template_input.rbs +12 -134
- data/sig/courier/models/tenant_update_params.rbs +5 -0
- data/sig/courier/models/tenants/preferences/item_delete_params.rbs +6 -1
- data/sig/courier/models/tenants/preferences/item_update_params.rbs +8 -1
- data/sig/courier/models/tenants/template_list_params.rbs +5 -1
- data/sig/courier/models/tenants/template_publish_params.rbs +8 -1
- data/sig/courier/models/tenants/template_replace_params.rbs +8 -1
- data/sig/courier/models/tenants/template_retrieve_params.rbs +6 -1
- data/sig/courier/models/tenants/templates/version_retrieve_params.rbs +5 -1
- data/sig/courier/models/timeouts.rbs +15 -0
- data/sig/courier/models/translation_retrieve_params.rbs +6 -1
- data/sig/courier/models/translation_update_params.rbs +5 -1
- data/sig/courier/models/users/preference_retrieve_params.rbs +6 -1
- data/sig/courier/models/users/preference_retrieve_topic_params.rbs +5 -1
- data/sig/courier/models/users/preference_update_or_create_topic_params.rbs +5 -0
- data/sig/courier/models/users/tenant_add_multiple_params.rbs +5 -1
- data/sig/courier/models/users/tenant_add_single_params.rbs +5 -1
- data/sig/courier/models/users/tenant_list_params.rbs +5 -1
- data/sig/courier/models/users/tenant_remove_all_params.rbs +11 -3
- data/sig/courier/models/users/tenant_remove_single_params.rbs +6 -1
- data/sig/courier/models/users/token_add_multiple_params.rbs +11 -3
- data/sig/courier/models/users/token_add_single_params.rbs +127 -4
- data/sig/courier/models/users/token_delete_params.rbs +6 -1
- data/sig/courier/models/users/token_list_params.rbs +11 -3
- data/sig/courier/models/users/token_retrieve_params.rbs +6 -1
- data/sig/courier/models/users/token_update_params.rbs +5 -0
- data/sig/courier/models/version_node.rbs +32 -0
- data/sig/courier/models.rbs +96 -0
- data/sig/courier/resources/journeys.rbs +21 -0
- data/sig/courier/resources/notifications.rbs +35 -0
- data/sig/courier/resources/providers/catalog.rbs +16 -0
- data/sig/courier/resources/providers.rbs +38 -0
- data/sig/courier/resources/routing_strategies.rbs +41 -0
- data/sig/courier/resources/users/tokens.rbs +5 -6
- metadata +164 -2
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationTemplateCreateRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::NotificationTemplateCreateRequest,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Full document shape used in POST and PUT request bodies, and returned inside the
|
|
15
|
+
# GET response envelope.
|
|
16
|
+
sig { returns(Courier::NotificationTemplatePayload) }
|
|
17
|
+
attr_reader :notification
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(notification: Courier::NotificationTemplatePayload::OrHash).void
|
|
21
|
+
end
|
|
22
|
+
attr_writer :notification
|
|
23
|
+
|
|
24
|
+
# Template state after creation. Case-insensitive input, normalized to uppercase
|
|
25
|
+
# in the response. Defaults to "DRAFT".
|
|
26
|
+
sig do
|
|
27
|
+
returns(
|
|
28
|
+
T.nilable(Courier::NotificationTemplateCreateRequest::State::OrSymbol)
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
attr_reader :state
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
state: Courier::NotificationTemplateCreateRequest::State::OrSymbol
|
|
36
|
+
).void
|
|
37
|
+
end
|
|
38
|
+
attr_writer :state
|
|
39
|
+
|
|
40
|
+
# Request body for creating a notification template.
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
notification: Courier::NotificationTemplatePayload::OrHash,
|
|
44
|
+
state: Courier::NotificationTemplateCreateRequest::State::OrSymbol
|
|
45
|
+
).returns(T.attached_class)
|
|
46
|
+
end
|
|
47
|
+
def self.new(
|
|
48
|
+
# Full document shape used in POST and PUT request bodies, and returned inside the
|
|
49
|
+
# GET response envelope.
|
|
50
|
+
notification:,
|
|
51
|
+
# Template state after creation. Case-insensitive input, normalized to uppercase
|
|
52
|
+
# in the response. Defaults to "DRAFT".
|
|
53
|
+
state: nil
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
override.returns(
|
|
59
|
+
{
|
|
60
|
+
notification: Courier::NotificationTemplatePayload,
|
|
61
|
+
state: Courier::NotificationTemplateCreateRequest::State::OrSymbol
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
def to_hash
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Template state after creation. Case-insensitive input, normalized to uppercase
|
|
69
|
+
# in the response. Defaults to "DRAFT".
|
|
70
|
+
module State
|
|
71
|
+
extend Courier::Internal::Type::Enum
|
|
72
|
+
|
|
73
|
+
TaggedSymbol =
|
|
74
|
+
T.type_alias do
|
|
75
|
+
T.all(Symbol, Courier::NotificationTemplateCreateRequest::State)
|
|
76
|
+
end
|
|
77
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
78
|
+
|
|
79
|
+
DRAFT =
|
|
80
|
+
T.let(
|
|
81
|
+
:DRAFT,
|
|
82
|
+
Courier::NotificationTemplateCreateRequest::State::TaggedSymbol
|
|
83
|
+
)
|
|
84
|
+
PUBLISHED =
|
|
85
|
+
T.let(
|
|
86
|
+
:PUBLISHED,
|
|
87
|
+
Courier::NotificationTemplateCreateRequest::State::TaggedSymbol
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
sig do
|
|
91
|
+
override.returns(
|
|
92
|
+
T::Array[
|
|
93
|
+
Courier::NotificationTemplateCreateRequest::State::TaggedSymbol
|
|
94
|
+
]
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
def self.values
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationTemplateGetResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::NotificationTemplateGetResponse,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Epoch milliseconds when the template was created.
|
|
15
|
+
sig { returns(Integer) }
|
|
16
|
+
attr_accessor :created
|
|
17
|
+
|
|
18
|
+
# User ID of the creator.
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :creator
|
|
21
|
+
|
|
22
|
+
# Full document shape used in POST and PUT request bodies, and returned inside the
|
|
23
|
+
# GET response envelope.
|
|
24
|
+
sig { returns(Courier::NotificationTemplateGetResponse::Notification) }
|
|
25
|
+
attr_reader :notification
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
notification:
|
|
30
|
+
Courier::NotificationTemplateGetResponse::Notification::OrHash
|
|
31
|
+
).void
|
|
32
|
+
end
|
|
33
|
+
attr_writer :notification
|
|
34
|
+
|
|
35
|
+
# The template state. Always uppercase.
|
|
36
|
+
sig do
|
|
37
|
+
returns(Courier::NotificationTemplateGetResponse::State::TaggedSymbol)
|
|
38
|
+
end
|
|
39
|
+
attr_accessor :state
|
|
40
|
+
|
|
41
|
+
# Epoch milliseconds of last update.
|
|
42
|
+
sig { returns(T.nilable(Integer)) }
|
|
43
|
+
attr_reader :updated
|
|
44
|
+
|
|
45
|
+
sig { params(updated: Integer).void }
|
|
46
|
+
attr_writer :updated
|
|
47
|
+
|
|
48
|
+
# User ID of the last updater.
|
|
49
|
+
sig { returns(T.nilable(String)) }
|
|
50
|
+
attr_reader :updater
|
|
51
|
+
|
|
52
|
+
sig { params(updater: String).void }
|
|
53
|
+
attr_writer :updater
|
|
54
|
+
|
|
55
|
+
# Envelope response for GET /notifications/{id}. The notification object mirrors
|
|
56
|
+
# the POST/PUT input shape. Nullable fields return null when unset.
|
|
57
|
+
sig do
|
|
58
|
+
params(
|
|
59
|
+
created: Integer,
|
|
60
|
+
creator: String,
|
|
61
|
+
notification:
|
|
62
|
+
Courier::NotificationTemplateGetResponse::Notification::OrHash,
|
|
63
|
+
state: Courier::NotificationTemplateGetResponse::State::OrSymbol,
|
|
64
|
+
updated: Integer,
|
|
65
|
+
updater: String
|
|
66
|
+
).returns(T.attached_class)
|
|
67
|
+
end
|
|
68
|
+
def self.new(
|
|
69
|
+
# Epoch milliseconds when the template was created.
|
|
70
|
+
created:,
|
|
71
|
+
# User ID of the creator.
|
|
72
|
+
creator:,
|
|
73
|
+
# Full document shape used in POST and PUT request bodies, and returned inside the
|
|
74
|
+
# GET response envelope.
|
|
75
|
+
notification:,
|
|
76
|
+
# The template state. Always uppercase.
|
|
77
|
+
state:,
|
|
78
|
+
# Epoch milliseconds of last update.
|
|
79
|
+
updated: nil,
|
|
80
|
+
# User ID of the last updater.
|
|
81
|
+
updater: nil
|
|
82
|
+
)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
sig do
|
|
86
|
+
override.returns(
|
|
87
|
+
{
|
|
88
|
+
created: Integer,
|
|
89
|
+
creator: String,
|
|
90
|
+
notification:
|
|
91
|
+
Courier::NotificationTemplateGetResponse::Notification,
|
|
92
|
+
state:
|
|
93
|
+
Courier::NotificationTemplateGetResponse::State::TaggedSymbol,
|
|
94
|
+
updated: Integer,
|
|
95
|
+
updater: String
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
def to_hash
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
class Notification < Courier::Models::NotificationTemplatePayload
|
|
103
|
+
OrHash =
|
|
104
|
+
T.type_alias do
|
|
105
|
+
T.any(
|
|
106
|
+
Courier::NotificationTemplateGetResponse::Notification,
|
|
107
|
+
Courier::Internal::AnyHash
|
|
108
|
+
)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# The template ID.
|
|
112
|
+
sig { returns(String) }
|
|
113
|
+
attr_accessor :id
|
|
114
|
+
|
|
115
|
+
# Full document shape used in POST and PUT request bodies, and returned inside the
|
|
116
|
+
# GET response envelope.
|
|
117
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
118
|
+
def self.new(
|
|
119
|
+
# The template ID.
|
|
120
|
+
id:
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
sig { override.returns({ id: String }) }
|
|
125
|
+
def to_hash
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# The template state. Always uppercase.
|
|
130
|
+
module State
|
|
131
|
+
extend Courier::Internal::Type::Enum
|
|
132
|
+
|
|
133
|
+
TaggedSymbol =
|
|
134
|
+
T.type_alias do
|
|
135
|
+
T.all(Symbol, Courier::NotificationTemplateGetResponse::State)
|
|
136
|
+
end
|
|
137
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
138
|
+
|
|
139
|
+
DRAFT =
|
|
140
|
+
T.let(
|
|
141
|
+
:DRAFT,
|
|
142
|
+
Courier::NotificationTemplateGetResponse::State::TaggedSymbol
|
|
143
|
+
)
|
|
144
|
+
PUBLISHED =
|
|
145
|
+
T.let(
|
|
146
|
+
:PUBLISHED,
|
|
147
|
+
Courier::NotificationTemplateGetResponse::State::TaggedSymbol
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
sig do
|
|
151
|
+
override.returns(
|
|
152
|
+
T::Array[
|
|
153
|
+
Courier::NotificationTemplateGetResponse::State::TaggedSymbol
|
|
154
|
+
]
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
def self.values
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationTemplateMutationResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::NotificationTemplateMutationResponse,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig do
|
|
15
|
+
returns(Courier::NotificationTemplateMutationResponse::Notification)
|
|
16
|
+
end
|
|
17
|
+
attr_reader :notification
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
notification:
|
|
22
|
+
Courier::NotificationTemplateMutationResponse::Notification::OrHash
|
|
23
|
+
).void
|
|
24
|
+
end
|
|
25
|
+
attr_writer :notification
|
|
26
|
+
|
|
27
|
+
# The template state after the operation. Always uppercase.
|
|
28
|
+
sig do
|
|
29
|
+
returns(
|
|
30
|
+
Courier::NotificationTemplateMutationResponse::State::TaggedSymbol
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
attr_accessor :state
|
|
34
|
+
|
|
35
|
+
# Response returned by POST and PUT operations.
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
notification:
|
|
39
|
+
Courier::NotificationTemplateMutationResponse::Notification::OrHash,
|
|
40
|
+
state: Courier::NotificationTemplateMutationResponse::State::OrSymbol
|
|
41
|
+
).returns(T.attached_class)
|
|
42
|
+
end
|
|
43
|
+
def self.new(
|
|
44
|
+
notification:,
|
|
45
|
+
# The template state after the operation. Always uppercase.
|
|
46
|
+
state:
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
notification:
|
|
54
|
+
Courier::NotificationTemplateMutationResponse::Notification,
|
|
55
|
+
state:
|
|
56
|
+
Courier::NotificationTemplateMutationResponse::State::TaggedSymbol
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
def to_hash
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
class Notification < Courier::Internal::Type::BaseModel
|
|
64
|
+
OrHash =
|
|
65
|
+
T.type_alias do
|
|
66
|
+
T.any(
|
|
67
|
+
Courier::NotificationTemplateMutationResponse::Notification,
|
|
68
|
+
Courier::Internal::AnyHash
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# The ID of the created or updated template.
|
|
73
|
+
sig { returns(String) }
|
|
74
|
+
attr_accessor :id
|
|
75
|
+
|
|
76
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
77
|
+
def self.new(
|
|
78
|
+
# The ID of the created or updated template.
|
|
79
|
+
id:
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
sig { override.returns({ id: String }) }
|
|
84
|
+
def to_hash
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# The template state after the operation. Always uppercase.
|
|
89
|
+
module State
|
|
90
|
+
extend Courier::Internal::Type::Enum
|
|
91
|
+
|
|
92
|
+
TaggedSymbol =
|
|
93
|
+
T.type_alias do
|
|
94
|
+
T.all(Symbol, Courier::NotificationTemplateMutationResponse::State)
|
|
95
|
+
end
|
|
96
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
97
|
+
|
|
98
|
+
DRAFT =
|
|
99
|
+
T.let(
|
|
100
|
+
:DRAFT,
|
|
101
|
+
Courier::NotificationTemplateMutationResponse::State::TaggedSymbol
|
|
102
|
+
)
|
|
103
|
+
PUBLISHED =
|
|
104
|
+
T.let(
|
|
105
|
+
:PUBLISHED,
|
|
106
|
+
Courier::NotificationTemplateMutationResponse::State::TaggedSymbol
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
sig do
|
|
110
|
+
override.returns(
|
|
111
|
+
T::Array[
|
|
112
|
+
Courier::NotificationTemplateMutationResponse::State::TaggedSymbol
|
|
113
|
+
]
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
def self.values
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationTemplatePayload < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::NotificationTemplatePayload,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Brand reference, or null for no brand.
|
|
15
|
+
sig { returns(T.nilable(Courier::NotificationTemplatePayload::Brand)) }
|
|
16
|
+
attr_reader :brand
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
brand: T.nilable(Courier::NotificationTemplatePayload::Brand::OrHash)
|
|
21
|
+
).void
|
|
22
|
+
end
|
|
23
|
+
attr_writer :brand
|
|
24
|
+
|
|
25
|
+
# Elemental content definition.
|
|
26
|
+
sig { returns(Courier::ElementalContent) }
|
|
27
|
+
attr_reader :content
|
|
28
|
+
|
|
29
|
+
sig { params(content: Courier::ElementalContent::OrHash).void }
|
|
30
|
+
attr_writer :content
|
|
31
|
+
|
|
32
|
+
# Display name for the template.
|
|
33
|
+
sig { returns(String) }
|
|
34
|
+
attr_accessor :name
|
|
35
|
+
|
|
36
|
+
# Routing strategy reference, or null for none.
|
|
37
|
+
sig { returns(T.nilable(Courier::NotificationTemplatePayload::Routing)) }
|
|
38
|
+
attr_reader :routing
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
params(
|
|
42
|
+
routing:
|
|
43
|
+
T.nilable(Courier::NotificationTemplatePayload::Routing::OrHash)
|
|
44
|
+
).void
|
|
45
|
+
end
|
|
46
|
+
attr_writer :routing
|
|
47
|
+
|
|
48
|
+
# Subscription topic reference, or null for none.
|
|
49
|
+
sig do
|
|
50
|
+
returns(T.nilable(Courier::NotificationTemplatePayload::Subscription))
|
|
51
|
+
end
|
|
52
|
+
attr_reader :subscription
|
|
53
|
+
|
|
54
|
+
sig do
|
|
55
|
+
params(
|
|
56
|
+
subscription:
|
|
57
|
+
T.nilable(
|
|
58
|
+
Courier::NotificationTemplatePayload::Subscription::OrHash
|
|
59
|
+
)
|
|
60
|
+
).void
|
|
61
|
+
end
|
|
62
|
+
attr_writer :subscription
|
|
63
|
+
|
|
64
|
+
# Tags for categorization. Send empty array for none.
|
|
65
|
+
sig { returns(T::Array[String]) }
|
|
66
|
+
attr_accessor :tags
|
|
67
|
+
|
|
68
|
+
# Full document shape used in POST and PUT request bodies, and returned inside the
|
|
69
|
+
# GET response envelope.
|
|
70
|
+
sig do
|
|
71
|
+
params(
|
|
72
|
+
brand: T.nilable(Courier::NotificationTemplatePayload::Brand::OrHash),
|
|
73
|
+
content: Courier::ElementalContent::OrHash,
|
|
74
|
+
name: String,
|
|
75
|
+
routing:
|
|
76
|
+
T.nilable(Courier::NotificationTemplatePayload::Routing::OrHash),
|
|
77
|
+
subscription:
|
|
78
|
+
T.nilable(
|
|
79
|
+
Courier::NotificationTemplatePayload::Subscription::OrHash
|
|
80
|
+
),
|
|
81
|
+
tags: T::Array[String]
|
|
82
|
+
).returns(T.attached_class)
|
|
83
|
+
end
|
|
84
|
+
def self.new(
|
|
85
|
+
# Brand reference, or null for no brand.
|
|
86
|
+
brand:,
|
|
87
|
+
# Elemental content definition.
|
|
88
|
+
content:,
|
|
89
|
+
# Display name for the template.
|
|
90
|
+
name:,
|
|
91
|
+
# Routing strategy reference, or null for none.
|
|
92
|
+
routing:,
|
|
93
|
+
# Subscription topic reference, or null for none.
|
|
94
|
+
subscription:,
|
|
95
|
+
# Tags for categorization. Send empty array for none.
|
|
96
|
+
tags:
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
sig do
|
|
101
|
+
override.returns(
|
|
102
|
+
{
|
|
103
|
+
brand: T.nilable(Courier::NotificationTemplatePayload::Brand),
|
|
104
|
+
content: Courier::ElementalContent,
|
|
105
|
+
name: String,
|
|
106
|
+
routing: T.nilable(Courier::NotificationTemplatePayload::Routing),
|
|
107
|
+
subscription:
|
|
108
|
+
T.nilable(Courier::NotificationTemplatePayload::Subscription),
|
|
109
|
+
tags: T::Array[String]
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
end
|
|
113
|
+
def to_hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
class Brand < Courier::Internal::Type::BaseModel
|
|
117
|
+
OrHash =
|
|
118
|
+
T.type_alias do
|
|
119
|
+
T.any(
|
|
120
|
+
Courier::NotificationTemplatePayload::Brand,
|
|
121
|
+
Courier::Internal::AnyHash
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
sig { returns(String) }
|
|
126
|
+
attr_accessor :id
|
|
127
|
+
|
|
128
|
+
# Brand reference, or null for no brand.
|
|
129
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
130
|
+
def self.new(id:)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
sig { override.returns({ id: String }) }
|
|
134
|
+
def to_hash
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
class Routing < Courier::Internal::Type::BaseModel
|
|
139
|
+
OrHash =
|
|
140
|
+
T.type_alias do
|
|
141
|
+
T.any(
|
|
142
|
+
Courier::NotificationTemplatePayload::Routing,
|
|
143
|
+
Courier::Internal::AnyHash
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
sig { returns(String) }
|
|
148
|
+
attr_accessor :strategy_id
|
|
149
|
+
|
|
150
|
+
# Routing strategy reference, or null for none.
|
|
151
|
+
sig { params(strategy_id: String).returns(T.attached_class) }
|
|
152
|
+
def self.new(strategy_id:)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
sig { override.returns({ strategy_id: String }) }
|
|
156
|
+
def to_hash
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
class Subscription < Courier::Internal::Type::BaseModel
|
|
161
|
+
OrHash =
|
|
162
|
+
T.type_alias do
|
|
163
|
+
T.any(
|
|
164
|
+
Courier::NotificationTemplatePayload::Subscription,
|
|
165
|
+
Courier::Internal::AnyHash
|
|
166
|
+
)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
sig { returns(String) }
|
|
170
|
+
attr_accessor :topic_id
|
|
171
|
+
|
|
172
|
+
# Subscription topic reference, or null for none.
|
|
173
|
+
sig { params(topic_id: String).returns(T.attached_class) }
|
|
174
|
+
def self.new(topic_id:)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
sig { override.returns({ topic_id: String }) }
|
|
178
|
+
def to_hash
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class NotificationTemplatePublishRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::NotificationTemplatePublishRequest,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Historical version to publish (e.g. "v001"). Omit to publish the current draft.
|
|
15
|
+
sig { returns(T.nilable(String)) }
|
|
16
|
+
attr_reader :version
|
|
17
|
+
|
|
18
|
+
sig { params(version: String).void }
|
|
19
|
+
attr_writer :version
|
|
20
|
+
|
|
21
|
+
# Optional request body for publishing a notification template. Omit or send an
|
|
22
|
+
# empty object to publish the current draft.
|
|
23
|
+
sig { params(version: String).returns(T.attached_class) }
|
|
24
|
+
def self.new(
|
|
25
|
+
# Historical version to publish (e.g. "v001"). Omit to publish the current draft.
|
|
26
|
+
version: nil
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig { override.returns({ version: String }) }
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|