From 765d0dd2d8244437d6e48803a886f702e1743648 Mon Sep 17 00:00:00 2001 From: Mattt Date: Mon, 10 Apr 2023 14:40:23 -0700 Subject: [PATCH 1/2] Declare type for Training Signed-off-by: Mattt Zmuda --- index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.d.ts b/index.d.ts index bc5be670..b236f725 100644 --- a/index.d.ts +++ b/index.d.ts @@ -56,6 +56,8 @@ declare module 'replicate' { completed_at?: string; } + export type Training = Prediction; + export default class Replicate { constructor(options: { auth: string; From be2e459a4fd303c6e0a54d3d83665dbd354b5d1f Mon Sep 17 00:00:00 2001 From: Mattt Date: Mon, 10 Apr 2023 14:40:36 -0700 Subject: [PATCH 2/2] Fix type signatures for get and cancel trainings Signed-off-by: Mattt Zmuda --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index b236f725..311647bb 100644 --- a/index.d.ts +++ b/index.d.ts @@ -128,8 +128,8 @@ declare module 'replicate' { webhook_events_filter?: WebhookEventType[]; } ): Promise; - get(options: TrainingsGetOptions): Promise; - cancel(options: TrainingsGetOptions): Promise; + get(training_id: string): Promise; + cancel(training_id: string): Promise; }; } }