@algolia/client-common 4.14.2 → 5.0.0-alpha.3

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.
Files changed (89) hide show
  1. package/dist/client-common.cjs.js +803 -91
  2. package/dist/client-common.esm.node.js +774 -0
  3. package/dist/index.d.ts +10 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/src/cache/createBrowserLocalStorageCache.d.ts +3 -0
  6. package/dist/src/cache/createBrowserLocalStorageCache.d.ts.map +1 -0
  7. package/dist/src/cache/createFallbackableCache.d.ts +3 -0
  8. package/dist/src/cache/createFallbackableCache.d.ts.map +1 -0
  9. package/dist/src/cache/createMemoryCache.d.ts +3 -0
  10. package/dist/src/cache/createMemoryCache.d.ts.map +1 -0
  11. package/dist/src/cache/createNullCache.d.ts +3 -0
  12. package/dist/src/cache/createNullCache.d.ts.map +1 -0
  13. package/dist/src/cache/index.d.ts +5 -0
  14. package/dist/src/cache/index.d.ts.map +1 -0
  15. package/dist/src/constants.d.ts +7 -0
  16. package/dist/src/constants.d.ts.map +1 -0
  17. package/dist/src/createAlgoliaAgent.d.ts +3 -0
  18. package/dist/src/createAlgoliaAgent.d.ts.map +1 -0
  19. package/dist/src/createAuth.d.ts +6 -0
  20. package/dist/src/createAuth.d.ts.map +1 -0
  21. package/dist/src/createEchoRequester.d.ts +7 -0
  22. package/dist/src/createEchoRequester.d.ts.map +1 -0
  23. package/dist/src/createRetryablePromise.d.ts +14 -0
  24. package/dist/src/createRetryablePromise.d.ts.map +1 -0
  25. package/dist/src/getAlgoliaAgent.d.ts +8 -0
  26. package/dist/src/getAlgoliaAgent.d.ts.map +1 -0
  27. package/dist/src/transporter/createStatefulHost.d.ts +3 -0
  28. package/dist/src/transporter/createStatefulHost.d.ts.map +1 -0
  29. package/dist/src/transporter/createTransporter.d.ts +3 -0
  30. package/dist/src/transporter/createTransporter.d.ts.map +1 -0
  31. package/dist/src/transporter/errors.d.ts +21 -0
  32. package/dist/src/transporter/errors.d.ts.map +1 -0
  33. package/dist/src/transporter/helpers.d.ts +9 -0
  34. package/dist/src/transporter/helpers.d.ts.map +1 -0
  35. package/dist/src/transporter/index.d.ts +7 -0
  36. package/dist/src/transporter/index.d.ts.map +1 -0
  37. package/dist/src/transporter/responses.d.ts +5 -0
  38. package/dist/src/transporter/responses.d.ts.map +1 -0
  39. package/dist/src/transporter/stackTrace.d.ts +4 -0
  40. package/dist/src/transporter/stackTrace.d.ts.map +1 -0
  41. package/dist/src/types/Cache.d.ts +47 -0
  42. package/dist/src/types/Cache.d.ts.map +1 -0
  43. package/dist/src/types/CreateClient.d.ts +12 -0
  44. package/dist/src/types/CreateClient.d.ts.map +1 -0
  45. package/dist/src/types/CreateRetryablePromise.d.ts +19 -0
  46. package/dist/src/types/CreateRetryablePromise.d.ts.map +1 -0
  47. package/dist/src/types/Host.d.ts +33 -0
  48. package/dist/src/types/Host.d.ts.map +1 -0
  49. package/dist/src/types/Requester.d.ts +66 -0
  50. package/dist/src/types/Requester.d.ts.map +1 -0
  51. package/dist/src/types/Transporter.d.ts +128 -0
  52. package/dist/src/types/Transporter.d.ts.map +1 -0
  53. package/dist/src/types/index.d.ts +7 -0
  54. package/dist/src/types/index.d.ts.map +1 -0
  55. package/index.ts +9 -0
  56. package/package.json +24 -15
  57. package/src/__tests__/cache/browser-local-storage-cache.test.ts +134 -0
  58. package/src/__tests__/cache/fallbackable-cache.test.ts +126 -0
  59. package/src/__tests__/cache/memory-cache.test.ts +90 -0
  60. package/src/__tests__/cache/null-cache.test.ts +49 -0
  61. package/src/__tests__/create-retryable-promise.test.ts +86 -0
  62. package/src/cache/createBrowserLocalStorageCache.ts +74 -0
  63. package/src/cache/createFallbackableCache.ts +53 -0
  64. package/src/cache/createMemoryCache.ts +56 -0
  65. package/src/cache/createNullCache.ts +34 -0
  66. package/src/cache/index.ts +4 -0
  67. package/src/constants.ts +7 -0
  68. package/src/createAlgoliaAgent.ts +20 -0
  69. package/src/createAuth.ts +25 -0
  70. package/src/createEchoRequester.ts +59 -0
  71. package/src/createRetryablePromise.ts +52 -0
  72. package/src/getAlgoliaAgent.ts +25 -0
  73. package/src/transporter/createStatefulHost.ts +24 -0
  74. package/src/transporter/createTransporter.ts +347 -0
  75. package/src/transporter/errors.ts +51 -0
  76. package/src/transporter/helpers.ts +119 -0
  77. package/src/transporter/index.ts +6 -0
  78. package/src/transporter/responses.ts +23 -0
  79. package/src/transporter/stackTrace.ts +30 -0
  80. package/src/types/Cache.ts +61 -0
  81. package/src/types/CreateClient.ts +23 -0
  82. package/src/types/CreateRetryablePromise.ts +21 -0
  83. package/src/types/Host.ts +38 -0
  84. package/src/types/Requester.ts +72 -0
  85. package/src/types/Transporter.ts +153 -0
  86. package/src/types/index.ts +6 -0
  87. package/dist/client-common.d.ts +0 -102
  88. package/dist/client-common.esm.js +0 -89
  89. package/index.js +0 -2
@@ -0,0 +1,10 @@
1
+ export * from './src/createAuth';
2
+ export * from './src/createEchoRequester';
3
+ export * from './src/createRetryablePromise';
4
+ export * from './src/cache';
5
+ export * from './src/transporter';
6
+ export * from './src/createAlgoliaAgent';
7
+ export * from './src/getAlgoliaAgent';
8
+ export * from './src/types';
9
+ export * from './src/constants';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { BrowserLocalStorageOptions, Cache } from '../types';
2
+ export declare function createBrowserLocalStorageCache(options: BrowserLocalStorageOptions): Cache;
3
+ //# sourceMappingURL=createBrowserLocalStorageCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createBrowserLocalStorageCache.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/cache/createBrowserLocalStorageCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAe,MAAM,UAAU,CAAC;AAE/E,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,0BAA0B,GAClC,KAAK,CAqEP"}
@@ -0,0 +1,3 @@
1
+ import type { FallbackableCacheOptions, Cache } from '../types';
2
+ export declare function createFallbackableCache(options: FallbackableCacheOptions): Cache;
3
+ //# sourceMappingURL=createFallbackableCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFallbackableCache.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/cache/createFallbackableCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,KAAK,EAAe,MAAM,UAAU,CAAC;AAI7E,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,wBAAwB,GAChC,KAAK,CA8CP"}
@@ -0,0 +1,3 @@
1
+ import type { Cache, MemoryCacheOptions } from '../types';
2
+ export declare function createMemoryCache(options?: MemoryCacheOptions): Cache;
3
+ //# sourceMappingURL=createMemoryCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createMemoryCache.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/cache/createMemoryCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAe,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEvE,wBAAgB,iBAAiB,CAC/B,OAAO,GAAE,kBAA2C,GACnD,KAAK,CAmDP"}
@@ -0,0 +1,3 @@
1
+ import type { Cache } from '../types';
2
+ export declare function createNullCache(): Cache;
3
+ //# sourceMappingURL=createNullCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createNullCache.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/cache/createNullCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,UAAU,CAAC;AAEnD,wBAAgB,eAAe,IAAI,KAAK,CA+BvC"}
@@ -0,0 +1,5 @@
1
+ export * from './createBrowserLocalStorageCache';
2
+ export * from './createFallbackableCache';
3
+ export * from './createMemoryCache';
4
+ export * from './createNullCache';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/cache/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const DEFAULT_CONNECT_TIMEOUT_BROWSER = 1000;
2
+ export declare const DEFAULT_READ_TIMEOUT_BROWSER = 2000;
3
+ export declare const DEFAULT_WRITE_TIMEOUT_BROWSER = 30000;
4
+ export declare const DEFAULT_CONNECT_TIMEOUT_NODE = 2000;
5
+ export declare const DEFAULT_READ_TIMEOUT_NODE = 5000;
6
+ export declare const DEFAULT_WRITE_TIMEOUT_NODE = 30000;
7
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../packages/client-common/src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,OAAO,CAAC;AACpD,eAAO,MAAM,4BAA4B,OAAO,CAAC;AACjD,eAAO,MAAM,6BAA6B,QAAQ,CAAC;AAEnD,eAAO,MAAM,4BAA4B,OAAO,CAAC;AACjD,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,0BAA0B,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AlgoliaAgent } from './types';
2
+ export declare function createAlgoliaAgent(version: string): AlgoliaAgent;
3
+ //# sourceMappingURL=createAlgoliaAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAlgoliaAgent.d.ts","sourceRoot":"","sources":["../../../../packages/client-common/src/createAlgoliaAgent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,YAAY,EAAE,MAAM,SAAS,CAAC;AAEjE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAiBhE"}
@@ -0,0 +1,6 @@
1
+ import type { AuthMode, Headers, QueryParameters } from './types';
2
+ export declare function createAuth(appId: string, apiKey: string, authMode?: AuthMode): {
3
+ readonly headers: () => Headers;
4
+ readonly queryParameters: () => QueryParameters;
5
+ };
6
+ //# sourceMappingURL=createAuth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAuth.d.ts","sourceRoot":"","sources":["../../../../packages/client-common/src/createAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAElE,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,GAAE,QAA0B,GACnC;IACD,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,eAAe,CAAC;CACjD,CAeA"}
@@ -0,0 +1,7 @@
1
+ import type { Requester } from './types';
2
+ export declare type EchoRequesterParams = {
3
+ getURL: (url: string) => URL;
4
+ status?: number;
5
+ };
6
+ export declare function createEchoRequester({ getURL, status, }: EchoRequesterParams): Requester;
7
+ //# sourceMappingURL=createEchoRequester.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createEchoRequester.d.ts","sourceRoot":"","sources":["../../../../packages/client-common/src/createEchoRequester.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4B,SAAS,EAAY,MAAM,SAAS,CAAC;AAE7E,oBAAY,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"}
@@ -0,0 +1,14 @@
1
+ import type { CreateRetryablePromiseOptions } from './types/CreateRetryablePromise';
2
+ export declare const DEFAULT_MAX_RETRIES = 50;
3
+ export declare const DEFAULT_TIMEOUT: (retryCount: number) => number;
4
+ /**
5
+ * Return a promise that retry a task until it meets the condition.
6
+ *
7
+ * @param createRetryablePromiseOptions - The createRetryablePromise options.
8
+ * @param createRetryablePromiseOptions.func - The function to run, which returns a promise.
9
+ * @param createRetryablePromiseOptions.validate - The validator function. It receives the resolved return of `func`.
10
+ * @param createRetryablePromiseOptions.maxRetries - The maximum number of retries. 50 by default.
11
+ * @param createRetryablePromiseOptions.timeout - The function to decide how long to wait between retries.
12
+ */
13
+ export declare function createRetryablePromise<TResponse>({ func, validate, maxRetries, timeout, }: CreateRetryablePromiseOptions<TResponse>): Promise<TResponse>;
14
+ //# sourceMappingURL=createRetryablePromise.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRetryablePromise.d.ts","sourceRoot":"","sources":["../../../../packages/client-common/src/createRetryablePromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAEpF,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,eAAe,eAAgB,MAAM,KAAG,MACnB,CAAC;AAEnC;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,EAChD,IAAI,EACJ,QAAQ,EACR,UAAgC,EAChC,OAAyB,GAC1B,EAAE,6BAA6B,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,CA+B/D"}
@@ -0,0 +1,8 @@
1
+ import type { AlgoliaAgentOptions, AlgoliaAgent } from './types';
2
+ export declare type GetAlgoliaAgent = {
3
+ algoliaAgents: AlgoliaAgentOptions[];
4
+ client: string;
5
+ version: string;
6
+ };
7
+ export declare function getAlgoliaAgent({ algoliaAgents, client, version, }: GetAlgoliaAgent): AlgoliaAgent;
8
+ //# sourceMappingURL=getAlgoliaAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAlgoliaAgent.d.ts","sourceRoot":"","sources":["../../../../packages/client-common/src/getAlgoliaAgent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEjE,oBAAY,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"}
@@ -0,0 +1,3 @@
1
+ import type { Host, StatefulHost } from '../types';
2
+ export declare function createStatefulHost(host: Host, status?: StatefulHost['status']): StatefulHost;
3
+ //# sourceMappingURL=createStatefulHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createStatefulHost.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/transporter/createStatefulHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAMnD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,MAAM,GAAE,YAAY,CAAC,QAAQ,CAAQ,GACpC,YAAY,CAcd"}
@@ -0,0 +1,3 @@
1
+ import type { TransporterOptions, Transporter } from '../types';
2
+ export declare function createTransporter({ hosts, hostsCache, baseHeaders, baseQueryParameters, algoliaAgent, timeouts, requester, requestsCache, responsesCache, }: TransporterOptions): Transporter;
3
+ //# sourceMappingURL=createTransporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTransporter.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/transporter/createTransporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOV,kBAAkB,EAClB,WAAW,EAEZ,MAAM,UAAU,CAAC;AAsBlB,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,GACf,EAAE,kBAAkB,GAAG,WAAW,CAgTlC"}
@@ -0,0 +1,21 @@
1
+ import type { Response, StackFrame } from '../types';
2
+ export declare class AlgoliaError extends Error {
3
+ name: string;
4
+ constructor(message: string, name: string);
5
+ }
6
+ export declare class ErrorWithStackTrace extends AlgoliaError {
7
+ stackTrace: StackFrame[];
8
+ constructor(message: string, stackTrace: StackFrame[], name: string);
9
+ }
10
+ export declare class RetryError extends ErrorWithStackTrace {
11
+ constructor(stackTrace: StackFrame[]);
12
+ }
13
+ export declare class ApiError extends ErrorWithStackTrace {
14
+ status: number;
15
+ constructor(message: string, status: number, stackTrace: StackFrame[]);
16
+ }
17
+ export declare class DeserializationError extends AlgoliaError {
18
+ response: Response;
19
+ constructor(message: string, response: Response);
20
+ }
21
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/transporter/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAErD,qBAAa,YAAa,SAAQ,KAAK;IACrC,IAAI,EAAE,MAAM,CAAkB;gBAElB,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAO1C;AAED,qBAAa,mBAAoB,SAAQ,YAAY;IACnD,UAAU,EAAE,UAAU,EAAE,CAAC;gBAEb,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM;CAKpE;AAED,qBAAa,UAAW,SAAQ,mBAAmB;gBACrC,UAAU,EAAE,UAAU,EAAE;CAOrC;AAED,qBAAa,QAAS,SAAQ,mBAAmB;IAC/C,MAAM,EAAE,MAAM,CAAC;gBAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE;CAItE;AAED,qBAAa,oBAAqB,SAAQ,YAAY;IACpD,QAAQ,EAAE,QAAQ,CAAC;gBAEP,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;CAIhD"}
@@ -0,0 +1,9 @@
1
+ import type { Headers, Host, QueryParameters, Request, RequestOptions, Response, StackFrame } from '../types';
2
+ export declare function shuffle<TData>(array: TData[]): TData[];
3
+ export declare function serializeUrl(host: Host, path: string, queryParameters: QueryParameters): string;
4
+ export declare function serializeQueryParameters(parameters: QueryParameters): string;
5
+ export declare function serializeData(request: Request, requestOptions: RequestOptions): string | undefined;
6
+ export declare function serializeHeaders(baseHeaders: Headers, requestHeaders: Headers, requestOptionsHeaders?: Headers): Headers;
7
+ export declare function deserializeSuccess<TObject>(response: Response): TObject;
8
+ export declare function deserializeFailure({ content, status }: Response, stackFrame: StackFrame[]): Error;
9
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/transporter/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,IAAI,EACJ,eAAe,EACf,OAAO,EACP,cAAc,EACd,QAAQ,EACR,UAAU,EACX,MAAM,UAAU,CAAC;AAIlB,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAYtD;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,eAAe,GAC/B,MAAM,CAWR;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,eAAe,GAAG,MAAM,CAe5E;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,GAC7B,MAAM,GAAG,SAAS,CAapB;AAED,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,OAAO,EACpB,cAAc,EAAE,OAAO,EACvB,qBAAqB,CAAC,EAAE,OAAO,GAC9B,OAAO,CAeT;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAMvE;AAED,wBAAgB,kBAAkB,CAChC,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAC7B,UAAU,EAAE,UAAU,EAAE,GACvB,KAAK,CAQP"}
@@ -0,0 +1,7 @@
1
+ export * from './createTransporter';
2
+ export * from './createStatefulHost';
3
+ export * from './errors';
4
+ export * from './helpers';
5
+ export * from './responses';
6
+ export * from './stackTrace';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/transporter/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Response } from '../types';
2
+ export declare function isNetworkError({ isTimedOut, status, }: Omit<Response, 'content'>): boolean;
3
+ export declare function isRetryable({ isTimedOut, status, }: Omit<Response, 'content'>): boolean;
4
+ export declare function isSuccess({ status }: Pick<Response, 'status'>): boolean;
5
+ //# sourceMappingURL=responses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/transporter/responses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,MAAM,GACP,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,OAAO,CAErC;AAED,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,MAAM,GACP,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,OAAO,CAMrC;AAED,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,OAAO,CAEvE"}
@@ -0,0 +1,4 @@
1
+ import type { StackFrame } from '../types';
2
+ export declare function stackTraceWithoutCredentials(stackTrace: StackFrame[]): StackFrame[];
3
+ export declare function stackFrameWithoutCredentials(stackFrame: StackFrame): StackFrame;
4
+ //# sourceMappingURL=stackTrace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stackTrace.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/transporter/stackTrace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,UAAU,EAAE,MAAM,UAAU,CAAC;AAEpD,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,UAAU,EAAE,GACvB,UAAU,EAAE,CAId;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,UAAU,GACrB,UAAU,CAiBZ"}
@@ -0,0 +1,47 @@
1
+ export declare type Cache = {
2
+ /**
3
+ * Gets the value of the given `key`.
4
+ */
5
+ get: <TValue>(key: Record<string, any> | string, defaultValue: () => Promise<TValue>, events?: CacheEvents<TValue>) => Promise<TValue>;
6
+ /**
7
+ * Sets the given value with the given `key`.
8
+ */
9
+ set: <TValue>(key: Record<string, any> | string, value: TValue) => Promise<TValue>;
10
+ /**
11
+ * Deletes the given `key`.
12
+ */
13
+ delete: (key: Record<string, any> | string) => Promise<void>;
14
+ /**
15
+ * Clears the cache.
16
+ */
17
+ clear: () => Promise<void>;
18
+ };
19
+ export declare type CacheEvents<TValue> = {
20
+ /**
21
+ * The callback when the given `key` is missing from the cache.
22
+ */
23
+ miss: (value: TValue) => Promise<any>;
24
+ };
25
+ export declare type MemoryCacheOptions = {
26
+ /**
27
+ * If keys and values should be serialized using `JSON.stringify`.
28
+ */
29
+ serializable?: boolean;
30
+ };
31
+ export declare type BrowserLocalStorageOptions = {
32
+ /**
33
+ * The cache key.
34
+ */
35
+ key: string;
36
+ /**
37
+ * The native local storage implementation.
38
+ */
39
+ localStorage?: Storage;
40
+ };
41
+ export declare type FallbackableCacheOptions = {
42
+ /**
43
+ * List of caches order by priority.
44
+ */
45
+ caches: Cache[];
46
+ };
47
+ //# sourceMappingURL=Cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/types/Cache.ts"],"names":[],"mappings":"AAAA,oBAAY,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,oBAAY,WAAW,CAAC,MAAM,IAAI;IAChC;;OAEG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CACvC,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,oBAAY,0BAA0B,GAAG;IACvC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,oBAAY,wBAAwB,GAAG;IACrC;;OAEG;IACH,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { AlgoliaAgentOptions, TransporterOptions } from './Transporter';
2
+ export declare type AuthMode = 'WithinHeaders' | 'WithinQueryParameters';
3
+ declare type OverriddenTransporterOptions = 'baseHeaders' | 'baseQueryParameters' | 'hosts';
4
+ export declare type CreateClientOptions = Omit<TransporterOptions, OverriddenTransporterOptions | 'algoliaAgent'> & Partial<Pick<TransporterOptions, OverriddenTransporterOptions>> & {
5
+ appId: string;
6
+ apiKey: string;
7
+ authMode?: AuthMode;
8
+ algoliaAgents: AlgoliaAgentOptions[];
9
+ };
10
+ export declare type ClientOptions = Partial<Omit<CreateClientOptions, 'apiKey' | 'appId'>>;
11
+ export {};
12
+ //# sourceMappingURL=CreateClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateClient.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/types/CreateClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE7E,oBAAY,QAAQ,GAAG,eAAe,GAAG,uBAAuB,CAAC;AAEjE,aAAK,4BAA4B,GAC7B,aAAa,GACb,qBAAqB,GACrB,OAAO,CAAC;AAEZ,oBAAY,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,oBAAY,aAAa,GAAG,OAAO,CACjC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,OAAO,CAAC,CAC9C,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare type CreateRetryablePromiseOptions<TResponse> = {
2
+ /**
3
+ * The function to run, which returns a promise.
4
+ */
5
+ func: () => Promise<TResponse>;
6
+ /**
7
+ * The validator function. It receives the resolved return of `func`.
8
+ */
9
+ validate: (response: TResponse) => boolean;
10
+ /**
11
+ * The maximum number of retry. 50 by default.
12
+ */
13
+ maxRetries?: number;
14
+ /**
15
+ * The function to decide how long to wait between retries.
16
+ */
17
+ timeout?: (retryCount: number) => number;
18
+ };
19
+ //# sourceMappingURL=CreateRetryablePromise.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateRetryablePromise.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/types/CreateRetryablePromise.ts"],"names":[],"mappings":"AAAA,oBAAY,6BAA6B,CAAC,SAAS,IAAI;IACrD;;OAEG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;IAE/B;;OAEG;IACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,OAAO,CAAC;IAE3C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;CAC1C,CAAC"}
@@ -0,0 +1,33 @@
1
+ export declare type Host = {
2
+ /**
3
+ * The host URL.
4
+ */
5
+ url: string;
6
+ /**
7
+ * The accepted transporter.
8
+ */
9
+ accept: 'read' | 'readWrite' | 'write';
10
+ /**
11
+ * The protocol of the host URL.
12
+ */
13
+ protocol: 'http' | 'https';
14
+ };
15
+ export declare type StatefulHost = Host & {
16
+ /**
17
+ * The status of the host.
18
+ */
19
+ status: 'down' | 'timed out' | 'up';
20
+ /**
21
+ * The last update of the host status, used to compare with the expiration delay.
22
+ */
23
+ lastUpdate: number;
24
+ /**
25
+ * Returns whether the host is up or not.
26
+ */
27
+ isUp: () => boolean;
28
+ /**
29
+ * Returns whether the host is timed out or not.
30
+ */
31
+ isTimedOut: () => boolean;
32
+ };
33
+ //# sourceMappingURL=Host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Host.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/types/Host.ts"],"names":[],"mappings":"AAAA,oBAAY,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,oBAAY,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"}
@@ -0,0 +1,66 @@
1
+ import type { Headers, QueryParameters } from './Transporter';
2
+ /**
3
+ * The method of the request.
4
+ */
5
+ export declare type Method = 'DELETE' | 'GET' | 'PATCH' | 'POST' | 'PUT';
6
+ export declare type Request = {
7
+ method: Method;
8
+ /**
9
+ * The path of the REST API to send the request to.
10
+ */
11
+ path: string;
12
+ queryParameters: QueryParameters;
13
+ data?: Array<Record<string, any>> | Record<string, any>;
14
+ headers: Headers;
15
+ /**
16
+ * If the given request should persist on the cache. Keep in mind,
17
+ * that some methods may have this option enabled by default.
18
+ */
19
+ cacheable?: boolean;
20
+ /**
21
+ * Some POST methods in the Algolia REST API uses the `read` transporter.
22
+ * This information is defined at the spec level.
23
+ */
24
+ useReadTransporter?: boolean;
25
+ };
26
+ export declare type EndRequest = Pick<Request, 'headers' | 'method'> & {
27
+ /**
28
+ * The full URL of the REST API.
29
+ */
30
+ url: string;
31
+ /**
32
+ * The connection timeout, in milliseconds.
33
+ */
34
+ connectTimeout: number;
35
+ /**
36
+ * The response timeout, in milliseconds.
37
+ */
38
+ responseTimeout: number;
39
+ data?: string;
40
+ };
41
+ export declare type Response = {
42
+ /**
43
+ * The body of the response.
44
+ */
45
+ content: string;
46
+ /**
47
+ * Whether the API call is timed out or not.
48
+ */
49
+ isTimedOut: boolean;
50
+ /**
51
+ * The HTTP status code of the response.
52
+ */
53
+ status: number;
54
+ };
55
+ export declare type Requester = {
56
+ /**
57
+ * Sends the given `request` to the server.
58
+ */
59
+ send: (request: EndRequest) => Promise<Response>;
60
+ };
61
+ export declare type EchoResponse = Omit<EndRequest, 'data'> & Pick<Request, 'data' | 'path'> & {
62
+ host: string;
63
+ algoliaAgent: string;
64
+ searchParams?: Record<string, string>;
65
+ };
66
+ //# sourceMappingURL=Requester.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Requester.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/types/Requester.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAE9D;;GAEG;AACH,oBAAY,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAEjE,oBAAY,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,oBAAY,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,oBAAY,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,oBAAY,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CAClD,CAAC;AAEF,oBAAY,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"}
@@ -0,0 +1,128 @@
1
+ import type { Cache } from './Cache';
2
+ import type { Host } from './Host';
3
+ import type { Request, Requester, EndRequest, Response } from './Requester';
4
+ export declare type Headers = Record<string, string>;
5
+ export declare type QueryParameters = Record<string, any>;
6
+ export declare type RequestOptions = Pick<Request, 'cacheable'> & {
7
+ /**
8
+ * Custom timeout for the request. Note that, in normal situations
9
+ * the given timeout will be applied. But the transporter layer may
10
+ * increase this timeout if there is need for it.
11
+ */
12
+ timeout?: number;
13
+ /**
14
+ * Custom headers for the request. This headers are
15
+ * going to be merged the transporter headers.
16
+ */
17
+ headers?: Headers;
18
+ /**
19
+ * Custom query parameters for the request. This query parameters are
20
+ * going to be merged the transporter query parameters.
21
+ */
22
+ queryParameters?: QueryParameters;
23
+ /**
24
+ * Custom data for the request. This data is
25
+ * going to be merged the transporter data.
26
+ */
27
+ data?: Array<Record<string, any>> | Record<string, any>;
28
+ };
29
+ export declare type StackFrame = {
30
+ request: EndRequest;
31
+ response: Response;
32
+ host: Host;
33
+ triesLeft: number;
34
+ };
35
+ export declare type AlgoliaAgentOptions = {
36
+ /**
37
+ * The segment. Usually the integration name.
38
+ */
39
+ segment: string;
40
+ /**
41
+ * The version. Usually the integration version.
42
+ */
43
+ version?: string;
44
+ };
45
+ export declare type AlgoliaAgent = {
46
+ /**
47
+ * The raw value of the user agent.
48
+ */
49
+ value: string;
50
+ /**
51
+ * Mutates the current user agent adding the given user agent options.
52
+ */
53
+ add: (options: AlgoliaAgentOptions) => AlgoliaAgent;
54
+ };
55
+ export declare type Timeouts = {
56
+ /**
57
+ * Timeout in milliseconds before the connection is established.
58
+ */
59
+ connect: number;
60
+ /**
61
+ * Timeout in milliseconds before reading the response on a read request.
62
+ */
63
+ read: number;
64
+ /**
65
+ * Timeout in milliseconds before reading the response on a write request.
66
+ */
67
+ write: number;
68
+ };
69
+ export declare type TransporterOptions = {
70
+ /**
71
+ * The cache of the hosts. Usually used to persist
72
+ * the state of the host when its down.
73
+ */
74
+ hostsCache: Cache;
75
+ /**
76
+ * The underlying requester used. Should differ
77
+ * depending of the environment where the client
78
+ * will be used.
79
+ */
80
+ requester: Requester;
81
+ /**
82
+ * The cache of the requests. When requests are
83
+ * `cacheable`, the returned promised persists
84
+ * in this cache to shared in similar requests
85
+ * before being resolved.
86
+ */
87
+ requestsCache: Cache;
88
+ /**
89
+ * The cache of the responses. When requests are
90
+ * `cacheable`, the returned responses persists
91
+ * in this cache to shared in similar requests.
92
+ */
93
+ responsesCache: Cache;
94
+ /**
95
+ * The timeouts used by the requester. The transporter
96
+ * layer may increase this timeouts as defined on the
97
+ * retry strategy.
98
+ */
99
+ timeouts: Timeouts;
100
+ /**
101
+ * The hosts used by the requester.
102
+ */
103
+ hosts: Host[];
104
+ /**
105
+ * The headers used by the requester. The transporter
106
+ * layer may add some extra headers during the request
107
+ * for the user agent, and others.
108
+ */
109
+ baseHeaders: Headers;
110
+ /**
111
+ * The query parameters used by the requester. The transporter
112
+ * layer may add some extra headers during the request
113
+ * for the user agent, and others.
114
+ */
115
+ baseQueryParameters: QueryParameters;
116
+ /**
117
+ * The user agent used. Sent on query parameters.
118
+ */
119
+ algoliaAgent: AlgoliaAgent;
120
+ };
121
+ export declare type Transporter = TransporterOptions & {
122
+ /**
123
+ * Performs a request.
124
+ * The `baseRequest` and `baseRequestOptions` will be merged accordingly.
125
+ */
126
+ request: <TResponse>(baseRequest: Request, baseRequestOptions?: RequestOptions) => Promise<TResponse>;
127
+ };
128
+ //# sourceMappingURL=Transporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Transporter.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/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,oBAAY,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,oBAAY,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAElD,oBAAY,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,oBAAY,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,oBAAY,mBAAmB,GAAG;IAChC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,GAAG,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,YAAY,CAAC;CACrD,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,UAAU,EAAE,KAAK,CAAC;IAElB;;;;OAIG;IACH,SAAS,EAAE,SAAS,CAAC;IAErB;;;;;OAKG;IACH,aAAa,EAAE,KAAK,CAAC;IAErB;;;;OAIG;IACH,cAAc,EAAE,KAAK,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,EAAE,QAAQ,CAAC;IAEnB;;OAEG;IACH,KAAK,EAAE,IAAI,EAAE,CAAC;IAEd;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,mBAAmB,EAAE,eAAe,CAAC;IAErC;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,oBAAY,WAAW,GAAG,kBAAkB,GAAG;IAC7C;;;OAGG;IACH,OAAO,EAAE,CAAC,SAAS,EACjB,WAAW,EAAE,OAAO,EACpB,kBAAkB,CAAC,EAAE,cAAc,KAChC,OAAO,CAAC,SAAS,CAAC,CAAC;CACzB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from './Cache';
2
+ export * from './CreateClient';
3
+ export * from './CreateRetryablePromise';
4
+ export * from './Host';
5
+ export * from './Requester';
6
+ export * from './Transporter';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/client-common/src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
package/index.ts ADDED
@@ -0,0 +1,9 @@
1
+ export * from './src/createAuth';
2
+ export * from './src/createEchoRequester';
3
+ export * from './src/createRetryablePromise';
4
+ export * from './src/cache';
5
+ export * from './src/transporter';
6
+ export * from './src/createAlgoliaAgent';
7
+ export * from './src/getAlgoliaAgent';
8
+ export * from './src/types';
9
+ export * from './src/constants';