-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
851ee40
commit b07996d
Showing
13 changed files
with
393 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...client/indexing-status/by-project-key-customers-search-indexing-status-request-builder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
...atform-sdk/src/generated/client/search/by-project-key-customers-search-request-builder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
packages/platform-sdk/src/generated/models/customer-search.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.