Skip to content

Commit 39fae23

Browse files
committed
fix wrong/duplicate types
1 parent 8908ed3 commit 39fae23

File tree

16 files changed

+24
-32
lines changed

16 files changed

+24
-32
lines changed

clients/algoliasearch-client-javascript/client-abtesting/utils/requester/EchoRequester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { EndRequest, Request, Response } from '../types';
1+
import type { EndRequest, Request, Response, EchoResponse } from '../types';
22

33
import { Requester } from './Requester';
44

55
function searchParamsWithoutUA(
66
params: URLSearchParams
7-
): Record<string, any> | undefined {
7+
): EchoResponse['searchParams'] {
88
const searchParams = {};
99

1010
for (const [k, v] of params) {

clients/algoliasearch-client-javascript/client-abtesting/utils/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ export type Response = {
4343
status: number;
4444
};
4545

46-
export type EchoResponse = Omit<Request, 'data'> & {
46+
export type EchoResponse = Request & {
4747
connectTimeout: number;
4848
headers: Record<string, string>;
4949
responseTimeout: number;
50-
data?: Record<string, any>;
5150
searchParams?: Record<string, string>;
5251
userAgent?: string;
5352
};

clients/algoliasearch-client-javascript/client-analytics/utils/requester/EchoRequester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { EndRequest, Request, Response } from '../types';
1+
import type { EndRequest, Request, Response, EchoResponse } from '../types';
22

33
import { Requester } from './Requester';
44

55
function searchParamsWithoutUA(
66
params: URLSearchParams
7-
): Record<string, any> | undefined {
7+
): EchoResponse['searchParams'] {
88
const searchParams = {};
99

1010
for (const [k, v] of params) {

clients/algoliasearch-client-javascript/client-analytics/utils/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ export type Response = {
4343
status: number;
4444
};
4545

46-
export type EchoResponse = Omit<Request, 'data'> & {
46+
export type EchoResponse = Request & {
4747
connectTimeout: number;
4848
headers: Record<string, string>;
4949
responseTimeout: number;
50-
data?: Record<string, any>;
5150
searchParams?: Record<string, string>;
5251
userAgent?: string;
5352
};

clients/algoliasearch-client-javascript/client-insights/utils/requester/EchoRequester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { EndRequest, Request, Response } from '../types';
1+
import type { EndRequest, Request, Response, EchoResponse } from '../types';
22

33
import { Requester } from './Requester';
44

55
function searchParamsWithoutUA(
66
params: URLSearchParams
7-
): Record<string, any> | undefined {
7+
): EchoResponse['searchParams'] {
88
const searchParams = {};
99

1010
for (const [k, v] of params) {

clients/algoliasearch-client-javascript/client-insights/utils/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ export type Response = {
4343
status: number;
4444
};
4545

46-
export type EchoResponse = Omit<Request, 'data'> & {
46+
export type EchoResponse = Request & {
4747
connectTimeout: number;
4848
headers: Record<string, string>;
4949
responseTimeout: number;
50-
data?: Record<string, any>;
5150
searchParams?: Record<string, string>;
5251
userAgent?: string;
5352
};

clients/algoliasearch-client-javascript/client-personalization/utils/requester/EchoRequester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { EndRequest, Request, Response } from '../types';
1+
import type { EndRequest, Request, Response, EchoResponse } from '../types';
22

33
import { Requester } from './Requester';
44

55
function searchParamsWithoutUA(
66
params: URLSearchParams
7-
): Record<string, any> | undefined {
7+
): EchoResponse['searchParams'] {
88
const searchParams = {};
99

1010
for (const [k, v] of params) {

clients/algoliasearch-client-javascript/client-personalization/utils/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ export type Response = {
4343
status: number;
4444
};
4545

46-
export type EchoResponse = Omit<Request, 'data'> & {
46+
export type EchoResponse = Request & {
4747
connectTimeout: number;
4848
headers: Record<string, string>;
4949
responseTimeout: number;
50-
data?: Record<string, any>;
5150
searchParams?: Record<string, string>;
5251
userAgent?: string;
5352
};

clients/algoliasearch-client-javascript/client-query-suggestions/utils/requester/EchoRequester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { EndRequest, Request, Response } from '../types';
1+
import type { EndRequest, Request, Response, EchoResponse } from '../types';
22

33
import { Requester } from './Requester';
44

55
function searchParamsWithoutUA(
66
params: URLSearchParams
7-
): Record<string, any> | undefined {
7+
): EchoResponse['searchParams'] {
88
const searchParams = {};
99

1010
for (const [k, v] of params) {

clients/algoliasearch-client-javascript/client-query-suggestions/utils/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ export type Response = {
4343
status: number;
4444
};
4545

46-
export type EchoResponse = Omit<Request, 'data'> & {
46+
export type EchoResponse = Request & {
4747
connectTimeout: number;
4848
headers: Record<string, string>;
4949
responseTimeout: number;
50-
data?: Record<string, any>;
5150
searchParams?: Record<string, string>;
5251
userAgent?: string;
5352
};

clients/algoliasearch-client-javascript/client-search/utils/requester/EchoRequester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { EndRequest, Request, Response } from '../types';
1+
import type { EndRequest, Request, Response, EchoResponse } from '../types';
22

33
import { Requester } from './Requester';
44

55
function searchParamsWithoutUA(
66
params: URLSearchParams
7-
): Record<string, any> | undefined {
7+
): EchoResponse['searchParams'] {
88
const searchParams = {};
99

1010
for (const [k, v] of params) {

clients/algoliasearch-client-javascript/client-search/utils/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ export type Response = {
4343
status: number;
4444
};
4545

46-
export type EchoResponse = Omit<Request, 'data'> & {
46+
export type EchoResponse = Request & {
4747
connectTimeout: number;
4848
headers: Record<string, string>;
4949
responseTimeout: number;
50-
data?: Record<string, any>;
5150
searchParams?: Record<string, string>;
5251
userAgent?: string;
5352
};

clients/algoliasearch-client-javascript/recommend/utils/requester/EchoRequester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { EndRequest, Request, Response } from '../types';
1+
import type { EndRequest, Request, Response, EchoResponse } from '../types';
22

33
import { Requester } from './Requester';
44

55
function searchParamsWithoutUA(
66
params: URLSearchParams
7-
): Record<string, any> | undefined {
7+
): EchoResponse['searchParams'] {
88
const searchParams = {};
99

1010
for (const [k, v] of params) {

clients/algoliasearch-client-javascript/recommend/utils/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ export type Response = {
4343
status: number;
4444
};
4545

46-
export type EchoResponse = Omit<Request, 'data'> & {
46+
export type EchoResponse = Request & {
4747
connectTimeout: number;
4848
headers: Record<string, string>;
4949
responseTimeout: number;
50-
data?: Record<string, any>;
5150
searchParams?: Record<string, string>;
5251
userAgent?: string;
5352
};

clients/algoliasearch-client-javascript/utils/requester/EchoRequester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { EndRequest, Request, Response } from '../types';
1+
import type { EndRequest, Request, Response, EchoResponse } from '../types';
22

33
import { Requester } from './Requester';
44

55
function searchParamsWithoutUA(
66
params: URLSearchParams
7-
): Record<string, any> | undefined {
7+
): EchoResponse['searchParams'] {
88
const searchParams = {};
99

1010
for (const [k, v] of params) {

clients/algoliasearch-client-javascript/utils/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ export type Response = {
4343
status: number;
4444
};
4545

46-
export type EchoResponse = Omit<Request, 'data'> & {
46+
export type EchoResponse = Request & {
4747
connectTimeout: number;
4848
headers: Record<string, string>;
4949
responseTimeout: number;
50-
data?: Record<string, any>;
5150
searchParams?: Record<string, string>;
5251
userAgent?: string;
5352
};

0 commit comments

Comments
 (0)