@octaviaflow/core 3.1.0-beta.88 → 3.1.0-beta.90
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/dist/components/ScheduleBuilder/ScheduleBuilder.d.ts +0 -1
- package/dist/components/ScheduleBuilder/ScheduleBuilder.d.ts.map +1 -1
- package/dist/email/emailPalette.d.ts +53 -0
- package/dist/email/emailPalette.d.ts.map +1 -0
- package/dist/email/emailSystem.d.ts +42 -0
- package/dist/email/emailSystem.d.ts.map +1 -0
- package/dist/email/emailTemplates.d.ts +11 -0
- package/dist/email/emailTemplates.d.ts.map +1 -0
- package/dist/index.cjs +27 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -4
- package/dist/index.js.map +1 -1
- package/dist/notifications/components/NotificationChannelForm/NotificationChannelForm.d.ts.map +1 -1
- package/dist/notifications/engine/channels.d.ts +5 -1
- package/dist/notifications/engine/channels.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduleBuilder.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduleBuilder/ScheduleBuilder.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAO3D,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ScheduleBuilder.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduleBuilder/ScheduleBuilder.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAO3D,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAO3D,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExF;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EA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ent: "#0F62FE";
|
|
3
|
+
readonly accentHover: "#0353E9";
|
|
4
|
+
readonly accentPress: "#002D9C";
|
|
5
|
+
readonly accentSoft: "#EDF4FF";
|
|
6
|
+
readonly accentBorder: "#C6DBFF";
|
|
7
|
+
readonly ink: "#0A0A0A";
|
|
8
|
+
readonly body: "#404040";
|
|
9
|
+
readonly muted: "#707070";
|
|
10
|
+
readonly borderSubtle: "#EEEEEE";
|
|
11
|
+
readonly border: "#E5E5E5";
|
|
12
|
+
readonly borderStrong: "#D4D4D4";
|
|
13
|
+
readonly canvas: "#F4F4F4";
|
|
14
|
+
readonly surface: "#FFFFFF";
|
|
15
|
+
readonly error: "#DA1E28";
|
|
16
|
+
readonly warning: "#B28600";
|
|
17
|
+
readonly success: "#198038";
|
|
18
|
+
readonly rButton: "2px";
|
|
19
|
+
readonly rCard: "4px";
|
|
20
|
+
};
|
|
21
|
+
export type EmailPalette = typeof EMAIL;
|
|
22
|
+
export declare const EMAIL_BRAND: {
|
|
23
|
+
readonly site: "https://octaviaflow.com";
|
|
24
|
+
readonly app: "https://app.octaviaflow.com";
|
|
25
|
+
readonly supportEmail: "support@octaviaflow.com";
|
|
26
|
+
readonly logoUrl: "https://octaviaflow.com/images/icon.png";
|
|
27
|
+
readonly logoSize: 44;
|
|
28
|
+
readonly logoAlt: "Octaviaflow";
|
|
29
|
+
readonly socials: readonly [{
|
|
30
|
+
readonly label: "X";
|
|
31
|
+
readonly href: "https://x.com/octaviaflow_";
|
|
32
|
+
}, {
|
|
33
|
+
readonly label: "LinkedIn";
|
|
34
|
+
readonly href: "https://linkedin.com/company/octaviaflow";
|
|
35
|
+
}];
|
|
36
|
+
readonly legal: readonly [{
|
|
37
|
+
readonly label: "Privacy Policy";
|
|
38
|
+
readonly href: "https://octaviaflow.com/privacy-policy";
|
|
39
|
+
}, {
|
|
40
|
+
readonly label: "Terms";
|
|
41
|
+
readonly href: "https://octaviaflow.com/terms-and-conditions";
|
|
42
|
+
}, {
|
|
43
|
+
readonly label: "Unsubscribe";
|
|
44
|
+
readonly href: "{{unsubscribe_url}}";
|
|
45
|
+
}];
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* A tracked link to a marketing-site page. Every outbound link carries UTM so
|
|
49
|
+
* email-driven visits are attributable. `medium` is the email family
|
|
50
|
+
* (transactional / notification / marketing / report); `campaign` the template id.
|
|
51
|
+
*/
|
|
52
|
+
export declare function trackedUrl(path: string, medium: string, campaign: string): string;
|
|
53
|
+
//# sourceMappingURL=emailPalette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailPalette.d.ts","sourceRoot":"","sources":["../../src/email/emailPalette.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;CA2BR,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,KAAK,CAAC;AAKxC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;CAkBd,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,MAAM,CAMR"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type EmailMedium = 'transactional' | 'notification' | 'marketing' | 'report';
|
|
2
|
+
export interface EmailStat {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
/** Optional sub-line, e.g. a delta ("+12% vs last week"). */
|
|
6
|
+
sub?: string;
|
|
7
|
+
tone?: 'accent' | 'error' | 'warning' | 'success' | 'muted';
|
|
8
|
+
}
|
|
9
|
+
export interface EmailContent {
|
|
10
|
+
/** Template id → utm_campaign. */
|
|
11
|
+
id: string;
|
|
12
|
+
medium: EmailMedium;
|
|
13
|
+
preheader: string;
|
|
14
|
+
tone?: 'accent' | 'error' | 'warning' | 'success';
|
|
15
|
+
eyebrow?: string;
|
|
16
|
+
heading: string;
|
|
17
|
+
subheading?: string;
|
|
18
|
+
greeting?: string;
|
|
19
|
+
paragraphs: string[];
|
|
20
|
+
/** Big-number tiles (reports). */
|
|
21
|
+
stats?: EmailStat[];
|
|
22
|
+
/** Key/value list (alerts). */
|
|
23
|
+
facts?: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}[];
|
|
27
|
+
cta?: {
|
|
28
|
+
label: string;
|
|
29
|
+
href: string;
|
|
30
|
+
};
|
|
31
|
+
/** Raw URL shown under the CTA ("or copy and paste this link"). */
|
|
32
|
+
linkFallback?: string;
|
|
33
|
+
callout?: {
|
|
34
|
+
title: string;
|
|
35
|
+
text: string;
|
|
36
|
+
};
|
|
37
|
+
/** Show the "Need help?" support block. */
|
|
38
|
+
help?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** Render a complete email from content. This is THE Octaviaflow email. */
|
|
41
|
+
export declare function renderEmail(c: EmailContent): string;
|
|
42
|
+
//# sourceMappingURL=emailSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailSystem.d.ts","sourceRoot":"","sources":["../../src/email/emailSystem.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,cAAc,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEpF,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;CAC7D;AAED,MAAM,WAAW,YAAY;IAC3B,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,+BAA+B;IAC/B,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3C,GAAG,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,2CAA2C;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAwGD,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,CAqEnD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EmailContent } from './emailSystem';
|
|
2
|
+
export interface EmailTemplateGroup {
|
|
3
|
+
category: string;
|
|
4
|
+
templates: {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
content: EmailContent;
|
|
8
|
+
}[];
|
|
9
|
+
}
|
|
10
|
+
export declare const EMAIL_TEMPLATE_GROUPS: EmailTemplateGroup[];
|
|
11
|
+
//# sourceMappingURL=emailTemplates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailTemplates.d.ts","sourceRoot":"","sources":["../../src/email/emailTemplates.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AA8OlD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,YAAY,CAAA;KAAE,EAAE,CAAC;CACnE;AAED,eAAO,MAAM,qBAAqB,EAAE,kBAAkB,EAgCrD,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -13211,7 +13211,6 @@ var TimezonePicker = (0, import_react73.forwardRef)(
|
|
|
13211
13211
|
TimezonePicker.displayName = "TimezonePicker";
|
|
13212
13212
|
|
|
13213
13213
|
// src/components/ScheduleBuilder/ScheduleBuilder.tsx
|
|
13214
|
-
var import_ScheduleBuilder_module = require("./ScheduleBuilder.module.scss");
|
|
13215
13214
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
13216
13215
|
var FREQUENCY_LABELS = {
|
|
13217
13216
|
immediate: "Immediately",
|
|
@@ -46471,7 +46470,7 @@ var CHANNEL_TYPE_META = {
|
|
|
46471
46470
|
whatsapp: {
|
|
46472
46471
|
label: "WhatsApp",
|
|
46473
46472
|
hint: "Template messages to a phone number.",
|
|
46474
|
-
connected:
|
|
46473
|
+
connected: false,
|
|
46475
46474
|
icon: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_icons71.ChatLaunchIcon, { size: "sm", "aria-hidden": "true" })
|
|
46476
46475
|
},
|
|
46477
46476
|
webhook: {
|
|
@@ -47232,9 +47231,12 @@ var import_react210 = require("react");
|
|
|
47232
47231
|
var CONNECTED_CHANNEL_TYPES = [
|
|
47233
47232
|
"slack",
|
|
47234
47233
|
"teams",
|
|
47235
|
-
"google_chat"
|
|
47236
|
-
"whatsapp"
|
|
47234
|
+
"google_chat"
|
|
47237
47235
|
];
|
|
47236
|
+
function isValidPhoneNumber(value) {
|
|
47237
|
+
const digits = value.replace(/[^\d]/g, "");
|
|
47238
|
+
return /^\+?[\d\s()-]+$/.test(value.trim()) && digits.length >= 8 && digits.length <= 15;
|
|
47239
|
+
}
|
|
47238
47240
|
var EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
47239
47241
|
function isValidEmail(value) {
|
|
47240
47242
|
return EMAIL_RE.test(value.trim());
|
|
@@ -47261,6 +47263,10 @@ function validateChannelDraft(draft) {
|
|
|
47261
47263
|
if (!draft.url?.trim()) errors.url = "Enter the endpoint URL.";
|
|
47262
47264
|
else if (!isValidWebhookUrl(draft.url))
|
|
47263
47265
|
errors.url = "Enter a full URL, starting with https://.";
|
|
47266
|
+
} else if (draft.type === "whatsapp") {
|
|
47267
|
+
if (!draft.target?.trim()) errors.target = "Enter the recipient\u2019s WhatsApp number.";
|
|
47268
|
+
else if (!isValidPhoneNumber(draft.target))
|
|
47269
|
+
errors.target = "Enter a valid number in international format, e.g. +91 98765 43210.";
|
|
47264
47270
|
}
|
|
47265
47271
|
return errors;
|
|
47266
47272
|
}
|
|
@@ -47602,6 +47608,23 @@ function NotificationChannelForm({
|
|
|
47602
47608
|
disabled: readOnly,
|
|
47603
47609
|
size
|
|
47604
47610
|
}
|
|
47611
|
+
),
|
|
47612
|
+
value.type === "whatsapp" && /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
47613
|
+
Input,
|
|
47614
|
+
{
|
|
47615
|
+
id: `${baseId}-target`,
|
|
47616
|
+
type: "tel",
|
|
47617
|
+
label: TARGET_LABEL.whatsapp ?? "Phone number",
|
|
47618
|
+
placeholder: TARGET_PLACEHOLDER.whatsapp,
|
|
47619
|
+
value: value.target ?? "",
|
|
47620
|
+
onChange: (e) => patch({ target: e.target.value }),
|
|
47621
|
+
onBlur: () => touch("target"),
|
|
47622
|
+
error: Boolean(errorFor("target")),
|
|
47623
|
+
errorMessage: errorText("target"),
|
|
47624
|
+
helperText: "Sent from Octaviaflow\u2019s WhatsApp using the approved template. Include the country code.",
|
|
47625
|
+
disabled: readOnly,
|
|
47626
|
+
size
|
|
47627
|
+
}
|
|
47605
47628
|
)
|
|
47606
47629
|
] }),
|
|
47607
47630
|
/* @__PURE__ */ (0, import_jsx_runtime192.jsxs)("fieldset", { className: "ods-notif-channel-form__section", children: [
|