Commit Graph

27 Commits

Author SHA1 Message Date
Kenneth Kehl
2a05cb26aa code review feedback 2024-10-24 07:14:50 -07:00
Kenneth Kehl
8d80b2bfff fix first paginate method 2024-10-18 12:52:24 -07:00
Kenneth Kehl
567a16fb53 fix first paginate method 2024-10-18 12:23:51 -07:00
Cliff Hill
3982f061b6 Made enums.py for all the enums to avoid cyclic imports.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:43:31 -05:00
Cliff Hill
ac9591ec7c More tweaks, trying to get tests to be clean.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:43:31 -05:00
Kenneth Kehl
00fd3a72bb code review feedback, fix setup.cfg and reformat 2023-08-25 08:10:33 -07:00
Kenneth Kehl
026dc14021 notify-api-412 use black to enforce python style standards 2023-08-23 10:35:43 -07:00
stvnrlly
8e2b8dd7c4 keep on flakin the flake world 2022-10-21 13:29:52 +00:00
stvnrlly
9f37592b1e cleaner flake8 cleaning 2022-10-21 00:26:37 +00:00
stvnrlly
55adb3e035 more flake8 cleanup 2022-10-19 16:16:26 +00:00
stvnrlly
e9fdfd59f4 clean flake8 except provider code 2022-10-19 16:16:26 +00:00
jimmoffet
8cb6f60f04 modify inbound notif processing 2022-10-03 09:05:34 -07:00
Katie Smith
b440f3f904 Use Draft-07 and Draft7Validator everywhere
We were using the Draft4Validator in one place, so this updates it to
the Draft7Validator instead.

The schemas were mostly using draft 4 of the JSON schema, though there
were a couple of schemas that were already of version 7. This updates
them all to version 7, which is the latest version fully supported by
the jsonschema Python package. There are some breaking changes in the
newer version of the schema, but I could not see anywhere would these
affect us. Some of these schemas were not valid in version 4, but are
now valid in version 7 because `"required": []` was not valid in earlier
versions.
2022-04-14 14:46:10 +01:00
Ben Thorner
a91fde2fda Run auto-correct on app/ and tests/ 2021-03-12 11:45:45 +00:00
Leo Hemsted
68aaf1e877 remove get for inbound sms by phone number
query args from GET requests are put into our logs, and we should avoid
personal data (eg phone numbers) in them. Remove this old GET now that
it's not used by the admin app anymore
2019-03-29 15:30:07 +00:00
Leo Hemsted
cf248a2af3 combine post + get inbound, and make them respect data retention
also removed the limit/limit_days args as they're not used by admin
2019-03-28 15:38:26 +00:00
Leo Hemsted
97110e293b make inbound sms page respect data retention
also, it should default to last 7 days, not last 6 days. also change
count_inbound_sms to have the days passed in, so that it's more
explicit at the endpoint that we only return 7 days regardless of your
service's data retention
2019-03-27 17:47:26 +00:00
chrisw
0f2ddd8cfa added new paginated inbound endpoint 2018-04-04 17:10:41 +01:00
chrisw
ac50250ad7 update paginated inbound sms method 2018-03-23 11:09:51 +00:00
Leo Hemsted
3daf039fbe get_inbound_sms queries from the admin should also allow alphanumerics.
Refactored the call to make the POST and the GET versions of the method
much more distinct.
2017-11-23 16:46:39 +00:00
Martyn Inglis
ccfcb5678f Missing white space 2017-06-09 10:44:48 +01:00
Martyn Inglis
7dccf796dd Adds a POST version of get inbound messages by phone number. Allows us to POST the search so the phone number is hidden 2017-06-09 10:34:02 +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
Imdad Ahad
ee488d416a Add endpoint to get inbound by id 2017-06-06 17:12:21 +01:00
Leo Hemsted
69c299dd6c ensure international numbers are handled correctly
the international flag semantically means 'Should we throw an error if an
international number is passed in?' (and the answer is no. We should not.)
2017-06-02 15:20:18 +01:00
Leo Hemsted
bf18b179b0 ensure the user_number in inbound sms is international
rather than using the `normalise_phone_number` function, use the
`validate_and_format_phone_number` function - this will also convert
all numbers to international format, which means we won't need to
worry about whether the user enters internaional or UK phone numbers
when searching
2017-06-02 15:20:18 +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