Imdad Ahad
b94a463911
Revert "1/4 Stop updating old Notification status column"
2017-07-06 12:30:08 +01:00
Imdad Ahad
c7ea6ba116
Update tests to use set() otherwise is possible to fail
2017-07-06 12:30:07 +01:00
Imdad Ahad
28b17b7716
Cleanup/remove unncessary tests
2017-07-06 12:30:07 +01:00
Ken Tsang
b04d01ba27
Refactored code to use new service permissions only
2017-07-06 12:27:55 +01:00
Ken Tsang
98cd838510
ken-use-only-new-service-permissions
2017-07-06 12:27:55 +01:00
Rebecca Law
49917ccafd
Add redact_personalisation to TemplateSchema
2017-06-29 18:16:03 +01:00
Leo Hemsted
29fc81090e
add template personalisation redaction
...
If passing in `redact_personalisation` to the template update endpoint,
we should mark that template permanently as redacted - this means that
we won't ever return the personalisation for any notifications for it.
This is to be used with templates containing one time passwords, 2FA
codes or other sensitive information that you may not want service
workers to be able to see.
This is implemented via a separate table, `template_redacted`, which
just contains when the template was redacted.
2017-06-28 15:53:08 +01:00
Rebecca Law
ff5e8c1f33
Query to return the inbound api data for the service
2017-06-19 16:35:15 +01:00
Rebecca Law
bd3704d123
Merge pull request #1034 from alphagov/push-inbound-sms
...
Push inbound sms
2017-06-19 15:15:07 +01:00
Rebecca Law
3a66027d6a
Refactor ApiKeys.secret and ServiceInboundApi.bearer_token to use the same encryption method and get rid of the duplicate code.
2017-06-19 14:32:22 +01:00
Rebecca Law
6202da7dea
Update model to remove the string length restriction.
...
Moved logic to the dao from the endpoint.
2017-06-19 12:25:05 +01:00
Martyn Inglis
9280648ca5
Some more tests for under, over and exactly 7 days
2017-06-16 14:51:45 +01:00
Rebecca Law
828d5cd493
New table to store the inbound api information for a service. The table is versioned.
...
There is a new endpoint to create the inbound api and one to update it.
2017-06-15 11:32:51 +01:00
Rebecca Law
3fdd180515
New endpoint to set ServiceInboundApi data.
2017-06-13 18:00:25 +01:00
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