@workbuddy/piece-workbuddy-vnext 1.0.4 → 1.0.5
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 +1 -1
- package/src/index.d.ts.map +1 -1
- package/src/index.js +89 -83
- package/src/index.js.map +1 -1
- package/src/index.ts +29 -17
- package/src/lib/actions/agents.d.ts.map +1 -1
- package/src/lib/actions/agents.js +6 -4
- package/src/lib/actions/agents.js.map +1 -1
- package/src/lib/actions/agents.ts +8 -4
- package/src/lib/actions/attachments.d.ts.map +1 -1
- package/src/lib/actions/attachments.js +2 -1
- package/src/lib/actions/attachments.js.map +1 -1
- package/src/lib/actions/attachments.ts +3 -1
- package/src/lib/actions/{crm->-companies.d.ts → crm-companies.d.ts} +1 -1
- package/src/lib/actions/crm-companies.d.ts.map +1 -0
- package/src/lib/actions/{crm->-companies.js → crm-companies.js} +1 -1
- package/src/lib/actions/{crm->-invites.js.map → crm-companies.js.map} +1 -1
- package/src/lib/actions/{crm->-contacts.d.ts → crm-contacts.d.ts} +1 -1
- package/src/lib/actions/crm-contacts.d.ts.map +1 -0
- package/src/lib/actions/{crm->-contacts.js → crm-contacts.js} +1 -1
- package/src/lib/actions/crm-contacts.js.map +1 -0
- package/src/lib/actions/{crm->-contractors.d.ts → crm-contractors.d.ts} +1 -1
- package/src/lib/actions/crm-contractors.d.ts.map +1 -0
- package/src/lib/actions/{crm->-contractors.js → crm-contractors.js} +1 -1
- package/src/lib/actions/{crm->-employees.js.map → crm-contractors.js.map} +1 -1
- package/src/lib/actions/{crm->-customers.d.ts → crm-customers.d.ts} +1 -1
- package/src/lib/actions/crm-customers.d.ts.map +1 -0
- package/src/lib/actions/{crm->-customers.js → crm-customers.js} +1 -1
- package/src/lib/actions/crm-customers.js.map +1 -0
- package/src/lib/actions/{crm->-employees.d.ts → crm-employees.d.ts} +1 -1
- package/src/lib/actions/crm-employees.d.ts.map +1 -0
- package/src/lib/actions/{crm->-employees.js → crm-employees.js} +1 -1
- package/src/lib/actions/crm-employees.js.map +1 -0
- package/src/lib/actions/{crm->-external-users.d.ts → crm-external-users.d.ts} +1 -1
- package/src/lib/actions/crm-external-users.d.ts.map +1 -0
- package/src/lib/actions/{crm->-external-users.js → crm-external-users.js} +1 -1
- package/src/lib/actions/crm-external-users.js.map +1 -0
- package/src/lib/actions/{crm->-invites.d.ts → crm-invites.d.ts} +1 -1
- package/src/lib/actions/crm-invites.d.ts.map +1 -0
- package/src/lib/actions/{crm->-invites.js → crm-invites.js} +1 -1
- package/src/lib/actions/crm-invites.js.map +1 -0
- package/src/lib/actions/{crm->-sites.d.ts → crm-sites.d.ts} +1 -1
- package/src/lib/actions/crm-sites.d.ts.map +1 -0
- package/src/lib/actions/{crm->-sites.js → crm-sites.js} +1 -1
- package/src/lib/actions/crm-sites.js.map +1 -0
- package/src/lib/actions/{crm->-suppliers.d.ts → crm-suppliers.d.ts} +1 -1
- package/src/lib/actions/crm-suppliers.d.ts.map +1 -0
- package/src/lib/actions/{crm->-suppliers.js → crm-suppliers.js} +1 -1
- package/src/lib/actions/crm-suppliers.js.map +1 -0
- package/src/lib/actions/flags.d.ts +34 -0
- package/src/lib/actions/flags.d.ts.map +1 -0
- package/src/lib/actions/flags.js +185 -0
- package/src/lib/actions/flags.js.map +1 -0
- package/src/lib/actions/flags.ts +201 -0
- package/src/lib/actions/index.d.ts +18 -17
- package/src/lib/actions/index.d.ts.map +1 -1
- package/src/lib/actions/index.js +18 -17
- package/src/lib/actions/index.js.map +1 -1
- package/src/lib/actions/index.ts +18 -17
- package/src/lib/actions/{jobs->-activities.d.ts → jobs-activities.d.ts} +15 -5
- package/src/lib/actions/jobs-activities.d.ts.map +1 -0
- package/src/lib/actions/{jobs->-activities.js → jobs-activities.js} +110 -59
- package/src/lib/actions/jobs-activities.js.map +1 -0
- package/src/lib/actions/{jobs->-activities.ts → jobs-activities.ts} +118 -57
- package/src/lib/actions/{jobs->-contacts.d.ts → jobs-contacts.d.ts} +1 -1
- package/src/lib/actions/jobs-contacts.d.ts.map +1 -0
- package/src/lib/actions/{jobs->-contacts.js → jobs-contacts.js} +5 -5
- package/src/lib/actions/jobs-contacts.js.map +1 -0
- package/src/lib/actions/{jobs->-contacts.ts → jobs-contacts.ts} +4 -4
- package/src/lib/actions/{jobs->-files.d.ts → jobs-files.d.ts} +1 -1
- package/src/lib/actions/jobs-files.d.ts.map +1 -0
- package/src/lib/actions/{jobs->-files.js → jobs-files.js} +9 -9
- package/src/lib/actions/jobs-files.js.map +1 -0
- package/src/lib/actions/{jobs->-files.ts → jobs-files.ts} +8 -8
- package/src/lib/actions/{jobs->-tasks.d.ts → jobs-tasks.d.ts} +4 -2
- package/src/lib/actions/jobs-tasks.d.ts.map +1 -0
- package/src/lib/actions/{jobs->-tasks.js → jobs-tasks.js} +61 -37
- package/src/lib/actions/jobs-tasks.js.map +1 -0
- package/src/lib/actions/{jobs->-tasks.ts → jobs-tasks.ts} +64 -36
- package/src/lib/actions/jobs.d.ts +4 -3
- package/src/lib/actions/jobs.d.ts.map +1 -1
- package/src/lib/actions/jobs.js +90 -72
- package/src/lib/actions/jobs.js.map +1 -1
- package/src/lib/actions/jobs.ts +94 -72
- package/src/lib/actions/mcp.d.ts +1 -1
- package/src/lib/actions/mcp.d.ts.map +1 -1
- package/src/lib/actions/mcp.js +7 -6
- package/src/lib/actions/mcp.js.map +1 -1
- package/src/lib/actions/mcp.ts +8 -6
- package/src/lib/actions/settings.js +1 -1
- package/src/lib/actions/settings.js.map +1 -1
- package/src/lib/actions/settings.ts +1 -1
- package/src/lib/actions/{stages->-activities.d.ts → stages-activities.d.ts} +24 -5
- package/src/lib/actions/stages-activities.d.ts.map +1 -0
- package/src/lib/actions/{stages->-activities.js → stages-activities.js} +164 -68
- package/src/lib/actions/stages-activities.js.map +1 -0
- package/src/lib/actions/{stages->-activities.ts → stages-activities.ts} +172 -66
- package/src/lib/actions/{stages->-files.d.ts → stages-files.d.ts} +5 -1
- package/src/lib/actions/stages-files.d.ts.map +1 -0
- package/src/lib/actions/{stages->-files.js → stages-files.js} +35 -15
- package/src/lib/actions/stages-files.js.map +1 -0
- package/src/lib/actions/{stages->-files.ts → stages-files.ts} +34 -14
- package/src/lib/actions/{stages->-resources.d.ts → stages-resources.d.ts} +1 -1
- package/src/lib/actions/stages-resources.d.ts.map +1 -0
- package/src/lib/actions/{stages->-resources.js → stages-resources.js} +7 -5
- package/src/lib/actions/stages-resources.js.map +1 -0
- package/src/lib/actions/{stages->-resources.ts → stages-resources.ts} +8 -4
- package/src/lib/actions/{stages->-tasks.d.ts → stages-tasks.d.ts} +8 -2
- package/src/lib/actions/stages-tasks.d.ts.map +1 -0
- package/src/lib/actions/{stages->-tasks.js → stages-tasks.js} +91 -47
- package/src/lib/actions/stages-tasks.js.map +1 -0
- package/src/lib/actions/{stages->-tasks.ts → stages-tasks.ts} +94 -46
- package/src/lib/actions/stages.d.ts +6 -2
- package/src/lib/actions/stages.d.ts.map +1 -1
- package/src/lib/actions/stages.js +77 -27
- package/src/lib/actions/stages.js.map +1 -1
- package/src/lib/actions/stages.ts +88 -27
- package/src/lib/actions/webhooks-v2.js +15 -15
- package/src/lib/actions/webhooks-v2.js.map +1 -1
- package/src/lib/actions/webhooks-v2.ts +15 -15
- package/src/lib/auth.js +2 -2
- package/src/lib/auth.js.map +1 -1
- package/src/lib/auth.ts +2 -2
- package/src/lib/triggers/activity.d.ts.map +1 -1
- package/src/lib/triggers/activity.js +54 -42
- package/src/lib/triggers/activity.js.map +1 -1
- package/src/lib/triggers/activity.ts +54 -42
- package/src/lib/triggers/bill.d.ts +240 -48
- package/src/lib/triggers/bill.d.ts.map +1 -1
- package/src/lib/triggers/bill.js +368 -88
- package/src/lib/triggers/bill.js.map +1 -1
- package/src/lib/triggers/bill.ts +368 -88
- package/src/lib/triggers/invoice.d.ts +240 -48
- package/src/lib/triggers/invoice.d.ts.map +1 -1
- package/src/lib/triggers/invoice.js +368 -88
- package/src/lib/triggers/invoice.js.map +1 -1
- package/src/lib/triggers/invoice.ts +368 -88
- package/src/lib/triggers/job.d.ts +640 -128
- package/src/lib/triggers/job.d.ts.map +1 -1
- package/src/lib/triggers/job.js +928 -208
- package/src/lib/triggers/job.js.map +1 -1
- package/src/lib/triggers/job.ts +928 -208
- package/src/lib/triggers/lead.d.ts +400 -80
- package/src/lib/triggers/lead.d.ts.map +1 -1
- package/src/lib/triggers/lead.js +552 -96
- package/src/lib/triggers/lead.js.map +1 -1
- package/src/lib/triggers/lead.ts +552 -96
- package/src/lib/triggers/opportunity.d.ts +320 -64
- package/src/lib/triggers/opportunity.d.ts.map +1 -1
- package/src/lib/triggers/opportunity.js +456 -88
- package/src/lib/triggers/opportunity.js.map +1 -1
- package/src/lib/triggers/opportunity.ts +456 -88
- package/src/lib/triggers/quote.d.ts +240 -48
- package/src/lib/triggers/quote.d.ts.map +1 -1
- package/src/lib/triggers/quote.js +368 -88
- package/src/lib/triggers/quote.js.map +1 -1
- package/src/lib/triggers/quote.ts +368 -88
- package/src/lib/triggers/stage.d.ts +480 -96
- package/src/lib/triggers/stage.d.ts.map +1 -1
- package/src/lib/triggers/stage.js +764 -220
- package/src/lib/triggers/stage.js.map +1 -1
- package/src/lib/triggers/stage.ts +764 -220
- package/src/lib/triggers/task.d.ts +80 -16
- package/src/lib/triggers/task.d.ts.map +1 -1
- package/src/lib/triggers/task.js +172 -68
- package/src/lib/triggers/task.js.map +1 -1
- package/src/lib/triggers/task.ts +172 -68
- package/src/lib/actions/crm->-companies.d.ts.map +0 -1
- package/src/lib/actions/crm->-companies.js.map +0 -1
- package/src/lib/actions/crm->-contacts.d.ts.map +0 -1
- package/src/lib/actions/crm->-contacts.js.map +0 -1
- package/src/lib/actions/crm->-contractors.d.ts.map +0 -1
- package/src/lib/actions/crm->-contractors.js.map +0 -1
- package/src/lib/actions/crm->-customers.d.ts.map +0 -1
- package/src/lib/actions/crm->-customers.js.map +0 -1
- package/src/lib/actions/crm->-employees.d.ts.map +0 -1
- package/src/lib/actions/crm->-external-users.d.ts.map +0 -1
- package/src/lib/actions/crm->-external-users.js.map +0 -1
- package/src/lib/actions/crm->-invites.d.ts.map +0 -1
- package/src/lib/actions/crm->-sites.d.ts.map +0 -1
- package/src/lib/actions/crm->-sites.js.map +0 -1
- package/src/lib/actions/crm->-suppliers.d.ts.map +0 -1
- package/src/lib/actions/crm->-suppliers.js.map +0 -1
- package/src/lib/actions/jobs->-activities.d.ts.map +0 -1
- package/src/lib/actions/jobs->-activities.js.map +0 -1
- package/src/lib/actions/jobs->-contacts.d.ts.map +0 -1
- package/src/lib/actions/jobs->-contacts.js.map +0 -1
- package/src/lib/actions/jobs->-files.d.ts.map +0 -1
- package/src/lib/actions/jobs->-files.js.map +0 -1
- package/src/lib/actions/jobs->-tasks.d.ts.map +0 -1
- package/src/lib/actions/jobs->-tasks.js.map +0 -1
- package/src/lib/actions/stages->-activities.d.ts.map +0 -1
- package/src/lib/actions/stages->-activities.js.map +0 -1
- package/src/lib/actions/stages->-files.d.ts.map +0 -1
- package/src/lib/actions/stages->-files.js.map +0 -1
- package/src/lib/actions/stages->-resources.d.ts.map +0 -1
- package/src/lib/actions/stages->-resources.js.map +0 -1
- package/src/lib/actions/stages->-tasks.d.ts.map +0 -1
- package/src/lib/actions/stages->-tasks.js.map +0 -1
- /package/src/lib/actions/{crm->-companies.ts → crm-companies.ts} +0 -0
- /package/src/lib/actions/{crm->-contacts.ts → crm-contacts.ts} +0 -0
- /package/src/lib/actions/{crm->-contractors.ts → crm-contractors.ts} +0 -0
- /package/src/lib/actions/{crm->-customers.ts → crm-customers.ts} +0 -0
- /package/src/lib/actions/{crm->-employees.ts → crm-employees.ts} +0 -0
- /package/src/lib/actions/{crm->-external-users.ts → crm-external-users.ts} +0 -0
- /package/src/lib/actions/{crm->-invites.ts → crm-invites.ts} +0 -0
- /package/src/lib/actions/{crm->-sites.ts → crm-sites.ts} +0 -0
- /package/src/lib/actions/{crm->-suppliers.ts → crm-suppliers.ts} +0 -0
|
@@ -4,6 +4,7 @@ export declare const PublicStageActivitiesController_list: import("@activepieces
|
|
|
4
4
|
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
5
|
}>, {
|
|
6
6
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
8
|
}>;
|
|
8
9
|
export declare const PublicStageActivitiesController_getById: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
9
10
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
@@ -12,6 +13,7 @@ export declare const PublicStageActivitiesController_getById: import("@activepie
|
|
|
12
13
|
}>, {
|
|
13
14
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
14
15
|
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
16
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
15
17
|
}>;
|
|
16
18
|
export declare const PublicStageActivitiesController_delete: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
17
19
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
@@ -20,6 +22,7 @@ export declare const PublicStageActivitiesController_delete: import("@activepiec
|
|
|
20
22
|
}>, {
|
|
21
23
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
22
24
|
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
25
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
23
26
|
}>;
|
|
24
27
|
export declare const PublicStageActivitiesController_createNote: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
25
28
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
@@ -27,6 +30,7 @@ export declare const PublicStageActivitiesController_createNote: import("@active
|
|
|
27
30
|
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
28
31
|
}>, {
|
|
29
32
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
33
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
30
34
|
body: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
31
35
|
labelIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
32
36
|
attachmentIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
@@ -38,12 +42,13 @@ export declare const PublicStageActivitiesController_createEmail: import("@activ
|
|
|
38
42
|
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
39
43
|
}>, {
|
|
40
44
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
45
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
41
46
|
templateId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
42
47
|
subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
43
48
|
body: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
44
|
-
to: import("@activepieces/pieces-framework").
|
|
45
|
-
cc: import("@activepieces/pieces-framework").
|
|
46
|
-
bcc: import("@activepieces/pieces-framework").
|
|
49
|
+
to: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
50
|
+
cc: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
51
|
+
bcc: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
47
52
|
labelIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
48
53
|
attachmentIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
49
54
|
sharing: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
@@ -54,9 +59,10 @@ export declare const PublicStageActivitiesController_createSms: import("@activep
|
|
|
54
59
|
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
55
60
|
}>, {
|
|
56
61
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
62
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
57
63
|
templateId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
58
64
|
body: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
59
|
-
to: import("@activepieces/pieces-framework").
|
|
65
|
+
to: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
60
66
|
labelIds: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
61
67
|
sharing: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
62
68
|
}>;
|
|
@@ -66,6 +72,7 @@ export declare const PublicStageActivitiesController_createPhone: import("@activ
|
|
|
66
72
|
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
67
73
|
}>, {
|
|
68
74
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
75
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
69
76
|
direction: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
70
77
|
outcome: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
71
78
|
duration: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
@@ -80,8 +87,20 @@ export declare const PublicStageActivitiesController_createIntegration: import("
|
|
|
80
87
|
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
81
88
|
}>, {
|
|
82
89
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
90
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
83
91
|
body: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
84
92
|
integrationType: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
85
93
|
sharing: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
86
94
|
}>;
|
|
87
|
-
|
|
95
|
+
export declare const PublicStageActivitiesController_createThread: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
96
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
97
|
+
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
98
|
+
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
99
|
+
}>, {
|
|
100
|
+
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
101
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
102
|
+
body: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
103
|
+
integrationType: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
104
|
+
sharing: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
105
|
+
}>;
|
|
106
|
+
//# sourceMappingURL=stages-activities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stages-activities.d.ts","sourceRoot":"","sources":["stages-activities.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oCAAoC;;;;;;;EAmC/C,CAAC;AAEH,eAAO,MAAM,uCAAuC;;;;;;;;EAwClD,CAAC;AAEH,eAAO,MAAM,sCAAsC;;;;;;;;EAwCjD,CAAC;AAEH,eAAO,MAAM,0CAA0C;;;;;;;;;;;EAgErD,CAAC;AAEH,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;EA8FtD,CAAC;AAEH,eAAO,MAAM,yCAAyC;;;;;;;;;;;;EAsEpD,CAAC;AAEH,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;EAmGtD,CAAC;AAEH,eAAO,MAAM,iDAAiD;;;;;;;;;;EA0D5D,CAAC;AAEH,eAAO,MAAM,4CAA4C;;;;;;;;;;EA0DvD,CAAC"}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PublicStageActivitiesController_createIntegration = exports.PublicStageActivitiesController_createPhone = exports.PublicStageActivitiesController_createSms = exports.PublicStageActivitiesController_createEmail = exports.PublicStageActivitiesController_createNote = exports.PublicStageActivitiesController_delete = exports.PublicStageActivitiesController_getById = exports.PublicStageActivitiesController_list = void 0;
|
|
3
|
+
exports.PublicStageActivitiesController_createThread = exports.PublicStageActivitiesController_createIntegration = exports.PublicStageActivitiesController_createPhone = exports.PublicStageActivitiesController_createSms = exports.PublicStageActivitiesController_createEmail = exports.PublicStageActivitiesController_createNote = exports.PublicStageActivitiesController_delete = exports.PublicStageActivitiesController_getById = exports.PublicStageActivitiesController_list = void 0;
|
|
4
4
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
5
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
6
|
const auth_1 = require("../auth");
|
|
7
7
|
exports.PublicStageActivitiesController_list = (0, pieces_framework_1.createAction)({
|
|
8
8
|
name: 'PublicStageActivitiesController_list',
|
|
9
9
|
auth: auth_1.workbuddyAuth,
|
|
10
|
-
displayName: 'List activities',
|
|
10
|
+
displayName: 'List activities (Stages)',
|
|
11
11
|
description: '',
|
|
12
12
|
props: {
|
|
13
13
|
stageId: pieces_framework_1.Property.ShortText({
|
|
14
14
|
displayName: 'Stage Id',
|
|
15
|
+
description: 'Stage ID or stage number',
|
|
16
|
+
required: true,
|
|
17
|
+
}),
|
|
18
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
19
|
+
displayName: 'Job Id',
|
|
15
20
|
description: '',
|
|
16
21
|
required: true,
|
|
17
22
|
}),
|
|
@@ -19,10 +24,10 @@ exports.PublicStageActivitiesController_list = (0, pieces_framework_1.createActi
|
|
|
19
24
|
async run(context) {
|
|
20
25
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
21
26
|
const baseUrl = context.auth.props.baseUrl;
|
|
22
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
27
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities`;
|
|
23
28
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
24
29
|
method: pieces_common_1.HttpMethod.GET,
|
|
25
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
30
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities`,
|
|
26
31
|
headers: {
|
|
27
32
|
Authorization: `Bearer ${token}`,
|
|
28
33
|
'Content-Type': 'application/json',
|
|
@@ -35,12 +40,12 @@ exports.PublicStageActivitiesController_list = (0, pieces_framework_1.createActi
|
|
|
35
40
|
exports.PublicStageActivitiesController_getById = (0, pieces_framework_1.createAction)({
|
|
36
41
|
name: 'PublicStageActivitiesController_getById',
|
|
37
42
|
auth: auth_1.workbuddyAuth,
|
|
38
|
-
displayName: 'Get activity by ID',
|
|
43
|
+
displayName: 'Get activity by ID (Stages)',
|
|
39
44
|
description: '',
|
|
40
45
|
props: {
|
|
41
46
|
stageId: pieces_framework_1.Property.ShortText({
|
|
42
47
|
displayName: 'Stage Id',
|
|
43
|
-
description: '',
|
|
48
|
+
description: 'Stage ID or stage number',
|
|
44
49
|
required: true,
|
|
45
50
|
}),
|
|
46
51
|
id: pieces_framework_1.Property.ShortText({
|
|
@@ -48,14 +53,19 @@ exports.PublicStageActivitiesController_getById = (0, pieces_framework_1.createA
|
|
|
48
53
|
description: 'Activity ID',
|
|
49
54
|
required: true,
|
|
50
55
|
}),
|
|
56
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
57
|
+
displayName: 'Job Id',
|
|
58
|
+
description: '',
|
|
59
|
+
required: true,
|
|
60
|
+
}),
|
|
51
61
|
},
|
|
52
62
|
async run(context) {
|
|
53
63
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
54
64
|
const baseUrl = context.auth.props.baseUrl;
|
|
55
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
65
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/${context.propsValue.id}`;
|
|
56
66
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
57
67
|
method: pieces_common_1.HttpMethod.GET,
|
|
58
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
68
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/${context.propsValue.id}`,
|
|
59
69
|
headers: {
|
|
60
70
|
Authorization: `Bearer ${token}`,
|
|
61
71
|
'Content-Type': 'application/json',
|
|
@@ -68,12 +78,12 @@ exports.PublicStageActivitiesController_getById = (0, pieces_framework_1.createA
|
|
|
68
78
|
exports.PublicStageActivitiesController_delete = (0, pieces_framework_1.createAction)({
|
|
69
79
|
name: 'PublicStageActivitiesController_delete',
|
|
70
80
|
auth: auth_1.workbuddyAuth,
|
|
71
|
-
displayName: 'Delete activity',
|
|
81
|
+
displayName: 'Delete activity (Stages)',
|
|
72
82
|
description: '',
|
|
73
83
|
props: {
|
|
74
84
|
stageId: pieces_framework_1.Property.ShortText({
|
|
75
85
|
displayName: 'Stage Id',
|
|
76
|
-
description: '',
|
|
86
|
+
description: 'Stage ID or stage number',
|
|
77
87
|
required: true,
|
|
78
88
|
}),
|
|
79
89
|
id: pieces_framework_1.Property.ShortText({
|
|
@@ -81,14 +91,19 @@ exports.PublicStageActivitiesController_delete = (0, pieces_framework_1.createAc
|
|
|
81
91
|
description: 'Activity ID',
|
|
82
92
|
required: true,
|
|
83
93
|
}),
|
|
94
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
95
|
+
displayName: 'Job Id',
|
|
96
|
+
description: '',
|
|
97
|
+
required: true,
|
|
98
|
+
}),
|
|
84
99
|
},
|
|
85
100
|
async run(context) {
|
|
86
101
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
87
102
|
const baseUrl = context.auth.props.baseUrl;
|
|
88
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
103
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/${context.propsValue.id}`;
|
|
89
104
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
90
105
|
method: pieces_common_1.HttpMethod.DELETE,
|
|
91
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
106
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/${context.propsValue.id}`,
|
|
92
107
|
headers: {
|
|
93
108
|
Authorization: `Bearer ${token}`,
|
|
94
109
|
'Content-Type': 'application/json',
|
|
@@ -101,48 +116,54 @@ exports.PublicStageActivitiesController_delete = (0, pieces_framework_1.createAc
|
|
|
101
116
|
exports.PublicStageActivitiesController_createNote = (0, pieces_framework_1.createAction)({
|
|
102
117
|
name: 'PublicStageActivitiesController_createNote',
|
|
103
118
|
auth: auth_1.workbuddyAuth,
|
|
104
|
-
displayName: 'Create note activity',
|
|
119
|
+
displayName: 'Create note activity (Stages)',
|
|
105
120
|
description: '',
|
|
106
121
|
props: {
|
|
107
122
|
stageId: pieces_framework_1.Property.ShortText({
|
|
108
123
|
displayName: 'Stage Id',
|
|
124
|
+
description: 'Stage ID or stage number',
|
|
125
|
+
required: true,
|
|
126
|
+
}),
|
|
127
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
128
|
+
displayName: 'Job Id',
|
|
109
129
|
description: '',
|
|
110
130
|
required: true,
|
|
111
131
|
}),
|
|
112
132
|
body: pieces_framework_1.Property.ShortText({
|
|
113
133
|
displayName: 'Body',
|
|
114
|
-
description: '',
|
|
134
|
+
description: 'Message body content (HTML supported for email)',
|
|
115
135
|
required: true,
|
|
116
136
|
}),
|
|
117
137
|
labelIds: pieces_framework_1.Property.Array({
|
|
118
138
|
displayName: 'Label Ids',
|
|
119
|
-
description: '',
|
|
139
|
+
description: 'Array of label/tag IDs to attach (comma-separated, e.g. "id1,id2")',
|
|
120
140
|
required: false,
|
|
121
141
|
}),
|
|
122
142
|
attachmentIds: pieces_framework_1.Property.Array({
|
|
123
143
|
displayName: 'Attachment Ids',
|
|
124
|
-
description: '',
|
|
144
|
+
description: 'Attachment IDs from the upload endpoint (comma-separated, e.g. "id1,id2")',
|
|
125
145
|
required: false,
|
|
126
146
|
}),
|
|
127
147
|
sharing: pieces_framework_1.Property.Json({
|
|
128
148
|
displayName: 'Sharing',
|
|
129
|
-
description: '',
|
|
149
|
+
description: 'Sharing options — control visibility to customer portal and field app',
|
|
130
150
|
required: false,
|
|
131
151
|
}),
|
|
132
152
|
},
|
|
133
153
|
async run(context) {
|
|
134
154
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
135
155
|
const baseUrl = context.auth.props.baseUrl;
|
|
136
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
137
|
-
const
|
|
156
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/note`;
|
|
157
|
+
const rawBody = {
|
|
138
158
|
body: context.propsValue.body,
|
|
139
159
|
labelIds: context.propsValue.labelIds,
|
|
140
160
|
attachmentIds: context.propsValue.attachmentIds,
|
|
141
161
|
sharing: context.propsValue.sharing,
|
|
142
162
|
};
|
|
163
|
+
const body = rawBody;
|
|
143
164
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
144
165
|
method: pieces_common_1.HttpMethod.POST,
|
|
145
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
166
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/note`,
|
|
146
167
|
headers: {
|
|
147
168
|
Authorization: `Bearer ${token}`,
|
|
148
169
|
'Content-Type': 'application/json',
|
|
@@ -156,81 +177,84 @@ exports.PublicStageActivitiesController_createNote = (0, pieces_framework_1.crea
|
|
|
156
177
|
exports.PublicStageActivitiesController_createEmail = (0, pieces_framework_1.createAction)({
|
|
157
178
|
name: 'PublicStageActivitiesController_createEmail',
|
|
158
179
|
auth: auth_1.workbuddyAuth,
|
|
159
|
-
displayName: 'Create email activity',
|
|
180
|
+
displayName: 'Create email activity (Stages)',
|
|
160
181
|
description: '',
|
|
161
182
|
props: {
|
|
162
183
|
stageId: pieces_framework_1.Property.ShortText({
|
|
163
184
|
displayName: 'Stage Id',
|
|
185
|
+
description: 'Stage ID or stage number',
|
|
186
|
+
required: true,
|
|
187
|
+
}),
|
|
188
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
189
|
+
displayName: 'Job Id',
|
|
164
190
|
description: '',
|
|
165
191
|
required: true,
|
|
166
192
|
}),
|
|
167
193
|
templateId: pieces_framework_1.Property.ShortText({
|
|
168
194
|
displayName: 'Template Id',
|
|
169
|
-
description: '',
|
|
195
|
+
description: 'Template ID to pre-populate fields from a template',
|
|
170
196
|
required: false,
|
|
171
197
|
}),
|
|
172
198
|
subject: pieces_framework_1.Property.ShortText({
|
|
173
199
|
displayName: 'Subject',
|
|
174
|
-
description: '',
|
|
200
|
+
description: 'Email subject line',
|
|
175
201
|
required: false,
|
|
176
202
|
}),
|
|
177
203
|
body: pieces_framework_1.Property.ShortText({
|
|
178
204
|
displayName: 'Body',
|
|
179
|
-
description: '',
|
|
205
|
+
description: 'Message body content (HTML supported for email)',
|
|
180
206
|
required: false,
|
|
181
207
|
}),
|
|
182
|
-
to: pieces_framework_1.Property.
|
|
208
|
+
to: pieces_framework_1.Property.Array({
|
|
183
209
|
displayName: 'To',
|
|
184
|
-
description: '',
|
|
210
|
+
description: 'Recipients',
|
|
185
211
|
required: false,
|
|
186
|
-
defaultValue: [],
|
|
187
212
|
}),
|
|
188
|
-
cc: pieces_framework_1.Property.
|
|
213
|
+
cc: pieces_framework_1.Property.Array({
|
|
189
214
|
displayName: 'Cc',
|
|
190
|
-
description: '',
|
|
215
|
+
description: 'CC recipients',
|
|
191
216
|
required: false,
|
|
192
|
-
defaultValue: [],
|
|
193
217
|
}),
|
|
194
|
-
bcc: pieces_framework_1.Property.
|
|
218
|
+
bcc: pieces_framework_1.Property.Array({
|
|
195
219
|
displayName: 'Bcc',
|
|
196
|
-
description: '',
|
|
220
|
+
description: 'BCC recipients',
|
|
197
221
|
required: false,
|
|
198
|
-
defaultValue: [],
|
|
199
222
|
}),
|
|
200
223
|
labelIds: pieces_framework_1.Property.Array({
|
|
201
224
|
displayName: 'Label Ids',
|
|
202
|
-
description: '',
|
|
225
|
+
description: 'Array of label/tag IDs to attach (comma-separated, e.g. "id1,id2")',
|
|
203
226
|
required: false,
|
|
204
227
|
}),
|
|
205
228
|
attachmentIds: pieces_framework_1.Property.Array({
|
|
206
229
|
displayName: 'Attachment Ids',
|
|
207
|
-
description: '',
|
|
230
|
+
description: 'Attachment IDs from the upload endpoint (comma-separated, e.g. "id1,id2")',
|
|
208
231
|
required: false,
|
|
209
232
|
}),
|
|
210
233
|
sharing: pieces_framework_1.Property.Json({
|
|
211
234
|
displayName: 'Sharing',
|
|
212
|
-
description: '',
|
|
235
|
+
description: 'Sharing options — control visibility to customer portal and field app',
|
|
213
236
|
required: false,
|
|
214
237
|
}),
|
|
215
238
|
},
|
|
216
239
|
async run(context) {
|
|
217
240
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
218
241
|
const baseUrl = context.auth.props.baseUrl;
|
|
219
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
220
|
-
const
|
|
242
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/email`;
|
|
243
|
+
const rawBody = {
|
|
221
244
|
templateId: context.propsValue.templateId,
|
|
222
245
|
subject: context.propsValue.subject,
|
|
223
246
|
body: context.propsValue.body,
|
|
224
|
-
to: context.propsValue.to,
|
|
225
|
-
cc: context.propsValue.cc,
|
|
226
|
-
bcc: context.propsValue.bcc,
|
|
247
|
+
to: context.propsValue.to?.map((v) => ({ email: v })),
|
|
248
|
+
cc: context.propsValue.cc?.map((v) => ({ email: v })),
|
|
249
|
+
bcc: context.propsValue.bcc?.map((v) => ({ email: v })),
|
|
227
250
|
labelIds: context.propsValue.labelIds,
|
|
228
251
|
attachmentIds: context.propsValue.attachmentIds,
|
|
229
252
|
sharing: context.propsValue.sharing,
|
|
230
253
|
};
|
|
254
|
+
const body = rawBody;
|
|
231
255
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
232
256
|
method: pieces_common_1.HttpMethod.POST,
|
|
233
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
257
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/email`,
|
|
234
258
|
headers: {
|
|
235
259
|
Authorization: `Bearer ${token}`,
|
|
236
260
|
'Content-Type': 'application/json',
|
|
@@ -244,55 +268,60 @@ exports.PublicStageActivitiesController_createEmail = (0, pieces_framework_1.cre
|
|
|
244
268
|
exports.PublicStageActivitiesController_createSms = (0, pieces_framework_1.createAction)({
|
|
245
269
|
name: 'PublicStageActivitiesController_createSms',
|
|
246
270
|
auth: auth_1.workbuddyAuth,
|
|
247
|
-
displayName: 'Create SMS activity',
|
|
271
|
+
displayName: 'Create SMS activity (Stages)',
|
|
248
272
|
description: '',
|
|
249
273
|
props: {
|
|
250
274
|
stageId: pieces_framework_1.Property.ShortText({
|
|
251
275
|
displayName: 'Stage Id',
|
|
276
|
+
description: 'Stage ID or stage number',
|
|
277
|
+
required: true,
|
|
278
|
+
}),
|
|
279
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
280
|
+
displayName: 'Job Id',
|
|
252
281
|
description: '',
|
|
253
282
|
required: true,
|
|
254
283
|
}),
|
|
255
284
|
templateId: pieces_framework_1.Property.ShortText({
|
|
256
285
|
displayName: 'Template Id',
|
|
257
|
-
description: '',
|
|
286
|
+
description: 'Template ID to pre-populate fields from a template',
|
|
258
287
|
required: false,
|
|
259
288
|
}),
|
|
260
289
|
body: pieces_framework_1.Property.ShortText({
|
|
261
290
|
displayName: 'Body',
|
|
262
|
-
description: '',
|
|
291
|
+
description: 'Message body content (HTML supported for email)',
|
|
263
292
|
required: false,
|
|
264
293
|
}),
|
|
265
|
-
to: pieces_framework_1.Property.
|
|
294
|
+
to: pieces_framework_1.Property.Array({
|
|
266
295
|
displayName: 'To',
|
|
267
|
-
description: '',
|
|
296
|
+
description: 'Recipients',
|
|
268
297
|
required: false,
|
|
269
|
-
defaultValue: [],
|
|
270
298
|
}),
|
|
271
299
|
labelIds: pieces_framework_1.Property.Array({
|
|
272
300
|
displayName: 'Label Ids',
|
|
273
|
-
description: '',
|
|
301
|
+
description: 'Array of label/tag IDs to attach (comma-separated, e.g. "id1,id2")',
|
|
274
302
|
required: false,
|
|
275
303
|
}),
|
|
276
304
|
sharing: pieces_framework_1.Property.Json({
|
|
277
305
|
displayName: 'Sharing',
|
|
278
|
-
description: '',
|
|
306
|
+
description: 'Sharing options — control visibility to customer portal and field app',
|
|
279
307
|
required: false,
|
|
280
308
|
}),
|
|
281
309
|
},
|
|
282
310
|
async run(context) {
|
|
283
311
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
284
312
|
const baseUrl = context.auth.props.baseUrl;
|
|
285
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
286
|
-
const
|
|
313
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/sms`;
|
|
314
|
+
const rawBody = {
|
|
287
315
|
templateId: context.propsValue.templateId,
|
|
288
316
|
body: context.propsValue.body,
|
|
289
|
-
to: context.propsValue.to,
|
|
317
|
+
to: context.propsValue.to?.map((v) => ({ mobile: v })),
|
|
290
318
|
labelIds: context.propsValue.labelIds,
|
|
291
319
|
sharing: context.propsValue.sharing,
|
|
292
320
|
};
|
|
321
|
+
const body = rawBody;
|
|
293
322
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
294
323
|
method: pieces_common_1.HttpMethod.POST,
|
|
295
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
324
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/sms`,
|
|
296
325
|
headers: {
|
|
297
326
|
Authorization: `Bearer ${token}`,
|
|
298
327
|
'Content-Type': 'application/json',
|
|
@@ -306,11 +335,16 @@ exports.PublicStageActivitiesController_createSms = (0, pieces_framework_1.creat
|
|
|
306
335
|
exports.PublicStageActivitiesController_createPhone = (0, pieces_framework_1.createAction)({
|
|
307
336
|
name: 'PublicStageActivitiesController_createPhone',
|
|
308
337
|
auth: auth_1.workbuddyAuth,
|
|
309
|
-
displayName: 'Create phone activity',
|
|
338
|
+
displayName: 'Create phone activity (Stages)',
|
|
310
339
|
description: '',
|
|
311
340
|
props: {
|
|
312
341
|
stageId: pieces_framework_1.Property.ShortText({
|
|
313
342
|
displayName: 'Stage Id',
|
|
343
|
+
description: 'Stage ID or stage number',
|
|
344
|
+
required: true,
|
|
345
|
+
}),
|
|
346
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
347
|
+
displayName: 'Job Id',
|
|
314
348
|
description: '',
|
|
315
349
|
required: true,
|
|
316
350
|
}),
|
|
@@ -348,30 +382,30 @@ exports.PublicStageActivitiesController_createPhone = (0, pieces_framework_1.cre
|
|
|
348
382
|
}),
|
|
349
383
|
callDate: pieces_framework_1.Property.DateTime({
|
|
350
384
|
displayName: 'Call Date',
|
|
351
|
-
description: '',
|
|
385
|
+
description: 'call date (ISO 8601 datetime)',
|
|
352
386
|
required: false,
|
|
353
387
|
}),
|
|
354
388
|
body: pieces_framework_1.Property.ShortText({
|
|
355
389
|
displayName: 'Body',
|
|
356
|
-
description: '',
|
|
390
|
+
description: 'Message body content (HTML supported for email)',
|
|
357
391
|
required: false,
|
|
358
392
|
}),
|
|
359
393
|
labelIds: pieces_framework_1.Property.Array({
|
|
360
394
|
displayName: 'Label Ids',
|
|
361
|
-
description: '',
|
|
395
|
+
description: 'Array of label/tag IDs to attach (comma-separated, e.g. "id1,id2")',
|
|
362
396
|
required: false,
|
|
363
397
|
}),
|
|
364
398
|
sharing: pieces_framework_1.Property.Json({
|
|
365
399
|
displayName: 'Sharing',
|
|
366
|
-
description: '',
|
|
400
|
+
description: 'Sharing options — control visibility to customer portal and field app',
|
|
367
401
|
required: false,
|
|
368
402
|
}),
|
|
369
403
|
},
|
|
370
404
|
async run(context) {
|
|
371
405
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
372
406
|
const baseUrl = context.auth.props.baseUrl;
|
|
373
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
374
|
-
const
|
|
407
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/phone`;
|
|
408
|
+
const rawBody = {
|
|
375
409
|
direction: context.propsValue.direction,
|
|
376
410
|
outcome: context.propsValue.outcome,
|
|
377
411
|
duration: context.propsValue.duration,
|
|
@@ -380,9 +414,10 @@ exports.PublicStageActivitiesController_createPhone = (0, pieces_framework_1.cre
|
|
|
380
414
|
labelIds: context.propsValue.labelIds,
|
|
381
415
|
sharing: context.propsValue.sharing,
|
|
382
416
|
};
|
|
417
|
+
const body = rawBody;
|
|
383
418
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
384
419
|
method: pieces_common_1.HttpMethod.POST,
|
|
385
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
420
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/phone`,
|
|
386
421
|
headers: {
|
|
387
422
|
Authorization: `Bearer ${token}`,
|
|
388
423
|
'Content-Type': 'application/json',
|
|
@@ -396,17 +431,22 @@ exports.PublicStageActivitiesController_createPhone = (0, pieces_framework_1.cre
|
|
|
396
431
|
exports.PublicStageActivitiesController_createIntegration = (0, pieces_framework_1.createAction)({
|
|
397
432
|
name: 'PublicStageActivitiesController_createIntegration',
|
|
398
433
|
auth: auth_1.workbuddyAuth,
|
|
399
|
-
displayName: 'Create integration activity',
|
|
434
|
+
displayName: 'Create integration activity (Stages)',
|
|
400
435
|
description: '',
|
|
401
436
|
props: {
|
|
402
437
|
stageId: pieces_framework_1.Property.ShortText({
|
|
403
438
|
displayName: 'Stage Id',
|
|
439
|
+
description: 'Stage ID or stage number',
|
|
440
|
+
required: true,
|
|
441
|
+
}),
|
|
442
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
443
|
+
displayName: 'Job Id',
|
|
404
444
|
description: '',
|
|
405
445
|
required: true,
|
|
406
446
|
}),
|
|
407
447
|
body: pieces_framework_1.Property.ShortText({
|
|
408
448
|
displayName: 'Body',
|
|
409
|
-
description: '',
|
|
449
|
+
description: 'Message body content (HTML supported for email)',
|
|
410
450
|
required: true,
|
|
411
451
|
}),
|
|
412
452
|
integrationType: pieces_framework_1.Property.ShortText({
|
|
@@ -416,22 +456,78 @@ exports.PublicStageActivitiesController_createIntegration = (0, pieces_framework
|
|
|
416
456
|
}),
|
|
417
457
|
sharing: pieces_framework_1.Property.Json({
|
|
418
458
|
displayName: 'Sharing',
|
|
459
|
+
description: 'Sharing options — control visibility to customer portal and field app',
|
|
460
|
+
required: false,
|
|
461
|
+
}),
|
|
462
|
+
},
|
|
463
|
+
async run(context) {
|
|
464
|
+
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
465
|
+
const baseUrl = context.auth.props.baseUrl;
|
|
466
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/integration`;
|
|
467
|
+
const rawBody = {
|
|
468
|
+
body: context.propsValue.body,
|
|
469
|
+
integrationType: context.propsValue.integrationType,
|
|
470
|
+
sharing: context.propsValue.sharing,
|
|
471
|
+
};
|
|
472
|
+
const body = rawBody;
|
|
473
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
474
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
475
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/integration`,
|
|
476
|
+
headers: {
|
|
477
|
+
Authorization: `Bearer ${token}`,
|
|
478
|
+
'Content-Type': 'application/json',
|
|
479
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
480
|
+
},
|
|
481
|
+
body: body,
|
|
482
|
+
});
|
|
483
|
+
return response.body;
|
|
484
|
+
},
|
|
485
|
+
});
|
|
486
|
+
exports.PublicStageActivitiesController_createThread = (0, pieces_framework_1.createAction)({
|
|
487
|
+
name: 'PublicStageActivitiesController_createThread',
|
|
488
|
+
auth: auth_1.workbuddyAuth,
|
|
489
|
+
displayName: 'Create thread activity (Stages)',
|
|
490
|
+
description: '',
|
|
491
|
+
props: {
|
|
492
|
+
stageId: pieces_framework_1.Property.ShortText({
|
|
493
|
+
displayName: 'Stage Id',
|
|
494
|
+
description: 'Stage ID or stage number',
|
|
495
|
+
required: true,
|
|
496
|
+
}),
|
|
497
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
498
|
+
displayName: 'Job Id',
|
|
419
499
|
description: '',
|
|
500
|
+
required: true,
|
|
501
|
+
}),
|
|
502
|
+
body: pieces_framework_1.Property.ShortText({
|
|
503
|
+
displayName: 'Body',
|
|
504
|
+
description: 'Message body content (HTML supported for email)',
|
|
505
|
+
required: true,
|
|
506
|
+
}),
|
|
507
|
+
integrationType: pieces_framework_1.Property.ShortText({
|
|
508
|
+
displayName: 'Integration Type',
|
|
509
|
+
description: '',
|
|
510
|
+
required: true,
|
|
511
|
+
}),
|
|
512
|
+
sharing: pieces_framework_1.Property.Json({
|
|
513
|
+
displayName: 'Sharing',
|
|
514
|
+
description: 'Sharing options — control visibility to customer portal and field app',
|
|
420
515
|
required: false,
|
|
421
516
|
}),
|
|
422
517
|
},
|
|
423
518
|
async run(context) {
|
|
424
519
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
425
520
|
const baseUrl = context.auth.props.baseUrl;
|
|
426
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
427
|
-
const
|
|
521
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/thread`;
|
|
522
|
+
const rawBody = {
|
|
428
523
|
body: context.propsValue.body,
|
|
429
524
|
integrationType: context.propsValue.integrationType,
|
|
430
525
|
sharing: context.propsValue.sharing,
|
|
431
526
|
};
|
|
527
|
+
const body = rawBody;
|
|
432
528
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
433
529
|
method: pieces_common_1.HttpMethod.POST,
|
|
434
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
530
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/thread`,
|
|
435
531
|
headers: {
|
|
436
532
|
Authorization: `Bearer ${token}`,
|
|
437
533
|
'Content-Type': 'application/json',
|
|
@@ -442,4 +538,4 @@ exports.PublicStageActivitiesController_createIntegration = (0, pieces_framework
|
|
|
442
538
|
return response.body;
|
|
443
539
|
},
|
|
444
540
|
});
|
|
445
|
-
//# sourceMappingURL=stages
|
|
541
|
+
//# sourceMappingURL=stages-activities.js.map
|