@@ -13,13 +13,13 @@ export class URLEndpoints extends APIResource {
1313 *
1414 * @example
1515 * ```ts
16- * const urlEndpoint =
16+ * const urlEndpointResponse =
1717 * await client.accounts.urlEndpoints.create({
1818 * description: 'My custom URL endpoint',
1919 * });
2020 * ```
2121 */
22- create ( body : URLEndpointCreateParams , options ?: RequestOptions ) : APIPromise < URLEndpointCreateResponse > {
22+ create ( body : URLEndpointCreateParams , options ?: RequestOptions ) : APIPromise < URLEndpointResponse > {
2323 return this . _client . post ( '/v1/accounts/url-endpoints' , { body, ...options } ) ;
2424 }
2525
@@ -29,7 +29,7 @@ export class URLEndpoints extends APIResource {
2929 *
3030 * @example
3131 * ```ts
32- * const urlEndpoint =
32+ * const urlEndpointResponse =
3333 * await client.accounts.urlEndpoints.update('id', {
3434 * description: 'My custom URL endpoint',
3535 * });
@@ -39,7 +39,7 @@ export class URLEndpoints extends APIResource {
3939 id : string ,
4040 body : URLEndpointUpdateParams ,
4141 options ?: RequestOptions ,
42- ) : APIPromise < URLEndpointUpdateResponse > {
42+ ) : APIPromise < URLEndpointResponse > {
4343 return this . _client . put ( path `/v1/accounts/url-endpoints/${ id } ` , { body, ...options } ) ;
4444 }
4545
@@ -50,7 +50,7 @@ export class URLEndpoints extends APIResource {
5050 *
5151 * @example
5252 * ```ts
53- * const urlEndpoints =
53+ * const urlEndpointResponses =
5454 * await client.accounts.urlEndpoints.list();
5555 * ```
5656 */
@@ -81,20 +81,19 @@ export class URLEndpoints extends APIResource {
8181 *
8282 * @example
8383 * ```ts
84- * const urlEndpoint = await client.accounts.urlEndpoints.get(
85- * 'id',
86- * );
84+ * const urlEndpointResponse =
85+ * await client.accounts.urlEndpoints.get('id');
8786 * ```
8887 */
89- get ( id : string , options ?: RequestOptions ) : APIPromise < URLEndpointGetResponse > {
88+ get ( id : string , options ?: RequestOptions ) : APIPromise < URLEndpointResponse > {
9089 return this . _client . get ( path `/v1/accounts/url-endpoints/${ id } ` , options ) ;
9190 }
9291}
9392
9493/**
9594 * Schema for URL endpoint resource.
9695 */
97- export interface URLEndpoint {
96+ export interface URLEndpointRequest {
9897 /**
9998 * Description of the URL endpoint.
10099 */
@@ -116,10 +115,10 @@ export interface URLEndpoint {
116115 /**
117116 * Configuration for third-party URL rewriting.
118117 */
119- urlRewriter ?: URLEndpoint . Cloudinary | URLEndpoint . Imgix | URLEndpoint . Akamai ;
118+ urlRewriter ?: URLEndpointRequest . Cloudinary | URLEndpointRequest . Imgix | URLEndpointRequest . Akamai ;
120119}
121120
122- export namespace URLEndpoint {
121+ export namespace URLEndpointRequest {
123122 export interface Cloudinary {
124123 type : 'CLOUDINARY' ;
125124
@@ -141,7 +140,7 @@ export namespace URLEndpoint {
141140/**
142141 * URL‑endpoint object as returned by the API.
143142 */
144- export interface URLEndpointCreateResponse {
143+ export interface URLEndpointResponse {
145144 /**
146145 * Unique identifier for the URL-endpoint. This is generated by ImageKit when you
147146 * create a new URL-endpoint. For the default URL-endpoint, this is always
@@ -170,13 +169,10 @@ export interface URLEndpointCreateResponse {
170169 /**
171170 * Configuration for third-party URL rewriting.
172171 */
173- urlRewriter ?:
174- | URLEndpointCreateResponse . Cloudinary
175- | URLEndpointCreateResponse . Imgix
176- | URLEndpointCreateResponse . Akamai ;
172+ urlRewriter ?: URLEndpointResponse . Cloudinary | URLEndpointResponse . Imgix | URLEndpointResponse . Akamai ;
177173}
178174
179- export namespace URLEndpointCreateResponse {
175+ export namespace URLEndpointResponse {
180176 export interface Cloudinary {
181177 /**
182178 * Whether to preserve `<asset_type>/<delivery_type>` in the rewritten URL.
@@ -195,180 +191,7 @@ export namespace URLEndpointCreateResponse {
195191 }
196192}
197193
198- /**
199- * URL‑endpoint object as returned by the API.
200- */
201- export interface URLEndpointUpdateResponse {
202- /**
203- * Unique identifier for the URL-endpoint. This is generated by ImageKit when you
204- * create a new URL-endpoint. For the default URL-endpoint, this is always
205- * `default`.
206- */
207- id : string ;
208-
209- /**
210- * Description of the URL endpoint.
211- */
212- description : string ;
213-
214- /**
215- * Ordered list of origin IDs to try when the file isn’t in the Media Library;
216- * ImageKit checks them in the sequence provided. Origin must be created before it
217- * can be used in a URL endpoint.
218- */
219- origins : Array < string > ;
220-
221- /**
222- * Path segment appended to your base URL to form the endpoint (letters, digits,
223- * and hyphens only — or empty for the default endpoint).
224- */
225- urlPrefix : string ;
226-
227- /**
228- * Configuration for third-party URL rewriting.
229- */
230- urlRewriter ?:
231- | URLEndpointUpdateResponse . Cloudinary
232- | URLEndpointUpdateResponse . Imgix
233- | URLEndpointUpdateResponse . Akamai ;
234- }
235-
236- export namespace URLEndpointUpdateResponse {
237- export interface Cloudinary {
238- /**
239- * Whether to preserve `<asset_type>/<delivery_type>` in the rewritten URL.
240- */
241- preserveAssetDeliveryTypes : boolean ;
242-
243- type : 'CLOUDINARY' ;
244- }
245-
246- export interface Imgix {
247- type : 'IMGIX' ;
248- }
249-
250- export interface Akamai {
251- type : 'AKAMAI' ;
252- }
253- }
254-
255- export type URLEndpointListResponse = Array < URLEndpointListResponse . URLEndpointListResponseItem > ;
256-
257- export namespace URLEndpointListResponse {
258- /**
259- * URL‑endpoint object as returned by the API.
260- */
261- export interface URLEndpointListResponseItem {
262- /**
263- * Unique identifier for the URL-endpoint. This is generated by ImageKit when you
264- * create a new URL-endpoint. For the default URL-endpoint, this is always
265- * `default`.
266- */
267- id : string ;
268-
269- /**
270- * Description of the URL endpoint.
271- */
272- description : string ;
273-
274- /**
275- * Ordered list of origin IDs to try when the file isn’t in the Media Library;
276- * ImageKit checks them in the sequence provided. Origin must be created before it
277- * can be used in a URL endpoint.
278- */
279- origins : Array < string > ;
280-
281- /**
282- * Path segment appended to your base URL to form the endpoint (letters, digits,
283- * and hyphens only — or empty for the default endpoint).
284- */
285- urlPrefix : string ;
286-
287- /**
288- * Configuration for third-party URL rewriting.
289- */
290- urlRewriter ?:
291- | URLEndpointListResponseItem . Cloudinary
292- | URLEndpointListResponseItem . Imgix
293- | URLEndpointListResponseItem . Akamai ;
294- }
295-
296- export namespace URLEndpointListResponseItem {
297- export interface Cloudinary {
298- /**
299- * Whether to preserve `<asset_type>/<delivery_type>` in the rewritten URL.
300- */
301- preserveAssetDeliveryTypes : boolean ;
302-
303- type : 'CLOUDINARY' ;
304- }
305-
306- export interface Imgix {
307- type : 'IMGIX' ;
308- }
309-
310- export interface Akamai {
311- type : 'AKAMAI' ;
312- }
313- }
314- }
315-
316- /**
317- * URL‑endpoint object as returned by the API.
318- */
319- export interface URLEndpointGetResponse {
320- /**
321- * Unique identifier for the URL-endpoint. This is generated by ImageKit when you
322- * create a new URL-endpoint. For the default URL-endpoint, this is always
323- * `default`.
324- */
325- id : string ;
326-
327- /**
328- * Description of the URL endpoint.
329- */
330- description : string ;
331-
332- /**
333- * Ordered list of origin IDs to try when the file isn’t in the Media Library;
334- * ImageKit checks them in the sequence provided. Origin must be created before it
335- * can be used in a URL endpoint.
336- */
337- origins : Array < string > ;
338-
339- /**
340- * Path segment appended to your base URL to form the endpoint (letters, digits,
341- * and hyphens only — or empty for the default endpoint).
342- */
343- urlPrefix : string ;
344-
345- /**
346- * Configuration for third-party URL rewriting.
347- */
348- urlRewriter ?:
349- | URLEndpointGetResponse . Cloudinary
350- | URLEndpointGetResponse . Imgix
351- | URLEndpointGetResponse . Akamai ;
352- }
353-
354- export namespace URLEndpointGetResponse {
355- export interface Cloudinary {
356- /**
357- * Whether to preserve `<asset_type>/<delivery_type>` in the rewritten URL.
358- */
359- preserveAssetDeliveryTypes : boolean ;
360-
361- type : 'CLOUDINARY' ;
362- }
363-
364- export interface Imgix {
365- type : 'IMGIX' ;
366- }
367-
368- export interface Akamai {
369- type : 'AKAMAI' ;
370- }
371- }
194+ export type URLEndpointListResponse = Array < URLEndpointResponse > ;
372195
373196export interface URLEndpointCreateParams {
374197 /**
@@ -466,11 +289,9 @@ export namespace URLEndpointUpdateParams {
466289
467290export declare namespace URLEndpoints {
468291 export {
469- type URLEndpoint as URLEndpoint ,
470- type URLEndpointCreateResponse as URLEndpointCreateResponse ,
471- type URLEndpointUpdateResponse as URLEndpointUpdateResponse ,
292+ type URLEndpointRequest as URLEndpointRequest ,
293+ type URLEndpointResponse as URLEndpointResponse ,
472294 type URLEndpointListResponse as URLEndpointListResponse ,
473- type URLEndpointGetResponse as URLEndpointGetResponse ,
474295 type URLEndpointCreateParams as URLEndpointCreateParams ,
475296 type URLEndpointUpdateParams as URLEndpointUpdateParams ,
476297 } ;
0 commit comments