Skip to content

Commit 735d04f

Browse files
authored
Merge branch 'main' into chore/stop-generation
2 parents acd1ee9 + aedf57f commit 735d04f

Some content is hidden

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

46 files changed

+29
-72
lines changed

clients/algoliasearch-client-javascript/packages/algoliasearch-lite/model/action.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* Type of operation.
33
*/
4-
54
export type Action =
65
| 'addObject'
76
| 'clear'
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Whether the pattern parameter must match the beginning or the end of the query string, or both, or none.
33
*/
4-
54
export type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
import type { AroundRadiusAll } from './aroundRadiusAll';
22

3+
/**
4+
* Define the maximum radius for a geo search (in meters).
5+
*/
36
export type AroundRadius = AroundRadiusAll | number;

clients/algoliasearch-client-javascript/packages/algoliasearch-lite/model/builtInOperationType.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* The operation to apply on the attribute.
33
*/
4-
54
export type BuiltInOperationType =
65
| 'Add'
76
| 'AddUnique'
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Actions to perform.
33
*/
4-
54
export type DictionaryAction = 'addEntry' | 'deleteEntry';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* The state of the dictionary entry.
33
*/
4-
54
export type DictionaryEntryState = 'disabled' | 'enabled';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Controls how the exact ranking criterion is computed when the query contains only one word.
33
*/
4-
54
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import type { BaseIndexSettings } from './baseIndexSettings';
22
import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams';
33

4+
/**
5+
* The Algolia index settings.
6+
*/
47
export type IndexSettings = BaseIndexSettings & IndexSettingsAsSearchParams;
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Indicates how well the attribute matched the search query.
33
*/
4-
54
export type MatchLevel = 'full' | 'none' | 'partial';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Perform a search query with `default`, will search for facet values if `facet` is given.
33
*/
4-
54
export type MultipleQueriesType = 'default' | 'facet';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Type of operation to perform (move or copy).
33
*/
4-
54
export type OperationType = 'copy' | 'move';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Controls if and how query words are interpreted as prefixes.
33
*/
4-
54
export type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone';

clients/algoliasearch-client-javascript/packages/algoliasearch-lite/model/removeWordsIfNoResults.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* Selects a strategy to remove words from the query when it doesn\'t match any hits.
33
*/
4-
54
export type RemoveWordsIfNoResults =
65
| 'allOptional'
76
| 'firstWords'

clients/algoliasearch-client-javascript/packages/algoliasearch-lite/model/synonymType.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* Type of the synonym object.
33
*/
4-
54
export type SynonymType =
65
| 'altcorrection1'
76
| 'altcorrection2'
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Controls whether typo tolerance is enabled and how it is applied.
33
*/
4-
54
export type TypoTolerance = 'false' | 'min' | 'strict' | 'true';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* An eventType can be a click, a conversion, or a view.
33
*/
4-
54
export type EventType = 'click' | 'conversion' | 'view';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Type of the record, can be one of three values (INFO, SKIP or ERROR).
33
*/
4-
54
export type LogLevel = 'ERROR' | 'INFO' | 'SKIP';

clients/algoliasearch-client-javascript/packages/client-search/model/action.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* Type of operation.
33
*/
4-
54
export type Action =
65
| 'addObject'
76
| 'clear'
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Whether the pattern parameter must match the beginning or the end of the query string, or both, or none.
33
*/
4-
54
export type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
import type { AroundRadiusAll } from './aroundRadiusAll';
22

3+
/**
4+
* Define the maximum radius for a geo search (in meters).
5+
*/
36
export type AroundRadius = AroundRadiusAll | number;

clients/algoliasearch-client-javascript/packages/client-search/model/builtInOperationType.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* The operation to apply on the attribute.
33
*/
4-
54
export type BuiltInOperationType =
65
| 'Add'
76
| 'AddUnique'
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Actions to perform.
33
*/
4-
54
export type DictionaryAction = 'addEntry' | 'deleteEntry';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* The state of the dictionary entry.
33
*/
4-
54
export type DictionaryEntryState = 'disabled' | 'enabled';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Controls how the exact ranking criterion is computed when the query contains only one word.
33
*/
4-
54
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import type { BaseIndexSettings } from './baseIndexSettings';
22
import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams';
33

4+
/**
5+
* The Algolia index settings.
6+
*/
47
export type IndexSettings = BaseIndexSettings & IndexSettingsAsSearchParams;
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Indicates how well the attribute matched the search query.
33
*/
4-
54
export type MatchLevel = 'full' | 'none' | 'partial';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Perform a search query with `default`, will search for facet values if `facet` is given.
33
*/
4-
54
export type MultipleQueriesType = 'default' | 'facet';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Type of operation to perform (move or copy).
33
*/
4-
54
export type OperationType = 'copy' | 'move';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Controls if and how query words are interpreted as prefixes.
33
*/
4-
54
export type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone';

clients/algoliasearch-client-javascript/packages/client-search/model/removeWordsIfNoResults.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* Selects a strategy to remove words from the query when it doesn\'t match any hits.
33
*/
4-
54
export type RemoveWordsIfNoResults =
65
| 'allOptional'
76
| 'firstWords'

clients/algoliasearch-client-javascript/packages/client-search/model/synonymType.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* Type of the synonym object.
33
*/
4-
54
export type SynonymType =
65
| 'altcorrection1'
76
| 'altcorrection2'
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Controls whether typo tolerance is enabled and how it is applied.
33
*/
4-
54
export type TypoTolerance = 'false' | 'min' | 'strict' | 'true';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* The type of authentication to use.
33
*/
4-
54
export type AuthenticationType = 'basic';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* The HTTP method that will be used to fetch the URL.
33
*/
4-
54
export type Method = 'GET' | 'POST';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* The type of operation to execute.
33
*/
4-
54
export type OperationType = 'replace';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* The product to target.
33
*/
4-
54
export type ProductType = 'search';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* The type of the task executed.
33
*/
4-
54
export type TaskType = 'csv';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
import type { AroundRadiusAll } from './aroundRadiusAll';
22

3+
/**
4+
* Define the maximum radius for a geo search (in meters).
5+
*/
36
export type AroundRadius = AroundRadiusAll | number;
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Controls how the exact ranking criterion is computed when the query contains only one word.
33
*/
4-
54
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Indicates how well the attribute matched the search query.
33
*/
4-
54
export type MatchLevel = 'full' | 'none' | 'partial';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Controls if and how query words are interpreted as prefixes.
33
*/
4-
54
export type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* The recommendation model to use.
33
*/
4-
54
export type RecommendationModels = 'bought-together' | 'related-products';

clients/algoliasearch-client-javascript/packages/recommend/model/removeWordsIfNoResults.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* Selects a strategy to remove words from the query when it doesn\'t match any hits.
33
*/
4-
54
export type RemoveWordsIfNoResults =
65
| 'allOptional'
76
| 'firstWords'
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* The trending model to use.
33
*/
4-
54
export type TrendingModels = 'trending-facets' | 'trending-items';
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/**
22
* Controls whether typo tolerance is enabled and how it is applied.
33
*/
4-
54
export type TypoTolerance = 'false' | 'min' | 'strict' | 'true';

templates/javascript/model.mustache

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,29 @@
1-
{{#models}}
2-
{{#model}}
1+
{{#models}}{{#model}}
32
{{#tsImports}}
43
import { {{classname}} } from '{{filename}}';
54
{{/tsImports}}
65

76
{{! We handle types that depend on other interfaces }}
87
{{#interfaces.size}}
9-
export type {{classname}} = {{#oneOf}}{{.}} {{^-last}}|{{/-last}} {{/oneOf}}{{#allOf}}{{.}} {{^-last}}&{{/-last}} {{/allOf}};
10-
{{/interfaces.size}}
11-
12-
{{^interfaces}}
138
{{#description}}
149
/**
1510
* {{{description}}}
16-
*/
17-
{{/description}}
18-
{{^isEnum}}
19-
export type {{classname}} = {{#parent}} {{{.}}} & {{/parent}} {
20-
{{#vars}}
11+
*/{{/description}}
12+
export type {{classname}} = {{#oneOf}}{{{.}}} {{^-last}}|{{/-last}} {{/oneOf}}{{#allOf}}{{{.}}} {{^-last}}&{{/-last}} {{/allOf}};
13+
{{/interfaces.size}}{{^interfaces.size}}
2114
{{#description}}
15+
/**
16+
* {{{description}}}
17+
*/{{/description}}{{^isEnum}}
18+
export type {{classname}} = {{#parent}} {{{.}}} & {{/parent}} {
19+
{{#vars}}{{#description}}
2220
/**
2321
* {{{description}}}
24-
*/
25-
{{/description}}
26-
{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{classname}}{{{nameInCamelCase}}}{{#isArray}}[]{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
27-
{{/vars}}
22+
*/{{/description}}
23+
{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{classname}}{{{nameInCamelCase}}}{{#isArray}}[]{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};{{/vars}}
2824
}
29-
30-
{{#hasEnums}}
31-
{{#vars}}
32-
{{#isEnum}}
33-
export type {{classname}}{{nameInCamelCase}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}|{{/-last}}{{/enumVars}}{{/allowableValues}}
34-
35-
{{/isEnum}}
36-
{{/vars}}
37-
{{/hasEnums}}
38-
{{/isEnum}}
39-
40-
{{#isEnum}}
41-
export type {{classname}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}|{{/-last}}{{/enumVars}}{{/allowableValues}}
42-
4325
{{/isEnum}}
26+
{{#hasEnums}}{{#vars}}{{#isEnum}}export type {{classname}}{{nameInCamelCase}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}|{{/-last}}{{/enumVars}}{{/allowableValues}}{{/isEnum}}{{/vars}}{{/hasEnums}}
27+
{{#isEnum}}export type {{classname}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}|{{/-last}}{{/enumVars}}{{/allowableValues}}{{/isEnum}}
4428

45-
{{/interfaces}}
46-
{{/model}}
47-
{{/models}}
29+
{{/interfaces.size}}{{/model}}{{/models}}

0 commit comments

Comments
 (0)