-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated API from documentation release
- Loading branch information
1 parent
cc401df
commit e526878
Showing
17 changed files
with
276 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
api-specs/api/examples/CustomerSearch/CustomerPagedSearchResponse.json
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,19 @@ | ||
{ | ||
"results": [ | ||
{ | ||
"id": "e41337a0-ea96-4ddc-a9a4-d267976f21e0", | ||
"relevance": 0.9264881 | ||
}, | ||
{ | ||
"id": "05cd5998-015c-4232-8943-ff8a1880bcbc", | ||
"relevance": 0.6989829 | ||
}, | ||
{ | ||
"id": "09c3c5a2-6569-49dd-b021-af5de4cf4b02", | ||
"relevance": 0.6989829 | ||
} | ||
], | ||
"limit": 100, | ||
"offset": 0, | ||
"total": 3 | ||
} |
11 changes: 11 additions & 0 deletions
11
api-specs/api/examples/CustomerSearch/CustomerSearchIndexingStatusResponse.json
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,11 @@ | ||
{ | ||
"status": "Indexing", | ||
"states": { | ||
"indexed": 43242, | ||
"failed": 0, | ||
"estimatedTotal": 100000 | ||
}, | ||
"startedAt": "2023-08-15T12:56:07.89Z", | ||
"retryCount": 2, | ||
"lastModifiedAt": "2023-08-15T12:56:07.89Z" | ||
} |
8 changes: 8 additions & 0 deletions
8
api-specs/api/examples/CustomerSearch/CustomerSearchRequest.json
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,8 @@ | ||
{ | ||
"query": { | ||
"fullText": { | ||
"field": "all", | ||
"value": "john" | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
api-specs/api/examples/Project/ProjectChangeCustomerSearchStatusAction.json
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,4 @@ | ||
{ | ||
"action": "changeCustomerSearchStatus", | ||
"status": "Activated" | ||
} |
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
18 changes: 18 additions & 0 deletions
18
api-specs/api/types/customer-search/CustomerIndexingProgress.raml
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,18 @@ | ||
#%RAML 1.0 DataType | ||
(package): CustomerSearch | ||
type: object | ||
(beta): true | ||
displayName: CustomerIndexingProgress | ||
properties: | ||
indexed: | ||
type: number | ||
format: int32 | ||
description: The number of Customers successfully indexed. | ||
failed: | ||
type: number | ||
format: int32 | ||
description: The number of Customers that failed to be indexed. | ||
estimatedTotal: | ||
type: number | ||
format: int32 | ||
description: The estimated total number of Customers to be indexed. |
17 changes: 17 additions & 0 deletions
17
api-specs/api/types/customer-search/CustomerIndexingStatus.raml
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,17 @@ | ||
#%RAML 1.0 DataType | ||
(package): Project | ||
type: string | ||
(beta): true | ||
displayName: CustomerIndexingStatus | ||
description: | | ||
The current indexing status of Customer Search. | ||
(enumDescriptions): | ||
Scheduled: Indexing is scheduled. | ||
Indexing: Indexing is in progress. | ||
Ready: Indexing is complete and the [Search Customers](/../api/projects/customer-search#search-customers) endpoint returns up-to-date results. | ||
Failed: Indexing failed due to an internal error. | ||
enum: | ||
- Scheduled | ||
- Indexing | ||
- Ready | ||
- Failed |
30 changes: 30 additions & 0 deletions
30
api-specs/api/types/customer-search/CustomerPagedSearchResponse.raml
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,30 @@ | ||
#%RAML 1.0 DataType | ||
(package): CustomerSearch | ||
displayName: CustomerPagedSearchResponse | ||
example: !include ../../examples/CustomerSearch/CustomerPagedSearchResponse.json | ||
type: object | ||
(beta): true | ||
properties: | ||
total: | ||
type: number | ||
format: int64 | ||
minimum: 0 | ||
description: Total number of results matching the query. | ||
limit: | ||
type: number | ||
format: int32 | ||
minimum: 0 | ||
maximum: 100 | ||
description: | | ||
Number of [results requested](/../api/general-concepts#limit). | ||
offset: | ||
type: number | ||
format: int32 | ||
minimum: 0 | ||
maximum: 9900 | ||
description: | | ||
Number of [elements skipped](/../api/general-concepts#offset). | ||
results: | ||
type: CustomerSearchResult[] | ||
description: | | ||
Search result containing the Customers matching the search query. |
24 changes: 24 additions & 0 deletions
24
api-specs/api/types/customer-search/CustomerSearchIndexingStatusResponse.raml
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,24 @@ | ||
#%RAML 1.0 DataType | ||
(package): CustomerSearch | ||
displayName: CustomerSearchIndexingStatusResponse | ||
type: object | ||
(beta): true | ||
example: !include ../../examples/CustomerSearch/CustomerSearchIndexingStatusResponse.json | ||
properties: | ||
status: | ||
type: CustomerIndexingStatus | ||
description: Current status of indexing the Customer Search. | ||
states?: | ||
type: CustomerIndexingProgress | ||
description: Progress of indexing. Only available when indexing is in progress. | ||
startedAt?: | ||
type: datetime | ||
description: Date and time (UTC) when the last indexing started. | ||
lastModifiedAt?: | ||
type: datetime | ||
description: Time when the status was last modified. | ||
retryCount?: | ||
type: number | ||
format: int32 | ||
description: | | ||
Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully. |
25 changes: 25 additions & 0 deletions
25
api-specs/api/types/customer-search/CustomerSearchRequest.raml
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,25 @@ | ||
#%RAML 1.0 DataType | ||
(package): CustomerSearch | ||
type: object | ||
(beta): true | ||
example: !include ../../examples/CustomerSearch/CustomerSearchRequest.json | ||
displayName: CustomerSearchRequest | ||
properties: | ||
query?: | ||
type: SearchQuery | ||
description: The Customer search query. | ||
sort?: | ||
type: SearchSorting[] | ||
description: Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order. | ||
limit?: | ||
type: number | ||
format: int32 | ||
default: 20 | ||
maximum: 100 | ||
description: The maximum number of search results to be returned. | ||
offset?: | ||
type: number | ||
format: int32 | ||
default: 0 | ||
maximum: 9900 | ||
description: The number of search results to be skipped in the response for pagination. |
15 changes: 15 additions & 0 deletions
15
api-specs/api/types/customer-search/CustomerSearchResult.raml
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,15 @@ | ||
#%RAML 1.0 DataType | ||
(package): CustomerSearch | ||
displayName: CustomerSearchResult | ||
type: object | ||
(beta): true | ||
properties: | ||
id: | ||
(identifier): true | ||
type: string | ||
description: | | ||
`id` of the [Customer](ctp:api:type:Customer) matching the search query. | ||
relevance: | ||
type: number | ||
description: | | ||
How closely this customer matches the search query. |
17 changes: 17 additions & 0 deletions
17
api-specs/api/types/error/CustomerSearchProjectNotIndexedError.raml
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,17 @@ | ||
#%RAML 1.0 DataType | ||
(package): Error | ||
type: ErrorObject | ||
displayName: CustomerSearchProjectNotIndexedError | ||
description: | | ||
Returned as response to the [Search Customers](/projects/customer-search#search-customers) request in case the Customer Search API is not active for the Project. | ||
Use the [Change Customer Search Status](ctp:api:type:ProjectChangeCustomerSearchStatusAction) update action on the [Project](/projects/project#update-project) to activate the API. | ||
properties: | ||
code: | ||
type: string | ||
description: | | ||
`"ResourceNotFound"` | ||
message: | ||
type: string | ||
description: | | ||
`"Project not yet indexed"` |
13 changes: 13 additions & 0 deletions
13
api-specs/api/types/error/graphql/GraphQLCustomerSearchProjectNotIndexedError.raml
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,13 @@ | ||
#%RAML 1.0 DataType | ||
(package): Error | ||
type: GraphQLErrorObject | ||
displayName: GraphQLCustomerSearchProjectNotIndexedError | ||
description: | | ||
Returned as response to the [Search Customers](/projects/customer-search#search-customers) request in case the Customer Search API is not active for the Project. | ||
Use the [Change Customer Search Status](ctp:api:type:ProjectChangeCustomerSearchStatusAction) update action on the [Project](/projects/project#update-project) to activate the API. | ||
properties: | ||
code: | ||
type: string | ||
description: | | ||
`"ResourceNotFound"` |
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,14 @@ | ||
#%RAML 1.0 DataType | ||
(package): Project | ||
type: string | ||
(beta): true | ||
displayName: CustomerSearchStatus | ||
description: | | ||
Specifies the status of the [Customer Search](/../api/projects/customer-search) index. | ||
You can change the status using the [Change Customer Search Status](ctp:api:type:ProjectChangeCustomerSearchStatusAction) update action. | ||
(enumDescriptions): | ||
Activated: indicates that the [Customer Search](/../api/projects/customer-search#search-customers) endpoint is fully operational. | ||
Deactivated: indicates that the Customer Search enpoint is currently not active. | ||
enum: | ||
- Activated | ||
- Deactivated |
11 changes: 11 additions & 0 deletions
11
api-specs/api/types/project/updates/ProjectChangeCustomerSearchStatusAction.raml
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,11 @@ | ||
#%RAML 1.0 DataType | ||
(package): Project | ||
type: ProjectUpdateAction | ||
(beta): true | ||
displayName: ProjectChangeCustomerSearchStatusAction | ||
discriminatorValue: changeCustomerSearchStatus | ||
example: !include ../../../examples/Project/ProjectChangeCustomerSearchStatusAction.json | ||
properties: | ||
status: | ||
type: CustomerSearchStatus | ||
description: Activates or deactivates the [Customer Search](/../api/projects/customer-search) feature. Activation will trigger building a search index for the Customers in the Project. |
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