From 0927438ee5be3cd6692fd89945ff117e3b96668a Mon Sep 17 00:00:00 2001 From: Sai Sankeerth Date: Fri, 6 Dec 2024 20:09:29 +0530 Subject: [PATCH] chore: rename from PrincipalStrategy to BaseStrategy --- .../iterable/strategies/{principal.ts => base.ts} | 6 +++--- src/v1/destinations/iterable/strategies/generic.ts | 4 ++-- src/v1/destinations/iterable/strategies/track-identify.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename src/v1/destinations/iterable/strategies/{principal.ts => base.ts} (92%) diff --git a/src/v1/destinations/iterable/strategies/principal.ts b/src/v1/destinations/iterable/strategies/base.ts similarity index 92% rename from src/v1/destinations/iterable/strategies/principal.ts rename to src/v1/destinations/iterable/strategies/base.ts index 7d0a9019a6..650750bf39 100644 --- a/src/v1/destinations/iterable/strategies/principal.ts +++ b/src/v1/destinations/iterable/strategies/base.ts @@ -4,8 +4,8 @@ import { isHttpStatusSuccess } from '../../../../v0/util'; import { TransformerProxyError } from '../../../../v0/util/errorTypes'; import { DestinationResponse, ResponseParams } from '../types'; -// Principal strategy is the base class for all strategies in Iterable destination -class PrincipalStrategy { +// Base strategy is the base class for all strategies in Iterable destination +class BaseStrategy { handleResponse(responseParams: { destinationResponse: DestinationResponse }): void { const { destinationResponse } = responseParams; const { status } = destinationResponse; @@ -48,4 +48,4 @@ class PrincipalStrategy { } } -export { PrincipalStrategy }; +export { BaseStrategy }; diff --git a/src/v1/destinations/iterable/strategies/generic.ts b/src/v1/destinations/iterable/strategies/generic.ts index fa13f71a97..2702875610 100644 --- a/src/v1/destinations/iterable/strategies/generic.ts +++ b/src/v1/destinations/iterable/strategies/generic.ts @@ -1,7 +1,7 @@ -import { PrincipalStrategy } from './principal'; +import { BaseStrategy } from './base'; import { DestinationResponse, SuccessResponse } from '../types'; -class GenericStrategy extends PrincipalStrategy { +class GenericStrategy extends BaseStrategy { handleSuccess(responseParams: { destinationResponse: DestinationResponse; rudderJobMetadata: any[]; diff --git a/src/v1/destinations/iterable/strategies/track-identify.ts b/src/v1/destinations/iterable/strategies/track-identify.ts index 170d1e4130..7c242f3ac7 100644 --- a/src/v1/destinations/iterable/strategies/track-identify.ts +++ b/src/v1/destinations/iterable/strategies/track-identify.ts @@ -1,8 +1,8 @@ -import { PrincipalStrategy } from './principal'; +import { BaseStrategy } from './base'; import { DestinationResponse, ResponseParams, Response } from '../types'; import { checkIfEventIsAbortableAndExtractErrorMessage } from '../../../../v0/destinations/iterable/util'; -class TrackIdentifyStrategy extends PrincipalStrategy { +class TrackIdentifyStrategy extends BaseStrategy { handleSuccess(responseParams: ResponseParams): { status: number; message: string;