@fly/sprites
Version:
JavaScript/TypeScript SDK for Sprites - remote command execution
51 lines • 1.52 kB
TypeScript
/**
* Sprites client implementation
*/
import { Sprite } from './sprite.js';
import type { ClientOptions, SpriteConfig, SpriteList, ListOptions } from './types.js';
/**
* Main client for interacting with the Sprites API
*/
export declare class SpritesClient {
readonly baseURL: string;
readonly token: string;
private readonly timeout;
constructor(token: string, options?: ClientOptions);
/**
* Get a handle to a sprite (doesn't create it on the server)
*/
sprite(name: string): Sprite;
/**
* Create a new sprite
*/
createSprite(name: string, config?: SpriteConfig): Promise<Sprite>;
/**
* Get information about a sprite
*/
getSprite(name: string): Promise<Sprite>;
/**
* List sprites with optional filtering and pagination
*/
listSprites(options?: ListOptions): Promise<SpriteList>;
/**
* List all sprites, handling pagination automatically
*/
listAllSprites(prefix?: string): Promise<Sprite[]>;
/**
* Delete a sprite
*/
deleteSprite(name: string): Promise<void>;
/**
* Upgrade a sprite to the latest version
*/
upgradeSprite(name: string): Promise<void>;
/**
* Create a sprite access token using a Fly.io macaroon token
*/
static createToken(flyMacaroon: string, orgSlug: string, inviteCode?: string): Promise<string>;
/**
* Wrapper around fetch for consistent error handling
*/
private fetch;
}
//# sourceMappingURL=client.d.ts.map