Api reference
components.global_services.public.controllers ¶
api ¶
create_api ¶
Source code in components/global_services/public/controllers/api.py
feature_flags ¶
FeatureFlagsController ¶
Bases: BaseController
get ¶
Source code in components/global_services/public/controllers/feature_flags.py
get_by_name ¶
Source code in components/global_services/public/controllers/feature_flags.py
intercom ¶
IntercomController ¶
Bases: BaseController
Controller for Intercom related endpoints.
can_write
classmethod
¶
Prevent access to other users data.
IntercomUserCustomAttributesController ¶
Bases: BaseController
get ¶
Get user data used by UCE on Intercom.
Source code in components/global_services/public/controllers/intercom.py
IntercomUserHashController ¶
Bases: BaseController
get ¶
Retrieve a signed hash to 'authenticate' user in Intercom.
Source code in components/global_services/public/controllers/intercom.py
push_notification_token ¶
PushNotificationTokenControllerCrud ¶
Bases: BaseController
Controller for push notification (firebase) related endpoints.
delete ¶
Deletes the token
See components.global_services.internal.services.push_notifications.push_notification_token
Source code in components/global_services/public/controllers/push_notification_token.py
post ¶
Creates or updates the token
See components.global_services.internal.services.push_notifications.push_notification_token
Source code in components/global_services/public/controllers/push_notification_token.py
push_notification_token_endpoint
module-attribute
¶
components.global_services.public.dependencies ¶
GlobalServicesDependency ¶
Bases: ABC
get_intercom_user_custom_attributes
abstractmethod
¶
Implement get_intercom_user_custom_attributes
All properties in the response should be defined on Intercom (see here ⧉).
Source code in components/global_services/public/dependencies.py
get_app_dependency ¶
set_app_dependency ¶
components.global_services.public.entities ¶
feature_flag ¶
in_memory_push_notification_log ¶
InMemoryPushNotificationLog
dataclass
¶
Represents an in-memory version of a push notification log.
from_model
classmethod
¶
Creates an InMemoryPushNotificationLog instance from a BasePushNotificationLog model, it can be PushNotificationLog, BePushNotificationLog or EsPushNotificationLog depending on app_name.
Source code in components/global_services/public/entities/in_memory_push_notification_log.py
in_memory_push_notification_token ¶
InMemoryPushNotificationToken
dataclass
¶
Bases: DataClassJsonMixin
Represents an in-memory simplified version of a push notification model
from_model
classmethod
¶
Creates an InMemoryPushNotificationToken from a BasePushNotificationToken model
Source code in components/global_services/public/entities/in_memory_push_notification_token.py
components.global_services.public.enums ¶
components.global_services.public.queries ¶
feature_flag ¶
get_feature_flag_by_name_cached ¶
DEPRECATED: Use LaunchDarkly instead
Source code in components/global_services/internal/queries/feature_flag.py
mfa ¶
get_companies_with_mfa_required_settings ¶
This function retrieves companies with MFA required settings in FeatureFlag enabled.
Source code in components/global_services/public/queries/mfa.py
get_mfa_required_settings_by_app ¶
Get the MFA required settings for the given country.
Source code in components/global_services/public/queries/mfa.py
get_mfa_restriction_type_for_company ¶
This function retrieves the MFA restriction type for a specific company.
Source code in components/global_services/public/queries/mfa.py
is_mfa_required_for_company_admins ¶
This function checks if a company forced MFA activation for its admins.
Source code in components/global_services/public/queries/mfa.py
is_mfa_required_for_company_employees ¶
This function checks if a company forced MFA activation for its employees.
Source code in components/global_services/public/queries/mfa.py
push_notifications ¶
get_push_notification_tokens_for_user ¶
Returns the push notification tokens for the user
Source code in components/global_services/public/queries/push_notifications.py
components.global_services.public.services ¶
push_notifications ¶
get_push_notification_functions ¶
Get the push notification functions for the current app.
Hook the get_tokens global function so that consumers don't have to care about it.
push_notification_sender_async, push_notification_sender_sync = get_push_notification_functions()
Source code in components/global_services/internal/services/push_notifications/push_notifications_local.py
get_push_notification_logs_for_user ¶
get_push_notification_logs_for_user(
app_name,
app_user_id,
notification_names,
created_at__gte=None,
)
Source code in components/global_services/internal/services/push_notifications/push_notifications_local.py
get_push_notification_token_objects_for_user ¶
Source code in components/global_services/internal/services/push_notifications/push_notifications_local.py
get_push_notification_tokens_for_user ¶
Source code in components/global_services/internal/services/push_notifications/push_notifications_local.py
push_notification_logic
module-attribute
¶
push_notification_logic = SharedPushNotificationLogic(
push_notification_log_cls=GlobalPushNotificationLog
)