@botonic/plugin-flow-builder 0.58.0-alpha.0 → 0.58.0-alpha.2
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/lib/cjs/action/push-flow-resolver.d.ts +3 -6
- package/lib/cjs/action/push-flow-resolver.js +20 -34
- package/lib/cjs/action/push-flow-resolver.js.map +1 -1
- package/lib/cjs/content-fields/flow-update-variables.d.ts +15 -0
- package/lib/cjs/content-fields/flow-update-variables.js +133 -0
- package/lib/cjs/content-fields/flow-update-variables.js.map +1 -0
- package/lib/cjs/content-fields/hubtype-fields/node-types.d.ts +2 -1
- package/lib/cjs/content-fields/hubtype-fields/node-types.js +1 -0
- package/lib/cjs/content-fields/hubtype-fields/node-types.js.map +1 -1
- package/lib/cjs/content-fields/hubtype-fields/nodes.d.ts +2 -1
- package/lib/cjs/content-fields/hubtype-fields/update-variables.d.ts +9 -0
- package/lib/cjs/content-fields/hubtype-fields/update-variables.js +3 -0
- package/lib/cjs/content-fields/hubtype-fields/update-variables.js.map +1 -0
- package/lib/cjs/content-fields/index.d.ts +3 -2
- package/lib/cjs/content-fields/index.js +3 -1
- package/lib/cjs/content-fields/index.js.map +1 -1
- package/lib/cjs/flow-factory.js +2 -0
- package/lib/cjs/flow-factory.js.map +1 -1
- package/lib/cjs/services/contact-info-fields-api.d.ts +7 -0
- package/lib/cjs/services/contact-info-fields-api.js +28 -0
- package/lib/cjs/services/contact-info-fields-api.js.map +1 -0
- package/lib/esm/action/push-flow-resolver.d.ts +3 -6
- package/lib/esm/action/push-flow-resolver.js +20 -34
- package/lib/esm/action/push-flow-resolver.js.map +1 -1
- package/lib/esm/content-fields/flow-update-variables.d.ts +15 -0
- package/lib/esm/content-fields/flow-update-variables.js +133 -0
- package/lib/esm/content-fields/flow-update-variables.js.map +1 -0
- package/lib/esm/content-fields/hubtype-fields/node-types.d.ts +2 -1
- package/lib/esm/content-fields/hubtype-fields/node-types.js +1 -0
- package/lib/esm/content-fields/hubtype-fields/node-types.js.map +1 -1
- package/lib/esm/content-fields/hubtype-fields/nodes.d.ts +2 -1
- package/lib/esm/content-fields/hubtype-fields/update-variables.d.ts +9 -0
- package/lib/esm/content-fields/hubtype-fields/update-variables.js +3 -0
- package/lib/esm/content-fields/hubtype-fields/update-variables.js.map +1 -0
- package/lib/esm/content-fields/index.d.ts +3 -2
- package/lib/esm/content-fields/index.js +3 -1
- package/lib/esm/content-fields/index.js.map +1 -1
- package/lib/esm/flow-factory.js +2 -0
- package/lib/esm/flow-factory.js.map +1 -1
- package/lib/esm/services/contact-info-fields-api.d.ts +7 -0
- package/lib/esm/services/contact-info-fields-api.js +28 -0
- package/lib/esm/services/contact-info-fields-api.js.map +1 -0
- package/package.json +2 -2
- package/src/action/push-flow-resolver.ts +38 -48
- package/src/content-fields/flow-update-variables.tsx +184 -0
- package/src/content-fields/hubtype-fields/node-types.ts +1 -0
- package/src/content-fields/hubtype-fields/nodes.ts +2 -0
- package/src/content-fields/hubtype-fields/update-variables.ts +10 -0
- package/src/content-fields/index.ts +3 -0
- package/src/flow-factory.ts +7 -0
- package/src/services/contact-info-fields-api.ts +36 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { FlowBuilderContentsResult } from './contents-result';
|
|
2
2
|
import type { FlowBuilderContext } from './context';
|
|
3
3
|
export declare enum PushFlowErrorCode {
|
|
4
|
-
|
|
5
|
-
NoPushFlowId = "NoPushFlowId",
|
|
4
|
+
NoCampaignContext = "NoCampaignContext",
|
|
6
5
|
NoCampaignStartNode = "NoCampaignStartNode",
|
|
7
|
-
|
|
6
|
+
NoCampaignFollowUpNode = "NoCampaignFollowUpNode"
|
|
8
7
|
}
|
|
9
8
|
export declare class PushFlowError extends Error {
|
|
10
9
|
readonly code: PushFlowErrorCode;
|
|
@@ -16,7 +15,5 @@ export declare class PushFlowResolver {
|
|
|
16
15
|
private flowBuilderPlugin;
|
|
17
16
|
constructor(context: FlowBuilderContext);
|
|
18
17
|
getContents(): Promise<FlowBuilderContentsResult>;
|
|
19
|
-
private
|
|
20
|
-
private getPushFlowNode;
|
|
21
|
-
private getCampaignId;
|
|
18
|
+
private getCampaignStartNode;
|
|
22
19
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PushFlowResolver = exports.PushFlowError = exports.PushFlowErrorCode = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@botonic/core");
|
|
5
5
|
var PushFlowErrorCode;
|
|
6
6
|
(function (PushFlowErrorCode) {
|
|
7
|
-
PushFlowErrorCode["
|
|
8
|
-
PushFlowErrorCode["NoPushFlowId"] = "NoPushFlowId";
|
|
7
|
+
PushFlowErrorCode["NoCampaignContext"] = "NoCampaignContext";
|
|
9
8
|
PushFlowErrorCode["NoCampaignStartNode"] = "NoCampaignStartNode";
|
|
10
|
-
PushFlowErrorCode["
|
|
9
|
+
PushFlowErrorCode["NoCampaignFollowUpNode"] = "NoCampaignFollowUpNode";
|
|
11
10
|
})(PushFlowErrorCode || (exports.PushFlowErrorCode = PushFlowErrorCode = {}));
|
|
12
11
|
class PushFlowError extends Error {
|
|
13
12
|
constructor(code, reason) {
|
|
@@ -24,42 +23,29 @@ class PushFlowResolver {
|
|
|
24
23
|
this.flowBuilderPlugin = context.flowBuilderPlugin;
|
|
25
24
|
}
|
|
26
25
|
async getContents() {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
const campaignContext = (0, core_1.getInputContextOfType)(this.botContext.input.context, core_1.BotonicInputContextType.PushFlow);
|
|
27
|
+
if (!campaignContext) {
|
|
28
|
+
throw new PushFlowError(PushFlowErrorCode.NoCampaignContext, 'No campaign context found in input context');
|
|
29
|
+
}
|
|
30
|
+
const { campaign_id: campaignId, campaign_flow_id: campaignFlowId, campaign_follow_up_id: campaignFollowUpId, } = campaignContext;
|
|
31
|
+
const campaignStartNode = this.getCampaignStartNode(campaignFlowId);
|
|
32
|
+
const followUpNode = campaignFollowUpId
|
|
33
|
+
? this.cmsApi.getNodeById(campaignFollowUpId)
|
|
34
|
+
: undefined;
|
|
35
|
+
if (campaignFollowUpId && !followUpNode) {
|
|
36
|
+
throw new PushFlowError(PushFlowErrorCode.NoCampaignFollowUpNode, 'No campaign follow up node found');
|
|
37
|
+
}
|
|
30
38
|
return {
|
|
31
|
-
contents: await this.flowBuilderPlugin.getContentsByNode(
|
|
39
|
+
contents: await this.flowBuilderPlugin.getContentsByNode(followUpNode ?? campaignStartNode),
|
|
32
40
|
campaignFirstMessageId: campaignId,
|
|
33
41
|
};
|
|
34
42
|
}
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
38
|
-
throw new PushFlowError(PushFlowErrorCode.NoInputPayload, 'No payload found in input');
|
|
39
|
-
}
|
|
40
|
-
const parts = payload.split(constants_1.SEPARATOR);
|
|
41
|
-
const pushFlowId = parts.length > 1 ? parts[1] : '';
|
|
42
|
-
if (!pushFlowId) {
|
|
43
|
-
throw new PushFlowError(PushFlowErrorCode.NoPushFlowId, 'No push flow id found in input payload');
|
|
44
|
-
}
|
|
45
|
-
return pushFlowId;
|
|
46
|
-
}
|
|
47
|
-
getPushFlowNode(pushFlowId) {
|
|
48
|
-
const pushFlowNode = this.cmsApi.getNodeByCampaignId(pushFlowId);
|
|
49
|
-
if (!pushFlowNode) {
|
|
43
|
+
getCampaignStartNode(campaignId) {
|
|
44
|
+
const campaignStartNode = this.cmsApi.getNodeByCampaignId(campaignId);
|
|
45
|
+
if (!campaignStartNode) {
|
|
50
46
|
throw new PushFlowError(PushFlowErrorCode.NoCampaignStartNode, 'No campaign start node found');
|
|
51
47
|
}
|
|
52
|
-
return
|
|
53
|
-
}
|
|
54
|
-
getCampaignId() {
|
|
55
|
-
const campaignId = this.botContext.input.context &&
|
|
56
|
-
'campaign_id' in this.botContext.input.context
|
|
57
|
-
? this.botContext.input.context.campaign_id
|
|
58
|
-
: undefined;
|
|
59
|
-
if (!campaignId) {
|
|
60
|
-
throw new PushFlowError(PushFlowErrorCode.NoCampaignId, 'No campaign id found in input context');
|
|
61
|
-
}
|
|
62
|
-
return campaignId;
|
|
48
|
+
return campaignStartNode;
|
|
63
49
|
}
|
|
64
50
|
}
|
|
65
51
|
exports.PushFlowResolver = PushFlowResolver;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-flow-resolver.js","sourceRoot":"","sources":["../../../src/action/push-flow-resolver.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"push-flow-resolver.js","sourceRoot":"","sources":["../../../src/action/push-flow-resolver.ts"],"names":[],"mappings":";;;AAAA,wCAIsB;AAOtB,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;AACnD,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAED,MAAa,aAAc,SAAQ,KAAK;IAGtC,YAAY,IAAuB,EAAE,MAAc;QACjD,KAAK,CAAC,qBAAqB,MAAM,EAAE,CAAC,CAAA;QACpC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAA;IAC7B,CAAC;CACF;AARD,sCAQC;AAED,MAAa,gBAAgB;IAK3B,YAAY,OAA2B;QACrC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,OAAO,CAAA;QACjC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;QAC5B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAA;IACpD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,eAAe,GAAG,IAAA,4BAAqB,EAC3C,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,EAC7B,8BAAuB,CAAC,QAAQ,CACjC,CAAA;QAED,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,aAAa,CACrB,iBAAiB,CAAC,iBAAiB,EACnC,4CAA4C,CAC7C,CAAA;QACH,CAAC;QAED,MAAM,EACJ,WAAW,EAAE,UAAU,EACvB,gBAAgB,EAAE,cAAc,EAChC,qBAAqB,EAAE,kBAAkB,GAC1C,GAAG,eAAe,CAAA;QAEnB,MAAM,iBAAiB,GAAG,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAA;QACnE,MAAM,YAAY,GAAG,kBAAkB;YACrC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAoB,kBAAkB,CAAC;YAChE,CAAC,CAAC,SAAS,CAAA;QAEb,IAAI,kBAAkB,IAAI,CAAC,YAAY,EAAE,CAAC;YACxC,MAAM,IAAI,aAAa,CACrB,iBAAiB,CAAC,sBAAsB,EACxC,kCAAkC,CACnC,CAAA;QACH,CAAC;QAED,OAAO;YACL,QAAQ,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CACtD,YAAY,IAAI,iBAAiB,CAClC;YACD,sBAAsB,EAAE,UAAU;SACnC,CAAA;IACH,CAAC;IAEO,oBAAoB,CAAC,UAAkB;QAC7C,MAAM,iBAAiB,GACrB,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAoB,UAAU,CAAC,CAAA;QAEhE,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,IAAI,aAAa,CACrB,iBAAiB,CAAC,mBAAmB,EACrC,8BAA8B,CAC/B,CAAA;QACH,CAAC;QAED,OAAO,iBAAiB,CAAA;IAC1B,CAAC;CACF;AA/DD,4CA+DC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type BotContext } from '@botonic/core';
|
|
2
|
+
import { ContentFieldsBase } from './content-fields-base';
|
|
3
|
+
import type { HtUpdateVariablesNode } from './hubtype-fields/update-variables';
|
|
4
|
+
export declare class FlowUpdateVariables extends ContentFieldsBase {
|
|
5
|
+
setVariables: Record<string, string | number | boolean>;
|
|
6
|
+
unsetVariables: string[];
|
|
7
|
+
static fromHubtypeCMS(cmsUpdateVariables: HtUpdateVariablesNode, botContext: BotContext): Promise<FlowUpdateVariables>;
|
|
8
|
+
private applyVariablesAndSyncContactInfo;
|
|
9
|
+
private setSessionValueFromKeyPath;
|
|
10
|
+
private getContactInfoFieldName;
|
|
11
|
+
private updateSessionContactInfoField;
|
|
12
|
+
trackFlow(botContext: BotContext): Promise<void>;
|
|
13
|
+
processContent(botContext: BotContext): Promise<void>;
|
|
14
|
+
toBotonic(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlowUpdateVariables = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const core_1 = require("@botonic/core");
|
|
6
|
+
const constants_1 = require("../constants");
|
|
7
|
+
const contact_info_fields_api_1 = require("../services/contact-info-fields-api");
|
|
8
|
+
const tracking_1 = require("../tracking");
|
|
9
|
+
const get_flow_builder_plugin_1 = require("../utils/get-flow-builder-plugin");
|
|
10
|
+
const content_fields_base_1 = require("./content-fields-base");
|
|
11
|
+
const SESSION_CONTACT_INFO_PREFIX = 'session.user.contact_info.';
|
|
12
|
+
class FlowUpdateVariables extends content_fields_base_1.ContentFieldsBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.setVariables = {};
|
|
16
|
+
this.unsetVariables = [];
|
|
17
|
+
}
|
|
18
|
+
static async fromHubtypeCMS(cmsUpdateVariables, botContext) {
|
|
19
|
+
const newUpdateVariables = new FlowUpdateVariables(cmsUpdateVariables.id);
|
|
20
|
+
newUpdateVariables.setVariables = cmsUpdateVariables.content.set_variables;
|
|
21
|
+
newUpdateVariables.unsetVariables =
|
|
22
|
+
cmsUpdateVariables.content.unset_variables;
|
|
23
|
+
await newUpdateVariables.applyVariablesAndSyncContactInfo(botContext);
|
|
24
|
+
return newUpdateVariables;
|
|
25
|
+
}
|
|
26
|
+
async applyVariablesAndSyncContactInfo(botContext) {
|
|
27
|
+
const contactInfoUpdates = [];
|
|
28
|
+
const updateVariable = (keyPath, value) => {
|
|
29
|
+
const fieldName = this.getContactInfoFieldName(keyPath);
|
|
30
|
+
if (fieldName) {
|
|
31
|
+
this.updateSessionContactInfoField(botContext, fieldName, value);
|
|
32
|
+
contactInfoUpdates.push({ fieldName, value });
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.setSessionValueFromKeyPath(botContext, keyPath, value);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
for (const [keyPath, value] of Object.entries(this.setVariables)) {
|
|
39
|
+
updateVariable(keyPath, value);
|
|
40
|
+
}
|
|
41
|
+
for (const keyPath of this.unsetVariables) {
|
|
42
|
+
updateVariable(keyPath, undefined);
|
|
43
|
+
}
|
|
44
|
+
if (contactInfoUpdates.length === 0) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const hubtypeApiUrl = botContext.session._hubtype_api || constants_1.FLOW_BUILDER_API_URL_PROD;
|
|
48
|
+
const flowBuilderPlugin = (0, get_flow_builder_plugin_1.getFlowBuilderPlugin)(botContext.plugins);
|
|
49
|
+
const accessToken = flowBuilderPlugin.getAccessToken(botContext.session);
|
|
50
|
+
const chatId = botContext.session.user.id;
|
|
51
|
+
const contactInfoFieldsClient = new contact_info_fields_api_1.ContactInfoFieldsClient(hubtypeApiUrl, accessToken);
|
|
52
|
+
await Promise.all(contactInfoUpdates.map(({ fieldName, value }) => {
|
|
53
|
+
if (value === undefined) {
|
|
54
|
+
return contactInfoFieldsClient.delete(chatId, fieldName);
|
|
55
|
+
}
|
|
56
|
+
return contactInfoFieldsClient.update(chatId, fieldName, value);
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
setSessionValueFromKeyPath(botContext, keyPath, value) {
|
|
60
|
+
const keys = keyPath.split('.');
|
|
61
|
+
if (keys.shift() !== 'session') {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const lastKey = keys.pop();
|
|
65
|
+
if (!lastKey) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
let current = botContext.session;
|
|
69
|
+
for (const key of keys) {
|
|
70
|
+
if (current[key] === undefined || current[key] === null) {
|
|
71
|
+
current[key] = {};
|
|
72
|
+
}
|
|
73
|
+
current = current[key];
|
|
74
|
+
}
|
|
75
|
+
current[lastKey] = value;
|
|
76
|
+
}
|
|
77
|
+
getContactInfoFieldName(keyPath) {
|
|
78
|
+
if (!keyPath.startsWith(SESSION_CONTACT_INFO_PREFIX)) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
const fieldName = keyPath.slice(SESSION_CONTACT_INFO_PREFIX.length);
|
|
82
|
+
return fieldName || undefined;
|
|
83
|
+
}
|
|
84
|
+
updateSessionContactInfoField(botContext, fieldName, value) {
|
|
85
|
+
if (!botContext.session.user.contact_info) {
|
|
86
|
+
botContext.session.user.contact_info = [];
|
|
87
|
+
}
|
|
88
|
+
const contactInfo = botContext.session.user.contact_info;
|
|
89
|
+
const index = contactInfo.findIndex(field => field.name === fieldName);
|
|
90
|
+
if (value === undefined) {
|
|
91
|
+
if (index >= 0) {
|
|
92
|
+
contactInfo.splice(index, 1);
|
|
93
|
+
}
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const stringValue = String(value);
|
|
97
|
+
const valueType = typeof value;
|
|
98
|
+
if (index >= 0) {
|
|
99
|
+
contactInfo[index].value = stringValue;
|
|
100
|
+
contactInfo[index].type = valueType;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
contactInfo.push({
|
|
104
|
+
name: fieldName,
|
|
105
|
+
type: valueType,
|
|
106
|
+
value: stringValue,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
async trackFlow(botContext) {
|
|
110
|
+
const { flowThreadId, flowId, flowName, flowNodeId, flowNodeContentId } = (0, tracking_1.getCommonFlowContentEventArgsForContentId)(botContext, this.id);
|
|
111
|
+
const eventUpdateVariables = {
|
|
112
|
+
action: core_1.EventAction.UpdateVariables,
|
|
113
|
+
flowThreadId,
|
|
114
|
+
flowId,
|
|
115
|
+
flowName,
|
|
116
|
+
flowNodeId,
|
|
117
|
+
flowNodeContentId,
|
|
118
|
+
flowNodeIsMeaningful: false,
|
|
119
|
+
setVariables: this.setVariables,
|
|
120
|
+
unsetVariables: this.unsetVariables,
|
|
121
|
+
};
|
|
122
|
+
const { action, ...eventArgs } = eventUpdateVariables;
|
|
123
|
+
await (0, tracking_1.trackEvent)(botContext, action, eventArgs);
|
|
124
|
+
}
|
|
125
|
+
async processContent(botContext) {
|
|
126
|
+
await this.trackFlow(botContext);
|
|
127
|
+
}
|
|
128
|
+
toBotonic() {
|
|
129
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
exports.FlowUpdateVariables = FlowUpdateVariables;
|
|
133
|
+
//# sourceMappingURL=flow-update-variables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-update-variables.js","sourceRoot":"","sources":["../../../src/content-fields/flow-update-variables.tsx"],"names":[],"mappings":";;;;AAAA,wCAKsB;AAEtB,4CAAwD;AACxD,iFAA6E;AAC7E,0CAGoB;AACpB,8EAAuE;AACvE,+DAAyD;AAGzD,MAAM,2BAA2B,GAAG,4BAA4B,CAAA;AAEhE,MAAa,mBAAoB,SAAQ,uCAAiB;IAA1D;;QACS,iBAAY,GAA8C,EAAE,CAAA;QAC5D,mBAAc,GAAa,EAAE,CAAA;IAkKtC,CAAC;IAhKC,MAAM,CAAC,KAAK,CAAC,cAAc,CACzB,kBAAyC,EACzC,UAAsB;QAEtB,MAAM,kBAAkB,GAAG,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAA;QACzE,kBAAkB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C;YACf,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,WAAW;SACnB,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,UAAsB;QACpC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,iBAAiB,EAAE,GACrE,IAAA,oDAAyC,EAAC,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,CAAA;QAChE,MAAM,oBAAoB,GAAyB;YACjD,MAAM,EAAE,kBAAW,CAAC,eAAe;YACnC,YAAY;YACZ,MAAM;YACN,QAAQ;YACR,UAAU;YACV,iBAAiB;YACjB,oBAAoB,EAAE,KAAK;YAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAA;QACD,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,GAAG,oBAAoB,CAAA;QACrD,MAAM,IAAA,qBAAU,EAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,CAAA;IACjD,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,UAAsB;QACzC,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAA;IAClC,CAAC;IAED,SAAS;QACP,OAAO,kDAAK,CAAA;IACd,CAAC;CACF;AApKD,kDAoKC"}
|
|
@@ -21,7 +21,8 @@ export declare enum HtNodeWithContentType {
|
|
|
21
21
|
CAPTURE_USER_INPUT = "capture-user-input",
|
|
22
22
|
CUSTOM_CONDITION = "custom-condition",
|
|
23
23
|
DO_NOTHING = "do-nothing",
|
|
24
|
-
CONTACT_REASONS_CONDITION = "contact-reasons-condition"
|
|
24
|
+
CONTACT_REASONS_CONDITION = "contact-reasons-condition",
|
|
25
|
+
UPDATE_VARIABLES = "update-variables"
|
|
25
26
|
}
|
|
26
27
|
export declare enum HtNodeWithoutContentType {
|
|
27
28
|
URL = "url",
|
|
@@ -26,6 +26,7 @@ var HtNodeWithContentType;
|
|
|
26
26
|
HtNodeWithContentType["CUSTOM_CONDITION"] = "custom-condition";
|
|
27
27
|
HtNodeWithContentType["DO_NOTHING"] = "do-nothing";
|
|
28
28
|
HtNodeWithContentType["CONTACT_REASONS_CONDITION"] = "contact-reasons-condition";
|
|
29
|
+
HtNodeWithContentType["UPDATE_VARIABLES"] = "update-variables";
|
|
29
30
|
})(HtNodeWithContentType || (exports.HtNodeWithContentType = HtNodeWithContentType = {}));
|
|
30
31
|
var HtNodeWithoutContentType;
|
|
31
32
|
(function (HtNodeWithoutContentType) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/node-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"node-types.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/node-types.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAyBX;AAzBD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;IACf,sCAAa,CAAA;IACb,4CAAmB,CAAA;IACnB,sDAA6B,CAAA;IAC7B,8CAAqB,CAAA;IACrB,8CAAqB,CAAA;IACrB,wCAAe,CAAA;IACf,sEAA6C,CAAA;IAC7C,4EAAmD,CAAA;IACnD,wFAA+D,CAAA;IAC/D,gEAAuC,CAAA;IACvC,kDAAyB,CAAA;IACzB,8CAAqB,CAAA;IACrB,4DAAmC,CAAA;IACnC,0CAAiB,CAAA;IACjB,4CAAmB,CAAA;IACnB,kDAAyB,CAAA;IACzB,kEAAyC,CAAA;IACzC,8DAAqC,CAAA;IACrC,kDAAyB,CAAA;IACzB,gFAAuD,CAAA;IACvD,8DAAqC,CAAA;AACvC,CAAC,EAzBW,qBAAqB,qCAArB,qBAAqB,QAyBhC;AAED,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,uCAAW,CAAA;IACX,+CAAmB,CAAA;AACrB,CAAC,EAHW,wBAAwB,wCAAxB,wBAAwB,QAGnC;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,4CAA2B,CAAA;AAC7B,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"}
|
|
@@ -16,6 +16,7 @@ import type { HtPayloadNode } from './payload';
|
|
|
16
16
|
import type { HtRatingNode } from './rating';
|
|
17
17
|
import type { HtSmartIntentNode } from './smart-intent';
|
|
18
18
|
import type { HtTextNode } from './text';
|
|
19
|
+
import type { HtUpdateVariablesNode } from './update-variables';
|
|
19
20
|
import type { HtUrlNode } from './url';
|
|
20
21
|
import type { HtVideoNode } from './video';
|
|
21
22
|
import type { HtWebviewNode } from './webview';
|
|
@@ -23,6 +24,6 @@ import type { HtWhatsappButtonListNode } from './whatsapp-button-list';
|
|
|
23
24
|
import type { HtWhatsappCTAUrlButtonNode } from './whatsapp-cta-url-button';
|
|
24
25
|
import type { HtWhatsappRequestContactInfoNode } from './whatsapp-request-contact-info';
|
|
25
26
|
import type { HtWhatsappTemplateNode } from './whatsapp-template';
|
|
26
|
-
export type HtNodeWithContent = HtTextNode | HtImageNode | HtVideoNode | HtCarouselNode | HtHandoffNode | HtKeywordNode | HtFunctionNode | HtFallbackNode | HtWhatsappButtonListNode | HtWhatsappCTAUrlButtonNode | HtWhatsappRequestContactInfoNode | HtSmartIntentNode | HtBotActionNode | HtAiAgentNode | HtAiAgentRouterNode | HtRatingNode | HtWebviewNode | HtGoToFlow | HtWhatsappTemplateNode | HtCaptureUserInputNode | HtCustomConditionalV2Node | HtDoNothingNode | HtContactReasonsNode;
|
|
27
|
+
export type HtNodeWithContent = HtTextNode | HtImageNode | HtVideoNode | HtCarouselNode | HtHandoffNode | HtKeywordNode | HtFunctionNode | HtFallbackNode | HtWhatsappButtonListNode | HtWhatsappCTAUrlButtonNode | HtWhatsappRequestContactInfoNode | HtSmartIntentNode | HtBotActionNode | HtAiAgentNode | HtAiAgentRouterNode | HtRatingNode | HtWebviewNode | HtGoToFlow | HtWhatsappTemplateNode | HtCaptureUserInputNode | HtCustomConditionalV2Node | HtDoNothingNode | HtContactReasonsNode | HtUpdateVariablesNode;
|
|
27
28
|
export type HtNodeWithoutContent = HtUrlNode | HtPayloadNode;
|
|
28
29
|
export type HtNodeComponent = HtNodeWithContent | HtNodeWithoutContent;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HtBaseNode } from './common';
|
|
2
|
+
import type { HtNodeWithContentType } from './node-types';
|
|
3
|
+
export interface HtUpdateVariablesNode extends HtBaseNode {
|
|
4
|
+
type: HtNodeWithContentType.UPDATE_VARIABLES;
|
|
5
|
+
content: {
|
|
6
|
+
set_variables: Record<string, string | number | boolean>;
|
|
7
|
+
unset_variables: string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-variables.js","sourceRoot":"","sources":["../../../../src/content-fields/hubtype-fields/update-variables.ts"],"names":[],"mappings":""}
|
|
@@ -15,6 +15,7 @@ import { FlowImage } from './flow-image';
|
|
|
15
15
|
import { FlowQueueStatusConditional } from './flow-queue-status-conditional';
|
|
16
16
|
import { FlowRating } from './flow-rating';
|
|
17
17
|
import { FlowText } from './flow-text';
|
|
18
|
+
import { FlowUpdateVariables } from './flow-update-variables';
|
|
18
19
|
import { FlowVideo } from './flow-video';
|
|
19
20
|
import { FlowWhatsappCtaUrlButtonNode } from './flow-whatsapp-cta-url-button';
|
|
20
21
|
import { FlowWhatsappRequestContactInfoNode } from './flow-whatsapp-request-contact-info';
|
|
@@ -23,5 +24,5 @@ import { FlowWhatsappButtonList, FlowWhatsappButtonListRow, FlowWhatsappButtonLi
|
|
|
23
24
|
export { ContentFieldsBase } from './content-fields-base';
|
|
24
25
|
export { FlowButton } from './flow-button';
|
|
25
26
|
export { FlowElement } from './flow-element';
|
|
26
|
-
export { FlowAiAgent, FlowAiAgentRouter, FlowBotAction, FlowCaptureUserInput, FlowCarousel, FlowChannelConditional, FlowContactReasonsConditional, FlowCountryConditional, FlowCustomConditional, FlowCustomConditionalV2, FlowDoNothing, FlowGoToFlow, FlowHandoff, FlowImage, FlowQueueStatusConditional, FlowRating, FlowText, FlowVideo, FlowWhatsappButtonList, FlowWhatsappButtonListRow, FlowWhatsappButtonListSection, FlowWhatsappCtaUrlButtonNode, FlowWhatsappRequestContactInfoNode, FlowWhatsappTemplate, };
|
|
27
|
-
export type FlowContent = FlowCarousel | FlowImage | FlowText | FlowVideo | FlowWhatsappButtonList | FlowWhatsappCtaUrlButtonNode | FlowWhatsappRequestContactInfoNode | FlowWhatsappTemplate | FlowHandoff | FlowBotAction | FlowAiAgent | FlowRating | FlowCountryConditional | FlowChannelConditional | FlowQueueStatusConditional | FlowCustomConditional | FlowGoToFlow | FlowCaptureUserInput | FlowAiAgentRouter | FlowCustomConditionalV2 | FlowDoNothing | FlowContactReasonsConditional;
|
|
27
|
+
export { FlowAiAgent, FlowAiAgentRouter, FlowBotAction, FlowCaptureUserInput, FlowCarousel, FlowChannelConditional, FlowContactReasonsConditional, FlowCountryConditional, FlowCustomConditional, FlowCustomConditionalV2, FlowDoNothing, FlowGoToFlow, FlowHandoff, FlowImage, FlowQueueStatusConditional, FlowRating, FlowText, FlowUpdateVariables, FlowVideo, FlowWhatsappButtonList, FlowWhatsappButtonListRow, FlowWhatsappButtonListSection, FlowWhatsappCtaUrlButtonNode, FlowWhatsappRequestContactInfoNode, FlowWhatsappTemplate, };
|
|
28
|
+
export type FlowContent = FlowCarousel | FlowImage | FlowText | FlowVideo | FlowWhatsappButtonList | FlowWhatsappCtaUrlButtonNode | FlowWhatsappRequestContactInfoNode | FlowWhatsappTemplate | FlowHandoff | FlowBotAction | FlowAiAgent | FlowRating | FlowCountryConditional | FlowChannelConditional | FlowQueueStatusConditional | FlowCustomConditional | FlowGoToFlow | FlowCaptureUserInput | FlowAiAgentRouter | FlowCustomConditionalV2 | FlowDoNothing | FlowUpdateVariables | FlowContactReasonsConditional;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FlowWhatsappTemplate = exports.FlowWhatsappRequestContactInfoNode = exports.FlowWhatsappCtaUrlButtonNode = exports.FlowWhatsappButtonListSection = exports.FlowWhatsappButtonListRow = exports.FlowWhatsappButtonList = exports.FlowVideo = exports.FlowText = exports.FlowRating = exports.FlowQueueStatusConditional = exports.FlowImage = exports.FlowHandoff = exports.FlowGoToFlow = exports.FlowDoNothing = exports.FlowCustomConditionalV2 = exports.FlowCustomConditional = exports.FlowCountryConditional = exports.FlowContactReasonsConditional = exports.FlowChannelConditional = exports.FlowCarousel = exports.FlowCaptureUserInput = exports.FlowBotAction = exports.FlowAiAgentRouter = exports.FlowAiAgent = exports.FlowElement = exports.FlowButton = exports.ContentFieldsBase = void 0;
|
|
3
|
+
exports.FlowWhatsappTemplate = exports.FlowWhatsappRequestContactInfoNode = exports.FlowWhatsappCtaUrlButtonNode = exports.FlowWhatsappButtonListSection = exports.FlowWhatsappButtonListRow = exports.FlowWhatsappButtonList = exports.FlowVideo = exports.FlowUpdateVariables = exports.FlowText = exports.FlowRating = exports.FlowQueueStatusConditional = exports.FlowImage = exports.FlowHandoff = exports.FlowGoToFlow = exports.FlowDoNothing = exports.FlowCustomConditionalV2 = exports.FlowCustomConditional = exports.FlowCountryConditional = exports.FlowContactReasonsConditional = exports.FlowChannelConditional = exports.FlowCarousel = exports.FlowCaptureUserInput = exports.FlowBotAction = exports.FlowAiAgentRouter = exports.FlowAiAgent = exports.FlowElement = exports.FlowButton = exports.ContentFieldsBase = void 0;
|
|
4
4
|
const flow_custom_condition_v2_1 = require("./custom-conditional/flow-custom-condition-v2");
|
|
5
5
|
Object.defineProperty(exports, "FlowCustomConditionalV2", { enumerable: true, get: function () { return flow_custom_condition_v2_1.FlowCustomConditionalV2; } });
|
|
6
6
|
const flow_ai_agent_1 = require("./flow-ai-agent");
|
|
@@ -35,6 +35,8 @@ const flow_rating_1 = require("./flow-rating");
|
|
|
35
35
|
Object.defineProperty(exports, "FlowRating", { enumerable: true, get: function () { return flow_rating_1.FlowRating; } });
|
|
36
36
|
const flow_text_1 = require("./flow-text");
|
|
37
37
|
Object.defineProperty(exports, "FlowText", { enumerable: true, get: function () { return flow_text_1.FlowText; } });
|
|
38
|
+
const flow_update_variables_1 = require("./flow-update-variables");
|
|
39
|
+
Object.defineProperty(exports, "FlowUpdateVariables", { enumerable: true, get: function () { return flow_update_variables_1.FlowUpdateVariables; } });
|
|
38
40
|
const flow_video_1 = require("./flow-video");
|
|
39
41
|
Object.defineProperty(exports, "FlowVideo", { enumerable: true, get: function () { return flow_video_1.FlowVideo; } });
|
|
40
42
|
const flow_whatsapp_cta_url_button_1 = require("./flow-whatsapp-cta-url-button");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content-fields/index.ts"],"names":[],"mappings":";;;AAAA,4FAAuF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/content-fields/index.ts"],"names":[],"mappings":";;;AAAA,4FAAuF;AAyCrF,wGAzCO,kDAAuB,OAyCP;AAxCzB,mDAA6C;AA+B3C,4FA/BO,2BAAW,OA+BP;AA9Bb,iEAA0D;AA+BxD,kGA/BO,wCAAiB,OA+BP;AA9BnB,uDAAiD;AA+B/C,8FA/BO,+BAAa,OA+BP;AA9Bf,uEAAgE;AA+B9D,qGA/BO,8CAAoB,OA+BP;AA9BtB,mDAA8C;AA+B5C,6FA/BO,4BAAY,OA+BP;AA9Bd,yEAAmE;AA+BjE,uGA/BO,iDAAsB,OA+BP;AA9BxB,yFAAkF;AA+BhF,8GA/BO,gEAA6B,OA+BP;AA9B/B,yEAAmE;AA+BjE,uGA/BO,iDAAsB,OA+BP;AA9BxB,uEAAiE;AA+B/D,sGA/BO,+CAAqB,OA+BP;AA9BvB,uDAAiD;AAgC/C,8FAhCO,+BAAa,OAgCP;AA/Bf,uDAAgD;AAgC9C,6FAhCO,8BAAY,OAgCP;AA/Bd,iDAA4C;AAgC1C,4FAhCO,0BAAW,OAgCP;AA/Bb,6CAAwC;AAgCtC,0FAhCO,sBAAS,OAgCP;AA/BX,mFAA4E;AAgC1E,2GAhCO,0DAA0B,OAgCP;AA/B5B,+CAA0C;AAgCxC,2FAhCO,wBAAU,OAgCP;AA/BZ,2CAAsC;AAgCpC,yFAhCO,oBAAQ,OAgCP;AA/BV,mEAA6D;AAgC3D,oGAhCO,2CAAmB,OAgCP;AA/BrB,6CAAwC;AAgCtC,0FAhCO,sBAAS,OAgCP;AA/BX,iFAA6E;AAmC3E,6GAnCO,2DAA4B,OAmCP;AAlC9B,6FAAyF;AAmCvF,mHAnCO,uEAAkC,OAmCP;AAlCpC,qEAA+D;AAmC7D,qGAnCO,6CAAoB,OAmCP;AAlCtB,iEAI+B;AAyB7B,uGA5BA,6CAAsB,OA4BA;AACtB,0GA5BA,gDAAyB,OA4BA;AACzB,8GA5BA,oDAA6B,OA4BA;AAzB/B,6DAAyD;AAAhD,wHAAA,iBAAiB,OAAA;AAC1B,6CAA0C;AAAjC,yGAAA,UAAU,OAAA;AACnB,+CAA4C;AAAnC,2GAAA,WAAW,OAAA"}
|
package/lib/cjs/flow-factory.js
CHANGED
|
@@ -48,6 +48,8 @@ class FlowFactory {
|
|
|
48
48
|
return content_fields_1.FlowCustomConditionalV2.fromHubtypeCMS(hubtypeContent, this.botContext);
|
|
49
49
|
case hubtype_fields_1.HtNodeWithContentType.DO_NOTHING:
|
|
50
50
|
return content_fields_1.FlowDoNothing.fromHubtypeCMS(hubtypeContent);
|
|
51
|
+
case hubtype_fields_1.HtNodeWithContentType.UPDATE_VARIABLES:
|
|
52
|
+
return content_fields_1.FlowUpdateVariables.fromHubtypeCMS(hubtypeContent, this.botContext);
|
|
51
53
|
case hubtype_fields_1.HtNodeWithContentType.CONTACT_REASONS_CONDITION:
|
|
52
54
|
return content_fields_1.FlowContactReasonsConditional.fromHubtypeCMS(hubtypeContent, this.botContext);
|
|
53
55
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-factory.js","sourceRoot":"","sources":["../../src/flow-factory.ts"],"names":[],"mappings":";;;AAGA,
|
|
1
|
+
{"version":3,"file":"flow-factory.js","sourceRoot":"","sources":["../../src/flow-factory.ts"],"names":[],"mappings":";;;AAGA,qDAwByB;AACzB,sFAA+E;AAC/E,oEAIwC;AAExC,MAAa,WAAW;IAKtB,YAAY,UAAsB,EAAE,MAAsB,EAAE,MAAc;QACxE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,cAA+B;QAE/B,QAAQ,cAAc,CAAC,IAAI,EAAE,CAAC;YAC5B,KAAK,sCAAqB,CAAC,IAAI;gBAC7B,OAAO,yBAAQ,CAAC,cAAc,CAC5B,cAAc,EACd,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,UAAU,CAChB,CAAA;YACH,KAAK,sCAAqB,CAAC,KAAK;gBAC9B,OAAO,0BAAS,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;YAC9D,KAAK,sCAAqB,CAAC,QAAQ;gBACjC,OAAO,6BAAY,CAAC,cAAc,CAChC,cAAc,EACd,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,UAAU,CAChB,CAAA;YACH,KAAK,sCAAqB,CAAC,KAAK;gBAC9B,OAAO,0BAAS,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;YAC9D,KAAK,sCAAqB,CAAC,oBAAoB;gBAC7C,OAAO,uCAAsB,CAAC,cAAc,CAC1C,cAA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sClient {
|
|
2
|
+
private readonly hubtypeApiUrl;
|
|
3
|
+
private readonly accessToken;
|
|
4
|
+
constructor(hubtypeApiUrl: string, accessToken: string);
|
|
5
|
+
update(chatId: string, fieldName: string, value: string | number | boolean): Promise<void>;
|
|
6
|
+
delete(chatId: string, fieldName: string): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContactInfoFieldsClient = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
6
|
+
class ContactInfoFieldsClient {
|
|
7
|
+
constructor(hubtypeApiUrl, accessToken) {
|
|
8
|
+
this.hubtypeApiUrl = hubtypeApiUrl;
|
|
9
|
+
this.accessToken = accessToken;
|
|
10
|
+
}
|
|
11
|
+
async update(chatId, fieldName, value) {
|
|
12
|
+
await axios_1.default.put(`${this.hubtypeApiUrl}/external/v1/chats/${chatId}/contact_info_fields/${encodeURIComponent(fieldName)}/`, { value }, {
|
|
13
|
+
headers: {
|
|
14
|
+
'Content-Type': 'application/json',
|
|
15
|
+
Authorization: `Bearer ${this.accessToken}`,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async delete(chatId, fieldName) {
|
|
20
|
+
await axios_1.default.delete(`${this.hubtypeApiUrl}/external/v1/chats/${chatId}/contact_info_fields/${encodeURIComponent(fieldName)}/`, {
|
|
21
|
+
headers: {
|
|
22
|
+
Authorization: `Bearer ${this.accessToken}`,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ContactInfoFieldsClient = ContactInfoFieldsClient;
|
|
28
|
+
//# sourceMappingURL=contact-info-fields-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-info-fields-api.js","sourceRoot":"","sources":["../../../src/services/contact-info-fields-api.ts"],"names":[],"mappings":";;;;AAAA,0DAAyB;AAEzB,MAAa,uBAAuB;IAClC,YACmB,aAAqB,EACrB,WAAmB;QADnB,kBAAa,GAAb,aAAa,CAAQ;QACrB,gBAAW,GAAX,WAAW,CAAQ;IACnC,CAAC;IAEJ,KAAK,CAAC,MAAM,CACV,MAAc,EACd,SAAiB,EACjB,KAAgC;QAEhC,MAAM,eAAK,CAAC,GAAG,CACb,GAAG,IAAI,CAAC,aAAa,sBAAsB,MAAM,wBAAwB,kBAAkB,CAAC,SAAS,CAAC,GAAG,EACzG,EAAE,KAAK,EAAE,EACT;YACE,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;aAC5C;SACF,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAc,EAAE,SAAiB;QAC5C,MAAM,eAAK,CAAC,MAAM,CAChB,GAAG,IAAI,CAAC,aAAa,sBAAsB,MAAM,wBAAwB,kBAAkB,CAAC,SAAS,CAAC,GAAG,EACzG;YACE,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE;aAC5C;SACF,CACF,CAAA;IACH,CAAC;CACF;AAjCD,0DAiCC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { FlowBuilderContentsResult } from './contents-result';
|
|
2
2
|
import type { FlowBuilderContext } from './context';
|
|
3
3
|
export declare enum PushFlowErrorCode {
|
|
4
|
-
|
|
5
|
-
NoPushFlowId = "NoPushFlowId",
|
|
4
|
+
NoCampaignContext = "NoCampaignContext",
|
|
6
5
|
NoCampaignStartNode = "NoCampaignStartNode",
|
|
7
|
-
|
|
6
|
+
NoCampaignFollowUpNode = "NoCampaignFollowUpNode"
|
|
8
7
|
}
|
|
9
8
|
export declare class PushFlowError extends Error {
|
|
10
9
|
readonly code: PushFlowErrorCode;
|
|
@@ -16,7 +15,5 @@ export declare class PushFlowResolver {
|
|
|
16
15
|
private flowBuilderPlugin;
|
|
17
16
|
constructor(context: FlowBuilderContext);
|
|
18
17
|
getContents(): Promise<FlowBuilderContentsResult>;
|
|
19
|
-
private
|
|
20
|
-
private getPushFlowNode;
|
|
21
|
-
private getCampaignId;
|
|
18
|
+
private getCampaignStartNode;
|
|
22
19
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PushFlowResolver = exports.PushFlowError = exports.PushFlowErrorCode = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@botonic/core");
|
|
5
5
|
var PushFlowErrorCode;
|
|
6
6
|
(function (PushFlowErrorCode) {
|
|
7
|
-
PushFlowErrorCode["
|
|
8
|
-
PushFlowErrorCode["NoPushFlowId"] = "NoPushFlowId";
|
|
7
|
+
PushFlowErrorCode["NoCampaignContext"] = "NoCampaignContext";
|
|
9
8
|
PushFlowErrorCode["NoCampaignStartNode"] = "NoCampaignStartNode";
|
|
10
|
-
PushFlowErrorCode["
|
|
9
|
+
PushFlowErrorCode["NoCampaignFollowUpNode"] = "NoCampaignFollowUpNode";
|
|
11
10
|
})(PushFlowErrorCode || (exports.PushFlowErrorCode = PushFlowErrorCode = {}));
|
|
12
11
|
class PushFlowError extends Error {
|
|
13
12
|
constructor(code, reason) {
|
|
@@ -24,42 +23,29 @@ class PushFlowResolver {
|
|
|
24
23
|
this.flowBuilderPlugin = context.flowBuilderPlugin;
|
|
25
24
|
}
|
|
26
25
|
async getContents() {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
const campaignContext = (0, core_1.getInputContextOfType)(this.botContext.input.context, core_1.BotonicInputContextType.PushFlow);
|
|
27
|
+
if (!campaignContext) {
|
|
28
|
+
throw new PushFlowError(PushFlowErrorCode.NoCampaignContext, 'No campaign context found in input context');
|
|
29
|
+
}
|
|
30
|
+
const { campaign_id: campaignId, campaign_flow_id: campaignFlowId, campaign_follow_up_id: campaignFollowUpId, } = campaignContext;
|
|
31
|
+
const campaignStartNode = this.getCampaignStartNode(campaignFlowId);
|
|
32
|
+
const followUpNode = campaignFollowUpId
|
|
33
|
+
? this.cmsApi.getNodeById(campaignFollowUpId)
|
|
34
|
+
: undefined;
|
|
35
|
+
if (campaignFollowUpId && !followUpNode) {
|
|
36
|
+
throw new PushFlowError(PushFlowErrorCode.NoCampaignFollowUpNode, 'No campaign follow up node found');
|
|
37
|
+
}
|
|
30
38
|
return {
|
|
31
|
-
contents: await this.flowBuilderPlugin.getContentsByNode(
|
|
39
|
+
contents: await this.flowBuilderPlugin.getContentsByNode(followUpNode ?? campaignStartNode),
|
|
32
40
|
campaignFirstMessageId: campaignId,
|
|
33
41
|
};
|
|
34
42
|
}
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
38
|
-
throw new PushFlowError(PushFlowErrorCode.NoInputPayload, 'No payload found in input');
|
|
39
|
-
}
|
|
40
|
-
const parts = payload.split(constants_1.SEPARATOR);
|
|
41
|
-
const pushFlowId = parts.length > 1 ? parts[1] : '';
|
|
42
|
-
if (!pushFlowId) {
|
|
43
|
-
throw new PushFlowError(PushFlowErrorCode.NoPushFlowId, 'No push flow id found in input payload');
|
|
44
|
-
}
|
|
45
|
-
return pushFlowId;
|
|
46
|
-
}
|
|
47
|
-
getPushFlowNode(pushFlowId) {
|
|
48
|
-
const pushFlowNode = this.cmsApi.getNodeByCampaignId(pushFlowId);
|
|
49
|
-
if (!pushFlowNode) {
|
|
43
|
+
getCampaignStartNode(campaignId) {
|
|
44
|
+
const campaignStartNode = this.cmsApi.getNodeByCampaignId(campaignId);
|
|
45
|
+
if (!campaignStartNode) {
|
|
50
46
|
throw new PushFlowError(PushFlowErrorCode.NoCampaignStartNode, 'No campaign start node found');
|
|
51
47
|
}
|
|
52
|
-
return
|
|
53
|
-
}
|
|
54
|
-
getCampaignId() {
|
|
55
|
-
const campaignId = this.botContext.input.context &&
|
|
56
|
-
'campaign_id' in this.botContext.input.context
|
|
57
|
-
? this.botContext.input.context.campaign_id
|
|
58
|
-
: undefined;
|
|
59
|
-
if (!campaignId) {
|
|
60
|
-
throw new PushFlowError(PushFlowErrorCode.NoCampaignId, 'No campaign id found in input context');
|
|
61
|
-
}
|
|
62
|
-
return campaignId;
|
|
48
|
+
return campaignStartNode;
|
|
63
49
|
}
|
|
64
50
|
}
|
|
65
51
|
exports.PushFlowResolver = PushFlowResolver;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-flow-resolver.js","sourceRoot":"","sources":["../../../src/action/push-flow-resolver.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"push-flow-resolver.js","sourceRoot":"","sources":["../../../src/action/push-flow-resolver.ts"],"names":[],"mappings":";;;AAAA,wCAIsB;AAOtB,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;AACnD,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAED,MAAa,aAAc,SAAQ,KAAK;IAGtC,YAAY,IAAuB,EAAE,MAAc;QACjD,KAAK,CAAC,qBAAqB,MAAM,EAAE,CAAC,CAAA;QACpC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAA;IAC7B,CAAC;CACF;AARD,sCAQC;AAED,MAAa,gBAAgB;IAK3B,YAAY,OAA2B;QACrC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,OAAO,CAAA;QACjC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;QAC5B,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAA;IACpD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,eAAe,GAAG,IAAA,4BAAqB,EAC3C,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,EAC7B,8BAAuB,CAAC,QAAQ,CACjC,CAAA;QAED,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,aAAa,CACrB,iBAAiB,CAAC,iBAAiB,EACnC,4CAA4C,CAC7C,CAAA;QACH,CAAC;QAED,MAAM,EACJ,WAAW,EAAE,UAAU,EACvB,gBAAgB,EAAE,cAAc,EAChC,qBAAqB,EAAE,kBAAkB,GAC1C,GAAG,eAAe,CAAA;QAEnB,MAAM,iBAAiB,GAAG,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAA;QACnE,MAAM,YAAY,GAAG,kBAAkB;YACrC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAoB,kBAAkB,CAAC;YAChE,CAAC,CAAC,SAAS,CAAA;QAEb,IAAI,kBAAkB,IAAI,CAAC,YAAY,EAAE,CAAC;YACxC,MAAM,IAAI,aAAa,CACrB,iBAAiB,CAAC,sBAAsB,EACxC,kCAAkC,CACnC,CAAA;QACH,CAAC;QAED,OAAO;YACL,QAAQ,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CACtD,YAAY,IAAI,iBAAiB,CAClC;YACD,sBAAsB,EAAE,UAAU;SACnC,CAAA;IACH,CAAC;IAEO,oBAAoB,CAAC,UAAkB;QAC7C,MAAM,iBAAiB,GACrB,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAoB,UAAU,CAAC,CAAA;QAEhE,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,IAAI,aAAa,CACrB,iBAAiB,CAAC,mBAAmB,EACrC,8BAA8B,CAC/B,CAAA;QACH,CAAC;QAED,OAAO,iBAAiB,CAAA;IAC1B,CAAC;CACF;AA/DD,4CA+DC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type BotContext } from '@botonic/core';
|
|
2
|
+
import { ContentFieldsBase } from './content-fields-base';
|
|
3
|
+
import type { HtUpdateVariablesNode } from './hubtype-fields/update-variables';
|
|
4
|
+
export declare class FlowUpdateVariables extends ContentFieldsBase {
|
|
5
|
+
setVariables: Record<string, string | number | boolean>;
|
|
6
|
+
unsetVariables: string[];
|
|
7
|
+
static fromHubtypeCMS(cmsUpdateVariables: HtUpdateVariablesNode, botContext: BotContext): Promise<FlowUpdateVariables>;
|
|
8
|
+
private applyVariablesAndSyncContactInfo;
|
|
9
|
+
private setSessionValueFromKeyPath;
|
|
10
|
+
private getContactInfoFieldName;
|
|
11
|
+
private updateSessionContactInfoField;
|
|
12
|
+
trackFlow(botContext: BotContext): Promise<void>;
|
|
13
|
+
processContent(botContext: BotContext): Promise<void>;
|
|
14
|
+
toBotonic(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
}
|