@activepieces/piece-housecall-pro 0.1.4 → 0.1.6
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/package.json +7 -22
- package/src/index.js +13 -81
- package/README.md +0 -7
- package/src/index.d.ts +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/add-job-attachment.d.ts +0 -4
- package/src/lib/actions/add-job-attachment.js +0 -44
- package/src/lib/actions/add-job-attachment.js.map +0 -1
- package/src/lib/actions/add-job-line-item.d.ts +0 -13
- package/src/lib/actions/add-job-line-item.js +0 -123
- package/src/lib/actions/add-job-line-item.js.map +0 -1
- package/src/lib/actions/add-job-note.d.ts +0 -4
- package/src/lib/actions/add-job-note.js +0 -35
- package/src/lib/actions/add-job-note.js.map +0 -1
- package/src/lib/actions/add-job-tag.d.ts +0 -4
- package/src/lib/actions/add-job-tag.js +0 -35
- package/src/lib/actions/add-job-tag.js.map +0 -1
- package/src/lib/actions/bulk-update-job-input-materials.d.ts +0 -4
- package/src/lib/actions/bulk-update-job-input-materials.js +0 -35
- package/src/lib/actions/bulk-update-job-input-materials.js.map +0 -1
- package/src/lib/actions/bulk-update-job-line-items.d.ts +0 -5
- package/src/lib/actions/bulk-update-job-line-items.js +0 -44
- package/src/lib/actions/bulk-update-job-line-items.js.map +0 -1
- package/src/lib/actions/convert-lead-to-estimate-or-job.d.ts +0 -4
- package/src/lib/actions/convert-lead-to-estimate-or-job.js +0 -35
- package/src/lib/actions/convert-lead-to-estimate-or-job.js.map +0 -1
- package/src/lib/actions/create-customer-address.d.ts +0 -11
- package/src/lib/actions/create-customer-address.js +0 -84
- package/src/lib/actions/create-customer-address.js.map +0 -1
- package/src/lib/actions/create-customer.d.ts +0 -15
- package/src/lib/actions/create-customer.js +0 -122
- package/src/lib/actions/create-customer.js.map +0 -1
- package/src/lib/actions/create-estimate-option-attachment.d.ts +0 -5
- package/src/lib/actions/create-estimate-option-attachment.js +0 -37
- package/src/lib/actions/create-estimate-option-attachment.js.map +0 -1
- package/src/lib/actions/create-estimate-option-link.d.ts +0 -6
- package/src/lib/actions/create-estimate-option-link.js +0 -27
- package/src/lib/actions/create-estimate-option-link.js.map +0 -1
- package/src/lib/actions/create-estimate-option-note.d.ts +0 -5
- package/src/lib/actions/create-estimate-option-note.js +0 -25
- package/src/lib/actions/create-estimate-option-note.js.map +0 -1
- package/src/lib/actions/create-estimate.d.ts +0 -12
- package/src/lib/actions/create-estimate.js +0 -89
- package/src/lib/actions/create-estimate.js.map +0 -1
- package/src/lib/actions/create-job-appointment.d.ts +0 -7
- package/src/lib/actions/create-job-appointment.js +0 -55
- package/src/lib/actions/create-job-appointment.js.map +0 -1
- package/src/lib/actions/create-job-link.d.ts +0 -5
- package/src/lib/actions/create-job-link.js +0 -41
- package/src/lib/actions/create-job-link.js.map +0 -1
- package/src/lib/actions/create-job.d.ts +0 -15
- package/src/lib/actions/create-job.js +0 -126
- package/src/lib/actions/create-job.js.map +0 -1
- package/src/lib/actions/create-lead.d.ts +0 -16
- package/src/lib/actions/create-lead.js +0 -124
- package/src/lib/actions/create-lead.js.map +0 -1
- package/src/lib/actions/delete-estimate-option-note.d.ts +0 -5
- package/src/lib/actions/delete-estimate-option-note.js +0 -25
- package/src/lib/actions/delete-estimate-option-note.js.map +0 -1
- package/src/lib/actions/delete-job-appointment.d.ts +0 -4
- package/src/lib/actions/delete-job-appointment.js +0 -32
- package/src/lib/actions/delete-job-appointment.js.map +0 -1
- package/src/lib/actions/delete-job-line-item.d.ts +0 -4
- package/src/lib/actions/delete-job-line-item.js +0 -32
- package/src/lib/actions/delete-job-line-item.js.map +0 -1
- package/src/lib/actions/delete-job-note.d.ts +0 -4
- package/src/lib/actions/delete-job-note.js +0 -32
- package/src/lib/actions/delete-job-note.js.map +0 -1
- package/src/lib/actions/delete-job-schedule.d.ts +0 -3
- package/src/lib/actions/delete-job-schedule.js +0 -28
- package/src/lib/actions/delete-job-schedule.js.map +0 -1
- package/src/lib/actions/dispatch-job-to-employees.d.ts +0 -4
- package/src/lib/actions/dispatch-job-to-employees.js +0 -35
- package/src/lib/actions/dispatch-job-to-employees.js.map +0 -1
- package/src/lib/actions/get-customer-address.d.ts +0 -4
- package/src/lib/actions/get-customer-address.js +0 -33
- package/src/lib/actions/get-customer-address.js.map +0 -1
- package/src/lib/actions/get-customer-addresses.d.ts +0 -7
- package/src/lib/actions/get-customer-addresses.js +0 -72
- package/src/lib/actions/get-customer-addresses.js.map +0 -1
- package/src/lib/actions/get-customer.d.ts +0 -4
- package/src/lib/actions/get-customer.js +0 -43
- package/src/lib/actions/get-customer.js.map +0 -1
- package/src/lib/actions/get-customers.d.ts +0 -9
- package/src/lib/actions/get-customers.js +0 -97
- package/src/lib/actions/get-customers.js.map +0 -1
- package/src/lib/actions/get-estimate.d.ts +0 -4
- package/src/lib/actions/get-estimate.js +0 -43
- package/src/lib/actions/get-estimate.js.map +0 -1
- package/src/lib/actions/get-estimates.d.ts +0 -15
- package/src/lib/actions/get-estimates.js +0 -160
- package/src/lib/actions/get-estimates.js.map +0 -1
- package/src/lib/actions/get-job-appointments.d.ts +0 -3
- package/src/lib/actions/get-job-appointments.js +0 -27
- package/src/lib/actions/get-job-appointments.js.map +0 -1
- package/src/lib/actions/get-job-input-materials.d.ts +0 -3
- package/src/lib/actions/get-job-input-materials.js +0 -27
- package/src/lib/actions/get-job-input-materials.js.map +0 -1
- package/src/lib/actions/get-job-invoices.d.ts +0 -3
- package/src/lib/actions/get-job-invoices.js +0 -28
- package/src/lib/actions/get-job-invoices.js.map +0 -1
- package/src/lib/actions/get-job-line-items.d.ts +0 -3
- package/src/lib/actions/get-job-line-items.js +0 -27
- package/src/lib/actions/get-job-line-items.js.map +0 -1
- package/src/lib/actions/get-job.d.ts +0 -4
- package/src/lib/actions/get-job.js +0 -43
- package/src/lib/actions/get-job.js.map +0 -1
- package/src/lib/actions/get-jobs.d.ts +0 -15
- package/src/lib/actions/get-jobs.js +0 -161
- package/src/lib/actions/get-jobs.js.map +0 -1
- package/src/lib/actions/get-lead.d.ts +0 -3
- package/src/lib/actions/get-lead.js +0 -27
- package/src/lib/actions/get-lead.js.map +0 -1
- package/src/lib/actions/get-leads.d.ts +0 -12
- package/src/lib/actions/get-leads.js +0 -104
- package/src/lib/actions/get-leads.js.map +0 -1
- package/src/lib/actions/lock-job.d.ts +0 -3
- package/src/lib/actions/lock-job.js +0 -27
- package/src/lib/actions/lock-job.js.map +0 -1
- package/src/lib/actions/lock-jobs.d.ts +0 -4
- package/src/lib/actions/lock-jobs.js +0 -36
- package/src/lib/actions/lock-jobs.js.map +0 -1
- package/src/lib/actions/remove-job-tag.d.ts +0 -4
- package/src/lib/actions/remove-job-tag.js +0 -32
- package/src/lib/actions/remove-job-tag.js.map +0 -1
- package/src/lib/actions/update-customer.d.ts +0 -15
- package/src/lib/actions/update-customer.js +0 -94
- package/src/lib/actions/update-customer.js.map +0 -1
- package/src/lib/actions/update-estimate-option-schedule.d.ts +0 -11
- package/src/lib/actions/update-estimate-option-schedule.js +0 -53
- package/src/lib/actions/update-estimate-option-schedule.js.map +0 -1
- package/src/lib/actions/update-job-appointment.d.ts +0 -8
- package/src/lib/actions/update-job-appointment.js +0 -60
- package/src/lib/actions/update-job-appointment.js.map +0 -1
- package/src/lib/actions/update-job-line-item.d.ts +0 -13
- package/src/lib/actions/update-job-line-item.js +0 -112
- package/src/lib/actions/update-job-line-item.js.map +0 -1
- package/src/lib/actions/update-job-schedule.d.ts +0 -10
- package/src/lib/actions/update-job-schedule.js +0 -89
- package/src/lib/actions/update-job-schedule.js.map +0 -1
- package/src/lib/common/index.d.ts +0 -97
- package/src/lib/common/index.js +0 -158
- package/src/lib/common/index.js.map +0 -1
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateCustomer = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const common_1 = require("../common");
|
|
7
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
const zod_1 = require("zod");
|
|
9
|
-
const pieces_common_2 = require("@activepieces/pieces-common");
|
|
10
|
-
exports.updateCustomer = (0, pieces_framework_1.createAction)({
|
|
11
|
-
auth: common_1.housecallProAuth,
|
|
12
|
-
name: 'update_customer',
|
|
13
|
-
displayName: 'Update Customer',
|
|
14
|
-
description: 'Updates an existing customer in Housecall Pro.',
|
|
15
|
-
props: {
|
|
16
|
-
customer_id: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'Customer ID',
|
|
18
|
-
description: 'The ID of the customer to update.',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
first_name: pieces_framework_1.Property.ShortText({
|
|
22
|
-
displayName: 'First Name',
|
|
23
|
-
required: false,
|
|
24
|
-
}),
|
|
25
|
-
last_name: pieces_framework_1.Property.ShortText({
|
|
26
|
-
displayName: 'Last Name',
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
email: pieces_framework_1.Property.ShortText({
|
|
30
|
-
displayName: 'Email',
|
|
31
|
-
required: false,
|
|
32
|
-
}),
|
|
33
|
-
mobile_number: pieces_framework_1.Property.ShortText({
|
|
34
|
-
displayName: 'Mobile Number',
|
|
35
|
-
required: false,
|
|
36
|
-
}),
|
|
37
|
-
home_number: pieces_framework_1.Property.ShortText({
|
|
38
|
-
displayName: 'Home Number',
|
|
39
|
-
required: false,
|
|
40
|
-
}),
|
|
41
|
-
work_number: pieces_framework_1.Property.ShortText({
|
|
42
|
-
displayName: 'Work Number',
|
|
43
|
-
required: false,
|
|
44
|
-
}),
|
|
45
|
-
company: pieces_framework_1.Property.ShortText({
|
|
46
|
-
displayName: 'Company',
|
|
47
|
-
required: false,
|
|
48
|
-
}),
|
|
49
|
-
notes: pieces_framework_1.Property.LongText({
|
|
50
|
-
displayName: 'Notes',
|
|
51
|
-
required: false,
|
|
52
|
-
}),
|
|
53
|
-
tags: pieces_framework_1.Property.Array({
|
|
54
|
-
displayName: 'Tags',
|
|
55
|
-
description: 'Array of tags to assign to the customer (replaces existing tags)',
|
|
56
|
-
required: false,
|
|
57
|
-
}),
|
|
58
|
-
notifications_enabled: pieces_framework_1.Property.Checkbox({
|
|
59
|
-
displayName: 'Notifications Enabled',
|
|
60
|
-
description: 'Will the customer receive notifications',
|
|
61
|
-
required: false,
|
|
62
|
-
}),
|
|
63
|
-
lead_source: pieces_framework_1.Property.ShortText({
|
|
64
|
-
displayName: 'Lead Source',
|
|
65
|
-
required: false,
|
|
66
|
-
}),
|
|
67
|
-
addresses: pieces_framework_1.Property.Array({
|
|
68
|
-
displayName: 'Addresses',
|
|
69
|
-
description: 'Array of address objects (if provided, each address must include an id)',
|
|
70
|
-
required: false,
|
|
71
|
-
}),
|
|
72
|
-
},
|
|
73
|
-
run(_a) {
|
|
74
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
75
|
-
yield pieces_common_2.propsValidation.validateZod(propsValue, {
|
|
76
|
-
email: zod_1.z.string().email().optional(),
|
|
77
|
-
mobile_number: zod_1.z.string().regex(/^\+?[1-9]\d{1,14}$/).optional(),
|
|
78
|
-
home_number: zod_1.z.string().regex(/^\+?[1-9]\d{1,14}$/).optional(),
|
|
79
|
-
work_number: zod_1.z.string().regex(/^\+?[1-9]\d{1,14}$/).optional(),
|
|
80
|
-
});
|
|
81
|
-
const { customer_id } = propsValue, updateData = tslib_1.__rest(propsValue, ["customer_id"]);
|
|
82
|
-
// Remove undefined values to avoid sending empty strings
|
|
83
|
-
const cleanUpdateData = {};
|
|
84
|
-
Object.keys(updateData).forEach(key => {
|
|
85
|
-
if (updateData[key] !== undefined && updateData[key] !== null) {
|
|
86
|
-
cleanUpdateData[key] = updateData[key];
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
const response = yield (0, common_1.makeHousecallProRequest)(auth, `/customers/${customer_id}`, pieces_common_1.HttpMethod.PUT, cleanUpdateData);
|
|
90
|
-
return response.body;
|
|
91
|
-
});
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
//# sourceMappingURL=update-customer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-customer.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/housecall-pro/src/lib/actions/update-customer.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAsE;AACtE,+DAAyD;AACzD,6BAAwB;AACxB,+DAA8D;AAEjD,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,yBAAgB;IACtB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,gDAAgD;IAC7D,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAChC,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE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EAAE;aAC/D,CAAC,CAAC;YAEH,MAAM,EAAE,WAAW,KAAoB,UAAU,EAAzB,UAAU,kBAAK,UAAU,EAA3C,eAA8B,CAAa,CAAC;YAElD,yDAAyD;YACzD,MAAM,eAAe,GAAwB,EAAE,CAAC;YAC/C,MAAM,CAAC,IAAI,CAAC,UAAU,CAAoC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACxE,IAAI,UAAU,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;oBAC9D,eAAe,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;gBACzC,CAAC;YACH,CAAC,CAAC,CAAC;YAEH,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAuB,EAC5C,IAAI,EACJ,cAAc,WAAW,EAAE,EAC3B,0BAAU,CAAC,GAAG,EACd,eAAe,CAChB,CAAC;YAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const updateEstimateOptionSchedule: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
estimate_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
option_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
start_time: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
5
|
-
end_time: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
6
|
-
arrival_window_in_minutes: import("@activepieces/pieces-framework").NumberProperty<true>;
|
|
7
|
-
notify: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
8
|
-
notify_pro: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
9
|
-
expand: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
10
|
-
dispatched_employees: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
11
|
-
}>;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateEstimateOptionSchedule = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const common_1 = require("../common");
|
|
7
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
exports.updateEstimateOptionSchedule = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: common_1.housecallProAuth,
|
|
10
|
-
name: "update_estimate_option_schedule",
|
|
11
|
-
displayName: "Update estimate option schedule",
|
|
12
|
-
description: "Update an estimate option's schedule.",
|
|
13
|
-
props: {
|
|
14
|
-
estimate_id: pieces_framework_1.Property.ShortText({ displayName: "Estimate ID", required: true }),
|
|
15
|
-
option_id: pieces_framework_1.Property.ShortText({ displayName: "Option ID", required: true }),
|
|
16
|
-
start_time: pieces_framework_1.Property.DateTime({ displayName: "Start Time", required: true }),
|
|
17
|
-
end_time: pieces_framework_1.Property.DateTime({ displayName: "End Time", required: true }),
|
|
18
|
-
arrival_window_in_minutes: pieces_framework_1.Property.Number({ displayName: "Arrival Window (minutes)", required: true }),
|
|
19
|
-
notify: pieces_framework_1.Property.Checkbox({ displayName: "Notify Customer", required: true, defaultValue: true }),
|
|
20
|
-
notify_pro: pieces_framework_1.Property.Checkbox({ displayName: "Notify Pro", required: true, defaultValue: true }),
|
|
21
|
-
expand: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
22
|
-
displayName: "Expand",
|
|
23
|
-
required: false,
|
|
24
|
-
options: { options: [{ label: "Assigned Employees", value: "assigned_employees" }] },
|
|
25
|
-
}),
|
|
26
|
-
dispatched_employees: pieces_framework_1.Property.Array({
|
|
27
|
-
displayName: "Dispatched Employees",
|
|
28
|
-
required: false,
|
|
29
|
-
description: "Array of objects with employee_id",
|
|
30
|
-
}),
|
|
31
|
-
},
|
|
32
|
-
run(_a) {
|
|
33
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
34
|
-
var _b, _c, _d;
|
|
35
|
-
const body = {
|
|
36
|
-
start_time: propsValue["start_time"],
|
|
37
|
-
end_time: propsValue["end_time"],
|
|
38
|
-
};
|
|
39
|
-
body["arrival_window_in_minutes"] = (_b = propsValue["arrival_window_in_minutes"]) !== null && _b !== void 0 ? _b : 0;
|
|
40
|
-
body["notify"] = (_c = propsValue["notify"]) !== null && _c !== void 0 ? _c : true;
|
|
41
|
-
body["notify_pro"] = (_d = propsValue["notify_pro"]) !== null && _d !== void 0 ? _d : true;
|
|
42
|
-
if (propsValue["expand"] && propsValue["expand"].length) {
|
|
43
|
-
body["expand"] = propsValue["expand"].join(",");
|
|
44
|
-
}
|
|
45
|
-
if (propsValue["dispatched_employees"]) {
|
|
46
|
-
body["dispatched_employees"] = propsValue["dispatched_employees"];
|
|
47
|
-
}
|
|
48
|
-
const response = yield (0, common_1.makeHousecallProRequest)(auth, `/estimates/${propsValue["estimate_id"]}/options/${propsValue["option_id"]}/schedule`, pieces_common_1.HttpMethod.PUT, body);
|
|
49
|
-
return response.body;
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=update-estimate-option-schedule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-estimate-option-schedule.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/housecall-pro/src/lib/actions/update-estimate-option-schedule.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAsE;AACtE,+DAAyD;AAE5C,QAAA,4BAA4B,GAAG,IAAA,+BAAY,EAAC;IACvD,IAAI,EAAE,yBAAgB;IACtB,IAAI,EAAE,iCAAiC;IACvC,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE,uCAAuC;IACpD,KAAK,EAA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AAI,GAA4B;gBACpC,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC;gBACpC,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;aACjC,CAAC;YACF,IAAI,CAAC,2BAA2B,CAAC,GAAG,MAAA,UAAU,CAAC,2BAA2B,CAAC,mCAAI,CAAC,CAAC;YACjF,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAA,UAAU,CAAC,QAAQ,CAAC,mCAAI,IAAI,CAAC;YAC9C,IAAI,CAAC,YAAY,CAAC,GAAG,MAAA,UAAU,CAAC,YAAY,CAAC,mCAAI,IAAI,CAAC;YACtD,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC;gBACxD,IAAI,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAClD,CAAC;YACD,IAAI,UAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC;gBACvC,IAAI,CAAC,sBAAsB,CAAC,GAAG,UAAU,CAAC,sBAAsB,CAAC,CAAC;YACpE,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAuB,EAC5C,IAAI,EACJ,cAAc,UAAU,CAAC,aAAa,CAAC,YAAY,UAAU,CAAC,WAAW,CAAC,WAAW,EACrF,0BAAU,CAAC,GAAG,EACd,IAAI,CACL,CAAC;YACF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const updateJobAppointment: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
appointment_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
job_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
start_time: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
5
|
-
end_time: import("@activepieces/pieces-framework").DateTimeProperty<true>;
|
|
6
|
-
arrival_window_minutes: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
7
|
-
dispatched_employees_ids: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
8
|
-
}>;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateJobAppointment = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const common_1 = require("../common");
|
|
7
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
exports.updateJobAppointment = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: common_1.housecallProAuth,
|
|
10
|
-
name: "update_job_appointment",
|
|
11
|
-
displayName: "Update Appointment",
|
|
12
|
-
description: "Update job appointment",
|
|
13
|
-
props: {
|
|
14
|
-
appointment_id: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: "Appointment ID",
|
|
16
|
-
description: "The ID of the appointment",
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
job_id: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: "Job ID",
|
|
21
|
-
description: "The ID of the job",
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
start_time: pieces_framework_1.Property.DateTime({
|
|
25
|
-
displayName: "Start Time",
|
|
26
|
-
description: "Start time of job appointment in iso8601",
|
|
27
|
-
required: true,
|
|
28
|
-
}),
|
|
29
|
-
end_time: pieces_framework_1.Property.DateTime({
|
|
30
|
-
displayName: "End Time",
|
|
31
|
-
description: "End time of job appointment in iso8601",
|
|
32
|
-
required: true,
|
|
33
|
-
}),
|
|
34
|
-
arrival_window_minutes: pieces_framework_1.Property.Number({
|
|
35
|
-
displayName: "Arrival Window (minutes)",
|
|
36
|
-
description: "Integer value in minutes of arrival window",
|
|
37
|
-
required: false,
|
|
38
|
-
}),
|
|
39
|
-
dispatched_employees_ids: pieces_framework_1.Property.Array({
|
|
40
|
-
displayName: "Dispatched Employees IDs",
|
|
41
|
-
description: "List of pros ids to be assign in appointment",
|
|
42
|
-
required: true,
|
|
43
|
-
}),
|
|
44
|
-
},
|
|
45
|
-
run(_a) {
|
|
46
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
47
|
-
const body = {
|
|
48
|
-
start_time: propsValue['start_time'],
|
|
49
|
-
end_time: propsValue['end_time'],
|
|
50
|
-
dispatched_employees_ids: propsValue['dispatched_employees_ids'],
|
|
51
|
-
};
|
|
52
|
-
if (propsValue['arrival_window_minutes'] !== undefined) {
|
|
53
|
-
body['arrival_window_minutes'] = propsValue['arrival_window_minutes'];
|
|
54
|
-
}
|
|
55
|
-
const response = yield (0, common_1.makeHousecallProRequest)(auth, `/jobs/${propsValue['job_id']}/appointments/${propsValue['appointment_id']}`, pieces_common_1.HttpMethod.PUT, body);
|
|
56
|
-
return response.body;
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
//# sourceMappingURL=update-job-appointment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-job-appointment.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/housecall-pro/src/lib/actions/update-job-appointment.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAsE;AACtE,+DAAyD;AAE5C,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,yBAAgB;IACtB,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,wBAAwB;IACrC,KAAK,EAAE;QACL,cAAc,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACjC,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE,IAAI;S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AAC;YAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const updateJobLineItem: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
job_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
service_line_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
-
service_line_type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
6
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
-
unit_price: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
8
|
-
unit_cost: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
9
|
-
quantity: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
10
|
-
kind: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
11
|
-
taxable: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
12
|
-
description: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
-
}>;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateJobLineItem = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const common_1 = require("../common");
|
|
7
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
exports.updateJobLineItem = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: common_1.housecallProAuth,
|
|
10
|
-
name: "update_job_line_item",
|
|
11
|
-
displayName: "Update a single line item for a job",
|
|
12
|
-
description: "Update a specific line item for a job",
|
|
13
|
-
props: {
|
|
14
|
-
job_id: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: "Job ID",
|
|
16
|
-
description: "The ID of the job",
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
id: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: "Line Item ID",
|
|
21
|
-
description: "The ID of the line item",
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
service_line_id: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: "Service Line ID",
|
|
26
|
-
description: "The ID of the service line",
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
service_line_type: pieces_framework_1.Property.StaticDropdown({
|
|
30
|
-
displayName: "Service Line Type",
|
|
31
|
-
description: "The type of service line",
|
|
32
|
-
required: false,
|
|
33
|
-
options: {
|
|
34
|
-
options: [
|
|
35
|
-
{ label: "Custom Place", value: "custom_place" },
|
|
36
|
-
{ label: "Organization", value: "organization" },
|
|
37
|
-
{ label: "PriceBook Material", value: "pricebok_material" },
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
name: pieces_framework_1.Property.ShortText({
|
|
42
|
-
displayName: "Name",
|
|
43
|
-
description: "The name of the line item",
|
|
44
|
-
required: false,
|
|
45
|
-
}),
|
|
46
|
-
unit_price: pieces_framework_1.Property.Number({
|
|
47
|
-
displayName: "Unit Price",
|
|
48
|
-
description: "The unit price of the line item",
|
|
49
|
-
required: false,
|
|
50
|
-
}),
|
|
51
|
-
unit_cost: pieces_framework_1.Property.Number({
|
|
52
|
-
displayName: "Unit Cost",
|
|
53
|
-
description: "The unit cost of the line item",
|
|
54
|
-
required: false,
|
|
55
|
-
}),
|
|
56
|
-
quantity: pieces_framework_1.Property.Number({
|
|
57
|
-
displayName: "Quantity",
|
|
58
|
-
description: "The number of items being sold",
|
|
59
|
-
required: false,
|
|
60
|
-
}),
|
|
61
|
-
kind: pieces_framework_1.Property.StaticDropdown({
|
|
62
|
-
displayName: "Kind",
|
|
63
|
-
description: "The kind of line item",
|
|
64
|
-
required: false,
|
|
65
|
-
options: {
|
|
66
|
-
options: [
|
|
67
|
-
{ label: "Material", value: "material" },
|
|
68
|
-
{ label: "Labor", value: "labor" },
|
|
69
|
-
{ label: "Flat Quantity", value: "flat_quantity" },
|
|
70
|
-
{ label: "Fixed Discount", value: "fixed_discount" },
|
|
71
|
-
{ label: "Percent Discount", value: "percent_discount" },
|
|
72
|
-
],
|
|
73
|
-
},
|
|
74
|
-
}),
|
|
75
|
-
taxable: pieces_framework_1.Property.Checkbox({
|
|
76
|
-
displayName: "Taxable",
|
|
77
|
-
description: "Whether the line item is taxable",
|
|
78
|
-
required: false,
|
|
79
|
-
}),
|
|
80
|
-
description: pieces_framework_1.Property.ShortText({
|
|
81
|
-
displayName: "Description",
|
|
82
|
-
description: "The description of the line item",
|
|
83
|
-
required: false,
|
|
84
|
-
}),
|
|
85
|
-
},
|
|
86
|
-
run(_a) {
|
|
87
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
88
|
-
const body = {};
|
|
89
|
-
if (propsValue['service_line_id'])
|
|
90
|
-
body['service_line_id'] = propsValue['service_line_id'];
|
|
91
|
-
if (propsValue['service_line_type'])
|
|
92
|
-
body['service_line_type'] = propsValue['service_line_type'];
|
|
93
|
-
if (propsValue['name'])
|
|
94
|
-
body['name'] = propsValue['name'];
|
|
95
|
-
if (propsValue['unit_price'] !== undefined)
|
|
96
|
-
body['unit_price'] = propsValue['unit_price'];
|
|
97
|
-
if (propsValue['unit_cost'] !== undefined)
|
|
98
|
-
body['unit_cost'] = propsValue['unit_cost'];
|
|
99
|
-
if (propsValue['quantity'] !== undefined)
|
|
100
|
-
body['quantity'] = propsValue['quantity'];
|
|
101
|
-
if (propsValue['kind'])
|
|
102
|
-
body['kind'] = propsValue['kind'];
|
|
103
|
-
if (propsValue['taxable'] !== undefined)
|
|
104
|
-
body['taxable'] = propsValue['taxable'];
|
|
105
|
-
if (propsValue['description'])
|
|
106
|
-
body['description'] = propsValue['description'];
|
|
107
|
-
const response = yield (0, common_1.makeHousecallProRequest)(auth, `/jobs/${propsValue['job_id']}/line_items/${propsValue['id']}`, pieces_common_1.HttpMethod.PUT, body);
|
|
108
|
-
return response.body;
|
|
109
|
-
});
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
//# sourceMappingURL=update-job-line-item.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-job-line-item.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/housecall-pro/src/lib/actions/update-job-line-item.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAsE;AACtE,+DAAyD;AAE5C,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,yBAAgB;IACtB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,qCAAqC;IAClD,WAAW,EAAE,uCAAuC;IACpD,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,mBAAmB;YAChC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,EAAE,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACrB,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAClC,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,iBAAiB,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACzC,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;oBAChD,EAAE,KAAK,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AC,aAAa,CAAC,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;YAE/E,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAuB,EAC5C,IAAI,EACJ,SAAS,UAAU,CAAC,QAAQ,CAAC,eAAe,UAAU,CAAC,IAAI,CAAC,EAAE,EAC9D,0BAAU,CAAC,GAAG,EACd,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const updateJobSchedule: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
job_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
start_time: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
end_time: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
arrival_window_in_minutes: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
6
|
-
notify: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
7
|
-
notify_pro: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
8
|
-
expand: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
9
|
-
dispatched_employees: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
10
|
-
}>;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateJobSchedule = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const common_1 = require("../common");
|
|
7
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
exports.updateJobSchedule = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: common_1.housecallProAuth,
|
|
10
|
-
name: "update_job_schedule",
|
|
11
|
-
displayName: "Update Job Schedule",
|
|
12
|
-
description: "Updates a job's schedule. Jobs with multi days feature containing more than 1 appointment can't be updated through this action.",
|
|
13
|
-
props: {
|
|
14
|
-
job_id: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: "Job ID",
|
|
16
|
-
description: "The ID of the job to update schedule for",
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
start_time: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: "Start Time",
|
|
21
|
-
description: "Start time of job in ISO8601 format (e.g., 2021-01-14T20:14:00)",
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
end_time: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: "End Time",
|
|
26
|
-
description: "End time of job in ISO8601 format (e.g., 2021-01-14T21:14:00)",
|
|
27
|
-
required: true,
|
|
28
|
-
}),
|
|
29
|
-
arrival_window_in_minutes: pieces_framework_1.Property.Number({
|
|
30
|
-
displayName: "Arrival Window (minutes)",
|
|
31
|
-
description: "Integer value in minutes of arrival window",
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
notify: pieces_framework_1.Property.Checkbox({
|
|
35
|
-
displayName: "Notify",
|
|
36
|
-
description: "Notify the customer of the update schedule",
|
|
37
|
-
required: false,
|
|
38
|
-
defaultValue: true,
|
|
39
|
-
}),
|
|
40
|
-
notify_pro: pieces_framework_1.Property.Checkbox({
|
|
41
|
-
displayName: "Notify Pro",
|
|
42
|
-
description: "Notify the pros of the update schedule",
|
|
43
|
-
required: false,
|
|
44
|
-
defaultValue: true,
|
|
45
|
-
}),
|
|
46
|
-
expand: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
47
|
-
displayName: "Expand",
|
|
48
|
-
description: "Expand related entities",
|
|
49
|
-
required: false,
|
|
50
|
-
options: {
|
|
51
|
-
options: [
|
|
52
|
-
{ label: "Assigned Employees", value: "assigned_employees" },
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
}),
|
|
56
|
-
dispatched_employees: pieces_framework_1.Property.Array({
|
|
57
|
-
displayName: "Dispatched Employees",
|
|
58
|
-
description: "Array of employee objects with employee_id",
|
|
59
|
-
required: false,
|
|
60
|
-
}),
|
|
61
|
-
},
|
|
62
|
-
run(context) {
|
|
63
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const { auth, propsValue } = context;
|
|
65
|
-
const scheduleData = {
|
|
66
|
-
start_time: propsValue['start_time'],
|
|
67
|
-
end_time: propsValue['end_time'],
|
|
68
|
-
};
|
|
69
|
-
if (propsValue['arrival_window_in_minutes'] !== undefined) {
|
|
70
|
-
scheduleData['arrival_window_in_minutes'] = propsValue['arrival_window_in_minutes'];
|
|
71
|
-
}
|
|
72
|
-
if (propsValue['notify'] !== undefined) {
|
|
73
|
-
scheduleData['notify'] = propsValue['notify'];
|
|
74
|
-
}
|
|
75
|
-
if (propsValue['notify_pro'] !== undefined) {
|
|
76
|
-
scheduleData['notify_pro'] = propsValue['notify_pro'];
|
|
77
|
-
}
|
|
78
|
-
if (propsValue['expand'] && propsValue['expand'].length > 0) {
|
|
79
|
-
scheduleData['expand'] = propsValue['expand'].join(',');
|
|
80
|
-
}
|
|
81
|
-
if (propsValue['dispatched_employees'] && propsValue['dispatched_employees'].length > 0) {
|
|
82
|
-
scheduleData['dispatched_employees'] = propsValue['dispatched_employees'];
|
|
83
|
-
}
|
|
84
|
-
const response = yield (0, common_1.makeHousecallProRequest)(auth, `/jobs/${propsValue['job_id']}/schedule`, pieces_common_1.HttpMethod.PUT, scheduleData);
|
|
85
|
-
return response.body;
|
|
86
|
-
});
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
//# sourceMappingURL=update-job-schedule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-job-schedule.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/housecall-pro/src/lib/actions/update-job-schedule.ts"],"names":[],"mappings":";;;;AA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AAsB,CAAC,CAAC;YAC5E,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAuB,EAC5C,IAAI,EACJ,SAAS,UAAU,CAAC,QAAQ,CAAC,WAAW,EACxC,0BAAU,CAAC,GAAG,EACd,YAAY,CACb,CAAC;YAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { AppConnectionValueForAuthProperty } from "@activepieces/pieces-framework";
|
|
2
|
-
import { HttpMethod } from "@activepieces/pieces-common";
|
|
3
|
-
export { createCustomer } from "../actions/create-customer";
|
|
4
|
-
export { getCustomers } from "../actions/get-customers";
|
|
5
|
-
export { getCustomer } from "../actions/get-customer";
|
|
6
|
-
export { updateCustomer } from "../actions/update-customer";
|
|
7
|
-
export { getCustomerAddresses } from "../actions/get-customer-addresses";
|
|
8
|
-
export { createCustomerAddress } from "../actions/create-customer-address";
|
|
9
|
-
export { getCustomerAddress } from "../actions/get-customer-address";
|
|
10
|
-
export { createJob } from "../actions/create-job";
|
|
11
|
-
export { getJobs } from "../actions/get-jobs";
|
|
12
|
-
export { getJob } from "../actions/get-job";
|
|
13
|
-
export { updateJobSchedule } from "../actions/update-job-schedule";
|
|
14
|
-
export { deleteJobSchedule } from "../actions/delete-job-schedule";
|
|
15
|
-
export { createJobAppointment } from "../actions/create-job-appointment";
|
|
16
|
-
export { getJobAppointments } from "../actions/get-job-appointments";
|
|
17
|
-
export { updateJobAppointment } from "../actions/update-job-appointment";
|
|
18
|
-
export { deleteJobAppointment } from "../actions/delete-job-appointment";
|
|
19
|
-
export { addJobNote } from "../actions/add-job-note";
|
|
20
|
-
export { deleteJobNote } from "../actions/delete-job-note";
|
|
21
|
-
export { addJobAttachment } from "../actions/add-job-attachment";
|
|
22
|
-
export { addJobLineItem } from "../actions/add-job-line-item";
|
|
23
|
-
export { updateJobLineItem } from "../actions/update-job-line-item";
|
|
24
|
-
export { deleteJobLineItem } from "../actions/delete-job-line-item";
|
|
25
|
-
export { getJobLineItems } from "../actions/get-job-line-items";
|
|
26
|
-
export { addJobTag } from "../actions/add-job-tag";
|
|
27
|
-
export { removeJobTag } from "../actions/remove-job-tag";
|
|
28
|
-
export { createJobLink } from "../actions/create-job-link";
|
|
29
|
-
export { getJobInvoices } from "../actions/get-job-invoices";
|
|
30
|
-
export { getJobInputMaterials } from "../actions/get-job-input-materials";
|
|
31
|
-
export { bulkUpdateJobLineItems } from "../actions/bulk-update-job-line-items";
|
|
32
|
-
export { bulkUpdateJobInputMaterials } from "../actions/bulk-update-job-input-materials";
|
|
33
|
-
export { dispatchJobToEmployees } from "../actions/dispatch-job-to-employees";
|
|
34
|
-
export { lockJob } from "../actions/lock-job";
|
|
35
|
-
export { lockJobs } from "../actions/lock-jobs";
|
|
36
|
-
export { createEstimate } from "../actions/create-estimate";
|
|
37
|
-
export { getEstimate } from "../actions/get-estimate";
|
|
38
|
-
export { getEstimates } from "../actions/get-estimates";
|
|
39
|
-
export { createEstimateOptionNote } from "../actions/create-estimate-option-note";
|
|
40
|
-
export { deleteEstimateOptionNote } from "../actions/delete-estimate-option-note";
|
|
41
|
-
export { createEstimateOptionAttachment } from "../actions/create-estimate-option-attachment";
|
|
42
|
-
export { createEstimateOptionLink } from "../actions/create-estimate-option-link";
|
|
43
|
-
export { updateEstimateOptionSchedule } from "../actions/update-estimate-option-schedule";
|
|
44
|
-
export { createLead } from "../actions/create-lead";
|
|
45
|
-
export { getLead } from "../actions/get-lead";
|
|
46
|
-
export { getLeads } from "../actions/get-leads";
|
|
47
|
-
export { convertLeadToEstimateOrJob } from "../actions/convert-lead-to-estimate-or-job";
|
|
48
|
-
export declare const baseUrl = "https://api.housecallpro.com";
|
|
49
|
-
export declare const housecallProAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
50
|
-
export declare function makeHousecallProRequest(auth: AppConnectionValueForAuthProperty<typeof housecallProAuth>, endpoint: string, method?: HttpMethod, body?: any, queryParams?: Record<string, string>): Promise<import("@activepieces/pieces-common").HttpResponse<any>>;
|
|
51
|
-
export interface HousecallProCustomer {
|
|
52
|
-
id?: number;
|
|
53
|
-
first_name: string;
|
|
54
|
-
last_name: string;
|
|
55
|
-
email?: string;
|
|
56
|
-
phone?: string;
|
|
57
|
-
mobile?: string;
|
|
58
|
-
company?: string;
|
|
59
|
-
address?: string;
|
|
60
|
-
city?: string;
|
|
61
|
-
state?: string;
|
|
62
|
-
zip?: string;
|
|
63
|
-
notes?: string;
|
|
64
|
-
tags?: string[];
|
|
65
|
-
created_at?: string;
|
|
66
|
-
updated_at?: string;
|
|
67
|
-
}
|
|
68
|
-
export interface HousecallProJob {
|
|
69
|
-
id?: number;
|
|
70
|
-
customer_id: number;
|
|
71
|
-
title: string;
|
|
72
|
-
description?: string;
|
|
73
|
-
work_status?: string;
|
|
74
|
-
scheduled_date?: string;
|
|
75
|
-
scheduled_time?: string;
|
|
76
|
-
duration?: number;
|
|
77
|
-
address?: string;
|
|
78
|
-
city?: string;
|
|
79
|
-
state?: string;
|
|
80
|
-
zip?: string;
|
|
81
|
-
notes?: string;
|
|
82
|
-
created_at?: string;
|
|
83
|
-
updated_at?: string;
|
|
84
|
-
}
|
|
85
|
-
export interface HousecallProEstimate {
|
|
86
|
-
id?: number;
|
|
87
|
-
customer_id: number;
|
|
88
|
-
job_id?: number;
|
|
89
|
-
title: string;
|
|
90
|
-
description?: string;
|
|
91
|
-
status?: string;
|
|
92
|
-
total_amount?: number;
|
|
93
|
-
valid_until?: string;
|
|
94
|
-
notes?: string;
|
|
95
|
-
created_at?: string;
|
|
96
|
-
updated_at?: string;
|
|
97
|
-
}
|