@activepieces/piece-zoho-books 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.
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # pieces-zoho-books
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build pieces-zoho-books` to build the library.
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@activepieces/piece-zoho-books",
3
+ "version": "0.0.1",
4
+ "dependencies": {
5
+ "@sinclair/typebox": "0.26.8",
6
+ "axios": "1.6.7",
7
+ "dayjs": "1.11.9",
8
+ "is-base64": "1.1.0",
9
+ "lodash": "4.17.21",
10
+ "nanoid": "3.3.6",
11
+ "semver": "7.6.0",
12
+ "@activepieces/pieces-common": "0.2.13",
13
+ "@activepieces/pieces-framework": "0.7.30",
14
+ "@activepieces/shared": "0.10.105",
15
+ "tslib": "1.14.1"
16
+ },
17
+ "main": "./src/index.js",
18
+ "type": "commonjs"
19
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const zohoBooksAuth: import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>;
2
+ export declare const zohoBooks: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props>>;
package/src/index.js ADDED
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zohoBooks = exports.zohoBooksAuth = void 0;
4
+ const pieces_common_1 = require("@activepieces/pieces-common");
5
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
6
+ const shared_1 = require("@activepieces/shared");
7
+ exports.zohoBooksAuth = pieces_framework_1.PieceAuth.OAuth2({
8
+ props: {
9
+ location: pieces_framework_1.Property.StaticDropdown({
10
+ displayName: 'Location',
11
+ description: 'The location of your Zoho Books account',
12
+ required: true,
13
+ options: {
14
+ options: [
15
+ {
16
+ label: 'zoho.eu (Europe)',
17
+ value: 'zoho.eu',
18
+ },
19
+ {
20
+ label: 'zoho.com (United States)',
21
+ value: 'zoho.com',
22
+ },
23
+ {
24
+ label: 'zoho.com.au (Australia)',
25
+ value: 'zoho.com.au',
26
+ },
27
+ {
28
+ label: 'zoho.jp (Japan)',
29
+ value: 'zoho.jp',
30
+ },
31
+ {
32
+ label: 'zoho.in (India)',
33
+ value: 'zoho.in',
34
+ },
35
+ {
36
+ label: 'zohocloud.ca (Canada)',
37
+ value: 'zohocloud.ca',
38
+ },
39
+ ],
40
+ },
41
+ }),
42
+ },
43
+ description: 'Authentication for Zoho Books',
44
+ scope: ['ZohoBooks.fullaccess.all'],
45
+ authUrl: 'https://accounts.{location}/oauth/v2/auth',
46
+ tokenUrl: 'https://accounts.{location}/oauth/v2/token',
47
+ required: true,
48
+ });
49
+ exports.zohoBooks = (0, pieces_framework_1.createPiece)({
50
+ displayName: "Zoho Books",
51
+ description: 'Comprehensive online accounting software for small businesses.',
52
+ logoUrl: "https://cdn.activepieces.com/pieces/zoho-books.png",
53
+ minimumSupportedRelease: '0.20.0',
54
+ categories: [shared_1.PieceCategory.ACCOUNTING],
55
+ authors: ["ikus060"],
56
+ auth: exports.zohoBooksAuth,
57
+ actions: [
58
+ (0, pieces_common_1.createCustomApiCallAction)({
59
+ baseUrl: (auth) => `https://${auth.data['location']}/books/v3`,
60
+ auth: exports.zohoBooksAuth,
61
+ authMapping: (auth) => ({
62
+ Authorization: `Bearer ${auth.access_token}`,
63
+ }),
64
+ }),
65
+ ],
66
+ triggers: [],
67
+ });
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/zoho-books/src/index.ts"],"names":[],"mappings":";;;AAAA,+DAAwE;AACxE,qEAKwC;AACxC,iDAAqD;AAExC,QAAA,aAAa,GAAG,4BAAS,CAAC,MAAM,CAAC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