-
Notifications
You must be signed in to change notification settings - Fork 21
feat: (APIC-190) Add manage indices endpoints #24
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7e0bd4a
feat: add manage indices endpoints
damcou e5eccf9
feat: added delete index endpoint
damcou 58991ed
fix: spec validation
damcou 6e28198
Merge branch 'main' into feat/APIC-190/manage-indices-specs
damcou 907d16c
fix: linting
damcou b6aa2f2
fix: changes after review
damcou 668a507
Merge branch 'main' into feat/APIC-190/manage-indices-specs
damcou 4e369b7
fix: clement's review
damcou 5486cfd
Merge branch 'main' into feat/APIC-190/manage-indices-specs
damcou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
clients/algoliasearch-client-javascript/client-search/model/deleteIndexResponse.ts
This file contains hidden or 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,10 @@ | ||
export type DeleteIndexResponse = { | ||
/** | ||
* taskID of the indexing task to wait for. | ||
*/ | ||
taskID?: number; | ||
/** | ||
* Date of deletion. (ISO-8601 format) | ||
*/ | ||
deleteAt?: Date; | ||
}; |
38 changes: 38 additions & 0 deletions
38
clients/algoliasearch-client-javascript/client-search/model/index.ts
This file contains hidden or 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,38 @@ | ||
export type Index = { | ||
/** | ||
* Name of the index | ||
*/ | ||
name?: string; | ||
/** | ||
* Date of the index creation. (ISO-8601 format) | ||
*/ | ||
createdAt?: Date; | ||
/** | ||
* Date of the index last update. (ISO-8601 format) | ||
*/ | ||
updatedAt?: Date; | ||
/** | ||
* Entries in the index | ||
*/ | ||
entries?: number; | ||
/** | ||
* data size of the index | ||
*/ | ||
dataSize?: number; | ||
/** | ||
* file size of the index | ||
*/ | ||
fileSize?: number; | ||
/** | ||
* Last build time | ||
*/ | ||
lastBuildTimeS?: number; | ||
/** | ||
* Number of pending tasks | ||
*/ | ||
numberOfPendingTask?: number; | ||
/** | ||
* Pending task ? | ||
*/ | ||
pendingTask?: boolean; | ||
}; |
6 changes: 6 additions & 0 deletions
6
clients/algoliasearch-client-javascript/client-search/model/listIndicesObject.ts
This file contains hidden or 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,6 @@ | ||
export type ListIndicesObject = { | ||
/** | ||
* Requested page (zero-based). When specified, will retrieve a specific page; the page size is implicitly set to 100. When null, will retrieve all indices (no pagination). | ||
*/ | ||
page?: number; | ||
}; |
9 changes: 9 additions & 0 deletions
9
clients/algoliasearch-client-javascript/client-search/model/listIndicesResponse.ts
This file contains hidden or 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,9 @@ | ||
import { Index } from './index'; | ||
|
||
export type ListIndicesResponse = { | ||
items?: Array<Index>; | ||
/** | ||
* Number of pages | ||
*/ | ||
nbPages?: number; | ||
}; |
This file contains hidden or 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
26 changes: 26 additions & 0 deletions
26
clients/algoliasearch-client-javascript/client-search/model/operationIndexObject.ts
This file contains hidden or 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,26 @@ | ||
export type OperationIndexObject = { | ||
/** | ||
* Type of operation to perform (move or copy) | ||
*/ | ||
operation: OperationIndexObject.OperationEnum; | ||
/** | ||
* The Algolia index name | ||
*/ | ||
destination: string; | ||
/** | ||
* Scope of the data to copy. When absent, a full copy is performed. When present, only the selected scopes are copied. | ||
*/ | ||
scope?: Array<OperationIndexObject.ScopeEnum>; | ||
}; | ||
|
||
export namespace OperationIndexObject { | ||
export enum OperationEnum { | ||
Move = 'move', | ||
Copy = 'copy', | ||
} | ||
export enum ScopeEnum { | ||
Settings = 'settings', | ||
Synonyms = 'synonyms', | ||
Rules = 'rules', | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
clients/algoliasearch-client-javascript/client-search/model/operationIndexResponse.ts
This file contains hidden or 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,10 @@ | ||
export type OperationIndexResponse = { | ||
/** | ||
* taskID of the indexing task to wait for. | ||
*/ | ||
taskID?: number; | ||
/** | ||
* Date of last update. (ISO-8601 format) | ||
*/ | ||
updatedAt?: Date; | ||
}; |
This file contains hidden or 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 hidden or 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 hidden or 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,46 @@ | ||
listIndicesResponse: | ||
damcou marked this conversation as resolved.
Show resolved
Hide resolved
|
||
type: object | ||
additionalProperties: false | ||
properties: | ||
items: | ||
type: array | ||
items: | ||
$ref: '#/index' | ||
nbPages: | ||
type: integer | ||
description: 'Number of pages' | ||
damcou marked this conversation as resolved.
Show resolved
Hide resolved
|
||
example: 100 | ||
|
||
index: | ||
damcou marked this conversation as resolved.
Show resolved
Hide resolved
|
||
type: object | ||
additionalProperties: false | ||
properties: | ||
name: | ||
type: string | ||
description: Name of the index | ||
createdAt: | ||
type: string | ||
format: date-time | ||
description: Date of the index creation. (ISO-8601 format) | ||
damcou marked this conversation as resolved.
Show resolved
Hide resolved
|
||
updatedAt: | ||
type: string | ||
format: date-time | ||
description: Date of the index last update. (ISO-8601 format) | ||
entries: | ||
type: integer | ||
description: Entries in the index | ||
dataSize: | ||
type: integer | ||
description: data size of the index | ||
fileSize: | ||
type: integer | ||
description: file size of the index | ||
lastBuildTimeS: | ||
type: integer | ||
description: Last build time | ||
numberOfPendingTask: | ||
type: integer | ||
description: Number of pending tasks | ||
pendingTask: | ||
type: boolean | ||
description: Pending task ? | ||
damcou marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
---|---|---|
@@ -1 +1,34 @@ | ||
get: | ||
tags: | ||
- search | ||
operationId: listIndices | ||
summary: List existing indexes | ||
damcou marked this conversation as resolved.
Show resolved
Hide resolved
|
||
requestBody: | ||
damcou marked this conversation as resolved.
Show resolved
Hide resolved
|
||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
title: listIndicesObject | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
page: | ||
type: integer | ||
default: null | ||
damcou marked this conversation as resolved.
Show resolved
Hide resolved
|
||
description: Requested page (zero-based). When specified, will retrieve a specific page; the page size is implicitly set to 100. When null, will retrieve all indices (no pagination). | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
title: listIndicesResponse | ||
damcou marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$ref: '../../common/schemas/listIndicesResponse.yml#/listIndicesResponse' | ||
'400': | ||
$ref: '../../../common/responses/BadRequest.yml' | ||
'402': | ||
$ref: '../../../common/responses/FeatureNotEnabled.yml' | ||
'403': | ||
$ref: '../../../common/responses/MethodNotAllowed.yml' | ||
'404': | ||
$ref: '../../../common/responses/IndexNotFound.yml' |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.