@algolia/client-common 5.0.0-alpha.50 → 5.0.0-alpha.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/createEchoRequester.d.ts +1 -1
- package/dist/src/createEchoRequester.d.ts.map +1 -1
- package/dist/src/getAlgoliaAgent.d.ts +1 -1
- package/dist/src/getAlgoliaAgent.d.ts.map +1 -1
- package/dist/src/transporter/errors.d.ts +3 -3
- package/dist/src/transporter/errors.d.ts.map +1 -1
- package/dist/src/types/cache.d.ts +5 -5
- package/dist/src/types/cache.d.ts.map +1 -1
- package/dist/src/types/createClient.d.ts +4 -4
- package/dist/src/types/createClient.d.ts.map +1 -1
- package/dist/src/types/createIterablePromise.d.ts +2 -2
- package/dist/src/types/createIterablePromise.d.ts.map +1 -1
- package/dist/src/types/host.d.ts +2 -2
- package/dist/src/types/host.d.ts.map +1 -1
- package/dist/src/types/requester.d.ts +6 -6
- package/dist/src/types/requester.d.ts.map +1 -1
- package/dist/src/types/transporter.d.ts +9 -9
- package/dist/src/types/transporter.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEchoRequester.d.ts","sourceRoot":"","sources":["../../src/createEchoRequester.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4B,SAAS,EAAY,MAAM,SAAS,CAAC;AAE7E,
|
|
1
|
+
{"version":3,"file":"createEchoRequester.d.ts","sourceRoot":"","sources":["../../src/createEchoRequester.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4B,SAAS,EAAY,MAAM,SAAS,CAAC;AAE7E,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA2BF,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,MAAY,GACb,EAAE,mBAAmB,GAAG,SAAS,CAuBjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAlgoliaAgent.d.ts","sourceRoot":"","sources":["../../src/getAlgoliaAgent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEjE,
|
|
1
|
+
{"version":3,"file":"getAlgoliaAgent.d.ts","sourceRoot":"","sources":["../../src/getAlgoliaAgent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,EAAE,mBAAmB,EAAE,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,aAAa,EACb,MAAM,EACN,OAAO,GACR,EAAE,eAAe,GAAG,YAAY,CAWhC"}
|
|
@@ -18,16 +18,16 @@ export declare class DeserializationError extends AlgoliaError {
|
|
|
18
18
|
response: Response;
|
|
19
19
|
constructor(message: string, response: Response);
|
|
20
20
|
}
|
|
21
|
-
export
|
|
21
|
+
export type DetailedErrorWithMessage = {
|
|
22
22
|
message: string;
|
|
23
23
|
label: string;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type DetailedErrorWithTypeID = {
|
|
26
26
|
id: string;
|
|
27
27
|
type: string;
|
|
28
28
|
name?: string;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type DetailedError = {
|
|
31
31
|
code: string;
|
|
32
32
|
details?: DetailedErrorWithMessage[] | DetailedErrorWithTypeID[];
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/transporter/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UA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,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EAAE,EACxB,IAAI,SAAa;CAKpB;AAED,qBAAa,oBAAqB,SAAQ,YAAY;IACpD,QAAQ,EAAE,QAAQ,CAAC;gBAEP,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;CAIhD;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,wBAAwB,EAAE,GAAG,uBAAuB,EAAE,CAAC;CAClE,CAAC;AAGF,qBAAa,gBAAiB,SAAQ,QAAQ;IAC5C,KAAK,EAAE,aAAa,CAAC;gBAGnB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,aAAa,EACpB,UAAU,EAAE,UAAU,EAAE;CAK3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Cache = {
|
|
2
2
|
/**
|
|
3
3
|
* Gets the value of the given `key`.
|
|
4
4
|
*/
|
|
@@ -16,19 +16,19 @@ export declare type Cache = {
|
|
|
16
16
|
*/
|
|
17
17
|
clear: () => Promise<void>;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type CacheEvents<TValue> = {
|
|
20
20
|
/**
|
|
21
21
|
* The callback when the given `key` is missing from the cache.
|
|
22
22
|
*/
|
|
23
23
|
miss: (value: TValue) => Promise<any>;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type MemoryCacheOptions = {
|
|
26
26
|
/**
|
|
27
27
|
* If keys and values should be serialized using `JSON.stringify`.
|
|
28
28
|
*/
|
|
29
29
|
serializable?: boolean;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type BrowserLocalStorageOptions = {
|
|
32
32
|
/**
|
|
33
33
|
* The cache key.
|
|
34
34
|
*/
|
|
@@ -38,7 +38,7 @@ export declare type BrowserLocalStorageOptions = {
|
|
|
38
38
|
*/
|
|
39
39
|
localStorage?: Storage;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type FallbackableCacheOptions = {
|
|
42
42
|
/**
|
|
43
43
|
* List of caches order by priority.
|
|
44
44
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/types/cache.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/types/cache.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,GAAG,EAAE,CAAC,MAAM,EACV,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EACjC,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EACnC,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,KACzB,OAAO,CAAC,MAAM,CAAC,CAAC;IAErB;;OAEG;IACH,GAAG,EAAE,CAAC,MAAM,EACV,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,EACjC,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,MAAM,CAAC,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7D;;OAEG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,MAAM,IAAI;IAChC;;OAEG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { AlgoliaAgentOptions, TransporterOptions } from './transporter';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
export type AuthMode = 'WithinHeaders' | 'WithinQueryParameters';
|
|
3
|
+
type OverriddenTransporterOptions = 'baseHeaders' | 'baseQueryParameters' | 'hosts';
|
|
4
|
+
export type CreateClientOptions = Omit<TransporterOptions, OverriddenTransporterOptions | 'algoliaAgent'> & Partial<Pick<TransporterOptions, OverriddenTransporterOptions>> & {
|
|
5
5
|
appId: string;
|
|
6
6
|
apiKey: string;
|
|
7
7
|
authMode?: AuthMode;
|
|
8
8
|
algoliaAgents: AlgoliaAgentOptions[];
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type ClientOptions = Partial<Omit<CreateClientOptions, 'apiKey' | 'appId'>>;
|
|
11
11
|
export {};
|
|
12
12
|
//# sourceMappingURL=createClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createClient.d.ts","sourceRoot":"","sources":["../../../src/types/createClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE7E,
|
|
1
|
+
{"version":3,"file":"createClient.d.ts","sourceRoot":"","sources":["../../../src/types/createClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE7E,MAAM,MAAM,QAAQ,GAAG,eAAe,GAAG,uBAAuB,CAAC;AAEjE,KAAK,4BAA4B,GAC7B,aAAa,GACb,qBAAqB,GACrB,OAAO,CAAC;AAEZ,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,kBAAkB,EAClB,4BAA4B,GAAG,cAAc,CAC9C,GACC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,4BAA4B,CAAC,CAAC,GAAG;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,aAAa,EAAE,mBAAmB,EAAE,CAAC;CACtC,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,OAAO,CACjC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,OAAO,CAAC,CAC9C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type IterableOptions<TResponse> = Partial<{
|
|
2
2
|
/**
|
|
3
3
|
* The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
4
4
|
*/
|
|
@@ -21,7 +21,7 @@ export declare type IterableOptions<TResponse> = Partial<{
|
|
|
21
21
|
*/
|
|
22
22
|
timeout: () => number;
|
|
23
23
|
}>;
|
|
24
|
-
export
|
|
24
|
+
export type CreateIterablePromise<TResponse> = IterableOptions<TResponse> & {
|
|
25
25
|
/**
|
|
26
26
|
* The function to run, which returns a promise.
|
|
27
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIterablePromise.d.ts","sourceRoot":"","sources":["../../../src/types/createIterablePromise.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"createIterablePromise.d.ts","sourceRoot":"","sources":["../../../src/types/createIterablePromise.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,CAAC,SAAS,IAAI,OAAO,CAAC;IAC/C;;OAEG;IACH,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;IAE1C;;OAEG;IACH,KAAK,EAAE;QACL;;WAEG;QACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,OAAO,CAAC;QAE3C;;WAEG;QACH,OAAO,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,MAAM,CAAC;KAC1C,CAAC;IAEF;;OAEG;IACH,OAAO,EAAE,MAAM,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH,MAAM,MAAM,qBAAqB,CAAC,SAAS,IAAI,eAAe,CAAC,SAAS,CAAC,GAAG;IAC1E;;;;OAIG;IACH,IAAI,EAAE,CAAC,gBAAgB,CAAC,EAAE,SAAS,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IAE3D;;OAEG;IACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,OAAO,CAAC;CAC5C,CAAC"}
|
package/dist/src/types/host.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Host = {
|
|
2
2
|
/**
|
|
3
3
|
* The host URL.
|
|
4
4
|
*/
|
|
@@ -12,7 +12,7 @@ export declare type Host = {
|
|
|
12
12
|
*/
|
|
13
13
|
protocol: 'http' | 'https';
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type StatefulHost = Host & {
|
|
16
16
|
/**
|
|
17
17
|
* The status of the host.
|
|
18
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../src/types/host.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../src/types/host.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;IAEvC;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,OAAO,CAAC;CAC3B,CAAC"}
|
|
@@ -2,8 +2,8 @@ import type { Headers, QueryParameters } from './transporter';
|
|
|
2
2
|
/**
|
|
3
3
|
* The method of the request.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type Method = 'DELETE' | 'GET' | 'PATCH' | 'POST' | 'PUT';
|
|
6
|
+
export type Request = {
|
|
7
7
|
method: Method;
|
|
8
8
|
/**
|
|
9
9
|
* The path of the REST API to send the request to.
|
|
@@ -23,7 +23,7 @@ export declare type Request = {
|
|
|
23
23
|
*/
|
|
24
24
|
useReadTransporter?: boolean;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type EndRequest = Pick<Request, 'headers' | 'method'> & {
|
|
27
27
|
/**
|
|
28
28
|
* The full URL of the REST API.
|
|
29
29
|
*/
|
|
@@ -38,7 +38,7 @@ export declare type EndRequest = Pick<Request, 'headers' | 'method'> & {
|
|
|
38
38
|
responseTimeout: number;
|
|
39
39
|
data?: string;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type Response = {
|
|
42
42
|
/**
|
|
43
43
|
* The body of the response.
|
|
44
44
|
*/
|
|
@@ -52,13 +52,13 @@ export declare type Response = {
|
|
|
52
52
|
*/
|
|
53
53
|
status: number;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type Requester = {
|
|
56
56
|
/**
|
|
57
57
|
* Sends the given `request` to the server.
|
|
58
58
|
*/
|
|
59
59
|
send: (request: EndRequest) => Promise<Response>;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
61
|
+
export type EchoResponse = Omit<EndRequest, 'data'> & Pick<Request, 'data' | 'path'> & {
|
|
62
62
|
host: string;
|
|
63
63
|
algoliaAgent: string;
|
|
64
64
|
searchParams?: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requester.d.ts","sourceRoot":"","sources":["../../../src/types/requester.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE9D;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"requester.d.ts","sourceRoot":"","sources":["../../../src/types/requester.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAEjE,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,eAAe,CAAC;IACjC,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,QAAQ,CAAC,GAAG;IAC7D;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,GACjD,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Cache } from './cache';
|
|
2
2
|
import type { Host } from './host';
|
|
3
3
|
import type { Request, Requester, EndRequest, Response } from './requester';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type Headers = Record<string, string>;
|
|
5
|
+
export type QueryParameters = Record<string, any>;
|
|
6
|
+
export type RequestOptions = Pick<Request, 'cacheable'> & {
|
|
7
7
|
/**
|
|
8
8
|
* Custom timeout for the request. Note that, in normal situations
|
|
9
9
|
* the given timeout will be applied. But the transporter layer may
|
|
@@ -26,13 +26,13 @@ export declare type RequestOptions = Pick<Request, 'cacheable'> & {
|
|
|
26
26
|
*/
|
|
27
27
|
data?: Array<Record<string, any>> | Record<string, any>;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type StackFrame = {
|
|
30
30
|
request: EndRequest;
|
|
31
31
|
response: Response;
|
|
32
32
|
host: Host;
|
|
33
33
|
triesLeft: number;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type AlgoliaAgentOptions = {
|
|
36
36
|
/**
|
|
37
37
|
* The segment. Usually the integration name.
|
|
38
38
|
*/
|
|
@@ -42,7 +42,7 @@ export declare type AlgoliaAgentOptions = {
|
|
|
42
42
|
*/
|
|
43
43
|
version?: string;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type AlgoliaAgent = {
|
|
46
46
|
/**
|
|
47
47
|
* The raw value of the user agent.
|
|
48
48
|
*/
|
|
@@ -52,7 +52,7 @@ export declare type AlgoliaAgent = {
|
|
|
52
52
|
*/
|
|
53
53
|
add: (options: AlgoliaAgentOptions) => AlgoliaAgent;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type Timeouts = {
|
|
56
56
|
/**
|
|
57
57
|
* Timeout in milliseconds before the connection is established.
|
|
58
58
|
*/
|
|
@@ -66,7 +66,7 @@ export declare type Timeouts = {
|
|
|
66
66
|
*/
|
|
67
67
|
write: number;
|
|
68
68
|
};
|
|
69
|
-
export
|
|
69
|
+
export type TransporterOptions = {
|
|
70
70
|
/**
|
|
71
71
|
* The cache of the hosts. Usually used to persist
|
|
72
72
|
* the state of the host when its down.
|
|
@@ -118,7 +118,7 @@ export declare type TransporterOptions = {
|
|
|
118
118
|
*/
|
|
119
119
|
algoliaAgent: AlgoliaAgent;
|
|
120
120
|
};
|
|
121
|
-
export
|
|
121
|
+
export type Transporter = TransporterOptions & {
|
|
122
122
|
/**
|
|
123
123
|
* Performs a request.
|
|
124
124
|
* The `baseRequest` and `baseRequestOptions` will be merged accordingly.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transporter.d.ts","sourceRoot":"","sources":["../../../src/types/transporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5E,
|
|
1
|
+
{"version":3,"file":"transporter.d.ts","sourceRoot":"","sources":["../../../src/types/transporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5E,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,GAAG;IACxD;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBA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-alpha.52",
|
|
4
4
|
"description": "Common package for the Algolia JavaScript API client.",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"test": "jest"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@types/jest": "
|
|
23
|
-
"@types/node": "
|
|
22
|
+
"@types/jest": "29.4.0",
|
|
23
|
+
"@types/node": "18.14.2",
|
|
24
24
|
"jest": "29.4.3",
|
|
25
25
|
"jest-environment-jsdom": "29.4.3",
|
|
26
|
-
"ts-jest": "
|
|
27
|
-
"typescript": "4.
|
|
26
|
+
"ts-jest": "29.0.5",
|
|
27
|
+
"typescript": "4.9.5"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">= 14.0.0"
|