Skip to content

Commit e5a794d

Browse files
chore: generated code for commit 56b22bc. [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 56b22bc commit e5a794d

File tree

8 files changed

+222
-22
lines changed

8 files changed

+222
-22
lines changed

clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ export function createAbtestingClient({
294294
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
295295
*/
296296
listABTests(
297-
{ offset, limit }: ListABTestsProps,
298-
requestOptions?: RequestOptions
297+
{ offset, limit }: ListABTestsProps = {},
298+
requestOptions: RequestOptions | undefined = undefined
299299
): Promise<ListABTestsResponse> {
300300
const requestPath = '/2/abtests';
301301
const headers: Headers = {};

clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,8 +1364,8 @@ export function createSearchClient({
13641364
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
13651365
*/
13661366
getLogs(
1367-
{ offset, length, indexName, type }: GetLogsProps,
1368-
requestOptions?: RequestOptions
1367+
{ offset, length, indexName, type }: GetLogsProps = {},
1368+
requestOptions: RequestOptions | undefined = undefined
13691369
): Promise<GetLogsResponse> {
13701370
const requestPath = '/1/logs';
13711371
const headers: Headers = {};
@@ -1729,8 +1729,8 @@ export function createSearchClient({
17291729
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
17301730
*/
17311731
hasPendingMappings(
1732-
{ getClusters }: HasPendingMappingsProps,
1733-
requestOptions?: RequestOptions
1732+
{ getClusters }: HasPendingMappingsProps = {},
1733+
requestOptions: RequestOptions | undefined = undefined
17341734
): Promise<HasPendingMappingsResponse> {
17351735
const requestPath = '/1/clusters/mapping/pending';
17361736
const headers: Headers = {};
@@ -1803,8 +1803,8 @@ export function createSearchClient({
18031803
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
18041804
*/
18051805
listIndices(
1806-
{ page }: ListIndicesProps,
1807-
requestOptions?: RequestOptions
1806+
{ page }: ListIndicesProps = {},
1807+
requestOptions: RequestOptions | undefined = undefined
18081808
): Promise<ListIndicesResponse> {
18091809
const requestPath = '/1/indexes';
18101810
const headers: Headers = {};
@@ -1834,8 +1834,8 @@ export function createSearchClient({
18341834
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
18351835
*/
18361836
listUserIds(
1837-
{ page, hitsPerPage }: ListUserIdsProps,
1838-
requestOptions?: RequestOptions
1837+
{ page, hitsPerPage }: ListUserIdsProps = {},
1838+
requestOptions: RequestOptions | undefined = undefined
18391839
): Promise<ListUserIdsResponse> {
18401840
const requestPath = '/1/clusters/mapping';
18411841
const headers: Headers = {};

tests/output/java/src/test/java/com/algolia/methods/requests/Abtesting.test.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,19 @@ void getABTestTest0() {
214214
@Test
215215
@DisplayName("listABTests with minimal parameters")
216216
void listABTestsTest0() {
217+
assertDoesNotThrow(() -> {
218+
client.listABTests();
219+
});
220+
EchoResponse req = echo.getLastResponse();
221+
222+
assertEquals(req.path, "/2/abtests");
223+
assertEquals(req.method, "GET");
224+
assertNull(req.body);
225+
}
226+
227+
@Test
228+
@DisplayName("listABTests with parameters")
229+
void listABTestsTest1() {
217230
int offset0 = 42;
218231
int limit0 = 21;
219232

tests/output/java/src/test/java/com/algolia/methods/requests/Search.test.java

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,8 +1035,21 @@ void getDictionarySettingsTest0() {
10351035
}
10361036

10371037
@Test
1038-
@DisplayName("getLogs")
1038+
@DisplayName("getLogs with minimal parameters")
10391039
void getLogsTest0() {
1040+
assertDoesNotThrow(() -> {
1041+
client.getLogs();
1042+
});
1043+
EchoResponse req = echo.getLastResponse();
1044+
1045+
assertEquals(req.path, "/1/logs");
1046+
assertEquals(req.method, "GET");
1047+
assertNull(req.body);
1048+
}
1049+
1050+
@Test
1051+
@DisplayName("getLogs with parameters")
1052+
void getLogsTest1() {
10401053
int offset0 = 5;
10411054
int length0 = 10;
10421055
String indexName0 = "theIndexName";
@@ -1253,8 +1266,21 @@ void getUserIdTest0() {
12531266
}
12541267

12551268
@Test
1256-
@DisplayName("hasPendingMappings")
1269+
@DisplayName("hasPendingMappings with minimal parameters")
12571270
void hasPendingMappingsTest0() {
1271+
assertDoesNotThrow(() -> {
1272+
client.hasPendingMappings();
1273+
});
1274+
EchoResponse req = echo.getLastResponse();
1275+
1276+
assertEquals(req.path, "/1/clusters/mapping/pending");
1277+
assertEquals(req.method, "GET");
1278+
assertNull(req.body);
1279+
}
1280+
1281+
@Test
1282+
@DisplayName("hasPendingMappings with parameters")
1283+
void hasPendingMappingsTest1() {
12581284
boolean getClusters0 = true;
12591285

12601286
assertDoesNotThrow(() -> {
@@ -1306,8 +1332,21 @@ void listClustersTest0() {
13061332
}
13071333

13081334
@Test
1309-
@DisplayName("listIndices")
1335+
@DisplayName("listIndices with minimal parameters")
13101336
void listIndicesTest0() {
1337+
assertDoesNotThrow(() -> {
1338+
client.listIndices();
1339+
});
1340+
EchoResponse req = echo.getLastResponse();
1341+
1342+
assertEquals(req.path, "/1/indexes");
1343+
assertEquals(req.method, "GET");
1344+
assertNull(req.body);
1345+
}
1346+
1347+
@Test
1348+
@DisplayName("listIndices with parameters")
1349+
void listIndicesTest1() {
13111350
int page0 = 8;
13121351

13131352
assertDoesNotThrow(() -> {
@@ -1333,8 +1372,21 @@ void listIndicesTest0() {
13331372
}
13341373

13351374
@Test
1336-
@DisplayName("listUserIds")
1375+
@DisplayName("listUserIds with minimal parameters")
13371376
void listUserIdsTest0() {
1377+
assertDoesNotThrow(() -> {
1378+
client.listUserIds();
1379+
});
1380+
EchoResponse req = echo.getLastResponse();
1381+
1382+
assertEquals(req.path, "/1/clusters/mapping");
1383+
assertEquals(req.method, "GET");
1384+
assertNull(req.body);
1385+
}
1386+
1387+
@Test
1388+
@DisplayName("listUserIds with parameters")
1389+
void listUserIdsTest1() {
13381390
int page0 = 8;
13391391
int hitsPerPage0 = 100;
13401392

tests/output/javascript/src/methods/requests/abtesting.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ describe('getABTest', () => {
110110

111111
describe('listABTests', () => {
112112
test('listABTests with minimal parameters', async () => {
113+
const req = (await client.listABTests()) as unknown as EchoResponse;
114+
115+
expect(req.path).toEqual('/2/abtests');
116+
expect(req.method).toEqual('GET');
117+
expect(req.data).toEqual(undefined);
118+
expect(req.searchParams).toStrictEqual(undefined);
119+
});
120+
121+
test('listABTests with parameters', async () => {
113122
const req = (await client.listABTests({
114123
offset: 42,
115124
limit: 21,

tests/output/javascript/src/methods/requests/search.test.ts

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,16 @@ describe('getDictionarySettings', () => {
596596
});
597597

598598
describe('getLogs', () => {
599-
test('getLogs', async () => {
599+
test('getLogs with minimal parameters', async () => {
600+
const req = (await client.getLogs()) as unknown as EchoResponse;
601+
602+
expect(req.path).toEqual('/1/logs');
603+
expect(req.method).toEqual('GET');
604+
expect(req.data).toEqual(undefined);
605+
expect(req.searchParams).toStrictEqual(undefined);
606+
});
607+
608+
test('getLogs with parameters', async () => {
600609
const req = (await client.getLogs({
601610
offset: 5,
602611
length: 10,
@@ -751,7 +760,16 @@ describe('getUserId', () => {
751760
});
752761

753762
describe('hasPendingMappings', () => {
754-
test('hasPendingMappings', async () => {
763+
test('hasPendingMappings with minimal parameters', async () => {
764+
const req = (await client.hasPendingMappings()) as unknown as EchoResponse;
765+
766+
expect(req.path).toEqual('/1/clusters/mapping/pending');
767+
expect(req.method).toEqual('GET');
768+
expect(req.data).toEqual(undefined);
769+
expect(req.searchParams).toStrictEqual(undefined);
770+
});
771+
772+
test('hasPendingMappings with parameters', async () => {
755773
const req = (await client.hasPendingMappings({
756774
getClusters: true,
757775
})) as unknown as EchoResponse;
@@ -786,7 +804,16 @@ describe('listClusters', () => {
786804
});
787805

788806
describe('listIndices', () => {
789-
test('listIndices', async () => {
807+
test('listIndices with minimal parameters', async () => {
808+
const req = (await client.listIndices()) as unknown as EchoResponse;
809+
810+
expect(req.path).toEqual('/1/indexes');
811+
expect(req.method).toEqual('GET');
812+
expect(req.data).toEqual(undefined);
813+
expect(req.searchParams).toStrictEqual(undefined);
814+
});
815+
816+
test('listIndices with parameters', async () => {
790817
const req = (await client.listIndices({
791818
page: 8,
792819
})) as unknown as EchoResponse;
@@ -799,7 +826,16 @@ describe('listIndices', () => {
799826
});
800827

801828
describe('listUserIds', () => {
802-
test('listUserIds', async () => {
829+
test('listUserIds with minimal parameters', async () => {
830+
const req = (await client.listUserIds()) as unknown as EchoResponse;
831+
832+
expect(req.path).toEqual('/1/clusters/mapping');
833+
expect(req.method).toEqual('GET');
834+
expect(req.data).toEqual(undefined);
835+
expect(req.searchParams).toStrictEqual(undefined);
836+
});
837+
838+
test('listUserIds with parameters', async () => {
803839
const req = (await client.listUserIds({
804840
page: 8,
805841
hitsPerPage: 100,

tests/output/php/src/methods/requests/AbtestingTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,24 @@ public function testGetABTest0()
252252
* listABTests with minimal parameters
253253
*/
254254
public function testListABTests0()
255+
{
256+
$client = $this->getClient();
257+
$client->listABTests();
258+
259+
$this->assertRequests([
260+
[
261+
'path' => '/2/abtests',
262+
'method' => 'GET',
263+
'body' => null,
264+
],
265+
]);
266+
}
267+
268+
/**
269+
* Test case for ListABTests
270+
* listABTests with parameters
271+
*/
272+
public function testListABTests1()
255273
{
256274
$client = $this->getClient();
257275
$client->listABTests(

tests/output/php/src/methods/requests/SearchTest.php

Lines changed: 76 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -930,9 +930,27 @@ public function testGetDictionarySettings0()
930930

931931
/**
932932
* Test case for GetLogs
933-
* getLogs
933+
* getLogs with minimal parameters
934934
*/
935935
public function testGetLogs0()
936+
{
937+
$client = $this->getClient();
938+
$client->getLogs();
939+
940+
$this->assertRequests([
941+
[
942+
'path' => '/1/logs',
943+
'method' => 'GET',
944+
'body' => null,
945+
],
946+
]);
947+
}
948+
949+
/**
950+
* Test case for GetLogs
951+
* getLogs with parameters
952+
*/
953+
public function testGetLogs1()
936954
{
937955
$client = $this->getClient();
938956
$client->getLogs(
@@ -1146,9 +1164,27 @@ public function testGetUserId0()
11461164

11471165
/**
11481166
* Test case for HasPendingMappings
1149-
* hasPendingMappings
1167+
* hasPendingMappings with minimal parameters
11501168
*/
11511169
public function testHasPendingMappings0()
1170+
{
1171+
$client = $this->getClient();
1172+
$client->hasPendingMappings();
1173+
1174+
$this->assertRequests([
1175+
[
1176+
'path' => '/1/clusters/mapping/pending',
1177+
'method' => 'GET',
1178+
'body' => null,
1179+
],
1180+
]);
1181+
}
1182+
1183+
/**
1184+
* Test case for HasPendingMappings
1185+
* hasPendingMappings with parameters
1186+
*/
1187+
public function testHasPendingMappings1()
11521188
{
11531189
$client = $this->getClient();
11541190
$client->hasPendingMappings(true);
@@ -1204,9 +1240,27 @@ public function testListClusters0()
12041240

12051241
/**
12061242
* Test case for ListIndices
1207-
* listIndices
1243+
* listIndices with minimal parameters
12081244
*/
12091245
public function testListIndices0()
1246+
{
1247+
$client = $this->getClient();
1248+
$client->listIndices();
1249+
1250+
$this->assertRequests([
1251+
[
1252+
'path' => '/1/indexes',
1253+
'method' => 'GET',
1254+
'body' => null,
1255+
],
1256+
]);
1257+
}
1258+
1259+
/**
1260+
* Test case for ListIndices
1261+
* listIndices with parameters
1262+
*/
1263+
public function testListIndices1()
12101264
{
12111265
$client = $this->getClient();
12121266
$client->listIndices(8);
@@ -1223,9 +1277,27 @@ public function testListIndices0()
12231277

12241278
/**
12251279
* Test case for ListUserIds
1226-
* listUserIds
1280+
* listUserIds with minimal parameters
12271281
*/
12281282
public function testListUserIds0()
1283+
{
1284+
$client = $this->getClient();
1285+
$client->listUserIds();
1286+
1287+
$this->assertRequests([
1288+
[
1289+
'path' => '/1/clusters/mapping',
1290+
'method' => 'GET',
1291+
'body' => null,
1292+
],
1293+
]);
1294+
}
1295+
1296+
/**
1297+
* Test case for ListUserIds
1298+
* listUserIds with parameters
1299+
*/
1300+
public function testListUserIds1()
12291301
{
12301302
$client = $this->getClient();
12311303
$client->listUserIds(

0 commit comments

Comments
 (0)