MCPcopy Create free account

hub / github.com/alphagov/notifications-api / functions

Functions5,336 in github.com/alphagov/notifications-api

↓ 7 callersFunctionmake_verify_code
(user, age=None, expiry_age=None, code="12335", code_used=False)
tests/app/dao/test_users_dao.py:156
↓ 7 callersFunctionparse_date_range
Converts a date string to a datetime object. If `is_end` is True, the time is set to 23:59:59 to include the full day. Otherwise, it defa
app/dao/date_util.py:80
↓ 7 callersFunctionprocess_incomplete_job
(job_id, shatter_batch_size=DEFAULT_SHATTER_JOB_ROWS_BATCH_SIZE)
app/celery/tasks.py:591
↓ 7 callersFunctionprocess_sanitised_letter
(self, sanitise_data)
app/celery/letters_pdf_tasks.py:322
↓ 7 callersFunctionremove_archived_template_email_files_from_s3
(archived_after=None)
app/celery/nightly_tasks.py:88
↓ 7 callersFunctionsave_invited_user
(invited_user)
app/dao/invited_user_dao.py:7
↓ 7 callersFunctionses_complaint_callback
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html#complaint-object
tests/app/db.py:857
↓ 7 callersFunctionurl_with_token
(data, url: str, base_url: str | None = None)
app/utils.py:81
↓ 7 callersFunctionuser_can_be_removed_from_service
(user, service, organisation_domains=None)
app/dao/users_dao.py:239
↓ 6 callersFunction_assert_service_permissions
(service_permissions, expected)
tests/app/dao/test_services_dao.py:1178
↓ 6 callersFunction_delete_notifications_older_than_retention_by_type
( notification_type, stagger_total_period=timedelta(minutes=5), )
app/celery/nightly_tasks.py:224
↓ 6 callersMethodchange_api_key
(self)
app/clients/letter/dvla.py:165
↓ 6 callersMethodchange_password
(self)
app/clients/letter/dvla.py:192
↓ 6 callersMethodcheck_password
(self, password)
app/models.py:186
↓ 6 callersFunctioncheck_service_letter_contact_id
(service_id, letter_contact_id, notification_type)
app/notifications/validators.py:290
↓ 6 callersFunctioncreate_letter_notification
( letter_data, template, service, api_key, status, reply_to_text=None, billable_un
app/notifications/process_letter_notifications.py:8
↓ 6 callersFunctioncreate_nightly_notification_status_for_service_and_day
(process_day, service_id, notification_type)
app/celery/reporting_tasks.py:182
↓ 6 callersFunctioncreate_secret_code
()
app/dao/users_dao.py:34
↓ 6 callersFunctioncreate_service_permission
(service_id, permission=EMAIL_TYPE)
tests/app/db.py:487
↓ 6 callersFunctioncreate_uploaded_letter
(letter_template, service, status="created", created_at=None)
tests/app/upload/test_rest.py:15
↓ 6 callersFunctiondao_fetch_service_by_inbound_number
(number)
app/dao/services_dao.py:189
↓ 6 callersFunctiondao_fetch_todays_stats_for_all_services
(include_from_test_key=True, only_active=True)
app/dao/services_dao.py:452
↓ 6 callersFunctiondao_get_letter_branding_by_id
(letter_branding_id)
app/dao/letter_branding_dao.py:19
↓ 6 callersFunctiondao_get_letter_contact_by_id
(service_id, letter_contact_id)
app/dao/service_letter_contact_dao.py:19
↓ 6 callersFunctiondao_get_notification_by_reference
(reference)
app/dao/notifications_dao.py:791
↓ 6 callersFunctiondao_get_organisation_domains
()
app/dao/organisation_dao.py:28
↓ 6 callersFunctiondao_get_paginated_inbound_sms_for_service_for_public_api
(service_id, older_than=None, page_size=None)
app/dao/inbound_sms_dao.py:52
↓ 6 callersFunctiondao_remove_email_branding_from_organisation_pool
(organisation_id, email_branding_id)
app/dao/organisation_dao.py:266
↓ 6 callersFunctiondao_remove_user_from_service
(service, user)
app/dao/services_dao.py:348
↓ 6 callersFunctiondao_update_provider_details
(provider_details)
app/dao/provider_details_dao.py:153
↓ 6 callersFunctiondao_update_template_email_file
(template_email_file: TemplateEmailFile)
app/dao/template_email_files_dao.py:113
↓ 6 callersFunctionfetch_service_data_retention_by_notification_type
(service_id, notification_type)
app/dao/service_data_retention_dao.py:26
↓ 6 callersFunctionfind_letter_pdf_in_s3
(notification)
app/letters/utils.py:46
↓ 6 callersFunctionfiretext_post
(client, data, auth=True, password="testkey")
tests/app/notifications/test_receive_notification.py:26
↓ 6 callersFunctionformat_mmg_message
(message)
app/notifications/receive_notifications.py:133
↓ 6 callersMethodfrom_id_service_id_and_version
(cls, template_id, service_id, version)
app/serialised_models.py:68
↓ 6 callersFunctionget_aws_responses
(status)
app/clients/email/aws_ses.py:43
↓ 6 callersFunctionget_financial_year
(year)
app/dao/date_util.py:18
↓ 6 callersFunctionget_recipient_csv_and_template_and_sender_id
(job)
app/celery/tasks.py:229
↓ 6 callersFunctionincrement_failed_login_count
(user)
app/dao/users_dao.py:136
↓ 6 callersFunctioninsert_notification_history_delete_notifications
Delete up to 50,000 notifications that are past retention for a notification type and service. Steps are as follows: Create a temporar
app/dao/notifications_dao.py:393
↓ 6 callersMethodis_parent_of
(self, other)
app/models.py:1006
↓ 6 callersFunctionmmg_post
(client, data)
tests/app/notifications/test_notifications_sms_callbacks.py:14
↓ 6 callersFunctionprocess_letter_callback_data
( self, notification_id: uuid.UUID, page_count: int | None, dvla_status: str, cost_thresho
app/celery/process_letter_client_response_tasks.py:23
↓ 6 callersMethodput
(endpoint, _data=None, _expected_status=200, **endpoint_kwargs)
tests/app/conftest.py:1282
↓ 6 callersFunctionsave_letter
( self, service_id, notification_id, encoded_notification, )
app/celery/tasks.py:482
↓ 6 callersMethodserialize_for_list
(self)
app/models.py:530
↓ 6 callersMethodserialize_for_org_dashboard
(self)
app/models.py:702
↓ 6 callersFunctionset_up_usage_data
(start_date)
tests/app/db.py:953
↓ 6 callersMethodset_user_organisation_permission
( self, user: User, organisation: Organisation, permissions: list[Organisation
app/dao/organisation_user_permissions_dao.py:18
↓ 6 callersFunctiontry_parse_and_format_phone_number
(number: str, log_msg=None, with_country_code=True)
app/utils.py:208
↓ 6 callersFunctionusers_permissions_can_be_changed
(user, service, new_permissions)
app/dao/users_dao.py:222
↓ 6 callersFunctionvalidate_callback_data
(data, fields, client_name)
app/notifications/notifications_sms_callback.py:94
↓ 6 callersFunctionvalidate_date_range_is_within_a_financial_year
(start_date, end_date)
app/platform_stats/rest.py:56
↓ 5 callersFunction__create_ft_status
(job, status, count)
tests/app/job/test_rest.py:679
↓ 5 callersFunction_adjust_provider_priority
(provider, new_priority)
app/dao/provider_details_dao.py:43
↓ 5 callersFunction_create_api_key
(name, service_id, user_id, key_type="normal")
app/functional_tests_fixtures/__init__.py:572
↓ 5 callersFunction_create_email_template
(service, user_id, name, subject, content, alt_names=frozenset())
app/functional_tests_fixtures/__init__.py:616
↓ 5 callersFunction_create_user
(name, email_address, password, auth_type="sms_auth", organisations=None, mobile_number=None)
app/functional_tests_fixtures/__init__.py:475
↓ 5 callersFunction_deep_archive_notification_history_hour_starting
( start_datetime: datetime, db_batch_size: int = 50_000, written_rows_log_every: int = 1_000_000,
app/celery/nightly_tasks.py:538
↓ 5 callersFunction_get_auth_token
(req)
app/authentication/auth.py:173
↓ 5 callersFunction_move_s3_object
(source_bucket, source_filename, target_bucket, target_filename, metadata=None)
app/letters/utils.py:208
↓ 5 callersMethodall_queues
()
app/config.py:41
↓ 5 callersFunctionarchive_letter_contact
(service_id, letter_contact_id)
app/dao/service_letter_contact_dao.py:58
↓ 5 callersFunctionarchive_sms_sender
(service_id, sms_sender_id)
app/dao/service_sms_sender_dao.py:73
↓ 5 callersFunctioncheck_and_queue_callback_task
(notification, *, receipt_dt: datetime | None = None)
app/notifications/notifications_ses_callback.py:73
↓ 5 callersFunctioncheck_is_message_too_long
(template_with_content)
app/notifications/validators.py:223
↓ 5 callersFunctioncheck_service_email_reply_to_id
(service_id, reply_to_id, notification_type)
app/notifications/validators.py:272
↓ 5 callersFunctioncheck_service_sms_sender_id
(service_id, sms_sender_id, notification_type)
app/notifications/validators.py:281
↓ 5 callersFunctioncreate_custom_jwt_token
(headers=None, payload=None, secret=None)
tests/app/authentication/test_authentication.py:50
↓ 5 callersFunctioncreate_inbound_sms_object
(service, content, from_number, provider_ref, date_received, provider_name)
app/notifications/receive_notifications.py:154
↓ 5 callersFunctioncreate_letter_attachment
(created_by_id)
tests/app/db.py:1221
↓ 5 callersFunctiondao_add_and_commit_guest_list_contacts
(objs)
app/dao/service_guest_list_dao.py:9
↓ 5 callersFunctiondao_add_email_branding_list_to_organisation_pool
(organisation_id, email_branding_ids)
app/dao/organisation_dao.py:235
↓ 5 callersFunctiondao_create_job
(job)
app/dao/jobs_dao.py:156
↓ 5 callersFunctiondao_get_archived_template_email_files_older_than
( session: Session | scoped_session = db.session, *, archived_before: datetime.datetime, archi
app/dao/template_email_files_dao.py:60
↓ 5 callersFunctiondao_get_last_date_template_was_used
(template, session: Session | scoped_session = db.session)
app/dao/notifications_dao.py:94
↓ 5 callersFunctiondao_get_most_recent_inbound_usage_date
(service_id: UUID, inbound: InboundNumber)
app/dao/inbound_sms_dao.py:217
↓ 5 callersFunctiondao_get_notification_outcomes_for_job
(job_id)
app/dao/jobs_dao.py:38
↓ 5 callersFunctiondao_get_organisation_by_email_address
(email_address: str, session: Session | scoped_session = db.session)
app/dao/organisation_dao.py:55
↓ 5 callersFunctiondao_get_paginated_most_recent_inbound_sms_by_user_number_for_service
This query starts from inbound_sms and joins on to itself to find the most recent row for each user_number. Equivalent sql: SELECT t1.*
app/dao/inbound_sms_dao.py:176
↓ 5 callersFunctiondao_get_users_for_organisation
(organisation_id)
app/dao/organisation_dao.py:186
↓ 5 callersFunctiondao_redact_template
(template, user_id)
app/dao/templates_dao.py:41
↓ 5 callersFunctiondao_reduce_sms_provider_priority
Will reduce a chosen sms provider's priority, and increase the other provider's priority by 10 points each. If either provider has been updat
app/dao/provider_details_dao.py:93
↓ 5 callersFunctiondao_set_scheduled_jobs_to_pending
Sets all past scheduled jobs to pending, and then returns them for further processing. this is used in the run_scheduled_jobs task, so we pu
app/dao/jobs_dao.py:117
↓ 5 callersFunctiondao_update_service_join_request_by_id
( request_id: UUID, service_id: UUID, status: Literal["approved", "rejected", "pending", "cancelle
app/dao/service_join_requests_dao.py:51
↓ 5 callersFunctiondelete_test_notifications
(notification_type, service_id, timestamp_to_delete_backwards_from, qry_limit=50000)
app/dao/notifications_dao.py:486
↓ 5 callersFunctionescape_special_characters
(string: str)
app/utils.py:141
↓ 5 callersFunctionfetch_daily_sms_provider_volumes_for_platform
(start_date, end_date, session: Session | scoped_session = db.session)
app/dao/fact_billing_dao.py:1117
↓ 5 callersFunctionfetch_monthly_template_usage_for_service
(start_date, end_date, service_id)
app/dao/fact_notification_status_dao.py:514
↓ 5 callersFunctionfind_jobs_that_completed_processing
Returns a list of jobs with all rows created
app/dao/jobs_dao.py:263
↓ 5 callersFunctionfind_jobs_with_missing_rows
Returns a tuple of two lists of "finished" jobs, the first with missing rows, the second with all rows created
app/dao/jobs_dao.py:237
↓ 5 callersFunctionget_detailed_services
(start_date, end_date, only_active=False, include_from_test_key=True)
app/service/rest.py:741
↓ 5 callersFunctionget_folder_name
(created_at)
app/letters/utils.py:35
↓ 5 callersMethodget_organisation_permissions
(self)
app/models.py:203
↓ 5 callersFunctionget_pdf_for_templated_letter
(self, notification_id)
app/celery/letters_pdf_tasks.py:59
↓ 5 callersFunctionget_service_callback_api
(service_callback_api_id, service_id, callback_type)
app/dao/service_callback_api_dao.py:29
↓ 5 callersFunctionget_unsubscribe_request_report_by_id_dao
(batch_id)
app/dao/unsubscribe_request_dao.py:78
↓ 5 callersFunctionget_users_list
( logged_in_start: datetime | None = None, logged_in_end: datetime | None = None, created_start: d
app/dao/users_dao.py:281
↓ 5 callersFunctionmmg_post
(client, data, auth=True, password="testkey")
tests/app/notifications/test_receive_notification.py:38
← previousnext →201–300 of 5,336, ranked by callers