@xapp/stentor-service-contractor-appointments 1.80.3 → 1.81.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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { FetchService } from "stentor-service-fetch";
|
|
3
3
|
import { BaseService, CrmResponse, CrmService, CrmServiceAvailability, CrmServiceAvailabilityOptions, CrmServiceAvailabilitySettings, CrmServiceJobType, DateTimeRange, ExternalLead } from "stentor-models";
|
|
4
4
|
import { ContractorAppointmentsCustomer, ContractorAppointmentsResponse, ContractorAppointmentsExternalLeadExtras } from "./models";
|
|
5
|
+
import { IParsedAddress } from "addresser";
|
|
5
6
|
export interface ContractorAppointmentsAuthenticator {
|
|
6
7
|
(): Promise<{
|
|
7
8
|
campaignId: string;
|
|
@@ -17,6 +18,35 @@ export interface ContractorAppointmentsServiceProps extends BaseService, CrmServ
|
|
|
17
18
|
defaultTrade?: string;
|
|
18
19
|
authenticate: ContractorAppointmentsAuthenticator;
|
|
19
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Resolved inputs required to build a Contractor Appointments request. The
|
|
23
|
+
* caller (typically the class's `send()` or stentor-api's chain runner) is
|
|
24
|
+
* responsible for resolving credentials, the AI-derived job type, and the
|
|
25
|
+
* parsed address before calling `buildContractorAppointmentsRequest`.
|
|
26
|
+
*/
|
|
27
|
+
export interface BuildContractorAppointmentsRequestContext {
|
|
28
|
+
campaignId: string;
|
|
29
|
+
campaignKey: string;
|
|
30
|
+
/** AI-derived job type / trade name, e.g. "HVAC". */
|
|
31
|
+
jobType?: string;
|
|
32
|
+
/** Optional pre-parsed address — overrides City/State/Zip from lead fields. */
|
|
33
|
+
parsedAddress?: IParsedAddress;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Describes the HTTP request that should be POSTed to the partner's lead
|
|
37
|
+
* endpoint. Stateless callers execute the request themselves so they can
|
|
38
|
+
* capture it for audit logging.
|
|
39
|
+
*
|
|
40
|
+
* SECURITY: `body.lp_campaign_id` and `body.lp_campaign_key` are partner
|
|
41
|
+
* credentials. Callers that audit-log this descriptor must redact those
|
|
42
|
+
* fields before persisting the body.
|
|
43
|
+
*/
|
|
44
|
+
export interface ContractorAppointmentsRequestDescriptor {
|
|
45
|
+
url: string;
|
|
46
|
+
method: "POST";
|
|
47
|
+
headers: Record<string, string>;
|
|
48
|
+
body: ContractorAppointmentsCustomer;
|
|
49
|
+
}
|
|
20
50
|
export declare class ContractorAppointmentsService extends FetchService implements CrmService {
|
|
21
51
|
private props;
|
|
22
52
|
constructor(props: ContractorAppointmentsServiceProps);
|
|
@@ -26,3 +56,24 @@ export declare class ContractorAppointmentsService extends FetchService implemen
|
|
|
26
56
|
addPing(): Promise<any>;
|
|
27
57
|
addLead(customer: ContractorAppointmentsCustomer): Promise<ContractorAppointmentsResponse>;
|
|
28
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Builds the Contractor Appointments request descriptor without performing
|
|
61
|
+
* any I/O. The caller must resolve `campaignId`/`campaignKey` (via the
|
|
62
|
+
* authenticator), the AI-derived `jobType`, and `parsedAddress` before
|
|
63
|
+
* calling this helper.
|
|
64
|
+
*/
|
|
65
|
+
export declare function buildContractorAppointmentsRequest(context: BuildContractorAppointmentsRequestContext, externalLead: ExternalLead, extras?: ContractorAppointmentsExternalLeadExtras): ContractorAppointmentsRequestDescriptor;
|
|
66
|
+
/**
|
|
67
|
+
* Parses a Contractor Appointments response into a `CrmResponse`. The
|
|
68
|
+
* partner's lead endpoint doesn't return a structured status code in the
|
|
69
|
+
* body — for now any defined body is treated as success and an absent
|
|
70
|
+
* body (`null` / `undefined`) is treated as failure, matching the existing
|
|
71
|
+
* `send()` behavior for 2xx responses. Callers using this helper through
|
|
72
|
+
* their own transport must still surface HTTP-level errors themselves
|
|
73
|
+
* (4xx / 5xx); this helper only inspects the response body.
|
|
74
|
+
*
|
|
75
|
+
* TODO: when the partner returns a structured `lp_response` payload (e.g.
|
|
76
|
+
* `{ status: "matched" | "unmatched" | "rejected", lp_lead_id }`), parse
|
|
77
|
+
* it here and surface `lead_id` via `refId` plus the outcome via `message`.
|
|
78
|
+
*/
|
|
79
|
+
export declare function parseContractorAppointmentsResponse(body: unknown): CrmResponse;
|
|
@@ -13,6 +13,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ContractorAppointmentsService = void 0;
|
|
16
|
+
exports.buildContractorAppointmentsRequest = buildContractorAppointmentsRequest;
|
|
17
|
+
exports.parseContractorAppointmentsResponse = parseContractorAppointmentsResponse;
|
|
16
18
|
/*! Copyright (c) 2025, XAPP AI */
|
|
17
19
|
const stentor_service_fetch_1 = require("stentor-service-fetch");
|
|
18
20
|
const stentor_logger_1 = require("stentor-logger");
|
|
@@ -21,6 +23,22 @@ const ai_1 = require("./AI/ai");
|
|
|
21
23
|
const base_url = "https://track.costguide.com/post.do";
|
|
22
24
|
const ping_url = "https://track.costguide.com/ping.do";
|
|
23
25
|
const util_1 = require("./util");
|
|
26
|
+
/**
|
|
27
|
+
* Splits a `FULL_NAME` value into first and last names. Uses the
|
|
28
|
+
* "first token is the first name, everything else is the last name"
|
|
29
|
+
* convention — e.g. `"Mary Jane Watson"` → `first="Mary"`, `last="Jane Watson"`.
|
|
30
|
+
*
|
|
31
|
+
* Kept inline (and identical) to the matching helper in
|
|
32
|
+
* `stentor-service-boberdoo` so a single lead always produces the same
|
|
33
|
+
* wire name across CRMs. Mirror any change to this function there.
|
|
34
|
+
*/
|
|
35
|
+
function splitFullName(fullName) {
|
|
36
|
+
const parts = fullName.trim().split(/\s+/);
|
|
37
|
+
return {
|
|
38
|
+
firstName: parts[0],
|
|
39
|
+
lastName: parts.slice(1).join(" ") || undefined
|
|
40
|
+
};
|
|
41
|
+
}
|
|
24
42
|
class ContractorAppointmentsService extends stentor_service_fetch_1.FetchService {
|
|
25
43
|
constructor(props) {
|
|
26
44
|
super(props);
|
|
@@ -67,28 +85,16 @@ class ContractorAppointmentsService extends stentor_service_fetch_1.FetchService
|
|
|
67
85
|
// Send the lead or scheduling request
|
|
68
86
|
send(externalLead, extras) {
|
|
69
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
var _a, _b
|
|
88
|
+
var _a, _b;
|
|
71
89
|
const crmResponse = {
|
|
72
90
|
status: "Failure",
|
|
73
91
|
message: ""
|
|
74
92
|
};
|
|
75
93
|
try {
|
|
76
|
-
|
|
77
|
-
(
|
|
78
|
-
// Parse first/last name
|
|
79
|
-
const names = (0, util_1.getName)(externalLead);
|
|
80
|
-
const address = (_b = externalLead.fields.find((x) => x.name == "ADDRESS")) === null || _b === void 0 ? void 0 : _b.value;
|
|
81
|
-
const phone = (_c = externalLead.fields.find((x) => x.name == "PHONE")) === null || _c === void 0 ? void 0 : _c.value;
|
|
82
|
-
const email = (_d = externalLead.fields.find((x) => x.name == "EMAIL")) === null || _d === void 0 ? void 0 : _d.value;
|
|
83
|
-
const message = (_e = externalLead.fields.find((x) => x.name == "MESSAGE")) === null || _e === void 0 ? void 0 : _e.value;
|
|
84
|
-
const dateTime = (_f = externalLead.fields.find((x) => x.name == "DATETIME")) === null || _f === void 0 ? void 0 : _f.value;
|
|
85
|
-
const zip = (_g = externalLead.fields.find((x) => x.name == "ZIP")) === null || _g === void 0 ? void 0 : _g.value;
|
|
86
|
-
const preferredTime = (_h = externalLead.fields.find((x) => x.name == "PREFERRED_TIME")) === null || _h === void 0 ? void 0 : _h.value;
|
|
87
|
-
// const consentApproval = externalLead.fields.find((x) => x.name == "CONSENT_APPROVAL")?.value;
|
|
88
|
-
// look at fields on Jobber, figure out some way to standardize these across the FSM Services.
|
|
94
|
+
const address = (_a = externalLead.fields.find((x) => x.name === "ADDRESS")) === null || _a === void 0 ? void 0 : _a.value;
|
|
95
|
+
const message = (_b = externalLead.fields.find((x) => x.name === "MESSAGE")) === null || _b === void 0 ? void 0 : _b.value;
|
|
89
96
|
let parsedAddress;
|
|
90
97
|
try {
|
|
91
|
-
// TODO: POTENTIAL ISSUE HERE AS ADDRESS CAN SOMETIMES BE JUST STREET NUMBER AND STREET NAME, WHICH CAUSES PARSE ADDRESS TO THROW AN ERROR
|
|
92
98
|
parsedAddress = yield (0, util_1.parseAddress)(address);
|
|
93
99
|
}
|
|
94
100
|
catch (err) {
|
|
@@ -96,35 +102,18 @@ class ContractorAppointmentsService extends stentor_service_fetch_1.FetchService
|
|
|
96
102
|
}
|
|
97
103
|
const { campaignId, campaignKey } = yield this.props.authenticate();
|
|
98
104
|
const jobType = yield this.getJobType(message);
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
last_name: names.lastName,
|
|
107
|
-
zip_code: zip,
|
|
108
|
-
phone_home: phone,
|
|
109
|
-
email_address: email,
|
|
110
|
-
ip_address: "",
|
|
111
|
-
Trade: jobType.name,
|
|
112
|
-
Project_Description: message,
|
|
113
|
-
lp_s1: dateTime,
|
|
114
|
-
lp_s2: preferredTime
|
|
115
|
-
};
|
|
116
|
-
if (parsedAddress) {
|
|
117
|
-
crmRequest.address = parsedAddress.addressLine1;
|
|
118
|
-
crmRequest.city = parsedAddress.placeName;
|
|
119
|
-
crmRequest.state = parsedAddress.stateAbbreviation;
|
|
120
|
-
crmRequest.zip_code = parsedAddress.zipCode;
|
|
121
|
-
}
|
|
122
|
-
yield this.addLead(crmRequest);
|
|
105
|
+
const descriptor = buildContractorAppointmentsRequest({ campaignId, campaignKey, jobType: jobType.name, parsedAddress }, externalLead, extras);
|
|
106
|
+
// Note: `parseContractorAppointmentsResponse` is reserved for chain-runner
|
|
107
|
+
// callers that need a CrmResponse mapping. Class-internal `send()` calls
|
|
108
|
+
// addLead() directly because the partner's response is currently
|
|
109
|
+
// unstructured (2xx == success). If parseContractorAppointmentsResponse
|
|
110
|
+
// ever inspects the body for real, mirror the call here.
|
|
111
|
+
yield this.addLead(descriptor.body);
|
|
123
112
|
crmResponse.status = "Success";
|
|
124
113
|
}
|
|
125
114
|
catch (err) {
|
|
126
115
|
(0, stentor_logger_1.log)().error(`Contractor Appointments error send(): ${err}`);
|
|
127
|
-
crmResponse.message = err.message
|
|
116
|
+
crmResponse.message = err instanceof Error ? err.message : String(err);
|
|
128
117
|
}
|
|
129
118
|
return crmResponse;
|
|
130
119
|
});
|
|
@@ -177,4 +166,87 @@ class ContractorAppointmentsService extends stentor_service_fetch_1.FetchService
|
|
|
177
166
|
}
|
|
178
167
|
}
|
|
179
168
|
exports.ContractorAppointmentsService = ContractorAppointmentsService;
|
|
169
|
+
/**
|
|
170
|
+
* Builds the Contractor Appointments request descriptor without performing
|
|
171
|
+
* any I/O. The caller must resolve `campaignId`/`campaignKey` (via the
|
|
172
|
+
* authenticator), the AI-derived `jobType`, and `parsedAddress` before
|
|
173
|
+
* calling this helper.
|
|
174
|
+
*/
|
|
175
|
+
function buildContractorAppointmentsRequest(context, externalLead,
|
|
176
|
+
// `extras` is accepted for parity with the other CRM service descriptors
|
|
177
|
+
// (Boberdoo/Promio/Hubspot all take extras) so callers can use a uniform
|
|
178
|
+
// signature. The partner's current wire format has no slot for tracking
|
|
179
|
+
// fields, so the parameter is reserved for future use.
|
|
180
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
181
|
+
extras) {
|
|
182
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
183
|
+
// Resolve first/last name from explicit fields, falling back to splitting FULL_NAME.
|
|
184
|
+
// The split convention matches `splitFullName` in `stentor-service-boberdoo` so a
|
|
185
|
+
// single lead produces the same wire name across CRMs; mirror any change here.
|
|
186
|
+
let firstName = (_a = externalLead.fields.find((x) => x.name === "FIRST_NAME")) === null || _a === void 0 ? void 0 : _a.value;
|
|
187
|
+
let lastName = (_b = externalLead.fields.find((x) => x.name === "LAST_NAME")) === null || _b === void 0 ? void 0 : _b.value;
|
|
188
|
+
const fullName = (_c = externalLead.fields.find((x) => x.name === "FULL_NAME")) === null || _c === void 0 ? void 0 : _c.value;
|
|
189
|
+
if (!firstName && fullName) {
|
|
190
|
+
const split = splitFullName(fullName);
|
|
191
|
+
firstName = split.firstName;
|
|
192
|
+
lastName = split.lastName;
|
|
193
|
+
}
|
|
194
|
+
const phone = (_d = externalLead.fields.find((x) => x.name === "PHONE")) === null || _d === void 0 ? void 0 : _d.value;
|
|
195
|
+
const email = (_e = externalLead.fields.find((x) => x.name === "EMAIL")) === null || _e === void 0 ? void 0 : _e.value;
|
|
196
|
+
const message = (_f = externalLead.fields.find((x) => x.name === "MESSAGE")) === null || _f === void 0 ? void 0 : _f.value;
|
|
197
|
+
const dateTime = (_g = externalLead.fields.find((x) => x.name === "DATETIME")) === null || _g === void 0 ? void 0 : _g.value;
|
|
198
|
+
const zip = (_h = externalLead.fields.find((x) => x.name === "ZIP")) === null || _h === void 0 ? void 0 : _h.value;
|
|
199
|
+
const preferredTime = (_j = externalLead.fields.find((x) => x.name === "PREFERRED_TIME")) === null || _j === void 0 ? void 0 : _j.value;
|
|
200
|
+
const customer = {
|
|
201
|
+
lp_campaign_id: context.campaignId,
|
|
202
|
+
lp_campaign_key: context.campaignKey,
|
|
203
|
+
lp_response: "json",
|
|
204
|
+
lp_ping_id: "",
|
|
205
|
+
source_type: "Other",
|
|
206
|
+
first_name: firstName,
|
|
207
|
+
last_name: lastName,
|
|
208
|
+
zip_code: zip,
|
|
209
|
+
phone_home: phone,
|
|
210
|
+
email_address: email,
|
|
211
|
+
ip_address: "",
|
|
212
|
+
Trade: context.jobType,
|
|
213
|
+
Project_Description: message,
|
|
214
|
+
lp_s1: dateTime,
|
|
215
|
+
lp_s2: preferredTime
|
|
216
|
+
};
|
|
217
|
+
if (context.parsedAddress) {
|
|
218
|
+
customer.address = context.parsedAddress.addressLine1;
|
|
219
|
+
customer.city = context.parsedAddress.placeName;
|
|
220
|
+
customer.state = context.parsedAddress.stateAbbreviation;
|
|
221
|
+
customer.zip_code = context.parsedAddress.zipCode;
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
url: base_url,
|
|
225
|
+
method: "POST",
|
|
226
|
+
headers: {
|
|
227
|
+
Accept: "application/json",
|
|
228
|
+
"Content-Type": "application/json"
|
|
229
|
+
},
|
|
230
|
+
body: customer
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Parses a Contractor Appointments response into a `CrmResponse`. The
|
|
235
|
+
* partner's lead endpoint doesn't return a structured status code in the
|
|
236
|
+
* body — for now any defined body is treated as success and an absent
|
|
237
|
+
* body (`null` / `undefined`) is treated as failure, matching the existing
|
|
238
|
+
* `send()` behavior for 2xx responses. Callers using this helper through
|
|
239
|
+
* their own transport must still surface HTTP-level errors themselves
|
|
240
|
+
* (4xx / 5xx); this helper only inspects the response body.
|
|
241
|
+
*
|
|
242
|
+
* TODO: when the partner returns a structured `lp_response` payload (e.g.
|
|
243
|
+
* `{ status: "matched" | "unmatched" | "rejected", lp_lead_id }`), parse
|
|
244
|
+
* it here and surface `lead_id` via `refId` plus the outcome via `message`.
|
|
245
|
+
*/
|
|
246
|
+
function parseContractorAppointmentsResponse(body) {
|
|
247
|
+
if (body === null || body === undefined) {
|
|
248
|
+
return { status: "Failure", message: "Contractor Appointments returned no response body" };
|
|
249
|
+
}
|
|
250
|
+
return { status: "Success" };
|
|
251
|
+
}
|
|
180
252
|
//# sourceMappingURL=ContractorAppointmentsService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractorAppointmentsService.js","sourceRoot":"","sources":["../src/ContractorAppointmentsService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ContractorAppointmentsService.js","sourceRoot":"","sources":["../src/ContractorAppointmentsService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAwPA,gFA+DC;AAeD,kFAKC;AA3UD,kCAAkC;AAClC,iEAAqD;AAYrD,mDAAqC;AACr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M,EAAE,SAAS,EAAE,CAAC;AACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.81.0",
|
|
8
8
|
"description": "Service to integrate with Contractor Appointments",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -34,10 +34,11 @@
|
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "tsc -d true -p .",
|
|
36
36
|
"clean": "rm -rf ./lib/*",
|
|
37
|
-
"test": "
|
|
37
|
+
"test": "mocha --recursive -r ts-node/register \"./src/**/__test__/*.test.ts\"",
|
|
38
|
+
"test:f": "mocha --recursive --timeout 30000 -r ts-node/register \"./src/**/__test__/*.ftest.ts\"",
|
|
38
39
|
"local": "mocha --recursive --timeout 9000 -r ts-node/register \"./src/**/*.test.ts\""
|
|
39
40
|
},
|
|
40
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "34ce220a44ff054cc3818f1900e703c97eb2a579",
|
|
41
42
|
"dependencies": {
|
|
42
43
|
"addresser": "1.1.20",
|
|
43
44
|
"openai": "6.34.0"
|