@swell/cli
Version:
Swell's command line interface/utility
95 lines (94 loc) • 2.13 kB
TypeScript
/**
* @fileoverview Type definitions for the application.
*/
import type { default as Conf } from 'conf';
declare namespace Api {
export interface AuthenticationHeaders {
publicKey?: string;
secretKey?: string;
sessionId?: string;
}
/**
* The paths to the API endpoints. Typically a Command will define the
* path to the API endpoint it needs.
*/
export interface Paths {
adminPath?: string;
backendPath?: string;
frontendPath?: string;
}
type RequestInit = import('node-fetch').RequestInit;
/**
* The options to pass to our generic API request function. This extends
* the built-in fetch RequestInit interface.
*/
export interface RequestOptions extends RequestInit {
body?: any;
headers?: Record<string, string>;
onAsyncGetPath?: (response: any) => Paths;
query?: any;
sessionId?: string;
spinner?: any;
rawResponse?: boolean;
}
export {};
}
export default Api;
/**
* The configuration of an app as defined by the developer.
*/
export interface LocalApp extends Conf<App> {
swDirPath: string;
}
export interface AppCommandOrientation {
env?: string;
storeId?: string;
}
/**
* A log item as defined by the Swell API.
*/
export interface LogItem {
app: string;
data: string;
date: string;
env: string;
ip: string;
req: string;
request: string;
status: string;
time: string;
type: string;
}
export interface Store {
name: string;
email: string;
sessionId: string;
storeId: string;
}
export interface User {
email: string;
name: string;
}
export interface UserAuthorization {
client_id: string;
client_name: string;
}
export interface App {
id: string;
name: string;
type: string;
private_id: string;
public_id?: string;
}
export interface Model {
name: string;
namespace?: string;
app_id?: string;
deprecated?: boolean;
fields: {
[key: string]: {
name: string;
type: string;
};
};
}