@workbuddy/piece-workbuddy-edge 1.0.4 → 1.0.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 +1 -1
- package/src/index.js +83 -83
- package/src/index.js.map +1 -1
- package/src/index.ts +17 -17
- 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/index.d.ts +17 -17
- package/src/lib/actions/index.d.ts.map +1 -1
- package/src/lib/actions/index.js +17 -17
- package/src/lib/actions/index.js.map +1 -1
- package/src/lib/actions/index.ts +17 -17
- package/src/lib/actions/{jobs->-activities.d.ts → jobs-activities.d.ts} +1 -1
- package/src/lib/actions/jobs-activities.d.ts.map +1 -0
- package/src/lib/actions/{jobs->-activities.js → jobs-activities.js} +1 -1
- package/src/lib/actions/jobs-activities.js.map +1 -0
- 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} +1 -1
- package/src/lib/actions/jobs-contacts.js.map +1 -0
- 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} +1 -1
- package/src/lib/actions/jobs-files.js.map +1 -0
- package/src/lib/actions/{jobs->-tasks.d.ts → jobs-tasks.d.ts} +1 -1
- package/src/lib/actions/jobs-tasks.d.ts.map +1 -0
- package/src/lib/actions/{jobs->-tasks.js → jobs-tasks.js} +1 -1
- package/src/lib/actions/jobs-tasks.js.map +1 -0
- package/src/lib/actions/{stages->-activities.d.ts → stages-activities.d.ts} +1 -1
- package/src/lib/actions/stages-activities.d.ts.map +1 -0
- package/src/lib/actions/{stages->-activities.js → stages-activities.js} +1 -1
- package/src/lib/actions/{jobs->-activities.js.map → stages-activities.js.map} +1 -1
- package/src/lib/actions/{stages->-files.d.ts → stages-files.d.ts} +1 -1
- package/src/lib/actions/stages-files.d.ts.map +1 -0
- package/src/lib/actions/{stages->-files.js → stages-files.js} +1 -1
- package/src/lib/actions/stages-files.js.map +1 -0
- 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} +1 -1
- package/src/lib/actions/stages-resources.js.map +1 -0
- package/src/lib/actions/{stages->-tasks.d.ts → stages-tasks.d.ts} +1 -1
- package/src/lib/actions/stages-tasks.d.ts.map +1 -0
- package/src/lib/actions/{stages->-tasks.js → stages-tasks.js} +1 -1
- package/src/lib/actions/stages-tasks.js.map +1 -0
- 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/bill.d.ts +240 -48
- package/src/lib/triggers/bill.d.ts.map +1 -1
- package/src/lib/triggers/bill.js +288 -24
- package/src/lib/triggers/bill.js.map +1 -1
- package/src/lib/triggers/bill.ts +288 -24
- 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 +288 -24
- package/src/lib/triggers/invoice.js.map +1 -1
- package/src/lib/triggers/invoice.ts +288 -24
- 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 +768 -64
- package/src/lib/triggers/job.js.map +1 -1
- package/src/lib/triggers/job.ts +768 -64
- 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 +480 -40
- package/src/lib/triggers/lead.js.map +1 -1
- package/src/lib/triggers/lead.ts +480 -40
- 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 +384 -32
- package/src/lib/triggers/opportunity.js.map +1 -1
- package/src/lib/triggers/opportunity.ts +384 -32
- 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 +288 -24
- package/src/lib/triggers/quote.js.map +1 -1
- package/src/lib/triggers/quote.ts +288 -24
- 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 +576 -48
- package/src/lib/triggers/stage.js.map +1 -1
- package/src/lib/triggers/stage.ts +576 -48
- 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 +96 -8
- package/src/lib/triggers/task.js.map +1 -1
- package/src/lib/triggers/task.ts +96 -8
- 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->-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
- /package/src/lib/actions/{jobs->-activities.ts → jobs-activities.ts} +0 -0
- /package/src/lib/actions/{jobs->-contacts.ts → jobs-contacts.ts} +0 -0
- /package/src/lib/actions/{jobs->-files.ts → jobs-files.ts} +0 -0
- /package/src/lib/actions/{jobs->-tasks.ts → jobs-tasks.ts} +0 -0
- /package/src/lib/actions/{stages->-activities.ts → stages-activities.ts} +0 -0
- /package/src/lib/actions/{stages->-files.ts → stages-files.ts} +0 -0
- /package/src/lib/actions/{stages->-resources.ts → stages-resources.ts} +0 -0
- /package/src/lib/actions/{stages->-tasks.ts → stages-tasks.ts} +0 -0
|
@@ -10,30 +10,140 @@ exports.stage_created_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
10
10
|
displayName: 'Stage Created',
|
|
11
11
|
description: 'Triggered when a new stage is created',
|
|
12
12
|
props: {
|
|
13
|
-
customer: pieces_framework_1.Property.
|
|
13
|
+
customer: pieces_framework_1.Property.MultiSelectDropdown({
|
|
14
14
|
displayName: 'Filter by Customer',
|
|
15
|
-
description: 'Only trigger for specific customer
|
|
15
|
+
description: 'Only trigger for specific customer',
|
|
16
16
|
required: false,
|
|
17
|
+
auth: auth_1.workbuddyAuth,
|
|
18
|
+
refreshers: [],
|
|
19
|
+
options: async ({ auth }) => {
|
|
20
|
+
const authValue = auth;
|
|
21
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
22
|
+
const baseUrl = authValue.props.baseUrl;
|
|
23
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
24
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
25
|
+
url: `${baseUrl}/api/v2/public/customers`,
|
|
26
|
+
headers: {
|
|
27
|
+
Authorization: `Bearer ${token}`,
|
|
28
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
const items = response.body?.items || [];
|
|
32
|
+
return {
|
|
33
|
+
options: items.map((item) => ({
|
|
34
|
+
label: item.name,
|
|
35
|
+
value: item.id,
|
|
36
|
+
})),
|
|
37
|
+
};
|
|
38
|
+
},
|
|
17
39
|
}),
|
|
18
|
-
billingCompany: pieces_framework_1.Property.
|
|
40
|
+
billingCompany: pieces_framework_1.Property.MultiSelectDropdown({
|
|
19
41
|
displayName: 'Filter by Billing Company',
|
|
20
|
-
description: 'Only trigger for specific billing company
|
|
42
|
+
description: 'Only trigger for specific billing company',
|
|
21
43
|
required: false,
|
|
44
|
+
auth: auth_1.workbuddyAuth,
|
|
45
|
+
refreshers: [],
|
|
46
|
+
options: async ({ auth }) => {
|
|
47
|
+
const authValue = auth;
|
|
48
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
49
|
+
const baseUrl = authValue.props.baseUrl;
|
|
50
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
51
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
52
|
+
url: `${baseUrl}/api/v2/public/companies`,
|
|
53
|
+
headers: {
|
|
54
|
+
Authorization: `Bearer ${token}`,
|
|
55
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
const items = response.body?.items || [];
|
|
59
|
+
return {
|
|
60
|
+
options: items.map((item) => ({
|
|
61
|
+
label: item.name,
|
|
62
|
+
value: item.id,
|
|
63
|
+
})),
|
|
64
|
+
};
|
|
65
|
+
},
|
|
22
66
|
}),
|
|
23
|
-
tag: pieces_framework_1.Property.
|
|
67
|
+
tag: pieces_framework_1.Property.MultiSelectDropdown({
|
|
24
68
|
displayName: 'Filter by Tags',
|
|
25
|
-
description: 'Only trigger for specific tags
|
|
69
|
+
description: 'Only trigger for specific tags',
|
|
26
70
|
required: false,
|
|
71
|
+
auth: auth_1.workbuddyAuth,
|
|
72
|
+
refreshers: [],
|
|
73
|
+
options: async ({ auth }) => {
|
|
74
|
+
const authValue = auth;
|
|
75
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
76
|
+
const baseUrl = authValue.props.baseUrl;
|
|
77
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
78
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
79
|
+
url: `${baseUrl}/api/v2/public/settings/tags`,
|
|
80
|
+
headers: {
|
|
81
|
+
Authorization: `Bearer ${token}`,
|
|
82
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
const items = response.body?.items || [];
|
|
86
|
+
return {
|
|
87
|
+
options: items.map((item) => ({
|
|
88
|
+
label: item.name,
|
|
89
|
+
value: item.id,
|
|
90
|
+
})),
|
|
91
|
+
};
|
|
92
|
+
},
|
|
27
93
|
}),
|
|
28
|
-
resource: pieces_framework_1.Property.
|
|
94
|
+
resource: pieces_framework_1.Property.MultiSelectDropdown({
|
|
29
95
|
displayName: 'Filter by Resource',
|
|
30
|
-
description: 'Only trigger for specific resource
|
|
96
|
+
description: 'Only trigger for specific resource',
|
|
31
97
|
required: false,
|
|
98
|
+
auth: auth_1.workbuddyAuth,
|
|
99
|
+
refreshers: [],
|
|
100
|
+
options: async ({ auth }) => {
|
|
101
|
+
const authValue = auth;
|
|
102
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
103
|
+
const baseUrl = authValue.props.baseUrl;
|
|
104
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
105
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
106
|
+
url: `${baseUrl}/api/v2/public/employees`,
|
|
107
|
+
headers: {
|
|
108
|
+
Authorization: `Bearer ${token}`,
|
|
109
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
const items = response.body?.items || [];
|
|
113
|
+
return {
|
|
114
|
+
options: items.map((item) => ({
|
|
115
|
+
label: item.name,
|
|
116
|
+
value: item.id,
|
|
117
|
+
})),
|
|
118
|
+
};
|
|
119
|
+
},
|
|
32
120
|
}),
|
|
33
|
-
workCategory: pieces_framework_1.Property.
|
|
121
|
+
workCategory: pieces_framework_1.Property.MultiSelectDropdown({
|
|
34
122
|
displayName: 'Filter by Work Category',
|
|
35
|
-
description: 'Only trigger for specific work category
|
|
123
|
+
description: 'Only trigger for specific work category',
|
|
36
124
|
required: false,
|
|
125
|
+
auth: auth_1.workbuddyAuth,
|
|
126
|
+
refreshers: [],
|
|
127
|
+
options: async ({ auth }) => {
|
|
128
|
+
const authValue = auth;
|
|
129
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
130
|
+
const baseUrl = authValue.props.baseUrl;
|
|
131
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
132
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
133
|
+
url: `${baseUrl}/api/v2/public/settings/work-types`,
|
|
134
|
+
headers: {
|
|
135
|
+
Authorization: `Bearer ${token}`,
|
|
136
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
const items = response.body?.items || [];
|
|
140
|
+
return {
|
|
141
|
+
options: items.map((item) => ({
|
|
142
|
+
label: item.name,
|
|
143
|
+
value: item.id,
|
|
144
|
+
})),
|
|
145
|
+
};
|
|
146
|
+
},
|
|
37
147
|
}),
|
|
38
148
|
stageStatus: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
39
149
|
displayName: 'Filter by Status',
|
|
@@ -49,10 +159,32 @@ exports.stage_created_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
49
159
|
],
|
|
50
160
|
},
|
|
51
161
|
}),
|
|
52
|
-
schedulingTag: pieces_framework_1.Property.
|
|
162
|
+
schedulingTag: pieces_framework_1.Property.MultiSelectDropdown({
|
|
53
163
|
displayName: 'Filter by Scheduling Tag',
|
|
54
|
-
description: 'Only trigger for specific scheduling tag
|
|
164
|
+
description: 'Only trigger for specific scheduling tag',
|
|
55
165
|
required: false,
|
|
166
|
+
auth: auth_1.workbuddyAuth,
|
|
167
|
+
refreshers: [],
|
|
168
|
+
options: async ({ auth }) => {
|
|
169
|
+
const authValue = auth;
|
|
170
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
171
|
+
const baseUrl = authValue.props.baseUrl;
|
|
172
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
173
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
174
|
+
url: `${baseUrl}/api/v2/public/settings/tags?type=scheduling`,
|
|
175
|
+
headers: {
|
|
176
|
+
Authorization: `Bearer ${token}`,
|
|
177
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
const items = response.body?.items || [];
|
|
181
|
+
return {
|
|
182
|
+
options: items.map((item) => ({
|
|
183
|
+
label: item.name,
|
|
184
|
+
value: item.id,
|
|
185
|
+
})),
|
|
186
|
+
};
|
|
187
|
+
},
|
|
56
188
|
}),
|
|
57
189
|
},
|
|
58
190
|
sampleData: {
|
|
@@ -182,30 +314,140 @@ exports.stage_updated_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
182
314
|
displayName: 'Stage Updated',
|
|
183
315
|
description: 'Triggered when a stage is updated',
|
|
184
316
|
props: {
|
|
185
|
-
customer: pieces_framework_1.Property.
|
|
317
|
+
customer: pieces_framework_1.Property.MultiSelectDropdown({
|
|
186
318
|
displayName: 'Filter by Customer',
|
|
187
|
-
description: 'Only trigger for specific customer
|
|
319
|
+
description: 'Only trigger for specific customer',
|
|
188
320
|
required: false,
|
|
321
|
+
auth: auth_1.workbuddyAuth,
|
|
322
|
+
refreshers: [],
|
|
323
|
+
options: async ({ auth }) => {
|
|
324
|
+
const authValue = auth;
|
|
325
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
326
|
+
const baseUrl = authValue.props.baseUrl;
|
|
327
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
328
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
329
|
+
url: `${baseUrl}/api/v2/public/customers`,
|
|
330
|
+
headers: {
|
|
331
|
+
Authorization: `Bearer ${token}`,
|
|
332
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
333
|
+
},
|
|
334
|
+
});
|
|
335
|
+
const items = response.body?.items || [];
|
|
336
|
+
return {
|
|
337
|
+
options: items.map((item) => ({
|
|
338
|
+
label: item.name,
|
|
339
|
+
value: item.id,
|
|
340
|
+
})),
|
|
341
|
+
};
|
|
342
|
+
},
|
|
189
343
|
}),
|
|
190
|
-
billingCompany: pieces_framework_1.Property.
|
|
344
|
+
billingCompany: pieces_framework_1.Property.MultiSelectDropdown({
|
|
191
345
|
displayName: 'Filter by Billing Company',
|
|
192
|
-
description: 'Only trigger for specific billing company
|
|
346
|
+
description: 'Only trigger for specific billing company',
|
|
193
347
|
required: false,
|
|
348
|
+
auth: auth_1.workbuddyAuth,
|
|
349
|
+
refreshers: [],
|
|
350
|
+
options: async ({ auth }) => {
|
|
351
|
+
const authValue = auth;
|
|
352
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
353
|
+
const baseUrl = authValue.props.baseUrl;
|
|
354
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
355
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
356
|
+
url: `${baseUrl}/api/v2/public/companies`,
|
|
357
|
+
headers: {
|
|
358
|
+
Authorization: `Bearer ${token}`,
|
|
359
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
360
|
+
},
|
|
361
|
+
});
|
|
362
|
+
const items = response.body?.items || [];
|
|
363
|
+
return {
|
|
364
|
+
options: items.map((item) => ({
|
|
365
|
+
label: item.name,
|
|
366
|
+
value: item.id,
|
|
367
|
+
})),
|
|
368
|
+
};
|
|
369
|
+
},
|
|
194
370
|
}),
|
|
195
|
-
tag: pieces_framework_1.Property.
|
|
371
|
+
tag: pieces_framework_1.Property.MultiSelectDropdown({
|
|
196
372
|
displayName: 'Filter by Tags',
|
|
197
|
-
description: 'Only trigger for specific tags
|
|
373
|
+
description: 'Only trigger for specific tags',
|
|
198
374
|
required: false,
|
|
375
|
+
auth: auth_1.workbuddyAuth,
|
|
376
|
+
refreshers: [],
|
|
377
|
+
options: async ({ auth }) => {
|
|
378
|
+
const authValue = auth;
|
|
379
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
380
|
+
const baseUrl = authValue.props.baseUrl;
|
|
381
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
382
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
383
|
+
url: `${baseUrl}/api/v2/public/settings/tags`,
|
|
384
|
+
headers: {
|
|
385
|
+
Authorization: `Bearer ${token}`,
|
|
386
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
387
|
+
},
|
|
388
|
+
});
|
|
389
|
+
const items = response.body?.items || [];
|
|
390
|
+
return {
|
|
391
|
+
options: items.map((item) => ({
|
|
392
|
+
label: item.name,
|
|
393
|
+
value: item.id,
|
|
394
|
+
})),
|
|
395
|
+
};
|
|
396
|
+
},
|
|
199
397
|
}),
|
|
200
|
-
resource: pieces_framework_1.Property.
|
|
398
|
+
resource: pieces_framework_1.Property.MultiSelectDropdown({
|
|
201
399
|
displayName: 'Filter by Resource',
|
|
202
|
-
description: 'Only trigger for specific resource
|
|
400
|
+
description: 'Only trigger for specific resource',
|
|
203
401
|
required: false,
|
|
402
|
+
auth: auth_1.workbuddyAuth,
|
|
403
|
+
refreshers: [],
|
|
404
|
+
options: async ({ auth }) => {
|
|
405
|
+
const authValue = auth;
|
|
406
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
407
|
+
const baseUrl = authValue.props.baseUrl;
|
|
408
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
409
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
410
|
+
url: `${baseUrl}/api/v2/public/employees`,
|
|
411
|
+
headers: {
|
|
412
|
+
Authorization: `Bearer ${token}`,
|
|
413
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
414
|
+
},
|
|
415
|
+
});
|
|
416
|
+
const items = response.body?.items || [];
|
|
417
|
+
return {
|
|
418
|
+
options: items.map((item) => ({
|
|
419
|
+
label: item.name,
|
|
420
|
+
value: item.id,
|
|
421
|
+
})),
|
|
422
|
+
};
|
|
423
|
+
},
|
|
204
424
|
}),
|
|
205
|
-
workCategory: pieces_framework_1.Property.
|
|
425
|
+
workCategory: pieces_framework_1.Property.MultiSelectDropdown({
|
|
206
426
|
displayName: 'Filter by Work Category',
|
|
207
|
-
description: 'Only trigger for specific work category
|
|
427
|
+
description: 'Only trigger for specific work category',
|
|
208
428
|
required: false,
|
|
429
|
+
auth: auth_1.workbuddyAuth,
|
|
430
|
+
refreshers: [],
|
|
431
|
+
options: async ({ auth }) => {
|
|
432
|
+
const authValue = auth;
|
|
433
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
434
|
+
const baseUrl = authValue.props.baseUrl;
|
|
435
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
436
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
437
|
+
url: `${baseUrl}/api/v2/public/settings/work-types`,
|
|
438
|
+
headers: {
|
|
439
|
+
Authorization: `Bearer ${token}`,
|
|
440
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
441
|
+
},
|
|
442
|
+
});
|
|
443
|
+
const items = response.body?.items || [];
|
|
444
|
+
return {
|
|
445
|
+
options: items.map((item) => ({
|
|
446
|
+
label: item.name,
|
|
447
|
+
value: item.id,
|
|
448
|
+
})),
|
|
449
|
+
};
|
|
450
|
+
},
|
|
209
451
|
}),
|
|
210
452
|
stageStatus: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
211
453
|
displayName: 'Filter by Status',
|
|
@@ -221,10 +463,32 @@ exports.stage_updated_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
221
463
|
],
|
|
222
464
|
},
|
|
223
465
|
}),
|
|
224
|
-
schedulingTag: pieces_framework_1.Property.
|
|
466
|
+
schedulingTag: pieces_framework_1.Property.MultiSelectDropdown({
|
|
225
467
|
displayName: 'Filter by Scheduling Tag',
|
|
226
|
-
description: 'Only trigger for specific scheduling tag
|
|
468
|
+
description: 'Only trigger for specific scheduling tag',
|
|
227
469
|
required: false,
|
|
470
|
+
auth: auth_1.workbuddyAuth,
|
|
471
|
+
refreshers: [],
|
|
472
|
+
options: async ({ auth }) => {
|
|
473
|
+
const authValue = auth;
|
|
474
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
475
|
+
const baseUrl = authValue.props.baseUrl;
|
|
476
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
477
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
478
|
+
url: `${baseUrl}/api/v2/public/settings/tags?type=scheduling`,
|
|
479
|
+
headers: {
|
|
480
|
+
Authorization: `Bearer ${token}`,
|
|
481
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
482
|
+
},
|
|
483
|
+
});
|
|
484
|
+
const items = response.body?.items || [];
|
|
485
|
+
return {
|
|
486
|
+
options: items.map((item) => ({
|
|
487
|
+
label: item.name,
|
|
488
|
+
value: item.id,
|
|
489
|
+
})),
|
|
490
|
+
};
|
|
491
|
+
},
|
|
228
492
|
}),
|
|
229
493
|
},
|
|
230
494
|
sampleData: {
|
|
@@ -354,30 +618,140 @@ exports.stage_status_changed_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
354
618
|
displayName: 'Stage Status Changed',
|
|
355
619
|
description: 'Triggered when a stage status changes',
|
|
356
620
|
props: {
|
|
357
|
-
customer: pieces_framework_1.Property.
|
|
621
|
+
customer: pieces_framework_1.Property.MultiSelectDropdown({
|
|
358
622
|
displayName: 'Filter by Customer',
|
|
359
|
-
description: 'Only trigger for specific customer
|
|
623
|
+
description: 'Only trigger for specific customer',
|
|
360
624
|
required: false,
|
|
625
|
+
auth: auth_1.workbuddyAuth,
|
|
626
|
+
refreshers: [],
|
|
627
|
+
options: async ({ auth }) => {
|
|
628
|
+
const authValue = auth;
|
|
629
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
630
|
+
const baseUrl = authValue.props.baseUrl;
|
|
631
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
632
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
633
|
+
url: `${baseUrl}/api/v2/public/customers`,
|
|
634
|
+
headers: {
|
|
635
|
+
Authorization: `Bearer ${token}`,
|
|
636
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
637
|
+
},
|
|
638
|
+
});
|
|
639
|
+
const items = response.body?.items || [];
|
|
640
|
+
return {
|
|
641
|
+
options: items.map((item) => ({
|
|
642
|
+
label: item.name,
|
|
643
|
+
value: item.id,
|
|
644
|
+
})),
|
|
645
|
+
};
|
|
646
|
+
},
|
|
361
647
|
}),
|
|
362
|
-
billingCompany: pieces_framework_1.Property.
|
|
648
|
+
billingCompany: pieces_framework_1.Property.MultiSelectDropdown({
|
|
363
649
|
displayName: 'Filter by Billing Company',
|
|
364
|
-
description: 'Only trigger for specific billing company
|
|
650
|
+
description: 'Only trigger for specific billing company',
|
|
365
651
|
required: false,
|
|
652
|
+
auth: auth_1.workbuddyAuth,
|
|
653
|
+
refreshers: [],
|
|
654
|
+
options: async ({ auth }) => {
|
|
655
|
+
const authValue = auth;
|
|
656
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
657
|
+
const baseUrl = authValue.props.baseUrl;
|
|
658
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
659
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
660
|
+
url: `${baseUrl}/api/v2/public/companies`,
|
|
661
|
+
headers: {
|
|
662
|
+
Authorization: `Bearer ${token}`,
|
|
663
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
664
|
+
},
|
|
665
|
+
});
|
|
666
|
+
const items = response.body?.items || [];
|
|
667
|
+
return {
|
|
668
|
+
options: items.map((item) => ({
|
|
669
|
+
label: item.name,
|
|
670
|
+
value: item.id,
|
|
671
|
+
})),
|
|
672
|
+
};
|
|
673
|
+
},
|
|
366
674
|
}),
|
|
367
|
-
tag: pieces_framework_1.Property.
|
|
675
|
+
tag: pieces_framework_1.Property.MultiSelectDropdown({
|
|
368
676
|
displayName: 'Filter by Tags',
|
|
369
|
-
description: 'Only trigger for specific tags
|
|
677
|
+
description: 'Only trigger for specific tags',
|
|
370
678
|
required: false,
|
|
679
|
+
auth: auth_1.workbuddyAuth,
|
|
680
|
+
refreshers: [],
|
|
681
|
+
options: async ({ auth }) => {
|
|
682
|
+
const authValue = auth;
|
|
683
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
684
|
+
const baseUrl = authValue.props.baseUrl;
|
|
685
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
686
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
687
|
+
url: `${baseUrl}/api/v2/public/settings/tags`,
|
|
688
|
+
headers: {
|
|
689
|
+
Authorization: `Bearer ${token}`,
|
|
690
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
691
|
+
},
|
|
692
|
+
});
|
|
693
|
+
const items = response.body?.items || [];
|
|
694
|
+
return {
|
|
695
|
+
options: items.map((item) => ({
|
|
696
|
+
label: item.name,
|
|
697
|
+
value: item.id,
|
|
698
|
+
})),
|
|
699
|
+
};
|
|
700
|
+
},
|
|
371
701
|
}),
|
|
372
|
-
resource: pieces_framework_1.Property.
|
|
702
|
+
resource: pieces_framework_1.Property.MultiSelectDropdown({
|
|
373
703
|
displayName: 'Filter by Resource',
|
|
374
|
-
description: 'Only trigger for specific resource
|
|
704
|
+
description: 'Only trigger for specific resource',
|
|
375
705
|
required: false,
|
|
706
|
+
auth: auth_1.workbuddyAuth,
|
|
707
|
+
refreshers: [],
|
|
708
|
+
options: async ({ auth }) => {
|
|
709
|
+
const authValue = auth;
|
|
710
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
711
|
+
const baseUrl = authValue.props.baseUrl;
|
|
712
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
713
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
714
|
+
url: `${baseUrl}/api/v2/public/employees`,
|
|
715
|
+
headers: {
|
|
716
|
+
Authorization: `Bearer ${token}`,
|
|
717
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
718
|
+
},
|
|
719
|
+
});
|
|
720
|
+
const items = response.body?.items || [];
|
|
721
|
+
return {
|
|
722
|
+
options: items.map((item) => ({
|
|
723
|
+
label: item.name,
|
|
724
|
+
value: item.id,
|
|
725
|
+
})),
|
|
726
|
+
};
|
|
727
|
+
},
|
|
376
728
|
}),
|
|
377
|
-
workCategory: pieces_framework_1.Property.
|
|
729
|
+
workCategory: pieces_framework_1.Property.MultiSelectDropdown({
|
|
378
730
|
displayName: 'Filter by Work Category',
|
|
379
|
-
description: 'Only trigger for specific work category
|
|
731
|
+
description: 'Only trigger for specific work category',
|
|
380
732
|
required: false,
|
|
733
|
+
auth: auth_1.workbuddyAuth,
|
|
734
|
+
refreshers: [],
|
|
735
|
+
options: async ({ auth }) => {
|
|
736
|
+
const authValue = auth;
|
|
737
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
738
|
+
const baseUrl = authValue.props.baseUrl;
|
|
739
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
740
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
741
|
+
url: `${baseUrl}/api/v2/public/settings/work-types`,
|
|
742
|
+
headers: {
|
|
743
|
+
Authorization: `Bearer ${token}`,
|
|
744
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
745
|
+
},
|
|
746
|
+
});
|
|
747
|
+
const items = response.body?.items || [];
|
|
748
|
+
return {
|
|
749
|
+
options: items.map((item) => ({
|
|
750
|
+
label: item.name,
|
|
751
|
+
value: item.id,
|
|
752
|
+
})),
|
|
753
|
+
};
|
|
754
|
+
},
|
|
381
755
|
}),
|
|
382
756
|
stageStatus: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
383
757
|
displayName: 'Filter by Status',
|
|
@@ -393,10 +767,32 @@ exports.stage_status_changed_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
393
767
|
],
|
|
394
768
|
},
|
|
395
769
|
}),
|
|
396
|
-
schedulingTag: pieces_framework_1.Property.
|
|
770
|
+
schedulingTag: pieces_framework_1.Property.MultiSelectDropdown({
|
|
397
771
|
displayName: 'Filter by Scheduling Tag',
|
|
398
|
-
description: 'Only trigger for specific scheduling tag
|
|
772
|
+
description: 'Only trigger for specific scheduling tag',
|
|
399
773
|
required: false,
|
|
774
|
+
auth: auth_1.workbuddyAuth,
|
|
775
|
+
refreshers: [],
|
|
776
|
+
options: async ({ auth }) => {
|
|
777
|
+
const authValue = auth;
|
|
778
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
779
|
+
const baseUrl = authValue.props.baseUrl;
|
|
780
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
781
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
782
|
+
url: `${baseUrl}/api/v2/public/settings/tags?type=scheduling`,
|
|
783
|
+
headers: {
|
|
784
|
+
Authorization: `Bearer ${token}`,
|
|
785
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
786
|
+
},
|
|
787
|
+
});
|
|
788
|
+
const items = response.body?.items || [];
|
|
789
|
+
return {
|
|
790
|
+
options: items.map((item) => ({
|
|
791
|
+
label: item.name,
|
|
792
|
+
value: item.id,
|
|
793
|
+
})),
|
|
794
|
+
};
|
|
795
|
+
},
|
|
400
796
|
}),
|
|
401
797
|
},
|
|
402
798
|
sampleData: {
|
|
@@ -526,30 +922,140 @@ exports.stage_deleted_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
526
922
|
displayName: 'Stage Deleted',
|
|
527
923
|
description: 'Triggered when a stage is deleted',
|
|
528
924
|
props: {
|
|
529
|
-
customer: pieces_framework_1.Property.
|
|
925
|
+
customer: pieces_framework_1.Property.MultiSelectDropdown({
|
|
530
926
|
displayName: 'Filter by Customer',
|
|
531
|
-
description: 'Only trigger for specific customer
|
|
927
|
+
description: 'Only trigger for specific customer',
|
|
532
928
|
required: false,
|
|
929
|
+
auth: auth_1.workbuddyAuth,
|
|
930
|
+
refreshers: [],
|
|
931
|
+
options: async ({ auth }) => {
|
|
932
|
+
const authValue = auth;
|
|
933
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
934
|
+
const baseUrl = authValue.props.baseUrl;
|
|
935
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
936
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
937
|
+
url: `${baseUrl}/api/v2/public/customers`,
|
|
938
|
+
headers: {
|
|
939
|
+
Authorization: `Bearer ${token}`,
|
|
940
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
941
|
+
},
|
|
942
|
+
});
|
|
943
|
+
const items = response.body?.items || [];
|
|
944
|
+
return {
|
|
945
|
+
options: items.map((item) => ({
|
|
946
|
+
label: item.name,
|
|
947
|
+
value: item.id,
|
|
948
|
+
})),
|
|
949
|
+
};
|
|
950
|
+
},
|
|
533
951
|
}),
|
|
534
|
-
billingCompany: pieces_framework_1.Property.
|
|
952
|
+
billingCompany: pieces_framework_1.Property.MultiSelectDropdown({
|
|
535
953
|
displayName: 'Filter by Billing Company',
|
|
536
|
-
description: 'Only trigger for specific billing company
|
|
954
|
+
description: 'Only trigger for specific billing company',
|
|
537
955
|
required: false,
|
|
956
|
+
auth: auth_1.workbuddyAuth,
|
|
957
|
+
refreshers: [],
|
|
958
|
+
options: async ({ auth }) => {
|
|
959
|
+
const authValue = auth;
|
|
960
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
961
|
+
const baseUrl = authValue.props.baseUrl;
|
|
962
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
963
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
964
|
+
url: `${baseUrl}/api/v2/public/companies`,
|
|
965
|
+
headers: {
|
|
966
|
+
Authorization: `Bearer ${token}`,
|
|
967
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
968
|
+
},
|
|
969
|
+
});
|
|
970
|
+
const items = response.body?.items || [];
|
|
971
|
+
return {
|
|
972
|
+
options: items.map((item) => ({
|
|
973
|
+
label: item.name,
|
|
974
|
+
value: item.id,
|
|
975
|
+
})),
|
|
976
|
+
};
|
|
977
|
+
},
|
|
538
978
|
}),
|
|
539
|
-
tag: pieces_framework_1.Property.
|
|
979
|
+
tag: pieces_framework_1.Property.MultiSelectDropdown({
|
|
540
980
|
displayName: 'Filter by Tags',
|
|
541
|
-
description: 'Only trigger for specific tags
|
|
981
|
+
description: 'Only trigger for specific tags',
|
|
542
982
|
required: false,
|
|
983
|
+
auth: auth_1.workbuddyAuth,
|
|
984
|
+
refreshers: [],
|
|
985
|
+
options: async ({ auth }) => {
|
|
986
|
+
const authValue = auth;
|
|
987
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
988
|
+
const baseUrl = authValue.props.baseUrl;
|
|
989
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
990
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
991
|
+
url: `${baseUrl}/api/v2/public/settings/tags`,
|
|
992
|
+
headers: {
|
|
993
|
+
Authorization: `Bearer ${token}`,
|
|
994
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
995
|
+
},
|
|
996
|
+
});
|
|
997
|
+
const items = response.body?.items || [];
|
|
998
|
+
return {
|
|
999
|
+
options: items.map((item) => ({
|
|
1000
|
+
label: item.name,
|
|
1001
|
+
value: item.id,
|
|
1002
|
+
})),
|
|
1003
|
+
};
|
|
1004
|
+
},
|
|
543
1005
|
}),
|
|
544
|
-
resource: pieces_framework_1.Property.
|
|
1006
|
+
resource: pieces_framework_1.Property.MultiSelectDropdown({
|
|
545
1007
|
displayName: 'Filter by Resource',
|
|
546
|
-
description: 'Only trigger for specific resource
|
|
1008
|
+
description: 'Only trigger for specific resource',
|
|
547
1009
|
required: false,
|
|
1010
|
+
auth: auth_1.workbuddyAuth,
|
|
1011
|
+
refreshers: [],
|
|
1012
|
+
options: async ({ auth }) => {
|
|
1013
|
+
const authValue = auth;
|
|
1014
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
1015
|
+
const baseUrl = authValue.props.baseUrl;
|
|
1016
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
1017
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
1018
|
+
url: `${baseUrl}/api/v2/public/employees`,
|
|
1019
|
+
headers: {
|
|
1020
|
+
Authorization: `Bearer ${token}`,
|
|
1021
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
1022
|
+
},
|
|
1023
|
+
});
|
|
1024
|
+
const items = response.body?.items || [];
|
|
1025
|
+
return {
|
|
1026
|
+
options: items.map((item) => ({
|
|
1027
|
+
label: item.name,
|
|
1028
|
+
value: item.id,
|
|
1029
|
+
})),
|
|
1030
|
+
};
|
|
1031
|
+
},
|
|
548
1032
|
}),
|
|
549
|
-
workCategory: pieces_framework_1.Property.
|
|
1033
|
+
workCategory: pieces_framework_1.Property.MultiSelectDropdown({
|
|
550
1034
|
displayName: 'Filter by Work Category',
|
|
551
|
-
description: 'Only trigger for specific work category
|
|
1035
|
+
description: 'Only trigger for specific work category',
|
|
552
1036
|
required: false,
|
|
1037
|
+
auth: auth_1.workbuddyAuth,
|
|
1038
|
+
refreshers: [],
|
|
1039
|
+
options: async ({ auth }) => {
|
|
1040
|
+
const authValue = auth;
|
|
1041
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
1042
|
+
const baseUrl = authValue.props.baseUrl;
|
|
1043
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
1044
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
1045
|
+
url: `${baseUrl}/api/v2/public/settings/work-types`,
|
|
1046
|
+
headers: {
|
|
1047
|
+
Authorization: `Bearer ${token}`,
|
|
1048
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
1049
|
+
},
|
|
1050
|
+
});
|
|
1051
|
+
const items = response.body?.items || [];
|
|
1052
|
+
return {
|
|
1053
|
+
options: items.map((item) => ({
|
|
1054
|
+
label: item.name,
|
|
1055
|
+
value: item.id,
|
|
1056
|
+
})),
|
|
1057
|
+
};
|
|
1058
|
+
},
|
|
553
1059
|
}),
|
|
554
1060
|
stageStatus: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
555
1061
|
displayName: 'Filter by Status',
|
|
@@ -565,10 +1071,32 @@ exports.stage_deleted_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
565
1071
|
],
|
|
566
1072
|
},
|
|
567
1073
|
}),
|
|
568
|
-
schedulingTag: pieces_framework_1.Property.
|
|
1074
|
+
schedulingTag: pieces_framework_1.Property.MultiSelectDropdown({
|
|
569
1075
|
displayName: 'Filter by Scheduling Tag',
|
|
570
|
-
description: 'Only trigger for specific scheduling tag
|
|
1076
|
+
description: 'Only trigger for specific scheduling tag',
|
|
571
1077
|
required: false,
|
|
1078
|
+
auth: auth_1.workbuddyAuth,
|
|
1079
|
+
refreshers: [],
|
|
1080
|
+
options: async ({ auth }) => {
|
|
1081
|
+
const authValue = auth;
|
|
1082
|
+
const token = await (0, auth_1.getAccessToken)(authValue);
|
|
1083
|
+
const baseUrl = authValue.props.baseUrl;
|
|
1084
|
+
const response = await pieces_common_1.httpClient.sendRequest({
|
|
1085
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
1086
|
+
url: `${baseUrl}/api/v2/public/settings/tags?type=scheduling`,
|
|
1087
|
+
headers: {
|
|
1088
|
+
Authorization: `Bearer ${token}`,
|
|
1089
|
+
'X-WorkBuddy-Version': '2026-01',
|
|
1090
|
+
},
|
|
1091
|
+
});
|
|
1092
|
+
const items = response.body?.items || [];
|
|
1093
|
+
return {
|
|
1094
|
+
options: items.map((item) => ({
|
|
1095
|
+
label: item.name,
|
|
1096
|
+
value: item.id,
|
|
1097
|
+
})),
|
|
1098
|
+
};
|
|
1099
|
+
},
|
|
572
1100
|
}),
|
|
573
1101
|
},
|
|
574
1102
|
sampleData: {
|