@inspirer-dev/crm-dashboard 1.0.88 → 1.0.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/admin/src/components/RulesBuilder/constants.ts +16 -0
- package/admin/src/components/StepFlowBuilder/constants.ts +1 -2
- package/admin/src/components/StepFlowBuilder/types.ts +5 -2
- package/admin/src/types/crm.ts +4 -3
- package/dist/_chunks/{index-ClbsgJmF.mjs → index-BXWSCH8D.mjs} +1 -1
- package/dist/_chunks/{index-DitYBTyj.js → index-BkNdfcG0.js} +1 -0
- package/dist/_chunks/{index-DKJtyGq7.mjs → index-CFfWhleR.mjs} +1 -1
- package/dist/_chunks/{index-T7VXjklK.js → index-DGSELI7S.js} +1 -1
- package/dist/_chunks/{index-P8pE6Zbx.mjs → index-Dekkt5Ph.mjs} +1 -0
- package/dist/_chunks/{index-CapXG1AZ.js → index-hY_mczO-.js} +1 -1
- package/dist/_chunks/{utils-CAs_GSGv.js → utils-CIIhL4KH.js} +16 -0
- package/dist/_chunks/{utils-BHneBJ7U.mjs → utils-DwR0IuyK.mjs} +16 -0
- package/dist/admin/index.js +3 -3
- package/dist/admin/index.mjs +3 -3
- package/package.json +1 -1
|
@@ -239,6 +239,22 @@ export const METRICS: MetricDefinition[] = [
|
|
|
239
239
|
description: 'User opted out of TG messages',
|
|
240
240
|
operators: booleanOperators,
|
|
241
241
|
},
|
|
242
|
+
{
|
|
243
|
+
key: 'has_whatsapp',
|
|
244
|
+
label: 'Has WhatsApp',
|
|
245
|
+
category: 'status',
|
|
246
|
+
valueType: 'boolean',
|
|
247
|
+
description: 'WhatsApp connected',
|
|
248
|
+
operators: booleanOperators,
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
key: 'whatsapp_opt_out',
|
|
252
|
+
label: 'WhatsApp Opt-Out',
|
|
253
|
+
category: 'status',
|
|
254
|
+
valueType: 'boolean',
|
|
255
|
+
description: 'User opted out of WhatsApp messages',
|
|
256
|
+
operators: booleanOperators,
|
|
257
|
+
},
|
|
242
258
|
{
|
|
243
259
|
key: 'has_opened_welcome_case',
|
|
244
260
|
label: 'Has Opened Welcome Case',
|
|
@@ -93,7 +93,6 @@ export const EDGE_COLORS = {
|
|
|
93
93
|
},
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
|
|
97
96
|
export const STEP_TYPE_LABELS: Record<StepType, string> = {
|
|
98
97
|
entry: 'Entry Point',
|
|
99
98
|
message: 'Send Message',
|
|
@@ -105,6 +104,7 @@ export const STEP_TYPE_LABELS: Record<StepType, string> = {
|
|
|
105
104
|
|
|
106
105
|
export const CHANNEL_OPTIONS: { value: ChannelType; label: string }[] = [
|
|
107
106
|
{ value: 'telegram', label: 'Telegram' },
|
|
107
|
+
{ value: 'whatsapp', label: 'WhatsApp' },
|
|
108
108
|
{ value: 'email', label: 'Email' },
|
|
109
109
|
{ value: 'push', label: 'Push Notification' },
|
|
110
110
|
{ value: 'sms', label: 'SMS' },
|
|
@@ -164,4 +164,3 @@ export const ENTRY_NODE_ID = 'entry';
|
|
|
164
164
|
export const PROXIMITY_THRESHOLD = 350;
|
|
165
165
|
|
|
166
166
|
export const AUTO_DISCONNECT_ENABLED = false;
|
|
167
|
-
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Node, Edge } from 'reactflow';
|
|
2
2
|
|
|
3
3
|
export type StepType = 'entry' | 'message' | 'wait' | 'branch' | 'exit' | 'event_trigger';
|
|
4
|
-
export type ChannelType = 'telegram' | 'email' | 'push' | 'sms';
|
|
4
|
+
export type ChannelType = 'telegram' | 'whatsapp' | 'email' | 'push' | 'sms';
|
|
5
5
|
export type DurationUnit = 'seconds' | 'minutes' | 'hours' | 'days';
|
|
6
6
|
export type EventTriggerLogic = 'and' | 'or';
|
|
7
7
|
|
|
@@ -67,7 +67,10 @@ export interface EventTriggerStepConfig {
|
|
|
67
67
|
eventTrigger?: EventTriggerConfig;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
export type StepConfig = MessageStepConfig &
|
|
70
|
+
export type StepConfig = MessageStepConfig &
|
|
71
|
+
WaitStepConfig &
|
|
72
|
+
BranchStepConfig &
|
|
73
|
+
EventTriggerStepConfig;
|
|
71
74
|
|
|
72
75
|
export interface FlowNodeData {
|
|
73
76
|
stepType: StepType;
|
package/admin/src/types/crm.ts
CHANGED
|
@@ -44,11 +44,12 @@ export interface CrmTemplate {
|
|
|
44
44
|
id: number;
|
|
45
45
|
documentId: string;
|
|
46
46
|
name: string;
|
|
47
|
-
channel: 'telegram' | 'email' | 'push' | 'sms';
|
|
47
|
+
channel: 'telegram' | 'whatsapp' | 'email' | 'push' | 'sms';
|
|
48
48
|
locale?: string;
|
|
49
49
|
title?: string;
|
|
50
50
|
body: string;
|
|
51
51
|
buttons?: TelegramButton[];
|
|
52
|
+
whatsappTemplateName?: string;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
export interface CrmVariant {
|
|
@@ -98,7 +99,7 @@ export interface CampaignStep {
|
|
|
98
99
|
name: string;
|
|
99
100
|
stepType: 'message' | 'wait' | 'branch' | 'exit';
|
|
100
101
|
order: number;
|
|
101
|
-
channel?: 'telegram' | 'email' | 'push' | 'sms';
|
|
102
|
+
channel?: 'telegram' | 'whatsapp' | 'email' | 'push' | 'sms';
|
|
102
103
|
variants?: CrmVariant[];
|
|
103
104
|
duration?: number;
|
|
104
105
|
durationUnit?: 'minutes' | 'hours' | 'days';
|
|
@@ -156,7 +157,7 @@ export type JourneyNodeType = 'entrance' | 'message' | 'wait' | 'branch' | 'exit
|
|
|
156
157
|
export type JourneyBranchType = 'default' | 'yes' | 'no';
|
|
157
158
|
export type JourneyWaitType = 'duration' | 'until_event' | 'until_time';
|
|
158
159
|
export type JourneyConditionType = 'segment' | 'event_attribute' | 'random_split';
|
|
159
|
-
export type JourneyChannel = 'telegram' | 'email' | 'push' | 'sms';
|
|
160
|
+
export type JourneyChannel = 'telegram' | 'whatsapp' | 'email' | 'push' | 'sms';
|
|
160
161
|
|
|
161
162
|
export interface JourneyMessageVariant {
|
|
162
163
|
name: string;
|
|
@@ -3,7 +3,7 @@ import { forwardRef, useState, useEffect, useMemo } from "react";
|
|
|
3
3
|
import { Field, Flex, Box, Typography, Button, Card, CardContent, SingleSelect, SingleSelectOption, TextInput, Tooltip, IconButton } from "@strapi/design-system";
|
|
4
4
|
import { Plus, ArrowUp, ArrowDown, Trash, Layout, Link } from "@strapi/icons";
|
|
5
5
|
import { useTheme } from "styled-components";
|
|
6
|
-
import { m as generateId } from "./utils-
|
|
6
|
+
import { m as generateId } from "./utils-DwR0IuyK.mjs";
|
|
7
7
|
const mapRawButton = (b) => ({
|
|
8
8
|
id: typeof b?.id === "string" ? b.id : generateId(),
|
|
9
9
|
text: typeof b?.text === "string" ? b.text : "",
|
|
@@ -100,6 +100,7 @@ const STEP_TYPE_LABELS = {
|
|
|
100
100
|
};
|
|
101
101
|
const CHANNEL_OPTIONS = [
|
|
102
102
|
{ value: "telegram", label: "Telegram" },
|
|
103
|
+
{ value: "whatsapp", label: "WhatsApp" },
|
|
103
104
|
{ value: "email", label: "Email" },
|
|
104
105
|
{ value: "push", label: "Push Notification" },
|
|
105
106
|
{ value: "sms", label: "SMS" }
|
|
@@ -3,7 +3,7 @@ import React, { forwardRef, useState, useEffect, useMemo, useCallback } from "re
|
|
|
3
3
|
import { Field, Flex, Badge, Button, Box, Typography, Tooltip, IconButton, SingleSelect, SingleSelectOption, Switch, TextInput } from "@strapi/design-system";
|
|
4
4
|
import { Trash, Layout, Plus } from "@strapi/icons";
|
|
5
5
|
import { useTheme } from "styled-components";
|
|
6
|
-
import { d as deserializeConfig, c as countRules, s as serializeConfig, a as createInitialConfig, i as isRuleGroup, u as updateGroupLogic, b as deleteGroupFromParent, g as getMetricDefinition, O as OPERATORS, M as METRICS_BY_CATEGORY, C as CATEGORY_LABELS, e as deleteRuleFromGroup, f as updateRuleInGroup, h as addRuleToGroup, j as createEmptyRule, k as createEmptyGroup, p as parseTimeAgoValue, l as createTimeAgoValue, T as TIME_UNITS, L as LIFECYCLE_STAGES } from "./utils-
|
|
6
|
+
import { d as deserializeConfig, c as countRules, s as serializeConfig, a as createInitialConfig, i as isRuleGroup, u as updateGroupLogic, b as deleteGroupFromParent, g as getMetricDefinition, O as OPERATORS, M as METRICS_BY_CATEGORY, C as CATEGORY_LABELS, e as deleteRuleFromGroup, f as updateRuleInGroup, h as addRuleToGroup, j as createEmptyRule, k as createEmptyGroup, p as parseTimeAgoValue, l as createTimeAgoValue, T as TIME_UNITS, L as LIFECYCLE_STAGES } from "./utils-DwR0IuyK.mjs";
|
|
7
7
|
const useThemeColors = () => {
|
|
8
8
|
const theme = useTheme();
|
|
9
9
|
const isDark = theme?.colors?.neutral0 === "#212134";
|
|
@@ -5,7 +5,7 @@ const React = require("react");
|
|
|
5
5
|
const designSystem = require("@strapi/design-system");
|
|
6
6
|
const icons = require("@strapi/icons");
|
|
7
7
|
const styledComponents = require("styled-components");
|
|
8
|
-
const utils = require("./utils-
|
|
8
|
+
const utils = require("./utils-CIIhL4KH.js");
|
|
9
9
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
10
10
|
const React__default = /* @__PURE__ */ _interopDefault(React);
|
|
11
11
|
const useThemeColors = () => {
|
|
@@ -95,6 +95,7 @@ const STEP_TYPE_LABELS = {
|
|
|
95
95
|
};
|
|
96
96
|
const CHANNEL_OPTIONS = [
|
|
97
97
|
{ value: "telegram", label: "Telegram" },
|
|
98
|
+
{ value: "whatsapp", label: "WhatsApp" },
|
|
98
99
|
{ value: "email", label: "Email" },
|
|
99
100
|
{ value: "push", label: "Push Notification" },
|
|
100
101
|
{ value: "sms", label: "SMS" }
|
|
@@ -5,7 +5,7 @@ const React = require("react");
|
|
|
5
5
|
const designSystem = require("@strapi/design-system");
|
|
6
6
|
const icons = require("@strapi/icons");
|
|
7
7
|
const styledComponents = require("styled-components");
|
|
8
|
-
const utils = require("./utils-
|
|
8
|
+
const utils = require("./utils-CIIhL4KH.js");
|
|
9
9
|
const mapRawButton = (b) => ({
|
|
10
10
|
id: typeof b?.id === "string" ? b.id : utils.generateId(),
|
|
11
11
|
text: typeof b?.text === "string" ? b.text : "",
|
|
@@ -233,6 +233,22 @@ const METRICS = [
|
|
|
233
233
|
description: "User opted out of TG messages",
|
|
234
234
|
operators: booleanOperators
|
|
235
235
|
},
|
|
236
|
+
{
|
|
237
|
+
key: "has_whatsapp",
|
|
238
|
+
label: "Has WhatsApp",
|
|
239
|
+
category: "status",
|
|
240
|
+
valueType: "boolean",
|
|
241
|
+
description: "WhatsApp connected",
|
|
242
|
+
operators: booleanOperators
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
key: "whatsapp_opt_out",
|
|
246
|
+
label: "WhatsApp Opt-Out",
|
|
247
|
+
category: "status",
|
|
248
|
+
valueType: "boolean",
|
|
249
|
+
description: "User opted out of WhatsApp messages",
|
|
250
|
+
operators: booleanOperators
|
|
251
|
+
},
|
|
236
252
|
{
|
|
237
253
|
key: "has_opened_welcome_case",
|
|
238
254
|
label: "Has Opened Welcome Case",
|
|
@@ -232,6 +232,22 @@ const METRICS = [
|
|
|
232
232
|
description: "User opted out of TG messages",
|
|
233
233
|
operators: booleanOperators
|
|
234
234
|
},
|
|
235
|
+
{
|
|
236
|
+
key: "has_whatsapp",
|
|
237
|
+
label: "Has WhatsApp",
|
|
238
|
+
category: "status",
|
|
239
|
+
valueType: "boolean",
|
|
240
|
+
description: "WhatsApp connected",
|
|
241
|
+
operators: booleanOperators
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
key: "whatsapp_opt_out",
|
|
245
|
+
label: "WhatsApp Opt-Out",
|
|
246
|
+
category: "status",
|
|
247
|
+
valueType: "boolean",
|
|
248
|
+
description: "User opted out of WhatsApp messages",
|
|
249
|
+
operators: booleanOperators
|
|
250
|
+
},
|
|
235
251
|
{
|
|
236
252
|
key: "has_opened_welcome_case",
|
|
237
253
|
label: "Has Opened Welcome Case",
|
package/dist/admin/index.js
CHANGED
|
@@ -35,7 +35,7 @@ const index = {
|
|
|
35
35
|
components: {
|
|
36
36
|
Input: async () => Promise.resolve().then(() => require(
|
|
37
37
|
/* webpackChunkName: "crm-rules-builder" */
|
|
38
|
-
"../_chunks/index-
|
|
38
|
+
"../_chunks/index-DGSELI7S.js"
|
|
39
39
|
))
|
|
40
40
|
},
|
|
41
41
|
options: {
|
|
@@ -107,7 +107,7 @@ const index = {
|
|
|
107
107
|
components: {
|
|
108
108
|
Input: async () => Promise.resolve().then(() => require(
|
|
109
109
|
/* webpackChunkName: "crm-telegram-buttons" */
|
|
110
|
-
"../_chunks/index-
|
|
110
|
+
"../_chunks/index-hY_mczO-.js"
|
|
111
111
|
))
|
|
112
112
|
},
|
|
113
113
|
options: {
|
|
@@ -131,7 +131,7 @@ const index = {
|
|
|
131
131
|
components: {
|
|
132
132
|
Input: async () => Promise.resolve().then(() => require(
|
|
133
133
|
/* webpackChunkName: "crm-step-flow-builder" */
|
|
134
|
-
"../_chunks/index-
|
|
134
|
+
"../_chunks/index-BkNdfcG0.js"
|
|
135
135
|
))
|
|
136
136
|
},
|
|
137
137
|
options: {
|
package/dist/admin/index.mjs
CHANGED
|
@@ -34,7 +34,7 @@ const index = {
|
|
|
34
34
|
components: {
|
|
35
35
|
Input: async () => import(
|
|
36
36
|
/* webpackChunkName: "crm-rules-builder" */
|
|
37
|
-
"../_chunks/index-
|
|
37
|
+
"../_chunks/index-CFfWhleR.mjs"
|
|
38
38
|
)
|
|
39
39
|
},
|
|
40
40
|
options: {
|
|
@@ -106,7 +106,7 @@ const index = {
|
|
|
106
106
|
components: {
|
|
107
107
|
Input: async () => import(
|
|
108
108
|
/* webpackChunkName: "crm-telegram-buttons" */
|
|
109
|
-
"../_chunks/index-
|
|
109
|
+
"../_chunks/index-BXWSCH8D.mjs"
|
|
110
110
|
)
|
|
111
111
|
},
|
|
112
112
|
options: {
|
|
@@ -130,7 +130,7 @@ const index = {
|
|
|
130
130
|
components: {
|
|
131
131
|
Input: async () => import(
|
|
132
132
|
/* webpackChunkName: "crm-step-flow-builder" */
|
|
133
|
-
"../_chunks/index-
|
|
133
|
+
"../_chunks/index-Dekkt5Ph.mjs"
|
|
134
134
|
)
|
|
135
135
|
},
|
|
136
136
|
options: {
|