Commit Graph

123 Commits

Author SHA1 Message Date
Ron Rennick 404e3aeb7c update changelog, remove sale price from test 2021-02-23 14:44:47 -04:00
Ron Rennick dcb76a3047 use common buildURL function 2021-02-23 04:52:43 -04:00
Ron Rennick cc86f19dec fix up some in code docs 2021-02-22 17:16:17 -04:00
Ron Rennick 2e2b53cd7d add external product type to api package 2021-02-22 17:12:30 -04:00
Ron Rennick 9e55856875 add missing update params 2021-02-15 23:27:22 -04:00
Ron Rennick ff79153dd5 add product links collections 2021-02-15 16:59:11 -04:00
Ron Rennick 84f5223dd5 add related and upsell ids 2021-02-15 14:44:40 -04:00
Ron Rennick 653ca39121 add remaining single value props to abstract product 2021-02-15 14:15:37 -04:00
Ron Rennick 18565bf8ee First pass at separating product properties into groups 2021-02-12 15:29:22 -04:00
Ron Rennick ba6debf83b add ts-ignore for interface 2021-02-01 22:02:15 -04:00
Ron Rennick 610e0d4f17 simplify imports/exports in api package 2021-02-01 19:41:18 -04:00
Ron Rennick 09dedb5520
bump version in E2E packages (#28823)
* bump version in core-tests, utils

* bump api package version, update changelog

* bump e2e-environment to 0.2.0
2021-01-22 14:22:33 +01:00
Tam Mullen 8f46eec95a
Merge pull request #28198 from woocommerce/add/package-changelogs
add/update e2e package change logs
2020-11-11 14:12:52 +00:00
Christopher Allford 72e93f11b2
Update CHANGELOG.md
Updated the `@woocommerce/api` changelog
2020-11-10 16:32:11 -08:00
Christopher Allford 93d6b261c6
Merge pull request #28129 from woocommerce/add/lerna-hoist
add lerna hoist, use consistent package versions
2020-11-10 16:13:58 -08:00
Christopher Allford 11c7e3bff6 Fixed issues that caused the factory creation to fail for SimpleProduct types 2020-11-09 12:02:01 -08:00
Ron Rennick 7282e0bca6 merge master 2020-11-09 14:30:01 -04:00
Christopher Allford d205d6551e Added all of the update parameters for simple products 2020-11-06 14:01:03 -08:00
Christopher Allford a646c712d8 Generalized the various restXXX functions
Since it looks like almost all of these are going to be virtually identical, it makes sense to have common functions that we can use instead of having to write all of the boilerplate unnecessarily.
2020-11-06 13:24:02 -08:00
Christopher Allford 29c9976354 Added "list", "read", "update", and "delete" actions for simple products 2020-11-06 11:11:58 -08:00
Christopher Allford 45b57d46b9 Added transformers for all of the product sub-data 2020-11-06 10:44:57 -08:00
Christopher Allford b4a2316386 Added array support to property type and model transformer transformations 2020-11-06 10:01:12 -08:00
Christopher Allford 5e35d68789 Added a new transformation for nesting transformers 2020-11-05 22:49:37 -08:00
Christopher Allford fb5f393acb Made abstract product sale dates easier to work with 2020-11-05 22:20:42 -08:00
Christopher Allford 681e568fbe Expanded on a shared transformer to encapsulate abstract product transformations 2020-11-05 21:43:45 -08:00
Christopher Allford 7fcbc69235 Added a transformer to convert between data types 2020-11-05 19:25:45 -08:00
Christopher Allford 7287eb024c Reversed the execution of transformers for "toModel" so that things like key changes will happen first 2020-11-05 16:29:04 -08:00
Christopher Allford d060108afe Added a custom transformation for models to implement specific logic. 2020-11-05 14:14:47 -08:00
Christopher Allford 4f08e102c4 Simplified the transformer usage in repositories 2020-11-05 13:57:56 -08:00
Ron Rennick 9feecc1376 add/update e2e package changelogs 2020-11-05 16:57:04 -04:00
Christopher Allford 46df060c0e Revised the ModelTransformer so that it can support more complicated transformations. 2020-11-05 12:37:40 -08:00
Christopher Allford 67f57abe26 Added type-safe transformation functions for converting between API representations and model representation 2020-11-04 16:33:34 -08:00
Christopher Allford f438ddc80a Added virtually all of the data returned by the REST API to the SimpleProduct model
There's still a few things missing but I think this is a much better start than where we were before.
2020-11-04 14:55:58 -08:00
Christopher Allford 72d09026a6 Renamed the prettyPermalinks method to better clarify its intent 2020-11-04 10:28:10 -08:00
Christopher Allford b9ba2e880d Added support for installations not using pretty permalinks 2020-11-03 17:04:41 -08:00
Christopher Allford 39367de732 Fixed a bug with OAuth signature generation when using query parameters 2020-11-03 17:02:12 -08:00
Ron Rennick 7cb68e055c add lerna hoist, use consistent package versions 2020-10-28 14:21:02 -03:00
Christopher Allford 3558a9a025 Fixed a bug caused by differences in the URL when creating signatures on the client and server 2020-10-02 16:34:07 -07:00
Christopher Allford 6b5ff6d494 Fixed a bug that would cause Axios errors to be consumed by interceptors 2020-10-02 15:37:09 -07:00
Christopher Allford b74adf215a Adjusted the error mechanism to better follow the standard practice of rejecting HTTP errors 2020-10-02 14:10:24 -07:00
Christopher Allford 54b876fc75 Adjusted the typing of the ModelRepository and related interfaces to better distinguish between parent & child models 2020-10-01 18:06:34 -07:00
Christopher Allford 8f5ff436a2 Added support for flat parents to simplify calls with them 2020-10-01 17:48:37 -07:00
Christopher Allford a01da2da93 Updated the lock files 2020-10-01 16:04:03 -07:00
Christopher Allford 8ee89eb85d Documentation fixes 2020-10-01 15:53:30 -07:00
Christopher Allford cfa20570c1 Added appropriate HTTP errors to REST repository methods 2020-10-01 15:37:58 -07:00
Christopher Allford f8574bed56 Added a utility service for updating settings 2020-10-01 15:23:46 -07:00
Christopher Allford f0ad6e4fc2 Added aliases to make repository types easier to read 2020-10-01 15:00:27 -07:00
Christopher Allford 787040db4c Adjusted the ModelRepository to make repository methods more type-safe 2020-10-01 14:31:55 -07:00
Christopher Allford f2dda16c40 Updated lock files 2020-10-01 14:28:14 -07:00
Christopher Allford f6cbab8d07 Added missing static helpers for fetching repositories 2020-09-30 13:16:46 -07:00
Christopher Allford fccf1fb66e Added settings and group repositories with some basic functionality 2020-09-30 13:11:31 -07:00
Christopher Allford 4c2637c479 Added a `list` operation to the repository 2020-09-30 07:59:10 -07:00
Christopher Allford f571324a09 Added better type-safety when distinguishing between resources that are children and those that are not 2020-09-29 18:40:50 -07:00
Christopher Allford 8c5548d06e Added @template JSDoc tag to API package for better IDE support 2020-09-29 12:00:09 -07:00
Christopher Allford ef93f22321 Moved the product model for consistency with other model types 2020-09-25 14:08:19 -07:00
Christopher Allford 44c7428358 Updated package lock files and fixed test error 2020-09-25 13:49:54 -07:00
Christopher Allford c09d91f6ce Finished adding appropriate documentation to the API package 2020-09-25 11:11:17 -07:00
Christopher Allford ca0ea88e52 Updated the JSDoc and type-safety of repositories to better document the implemented operations 2020-09-24 14:22:38 -07:00
Christopher Allford 1674c05b66 Fixed the package.json files array to exclude development content 2020-09-21 13:33:57 -07:00
Christopher Allford 5297b27c79 Moved the factories from the @woocommerce/api package into the @woocommerce/e2e-utils package 2020-09-21 13:14:26 -07:00
Christopher Allford b962c10cee Updated the readme for the API package 2020-09-21 12:32:44 -07:00
Christopher Allford 8e7ef263a2 Adjusted the package exports to be easier to consume 2020-09-21 11:21:35 -07:00
Christopher Allford 866ab47dda Adjusted the exports for clarity of use 2020-09-18 14:26:00 -07:00
Christopher Allford b3b92e2d4d Separated the construction of factories & repositories from the models for simplicity 2020-09-18 13:53:10 -07:00
Christopher Allford a9ee9806a4 Implemented the factory & repository for simple products 2020-09-17 13:31:39 -07:00
Christopher Allford 6c230ca7b3 Centralized the CRUD actions into a single kind of repository that can be easily used in every adapter case 2020-09-17 09:43:43 -07:00
Christopher Allford 3a7c96b7cd Revised the base tsconfig to match Gutenberg more closely 2020-09-16 15:14:53 -07:00
Christopher Allford 011974ec09 Merge branch 'master' into packages/factories-to-api-refactor 2020-09-16 11:51:49 -07:00
Christopher Allford 38afb8c2ff Merge branch 'master' into packages/factories-to-api-refactor 2020-09-15 14:49:22 -07:00
Christopher Allford 63e4dcf4a2 Created a transformer class to use in model repositories
Since models need to support both read & write transformations we can make dealing with this a bit easier in its own class now.
2020-09-09 10:00:30 -07:00
Christopher Allford 39c5bc6b74 Refactored the factory to use a repository instead of an adapter so that we can expose more API functionality 2020-09-07 16:00:27 -07:00
Christopher Allford a875ecb083 Refactored the HTTP layer to be more API-agnostic
Since we're going to be adding more services and CRUD actions it makes sense for our HTTP services to be less tied to the specific REST API implementation.
2020-09-04 11:27:34 -07:00
Christopher Allford c75f0f8886 Renamed the `@woocommerce/factories` package to `@woocommerce/api`
With the plan now to add more CRUD actions the scope of the package has transformed into a more general API package than one just for factories.
2020-09-03 12:28:17 -07:00