Commit Graph

495 Commits (30c27fc23feffc7dbb7a0751f5f7236e792b2e5a)

Author SHA1 Message Date
Chris Veilleux 56b8d012ed password reset functionality 2019-04-01 20:11:32 -05:00
Matheus Lima 07757f6dbc Fixing the skills setting and skills manifest uploading 2019-04-01 18:46:59 -03:00
Chris Veilleux bb23c1fc29 parse the skill_gid to determine the family_name 2019-04-01 13:43:24 -05:00
Chris Veilleux 80585076b5 changed definition of skill table to match more closely with the skill metadata 2019-04-01 13:13:05 -05:00
Chris Veilleux e8570b0034 moved logic to set stripe API key so that it would not cause an error for apps that do not need stripe and therefore do not have the API key defined 2019-03-29 14:02:09 -05:00
Chris Veilleux 65b2bc4183 device repository changes to support the marketplace 2019-03-29 12:05:06 -05:00
Chris Veilleux 3a6d705935 added logic to the skill repository to support the marketplace 2019-03-29 12:04:03 -05:00
Chris Veilleux 5dc7c55543 added two new methods that should reduce some boilerplate code when querying the database and putting the results of the query directly into a dataclass 2019-03-28 14:13:08 -05:00
Chris Veilleux d943fe29b3 updated skill repository to use new schema with global ID 2019-03-28 14:11:17 -05:00
Chris Veilleux 5321b1b390 added two new methods that should reduce some boilerplate code when querying the database and putting the results of the query directly into a dataclass 2019-03-27 20:47:22 -05:00
Matheus Lima aabc779647 fixing bug with google stt and fixing device's setting to properly return date format and time format 2019-03-27 13:11:38 -03:00
Matheus Lima dac786238d Minor refactor 2019-03-27 11:34:29 -03:00
Matheus Lima cab65636db Created API call to fetch the skills manifest 2019-03-27 11:23:59 -03:00
Matheus Lima e23d9ab840 Created endpoint to upload skills manifest 2019-03-27 11:23:59 -03:00
Matheus Lima 0deb202125 Added etag support to the device location endpoint 2019-03-27 11:21:26 -03:00
Matheus Lima f3e67f9677 Created endpoint to fetch a location associated with a device 2019-03-27 11:21:26 -03:00
Chris Veilleux 2a54cc857e move the stripe-specific code to selene.util 2019-03-26 19:08:05 -05:00
Chris Veilleux d20afcc892 minor refactor 2019-03-26 19:06:40 -05:00
Chris Veilleux 4b100a4176 change the logic around membership changes to fix some things and adapt to a change in how the UI is sending the data. 2019-03-26 18:57:18 -05:00
Chris Veilleux 9fa0a4f1ff added stripe package 2019-03-26 14:50:43 -05:00
Chris Veilleux b440c517ba added logic to delete an account 2019-03-26 14:29:18 -05:00
Chris Veilleux 818f2dc863 ensure the geographical location is associated with an account before the device is added 2019-03-23 18:43:09 -05:00
Chris Veilleux aab5917c98 fixed an issue with the add device query that would not include custom user wake words 2019-03-22 16:06:56 -05:00
Chris Veilleux e61a3ab461 removed link from skill to skill display 2019-03-22 12:05:01 -05:00
Chris Veilleux 17820a93d8 fixed a bug with defaults not displaying correctly on UI 2019-03-22 00:21:29 -05:00
Chris Veilleux d6f7879925
removed code that should not be there 2019-03-21 23:53:08 -05:00
Chris Veilleux 425be9a0a8 merge dev into add-device 2019-03-21 12:08:38 -05:00
Chris Veilleux 6354ad9dd3 added some entities to the package api 2019-03-20 17:18:16 -05:00
Chris Veilleux 1b6ad566ff updated to add the device based on what is passed to the API from the UI 2019-03-20 17:15:18 -05:00
Chris Veilleux 74caaebcc2 apply schema change 2019-03-20 17:14:40 -05:00
Chris Veilleux 02cc26ffa4 pass a dictionary with device attributes rather than the attributes themselves 2019-03-20 17:14:24 -05:00
Chris Veilleux 6849cfa0c5 removed columns no longer on the preferences table 2019-03-20 17:13:37 -05:00
Chris Veilleux 3393f3395f added payment_id to query to fix a bug 2019-03-20 13:34:10 -05:00
Chris Veilleux 4afa558cd8 added geography_id 2019-03-20 13:33:41 -05:00
Chris Veilleux 877701faf9 added logic to add a device.geography row 2019-03-20 13:32:53 -05:00
Chris Veilleux d7ce0ac3de new account_default table repository code 2019-03-20 11:04:13 -05:00
Chris Veilleux 604c156013 minor change to wake word schema 2019-03-20 11:03:58 -05:00
Chris Veilleux c60af46dd3 new account_default table repository code 2019-03-20 11:03:37 -05:00
Chris Veilleux bbf5a58dc5 changes for new device.geography and device.account_preferences tables 2019-03-19 17:59:06 -05:00
Matheus Lima c0ee6224d9 Created functions to epire etags from the device entity and the device's settings entity, at device and account level. Fixed the query used to fetch the devices from a user 2019-03-19 12:42:16 -03:00
Chris Veilleux c851624256 Merge remote-tracking branch 'remotes/origin/dev' into add-device
# Conflicts:
#	api/account/account_api/api.py
#	api/account/tests/features/steps/update_membership.py
#	shared/selene/api/endpoints/account.py
#	shared/selene/data/account/repository/sql/get_active_membership_by_account_id.sql
2019-03-18 17:05:08 -05:00
Matheus Lima df14af5322 Implemented etag support on the endpoint `GET /device/{uuid}` 2019-03-18 16:34:34 -03:00
Matheus Lima 134bd9cc03 Fixing broken test after adding the payment_id column to the account_membership table 2019-03-18 11:19:32 -03:00
Chris Veilleux f0229319d5 added order by clause for display purposes 2019-03-18 00:23:43 -05:00
Matheus Lima 6ee52127e8 minor refactoring 2019-03-15 18:13:30 -03:00
Matheus Lima ff16ce4477 Adding payment_id column into the account_membership table, and removing the previous subscription from stripe when a user changes his membership 2019-03-15 11:58:00 -03:00
Matheus Lima 0b22767e7f Applying camel case and fixing query used to get the active membership 2019-03-15 11:18:11 -03:00
Matheus Lima b5a53d4c91 Fixed an created test for the membership updating 2019-03-15 11:14:21 -03:00
Chris Veilleux 0967d2d458 updated to reflect that the UI will send a null membership type if the user does not sign up 2019-03-15 11:14:21 -03:00
Matheus Lima 37058475b2 Created PATCH request to update membership 2019-03-15 11:14:21 -03:00
Matheus Lima 532762bec7 Implemented stripe integration 2019-03-15 11:13:29 -03:00
Matheus Lima cc409d1b5e Starting to implement the stripe integration 2019-03-15 11:09:38 -03:00
Matheus Lima f547a452a3 Created PATCH request to update membership 2019-03-15 11:07:12 -03:00
Matheus Lima 497d7b2740 Implemented stripe integration 2019-03-15 11:07:12 -03:00
Chris Veilleux 2cb58c50e8 added endpoint to get membership types and the supporting repository logic 2019-03-15 11:07:12 -03:00
Chris Veilleux 397a7a4c77 removed unused module 2019-03-15 11:07:12 -03:00
Matheus Lima d29a3ee857 Starting to implement the stripe integration 2019-03-15 11:07:12 -03:00
Chris Veilleux 159ce1c06b api endpoints for geographical locations and the repository code to support it 2019-03-15 01:05:19 -05:00
Chris Veilleux f30d5ed709 Merge remote-tracking branch 'remotes/origin/stripe-integration' into add-device 2019-03-14 19:12:56 -05:00
Matheus Lima 9f75bf93c4 Applying camel case and fixing query used to get the active membership 2019-03-14 20:26:16 -03:00
Matheus Lima a367c1d07c Created more tests 2019-03-14 17:00:38 -03:00
Matheus Lima 7d87531e26 Fixed an created test for the membership updating 2019-03-14 14:31:55 -03:00
Chris Veilleux 8abafdd851 apply schema changes 2019-03-14 00:03:24 -05:00
Chris Veilleux 791d56559e applied schema changes 2019-03-14 00:02:49 -05:00
Chris Veilleux bd438b9c93 Merge remote-tracking branch 'remotes/origin/stripe-integration' into add-device 2019-03-13 19:48:25 -05:00
Chris Veilleux 27de472229 updated to reflect that the UI will send a null membership type if the user does not sign up 2019-03-13 19:47:58 -05:00
Chris Veilleux 13095c34b6 Merge remote-tracking branch 'remotes/origin/stripe-integration' into add-device 2019-03-13 19:25:27 -05:00
Matheus Lima bdcdeffe18 Created PATCH request to update membership 2019-03-13 21:21:52 -03:00
Matheus Lima 9ba79f4a2d Implemented stripe integration 2019-03-13 21:21:52 -03:00
Chris Veilleux daad2ea4b2 added endpoint to get membership types and the supporting repository logic 2019-03-13 21:21:52 -03:00
Chris Veilleux fa9dbb7459 removed unused module 2019-03-13 21:21:52 -03:00
Matheus Lima 0508824702 Starting to implement the stripe integration 2019-03-13 21:21:52 -03:00
Chris Veilleux ca415c9ce3 new name for location table 2019-03-13 17:06:26 -05:00
Matheus Lima 7fc2a54ab0 Created PATCH request to update membership 2019-03-13 18:19:13 -03:00
Matheus Lima f02d1f151e Implemented stripe integration 2019-03-09 00:32:09 -03:00
Chris Veilleux 10b7ea675a added endpoint to get membership types and the supporting repository logic 2019-03-08 17:27:45 -06:00
Chris Veilleux ae27dd0777 removed unused module 2019-03-08 16:57:56 -06:00
Matheus Lima 5ebad16060 Starting to implement the stripe integration 2019-03-08 19:37:45 -03:00
Matheus Lima 8484d8289b - Changing the validation in the endpoints used to update the device fields and to activate the device and to upload the skill settings
- Checking the authentication token in the before_request function. This is a tricky to make the api compatible with the mycroft core is expecting today. Today tartarus returns 401 when it calls and endpoint with a non existent path (like /device/{uuid} without pass the uuid). That is the value core expect to check if it needs to perform a device pairing. We should change that in future versions
- Changed device endpoint to send the user uuid together with the device
2019-03-08 17:09:53 -03:00
Matheus Lima e8fc54d657 Moved logic related to create a device login session to a python function, allowing it being used by the creating and refreshing token endpoint and by the behavioral tests 2019-03-06 21:31:49 -03:00
Matheus Lima c44284fbef Implemented authentication mechanism for the public API 2019-03-06 18:15:45 -03:00
Matheus Lima a4ecbae369 Moving the cache instance to the PublicEndpoint class 2019-03-06 17:11:16 -03:00
Matheus Lima fe8466a309 Created test to validate that when we update the skills settings, the device API is able to fetch the skill settings with the new values 2019-03-06 16:42:57 -03:00
Matheus Lima c1f0e70980 Created test to validate that when we update the skills settings, the device API is able to fetch the skill settings with the new values 2019-03-06 15:35:35 -03:00
Matheus Lima b85809f316 Implemented skill uploading 2019-03-06 15:35:35 -03:00
Matheus Lima 13e64340e9 Storing skill identifier in to settings_display from the skill.setting_display table 2019-03-06 15:35:35 -03:00
Chris Veilleux 37c94f1adc squashed bug where we tried to encrypt a non-existent password for federated logins 2019-03-06 11:40:54 -06:00
Chris Veilleux 84965186dc added geography endpoint and the repository code to support it 2019-03-05 16:04:38 -06:00
Chris Veilleux 1bfa7800c5 added voice endpoint and the repository code to support it 2019-03-05 15:43:32 -06:00
Chris Veilleux a039bcfb0e new endpoint to manage wake words and the repository changes to support it 2019-03-05 15:23:24 -06:00
Chris Veilleux a16bdae969 new account api endpoint to retreive account preferences, along with the necessary repository changes 2019-03-05 15:22:09 -06:00
Chris Veilleux ac7f1cb593 added device endpoint to account api and altered repository to serve it data 2019-03-05 15:20:31 -06:00
Chris Veilleux e3d42d3aca ui is expecting a value in the membership type even if the user has no membership 2019-03-04 14:41:56 -06:00
Chris Veilleux 169d026db9 fixed a missing None check bug 2019-03-04 14:37:13 -06:00
Chris Veilleux 5f03a3c135 fixed a bug where no the account.agreements attribute was None if there were no agreements. now set to empty list 2019-03-04 14:31:37 -06:00
Chris Veilleux 91a77c5720 added sslmode to connection config to support DigitalOcean database hosting 2019-03-04 00:44:53 -06:00
Chris Veilleux 59872f4d24 socket change 2019-03-04 00:43:56 -06:00
Matheus Lima a5dcdf0c94 Applying model changes 2019-03-03 22:46:00 -03:00
Matheus Lima a90833f178 Fixing tests after rebase 2019-03-03 22:46:00 -03:00
Matheus Lima 737167b854 Fixed skill endpoints applying the changes related to the skill settings model. 2019-03-03 22:46:00 -03:00
Chris Veilleux 581bf1812d renamed a few items in the database schema 2019-03-01 20:33:35 -06:00
Chris Veilleux 0d6cb7d3f1 resolve merge conflicts 2019-02-28 22:01:21 -06:00
Chris Veilleux e16369c565 added snake_to_camel import 2019-02-28 21:47:04 -06:00
Chris Veilleux 3c5983a194 added repository method to get the number of devices for an account. 2019-02-28 21:46:32 -06:00
Chris Veilleux 35fa76e6a2 refactored how skill settings are retrieved. added skill settings change code 2019-02-28 21:46:05 -06:00
Chris Veilleux c3608a10bf
Merge pull request #56 from MycroftAI/populate-profile-page
Populate profile page
2019-02-28 20:44:22 -06:00
Chris Veilleux 61e884b0f6 implemented a sql trick to group by json that made the code a lot simpler 2019-02-26 14:09:31 -06:00
Chris Veilleux 638b74206d added some logic on how to determine the skill name displayed in the ui 2019-02-26 09:37:56 -06:00
Chris Veilleux 1b7c382846 new repository for account skills 2019-02-25 23:27:04 -06:00
Chris Veilleux 05bf20ac4d fixed a minor bug when an account has no refresh tokens 2019-02-25 23:25:37 -06:00
Matheus Lima eccb83ed44 - Refactoring to use a AccountRepository to get an account using the device id
- Created tests for the metrics service
2019-02-25 19:03:08 -03:00
Matheus Lima edc43ed39a Created endpoint to communicate with metrics service 2019-02-25 16:42:11 -03:00
Chris Veilleux 6661f27caf resolve merge conflict 2019-02-25 13:33:50 -06:00
Matheus Lima 2ae8b408e2 adding TODO to change return in the API v2 2019-02-25 16:28:14 -03:00
Matheus Lima e722e519bf Fixed the endpoint used to get the subscription type of a device and created tests for this endpoint 2019-02-25 16:28:14 -03:00
Matheus Lima 88aaccd073 Adding test for the device setting endpoint 2019-02-25 16:28:14 -03:00
Matheus Lima 588525ea47 Created test to the endpoint used to fetch a device 2019-02-25 16:28:14 -03:00
Chris Veilleux cede611f0f Merge remote-tracking branch 'remotes/origin/tartarus-overhaul' into populate-profile-page 2019-02-25 12:06:22 -06:00
Chris Veilleux 42975024aa new package for re-usable testing code. first addition is some database setup and teardown logic 2019-02-25 01:58:41 -06:00
Chris Veilleux 02a9242c17 new base class for data repositories to eliminate some boilerplate code 2019-02-25 01:57:44 -06:00
Chris Veilleux 73fca3b7e1 added membership repository 2019-02-25 01:50:20 -06:00
Chris Veilleux f63d1ad633 added membership repository 2019-02-25 01:49:56 -06:00
Chris Veilleux 86883f31aa added non-pool connection to API 2019-02-25 01:48:35 -06:00
Chris Veilleux d71ae4831c moved database connection call into the get_base_config function so it is not attempted at import time. this is necessary to allow the behave tests to create a test database 2019-02-25 01:48:02 -06:00
Chris Veilleux 95a5d383e9 changed "subscription" to "membership" 2019-02-25 01:46:43 -06:00
Chris Veilleux 20e865d6ab changed "subscription" to "membership" 2019-02-25 01:46:29 -06:00
Chris Veilleux 8d73d18e09 changed "subscription" to "membership" 2019-02-24 23:54:34 -06:00
Chris Veilleux e633ade60d changed "subscription" to "membership" 2019-02-24 23:49:12 -06:00
Chris Veilleux 0c1e7ec9d8 changed "subscription" to "membership" 2019-02-24 23:47:19 -06:00
Matheus Lima 577c470d90 - Using schematics to validate POST data
- Fixed test
- Fixed error handler to present a better error message
2019-02-22 14:23:43 -03:00
Matheus Lima af45f633d1 Created endpoint to send email to the account associated to a device 2019-02-22 14:23:43 -03:00
Chris Veilleux 72db7b96eb added logic to format date fields the way the UI likes it 2019-02-21 23:12:14 -06:00
Chris Veilleux 7116ae62d3 removed validtor-collection from requirements 2019-02-20 17:34:59 -06:00
Chris Veilleux 57d46dcd09 Merge remote-tracking branch 'remotes/origin/tartarus-overhaul' into account-api 2019-02-20 17:32:52 -06:00
Chris Veilleux a2a4b4e834 added checks to auth token refresh test to address bug. 2019-02-20 17:31:49 -06:00
Matheus Lima f978ca5239 Reverting change in the agreement repository 2019-02-20 20:25:21 -03:00
Matheus Lima 23e056ca96 Created test to validate device pairing workflow 2019-02-20 20:25:21 -03:00
Matheus Lima 640f08ffbe Refactoring 2019-02-20 20:25:21 -03:00
Matheus Lima 750921fb7d Created endpoint to activate a device that is in a pairing process 2019-02-20 20:25:21 -03:00
Matheus Lima 5b6776c92e - Created endpoint to add a device to an account using a pairing code
- Renamed selene_cache module to cache
2019-02-20 20:25:21 -03:00
Matheus Lima 64e513a7df Created endpoint to get the device pairing code 2019-02-20 20:25:21 -03:00
Chris Veilleux f1e1ba60d1 fixed a bug with authentication logic that refreshed tokens when access token expired 2019-02-20 16:50:22 -06:00
Chris Veilleux 24faf0fbbd fixed a bug with new account logic when a user opts out of membership 2019-02-20 14:45:06 -06:00
Chris Veilleux afcbbc05a5 changed display name to username 2019-02-19 17:16:19 -06:00
Chris Veilleux 517177078c return a dictionary instead of a string to make the response go through the coersion routine 2019-02-19 14:41:05 -06:00
Chris Veilleux c4919b155b Merge remote-tracking branch 'remotes/origin/tartarus-overhaul' into account-api 2019-02-19 14:01:34 -06:00
Chris Veilleux e8a0a161d3 fixing token authentication bugs 2019-02-19 13:33:06 -06:00
Chris Veilleux b98f667f30 refactored to build access and refresh tokens independently for re-usability in other tests. 2019-02-19 13:31:58 -06:00
Chris Veilleux 8118c1b05c new error handler for authentication errors 2019-02-19 10:58:48 -06:00
Matheus Lima 6c25c2f85d Migrating the project from flask-restful to flask 2019-02-19 10:06:30 -03:00
Chris Veilleux c2dfa9c318 removed the validator-collection package now that we are using schematics 2019-02-18 14:50:05 -06:00
Chris Veilleux 988a70752b jsonified the response object 2019-02-18 14:43:26 -06:00
Chris Veilleux b5b7cfdef0 added some whitespace to make pylint happy 2019-02-18 13:01:17 -06:00
Chris Veilleux ee5731d86e applied code review corrections 2019-02-18 11:12:06 -06:00
Chris Veilleux 8e62fc8b72 removed old version of response formatter 2019-02-15 22:13:55 -06:00
Chris Veilleux 24875c9e98 removed flask-restful 2019-02-15 21:48:03 -06:00
Chris Veilleux f5fb8b6dfe added blueprint for flask application setup common to all selene api's 2019-02-15 21:43:59 -06:00
Chris Veilleux 21ae4511b9 converted from flask-restful to flask 2019-02-15 21:43:13 -06:00
Chris Veilleux 8c2eb61aa1 simplified module name and converted from flask-restful to flask 2019-02-15 21:42:44 -06:00
Chris Veilleux 11693be534 created and endpoints package to group common endpoints 2019-02-15 21:41:51 -06:00
Chris Veilleux 8130f587b2 no need for an error message if we are adding agreements 2019-02-15 21:38:53 -06:00
Chris Veilleux 7666227802 added schematics library 2019-02-15 01:02:22 -06:00
Chris Veilleux 1605d8f33d fixed a bug where passing a nested dictionary to a dataclass constructor did not build the child data objects correctly 2019-02-15 00:45:23 -06:00
Chris Veilleux 0d3313041e changed to use new class signature 2019-02-15 00:11:38 -06:00
Chris Veilleux cefbb22d05 add IDs to dataclasses for account object 2019-02-15 00:10:42 -06:00
Chris Veilleux eaabe37c5c ensure the subquery only returns one row 2019-02-15 00:10:11 -06:00
Chris Veilleux 16f676c2f1 include the agreement ID in the agreement object 2019-02-15 00:07:10 -06:00
Chris Veilleux 4f2e0f5274 refactored to take an account id instead of account object as the id is the only field in the object used 2019-02-15 00:06:25 -06:00
Chris Veilleux 49d43d061d new agreements endpoint 2019-02-12 11:17:19 -06:00
Chris Veilleux 0f0ede9d50 added a repository for agreements 2019-02-12 10:40:29 -06:00
Chris Veilleux 03414990bc applied schema changes 2019-02-12 10:39:58 -06:00
Chris Veilleux 7936bed82f added ability to decorate functions that return values 2019-02-12 10:39:05 -06:00
Chris Veilleux 71497b6549 changed update and delete methods to return the number of affected rows 2019-02-12 10:38:16 -06:00
Chris Veilleux 5f548d8aa0 minor refactor 2019-02-12 10:37:46 -06:00
Chris Veilleux dcaf17b5f3 added new validator-collection package and used it to validate the email address on the account object. 2019-02-08 16:25:12 -06:00
Chris Veilleux 75d576f84d define a decorator for executing all sql within a class method in a transaction. commits will occur on success, rollbacks on failure. 2019-02-08 16:12:12 -06:00
Chris Veilleux 65d19a147d ensure all add account insert statements occur within a transaction 2019-02-08 15:15:28 -06:00
Chris Veilleux 44cf4e9e6f added tests of the account endpoint returning subscription and agreement data 2019-02-07 22:41:12 -06:00
Chris Veilleux 0afedc89c3 added start date to the subscription data 2019-02-07 21:01:30 -06:00
Chris Veilleux ca2fa5a78b put account endpoint in api library because all api's that interact with web apps will need it 2019-02-07 20:03:41 -06:00
Chris Veilleux 02a3db7c0f moved token generation test code to api library for re-use 2019-02-07 20:02:43 -06:00
Chris Veilleux 6f229d8977 minor merge conflict 2019-02-07 19:52:47 -06:00
Chris Veilleux 7db6557af2 changed selene.util.encoder to no longer need a custom JSON encoder and moved into the selene.api package 2019-02-07 19:42:42 -06:00
Matheus Lima a3a7537d2a fixing typo 2019-02-07 18:09:34 -03:00
Matheus Lima ba213a8486 Changes to use relative imports 2019-02-07 18:05:07 -03:00
Matheus Lima 492d298a1e Using relative imports to define package level APIs 2019-02-07 17:48:39 -03:00
Matheus Lima edaba3c812 Fixes related to previous refactoring 2019-02-07 17:34:47 -03:00
Matheus Lima e38274e92a Fixes related to previous refactoring 2019-02-07 17:12:21 -03:00
Chris Veilleux 0b28b18b39 moved all data access layer code into a new selene.data package 2019-02-07 13:14:40 -06:00
Chris Veilleux ae9d0dc3a7 fixed merge conflicts 2019-02-07 12:49:20 -06:00
Chris Veilleux c698bb9e05 added docstrings 2019-02-07 12:19:25 -06:00
Matheus Lima 022e2780f9 - Adding comments to the code
- Fixing small issue with the get_setting_by_device_id query
2019-02-07 15:13:56 -03:00
Matheus Lima 676eb3f158 - Created endpoint to fetch the subscription type using the device id 2019-02-07 12:35:46 -03:00
Chris Veilleux 10f9e03b20 added more account-related attributes 2019-02-06 22:49:45 -06:00
Chris Veilleux b964274a44 updated to reflect changes in database access utilities 2019-02-06 22:49:21 -06:00
Chris Veilleux 2e53130ab5 enhanced account object to include other account related data. side-effect was to abstract out some of the get account logic that was redundant 2019-02-06 22:48:46 -06:00
Chris Veilleux 5f7974520f changed to allow for sql to be changed before passing to db utility functions 2019-02-06 22:45:42 -06:00
Matheus Lima 768a692fb8 - Refactored endpoint `device/{uuid}/skill` to fetch all skills using a single query
- Created endpoint to fetch a skill using device id and version_hash
- Removing useless sql files
2019-02-06 21:51:00 -03:00
Chris Veilleux 0fa89ef644 added pyhamcrest package for common api testing package 2019-02-06 13:40:52 -06:00
Chris Veilleux b9d4a5247e added ability to execute an "insert returning" SQL statement, which is useful to return values containing a default (like row IDs) 2019-02-06 13:40:15 -06:00
Chris Veilleux bea58504d6 minor bug 2019-02-06 13:30:53 -06:00
Chris Veilleux 849d65bc21 minor bug fixes 2019-02-06 13:30:33 -06:00
Chris Veilleux 977dc99570 added package for common API testing logic 2019-02-06 13:29:58 -06:00
Chris Veilleux b963857160 fixed ambiguous where clause error. 2019-02-06 11:06:02 -06:00
Chris Veilleux ada2f24b5e fixed a bug with result of add account and added remove account logic 2019-02-05 17:36:24 -06:00
Chris Veilleux 7619e35333 fixed a bug where query wasn't returning account 2019-02-05 17:35:25 -06:00
Chris Veilleux f5d2f464ed get rid of the raise of the API error when authentication fails. there is already an indicator of failed authentication, the self.authenticated flag 2019-02-05 16:24:38 -06:00
Chris Veilleux c9d167549c added functionality to insert a new account and added the password field back into the account object 2019-02-05 16:23:41 -06:00
Chris Veilleux 745f7fd7e3 added ability to expire a token cookie 2019-02-05 13:25:22 -06:00
Chris Veilleux 845dd6b308 fixed minor bugs found in testing 2019-02-05 12:48:48 -06:00
Chris Veilleux 440bdaabc6 provided ability to specify value of database connection's autocommit attribute 2019-02-05 12:28:49 -06:00
Chris Veilleux f8f3cf3957 changed join on refresh token table to outer join in case there are no refresh tokens for an account 2019-02-05 12:06:49 -06:00
Chris Veilleux 41cbf732f1 changed join on refresh token table to outer join in case there are no refresh tokens for an account 2019-02-05 12:06:19 -06:00
Chris Veilleux e4a165d279 new functionality for federated login to ensure the email address exists on our platform 2019-02-05 11:30:37 -06:00
Chris Veilleux ce444f3293 changed dev domain setting for https purposes 2019-02-05 11:29:35 -06:00
Chris Veilleux 06fbbae76d changed how cookies are build to fix issue with accessing them in client code 2019-02-05 11:29:00 -06:00
Matheus Lima 8a5476f28b Improving the function that fetches the device settings by device id to work using a single query. Removing unnecessary functions and sql files after performing this change. 2019-02-05 12:42:01 -03:00
Matheus Lima 0b01fdbe97 - Fixing query to reduce the amount of processing on the code side 2019-02-05 11:09:23 -03:00
Matheus Lima 3f988221f3 - Moving WakeWord and TextToSpeech to own packages
- Making the get_device_by_id fetch all entities using a single query
2019-02-04 20:54:15 -03:00
Chris Veilleux aea9851116 moved the hook to add the cookies to the response into the base class to avoid re-coding it in every place it is needed. 2019-02-04 15:04:22 -06:00
Chris Veilleux 70ccab71de minor bug fix for cookie domain 2019-02-04 15:03:19 -06:00
Matheus Lima ade99800ef - Fixing setup.py to properly include the data files described by MANIFEST.in
- Initializing the API config
- Fixing the endpoints to use the config variable to access the connection pool
2019-02-02 22:39:00 -03:00
Matheus Lima 9f29aa5a86 Moving custom encoder logic to the util package in the shared project 2019-02-02 20:36:53 -03:00
Chris Veilleux 604fd6108b added group by and changed a join to a left join to fix bugs 2019-02-02 00:45:35 -06:00
Chris Veilleux aec1f18ad8 minor bug fix 2019-02-02 00:45:00 -06:00
Chris Veilleux 4fbe6e1c6d removed print statement 2019-02-02 00:44:37 -06:00
Chris Veilleux 0e79c40f99 reflect changes to account package 2019-02-01 22:09:30 -06:00
Chris Veilleux ad0d4820f0 added logic to add a refresh token on sign in; moved refresh token functions in the account repository to their own repository; moved authentication repo into account repo 2019-02-01 22:08:59 -06:00
Chris Veilleux 901a256d54 broke refresh tokens into their own table and added functionality to update/delete a refresh token 2019-02-01 21:41:32 -06:00
Chris Veilleux c17dcf0a4e added ability to delete an expired refresh token and update a refresh token 2019-02-01 21:40:44 -06:00
Matheus Lima b6440abd38 Moving setting folder content into device folder in the shared project 2019-02-01 20:34:59 -03:00
Matheus Lima f5bbaa0892 Creating endpoints to fetch device, device's setting and device's skills 2019-02-01 20:34:59 -03:00
Chris Veilleux 0df1211409 Merge remote-tracking branch 'remotes/origin/tartarus-overhaul' into single-sign-on-api 2019-02-01 15:16:41 -06:00
Chris Veilleux 45a9115c66
removed unnecessary quotation marks 2019-02-01 15:14:23 -06:00
Chris Veilleux cde0db0f3f Merge remote-tracking branch 'remotes/origin/tartarus-overhaul' into single-sign-on-api 2019-02-01 14:23:39 -06:00
Chris Veilleux 9f0fe936d7
added psycopg2 to dependencies 2019-02-01 14:23:18 -06:00
Chris Veilleux a23fa4dec3 Merge remote-tracking branch 'remotes/origin/tartarus-overhaul' into single-sign-on-api 2019-02-01 14:05:06 -06:00
Chris Veilleux 585f9332db
Fixed how the packages were identified 2019-02-01 14:03:59 -06:00
Chris Veilleux a04a710f9a merging in tartarus-overhaul 2019-02-01 13:52:14 -06:00
Chris Veilleux f78db57883
Create __init__.py 2019-02-01 13:49:42 -06:00
Chris Veilleux dc9dce74d2
changed package name in to selene 2019-02-01 13:49:01 -06:00
Chris Veilleux 33cfe4c63b minor refactor 2019-02-01 00:43:59 -06:00
Chris Veilleux 1085c6ead7 new sql for updating the refresh token 2019-02-01 00:33:49 -06:00
Chris Veilleux b733f68d7f new repository for authentication logic 2019-02-01 00:32:52 -06:00
Chris Veilleux 753c522833 added imports 2019-02-01 00:32:29 -06:00
Chris Veilleux f458e809e9 added refresh token logic 2019-02-01 00:32:09 -06:00
Chris Veilleux e4a21a25e9 updated to return all columns 2019-02-01 00:26:28 -06:00
Chris Veilleux 2dcb851382 added refresh token to query and refactored 2019-02-01 00:26:03 -06:00
Chris Veilleux 9bd0622fc2 added refresh token to dataclass 2019-02-01 00:25:27 -06:00
Chris Veilleux 51e706dce6 converted function into repository class and added method to update the refresh token 2019-02-01 00:24:34 -06:00