2020-01-19 16:16:25 +01:00
|
|
|
export const DateFormat = "ddd D MMM YYYY, hh:mm A"
|
2018-10-25 15:51:47 +02:00
|
|
|
|
|
|
|
// Data types.
|
|
|
|
export const ModelUsers = "users"
|
|
|
|
export const ModelSubscribers = "subscribers"
|
|
|
|
export const ModelSubscribersByList = "subscribersByList"
|
|
|
|
export const ModelLists = "lists"
|
|
|
|
export const ModelMedia = "media"
|
|
|
|
export const ModelCampaigns = "campaigns"
|
|
|
|
export const ModelTemplates = "templates"
|
|
|
|
|
|
|
|
// HTTP methods.
|
|
|
|
export const MethodGet = "get"
|
|
|
|
export const MethodPost = "post"
|
|
|
|
export const MethodPut = "put"
|
|
|
|
export const MethodDelete = "delete"
|
|
|
|
|
|
|
|
// Data loading states.
|
|
|
|
export const StatePending = "pending"
|
|
|
|
export const StateDone = "done"
|
|
|
|
|
|
|
|
// Form types.
|
|
|
|
export const FormCreate = "create"
|
|
|
|
export const FormEdit = "edit"
|
|
|
|
|
|
|
|
// Message types.
|
|
|
|
export const MsgSuccess = "success"
|
|
|
|
export const MsgWarning = "warning"
|
|
|
|
export const MsgError = "error"
|
2018-11-03 13:23:22 +01:00
|
|
|
export const MsgPosition = "bottomRight"
|
2018-10-25 15:51:47 +02:00
|
|
|
|
|
|
|
// Model specific.
|
|
|
|
export const CampaignStatusColors = {
|
2019-03-09 08:46:47 +01:00
|
|
|
draft: "",
|
|
|
|
scheduled: "purple",
|
|
|
|
running: "blue",
|
|
|
|
paused: "orange",
|
|
|
|
finished: "green",
|
|
|
|
cancelled: "red"
|
2018-10-25 15:51:47 +02:00
|
|
|
}
|
|
|
|
|
2019-03-09 08:46:47 +01:00
|
|
|
export const CampaignStatusDraft = "draft"
|
2018-10-25 15:51:47 +02:00
|
|
|
export const CampaignStatusScheduled = "scheduled"
|
2019-03-09 08:46:47 +01:00
|
|
|
export const CampaignStatusRunning = "running"
|
|
|
|
export const CampaignStatusPaused = "paused"
|
|
|
|
export const CampaignStatusFinished = "finished"
|
2018-10-25 15:51:47 +02:00
|
|
|
export const CampaignStatusCancelled = "cancelled"
|
2020-02-03 08:48:26 +01:00
|
|
|
export const CampaignStatusRegular = "regular"
|
|
|
|
export const CampaignStatusOptin = "optin"
|
|
|
|
|
|
|
|
export const CampaignTypeRegular = "regular"
|
|
|
|
export const CampaignTypeOptin = "optin"
|
|
|
|
|
2020-02-03 08:47:08 +01:00
|
|
|
export const CampaignContentTypeRichtext = "richtext"
|
|
|
|
export const CampaignContentTypeHTML = "html"
|
|
|
|
export const CampaignContentTypePlain = "plain"
|
2018-10-25 15:51:47 +02:00
|
|
|
|
|
|
|
export const SubscriptionStatusConfirmed = "confirmed"
|
|
|
|
export const SubscriptionStatusUnConfirmed = "unconfirmed"
|
|
|
|
export const SubscriptionStatusUnsubscribed = "unsubscribed"
|
|
|
|
|
2019-12-01 13:18:36 +01:00
|
|
|
export const ListOptinSingle = "single"
|
|
|
|
export const ListOptinDouble = "double"
|
|
|
|
|
2018-10-25 15:51:47 +02:00
|
|
|
// API routes.
|
|
|
|
export const Routes = {
|
2019-03-09 08:46:47 +01:00
|
|
|
GetDashboarcStats: "/api/dashboard/stats",
|
|
|
|
GetUsers: "/api/users",
|
2018-10-25 15:51:47 +02:00
|
|
|
|
2019-03-09 08:46:47 +01:00
|
|
|
// Lists.
|
|
|
|
GetLists: "/api/lists",
|
|
|
|
CreateList: "/api/lists",
|
|
|
|
UpdateList: "/api/lists/:id",
|
|
|
|
DeleteList: "/api/lists/:id",
|
2018-10-25 15:51:47 +02:00
|
|
|
|
2019-03-09 08:46:47 +01:00
|
|
|
// Subscribers.
|
|
|
|
ViewSubscribers: "/subscribers",
|
|
|
|
GetSubscribers: "/api/subscribers",
|
|
|
|
GetSubscriber: "/api/subscribers/:id",
|
|
|
|
GetSubscribersByList: "/api/subscribers/lists/:listID",
|
|
|
|
PreviewCampaign: "/api/campaigns/:id/preview",
|
|
|
|
CreateSubscriber: "/api/subscribers",
|
|
|
|
UpdateSubscriber: "/api/subscribers/:id",
|
|
|
|
DeleteSubscriber: "/api/subscribers/:id",
|
|
|
|
DeleteSubscribers: "/api/subscribers",
|
2020-02-09 12:47:58 +01:00
|
|
|
SendSubscriberOptinMail: "/api/subscribers/:id/optin",
|
2019-03-09 08:46:47 +01:00
|
|
|
BlacklistSubscriber: "/api/subscribers/:id/blacklist",
|
|
|
|
BlacklistSubscribers: "/api/subscribers/blacklist",
|
|
|
|
AddSubscriberToLists: "/api/subscribers/lists/:id",
|
|
|
|
AddSubscribersToLists: "/api/subscribers/lists",
|
|
|
|
DeleteSubscribersByQuery: "/api/subscribers/query/delete",
|
|
|
|
BlacklistSubscribersByQuery: "/api/subscribers/query/blacklist",
|
|
|
|
AddSubscribersToListsByQuery: "/api/subscribers/query/lists",
|
2018-10-25 15:51:47 +02:00
|
|
|
|
2019-03-09 08:46:47 +01:00
|
|
|
// Campaigns.
|
|
|
|
ViewCampaigns: "/campaigns",
|
|
|
|
ViewCampaign: "/campaigns/:id",
|
|
|
|
GetCampaignMessengers: "/api/campaigns/messengers",
|
|
|
|
GetCampaigns: "/api/campaigns",
|
|
|
|
GetCampaign: "/api/campaigns/:id",
|
|
|
|
GetRunningCampaignStats: "/api/campaigns/running/stats",
|
|
|
|
CreateCampaign: "/api/campaigns",
|
|
|
|
TestCampaign: "/api/campaigns/:id/test",
|
|
|
|
UpdateCampaign: "/api/campaigns/:id",
|
|
|
|
UpdateCampaignStatus: "/api/campaigns/:id/status",
|
|
|
|
DeleteCampaign: "/api/campaigns/:id",
|
2018-10-25 15:51:47 +02:00
|
|
|
|
2019-03-09 08:46:47 +01:00
|
|
|
// Media.
|
|
|
|
GetMedia: "/api/media",
|
|
|
|
AddMedia: "/api/media",
|
|
|
|
DeleteMedia: "/api/media/:id",
|
|
|
|
|
|
|
|
// Templates.
|
|
|
|
GetTemplates: "/api/templates",
|
|
|
|
PreviewTemplate: "/api/templates/:id/preview",
|
|
|
|
PreviewNewTemplate: "/api/templates/preview",
|
|
|
|
CreateTemplate: "/api/templates",
|
|
|
|
UpdateTemplate: "/api/templates/:id",
|
|
|
|
SetDefaultTemplate: "/api/templates/:id/default",
|
|
|
|
DeleteTemplate: "/api/templates/:id",
|
|
|
|
|
|
|
|
// Import.
|
|
|
|
UploadRouteImport: "/api/import/subscribers",
|
|
|
|
GetRouteImportStats: "/api/import/subscribers",
|
|
|
|
GetRouteImportLogs: "/api/import/subscribers/logs"
|
2018-10-25 15:51:47 +02:00
|
|
|
}
|