portkey-ai
Version:
Node client library for the Portkey API
67 lines (66 loc) • 2.19 kB
TypeScript
import { ApiResource } from '../apiResource';
import { APIResponseType, ApiClientInterface } from '../_types/generalTypes';
import { APIPromise, RequestOptions } from '../baseClient';
export interface ConfigsAddParams {
name?: string;
config?: Record<string, any>;
isDefault?: number;
workspace_id?: string;
}
export interface ConfigsAddResponse extends APIResponseType {
id?: string;
version_id?: string;
slug?: string;
object?: string;
}
export interface ConfigsGetParams {
slug?: string;
}
export interface ConfigsGetResponse extends APIResponseType {
id?: string;
name?: string;
workspace_id?: string;
slug?: string;
organization_id?: string;
is_default?: number;
status?: string;
owner_id?: string;
created_at?: string;
updated_by?: string;
last_updated_at?: string;
config?: Record<string, any>;
format?: string;
type?: string;
version_id?: string;
object?: string;
}
export interface CongfigsListParams {
workspace_id?: string;
}
export interface ConfigsListResponse extends APIResponseType {
object?: boolean;
total?: number;
data?: Record<string, any>[];
}
export interface ConfigsUpdateParams {
slug?: string;
name?: string;
config?: Record<string, any>;
status?: string;
}
export interface ConfigsUpdateResponse extends APIResponseType {
version_id?: string;
object?: string;
}
export interface ConfigsDeleteParams {
id?: string;
slug?: string;
}
export declare class Configs extends ApiResource {
constructor(client: any);
create(_body: ConfigsAddParams, params?: ApiClientInterface, opts?: RequestOptions): APIPromise<ConfigsAddResponse>;
retrieve(_body: ConfigsGetParams, params?: ApiClientInterface, opts?: RequestOptions): APIPromise<ConfigsGetResponse>;
update(_body: ConfigsUpdateParams, params?: ApiClientInterface, opts?: RequestOptions): APIPromise<ConfigsUpdateResponse>;
list(_body?: CongfigsListParams, params?: ApiClientInterface, opts?: RequestOptions): APIPromise<ConfigsListResponse>;
delete(_body: ConfigsDeleteParams, params?: ApiClientInterface, opts?: RequestOptions): APIPromise<any>;
}