From b7e3c6427f3c6f707c2a72297c98253553776ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Wed, 27 Jul 2022 10:48:52 +0200 Subject: [PATCH] fix(javascript): expose sub `algoliasearch` client's type (#873) --- .../javascript/clients/algoliasearch/builds/imports.mustache | 3 +++ .../javascript/clients/algoliasearch/builds/models.mustache | 5 +++++ templates/javascript/clients/api-single.mustache | 3 +++ 3 files changed, 11 insertions(+) diff --git a/templates/javascript/clients/algoliasearch/builds/imports.mustache b/templates/javascript/clients/algoliasearch/builds/imports.mustache index 4928b4ff81..ac69f05ff8 100644 --- a/templates/javascript/clients/algoliasearch/builds/imports.mustache +++ b/templates/javascript/clients/algoliasearch/builds/imports.mustache @@ -16,5 +16,8 @@ export * from './models'; export const apiClientVersion = searchClientVersion; +/** + * The client type. + */ export type Algoliasearch = ReturnType; diff --git a/templates/javascript/clients/algoliasearch/builds/models.mustache b/templates/javascript/clients/algoliasearch/builds/models.mustache index d4324aa852..4d28a4f554 100644 --- a/templates/javascript/clients/algoliasearch/builds/models.mustache +++ b/templates/javascript/clients/algoliasearch/builds/models.mustache @@ -17,6 +17,11 @@ export * from '{{{npmNamespace}}}/client-personalization/model'; export * from '{{{npmNamespace}}}/client-analytics/model'; export * from '{{{npmNamespace}}}/client-abtesting/model'; +export { SearchClient } from '{{{npmNamespace}}}/client-search'; +export { PersonalizationClient } from '{{{npmNamespace}}}/client-personalization'; +export { AnalyticsClient } from '{{{npmNamespace}}}/client-analytics'; +export { AbtestingClient } from '{{{npmNamespace}}}/client-abtesting'; + export { ErrorBase, PutProps, PostProps, DelProps, GetProps }; export type CommonClientOptions = { requester?: Requester; hosts?: Host[] }; diff --git a/templates/javascript/clients/api-single.mustache b/templates/javascript/clients/api-single.mustache index 290a6c0f1e..c85f769036 100644 --- a/templates/javascript/clients/api-single.mustache +++ b/templates/javascript/clients/api-single.mustache @@ -130,6 +130,9 @@ export function create{{capitalizedApiName}}({ }; } +/** + * The client type. + */ export type {{capitalizedApiName}} = ReturnType; {{/operations}}