@activepieces/piece-monday 0.3.4 → 0.3.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 (81) hide show
  1. package/package.json +7 -15
  2. package/src/index.js +260 -53
  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-column.d.ts +0 -7
  7. package/src/lib/actions/create-column.d.ts.map +0 -1
  8. package/src/lib/actions/create-column.js +0 -44
  9. package/src/lib/actions/create-column.js.map +0 -1
  10. package/src/lib/actions/create-group.d.ts +0 -6
  11. package/src/lib/actions/create-group.d.ts.map +0 -1
  12. package/src/lib/actions/create-group.js +0 -34
  13. package/src/lib/actions/create-group.js.map +0 -1
  14. package/src/lib/actions/create-item.d.ts +0 -9
  15. package/src/lib/actions/create-item.d.ts.map +0 -1
  16. package/src/lib/actions/create-item.js +0 -63
  17. package/src/lib/actions/create-item.js.map +0 -1
  18. package/src/lib/actions/create-update.d.ts +0 -5
  19. package/src/lib/actions/create-update.d.ts.map +0 -1
  20. package/src/lib/actions/create-update.js +0 -36
  21. package/src/lib/actions/create-update.js.map +0 -1
  22. package/src/lib/actions/get-board-values.d.ts +0 -6
  23. package/src/lib/actions/get-board-values.d.ts.map +0 -1
  24. package/src/lib/actions/get-board-values.js +0 -45
  25. package/src/lib/actions/get-board-values.js.map +0 -1
  26. package/src/lib/actions/get-column-values.d.ts +0 -7
  27. package/src/lib/actions/get-column-values.d.ts.map +0 -1
  28. package/src/lib/actions/get-column-values.js +0 -43
  29. package/src/lib/actions/get-column-values.js.map +0 -1
  30. package/src/lib/actions/update-column-values-of-item.d.ts +0 -7
  31. package/src/lib/actions/update-column-values-of-item.d.ts.map +0 -1
  32. package/src/lib/actions/update-column-values-of-item.js +0 -49
  33. package/src/lib/actions/update-column-values-of-item.js.map +0 -1
  34. package/src/lib/actions/update-item-name.d.ts +0 -7
  35. package/src/lib/actions/update-item-name.d.ts.map +0 -1
  36. package/src/lib/actions/update-item-name.js +0 -36
  37. package/src/lib/actions/update-item-name.js.map +0 -1
  38. package/src/lib/actions/upload-file-to-column.d.ts +0 -9
  39. package/src/lib/actions/upload-file-to-column.d.ts.map +0 -1
  40. package/src/lib/actions/upload-file-to-column.js +0 -93
  41. package/src/lib/actions/upload-file-to-column.js.map +0 -1
  42. package/src/lib/auth.d.ts +0 -2
  43. package/src/lib/auth.d.ts.map +0 -1
  44. package/src/lib/auth.js +0 -16
  45. package/src/lib/auth.js.map +0 -1
  46. package/src/lib/common/client.d.ts +0 -100
  47. package/src/lib/common/client.d.ts.map +0 -1
  48. package/src/lib/common/client.js +0 -101
  49. package/src/lib/common/client.js.map +0 -1
  50. package/src/lib/common/constants.d.ts +0 -74
  51. package/src/lib/common/constants.d.ts.map +0 -1
  52. package/src/lib/common/constants.js +0 -133
  53. package/src/lib/common/constants.js.map +0 -1
  54. package/src/lib/common/helper.d.ts +0 -11
  55. package/src/lib/common/helper.d.ts.map +0 -1
  56. package/src/lib/common/helper.js +0 -359
  57. package/src/lib/common/helper.js.map +0 -1
  58. package/src/lib/common/index.d.ts +0 -13
  59. package/src/lib/common/index.d.ts.map +0 -1
  60. package/src/lib/common/index.js +0 -213
  61. package/src/lib/common/index.js.map +0 -1
  62. package/src/lib/common/models.d.ts +0 -83
  63. package/src/lib/common/models.d.ts.map +0 -1
  64. package/src/lib/common/models.js +0 -3
  65. package/src/lib/common/models.js.map +0 -1
  66. package/src/lib/common/mutations.d.ts +0 -10
  67. package/src/lib/common/mutations.d.ts.map +0 -1
  68. package/src/lib/common/mutations.js +0 -85
  69. package/src/lib/common/mutations.js.map +0 -1
  70. package/src/lib/common/queries.d.ts +0 -11
  71. package/src/lib/common/queries.d.ts.map +0 -1
  72. package/src/lib/common/queries.js +0 -162
  73. package/src/lib/common/queries.js.map +0 -1
  74. package/src/lib/triggers/new-item-in-board.d.ts +0 -15
  75. package/src/lib/triggers/new-item-in-board.d.ts.map +0 -1
  76. package/src/lib/triggers/new-item-in-board.js +0 -100
  77. package/src/lib/triggers/new-item-in-board.js.map +0 -1
  78. package/src/lib/triggers/specific-column-updated.d.ts +0 -19
  79. package/src/lib/triggers/specific-column-updated.d.ts.map +0 -1
  80. package/src/lib/triggers/specific-column-updated.js +0 -123
  81. package/src/lib/triggers/specific-column-updated.js.map +0 -1
@@ -1,83 +0,0 @@
1
- import { BoardType, MondayColumnType } from './constants';
2
- export interface MondayColumn {
3
- id: string;
4
- title: string;
5
- type: MondayColumnType;
6
- description?: string;
7
- settings_str: string;
8
- }
9
- export interface ColumnValue {
10
- id: string;
11
- value: string;
12
- text: string;
13
- type: MondayColumnType;
14
- [key: string]: any;
15
- }
16
- export type WorkspaceResponse = {
17
- data: {
18
- workspaces: Workspace[];
19
- };
20
- account_id: number;
21
- };
22
- export interface Workspace {
23
- id: string;
24
- name: string;
25
- }
26
- export interface Group {
27
- id: string;
28
- title: string;
29
- }
30
- export interface SubItem {
31
- id: string;
32
- board: Board;
33
- group: Group;
34
- subscribers: User[];
35
- name: string;
36
- email: string;
37
- created_at: string;
38
- }
39
- export interface Item {
40
- id: string;
41
- board: Board;
42
- group: Group;
43
- name: string;
44
- email: string;
45
- created_at: string;
46
- column_values: ColumnValue[];
47
- subitems: SubItem[];
48
- }
49
- export interface Board {
50
- id: string;
51
- name: string;
52
- groups: Group[];
53
- type: BoardType;
54
- items_page: {
55
- items: Item[];
56
- };
57
- }
58
- export interface Update {
59
- body: string;
60
- id: string;
61
- created_at: string;
62
- creator: {
63
- name: string;
64
- id: string;
65
- };
66
- }
67
- export interface User {
68
- id: string;
69
- name: string;
70
- email: string;
71
- created_at: string;
72
- }
73
- export type BoardResponse = {
74
- data: {
75
- boards: Board[];
76
- };
77
- account_id: number;
78
- };
79
- export interface WebhookInformation {
80
- id: string;
81
- board_id: string;
82
- }
83
- //# sourceMappingURL=models.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../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IACnB,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AACD,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE;QAAE,KAAK,EAAE,IAAI,EAAE,CAAA;KAAE,CAAC;CAC/B;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE;QAAE,MAAM,EAAE,KAAK,EAAE,CAAA;KAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9E,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=models.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/lib/common/models.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- export declare const mondayGraphQLMutations: {
2
- createItem: string;
3
- updateItem: string;
4
- createWebhook: string;
5
- deleteWebhook: string;
6
- createColumn: string;
7
- createGroup: string;
8
- createUpdate: string;
9
- };
10
- //# sourceMappingURL=mutations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/mutations.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;;;;;;;CAgFlC,CAAC"}
@@ -1,85 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mondayGraphQLMutations = void 0;
4
- exports.mondayGraphQLMutations = {
5
- createItem: `
6
- mutation createItem(
7
- $itemName: String!
8
- $boardId: ID!
9
- $groupId: String
10
- $columnValues: JSON
11
- $createLabels: Boolean
12
- ) {
13
- create_item(
14
- item_name: $itemName
15
- board_id: $boardId
16
- group_id: $groupId
17
- column_values: $columnValues
18
- create_labels_if_missing: $createLabels
19
- ) {
20
- id
21
- }
22
- }`,
23
- updateItem: `
24
- mutation updateItem($itemId: ID!, $boardId: ID!, $columnValues: JSON!) {
25
- change_multiple_column_values(
26
- item_id: $itemId
27
- board_id: $boardId
28
- column_values: $columnValues
29
- ) {
30
- id
31
- name
32
- }
33
- }`,
34
- createWebhook: `
35
- mutation createWebhook(
36
- $boardId: ID!
37
- $url: String!
38
- $event: WebhookEventType!
39
- $config: JSON
40
- ) {
41
- create_webhook(
42
- board_id: $boardId
43
- url: $url
44
- event: $event
45
- config: $config
46
- ) {
47
- id
48
- board_id
49
- }
50
- }`,
51
- deleteWebhook: `
52
- mutation deleteWebhook($webhookId: ID!) {
53
- delete_webhook(id: $webhookId) {
54
- id
55
- board_id
56
- }
57
- }`,
58
- createColumn: `
59
- mutation createColumn(
60
- $boardId: ID!
61
- $columnTitle: String!
62
- $columnType: ColumnType!
63
- ) {
64
- create_column(
65
- board_id: $boardId
66
- title: $columnTitle
67
- column_type: $columnType
68
- ) {
69
- id
70
- }
71
- }`,
72
- createGroup: `
73
- mutation createGroup($boardId: ID!, $groupName: String!) {
74
- create_group(board_id: $boardId, group_name: $groupName) {
75
- id
76
- }
77
- }`,
78
- createUpdate: `
79
- mutation createUpdate($itemId: ID!, $body: String!) {
80
- create_update(item_id: $itemId, body: $body) {
81
- id
82
- }
83
- }`,
84
- };
85
- //# sourceMappingURL=mutations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../../../src/lib/common/mutations.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG;IACpC,UAAU,EAAE;;;;;;;;;;;;;;;;;IAiBV;IACF,UAAU,EAAE;;;;;;;;;;IAUV;IACF,aAAa,EAAE;;;;;;;;;;;;;;;;IAgBb;IACF,aAAa,EAAE;;;;;;IAMb;IACF,YAAY,EAAE;;;;;;;;;;;;;IAaZ;IACF,WAAW,EAAE;;;;;IAKX;IACF,YAAY,EAAE;;;;;IAKZ;CACH,CAAC"}
@@ -1,11 +0,0 @@
1
- export declare const mondayGraphQLQueries: {
2
- listWorkspaces: string;
3
- listWorkspaceBoards: string;
4
- listBoardGroups: string;
5
- listBoardColumns: string;
6
- listBoardItems: string;
7
- listUsers: string;
8
- getItemColumnValues: string;
9
- getBoardItemValues: string;
10
- };
11
- //# sourceMappingURL=queries.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/queries.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;CA6JhC,CAAC"}
@@ -1,162 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mondayGraphQLQueries = void 0;
4
- exports.mondayGraphQLQueries = {
5
- listWorkspaces: `
6
- query listWorkspaces($limit: Int)
7
- {
8
- workspaces(limit: $limit)
9
- {
10
- id
11
- name
12
- }
13
- }`,
14
- listWorkspaceBoards: `
15
- query listWorkspaceBoards($workspaceId: ID)
16
- {
17
- boards(workspace_ids: [$workspaceId], order_by: created_at)
18
- {
19
- id
20
- name
21
- type
22
- }
23
- }`,
24
- listBoardGroups: `
25
- query listGroups($boardId: ID!)
26
- {
27
- boards(ids: [$boardId])
28
- {
29
- groups{
30
- id
31
- title
32
- }
33
- }
34
- }`,
35
- listBoardColumns: `
36
- query listBoardColumns($boardId: ID!)
37
- {
38
- boards(ids: [$boardId])
39
- {
40
- columns{
41
- id
42
- title
43
- type
44
- settings_str
45
- description
46
- }
47
- }
48
- }`,
49
- listBoardItems: `
50
- query listBoardItems($boardId: ID!)
51
- {
52
- boards(ids: [$boardId])
53
- {
54
- items_page
55
- {
56
- items{
57
- id
58
- name
59
- }
60
- }
61
- }
62
- }`,
63
- listUsers: `
64
- query listUsers
65
- {
66
- users(newest_first: true)
67
- {
68
- id
69
- name
70
- email
71
- }
72
- }`,
73
- getItemColumnValues: `
74
- query getItemColumnValues($boardId: ID!,$itemId: ID!,$columnIds: [String!])
75
- {
76
- boards(ids: [$boardId])
77
- {
78
- items_page(query_params: {ids: [$itemId]})
79
- {
80
- items{
81
- id
82
- name
83
- column_values(ids: $columnIds){
84
- id
85
- type
86
- value
87
- text
88
- ... on ButtonValue{
89
- label
90
- }
91
- ... on StatusValue{
92
- label
93
- }
94
- ... on VoteValue{
95
- vote_count
96
- }
97
- ... on TagsValue{
98
- tags{
99
- name
100
- }
101
- }
102
- ... on BoardRelationValue {
103
- linked_item_ids
104
- }
105
- ... on DependencyValue {
106
- linked_item_ids
107
- }
108
- ... on WeekValue {
109
- start_date
110
- end_date
111
- }
112
- }
113
- }
114
- }
115
- }
116
- }`,
117
- getBoardItemValues: `
118
- query getItemColumnValues($boardId: ID!,$columnIds: [String!])
119
- {
120
- boards(ids: [$boardId])
121
- {
122
- items_page(query_params: {order_by: {column_id: "__last_updated__",direction: desc}})
123
- {
124
- items{
125
- id
126
- name
127
- column_values(ids: $columnIds){
128
- id
129
- type
130
- value
131
- text
132
- ... on ButtonValue{
133
- label
134
- }
135
- ... on StatusValue{
136
- label
137
- }
138
- ... on VoteValue{
139
- vote_count
140
- }
141
- ... on TagsValue{
142
- tags{
143
- name
144
- }
145
- }
146
- ... on BoardRelationValue {
147
- linked_item_ids
148
- }
149
- ... on DependencyValue {
150
- linked_item_ids
151
- }
152
- ... on WeekValue {
153
- start_date
154
- end_date
155
- }
156
- }
157
- }
158
- }
159
- }
160
- }`,
161
- };
162
- //# sourceMappingURL=queries.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../../src/lib/common/queries.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC,cAAc,EAAE;;;;;;;;MAQZ;IACJ,mBAAmB,EAAE;;;;;;;;;MASjB;IACJ,eAAe,EAAE;;;;;;;;;;MAUb;IACJ,gBAAgB,EAAE;;;;;;;;;;;;;MAad;IACJ,cAAc,EAAE;;;;;;;;;;;;;MAaZ;IACJ,SAAS,EAAE;;;;;;;;;MASP;IACJ,mBAAmB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2CnB;IACF,kBAAkB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2ClB;CACH,CAAC"}
@@ -1,15 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newItemInBoardTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
3
- workspace_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
4
- board_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
5
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
6
- workspace_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
7
- board_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
8
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
9
- workspace_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
10
- board_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
11
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
12
- workspace_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
13
- board_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
14
- }>;
15
- //# sourceMappingURL=new-item-in-board.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-item-in-board.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-item-in-board.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AAOxC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EA0FhC,CAAC"}
@@ -1,100 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newItemInBoardTrigger = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../auth");
7
- const common_1 = require("../common");
8
- const helper_1 = require("../common/helper");
9
- const shared_1 = require("@activepieces/shared");
10
- exports.newItemInBoardTrigger = (0, pieces_framework_1.createTrigger)({
11
- auth: auth_1.mondayAuth,
12
- name: 'monday_new_item_in_board',
13
- displayName: 'New Item in Board',
14
- description: 'Triggers when a new item is created in board.',
15
- aiMetadata: {
16
- description: 'Fires when a new item (row) is created on the selected monday.com board, enriching the payload with the new item\'s column values. Represents an item-creation event scoped to one board.',
17
- },
18
- props: {
19
- workspace_id: common_1.mondayCommon.workspace_id(true),
20
- board_id: common_1.mondayCommon.board_id(true),
21
- },
22
- type: pieces_framework_1.TriggerStrategy.WEBHOOK,
23
- sampleData: {
24
- event: {
25
- userId: 9603417,
26
- originalTriggerUuid: null,
27
- boardId: 1771812698,
28
- pulseId: 1772099344,
29
- pulseName: 'Create_item webhook',
30
- groupId: 'topics',
31
- groupName: 'Group Title',
32
- groupColor: '#579bfc',
33
- isTopGroup: true,
34
- columnValues: {},
35
- app: 'monday',
36
- type: 'create_pulse',
37
- triggerTime: '2021-10-11T09:07:28.210Z',
38
- subscriptionId: 73759690,
39
- triggerUuid: 'b5ed2e17c530f43668de130142445cba',
40
- },
41
- },
42
- onEnable(context) {
43
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
44
- const { board_id } = context.propsValue;
45
- const client = (0, common_1.makeClient)(context.auth);
46
- const res = yield client.createWebhook({
47
- boardId: board_id,
48
- url: context.webhookUrl,
49
- event: "create_item" /* MondayWebhookEventType.CREATE_ITEM */,
50
- });
51
- yield context.store.put('monday_new_item_trigger', res.data);
52
- });
53
- },
54
- onDisable(context) {
55
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
56
- const webhook = yield context.store.get('monday_new_item_trigger');
57
- if (webhook != null) {
58
- const client = (0, common_1.makeClient)(context.auth);
59
- yield client.deleteWebhook({ webhookId: webhook.id });
60
- }
61
- });
62
- },
63
- run(context) {
64
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
65
- const payload = context.payload.body;
66
- const transformedValues = {};
67
- try {
68
- const client = (0, common_1.makeClient)(context.auth);
69
- const res = yield client.getItemColumnValues({
70
- boardId: payload.event.boardId,
71
- itemId: payload.event.pulseId,
72
- });
73
- const item = res.data.boards[0].items_page.items[0];
74
- for (const column of item.column_values) {
75
- transformedValues[column.id] = (0, helper_1.parseMondayColumnValue)(column);
76
- }
77
- }
78
- catch (e) {
79
- console.error(e);
80
- }
81
- const enriched = [
82
- Object.assign(Object.assign({}, payload), { columnValues: transformedValues }),
83
- ];
84
- return enriched;
85
- });
86
- },
87
- handshakeConfiguration: {
88
- strategy: shared_1.WebhookHandshakeStrategy.BODY_PARAM_PRESENT,
89
- paramName: 'challenge',
90
- },
91
- onHandshake(context) {
92
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
93
- return {
94
- status: 200,
95
- body: { challenge: context.payload.body['challenge'] },
96
- };
97
- });
98
- },
99
- });
100
- //# sourceMappingURL=new-item-in-board.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-item-in-board.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-item-in-board.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,kCAAqC;AACrC,sCAAqD;AAErD,6CAA0D;AAE1D,iDAAgE;AACnD,QAAA,qBAAqB,GAAG,IAAA,gCAAa,EAAC;IACjD,IAAI,EAAE,iBAAU;IAChB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,+CAA+C;IAC5D,UAAU,EAAE;QACV,WAAW,EAAE,2LAA2L;KACzM;IACD,KAAK,EAAE;QACL,YAAY,EAAE,qBAAY,CAAC,YAAY,CAAC,IAAI,CAAC;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CACF,CAAC,CAAC"}
@@ -1,19 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const specificColumnValueUpdatedTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
3
- workspace_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
4
- board_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
5
- column_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
6
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
7
- workspace_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
8
- board_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
9
- column_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
10
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
11
- workspace_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
12
- board_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
13
- column_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
14
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
15
- workspace_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
16
- board_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>> | import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
17
- column_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
18
- }>;
19
- //# sourceMappingURL=specific-column-updated.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"specific-column-updated.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/specific-column-updated.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AASxC,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;EAiH5C,CAAC"}
@@ -1,123 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.specificColumnValueUpdatedTrigger = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../auth");
7
- const common_1 = require("../common");
8
- const constants_1 = require("../common/constants");
9
- const shared_1 = require("@activepieces/shared");
10
- exports.specificColumnValueUpdatedTrigger = (0, pieces_framework_1.createTrigger)({
11
- auth: auth_1.mondayAuth,
12
- name: 'monday_specific_column_updated',
13
- displayName: 'Specific Column Value Updated in Board',
14
- description: 'Triggers when a specific column value is updated in board.',
15
- aiMetadata: {
16
- description: 'Fires when the value of one chosen column changes on the selected monday.com board. Represents a single-column update event, carrying both the new and previous values for that column.',
17
- },
18
- props: {
19
- workspace_id: common_1.mondayCommon.workspace_id(true),
20
- board_id: common_1.mondayCommon.board_id(true),
21
- column_id: pieces_framework_1.Property.Dropdown({
22
- auth: auth_1.mondayAuth,
23
- displayName: 'Column ID',
24
- required: true,
25
- refreshers: ['board_id'],
26
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, board_id }) {
27
- if (!auth || !board_id) {
28
- return {
29
- disabled: true,
30
- placeholder: 'connect your account first and select workspace board.',
31
- options: [],
32
- };
33
- }
34
- const client = (0, common_1.makeClient)(auth);
35
- const res = yield client.listBoardColumns({
36
- boardId: board_id,
37
- });
38
- return {
39
- disabled: false,
40
- options: res.data.boards[0].columns
41
- .filter((column) => !constants_1.MondayNotWritableColumnType.includes(column.type))
42
- .map((column) => {
43
- return {
44
- label: column.title,
45
- value: column.id,
46
- };
47
- }),
48
- };
49
- }),
50
- }),
51
- },
52
- type: pieces_framework_1.TriggerStrategy.WEBHOOK,
53
- sampleData: {
54
- event: {
55
- app: 'monday',
56
- type: 'update_column_value',
57
- triggerTime: '2024-01-08T04:41:55.245Z',
58
- subscriptionId: 3209024,
59
- userId: 53812737,
60
- originalTriggerUuid: null,
61
- boardId: 1835745535,
62
- groupId: 'topics',
63
- pulseId: 1835700420,
64
- pulseName: 'Sample Item',
65
- columnId: 'country',
66
- columnType: 'country',
67
- columnTitle: 'Country',
68
- value: {
69
- countryCode: 'AW',
70
- countryName: 'Aruba',
71
- changed_at: '2024-01-08T04:42:00.109Z',
72
- },
73
- previousValue: {
74
- changed_at: '2024-01-08T04:41:39.461Z',
75
- countryCode: 'IO',
76
- countryName: 'British Indian Ocean Territory',
77
- },
78
- changedAt: 1704688953.239433,
79
- isTopGroup: true,
80
- triggerUuid: '72a1ec82ea678e03b55b050711b71e9d',
81
- },
82
- },
83
- onEnable(context) {
84
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
85
- const { board_id, column_id } = context.propsValue;
86
- const client = (0, common_1.makeClient)(context.auth);
87
- const res = yield client.createWebhook({
88
- boardId: board_id,
89
- url: context.webhookUrl,
90
- event: "change_specific_column_value" /* MondayWebhookEventType.CHANGE_SPECIFIC_COLUMN_VALUE */,
91
- config: JSON.stringify({ columnId: column_id }),
92
- });
93
- yield context.store.put('monday_specific_column_updated', res.data);
94
- });
95
- },
96
- onDisable(context) {
97
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
98
- const webhook = yield context.store.get('monday_specific_column_updated');
99
- if (webhook != null) {
100
- const client = (0, common_1.makeClient)(context.auth);
101
- yield client.deleteWebhook({ webhookId: webhook.id });
102
- }
103
- });
104
- },
105
- run(context) {
106
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
107
- return [context.payload.body];
108
- });
109
- },
110
- handshakeConfiguration: {
111
- strategy: shared_1.WebhookHandshakeStrategy.BODY_PARAM_PRESENT,
112
- paramName: 'challenge',
113
- },
114
- onHandshake(context) {
115
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
116
- return {
117
- status: 200,
118
- body: { challenge: context.payload.body['challenge'] },
119
- };
120
- });
121
- },
122
- });
123
- //# sourceMappingURL=specific-column-updated.js.map