From 729d9a48f9b3d97a531fb7113761eb56e87740b5 Mon Sep 17 00:00:00 2001 From: Naman Anand Date: Fri, 6 Oct 2023 17:30:35 +0530 Subject: [PATCH] chore: update apiToken data type (#35) Because - update apiToken data type This commit - update apiToken data type --- README.md | 2 +- src/connector/ConnectorClient.ts | 2 +- src/helper/createClient.ts | 2 +- src/index.ts | 2 +- src/metric/MetricClient.ts | 2 +- src/mgmt/AuthClient.ts | 2 +- src/model/ModelClient.ts | 2 +- src/operation/OperationClient.ts | 2 +- src/pipeline/PipelineClient.ts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b0c6046..9cea278 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ import InstillClient from "@instill-ai/typescript-sdk"; ``` baseUrl: string appVersion: string -apiToken: Nullable +apiToken: string ``` ## Example app templetes diff --git a/src/connector/ConnectorClient.ts b/src/connector/ConnectorClient.ts index 153be84..cdac03c 100644 --- a/src/connector/ConnectorClient.ts +++ b/src/connector/ConnectorClient.ts @@ -26,7 +26,7 @@ class ConnectorClient { constructor( baseUrl: string, appVersion: string, - apiToken: Nullable + apiToken: string ) { let URL: Nullable = `${baseUrl}/vdp/${appVersion}`; diff --git a/src/helper/createClient.ts b/src/helper/createClient.ts index 8f564a0..77c398c 100644 --- a/src/helper/createClient.ts +++ b/src/helper/createClient.ts @@ -3,7 +3,7 @@ import { env } from "./config"; import { Nullable } from "../types"; export function createClient( - apiToken: Nullable, + apiToken: string, product: "base" | "model" | "vdp", headers?: AxiosHeaders ) { diff --git a/src/index.ts b/src/index.ts index cffb77b..e7b27c1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,7 +17,7 @@ class InstillClient { constructor( baseUrl: string, appVersion: string, - apiToken: Nullable + apiToken: string ) { this.Pipeline = new PipelineClient(baseUrl, appVersion, apiToken); this.Auth = new AuthClient(baseUrl, appVersion, apiToken); diff --git a/src/metric/MetricClient.ts b/src/metric/MetricClient.ts index 79bde66..f4a8b53 100644 --- a/src/metric/MetricClient.ts +++ b/src/metric/MetricClient.ts @@ -16,7 +16,7 @@ class MetricClient { constructor( baseUrl: string, appVersion: string, - apiToken: Nullable + apiToken: string ) { let URL: Nullable = `${baseUrl}/base/${appVersion}`; diff --git a/src/mgmt/AuthClient.ts b/src/mgmt/AuthClient.ts index baf29fa..b843b93 100644 --- a/src/mgmt/AuthClient.ts +++ b/src/mgmt/AuthClient.ts @@ -22,7 +22,7 @@ class AuthClient { constructor( baseUrl: string, appVersion: string, - apiToken: Nullable + apiToken: string ) { let URL: Nullable = `${baseUrl}/base/${appVersion}`; diff --git a/src/model/ModelClient.ts b/src/model/ModelClient.ts index 4868f24..3292e06 100644 --- a/src/model/ModelClient.ts +++ b/src/model/ModelClient.ts @@ -24,7 +24,7 @@ class ModelClient { constructor( baseUrl: string, appVersion: string, - apiToken: Nullable + apiToken: string ) { let URL: Nullable = `${baseUrl}/model/${appVersion}`; diff --git a/src/operation/OperationClient.ts b/src/operation/OperationClient.ts index f40eddc..60e0c8c 100644 --- a/src/operation/OperationClient.ts +++ b/src/operation/OperationClient.ts @@ -8,7 +8,7 @@ class OperationClient { constructor( baseUrl: string, appVersion: string, - apiToken: Nullable + apiToken: string ) { let URL: Nullable = `${baseUrl}/model/${appVersion}`; diff --git a/src/pipeline/PipelineClient.ts b/src/pipeline/PipelineClient.ts index b559a48..e726e13 100644 --- a/src/pipeline/PipelineClient.ts +++ b/src/pipeline/PipelineClient.ts @@ -37,7 +37,7 @@ class PipelineClient { constructor( baseUrl: string, appVersion: string, - apiToken: Nullable + apiToken: string ) { let URL: Nullable = `${baseUrl}/vdp/${appVersion}`;