@@ -68,7 +68,7 @@ export class Items {
6868 Authorization : await this . _getAuthorizationHeader ( ) ,
6969 "X-Fern-Language" : "JavaScript" ,
7070 "X-Fern-SDK-Name" : "webflow-api" ,
71- "X-Fern-SDK-Version" : "2.3.1 " ,
71+ "X-Fern-SDK-Version" : "2.3.2 " ,
7272 "X-Fern-Runtime" : core . RUNTIME . type ,
7373 "X-Fern-Runtime-Version" : core . RUNTIME . version ,
7474 } ,
@@ -160,7 +160,7 @@ export class Items {
160160 Authorization : await this . _getAuthorizationHeader ( ) ,
161161 "X-Fern-Language" : "JavaScript" ,
162162 "X-Fern-SDK-Name" : "webflow-api" ,
163- "X-Fern-SDK-Version" : "2.3.1 " ,
163+ "X-Fern-SDK-Version" : "2.3.2 " ,
164164 "X-Fern-Runtime" : core . RUNTIME . type ,
165165 "X-Fern-Runtime-Version" : core . RUNTIME . version ,
166166 } ,
@@ -208,6 +208,104 @@ export class Items {
208208 }
209209 }
210210
211+ /**
212+ * List of all live Items within a Collection. </br></br> Required scope | `CMS:read`
213+ * @throws {@link Webflow.BadRequestError }
214+ * @throws {@link Webflow.UnauthorizedError }
215+ * @throws {@link Webflow.NotFoundError }
216+ * @throws {@link Webflow.TooManyRequestsError }
217+ * @throws {@link Webflow.InternalServerError }
218+ *
219+ * @example
220+ * await webflow.collections.items.listItemsLive("collection_id", {})
221+ */
222+ public async listItemsLive (
223+ collectionId : string ,
224+ request : Webflow . collections . ItemsListItemsLiveRequest = { } ,
225+ requestOptions ?: Items . RequestOptions
226+ ) : Promise < Webflow . CollectionItemList > {
227+ const { cmsLocaleIds, offset, limit } = request ;
228+ const _queryParams : Record < string , string | string [ ] | object | object [ ] > = { } ;
229+ if ( cmsLocaleIds != null ) {
230+ if ( Array . isArray ( cmsLocaleIds ) ) {
231+ _queryParams [ "cmsLocaleIds" ] = cmsLocaleIds . map ( ( item ) => item ) ;
232+ } else {
233+ _queryParams [ "cmsLocaleIds" ] = cmsLocaleIds ;
234+ }
235+ }
236+
237+ if ( offset != null ) {
238+ _queryParams [ "offset" ] = offset . toString ( ) ;
239+ }
240+
241+ if ( limit != null ) {
242+ _queryParams [ "limit" ] = limit . toString ( ) ;
243+ }
244+
245+ const _response = await core . fetcher ( {
246+ url : urlJoin (
247+ ( await core . Supplier . get ( this . _options . environment ) ) ?? environments . WebflowEnvironment . Default ,
248+ `collections/${ collectionId } /items/live`
249+ ) ,
250+ method : "GET" ,
251+ headers : {
252+ Authorization : await this . _getAuthorizationHeader ( ) ,
253+ "X-Fern-Language" : "JavaScript" ,
254+ "X-Fern-SDK-Name" : "webflow-api" ,
255+ "X-Fern-SDK-Version" : "2.3.2" ,
256+ "X-Fern-Runtime" : core . RUNTIME . type ,
257+ "X-Fern-Runtime-Version" : core . RUNTIME . version ,
258+ } ,
259+ contentType : "application/json" ,
260+ queryParameters : _queryParams ,
261+ timeoutMs : requestOptions ?. timeoutInSeconds != null ? requestOptions . timeoutInSeconds * 1000 : 60000 ,
262+ maxRetries : requestOptions ?. maxRetries ,
263+ } ) ;
264+ if ( _response . ok ) {
265+ return await serializers . CollectionItemList . parseOrThrow ( _response . body , {
266+ unrecognizedObjectKeys : "passthrough" ,
267+ allowUnrecognizedUnionMembers : true ,
268+ allowUnrecognizedEnumValues : true ,
269+ skipValidation : true ,
270+ breadcrumbsPrefix : [ "response" ] ,
271+ } ) ;
272+ }
273+
274+ if ( _response . error . reason === "status-code" ) {
275+ switch ( _response . error . statusCode ) {
276+ case 400 :
277+ throw new Webflow . BadRequestError ( _response . error . body ) ;
278+ case 401 :
279+ throw new Webflow . UnauthorizedError ( _response . error . body ) ;
280+ case 404 :
281+ throw new Webflow . NotFoundError ( _response . error . body ) ;
282+ case 429 :
283+ throw new Webflow . TooManyRequestsError ( _response . error . body ) ;
284+ case 500 :
285+ throw new Webflow . InternalServerError ( _response . error . body ) ;
286+ default :
287+ throw new errors . WebflowError ( {
288+ statusCode : _response . error . statusCode ,
289+ body : _response . error . body ,
290+ } ) ;
291+ }
292+ }
293+
294+ switch ( _response . error . reason ) {
295+ case "non-json" :
296+ throw new errors . WebflowError ( {
297+ statusCode : _response . error . statusCode ,
298+ body : _response . error . rawBody ,
299+ } ) ;
300+ case "timeout" :
301+ throw new errors . WebflowTimeoutError ( ) ;
302+ case "unknown" :
303+ throw new errors . WebflowError ( {
304+ message : _response . error . errorMessage ,
305+ } ) ;
306+ }
307+ }
308+
211309 /**
212310 * Create live Item in a Collection. This Item will be published to the live site. </br></br> To create items across multiple locales, <a href="https://developers.webflow.com/data/reference/create-item-for-multiple-locales"> please use this endpoint.</a> </br></br> Required scope | `CMS:write`
213311 * @throws {@link Webflow.BadRequestError }
@@ -246,7 +344,7 @@ export class Items {
246344 Authorization : await this . _getAuthorizationHeader ( ) ,
247345 "X-Fern-Language" : "JavaScript" ,
248346 "X-Fern-SDK-Name" : "webflow-api" ,
249- "X-Fern-SDK-Version" : "2.3.1 " ,
347+ "X-Fern-SDK-Version" : "2.3.2 " ,
250348 "X-Fern-Runtime" : core . RUNTIME . type ,
251349 "X-Fern-Runtime-Version" : core . RUNTIME . version ,
252350 } ,
@@ -328,7 +426,7 @@ export class Items {
328426 Authorization : await this . _getAuthorizationHeader ( ) ,
329427 "X-Fern-Language" : "JavaScript" ,
330428 "X-Fern-SDK-Name" : "webflow-api" ,
331- "X-Fern-SDK-Version" : "2.3.1 " ,
429+ "X-Fern-SDK-Version" : "2.3.2 " ,
332430 "X-Fern-Runtime" : core . RUNTIME . type ,
333431 "X-Fern-Runtime-Version" : core . RUNTIME . version ,
334432 } ,
@@ -411,7 +509,7 @@ export class Items {
411509 Authorization : await this . _getAuthorizationHeader ( ) ,
412510 "X-Fern-Language" : "JavaScript" ,
413511 "X-Fern-SDK-Name" : "webflow-api" ,
414- "X-Fern-SDK-Version" : "2.3.1 " ,
512+ "X-Fern-SDK-Version" : "2.3.2 " ,
415513 "X-Fern-Runtime" : core . RUNTIME . type ,
416514 "X-Fern-Runtime-Version" : core . RUNTIME . version ,
417515 } ,
@@ -502,7 +600,7 @@ export class Items {
502600 Authorization : await this . _getAuthorizationHeader ( ) ,
503601 "X-Fern-Language" : "JavaScript" ,
504602 "X-Fern-SDK-Name" : "webflow-api" ,
505- "X-Fern-SDK-Version" : "2.3.1 " ,
603+ "X-Fern-SDK-Version" : "2.3.2 " ,
506604 "X-Fern-Runtime" : core . RUNTIME . type ,
507605 "X-Fern-Runtime-Version" : core . RUNTIME . version ,
508606 } ,
@@ -589,7 +687,7 @@ export class Items {
589687 Authorization : await this . _getAuthorizationHeader ( ) ,
590688 "X-Fern-Language" : "JavaScript" ,
591689 "X-Fern-SDK-Name" : "webflow-api" ,
592- "X-Fern-SDK-Version" : "2.3.1 " ,
690+ "X-Fern-SDK-Version" : "2.3.2 " ,
593691 "X-Fern-Runtime" : core . RUNTIME . type ,
594692 "X-Fern-Runtime-Version" : core . RUNTIME . version ,
595693 } ,
@@ -669,7 +767,7 @@ export class Items {
669767 Authorization : await this . _getAuthorizationHeader ( ) ,
670768 "X-Fern-Language" : "JavaScript" ,
671769 "X-Fern-SDK-Name" : "webflow-api" ,
672- "X-Fern-SDK-Version" : "2.3.1 " ,
770+ "X-Fern-SDK-Version" : "2.3.2 " ,
673771 "X-Fern-Runtime" : core . RUNTIME . type ,
674772 "X-Fern-Runtime-Version" : core . RUNTIME . version ,
675773 } ,
@@ -755,7 +853,7 @@ export class Items {
755853 Authorization : await this . _getAuthorizationHeader ( ) ,
756854 "X-Fern-Language" : "JavaScript" ,
757855 "X-Fern-SDK-Name" : "webflow-api" ,
758- "X-Fern-SDK-Version" : "2.3.1 " ,
856+ "X-Fern-SDK-Version" : "2.3.2 " ,
759857 "X-Fern-Runtime" : core . RUNTIME . type ,
760858 "X-Fern-Runtime-Version" : core . RUNTIME . version ,
761859 } ,
@@ -837,7 +935,7 @@ export class Items {
837935 Authorization : await this . _getAuthorizationHeader ( ) ,
838936 "X-Fern-Language" : "JavaScript" ,
839937 "X-Fern-SDK-Name" : "webflow-api" ,
840- "X-Fern-SDK-Version" : "2.3.1 " ,
938+ "X-Fern-SDK-Version" : "2.3.2 " ,
841939 "X-Fern-Runtime" : core . RUNTIME . type ,
842940 "X-Fern-Runtime-Version" : core . RUNTIME . version ,
843941 } ,
0 commit comments