Skip to content

Commit c85eea9

Browse files
chore: generated code for commit 2c7cd9c5. [skip ci]
algolia/api-clients-automation@2c7cd9c Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 740813d commit c85eea9

29 files changed

+400
-12
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

packages/algoliasearch/__tests__/algoliasearch.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ const client = algoliasearch('APP_ID', 'API_KEY', {
1414
});
1515

1616
describe('api', () => {
17+
it('exposes the `appId` currently in use at the root of the API', () => {
18+
expect(client.appId).toEqual('APP_ID');
19+
});
20+
21+
it('provides a `clearCache` method', () => {
22+
expect(client.clearCache).not.toBeUndefined();
23+
});
24+
1725
it('sets the user agent', async () => {
1826
const req = (await client.post({
1927
path: '/test',

packages/algoliasearch/lite/src/liteClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,21 @@ export function createLiteClient({
9090
return {
9191
transporter,
9292

93+
/**
94+
* The `appId` currently in use.
95+
*/
96+
appId: appIdOption,
97+
98+
/**
99+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
100+
*/
101+
clearCache(): Promise<void> {
102+
return Promise.all([
103+
transporter.requestsCache.clear(),
104+
transporter.responsesCache.clear(),
105+
]).then(() => undefined);
106+
},
107+
93108
/**
94109
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
95110
*/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

packages/client-abtesting/src/abtestingClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,21 @@ export function createAbtestingClient({
7474
return {
7575
transporter,
7676

77+
/**
78+
* The `appId` currently in use.
79+
*/
80+
appId: appIdOption,
81+
82+
/**
83+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
84+
*/
85+
clearCache(): Promise<void> {
86+
return Promise.all([
87+
transporter.requestsCache.clear(),
88+
transporter.responsesCache.clear(),
89+
]).then(() => undefined);
90+
},
91+
7792
/**
7893
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
7994
*/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

packages/client-analytics/src/analyticsClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,21 @@ export function createAnalyticsClient({
100100
return {
101101
transporter,
102102

103+
/**
104+
* The `appId` currently in use.
105+
*/
106+
appId: appIdOption,
107+
108+
/**
109+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
110+
*/
111+
clearCache(): Promise<void> {
112+
return Promise.all([
113+
transporter.requestsCache.clear(),
114+
transporter.responsesCache.clear(),
115+
]).then(() => undefined);
116+
},
117+
103118
/**
104119
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
105120
*/

packages/client-common/src/createIterablePromise.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CreateIterablePromise } from './types/CreateIterablePromise';
1+
import type { CreateIterablePromise } from './types/createIterablePromise';
22

33
/**
44
* Helper: Returns the promise of a given `func` to iterate on, based on a given `validate` condition.

packages/client-common/src/types/CreateClient.ts renamed to packages/client-common/src/types/createClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { AlgoliaAgentOptions, TransporterOptions } from './Transporter';
1+
import type { AlgoliaAgentOptions, TransporterOptions } from './transporter';
22

33
export type AuthMode = 'WithinHeaders' | 'WithinQueryParameters';
44

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
export * from './Cache';
2-
export * from './CreateClient';
3-
export * from './CreateIterablePromise';
4-
export * from './Host';
5-
export * from './Requester';
6-
export * from './Transporter';
1+
export * from './cache';
2+
export * from './createClient';
3+
export * from './createIterablePromise';
4+
export * from './host';
5+
export * from './requester';
6+
export * from './transporter';

packages/client-common/src/types/Requester.ts renamed to packages/client-common/src/types/requester.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Headers, QueryParameters } from './Transporter';
1+
import type { Headers, QueryParameters } from './transporter';
22

33
/**
44
* The method of the request.

packages/client-common/src/types/Transporter.ts renamed to packages/client-common/src/types/transporter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { Cache } from './Cache';
2-
import type { Host } from './Host';
3-
import type { Request, Requester, EndRequest, Response } from './Requester';
1+
import type { Cache } from './cache';
2+
import type { Host } from './host';
3+
import type { Request, Requester, EndRequest, Response } from './requester';
44

55
export type Headers = Record<string, string>;
66
export type QueryParameters = Record<string, any>;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

packages/client-insights/src/insightsClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,21 @@ export function createInsightsClient({
6868
return {
6969
transporter,
7070

71+
/**
72+
* The `appId` currently in use.
73+
*/
74+
appId: appIdOption,
75+
76+
/**
77+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
78+
*/
79+
clearCache(): Promise<void> {
80+
return Promise.all([
81+
transporter.requestsCache.clear(),
82+
transporter.responsesCache.clear(),
83+
]).then(() => undefined);
84+
},
85+
7186
/**
7287
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
7388
*/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

packages/client-personalization/src/personalizationClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,21 @@ export function createPersonalizationClient({
7373
return {
7474
transporter,
7575

76+
/**
77+
* The `appId` currently in use.
78+
*/
79+
appId: appIdOption,
80+
81+
/**
82+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
83+
*/
84+
clearCache(): Promise<void> {
85+
return Promise.all([
86+
transporter.requestsCache.clear(),
87+
transporter.responsesCache.clear(),
88+
]).then(() => undefined);
89+
},
90+
7691
/**
7792
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
7893
*/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

packages/client-query-suggestions/src/querySuggestionsClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,21 @@ export function createQuerySuggestionsClient({
7777
return {
7878
transporter,
7979

80+
/**
81+
* The `appId` currently in use.
82+
*/
83+
appId: appIdOption,
84+
85+
/**
86+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
87+
*/
88+
clearCache(): Promise<void> {
89+
return Promise.all([
90+
transporter.requestsCache.clear(),
91+
transporter.responsesCache.clear(),
92+
]).then(() => undefined);
93+
},
94+
8095
/**
8196
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
8297
*/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

packages/client-search/src/searchClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,21 @@ export function createSearchClient({
186186
return {
187187
transporter,
188188

189+
/**
190+
* The `appId` currently in use.
191+
*/
192+
appId: appIdOption,
193+
194+
/**
195+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
196+
*/
197+
clearCache(): Promise<void> {
198+
return Promise.all([
199+
transporter.requestsCache.clear(),
200+
transporter.responsesCache.clear(),
201+
]).then(() => undefined);
202+
},
203+
189204
/**
190205
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
191206
*/

0 commit comments

Comments
 (0)