@activepieces/piece-omni-co 0.0.1

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 (38) hide show
  1. package/README.md +7 -0
  2. package/package.json +25 -0
  3. package/src/index.d.ts +1 -0
  4. package/src/index.js +45 -0
  5. package/src/index.js.map +1 -0
  6. package/src/lib/actions/create-a-document.d.ts +5 -0
  7. package/src/lib/actions/create-a-document.js +43 -0
  8. package/src/lib/actions/create-a-document.js.map +1 -0
  9. package/src/lib/actions/create-a-schedule.d.ts +13 -0
  10. package/src/lib/actions/create-a-schedule.js +135 -0
  11. package/src/lib/actions/create-a-schedule.js.map +1 -0
  12. package/src/lib/actions/delete-a-document.d.ts +3 -0
  13. package/src/lib/actions/delete-a-document.js +26 -0
  14. package/src/lib/actions/delete-a-document.js.map +1 -0
  15. package/src/lib/actions/delete-a-schedule.d.ts +3 -0
  16. package/src/lib/actions/delete-a-schedule.js +26 -0
  17. package/src/lib/actions/delete-a-schedule.js.map +1 -0
  18. package/src/lib/actions/edit-schedule.d.ts +13 -0
  19. package/src/lib/actions/edit-schedule.js +140 -0
  20. package/src/lib/actions/edit-schedule.js.map +1 -0
  21. package/src/lib/actions/generate-query.d.ts +8 -0
  22. package/src/lib/actions/generate-query.js +68 -0
  23. package/src/lib/actions/generate-query.js.map +1 -0
  24. package/src/lib/actions/move-document.d.ts +5 -0
  25. package/src/lib/actions/move-document.js +49 -0
  26. package/src/lib/actions/move-document.js.map +1 -0
  27. package/src/lib/actions/run-query.d.ts +9 -0
  28. package/src/lib/actions/run-query.js +98 -0
  29. package/src/lib/actions/run-query.js.map +1 -0
  30. package/src/lib/common/auth.d.ts +1 -0
  31. package/src/lib/common/auth.js +34 -0
  32. package/src/lib/common/auth.js.map +1 -0
  33. package/src/lib/common/client.d.ts +3 -0
  34. package/src/lib/common/client.js +27 -0
  35. package/src/lib/common/client.js.map +1 -0
  36. package/src/lib/common/props.d.ts +3 -0
  37. package/src/lib/common/props.js +104 -0
  38. package/src/lib/common/props.js.map +1 -0
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # pieces-omni-co
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build pieces-omni-co` to build the library.
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@activepieces/piece-omni-co",
3
+ "version": "0.0.1",
4
+ "type": "commonjs",
5
+ "main": "./src/index.js",
6
+ "types": "./src/index.d.ts",
7
+ "dependencies": {
8
+ "@sinclair/typebox": "0.34.11",
9
+ "axios": "1.8.3",
10
+ "axios-retry": "4.4.1",
11
+ "deepmerge-ts": "7.1.0",
12
+ "mime-types": "2.1.35",
13
+ "nanoid": "3.3.8",
14
+ "semver": "7.6.0",
15
+ "socket.io-client": "4.8.1",
16
+ "tslib": "^2.3.0",
17
+ "zod": "3.25.76",
18
+ "@activepieces/pieces-common": "0.8.1",
19
+ "@activepieces/pieces-framework": "0.20.2",
20
+ "@activepieces/shared": "0.25.2"
21
+ },
22
+ "resolutions": {
23
+ "rollup": "npm:@rollup/wasm-node"
24
+ }
25
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const omniCo: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
package/src/index.js ADDED
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.omniCo = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const shared_1 = require("@activepieces/shared");
7
+ const auth_1 = require("./lib/common/auth");
8
+ const create_a_document_1 = require("./lib/actions/create-a-document");
9
+ const create_a_schedule_1 = require("./lib/actions/create-a-schedule");
10
+ const delete_a_document_1 = require("./lib/actions/delete-a-document");
11
+ const delete_a_schedule_1 = require("./lib/actions/delete-a-schedule");
12
+ const move_document_1 = require("./lib/actions/move-document");
13
+ const run_query_1 = require("./lib/actions/run-query");
14
+ const edit_schedule_1 = require("./lib/actions/edit-schedule");
15
+ const generate_query_1 = require("./lib/actions/generate-query");
16
+ const pieces_common_1 = require("@activepieces/pieces-common");
17
+ exports.omniCo = (0, pieces_framework_1.createPiece)({
18
+ displayName: 'Omni',
19
+ auth: auth_1.omniAuth,
20
+ minimumSupportedRelease: '0.36.1',
21
+ logoUrl: 'https://cdn.activepieces.com/pieces/omni-co.png',
22
+ categories: [shared_1.PieceCategory.BUSINESS_INTELLIGENCE],
23
+ authors: ['sanket-a11y'],
24
+ actions: [
25
+ create_a_document_1.createADocument,
26
+ create_a_schedule_1.createASchedule,
27
+ delete_a_document_1.deleteADocument,
28
+ delete_a_schedule_1.deleteASchedule,
29
+ edit_schedule_1.editSchedule,
30
+ generate_query_1.generateQuery,
31
+ move_document_1.moveDocument,
32
+ run_query_1.runQuery,
33
+ (0, pieces_common_1.createCustomApiCallAction)({
34
+ baseUrl: () => 'https://blobsrus.omniapp.co/api/v1',
35
+ auth: auth_1.omniAuth,
36
+ authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
37
+ return ({
38
+ Authorization: `Bearer ${auth}`,
39
+ });
40
+ }),
41
+ }),
42
+ ],
43
+ triggers: [],
44
+ });
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/omni-co/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,iDAAqD;AACrD,4CAA6C;AAC7C,uEAAkE;AAClE,uEAAkE;AAClE,uEAAkE;AAClE,uEAAkE;AAClE,+DAA2D;AAC3D,uDAAmD;AACnD,+DAA2D;AAC3D,iEAA6D;AAC7D,+DAAwE;AAE3D,QAAA,MAAM,GAAG,IAAA,8BAAW,EAAC;IAChC,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE,eAAQ;IACd,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,iDAAiD;IAC1D,UAAU,EAAE,CAAC,sBAAa,CAAC,qBAAqB,CAAC;IACjD,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,OAAO,EAAE;QACP,mCAAe;QACf,mCAAe;QACf,mCAAe;QACf,mCAAe;QACf,4BAAY;QACZ,8BAAa;QACb,4BAAY;QACZ,oBAAQ;QACR,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,oCAAoC;YACnD,IAAI,EAAE,eAAQ;YACd,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAU,IAAI,EAAE;iBAChC,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const createADocument: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ modelId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
3
+ name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ queryPresentations: import("@activepieces/pieces-framework").ArrayProperty<false>;
5
+ }>;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createADocument = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ const props_1 = require("../common/props");
10
+ exports.createADocument = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.omniAuth,
12
+ name: 'createADocument',
13
+ displayName: 'Create a document',
14
+ description: 'Creates a new document',
15
+ props: {
16
+ modelId: props_1.modelIdDropdown,
17
+ name: pieces_framework_1.Property.ShortText({
18
+ displayName: 'Document Name',
19
+ description: 'The name of the document',
20
+ required: true,
21
+ }),
22
+ queryPresentations: pieces_framework_1.Property.Array({
23
+ displayName: 'Query Presentations',
24
+ description: "An array of queryPresentation objects, each representing a query in the document's workbook",
25
+ required: false,
26
+ }),
27
+ },
28
+ run(context) {
29
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
30
+ const { modelId, name, queryPresentations } = context.propsValue;
31
+ const body = {
32
+ modelId,
33
+ name,
34
+ };
35
+ if (queryPresentations) {
36
+ body['queryPresentations'] = queryPresentations;
37
+ }
38
+ const response = yield (0, client_1.makeRequest)(context.auth, pieces_common_1.HttpMethod.POST, '/documents', body);
39
+ return response;
40
+ });
41
+ },
42
+ });
43
+ //# sourceMappingURL=create-a-document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-a-document.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/omni-co/src/lib/actions/create-a-document.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA0C;AAC1C,6CAA+C;AAC/C,+DAAyD;AACzD,2CAAkD;AAErC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,wBAAwB;IACrC,KAAK,EAAE;QACL,OAAO,EAAE,uBAAe;QACxB,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,kBAAkB,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACjC,WAAW,EAAE,qBAAqB;YAClC,WAAW,EACT,6FAA6F;YAC/F,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEjE,MAAM,IAAI,GAA4B;gBACpC,OAAO;gBACP,IAAI;aACL,CAAC;YAEF,IAAI,kBAAkB,EAAE,CAAC;gBACvB,IAAI,CAAC,oBAAoB,CAAC,GAAG,kBAAkB,CAAC;YAClD,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAc,EACtB,0BAAU,CAAC,IAAI,EACf,YAAY,EACZ,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const createASchedule: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ identifier: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ schedule: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
+ timezone: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ format: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
+ destinationType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
8
+ url: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ recipients: import("@activepieces/pieces-framework").ArrayProperty<false>;
10
+ subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ paperFormat: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
12
+ paperOrientation: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
13
+ }>;
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createASchedule = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ exports.createASchedule = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.omniAuth,
11
+ name: 'createASchedule',
12
+ displayName: 'Create a schedule',
13
+ description: 'Creates a scheduled task for a dashboard with support for email, SFTP, and webhook destinations',
14
+ props: {
15
+ identifier: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Dashboard Identifier',
17
+ description: ' The string after /dashboards is the dashboards ID; for example: https://blobsrus.omniapp.co/dashboards/12db1a0a',
18
+ required: true,
19
+ }),
20
+ name: pieces_framework_1.Property.ShortText({
21
+ displayName: 'Schedule Name',
22
+ description: 'The name of the schedule/task',
23
+ required: true,
24
+ }),
25
+ schedule: pieces_framework_1.Property.ShortText({
26
+ displayName: 'Schedule (Cron Expression)',
27
+ description: 'Cron expression for the schedule (e.g., "0 9 ? * * *" for 9 AM UTC daily) https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html',
28
+ required: true,
29
+ }),
30
+ timezone: pieces_framework_1.Property.ShortText({
31
+ displayName: 'Timezone',
32
+ description: 'Timezone for the schedule (e.g., "UTC", "America/New_York") Refer : https://data.iana.org/time-zones/tzdb-2021a/zone1970.tab',
33
+ required: true,
34
+ }),
35
+ format: pieces_framework_1.Property.StaticDropdown({
36
+ displayName: 'Format',
37
+ description: 'Output format for the schedule',
38
+ options: {
39
+ disabled: false,
40
+ options: [
41
+ { label: 'Link Only', value: 'link_only' },
42
+ { label: 'PDF', value: 'pdf' },
43
+ { label: 'PNG', value: 'png' },
44
+ { label: 'CSV', value: 'csv' },
45
+ { label: 'XLSX', value: 'xlsx' },
46
+ { label: 'JSON', value: 'json' },
47
+ ],
48
+ },
49
+ required: true,
50
+ }),
51
+ destinationType: pieces_framework_1.Property.StaticDropdown({
52
+ displayName: 'Destination Type',
53
+ description: 'Type of destination for the schedule',
54
+ options: {
55
+ disabled: false,
56
+ options: [
57
+ { label: 'Email', value: 'email' },
58
+ { label: 'Webhook', value: 'webhook' },
59
+ { label: 'SFTP', value: 'sftp' },
60
+ ],
61
+ },
62
+ required: true,
63
+ }),
64
+ url: pieces_framework_1.Property.ShortText({
65
+ displayName: 'URL',
66
+ description: 'Webhook URL (required when destinationType is webhook)',
67
+ required: false,
68
+ }),
69
+ recipients: pieces_framework_1.Property.Array({
70
+ displayName: 'Recipients',
71
+ description: 'Email recipients (required when destinationType is email)',
72
+ required: false,
73
+ }),
74
+ subject: pieces_framework_1.Property.ShortText({
75
+ displayName: 'Email Subject',
76
+ description: 'Subject line for email delivery',
77
+ required: false,
78
+ }),
79
+ paperFormat: pieces_framework_1.Property.StaticDropdown({
80
+ displayName: 'Paper Format',
81
+ description: 'Paper format for PDF output',
82
+ options: {
83
+ disabled: false,
84
+ options: [
85
+ { label: 'Letter', value: 'letter' },
86
+ { label: 'A4', value: 'a4' },
87
+ ],
88
+ },
89
+ required: false,
90
+ }),
91
+ paperOrientation: pieces_framework_1.Property.StaticDropdown({
92
+ displayName: 'Paper Orientation',
93
+ description: 'Paper orientation for PDF output',
94
+ options: {
95
+ disabled: false,
96
+ options: [
97
+ { label: 'Portrait', value: 'portrait' },
98
+ { label: 'Landscape', value: 'landscape' },
99
+ ],
100
+ },
101
+ required: false,
102
+ }),
103
+ },
104
+ run(context) {
105
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
106
+ const { identifier, name, schedule, timezone, format, destinationType, url, recipients, subject, paperFormat, paperOrientation, } = context.propsValue;
107
+ const body = {
108
+ identifier,
109
+ name,
110
+ schedule,
111
+ timezone,
112
+ format,
113
+ destinationType,
114
+ };
115
+ if (url) {
116
+ body['url'] = url;
117
+ }
118
+ if (recipients) {
119
+ body['recipients'] = recipients;
120
+ }
121
+ if (subject) {
122
+ body['subject'] = subject;
123
+ }
124
+ if (paperFormat) {
125
+ body['paperFormat'] = paperFormat;
126
+ }
127
+ if (paperOrientation) {
128
+ body['paperOrientation'] = paperOrientation;
129
+ }
130
+ const response = yield (0, client_1.makeRequest)(context.auth, pieces_common_1.HttpMethod.POST, '/schedules', body);
131
+ return response;
132
+ });
133
+ },
134
+ });
135
+ //# sourceMappingURL=create-a-schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-a-schedule.js","sourceRoot":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AAc,EACtB,0BAAU,CAAC,IAAI,EACf,YAAY,EACZ,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const deleteADocument: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ documentId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
3
+ }>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteADocument = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ const props_1 = require("../common/props");
10
+ exports.deleteADocument = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.omniAuth,
12
+ name: 'deleteADocument',
13
+ displayName: 'Delete a document',
14
+ description: 'Deletes the specified document and places it in the Trash',
15
+ props: {
16
+ documentId: props_1.documentIdDropdown,
17
+ },
18
+ run(context) {
19
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
20
+ const { documentId } = context.propsValue;
21
+ const response = yield (0, client_1.makeRequest)(context.auth, pieces_common_1.HttpMethod.DELETE, `/documents/${documentId}`, {});
22
+ return response;
23
+ });
24
+ },
25
+ });
26
+ //# sourceMappingURL=delete-a-document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-a-document.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/omni-co/src/lib/actions/delete-a-document.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA0C;AAC1C,6CAA+C;AAC/C,+DAAyD;AACzD,2CAAqD;AAExC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,2DAA2D;IACxE,KAAK,EAAE;QACL,UAAU,EAAE,0BAAkB;KAC/B;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE1C,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAc,EACtB,0BAAU,CAAC,MAAM,EACjB,cAAc,UAAU,EAAE,EAC1B,EAAE,CACH,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const deleteASchedule: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ scheduleId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
3
+ }>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteASchedule = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ const props_1 = require("../common/props");
10
+ exports.deleteASchedule = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.omniAuth,
12
+ name: 'deleteASchedule',
13
+ displayName: 'Delete a schedule',
14
+ description: 'Deletes a schedule using its UUID',
15
+ props: {
16
+ scheduleId: props_1.scheduleIdDropdown,
17
+ },
18
+ run(context) {
19
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
20
+ const { scheduleId } = context.propsValue;
21
+ const response = yield (0, client_1.makeRequest)(context.auth, pieces_common_1.HttpMethod.DELETE, `/schedules/${scheduleId}`, {});
22
+ return response;
23
+ });
24
+ },
25
+ });
26
+ //# sourceMappingURL=delete-a-schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-a-schedule.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/omni-co/src/lib/actions/delete-a-schedule.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA0C;AAC1C,6CAA+C;AAC/C,+DAAyD;AACzD,2CAAqD;AAExC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,mCAAmC;IAChD,KAAK,EAAE;QACL,UAAU,EAAE,0BAAkB;KAC/B;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE1C,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAc,EACtB,0BAAU,CAAC,MAAM,EACjB,cAAc,UAAU,EAAE,EAC1B,EAAE,CACH,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const editSchedule: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ scheduleId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
3
+ name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ schedule: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
+ timezone: import("@activepieces/pieces-framework").ShortTextProperty<true>;
6
+ format: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
+ destinationType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
8
+ url: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ recipients: import("@activepieces/pieces-framework").ArrayProperty<false>;
10
+ subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
11
+ paperFormat: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
12
+ paperOrientation: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
13
+ }>;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.editSchedule = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ const props_1 = require("../common/props");
10
+ exports.editSchedule = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.omniAuth,
12
+ name: 'editSchedule',
13
+ displayName: 'Edit schedule',
14
+ description: 'Updates a scheduled task. Only properties included will be updated',
15
+ props: {
16
+ scheduleId: props_1.scheduleIdDropdown,
17
+ name: pieces_framework_1.Property.ShortText({
18
+ displayName: 'Schedule Name',
19
+ description: 'The name of the schedule/task',
20
+ required: true,
21
+ }),
22
+ schedule: pieces_framework_1.Property.ShortText({
23
+ displayName: 'Schedule (Cron Expression)',
24
+ description: 'Cron expression for the schedule (e.g., "0 9 ? * * *" for 9 AM UTC daily) https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html',
25
+ required: true,
26
+ }),
27
+ timezone: pieces_framework_1.Property.ShortText({
28
+ displayName: 'Timezone',
29
+ description: 'Timezone for the schedule (e.g., "UTC", "America/New_York") Refer : https://data.iana.org/time-zones/tzdb-2021a/zone1970.tab',
30
+ required: true,
31
+ }),
32
+ format: pieces_framework_1.Property.StaticDropdown({
33
+ displayName: 'Format',
34
+ description: 'Output format for the schedule',
35
+ options: {
36
+ disabled: false,
37
+ options: [
38
+ { label: 'Link Only', value: 'link_only' },
39
+ { label: 'PDF', value: 'pdf' },
40
+ { label: 'PNG', value: 'png' },
41
+ { label: 'CSV', value: 'csv' },
42
+ { label: 'XLSX', value: 'xlsx' },
43
+ { label: 'JSON', value: 'json' },
44
+ ],
45
+ },
46
+ required: true,
47
+ }),
48
+ destinationType: pieces_framework_1.Property.StaticDropdown({
49
+ displayName: 'Destination Type',
50
+ description: 'Type of destination for the schedule',
51
+ options: {
52
+ disabled: false,
53
+ options: [
54
+ { label: 'Email', value: 'email' },
55
+ { label: 'Webhook', value: 'webhook' },
56
+ { label: 'SFTP', value: 'sftp' },
57
+ ],
58
+ },
59
+ required: true,
60
+ }),
61
+ url: pieces_framework_1.Property.ShortText({
62
+ displayName: 'URL',
63
+ description: 'Webhook URL (required when destinationType is webhook)',
64
+ required: false,
65
+ }),
66
+ recipients: pieces_framework_1.Property.Array({
67
+ displayName: 'Recipients',
68
+ description: 'Email recipients (required when destinationType is email)',
69
+ required: false,
70
+ }),
71
+ subject: pieces_framework_1.Property.ShortText({
72
+ displayName: 'Email Subject',
73
+ description: 'Subject line for email delivery',
74
+ required: false,
75
+ }),
76
+ paperFormat: pieces_framework_1.Property.StaticDropdown({
77
+ displayName: 'Paper Format',
78
+ description: 'Paper format for PDF output',
79
+ options: {
80
+ disabled: false,
81
+ options: [
82
+ { label: 'Letter', value: 'letter' },
83
+ { label: 'A4', value: 'a4' },
84
+ ],
85
+ },
86
+ required: false,
87
+ }),
88
+ paperOrientation: pieces_framework_1.Property.StaticDropdown({
89
+ displayName: 'Paper Orientation',
90
+ description: 'Paper orientation for PDF output',
91
+ options: {
92
+ disabled: false,
93
+ options: [
94
+ { label: 'Portrait', value: 'portrait' },
95
+ { label: 'Landscape', value: 'landscape' },
96
+ ],
97
+ },
98
+ required: false,
99
+ }),
100
+ },
101
+ run(context) {
102
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
103
+ const { scheduleId, name, schedule, timezone, format, destinationType, url, recipients, subject, paperFormat, paperOrientation, } = context.propsValue;
104
+ const body = {};
105
+ if (name) {
106
+ body['name'] = name;
107
+ }
108
+ if (schedule) {
109
+ body['schedule'] = schedule;
110
+ }
111
+ if (timezone) {
112
+ body['timezone'] = timezone;
113
+ }
114
+ if (format) {
115
+ body['format'] = format;
116
+ }
117
+ if (destinationType) {
118
+ body['destinationType'] = destinationType;
119
+ }
120
+ if (url) {
121
+ body['url'] = url;
122
+ }
123
+ if (recipients) {
124
+ body['recipients'] = recipients;
125
+ }
126
+ if (subject) {
127
+ body['subject'] = subject;
128
+ }
129
+ if (paperFormat) {
130
+ body['paperFormat'] = paperFormat;
131
+ }
132
+ if (paperOrientation) {
133
+ body['paperOrientation'] = paperOrientation;
134
+ }
135
+ const response = yield (0, client_1.makeRequest)(context.auth, pieces_common_1.HttpMethod.PUT, `/schedules/${scheduleId}`, body);
136
+ return response;
137
+ });
138
+ },
139
+ });
140
+ //# sourceMappingURL=edit-schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-schedule.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/omni-co/src/lib/actions/edit-schedule.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA0C;AAC1C,6CAA+C;AAC/C,+DAAyD;AACzD,2CAAqD;AAExC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EACT,oEAAoE;IACtE,KAAK,EAAE;QACL,UAAU,EAAE,0BAAkB;QAC9B,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,4BAA4B;YACzC,WAAW,EACT,mKAAmK;YACrK,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EACT,8HAA8H;YAChI,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC9B,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,gCAAgC;YAC7C,O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AC;gBACX,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;YAC1B,CAAC;YAED,IAAI,eAAe,EAAE,CAAC;gBACpB,IAAI,CAAC,iBAAiB,CAAC,GAAG,eAAe,CAAC;YAC5C,CAAC;YAED,IAAI,GAAG,EAAE,CAAC;gBACR,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;YACpB,CAAC;YAED,IAAI,UAAU,EAAE,CAAC;gBACf,IAAI,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC;YAClC,CAAC;YAED,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;YAC5B,CAAC;YAED,IAAI,WAAW,EAAE,CAAC;gBAChB,IAAI,CAAC,aAAa,CAAC,GAAG,WAAW,CAAC;YACpC,CAAC;YAED,IAAI,gBAAgB,EAAE,CAAC;gBACrB,IAAI,CAAC,kBAAkB,CAAC,GAAG,gBAAgB,CAAC;YAC9C,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAc,EACtB,0BAAU,CAAC,GAAG,EACd,cAAc,UAAU,EAAE,EAC1B,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const generateQuery: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ modelId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
3
+ prompt: import("@activepieces/pieces-framework").LongTextProperty<true>;
4
+ currentTopicName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
+ branchId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
+ contextQuery: import("@activepieces/pieces-framework").JsonProperty<false>;
7
+ structured: import("@activepieces/pieces-framework").CheckboxProperty<false>;
8
+ }>;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ const props_1 = require("../common/props");
10
+ exports.generateQuery = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.omniAuth,
12
+ name: 'generateQuery',
13
+ displayName: 'Generate query',
14
+ description: 'Transforms a natural language description into a structured Omni query',
15
+ props: {
16
+ modelId: props_1.modelIdDropdown,
17
+ prompt: pieces_framework_1.Property.LongText({
18
+ displayName: 'Prompt',
19
+ description: 'The natural language description of the query you want to generate (e.g., "Show me all users who signed up in the last month")',
20
+ required: true,
21
+ }),
22
+ currentTopicName: pieces_framework_1.Property.ShortText({
23
+ displayName: 'Current Topic Name',
24
+ description: 'The name of the topic to use as context for the query generation',
25
+ required: false,
26
+ }),
27
+ branchId: pieces_framework_1.Property.ShortText({
28
+ displayName: 'Branch ID',
29
+ description: 'The ID of the model branch to use for query generation. If not provided, the main branch will be used',
30
+ required: false,
31
+ }),
32
+ contextQuery: pieces_framework_1.Property.Json({
33
+ displayName: 'Context Query',
34
+ description: 'The query object to provide as context. This can be used to reference previous queries or provide additional context for the generation',
35
+ required: false,
36
+ }),
37
+ structured: pieces_framework_1.Property.Checkbox({
38
+ displayName: 'Structured Output',
39
+ description: 'When enabled, the API will return a more strictly structured query format',
40
+ required: false,
41
+ defaultValue: false,
42
+ }),
43
+ },
44
+ run(context) {
45
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
46
+ const { modelId, prompt, currentTopicName, branchId, contextQuery, structured, } = context.propsValue;
47
+ const body = {
48
+ modelId,
49
+ prompt,
50
+ };
51
+ if (currentTopicName) {
52
+ body['currentTopicName'] = currentTopicName;
53
+ }
54
+ if (branchId) {
55
+ body['branchId'] = branchId;
56
+ }
57
+ if (contextQuery) {
58
+ body['contextQuery'] = contextQuery;
59
+ }
60
+ if (structured) {
61
+ body['structured'] = structured;
62
+ }
63
+ const response = yield (0, client_1.makeRequest)(context.auth, pieces_common_1.HttpMethod.POST, '/ai/generate-query', body);
64
+ return response;
65
+ });
66
+ },
67
+ });
68
+ //# sourceMappingURL=generate-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-query.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/omni-co/src/lib/actions/generate-query.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA0C;AAC1C,6CAA+C;AAC/C,+DAAyD;AACzD,2CAAkD;AAErC,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EACT,wEAAwE;IAC1E,KAAK,EAAE;QACL,OAAO,EAAE,uBAAe;QACxB,MAAM,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACxB,WAAW,EAAE,QAAQ;YACrB,WAAW,EACT,gIAAgI;YAClI,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,gBAAgB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACnC,WAAW,EAAE,oBAAoB;YACjC,WAAW,EACT,kEAAkE;YACpE,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,WAAW,EACT,uGAAuG;YACzG,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,IAAI,CAAC;YAC1B,WAAW,EAAE,eAAe;YAC5B,WAAW,EACT,yIAAyI;YAC3I,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC5B,WAAW,EAAE,mBAAmB;YAChC,WAAW,EACT,2EAA2E;YAC7E,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EACJ,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,GAAG,OAAO,CAAC,UAAU,CAAC;YAEvB,MAAM,IAAI,GAA4B;gBACpC,OAAO;gBACP,MAAM;aACP,CAAC;YAEF,IAAI,gBAAgB,EAAE,CAAC;gBACrB,IAAI,CAAC,kBAAkB,CAAC,GAAG,gBAAgB,CAAC;YAC9C,CAAC;YAED,IAAI,QAAQ,EAAE,CAAC;gBACb,IAAI,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC;YAC9B,CAAC;YAED,IAAI,YAAY,EAAE,CAAC;gBACjB,IAAI,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC;YACtC,CAAC;YAED,IAAI,UAAU,EAAE,CAAC;gBACf,IAAI,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC;YAClC,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAc,EACtB,0BAAU,CAAC,IAAI,EACf,oBAAoB,EACpB,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const moveDocument: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ identifier: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
3
+ folderPath: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
+ scope: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
5
+ }>;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.moveDocument = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ const props_1 = require("../common/props");
10
+ exports.moveDocument = (0, pieces_framework_1.createAction)({
11
+ auth: auth_1.omniAuth,
12
+ name: 'moveDocument',
13
+ displayName: 'Move document',
14
+ description: 'Moves a document to a new folder or to the root level',
15
+ props: {
16
+ identifier: props_1.documentIdDropdown,
17
+ folderPath: pieces_framework_1.Property.ShortText({
18
+ displayName: 'Folder Path',
19
+ description: 'The path of the destination folder. Use null to move the document to the root level (no folder)',
20
+ required: true,
21
+ }),
22
+ scope: pieces_framework_1.Property.StaticDropdown({
23
+ displayName: 'Scope',
24
+ description: 'Optional sharing scope for the document. If not provided, the scope will be computed',
25
+ options: {
26
+ disabled: false,
27
+ options: [
28
+ { label: 'Organization', value: 'organization' },
29
+ { label: 'Restricted', value: 'restricted' },
30
+ ],
31
+ },
32
+ required: false,
33
+ }),
34
+ },
35
+ run(context) {
36
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
37
+ const { identifier, folderPath, scope } = context.propsValue;
38
+ const body = {
39
+ folderPath: folderPath === 'null' ? null : folderPath,
40
+ };
41
+ if (scope) {
42
+ body['scope'] = scope;
43
+ }
44
+ const response = yield (0, client_1.makeRequest)(context.auth, pieces_common_1.HttpMethod.PUT, `/documents/${identifier}/move`, body);
45
+ return response;
46
+ });
47
+ },
48
+ });
49
+ //# sourceMappingURL=move-document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"move-document.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/omni-co/src/lib/actions/move-document.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA0C;AAC1C,6CAA+C;AAC/C,+DAAyD;AACzD,2CAAqD;AAExC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAQ;IACd,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,uDAAuD;IACpE,KAAK,EAAE;QACL,UAAU,EAAE,0BAAkB;QAC9B,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EACT,iGAAiG;YACnG,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC7B,WAAW,EAAE,OAAO;YACpB,WAAW,EACT,sFAAsF;YACxF,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;oBAChD,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;iBAC7C;aACF;YACD,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE7D,MAAM,IAAI,GAA4B;gBACpC,UAAU,EAAE,UAAU,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU;aACtD,CAAC;YAEF,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;YACxB,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAc,EACtB,0BAAU,CAAC,GAAG,EACd,cAAc,UAAU,OAAO,EAC/B,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const runQuery: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ query: import("@activepieces/pieces-framework").JsonProperty<true>;
3
+ limit: import("@activepieces/pieces-framework").NumberProperty<false>;
4
+ cache: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
5
+ formatResults: import("@activepieces/pieces-framework").CheckboxProperty<false>;
6
+ resultType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
7
+ planOnly: import("@activepieces/pieces-framework").CheckboxProperty<false>;
8
+ userId: import("@activepieces/pieces-framework").ShortTextProperty<false>;
9
+ }>;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const auth_1 = require("../common/auth");
7
+ const client_1 = require("../common/client");
8
+ const pieces_common_1 = require("@activepieces/pieces-common");
9
+ exports.runQuery = (0, pieces_framework_1.createAction)({
10
+ auth: auth_1.omniAuth,
11
+ name: 'runQuery',
12
+ displayName: 'Run query',
13
+ description: 'Runs a query and returns the results as base64 encoded Apache Arrow table or in specified format',
14
+ props: {
15
+ query: pieces_framework_1.Property.Json({
16
+ displayName: 'Query',
17
+ description: "A JSON object representing the query to be run. You can retrieve a query's JSON object from an Omni workbook by opening the Inspector panel (Option + 9 on Mac, Alt + 9 on Windows) and copying the Query structure",
18
+ required: true,
19
+ }),
20
+ limit: pieces_framework_1.Property.Number({
21
+ displayName: 'Limit',
22
+ description: 'Number of rows to be returned (defaults to 1000). Set to null for unlimited results',
23
+ required: false,
24
+ }),
25
+ cache: pieces_framework_1.Property.StaticDropdown({
26
+ displayName: 'Cache Policy',
27
+ description: 'Optional cache policy to control how query caching behaves',
28
+ options: {
29
+ disabled: false,
30
+ options: [
31
+ { label: 'Standard', value: 'Standard' },
32
+ { label: 'Skip Requery (default)', value: 'SkipRequery' },
33
+ { label: 'Skip Cache', value: 'SkipCache' },
34
+ ],
35
+ },
36
+ required: false,
37
+ }),
38
+ formatResults: pieces_framework_1.Property.Checkbox({
39
+ displayName: 'Format Results',
40
+ description: 'Apply formatting to numeric and currency values (currency symbols and thousand separators)',
41
+ required: false,
42
+ defaultValue: true,
43
+ }),
44
+ resultType: pieces_framework_1.Property.StaticDropdown({
45
+ displayName: 'Result Type',
46
+ description: 'Specifies the format of query results. If omitted, returns base64 encoded Apache Arrow format',
47
+ options: {
48
+ disabled: false,
49
+ options: [
50
+ { label: 'CSV', value: 'csv' },
51
+ { label: 'JSON', value: 'json' },
52
+ { label: 'XLSX', value: 'xlsx' },
53
+ ],
54
+ },
55
+ required: false,
56
+ }),
57
+ planOnly: pieces_framework_1.Property.Checkbox({
58
+ displayName: 'Plan Only',
59
+ description: 'If enabled, returns the query execution plan without running the query',
60
+ required: false,
61
+ defaultValue: false,
62
+ }),
63
+ userId: pieces_framework_1.Property.ShortText({
64
+ displayName: 'User ID',
65
+ description: 'Optional UUID to run the query as a specific user',
66
+ required: false,
67
+ }),
68
+ },
69
+ run(context) {
70
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
71
+ const { query, limit, cache, formatResults, resultType, planOnly, userId } = context.propsValue;
72
+ const body = {
73
+ query,
74
+ };
75
+ if (limit !== undefined && limit !== null) {
76
+ body['limit'] = limit;
77
+ }
78
+ if (cache) {
79
+ body['cache'] = cache;
80
+ }
81
+ if (formatResults !== undefined) {
82
+ body['formatResults'] = formatResults;
83
+ }
84
+ if (resultType) {
85
+ body['resultType'] = resultType;
86
+ }
87
+ if (planOnly) {
88
+ body['planOnly'] = planOnly;
89
+ }
90
+ if (userId) {
91
+ body['userId'] = userId;
92
+ }
93
+ const response = yield (0, client_1.makeRequest)(context.auth, pieces_common_1.HttpMethod.POST, '/query/run', body);
94
+ return response;
95
+ });
96
+ },
97
+ });
98
+ //# sourceMappingURL=run-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-query.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/omni-co/src/lib/actions/run-query.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAA0C;AAC1C,6CAA+C;AAC/C,+DAAyD;AAE5C,QAAA,QAAQ,GAAG,IAAA,+BAAY,EAAC;IACnC,IAAI,EAAE,eAAQ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CAAC,IAAI,EACf,YAAY,EACZ,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const omniAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.omniAuth = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const client_1 = require("./client");
7
+ const pieces_common_1 = require("@activepieces/pieces-common");
8
+ exports.omniAuth = pieces_framework_1.PieceAuth.SecretText({
9
+ displayName: 'Omni API Key',
10
+ description: `
11
+ `,
12
+ required: true,
13
+ validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
14
+ if (auth) {
15
+ try {
16
+ yield (0, client_1.makeRequest)(auth, pieces_common_1.HttpMethod.GET, '/models', {});
17
+ return {
18
+ valid: true,
19
+ };
20
+ }
21
+ catch (error) {
22
+ return {
23
+ valid: false,
24
+ error: 'Invalid Api Key',
25
+ };
26
+ }
27
+ }
28
+ return {
29
+ valid: false,
30
+ error: 'Invalid Api Key',
31
+ };
32
+ }),
33
+ });
34
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/omni-co/src/lib/common/auth.ts"],"names":[],"mappings":";;;;AAAA,qEAA2D;AAC3D,qCAAuC;AACvC,+DAAyD;AAE5C,QAAA,QAAQ,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC3C,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE;CACd;IACC,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC;gBACH,MAAM,IAAA,oBAAW,EAAC,IAAc,EAAE,0BAAU,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;gBACjE,OAAO;oBACL,KAAK,EAAE,IAAI;iBACZ,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,iBAAiB;iBACzB,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,iBAAiB;SACzB,CAAC;IACJ,CAAC,CAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { HttpMethod } from '@activepieces/pieces-common';
2
+ export declare const BASE_URL = "https://blobsrus.omniapp.co/api/v1";
3
+ export declare function makeRequest(api_key: string, method: HttpMethod, path: string, body?: unknown): Promise<any>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BASE_URL = void 0;
4
+ exports.makeRequest = makeRequest;
5
+ const tslib_1 = require("tslib");
6
+ const pieces_common_1 = require("@activepieces/pieces-common");
7
+ exports.BASE_URL = `https://blobsrus.omniapp.co/api/v1`;
8
+ function makeRequest(api_key, method, path, body) {
9
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
+ try {
11
+ const response = yield pieces_common_1.httpClient.sendRequest({
12
+ method,
13
+ url: `${exports.BASE_URL}${path}`,
14
+ headers: {
15
+ Authorization: `Bearer ${api_key}`,
16
+ 'Content-Type': 'application/json',
17
+ },
18
+ body,
19
+ });
20
+ return response.body;
21
+ }
22
+ catch (error) {
23
+ throw new Error(`Unexpected error: ${error.message || String(error)}`);
24
+ }
25
+ });
26
+ }
27
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/omni-co/src/lib/common/client.ts"],"names":[],"mappings":";;;AAIA,kCAoBC;;AAxBD,+DAAqE;AAExD,QAAA,QAAQ,GAAG,oCAAoC,CAAC;AAE7D,SAAsB,WAAW,CAC/B,OAAe,EACf,MAAkB,EAClB,IAAY,EACZ,IAAc;;QAEd,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM;gBACN,GAAG,EAAE,GAAG,gBAAQ,GAAG,IAAI,EAAE;gBACzB,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,OAAO,EAAE;oBAClC,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI;aACL,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,qBAAqB,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const modelIdDropdown: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
2
+ export declare const documentIdDropdown: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
3
+ export declare const scheduleIdDropdown: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scheduleIdDropdown = exports.documentIdDropdown = exports.modelIdDropdown = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const client_1 = require("./client");
7
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
8
+ exports.modelIdDropdown = pieces_framework_1.Property.Dropdown({
9
+ displayName: 'Model ID',
10
+ description: 'Select the model containing the database',
11
+ required: true,
12
+ refreshers: [],
13
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
14
+ if (!auth) {
15
+ return {
16
+ disabled: true,
17
+ options: [],
18
+ placeholder: 'Please connect your account first',
19
+ };
20
+ }
21
+ try {
22
+ const models = yield (0, client_1.makeRequest)(auth, pieces_common_1.HttpMethod.GET, '/models', {});
23
+ return {
24
+ disabled: false,
25
+ options: models.records.map((model) => ({
26
+ label: model.name,
27
+ value: model.id,
28
+ })),
29
+ };
30
+ }
31
+ catch (error) {
32
+ return {
33
+ disabled: true,
34
+ options: [],
35
+ placeholder: 'Error loading teams',
36
+ };
37
+ }
38
+ }),
39
+ });
40
+ exports.documentIdDropdown = pieces_framework_1.Property.Dropdown({
41
+ displayName: 'Document',
42
+ description: 'Select the document',
43
+ required: true,
44
+ refreshers: ['auth'],
45
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
46
+ if (!auth) {
47
+ return {
48
+ disabled: true,
49
+ options: [],
50
+ placeholder: 'Please connect your account first',
51
+ };
52
+ }
53
+ try {
54
+ const documents = yield (0, client_1.makeRequest)(auth, pieces_common_1.HttpMethod.GET, `/documents`, {});
55
+ return {
56
+ disabled: false,
57
+ options: documents.records.map((document) => ({
58
+ label: document.name,
59
+ value: document.identifier,
60
+ })),
61
+ };
62
+ }
63
+ catch (error) {
64
+ return {
65
+ disabled: true,
66
+ options: [],
67
+ placeholder: 'Error loading documents',
68
+ };
69
+ }
70
+ }),
71
+ });
72
+ exports.scheduleIdDropdown = pieces_framework_1.Property.Dropdown({
73
+ displayName: 'Schedule',
74
+ description: 'Select the schedule',
75
+ required: true,
76
+ refreshers: ['auth'],
77
+ options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
78
+ if (!auth) {
79
+ return {
80
+ disabled: true,
81
+ options: [],
82
+ placeholder: 'Please connect your account first',
83
+ };
84
+ }
85
+ try {
86
+ const schedules = yield (0, client_1.makeRequest)(auth, pieces_common_1.HttpMethod.GET, `/schedules`, {});
87
+ return {
88
+ disabled: false,
89
+ options: schedules.records.map((schedule) => ({
90
+ label: schedule.name,
91
+ value: schedule.identifier,
92
+ })),
93
+ };
94
+ }
95
+ catch (error) {
96
+ return {
97
+ disabled: true,
98
+ options: [],
99
+ placeholder: 'Error loading schedules',
100
+ };
101
+ }
102
+ }),
103
+ });
104
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/omni-co/src/lib/common/props.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qCAAuC;AACvC,qEAA0D;AAE7C,QAAA,eAAe,GAAG,2BAAQ,CAAC,QAAQ,CAAC;IAC/C,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,0CAA0C;IACvD,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACtB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO;gBACL,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,mCAAmC;aACjD,CAAC;QACJ,CAAC;QAED,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAW,EAC9B,IAAc,EACd,0BAAU,CAAC,GAAG,EACd,SAAS,EACT,EAAE,CACH,CAAC;YAEF,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC;oBAC3C,KAAK,EAAE,KAAK,CAAC,IAAI;oBACjB,KAAK,EAAE,KAAK,CAAC,EAAE;iBAChB,CAAC,CAAC;aACJ,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,qBAAqB;aACnC,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAEU,QAAA,kBAAkB,GAAG,2BAAQ,CAAC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