Skip to content

Commit 59dba95

Browse files
committed
chore: review
1 parent b0063ac commit 59dba95

19 files changed

+49
-60
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
"website:build": "bash scripts/website/build.sh"
3131
},
3232
"devDependencies": {
33-
"@openapitools/openapi-generator-cli": "2.13.12",
34-
"@redocly/cli": "1.25.4",
33+
"@openapitools/openapi-generator-cli": "2.13.13",
34+
"@redocly/cli": "1.25.5",
3535
"eslint": "8.57.1",
3636
"eslint-plugin-automation-custom": "1.0.0",
3737
"eslint-plugin-json": "4.0.1",

playground/javascript/browser/app.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ client.addAlgoliaAgent('Browser playground', '0.0.1');
1111
const searchButton = document.querySelector('#search');
1212

1313
searchButton?.addEventListener('click', async () => {
14-
1514
const { results } = await client.searchForHits({
1615
requests: [
1716
{

playground/javascript/browser/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

playground/javascript/browser/products.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />

playground/javascript/browser/src/App.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ em {
102102
align-items: center;
103103
padding: 1.5rem;
104104
display: flex;
105-
box-shadow: 0 0 0 1px #23263b0d, 0 1px 3px #23263b26;
105+
box-shadow:
106+
0 0 0 1px #23263b0d,
107+
0 1px 3px #23263b26;
106108
}
107109

108110
.ais-TrendingItems-item img,

playground/javascript/browser/src/App.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { liteClient as algoliasearch } from 'algoliasearch/lite';
22
import { Hit } from 'instantsearch.js';
3-
import React from 'react';
43
import {
4+
Carousel,
55
Configure,
66
Highlight,
77
Hits,
@@ -10,17 +10,16 @@ import {
1010
RefinementList,
1111
SearchBox,
1212
TrendingItems,
13-
Carousel,
1413
} from 'react-instantsearch';
1514

1615
import { Panel } from './Panel';
1716

18-
import './App.css';
1917
import 'instantsearch.css/themes/satellite.css';
18+
import './App.css';
2019

2120
const searchClient = algoliasearch(
2221
'latency',
23-
'6be0576ff61c053d5f9a3225e2a90f76'
22+
'6be0576ff61c053d5f9a3225e2a90f76',
2423
);
2524

2625
export function App() {

playground/javascript/browser/src/Product.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import { liteClient as algoliasearch } from 'algoliasearch/lite';
22
import { type Hit } from 'instantsearch.js';
3-
import React from 'react';
43
import {
4+
Carousel,
55
Configure,
66
Hits,
77
InstantSearch,
88
RelatedProducts,
9-
Carousel,
109
} from 'react-instantsearch';
1110

12-
import './App.css';
1311
import 'instantsearch.css/themes/satellite.css';
12+
import './App.css';
1413

1514
const searchClient = algoliasearch(
1615
'latency',
17-
'6be0576ff61c053d5f9a3225e2a90f76'
16+
'6be0576ff61c053d5f9a3225e2a90f76',
1817
);
1918

2019
export function Product({ pid }: { pid: string }) {

playground/javascript/browser/src/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import { createRoot } from 'react-dom/client';
32

43
import { App } from './App';

playground/javascript/browser/src/products.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import { createRoot } from 'react-dom/client';
32

43
import { Product } from './Product';

playground/javascript/node/abtesting.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { abtestingClient } from '@algolia/client-abtesting';
22
import { ApiError } from '@algolia/client-common';
33

44
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
5-
const apiKey =
6-
process.env.ALGOLIA_ANALYTICS_KEY || '**** ANALYTICS_API_KEY *****';
5+
const apiKey = process.env.ALGOLIA_ANALYTICS_KEY || '**** ANALYTICS_API_KEY *****';
76

87
// Init client with appId and apiKey
98
const client = abtestingClient(appId, apiKey, 'de');

playground/javascript/node/algoliasearch.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { algoliasearch, SearchClient } from 'algoliasearch';
2-
import { liteClient } from 'algoliasearch/lite';
31
import { ApiError } from '@algolia/client-common';
2+
import { algoliasearch } from 'algoliasearch';
3+
import { liteClient } from 'algoliasearch/lite';
44

55
import type { SearchResponses } from 'algoliasearch';
66

@@ -33,7 +33,7 @@ async function testAlgoliasearch() {
3333
parentApiKey: 'foo',
3434
restrictions: {
3535
validUntil: 200,
36-
}
36+
},
3737
});
3838

3939
const resLite: SearchResponses = await clientLite.search({
@@ -59,17 +59,15 @@ async function testAlgoliasearch() {
5959
},
6060
]);
6161

62-
const resWithLegacySignatureLite: SearchResponses = await clientLite.search(
63-
[
64-
{
65-
indexName: searchIndex,
66-
params: {
67-
query: searchQuery,
68-
hitsPerPage: 50,
69-
},
62+
const resWithLegacySignatureLite: SearchResponses = await clientLite.search([
63+
{
64+
indexName: searchIndex,
65+
params: {
66+
query: searchQuery,
67+
hitsPerPage: 50,
7068
},
71-
]
72-
);
69+
},
70+
]);
7371

7472
console.log(`[OK legacy search]`, resWithLegacySignature);
7573
console.log(`[OK legacy search LITE ]`, resWithLegacySignatureLite);

playground/javascript/node/analytics.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { analyticsClient } from '@algolia/client-analytics';
22
import { ApiError } from '@algolia/client-common';
33

44
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
5-
const apiKey =
6-
process.env.ALGOLIA_ANALYTICS_KEY || '**** ANALYTICS_API_KEY *****';
5+
const apiKey = process.env.ALGOLIA_ANALYTICS_KEY || '**** ANALYTICS_API_KEY *****';
76

87
const analyticsIndex = process.env.ANALYTICS_INDEX || 'test_index';
98

playground/javascript/node/ingestion.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
import { ingestionClient } from '@algolia/ingestion';
21
import { ApiError } from '@algolia/client-common';
2+
import { ingestionClient } from '@algolia/ingestion';
33

44
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
5-
const apiKey =
6-
process.env.ALGOLIA_ADMIN_KEY ||
7-
'**** ADMIN_KEY *****';
5+
const apiKey = process.env.ALGOLIA_ADMIN_KEY || '**** ADMIN_KEY *****';
86

97
// Init client with appId and apiKey
10-
const client = ingestionClient(appId, apiKey, 'us', {authMode: 'WithinHeaders', hosts: [{url: 'staging-data.us.algolia.com', accept: 'readWrite', protocol: 'https'}]});
8+
const client = ingestionClient(appId, apiKey, 'us', {
9+
authMode: 'WithinHeaders',
10+
hosts: [{ url: 'staging-data.us.algolia.com', accept: 'readWrite', protocol: 'https' }],
11+
});
1112

1213
async function testIngestion() {
1314
try {

playground/javascript/node/insights.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { insightsClient } from '@algolia/client-insights';
21
import { ApiError } from '@algolia/client-common';
2+
import { insightsClient } from '@algolia/client-insights';
33

44
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
5-
const apiKey =
6-
process.env.ALGOLIA_INSIGHTS_API_KEY || '**** INSIGHTS_API_KEY *****';
5+
const apiKey = process.env.ALGOLIA_INSIGHTS_API_KEY || '**** INSIGHTS_API_KEY *****';
76

87
// Init client with appId and apiKey
98
const client = insightsClient(appId, apiKey);

playground/javascript/node/personalization.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { personalizationClient } from '@algolia/client-personalization';
21
import { ApiError } from '@algolia/client-common';
2+
import { personalizationClient } from '@algolia/client-personalization';
33

44
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
5-
const apiKey =
6-
process.env.ALGOLIA_RECOMMENDATION_KEY || '**** RECOMMENDATION_API_KEY *****';
5+
const apiKey = process.env.ALGOLIA_RECOMMENDATION_KEY || '**** RECOMMENDATION_API_KEY *****';
76

87
// Init client with appId and apiKey
98
const client = personalizationClient(appId, apiKey, 'eu');

playground/javascript/node/query-suggestions.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
21
import { ApiError } from '@algolia/client-common';
2+
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
33

44
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
5-
const apiKey =
6-
process.env.ALGOLIA_QUERY_SUGGESTIONS_KEY ||
7-
'**** QUERY_SUGGESTIONS_KEY *****';
5+
const apiKey = process.env.ALGOLIA_QUERY_SUGGESTIONS_KEY || '**** QUERY_SUGGESTIONS_KEY *****';
86

97
// Init client with appId and apiKey
108
const client = querySuggestionsClient(appId, apiKey, 'us');

playground/javascript/node/recommend.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { recommendClient } from '@algolia/recommend';
21
import { ApiError } from '@algolia/client-common';
2+
import { recommendClient } from '@algolia/recommend';
33

44
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
55
const apiKey = process.env.ALGOLIA_SEARCH_KEY || '**** SEARCH_API_KEY *****';
@@ -33,8 +33,6 @@ async function testGetRecommendations() {
3333
}
3434
}
3535

36-
37-
3836
async function testRecommend() {
3937
await testGetRecommendations();
4038
}

playground/javascript/node/search.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { searchClient, apiClientVersion } from '@algolia/client-search';
2-
import { SearchQuery } from '@algolia/client-search/model';
31
import { ApiError } from '@algolia/client-common';
2+
import { apiClientVersion, searchClient } from '@algolia/client-search';
3+
import { SearchQuery } from '@algolia/client-search/model';
44

55
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
66
const apiKey = process.env.ALGOLIA_ADMIN_KEY || '**** SEARCH_API_KEY *****';
@@ -13,14 +13,17 @@ const client = searchClient(appId, apiKey);
1313

1414
client.addAlgoliaAgent('Node playground', '0.0.1');
1515

16-
const requests: SearchQuery[] = [
17-
{ indexName: searchIndex, query: searchQuery },
18-
];
16+
const requests: SearchQuery[] = [{ indexName: searchIndex, query: searchQuery }];
1917
console.log('version', apiClientVersion, 'requests', requests);
2018

2119
async function testSearch() {
2220
try {
23-
const res = await client.browseRules({ indexName: "cts_e2e_search_facet", aggregator: (resp: any) => {console.log(resp)} });
21+
const res = await client.browseRules({
22+
indexName: 'cts_e2e_search_facet',
23+
aggregator: (resp: any) => {
24+
console.log(resp);
25+
},
26+
});
2427

2528
console.log(`[OK]`, res);
2629
} catch (e: any) {

playground/javascript/node/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@
66
"lib": ["dom", "esnext"],
77
"outDir": "dist"
88
},
9-
"include": [
10-
"*.ts"
11-
]
9+
"include": ["*.ts"]
1210
}

0 commit comments

Comments
 (0)