Skip to content

Commit

Permalink
chore: rename from PrincipalStrategy to BaseStrategy
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Sankeerth committed Dec 6, 2024
1 parent b98629d commit 0927438
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -48,4 +48,4 @@ class PrincipalStrategy {
}
}

export { PrincipalStrategy };
export { BaseStrategy };
4 changes: 2 additions & 2 deletions src/v1/destinations/iterable/strategies/generic.ts
Original file line number Diff line number Diff line change
@@ -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[];
Expand Down
4 changes: 2 additions & 2 deletions src/v1/destinations/iterable/strategies/track-identify.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 0927438

Please sign in to comment.