Skip to content

Commit 29e617c

Browse files
committed
build(codegen): updating SDK
1 parent e06f3bd commit 29e617c

8 files changed

Lines changed: 68 additions & 18 deletions

packages/platform-sdk/src/generated/client/product-projections/by-project-key-in-store-key-by-store-key-product-projections-by-id-request-builder.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,22 @@ export class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDRequestBuilde
2121
}
2222
) {}
2323
/**
24-
* Gets the current or staged representation of a [Product](ctp:api:type:Product) by its ID in the specified [Store](ctp:api:type:Store).
24+
* Retrieves the [projected](/../api/projects/productProjections#projection-dimensions) representation of a [Product](ctp:api:type:Product) by its ID in the specified [Store](ctp:api:type:Store).
25+
*
2526
* If the Store has defined some languages, countries, distribution, supply Channels, and/or Product Selection,
2627
* they are used for projections based on [locale](ctp:api:type:ProductProjectionLocales), [price](ctp:api:type:ProductProjectionPrices),
2728
* and [inventory](ctp:api:type:ProductProjectionInventoryEntries).
2829
* If [ProductSelection](ctp:api:type:ProductSelection) is used, it affects the [availability of the Product](/api/project-configuration-overview#products-available-in-store) in the specified Store.
29-
* If a [ProductTailoring](ctp:api:type:ProductTailoring) exists for the Product with the given `id` and the given Store, this endpoint returns the ProductProjection with tailored data.
30-
* When used with an API Client that has the `view_published_products:{projectKey}` scope, this endpoint only returns published (current) Product Projections.
30+
* If a [ProductTailoring](ctp:api:type:ProductTailoring) exists for the Product with the given `key` and the given Store, this endpoint returns the ProductProjection with tailored data.
31+
*
32+
* By default, this endpoint returns the `current` representation of Products where the `published` flag is `true`.
33+
* If a Product is unpublished (`published=false`), the endpoint returns a [Not Found](/../api/errors#404-not-found) error.
34+
*
35+
* Required access scopes:
36+
*
37+
* - To retrieve the current representation of published Products (published data), the `view_published_products:{projectKey}` scope is required.
38+
*
39+
* - To retrieve the staged representation of Products (draft data) or access unpublished Products, the API Client must have the `view_products:{projectKey}` scope.
3140
*
3241
*/
3342
public get(methodArgs?: {

packages/platform-sdk/src/generated/client/product-projections/by-project-key-in-store-key-by-store-key-product-projections-key-by-key-request-builder.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,22 @@ export class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyRequestBu
2121
}
2222
) {}
2323
/**
24-
* Gets the current or staged representation of a [Product](ctp:api:type:Product) by its key in the specified [Store](ctp:api:type:Store).
24+
* Retrieves the [projected](/../api/projects/productProjections#projection-dimensions) representation of a [Product](ctp:api:type:Product) by its Key in the specified [Store](ctp:api:type:Store).
25+
*
2526
* If the Store has defined some languages, countries, distribution, supply Channels, and/or Product Selection,
2627
* they are used for projections based on [locale](ctp:api:type:ProductProjectionLocales), [price](ctp:api:type:ProductProjectionPrices),
2728
* and [inventory](ctp:api:type:ProductProjectionInventoryEntries).
2829
* If [ProductSelection](ctp:api:type:ProductSelection) is used, it affects the [availability of the Product](/api/project-configuration-overview#products-available-in-store) in the specified Store.
2930
* If a [ProductTailoring](ctp:api:type:ProductTailoring) exists for the Product with the given `key` and the given Store, this endpoint returns the ProductProjection with tailored data.
30-
* When used with an API Client that has the `view_published_products:{projectKey}` scope, this endpoint only returns published (current) Product Projections.
31+
*
32+
* By default, this endpoint returns the `current` representation of Products where the `published` flag is `true`.
33+
* If a Product is unpublished (`published=false`), the endpoint returns a [Not Found](/../api/errors#404-not-found) error.
34+
*
35+
* Required access scopes:
36+
*
37+
* - To retrieve the current representation of published Products (published data), the `view_published_products:{projectKey}` scope is required.
38+
*
39+
* - To retrieve the staged representation of Products (draft data) or access unpublished Products, the API Client must have the `view_products:{projectKey}` scope.
3140
*
3241
*/
3342
public get(methodArgs?: {

packages/platform-sdk/src/generated/client/product-projections/by-project-key-product-projections-by-id-request-builder.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,16 @@ export class ByProjectKeyProductProjectionsByIDRequestBuilder {
2020
}
2121
) {}
2222
/**
23-
* Gets the current or staged representation of a [Product](ctp:api:type:Product) by its ID. When used with an API Client that has the `view_published_products:{projectKey}` scope, this endpoint only returns published (current) Product Projections.
23+
* Retrieves the [projected](/../api/projects/productProjections#projection-dimensions) representation of a [Product](ctp:api:type:Product) by its ID.
24+
*
25+
* By default, this endpoint returns the `current` representation of Products where the `published` flag is `true`.
26+
* If a Product is unpublished (`published=false`), the endpoint returns a [Not Found](/../api/errors#404-not-found) error.
27+
*
28+
* Required access scopes:
29+
*
30+
* - To retrieve the current representation of published Products (published data), the `view_published_products:{projectKey}` scope is required.
31+
*
32+
* - To retrieve the staged representation of Products (draft data) or access unpublished Products, the API Client must have the `view_products:{projectKey}` scope.
2433
*
2534
*/
2635
public get(methodArgs?: {

packages/platform-sdk/src/generated/client/product-projections/by-project-key-product-projections-key-by-key-request-builder.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,16 @@ export class ByProjectKeyProductProjectionsKeyByKeyRequestBuilder {
2020
}
2121
) {}
2222
/**
23-
* Gets the current or staged representation of a [Product](ctp:api:type:Product) found by Key.
24-
* When used with an API Client that has the `view_published_products:{projectKey}` scope,
25-
* this endpoint only returns published (current) Product Projections.
23+
* Retrieves the [projected](/../api/projects/productProjections#projection-dimensions) representation of a [Product](ctp:api:type:Product) by its Key.
24+
*
25+
* By default, this endpoint returns the `current` representation of Products where the `published` flag is `true`.
26+
* If a Product is unpublished (`published=false`), the endpoint returns a [Not Found](/../api/errors#404-not-found) error.
27+
*
28+
* Required access scopes:
29+
*
30+
* - To retrieve the current representation of published Products (published data), the `view_published_products:{projectKey}` scope is required.
31+
*
32+
* - To retrieve the staged representation of Products (draft data) or access unpublished Products, the API Client must have the `view_products:{projectKey}` scope.
2633
*
2734
*/
2835
public get(methodArgs?: {

packages/platform-sdk/src/generated/client/product-projections/by-project-key-product-projections-request-builder.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,16 @@ export class ByProjectKeyProductProjectionsRequestBuilder {
6969
}
7070

7171
/**
72-
* Use the Product Projections query endpoint to get the current or staged representations of Products.
73-
* When used with an API Client that has the `view_published_products:{projectKey}` scope,
74-
* this endpoint only returns published (current) Product Projections.
72+
* Retrieves the [projected](/../api/projects/productProjections#projection-dimensions) representation of [Products](ctp:api:type:Product) by [query predicates](/../api/predicates/query).
73+
*
74+
* By default, this endpoint returns the `current` representation of Products where the `published` flag is `true`.
75+
* If a Product is unpublished (`published=false`), the endpoint returns a [Not Found](/../api/errors#404-not-found) error.
76+
*
77+
* Required access scopes:
78+
*
79+
* - To retrieve the current representation of published Products (published data), the `view_published_products:{projectKey}` scope is required.
80+
*
81+
* - To retrieve the staged representation of Products (draft data) or access unpublished Products, the API Client must have the `view_products:{projectKey}` scope.
7582
*
7683
*/
7784
public get(methodArgs?: {

packages/platform-sdk/src/generated/models/product-tailoring.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ export interface ProductTailoring extends BaseResource {
8888
*/
8989
readonly published: boolean
9090
/**
91-
* Current (published) data of the ProductTailoring.
91+
* Current data of the ProductTailoring returned in the [Product Projection](/projects/productProjections) response when the ProductTailoring is published.
9292
*
9393
*
9494
*/
9595
readonly current: ProductTailoringData
9696
/**
97-
* Staged (unpublished) data of the ProductTailoring.
97+
* Staged data of the ProductTailoring. This data is not returned in the Product Projection response by default.
9898
*
9999
*
100100
*/

packages/platform-sdk/src/generated/models/product.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export interface Product extends BaseResource {
295295
*/
296296
export interface ProductCatalogData {
297297
/**
298-
* `true` if the Product is published.
298+
* If `true`, the `current` representation of the Product is retrievable in the [Product Projection](/projects/productProjections) endpoints and indexed for [Product Search](/../api/projects/product-search).
299299
*
300300
*
301301
*/
@@ -498,7 +498,9 @@ export interface ProductDraft {
498498
*/
499499
readonly state?: StateResourceIdentifier
500500
/**
501-
* If `true`, the Product is published immediately to the current projection.
501+
* If `true`, the platform sets the `published` flag on the resulting [ProductCatalogData](ctp:api:type:ProductCatalogData) to `true`.
502+
* This makes the current representation retrievable in [Product Projection](/projects/productProjections) endpoints and indexes it for [Product Search](/../api/projects/product-search).
503+
* You can also set this flag later using the [Publish](/projects/products#publish) update action.
502504
*
503505
*
504506
*/
@@ -1615,7 +1617,9 @@ export interface ProductMoveImageToPositionAction extends IProductUpdateAction {
16151617
readonly staged?: boolean
16161618
}
16171619
/**
1618-
* Publishes product data from the Product's staged projection to its current projection.
1620+
* Copies the product data from the Product's staged representation to its current representation and sets the `published` flag on the resulting [ProductCatalogData](ctp:api:type:ProductCatalogData) to `true`.
1621+
* This makes the current representation retrievable in [Product Projection](/projects/productProjections) endpoints and indexes it for [Product Search](/../api/projects/product-search).
1622+
*
16191623
* Produces the [ProductPublished](ctp:api:type:ProductPublishedMessage) Message.
16201624
*/
16211625
export interface ProductPublishAction extends IProductUpdateAction {
@@ -2552,7 +2556,11 @@ export interface ProductTransitionStateAction extends IProductUpdateAction {
25522556
readonly force?: boolean
25532557
}
25542558
/**
2555-
* Removes the current [projection](/../api/projects/productProjections#current--staged) of the Product. The staged projection is unaffected. To retrieve unpublished Products, the `staged` parameter must be set to `false` when [querying](ctp:api:endpoint:/{projectKey}/product-projections:GET)/[searching](/projects/product-projection-search#product-projection-search) Product Projections. Produces the [ProductUnpublished](ctp:api:type:ProductUnpublishedMessage) Message.
2559+
* Sets the `published` flag on the [ProductCatalogData](ctp:api:type:ProductCatalogData) to `false`.
2560+
* This makes the [current](/../api/projects/productProjections#current--staged) representation of a Product unavailable in [Product Projection](/projects/productProjections) endpoints by default, and excludes it from [Product Search](/../api/projects/product-search).
2561+
* To retrieve unpublished Products on Product Projection endpoints, set parameter `staged=true`.
2562+
*
2563+
* Produces the [ProductUnpublished](ctp:api:type:ProductUnpublishedMessage) Message.
25562564
*
25572565
* When a Product is unpublished, any associated Line Items already present in a Cart remain unaffected and can still be ordered. To prevent this, do the following:
25582566
*

references.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,3 +493,4 @@ cbeea260f9f18bcf07ccb45817d3243a37753972
493493
8ad4b29dfcc94ee497a2d38943174b3f15e119e6
494494
b5bff392d7576a913753815a876d62e929b30fb1
495495
2a88ce377b090f11908153e9de2141df11c04447
496+
3505c9432594c0f08addbb9e19eea2ea9ea7b2e0

0 commit comments

Comments
 (0)