Leo Hemsted
c39ec90727
add auth type table, currently contains sms_auth and email_auth
2017-10-30 11:11:37 +00:00
venusbb
b648c2e632
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-free-sms-limit-history
2017-10-30 09:34:23 +00:00
Leo Hemsted
46f5896b3b
add new email_auth service permission
2017-10-27 14:28:20 +01:00
venusbb
6f02ee516c
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-free-sms-limit-history
2017-10-27 10:47:20 +01:00
Rebecca Law
4f65ca5447
Create a new table to map a notification to a SMS sender.
...
There is also some minor db model updates here so that the python db model match the db
2017-10-26 15:25:38 +01:00
venusbb
c10cde6b22
modified serialized method and schema
2017-10-26 13:25:11 +01:00
venusbb
e88b311c8e
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-free-sms-limit-history
2017-10-26 11:56:14 +01:00
kentsanggds
d39bf96324
Merge pull request #1333 from alphagov/ken-handle-dvla-response-file
...
Handle DVLA response file
2017-10-26 11:09:09 +01:00
Ken Tsang
b40cab0c5d
Refactored models to make const consistent
2017-10-25 15:38:58 +01:00
venusbb
8ad98f2806
create entry when creating a new service
2017-10-25 11:35:13 +01:00
Ken Tsang
a2b42194cd
Add letter status received to data model
...
- in order to reduce the number of statuses in the database the letter status `received` will be mapped to `delivered` internally
2017-10-25 10:48:35 +01:00
venusbb
b9b0814853
Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-free-sms-limit-history
2017-10-24 14:44:32 +01:00
Rebecca Law
8d6c38e1fe
Now that we allow multiple SMS senders for a service, update the sender for SMS to be the default SMS sender, regardless if it is inbound number or not
2017-10-24 13:37:17 +01:00
venusbb
59dd343254
Added free_sms_fragment_limit model, schema, dao and Rest
2017-10-24 13:23:24 +01:00
Rebecca Law
954a80649e
Merge branch 'master' into add-update-multiple-sms-sender
2017-10-19 14:34:58 +01:00
venusbb
b0872d9466
add unique service_id&year constraint
2017-10-19 14:21:10 +01:00
venusbb
7e78e19500
Unique constrain and db.relationship
2017-10-19 12:00:01 +01:00
Rebecca Law
709e24e267
Added endpoints to get sms senders for a service
2017-10-19 10:43:49 +01:00
Rebecca Law
6dc41c3b47
New endpoints to add and update multiple SMS sender for a service.
2017-10-19 09:58:23 +01:00
venusbb
b2fa7cdd83
create new table annual_billing
2017-10-18 15:35:51 +01:00
Rebecca Law
1a463cba1f
Merge branch 'master' into add-update-multiple-sms-sender
2017-10-18 11:18:44 +01:00
Chris Hill-Scott
2a5e6c2d0c
Store organisation type against each service
...
> So that we can default services to their appropriate text allowance,
> we need to find out what sector they're in. So let's start collecting
> that from teams as they create new services.
In order to work out what a team’s allowance should be, we need to know
what part of government they’re from. We’re going to do this logic in
the admin app and then `POST` the allowance to the API.
So all we need to do with the information that the users give us is
store it against the service, so we have a record. Doesn’t need any
logic doing as a result of it, doesn’t need foreign keying to the
organisations table, etc.
2017-10-18 10:49:31 +01:00
Rebecca Law
809c5fc055
Remove unique constraint for ServiceSmsSenders.
...
This will allow a service to have multiple sms senders.
2017-10-17 16:49:50 +01:00
Venus Bailey
9b60d69931
Revert "Revert "[ #151837054 ] Add new column free_sms_fragment_limit in the Services table""
2017-10-16 16:24:34 +01:00
Venus Bailey
616a6f8ef8
Revert "[ #151837054 ] Add new column free_sms_fragment_limit in the Services table"
2017-10-16 12:43:05 +01:00
venusbb
f95282a84d
Add column, free_sms_fragment_limit, to services & services_history
...
- Created new column in both tables
- Modified model and Service schema
- Modifed existing test
2017-10-12 12:16:13 +01:00
Rebecca Law
9d507466ef
Remove exception thrown when getting default sender.
...
Having more than one default is checked on insert and update.
2017-10-04 14:51:02 +01:00
Rebecca Law
78a9d74c49
Merge branch 'master' into return-service_sms_sender_value
2017-10-04 13:29:05 +01:00
Katie Smith
0903a28ba8
Merge pull request #1281 from alphagov/imdad-katie-return-letter-contact-from-new-table
...
[4/4] Use letter contact from the new table
2017-10-03 16:42:40 +01:00
Katie Smith
dede336b3b
Update tests to not use letter contact block from services table
...
A few test updates were needed after rebasing onto master.
2017-10-03 13:35:09 +01:00
Richard Chapman
e4b95ab20a
Merge pull request #1282 from alphagov/rc_notifications_email_sender
...
[1/10] Allow API calls to specify the reply address option
2017-10-03 11:56:26 +01:00
Richard Chapman
d8e1a34610
Added a unique constraint to the notification_id column of the notification_to_email_reply_to table so that each notification can only have one mapping to service_email_reply_to and hence one email address.
2017-10-03 11:03:31 +01:00
Imdad Ahad
4eebd9a83c
Remove the letter_contact_block from the Service model
2017-10-03 10:31:21 +01:00
Rebecca Law
d5c9174641
Merge branch 'master' of github.com:alphagov/notifications-api into return-service_sms_sender_value
2017-10-02 12:36:46 +01:00
Chris Hill-Scott
2614d719d1
Merge pull request #1264 from alphagov/template-returns-placeholders
...
Return placeholders when getting a template
2017-10-02 11:21:46 +01:00
Rebecca Law
ba7cd79581
Created a get_default_sms_sender method, which returns the default sms_sender from the service_sms_sender table rather than service.sms_sender.
...
One step closer to removing services.sms_sender.
fix the unit tests
2017-10-02 10:29:00 +01:00
Richard Chapman
fdc4d4c24f
Reanmed the link table to be a bteer description of what the table is for as it was previously confusing. Updated the migration script to reflect those changes
2017-09-28 11:11:41 +01:00
Richard Chapman
6356a5320a
Updated model with a new table notification_to_email_sender and created db migration script
2017-09-27 10:36:25 +01:00
Rebecca Law
64db8cb18d
Merge branch 'master' into select-inbound-number-to-assign
2017-09-25 11:13:12 +01:00
Chris Hill-Scott
55d185f50d
Return metadata about placeholders
...
In the future, we may want to return additional information about
placeholders.
We came up with three possible formats:
1. list of `dict`s, eg `[{'name': 'first name', 'required': True}]`
2. `dict` of `list`s, eg `{'required': ['first name']}`
3. `dict` of `dict`s, eg `{'name': {'required': True}}`
I don’t like 1. because it’s harder to traverse if all you want is the
name of the placeholders, and suggests that you could have two
placeholders with the same name (which you can’t). I don’t like 2.
because it only lets the data be sliced by one dimension (unless the
inner lists aren’t exclusive, in which case you’d need to filter
duplicates when just listing placeholders).
I think 3. has the two advantages of:
- represents that personalisation is unique, ie you can’t pass back in
two different values for the same key
- is forward compatible, ie we can add many more properties of a
placeholder without breaking anything
So this commit implements 3.
2017-09-22 16:42:16 +01:00
Chris Hill-Scott
fa8e4b29f2
Return placeholders when getting a template
...
> Currently when retrieving a template via one of the clients, we do
> not return the personalisation fields that are required for that
> template.
>
> This is useful for services who want to perform template validation on
> their own systems. A service user has also requested this.
– https://www.pivotaltracker.com/story/show/150674476
This commit adds an extra attribute to the JSON response containing an
array of the placeholder names. This key is called "personalisation",
to match the argument that developers use to pass in the values of
placeholders.
2017-09-22 10:00:23 +01:00
Ken Tsang
91a618531d
Update serialization and service schema
...
- added id and service_id in serialization
- added 'letter_contacts' to the exluded list for marshmallow service schema
2017-09-21 16:38:24 +01:00
Ken Tsang
366d07dbbe
Add ServiceLetterContact data model and script
2017-09-21 16:08:49 +01:00
Rebecca Law
18581c754a
Add new endpoint to get available inbound number.
...
Add new endpoint to allocate a specific number to a given service.
This will allow the platform admin user to choose a number when setting the inbound_sms permission for a service.
2017-09-21 15:18:52 +01:00
Chris Hill-Scott
8360b9a122
Merge pull request #1265 from alphagov/logoless-organsations
...
Make organisation logo nullable
2017-09-21 13:01:06 +01:00
Rebecca Law
0c9f16a8d1
Add id and service_id to the serialize method on ServiceEmailReplyTo
2017-09-21 10:21:32 +01:00
Rebecca Law
08fdcbfc67
Merge pull request #1266 from alphagov/use-reply-to-from-new-table
...
Use reply to email address from new table
2017-09-21 09:54:52 +01:00
Leo Hemsted
9afb2c36e7
Merge pull request #1241 from alphagov/letter-received
...
Letters are accepted, not created or sending
2017-09-20 16:51:31 +01:00
Leo Hemsted
4174c72f21
allow 'accepted' as a proxy for created + sending as well as 'failed' for the three failure types when querying the api
2017-09-20 15:30:14 +01:00
Rebecca Law
06ffac9a0f
Merge branch 'master' into use-reply-to-from-new-table
2017-09-20 14:00:04 +01:00