Skip to content

Commit

Permalink
feat(specs): rename composition to composition-full (private) and add…
Browse files Browse the repository at this point in the history
… composition (public) (generated)

algolia/api-clients-automation#4357

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Emmanuel Krebs <[email protected]>
Co-authored-by: shortcuts <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
4 people committed Jan 22, 2025
1 parent c14cef0 commit 2ac2f2f
Show file tree
Hide file tree
Showing 87 changed files with 1,872 additions and 18 deletions.
7 changes: 7 additions & 0 deletions packages/algoliasearch/builds/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
import type { SearchClient } from '@algolia/client-search';
import { searchClient } from '@algolia/client-search';
import type { CompositionClient } from '@algolia/composition';
import { compositionClient } from '@algolia/composition';
import type { IngestionClient } from '@algolia/ingestion';
import { ingestionClient } from '@algolia/ingestion';
import type { MonitoringClient } from '@algolia/monitoring';
Expand All @@ -36,6 +38,7 @@ export * from './models';
export type Algoliasearch = SearchClient & {
initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;
initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;
initComposition: (initOptions?: InitClientOptions) => CompositionClient;
initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;
initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;
initMonitoring: (initOptions?: InitClientOptions) => MonitoringClient;
Expand Down Expand Up @@ -83,6 +86,10 @@ export function algoliasearch(appId: string, apiKey: string, options?: ClientOpt
);
},

initComposition: (initOptions: InitClientOptions = {}): CompositionClient => {
return compositionClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
},

initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {
return ingestionClient(
initOptions.appId || appId,
Expand Down
7 changes: 7 additions & 0 deletions packages/algoliasearch/builds/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
import type { SearchClient } from '@algolia/client-search';
import { searchClient } from '@algolia/client-search';
import type { CompositionClient } from '@algolia/composition';
import { compositionClient } from '@algolia/composition';
import type { IngestionClient } from '@algolia/ingestion';
import { ingestionClient } from '@algolia/ingestion';
import type { MonitoringClient } from '@algolia/monitoring';
Expand All @@ -36,6 +38,7 @@ export * from './models';
export type Algoliasearch = SearchClient & {
initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;
initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;
initComposition: (initOptions?: InitClientOptions) => CompositionClient;
initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;
initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;
initMonitoring: (initOptions?: InitClientOptions) => MonitoringClient;
Expand Down Expand Up @@ -83,6 +86,10 @@ export function algoliasearch(appId: string, apiKey: string, options?: ClientOpt
);
},

initComposition: (initOptions: InitClientOptions = {}): CompositionClient => {
return compositionClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
},

initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {
return ingestionClient(
initOptions.appId || appId,
Expand Down
32 changes: 24 additions & 8 deletions packages/algoliasearch/builds/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import type { Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions } from '@algolia/client-abtesting';
import type { Region as AnalyticsRegion, RegionOptions as AnalyticsRegionOptions } from '@algolia/client-analytics';

import type { Region as InsightsRegion, RegionOptions as InsightsRegionOptions } from '@algolia/client-insights';
import type { Region as IngestionRegion, RegionOptions as IngestionRegionOptions } from '@algolia/ingestion';

Expand Down Expand Up @@ -46,27 +47,29 @@ import type {
CustomGetProps,
CustomPostProps,
CustomPutProps,
DeletedAtResponse,
DeleteSourceProps,
DeletedAtResponse,
Distinct,
Edit,
EditType,
ErrorBase,
ExactOnSingleWordQuery,
Exhaustive,
FacetFilters,
FacetHits,
FacetOrdering,
Facets,
FacetStats,
Facets,
GetTaskProps,
HighlightResult,
HighlightResultOption,
Hit,
IgnorePlurals,
IndexSettingsAsSearchParams,
InsideBoundingBox,
Languages,
MatchedGeoLocation,
MatchLevel,
MatchedGeoLocation,
Mode,
NumericFilters,
OptionalFilters,
Expand All @@ -79,18 +82,23 @@ import type {
QueryType,
Range,
RankingInfo,
ReRankingApplyFilter,
Redirect,
RedirectRuleIndexData,
RedirectRuleIndexMetadata,
RedirectURL,
RemoveStopWords,
RemoveWordsIfNoResults,
RenderingContent,
ReRankingApplyFilter,
SearchForFacetValuesProps,
SearchForFacetValuesRequest,
SearchForFacetValuesResponse,
SearchHits,
SearchPagination,
SearchParams,
SearchParamsObject,
SearchParamsQuery,
SearchResponse,
SemanticSearch,
SnippetResult,
SnippetResultOption,
Expand All @@ -113,6 +121,7 @@ export * from '@algolia/client-insights';
export * from '@algolia/client-personalization';
export * from '@algolia/client-query-suggestions';
export * from '@algolia/client-search';
export * from '@algolia/composition';
export * from '@algolia/ingestion';
export * from '@algolia/monitoring';
export * from '@algolia/recommend';
Expand Down Expand Up @@ -178,27 +187,29 @@ export type {
CustomGetProps,
CustomPostProps,
CustomPutProps,
DeletedAtResponse,
DeleteSourceProps,
DeletedAtResponse,
Distinct,
Edit,
EditType,
ErrorBase,
ExactOnSingleWordQuery,
Exhaustive,
FacetFilters,
FacetHits,
FacetOrdering,
Facets,
FacetStats,
Facets,
GetTaskProps,
HighlightResult,
HighlightResultOption,
Hit,
IgnorePlurals,
IndexSettingsAsSearchParams,
InsideBoundingBox,
Languages,
MatchedGeoLocation,
MatchLevel,
MatchedGeoLocation,
Mode,
NumericFilters,
OptionalFilters,
Expand All @@ -211,18 +222,23 @@ export type {
QueryType,
Range,
RankingInfo,
ReRankingApplyFilter,
Redirect,
RedirectRuleIndexData,
RedirectRuleIndexMetadata,
RedirectURL,
RemoveStopWords,
RemoveWordsIfNoResults,
RenderingContent,
ReRankingApplyFilter,
SearchForFacetValuesProps,
SearchForFacetValuesRequest,
SearchForFacetValuesResponse,
SearchHits,
SearchPagination,
SearchParams,
SearchParamsObject,
SearchParamsQuery,
SearchResponse,
SemanticSearch,
SnippetResult,
SnippetResultOption,
Expand Down
7 changes: 7 additions & 0 deletions packages/algoliasearch/builds/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
import type { SearchClient } from '@algolia/client-search';
import { searchClient } from '@algolia/client-search';
import type { CompositionClient } from '@algolia/composition';
import { compositionClient } from '@algolia/composition';
import type { IngestionClient } from '@algolia/ingestion';
import { ingestionClient } from '@algolia/ingestion';
import type { MonitoringClient } from '@algolia/monitoring';
Expand All @@ -36,6 +38,7 @@ export * from './models';
export type Algoliasearch = SearchClient & {
initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;
initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;
initComposition: (initOptions?: InitClientOptions) => CompositionClient;
initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;
initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;
initMonitoring: (initOptions?: InitClientOptions) => MonitoringClient;
Expand Down Expand Up @@ -83,6 +86,10 @@ export function algoliasearch(appId: string, apiKey: string, options?: ClientOpt
);
},

initComposition: (initOptions: InitClientOptions = {}): CompositionClient => {
return compositionClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
},

initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {
return ingestionClient(
initOptions.appId || appId,
Expand Down
7 changes: 7 additions & 0 deletions packages/algoliasearch/builds/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
import type { SearchClient } from '@algolia/client-search';
import { searchClient } from '@algolia/client-search';
import type { CompositionClient } from '@algolia/composition';
import { compositionClient } from '@algolia/composition';
import type { IngestionClient } from '@algolia/ingestion';
import { ingestionClient } from '@algolia/ingestion';
import type { MonitoringClient } from '@algolia/monitoring';
Expand All @@ -36,6 +38,7 @@ export * from './models';
export type Algoliasearch = SearchClient & {
initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;
initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;
initComposition: (initOptions?: InitClientOptions) => CompositionClient;
initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;
initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;
initMonitoring: (initOptions?: InitClientOptions) => MonitoringClient;
Expand Down Expand Up @@ -83,6 +86,10 @@ export function algoliasearch(appId: string, apiKey: string, options?: ClientOpt
);
},

initComposition: (initOptions: InitClientOptions = {}): CompositionClient => {
return compositionClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
},

initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {
return ingestionClient(
initOptions.appId || appId,
Expand Down
1 change: 1 addition & 0 deletions packages/algoliasearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"@algolia/client-personalization": "5.19.0",
"@algolia/client-query-suggestions": "5.19.0",
"@algolia/client-search": "5.19.0",
"@algolia/composition": "0.0.1",
"@algolia/ingestion": "1.19.0",
"@algolia/monitoring": "1.19.0",
"@algolia/recommend": "5.19.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/client-composition/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ import { compositionClient } from '@algolia/client-composition';
const client = compositionClient('YOUR_APP_ID', 'YOUR_API_KEY');
```

For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/libraries/javascript/v5/methods/composition/)**.
For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/libraries/javascript/v5/methods/composition-full/)**.

## ❓ Troubleshooting

Expand Down
4 changes: 2 additions & 2 deletions packages/client-composition/builds/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {

import type { ClientOptions } from '@algolia/client-common';

import { apiClientVersion, createCompositionClient } from '../src/compositionClient';
import { apiClientVersion, createCompositionClient } from '../src/compositionFullClient';

export { apiClientVersion } from '../src/compositionClient';
export { apiClientVersion } from '../src/compositionFullClient';

export * from '../model';

Expand Down
4 changes: 2 additions & 2 deletions packages/client-composition/builds/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { createFetchRequester } from '@algolia/requester-fetch';

import type { ClientOptions } from '@algolia/client-common';

import { createCompositionClient } from '../src/compositionClient';
import { createCompositionClient } from '../src/compositionFullClient';

export { apiClientVersion } from '../src/compositionClient';
export { apiClientVersion } from '../src/compositionFullClient';

export * from '../model';

Expand Down
4 changes: 2 additions & 2 deletions packages/client-composition/builds/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { createMemoryCache, createNullCache, createNullLogger } from '@algolia/c

import type { ClientOptions } from '@algolia/client-common';

import { createCompositionClient } from '../src/compositionClient';
import { createCompositionClient } from '../src/compositionFullClient';

export { apiClientVersion } from '../src/compositionClient';
export { apiClientVersion } from '../src/compositionFullClient';

export * from '../model';

Expand Down
4 changes: 2 additions & 2 deletions packages/client-composition/builds/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { createFetchRequester } from '@algolia/requester-fetch';

import type { ClientOptions } from '@algolia/client-common';

import { createCompositionClient } from '../src/compositionClient';
import { createCompositionClient } from '../src/compositionFullClient';

export { apiClientVersion } from '../src/compositionClient';
export { apiClientVersion } from '../src/compositionFullClient';

export * from '../model';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function createCompositionClient({
...options,
algoliaAgent: getAlgoliaAgent({
algoliaAgents,
client: 'Composition',
client: 'CompositionFull',
version: apiClientVersion,
}),
baseHeaders: {
Expand Down
21 changes: 21 additions & 0 deletions packages/composition/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2013-Present Algolia

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 2ac2f2f

Please sign in to comment.