@workbuddy/piece-workbuddy-vnext 1.0.0 → 1.0.2
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 +2 -2
- package/src/lib/actions/jobs.d.ts +2 -2
- package/src/lib/actions/jobs.d.ts.map +1 -1
- package/src/lib/actions/jobs.js +24 -4
- package/src/lib/actions/jobs.js.map +1 -1
- package/src/lib/actions/jobs.ts +24 -4
- package/src/lib/triggers/activity.d.ts +24 -12
- package/src/lib/triggers/activity.d.ts.map +1 -1
- package/src/lib/triggers/activity.js +45 -21
- package/src/lib/triggers/activity.js.map +1 -1
- package/src/lib/triggers/activity.ts +39 -24
- package/src/lib/triggers/bill.d.ts +64 -16
- package/src/lib/triggers/bill.d.ts.map +1 -1
- package/src/lib/triggers/bill.js +152 -28
- package/src/lib/triggers/bill.js.map +1 -1
- package/src/lib/triggers/bill.ts +136 -32
- package/src/lib/triggers/invoice.d.ts +64 -16
- package/src/lib/triggers/invoice.d.ts.map +1 -1
- package/src/lib/triggers/invoice.js +152 -28
- package/src/lib/triggers/invoice.js.map +1 -1
- package/src/lib/triggers/invoice.ts +136 -32
- package/src/lib/triggers/job.d.ts +144 -16
- package/src/lib/triggers/job.d.ts.map +1 -1
- package/src/lib/triggers/job.js +292 -28
- package/src/lib/triggers/job.js.map +1 -1
- package/src/lib/triggers/job.ts +256 -32
- package/src/lib/triggers/lead.d.ts +112 -16
- package/src/lib/triggers/lead.d.ts.map +1 -1
- package/src/lib/triggers/lead.js +200 -28
- package/src/lib/triggers/lead.js.map +1 -1
- package/src/lib/triggers/lead.ts +172 -32
- package/src/lib/triggers/opportunity.d.ts +80 -16
- package/src/lib/triggers/opportunity.d.ts.map +1 -1
- package/src/lib/triggers/opportunity.js +144 -28
- package/src/lib/triggers/opportunity.js.map +1 -1
- package/src/lib/triggers/opportunity.ts +124 -32
- package/src/lib/triggers/quote.d.ts +64 -16
- package/src/lib/triggers/quote.d.ts.map +1 -1
- package/src/lib/triggers/quote.js +152 -28
- package/src/lib/triggers/quote.js.map +1 -1
- package/src/lib/triggers/quote.ts +136 -32
- package/src/lib/triggers/stage.d.ts +112 -16
- package/src/lib/triggers/stage.d.ts.map +1 -1
- package/src/lib/triggers/stage.js +236 -28
- package/src/lib/triggers/stage.js.map +1 -1
- package/src/lib/triggers/stage.ts +212 -32
- package/src/lib/triggers/task.d.ts +16 -16
- package/src/lib/triggers/task.d.ts.map +1 -1
- package/src/lib/triggers/task.js +32 -28
- package/src/lib/triggers/task.js.map +1 -1
- package/src/lib/triggers/task.ts +28 -32
- package/src/lib/actions/mcp-context.d.ts +0 -16
- package/src/lib/actions/mcp-context.d.ts.map +0 -1
- package/src/lib/actions/mcp-context.js +0 -82
- package/src/lib/actions/mcp-context.js.map +0 -1
- package/src/lib/actions/mcp-context.ts +0 -86
- package/src/lib/actions/webhooks.d.ts +0 -48
- package/src/lib/actions/webhooks.d.ts.map +0 -1
- package/src/lib/actions/webhooks.js +0 -292
- package/src/lib/actions/webhooks.js.map +0 -1
- package/src/lib/actions/webhooks.ts +0 -318
- package/src/lib/triggers/allocation.d.ts +0 -53
- package/src/lib/triggers/allocation.d.ts.map +0 -1
- package/src/lib/triggers/allocation.js +0 -181
- package/src/lib/triggers/allocation.js.map +0 -1
- package/src/lib/triggers/allocation.ts +0 -198
- package/src/lib/triggers/form.d.ts +0 -19
- package/src/lib/triggers/form.d.ts.map +0 -1
- package/src/lib/triggers/form.js +0 -65
- package/src/lib/triggers/form.js.map +0 -1
- package/src/lib/triggers/form.ts +0 -68
- package/src/lib/triggers/item.d.ts +0 -53
- package/src/lib/triggers/item.d.ts.map +0 -1
- package/src/lib/triggers/item.js +0 -181
- package/src/lib/triggers/item.js.map +0 -1
- package/src/lib/triggers/item.ts +0 -198
- package/src/lib/triggers/site.d.ts +0 -19
- package/src/lib/triggers/site.d.ts.map +0 -1
- package/src/lib/triggers/site.js +0 -65
- package/src/lib/triggers/site.js.map +0 -1
- package/src/lib/triggers/site.ts +0 -68
package/src/lib/triggers/task.js
CHANGED
|
@@ -10,11 +10,10 @@ exports.task_created_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
10
10
|
displayName: 'Task Created',
|
|
11
11
|
description: 'Triggered when a new task is created',
|
|
12
12
|
props: {
|
|
13
|
-
|
|
14
|
-
displayName: '
|
|
15
|
-
description: '
|
|
13
|
+
tag: pieces_framework_1.Property.Array({
|
|
14
|
+
displayName: 'Filter by Tags',
|
|
15
|
+
description: 'Only trigger for specific tags IDs',
|
|
16
16
|
required: false,
|
|
17
|
-
defaultValue: {},
|
|
18
17
|
}),
|
|
19
18
|
},
|
|
20
19
|
sampleData: {
|
|
@@ -33,6 +32,10 @@ exports.task_created_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
33
32
|
async onEnable(context) {
|
|
34
33
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
35
34
|
const baseUrl = context.auth.props.baseUrl;
|
|
35
|
+
// Assemble filters from individual props
|
|
36
|
+
const filters = {};
|
|
37
|
+
if (context.propsValue.tag?.length)
|
|
38
|
+
filters.tag = context.propsValue.tag;
|
|
36
39
|
// Register webhook with WorkBuddy v2 API (server handles upsert - reactivates if exists)
|
|
37
40
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
38
41
|
method: pieces_common_1.HttpMethod.POST,
|
|
@@ -47,9 +50,7 @@ exports.task_created_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
47
50
|
url: context.webhookUrl,
|
|
48
51
|
entity: 'task',
|
|
49
52
|
events: ['Task Created'],
|
|
50
|
-
...(
|
|
51
|
-
? { filters: context.propsValue.filters }
|
|
52
|
-
: {}),
|
|
53
|
+
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
53
54
|
workflow: {
|
|
54
55
|
platform: 'activepieces',
|
|
55
56
|
integrationId: context.webhookUrl,
|
|
@@ -89,11 +90,10 @@ exports.task_updated_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
89
90
|
displayName: 'Task Updated',
|
|
90
91
|
description: 'Triggered when a task is updated',
|
|
91
92
|
props: {
|
|
92
|
-
|
|
93
|
-
displayName: '
|
|
94
|
-
description: '
|
|
93
|
+
tag: pieces_framework_1.Property.Array({
|
|
94
|
+
displayName: 'Filter by Tags',
|
|
95
|
+
description: 'Only trigger for specific tags IDs',
|
|
95
96
|
required: false,
|
|
96
|
-
defaultValue: {},
|
|
97
97
|
}),
|
|
98
98
|
},
|
|
99
99
|
sampleData: {
|
|
@@ -112,6 +112,10 @@ exports.task_updated_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
112
112
|
async onEnable(context) {
|
|
113
113
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
114
114
|
const baseUrl = context.auth.props.baseUrl;
|
|
115
|
+
// Assemble filters from individual props
|
|
116
|
+
const filters = {};
|
|
117
|
+
if (context.propsValue.tag?.length)
|
|
118
|
+
filters.tag = context.propsValue.tag;
|
|
115
119
|
// Register webhook with WorkBuddy v2 API (server handles upsert - reactivates if exists)
|
|
116
120
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
117
121
|
method: pieces_common_1.HttpMethod.POST,
|
|
@@ -126,9 +130,7 @@ exports.task_updated_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
126
130
|
url: context.webhookUrl,
|
|
127
131
|
entity: 'task',
|
|
128
132
|
events: ['Task Updated'],
|
|
129
|
-
...(
|
|
130
|
-
? { filters: context.propsValue.filters }
|
|
131
|
-
: {}),
|
|
133
|
+
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
132
134
|
workflow: {
|
|
133
135
|
platform: 'activepieces',
|
|
134
136
|
integrationId: context.webhookUrl,
|
|
@@ -168,11 +170,10 @@ exports.task_status_changed_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
168
170
|
displayName: 'Task Status Changed',
|
|
169
171
|
description: 'Triggered when a task status changes',
|
|
170
172
|
props: {
|
|
171
|
-
|
|
172
|
-
displayName: '
|
|
173
|
-
description: '
|
|
173
|
+
tag: pieces_framework_1.Property.Array({
|
|
174
|
+
displayName: 'Filter by Tags',
|
|
175
|
+
description: 'Only trigger for specific tags IDs',
|
|
174
176
|
required: false,
|
|
175
|
-
defaultValue: {},
|
|
176
177
|
}),
|
|
177
178
|
},
|
|
178
179
|
sampleData: {
|
|
@@ -191,6 +192,10 @@ exports.task_status_changed_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
191
192
|
async onEnable(context) {
|
|
192
193
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
193
194
|
const baseUrl = context.auth.props.baseUrl;
|
|
195
|
+
// Assemble filters from individual props
|
|
196
|
+
const filters = {};
|
|
197
|
+
if (context.propsValue.tag?.length)
|
|
198
|
+
filters.tag = context.propsValue.tag;
|
|
194
199
|
// Register webhook with WorkBuddy v2 API (server handles upsert - reactivates if exists)
|
|
195
200
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
196
201
|
method: pieces_common_1.HttpMethod.POST,
|
|
@@ -205,9 +210,7 @@ exports.task_status_changed_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
205
210
|
url: context.webhookUrl,
|
|
206
211
|
entity: 'task',
|
|
207
212
|
events: ['Task Status Changed'],
|
|
208
|
-
...(
|
|
209
|
-
? { filters: context.propsValue.filters }
|
|
210
|
-
: {}),
|
|
213
|
+
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
211
214
|
workflow: {
|
|
212
215
|
platform: 'activepieces',
|
|
213
216
|
integrationId: context.webhookUrl,
|
|
@@ -247,11 +250,10 @@ exports.task_deleted_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
247
250
|
displayName: 'Task Deleted',
|
|
248
251
|
description: 'Triggered when a task is deleted',
|
|
249
252
|
props: {
|
|
250
|
-
|
|
251
|
-
displayName: '
|
|
252
|
-
description: '
|
|
253
|
+
tag: pieces_framework_1.Property.Array({
|
|
254
|
+
displayName: 'Filter by Tags',
|
|
255
|
+
description: 'Only trigger for specific tags IDs',
|
|
253
256
|
required: false,
|
|
254
|
-
defaultValue: {},
|
|
255
257
|
}),
|
|
256
258
|
},
|
|
257
259
|
sampleData: {
|
|
@@ -270,6 +272,10 @@ exports.task_deleted_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
270
272
|
async onEnable(context) {
|
|
271
273
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
272
274
|
const baseUrl = context.auth.props.baseUrl;
|
|
275
|
+
// Assemble filters from individual props
|
|
276
|
+
const filters = {};
|
|
277
|
+
if (context.propsValue.tag?.length)
|
|
278
|
+
filters.tag = context.propsValue.tag;
|
|
273
279
|
// Register webhook with WorkBuddy v2 API (server handles upsert - reactivates if exists)
|
|
274
280
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
275
281
|
method: pieces_common_1.HttpMethod.POST,
|
|
@@ -284,9 +290,7 @@ exports.task_deleted_trigger = (0, pieces_framework_1.createTrigger)({
|
|
|
284
290
|
url: context.webhookUrl,
|
|
285
291
|
entity: 'task',
|
|
286
292
|
events: ['Task Deleted'],
|
|
287
|
-
...(
|
|
288
|
-
? { filters: context.propsValue.filters }
|
|
289
|
-
: {}),
|
|
293
|
+
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
290
294
|
workflow: {
|
|
291
295
|
platform: 'activepieces',
|
|
292
296
|
integrationId: context.webhookUrl,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.js","sourceRoot":"","sources":["task.ts"],"names":[],"mappings":";;;AAAA,qEAA0F;AAC1F,+DAAqE;AACrE,kCAAwD;AAE3C,QAAA,oBAAoB,GAAG,IAAA,gCAAa,EAAC;IAChD,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,oBAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,sCAAsC;IACnD,KAAK,EAAE;QACL,
|
|
1
|
+
{"version":3,"file":"task.js","sourceRoot":"","sources":["task.ts"],"names":[],"mappings":";;;AAAA,qEAA0F;AAC1F,+DAAqE;AACrE,k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ACF;SACF,CAAC,CAAC;QAEH,+BAA+B;QAC/B,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAO;QACrB,MAAM,KAAK,GAAG,MAAM,IAAA,qBAAc,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;QAC3C,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAS,WAAW,CAAC,CAAC;QAE/D,IAAI,SAAS,EAAE,CAAC;YACd,6DAA6D;YAC7D,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC3B,MAAM,EAAE,0BAAU,CAAC,KAAK;gBACxB,GAAG,EAAE,GAAG,OAAO,2BAA2B,SAAS,EAAE;gBACrD,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,KAAK,EAAE;oBAChC,cAAc,EAAE,kBAAkB;oBAClC,qBAAqB,EAAE,SAAS;iBACjC;gBACD,IAAI,EAAE;oBACJ,MAAM,EAAE,QAAQ;iBACjB;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,OAAO;QACf,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACF,CAAC,CAAC"}
|
package/src/lib/triggers/task.ts
CHANGED
|
@@ -8,12 +8,10 @@ export const task_created_trigger = createTrigger({
|
|
|
8
8
|
displayName: 'Task Created',
|
|
9
9
|
description: 'Triggered when a new task is created',
|
|
10
10
|
props: {
|
|
11
|
-
|
|
12
|
-
displayName: '
|
|
13
|
-
description:
|
|
14
|
-
'Optional webhook filters object. Discover allowed fields with GET /webhooks/entities/:entity/filters.',
|
|
11
|
+
tag: Property.Array({
|
|
12
|
+
displayName: 'Filter by Tags',
|
|
13
|
+
description: 'Only trigger for specific tags IDs',
|
|
15
14
|
required: false,
|
|
16
|
-
defaultValue: {},
|
|
17
15
|
}),
|
|
18
16
|
},
|
|
19
17
|
sampleData: {
|
|
@@ -34,6 +32,9 @@ export const task_created_trigger = createTrigger({
|
|
|
34
32
|
const token = await getAccessToken(context.auth);
|
|
35
33
|
const baseUrl = context.auth.props.baseUrl;
|
|
36
34
|
|
|
35
|
+
// Assemble filters from individual props
|
|
36
|
+
const filters: Record<string, unknown> = {};
|
|
37
|
+
if (context.propsValue.tag?.length) filters.tag = context.propsValue.tag;
|
|
37
38
|
// Register webhook with WorkBuddy v2 API (server handles upsert - reactivates if exists)
|
|
38
39
|
const response = await httpClient.sendRequest<{ data: { id: string } }>({
|
|
39
40
|
method: HttpMethod.POST,
|
|
@@ -48,9 +49,7 @@ export const task_created_trigger = createTrigger({
|
|
|
48
49
|
url: context.webhookUrl,
|
|
49
50
|
entity: 'task',
|
|
50
51
|
events: ['Task Created'],
|
|
51
|
-
...(
|
|
52
|
-
? { filters: context.propsValue.filters }
|
|
53
|
-
: {}),
|
|
52
|
+
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
54
53
|
workflow: {
|
|
55
54
|
platform: 'activepieces',
|
|
56
55
|
integrationId: context.webhookUrl,
|
|
@@ -95,12 +94,10 @@ export const task_updated_trigger = createTrigger({
|
|
|
95
94
|
displayName: 'Task Updated',
|
|
96
95
|
description: 'Triggered when a task is updated',
|
|
97
96
|
props: {
|
|
98
|
-
|
|
99
|
-
displayName: '
|
|
100
|
-
description:
|
|
101
|
-
'Optional webhook filters object. Discover allowed fields with GET /webhooks/entities/:entity/filters.',
|
|
97
|
+
tag: Property.Array({
|
|
98
|
+
displayName: 'Filter by Tags',
|
|
99
|
+
description: 'Only trigger for specific tags IDs',
|
|
102
100
|
required: false,
|
|
103
|
-
defaultValue: {},
|
|
104
101
|
}),
|
|
105
102
|
},
|
|
106
103
|
sampleData: {
|
|
@@ -121,6 +118,9 @@ export const task_updated_trigger = createTrigger({
|
|
|
121
118
|
const token = await getAccessToken(context.auth);
|
|
122
119
|
const baseUrl = context.auth.props.baseUrl;
|
|
123
120
|
|
|
121
|
+
// Assemble filters from individual props
|
|
122
|
+
const filters: Record<string, unknown> = {};
|
|
123
|
+
if (context.propsValue.tag?.length) filters.tag = context.propsValue.tag;
|
|
124
124
|
// Register webhook with WorkBuddy v2 API (server handles upsert - reactivates if exists)
|
|
125
125
|
const response = await httpClient.sendRequest<{ data: { id: string } }>({
|
|
126
126
|
method: HttpMethod.POST,
|
|
@@ -135,9 +135,7 @@ export const task_updated_trigger = createTrigger({
|
|
|
135
135
|
url: context.webhookUrl,
|
|
136
136
|
entity: 'task',
|
|
137
137
|
events: ['Task Updated'],
|
|
138
|
-
...(
|
|
139
|
-
? { filters: context.propsValue.filters }
|
|
140
|
-
: {}),
|
|
138
|
+
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
141
139
|
workflow: {
|
|
142
140
|
platform: 'activepieces',
|
|
143
141
|
integrationId: context.webhookUrl,
|
|
@@ -182,12 +180,10 @@ export const task_status_changed_trigger = createTrigger({
|
|
|
182
180
|
displayName: 'Task Status Changed',
|
|
183
181
|
description: 'Triggered when a task status changes',
|
|
184
182
|
props: {
|
|
185
|
-
|
|
186
|
-
displayName: '
|
|
187
|
-
description:
|
|
188
|
-
'Optional webhook filters object. Discover allowed fields with GET /webhooks/entities/:entity/filters.',
|
|
183
|
+
tag: Property.Array({
|
|
184
|
+
displayName: 'Filter by Tags',
|
|
185
|
+
description: 'Only trigger for specific tags IDs',
|
|
189
186
|
required: false,
|
|
190
|
-
defaultValue: {},
|
|
191
187
|
}),
|
|
192
188
|
},
|
|
193
189
|
sampleData: {
|
|
@@ -208,6 +204,9 @@ export const task_status_changed_trigger = createTrigger({
|
|
|
208
204
|
const token = await getAccessToken(context.auth);
|
|
209
205
|
const baseUrl = context.auth.props.baseUrl;
|
|
210
206
|
|
|
207
|
+
// Assemble filters from individual props
|
|
208
|
+
const filters: Record<string, unknown> = {};
|
|
209
|
+
if (context.propsValue.tag?.length) filters.tag = context.propsValue.tag;
|
|
211
210
|
// Register webhook with WorkBuddy v2 API (server handles upsert - reactivates if exists)
|
|
212
211
|
const response = await httpClient.sendRequest<{ data: { id: string } }>({
|
|
213
212
|
method: HttpMethod.POST,
|
|
@@ -222,9 +221,7 @@ export const task_status_changed_trigger = createTrigger({
|
|
|
222
221
|
url: context.webhookUrl,
|
|
223
222
|
entity: 'task',
|
|
224
223
|
events: ['Task Status Changed'],
|
|
225
|
-
...(
|
|
226
|
-
? { filters: context.propsValue.filters }
|
|
227
|
-
: {}),
|
|
224
|
+
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
228
225
|
workflow: {
|
|
229
226
|
platform: 'activepieces',
|
|
230
227
|
integrationId: context.webhookUrl,
|
|
@@ -269,12 +266,10 @@ export const task_deleted_trigger = createTrigger({
|
|
|
269
266
|
displayName: 'Task Deleted',
|
|
270
267
|
description: 'Triggered when a task is deleted',
|
|
271
268
|
props: {
|
|
272
|
-
|
|
273
|
-
displayName: '
|
|
274
|
-
description:
|
|
275
|
-
'Optional webhook filters object. Discover allowed fields with GET /webhooks/entities/:entity/filters.',
|
|
269
|
+
tag: Property.Array({
|
|
270
|
+
displayName: 'Filter by Tags',
|
|
271
|
+
description: 'Only trigger for specific tags IDs',
|
|
276
272
|
required: false,
|
|
277
|
-
defaultValue: {},
|
|
278
273
|
}),
|
|
279
274
|
},
|
|
280
275
|
sampleData: {
|
|
@@ -295,6 +290,9 @@ export const task_deleted_trigger = createTrigger({
|
|
|
295
290
|
const token = await getAccessToken(context.auth);
|
|
296
291
|
const baseUrl = context.auth.props.baseUrl;
|
|
297
292
|
|
|
293
|
+
// Assemble filters from individual props
|
|
294
|
+
const filters: Record<string, unknown> = {};
|
|
295
|
+
if (context.propsValue.tag?.length) filters.tag = context.propsValue.tag;
|
|
298
296
|
// Register webhook with WorkBuddy v2 API (server handles upsert - reactivates if exists)
|
|
299
297
|
const response = await httpClient.sendRequest<{ data: { id: string } }>({
|
|
300
298
|
method: HttpMethod.POST,
|
|
@@ -309,9 +307,7 @@ export const task_deleted_trigger = createTrigger({
|
|
|
309
307
|
url: context.webhookUrl,
|
|
310
308
|
entity: 'task',
|
|
311
309
|
events: ['Task Deleted'],
|
|
312
|
-
...(
|
|
313
|
-
? { filters: context.propsValue.filters }
|
|
314
|
-
: {}),
|
|
310
|
+
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
315
311
|
workflow: {
|
|
316
312
|
platform: 'activepieces',
|
|
317
313
|
integrationId: context.webhookUrl,
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const ContextMcpController_handleSseGet: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
}>, {}>;
|
|
6
|
-
export declare const ContextMcpController_handleMcpRequest: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
7
|
-
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
-
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
10
|
-
}>, {
|
|
11
|
-
jsonrpc: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
12
|
-
id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
-
method: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
14
|
-
params: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
15
|
-
}>;
|
|
16
|
-
//# sourceMappingURL=mcp-context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-context.d.ts","sourceRoot":"","sources":["mcp-context.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iCAAiC;;;;OAwB5C,CAAC;AAEH,eAAO,MAAM,qCAAqC;;;;;;;;;EAuDhD,CAAC"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContextMcpController_handleMcpRequest = exports.ContextMcpController_handleSseGet = void 0;
|
|
4
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const auth_1 = require("../auth");
|
|
7
|
-
exports.ContextMcpController_handleSseGet = (0, pieces_framework_1.createAction)({
|
|
8
|
-
name: 'ContextMcpController_handleSseGet',
|
|
9
|
-
auth: auth_1.workbuddyAuth,
|
|
10
|
-
displayName: 'MCP SSE stream endpoint',
|
|
11
|
-
description: 'Server-initiated SSE stream (not supported).',
|
|
12
|
-
props: {},
|
|
13
|
-
async run(context) {
|
|
14
|
-
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
15
|
-
const baseUrl = context.auth.props.baseUrl;
|
|
16
|
-
const url = `${baseUrl}/api/v2/public/mcp/context`;
|
|
17
|
-
const response = await pieces_common_1.httpClient.sendRequest({
|
|
18
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
19
|
-
url: `${baseUrl}/api/v2/public/mcp/context`,
|
|
20
|
-
headers: {
|
|
21
|
-
Authorization: `Bearer ${token}`,
|
|
22
|
-
'Content-Type': 'application/json',
|
|
23
|
-
'X-WorkBuddy-Version': '2026-01',
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
return response.body;
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
exports.ContextMcpController_handleMcpRequest = (0, pieces_framework_1.createAction)({
|
|
30
|
-
name: 'ContextMcpController_handleMcpRequest',
|
|
31
|
-
auth: auth_1.workbuddyAuth,
|
|
32
|
-
displayName: 'MCP Streamable HTTP endpoint',
|
|
33
|
-
description: 'Handles MCP JSON-RPC requests with SSE streaming response.',
|
|
34
|
-
props: {
|
|
35
|
-
jsonrpc: pieces_framework_1.Property.StaticDropdown({
|
|
36
|
-
displayName: 'Jsonrpc',
|
|
37
|
-
description: '',
|
|
38
|
-
required: true,
|
|
39
|
-
options: {
|
|
40
|
-
options: [{ label: '2.0', value: '2.0' }],
|
|
41
|
-
},
|
|
42
|
-
}),
|
|
43
|
-
id: pieces_framework_1.Property.ShortText({
|
|
44
|
-
displayName: 'Id',
|
|
45
|
-
description: '',
|
|
46
|
-
required: false,
|
|
47
|
-
}),
|
|
48
|
-
method: pieces_framework_1.Property.ShortText({
|
|
49
|
-
displayName: 'Method',
|
|
50
|
-
description: '',
|
|
51
|
-
required: true,
|
|
52
|
-
}),
|
|
53
|
-
params: pieces_framework_1.Property.Json({
|
|
54
|
-
displayName: 'Params',
|
|
55
|
-
description: '',
|
|
56
|
-
required: false,
|
|
57
|
-
}),
|
|
58
|
-
},
|
|
59
|
-
async run(context) {
|
|
60
|
-
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
61
|
-
const baseUrl = context.auth.props.baseUrl;
|
|
62
|
-
const url = `${baseUrl}/api/v2/public/mcp/context`;
|
|
63
|
-
const body = {
|
|
64
|
-
jsonrpc: context.propsValue.jsonrpc,
|
|
65
|
-
id: context.propsValue.id,
|
|
66
|
-
method: context.propsValue.method,
|
|
67
|
-
params: context.propsValue.params,
|
|
68
|
-
};
|
|
69
|
-
const response = await pieces_common_1.httpClient.sendRequest({
|
|
70
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
71
|
-
url: `${baseUrl}/api/v2/public/mcp/context`,
|
|
72
|
-
headers: {
|
|
73
|
-
Authorization: `Bearer ${token}`,
|
|
74
|
-
'Content-Type': 'application/json',
|
|
75
|
-
'X-WorkBuddy-Version': '2026-01',
|
|
76
|
-
},
|
|
77
|
-
body: body,
|
|
78
|
-
});
|
|
79
|
-
return response.body;
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
//# sourceMappingURL=mcp-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-context.js","sourceRoot":"","sources":["mcp-context.ts"],"names":[],"mappings":";;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,kCAAwD;AAE3C,QAAA,iCAAiC,GAAG,IAAA,+BAAY,EAAC;IAC5D,IAAI,EAAE,mCAAmC;IACzC,IAAI,EAAE,oBAAa;IACnB,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,8CAA8C;IAC3D,KAAK,EAAE,EAAE;IACT,KAAK,CAAC,GAAG,CAAC,OAAO;QACf,MAAM,KAAK,GAAG,MAAM,IAAA,qBAAc,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;QAE3C,MAAM,GAAG,GAAG,GAAG,OAAO,4BAA4B,CAAC;QAEnD,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;YAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;YACtB,GAAG,EAAE,GAAG,OAAO,4BAA4B;YAC3C,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,KAAK,EAAE;gBAChC,cAAc,EAAE,kBAAkB;gBAClC,qBAAqB,EAAE,SAAS;aACjC;SACF,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF,CAAC,CAAC;AAEU,QAAA,qCAAqC,GAAG,IAAA,+BAAY,EAAC;IAChE,IAAI,EAAE,uCAAuC;IAC7C,IAAI,EAAE,oBAAa;IACnB,WAAW,EAAE,8BAA8B;IAC3C,WAAW,EAAE,4DAA4D;IACzE,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC/B,WAAW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Ac,EAAE,kBAAkB;gBAClC,qBAAqB,EAAE,SAAS;aACjC;YACD,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { createAction, Property } from '@activepieces/pieces-framework';
|
|
2
|
-
import { HttpMethod, httpClient } from '@activepieces/pieces-common';
|
|
3
|
-
import { workbuddyAuth, getAccessToken } from '../auth';
|
|
4
|
-
|
|
5
|
-
export const ContextMcpController_handleSseGet = createAction({
|
|
6
|
-
name: 'ContextMcpController_handleSseGet',
|
|
7
|
-
auth: workbuddyAuth,
|
|
8
|
-
displayName: 'MCP SSE stream endpoint',
|
|
9
|
-
description: 'Server-initiated SSE stream (not supported).',
|
|
10
|
-
props: {},
|
|
11
|
-
async run(context) {
|
|
12
|
-
const token = await getAccessToken(context.auth);
|
|
13
|
-
const baseUrl = context.auth.props.baseUrl;
|
|
14
|
-
|
|
15
|
-
const url = `${baseUrl}/api/v2/public/mcp/context`;
|
|
16
|
-
|
|
17
|
-
const response = await httpClient.sendRequest({
|
|
18
|
-
method: HttpMethod.GET,
|
|
19
|
-
url: `${baseUrl}/api/v2/public/mcp/context`,
|
|
20
|
-
headers: {
|
|
21
|
-
Authorization: `Bearer ${token}`,
|
|
22
|
-
'Content-Type': 'application/json',
|
|
23
|
-
'X-WorkBuddy-Version': '2026-01',
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
return response.body;
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export const ContextMcpController_handleMcpRequest = createAction({
|
|
32
|
-
name: 'ContextMcpController_handleMcpRequest',
|
|
33
|
-
auth: workbuddyAuth,
|
|
34
|
-
displayName: 'MCP Streamable HTTP endpoint',
|
|
35
|
-
description: 'Handles MCP JSON-RPC requests with SSE streaming response.',
|
|
36
|
-
props: {
|
|
37
|
-
jsonrpc: Property.StaticDropdown({
|
|
38
|
-
displayName: 'Jsonrpc',
|
|
39
|
-
description: '',
|
|
40
|
-
required: true,
|
|
41
|
-
options: {
|
|
42
|
-
options: [{ label: '2.0', value: '2.0' }],
|
|
43
|
-
},
|
|
44
|
-
}),
|
|
45
|
-
id: Property.ShortText({
|
|
46
|
-
displayName: 'Id',
|
|
47
|
-
description: '',
|
|
48
|
-
required: false,
|
|
49
|
-
}),
|
|
50
|
-
method: Property.ShortText({
|
|
51
|
-
displayName: 'Method',
|
|
52
|
-
description: '',
|
|
53
|
-
required: true,
|
|
54
|
-
}),
|
|
55
|
-
params: Property.Json({
|
|
56
|
-
displayName: 'Params',
|
|
57
|
-
description: '',
|
|
58
|
-
required: false,
|
|
59
|
-
}),
|
|
60
|
-
},
|
|
61
|
-
async run(context) {
|
|
62
|
-
const token = await getAccessToken(context.auth);
|
|
63
|
-
const baseUrl = context.auth.props.baseUrl;
|
|
64
|
-
|
|
65
|
-
const url = `${baseUrl}/api/v2/public/mcp/context`;
|
|
66
|
-
|
|
67
|
-
const body = {
|
|
68
|
-
jsonrpc: context.propsValue.jsonrpc,
|
|
69
|
-
id: context.propsValue.id,
|
|
70
|
-
method: context.propsValue.method,
|
|
71
|
-
params: context.propsValue.params,
|
|
72
|
-
};
|
|
73
|
-
const response = await httpClient.sendRequest({
|
|
74
|
-
method: HttpMethod.POST,
|
|
75
|
-
url: `${baseUrl}/api/v2/public/mcp/context`,
|
|
76
|
-
headers: {
|
|
77
|
-
Authorization: `Bearer ${token}`,
|
|
78
|
-
'Content-Type': 'application/json',
|
|
79
|
-
'X-WorkBuddy-Version': '2026-01',
|
|
80
|
-
},
|
|
81
|
-
body: body,
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
return response.body;
|
|
85
|
-
},
|
|
86
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export declare const PublicApiWebhookController_list: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
5
|
-
}>, {
|
|
6
|
-
active: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
7
|
-
eventName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
cursor: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
limit: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
10
|
-
}>;
|
|
11
|
-
export declare const PublicApiWebhookController_create: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
12
|
-
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
13
|
-
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
14
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
15
|
-
}>, {
|
|
16
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
17
|
-
eventName: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
18
|
-
target: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
19
|
-
active: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
20
|
-
settings: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
21
|
-
workflow: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
22
|
-
}>;
|
|
23
|
-
export declare const PublicApiWebhookController_get: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
24
|
-
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
25
|
-
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
26
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
27
|
-
}>, {
|
|
28
|
-
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
29
|
-
}>;
|
|
30
|
-
export declare const PublicApiWebhookController_update: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
31
|
-
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
32
|
-
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
33
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
34
|
-
}>, {
|
|
35
|
-
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
36
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
37
|
-
target: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
38
|
-
active: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
39
|
-
settings: import("@activepieces/pieces-framework").JsonProperty<false>;
|
|
40
|
-
}>;
|
|
41
|
-
export declare const PublicApiWebhookController_delete: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
42
|
-
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
43
|
-
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
44
|
-
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
45
|
-
}>, {
|
|
46
|
-
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
47
|
-
}>;
|
|
48
|
-
//# sourceMappingURL=webhooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["webhooks.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,+BAA+B;;;;;;;;;EA2E1C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;EA6G5C,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;EA8BzC,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;EA6D5C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;EA8B5C,CAAC"}
|