@forge/bridge

5.18.0-next.1-experimental-44b7a125.18.0-next.2
out/types.d.ts
~out/types.d.tsModified
+23−1
Index: package/out/types.d.ts
===================================================================
--- package/out/types.d.ts
+++ package/out/types.d.ts
@@ -3,9 +3,31 @@
 import { type Scopes, type External } from '@forge/manifest';
 export declare type InvokePayload = {
     [key in number | string]: any;
 };
-export declare type InvokeResponse = Record<string, any> | void;
+export declare type InvokeResponseBody = Record<string, any> | void;
+export declare type RateLimitProperties = {
+    rateLimitRemaining?: number;
+    rateLimitReset?: number;
+    rateLimitLimit?: number;
+};
+declare type InvokeMetadataDefinition = {
+    rateLimitProperties: {
+        request: boolean;
+        response: RateLimitProperties;
+    };
+};
+export declare type InvokeMetadata = {
+    [K in keyof InvokeMetadataDefinition]?: InvokeMetadataDefinition[K]['request'];
+};
+export declare type InvokeResponseMetadata = {
+    [K in keyof InvokeMetadataDefinition]?: InvokeMetadataDefinition[K]['response'];
+};
+export declare type InvokeResponseWithMetadata<T = InvokeResponseBody> = {
+    body: T;
+    metadata?: InvokeResponseMetadata;
+};
+export declare type InvokeResponse<T = InvokeResponseBody> = T | InvokeResponseWithMetadata<T>;
 declare type FetchResponse = {
     body?: string;
     headers: {
         [key: string]: string;