Skip to content

Commit 2f72d94

Browse files
authored
fix: split search enum in different files to improve java generation (#104)
fix ci script thanks to @bodinsamuel
1 parent 9bb2755 commit 2f72d94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1441
-610
lines changed
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1+
import type { DictionaryAction } from './dictionaryAction';
12
import type { DictionaryEntry } from './dictionaryEntry';
23

34
export type BatchDictionaryEntriesRequest = {
4-
/**
5-
* Actions to perform.
6-
*/
7-
action: BatchDictionaryEntriesRequestAction;
5+
action: DictionaryAction;
86
body: DictionaryEntry;
97
};
10-
11-
export type BatchDictionaryEntriesRequestAction = 'addEntry' | 'deleteEntry';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* Actions to perform.
3+
*/
4+
5+
export type DictionaryAction = 'addEntry' | 'deleteEntry';

algoliasearch-client-javascript/client-search/model/dictionaryEntry.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { DictionaryEntryState } from './dictionaryEntryState';
2+
13
/**
24
* A dictionary entry.
35
*/
@@ -22,10 +24,5 @@ export type DictionaryEntry = {
2224
* A decomposition of the word of the dictionary entry.
2325
*/
2426
decomposition?: string[];
25-
/**
26-
* The state of the dictionary entry.
27-
*/
2827
state?: DictionaryEntryState;
2928
};
30-
31-
export type DictionaryEntryState = 'disabled' | 'enabled';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* The state of the dictionary entry.
3+
*/
4+
5+
export type DictionaryEntryState = 'disabled' | 'enabled';
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { MultipleQueriesType } from './multipleQueriesType';
2+
13
export type MultipleQueries = {
24
/**
35
* The Algolia index name.
@@ -7,9 +9,6 @@ export type MultipleQueries = {
79
* The text to search in the index.
810
*/
911
query?: string;
10-
/**
11-
* Perform a search query with `default`, will search for facet values if `facet` is given.
12-
*/
1312
type?: MultipleQueriesType;
1413
/**
1514
* The `facet` name.
@@ -20,5 +19,3 @@ export type MultipleQueries = {
2019
*/
2120
params?: string;
2221
};
23-
24-
export type MultipleQueriesType = 'default' | 'facet';
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import type { MultipleQueries } from './multipleQueries';
2+
import type { MultipleQueriesStrategy } from './multipleQueriesStrategy';
23

34
export type MultipleQueriesParams = {
45
requests: MultipleQueries[];
5-
strategy?: MultipleQueriesParamsStrategy;
6+
strategy?: MultipleQueriesStrategy;
67
};
7-
8-
export type MultipleQueriesParamsStrategy = 'none' | 'stopIfEnoughMatches';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type MultipleQueriesStrategy = 'none' | 'stopIfEnoughMatches';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* Perform a search query with `default`, will search for facet values if `facet` is given.
3+
*/
4+
5+
export type MultipleQueriesType = 'default' | 'facet';
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1+
import type { OperationType } from './operationType';
2+
import type { ScopeType } from './scopeType';
3+
14
export type OperationIndexParams = {
2-
/**
3-
* Type of operation to perform (move or copy).
4-
*/
5-
operation: OperationIndexParamsOperation;
5+
operation: OperationType;
66
/**
77
* The Algolia index name.
88
*/
99
destination: string;
1010
/**
1111
* Scope of the data to copy. When absent, a full copy is performed. When present, only the selected scopes are copied.
1212
*/
13-
scope?: OperationIndexParamsScope[];
13+
scope?: ScopeType[];
1414
};
15-
16-
export type OperationIndexParamsOperation = 'copy' | 'move';
17-
18-
export type OperationIndexParamsScope = 'rules' | 'settings' | 'synonyms';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* Type of operation to perform (move or copy).
3+
*/
4+
5+
export type OperationType = 'copy' | 'move';

0 commit comments

Comments
 (0)