Rebecca Law
b186cad046
Add a new table to store the api information for a service inbound sms message.
...
Including:
- url to push the inbound sms to
- bearer_token to be added to the header of the request.
The services will be expected to manage these properties.
2017-06-13 15:27:13 +01:00
Rebecca Law
0596b210a5
Merge pull request #1033 from alphagov/job-stats-for-dashboard
...
Job stats for dashboard
2017-06-13 14:35:58 +01:00
Imdad Ahad
dfeda93bc5
Merge pull request #1015 from alphagov/imdad-feat-return-content-outbound
...
Return notification content for outbound messages
2017-06-13 12:27:16 +01:00
Rebecca Law
4fefec6aa3
New endpoints to return job stats.
...
Next step is to use the new endpoints in admin.
2017-06-13 10:56:03 +01:00
Rebecca Law
cc04b5eb1d
Added new endpoint for job statistics.
...
The structure has been flattened, so I need to create a new endpoint, start using that endpoint, then change the name back.
Added template_id and version to the get job stats by id.
2017-06-12 17:15:32 +01:00
Rebecca Law
c7707873e4
Queries to get job statistics by job_id or by service_id.
2017-06-12 14:25:17 +01:00
Rebecca Law
03c6e74c46
Merge pull request #1024 from alphagov/job-stats-for-dashboard
...
Change the job_statistics table structure
2017-06-08 13:19:15 +01:00
minglis
1b0ff63b1e
Merge pull request #1022 from alphagov/remove-nasty-query-from-dashboard
...
Remove nasty query from dashboard
2017-06-08 10:58:35 +01:00
Imdad Ahad
7e22f3823f
Merge pull request #1021 from alphagov/imdad-feat-get-inbound-by-id
...
Add endpoint to get inbound sms by id
2017-06-07 16:24:17 +01:00
Imdad Ahad
5b4ceda1c6
Refactor:
...
* Filter inbound by service_id
* Refactor to return 404 instead of 400 for consistency
2017-06-07 14:23:31 +01:00
Rebecca Law
1b4097cb16
Add three new columns to job_statistics for sent, delivered and failed.
...
A job only ever has one notification type.
This is the first deploy, where the columns are added and populated.
Next a data migration will happen to populate these new columns for the older jobs that do not have the values set.
Then we stop populating the old columns and remove them.
This refactoring of the table structure will make the queries to the table much easier to handle.
2017-06-07 11:15:05 +01:00
Martyn Inglis
d97c7c8e56
- Fix up free tier on the service object, use it only on dump not create/update in marshmallow
...
- Ensure tests leave config as was after a test run that alters free tier quantity
2017-06-07 09:58:57 +01:00
Imdad Ahad
23a501af16
Add dao to get inbound sms by id
2017-06-06 17:11:59 +01:00
Martyn Inglis
cad195949a
Ensure that the bill includes whatever free allowance is applicable.
2017-06-06 16:21:05 +01:00
Imdad Ahad
6b4597149f
Add filter to get jobs to delete (sms, email, letter)
2017-06-06 16:01:27 +01:00
Martyn Inglis
96d30d31b1
Get existing tests to pass.
...
Done by ensuring that the rate limit is 0, so that all messages are billable.
2017-06-06 14:55:37 +01:00
Imdad Ahad
bad0ce3d86
Return personalisation in notification dump in search by to
2017-06-05 15:53:57 +01:00
Imdad Ahad
0631b6c988
Add dao to delete inbound sms after seven days
2017-06-02 16:10:27 +01:00
Leo Hemsted
ef52337d85
add inbound sms api
...
two endpoints:
* get all inbound sms for a service (you can limit to the X most
recent, or filter by user's phone number [which will be normalised])
* get a summary of inbound sms for a service - returns the count of
inbound sms in the database, and the date that the most recent was
sent
2017-06-02 15:20:18 +01:00
Martyn Inglis
c57e2a6894
Merge branch 'master' into inbound-sms
...
Conflicts:
app/notifications/receive_notifications.py
tests/app/notifications/test_receive_notification.py
2017-06-01 15:56:33 +01:00
minglis
a4c8f83839
Merge pull request #983 from alphagov/remove-nasty-query-from-dashboard
...
Remove nasty query from dashboard
2017-06-01 15:31:02 +01:00
Chris Hill-Scott
eb493f6817
Rename ‘One-off message’ to ‘Report’
...
See 7915845cb5
2017-06-01 13:56:47 +01:00
Martyn Inglis
7f65aa3eef
Merge branch 'master' into remove-nasty-query-from-dashboard
...
Conflicts:
app/service/rest.py
tests/app/service/test_rest.py
2017-06-01 13:11:54 +01:00
Chris Hill-Scott
78d071f22f
Ignore one-off messages in job list on dashboard
...
Same as how we ignore ‘send yourself a test’ messages (see:
d8467bfc3c ). The dashboard gets clogged
up with one off messages otherwise, which affects:
- performance
- users ability to find their jobs
2017-06-01 12:30:47 +01:00
Chris Hill-Scott
9ada8b2753
Don’t 500 when searching with bad email address
...
In the future we might want to validate email addresses before
attempting to search by them. But for a first pass we can just return
no results when a user types in something that isn’t an email address
or phone number.
It definitely better than returning a 500.
2017-05-30 14:50:48 +01:00
Leo Hemsted
4a85818c34
add inbound sms table
2017-05-30 10:47:01 +01:00
kentsanggds
263adac805
Merge pull request #984 from alphagov/ken-update-api-service-permissions-handling
...
Ken update api service permissions handling
2017-05-26 14:39:27 +01:00
Imdad Ahad
78c10b7d30
Search notification against normalised recipient with filter for status
2017-05-26 11:45:56 +01:00
Ken Tsang
8488895612
Refactored tests
2017-05-25 17:48:09 +01:00
Ken Tsang
f7a18f77cf
Update model to cascade permissions assoc proxy
2017-05-25 17:48:09 +01:00
Ken Tsang
8e3e31faaf
Updated service DAO and API end points
2017-05-25 17:47:21 +01:00
Rebecca Law
b745e13a28
Merge branch 'master' into schedule-api-notification
2017-05-25 13:37:04 +01:00
Leo Hemsted
d23a92fbc0
Merge pull request #952 from alphagov/international-delivery-receipts
...
update delivery receipts for countries that return them
2017-05-25 13:13:49 +01:00
Rebecca Law
383dee3bb2
Updated the serialization of Notification.scheduled_for to include minutes.
2017-05-24 14:52:32 +01:00
Rebecca Law
96b0e42959
Merge branch 'master' into schedule-api-notification
...
Conflicts:
app/celery/scheduled_tasks.py
tests/app/celery/test_scheduled_tasks.py
2017-05-24 13:21:22 +01:00
minglis
8a2715e3e1
Merge pull request #980 from alphagov/change-delete-jobs-to-delete-by-type
...
Change delete jobs to delete by type
2017-05-24 12:35:04 +01:00
Martyn Inglis
0db8297693
Removed print statement
2017-05-24 09:59:07 +01:00
Martyn Inglis
9dd6041944
Usage DAO can now return rates and billable amount, alongside units.
2017-05-24 08:56:59 +01:00
Rebecca Law
53efb4e033
Merge branch 'master' into schedule-api-notification
...
Conflicts:
tests/app/v2/notifications/test_post_notifications.py
2017-05-23 13:58:50 +01:00
Martyn Inglis
e987668b0c
Merge branch 'master' into remove-nasty-query-from-dashboard
2017-05-23 13:55:30 +01:00
Martyn Inglis
aaa0f763a1
Updated delete notifications over a week old query
...
- PREVIOUS
based on status. so as we add new status we have some orphaned rows, as these delete queries would miss them
- NOW
based on type. In effect they do the same thing, deleting emails, sms or letters older than a week old irrespective of status. Can see is iterating on this to have more granularity say for letters, so split up. Also means that the delete action isn't so big, as we half the affected rows, by doing it by type.
2017-05-23 13:40:15 +01:00
Ken Tsang
3d2c12128b
Update services test
2017-05-22 17:27:26 +01:00
Ken Tsang
de7ad6fb95
Refactored service_permissions data model
2017-05-22 17:25:58 +01:00
kentsanggds
f5d3eed7e0
Revert "Refactored service permissisons data model"
2017-05-22 16:05:31 +01:00
Rebecca Law
9bfba52f53
Add pending flag to scheduled_notifications.
...
Set pending flag to false when the notification has been sent to provider task.
2017-05-22 15:07:16 +01:00
Rebecca Law
3a3161ecc4
Merge branch 'master' into schedule-api-notification
...
Conflicts:
app/celery/scheduled_tasks.py
app/v2/notifications/post_notifications.py
tests/app/celery/test_scheduled_tasks.py
2017-05-22 14:05:57 +01:00
Ken Tsang
052004bef0
Refactored data model to remove cascade
2017-05-22 13:33:43 +01:00
Ken Tsang
28ef9a1853
Refactored service permissisons data model
2017-05-22 10:58:41 +01:00
Martyn Inglis
119f0532ab
Renamed the API method/url
2017-05-22 10:06:34 +01:00
Martyn Inglis
2a0669636d
Add and test new DAO method that counts the billable units multiplied by rate multiplier for a given service for a given time period.
...
Currently this is SMS only.
Used by the dashboard for a headline figure.
2017-05-19 16:42:33 +01:00