@vicacha-devs/strapi-plugin-broadcasts 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +15 -2
- package/dist/admin/BroadcastsHomePage-CM_N_spo.mjs +1210 -0
- package/dist/admin/BroadcastsHomePage-DQueM7nj.js +1228 -0
- package/dist/admin/SettingsPage-TawvAAiv.js +1187 -0
- package/dist/admin/SettingsPage-ikcb0cfh.mjs +1169 -0
- package/dist/admin/ar-vwekVqfp.js +232 -0
- package/dist/admin/ar-wZTCd3Za.mjs +232 -0
- package/dist/admin/de-IZicxuvv.mjs +232 -0
- package/dist/admin/de-Qa2SQQfY.js +232 -0
- package/dist/admin/en-B-HnZo8U.mjs +232 -0
- package/dist/admin/en-D1byrK0s.js +232 -0
- package/dist/admin/es-Co7PmAj8.mjs +232 -0
- package/dist/admin/es-Dgylqagv.js +232 -0
- package/dist/admin/fr-B9zZn3z1.mjs +232 -0
- package/dist/admin/fr-C7-MIWnw.js +232 -0
- package/dist/admin/index-CApLw9Uu.mjs +1036 -0
- package/dist/admin/index-Dw6J7U1v.js +1053 -0
- package/dist/admin/index.js +6 -0
- package/dist/admin/index.mjs +6 -0
- package/dist/admin/it-DJU9iBqT.mjs +232 -0
- package/dist/admin/it-D_mulZtx.js +232 -0
- package/dist/admin/pt-B9swwjPu.js +232 -0
- package/dist/admin/pt-Dr8u5we0.mjs +232 -0
- package/dist/admin/ru-B0NNiMNA.js +232 -0
- package/dist/admin/ru-Bd4cEKDV.mjs +232 -0
- package/dist/admin/selectOptions-BlvNrhvc.mjs +150 -0
- package/dist/admin/selectOptions-DuHQ0KK3.js +149 -0
- package/dist/admin/src/components/AutomationAndLogsTabs.d.ts +16 -0
- package/dist/admin/src/components/BridgesSandboxTab.d.ts +8 -0
- package/dist/admin/src/components/CampaignComposerForm.d.ts +26 -0
- package/dist/admin/src/components/CampaignsTableSection.d.ts +27 -0
- package/dist/admin/src/components/DeliveryLedgerSection.d.ts +17 -0
- package/dist/admin/src/components/Initializer.d.ts +6 -0
- package/dist/admin/src/components/OrganizationEmailTab.d.ts +10 -0
- package/dist/admin/src/components/PluginIcon.d.ts +3 -0
- package/dist/admin/src/components/WhatsAppTransportTab.d.ts +11 -0
- package/dist/admin/src/index.d.ts +24 -0
- package/dist/admin/src/pages/BroadcastsHomePage.d.ts +2 -0
- package/dist/admin/src/pages/SettingsPage.d.ts +3 -0
- package/dist/admin/src/permissions.d.ts +30 -0
- package/dist/admin/src/pluginId.d.ts +2 -0
- package/dist/admin/src/translations/cmLabels.d.ts +1 -0
- package/dist/admin/src/translations/cmLabelsExtra.d.ts +1 -0
- package/dist/admin/src/translations/cmPlaceholders.d.ts +1 -0
- package/dist/admin/src/translations/cmPlaceholdersExtra.d.ts +1 -0
- package/dist/admin/src/utils/extractApiError.d.ts +1 -0
- package/dist/admin/src/utils/selectOptions.d.ts +21 -0
- package/dist/admin/tr-Cc-ItZUP.js +232 -0
- package/dist/admin/tr-DlyHa2Vk.mjs +232 -0
- package/dist/admin/zh-CLzJ7x3y.mjs +232 -0
- package/dist/admin/zh-CaqwZk-p.js +232 -0
- package/dist/server/index.js +3399 -0
- package/dist/server/index.mjs +3399 -0
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/config/index.d.ts +5 -0
- package/dist/server/src/content-types/automation-rule/index.d.ts +90 -0
- package/dist/server/src/content-types/automation-rule/schema.json.d.ts +90 -0
- package/dist/server/src/content-types/campaign/index.d.ts +118 -0
- package/dist/server/src/content-types/campaign/schema.json.d.ts +118 -0
- package/dist/server/src/content-types/delivery-log/index.d.ts +71 -0
- package/dist/server/src/content-types/delivery-log/schema.json.d.ts +71 -0
- package/dist/server/src/content-types/index.d.ts +279 -0
- package/dist/server/src/controllers/broadcastController.d.ts +32 -0
- package/dist/server/src/controllers/index.d.ts +22 -0
- package/dist/server/src/destroy.d.ts +5 -0
- package/dist/server/src/eventHubRegistry.d.ts +5 -0
- package/dist/server/src/index.d.ts +463 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/routes/admin.d.ts +17 -0
- package/dist/server/src/routes/content-api.d.ts +13 -0
- package/dist/server/src/routes/index.d.ts +31 -0
- package/dist/server/src/services/automationService.d.ts +33 -0
- package/dist/server/src/services/campaignChannelDispatch.d.ts +20 -0
- package/dist/server/src/services/campaignHelpers.d.ts +20 -0
- package/dist/server/src/services/campaignLifecycle.d.ts +23 -0
- package/dist/server/src/services/campaignService.d.ts +54 -0
- package/dist/server/src/services/deliveryLedger.d.ts +18 -0
- package/dist/server/src/services/emailDesignerBridge.d.ts +30 -0
- package/dist/server/src/services/idempotency.d.ts +5 -0
- package/dist/server/src/services/index.d.ts +119 -0
- package/dist/server/src/services/settings.d.ts +12 -0
- package/dist/server/src/services/transportService.d.ts +70 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +825 -0
- package/dist/shared/index.mjs +823 -0
- package/package.json +109 -3
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
function extractApiErrorMessage(err, fallbackMessage) {
|
|
2
|
+
if (err && typeof err === "object") {
|
|
3
|
+
const candidate = err;
|
|
4
|
+
const nestedError = candidate.response?.data?.error;
|
|
5
|
+
if (typeof nestedError === "string" && nestedError.trim()) {
|
|
6
|
+
return nestedError.trim();
|
|
7
|
+
}
|
|
8
|
+
if (nestedError && typeof nestedError === "object" && typeof nestedError.message === "string" && nestedError.message.trim()) {
|
|
9
|
+
return nestedError.message.trim();
|
|
10
|
+
}
|
|
11
|
+
const dataMsg = candidate.response?.data?.message;
|
|
12
|
+
if (typeof dataMsg === "string" && dataMsg.trim()) {
|
|
13
|
+
return dataMsg.trim();
|
|
14
|
+
}
|
|
15
|
+
if (typeof candidate.message === "string" && candidate.message.trim()) {
|
|
16
|
+
return candidate.message.trim();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return fallbackMessage;
|
|
20
|
+
}
|
|
21
|
+
function getBroadcastTopicOptions(t) {
|
|
22
|
+
return [
|
|
23
|
+
{
|
|
24
|
+
value: "announcements",
|
|
25
|
+
label: t(
|
|
26
|
+
"option.topic.announcements",
|
|
27
|
+
"announcements — General Mosque Announcements"
|
|
28
|
+
)
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: "events",
|
|
32
|
+
label: t(
|
|
33
|
+
"option.topic.events",
|
|
34
|
+
"events — Community Events & Conferences"
|
|
35
|
+
)
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
value: "courses",
|
|
39
|
+
label: t(
|
|
40
|
+
"option.topic.courses",
|
|
41
|
+
"courses — Arabic, Quran & Islamic Studies Courses"
|
|
42
|
+
)
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
value: "ramadan_eid",
|
|
46
|
+
label: t(
|
|
47
|
+
"option.topic.ramadan_eid",
|
|
48
|
+
"ramadan_eid — Ramadan, Suhoor/Iftar & Eid Bulletins"
|
|
49
|
+
)
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
value: "urgent_janazah",
|
|
53
|
+
label: t(
|
|
54
|
+
"option.topic.urgent_janazah",
|
|
55
|
+
"urgent_janazah — Urgent Janazah & Funeral Alerts"
|
|
56
|
+
)
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
value: "newsletter",
|
|
60
|
+
label: t(
|
|
61
|
+
"option.topic.newsletter",
|
|
62
|
+
"newsletter — Weekly Jumu'ah & Community Newsletter"
|
|
63
|
+
)
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
value: "khutbahs",
|
|
67
|
+
label: t(
|
|
68
|
+
"option.topic.khutbahs",
|
|
69
|
+
"khutbahs — Friday Khutbah Summaries & Audio"
|
|
70
|
+
)
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
value: "charity_campaigns",
|
|
74
|
+
label: t(
|
|
75
|
+
"option.topic.charity_campaigns",
|
|
76
|
+
"charity_campaigns — Zakat & Relief Campaigns"
|
|
77
|
+
)
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
value: "youth_programs",
|
|
81
|
+
label: t(
|
|
82
|
+
"option.topic.youth_programs",
|
|
83
|
+
"youth_programs — Youth, Sisters & Family Programs"
|
|
84
|
+
)
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
value: "new_muslims",
|
|
88
|
+
label: t(
|
|
89
|
+
"option.topic.new_muslims",
|
|
90
|
+
"new_muslims — New Muslim Circle & Mentorship"
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
function getBroadcastChannelOptions(t) {
|
|
96
|
+
return [
|
|
97
|
+
{
|
|
98
|
+
value: "email",
|
|
99
|
+
label: t("option.channel.email", "email — Email Newsletter & Bulletins")
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
value: "telegram",
|
|
103
|
+
label: t(
|
|
104
|
+
"option.channel.telegram",
|
|
105
|
+
"telegram — Telegram Bot & Forum Topics"
|
|
106
|
+
)
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
value: "whatsapp",
|
|
110
|
+
label: t(
|
|
111
|
+
"option.channel.whatsapp",
|
|
112
|
+
"whatsapp — WhatsApp Cloud API / Gateway"
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
function getWhatsAppDriverOptions(t) {
|
|
118
|
+
return [
|
|
119
|
+
{
|
|
120
|
+
value: "meta-cloud",
|
|
121
|
+
label: t(
|
|
122
|
+
"option.driver.meta_cloud",
|
|
123
|
+
"Meta WhatsApp Cloud API (Official WABA — meta-cloud)"
|
|
124
|
+
)
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
value: "evolution",
|
|
128
|
+
label: t(
|
|
129
|
+
"option.driver.evolution",
|
|
130
|
+
"Evolution API v2 Self-Hosted Gateway (evolution)"
|
|
131
|
+
)
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
value: "openwa",
|
|
135
|
+
label: t("option.driver.openwa", "OpenWA Self-Hosted Gateway (openwa)")
|
|
136
|
+
}
|
|
137
|
+
];
|
|
138
|
+
}
|
|
139
|
+
getBroadcastTopicOptions(
|
|
140
|
+
(_id, fallback) => fallback
|
|
141
|
+
);
|
|
142
|
+
getBroadcastChannelOptions(
|
|
143
|
+
(_id, fallback) => fallback
|
|
144
|
+
);
|
|
145
|
+
export {
|
|
146
|
+
getBroadcastChannelOptions as a,
|
|
147
|
+
getWhatsAppDriverOptions as b,
|
|
148
|
+
extractApiErrorMessage as e,
|
|
149
|
+
getBroadcastTopicOptions as g
|
|
150
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function extractApiErrorMessage(err, fallbackMessage) {
|
|
3
|
+
if (err && typeof err === "object") {
|
|
4
|
+
const candidate = err;
|
|
5
|
+
const nestedError = candidate.response?.data?.error;
|
|
6
|
+
if (typeof nestedError === "string" && nestedError.trim()) {
|
|
7
|
+
return nestedError.trim();
|
|
8
|
+
}
|
|
9
|
+
if (nestedError && typeof nestedError === "object" && typeof nestedError.message === "string" && nestedError.message.trim()) {
|
|
10
|
+
return nestedError.message.trim();
|
|
11
|
+
}
|
|
12
|
+
const dataMsg = candidate.response?.data?.message;
|
|
13
|
+
if (typeof dataMsg === "string" && dataMsg.trim()) {
|
|
14
|
+
return dataMsg.trim();
|
|
15
|
+
}
|
|
16
|
+
if (typeof candidate.message === "string" && candidate.message.trim()) {
|
|
17
|
+
return candidate.message.trim();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return fallbackMessage;
|
|
21
|
+
}
|
|
22
|
+
function getBroadcastTopicOptions(t) {
|
|
23
|
+
return [
|
|
24
|
+
{
|
|
25
|
+
value: "announcements",
|
|
26
|
+
label: t(
|
|
27
|
+
"option.topic.announcements",
|
|
28
|
+
"announcements — General Mosque Announcements"
|
|
29
|
+
)
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: "events",
|
|
33
|
+
label: t(
|
|
34
|
+
"option.topic.events",
|
|
35
|
+
"events — Community Events & Conferences"
|
|
36
|
+
)
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: "courses",
|
|
40
|
+
label: t(
|
|
41
|
+
"option.topic.courses",
|
|
42
|
+
"courses — Arabic, Quran & Islamic Studies Courses"
|
|
43
|
+
)
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
value: "ramadan_eid",
|
|
47
|
+
label: t(
|
|
48
|
+
"option.topic.ramadan_eid",
|
|
49
|
+
"ramadan_eid — Ramadan, Suhoor/Iftar & Eid Bulletins"
|
|
50
|
+
)
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
value: "urgent_janazah",
|
|
54
|
+
label: t(
|
|
55
|
+
"option.topic.urgent_janazah",
|
|
56
|
+
"urgent_janazah — Urgent Janazah & Funeral Alerts"
|
|
57
|
+
)
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: "newsletter",
|
|
61
|
+
label: t(
|
|
62
|
+
"option.topic.newsletter",
|
|
63
|
+
"newsletter — Weekly Jumu'ah & Community Newsletter"
|
|
64
|
+
)
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
value: "khutbahs",
|
|
68
|
+
label: t(
|
|
69
|
+
"option.topic.khutbahs",
|
|
70
|
+
"khutbahs — Friday Khutbah Summaries & Audio"
|
|
71
|
+
)
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
value: "charity_campaigns",
|
|
75
|
+
label: t(
|
|
76
|
+
"option.topic.charity_campaigns",
|
|
77
|
+
"charity_campaigns — Zakat & Relief Campaigns"
|
|
78
|
+
)
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
value: "youth_programs",
|
|
82
|
+
label: t(
|
|
83
|
+
"option.topic.youth_programs",
|
|
84
|
+
"youth_programs — Youth, Sisters & Family Programs"
|
|
85
|
+
)
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
value: "new_muslims",
|
|
89
|
+
label: t(
|
|
90
|
+
"option.topic.new_muslims",
|
|
91
|
+
"new_muslims — New Muslim Circle & Mentorship"
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
function getBroadcastChannelOptions(t) {
|
|
97
|
+
return [
|
|
98
|
+
{
|
|
99
|
+
value: "email",
|
|
100
|
+
label: t("option.channel.email", "email — Email Newsletter & Bulletins")
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
value: "telegram",
|
|
104
|
+
label: t(
|
|
105
|
+
"option.channel.telegram",
|
|
106
|
+
"telegram — Telegram Bot & Forum Topics"
|
|
107
|
+
)
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: "whatsapp",
|
|
111
|
+
label: t(
|
|
112
|
+
"option.channel.whatsapp",
|
|
113
|
+
"whatsapp — WhatsApp Cloud API / Gateway"
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
];
|
|
117
|
+
}
|
|
118
|
+
function getWhatsAppDriverOptions(t) {
|
|
119
|
+
return [
|
|
120
|
+
{
|
|
121
|
+
value: "meta-cloud",
|
|
122
|
+
label: t(
|
|
123
|
+
"option.driver.meta_cloud",
|
|
124
|
+
"Meta WhatsApp Cloud API (Official WABA — meta-cloud)"
|
|
125
|
+
)
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
value: "evolution",
|
|
129
|
+
label: t(
|
|
130
|
+
"option.driver.evolution",
|
|
131
|
+
"Evolution API v2 Self-Hosted Gateway (evolution)"
|
|
132
|
+
)
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
value: "openwa",
|
|
136
|
+
label: t("option.driver.openwa", "OpenWA Self-Hosted Gateway (openwa)")
|
|
137
|
+
}
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
getBroadcastTopicOptions(
|
|
141
|
+
(_id, fallback) => fallback
|
|
142
|
+
);
|
|
143
|
+
getBroadcastChannelOptions(
|
|
144
|
+
(_id, fallback) => fallback
|
|
145
|
+
);
|
|
146
|
+
exports.extractApiErrorMessage = extractApiErrorMessage;
|
|
147
|
+
exports.getBroadcastChannelOptions = getBroadcastChannelOptions;
|
|
148
|
+
exports.getBroadcastTopicOptions = getBroadcastTopicOptions;
|
|
149
|
+
exports.getWhatsAppDriverOptions = getWhatsAppDriverOptions;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AutomationRuleRecord, BroadcastChannel, DeliveryLogRecord } from '../../../shared/types';
|
|
2
|
+
import { TranslateFn } from './DeliveryLedgerSection';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export declare function parseChannelsInput(raw: string | string[], fallback?: BroadcastChannel[]): BroadcastChannel[];
|
|
5
|
+
export interface AutomationAndLogsTabsProps {
|
|
6
|
+
activeTab: "campaigns" | "automations" | "logs";
|
|
7
|
+
rules: AutomationRuleRecord[];
|
|
8
|
+
logs: DeliveryLogRecord[];
|
|
9
|
+
t: TranslateFn;
|
|
10
|
+
navigate: (path: string) => void;
|
|
11
|
+
post: (url: string, body?: unknown) => Promise<unknown>;
|
|
12
|
+
put: (url: string, body?: unknown) => Promise<unknown>;
|
|
13
|
+
notifyStatus: (msg: string, isError?: boolean) => void;
|
|
14
|
+
loadAll: () => Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export declare const AutomationAndLogsTabs: React.FC<AutomationAndLogsTabsProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BroadcastSettings } from '../../../shared/types';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface BridgesSandboxTabProps {
|
|
4
|
+
settings: BroadcastSettings;
|
|
5
|
+
setSettings: (next: BroadcastSettings | ((prev: BroadcastSettings) => BroadcastSettings)) => void;
|
|
6
|
+
t: (id: string, defaultMessage: string) => string;
|
|
7
|
+
}
|
|
8
|
+
export declare const BridgesSandboxTab: React.FC<BridgesSandboxTabProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BroadcastChannel, EmailDesignerTemplateSummary } from '../../../shared/types';
|
|
2
|
+
import { TranslateFn } from './DeliveryLedgerSection';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export interface CampaignComposerFormProps {
|
|
5
|
+
t: TranslateFn;
|
|
6
|
+
editingCampaignId: string | null;
|
|
7
|
+
isBusy: boolean;
|
|
8
|
+
newSlug: string;
|
|
9
|
+
setNewSlug: (val: string) => void;
|
|
10
|
+
newTitle: string;
|
|
11
|
+
setNewTitle: (val: string) => void;
|
|
12
|
+
newTopic: string;
|
|
13
|
+
setNewTopic: (val: string) => void;
|
|
14
|
+
newChannels: BroadcastChannel[];
|
|
15
|
+
setNewChannels: (val: BroadcastChannel[]) => void;
|
|
16
|
+
newEmailTemplateRef: string;
|
|
17
|
+
setNewEmailTemplateRef: (val: string) => void;
|
|
18
|
+
newSubject: string;
|
|
19
|
+
setNewSubject: (val: string) => void;
|
|
20
|
+
newBodyText: string;
|
|
21
|
+
setNewBodyText: (val: string) => void;
|
|
22
|
+
emailTemplates: EmailDesignerTemplateSummary[];
|
|
23
|
+
onCancelEdit: () => void;
|
|
24
|
+
onSave: () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const CampaignComposerForm: React.FC<CampaignComposerFormProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CampaignRecord, EmailDesignerTemplateSummary } from '../../../shared/types';
|
|
2
|
+
import { TranslateFn } from './DeliveryLedgerSection';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export declare const RequiredTextField: React.FC<{
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
hint: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
value: string;
|
|
10
|
+
onChange: (val: string) => void;
|
|
11
|
+
}>;
|
|
12
|
+
export interface EmailTemplateFieldProps {
|
|
13
|
+
t: TranslateFn;
|
|
14
|
+
emailTemplates: EmailDesignerTemplateSummary[];
|
|
15
|
+
value: string;
|
|
16
|
+
onChange: (nextVal: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const EmailTemplateSelectorField: React.FC<EmailTemplateFieldProps>;
|
|
19
|
+
export interface CampaignsTableSectionProps {
|
|
20
|
+
t: TranslateFn;
|
|
21
|
+
campaigns: CampaignRecord[];
|
|
22
|
+
onEdit: (camp: CampaignRecord) => void;
|
|
23
|
+
onDispatch: (slugOrDocId?: string) => void;
|
|
24
|
+
navigate: (path: string) => void;
|
|
25
|
+
isBusy?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare const CampaignsTableSection: React.FC<CampaignsTableSectionProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AutomationRuleRecord, DeliveryLogRecord } from '../../../shared/types';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type TranslateFn = (id: string, defaultMessage: string) => string;
|
|
4
|
+
export interface DeliveryLedgerSectionProps {
|
|
5
|
+
t: TranslateFn;
|
|
6
|
+
logs: DeliveryLogRecord[];
|
|
7
|
+
}
|
|
8
|
+
export declare const DeliveryLedgerSection: React.FC<DeliveryLedgerSectionProps>;
|
|
9
|
+
export interface AutomationRulesTableProps {
|
|
10
|
+
t: TranslateFn;
|
|
11
|
+
rules: AutomationRuleRecord[];
|
|
12
|
+
onEdit: (rule: AutomationRuleRecord) => void;
|
|
13
|
+
onToggleActive: (rule: AutomationRuleRecord) => void;
|
|
14
|
+
navigate: (path: string) => void;
|
|
15
|
+
isBusy?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const AutomationRulesTable: React.FC<AutomationRulesTableProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BroadcastSettings } from '../../../shared/types';
|
|
2
|
+
import { BROADCAST_CHANNEL_OPTIONS, BROADCAST_TOPIC_OPTIONS, getBroadcastChannelOptions, getBroadcastTopicOptions } from '../utils/selectOptions';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export { BROADCAST_CHANNEL_OPTIONS, BROADCAST_TOPIC_OPTIONS, getBroadcastChannelOptions, getBroadcastTopicOptions, };
|
|
5
|
+
export interface OrganizationEmailTabProps {
|
|
6
|
+
settings: BroadcastSettings;
|
|
7
|
+
setSettings: (next: BroadcastSettings | ((prev: BroadcastSettings) => BroadcastSettings)) => void;
|
|
8
|
+
t: (id: string, defaultMessage: string) => string;
|
|
9
|
+
}
|
|
10
|
+
export declare const OrganizationEmailTab: React.FC<OrganizationEmailTabProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BroadcastSettings } from '../../../shared/types';
|
|
2
|
+
import { getWhatsAppDriverOptions } from '../utils/selectOptions';
|
|
3
|
+
import { TranslateFn } from './DeliveryLedgerSection';
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
export { getWhatsAppDriverOptions };
|
|
6
|
+
export interface WhatsAppTransportTabProps {
|
|
7
|
+
settings: BroadcastSettings;
|
|
8
|
+
setSettings: (next: BroadcastSettings | ((prev: BroadcastSettings) => BroadcastSettings)) => void;
|
|
9
|
+
t: TranslateFn;
|
|
10
|
+
}
|
|
11
|
+
export declare const WhatsAppTransportTab: React.FC<WhatsAppTransportTabProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { pluginPermissions } from './permissions';
|
|
2
|
+
export { pluginPermissions };
|
|
3
|
+
export declare const SUPPORTED_ADMIN_LOCALES: readonly ["en", "es", "ar", "fr", "de", "pt", "it", "tr", "ru", "zh"];
|
|
4
|
+
declare const _default: {
|
|
5
|
+
register(app: {
|
|
6
|
+
addMenuLink: (link: Record<string, unknown>) => void;
|
|
7
|
+
addSettingsLink?: (sectionId: string, link: Record<string, unknown>) => void;
|
|
8
|
+
createSettingSection: (section: {
|
|
9
|
+
id: string;
|
|
10
|
+
intlLabel: {
|
|
11
|
+
id: string;
|
|
12
|
+
defaultMessage: string;
|
|
13
|
+
};
|
|
14
|
+
}, links: Array<Record<string, unknown>>) => void;
|
|
15
|
+
registerPlugin: (plugin: Record<string, unknown>) => void;
|
|
16
|
+
}): void;
|
|
17
|
+
registerTrads: ({ locales, }?: {
|
|
18
|
+
locales?: string[];
|
|
19
|
+
}) => Promise<Array<{
|
|
20
|
+
data: Record<string, string>;
|
|
21
|
+
locale: string;
|
|
22
|
+
}>>;
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const pluginPermissions: {
|
|
2
|
+
read: {
|
|
3
|
+
action: string;
|
|
4
|
+
subject: null;
|
|
5
|
+
}[];
|
|
6
|
+
campaignsManage: {
|
|
7
|
+
action: string;
|
|
8
|
+
subject: null;
|
|
9
|
+
}[];
|
|
10
|
+
campaignsSend: {
|
|
11
|
+
action: string;
|
|
12
|
+
subject: null;
|
|
13
|
+
}[];
|
|
14
|
+
automationsManage: {
|
|
15
|
+
action: string;
|
|
16
|
+
subject: null;
|
|
17
|
+
}[];
|
|
18
|
+
settingsManage: {
|
|
19
|
+
action: string;
|
|
20
|
+
subject: null;
|
|
21
|
+
}[];
|
|
22
|
+
main: {
|
|
23
|
+
action: string;
|
|
24
|
+
subject: null;
|
|
25
|
+
}[];
|
|
26
|
+
settings: {
|
|
27
|
+
action: string;
|
|
28
|
+
subject: null;
|
|
29
|
+
}[];
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CM_LABEL_TRANSLATIONS: Record<string, Record<string, string>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CM_LABEL_TRANSLATIONS_EXTRA: Record<string, Record<string, string>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CM_PLACEHOLDER_TRANSLATIONS: Record<string, Record<string, string>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CM_PLACEHOLDER_TRANSLATIONS_EXTRA: Record<string, Record<string, string>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function extractApiErrorMessage(err: unknown, fallbackMessage: string): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BroadcastChannel, WhatsAppDriver } from '../../../shared/types';
|
|
2
|
+
export declare function getBroadcastTopicOptions(t: (id: string, defaultMessage: string) => string): Array<{
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function getBroadcastChannelOptions(t: (id: string, defaultMessage: string) => string): Array<{
|
|
7
|
+
value: BroadcastChannel;
|
|
8
|
+
label: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function getWhatsAppDriverOptions(t: (id: string, defaultMessage: string) => string): Array<{
|
|
11
|
+
value: WhatsAppDriver;
|
|
12
|
+
label: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const BROADCAST_TOPIC_OPTIONS: {
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}[];
|
|
18
|
+
export declare const BROADCAST_CHANNEL_OPTIONS: {
|
|
19
|
+
value: BroadcastChannel;
|
|
20
|
+
label: string;
|
|
21
|
+
}[];
|