Commit Graph

343 Commits (cf1dcbf4ae8af6efab352be78aa238d0d7fff653)

Author SHA1 Message Date
Matheus Lima 12c6884173 Expiring device setting etag when a device is edited 2019-04-19 16:51:35 -03:00
Matheus Lima 710ab6520c Validating skill settings retrieved 2019-04-19 12:36:45 -03:00
Matheus Lima d60fc06ea2 Fixing the skills settings uploading when the skill has empty settings 2019-04-19 12:28:17 -03:00
Chris Veilleux eb6a6d7c61 removed remnants of the refresh_token db table 2019-04-18 17:41:52 -05:00
Chris Veilleux bbcac41cc0 expire device etags when device attributes change 2019-04-18 13:38:31 -05:00
Chris Veilleux 322bdabee6 Merge remote-tracking branch 'origin/test' into test 2019-04-18 12:50:36 -05:00
Chris Veilleux bb4fbd0ac2 Added logic to update a device from the UI, which led to some ancillary changes in logic to add a device. Minor refactoring also done. 2019-04-18 12:49:06 -05:00
Chris Veilleux dde2ea05ea added pyhamcrest and moved selene from dev-packages to packages 2019-04-17 12:24:34 -05:00
Matheus Lima 6c8f7753b1 Adding code field to timezone and fixing the offset and dst offset to de returned in milliseconds instead of hours 2019-04-16 18:36:22 -03:00
Matheus Lima 2af381cf00 Fixing skills settings and skills manifest uploading 2019-04-16 18:11:14 -03:00
Chris Veilleux 6fbd13a5d9
Merge pull request #106 from MycroftAI/test
removed all logic related to storing refresh tokens on the database
2019-04-16 15:59:06 -05:00
Chris Veilleux af5d5b5be3 removed all logic related to storing refresh tokens on the database 2019-04-08 20:39:55 -05:00
Chris Veilleux d9246d60ed
Merge pull request #105 from MycroftAI/test
Bug fixes, device delete
2019-04-08 16:44:00 -05:00
Chris Veilleux 07e87b6e65 updated version 2019-04-08 00:12:08 -05:00
Chris Veilleux 36e459ddb2 forgot to assign return value of federated authentication 2019-04-08 00:11:21 -05:00
Chris Veilleux 7f90820eab move logic to get email address from facebook/google into util so that both sso and account APIs can use it. 2019-04-07 23:33:09 -05:00
Chris Veilleux 2610e260dc retrieve display name from skill for the ui 2019-04-04 17:31:18 -05:00
Chris Veilleux 900b4d1439 enable device delete 2019-04-04 16:59:51 -05:00
Chris Veilleux ad7eb63536
Merge pull request #104 from MycroftAI/test
added logging config to public api
2019-04-04 13:27:45 -05:00
Chris Veilleux bf4991007b added logging config to public api 2019-04-04 13:19:22 -05:00
Chris Veilleux ab73961ec2
Merge pull request #103 from MycroftAI/test
Minor tweaks to logging logic
2019-04-04 11:55:56 -05:00
Chris Veilleux a1b8876dfd added root logger config 2019-04-04 01:51:16 -05:00
Matheus Lima ef3f0a31ad Merge branch 'dev' of github.com:MycroftAI/selene-backend into dev 2019-04-03 22:56:13 -03:00
Matheus Lima c8a86076f9 Configuring logging root 2019-04-03 22:53:35 -03:00
Chris Veilleux 3adaed422e Merge remote-tracking branch 'origin/test' into test 2019-04-03 20:36:00 -05:00
Chris Veilleux 580dc9d37b fixed an issue with the sso API failing due to the selene cache being defined as a base class instance attribute 2019-04-03 20:35:44 -05:00
Matheus Lima 35c5111967 Merge branch 'test' of github.com:MycroftAI/selene-backend into test 2019-04-03 22:14:12 -03:00
Matheus Lima 8d4df9928e Adding logging to the skill manifest endpoint 2019-04-03 22:08:58 -03:00
Chris Veilleux b09d900204 enable update of device defaults 2019-04-03 19:53:19 -05:00
Matheus Lima 11ba261ed6 Adding etag manager in the account api and expiring skill etag when the skill is updated 2019-04-03 13:12:27 -03:00
Chris Veilleux b6542198f3 added a patch method to the preferences endpoint and did some refactoring 2019-04-02 20:35:27 -05:00
Chris Veilleux 41d4548304 Merge remote-tracking branch 'origin/test' into test 2019-04-02 17:31:10 -05:00
Chris Veilleux cf052d138b fixed an incorrect config 2019-04-02 17:30:10 -05:00
Chris Veilleux faf5f068d6
Merge pull request #97 from MycroftAI/dev
Fixing endpoint to use skill family_name instead of skill name
2019-04-02 17:24:04 -05:00
Matheus Lima 2c0061732c Fixing endpoint to use skill family_name instead of skill name 2019-04-02 19:11:45 -03:00
Chris Veilleux 9c847f742a
Merge pull request #95 from MycroftAI/dev
Fixing skill validation
2019-04-02 15:07:07 -05:00
Matheus Lima 3992787355 Fixing skill validation 2019-04-02 16:58:24 -03:00
Chris Veilleux d967208d7b
Merge pull request #93 from MycroftAI/dev
Fixing skill validation
2019-04-02 14:51:06 -05:00
Matheus Lima 7f1e83c8d5 Fixing skill validation 2019-04-02 16:37:45 -03:00
Chris Veilleux 849c8edc3a fixed a minor bug 2019-04-02 12:26:02 -05:00
Matheus Lima 492a778d40 Added etag support to the endpoint to get skill settings 2019-04-02 13:42:45 -03:00
Chris Veilleux 49036b2909 merged dev into global skill id 2019-04-02 11:37:42 -05:00
Chris Veilleux 0ed794e031
Merge pull request #90 from MycroftAI/test
password reset to dev
2019-04-02 11:34:56 -05:00
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 80585076b5 changed definition of skill table to match more closely with the skill metadata 2019-04-01 13:13:05 -05:00
Chris Veilleux 32b62ec72d updated the marketplace API to use the new architecture 2019-03-29 12:05:42 -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
Matheus Lima a55211f0b5 Fixing tests 2019-03-27 11:21:26 -03: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 28977e6355 ensure the geographical location is associated with an account before the device is added 2019-03-25 19:02:48 -05:00
Chris Veilleux a684242648 to improve security, UI will pass authentication tokens to this endpoint instead of email addresses. endpoint will use tokens to obtain email address from provider. 2019-03-25 18:40:01 -05:00
Chris Veilleux 549fdfb8af add a todo to revisit the post logic when I have a better understanding of Angular forms 2019-03-25 16:21:17 -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 cbb476ea4a fixed incorrect query parameters 2019-03-22 12:36:47 -05:00
Chris Veilleux 037892b4e5 fixed a bug where the API was passing an object instead of a string 2019-03-22 12:18:35 -05:00
Chris Veilleux e61a3ab461 removed link from skill to skill display 2019-03-22 12:05:01 -05:00
Chris Veilleux bbc893766f fixed a cut and paste issue 2019-03-22 00:21:50 -05:00
Chris Veilleux 2b46cac1b5
added stripe package 2019-03-21 13:33:36 -05:00
Chris Veilleux f94b1bbe6b applied code review changes 2019-03-21 12:24:46 -05:00
Chris Veilleux 425be9a0a8 merge dev into add-device 2019-03-21 12:08:38 -05:00
Chris Veilleux af49cdb63a return no content (204) when logout is successful 2019-03-20 22:25:17 -05:00
Chris Veilleux 3bd458476a implemented a post request to add a device and did some refactoring 2019-03-20 17:17:40 -05:00
Chris Veilleux 8f4e10aa4d implemented add device tests 2019-03-20 17:16:46 -05:00
Chris Veilleux 330390fd81 commented these out for now since they depend on an endpoint that was moved. 2019-03-20 17:16:18 -05:00
Chris Veilleux 4042775422 apply schema changes 2019-03-20 17:15:56 -05:00
Chris Veilleux db230cc208 removed add device endpoint as it now exists in the account API 2019-03-20 17:12:32 -05:00
Chris Veilleux 3b0a8cfa9e added payment id to subscription arguments to fix a bug 2019-03-20 17:10:48 -05:00
Chris Veilleux 7d7f0bbd01 new endpoint for account defaults 2019-03-20 13:42:17 -05:00
Chris Veilleux 1f757a4ee9 new post method for account preferences 2019-03-19 17:59:36 -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
Matheus Lima b422de76c2 Implemented etag support on the endpoint `GET /device/{uuid}/setting` 2019-03-18 20:21:46 -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
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 d88d58525c Fixing conflicts with dev branch 2019-03-15 11:31:47 -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
Matheus Lima 37058475b2 Created PATCH request to update membership 2019-03-15 11:14:21 -03:00
Chris Veilleux aafcd5d3b6 added endpoint to get membership types and the supporting repository logic 2019-03-15 11:11:16 -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 0d667e4d84 moved shared package out of dev 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 ef921c308b allow for a user with no preferences setup 2019-03-14 23:50:34 -05:00
Chris Veilleux 133bf2a8a5 applied schema changes 2019-03-14 23:49:38 -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
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 b37a566b51 moved shared package out of dev 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
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 ee879ff6b5 moved shared package out of dev 2019-03-08 16:56:53 -06:00
Matheus Lima 5ebad16060 Starting to implement the stripe integration 2019-03-08 19:37:45 -03:00
Matheus Lima 4f401285bd minor fix to make the core more readable 2019-03-08 17:48:29 -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
Chris Veilleux 38494522de
Merge pull request #72 from MycroftAI/put-v1-public-api
Adding the /v1 prefix to the endpoints
2019-03-07 20:14:35 -06:00
Matheus Lima 164d2280f9 Adding the /v1 prefix to the endpoints 2019-03-07 23:08:19 -03:00
Chris Veilleux 3053c5f15a added uwsgi to project requirements 2019-03-07 18:13:57 -06:00
Chris Veilleux 789a07b020 added uwsgi.ini file 2019-03-07 17:16:26 -06:00
Matheus Lima e4bd9930d7 Created endpoint to patch device fields 2019-03-06 22:39:34 -03:00
Matheus Lima 4dc2b47c63 Applying the new authentication logic in the endpoints of the public API 2019-03-06 22:10:59 -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 fabcba8c54 Created endpoint to communicate with the wolfram alpha spoken api 2019-03-06 15:33:39 -03:00
Matheus Lima e8e30f9d6e Created endpoint to refresh device oauth token 2019-03-06 15:22:45 -03:00
Chris Veilleux b7cbc5a733 fixed a bug where the request data was not un-serialized before processing 2019-03-05 22:39:06 -06:00
Chris Veilleux c806bcc689 added configs to uwsgi.ini files 2019-03-05 21:34:25 -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 59872f4d24 socket change 2019-03-04 00:43:56 -06:00
Chris Veilleux f1bd6ce1e2 added a uwsgi.ini file for the account api 2019-03-03 22:20:14 -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 c422ed26f5 changed environment setup to deal with new naming 2019-03-03 19:11:27 -06:00
Chris Veilleux 9595eef5c2 changed behavior tests to deal with naming changes 2019-03-03 19:09:16 -06:00
Chris Veilleux 2f4206a2ab removed hash column again because it was determined to be used in a device ownership feature that will be deprecated. 2019-03-03 18:20:47 -06: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 7cd7967091 added skill setting update logic. also added logic to return a number of devices per account 2019-02-28 21:48:35 -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 d19a1fcdf6 new endpoint for account skills 2019-02-25 23:27:54 -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 a6533fbe32 Removed blocking operation from the db transaction 2019-02-25 16:42:11 -03:00
Matheus Lima edc43ed39a Created endpoint to communicate with metrics service 2019-02-25 16:42:11 -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