Skip to content

Commit 42ffd1a

Browse files
feat(javascript): add exactOptionalPropertyTypes to tsconfig (generated)
algolia/api-clients-automation#4935 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 1106ab4 commit 42ffd1a

File tree

427 files changed

+1886
-1845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

427 files changed

+1886
-1845
lines changed

packages/algoliasearch/builds/browser.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export type Algoliasearch = SearchClient & {
6262
*/
6363
saveObjectsWithTransformation: (
6464
options: SaveObjectsOptions,
65-
requestOptions?: RequestOptions,
65+
requestOptions?: RequestOptions | undefined,
6666
) => Promise<WatchResponse>;
6767

6868
/**
@@ -79,22 +79,24 @@ export type Algoliasearch = SearchClient & {
7979
*/
8080
partialUpdateObjectsWithTransformation: (
8181
options: PartialUpdateObjectsOptions,
82-
requestOptions?: RequestOptions,
82+
requestOptions?: RequestOptions | undefined,
8383
) => Promise<WatchResponse>;
8484
};
8585

8686
export type TransformationOptions = {
8787
// When provided, a second transporter will be created in order to leverage the `*WithTransformation` methods exposed by the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).
88-
transformation?: {
89-
// The region of your Algolia application ID, used to target the correct hosts of the transformation service.
90-
region: IngestionRegion;
91-
};
88+
transformation?:
89+
| {
90+
// The region of your Algolia application ID, used to target the correct hosts of the transformation service.
91+
region: IngestionRegion;
92+
}
93+
| undefined;
9294
};
9395

9496
export function algoliasearch(
9597
appId: string,
9698
apiKey: string,
97-
options?: ClientOptions & TransformationOptions,
99+
options?: (ClientOptions & TransformationOptions) | undefined,
98100
): Algoliasearch {
99101
if (!appId || typeof appId !== 'string') {
100102
throw new Error('`appId` is missing.');

packages/algoliasearch/builds/fetch.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export type Algoliasearch = SearchClient & {
6262
*/
6363
saveObjectsWithTransformation: (
6464
options: SaveObjectsOptions,
65-
requestOptions?: RequestOptions,
65+
requestOptions?: RequestOptions | undefined,
6666
) => Promise<WatchResponse>;
6767

6868
/**
@@ -79,22 +79,24 @@ export type Algoliasearch = SearchClient & {
7979
*/
8080
partialUpdateObjectsWithTransformation: (
8181
options: PartialUpdateObjectsOptions,
82-
requestOptions?: RequestOptions,
82+
requestOptions?: RequestOptions | undefined,
8383
) => Promise<WatchResponse>;
8484
};
8585

8686
export type TransformationOptions = {
8787
// When provided, a second transporter will be created in order to leverage the `*WithTransformation` methods exposed by the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).
88-
transformation?: {
89-
// The region of your Algolia application ID, used to target the correct hosts of the transformation service.
90-
region: IngestionRegion;
91-
};
88+
transformation?:
89+
| {
90+
// The region of your Algolia application ID, used to target the correct hosts of the transformation service.
91+
region: IngestionRegion;
92+
}
93+
| undefined;
9294
};
9395

9496
export function algoliasearch(
9597
appId: string,
9698
apiKey: string,
97-
options?: ClientOptions & TransformationOptions,
99+
options?: (ClientOptions & TransformationOptions) | undefined,
98100
): Algoliasearch {
99101
if (!appId || typeof appId !== 'string') {
100102
throw new Error('`appId` is missing.');

packages/algoliasearch/builds/node.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export type Algoliasearch = SearchClient & {
6262
*/
6363
saveObjectsWithTransformation: (
6464
options: SaveObjectsOptions,
65-
requestOptions?: RequestOptions,
65+
requestOptions?: RequestOptions | undefined,
6666
) => Promise<WatchResponse>;
6767

6868
/**
@@ -79,22 +79,24 @@ export type Algoliasearch = SearchClient & {
7979
*/
8080
partialUpdateObjectsWithTransformation: (
8181
options: PartialUpdateObjectsOptions,
82-
requestOptions?: RequestOptions,
82+
requestOptions?: RequestOptions | undefined,
8383
) => Promise<WatchResponse>;
8484
};
8585

8686
export type TransformationOptions = {
8787
// When provided, a second transporter will be created in order to leverage the `*WithTransformation` methods exposed by the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).
88-
transformation?: {
89-
// The region of your Algolia application ID, used to target the correct hosts of the transformation service.
90-
region: IngestionRegion;
91-
};
88+
transformation?:
89+
| {
90+
// The region of your Algolia application ID, used to target the correct hosts of the transformation service.
91+
region: IngestionRegion;
92+
}
93+
| undefined;
9294
};
9395

9496
export function algoliasearch(
9597
appId: string,
9698
apiKey: string,
97-
options?: ClientOptions & TransformationOptions,
99+
options?: (ClientOptions & TransformationOptions) | undefined,
98100
): Algoliasearch {
99101
if (!appId || typeof appId !== 'string') {
100102
throw new Error('`appId` is missing.');

packages/algoliasearch/builds/worker.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export type Algoliasearch = SearchClient & {
6262
*/
6363
saveObjectsWithTransformation: (
6464
options: SaveObjectsOptions,
65-
requestOptions?: RequestOptions,
65+
requestOptions?: RequestOptions | undefined,
6666
) => Promise<WatchResponse>;
6767

6868
/**
@@ -79,22 +79,24 @@ export type Algoliasearch = SearchClient & {
7979
*/
8080
partialUpdateObjectsWithTransformation: (
8181
options: PartialUpdateObjectsOptions,
82-
requestOptions?: RequestOptions,
82+
requestOptions?: RequestOptions | undefined,
8383
) => Promise<WatchResponse>;
8484
};
8585

8686
export type TransformationOptions = {
8787
// When provided, a second transporter will be created in order to leverage the `*WithTransformation` methods exposed by the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).
88-
transformation?: {
89-
// The region of your Algolia application ID, used to target the correct hosts of the transformation service.
90-
region: IngestionRegion;
91-
};
88+
transformation?:
89+
| {
90+
// The region of your Algolia application ID, used to target the correct hosts of the transformation service.
91+
region: IngestionRegion;
92+
}
93+
| undefined;
9294
};
9395

9496
export function algoliasearch(
9597
appId: string,
9698
apiKey: string,
97-
options?: ClientOptions & TransformationOptions,
99+
options?: (ClientOptions & TransformationOptions) | undefined,
98100
): Algoliasearch {
99101
if (!appId || typeof appId !== 'string') {
100102
throw new Error('`appId` is missing.');

packages/algoliasearch/lite/builds/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export { apiClientVersion } from '../src/liteClient';
1717

1818
export * from '../model';
1919

20-
export function liteClient(appId: string, apiKey: string, options?: ClientOptions): LiteClient {
20+
export function liteClient(appId: string, apiKey: string, options?: ClientOptions | undefined): LiteClient {
2121
if (!appId || typeof appId !== 'string') {
2222
throw new Error('`appId` is missing.');
2323
}

packages/algoliasearch/lite/builds/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export { apiClientVersion } from '../src/liteClient';
1414

1515
export * from '../model';
1616

17-
export function liteClient(appId: string, apiKey: string, options?: ClientOptions): LiteClient {
17+
export function liteClient(appId: string, apiKey: string, options?: ClientOptions | undefined): LiteClient {
1818
if (!appId || typeof appId !== 'string') {
1919
throw new Error('`appId` is missing.');
2020
}

packages/algoliasearch/lite/model/apiKey.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,35 @@ export type ApiKey = {
1414
/**
1515
* Description of an API key to help you identify this API key.
1616
*/
17-
description?: string;
17+
description?: string | undefined;
1818

1919
/**
2020
* Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\".
2121
*/
22-
indexes?: Array<string>;
22+
indexes?: Array<string> | undefined;
2323

2424
/**
2525
* Maximum number of results this API key can retrieve in one query. By default, there\'s no limit.
2626
*/
27-
maxHitsPerQuery?: number;
27+
maxHitsPerQuery?: number | undefined;
2828

2929
/**
3030
* Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there\'s no limit.
3131
*/
32-
maxQueriesPerIPPerHour?: number;
32+
maxQueriesPerIPPerHour?: number | undefined;
3333

3434
/**
3535
* Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address outside the restricted range.
3636
*/
37-
queryParameters?: string;
37+
queryParameters?: string | undefined;
3838

3939
/**
4040
* Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don\'t rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).
4141
*/
42-
referers?: Array<string>;
42+
referers?: Array<string> | undefined;
4343

4444
/**
4545
* Duration (in seconds) after which the API key expires. By default, API keys don\'t expire.
4646
*/
47-
validity?: number;
47+
validity?: number | undefined;
4848
};

packages/algoliasearch/lite/model/automaticFacetFilter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export type AutomaticFacetFilter = {
1212
/**
1313
* Filter scores to give different weights to individual filters.
1414
*/
15-
score?: number;
15+
score?: number | undefined;
1616

1717
/**
1818
* Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation.
1919
*/
20-
disjunctive?: boolean;
20+
disjunctive?: boolean | undefined;
2121
};

packages/algoliasearch/lite/model/banner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { BannerLink } from './bannerLink';
77
* Banner with image and link to redirect users.
88
*/
99
export type Banner = {
10-
image?: BannerImage;
10+
image?: BannerImage | undefined;
1111

12-
link?: BannerLink;
12+
link?: BannerLink | undefined;
1313
};

packages/algoliasearch/lite/model/bannerImage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { BannerImageUrl } from './bannerImageUrl';
66
* Image to show inside a banner.
77
*/
88
export type BannerImage = {
9-
urls?: Array<BannerImageUrl>;
9+
urls?: Array<BannerImageUrl> | undefined;
1010

11-
title?: string;
11+
title?: string | undefined;
1212
};

packages/algoliasearch/lite/model/bannerImageUrl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
* URL for an image to show inside a banner.
55
*/
66
export type BannerImageUrl = {
7-
url?: string;
7+
url?: string | undefined;
88
};

packages/algoliasearch/lite/model/bannerLink.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
* Link for a banner defined in the Merchandising Studio.
55
*/
66
export type BannerLink = {
7-
url?: string;
7+
url?: string | undefined;
88
};

0 commit comments

Comments
 (0)