@activepieces/piece-microsoft-365-planner 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/package.json +7 -15
  2. package/src/index.js +21 -63
  3. package/src/index.d.ts +0 -2
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/create-bucket.d.ts +0 -6
  7. package/src/lib/actions/create-bucket.d.ts.map +0 -1
  8. package/src/lib/actions/create-bucket.js +0 -33
  9. package/src/lib/actions/create-bucket.js.map +0 -1
  10. package/src/lib/actions/create-plan.d.ts +0 -5
  11. package/src/lib/actions/create-plan.d.ts.map +0 -1
  12. package/src/lib/actions/create-plan.js +0 -41
  13. package/src/lib/actions/create-plan.js.map +0 -1
  14. package/src/lib/actions/create-task.d.ts +0 -11
  15. package/src/lib/actions/create-task.d.ts.map +0 -1
  16. package/src/lib/actions/create-task.js +0 -88
  17. package/src/lib/actions/create-task.js.map +0 -1
  18. package/src/lib/actions/delete-bucket.d.ts +0 -5
  19. package/src/lib/actions/delete-bucket.d.ts.map +0 -1
  20. package/src/lib/actions/delete-bucket.js +0 -34
  21. package/src/lib/actions/delete-bucket.js.map +0 -1
  22. package/src/lib/actions/delete-task.d.ts +0 -5
  23. package/src/lib/actions/delete-task.d.ts.map +0 -1
  24. package/src/lib/actions/delete-task.js +0 -34
  25. package/src/lib/actions/delete-task.js.map +0 -1
  26. package/src/lib/actions/find-a-plan.d.ts +0 -4
  27. package/src/lib/actions/find-a-plan.d.ts.map +0 -1
  28. package/src/lib/actions/find-a-plan.js +0 -31
  29. package/src/lib/actions/find-a-plan.js.map +0 -1
  30. package/src/lib/actions/find-task.d.ts +0 -5
  31. package/src/lib/actions/find-task.d.ts.map +0 -1
  32. package/src/lib/actions/find-task.js +0 -36
  33. package/src/lib/actions/find-task.js.map +0 -1
  34. package/src/lib/actions/get-a-bucket.d.ts +0 -5
  35. package/src/lib/actions/get-a-bucket.d.ts.map +0 -1
  36. package/src/lib/actions/get-a-bucket.js +0 -34
  37. package/src/lib/actions/get-a-bucket.js.map +0 -1
  38. package/src/lib/actions/update-bucket.d.ts +0 -7
  39. package/src/lib/actions/update-bucket.d.ts.map +0 -1
  40. package/src/lib/actions/update-bucket.js +0 -39
  41. package/src/lib/actions/update-bucket.js.map +0 -1
  42. package/src/lib/actions/update-plan.d.ts +0 -5
  43. package/src/lib/actions/update-plan.d.ts.map +0 -1
  44. package/src/lib/actions/update-plan.js +0 -39
  45. package/src/lib/actions/update-plan.js.map +0 -1
  46. package/src/lib/actions/update-task.d.ts +0 -11
  47. package/src/lib/actions/update-task.d.ts.map +0 -1
  48. package/src/lib/actions/update-task.js +0 -89
  49. package/src/lib/actions/update-task.js.map +0 -1
  50. package/src/lib/common/index.d.ts +0 -49
  51. package/src/lib/common/index.d.ts.map +0 -1
  52. package/src/lib/common/index.js +0 -192
  53. package/src/lib/common/index.js.map +0 -1
  54. package/src/lib/common/microsoft-cloud.d.ts +0 -5
  55. package/src/lib/common/microsoft-cloud.d.ts.map +0 -1
  56. package/src/lib/common/microsoft-cloud.js +0 -38
  57. package/src/lib/common/microsoft-cloud.js.map +0 -1
  58. package/src/lib/common/properties.d.ts +0 -16
  59. package/src/lib/common/properties.d.ts.map +0 -1
  60. package/src/lib/common/properties.js +0 -150
  61. package/src/lib/common/properties.js.map +0 -1
  62. package/src/lib/common/types.d.ts +0 -59
  63. package/src/lib/common/types.d.ts.map +0 -1
  64. package/src/lib/common/types.js +0 -3
  65. package/src/lib/common/types.js.map +0 -1
  66. package/src/lib/triggers/new-plan-created.d.ts +0 -3
  67. package/src/lib/triggers/new-plan-created.d.ts.map +0 -1
  68. package/src/lib/triggers/new-plan-created.js +0 -55
  69. package/src/lib/triggers/new-plan-created.js.map +0 -1
  70. package/src/lib/triggers/new-task-assigned-to-user.d.ts +0 -11
  71. package/src/lib/triggers/new-task-assigned-to-user.d.ts.map +0 -1
  72. package/src/lib/triggers/new-task-assigned-to-user.js +0 -70
  73. package/src/lib/triggers/new-task-assigned-to-user.js.map +0 -1
  74. package/src/lib/triggers/new-task-created.d.ts +0 -11
  75. package/src/lib/triggers/new-task-created.d.ts.map +0 -1
  76. package/src/lib/triggers/new-task-created.js +0 -96
  77. package/src/lib/triggers/new-task-created.js.map +0 -1
@@ -1,59 +0,0 @@
1
- import { OAuth2PropertyValue } from '@activepieces/pieces-framework';
2
- import { Group, PlannerBucket, PlannerPlan, PlannerPlanContainer, PlannerTask, User } from '@microsoft/microsoft-graph-types';
3
- export interface AuthenticationParams {
4
- auth: OAuth2PropertyValue;
5
- }
6
- export interface GenericDetailParams extends AuthenticationParams {
7
- id: string;
8
- }
9
- export interface ListPlansResponse {
10
- value: PlannerPlan[];
11
- }
12
- export interface ListGroupsResponse {
13
- value: Group[];
14
- }
15
- export interface ListBucketsParams extends AuthenticationParams {
16
- planId: string;
17
- }
18
- export interface ListBucketsResponse {
19
- value: PlannerBucket[];
20
- }
21
- export interface ListTasksParams extends AuthenticationParams {
22
- planId: string;
23
- }
24
- export interface ListTasksResponse {
25
- value: PlannerTask[];
26
- }
27
- export interface CreatePlanParams extends AuthenticationParams {
28
- title: string;
29
- container: PlannerPlanContainer;
30
- }
31
- export type CreatePlanResponse = PlannerPlan;
32
- export interface CreateBucketParams extends AuthenticationParams, Omit<PlannerBucket, 'id'> {
33
- }
34
- export type CreateBucketResponse = PlannerBucket;
35
- export interface CreateTaskParams extends AuthenticationParams, Omit<PlannerTask, 'id'> {
36
- }
37
- export type CreateTaskResponse = PlannerTask;
38
- export type DeleteBucketParams = GenericDetailParams;
39
- export type DeleteTaskParams = GenericDetailParams;
40
- export interface UpdatePlanParams extends AuthenticationParams {
41
- id: string;
42
- title: string;
43
- }
44
- export interface UpdateBucketParams extends AuthenticationParams {
45
- id: string;
46
- name?: string;
47
- orderHint?: string;
48
- }
49
- export interface UpdateTaskParams extends AuthenticationParams, Omit<PlannerTask, 'activeChecklistItemCount' | 'checklistItemCount' | 'completedBy' | 'completedDateTime' | 'createdBy' | 'createdDateTime' | 'hasDescription' | 'planId' | 'previewType' | 'referenceCount' | 'assignedToTaskBoardFormat' | 'bucketTaskBoardFormat' | 'details' | 'progressTaskBoardFormat'> {
50
- id: string;
51
- }
52
- export interface GetBucketDetailsParams extends AuthenticationParams {
53
- bucketId: string;
54
- }
55
- export type GetUserResponse = User;
56
- export interface ListUserResponse {
57
- value: User[];
58
- }
59
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EACL,KAAK,EACL,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,IAAI,EACL,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,EAAE,EAAE,MAAM,CAAC;CACZ;AAGD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,KAAK,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;IAC3D,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,oBAAoB,CAAC;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L=types.js.map
@@ -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,kwBA2BzB,CAAC"}
@@ -1,55 +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
- aiMetadata: {
27
- description: 'Fires when a new plan is created in Microsoft 365 Planner across the authenticated user\'s accessible plans. Polls periodically and emits each newly created plan.',
28
- },
29
- props: {},
30
- sampleData: {},
31
- type: pieces_framework_1.TriggerStrategy.POLLING,
32
- test(context) {
33
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
34
- return yield pieces_common_1.pollingHelper.test(polling, context);
35
- });
36
- },
37
- onEnable(context) {
38
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
39
- const { store, auth, propsValue } = context;
40
- yield pieces_common_1.pollingHelper.onEnable(polling, { store, auth, propsValue });
41
- });
42
- },
43
- onDisable(context) {
44
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
45
- const { store, auth, propsValue } = context;
46
- yield pieces_common_1.pollingHelper.onDisable(polling, { store, auth, propsValue });
47
- });
48
- },
49
- run(context) {
50
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
51
- return yield pieces_common_1.pollingHelper.poll(polling, context);
52
- });
53
- },
54
- });
55
- //# 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,oDAAZ,EAAE,IAAI,EAAE;QACpB,MAAM,KAAK,GAAG,MAAM,kCAAyB,CAAC,SAAS,CAAC;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}
@@ -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;;;;;;;;EA4BhC,CAAC"}
@@ -1,70 +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
- aiMetadata: {
42
- description: 'Fires when a task within a specified Planner plan is assigned to the authenticated (connected) user. Polls periodically and emits each new task in that plan where the current user is among the assignees.',
43
- },
44
- props,
45
- sampleData: {},
46
- type: pieces_framework_1.TriggerStrategy.POLLING,
47
- test(context) {
48
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
49
- return yield pieces_common_1.pollingHelper.test(polling, context);
50
- });
51
- },
52
- onEnable(context) {
53
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
54
- const { store, auth, propsValue } = context;
55
- yield pieces_common_1.pollingHelper.onEnable(polling, { store, auth, propsValue });
56
- });
57
- },
58
- onDisable(context) {
59
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
60
- const { store, auth, propsValue } = context;
61
- yield pieces_common_1.pollingHelper.onDisable(polling, { store, auth, propsValue });
62
- });
63
- },
64
- run(context) {
65
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
66
- return yield pieces_common_1.pollingHelper.poll(polling, context);
67
- });
68
- },
69
- });
70
- //# 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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EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;YAC5C,MAAM,6BAAa,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QACrE,CAAC;KAAA;IAEK,SAAS,CAAC,OAAO;;YACrB,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;YAC5C,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QACtE,CAAC;KAAA;IAEK,GAAG,CAAC,OAAO;;YACf,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpD,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newTaskCreated: 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-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;;;;;;;;EA4DzB,CAAC"}
@@ -1,96 +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
- aiMetadata: {
35
- description: 'Fires when a new task is created within a specified Planner plan. Polls periodically and emits each newly created task for the configured plan.',
36
- },
37
- props,
38
- sampleData: {
39
- '@odata.etag': 'W/"JzEtVGFzayAgQEBAffEBAQEBAQEBARCc="',
40
- planId: 's58lztas2UyCXSffEjnlVRgWUAFMLw',
41
- bucketId: 'xZ2RCz88uE6BffffftN-0TKffPGUAB-pQ',
42
- title: 'test task 123',
43
- orderHint: '8584411578775238762',
44
- assigneePriority: '',
45
- percentComplete: 0,
46
- startDateTime: null,
47
- createdDateTime: '2025-10-14T13:36:47.953708Z',
48
- dueDateTime: null,
49
- hasDescription: false,
50
- previewType: 'automatic',
51
- completedDateTime: null,
52
- referenceCount: 0,
53
- checklistItemCount: 0,
54
- activeChecklistItemCount: 0,
55
- conversationThreadId: null,
56
- priority: 5,
57
- id: 'wvG9lNxhuUO2JuedF9-rimUAFsBA',
58
- completedBy: null,
59
- createdBy: {
60
- user: {
61
- displayName: null,
62
- id: '90b3720d-f459-42c1-a02e-6471a1ecb068',
63
- },
64
- application: {
65
- displayName: null,
66
- id: '5ea0744c-62fa-4a19-99be-99f0869d3182',
67
- },
68
- },
69
- appliedCategories: {},
70
- assignments: {},
71
- },
72
- type: pieces_framework_1.TriggerStrategy.POLLING,
73
- test(context) {
74
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
75
- return yield pieces_common_1.pollingHelper.test(polling, context);
76
- });
77
- },
78
- onEnable(context) {
79
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
80
- const { store, auth, propsValue } = context;
81
- yield pieces_common_1.pollingHelper.onEnable(polling, { store, auth, propsValue });
82
- });
83
- },
84
- onDisable(context) {
85
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
86
- const { store, auth, propsValue } = context;
87
- yield pieces_common_1.pollingHelper.onDisable(polling, { store, auth, propsValue });
88
- });
89
- },
90
- run(context) {
91
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
92
- return yield pieces_common_1.pollingHelper.poll(polling, context);
93
- });
94
- },
95
- });
96
- //# 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,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC1B,iBAAiB,EAAE,IAAA,eAAK,EAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;YACxD,IAAI,EAAE,IAAI;SACX,CAAC,CAAC,CAAC;IACN,CAAC,CAAA;CACF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