"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidSubsriptionStatusError = exports.MissingIosPushTokenIfIosPushSubscriptionIsPresentError = exports.MissingAndroidPushTokenIfAndroidPushSubscriptionIsPresentError = exports.InvalidGroupSubscriptionStatusError = exports.InvalidSubscriptionStatusError = exports.MissingEmailSubscriptionIfSubscriptionGroupsIsPresentError = exports.MissingSubscriptionStatusesError = exports.MissingPhoneIfSmsOrWhatsappSubscriptionIsPresentError = exports.MissingEmailIfEmailSubscriptionIsPresentError = exports.MissingExternalIdsError = exports.InvalidEndpointSelectedThrowableError = exports.MissingUserOrAnonymousIdThrowableError = exports.SegmentPublicAPIError = void 0;
const actions_core_1 = require("@segment/actions-core");
class SegmentPublicAPIError extends actions_core_1.HTTPError {
}
exports.SegmentPublicAPIError = SegmentPublicAPIError;
exports.MissingUserOrAnonymousIdThrowableError = new actions_core_1.PayloadValidationError('Either `Anonymous ID` or `User ID` must be defined.');
exports.InvalidEndpointSelectedThrowableError = new actions_core_1.PayloadValidationError('A valid endpoint must be selected. Please check your Segment settings.');
exports.MissingExternalIdsError = new actions_core_1.PayloadValidationError('Either `Email` or `Phone` or `Android_Push_Token` or `Ios_Push_Token` must be defined.');
exports.MissingEmailIfEmailSubscriptionIsPresentError = new actions_core_1.PayloadValidationError('A valid `Email` must be defined for `Email_Subscription`.');
exports.MissingPhoneIfSmsOrWhatsappSubscriptionIsPresentError = new actions_core_1.PayloadValidationError('A valid `Phone` must be defined for `Sms_Subscription` or `Whatsapp_Subscription`.');
exports.MissingSubscriptionStatusesError = new actions_core_1.PayloadValidationError('If any of `Email`, `Phone`, `Android_Push_Token` or `Ios_Push_Token` is present, `Email_Subscription` or `Sms_Subscription` or `Whatsapp_Subscription` or `Ios_Push_Subscription` or `Android_Push_Subscription` must be defined.');
exports.MissingEmailSubscriptionIfSubscriptionGroupsIsPresentError = new actions_core_1.PayloadValidationError('`Email_Subscription` must be defined if Subscription Groups are present.');
exports.InvalidSubscriptionStatusError = new actions_core_1.PayloadValidationError('Invalid Subscription Status in `Email_Subscription` or `Sms_Subscription` or `Whatsapp_Subscription` or `Android_Push_Subscription` or `Ios_Push_Subscription`.');
exports.InvalidGroupSubscriptionStatusError = new actions_core_1.PayloadValidationError('Invalid Subscription Status for subscription groups.');
exports.MissingAndroidPushTokenIfAndroidPushSubscriptionIsPresentError = new actions_core_1.PayloadValidationError('A valid `Android_Push_Token` must be defined for `Android_Push_Subscription`.');
exports.MissingIosPushTokenIfIosPushSubscriptionIsPresentError = new actions_core_1.PayloadValidationError('A valid `Ios_Push_Token` must be defined for `Ios_Push_Subscription`.');
exports.InvalidSubsriptionStatusError = new actions_core_1.PayloadValidationError('Invalid Subscription Status.');
//# sourceMappingURL=errors.js.map