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
|
@@ -11,15 +11,23 @@ module Courier
|
|
|
11
11
|
T.any(Courier::BulkRunJobParams, Courier::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :job_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
job_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(job_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ job_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class Channel < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Courier::Channel, Courier::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
# Brand id used for rendering.
|
|
10
|
+
sig { returns(T.nilable(String)) }
|
|
11
|
+
attr_accessor :brand_id
|
|
12
|
+
|
|
13
|
+
# JS conditional with access to data/profile.
|
|
14
|
+
sig { returns(T.nilable(String)) }
|
|
15
|
+
attr_accessor :if_
|
|
16
|
+
|
|
17
|
+
sig { returns(T.nilable(Courier::ChannelMetadata)) }
|
|
18
|
+
attr_reader :metadata
|
|
19
|
+
|
|
20
|
+
sig { params(metadata: T.nilable(Courier::ChannelMetadata::OrHash)).void }
|
|
21
|
+
attr_writer :metadata
|
|
22
|
+
|
|
23
|
+
# Channel specific overrides.
|
|
24
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
25
|
+
attr_accessor :override
|
|
26
|
+
|
|
27
|
+
# Providers enabled for this channel.
|
|
28
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
29
|
+
attr_accessor :providers
|
|
30
|
+
|
|
31
|
+
# Defaults to `single`.
|
|
32
|
+
sig { returns(T.nilable(Courier::Channel::RoutingMethod::OrSymbol)) }
|
|
33
|
+
attr_accessor :routing_method
|
|
34
|
+
|
|
35
|
+
sig { returns(T.nilable(Courier::Timeouts)) }
|
|
36
|
+
attr_reader :timeouts
|
|
37
|
+
|
|
38
|
+
sig { params(timeouts: T.nilable(Courier::Timeouts::OrHash)).void }
|
|
39
|
+
attr_writer :timeouts
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
params(
|
|
43
|
+
brand_id: T.nilable(String),
|
|
44
|
+
if_: T.nilable(String),
|
|
45
|
+
metadata: T.nilable(Courier::ChannelMetadata::OrHash),
|
|
46
|
+
override: T.nilable(T::Hash[Symbol, T.anything]),
|
|
47
|
+
providers: T.nilable(T::Array[String]),
|
|
48
|
+
routing_method: T.nilable(Courier::Channel::RoutingMethod::OrSymbol),
|
|
49
|
+
timeouts: T.nilable(Courier::Timeouts::OrHash)
|
|
50
|
+
).returns(T.attached_class)
|
|
51
|
+
end
|
|
52
|
+
def self.new(
|
|
53
|
+
# Brand id used for rendering.
|
|
54
|
+
brand_id: nil,
|
|
55
|
+
# JS conditional with access to data/profile.
|
|
56
|
+
if_: nil,
|
|
57
|
+
metadata: nil,
|
|
58
|
+
# Channel specific overrides.
|
|
59
|
+
override: nil,
|
|
60
|
+
# Providers enabled for this channel.
|
|
61
|
+
providers: nil,
|
|
62
|
+
# Defaults to `single`.
|
|
63
|
+
routing_method: nil,
|
|
64
|
+
timeouts: nil
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
sig do
|
|
69
|
+
override.returns(
|
|
70
|
+
{
|
|
71
|
+
brand_id: T.nilable(String),
|
|
72
|
+
if_: T.nilable(String),
|
|
73
|
+
metadata: T.nilable(Courier::ChannelMetadata),
|
|
74
|
+
override: T.nilable(T::Hash[Symbol, T.anything]),
|
|
75
|
+
providers: T.nilable(T::Array[String]),
|
|
76
|
+
routing_method:
|
|
77
|
+
T.nilable(Courier::Channel::RoutingMethod::OrSymbol),
|
|
78
|
+
timeouts: T.nilable(Courier::Timeouts)
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
def to_hash
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Defaults to `single`.
|
|
86
|
+
module RoutingMethod
|
|
87
|
+
extend Courier::Internal::Type::Enum
|
|
88
|
+
|
|
89
|
+
TaggedSymbol =
|
|
90
|
+
T.type_alias { T.all(Symbol, Courier::Channel::RoutingMethod) }
|
|
91
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
92
|
+
|
|
93
|
+
ALL = T.let(:all, Courier::Channel::RoutingMethod::TaggedSymbol)
|
|
94
|
+
SINGLE = T.let(:single, Courier::Channel::RoutingMethod::TaggedSymbol)
|
|
95
|
+
|
|
96
|
+
sig do
|
|
97
|
+
override.returns(
|
|
98
|
+
T::Array[Courier::Channel::RoutingMethod::TaggedSymbol]
|
|
99
|
+
)
|
|
100
|
+
end
|
|
101
|
+
def self.values
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class ChannelMetadata < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::ChannelMetadata, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(T.nilable(Courier::Utm)) }
|
|
12
|
+
attr_reader :utm
|
|
13
|
+
|
|
14
|
+
sig { params(utm: T.nilable(Courier::Utm::OrHash)).void }
|
|
15
|
+
attr_writer :utm
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(utm: T.nilable(Courier::Utm::OrHash)).returns(T.attached_class)
|
|
19
|
+
end
|
|
20
|
+
def self.new(utm: nil)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { override.returns({ utm: T.nilable(Courier::Utm) }) }
|
|
24
|
+
def to_hash
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -18,7 +18,8 @@ module Courier
|
|
|
18
18
|
Courier::ElementalImageNodeWithType,
|
|
19
19
|
Courier::ElementalActionNodeWithType,
|
|
20
20
|
Courier::ElementalDividerNodeWithType,
|
|
21
|
-
Courier::ElementalQuoteNodeWithType
|
|
21
|
+
Courier::ElementalQuoteNodeWithType,
|
|
22
|
+
Courier::ElementalHTMLNodeWithType
|
|
22
23
|
)
|
|
23
24
|
]
|
|
24
25
|
)
|
|
@@ -29,9 +30,6 @@ module Courier
|
|
|
29
30
|
sig { returns(String) }
|
|
30
31
|
attr_accessor :version
|
|
31
32
|
|
|
32
|
-
sig { returns(T.nilable(String)) }
|
|
33
|
-
attr_accessor :brand
|
|
34
|
-
|
|
35
33
|
sig do
|
|
36
34
|
params(
|
|
37
35
|
elements:
|
|
@@ -43,18 +41,17 @@ module Courier
|
|
|
43
41
|
Courier::ElementalImageNodeWithType::OrHash,
|
|
44
42
|
Courier::ElementalActionNodeWithType::OrHash,
|
|
45
43
|
Courier::ElementalDividerNodeWithType::OrHash,
|
|
46
|
-
Courier::ElementalQuoteNodeWithType::OrHash
|
|
44
|
+
Courier::ElementalQuoteNodeWithType::OrHash,
|
|
45
|
+
Courier::ElementalHTMLNodeWithType::OrHash
|
|
47
46
|
)
|
|
48
47
|
],
|
|
49
|
-
version: String
|
|
50
|
-
brand: T.nilable(String)
|
|
48
|
+
version: String
|
|
51
49
|
).returns(T.attached_class)
|
|
52
50
|
end
|
|
53
51
|
def self.new(
|
|
54
52
|
elements:,
|
|
55
53
|
# For example, "2022-01-01"
|
|
56
|
-
version
|
|
57
|
-
brand: nil
|
|
54
|
+
version:
|
|
58
55
|
)
|
|
59
56
|
end
|
|
60
57
|
|
|
@@ -70,11 +67,11 @@ module Courier
|
|
|
70
67
|
Courier::ElementalImageNodeWithType,
|
|
71
68
|
Courier::ElementalActionNodeWithType,
|
|
72
69
|
Courier::ElementalDividerNodeWithType,
|
|
73
|
-
Courier::ElementalQuoteNodeWithType
|
|
70
|
+
Courier::ElementalQuoteNodeWithType,
|
|
71
|
+
Courier::ElementalHTMLNodeWithType
|
|
74
72
|
)
|
|
75
73
|
],
|
|
76
|
-
version: String
|
|
77
|
-
brand: T.nilable(String)
|
|
74
|
+
version: String
|
|
78
75
|
}
|
|
79
76
|
)
|
|
80
77
|
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class ElementalHTMLNodeWithType < Courier::Models::ElementalBaseNode
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::ElementalHTMLNodeWithType, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig do
|
|
12
|
+
returns(T.nilable(Courier::ElementalHTMLNodeWithType::Type::OrSymbol))
|
|
13
|
+
end
|
|
14
|
+
attr_reader :type
|
|
15
|
+
|
|
16
|
+
sig do
|
|
17
|
+
params(type: Courier::ElementalHTMLNodeWithType::Type::OrSymbol).void
|
|
18
|
+
end
|
|
19
|
+
attr_writer :type
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
type: Courier::ElementalHTMLNodeWithType::Type::OrSymbol
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(type: nil)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ type: Courier::ElementalHTMLNodeWithType::Type::OrSymbol }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
module Type
|
|
38
|
+
extend Courier::Internal::Type::Enum
|
|
39
|
+
|
|
40
|
+
TaggedSymbol =
|
|
41
|
+
T.type_alias do
|
|
42
|
+
T.all(Symbol, Courier::ElementalHTMLNodeWithType::Type)
|
|
43
|
+
end
|
|
44
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
45
|
+
|
|
46
|
+
HTML =
|
|
47
|
+
T.let(:html, Courier::ElementalHTMLNodeWithType::Type::TaggedSymbol)
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
override.returns(
|
|
51
|
+
T::Array[Courier::ElementalHTMLNodeWithType::Type::TaggedSymbol]
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
def self.values
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -24,7 +24,8 @@ module Courier
|
|
|
24
24
|
Courier::ElementalImageNodeWithType,
|
|
25
25
|
Courier::ElementalActionNodeWithType,
|
|
26
26
|
Courier::ElementalDividerNodeWithType,
|
|
27
|
-
Courier::ElementalQuoteNodeWithType
|
|
27
|
+
Courier::ElementalQuoteNodeWithType,
|
|
28
|
+
Courier::ElementalHTMLNodeWithType
|
|
28
29
|
)
|
|
29
30
|
end
|
|
30
31
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class Journey < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Courier::Journey, Courier::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
# The unique identifier of the journey.
|
|
10
|
+
sig { returns(String) }
|
|
11
|
+
attr_accessor :id
|
|
12
|
+
|
|
13
|
+
# The name of the journey.
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :name
|
|
16
|
+
|
|
17
|
+
# The version of the journey (published or draft).
|
|
18
|
+
sig { returns(Courier::Journey::Version::TaggedSymbol) }
|
|
19
|
+
attr_accessor :version
|
|
20
|
+
|
|
21
|
+
# ISO 8601 timestamp when the journey was created.
|
|
22
|
+
sig { returns(T.nilable(Time)) }
|
|
23
|
+
attr_reader :created_at
|
|
24
|
+
|
|
25
|
+
sig { params(created_at: Time).void }
|
|
26
|
+
attr_writer :created_at
|
|
27
|
+
|
|
28
|
+
# ISO 8601 timestamp when the journey was last updated.
|
|
29
|
+
sig { returns(T.nilable(Time)) }
|
|
30
|
+
attr_reader :updated_at
|
|
31
|
+
|
|
32
|
+
sig { params(updated_at: Time).void }
|
|
33
|
+
attr_writer :updated_at
|
|
34
|
+
|
|
35
|
+
# A journey template representing an automation workflow.
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
id: String,
|
|
39
|
+
name: String,
|
|
40
|
+
version: Courier::Journey::Version::OrSymbol,
|
|
41
|
+
created_at: Time,
|
|
42
|
+
updated_at: Time
|
|
43
|
+
).returns(T.attached_class)
|
|
44
|
+
end
|
|
45
|
+
def self.new(
|
|
46
|
+
# The unique identifier of the journey.
|
|
47
|
+
id:,
|
|
48
|
+
# The name of the journey.
|
|
49
|
+
name:,
|
|
50
|
+
# The version of the journey (published or draft).
|
|
51
|
+
version:,
|
|
52
|
+
# ISO 8601 timestamp when the journey was created.
|
|
53
|
+
created_at: nil,
|
|
54
|
+
# ISO 8601 timestamp when the journey was last updated.
|
|
55
|
+
updated_at: nil
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
sig do
|
|
60
|
+
override.returns(
|
|
61
|
+
{
|
|
62
|
+
id: String,
|
|
63
|
+
name: String,
|
|
64
|
+
version: Courier::Journey::Version::TaggedSymbol,
|
|
65
|
+
created_at: Time,
|
|
66
|
+
updated_at: Time
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
def to_hash
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# The version of the journey (published or draft).
|
|
74
|
+
module Version
|
|
75
|
+
extend Courier::Internal::Type::Enum
|
|
76
|
+
|
|
77
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Courier::Journey::Version) }
|
|
78
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
79
|
+
|
|
80
|
+
PUBLISHED = T.let(:published, Courier::Journey::Version::TaggedSymbol)
|
|
81
|
+
DRAFT = T.let(:draft, Courier::Journey::Version::TaggedSymbol)
|
|
82
|
+
|
|
83
|
+
sig do
|
|
84
|
+
override.returns(T::Array[Courier::Journey::Version::TaggedSymbol])
|
|
85
|
+
end
|
|
86
|
+
def self.values
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyInvokeParams < Courier::Models::JourneysInvokeRequest
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::JourneyInvokeParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :template_id
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(
|
|
19
|
+
template_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(template_id:, request_options: {})
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ template_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneyListParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Courier::JourneyListParams, Courier::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# A cursor token for pagination. Use the cursor from the previous response to
|
|
15
|
+
# fetch the next page of results.
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_reader :cursor
|
|
18
|
+
|
|
19
|
+
sig { params(cursor: String).void }
|
|
20
|
+
attr_writer :cursor
|
|
21
|
+
|
|
22
|
+
# The version of journeys to retrieve. Accepted values are published (for
|
|
23
|
+
# published journeys) or draft (for draft journeys). Defaults to published.
|
|
24
|
+
sig { returns(T.nilable(Courier::JourneyListParams::Version::OrSymbol)) }
|
|
25
|
+
attr_reader :version
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
params(version: Courier::JourneyListParams::Version::OrSymbol).void
|
|
29
|
+
end
|
|
30
|
+
attr_writer :version
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
cursor: String,
|
|
35
|
+
version: Courier::JourneyListParams::Version::OrSymbol,
|
|
36
|
+
request_options: Courier::RequestOptions::OrHash
|
|
37
|
+
).returns(T.attached_class)
|
|
38
|
+
end
|
|
39
|
+
def self.new(
|
|
40
|
+
# A cursor token for pagination. Use the cursor from the previous response to
|
|
41
|
+
# fetch the next page of results.
|
|
42
|
+
cursor: nil,
|
|
43
|
+
# The version of journeys to retrieve. Accepted values are published (for
|
|
44
|
+
# published journeys) or draft (for draft journeys). Defaults to published.
|
|
45
|
+
version: nil,
|
|
46
|
+
request_options: {}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
cursor: String,
|
|
54
|
+
version: Courier::JourneyListParams::Version::OrSymbol,
|
|
55
|
+
request_options: Courier::RequestOptions
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
def to_hash
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# The version of journeys to retrieve. Accepted values are published (for
|
|
63
|
+
# published journeys) or draft (for draft journeys). Defaults to published.
|
|
64
|
+
module Version
|
|
65
|
+
extend Courier::Internal::Type::Enum
|
|
66
|
+
|
|
67
|
+
TaggedSymbol =
|
|
68
|
+
T.type_alias { T.all(Symbol, Courier::JourneyListParams::Version) }
|
|
69
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
70
|
+
|
|
71
|
+
PUBLISHED =
|
|
72
|
+
T.let(:published, Courier::JourneyListParams::Version::TaggedSymbol)
|
|
73
|
+
DRAFT = T.let(:draft, Courier::JourneyListParams::Version::TaggedSymbol)
|
|
74
|
+
|
|
75
|
+
sig do
|
|
76
|
+
override.returns(
|
|
77
|
+
T::Array[Courier::JourneyListParams::Version::TaggedSymbol]
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
def self.values
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneysInvokeRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::JourneysInvokeRequest, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Data payload passed to the journey. The expected shape can be predefined using
|
|
12
|
+
# the schema builder in the journey editor. This data is available in journey
|
|
13
|
+
# steps for condition evaluation and template variable interpolation. Can also
|
|
14
|
+
# contain user identifiers (user_id, userId, anonymousId) if not provided
|
|
15
|
+
# elsewhere.
|
|
16
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
17
|
+
attr_reader :data
|
|
18
|
+
|
|
19
|
+
sig { params(data: T::Hash[Symbol, T.anything]).void }
|
|
20
|
+
attr_writer :data
|
|
21
|
+
|
|
22
|
+
# Profile data for the user. Can contain contact information (email,
|
|
23
|
+
# phone_number), user identifiers (user_id, userId, anonymousId), or any custom
|
|
24
|
+
# profile fields. Profile fields are merged with any existing stored profile for
|
|
25
|
+
# the user. Include context.tenant_id to load a tenant-scoped profile for
|
|
26
|
+
# multi-tenant scenarios.
|
|
27
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
28
|
+
attr_reader :profile
|
|
29
|
+
|
|
30
|
+
sig { params(profile: T::Hash[Symbol, T.anything]).void }
|
|
31
|
+
attr_writer :profile
|
|
32
|
+
|
|
33
|
+
# A unique identifier for the user. If not provided, the system will attempt to
|
|
34
|
+
# resolve the user identifier from profile or data objects.
|
|
35
|
+
sig { returns(T.nilable(String)) }
|
|
36
|
+
attr_reader :user_id
|
|
37
|
+
|
|
38
|
+
sig { params(user_id: String).void }
|
|
39
|
+
attr_writer :user_id
|
|
40
|
+
|
|
41
|
+
# Request body for invoking a journey. Requires either a user identifier or a
|
|
42
|
+
# profile with contact information. User identifiers can be provided via user_id
|
|
43
|
+
# field, or resolved from profile/data objects (user_id, userId, or anonymousId
|
|
44
|
+
# fields).
|
|
45
|
+
sig do
|
|
46
|
+
params(
|
|
47
|
+
data: T::Hash[Symbol, T.anything],
|
|
48
|
+
profile: T::Hash[Symbol, T.anything],
|
|
49
|
+
user_id: String
|
|
50
|
+
).returns(T.attached_class)
|
|
51
|
+
end
|
|
52
|
+
def self.new(
|
|
53
|
+
# Data payload passed to the journey. The expected shape can be predefined using
|
|
54
|
+
# the schema builder in the journey editor. This data is available in journey
|
|
55
|
+
# steps for condition evaluation and template variable interpolation. Can also
|
|
56
|
+
# contain user identifiers (user_id, userId, anonymousId) if not provided
|
|
57
|
+
# elsewhere.
|
|
58
|
+
data: nil,
|
|
59
|
+
# Profile data for the user. Can contain contact information (email,
|
|
60
|
+
# phone_number), user identifiers (user_id, userId, anonymousId), or any custom
|
|
61
|
+
# profile fields. Profile fields are merged with any existing stored profile for
|
|
62
|
+
# the user. Include context.tenant_id to load a tenant-scoped profile for
|
|
63
|
+
# multi-tenant scenarios.
|
|
64
|
+
profile: nil,
|
|
65
|
+
# A unique identifier for the user. If not provided, the system will attempt to
|
|
66
|
+
# resolve the user identifier from profile or data objects.
|
|
67
|
+
user_id: nil
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
sig do
|
|
72
|
+
override.returns(
|
|
73
|
+
{
|
|
74
|
+
data: T::Hash[Symbol, T.anything],
|
|
75
|
+
profile: T::Hash[Symbol, T.anything],
|
|
76
|
+
user_id: String
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
def to_hash
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneysInvokeResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::JourneysInvokeResponse, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# A unique identifier for the journey run that was created.
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :run_id
|
|
14
|
+
|
|
15
|
+
sig { params(run_id: String).returns(T.attached_class) }
|
|
16
|
+
def self.new(
|
|
17
|
+
# A unique identifier for the journey run that was created.
|
|
18
|
+
run_id:
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
sig { override.returns({ run_id: String }) }
|
|
23
|
+
def to_hash
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class JourneysListResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Courier::JourneysListResponse, Courier::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# A cursor token for pagination. Present when there are more results available.
|
|
12
|
+
sig { returns(T.nilable(String)) }
|
|
13
|
+
attr_reader :cursor
|
|
14
|
+
|
|
15
|
+
sig { params(cursor: String).void }
|
|
16
|
+
attr_writer :cursor
|
|
17
|
+
|
|
18
|
+
sig { returns(T.nilable(T::Array[Courier::Journey])) }
|
|
19
|
+
attr_reader :templates
|
|
20
|
+
|
|
21
|
+
sig { params(templates: T::Array[Courier::Journey::OrHash]).void }
|
|
22
|
+
attr_writer :templates
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
cursor: String,
|
|
27
|
+
templates: T::Array[Courier::Journey::OrHash]
|
|
28
|
+
).returns(T.attached_class)
|
|
29
|
+
end
|
|
30
|
+
def self.new(
|
|
31
|
+
# A cursor token for pagination. Present when there are more results available.
|
|
32
|
+
cursor: nil,
|
|
33
|
+
templates: nil
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
sig do
|
|
38
|
+
override.returns(
|
|
39
|
+
{ cursor: String, templates: T::Array[Courier::Journey] }
|
|
40
|
+
)
|
|
41
|
+
end
|
|
42
|
+
def to_hash
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -11,15 +11,23 @@ module Courier
|
|
|
11
11
|
T.any(Courier::ListDeleteParams, Courier::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :list_id
|
|
16
|
+
|
|
14
17
|
sig do
|
|
15
|
-
params(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
params(
|
|
19
|
+
list_id: String,
|
|
20
|
+
request_options: Courier::RequestOptions::OrHash
|
|
21
|
+
).returns(T.attached_class)
|
|
18
22
|
end
|
|
19
|
-
def self.new(request_options: {})
|
|
23
|
+
def self.new(list_id:, request_options: {})
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
sig
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ list_id: String, request_options: Courier::RequestOptions }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
23
31
|
def to_hash
|
|
24
32
|
end
|
|
25
33
|
end
|