Skip to content

Commit

Permalink
feat(js): client common (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Jan 21, 2022
1 parent 67dcaa9 commit 6dfaf44
Show file tree
Hide file tree
Showing 136 changed files with 218 additions and 5,508 deletions.
6 changes: 6 additions & 0 deletions .github/actions/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ runs:
key: ${{ runner.os }}-${{ inputs.spec }}-specs-${{ hashFiles(format('specs/{0}/**', inputs.spec)) }}

# restore clients
- name: Restore built JavaScript common client
uses: actions/cache@v2
with:
path: /home/runner/work/api-clients-automation/api-clients-automation/clients/algoliasearch-client-javascript/client-common/dist
key: ${{ runner.os }}-1-js-client-common-${{ hashFiles('clients/common-client-javascript/client-common/**') }}

- name: Restore built JavaScript search client
if: ${{ inputs.job == 'cts' }}
uses: actions/cache@v2
Expand Down
4 changes: 2 additions & 2 deletions clients/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Clients

This folder hosts the generated clients and their utils.
This folder hosts the generated clients.

## Generated clients

Expand All @@ -20,4 +20,4 @@ This folder hosts the generated clients and their utils.

#### Utils

- [JavaScript](./algoliasearch-client-javascript/utils/): The JavaScript clients utils.
- [JavaScript](./algoliasearch-client-javascript/client-common/): The JavaScript clients common files.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
"main": "dist/api.js",
"types": "dist/api.d.ts",
"scripts": {
"clean": "rm -Rf node_modules/ *.js",
"build": "tsc",
"test": "yarn build && node dist/client.js"
"clean": "rm -rf dist/"
},
"engines": {
"node": "^16.0.0",
"yarn": "^3.0.0"
},
"dependencies": {
"@algolia/client-common": "5.0.0"
},
"devDependencies": {
"@types/node": "16.11.11",
"typescript": "4.5.4"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { Transporter } from '@algolia/client-common';
import type {
Headers,
Requester,
Host,
Request,
RequestOptions,
} from '@algolia/client-common';

import type { ABTest } from '../model/aBTest';
import type { ABTestResponse } from '../model/aBTestResponse';
import type { AddABTestsRequest } from '../model/addABTestsRequest';
import type { ListABTestsResponse } from '../model/listABTestsResponse';
import { Transporter } from '../utils/Transporter';
import type { Requester } from '../utils/requester/Requester';
import type { Headers, Host, Request, RequestOptions } from '../utils/types';

export class AbtestingApi {
protected authentications = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { AbtestingApi } from './abtestingApi';

export * from './abtestingApi';
export * from '../utils/errors';
export { EchoRequester } from '../utils/requester/EchoRequester';
export { EchoResponse } from '../utils/types';
export * from '@algolia/client-common';

export const APIS = [AbtestingApi];
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
"main": "dist/api.js",
"types": "dist/api.d.ts",
"scripts": {
"clean": "rm -Rf node_modules/ *.js",
"build": "tsc",
"test": "yarn build && node dist/client.js"
"clean": "rm -rf dist/"
},
"engines": {
"node": "^16.0.0",
"yarn": "^3.0.0"
},
"dependencies": {
"@algolia/client-common": "5.0.0"
},
"devDependencies": {
"@types/node": "16.11.11",
"typescript": "4.5.4"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
import { Transporter } from '@algolia/client-common';
import type {
Headers,
Requester,
Host,
Request,
RequestOptions,
} from '@algolia/client-common';

import type { GetAverageClickPositionResponse } from '../model/getAverageClickPositionResponse';
import type { GetClickPositionsResponse } from '../model/getClickPositionsResponse';
import type { GetClickThroughRateResponse } from '../model/getClickThroughRateResponse';
Expand All @@ -17,9 +26,6 @@ import type { GetTopHitsResponseWithAnalytics } from '../model/getTopHitsRespons
import type { GetTopSearchesResponse } from '../model/getTopSearchesResponse';
import type { GetTopSearchesResponseWithAnalytics } from '../model/getTopSearchesResponseWithAnalytics';
import type { GetUsersCountResponse } from '../model/getUsersCountResponse';
import { Transporter } from '../utils/Transporter';
import type { Requester } from '../utils/requester/Requester';
import type { Headers, Host, Request, RequestOptions } from '../utils/types';

export class AnalyticsApi {
protected authentications = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { AnalyticsApi } from './analyticsApi';

export * from './analyticsApi';
export * from '../utils/errors';
export { EchoRequester } from '../utils/requester/EchoRequester';
export { EchoResponse } from '../utils/types';
export * from '@algolia/client-common';

export const APIS = [AnalyticsApi];

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6dfaf44

Please sign in to comment.