Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Jun 28, 2024
1 parent 851ee40 commit b07996d
Show file tree
Hide file tree
Showing 13 changed files with 393 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .changeset/changes_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
<details>
<summary>Added Resource(s)</summary>

- added resource `/{projectKey}/customers/search`
- added resource `/{projectKey}/customers/search/indexing-status`
- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests`
- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes`
- added resource `/{projectKey}/in-store/key={storeKey}/quotes`
Expand Down Expand Up @@ -77,6 +79,9 @@
<details>
<summary>Added Method(s)</summary>

- added method `apiRoot.withProjectKey().customers().search().post()`
- added method `apiRoot.withProjectKey().customers().search().head()`
- added method `apiRoot.withProjectKey().customers().searchIndexingStatus().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().post()`
Expand Down Expand Up @@ -118,6 +123,12 @@
<details>
<summary>Added Type(s)</summary>

- added type `CustomerIndexingProgress`
- added type `CustomerIndexingStatus`
- added type `CustomerPagedSearchResponse`
- added type `CustomerSearchIndexingStatusResponse`
- added type `CustomerSearchRequest`
- added type `CustomerSearchResult`
- added type `ProductTailoringImageAddedMessage`
- added type `ProductTailoringImagesSetMessage`
- added type `ProductVariantTailoringAddedMessage`
Expand Down Expand Up @@ -149,6 +160,8 @@
- added type `ProductTailoringSetAssetTagsAction`
- added type `ProductTailoringSetExternalImagesAction`
- added type `ProductTailoringSetImageLabelAction`
- added type `CustomerSearchStatus`
- added type `ProjectChangeCustomerSearchStatusAction`
</details>

<details>
Expand Down
13 changes: 13 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
<details>
<summary>Added Resource(s)</summary>

- added resource `/{projectKey}/customers/search`
- added resource `/{projectKey}/customers/search/indexing-status`
- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests`
- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes`
- added resource `/{projectKey}/in-store/key={storeKey}/quotes`
Expand Down Expand Up @@ -73,6 +75,9 @@
<details>
<summary>Added Method(s)</summary>

- added method `apiRoot.withProjectKey().customers().search().post()`
- added method `apiRoot.withProjectKey().customers().search().head()`
- added method `apiRoot.withProjectKey().customers().searchIndexingStatus().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().post()`
Expand Down Expand Up @@ -114,6 +119,12 @@
<details>
<summary>Added Type(s)</summary>

- added type `CustomerIndexingProgress`
- added type `CustomerIndexingStatus`
- added type `CustomerPagedSearchResponse`
- added type `CustomerSearchIndexingStatusResponse`
- added type `CustomerSearchRequest`
- added type `CustomerSearchResult`
- added type `ProductTailoringImageAddedMessage`
- added type `ProductTailoringImagesSetMessage`
- added type `ProductVariantTailoringAddedMessage`
Expand Down Expand Up @@ -145,6 +156,8 @@
- added type `ProductTailoringSetAssetTagsAction`
- added type `ProductTailoringSetExternalImagesAction`
- added type `ProductTailoringSetImageLabelAction`
- added type `CustomerSearchStatus`
- added type `ProjectChangeCustomerSearchStatusAction`
</details>

<details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ import { executeRequest, QueryParam } from '../../shared/utils/common-types'
import { ApiRequest } from '../../shared/utils/requests-utils'
import { ByProjectKeyCustomersEmailConfirmRequestBuilder } from '../confirm/by-project-key-customers-email-confirm-request-builder'
import { ByProjectKeyCustomersEmailTokenRequestBuilder } from '../email-token/by-project-key-customers-email-token-request-builder'
import { ByProjectKeyCustomersSearchIndexingStatusRequestBuilder } from '../indexing-status/by-project-key-customers-search-indexing-status-request-builder'
import { ByProjectKeyCustomersPasswordTokenRequestBuilder } from '../password-token/by-project-key-customers-password-token-request-builder'
import { ByProjectKeyCustomersPasswordRequestBuilder } from '../password/by-project-key-customers-password-request-builder'
import { ByProjectKeyCustomersPasswordResetRequestBuilder } from '../reset/by-project-key-customers-password-reset-request-builder'
import { ByProjectKeyCustomersSearchRequestBuilder } from '../search/by-project-key-customers-search-request-builder'
import { ByProjectKeyCustomersByIDRequestBuilder } from './by-project-key-customers-by-id-request-builder'
import { ByProjectKeyCustomersEmailTokenByEmailTokenRequestBuilder } from './by-project-key-customers-email-token-by-email-token-request-builder'
import { ByProjectKeyCustomersKeyByKeyRequestBuilder } from './by-project-key-customers-key-by-key-request-builder'
Expand Down Expand Up @@ -127,6 +129,32 @@ export class ByProjectKeyCustomersRequestBuilder {
baseUri: this.args.baseUri,
})
}
/**
* This endpoint provides high-performance search queries over Customers.
*
*/
public search(): ByProjectKeyCustomersSearchRequestBuilder {
return new ByProjectKeyCustomersSearchRequestBuilder({
pathArgs: {
...this.args.pathArgs,
},
executeRequest: this.args.executeRequest,
baseUri: this.args.baseUri,
})
}
/**
* This endpoint provides information on the status of a Customer search for a project
*
*/
public searchIndexingStatus(): ByProjectKeyCustomersSearchIndexingStatusRequestBuilder {
return new ByProjectKeyCustomersSearchIndexingStatusRequestBuilder({
pathArgs: {
...this.args.pathArgs,
},
executeRequest: this.args.executeRequest,
baseUri: this.args.baseUri,
})
}

public get(methodArgs?: {
queryArgs?: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
*/
import { CustomerSearchIndexingStatusResponse } from '../../models/customer-search'
import { executeRequest } from '../../shared/utils/common-types'
import { ApiRequest } from '../../shared/utils/requests-utils'
/**
**/
export class ByProjectKeyCustomersSearchIndexingStatusRequestBuilder {
constructor(
protected readonly args: {
pathArgs: {
projectKey: string
}
executeRequest: executeRequest
baseUri?: string
}
) {}
public get(methodArgs?: {
headers?: {
[key: string]: string | string[]
}
}): ApiRequest<CustomerSearchIndexingStatusResponse> {
return new ApiRequest<CustomerSearchIndexingStatusResponse>(
{
baseUri: this.args.baseUri,
method: 'GET',
uriTemplate: '/{projectKey}/customers/search/indexing-status',
pathVariables: this.args.pathArgs,
headers: {
...methodArgs?.headers,
},
},
this.args.executeRequest
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/**
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
*/
import {
CustomerPagedSearchResponse,
CustomerSearchRequest,
} from '../../models/customer-search'
import { executeRequest } from '../../shared/utils/common-types'
import { ApiRequest } from '../../shared/utils/requests-utils'
/**
**/
export class ByProjectKeyCustomersSearchRequestBuilder {
constructor(
protected readonly args: {
pathArgs: {
projectKey: string
}
executeRequest: executeRequest
baseUri?: string
}
) {}
public post(methodArgs: {
body: CustomerSearchRequest
headers?: {
[key: string]: string | string[]
}
}): ApiRequest<CustomerPagedSearchResponse> {
return new ApiRequest<CustomerPagedSearchResponse>(
{
baseUri: this.args.baseUri,
method: 'POST',
uriTemplate: '/{projectKey}/customers/search',
pathVariables: this.args.pathArgs,
headers: {
'Content-Type': 'application/json',
...methodArgs?.headers,
},
body: methodArgs?.body,
},
this.args.executeRequest
)
}
/**
* Checks whether a search index for the Project's Customers exists.
* Returns a `200 OK` status if the index exists or `404 Not Found` otherwise.
*
*/
public head(methodArgs?: {
headers?: {
[key: string]: string | string[]
}
}): ApiRequest<void> {
return new ApiRequest<void>(
{
baseUri: this.args.baseUri,
method: 'HEAD',
uriTemplate: '/{projectKey}/customers/search',
pathVariables: this.args.pathArgs,
headers: {
...methodArgs?.headers,
},
},
this.args.executeRequest
)
}
}
3 changes: 3 additions & 0 deletions packages/platform-sdk/src/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export * from './client/import/by-project-key-orders-import-request-builder'
export * from './client/in-business-unit/by-project-key-as-associate-by-associate-id-in-business-unit-key-by-business-unit-key-request-builder'
export * from './client/in-business-unit/by-project-key-in-business-unit-key-by-business-unit-key-request-builder'
export * from './client/in-store/by-project-key-in-store-key-by-store-key-request-builder'
export * from './client/indexing-status/by-project-key-customers-search-indexing-status-request-builder'
export * from './client/inventory/by-project-key-inventory-by-id-request-builder'
export * from './client/inventory/by-project-key-inventory-key-by-key-request-builder'
export * from './client/inventory/by-project-key-inventory-request-builder'
Expand Down Expand Up @@ -216,6 +217,7 @@ export * from './client/reset/by-project-key-me-password-reset-request-builder'
export * from './client/reviews/by-project-key-reviews-by-id-request-builder'
export * from './client/reviews/by-project-key-reviews-key-by-key-request-builder'
export * from './client/reviews/by-project-key-reviews-request-builder'
export * from './client/search/by-project-key-customers-search-request-builder'
export * from './client/search/by-project-key-orders-search-request-builder'
export * from './client/search/by-project-key-product-projections-search-request-builder'
export * from './client/search/by-project-key-products-search-request-builder'
Expand Down Expand Up @@ -280,6 +282,7 @@ export * from './models/common'
export * from './models/custom-object'
export * from './models/customer'
export * from './models/customer-group'
export * from './models/customer-search'
export * from './models/discount-code'
export * from './models/error'
export * from './models/extension'
Expand Down
4 changes: 2 additions & 2 deletions packages/platform-sdk/src/generated/models/cart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ export interface LineItemDraft {
*/
readonly externalTotalPrice?: ExternalLineItemTotalPrice
/**
* Sets the external Tax Rate for the Line Item, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode) and `Single` [ShippingMode](ctp:api:type:ShippingMode).
* Sets the external Tax Rate for the Line Item, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode) and `Single` [ShippingMode](ctp:api:type:ShippingMode). If the Cart has `Multiple` [ShippingMode](ctp:api:type:ShippingMode), the Tax Rate is accepted but ignored.
*
*
*/
Expand Down Expand Up @@ -2282,7 +2282,7 @@ export interface CartAddLineItemAction {
*/
readonly externalTotalPrice?: ExternalLineItemTotalPrice
/**
* External Tax Rate for the Line Item, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode) and `Single` [ShippingMode](ctp:api:type:ShippingMode).
* Sets the external Tax Rate for the Line Item, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode) and `Single` [ShippingMode](ctp:api:type:ShippingMode). If the Cart has `Multiple` [ShippingMode](ctp:api:type:ShippingMode), the Tax Rate is accepted but ignored.
*
*
*/
Expand Down
115 changes: 115 additions & 0 deletions packages/platform-sdk/src/generated/models/customer-search.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/**
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
*/

import { CustomerIndexingStatus } from './project'
import { SearchSorting, _SearchQuery } from './search'

export interface CustomerIndexingProgress {
/**
* The number of Customers successfully indexed.
*
*/
readonly indexed: number
/**
* The number of Customers that failed to be indexed.
*
*/
readonly failed: number
/**
* The estimated total number of Customers to be indexed.
*
*/
readonly estimatedTotal: number
}
export interface CustomerPagedSearchResponse {
/**
* Total number of results matching the query.
*
*/
readonly total: number
/**
* Number of [results requested](/../api/general-concepts#limit).
*
*
*/
readonly limit: number
/**
* Number of [elements skipped](/../api/general-concepts#offset).
*
*
*/
readonly offset: number
/**
* Search result containing the Customers matching the search query.
*
*
*/
readonly results: CustomerSearchResult[]
}
export interface CustomerSearchIndexingStatusResponse {
/**
* Current status of indexing the Customer Search.
*
*/
readonly status: CustomerIndexingStatus
/**
* Progress of indexing. Only available when indexing is in progress.
*
*/
readonly states?: CustomerIndexingProgress
/**
* Date and time (UTC) when the last indexing started.
*
*/
readonly startedAt?: string
/**
* Time when the status was last modified.
*
*/
readonly lastModifiedAt?: string
/**
* Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.
*
*
*/
readonly retryCount?: number
}
export interface CustomerSearchRequest {
/**
* The Customer search query.
*
*/
readonly query?: _SearchQuery
/**
* Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
*
*/
readonly sort?: SearchSorting[]
/**
* The maximum number of search results to be returned.
*
*/
readonly limit?: number
/**
* The number of search results to be skipped in the response for pagination.
*
*/
readonly offset?: number
}
export interface CustomerSearchResult {
/**
* `id` of the [Customer](ctp:api:type:Customer) matching the search query.
*
*
*/
readonly id: string
/**
* How closely this customer matches the search query.
*
*
*/
readonly relevance: number
}
Loading

0 comments on commit b07996d

Please sign in to comment.