@activepieces/piece-housecall-pro 0.0.1

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.
Files changed (45) hide show
  1. package/README.md +7 -0
  2. package/package.json +24 -0
  3. package/src/i18n/translation.json +3 -0
  4. package/src/index.d.ts +1 -0
  5. package/src/index.js +46 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/actions/create-customer-address.d.ts +11 -0
  8. package/src/lib/actions/create-customer-address.js +84 -0
  9. package/src/lib/actions/create-customer-address.js.map +1 -0
  10. package/src/lib/actions/create-customer.d.ts +15 -0
  11. package/src/lib/actions/create-customer.js +122 -0
  12. package/src/lib/actions/create-customer.js.map +1 -0
  13. package/src/lib/actions/create-job.d.ts +15 -0
  14. package/src/lib/actions/create-job.js +126 -0
  15. package/src/lib/actions/create-job.js.map +1 -0
  16. package/src/lib/actions/delete-job-schedule.d.ts +3 -0
  17. package/src/lib/actions/delete-job-schedule.js +28 -0
  18. package/src/lib/actions/delete-job-schedule.js.map +1 -0
  19. package/src/lib/actions/get-customer-address.d.ts +4 -0
  20. package/src/lib/actions/get-customer-address.js +33 -0
  21. package/src/lib/actions/get-customer-address.js.map +1 -0
  22. package/src/lib/actions/get-customer-addresses.d.ts +7 -0
  23. package/src/lib/actions/get-customer-addresses.js +72 -0
  24. package/src/lib/actions/get-customer-addresses.js.map +1 -0
  25. package/src/lib/actions/get-customer.d.ts +4 -0
  26. package/src/lib/actions/get-customer.js +43 -0
  27. package/src/lib/actions/get-customer.js.map +1 -0
  28. package/src/lib/actions/get-customers.d.ts +9 -0
  29. package/src/lib/actions/get-customers.js +97 -0
  30. package/src/lib/actions/get-customers.js.map +1 -0
  31. package/src/lib/actions/get-job.d.ts +4 -0
  32. package/src/lib/actions/get-job.js +43 -0
  33. package/src/lib/actions/get-job.js.map +1 -0
  34. package/src/lib/actions/get-jobs.d.ts +15 -0
  35. package/src/lib/actions/get-jobs.js +161 -0
  36. package/src/lib/actions/get-jobs.js.map +1 -0
  37. package/src/lib/actions/update-customer.d.ts +15 -0
  38. package/src/lib/actions/update-customer.js +94 -0
  39. package/src/lib/actions/update-customer.js.map +1 -0
  40. package/src/lib/actions/update-job-schedule.d.ts +10 -0
  41. package/src/lib/actions/update-job-schedule.js +89 -0
  42. package/src/lib/actions/update-job-schedule.js.map +1 -0
  43. package/src/lib/common/index.d.ts +63 -0
  44. package/src/lib/common/index.js +90 -0
  45. package/src/lib/common/index.js.map +1 -0
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # pieces-housecall-pro
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build pieces-housecall-pro` to build the library.
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@activepieces/piece-housecall-pro",
3
+ "version": "0.0.1",
4
+ "type": "commonjs",
5
+ "main": "./src/index.js",
6
+ "types": "./src/index.d.ts",
7
+ "dependencies": {
8
+ "@sinclair/typebox": "0.34.11",
9
+ "axios": "1.8.3",
10
+ "axios-retry": "4.4.1",
11
+ "deepmerge-ts": "7.1.0",
12
+ "mime-types": "2.1.35",
13
+ "nanoid": "3.3.8",
14
+ "semver": "7.6.0",
15
+ "tslib": "^2.3.0",
16
+ "zod": "3.25.76",
17
+ "@activepieces/pieces-common": "0.8.1",
18
+ "@activepieces/pieces-framework": "0.20.2",
19
+ "@activepieces/shared": "0.25.2"
20
+ },
21
+ "resolutions": {
22
+ "rollup": "npm:@rollup/wasm-node"
23
+ }
24
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "Housecall Pro": "Housecall Pro"
3
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const housecallPro: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
package/src/index.js ADDED
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.housecallPro = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const shared_1 = require("@activepieces/shared");
7
+ const pieces_common_1 = require("@activepieces/pieces-common");
8
+ const common_1 = require("./lib/common");
9
+ exports.housecallPro = (0, pieces_framework_1.createPiece)({
10
+ displayName: "Housecall Pro",
11
+ description: "Manage your home service business with Housecall Pro CRM integration",
12
+ auth: common_1.housecallProAuth,
13
+ minimumSupportedRelease: '0.36.1',
14
+ logoUrl: "https://cdn.activepieces.com/pieces/housecall-pro.png",
15
+ categories: [shared_1.PieceCategory.SALES_AND_CRM],
16
+ authors: ["Activepieces"],
17
+ actions: [
18
+ // Customer actions
19
+ common_1.createCustomer,
20
+ common_1.getCustomers,
21
+ common_1.getCustomer,
22
+ common_1.updateCustomer,
23
+ common_1.getCustomerAddresses,
24
+ common_1.createCustomerAddress,
25
+ common_1.getCustomerAddress,
26
+ // Job actions
27
+ common_1.createJob,
28
+ common_1.getJobs,
29
+ common_1.getJob,
30
+ common_1.updateJobSchedule,
31
+ common_1.deleteJobSchedule,
32
+ // Custom API Call
33
+ (0, pieces_common_1.createCustomApiCallAction)({
34
+ baseUrl: () => common_1.baseUrl,
35
+ auth: common_1.housecallProAuth,
36
+ authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
37
+ return ({
38
+ "Authorization": `Token ${auth}`,
39
+ "Content-Type": "application/json",
40
+ });
41
+ }),
42
+ }),
43
+ ],
44
+ triggers: [],
45
+ });
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/housecall-pro/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,iDAAqD;AACrD,+DAAwE;AACxE,yCAiBsB;AAET,QAAA,YAAY,GAAG,IAAA,8BAAW,EAAC;IACtC,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,sEAAsE;IACnF,IAAI,EAAE,yBAAgB;IACtB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,uDAAuD;IAChE,UAAU,EAAE,CAAC,sBAAa,CAAC,aAAa,CAAC;IACzC,OAAO,EAAE,CAAC,cAAc,CAAC;IACzB,OAAO,EAAE;QACP,mBAAmB;QACnB,uBAAc;QACd,qBAAY;QACZ,oBAAW;QACX,uBAAc;QACd,6BAAoB;QACpB,8BAAqB;QACrB,2BAAkB;QAClB,cAAc;QACd,kBAAS;QACT,gBAAO;QACP,eAAM;QACN,0BAAiB;QACjB,0BAAiB;QACjB,kBAAkB;QAClB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAO;YACtB,IAAI,EAAE,yBAAgB;YACtB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,eAAe,EAAE,SAAS,IAAI,EAAE;oBAChC,cAAc,EAAE,kBAAkB;iBACnC,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const createCustomerAddress: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ customer_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ street: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ street_line_2: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
+ city: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ state: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
+ zip: import("@activepieces/pieces-framework").ShortTextProperty<true>;
8
+ country: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
+ latitude: import("@activepieces/pieces-framework").NumberProperty<false>;
10
+ longitude: import("@activepieces/pieces-framework").NumberProperty<false>;
11
+ }>;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCustomerAddress = 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.createCustomerAddress = (0, pieces_framework_1.createAction)({
9
+ auth: common_1.housecallProAuth,
10
+ name: "create_customer_address",
11
+ displayName: "Create an Address on a Customer",
12
+ description: "Creates an address on a customer.",
13
+ props: {
14
+ customer_id: pieces_framework_1.Property.ShortText({
15
+ displayName: "Customer ID",
16
+ description: "The ID of the customer to add address to",
17
+ required: true,
18
+ }),
19
+ street: pieces_framework_1.Property.ShortText({
20
+ displayName: "Street",
21
+ description: "Street address",
22
+ required: true,
23
+ }),
24
+ street_line_2: pieces_framework_1.Property.ShortText({
25
+ displayName: "Street Line 2",
26
+ description: "Additional street address line",
27
+ required: false,
28
+ }),
29
+ city: pieces_framework_1.Property.ShortText({
30
+ displayName: "City",
31
+ description: "City",
32
+ required: true,
33
+ }),
34
+ state: pieces_framework_1.Property.ShortText({
35
+ displayName: "State",
36
+ description: "State",
37
+ required: true,
38
+ }),
39
+ zip: pieces_framework_1.Property.ShortText({
40
+ displayName: "ZIP",
41
+ description: "ZIP code",
42
+ required: true,
43
+ }),
44
+ country: pieces_framework_1.Property.ShortText({
45
+ displayName: "Country",
46
+ description: "Country",
47
+ required: true,
48
+ }),
49
+ latitude: pieces_framework_1.Property.Number({
50
+ displayName: "Latitude",
51
+ description: "Latitude (one of number)",
52
+ required: false,
53
+ }),
54
+ longitude: pieces_framework_1.Property.Number({
55
+ displayName: "Longitude",
56
+ description: "Longitude (one of number)",
57
+ required: false,
58
+ }),
59
+ },
60
+ run(context) {
61
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
62
+ const { auth, propsValue } = context;
63
+ const addressData = {
64
+ street: propsValue.street,
65
+ city: propsValue.city,
66
+ state: propsValue.state,
67
+ zip: propsValue.zip,
68
+ country: propsValue.country,
69
+ };
70
+ if (propsValue.street_line_2) {
71
+ addressData["street_line_2"] = propsValue.street_line_2;
72
+ }
73
+ if (propsValue.latitude !== undefined) {
74
+ addressData["latitude"] = propsValue.latitude;
75
+ }
76
+ if (propsValue.longitude !== undefined) {
77
+ addressData["longitude"] = propsValue.longitude;
78
+ }
79
+ const response = yield (0, common_1.makeHousecallProRequest)(auth, `/customers/${propsValue.customer_id}/addresses`, pieces_common_1.HttpMethod.POST, addressData);
80
+ return response.body;
81
+ });
82
+ },
83
+ });
84
+ //# sourceMappingURL=create-customer-address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-customer-address.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/housecall-pro/src/lib/actions/create-customer-address.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAsE;AACtE,+DAAyD;AAE5C,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,yBAAgB;IACtB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,iCAAiC;IAC9C,WAAW,EAAE,mCAAmC;IAChD,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,gBAAgB;YAC7B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAChC,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW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AAC,GAAG,UAAU,CAAC,SAAS,CAAC;YAClD,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAuB,EAC5C,IAAI,EACJ,cAAc,UAAU,CAAC,WAAW,YAAY,EAChD,0BAAU,CAAC,IAAI,EACf,WAAW,CACZ,CAAC;YAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const createCustomer: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ info: import("dist/packages/pieces/community/framework/src/lib/property/input/markdown-property").MarkDownProperty;
3
+ first_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
4
+ last_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
+ email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
+ mobile_number: import("@activepieces/pieces-framework").ShortTextProperty<false>;
7
+ home_number: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
+ work_number: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ company: import("@activepieces/pieces-framework").ShortTextProperty<false>;
10
+ notifications_enabled: import("@activepieces/pieces-framework").CheckboxProperty<false>;
11
+ lead_source: import("@activepieces/pieces-framework").ShortTextProperty<false>;
12
+ notes: import("@activepieces/pieces-framework").LongTextProperty<false>;
13
+ tags: import("@activepieces/pieces-framework").ArrayProperty<false>;
14
+ addresses: import("@activepieces/pieces-framework").ArrayProperty<false>;
15
+ }>;
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCustomer = 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
+ const shared_1 = require("@activepieces/shared");
11
+ exports.createCustomer = (0, pieces_framework_1.createAction)({
12
+ auth: common_1.housecallProAuth,
13
+ name: 'create_customer',
14
+ displayName: 'Create Customer',
15
+ description: 'Creates a new customer in Housecall Pro.',
16
+ props: {
17
+ info: pieces_framework_1.Property.MarkDown({
18
+ value: 'At least one of: First Name, Last Name, Email, Mobile Number, Home Number, Work Number is required.',
19
+ variant: shared_1.MarkdownVariant.INFO
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
+ notifications_enabled: pieces_framework_1.Property.Checkbox({
50
+ displayName: 'Notifications Enabled',
51
+ description: 'Will the customer receive notifications',
52
+ required: false,
53
+ defaultValue: true,
54
+ }),
55
+ lead_source: pieces_framework_1.Property.ShortText({
56
+ displayName: 'Lead Source',
57
+ required: false,
58
+ }),
59
+ notes: pieces_framework_1.Property.LongText({
60
+ displayName: 'Notes',
61
+ required: false,
62
+ }),
63
+ tags: pieces_framework_1.Property.Array({
64
+ displayName: 'Tags',
65
+ required: false,
66
+ description: 'Array of tags to assign to the customer',
67
+ }),
68
+ addresses: pieces_framework_1.Property.Array({
69
+ displayName: 'Addresses',
70
+ required: false,
71
+ description: 'Array of address objects',
72
+ }),
73
+ },
74
+ run(_a) {
75
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
76
+ // Validate that at least one required field is provided
77
+ const hasRequiredField = propsValue['first_name'] ||
78
+ propsValue['last_name'] ||
79
+ propsValue['email'] ||
80
+ propsValue['mobile_number'] ||
81
+ propsValue['home_number'] ||
82
+ propsValue['work_number'];
83
+ if (!hasRequiredField) {
84
+ throw new Error('At least one of: First Name, Last Name, Email, Mobile Number, Home Number, Work Number is required');
85
+ }
86
+ yield pieces_common_2.propsValidation.validateZod(propsValue, {
87
+ email: zod_1.z.string().email().optional(),
88
+ mobile_number: zod_1.z.string().regex(/^\+?[1-9]\d{1,14}$/).optional(),
89
+ home_number: zod_1.z.string().regex(/^\+?[1-9]\d{1,14}$/).optional(),
90
+ work_number: zod_1.z.string().regex(/^\+?[1-9]\d{1,14}$/).optional(),
91
+ });
92
+ const customerData = {};
93
+ if (propsValue['first_name'])
94
+ customerData['first_name'] = propsValue['first_name'];
95
+ if (propsValue['last_name'])
96
+ customerData['last_name'] = propsValue['last_name'];
97
+ if (propsValue['email'])
98
+ customerData['email'] = propsValue['email'];
99
+ if (propsValue['mobile_number'])
100
+ customerData['mobile_number'] = propsValue['mobile_number'];
101
+ if (propsValue['home_number'])
102
+ customerData['home_number'] = propsValue['home_number'];
103
+ if (propsValue['work_number'])
104
+ customerData['work_number'] = propsValue['work_number'];
105
+ if (propsValue['company'])
106
+ customerData['company'] = propsValue['company'];
107
+ if (propsValue['notifications_enabled'] !== undefined)
108
+ customerData['notifications_enabled'] = propsValue['notifications_enabled'];
109
+ if (propsValue['lead_source'])
110
+ customerData['lead_source'] = propsValue['lead_source'];
111
+ if (propsValue['notes'])
112
+ customerData['notes'] = propsValue['notes'];
113
+ if (propsValue['tags'])
114
+ customerData['tags'] = propsValue['tags'];
115
+ if (propsValue['addresses'])
116
+ customerData['addresses'] = propsValue['addresses'];
117
+ const response = yield (0, common_1.makeHousecallProRequest)(auth, '/customers', pieces_common_1.HttpMethod.POST, customerData);
118
+ return response.body;
119
+ });
120
+ },
121
+ });
122
+ //# sourceMappingURL=create-customer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-customer.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/housecall-pro/src/lib/actions/create-customer.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAsE;AACtE,+DAAyD;AACzD,6BAAwB;AACxB,+DAA8D;AAC9D,iDAAuD;AAE1C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,yBAAgB;IACtB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,0CAA0C;IACvD,KAAK,EAAE;QACL,IAAI,EAAC,2BAAQ,CAAC,QAAQ,CAAC;YACrB,KAAK,EAAC,qGAAqG;YAC3G,OAAO,EAAC,wBAAe,CAAC,IAAI;SAC7B,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,aAAa;YAC1B,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS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AC,aAAa,CAAC,CAAC;YACvF,IAAI,UAAU,CAAC,OAAO,CAAC;gBAAE,YAAY,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;YACrE,IAAI,UAAU,CAAC,MAAM,CAAC;gBAAE,YAAY,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAa,CAAC;YAC9E,IAAI,UAAU,CAAC,WAAW,CAAC;gBAAE,YAAY,CAAC,WAAW,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;YAEjF,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAuB,EAC5C,IAAI,EACJ,YAAY,EACZ,0BAAU,CAAC,IAAI,EACf,YAAY,CACb,CAAC;YAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const createJob: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ customer_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ address_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ invoice_number: import("@activepieces/pieces-framework").NumberProperty<false>;
5
+ scheduled_start: import("@activepieces/pieces-framework").DateTimeProperty<false>;
6
+ scheduled_end: import("@activepieces/pieces-framework").DateTimeProperty<false>;
7
+ arrival_window: import("@activepieces/pieces-framework").NumberProperty<false>;
8
+ assigned_employee_ids: import("@activepieces/pieces-framework").ArrayProperty<false>;
9
+ tags: import("@activepieces/pieces-framework").ArrayProperty<false>;
10
+ lead_source: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ notes: import("@activepieces/pieces-framework").LongTextProperty<false>;
12
+ line_items: import("@activepieces/pieces-framework").ArrayProperty<false>;
13
+ pricing_form: import("@activepieces/pieces-framework").JsonProperty<false>;
14
+ job_fields: import("@activepieces/pieces-framework").JsonProperty<false>;
15
+ }>;
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createJob = 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.createJob = (0, pieces_framework_1.createAction)({
9
+ auth: common_1.housecallProAuth,
10
+ name: 'create_job',
11
+ displayName: 'Create Job',
12
+ description: 'Creates a job with the ID for an already existing address and customer.',
13
+ props: {
14
+ customer_id: pieces_framework_1.Property.ShortText({
15
+ displayName: 'Customer ID',
16
+ description: 'The ID of the customer this job is for',
17
+ required: true,
18
+ }),
19
+ address_id: pieces_framework_1.Property.ShortText({
20
+ displayName: 'Address ID',
21
+ description: 'The ID of the address for this job',
22
+ required: true,
23
+ }),
24
+ invoice_number: pieces_framework_1.Property.Number({
25
+ displayName: 'Invoice Number',
26
+ description: 'Invoice number must be unique across all of a company\'s jobs. If left blank, one will be automatically generated.',
27
+ required: false,
28
+ }),
29
+ scheduled_start: pieces_framework_1.Property.DateTime({
30
+ displayName: 'Scheduled Start',
31
+ description: 'Start time of job in ISO8601 format (e.g., 2021-01-14T20:14:00)',
32
+ required: false,
33
+ }),
34
+ scheduled_end: pieces_framework_1.Property.DateTime({
35
+ displayName: 'Scheduled End',
36
+ description: 'End time of job in ISO8601 format (e.g., 2021-01-14T21:14:00)',
37
+ required: false,
38
+ }),
39
+ arrival_window: pieces_framework_1.Property.Number({
40
+ displayName: 'Arrival Window (minutes)',
41
+ description: 'Integer value in minutes of arrival window',
42
+ required: false,
43
+ }),
44
+ assigned_employee_ids: pieces_framework_1.Property.Array({
45
+ displayName: 'Assigned Employee IDs',
46
+ description: 'Array of employee IDs to assign to the job',
47
+ required: false,
48
+ }),
49
+ tags: pieces_framework_1.Property.Array({
50
+ displayName: 'Tags',
51
+ description: 'Array of tags to assign to the job',
52
+ required: false,
53
+ }),
54
+ lead_source: pieces_framework_1.Property.ShortText({
55
+ displayName: 'Lead Source',
56
+ required: false,
57
+ }),
58
+ notes: pieces_framework_1.Property.LongText({
59
+ displayName: 'Notes',
60
+ required: false,
61
+ }),
62
+ line_items: pieces_framework_1.Property.Array({
63
+ displayName: 'Line Items',
64
+ description: 'Array of line items for the job',
65
+ required: false,
66
+ }),
67
+ pricing_form: pieces_framework_1.Property.Json({
68
+ displayName: 'Pricing Form',
69
+ description: 'Pricing form object with fields and options (use UUIDs from GET price form endpoint)',
70
+ required: false,
71
+ }),
72
+ job_fields: pieces_framework_1.Property.Json({
73
+ displayName: 'Job Fields',
74
+ description: 'Job fields object (e.g., job_type_id, business_unit_id)',
75
+ required: false,
76
+ }),
77
+ },
78
+ run(_a) {
79
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
80
+ const jobData = {
81
+ customer_id: propsValue['customer_id'],
82
+ address_id: propsValue['address_id'],
83
+ };
84
+ if (propsValue['invoice_number'] !== undefined) {
85
+ jobData['invoice_number'] = propsValue['invoice_number'];
86
+ }
87
+ // Build schedule object if any schedule fields are provided
88
+ if (propsValue['scheduled_start'] || propsValue['scheduled_end'] || propsValue['arrival_window'] !== undefined) {
89
+ jobData['schedule'] = {};
90
+ if (propsValue['scheduled_start']) {
91
+ jobData['schedule']['scheduled_start'] = propsValue['scheduled_start'];
92
+ }
93
+ if (propsValue['scheduled_end']) {
94
+ jobData['schedule']['scheduled_end'] = propsValue['scheduled_end'];
95
+ }
96
+ if (propsValue['arrival_window'] !== undefined) {
97
+ jobData['schedule']['arrival_window'] = propsValue['arrival_window'];
98
+ }
99
+ }
100
+ if (propsValue['assigned_employee_ids'] && propsValue['assigned_employee_ids'].length > 0) {
101
+ jobData['assigned_employee_ids'] = propsValue['assigned_employee_ids'];
102
+ }
103
+ if (propsValue['tags'] && propsValue['tags'].length > 0) {
104
+ jobData['tags'] = propsValue['tags'];
105
+ }
106
+ if (propsValue['lead_source']) {
107
+ jobData['lead_source'] = propsValue['lead_source'];
108
+ }
109
+ if (propsValue['notes']) {
110
+ jobData['notes'] = propsValue['notes'];
111
+ }
112
+ if (propsValue['line_items']) {
113
+ jobData['line_items'] = propsValue['line_items'];
114
+ }
115
+ if (propsValue['pricing_form']) {
116
+ jobData['pricing_form'] = propsValue['pricing_form'];
117
+ }
118
+ if (propsValue['job_fields']) {
119
+ jobData['job_fields'] = propsValue['job_fields'];
120
+ }
121
+ const response = yield (0, common_1.makeHousecallProRequest)(auth, '/jobs', pieces_common_1.HttpMethod.POST, jobData);
122
+ return response.body;
123
+ });
124
+ },
125
+ });
126
+ //# sourceMappingURL=create-job.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-job.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/housecall-pro/src/lib/actions/create-job.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAsE;AACtE,+DAAyD;AAE5C,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,yBAAgB;IACtB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,yEAAyE;IACtF,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,cAAc,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC9B,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,oHAAoH;YACjI,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACjC,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,iEAAiE;YAC9E,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,aAAa,E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UAAU,CAAC,MAAM,CAAa,CAAC;YACnD,CAAC;YACD,IAAI,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;gBAC9B,OAAO,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;YACrD,CAAC;YACD,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;gBACxB,OAAO,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;YACzC,CAAC;YACD,IAAI,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;gBAC7B,OAAO,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;YACnD,CAAC;YACD,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;gBAC/B,OAAO,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;YACvD,CAAC;YACD,IAAI,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;gBAC7B,OAAO,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;YACnD,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAuB,EAC5C,IAAI,EACJ,OAAO,EACP,0BAAU,CAAC,IAAI,EACf,OAAO,CACR,CAAC;YAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const deleteJobSchedule: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ job_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ }>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteJobSchedule = 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.deleteJobSchedule = (0, pieces_framework_1.createAction)({
9
+ auth: common_1.housecallProAuth,
10
+ name: "delete_job_schedule",
11
+ displayName: "Delete Job Schedule",
12
+ description: "Deletes schedule on a job.",
13
+ props: {
14
+ job_id: pieces_framework_1.Property.ShortText({
15
+ displayName: "Job ID",
16
+ description: "The ID of the job to delete schedule from.",
17
+ required: true,
18
+ }),
19
+ },
20
+ run(context) {
21
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
22
+ const { auth, propsValue } = context;
23
+ const response = yield (0, common_1.makeHousecallProRequest)(auth, `/jobs/${propsValue['job_id']}/schedule`, pieces_common_1.HttpMethod.DELETE);
24
+ return response.body;
25
+ });
26
+ },
27
+ });
28
+ //# sourceMappingURL=delete-job-schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-job-schedule.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/housecall-pro/src/lib/actions/delete-job-schedule.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAsE;AACtE,+DAAyD;AAE5C,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,yBAAgB;IACtB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,4BAA4B;IACzC,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;YAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAuB,EAC5C,IAAI,EACJ,SAAS,UAAU,CAAC,QAAQ,CAAC,WAAW,EACxC,0BAAU,CAAC,MAAM,CAClB,CAAC;YAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const getCustomerAddress: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ customer_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ address_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ }>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCustomerAddress = 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.getCustomerAddress = (0, pieces_framework_1.createAction)({
9
+ auth: common_1.housecallProAuth,
10
+ name: "get_customer_address",
11
+ displayName: "Get a Customer's Address",
12
+ description: "Retrieves a customer's address by customer ID and address ID.",
13
+ props: {
14
+ customer_id: pieces_framework_1.Property.ShortText({
15
+ displayName: "Customer ID",
16
+ description: "The ID of the customer",
17
+ required: true,
18
+ }),
19
+ address_id: pieces_framework_1.Property.ShortText({
20
+ displayName: "Address ID",
21
+ description: "The ID of the address",
22
+ required: true,
23
+ }),
24
+ },
25
+ run(context) {
26
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
27
+ const { auth, propsValue } = context;
28
+ const response = yield (0, common_1.makeHousecallProRequest)(auth, `/customers/${propsValue.customer_id}/addresses/${propsValue.address_id}`, pieces_common_1.HttpMethod.GET);
29
+ return response.body;
30
+ });
31
+ },
32
+ });
33
+ //# sourceMappingURL=get-customer-address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-customer-address.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/housecall-pro/src/lib/actions/get-customer-address.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAAsE;AACtE,+DAAyD;AAE5C,QAAA,kBAAkB,GAAG,IAAA,+BAAY,EAAC;IAC7C,IAAI,EAAE,yBAAgB;IACtB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,+DAA+D;IAC5E,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,wBAAwB;YACrC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;YAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,gCAAuB,EAC5C,IAAI,EACJ,cAAc,UAAU,CAAC,WAAW,cAAc,UAAU,CAAC,UAAU,EAAE,EACzE,0BAAU,CAAC,GAAG,CACf,CAAC;YAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const getCustomerAddresses: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ customer_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ page: import("@activepieces/pieces-framework").NumberProperty<false>;
4
+ page_size: import("@activepieces/pieces-framework").NumberProperty<false>;
5
+ sort_by: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
6
+ sort_direction: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
7
+ }>;