Skip to content

Commit 7282338

Browse files
committed
refactor: update variant description in Entries and Entry classes for clarity; enhance constructor overloads in Query class
1 parent a0d7d72 commit 7282338

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

src/entries/entries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export class Entries extends BaseQuery {
263263
/**
264264
* @method variants
265265
* @memberof Entries
266-
* @description The variant header will be added to axios client. Branch is optional.
266+
* @description Stores the variant UID(s) and optional branch name, which are sent as the `x-cs-variant-uid` and `branch` headers on the request when find() is called.
267267
* @param {string | string[]} variants - Variant UID or UIDs
268268
* @param {string} [branchName] - Optional branch name sent as the `branch` header
269269
* @returns {Entries}

src/entries/entry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class Entry {
4242
/**
4343
* @method variants
4444
* @memberof Entry
45-
* @description The variant header will be added to axios client. Branch is optional.
45+
* @description Stores the variant UID(s) and optional branch name, which are sent as the `x-cs-variant-uid` and `branch` headers on the request when fetch() is called.
4646
* @param {string | string[]} variants - Variant UID or UIDs
4747
* @param {string} [branchName] - Optional branch name sent as the `branch` header
4848
* @returns {Entry}

src/query/query.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ import { ErrorMessages } from '../common/error-messages';
77
export class Query extends BaseQuery {
88
private _contentTypeUid?: string;
99

10+
constructor(
11+
client: AxiosInstance,
12+
params: params,
13+
queryParams: queryParams,
14+
variants?: string,
15+
uid?: string,
16+
queryObj?: { [key: string]: any }
17+
);
18+
constructor(
19+
client: AxiosInstance,
20+
params: params,
21+
queryParams: queryParams,
22+
variants?: string,
23+
uid?: string,
24+
variantsBranch?: string,
25+
queryObj?: { [key: string]: any }
26+
);
1027
constructor(
1128
client: AxiosInstance,
1229
params: params,

0 commit comments

Comments
 (0)