Skip to content

Commit a82d8a9

Browse files
committed
v1.8.0
1 parent 3d42ab1 commit a82d8a9

File tree

12 files changed

+691
-8
lines changed

12 files changed

+691
-8
lines changed

src/api.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { Configuration } from "./configuration";
2121
import { AuthorizationApi } from './apis/authorization-api';
2222
import { ColorsApi } from './apis/colors-api';
2323
import { ComponentsApi } from './apis/components-api';
24+
import { ConnectedComponentsApi } from './apis/connected-components-api';
2425
import { DesignTokensApi } from './apis/design-tokens-api';
2526
import { NotificationsApi } from './apis/notifications-api';
2627
import { OrganizationsApi } from './apis/organizations-api';
@@ -40,6 +41,7 @@ export class ZeplinApi extends BaseAPI {
4041
authorization: AuthorizationApi;
4142
colors: ColorsApi;
4243
components: ComponentsApi;
44+
connectedComponents: ConnectedComponentsApi;
4345
designTokens: DesignTokensApi;
4446
notifications: NotificationsApi;
4547
organizations: OrganizationsApi;
@@ -59,6 +61,7 @@ export class ZeplinApi extends BaseAPI {
5961
this.authorization = new AuthorizationApi(configuration, basePath, axios);
6062
this.colors = new ColorsApi(configuration, basePath, axios);
6163
this.components = new ComponentsApi(configuration, basePath, axios);
64+
this.connectedComponents = new ConnectedComponentsApi(configuration, basePath, axios);
6265
this.designTokens = new DesignTokensApi(configuration, basePath, axios);
6366
this.notifications = new NotificationsApi(configuration, basePath, axios);
6467
this.organizations = new OrganizationsApi(configuration, basePath, axios);

src/apis/components-api.ts

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,13 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
212212
* @param {string} [sectionId] Filter by section id
213213
* @param {'section' | 'created'} [sort] Sort components by their `section` or their `created` date
214214
* @param {boolean} [includeLatestVersion] Whether to include the latest version data in the Component object
215+
* @param {boolean} [includeLinkedStyleguides] Whether to include linked styleguides or not
215216
* @param {number} [limit] Pagination limit
216217
* @param {number} [offset] Pagination offset
217218
* @param {*} [options] Override http request option.
218219
* @throws {RequiredError}
219220
*/
220-
getProjectComponents: async (projectId: string, sectionId?: string, sort?: 'section' | 'created', includeLatestVersion?: boolean, limit?: number, offset?: number, options: any = {}): Promise<RequestArgs> => {
221+
getProjectComponents: async (projectId: string, sectionId?: string, sort?: 'section' | 'created', includeLatestVersion?: boolean, includeLinkedStyleguides?: boolean, limit?: number, offset?: number, options: any = {}): Promise<RequestArgs> => {
221222
// verify required parameter 'projectId' is not null or undefined
222223
assertParamExists('getProjectComponents', 'projectId', projectId)
223224
const localVarPath = `/v1/projects/{project_id}/components`
@@ -253,6 +254,10 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
253254
localVarQueryParameter['include_latest_version'] = includeLatestVersion;
254255
}
255256

257+
if (includeLinkedStyleguides !== undefined) {
258+
localVarQueryParameter['include_linked_styleguides'] = includeLinkedStyleguides;
259+
}
260+
256261
if (limit !== undefined) {
257262
localVarQueryParameter['limit'] = limit;
258263
}
@@ -459,13 +464,14 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
459464
* @param {'section' | 'created'} [sort] Sort components by their &#x60;section&#x60; or their &#x60;created&#x60; date
460465
* @param {string} [linkedProject] Reference project id
461466
* @param {string} [linkedStyleguide] Reference styleguide id
467+
* @param {boolean} [includeLinkedStyleguides] Whether to include linked styleguides or not
462468
* @param {boolean} [includeLatestVersion] Whether to include the latest version data in the Component object
463469
* @param {number} [limit] Pagination limit
464470
* @param {number} [offset] Pagination offset
465471
* @param {*} [options] Override http request option.
466472
* @throws {RequiredError}
467473
*/
468-
getStyleguideComponents: async (styleguideId: string, sectionId?: string, sort?: 'section' | 'created', linkedProject?: string, linkedStyleguide?: string, includeLatestVersion?: boolean, limit?: number, offset?: number, options: any = {}): Promise<RequestArgs> => {
474+
getStyleguideComponents: async (styleguideId: string, sectionId?: string, sort?: 'section' | 'created', linkedProject?: string, linkedStyleguide?: string, includeLinkedStyleguides?: boolean, includeLatestVersion?: boolean, limit?: number, offset?: number, options: any = {}): Promise<RequestArgs> => {
469475
// verify required parameter 'styleguideId' is not null or undefined
470476
assertParamExists('getStyleguideComponents', 'styleguideId', styleguideId)
471477
const localVarPath = `/v1/styleguides/{styleguide_id}/components`
@@ -505,6 +511,10 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
505511
localVarQueryParameter['linked_styleguide'] = linkedStyleguide;
506512
}
507513

514+
if (includeLinkedStyleguides !== undefined) {
515+
localVarQueryParameter['include_linked_styleguides'] = includeLinkedStyleguides;
516+
}
517+
508518
if (includeLatestVersion !== undefined) {
509519
localVarQueryParameter['include_latest_version'] = includeLatestVersion;
510520
}
@@ -687,13 +697,14 @@ export const ComponentsApiFp = function(configuration?: Configuration) {
687697
* @param {string} [sectionId] Filter by section id
688698
* @param {'section' | 'created'} [sort] Sort components by their &#x60;section&#x60; or their &#x60;created&#x60; date
689699
* @param {boolean} [includeLatestVersion] Whether to include the latest version data in the Component object
700+
* @param {boolean} [includeLinkedStyleguides] Whether to include linked styleguides or not
690701
* @param {number} [limit] Pagination limit
691702
* @param {number} [offset] Pagination offset
692703
* @param {*} [options] Override http request option.
693704
* @throws {RequiredError}
694705
*/
695-
async getProjectComponents(projectId: string, sectionId?: string, sort?: 'section' | 'created', includeLatestVersion?: boolean, limit?: number, offset?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
696-
const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectComponents(projectId, sectionId, sort, includeLatestVersion, limit, offset, options);
706+
async getProjectComponents(projectId: string, sectionId?: string, sort?: 'section' | 'created', includeLatestVersion?: boolean, includeLinkedStyleguides?: boolean, limit?: number, offset?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
707+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectComponents(projectId, sectionId, sort, includeLatestVersion, includeLinkedStyleguides, limit, offset, options);
697708
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
698709
},
699710
/**
@@ -748,14 +759,15 @@ export const ComponentsApiFp = function(configuration?: Configuration) {
748759
* @param {'section' | 'created'} [sort] Sort components by their &#x60;section&#x60; or their &#x60;created&#x60; date
749760
* @param {string} [linkedProject] Reference project id
750761
* @param {string} [linkedStyleguide] Reference styleguide id
762+
* @param {boolean} [includeLinkedStyleguides] Whether to include linked styleguides or not
751763
* @param {boolean} [includeLatestVersion] Whether to include the latest version data in the Component object
752764
* @param {number} [limit] Pagination limit
753765
* @param {number} [offset] Pagination offset
754766
* @param {*} [options] Override http request option.
755767
* @throws {RequiredError}
756768
*/
757-
async getStyleguideComponents(styleguideId: string, sectionId?: string, sort?: 'section' | 'created', linkedProject?: string, linkedStyleguide?: string, includeLatestVersion?: boolean, limit?: number, offset?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
758-
const localVarAxiosArgs = await localVarAxiosParamCreator.getStyleguideComponents(styleguideId, sectionId, sort, linkedProject, linkedStyleguide, includeLatestVersion, limit, offset, options);
769+
async getStyleguideComponents(styleguideId: string, sectionId?: string, sort?: 'section' | 'created', linkedProject?: string, linkedStyleguide?: string, includeLinkedStyleguides?: boolean, includeLatestVersion?: boolean, limit?: number, offset?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
770+
const localVarAxiosArgs = await localVarAxiosParamCreator.getStyleguideComponents(styleguideId, sectionId, sort, linkedProject, linkedStyleguide, includeLinkedStyleguides, includeLatestVersion, limit, offset, options);
759771
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
760772
},
761773
/**
@@ -851,6 +863,13 @@ export interface ComponentsApiGetProjectComponentsSearchParams {
851863
*/
852864
readonly includeLatestVersion?: boolean;
853865

866+
/**
867+
* Whether to include linked styleguides or not
868+
* @type {boolean}
869+
* @memberof ComponentsApiGetProjectComponentsSearchParams
870+
*/
871+
readonly includeLinkedStyleguides?: boolean;
872+
854873
/**
855874
* Pagination limit
856875
* @type {number}
@@ -984,6 +1003,13 @@ export interface ComponentsApiGetStyleguideComponentsSearchParams {
9841003
*/
9851004
readonly linkedStyleguide?: string;
9861005

1006+
/**
1007+
* Whether to include linked styleguides or not
1008+
* @type {boolean}
1009+
* @memberof ComponentsApiGetStyleguideComponentsSearchParams
1010+
*/
1011+
readonly includeLinkedStyleguides?: boolean;
1012+
9871013
/**
9881014
* Whether to include the latest version data in the Component object
9891015
* @type {boolean}
@@ -1085,7 +1111,7 @@ export class ComponentsApi extends BaseAPI {
10851111
*/
10861112
public async getProjectComponents(projectId: string, searchParams: ComponentsApiGetProjectComponentsSearchParams = {}, options?: any) : Promise<AxiosResponse<Array<Component>>> {
10871113
const componentsApiFp = ComponentsApiFp(this.configuration);
1088-
const request = await componentsApiFp.getProjectComponents(projectId, searchParams.sectionId, searchParams.sort, searchParams.includeLatestVersion, searchParams.limit, searchParams.offset, options);
1114+
const request = await componentsApiFp.getProjectComponents(projectId, searchParams.sectionId, searchParams.sort, searchParams.includeLatestVersion, searchParams.includeLinkedStyleguides, searchParams.limit, searchParams.offset, options);
10891115
const response = await request(this.axios, this.basePath);
10901116
return {
10911117
...response,
@@ -1163,7 +1189,7 @@ export class ComponentsApi extends BaseAPI {
11631189
*/
11641190
public async getStyleguideComponents(styleguideId: string, searchParams: ComponentsApiGetStyleguideComponentsSearchParams = {}, options?: any) : Promise<AxiosResponse<Array<Component>>> {
11651191
const componentsApiFp = ComponentsApiFp(this.configuration);
1166-
const request = await componentsApiFp.getStyleguideComponents(styleguideId, searchParams.sectionId, searchParams.sort, searchParams.linkedProject, searchParams.linkedStyleguide, searchParams.includeLatestVersion, searchParams.limit, searchParams.offset, options);
1192+
const request = await componentsApiFp.getStyleguideComponents(styleguideId, searchParams.sectionId, searchParams.sort, searchParams.linkedProject, searchParams.linkedStyleguide, searchParams.includeLinkedStyleguides, searchParams.includeLatestVersion, searchParams.limit, searchParams.offset, options);
11671193
const response = await request(this.axios, this.basePath);
11681194
return {
11691195
...response,

0 commit comments

Comments
 (0)