230 lines
7.6 KiB
TypeScript
230 lines
7.6 KiB
TypeScript
import { UserRole } from '@prisma/client';
|
|
import type { CreateCampaignInput, UpdateCampaignInput, ListCampaignsInput } from './campaigns.schemas';
|
|
interface AuthUser {
|
|
id: string;
|
|
email: string;
|
|
role: UserRole;
|
|
}
|
|
export declare const campaignsService: {
|
|
findAll(filters: ListCampaignsInput, user?: AuthUser): Promise<{
|
|
campaigns: {
|
|
status: import(".prisma/client").$Enums.CampaignStatus;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
_count: {
|
|
responses: number;
|
|
emails: number;
|
|
};
|
|
title: string;
|
|
description: string | null;
|
|
slug: string;
|
|
emailSubject: string;
|
|
emailBody: string;
|
|
callToAction: string | null;
|
|
coverPhoto: string | null;
|
|
allowSmtpEmail: boolean;
|
|
allowMailtoLink: boolean;
|
|
collectUserInfo: boolean;
|
|
showEmailCount: boolean;
|
|
showCallCount: boolean;
|
|
allowEmailEditing: boolean;
|
|
allowCustomRecipients: boolean;
|
|
showResponseWall: boolean;
|
|
highlightCampaign: boolean;
|
|
targetGovernmentLevels: import(".prisma/client").$Enums.GovernmentLevel[];
|
|
createdByUserEmail: string | null;
|
|
createdByUserName: string | null;
|
|
createdByUserId: string | null;
|
|
}[];
|
|
pagination: {
|
|
page: number;
|
|
limit: number;
|
|
total: number;
|
|
totalPages: number;
|
|
};
|
|
}>;
|
|
findById(id: string): Promise<{
|
|
status: import(".prisma/client").$Enums.CampaignStatus;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
_count: {
|
|
responses: number;
|
|
emails: number;
|
|
};
|
|
title: string;
|
|
description: string | null;
|
|
slug: string;
|
|
emailSubject: string;
|
|
emailBody: string;
|
|
callToAction: string | null;
|
|
coverPhoto: string | null;
|
|
allowSmtpEmail: boolean;
|
|
allowMailtoLink: boolean;
|
|
collectUserInfo: boolean;
|
|
showEmailCount: boolean;
|
|
showCallCount: boolean;
|
|
allowEmailEditing: boolean;
|
|
allowCustomRecipients: boolean;
|
|
showResponseWall: boolean;
|
|
highlightCampaign: boolean;
|
|
targetGovernmentLevels: import(".prisma/client").$Enums.GovernmentLevel[];
|
|
createdByUserEmail: string | null;
|
|
createdByUserName: string | null;
|
|
createdByUserId: string | null;
|
|
}>;
|
|
findBySlug(slug: string): Promise<{
|
|
status: import(".prisma/client").$Enums.CampaignStatus;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
_count: {
|
|
responses: number;
|
|
emails: number;
|
|
};
|
|
title: string;
|
|
description: string | null;
|
|
slug: string;
|
|
emailSubject: string;
|
|
emailBody: string;
|
|
callToAction: string | null;
|
|
coverPhoto: string | null;
|
|
allowSmtpEmail: boolean;
|
|
allowMailtoLink: boolean;
|
|
collectUserInfo: boolean;
|
|
showEmailCount: boolean;
|
|
showCallCount: boolean;
|
|
allowEmailEditing: boolean;
|
|
allowCustomRecipients: boolean;
|
|
showResponseWall: boolean;
|
|
highlightCampaign: boolean;
|
|
targetGovernmentLevels: import(".prisma/client").$Enums.GovernmentLevel[];
|
|
createdByUserEmail: string | null;
|
|
createdByUserName: string | null;
|
|
createdByUserId: string | null;
|
|
}>;
|
|
create(data: CreateCampaignInput, user: AuthUser): Promise<{
|
|
status: import(".prisma/client").$Enums.CampaignStatus;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
_count: {
|
|
responses: number;
|
|
emails: number;
|
|
};
|
|
title: string;
|
|
description: string | null;
|
|
slug: string;
|
|
emailSubject: string;
|
|
emailBody: string;
|
|
callToAction: string | null;
|
|
coverPhoto: string | null;
|
|
allowSmtpEmail: boolean;
|
|
allowMailtoLink: boolean;
|
|
collectUserInfo: boolean;
|
|
showEmailCount: boolean;
|
|
showCallCount: boolean;
|
|
allowEmailEditing: boolean;
|
|
allowCustomRecipients: boolean;
|
|
showResponseWall: boolean;
|
|
highlightCampaign: boolean;
|
|
targetGovernmentLevels: import(".prisma/client").$Enums.GovernmentLevel[];
|
|
createdByUserEmail: string | null;
|
|
createdByUserName: string | null;
|
|
createdByUserId: string | null;
|
|
}>;
|
|
update(id: string, data: UpdateCampaignInput): Promise<{
|
|
status: import(".prisma/client").$Enums.CampaignStatus;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
_count: {
|
|
responses: number;
|
|
emails: number;
|
|
};
|
|
title: string;
|
|
description: string | null;
|
|
slug: string;
|
|
emailSubject: string;
|
|
emailBody: string;
|
|
callToAction: string | null;
|
|
coverPhoto: string | null;
|
|
allowSmtpEmail: boolean;
|
|
allowMailtoLink: boolean;
|
|
collectUserInfo: boolean;
|
|
showEmailCount: boolean;
|
|
showCallCount: boolean;
|
|
allowEmailEditing: boolean;
|
|
allowCustomRecipients: boolean;
|
|
showResponseWall: boolean;
|
|
highlightCampaign: boolean;
|
|
targetGovernmentLevels: import(".prisma/client").$Enums.GovernmentLevel[];
|
|
createdByUserEmail: string | null;
|
|
createdByUserName: string | null;
|
|
createdByUserId: string | null;
|
|
}>;
|
|
findActiveCampaigns(): Promise<{
|
|
status: import(".prisma/client").$Enums.CampaignStatus;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
_count: {
|
|
responses: number;
|
|
emails: number;
|
|
};
|
|
title: string;
|
|
description: string | null;
|
|
slug: string;
|
|
emailSubject: string;
|
|
emailBody: string;
|
|
callToAction: string | null;
|
|
coverPhoto: string | null;
|
|
allowSmtpEmail: boolean;
|
|
allowMailtoLink: boolean;
|
|
collectUserInfo: boolean;
|
|
showEmailCount: boolean;
|
|
showCallCount: boolean;
|
|
allowEmailEditing: boolean;
|
|
allowCustomRecipients: boolean;
|
|
showResponseWall: boolean;
|
|
highlightCampaign: boolean;
|
|
targetGovernmentLevels: import(".prisma/client").$Enums.GovernmentLevel[];
|
|
createdByUserEmail: string | null;
|
|
createdByUserName: string | null;
|
|
createdByUserId: string | null;
|
|
}[]>;
|
|
findBySlugPublic(slug: string): Promise<{
|
|
status: import(".prisma/client").$Enums.CampaignStatus;
|
|
id: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
_count: {
|
|
responses: number;
|
|
emails: number;
|
|
};
|
|
title: string;
|
|
description: string | null;
|
|
slug: string;
|
|
emailSubject: string;
|
|
emailBody: string;
|
|
callToAction: string | null;
|
|
coverPhoto: string | null;
|
|
allowSmtpEmail: boolean;
|
|
allowMailtoLink: boolean;
|
|
collectUserInfo: boolean;
|
|
showEmailCount: boolean;
|
|
showCallCount: boolean;
|
|
allowEmailEditing: boolean;
|
|
allowCustomRecipients: boolean;
|
|
showResponseWall: boolean;
|
|
highlightCampaign: boolean;
|
|
targetGovernmentLevels: import(".prisma/client").$Enums.GovernmentLevel[];
|
|
createdByUserEmail: string | null;
|
|
createdByUserName: string | null;
|
|
createdByUserId: string | null;
|
|
}>;
|
|
delete(id: string): Promise<void>;
|
|
};
|
|
export {};
|
|
//# sourceMappingURL=campaigns.service.d.ts.map
|