@workbuddy/piece-workbuddy-edge 1.0.11 → 1.0.13
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/lib/actions/agents.d.ts.map +1 -1
- package/src/lib/actions/agents.js +4 -2
- package/src/lib/actions/agents.js.map +1 -1
- package/src/lib/actions/agents.ts +6 -2
- 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/jobs-activities.d.ts.map +1 -1
- package/src/lib/actions/jobs-activities.js +18 -13
- package/src/lib/actions/jobs-activities.js.map +1 -1
- package/src/lib/actions/jobs-activities.ts +23 -13
- package/src/lib/actions/jobs-files.js +4 -4
- package/src/lib/actions/jobs-files.js.map +1 -1
- package/src/lib/actions/jobs-files.ts +4 -4
- package/src/lib/actions/jobs-tasks.d.ts +3 -1
- package/src/lib/actions/jobs-tasks.d.ts.map +1 -1
- package/src/lib/actions/jobs-tasks.js +35 -11
- package/src/lib/actions/jobs-tasks.js.map +1 -1
- package/src/lib/actions/jobs-tasks.ts +39 -11
- package/src/lib/actions/jobs.d.ts +3 -1
- package/src/lib/actions/jobs.d.ts.map +1 -1
- package/src/lib/actions/jobs.js +29 -5
- package/src/lib/actions/jobs.js.map +1 -1
- package/src/lib/actions/jobs.ts +33 -5
- package/src/lib/actions/mcp.d.ts.map +1 -1
- package/src/lib/actions/mcp.js +2 -1
- package/src/lib/actions/mcp.js.map +1 -1
- package/src/lib/actions/mcp.ts +3 -1
- package/src/lib/actions/stages-activities.d.ts +8 -0
- package/src/lib/actions/stages-activities.d.ts.map +1 -1
- package/src/lib/actions/stages-activities.js +74 -29
- package/src/lib/actions/stages-activities.js.map +1 -1
- package/src/lib/actions/stages-activities.ts +79 -29
- package/src/lib/actions/stages-files.d.ts +4 -0
- package/src/lib/actions/stages-files.d.ts.map +1 -1
- package/src/lib/actions/stages-files.js +32 -12
- package/src/lib/actions/stages-files.js.map +1 -1
- package/src/lib/actions/stages-files.ts +32 -12
- package/src/lib/actions/stages-resources.d.ts.map +1 -1
- package/src/lib/actions/stages-resources.js +4 -2
- package/src/lib/actions/stages-resources.js.map +1 -1
- package/src/lib/actions/stages-resources.ts +6 -2
- package/src/lib/actions/stages-tasks.d.ts +7 -1
- package/src/lib/actions/stages-tasks.d.ts.map +1 -1
- package/src/lib/actions/stages-tasks.js +63 -19
- package/src/lib/actions/stages-tasks.js.map +1 -1
- package/src/lib/actions/stages-tasks.ts +67 -19
- 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 +61 -11
- package/src/lib/actions/stages.js.map +1 -1
- package/src/lib/actions/stages.ts +72 -11
- package/src/lib/actions/webhooks-v2.js +9 -9
- package/src/lib/actions/webhooks-v2.js.map +1 -1
- package/src/lib/actions/webhooks-v2.ts +9 -9
|
@@ -5,7 +5,7 @@ import { workbuddyAuth, getAccessToken } from '../auth';
|
|
|
5
5
|
export const PublicStageActivitiesController_list = createAction({
|
|
6
6
|
name: 'PublicStageActivitiesController_list',
|
|
7
7
|
auth: workbuddyAuth,
|
|
8
|
-
displayName: 'List activities',
|
|
8
|
+
displayName: 'List activities (Stages)',
|
|
9
9
|
description: '',
|
|
10
10
|
props: {
|
|
11
11
|
stageId: Property.ShortText({
|
|
@@ -13,16 +13,21 @@ export const PublicStageActivitiesController_list = createAction({
|
|
|
13
13
|
description: '',
|
|
14
14
|
required: true,
|
|
15
15
|
}),
|
|
16
|
+
jobId: Property.ShortText({
|
|
17
|
+
displayName: 'Job Id',
|
|
18
|
+
description: '',
|
|
19
|
+
required: true,
|
|
20
|
+
}),
|
|
16
21
|
},
|
|
17
22
|
async run(context) {
|
|
18
23
|
const token = await getAccessToken(context.auth);
|
|
19
24
|
const baseUrl = context.auth.props.baseUrl;
|
|
20
25
|
|
|
21
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
26
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities`;
|
|
22
27
|
|
|
23
28
|
const response = await httpClient.sendRequest({
|
|
24
29
|
method: 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',
|
|
@@ -37,7 +42,7 @@ export const PublicStageActivitiesController_list = createAction({
|
|
|
37
42
|
export const PublicStageActivitiesController_getById = createAction({
|
|
38
43
|
name: 'PublicStageActivitiesController_getById',
|
|
39
44
|
auth: workbuddyAuth,
|
|
40
|
-
displayName: 'Get activity by ID',
|
|
45
|
+
displayName: 'Get activity by ID (Stages)',
|
|
41
46
|
description: '',
|
|
42
47
|
props: {
|
|
43
48
|
stageId: Property.ShortText({
|
|
@@ -50,16 +55,21 @@ export const PublicStageActivitiesController_getById = createAction({
|
|
|
50
55
|
description: 'Activity ID',
|
|
51
56
|
required: true,
|
|
52
57
|
}),
|
|
58
|
+
jobId: Property.ShortText({
|
|
59
|
+
displayName: 'Job Id',
|
|
60
|
+
description: '',
|
|
61
|
+
required: true,
|
|
62
|
+
}),
|
|
53
63
|
},
|
|
54
64
|
async run(context) {
|
|
55
65
|
const token = await getAccessToken(context.auth);
|
|
56
66
|
const baseUrl = context.auth.props.baseUrl;
|
|
57
67
|
|
|
58
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
68
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/${context.propsValue.id}`;
|
|
59
69
|
|
|
60
70
|
const response = await httpClient.sendRequest({
|
|
61
71
|
method: HttpMethod.GET,
|
|
62
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
72
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/${context.propsValue.id}`,
|
|
63
73
|
headers: {
|
|
64
74
|
Authorization: `Bearer ${token}`,
|
|
65
75
|
'Content-Type': 'application/json',
|
|
@@ -74,7 +84,7 @@ export const PublicStageActivitiesController_getById = createAction({
|
|
|
74
84
|
export const PublicStageActivitiesController_delete = createAction({
|
|
75
85
|
name: 'PublicStageActivitiesController_delete',
|
|
76
86
|
auth: workbuddyAuth,
|
|
77
|
-
displayName: 'Delete activity',
|
|
87
|
+
displayName: 'Delete activity (Stages)',
|
|
78
88
|
description: '',
|
|
79
89
|
props: {
|
|
80
90
|
stageId: Property.ShortText({
|
|
@@ -87,16 +97,21 @@ export const PublicStageActivitiesController_delete = createAction({
|
|
|
87
97
|
description: 'Activity ID',
|
|
88
98
|
required: true,
|
|
89
99
|
}),
|
|
100
|
+
jobId: Property.ShortText({
|
|
101
|
+
displayName: 'Job Id',
|
|
102
|
+
description: '',
|
|
103
|
+
required: true,
|
|
104
|
+
}),
|
|
90
105
|
},
|
|
91
106
|
async run(context) {
|
|
92
107
|
const token = await getAccessToken(context.auth);
|
|
93
108
|
const baseUrl = context.auth.props.baseUrl;
|
|
94
109
|
|
|
95
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
110
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/${context.propsValue.id}`;
|
|
96
111
|
|
|
97
112
|
const response = await httpClient.sendRequest({
|
|
98
113
|
method: HttpMethod.DELETE,
|
|
99
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
114
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/${context.propsValue.id}`,
|
|
100
115
|
headers: {
|
|
101
116
|
Authorization: `Bearer ${token}`,
|
|
102
117
|
'Content-Type': 'application/json',
|
|
@@ -111,7 +126,7 @@ export const PublicStageActivitiesController_delete = createAction({
|
|
|
111
126
|
export const PublicStageActivitiesController_createNote = createAction({
|
|
112
127
|
name: 'PublicStageActivitiesController_createNote',
|
|
113
128
|
auth: workbuddyAuth,
|
|
114
|
-
displayName: 'Create note activity',
|
|
129
|
+
displayName: 'Create note activity (Stages)',
|
|
115
130
|
description: '',
|
|
116
131
|
props: {
|
|
117
132
|
stageId: Property.ShortText({
|
|
@@ -119,6 +134,11 @@ export const PublicStageActivitiesController_createNote = createAction({
|
|
|
119
134
|
description: '',
|
|
120
135
|
required: true,
|
|
121
136
|
}),
|
|
137
|
+
jobId: Property.ShortText({
|
|
138
|
+
displayName: 'Job Id',
|
|
139
|
+
description: '',
|
|
140
|
+
required: true,
|
|
141
|
+
}),
|
|
122
142
|
body: Property.ShortText({
|
|
123
143
|
displayName: 'Body',
|
|
124
144
|
description: '',
|
|
@@ -144,17 +164,19 @@ export const PublicStageActivitiesController_createNote = createAction({
|
|
|
144
164
|
const token = await getAccessToken(context.auth);
|
|
145
165
|
const baseUrl = context.auth.props.baseUrl;
|
|
146
166
|
|
|
147
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
167
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/note`;
|
|
148
168
|
|
|
149
|
-
const
|
|
169
|
+
const rawBody: Record<string, unknown> = {
|
|
150
170
|
body: context.propsValue.body,
|
|
151
171
|
labelIds: context.propsValue.labelIds,
|
|
152
172
|
attachmentIds: context.propsValue.attachmentIds,
|
|
153
173
|
sharing: context.propsValue.sharing,
|
|
154
174
|
};
|
|
175
|
+
|
|
176
|
+
const body = rawBody;
|
|
155
177
|
const response = await httpClient.sendRequest({
|
|
156
178
|
method: HttpMethod.POST,
|
|
157
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
179
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/note`,
|
|
158
180
|
headers: {
|
|
159
181
|
Authorization: `Bearer ${token}`,
|
|
160
182
|
'Content-Type': 'application/json',
|
|
@@ -170,7 +192,7 @@ export const PublicStageActivitiesController_createNote = createAction({
|
|
|
170
192
|
export const PublicStageActivitiesController_createEmail = createAction({
|
|
171
193
|
name: 'PublicStageActivitiesController_createEmail',
|
|
172
194
|
auth: workbuddyAuth,
|
|
173
|
-
displayName: 'Create email activity',
|
|
195
|
+
displayName: 'Create email activity (Stages)',
|
|
174
196
|
description: '',
|
|
175
197
|
props: {
|
|
176
198
|
stageId: Property.ShortText({
|
|
@@ -178,6 +200,11 @@ export const PublicStageActivitiesController_createEmail = createAction({
|
|
|
178
200
|
description: '',
|
|
179
201
|
required: true,
|
|
180
202
|
}),
|
|
203
|
+
jobId: Property.ShortText({
|
|
204
|
+
displayName: 'Job Id',
|
|
205
|
+
description: '',
|
|
206
|
+
required: true,
|
|
207
|
+
}),
|
|
181
208
|
templateId: Property.ShortText({
|
|
182
209
|
displayName: 'Template Id',
|
|
183
210
|
description: '',
|
|
@@ -231,9 +258,9 @@ export const PublicStageActivitiesController_createEmail = createAction({
|
|
|
231
258
|
const token = await getAccessToken(context.auth);
|
|
232
259
|
const baseUrl = context.auth.props.baseUrl;
|
|
233
260
|
|
|
234
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
261
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/email`;
|
|
235
262
|
|
|
236
|
-
const
|
|
263
|
+
const rawBody: Record<string, unknown> = {
|
|
237
264
|
templateId: context.propsValue.templateId,
|
|
238
265
|
subject: context.propsValue.subject,
|
|
239
266
|
body: context.propsValue.body,
|
|
@@ -244,9 +271,11 @@ export const PublicStageActivitiesController_createEmail = createAction({
|
|
|
244
271
|
attachmentIds: context.propsValue.attachmentIds,
|
|
245
272
|
sharing: context.propsValue.sharing,
|
|
246
273
|
};
|
|
274
|
+
|
|
275
|
+
const body = rawBody;
|
|
247
276
|
const response = await httpClient.sendRequest({
|
|
248
277
|
method: HttpMethod.POST,
|
|
249
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
278
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/email`,
|
|
250
279
|
headers: {
|
|
251
280
|
Authorization: `Bearer ${token}`,
|
|
252
281
|
'Content-Type': 'application/json',
|
|
@@ -262,7 +291,7 @@ export const PublicStageActivitiesController_createEmail = createAction({
|
|
|
262
291
|
export const PublicStageActivitiesController_createSms = createAction({
|
|
263
292
|
name: 'PublicStageActivitiesController_createSms',
|
|
264
293
|
auth: workbuddyAuth,
|
|
265
|
-
displayName: 'Create SMS activity',
|
|
294
|
+
displayName: 'Create SMS activity (Stages)',
|
|
266
295
|
description: '',
|
|
267
296
|
props: {
|
|
268
297
|
stageId: Property.ShortText({
|
|
@@ -270,6 +299,11 @@ export const PublicStageActivitiesController_createSms = createAction({
|
|
|
270
299
|
description: '',
|
|
271
300
|
required: true,
|
|
272
301
|
}),
|
|
302
|
+
jobId: Property.ShortText({
|
|
303
|
+
displayName: 'Job Id',
|
|
304
|
+
description: '',
|
|
305
|
+
required: true,
|
|
306
|
+
}),
|
|
273
307
|
templateId: Property.ShortText({
|
|
274
308
|
displayName: 'Template Id',
|
|
275
309
|
description: '',
|
|
@@ -301,18 +335,20 @@ export const PublicStageActivitiesController_createSms = createAction({
|
|
|
301
335
|
const token = await getAccessToken(context.auth);
|
|
302
336
|
const baseUrl = context.auth.props.baseUrl;
|
|
303
337
|
|
|
304
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
338
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/sms`;
|
|
305
339
|
|
|
306
|
-
const
|
|
340
|
+
const rawBody: Record<string, unknown> = {
|
|
307
341
|
templateId: context.propsValue.templateId,
|
|
308
342
|
body: context.propsValue.body,
|
|
309
343
|
to: context.propsValue.to,
|
|
310
344
|
labelIds: context.propsValue.labelIds,
|
|
311
345
|
sharing: context.propsValue.sharing,
|
|
312
346
|
};
|
|
347
|
+
|
|
348
|
+
const body = rawBody;
|
|
313
349
|
const response = await httpClient.sendRequest({
|
|
314
350
|
method: HttpMethod.POST,
|
|
315
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
351
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/sms`,
|
|
316
352
|
headers: {
|
|
317
353
|
Authorization: `Bearer ${token}`,
|
|
318
354
|
'Content-Type': 'application/json',
|
|
@@ -328,7 +364,7 @@ export const PublicStageActivitiesController_createSms = createAction({
|
|
|
328
364
|
export const PublicStageActivitiesController_createPhone = createAction({
|
|
329
365
|
name: 'PublicStageActivitiesController_createPhone',
|
|
330
366
|
auth: workbuddyAuth,
|
|
331
|
-
displayName: 'Create phone activity',
|
|
367
|
+
displayName: 'Create phone activity (Stages)',
|
|
332
368
|
description: '',
|
|
333
369
|
props: {
|
|
334
370
|
stageId: Property.ShortText({
|
|
@@ -336,6 +372,11 @@ export const PublicStageActivitiesController_createPhone = createAction({
|
|
|
336
372
|
description: '',
|
|
337
373
|
required: true,
|
|
338
374
|
}),
|
|
375
|
+
jobId: Property.ShortText({
|
|
376
|
+
displayName: 'Job Id',
|
|
377
|
+
description: '',
|
|
378
|
+
required: true,
|
|
379
|
+
}),
|
|
339
380
|
direction: Property.StaticDropdown({
|
|
340
381
|
displayName: 'Direction',
|
|
341
382
|
description: '',
|
|
@@ -393,9 +434,9 @@ export const PublicStageActivitiesController_createPhone = createAction({
|
|
|
393
434
|
const token = await getAccessToken(context.auth);
|
|
394
435
|
const baseUrl = context.auth.props.baseUrl;
|
|
395
436
|
|
|
396
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
437
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/phone`;
|
|
397
438
|
|
|
398
|
-
const
|
|
439
|
+
const rawBody: Record<string, unknown> = {
|
|
399
440
|
direction: context.propsValue.direction,
|
|
400
441
|
outcome: context.propsValue.outcome,
|
|
401
442
|
duration: context.propsValue.duration,
|
|
@@ -404,9 +445,11 @@ export const PublicStageActivitiesController_createPhone = createAction({
|
|
|
404
445
|
labelIds: context.propsValue.labelIds,
|
|
405
446
|
sharing: context.propsValue.sharing,
|
|
406
447
|
};
|
|
448
|
+
|
|
449
|
+
const body = rawBody;
|
|
407
450
|
const response = await httpClient.sendRequest({
|
|
408
451
|
method: HttpMethod.POST,
|
|
409
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
452
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/phone`,
|
|
410
453
|
headers: {
|
|
411
454
|
Authorization: `Bearer ${token}`,
|
|
412
455
|
'Content-Type': 'application/json',
|
|
@@ -422,7 +465,7 @@ export const PublicStageActivitiesController_createPhone = createAction({
|
|
|
422
465
|
export const PublicStageActivitiesController_createIntegration = createAction({
|
|
423
466
|
name: 'PublicStageActivitiesController_createIntegration',
|
|
424
467
|
auth: workbuddyAuth,
|
|
425
|
-
displayName: 'Create integration activity',
|
|
468
|
+
displayName: 'Create integration activity (Stages)',
|
|
426
469
|
description: '',
|
|
427
470
|
props: {
|
|
428
471
|
stageId: Property.ShortText({
|
|
@@ -430,6 +473,11 @@ export const PublicStageActivitiesController_createIntegration = createAction({
|
|
|
430
473
|
description: '',
|
|
431
474
|
required: true,
|
|
432
475
|
}),
|
|
476
|
+
jobId: Property.ShortText({
|
|
477
|
+
displayName: 'Job Id',
|
|
478
|
+
description: '',
|
|
479
|
+
required: true,
|
|
480
|
+
}),
|
|
433
481
|
body: Property.ShortText({
|
|
434
482
|
displayName: 'Body',
|
|
435
483
|
description: '',
|
|
@@ -450,16 +498,18 @@ export const PublicStageActivitiesController_createIntegration = createAction({
|
|
|
450
498
|
const token = await getAccessToken(context.auth);
|
|
451
499
|
const baseUrl = context.auth.props.baseUrl;
|
|
452
500
|
|
|
453
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
501
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/integration`;
|
|
454
502
|
|
|
455
|
-
const
|
|
503
|
+
const rawBody: Record<string, unknown> = {
|
|
456
504
|
body: context.propsValue.body,
|
|
457
505
|
integrationType: context.propsValue.integrationType,
|
|
458
506
|
sharing: context.propsValue.sharing,
|
|
459
507
|
};
|
|
508
|
+
|
|
509
|
+
const body = rawBody;
|
|
460
510
|
const response = await httpClient.sendRequest({
|
|
461
511
|
method: HttpMethod.POST,
|
|
462
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
512
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/activities/integration`,
|
|
463
513
|
headers: {
|
|
464
514
|
Authorization: `Bearer ${token}`,
|
|
465
515
|
'Content-Type': 'application/json',
|
|
@@ -4,6 +4,7 @@ export declare const PublicStageFilesController_list: import("@activepieces/piec
|
|
|
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 PublicStageFilesController_create: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
9
10
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
@@ -11,6 +12,7 @@ export declare const PublicStageFilesController_create: import("@activepieces/pi
|
|
|
11
12
|
clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
12
13
|
}>, {
|
|
13
14
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
15
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
14
16
|
}>;
|
|
15
17
|
export declare const PublicStageFilesController_getById: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
16
18
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
@@ -19,6 +21,7 @@ export declare const PublicStageFilesController_getById: import("@activepieces/p
|
|
|
19
21
|
}>, {
|
|
20
22
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
21
23
|
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
24
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
22
25
|
}>;
|
|
23
26
|
export declare const PublicStageFilesController_delete: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
24
27
|
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
@@ -27,5 +30,6 @@ export declare const PublicStageFilesController_delete: import("@activepieces/pi
|
|
|
27
30
|
}>, {
|
|
28
31
|
stageId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
29
32
|
id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
33
|
+
jobId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
30
34
|
}>;
|
|
31
35
|
//# sourceMappingURL=stages-files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stages-files.d.ts","sourceRoot":"","sources":["stages-files.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,+BAA+B
|
|
1
|
+
{"version":3,"file":"stages-files.d.ts","sourceRoot":"","sources":["stages-files.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,+BAA+B;;;;;;;EAmC1C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;EAmC5C,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;EAwC7C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;EAwC5C,CAAC"}
|
|
@@ -7,7 +7,7 @@ const auth_1 = require("../auth");
|
|
|
7
7
|
exports.PublicStageFilesController_list = (0, pieces_framework_1.createAction)({
|
|
8
8
|
name: 'PublicStageFilesController_list',
|
|
9
9
|
auth: auth_1.workbuddyAuth,
|
|
10
|
-
displayName: 'List files',
|
|
10
|
+
displayName: 'List files (Stages)',
|
|
11
11
|
description: '',
|
|
12
12
|
props: {
|
|
13
13
|
stageId: pieces_framework_1.Property.ShortText({
|
|
@@ -15,14 +15,19 @@ exports.PublicStageFilesController_list = (0, pieces_framework_1.createAction)({
|
|
|
15
15
|
description: '',
|
|
16
16
|
required: true,
|
|
17
17
|
}),
|
|
18
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
19
|
+
displayName: 'Job Id',
|
|
20
|
+
description: '',
|
|
21
|
+
required: true,
|
|
22
|
+
}),
|
|
18
23
|
},
|
|
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}/files`;
|
|
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}/files`,
|
|
26
31
|
headers: {
|
|
27
32
|
Authorization: `Bearer ${token}`,
|
|
28
33
|
'Content-Type': 'application/json',
|
|
@@ -35,7 +40,7 @@ exports.PublicStageFilesController_list = (0, pieces_framework_1.createAction)({
|
|
|
35
40
|
exports.PublicStageFilesController_create = (0, pieces_framework_1.createAction)({
|
|
36
41
|
name: 'PublicStageFilesController_create',
|
|
37
42
|
auth: auth_1.workbuddyAuth,
|
|
38
|
-
displayName: 'Create file',
|
|
43
|
+
displayName: 'Create file (Stages)',
|
|
39
44
|
description: '',
|
|
40
45
|
props: {
|
|
41
46
|
stageId: pieces_framework_1.Property.ShortText({
|
|
@@ -43,14 +48,19 @@ exports.PublicStageFilesController_create = (0, pieces_framework_1.createAction)
|
|
|
43
48
|
description: '',
|
|
44
49
|
required: true,
|
|
45
50
|
}),
|
|
51
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
52
|
+
displayName: 'Job Id',
|
|
53
|
+
description: '',
|
|
54
|
+
required: true,
|
|
55
|
+
}),
|
|
46
56
|
},
|
|
47
57
|
async run(context) {
|
|
48
58
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
49
59
|
const baseUrl = context.auth.props.baseUrl;
|
|
50
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
60
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files`;
|
|
51
61
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
52
62
|
method: pieces_common_1.HttpMethod.POST,
|
|
53
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
63
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files`,
|
|
54
64
|
headers: {
|
|
55
65
|
Authorization: `Bearer ${token}`,
|
|
56
66
|
'Content-Type': 'application/json',
|
|
@@ -63,7 +73,7 @@ exports.PublicStageFilesController_create = (0, pieces_framework_1.createAction)
|
|
|
63
73
|
exports.PublicStageFilesController_getById = (0, pieces_framework_1.createAction)({
|
|
64
74
|
name: 'PublicStageFilesController_getById',
|
|
65
75
|
auth: auth_1.workbuddyAuth,
|
|
66
|
-
displayName: 'Get file by ID',
|
|
76
|
+
displayName: 'Get file by ID (Stages)',
|
|
67
77
|
description: '',
|
|
68
78
|
props: {
|
|
69
79
|
stageId: pieces_framework_1.Property.ShortText({
|
|
@@ -76,14 +86,19 @@ exports.PublicStageFilesController_getById = (0, pieces_framework_1.createAction
|
|
|
76
86
|
description: 'File ID',
|
|
77
87
|
required: true,
|
|
78
88
|
}),
|
|
89
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
90
|
+
displayName: 'Job Id',
|
|
91
|
+
description: '',
|
|
92
|
+
required: true,
|
|
93
|
+
}),
|
|
79
94
|
},
|
|
80
95
|
async run(context) {
|
|
81
96
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
82
97
|
const baseUrl = context.auth.props.baseUrl;
|
|
83
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
98
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files/${context.propsValue.id}`;
|
|
84
99
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
85
100
|
method: pieces_common_1.HttpMethod.GET,
|
|
86
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
101
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files/${context.propsValue.id}`,
|
|
87
102
|
headers: {
|
|
88
103
|
Authorization: `Bearer ${token}`,
|
|
89
104
|
'Content-Type': 'application/json',
|
|
@@ -96,7 +111,7 @@ exports.PublicStageFilesController_getById = (0, pieces_framework_1.createAction
|
|
|
96
111
|
exports.PublicStageFilesController_delete = (0, pieces_framework_1.createAction)({
|
|
97
112
|
name: 'PublicStageFilesController_delete',
|
|
98
113
|
auth: auth_1.workbuddyAuth,
|
|
99
|
-
displayName: 'Delete file',
|
|
114
|
+
displayName: 'Delete file (Stages)',
|
|
100
115
|
description: '',
|
|
101
116
|
props: {
|
|
102
117
|
stageId: pieces_framework_1.Property.ShortText({
|
|
@@ -109,14 +124,19 @@ exports.PublicStageFilesController_delete = (0, pieces_framework_1.createAction)
|
|
|
109
124
|
description: 'File ID',
|
|
110
125
|
required: true,
|
|
111
126
|
}),
|
|
127
|
+
jobId: pieces_framework_1.Property.ShortText({
|
|
128
|
+
displayName: 'Job Id',
|
|
129
|
+
description: '',
|
|
130
|
+
required: true,
|
|
131
|
+
}),
|
|
112
132
|
},
|
|
113
133
|
async run(context) {
|
|
114
134
|
const token = await (0, auth_1.getAccessToken)(context.auth);
|
|
115
135
|
const baseUrl = context.auth.props.baseUrl;
|
|
116
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
136
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files/${context.propsValue.id}`;
|
|
117
137
|
const response = await pieces_common_1.httpClient.sendRequest({
|
|
118
138
|
method: pieces_common_1.HttpMethod.DELETE,
|
|
119
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
139
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files/${context.propsValue.id}`,
|
|
120
140
|
headers: {
|
|
121
141
|
Authorization: `Bearer ${token}`,
|
|
122
142
|
'Content-Type': 'application/json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stages-files.js","sourceRoot":"","sources":["stages-files.ts"],"names":[],"mappings":";;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,kCAAwD;AAE3C,QAAA,+BAA+B,GAAG,IAAA,+BAAY,EAAC;IAC1D,IAAI,EAAE,iCAAiC;IACvC,IAAI,EAAE,oBAAa;IACnB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"stages-files.js","sourceRoot":"","sources":["stages-files.ts"],"names":[],"mappings":";;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,kCAAwD;AAE3C,QAAA,+BAA+B,GAAG,IAAA,+BAAY,EAAC;IAC1D,IAAI,EAAE,iCAAiC;IACvC,IAAI,EAAE,oBAAa;IACnB,WAAW,EAAE,qBAAqB;IAClC,WAAW,EAAE,EAAE;IACf,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,IAAI;SACf,CAAC;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;YACjB,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACD,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,uBAAuB,OAAO,CAAC,UAAU,CAAC,KAAK,WAAW,OAAO,CAAC,UAAU,CAAC,OAAO,UAAU,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;QAE5I,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;YAC5C,MAAM,EAAE,0BAAU,CAAC,MAAM;YACzB,GAAG,EAAE,GAAG,OAAO,uBAAuB,OAAO,CAAC,UAAU,CAAC,KAAK,WAAW,OAAO,CAAC,UAAU,CAAC,OAAO,UAAU,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE;YACpI,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"}
|
|
@@ -5,7 +5,7 @@ import { workbuddyAuth, getAccessToken } from '../auth';
|
|
|
5
5
|
export const PublicStageFilesController_list = createAction({
|
|
6
6
|
name: 'PublicStageFilesController_list',
|
|
7
7
|
auth: workbuddyAuth,
|
|
8
|
-
displayName: 'List files',
|
|
8
|
+
displayName: 'List files (Stages)',
|
|
9
9
|
description: '',
|
|
10
10
|
props: {
|
|
11
11
|
stageId: Property.ShortText({
|
|
@@ -13,16 +13,21 @@ export const PublicStageFilesController_list = createAction({
|
|
|
13
13
|
description: '',
|
|
14
14
|
required: true,
|
|
15
15
|
}),
|
|
16
|
+
jobId: Property.ShortText({
|
|
17
|
+
displayName: 'Job Id',
|
|
18
|
+
description: '',
|
|
19
|
+
required: true,
|
|
20
|
+
}),
|
|
16
21
|
},
|
|
17
22
|
async run(context) {
|
|
18
23
|
const token = await getAccessToken(context.auth);
|
|
19
24
|
const baseUrl = context.auth.props.baseUrl;
|
|
20
25
|
|
|
21
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
26
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files`;
|
|
22
27
|
|
|
23
28
|
const response = await httpClient.sendRequest({
|
|
24
29
|
method: HttpMethod.GET,
|
|
25
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
30
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files`,
|
|
26
31
|
headers: {
|
|
27
32
|
Authorization: `Bearer ${token}`,
|
|
28
33
|
'Content-Type': 'application/json',
|
|
@@ -37,7 +42,7 @@ export const PublicStageFilesController_list = createAction({
|
|
|
37
42
|
export const PublicStageFilesController_create = createAction({
|
|
38
43
|
name: 'PublicStageFilesController_create',
|
|
39
44
|
auth: workbuddyAuth,
|
|
40
|
-
displayName: 'Create file',
|
|
45
|
+
displayName: 'Create file (Stages)',
|
|
41
46
|
description: '',
|
|
42
47
|
props: {
|
|
43
48
|
stageId: Property.ShortText({
|
|
@@ -45,16 +50,21 @@ export const PublicStageFilesController_create = createAction({
|
|
|
45
50
|
description: '',
|
|
46
51
|
required: true,
|
|
47
52
|
}),
|
|
53
|
+
jobId: Property.ShortText({
|
|
54
|
+
displayName: 'Job Id',
|
|
55
|
+
description: '',
|
|
56
|
+
required: true,
|
|
57
|
+
}),
|
|
48
58
|
},
|
|
49
59
|
async run(context) {
|
|
50
60
|
const token = await getAccessToken(context.auth);
|
|
51
61
|
const baseUrl = context.auth.props.baseUrl;
|
|
52
62
|
|
|
53
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
63
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files`;
|
|
54
64
|
|
|
55
65
|
const response = await httpClient.sendRequest({
|
|
56
66
|
method: HttpMethod.POST,
|
|
57
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
67
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files`,
|
|
58
68
|
headers: {
|
|
59
69
|
Authorization: `Bearer ${token}`,
|
|
60
70
|
'Content-Type': 'application/json',
|
|
@@ -69,7 +79,7 @@ export const PublicStageFilesController_create = createAction({
|
|
|
69
79
|
export const PublicStageFilesController_getById = createAction({
|
|
70
80
|
name: 'PublicStageFilesController_getById',
|
|
71
81
|
auth: workbuddyAuth,
|
|
72
|
-
displayName: 'Get file by ID',
|
|
82
|
+
displayName: 'Get file by ID (Stages)',
|
|
73
83
|
description: '',
|
|
74
84
|
props: {
|
|
75
85
|
stageId: Property.ShortText({
|
|
@@ -82,16 +92,21 @@ export const PublicStageFilesController_getById = createAction({
|
|
|
82
92
|
description: 'File ID',
|
|
83
93
|
required: true,
|
|
84
94
|
}),
|
|
95
|
+
jobId: Property.ShortText({
|
|
96
|
+
displayName: 'Job Id',
|
|
97
|
+
description: '',
|
|
98
|
+
required: true,
|
|
99
|
+
}),
|
|
85
100
|
},
|
|
86
101
|
async run(context) {
|
|
87
102
|
const token = await getAccessToken(context.auth);
|
|
88
103
|
const baseUrl = context.auth.props.baseUrl;
|
|
89
104
|
|
|
90
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
105
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files/${context.propsValue.id}`;
|
|
91
106
|
|
|
92
107
|
const response = await httpClient.sendRequest({
|
|
93
108
|
method: HttpMethod.GET,
|
|
94
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
109
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files/${context.propsValue.id}`,
|
|
95
110
|
headers: {
|
|
96
111
|
Authorization: `Bearer ${token}`,
|
|
97
112
|
'Content-Type': 'application/json',
|
|
@@ -106,7 +121,7 @@ export const PublicStageFilesController_getById = createAction({
|
|
|
106
121
|
export const PublicStageFilesController_delete = createAction({
|
|
107
122
|
name: 'PublicStageFilesController_delete',
|
|
108
123
|
auth: workbuddyAuth,
|
|
109
|
-
displayName: 'Delete file',
|
|
124
|
+
displayName: 'Delete file (Stages)',
|
|
110
125
|
description: '',
|
|
111
126
|
props: {
|
|
112
127
|
stageId: Property.ShortText({
|
|
@@ -119,16 +134,21 @@ export const PublicStageFilesController_delete = createAction({
|
|
|
119
134
|
description: 'File ID',
|
|
120
135
|
required: true,
|
|
121
136
|
}),
|
|
137
|
+
jobId: Property.ShortText({
|
|
138
|
+
displayName: 'Job Id',
|
|
139
|
+
description: '',
|
|
140
|
+
required: true,
|
|
141
|
+
}),
|
|
122
142
|
},
|
|
123
143
|
async run(context) {
|
|
124
144
|
const token = await getAccessToken(context.auth);
|
|
125
145
|
const baseUrl = context.auth.props.baseUrl;
|
|
126
146
|
|
|
127
|
-
const url = `${baseUrl}/api/v2/public/jobs
|
|
147
|
+
const url = `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files/${context.propsValue.id}`;
|
|
128
148
|
|
|
129
149
|
const response = await httpClient.sendRequest({
|
|
130
150
|
method: HttpMethod.DELETE,
|
|
131
|
-
url: `${baseUrl}/api/v2/public/jobs
|
|
151
|
+
url: `${baseUrl}/api/v2/public/jobs/${context.propsValue.jobId}/stages/${context.propsValue.stageId}/files/${context.propsValue.id}`,
|
|
132
152
|
headers: {
|
|
133
153
|
Authorization: `Bearer ${token}`,
|
|
134
154
|
'Content-Type': 'application/json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stages-resources.d.ts","sourceRoot":"","sources":["stages-resources.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qCAAqC;;;;;;;;;EAyDhD,CAAC;AAEH,eAAO,MAAM,uCAAuC;;;;;;;;
|
|
1
|
+
{"version":3,"file":"stages-resources.d.ts","sourceRoot":"","sources":["stages-resources.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qCAAqC;;;;;;;;;EAyDhD,CAAC;AAEH,eAAO,MAAM,uCAAuC;;;;;;;;EA+ClD,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;;;;;EAwC/C,CAAC;AAEH,eAAO,MAAM,yCAAyC;;;;;;;;EAwCpD,CAAC;AAEH,eAAO,MAAM,wCAAwC;;;;;;;;EAwCnD,CAAC;AAEH,eAAO,MAAM,6CAA6C;;;;;;;;;;EAmExD,CAAC"}
|