From 7925b99f0515cd4af257287a64270a890a5bab39 Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Fri, 8 Sep 2023 08:09:06 -0500 Subject: [PATCH] fix: change name of public facing clients. Changes TurboPrivateClient and TurboPublicClient to TurboUnauthenticatedClient and TurboAuthenticatedClient --- .gitignore | 3 +++ src/common/turbo.ts | 10 ++++++---- src/types/turbo.ts | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f672b392..066424ea 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ yarn-error.log # Build files **/*.min.js + +# Any local builds +*.tgz diff --git a/src/common/turbo.ts b/src/common/turbo.ts index 86a6f6cc..8995c517 100644 --- a/src/common/turbo.ts +++ b/src/common/turbo.ts @@ -17,6 +17,7 @@ import { Currency, TurboAbortSignal, + TurboAuthenticatedClientInterface, TurboAuthenticatedPaymentServiceInterface, TurboAuthenticatedUploadServiceInterface, TurboBalanceResponse, @@ -25,12 +26,11 @@ import { TurboFiatToArResponse, TurboFileFactory, TurboPriceResponse, - TurboPrivateClient, TurboPrivateClientConfiguration, - TurboPublicClient, TurboPublicClientConfiguration, TurboRatesResponse, TurboSignedDataItemFactory, + TurboUnauthenticatedClientInterface, TurboUnauthenticatedPaymentServiceInterface, TurboUnauthenticatedUploadServiceInterface, TurboUploadDataItemResponse, @@ -38,7 +38,9 @@ import { import { TurboUnauthenticatedPaymentService } from './payment.js'; import { TurboUnauthenticatedUploadService } from './upload.js'; -export class TurboUnauthenticatedClient implements TurboPublicClient { +export class TurboUnauthenticatedClient + implements TurboUnauthenticatedClientInterface +{ protected readonly paymentService: TurboUnauthenticatedPaymentServiceInterface; protected readonly uploadService: TurboUnauthenticatedUploadServiceInterface; @@ -126,7 +128,7 @@ export class TurboUnauthenticatedClient implements TurboPublicClient { export class TurboAuthenticatedClient extends TurboUnauthenticatedClient - implements TurboPrivateClient + implements TurboAuthenticatedClientInterface { protected readonly paymentService: TurboAuthenticatedPaymentServiceInterface; protected readonly uploadService: TurboAuthenticatedUploadServiceInterface; diff --git a/src/types/turbo.ts b/src/types/turbo.ts index 5a294b44..a0e282c1 100644 --- a/src/types/turbo.ts +++ b/src/types/turbo.ts @@ -198,9 +198,9 @@ export interface TurboAuthenticatedUploadServiceInterface }: TurboFileFactory & TurboAbortSignal): Promise; } -export interface TurboPublicClient +export interface TurboUnauthenticatedClientInterface extends TurboUnauthenticatedPaymentServiceInterface, TurboUnauthenticatedUploadServiceInterface {} -export interface TurboPrivateClient +export interface TurboAuthenticatedClientInterface extends TurboAuthenticatedPaymentServiceInterface, TurboAuthenticatedUploadServiceInterface {}