@xapp/stentor-service-promio 1.80.3 → 1.82.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/lib/PromioService.d.ts +28 -1
- package/lib/PromioService.js +134 -131
- package/lib/PromioService.js.map +1 -1
- package/package.json +5 -2
package/lib/PromioService.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/*! Copyright (c) 2022, XAPPmedia */
|
|
2
1
|
import { BaseService, CrmResponse, CrmService, CrmServiceAvailability, CrmServiceAvailabilityOptions, CrmServiceJobType, DateTimeRange, ExternalLead } from "stentor-models";
|
|
3
2
|
import { FetchService } from "stentor-service-fetch";
|
|
4
3
|
/**
|
|
@@ -127,3 +126,31 @@ export declare class PromioService extends FetchService implements CrmService {
|
|
|
127
126
|
getJobType(message: string, externalLead?: ExternalLead): Promise<CrmServiceJobType>;
|
|
128
127
|
send(externalLead: ExternalLead, extras?: PromioExternalLeadExtras): Promise<CrmResponse>;
|
|
129
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Describes the HTTP request that should be POSTed to Promio.
|
|
131
|
+
* Stateless callers (e.g. stentor-api's chain runner) execute the
|
|
132
|
+
* request themselves so they can capture it for audit logging.
|
|
133
|
+
*
|
|
134
|
+
* SECURITY: `url` contains `AuthToken` as a query parameter — this is
|
|
135
|
+
* the partner credential. Callers that audit-log this descriptor must
|
|
136
|
+
* redact the `AuthToken` query value before persisting the URL.
|
|
137
|
+
*/
|
|
138
|
+
export interface PromioRequestDescriptor {
|
|
139
|
+
url: string;
|
|
140
|
+
method: "POST";
|
|
141
|
+
headers: Record<string, string>;
|
|
142
|
+
body: PromioLead;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Builds the Promio request descriptor without performing any I/O.
|
|
146
|
+
*
|
|
147
|
+
* Callers that pass `props` directly are responsible for resolving any
|
|
148
|
+
* env-var defaults beforehand — `PromioService`'s constructor handles
|
|
149
|
+
* that resolution when this helper is used through the class.
|
|
150
|
+
*/
|
|
151
|
+
export declare function buildPromioRequest(props: PromioServiceProps, externalLead: ExternalLead, extras?: PromioExternalLeadExtras): PromioRequestDescriptor;
|
|
152
|
+
/**
|
|
153
|
+
* Parses a Promio response into a `CrmResponse`. Stateless — callers
|
|
154
|
+
* that execute the HTTP request themselves pass the decoded JSON body here.
|
|
155
|
+
*/
|
|
156
|
+
export declare function parsePromioResponse(response: PromioResponse): CrmResponse;
|
package/lib/PromioService.js
CHANGED
|
@@ -10,8 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PromioService = void 0;
|
|
13
|
-
|
|
13
|
+
exports.buildPromioRequest = buildPromioRequest;
|
|
14
|
+
exports.parsePromioResponse = parsePromioResponse;
|
|
15
|
+
/*! Copyright (c) 2022, XAPPmedia */
|
|
16
|
+
const axios_1 = require("axios");
|
|
14
17
|
const stentor_logger_1 = require("stentor-logger");
|
|
18
|
+
const stentor_service_fetch_1 = require("stentor-service-fetch");
|
|
15
19
|
const util_1 = require("./util");
|
|
16
20
|
const TIMEOUT_MS = 12000;
|
|
17
21
|
class PromioService extends stentor_service_fetch_1.FetchService {
|
|
@@ -50,145 +54,144 @@ class PromioService extends stentor_service_fetch_1.FetchService {
|
|
|
50
54
|
}
|
|
51
55
|
send(externalLead, extras) {
|
|
52
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
const descriptor = buildPromioRequest(this.props, externalLead, extras);
|
|
58
|
+
(0, stentor_logger_1.log)().info(`Promio: Sending Leads (original): ${JSON.stringify(externalLead, undefined, 2)}`);
|
|
59
|
+
(0, stentor_logger_1.log)().info(`Promio: Sending Leads (transformed payload): ${JSON.stringify(descriptor.body, undefined, 2)}`);
|
|
60
|
+
try {
|
|
61
|
+
const response = yield axios_1.default.post(descriptor.url, descriptor.body, {
|
|
62
|
+
headers: descriptor.headers,
|
|
63
|
+
timeout: TIMEOUT_MS
|
|
64
|
+
});
|
|
65
|
+
return parsePromioResponse(response.data);
|
|
55
66
|
}
|
|
56
|
-
|
|
57
|
-
|
|
67
|
+
catch (error) {
|
|
68
|
+
return {
|
|
69
|
+
status: "Failure",
|
|
70
|
+
message: `Promio: Lead submission failed: ${error instanceof Error ? error.message : String(error)}`
|
|
71
|
+
};
|
|
58
72
|
}
|
|
59
|
-
|
|
60
|
-
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.PromioService = PromioService;
|
|
77
|
+
/**
|
|
78
|
+
* Builds the Promio request descriptor without performing any I/O.
|
|
79
|
+
*
|
|
80
|
+
* Callers that pass `props` directly are responsible for resolving any
|
|
81
|
+
* env-var defaults beforehand — `PromioService`'s constructor handles
|
|
82
|
+
* that resolution when this helper is used through the class.
|
|
83
|
+
*/
|
|
84
|
+
function buildPromioRequest(props, externalLead, extras) {
|
|
85
|
+
if (!props.authToken) {
|
|
86
|
+
throw new Error("Promio: auth token is not set");
|
|
87
|
+
}
|
|
88
|
+
if (!props.dataMap) {
|
|
89
|
+
throw new Error("Promio: data map is not set");
|
|
90
|
+
}
|
|
91
|
+
if (!props.endPoint) {
|
|
92
|
+
throw new Error("Promio: endpoint is not set");
|
|
93
|
+
}
|
|
94
|
+
const transcript = (0, util_1.transformTranscript)(externalLead.transcript, extras === null || extras === void 0 ? void 0 : extras.botId);
|
|
95
|
+
// Determine the delimiter to use based on fieldTransformations and organizationId
|
|
96
|
+
let delimiter = "\n\n"; // default
|
|
97
|
+
const fieldPrefixes = new Map();
|
|
98
|
+
if (props.fieldTransformations && props.organizationId) {
|
|
99
|
+
const organizationId = props.organizationId;
|
|
100
|
+
for (const transformation of props.fieldTransformations) {
|
|
101
|
+
const applies = !transformation.organizationIds ||
|
|
102
|
+
transformation.organizationIds.length === 0 ||
|
|
103
|
+
transformation.organizationIds.some(orgId => orgId.toLowerCase() === organizationId.toLowerCase());
|
|
104
|
+
if (applies) {
|
|
105
|
+
if (transformation.prefix) {
|
|
106
|
+
fieldPrefixes.set(transformation.field.toUpperCase(), transformation.prefix);
|
|
107
|
+
}
|
|
108
|
+
if (transformation.delimiter) {
|
|
109
|
+
delimiter = transformation.delimiter;
|
|
110
|
+
}
|
|
61
111
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const fields = (0, util_1.transformFields)(externalLead.fields, delimiter, fieldPrefixes);
|
|
115
|
+
const lead = {
|
|
116
|
+
transcript,
|
|
117
|
+
completed: extras === null || extras === void 0 ? void 0 : extras.completed,
|
|
118
|
+
// This will be the page they are on when they submit.
|
|
119
|
+
// extras.source has the URL while source on the lead is "widget" (chat) or "form-widget"
|
|
120
|
+
source: (extras === null || extras === void 0 ? void 0 : extras.source) || "",
|
|
121
|
+
externalId: extras === null || extras === void 0 ? void 0 : extras.externalId,
|
|
122
|
+
fields
|
|
123
|
+
};
|
|
124
|
+
if (props.fieldTransformations && props.fieldTransformations.length > 0) {
|
|
125
|
+
const organizationId = props.organizationId;
|
|
126
|
+
lead.fields = lead.fields.map((field) => {
|
|
127
|
+
var _a;
|
|
128
|
+
const transformation = (_a = props.fieldTransformations) === null || _a === void 0 ? void 0 : _a.find((t) => {
|
|
129
|
+
if (t.field.toLowerCase() !== field.name.toLowerCase()) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
if (t.organizationIds && t.organizationIds.length > 0) {
|
|
133
|
+
if (!organizationId) {
|
|
134
|
+
return false;
|
|
83
135
|
}
|
|
136
|
+
return t.organizationIds.some(orgId => orgId.toLowerCase() === organizationId.toLowerCase());
|
|
84
137
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
};
|
|
97
|
-
// Apply field transformations if configured
|
|
98
|
-
if (this.props.fieldTransformations && this.props.fieldTransformations.length > 0) {
|
|
99
|
-
const organizationId = this.props.organizationId;
|
|
100
|
-
lead.fields = lead.fields.map((field) => {
|
|
101
|
-
var _a;
|
|
102
|
-
const transformation = (_a = this.props.fieldTransformations) === null || _a === void 0 ? void 0 : _a.find((t) => {
|
|
103
|
-
// Check if field name matches
|
|
104
|
-
if (t.field.toLowerCase() !== field.name.toLowerCase()) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
// If organizationIds is specified, check if current organizationId matches
|
|
108
|
-
if (t.organizationIds && t.organizationIds.length > 0) {
|
|
109
|
-
if (!organizationId) {
|
|
110
|
-
return false; // Transformation requires org ID but none provided
|
|
111
|
-
}
|
|
112
|
-
// Case-insensitive match
|
|
113
|
-
return t.organizationIds.some(orgId => orgId.toLowerCase() === organizationId.toLowerCase());
|
|
114
|
-
}
|
|
115
|
-
// No organizationIds restriction, applies to all
|
|
116
|
-
return true;
|
|
117
|
-
});
|
|
118
|
-
if (transformation) {
|
|
119
|
-
let value = field.value;
|
|
120
|
-
if (transformation.prefix) {
|
|
121
|
-
// Skip MESSAGE prefix if it was already applied in transformFields (enhanced format)
|
|
122
|
-
if (field.name.toLowerCase() === "message" && fieldPrefixes.has("MESSAGE")) {
|
|
123
|
-
// Prefix already incorporated during field reordering in transformFields
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
value = `${transformation.prefix}${value}`;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
if (transformation.suffix) {
|
|
130
|
-
value = `${value}${transformation.suffix}`;
|
|
131
|
-
}
|
|
132
|
-
return {
|
|
133
|
-
name: field.name,
|
|
134
|
-
value
|
|
135
|
-
};
|
|
138
|
+
return true;
|
|
139
|
+
});
|
|
140
|
+
if (transformation) {
|
|
141
|
+
let value = field.value;
|
|
142
|
+
if (transformation.prefix) {
|
|
143
|
+
// Skip MESSAGE prefix if it was already applied in transformFields (enhanced format)
|
|
144
|
+
if (field.name.toLowerCase() === "message" && fieldPrefixes.has("MESSAGE")) {
|
|
145
|
+
// Prefix already incorporated during field reordering in transformFields
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
value = `${transformation.prefix}${value}`;
|
|
136
149
|
}
|
|
137
|
-
return field;
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
let DataMap = this.props.dataMap;
|
|
141
|
-
// look in the extras for rwg_token
|
|
142
|
-
const isReserveWithGoogle = !!(extras === null || extras === void 0 ? void 0 : extras.rwg_token);
|
|
143
|
-
if (externalLead.source === "widget") {
|
|
144
|
-
// this shows up as Website - Chat
|
|
145
|
-
DataMap = "XAPPChatLead";
|
|
146
|
-
}
|
|
147
|
-
else if (isReserveWithGoogle) {
|
|
148
|
-
// this shows up as Reserve with Google
|
|
149
|
-
DataMap = "GoogleReserve";
|
|
150
|
-
}
|
|
151
|
-
else if (externalLead.source === "form-widget") {
|
|
152
|
-
// this shows up as Website - Form
|
|
153
|
-
DataMap = "PromioExternalLead";
|
|
154
|
-
}
|
|
155
|
-
const url = `${this.props.endPoint}/?${new URLSearchParams({
|
|
156
|
-
AuthToken: this.props.authToken,
|
|
157
|
-
DataMap: DataMap
|
|
158
|
-
})}`;
|
|
159
|
-
const opts = {
|
|
160
|
-
method: "POST",
|
|
161
|
-
headers: {
|
|
162
|
-
"Content-Type": "application/json"
|
|
163
|
-
},
|
|
164
|
-
timeout: TIMEOUT_MS,
|
|
165
|
-
body: JSON.stringify(lead)
|
|
166
|
-
};
|
|
167
|
-
(0, stentor_logger_1.log)().info(`Promio: Sending Leads (original): ${JSON.stringify(externalLead, undefined, 2)}`);
|
|
168
|
-
(0, stentor_logger_1.log)().info(`Promio: Sending Leads (transformed payload): ${JSON.stringify(lead, undefined, 2)}`);
|
|
169
|
-
return this.fetch(url, opts)
|
|
170
|
-
.then((res) => res.json())
|
|
171
|
-
.then((response) => {
|
|
172
|
-
if (response.Status !== "Success") {
|
|
173
|
-
(0, stentor_logger_1.log)().error(`Promio: Lead submission failed: ${response.Reason}`);
|
|
174
150
|
}
|
|
175
|
-
|
|
176
|
-
|
|
151
|
+
if (transformation.suffix) {
|
|
152
|
+
value = `${value}${transformation.suffix}`;
|
|
177
153
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
};
|
|
182
|
-
return crmResponse;
|
|
183
|
-
})
|
|
184
|
-
.catch((error) => {
|
|
185
|
-
return {
|
|
186
|
-
status: "Failure",
|
|
187
|
-
message: `Promio: Lead submission failed: ${error.message}`
|
|
188
|
-
};
|
|
189
|
-
});
|
|
154
|
+
return { name: field.name, value };
|
|
155
|
+
}
|
|
156
|
+
return field;
|
|
190
157
|
});
|
|
191
158
|
}
|
|
159
|
+
let DataMap = props.dataMap;
|
|
160
|
+
const isReserveWithGoogle = !!(extras === null || extras === void 0 ? void 0 : extras.rwg_token);
|
|
161
|
+
if (externalLead.source === "widget") {
|
|
162
|
+
DataMap = "XAPPChatLead";
|
|
163
|
+
}
|
|
164
|
+
else if (isReserveWithGoogle) {
|
|
165
|
+
DataMap = "GoogleReserve";
|
|
166
|
+
}
|
|
167
|
+
else if (externalLead.source === "form-widget") {
|
|
168
|
+
DataMap = "PromioExternalLead";
|
|
169
|
+
}
|
|
170
|
+
const url = `${props.endPoint}/?${new URLSearchParams({
|
|
171
|
+
AuthToken: props.authToken,
|
|
172
|
+
DataMap: DataMap
|
|
173
|
+
})}`;
|
|
174
|
+
return {
|
|
175
|
+
url,
|
|
176
|
+
method: "POST",
|
|
177
|
+
headers: { "Content-Type": "application/json" },
|
|
178
|
+
body: lead
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Parses a Promio response into a `CrmResponse`. Stateless — callers
|
|
183
|
+
* that execute the HTTP request themselves pass the decoded JSON body here.
|
|
184
|
+
*/
|
|
185
|
+
function parsePromioResponse(response) {
|
|
186
|
+
if ((response === null || response === void 0 ? void 0 : response.Status) !== "Success") {
|
|
187
|
+
(0, stentor_logger_1.log)().error(`Promio: Lead submission failed: ${response === null || response === void 0 ? void 0 : response.Reason}`);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
(0, stentor_logger_1.log)().info(`Promio: Lead submission OK: ${response.Message}`);
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
status: (response === null || response === void 0 ? void 0 : response.Status) === "Success" ? "Success" : "Failure",
|
|
194
|
+
message: (response === null || response === void 0 ? void 0 : response.Message) || (response === null || response === void 0 ? void 0 : response.Reason)
|
|
195
|
+
};
|
|
192
196
|
}
|
|
193
|
-
exports.PromioService = PromioService;
|
|
194
197
|
//# sourceMappingURL=PromioService.js.map
|
package/lib/PromioService.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromioService.js","sourceRoot":"","sources":["../src/PromioService.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PromioService.js","sourceRoot":"","sources":["../src/PromioService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAqOA,gDAsHC;AAMD,kDAWC;AA5WD,oCAAoC;AACpC,iCAA0B;AAW1B,mDAAqC;AACrC,iEAAqD;AACrD,iCAA8D;AAE9D,MAAM,UAAU,GAAG,KAAK,CAAC;AA4HzB,MAAa,aAAc,SAAQ,oCAAY;IAG3C,YAAY,KAAyB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,qBAAQ,KAAK,CAAE,CAAC;QAE1B,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;YACnB,IAA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AAA,oBAAG,GAAE,CAAC,KAAK,CAAC,mCAAmC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,EAAE,CAAC,CAAC;IACvE,CAAC;SAAM,CAAC;QACJ,IAAA,oBAAG,GAAE,CAAC,IAAI,CAAC,+BAA+B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO;QACH,MAAM,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,MAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QAC9D,OAAO,EAAE,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,MAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAA;KACjD,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.82.0",
|
|
8
8
|
"description": "Service to interface the Promio CRM service",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
"ts-node": "10.9.2",
|
|
30
30
|
"typescript": "5.9.3"
|
|
31
31
|
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"axios": "1.16.1"
|
|
34
|
+
},
|
|
32
35
|
"peerDependencies": {
|
|
33
36
|
"stentor-models": "1.x",
|
|
34
37
|
"stentor-service-fetch": "1.x"
|
|
@@ -39,5 +42,5 @@
|
|
|
39
42
|
"test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\"",
|
|
40
43
|
"test:f": "mocha --recursive -r ts-node/register \"./src/**/*.ftest.ts\""
|
|
41
44
|
},
|
|
42
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "d4ad419e6b72c016edeb41c56210b2a70c1e94a9"
|
|
43
46
|
}
|