@@ -61,10 +61,11 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
6161 * @summary Get a single project component
6262 * @param {string } projectId Project id
6363 * @param {string } componentId Component id
64+ * @param {boolean } [includeLatestVersion] Whether to include the latest version data in the Component object
6465 * @param {* } [options] Override http request option.
6566 * @throws {RequiredError }
6667 */
67- getProjectComponent : async ( projectId : string , componentId : string , options : any = { } ) : Promise < RequestArgs > => {
68+ getProjectComponent : async ( projectId : string , componentId : string , includeLatestVersion ?: boolean , options : any = { } ) : Promise < RequestArgs > => {
6869 // verify required parameter 'projectId' is not null or undefined
6970 assertParamExists ( 'getProjectComponent' , 'projectId' , projectId )
7071 // verify required parameter 'componentId' is not null or undefined
@@ -91,6 +92,10 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
9192 // http bearer authentication required
9293 await setBearerAuthToObject ( localVarHeaderParameter , configuration )
9394
95+ if ( includeLatestVersion !== undefined ) {
96+ localVarQueryParameter [ 'include_latest_version' ] = includeLatestVersion ;
97+ }
98+
9499
95100
96101 setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
@@ -206,12 +211,13 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
206211 * @param {string } projectId Project id
207212 * @param {string } [sectionId] Filter by section id
208213 * @param {'section' | 'created' } [sort] Sort components by their `section` or their `created` date
214+ * @param {boolean } [includeLatestVersion] Whether to include the latest version data in the Component object
209215 * @param {number } [limit] Pagination limit
210216 * @param {number } [offset] Pagination offset
211217 * @param {* } [options] Override http request option.
212218 * @throws {RequiredError }
213219 */
214- getProjectComponents : async ( projectId : string , sectionId ?: string , sort ?: 'section' | 'created' , limit ?: number , offset ?: number , options : any = { } ) : Promise < RequestArgs > => {
220+ getProjectComponents : async ( projectId : string , sectionId ?: string , sort ?: 'section' | 'created' , includeLatestVersion ?: boolean , limit ?: number , offset ?: number , options : any = { } ) : Promise < RequestArgs > => {
215221 // verify required parameter 'projectId' is not null or undefined
216222 assertParamExists ( 'getProjectComponents' , 'projectId' , projectId )
217223 const localVarPath = `/v1/projects/{project_id}/components`
@@ -243,6 +249,10 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
243249 localVarQueryParameter [ 'sort' ] = sort ;
244250 }
245251
252+ if ( includeLatestVersion !== undefined ) {
253+ localVarQueryParameter [ 'include_latest_version' ] = includeLatestVersion ;
254+ }
255+
246256 if ( limit !== undefined ) {
247257 localVarQueryParameter [ 'limit' ] = limit ;
248258 }
@@ -269,10 +279,11 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
269279 * @param {string } componentId Component id
270280 * @param {string } [linkedProject] Reference project id
271281 * @param {string } [linkedStyleguide] Reference styleguide id
282+ * @param {boolean } [includeLatestVersion] Whether to include the latest version data in the Component object
272283 * @param {* } [options] Override http request option.
273284 * @throws {RequiredError }
274285 */
275- getStyleguideComponent : async ( styleguideId : string , componentId : string , linkedProject ?: string , linkedStyleguide ?: string , options : any = { } ) : Promise < RequestArgs > => {
286+ getStyleguideComponent : async ( styleguideId : string , componentId : string , linkedProject ?: string , linkedStyleguide ?: string , includeLatestVersion ?: boolean , options : any = { } ) : Promise < RequestArgs > => {
276287 // verify required parameter 'styleguideId' is not null or undefined
277288 assertParamExists ( 'getStyleguideComponent' , 'styleguideId' , styleguideId )
278289 // verify required parameter 'componentId' is not null or undefined
@@ -307,6 +318,10 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
307318 localVarQueryParameter [ 'linked_styleguide' ] = linkedStyleguide ;
308319 }
309320
321+ if ( includeLatestVersion !== undefined ) {
322+ localVarQueryParameter [ 'include_latest_version' ] = includeLatestVersion ;
323+ }
324+
310325
311326
312327 setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
@@ -444,12 +459,13 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
444459 * @param {'section' | 'created' } [sort] Sort components by their `section` or their `created` date
445460 * @param {string } [linkedProject] Reference project id
446461 * @param {string } [linkedStyleguide] Reference styleguide id
462+ * @param {boolean } [includeLatestVersion] Whether to include the latest version data in the Component object
447463 * @param {number } [limit] Pagination limit
448464 * @param {number } [offset] Pagination offset
449465 * @param {* } [options] Override http request option.
450466 * @throws {RequiredError }
451467 */
452- getStyleguideComponents : async ( styleguideId : string , sectionId ?: string , sort ?: 'section' | 'created' , linkedProject ?: string , linkedStyleguide ?: string , limit ?: number , offset ?: number , options : any = { } ) : Promise < RequestArgs > => {
468+ getStyleguideComponents : async ( styleguideId : string , sectionId ?: string , sort ?: 'section' | 'created' , linkedProject ?: string , linkedStyleguide ?: string , includeLatestVersion ?: boolean , limit ?: number , offset ?: number , options : any = { } ) : Promise < RequestArgs > => {
453469 // verify required parameter 'styleguideId' is not null or undefined
454470 assertParamExists ( 'getStyleguideComponents' , 'styleguideId' , styleguideId )
455471 const localVarPath = `/v1/styleguides/{styleguide_id}/components`
@@ -489,6 +505,10 @@ export const ComponentsApiAxiosParamCreator = function (configuration?: Configur
489505 localVarQueryParameter [ 'linked_styleguide' ] = linkedStyleguide ;
490506 }
491507
508+ if ( includeLatestVersion !== undefined ) {
509+ localVarQueryParameter [ 'include_latest_version' ] = includeLatestVersion ;
510+ }
511+
492512 if ( limit !== undefined ) {
493513 localVarQueryParameter [ 'limit' ] = limit ;
494514 }
@@ -627,11 +647,12 @@ export const ComponentsApiFp = function(configuration?: Configuration) {
627647 * @summary Get a single project component
628648 * @param {string } projectId Project id
629649 * @param {string } componentId Component id
650+ * @param {boolean } [includeLatestVersion] Whether to include the latest version data in the Component object
630651 * @param {* } [options] Override http request option.
631652 * @throws {RequiredError }
632653 */
633- async getProjectComponent ( projectId : string , componentId : string , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < any > > {
634- const localVarAxiosArgs = await localVarAxiosParamCreator . getProjectComponent ( projectId , componentId , options ) ;
654+ async getProjectComponent ( projectId : string , componentId : string , includeLatestVersion ?: boolean , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < any > > {
655+ const localVarAxiosArgs = await localVarAxiosParamCreator . getProjectComponent ( projectId , componentId , includeLatestVersion , options ) ;
635656 return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ;
636657 } ,
637658 /**
@@ -665,13 +686,14 @@ export const ComponentsApiFp = function(configuration?: Configuration) {
665686 * @param {string } projectId Project id
666687 * @param {string } [sectionId] Filter by section id
667688 * @param {'section' | 'created' } [sort] Sort components by their `section` or their `created` date
689+ * @param {boolean } [includeLatestVersion] Whether to include the latest version data in the Component object
668690 * @param {number } [limit] Pagination limit
669691 * @param {number } [offset] Pagination offset
670692 * @param {* } [options] Override http request option.
671693 * @throws {RequiredError }
672694 */
673- async getProjectComponents ( projectId : string , sectionId ?: string , sort ?: 'section' | 'created' , limit ?: number , offset ?: number , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < any > > {
674- const localVarAxiosArgs = await localVarAxiosParamCreator . getProjectComponents ( projectId , sectionId , sort , limit , offset , options ) ;
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 ) ;
675697 return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ;
676698 } ,
677699 /**
@@ -681,11 +703,12 @@ export const ComponentsApiFp = function(configuration?: Configuration) {
681703 * @param {string } componentId Component id
682704 * @param {string } [linkedProject] Reference project id
683705 * @param {string } [linkedStyleguide] Reference styleguide id
706+ * @param {boolean } [includeLatestVersion] Whether to include the latest version data in the Component object
684707 * @param {* } [options] Override http request option.
685708 * @throws {RequiredError }
686709 */
687- async getStyleguideComponent ( styleguideId : string , componentId : string , linkedProject ?: string , linkedStyleguide ?: string , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < any > > {
688- const localVarAxiosArgs = await localVarAxiosParamCreator . getStyleguideComponent ( styleguideId , componentId , linkedProject , linkedStyleguide , options ) ;
710+ async getStyleguideComponent ( styleguideId : string , componentId : string , linkedProject ?: string , linkedStyleguide ?: string , includeLatestVersion ?: boolean , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < any > > {
711+ const localVarAxiosArgs = await localVarAxiosParamCreator . getStyleguideComponent ( styleguideId , componentId , linkedProject , linkedStyleguide , includeLatestVersion , options ) ;
689712 return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ;
690713 } ,
691714 /**
@@ -725,13 +748,14 @@ export const ComponentsApiFp = function(configuration?: Configuration) {
725748 * @param {'section' | 'created' } [sort] Sort components by their `section` or their `created` date
726749 * @param {string } [linkedProject] Reference project id
727750 * @param {string } [linkedStyleguide] Reference styleguide id
751+ * @param {boolean } [includeLatestVersion] Whether to include the latest version data in the Component object
728752 * @param {number } [limit] Pagination limit
729753 * @param {number } [offset] Pagination offset
730754 * @param {* } [options] Override http request option.
731755 * @throws {RequiredError }
732756 */
733- async getStyleguideComponents ( styleguideId : string , sectionId ?: string , sort ?: 'section' | 'created' , linkedProject ?: string , linkedStyleguide ?: string , limit ?: number , offset ?: number , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < any > > {
734- const localVarAxiosArgs = await localVarAxiosParamCreator . getStyleguideComponents ( styleguideId , sectionId , sort , linkedProject , linkedStyleguide , limit , offset , options ) ;
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 ) ;
735759 return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ;
736760 } ,
737761 /**
@@ -764,6 +788,19 @@ export const ComponentsApiFp = function(configuration?: Configuration) {
764788} ;
765789
766790
791+ /**
792+ * Search parameters for getProjectComponent operation in ComponentsApi.
793+ * @export
794+ * @interface ComponentsApiGetProjectComponentSearchParams
795+ */
796+ export interface ComponentsApiGetProjectComponentSearchParams {
797+ /**
798+ * Whether to include the latest version data in the Component object
799+ * @type {boolean }
800+ * @memberof ComponentsApiGetProjectComponentSearchParams
801+ */
802+ readonly includeLatestVersion ?: boolean ;
803+ }
767804
768805
769806/**
@@ -807,6 +844,13 @@ export interface ComponentsApiGetProjectComponentsSearchParams {
807844 */
808845 readonly sort ?: 'section' | 'created' ;
809846
847+ /**
848+ * Whether to include the latest version data in the Component object
849+ * @type {boolean }
850+ * @memberof ComponentsApiGetProjectComponentsSearchParams
851+ */
852+ readonly includeLatestVersion ?: boolean ;
853+
810854 /**
811855 * Pagination limit
812856 * @type {number }
@@ -841,6 +885,13 @@ export interface ComponentsApiGetStyleguideComponentSearchParams {
841885 * @memberof ComponentsApiGetStyleguideComponentSearchParams
842886 */
843887 readonly linkedStyleguide ?: string ;
888+
889+ /**
890+ * Whether to include the latest version data in the Component object
891+ * @type {boolean }
892+ * @memberof ComponentsApiGetStyleguideComponentSearchParams
893+ */
894+ readonly includeLatestVersion ?: boolean ;
844895}
845896
846897/**
@@ -933,6 +984,13 @@ export interface ComponentsApiGetStyleguideComponentsSearchParams {
933984 */
934985 readonly linkedStyleguide ?: string ;
935986
987+ /**
988+ * Whether to include the latest version data in the Component object
989+ * @type {boolean }
990+ * @memberof ComponentsApiGetStyleguideComponentsSearchParams
991+ */
992+ readonly includeLatestVersion ?: boolean ;
993+
936994 /**
937995 * Pagination limit
938996 * @type {number }
@@ -963,13 +1021,14 @@ export class ComponentsApi extends BaseAPI {
9631021 * @summary Get a single project component
9641022 * @param {string } projectId Project id
9651023 * @param {string } componentId Component id
1024+ * @param {ComponentsApiGetProjectComponentSearchParams } [searchParams] Search parameters.
9661025 * @param {* } [options] Override http request option.
9671026 * @throws {RequiredError }
9681027 * @memberof ComponentsApi
9691028 */
970- public async getProjectComponent ( projectId : string , componentId : string , options ?: any ) : Promise < AxiosResponse < Component > > {
1029+ public async getProjectComponent ( projectId : string , componentId : string , searchParams : ComponentsApiGetProjectComponentSearchParams = { } , options ?: any ) : Promise < AxiosResponse < Component > > {
9711030 const componentsApiFp = ComponentsApiFp ( this . configuration ) ;
972- const request = await componentsApiFp . getProjectComponent ( projectId , componentId , options ) ;
1031+ const request = await componentsApiFp . getProjectComponent ( projectId , componentId , searchParams . includeLatestVersion , options ) ;
9731032 const response = await request ( this . axios , this . basePath ) ;
9741033 return {
9751034 ...response ,
@@ -1026,7 +1085,7 @@ export class ComponentsApi extends BaseAPI {
10261085 */
10271086 public async getProjectComponents ( projectId : string , searchParams : ComponentsApiGetProjectComponentsSearchParams = { } , options ?: any ) : Promise < AxiosResponse < Array < Component > > > {
10281087 const componentsApiFp = ComponentsApiFp ( this . configuration ) ;
1029- const request = await componentsApiFp . getProjectComponents ( projectId , searchParams . sectionId , searchParams . sort , searchParams . limit , searchParams . offset , options ) ;
1088+ const request = await componentsApiFp . getProjectComponents ( projectId , searchParams . sectionId , searchParams . sort , searchParams . includeLatestVersion , searchParams . limit , searchParams . offset , options ) ;
10301089 const response = await request ( this . axios , this . basePath ) ;
10311090 return {
10321091 ...response ,
@@ -1046,7 +1105,7 @@ export class ComponentsApi extends BaseAPI {
10461105 */
10471106 public async getStyleguideComponent ( styleguideId : string , componentId : string , searchParams : ComponentsApiGetStyleguideComponentSearchParams = { } , options ?: any ) : Promise < AxiosResponse < Component > > {
10481107 const componentsApiFp = ComponentsApiFp ( this . configuration ) ;
1049- const request = await componentsApiFp . getStyleguideComponent ( styleguideId , componentId , searchParams . linkedProject , searchParams . linkedStyleguide , options ) ;
1108+ const request = await componentsApiFp . getStyleguideComponent ( styleguideId , componentId , searchParams . linkedProject , searchParams . linkedStyleguide , searchParams . includeLatestVersion , options ) ;
10501109 const response = await request ( this . axios , this . basePath ) ;
10511110 return {
10521111 ...response ,
@@ -1104,7 +1163,7 @@ export class ComponentsApi extends BaseAPI {
11041163 */
11051164 public async getStyleguideComponents ( styleguideId : string , searchParams : ComponentsApiGetStyleguideComponentsSearchParams = { } , options ?: any ) : Promise < AxiosResponse < Array < Component > > > {
11061165 const componentsApiFp = ComponentsApiFp ( this . configuration ) ;
1107- const request = await componentsApiFp . getStyleguideComponents ( styleguideId , searchParams . sectionId , searchParams . sort , searchParams . linkedProject , searchParams . linkedStyleguide , searchParams . limit , searchParams . offset , options ) ;
1166+ const request = await componentsApiFp . getStyleguideComponents ( styleguideId , searchParams . sectionId , searchParams . sort , searchParams . linkedProject , searchParams . linkedStyleguide , searchParams . includeLatestVersion , searchParams . limit , searchParams . offset , options ) ;
11081167 const response = await request ( this . axios , this . basePath ) ;
11091168 return {
11101169 ...response ,
0 commit comments