Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated SDKs #575

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
810bc57
build(codegen): updating SDK
ct-sdks[bot] Dec 21, 2023
b085997
build(codegen): updating SDK
ct-sdks[bot] Dec 21, 2023
e55d410
build(codegen): updating SDK
ct-sdks[bot] Dec 27, 2023
50c9de0
build(codegen): updating SDK
ct-sdks[bot] Jan 3, 2024
40b14dd
build(codegen): updating SDK
ct-sdks[bot] Jan 9, 2024
40c0e6e
build(codegen): updating SDK
ct-sdks[bot] Jan 9, 2024
9bc46cf
build(codegen): updating SDK
ct-sdks[bot] Jan 10, 2024
af217d7
build(codegen): updating SDK
ct-sdks[bot] Jan 11, 2024
d16cef4
build(codegen): updating SDK
ct-sdks[bot] Jan 12, 2024
2cd301c
build(codegen): updating SDK
ct-sdks[bot] Jan 12, 2024
06fd202
build(codegen): updating SDK
ct-sdks[bot] Jan 12, 2024
c3ec54c
build(codegen): updating SDK
ct-sdks[bot] Jan 17, 2024
a2f283e
build(codegen): updating SDK
ct-sdks[bot] Jan 17, 2024
c1a3d6d
build(codegen): updating SDK
ct-sdks[bot] Jan 18, 2024
e71b1bb
build(codegen): updating SDK
ct-sdks[bot] Jan 22, 2024
0d71d03
build(codegen): updating SDK
ct-sdks[bot] Jan 22, 2024
c967777
build(codegen): updating SDK
ct-sdks[bot] Jan 23, 2024
1504e19
build(codegen): updating SDK
ct-sdks[bot] Jan 24, 2024
e2bcef4
build(codegen): updating SDK
ct-sdks[bot] Jan 24, 2024
f9b0f4a
build(codegen): updating SDK
ct-sdks[bot] Jan 25, 2024
919edbe
build(codegen): updating SDK
ct-sdks[bot] Jan 25, 2024
c0c5691
build(codegen): updating SDK
ct-sdks[bot] Jan 26, 2024
138b026
build(codegen): updating SDK
ct-sdks[bot] Jan 26, 2024
4775463
build(codegen): updating SDK
ct-sdks[bot] Jan 30, 2024
966dded
build(codegen): updating SDK
ct-sdks[bot] Jan 30, 2024
becc8d6
build(codegen): updating SDK
ct-sdks[bot] Jan 30, 2024
9f4534e
build(codegen): updating SDK
ct-sdks[bot] Jan 31, 2024
ba3a526
build(codegen): updating SDK
ct-sdks[bot] Jan 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 50 additions & 16 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
**Api changes**

<details>
<summary>Removed Type(s)</summary>

- :warning: removed type `NotEnabledError`
- :warning: removed type `GraphQLNotEnabledError`
</details>

<details>
<summary>Added Type(s)</summary>

- added type `ApprovalFlowSetCustomFieldAction`
- added type `ApprovalFlowSetCustomTypeAction`
- added type `CartDiscountCreatedMessage`
- added type `CartDiscountDeletedMessage`
- added type `CartDiscountStoreAddedMessage`
- added type `CartDiscountStoreRemovedMessage`
- added type `CartDiscountStoresSetMessage`
- added type `CartDiscountCreatedMessagePayload`
- added type `CartDiscountDeletedMessagePayload`
- added type `CartDiscountStoreAddedMessagePayload`
- added type `CartDiscountStoreRemovedMessagePayload`
- added type `CartDiscountStoresSetMessagePayload`
</details>

<details>
<summary>Changed MethodResponseBody(s)</summary>

- :warning: changed response body for `200: application/json` of method `get /{projectKey}/in-store/key={storeKey}/cart-discounts` from type `CartDiscount` to `CartDiscountPagedQueryResponse`
</details>

<details>
<summary>Added Enum(s)</summary>

- added enum `associate-role` to type `AttributeReferenceTypeId`
- added enum `business-unit` to type `AttributeReferenceTypeId`
- added enum `cart-discount` to type `AttributeReferenceTypeId`
- added enum `approval-flow` to type `CustomFieldReferenceValue`
- added enum `approval-flow` to type `ResourceTypeId`
</details>

<details>
<summary>Added QueryParameter(s)</summary>

Expand All @@ -14,21 +54,23 @@
</details>

<details>
<summary>Added Enum(s)</summary>
<summary>Added Property(s)</summary>

- added enum `associate-role` to type `AttributeReferenceTypeId`
- added enum `business-unit` to type `AttributeReferenceTypeId`
- added enum `cart-discount` to type `AttributeReferenceTypeId`
- added property `custom` to type `ApprovalFlow`
- added property `perMethodExternalTaxRate` to type `CartAddLineItemAction`
- added property `shippingMode` to type `MyCartDraft`
</details>

**History changes**

<details>
<summary>Changed MethodResponseBody(s)</summary>
<summary>Removed Type(s)</summary>

- :warning: changed response body for `200: application/json` of method `get /{projectKey}/in-store/key={storeKey}/cart-discounts` from type `CartDiscount` to `CartDiscountPagedQueryResponse`
- :warning: removed type `ChannelRole`
- :warning: removed type `StateRole`
- :warning: removed type `StateType`
</details>

**History changes**

<details>
<summary>Added Type(s)</summary>

Expand All @@ -39,14 +81,6 @@
- added type `StateTypeEnum`
</details>

<details>
<summary>Removed Type(s)</summary>

- :warning: removed type `ChannelRole`
- :warning: removed type `StateRole`
- :warning: removed type `StateType`
</details>

<details>
<summary>Removed Property(s)</summary>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export interface ImportSummary {
*/
readonly total: number
}
/**
* The number of resources in each [Processing State](/processing-state#processingstate).
*/
export interface OperationStates {
/**
* The number of resources in the `processing` state.
Expand Down
2 changes: 1 addition & 1 deletion packages/importapi-sdk/src/generated/models/orders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ export interface ScoreShippingRateInput {
* The data representation for an Order to be imported that is persisted as an [Order](/../api/projects/orders#top) in the Project.
*
* In commercetools, you can import an Order using the
* [Create Order by Import](/../api/projects/orders-import#create-order-by-import)
* [Create Order by Import](ctp:importapi:endpoint:/{projectKey}/orders/import:POST)
* endpoint method instead of creating it from a Cart.
*
* An OrderImport is a snapshot of an order at the time it was imported.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ export function getRequestsWithMethodParameters(): RequestWithMethod[] {
},
{
method: 'get',
uri: '/test_projectKey/import-containers?limit=0.26748633',
uri: '/test_projectKey/import-containers?limit=7',
request: apiRoot
.withProjectKeyValue({ projectKey: 'test_projectKey' })
.importContainers()
.get({ queryArgs: { limit: 0.26748633 } }),
.get({ queryArgs: { limit: 7 } }),
},
{
method: 'get',
uri: '/test_projectKey/import-containers?offset=0.7475848',
uri: '/test_projectKey/import-containers?offset=3',
request: apiRoot
.withProjectKeyValue({ projectKey: 'test_projectKey' })
.importContainers()
.get({ queryArgs: { offset: 0.7475848 } }),
.get({ queryArgs: { offset: 3 } }),
},
{
method: 'get',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@ export function getRequestsWithMethodParameters(): RequestWithMethod[] {
return [
{
method: 'get',
uri: '/test_projectKey/import-containers/test_importContainerKey/import-operations?limit=0.26748633',
uri: '/test_projectKey/import-containers/test_importContainerKey/import-operations?limit=7',
request: apiRoot
.withProjectKeyValue({ projectKey: 'test_projectKey' })
.importContainers()
.withImportContainerKeyValue({
importContainerKey: 'test_importContainerKey',
})
.importOperations()
.get({ queryArgs: { limit: 0.26748633 } }),
.get({ queryArgs: { limit: 7 } }),
},
{
method: 'get',
uri: '/test_projectKey/import-containers/test_importContainerKey/import-operations?offset=0.7475848',
uri: '/test_projectKey/import-containers/test_importContainerKey/import-operations?offset=3',
request: apiRoot
.withProjectKeyValue({ projectKey: 'test_projectKey' })
.importContainers()
.withImportContainerKeyValue({
importContainerKey: 'test_importContainerKey',
})
.importOperations()
.get({ queryArgs: { offset: 0.7475848 } }),
.get({ queryArgs: { offset: 3 } }),
},
{
method: 'get',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ export class ByProjectKeyCartDiscountsByIDRequestBuilder {
this.args.executeRequest
)
}
/**
* Deleting a Cart Discount produces the [CartDiscountDeleted](ctp:api:type:CartDiscountDeletedMessage) Message.
*/
public delete(methodArgs: {
queryArgs: {
version: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ export class ByProjectKeyCartDiscountsKeyByKeyRequestBuilder {
this.args.executeRequest
)
}
/**
* Deleting a Cart Discount produces the [CartDiscountDeleted](ctp:api:type:CartDiscountDeletedMessage) Message.
*/
public delete(methodArgs: {
queryArgs: {
version: number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ export class ByProjectKeyCartDiscountsRequestBuilder {
this.args.executeRequest
)
}
/**
* Creating a Cart Discount produces the [CartDiscountCreated](ctp:api:type:CartDiscountCreatedMessage) Message.
*/
public post(methodArgs: {
queryArgs?: {
expand?: string | string[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export class ByProjectKeyInStoreKeyByStoreKeyCartDiscountsByIDRequestBuilder {
/**
* To delete a CartDiscount, specify the `manage_cart_discounts:{projectKey}:{storeKey}` scope for all Stores associated with the CartDiscount.
*
* Deleting a Cart Discount produces the [CartDiscountDeleted](ctp:api:type:CartDiscountDeletedMessage) Message.
*
*/
public delete(methodArgs: {
queryArgs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export class ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyRequestBuilder
/**
* To delete a CartDiscount, specify the `manage_cart_discounts:{projectKey}:{storeKey}` scope for all Stores associated with the CartDiscount.
*
* Deleting a Cart Discount produces the [CartDiscountDeleted](ctp:api:type:CartDiscountDeletedMessage) Message.
*
*/
public delete(methodArgs: {
queryArgs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ export class ByProjectKeyInStoreKeyByStoreKeyCartDiscountsRequestBuilder {
/**
* When using the endpoint, the Store specified in the path and the Stores specified in the payload's `stores` field are added to the CartDiscount.
*
* Creating a Cart Discount produces the [CartDiscountCreated](ctp:api:type:CartDiscountCreatedMessage) Message.
*
*/
public post(methodArgs: {
queryArgs?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class ByProjectKeyLoginRequestBuilder {
/**
* Authenticates a global Customer not associated with a Store.
* For more information, see [Global versus Store-specific Customers](/../api/customers-overview#global-versus-store-specific-customers).
* If the Customer is registered in a Store, use the [Authenticate (sign in) Customer in Store](/../api/projects/customers#authenticate-sign-in-customer-in-store) method.
* If the Customer is registered in a Store, use the [Authenticate (sign in) Customer in Store](ctp:api:endpoint:/{projectKey}/in-store/key={storeKey}/login:POST) method.
*
* If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class ByProjectKeyShippingMethodsMatchingCartLocationRequestBuilder {
}
) {}
/**
* Retrieves all the ShippingMethods that can ship to the given [Location](/projects/zones#location)
* Retrieves all the ShippingMethods that can ship to the given [Location](ctp:api:type:Location)
* with a `predicate` that matches the given Cart.
* Each ShippingMethod contains exactly one ShippingRate with the flag `isMatching` set to `true`.
* This ShippingRate is used when the ShippingMethod is [added to the Cart](ctp:api:type:CartSetShippingMethodAction).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class ByProjectKeyShippingMethodsMatchingOrdereditRequestBuilder {
}
) {}
/**
* Retrieves all the ShippingMethods that can ship to the given [Location](/../api/projects/zones#location) for an [OrderEdit](/../api/projects/order-edits).
* Retrieves all the ShippingMethods that can ship to the given [Location](ctp:api:type:Location) for an [OrderEdit](ctp:api:type:OrderEdit).
*
* If the OrderEdit preview cannot be generated, an [EditPreviewFailed](ctp:api:type:EditPreviewFailedError) error is returned.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ export class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDRequestBuilde
) {}
/**
* Gets the current or staged representation of a [Product](ctp:api:type:Product) by its ID from the specified [Store](ctp:api:type:Store).
* If the Store has defined some languages, countries, distribution or supply Channels,
* If the Store has defined some languages, countries, distribution, supply Channels, and/or Product Selection,
* they are used for projections based on [locale](ctp:api:type:ProductProjectionLocales), [price](ctp:api:type:ProductProjectionPrices)
* and [inventory](ctp:api:type:ProductProjectionInventoryEntries).
*
* If [ProductSelection](ctp:api:type:ProductSelection) is used, it affects the [availability of the Product](/projects/stores#products-available-in-store) in the specified Store.
*
* When used with an API Client that has the `view_published_products:{projectKey}` scope, this endpoint only returns published (current) Product Projections.
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ export class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyRequestBu
) {}
/**
* Gets the current or staged representation of a [Product](ctp:api:type:Product) by its key from the specified [Store](ctp:api:type:Store).
* If the Store has defined some languages, countries, distribution or supply Channels,
* If the Store has defined some languages, countries, distribution, supply Channels, and/or Product Selection,
* they are used for projections based on [locale](ctp:api:type:ProductProjectionLocales), [price](ctp:api:type:ProductProjectionPrices)
* and [inventory](ctp:api:type:ProductProjectionInventoryEntries).
*
* If [ProductSelection](ctp:api:type:ProductSelection) is used, it affects the [availability of the Product](/projects/stores#products-available-in-store) in the specified Store.
*
* When used with an API Client that has the `view_published_products:{projectKey}` scope, this endpoint only returns published (current) Product Projections.
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class ByProjectKeyProductSelectionsByIDRequestBuilder {
)
}
/**
* Deletion will only succeed if the Product Selection is not assigned to any [Store](/../api/projects/stores#store).
* Deletion will only succeed if the Product Selection is not assigned to any [Store](ctp:api:type:Store).
*/
public delete(methodArgs: {
queryArgs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class ByProjectKeyProductSelectionsKeyByKeyRequestBuilder {
)
}
/**
* Deletion will only succeed if the Product Selection is not assigned to any [Store](/../api/projects/stores#store).
* Deletion will only succeed if the Product Selection is not assigned to any [Store](ctp:api:type:Store).
*/
public delete(methodArgs: {
queryArgs: {
Expand Down
42 changes: 42 additions & 0 deletions packages/platform-sdk/src/generated/models/approval-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ApprovalRule, RuleApprover } from './approval-rule'
import { Associate, BusinessUnitKeyReference } from './business-unit'
import { BaseResource, CreatedBy, LastModifiedBy } from './common'
import { OrderReference } from './order'
import { CustomFields, FieldContainer, TypeResourceIdentifier } from './type'

export interface ApprovalFlow extends BaseResource {
/**
Expand Down Expand Up @@ -101,6 +102,12 @@ export interface ApprovalFlow extends BaseResource {
*
*/
readonly currentTierPendingApprovers: RuleApprover[]
/**
* Custom Fields on the Approval Flow.
*
*
*/
readonly custom?: CustomFields
}
export interface ApprovalFlowApproval {
/**
Expand Down Expand Up @@ -199,6 +206,8 @@ export interface ApprovalFlowUpdate {
export type ApprovalFlowUpdateAction =
| ApprovalFlowApproveAction
| ApprovalFlowRejectAction
| ApprovalFlowSetCustomFieldAction
| ApprovalFlowSetCustomTypeAction
/**
* This update action allows an [Associate](ctp:api:type:Associate) to approve an Approval Flow. The process takes into account all [Associate Roles](ctp:api:type:AssociateRole) held by the Associate, aligning with the matched [Approval Rules](ctp:api:type:ApprovalRule) and their respective approver hierarchies.
*
Expand All @@ -225,3 +234,36 @@ export interface ApprovalFlowRejectAction {
*/
readonly reason?: string
}
export interface ApprovalFlowSetCustomFieldAction {
readonly action: 'setCustomField'
/**
* Name of the [Custom Field](ctp:api:type:CustomFields).
*
*
*/
readonly name: string
/**
* If `value` is absent or `null`, this field will be removed if it exists.
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
* If `value` is provided, it is set for the field defined by `name`.
*
*
*/
readonly value?: any
}
export interface ApprovalFlowSetCustomTypeAction {
readonly action: 'setCustomType'
/**
* Defines the [Type](ctp:api:type:Type) that extends the ApprovalFlow with [Custom Fields](ctp:api:type:CustomFields).
* If absent, any existing Type and Custom Fields are removed from the ApprovalFlow.
*
*
*/
readonly type?: TypeResourceIdentifier
/**
* Sets the [Custom Fields](ctp:api:type:CustomFields) fields for the ApprovalFlow.
*
*
*/
readonly fields?: FieldContainer
}
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ export interface BusinessUnitSetCustomFieldAction {
export interface BusinessUnitSetCustomTypeAction {
readonly action: 'setCustomType'
/**
* Defines the [Type](ctp:api:type:Type) that extends the BusinessUnit with [Custom Fields](/../api/projects/custom-fields).
* Defines the [Type](ctp:api:type:Type) that extends the BusinessUnit with [Custom Fields](ctp:api:type:CustomFields).
* If absent, any existing Type and Custom Fields are removed from the BusinessUnit.
*
*
Expand Down
Loading
Loading