@activepieces/piece-microsoft-365-planner 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -13
- package/src/index.js +21 -63
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/create-bucket.d.ts +0 -6
- package/src/lib/actions/create-bucket.d.ts.map +0 -1
- package/src/lib/actions/create-bucket.js +0 -28
- package/src/lib/actions/create-bucket.js.map +0 -1
- package/src/lib/actions/create-plan.d.ts +0 -5
- package/src/lib/actions/create-plan.d.ts.map +0 -1
- package/src/lib/actions/create-plan.js +0 -36
- package/src/lib/actions/create-plan.js.map +0 -1
- package/src/lib/actions/create-task.d.ts +0 -11
- package/src/lib/actions/create-task.d.ts.map +0 -1
- package/src/lib/actions/create-task.js +0 -83
- package/src/lib/actions/create-task.js.map +0 -1
- package/src/lib/actions/delete-bucket.d.ts +0 -5
- package/src/lib/actions/delete-bucket.d.ts.map +0 -1
- package/src/lib/actions/delete-bucket.js +0 -29
- package/src/lib/actions/delete-bucket.js.map +0 -1
- package/src/lib/actions/delete-task.d.ts +0 -5
- package/src/lib/actions/delete-task.d.ts.map +0 -1
- package/src/lib/actions/delete-task.js +0 -29
- package/src/lib/actions/delete-task.js.map +0 -1
- package/src/lib/actions/find-a-plan.d.ts +0 -4
- package/src/lib/actions/find-a-plan.d.ts.map +0 -1
- package/src/lib/actions/find-a-plan.js +0 -26
- package/src/lib/actions/find-a-plan.js.map +0 -1
- package/src/lib/actions/find-task.d.ts +0 -5
- package/src/lib/actions/find-task.d.ts.map +0 -1
- package/src/lib/actions/find-task.js +0 -31
- package/src/lib/actions/find-task.js.map +0 -1
- package/src/lib/actions/get-a-bucket.d.ts +0 -5
- package/src/lib/actions/get-a-bucket.d.ts.map +0 -1
- package/src/lib/actions/get-a-bucket.js +0 -29
- package/src/lib/actions/get-a-bucket.js.map +0 -1
- package/src/lib/actions/update-bucket.d.ts +0 -7
- package/src/lib/actions/update-bucket.d.ts.map +0 -1
- package/src/lib/actions/update-bucket.js +0 -34
- package/src/lib/actions/update-bucket.js.map +0 -1
- package/src/lib/actions/update-plan.d.ts +0 -5
- package/src/lib/actions/update-plan.d.ts.map +0 -1
- package/src/lib/actions/update-plan.js +0 -34
- package/src/lib/actions/update-plan.js.map +0 -1
- package/src/lib/actions/update-task.d.ts +0 -11
- package/src/lib/actions/update-task.d.ts.map +0 -1
- package/src/lib/actions/update-task.js +0 -84
- package/src/lib/actions/update-task.js.map +0 -1
- package/src/lib/common/index.d.ts +0 -49
- package/src/lib/common/index.d.ts.map +0 -1
- package/src/lib/common/index.js +0 -192
- package/src/lib/common/index.js.map +0 -1
- package/src/lib/common/microsoft-cloud.d.ts +0 -5
- package/src/lib/common/microsoft-cloud.d.ts.map +0 -1
- package/src/lib/common/microsoft-cloud.js +0 -38
- package/src/lib/common/microsoft-cloud.js.map +0 -1
- package/src/lib/common/properties.d.ts +0 -16
- package/src/lib/common/properties.d.ts.map +0 -1
- package/src/lib/common/properties.js +0 -150
- package/src/lib/common/properties.js.map +0 -1
- package/src/lib/common/types.d.ts +0 -59
- package/src/lib/common/types.d.ts.map +0 -1
- package/src/lib/common/types.js +0 -3
- package/src/lib/common/types.js.map +0 -1
- package/src/lib/triggers/new-plan-created.d.ts +0 -3
- package/src/lib/triggers/new-plan-created.d.ts.map +0 -1
- package/src/lib/triggers/new-plan-created.js +0 -52
- package/src/lib/triggers/new-plan-created.js.map +0 -1
- package/src/lib/triggers/new-task-assigned-to-user.d.ts +0 -11
- package/src/lib/triggers/new-task-assigned-to-user.d.ts.map +0 -1
- package/src/lib/triggers/new-task-assigned-to-user.js +0 -67
- package/src/lib/triggers/new-task-assigned-to-user.js.map +0 -1
- package/src/lib/triggers/new-task-created.d.ts +0 -11
- package/src/lib/triggers/new-task-created.d.ts.map +0 -1
- package/src/lib/triggers/new-task-created.js +0 -93
- package/src/lib/triggers/new-task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B,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAE7C,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAEnD,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBACf,SAAQ,oBAAoB,EAC1B,IAAI,CACF,WAAW,EACT,0BAA0B,GAC1B,oBAAoB,GACpB,aAAa,GACb,mBAAmB,GACnB,WAAW,GACX,iBAAiB,GACjB,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,gBAAgB,GAChB,2BAA2B,GAC3B,uBAAuB,GACvB,SAAS,GACT,yBAAyB,CAC5B;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IAClE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC;AAEnC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,IAAI,EAAE,CAAC;CACf"}
|
package/src/lib/common/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/common/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newPlanCreated: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {}>;
|
|
3
|
-
//# sourceMappingURL=new-plan-created.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-plan-created.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-plan-created.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAoBxC,eAAO,MAAM,cAAc,kwBAwBzB,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newPlanCreated = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
8
|
-
const common_1 = require("../common");
|
|
9
|
-
const polling = {
|
|
10
|
-
strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
|
|
11
|
-
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
12
|
-
const items = yield common_1.microsoft365PlannerCommon.listPlans({
|
|
13
|
-
auth,
|
|
14
|
-
});
|
|
15
|
-
return items.map((item) => ({
|
|
16
|
-
epochMilliSeconds: (0, dayjs_1.default)(item.createdDateTime).valueOf(),
|
|
17
|
-
data: item,
|
|
18
|
-
}));
|
|
19
|
-
}),
|
|
20
|
-
};
|
|
21
|
-
exports.newPlanCreated = (0, pieces_framework_1.createTrigger)({
|
|
22
|
-
auth: common_1.microsoft365PlannerAuth,
|
|
23
|
-
name: 'newPlanCreated',
|
|
24
|
-
displayName: 'New Plan Created',
|
|
25
|
-
description: 'Triggers when a new Plan is created in Microsoft 365 Planner.',
|
|
26
|
-
props: {},
|
|
27
|
-
sampleData: {},
|
|
28
|
-
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
29
|
-
test(context) {
|
|
30
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
return yield pieces_common_1.pollingHelper.test(polling, context);
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
onEnable(context) {
|
|
35
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
const { store, auth, propsValue } = context;
|
|
37
|
-
yield pieces_common_1.pollingHelper.onEnable(polling, { store, auth, propsValue });
|
|
38
|
-
});
|
|
39
|
-
},
|
|
40
|
-
onDisable(context) {
|
|
41
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
const { store, auth, propsValue } = context;
|
|
43
|
-
yield pieces_common_1.pollingHelper.onDisable(polling, { store, auth, propsValue });
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
run(context) {
|
|
47
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
return yield pieces_common_1.pollingHelper.poll(polling, context);
|
|
49
|
-
});
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=new-plan-created.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-plan-created.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-plan-created.ts"],"names":[],"mappings":";;;;AAAA,+DAIqC;AACrC,qEAKwC;AACxC,0DAA0B;AAC1B,sCAA+E;AAE/E,MAAM,OAAO,GAGT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAAiB,EAAE,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QACpD,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newTaskAssignedToUser: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
3
|
-
planId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
4
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
5
|
-
planId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
6
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
7
|
-
planId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
8
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
9
|
-
planId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=new-task-assigned-to-user.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-task-assigned-to-user.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-task-assigned-to-user.ts"],"names":[],"mappings":"AAKA,OAAO,EAKH,eAAe,EAClB,MAAM,gCAAgC,CAAC;AAsCxC,eAAO,MAAM,qBAAqB;;;;;;;;EAyBhC,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newTaskAssignedToUser = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
8
|
-
const common_1 = require("../common");
|
|
9
|
-
const properties_1 = require("../common/properties");
|
|
10
|
-
const props = {
|
|
11
|
-
planId: (0, properties_1.PlanDropdown)({ required: true }),
|
|
12
|
-
};
|
|
13
|
-
const polling = {
|
|
14
|
-
strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
|
|
15
|
-
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue: { planId } }) {
|
|
16
|
-
if (!planId) {
|
|
17
|
-
return [];
|
|
18
|
-
}
|
|
19
|
-
const user = yield common_1.microsoft365PlannerCommon.getUser({ auth });
|
|
20
|
-
if (!user || !user.id) {
|
|
21
|
-
throw new Error('Unable to fetch authenticated user details.');
|
|
22
|
-
}
|
|
23
|
-
const items = yield common_1.microsoft365PlannerCommon.listTasks({ auth, planId });
|
|
24
|
-
return items
|
|
25
|
-
.filter((item) => {
|
|
26
|
-
const userId = String(user.id);
|
|
27
|
-
return (item.assignments &&
|
|
28
|
-
Object.prototype.hasOwnProperty.call(item.assignments, userId));
|
|
29
|
-
})
|
|
30
|
-
.map((item) => ({
|
|
31
|
-
epochMilliSeconds: (0, dayjs_1.default)(item.createdDateTime).valueOf(),
|
|
32
|
-
data: item,
|
|
33
|
-
}));
|
|
34
|
-
}),
|
|
35
|
-
};
|
|
36
|
-
exports.newTaskAssignedToUser = (0, pieces_framework_1.createTrigger)({
|
|
37
|
-
auth: common_1.microsoft365PlannerAuth,
|
|
38
|
-
name: 'newTaskAssignedToUser',
|
|
39
|
-
displayName: 'New Task Assigned to User',
|
|
40
|
-
description: 'Triggers when a Task is assigned to the authenticated user in Microsoft 365 Planner.',
|
|
41
|
-
props,
|
|
42
|
-
sampleData: {},
|
|
43
|
-
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
44
|
-
test(context) {
|
|
45
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
return yield pieces_common_1.pollingHelper.test(polling, context);
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
onEnable(context) {
|
|
50
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
const { store, auth, propsValue } = context;
|
|
52
|
-
yield pieces_common_1.pollingHelper.onEnable(polling, { store, auth, propsValue });
|
|
53
|
-
});
|
|
54
|
-
},
|
|
55
|
-
onDisable(context) {
|
|
56
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
const { store, auth, propsValue } = context;
|
|
58
|
-
yield pieces_common_1.pollingHelper.onDisable(polling, { store, auth, propsValue });
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
run(context) {
|
|
62
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
return yield pieces_common_1.pollingHelper.poll(polling, context);
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
//# sourceMappingURL=new-task-assigned-to-user.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-task-assigned-to-user.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-task-assigned-to-user.ts"],"names":[],"mappings":";;;;AAAA,+DAIqC;AACrC,qEAMwC;AACxC,0DAA0B;AAC1B,sCAA+E;AAC/E,qDAAoD;AAEpD,MAAM,KAAK,GAAG;IACZ,MAAM,EAAE,IAAA,yBAAY,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,OAAO,GAGT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAAyC,EAAE,oDAApC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE;QAC5C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,kCAAyB,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/D,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACjE,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,kCAAyB,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAC1E,OAAO,KAAK;aACT,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;YACf,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC/B,OAAO,CACL,IAAI,CAAC,WAAW;gBAChB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAC/D,CAAC;QACJ,CAAC,CAA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/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
3
|
-
planId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
4
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
5
|
-
planId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
6
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
7
|
-
planId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
8
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
9
|
-
planId: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=new-task-created.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-task-created.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-task-created.ts"],"names":[],"mappings":"AAKA,OAAO,EAKH,eAAe,EAClB,MAAM,gCAAgC,CAAC;AA6BxC,eAAO,MAAM,cAAc;;;;;;;;EAyDzB,CAAC"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newTaskCreated = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
8
|
-
const common_1 = require("../common");
|
|
9
|
-
const properties_1 = require("../common/properties");
|
|
10
|
-
const props = {
|
|
11
|
-
planId: (0, properties_1.PlanDropdown)({ required: true }),
|
|
12
|
-
};
|
|
13
|
-
const polling = {
|
|
14
|
-
strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
|
|
15
|
-
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue: { planId } }) {
|
|
16
|
-
if (!planId) {
|
|
17
|
-
return [];
|
|
18
|
-
}
|
|
19
|
-
const items = yield common_1.microsoft365PlannerCommon.listTasks({
|
|
20
|
-
auth,
|
|
21
|
-
planId,
|
|
22
|
-
});
|
|
23
|
-
return items.map((item) => ({
|
|
24
|
-
epochMilliSeconds: (0, dayjs_1.default)(item.createdDateTime).valueOf(),
|
|
25
|
-
data: item,
|
|
26
|
-
}));
|
|
27
|
-
}),
|
|
28
|
-
};
|
|
29
|
-
exports.newTaskCreated = (0, pieces_framework_1.createTrigger)({
|
|
30
|
-
auth: common_1.microsoft365PlannerAuth,
|
|
31
|
-
name: 'newTaskCreated',
|
|
32
|
-
displayName: 'New Task Created',
|
|
33
|
-
description: 'Triggers when a new Task is created in Microsoft 365 Planner.',
|
|
34
|
-
props,
|
|
35
|
-
sampleData: {
|
|
36
|
-
'@odata.etag': 'W/"JzEtVGFzayAgQEBAffEBAQEBAQEBARCc="',
|
|
37
|
-
planId: 's58lztas2UyCXSffEjnlVRgWUAFMLw',
|
|
38
|
-
bucketId: 'xZ2RCz88uE6BffffftN-0TKffPGUAB-pQ',
|
|
39
|
-
title: 'test task 123',
|
|
40
|
-
orderHint: '8584411578775238762',
|
|
41
|
-
assigneePriority: '',
|
|
42
|
-
percentComplete: 0,
|
|
43
|
-
startDateTime: null,
|
|
44
|
-
createdDateTime: '2025-10-14T13:36:47.953708Z',
|
|
45
|
-
dueDateTime: null,
|
|
46
|
-
hasDescription: false,
|
|
47
|
-
previewType: 'automatic',
|
|
48
|
-
completedDateTime: null,
|
|
49
|
-
referenceCount: 0,
|
|
50
|
-
checklistItemCount: 0,
|
|
51
|
-
activeChecklistItemCount: 0,
|
|
52
|
-
conversationThreadId: null,
|
|
53
|
-
priority: 5,
|
|
54
|
-
id: 'wvG9lNxhuUO2JuedF9-rimUAFsBA',
|
|
55
|
-
completedBy: null,
|
|
56
|
-
createdBy: {
|
|
57
|
-
user: {
|
|
58
|
-
displayName: null,
|
|
59
|
-
id: '90b3720d-f459-42c1-a02e-6471a1ecb068',
|
|
60
|
-
},
|
|
61
|
-
application: {
|
|
62
|
-
displayName: null,
|
|
63
|
-
id: '5ea0744c-62fa-4a19-99be-99f0869d3182',
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
appliedCategories: {},
|
|
67
|
-
assignments: {},
|
|
68
|
-
},
|
|
69
|
-
type: pieces_framework_1.TriggerStrategy.POLLING,
|
|
70
|
-
test(context) {
|
|
71
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
return yield pieces_common_1.pollingHelper.test(polling, context);
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
onEnable(context) {
|
|
76
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
const { store, auth, propsValue } = context;
|
|
78
|
-
yield pieces_common_1.pollingHelper.onEnable(polling, { store, auth, propsValue });
|
|
79
|
-
});
|
|
80
|
-
},
|
|
81
|
-
onDisable(context) {
|
|
82
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
const { store, auth, propsValue } = context;
|
|
84
|
-
yield pieces_common_1.pollingHelper.onDisable(polling, { store, auth, propsValue });
|
|
85
|
-
});
|
|
86
|
-
},
|
|
87
|
-
run(context) {
|
|
88
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
return yield pieces_common_1.pollingHelper.poll(polling, context);
|
|
90
|
-
});
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
//# sourceMappingURL=new-task-created.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-task-created.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-task-created.ts"],"names":[],"mappings":";;;;AAAA,+DAIqC;AACrC,qEAMwC;AACxC,0DAA0B;AAC1B,sCAA+E;AAC/E,qDAAoD;AAEpD,MAAM,KAAK,GAAG;IACZ,MAAM,EAAE,IAAA,yBAAY,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,OAAO,GAGT;IACF,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAAyC,EAAE,oDAApC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE;QAC5C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,kCAAyB,CAAC,SAAS,CAAC;YACtD,IAAI;YACJ,MAAM;SACP,CAAC,CAAC;QACH,OAAO,KAAK,CAAC,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