@@ -97,6 +97,19 @@ export class Extensions extends APIResource {
9797 } ) ;
9898 }
9999
100+ /**
101+ * Get an extension's metadata (name, size, timestamps) by ID or name, without
102+ * downloading the archive.
103+ *
104+ * @example
105+ * ```ts
106+ * const extension = await client.extensions.get('id_or_name');
107+ * ```
108+ */
109+ get ( idOrName : string , options ?: RequestOptions ) : APIPromise < ExtensionGetResponse > {
110+ return this . _client . get ( path `/extensions/${ idOrName } /metadata` , options ) ;
111+ }
112+
100113 /**
101114 * Upload a zip file containing an unpacked browser extension. Optionally provide a
102115 * unique name for later reference.
@@ -146,6 +159,37 @@ export interface ExtensionListResponse {
146159 name ?: string | null ;
147160}
148161
162+ /**
163+ * A browser extension uploaded to Kernel.
164+ */
165+ export interface ExtensionGetResponse {
166+ /**
167+ * Unique identifier for the extension
168+ */
169+ id : string ;
170+
171+ /**
172+ * Timestamp when the extension was created
173+ */
174+ created_at : string ;
175+
176+ /**
177+ * Size of the extension archive in bytes
178+ */
179+ size_bytes : number ;
180+
181+ /**
182+ * Timestamp when the extension was last used
183+ */
184+ last_used_at ?: string | null ;
185+
186+ /**
187+ * Optional, easier-to-reference name for the extension. Must be unique within the
188+ * project.
189+ */
190+ name ?: string | null ;
191+ }
192+
149193/**
150194 * A browser extension uploaded to Kernel.
151195 */
@@ -211,6 +255,7 @@ export interface ExtensionUploadParams {
211255export declare namespace Extensions {
212256 export {
213257 type ExtensionListResponse as ExtensionListResponse ,
258+ type ExtensionGetResponse as ExtensionGetResponse ,
214259 type ExtensionUploadResponse as ExtensionUploadResponse ,
215260 type ExtensionListResponsesOffsetPagination as ExtensionListResponsesOffsetPagination ,
216261 type ExtensionListParams as ExtensionListParams ,
0 commit comments