@activepieces/piece-microsoft-excel-365 0.0.19 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/index.js +43 -17
- package/src/index.js.map +1 -1
- package/src/lib/actions/clear-cells-by-range.d.ts +6 -0
- package/src/lib/actions/clear-cells-by-range.js +68 -0
- package/src/lib/actions/clear-cells-by-range.js.map +1 -0
- package/src/lib/actions/clear-column-by-index.d.ts +6 -0
- package/src/lib/actions/clear-column-by-index.js +74 -0
- package/src/lib/actions/clear-column-by-index.js.map +1 -0
- package/src/lib/actions/clear-row-by-id.d.ts +6 -0
- package/src/lib/actions/clear-row-by-id.js +70 -0
- package/src/lib/actions/clear-row-by-id.js.map +1 -0
- package/src/lib/actions/create-worksheet.d.ts +5 -0
- package/src/lib/actions/create-worksheet.js +81 -0
- package/src/lib/actions/create-worksheet.js.map +1 -0
- package/src/lib/actions/find-row.d.ts +7 -0
- package/src/lib/actions/find-row.js +107 -0
- package/src/lib/actions/find-row.js.map +1 -0
- package/src/lib/actions/get-cells-in-range.d.ts +5 -0
- package/src/lib/actions/get-cells-in-range.js +44 -0
- package/src/lib/actions/get-cells-in-range.js.map +1 -0
- package/src/lib/actions/get-row-by-id.d.ts +6 -0
- package/src/lib/actions/get-row-by-id.js +61 -0
- package/src/lib/actions/get-row-by-id.js.map +1 -0
- package/src/lib/actions/get-worksheet-by-id.d.ts +4 -0
- package/src/lib/actions/get-worksheet-by-id.js +37 -0
- package/src/lib/actions/get-worksheet-by-id.js.map +1 -0
- package/src/lib/actions/rename-worksheet.d.ts +5 -0
- package/src/lib/actions/rename-worksheet.js +51 -0
- package/src/lib/actions/rename-worksheet.js.map +1 -0
- package/src/lib/common/common.d.ts +3 -3
- package/src/lib/common/common.js +55 -71
- package/src/lib/common/common.js.map +1 -1
- package/src/lib/trigger/new-row-in-table.d.ts +17 -0
- package/src/lib/trigger/new-row-in-table.js +139 -0
- package/src/lib/trigger/new-row-in-table.js.map +1 -0
- package/src/lib/trigger/new-worksheet.d.ts +8 -0
- package/src/lib/trigger/new-worksheet.js +94 -0
- package/src/lib/trigger/new-worksheet.js.map +1 -0
- package/src/lib/trigger/updated-row.d.ts +14 -0
- package/src/lib/trigger/updated-row.js +129 -0
- package/src/lib/trigger/updated-row.js.map +1 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newRowInTableTrigger = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_framework_2 = require("@activepieces/pieces-framework");
|
|
7
|
+
const common_1 = require("../common/common");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
const shared_1 = require("@activepieces/shared");
|
|
10
|
+
const __1 = require("../..");
|
|
11
|
+
// Helper function to get all rows from a specific table
|
|
12
|
+
function getTableRows(auth, workbookId, tableId) {
|
|
13
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
var _a;
|
|
15
|
+
try {
|
|
16
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
17
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
18
|
+
url: `${common_1.excelCommon.baseUrl}/items/${workbookId}/workbook/tables/${encodeURIComponent(tableId)}/rows`,
|
|
19
|
+
authentication: {
|
|
20
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
21
|
+
token: auth.access_token,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
return (_a = response.body.value) !== null && _a !== void 0 ? _a : [];
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
throw new Error(`Failed to fetch table rows: ${error}`);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const polling = {
|
|
32
|
+
strategy: pieces_common_1.DedupeStrategy.LAST_ITEM,
|
|
33
|
+
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue, lastItemId, store }) {
|
|
34
|
+
const rows = yield getTableRows(auth, propsValue.workbook_id, propsValue.table_id);
|
|
35
|
+
if (rows.length === 0) {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
const cachedHeaders = yield store.get('table_headers');
|
|
39
|
+
let headers = [];
|
|
40
|
+
if (cachedHeaders && cachedHeaders.length > 0) {
|
|
41
|
+
headers = cachedHeaders;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
try {
|
|
45
|
+
headers = yield common_1.excelCommon.getTableHeaders(propsValue.workbook_id, auth.access_token, propsValue.worksheet_id, propsValue.table_id);
|
|
46
|
+
yield store.put('table_headers', headers);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
headers = [];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const processedRows = rows.map(row => {
|
|
53
|
+
var _a, _b;
|
|
54
|
+
let rowData = {};
|
|
55
|
+
if (propsValue.has_headers && headers.length > 0) {
|
|
56
|
+
// Map values to header keys
|
|
57
|
+
rowData = headers.reduce((acc, header, index) => {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
acc[header] = (_b = (_a = row.values[0]) === null || _a === void 0 ? void 0 : _a[index]) !== null && _b !== void 0 ? _b : null;
|
|
60
|
+
return acc;
|
|
61
|
+
}, {});
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
// Use default column letter keys (A, B, C...)
|
|
65
|
+
rowData = (_b = (_a = row.values[0]) === null || _a === void 0 ? void 0 : _a.reduce((acc, value, index) => {
|
|
66
|
+
acc[common_1.excelCommon.numberToColumnName(index + 1)] = value;
|
|
67
|
+
return acc;
|
|
68
|
+
}, {})) !== null && _b !== void 0 ? _b : {};
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
id: row.index, // The row's zero-based index is its unique ID
|
|
72
|
+
data: {
|
|
73
|
+
rowIndex: row.index,
|
|
74
|
+
values: rowData
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
// The polling helper will filter for new rows where the ID (row.index) is greater than lastItemId
|
|
79
|
+
const newItems = processedRows.filter(item => (0, shared_1.isNil)(lastItemId) || item.id > lastItemId);
|
|
80
|
+
return newItems;
|
|
81
|
+
})
|
|
82
|
+
};
|
|
83
|
+
exports.newRowInTableTrigger = (0, pieces_framework_1.createTrigger)({
|
|
84
|
+
auth: __1.excelAuth,
|
|
85
|
+
name: 'new_row_in_table',
|
|
86
|
+
displayName: 'New Row in Table',
|
|
87
|
+
description: 'Fires when a new row is added to a table within a worksheet.',
|
|
88
|
+
props: {
|
|
89
|
+
workbook_id: common_1.excelCommon.workbook_id,
|
|
90
|
+
worksheet_id: common_1.excelCommon.worksheet_id,
|
|
91
|
+
table_id: common_1.excelCommon.table_id,
|
|
92
|
+
has_headers: pieces_framework_1.Property.Checkbox({
|
|
93
|
+
displayName: "My table has headers",
|
|
94
|
+
description: "Enable this if the first row of your table is a header row.",
|
|
95
|
+
required: true,
|
|
96
|
+
defaultValue: true,
|
|
97
|
+
})
|
|
98
|
+
},
|
|
99
|
+
type: pieces_framework_2.TriggerStrategy.POLLING,
|
|
100
|
+
sampleData: {
|
|
101
|
+
"rowIndex": 0,
|
|
102
|
+
"values": {
|
|
103
|
+
"ID": 1,
|
|
104
|
+
"Name": "John Doe",
|
|
105
|
+
"Email": "john.doe@example.com"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
109
|
+
yield pieces_common_1.pollingHelper.onEnable(polling, {
|
|
110
|
+
auth: context.auth,
|
|
111
|
+
store: context.store,
|
|
112
|
+
propsValue: context.propsValue,
|
|
113
|
+
});
|
|
114
|
+
}),
|
|
115
|
+
onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
116
|
+
yield pieces_common_1.pollingHelper.onDisable(polling, {
|
|
117
|
+
auth: context.auth,
|
|
118
|
+
store: context.store,
|
|
119
|
+
propsValue: context.propsValue,
|
|
120
|
+
});
|
|
121
|
+
}),
|
|
122
|
+
run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
123
|
+
return yield pieces_common_1.pollingHelper.poll(polling, {
|
|
124
|
+
auth: context.auth,
|
|
125
|
+
store: context.store,
|
|
126
|
+
propsValue: context.propsValue,
|
|
127
|
+
files: context.files,
|
|
128
|
+
});
|
|
129
|
+
}),
|
|
130
|
+
test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
131
|
+
return yield pieces_common_1.pollingHelper.test(polling, {
|
|
132
|
+
auth: context.auth,
|
|
133
|
+
store: context.store,
|
|
134
|
+
propsValue: context.propsValue,
|
|
135
|
+
files: context.files,
|
|
136
|
+
});
|
|
137
|
+
}),
|
|
138
|
+
});
|
|
139
|
+
//# sourceMappingURL=new-row-in-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-row-in-table.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/microsoft-excel-365/src/lib/trigger/new-row-in-table.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,qEAAiE;AACjE,6CAA+C;AAC/C,+DAOqC;AACrC,iDAA6C;AAC7C,6BAAkC;AAOlC,wDAAwD;AACxD,SAAe,YAAY,CAAC,IAAyB,EAAE,UAAkB,EAAE,OAAe;;;QACtF,IAAI,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAwB;gBACjE,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,oBAAW,CAAC,OAAO,UAAU,UAAU,oBAAoB,kBAAkB,CAAC,OAAO,CAAC,OAAO;gBACrG,cAAc,EAAE;oBACZ,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAA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AU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACvB,CAAC,CAAC;IACP,CAAC,CAAA;IAED,IAAI,EAAE,CAAO,OAAO,EAAE,EAAE;QACpB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE;YACrC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACvB,CAAC,CAAC;IACP,CAAC,CAAA;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const newWorksheetTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
3
|
+
workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
4
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
5
|
+
workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
6
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
7
|
+
workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newWorksheetTrigger = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_framework_2 = require("@activepieces/pieces-framework");
|
|
7
|
+
const common_1 = require("../common/common");
|
|
8
|
+
const __1 = require("../..");
|
|
9
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
10
|
+
function getWorksheets(auth, workbookId) {
|
|
11
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
var _a;
|
|
13
|
+
if (!workbookId)
|
|
14
|
+
return [];
|
|
15
|
+
try {
|
|
16
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
17
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
18
|
+
url: `${common_1.excelCommon.baseUrl}/items/${workbookId}/workbook/worksheets`,
|
|
19
|
+
authentication: {
|
|
20
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
21
|
+
token: auth.access_token
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
return (_a = response.body.value) !== null && _a !== void 0 ? _a : [];
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
throw new Error(`Failed to fetch worksheets: ${error}`);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const polling = {
|
|
32
|
+
strategy: pieces_common_1.DedupeStrategy.LAST_ITEM,
|
|
33
|
+
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue, store }) {
|
|
34
|
+
var _b;
|
|
35
|
+
const worksheets = yield getWorksheets(auth, propsValue.workbook_id);
|
|
36
|
+
const storedWorksheetIds = (_b = yield store.get('worksheet_ids')) !== null && _b !== void 0 ? _b : [];
|
|
37
|
+
const newWorksheets = worksheets.filter(ws => !storedWorksheetIds.includes(ws.id));
|
|
38
|
+
const currentWorksheetIds = worksheets.map(ws => ws.id);
|
|
39
|
+
yield store.put('worksheet_ids', currentWorksheetIds);
|
|
40
|
+
const processedWorksheets = newWorksheets.map((worksheet) => ({
|
|
41
|
+
id: worksheet.id,
|
|
42
|
+
data: worksheet
|
|
43
|
+
}));
|
|
44
|
+
return processedWorksheets;
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
exports.newWorksheetTrigger = (0, pieces_framework_1.createTrigger)({
|
|
48
|
+
auth: __1.excelAuth,
|
|
49
|
+
name: 'new_worksheet',
|
|
50
|
+
displayName: 'New Worksheet',
|
|
51
|
+
description: 'Fires when a new worksheet is created in a workbook.',
|
|
52
|
+
props: {
|
|
53
|
+
workbook_id: common_1.excelCommon.workbook_id
|
|
54
|
+
},
|
|
55
|
+
type: pieces_framework_2.TriggerStrategy.POLLING,
|
|
56
|
+
sampleData: {
|
|
57
|
+
'@odata.id': '/workbook/worksheets(%27%7B00000000-0001-0000-0100-000000000000%7D%27)',
|
|
58
|
+
id: '{00000000-0001-0000-0100-000000000000}',
|
|
59
|
+
name: 'Sheet2',
|
|
60
|
+
position: 1,
|
|
61
|
+
visibility: 'Visible'
|
|
62
|
+
},
|
|
63
|
+
onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
+
yield pieces_common_1.pollingHelper.onEnable(polling, {
|
|
65
|
+
auth: context.auth,
|
|
66
|
+
store: context.store,
|
|
67
|
+
propsValue: context.propsValue
|
|
68
|
+
});
|
|
69
|
+
}),
|
|
70
|
+
onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
71
|
+
yield pieces_common_1.pollingHelper.onDisable(polling, {
|
|
72
|
+
auth: context.auth,
|
|
73
|
+
store: context.store,
|
|
74
|
+
propsValue: context.propsValue
|
|
75
|
+
});
|
|
76
|
+
}),
|
|
77
|
+
run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
78
|
+
return yield pieces_common_1.pollingHelper.poll(polling, {
|
|
79
|
+
auth: context.auth,
|
|
80
|
+
store: context.store,
|
|
81
|
+
propsValue: context.propsValue,
|
|
82
|
+
files: context.files
|
|
83
|
+
});
|
|
84
|
+
}),
|
|
85
|
+
test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
86
|
+
return yield pieces_common_1.pollingHelper.test(polling, {
|
|
87
|
+
auth: context.auth,
|
|
88
|
+
store: context.store,
|
|
89
|
+
propsValue: context.propsValue,
|
|
90
|
+
files: context.files
|
|
91
|
+
});
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=new-worksheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-worksheet.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/microsoft-excel-365/src/lib/trigger/new-worksheet.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,qEAAiE;AACjE,6CAA+C;AAC/C,6BAAkC;AAClC,+DAOqC;AASrC,SAAe,aAAa,CAC1B,IAAyB,EACzB,UAAkB;;;QAElB,IAAI,CAAC,UAAU;YAAE,OAAO,EAAE,CAAC;QAE3B,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAyB;gBACpE,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,oBAAW,CAAC,OAAO,UAAU,UAAU,sBAAsB;gBACrE,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,IAAI,CAAC,YAAY;iBACzB;aACF,CAAC,CAAC;YACH,OAAO,MAAA,QAAQ,CAAC,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,+BAA+B,KAAK,EAAE,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;CAAA;AAED,MAAM,OAAO,GAA0D;IACrE,QAAQ,EAAE,8BAAc,CAAC,SAAS;IAClC,KAAK,EAAE,KAAoC,EAAE,oDAA/B,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;;QACvC,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,IAA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,KAAK;YACpB,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B,CAAC,CAAC;IACL,CAAC,CAAA;IAED,SAAS,EAAE,CAAO,OAAO,EAAE,EAAE;QAC3B,MAAM,6BAAa,CAAC,SAAS,CAAC,OAAO,EAAE;YACrC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B,CAAC,CAAC;IACL,CAAC,CAAA;IAED,GAAG,EAAE,CAAO,OAAO,EAAE,EAAE;QACrB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE;YACvC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;IACL,CAAC,CAAA;IAED,IAAI,EAAE,CAAO,OAAO,EAAE,EAAE;QACtB,OAAO,MAAM,6BAAa,CAAC,IAAI,CAAC,OAAO,EAAE;YACvC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;IACL,CAAC,CAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const updatedRowTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
3
|
+
workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
4
|
+
worksheet_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
5
|
+
has_headers: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
6
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
7
|
+
workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
8
|
+
worksheet_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
9
|
+
has_headers: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
10
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>, {
|
|
11
|
+
workbook_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
12
|
+
worksheet_id: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
13
|
+
has_headers: import("@activepieces/pieces-framework").CheckboxProperty<true>;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatedRowTrigger = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_framework_2 = require("@activepieces/pieces-framework");
|
|
7
|
+
const common_1 = require("../common/common");
|
|
8
|
+
const __1 = require("../..");
|
|
9
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
10
|
+
const node_crypto_1 = require("node:crypto");
|
|
11
|
+
const triggerName = 'updated_row';
|
|
12
|
+
function createRowHash(rowData) {
|
|
13
|
+
const rowString = JSON.stringify(rowData);
|
|
14
|
+
return (0, node_crypto_1.createHmac)('sha1', 'activepieces').update(rowString).digest('hex');
|
|
15
|
+
}
|
|
16
|
+
// Helper function to get all worksheet rows with error handling
|
|
17
|
+
function getWorksheetRows(auth, workbookId, worksheetId) {
|
|
18
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
try {
|
|
20
|
+
return yield common_1.excelCommon.getAllRows(workbookId, worksheetId, auth.access_token);
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
throw new Error(`Failed to fetch worksheet rows: ${error}`);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
// Polling implementation using the framework's best practices
|
|
28
|
+
const polling = {
|
|
29
|
+
strategy: pieces_common_1.DedupeStrategy.TIMEBASED,
|
|
30
|
+
items: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, propsValue, store }) {
|
|
31
|
+
var _b;
|
|
32
|
+
const allRows = yield getWorksheetRows(auth, propsValue.workbook_id, propsValue.worksheet_id);
|
|
33
|
+
if (allRows.length === 0) {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
// Get stored row hashes from previous run
|
|
37
|
+
const oldHashes = (_b = yield store.get('row_hashes')) !== null && _b !== void 0 ? _b : {};
|
|
38
|
+
const headers = (propsValue.has_headers && allRows.length > 0) ? allRows[0] : [];
|
|
39
|
+
const dataRows = (propsValue.has_headers && allRows.length > 0) ? allRows.slice(1) : allRows;
|
|
40
|
+
const currentHashes = {};
|
|
41
|
+
const changedItems = [];
|
|
42
|
+
const currentTime = Date.now();
|
|
43
|
+
// Process each data row
|
|
44
|
+
dataRows.forEach((row, index) => {
|
|
45
|
+
const rowIndex = propsValue.has_headers ? index + 1 : index;
|
|
46
|
+
const newHash = createRowHash(row);
|
|
47
|
+
currentHashes[rowIndex] = newHash;
|
|
48
|
+
const oldHash = oldHashes[rowIndex];
|
|
49
|
+
// Row has changed or is new
|
|
50
|
+
if (oldHash !== newHash) {
|
|
51
|
+
const formattedRow = {};
|
|
52
|
+
if (propsValue.has_headers && headers.length > 0) {
|
|
53
|
+
headers.forEach((header, colIndex) => {
|
|
54
|
+
var _a;
|
|
55
|
+
formattedRow[String(header)] = (_a = row[colIndex]) !== null && _a !== void 0 ? _a : null;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
row.forEach((cell, colIndex) => {
|
|
60
|
+
formattedRow[common_1.excelCommon.numberToColumnName(colIndex + 1)] = cell;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
changedItems.push({
|
|
64
|
+
epochMilliSeconds: currentTime,
|
|
65
|
+
data: {
|
|
66
|
+
rowIndex: rowIndex + 1, // Make it 1-based for user readability
|
|
67
|
+
values: formattedRow,
|
|
68
|
+
changeType: oldHash ? 'updated' : 'added'
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
// Update stored hashes for next run
|
|
74
|
+
yield store.put('row_hashes', currentHashes);
|
|
75
|
+
return changedItems;
|
|
76
|
+
})
|
|
77
|
+
};
|
|
78
|
+
exports.updatedRowTrigger = (0, pieces_framework_1.createTrigger)({
|
|
79
|
+
auth: __1.excelAuth,
|
|
80
|
+
name: triggerName,
|
|
81
|
+
displayName: 'Updated Row',
|
|
82
|
+
description: 'Fires when a row (in a worksheet) is added or updated.',
|
|
83
|
+
props: {
|
|
84
|
+
workbook_id: common_1.excelCommon.workbook_id,
|
|
85
|
+
worksheet_id: common_1.excelCommon.worksheet_id,
|
|
86
|
+
has_headers: pieces_framework_1.Property.Checkbox({
|
|
87
|
+
displayName: "First row has headers",
|
|
88
|
+
description: "Enable this if the first row of your worksheet should be treated as headers.",
|
|
89
|
+
required: true,
|
|
90
|
+
defaultValue: false,
|
|
91
|
+
})
|
|
92
|
+
},
|
|
93
|
+
type: pieces_framework_2.TriggerStrategy.POLLING,
|
|
94
|
+
sampleData: {
|
|
95
|
+
"rowIndex": 1,
|
|
96
|
+
"values": { "ID": 101, "Product": "Widget", "Price": 19.99 }
|
|
97
|
+
},
|
|
98
|
+
onEnable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
99
|
+
yield pieces_common_1.pollingHelper.onEnable(polling, {
|
|
100
|
+
auth: context.auth,
|
|
101
|
+
store: context.store,
|
|
102
|
+
propsValue: context.propsValue,
|
|
103
|
+
});
|
|
104
|
+
}),
|
|
105
|
+
onDisable: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
106
|
+
yield pieces_common_1.pollingHelper.onDisable(polling, {
|
|
107
|
+
auth: context.auth,
|
|
108
|
+
store: context.store,
|
|
109
|
+
propsValue: context.propsValue,
|
|
110
|
+
});
|
|
111
|
+
}),
|
|
112
|
+
run: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
113
|
+
return yield pieces_common_1.pollingHelper.poll(polling, {
|
|
114
|
+
auth: context.auth,
|
|
115
|
+
store: context.store,
|
|
116
|
+
propsValue: context.propsValue,
|
|
117
|
+
files: context.files,
|
|
118
|
+
});
|
|
119
|
+
}),
|
|
120
|
+
test: (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
121
|
+
return yield pieces_common_1.pollingHelper.test(polling, {
|
|
122
|
+
auth: context.auth,
|
|
123
|
+
store: context.store,
|
|
124
|
+
propsValue: context.propsValue,
|
|
125
|
+
files: context.files,
|
|
126
|
+
});
|
|
127
|
+
}),
|
|
128
|
+
});
|
|
129
|
+
//# sourceMappingURL=updated-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updated-row.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/microsoft-excel-365/src/lib/trigger/updated-row.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,qEAAiE;AACjE,6CAA+C;AAC/C,6BAAkC;AAClC,+DAIqC;AACrC,6CAAyC;AAEzC,MAAM,WAAW,GAAG,aAAa,CAAC;AAElC,SAAS,aAAa,CAAC,OAAkB;IACrC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC1C,OAAO,IAAA,wBAAU,EAAC,MAAM,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC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