magicbell
Version:
MagicBell API wrapper
23 lines (22 loc) • 849 B
TypeScript
import { Client } from './client.js';
import { IterablePromise } from './method.js';
import { FeatureFlag } from './types.js';
type ResourceRequestOptions = {
method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'PATCH';
path?: string;
paged?: boolean;
};
export declare class Resource {
path: string;
entity: string;
protected client: InstanceType<typeof Client>;
constructor(client: InstanceType<typeof Client>);
protected request<TData = any>(options: ResourceRequestOptions & {
paged: true;
}, ...args: (string | Record<string, unknown>)[]): IterablePromise<TData>;
protected request<TData = any>(options: ResourceRequestOptions & {
paged?: false | never;
}, ...args: (string | Record<string, unknown>)[]): Promise<TData>;
protected assertFeatureFlag(flag: FeatureFlag): void;
}
export {};