From 3d58778240edd6b40cfa21661cd6bef0d4f96718 Mon Sep 17 00:00:00 2001 From: weronika-kurczyna <117282008+weronika-kurczyna@users.noreply.github.com> Date: Wed, 4 Oct 2023 16:26:28 +0200 Subject: [PATCH] move utility types to separate file, update changeset --- .changeset/tidy-comics-new.md | 35 ++++++++++++++++++-- packages/sdk/src/types/ProductCollections.ts | 6 ---- packages/sdk/src/types/UtilityTypes.ts | 4 +++ 3 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 packages/sdk/src/types/UtilityTypes.ts diff --git a/.changeset/tidy-comics-new.md b/.changeset/tidy-comics-new.md index c87ad46d6..dd34d7247 100644 --- a/.changeset/tidy-comics-new.md +++ b/.changeset/tidy-comics-new.md @@ -3,5 +3,36 @@ --- Add missing methods covering Product Collections API. -- Added support for new endpoints: `GET POST /product-collections`, `GET DELETE /product-collections/{productCollectionId}` and `GET /product-collections/${productCollectionId}/products` [(examples of usage available in readme.md)](..%2F..%2Fpackages%2Fsdk%2FREADME.md) -- New exported types/interfaces in `ProductCollections.ts`: `CreateProductCollection`, `CreateProductCollectionStaticProduct`, `CreateProductCollectionAutoUpdate`, `Junction`, `FiltersCondition`, `ProductCollectionsObject`, `ListProductCollectionsParameters`, `ListProductCollections`, `ListProductsInCollectionParameters`, `ListProductsInCollection`, `ProductInCollectionSku`, `ProductInCollectionSkuProduct` and `ProductInCollectionProduct` +- Added support for new endpoints: + - `GET POST /product-collections`, + - `GET DELETE /product-collections/{productCollectionId}`, + - `GET /product-collections/${productCollectionId}/products` [(examples of usage available in readme.md)](..%2F..%2Fpackages%2Fsdk%2FREADME.md) +- New exported types/interfaces in `ProductCollections.ts`: + - Domain types: + - ProductIdentity + - SkuIdentity + - ProductBase + - SkuBase + - ProductSaved + - SkuSaved + - Product + - ProductInCollection + - SkuInCollection + - ProductInCollectionItem + - ProductCollectionIdentity + - ProductCollectionSaved + - ProductCollectionBase + - StaticProductCollectionBase + - DynamicProductCollectionBase + - Filter + - Junction + - AllowedFiltersKeys + - FiltersCondition + - 0-level types: + - ProductCollectionsCreateRequestBody + - ProductCollectionsCreateResponseBody + - ProductCollectionsListRequestQuery + - ProductCollectionsListResponseBody + - ProductCollectionsGetResponseBody + - ProductCollectionsListProductsRequestQuery + - ProductCollectionsListProductsResponseBody \ No newline at end of file diff --git a/packages/sdk/src/types/ProductCollections.ts b/packages/sdk/src/types/ProductCollections.ts index 2cb22886e..918fa61ff 100644 --- a/packages/sdk/src/types/ProductCollections.ts +++ b/packages/sdk/src/types/ProductCollections.ts @@ -1,9 +1,3 @@ -// Utility types -type WithRequiredProperty = Type & - { - [Property in Key]-?: Type[Property] - } - // Domain types // Product diff --git a/packages/sdk/src/types/UtilityTypes.ts b/packages/sdk/src/types/UtilityTypes.ts new file mode 100644 index 000000000..0ac9dd002 --- /dev/null +++ b/packages/sdk/src/types/UtilityTypes.ts @@ -0,0 +1,4 @@ +type WithRequiredProperty = Type & + { + [Property in Key]-?: Type[Property] + }