Skip to content

Commit

Permalink
Merge 0e97d38 into aae4ddb
Browse files Browse the repository at this point in the history
  • Loading branch information
e-krebs authored Nov 18, 2024
2 parents aae4ddb + 0e97d38 commit f90074b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,9 @@ private void setDefaultGeneratorOptions() {
additionalProperties.put("apiName", CLIENT);
additionalProperties.put("clientName", clientName);
additionalProperties.put("algoliaAgent", Helpers.capitalize(CLIENT));
additionalProperties.put("is" + Helpers.capitalize(CLIENT) + "Client", true);
additionalProperties.put("isSearchClient", CLIENT.equals("search") || isAlgoliasearchClient);
additionalProperties.put("isIngestionClient", CLIENT.equals("ingestion"));
additionalProperties.put("isAlgoliasearchClient", isAlgoliasearchClient);
additionalProperties.put("isAlgoliaCompositionClient", isAlgoliaCompositionClient);
additionalProperties.put("packageVersion", Helpers.getPackageJsonVersion(packageName));
additionalProperties.put("packageName", packageName);
additionalProperties.put("npmPackageName", isAlgoliasearchClient ? packageName : "@algolia/" + packageName);
Expand Down
4 changes: 2 additions & 2 deletions templates/javascript/clients/api-single.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ export function create{{#lambda.titlecase}}{{clientName}}{{/lambda.titlecase}}({
{{#isSearchClient}}
{{> client/api/helpers}}
{{/isSearchClient}}
{{#isAlgoliaCompositionClient}}
{{#isCompositionClient}}
{{> client/api/compositionHelpers}}
{{/isAlgoliaCompositionClient}}
{{/isCompositionClient}}
{{#operation}}
{{> client/api/operation/jsdoc}}
{{nickname}}{{#vendorExtensions.x-is-generic}}<T>{{/vendorExtensions.x-is-generic}}( {{> client/api/operation/parameters}} ) : Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}{{#vendorExtensions.x-is-generic}}<T>{{/vendorExtensions.x-is-generic}}> {
Expand Down
8 changes: 4 additions & 4 deletions templates/javascript/clients/client/api/imports.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
serializeQueryParameters,
createIterablePromise,
{{/isSearchClient}}
{{#isAlgoliaCompositionClient}}
{{#isCompositionClient}}
createIterablePromise,
{{/isAlgoliaCompositionClient}}
{{/isCompositionClient}}
} from '@algolia/client-common';
import type {
CreateClientOptions,
Expand Down Expand Up @@ -42,9 +42,9 @@ import type {
WaitForAppTaskOptions,
WaitForTaskOptions,
{{/isSearchClient}}
{{#isAlgoliaCompositionClient}}
{{#isCompositionClient}}
WaitForCompositionTaskOptions,
{{/isAlgoliaCompositionClient}}
{{/isCompositionClient}}
{{#operation}}
{{#vendorExtensions}}
{{#x-create-wrapping-object}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
logger: createNullLogger(),
requester: createXhrRequester(),
algoliaAgents: [{ segment: 'Browser' }],
authMode: 'WithinQueryParameters',
authMode: 'Within{{#isCompositionClient}}Headers{{/isCompositionClient}}{{^isCompositionClient}}QueryParameters{{/isCompositionClient}}',
responsesCache: createMemoryCache(),
requestsCache: createMemoryCache({ serializable: false }),
hostsCache: createFallbackableCache({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export type ReplaceAllObjectsOptions = {
}
{{/isAlgoliasearchClient}}
{{/isSearchClient}}
{{#isAlgoliaCompositionClient}}
{{#isCompositionClient}}
export type WaitForCompositionTaskOptions = {
/**
* The maximum number of retries. 50 by default.
Expand All @@ -206,6 +206,6 @@ export type WaitForCompositionTaskOptions = {
*/
compositionID: string;
};
{{/isAlgoliaCompositionClient}}
{{/isCompositionClient}}

{{/apiInfo.apis.0}}

0 comments on commit f90074b

Please sign in to comment.