Skip to content

Commit 1943294

Browse files
authored
Update type definitions for trainings (replicate#45)
* Declare type for Training Signed-off-by: Mattt Zmuda <[email protected]> * Fix type signatures for get and cancel trainings Signed-off-by: Mattt Zmuda <[email protected]> --------- Signed-off-by: Mattt Zmuda <[email protected]>
1 parent 586cd61 commit 1943294

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ declare module 'replicate' {
5656
completed_at?: string;
5757
}
5858

59+
export type Training = Prediction;
60+
5961
export default class Replicate {
6062
constructor(options: {
6163
auth: string;
@@ -126,8 +128,8 @@ declare module 'replicate' {
126128
webhook_events_filter?: WebhookEventType[];
127129
}
128130
): Promise<Training>;
129-
get(options: TrainingsGetOptions): Promise<Training>;
130-
cancel(options: TrainingsGetOptions): Promise<Training>;
131+
get(training_id: string): Promise<Training>;
132+
cancel(training_id: string): Promise<Training>;
131133
};
132134
}
133135
}

0 commit comments

Comments
 (0)