Skip to content

Commit

Permalink
fix: restructuring to logs and exports classes
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam-pareek committed Nov 3, 2024
1 parent fd637a6 commit 07eb546
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ export { VectorStores } from './vectorStores';
export { BetaChat } from './betaChat';
export { Uploads } from './uploads';
export { ApiKeys } from './apiKeys';
export { LogsExport } from './logsExport';
export { Logs } from './logsExport';
11 changes: 9 additions & 2 deletions src/apis/logsExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { APIPromise, RequestOptions } from '../baseClient';
import { createHeaders } from './createHeaders';
import { toQueryParams } from '../utils';


export interface LogsExportCreateParams {
filters?: Record<string, any>;
workspace_id?: string;
Expand Down Expand Up @@ -71,8 +72,14 @@ export interface LogsExportDownloadParams {
export interface LogsExportDownloadResponse extends APIResponseType {
signed_url?: string;
}

export class LogsExport extends ApiResource {
export class Logs extends ApiResource {
exports: Exports;
constructor(client:any){
super(client);
this.exports = new Exports(client);
}
}
export class Exports extends ApiResource {
create(
_body: LogsExportCreateParams,
params?: ApiClientInterface,
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class Portkey extends ApiClient {
virtualKeys = new API.VirtualKeys(this);
apiKeys = new API.ApiKeys(this);
configs = new API.Configs(this);
logsExport = new API.LogsExport(this);
logs = new API.Logs(this);
beta = {
assistants: new API.Assistants(this),
threads: new API.Threads(this),
Expand Down

0 comments on commit 07eb546

Please sign in to comment.