@dszp/n8n-nodes-onebill 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 (34) hide show
  1. package/README.md +57 -0
  2. package/dist/credentials/OneBillApi.credentials.d.ts +8 -0
  3. package/dist/credentials/OneBillApi.credentials.js +60 -0
  4. package/dist/credentials/OneBillApi.credentials.js.map +1 -0
  5. package/dist/credentials/oneBill.svg +4 -0
  6. package/dist/nodes/OneBill/GenericFunctions.d.ts +6 -0
  7. package/dist/nodes/OneBill/GenericFunctions.js +156 -0
  8. package/dist/nodes/OneBill/GenericFunctions.js.map +1 -0
  9. package/dist/nodes/OneBill/OneBill.node.d.ts +10 -0
  10. package/dist/nodes/OneBill/OneBill.node.js +426 -0
  11. package/dist/nodes/OneBill/OneBill.node.js.map +1 -0
  12. package/dist/nodes/OneBill/OneBill.node.json +18 -0
  13. package/dist/nodes/OneBill/descriptions/InvoiceDescription.d.ts +3 -0
  14. package/dist/nodes/OneBill/descriptions/InvoiceDescription.js +176 -0
  15. package/dist/nodes/OneBill/descriptions/InvoiceDescription.js.map +1 -0
  16. package/dist/nodes/OneBill/descriptions/OrderDescription.d.ts +3 -0
  17. package/dist/nodes/OneBill/descriptions/OrderDescription.js +240 -0
  18. package/dist/nodes/OneBill/descriptions/OrderDescription.js.map +1 -0
  19. package/dist/nodes/OneBill/descriptions/PaymentDescription.d.ts +3 -0
  20. package/dist/nodes/OneBill/descriptions/PaymentDescription.js +209 -0
  21. package/dist/nodes/OneBill/descriptions/PaymentDescription.js.map +1 -0
  22. package/dist/nodes/OneBill/descriptions/ProductDescription.d.ts +3 -0
  23. package/dist/nodes/OneBill/descriptions/ProductDescription.js +260 -0
  24. package/dist/nodes/OneBill/descriptions/ProductDescription.js.map +1 -0
  25. package/dist/nodes/OneBill/descriptions/SubscriberDescription.d.ts +3 -0
  26. package/dist/nodes/OneBill/descriptions/SubscriberDescription.js +453 -0
  27. package/dist/nodes/OneBill/descriptions/SubscriberDescription.js.map +1 -0
  28. package/dist/nodes/OneBill/descriptions/TicketDescription.d.ts +3 -0
  29. package/dist/nodes/OneBill/descriptions/TicketDescription.js +296 -0
  30. package/dist/nodes/OneBill/descriptions/TicketDescription.js.map +1 -0
  31. package/dist/nodes/OneBill/oneBill.svg +4 -0
  32. package/dist/package.json +50 -0
  33. package/dist/tsconfig.tsbuildinfo +1 -0
  34. package/package.json +50 -0
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # n8n-nodes-onebill
2
+
3
+ This is an n8n community node for the [OneBill](https://www.onebillsoftware.com/) billing and subscription management API.
4
+
5
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
6
+
7
+ [Installation](#installation) |
8
+ [Operations](#operations) |
9
+ [Credentials](#credentials) |
10
+ [Resources](#resources)
11
+
12
+ ## Installation
13
+
14
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
15
+
16
+ ## Operations
17
+
18
+ ### Subscriber
19
+ - Create, Get, Get Many, Update, Close, Suspend, Resume, Reopen
20
+ - Get Balance, Get Subscriptions
21
+
22
+ ### Order
23
+ - Create, Get, Get Many, Validate, Activate, Update Quote
24
+
25
+ ### Invoice
26
+ - Get, Get Many, Modify
27
+
28
+ ### Payment
29
+ - Create, Get Many, Get for Subscriber
30
+
31
+ ### Product
32
+ - Create, Get, Get Many, Update, Delete
33
+
34
+ ### Ticket
35
+ - Create, Get, Update, Get History
36
+
37
+ ## Credentials
38
+
39
+ To use this node, you need the following credentials from your OneBill account:
40
+
41
+ | Field | Description |
42
+ |-------|-------------|
43
+ | **Base URL** | Your OneBill instance URL (default: `https://app.onebillsoftware.com`) |
44
+ | **Tenant ID** | Found in Config > Settings > Business Profile > Tenant ID |
45
+ | **Client Secret** | Found in the Business Profile section |
46
+ | **Username** | Your OneBill account username |
47
+ | **Password** | Your OneBill account password (SHA256-hashed automatically) |
48
+ | **Scope** | OAuth scope (default: `trust`) |
49
+
50
+ ## Resources
51
+
52
+ - [OneBill Developer Guide](https://dev.onebillsoftware.com/)
53
+ - [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
54
+
55
+ ## License
56
+
57
+ [MIT](LICENSE)
@@ -0,0 +1,8 @@
1
+ import type { ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
2
+ export declare class OneBillApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ icon: Icon;
7
+ properties: INodeProperties[];
8
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OneBillApi = void 0;
4
+ class OneBillApi {
5
+ constructor() {
6
+ this.name = 'oneBillApi';
7
+ this.displayName = 'OneBill API';
8
+ this.documentationUrl = 'https://dev.onebillsoftware.com/';
9
+ this.icon = 'file:oneBill.svg';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Base URL',
13
+ name: 'baseUrl',
14
+ type: 'string',
15
+ default: 'https://app.onebillsoftware.com',
16
+ placeholder: 'e.g. https://app.onebillsoftware.com',
17
+ description: 'The base URL of your OneBill instance. Do not include a trailing slash.',
18
+ },
19
+ {
20
+ displayName: 'Tenant ID',
21
+ name: 'tenantId',
22
+ type: 'string',
23
+ default: '',
24
+ description: 'Your OneBill Tenant ID. Found in Config > Settings > Business Profile > Tenant ID. Also used as the OAuth client_id.',
25
+ },
26
+ {
27
+ displayName: 'Client Secret',
28
+ name: 'clientSecret',
29
+ type: 'string',
30
+ typeOptions: { password: true },
31
+ default: '',
32
+ description: 'The OAuth client secret. Found in the Business Profile section of the application.',
33
+ },
34
+ {
35
+ displayName: 'Username',
36
+ name: 'username',
37
+ type: 'string',
38
+ default: '',
39
+ description: 'The username for your OneBill account',
40
+ },
41
+ {
42
+ displayName: 'Password',
43
+ name: 'password',
44
+ type: 'string',
45
+ typeOptions: { password: true },
46
+ default: '',
47
+ description: 'The password for your OneBill account. It will be SHA256-hashed automatically before authenticating.',
48
+ },
49
+ {
50
+ displayName: 'Scope',
51
+ name: 'scope',
52
+ type: 'string',
53
+ default: 'trust',
54
+ description: 'OAuth scope. Defaults to "trust" and rarely needs to be changed.',
55
+ },
56
+ ];
57
+ }
58
+ }
59
+ exports.OneBillApi = OneBillApi;
60
+ //# sourceMappingURL=OneBillApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OneBillApi.credentials.js","sourceRoot":"","sources":["../../credentials/OneBillApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,UAAU;IAAvB;QACC,SAAI,GAAG,YAAY,CAAC;QACpB,gBAAW,GAAG,aAAa,CAAC;QAC5B,qBAAgB,GAAG,kCAAkC,CAAC;QACtD,SAAI,GAAS,kBAAkB,CAAC;QAEhC,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,iCAAiC;gBAC1C,WAAW,EAAE,sCAAsC;gBACnD,WAAW,EAAE,yEAAyE;aACtF;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,sHAAsH;aACvH;YACD;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,oFAAoF;aACrF;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,uCAAuC;aACpD;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,WAAW,EACV,sGAAsG;aACvG;YACD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,kEAAkE;aAC/E;SACD,CAAC;IACH,CAAC;CAAA;AAxDD,gCAwDC"}
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
2
+ <circle cx="32" cy="32" r="28" fill="#F26522" />
3
+ <circle cx="32" cy="32" r="14" fill="#FFFFFF" />
4
+ </svg>
@@ -0,0 +1,6 @@
1
+ import type { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions, IWebhookFunctions, IDataObject, IHttpRequestMethods } from 'n8n-workflow';
2
+ export declare function hashPassword(password: string): string;
3
+ export declare function clearTokenCache(cacheKey: string): void;
4
+ export declare function getAccessToken(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, credentials: IDataObject): Promise<string>;
5
+ export declare function oneBillApiRequest(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, qs?: IDataObject): Promise<IDataObject>;
6
+ export declare function oneBillApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, qs?: IDataObject, dataKey?: string, limit?: number): Promise<IDataObject[]>;
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hashPassword = hashPassword;
4
+ exports.clearTokenCache = clearTokenCache;
5
+ exports.getAccessToken = getAccessToken;
6
+ exports.oneBillApiRequest = oneBillApiRequest;
7
+ exports.oneBillApiRequestAllItems = oneBillApiRequestAllItems;
8
+ const crypto_1 = require("crypto");
9
+ const n8n_workflow_1 = require("n8n-workflow");
10
+ const tokenCache = new Map();
11
+ function hashPassword(password) {
12
+ return (0, crypto_1.createHash)('sha256').update(password).digest('hex');
13
+ }
14
+ function clearTokenCache(cacheKey) {
15
+ tokenCache.delete(cacheKey);
16
+ }
17
+ async function getAccessToken(credentials) {
18
+ const tenantId = credentials.tenantId;
19
+ const username = credentials.username;
20
+ const cacheKey = `${tenantId}:${username}`;
21
+ const cached = tokenCache.get(cacheKey);
22
+ if (cached && cached.expiresAt > Date.now()) {
23
+ return cached.token;
24
+ }
25
+ const baseUrl = credentials.baseUrl.replace(/\/$/, '');
26
+ const clientSecret = credentials.clientSecret;
27
+ const password = credentials.password;
28
+ const scope = credentials.scope || 'trust';
29
+ const hashedPassword = hashPassword(password);
30
+ const options = {
31
+ method: 'POST',
32
+ url: `${baseUrl}/oauth/token`,
33
+ qs: {
34
+ grant_type: 'password',
35
+ client_id: tenantId,
36
+ client_secret: clientSecret,
37
+ username,
38
+ password: hashedPassword,
39
+ scope,
40
+ },
41
+ json: true,
42
+ };
43
+ const response = (await this.helpers.httpRequest(options));
44
+ const accessToken = response.access_token;
45
+ const expiresIn = response.expires_in || 3600;
46
+ tokenCache.set(cacheKey, {
47
+ token: accessToken,
48
+ expiresAt: Date.now() + (expiresIn - 300) * 1000,
49
+ });
50
+ return accessToken;
51
+ }
52
+ function checkForApiError(response) {
53
+ if (response.status && response.status !== 'OK' && response.validationResponse) {
54
+ const validation = response.validationResponse;
55
+ const errors = validation.validationErrorInfo;
56
+ const messages = (errors === null || errors === void 0 ? void 0 : errors.map((e) => e.message).join('; ')) || response.status;
57
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), response, {
58
+ message: `OneBill API: ${response.status}`,
59
+ description: messages,
60
+ });
61
+ }
62
+ }
63
+ async function oneBillApiRequest(method, endpoint, body = {}, qs = {}) {
64
+ const credentials = await this.getCredentials('oneBillApi');
65
+ const baseUrl = credentials.baseUrl.replace(/\/$/, '');
66
+ const tenantId = credentials.tenantId;
67
+ let token = await getAccessToken.call(this, credentials);
68
+ const options = {
69
+ method,
70
+ url: `${baseUrl}${endpoint}`,
71
+ headers: {
72
+ Authorization: `Bearer ${token}`,
73
+ 'Content-Type': 'application/json',
74
+ Accept: 'application/json',
75
+ 'X-OB-Tenant-Identifier': tenantId,
76
+ },
77
+ qs,
78
+ json: true,
79
+ };
80
+ if (method !== 'GET' && method !== 'DELETE' && Object.keys(body).length > 0) {
81
+ options.body = body;
82
+ }
83
+ try {
84
+ const response = (await this.helpers.httpRequest(options));
85
+ checkForApiError.call(this, response);
86
+ return response;
87
+ }
88
+ catch (error) {
89
+ if (error.httpCode === '401' || error.statusCode === 401) {
90
+ const cacheKey = `${tenantId}:${credentials.username}`;
91
+ clearTokenCache(cacheKey);
92
+ token = await getAccessToken.call(this, credentials);
93
+ options.headers = {
94
+ ...options.headers,
95
+ Authorization: `Bearer ${token}`,
96
+ };
97
+ try {
98
+ const retryResponse = (await this.helpers.httpRequest(options));
99
+ checkForApiError.call(this, retryResponse);
100
+ return retryResponse;
101
+ }
102
+ catch (retryError) {
103
+ if (retryError instanceof n8n_workflow_1.NodeApiError) {
104
+ throw retryError;
105
+ }
106
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), retryError, {
107
+ message: 'Authentication failed after token refresh',
108
+ });
109
+ }
110
+ }
111
+ if (error instanceof n8n_workflow_1.NodeApiError) {
112
+ throw error;
113
+ }
114
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
115
+ }
116
+ }
117
+ async function oneBillApiRequestAllItems(method, endpoint, body = {}, qs = {}, dataKey, limit) {
118
+ const returnData = [];
119
+ const maxPageSize = 50;
120
+ let startCount = 0;
121
+ let hasMore = true;
122
+ const pageSize = limit && limit < maxPageSize ? limit : maxPageSize;
123
+ qs.resultCount = pageSize;
124
+ qs.countRequired = true;
125
+ while (hasMore) {
126
+ qs.startCount = startCount;
127
+ const response = await oneBillApiRequest.call(this, method, endpoint, body, qs);
128
+ let items;
129
+ if (dataKey && response[dataKey]) {
130
+ items = response[dataKey];
131
+ }
132
+ else if (Array.isArray(response)) {
133
+ items = response;
134
+ }
135
+ else {
136
+ returnData.push(response);
137
+ hasMore = false;
138
+ continue;
139
+ }
140
+ returnData.push(...items);
141
+ if (limit && returnData.length >= limit) {
142
+ return returnData.slice(0, limit);
143
+ }
144
+ const totalCount = response.totalCount || response.total;
145
+ if (!totalCount || returnData.length >= totalCount) {
146
+ hasMore = false;
147
+ continue;
148
+ }
149
+ startCount += pageSize;
150
+ }
151
+ if (limit) {
152
+ return returnData.slice(0, limit);
153
+ }
154
+ return returnData;
155
+ }
156
+ //# sourceMappingURL=GenericFunctions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/OneBill/GenericFunctions.ts"],"names":[],"mappings":";;AAmBA,oCAEC;AAKD,0CAEC;AAKD,wCA6CC;AAwBD,8CAiEC;AAMD,8DA2DC;AAxOD,mCAAoC;AAWpC,+CAA4C;AAG5C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAgD,CAAC;AAK3E,SAAgB,YAAY,CAAC,QAAgB;IAC5C,OAAO,IAAA,mBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC;AAKD,SAAgB,eAAe,CAAC,QAAgB;IAC/C,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;AAKM,KAAK,UAAU,cAAc,CAEnC,WAAwB;IAExB,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAkB,CAAC;IAChD,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAkB,CAAC;IAChD,MAAM,QAAQ,GAAG,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC;IAE3C,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxC,IAAI,MAAM,IAAI,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V,CAAC;QAED,UAAU,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QAG1B,IAAI,KAAK,IAAI,UAAU,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;YACzC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QACnC,CAAC;QAID,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,KAAK,CAAC;QACzD,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,IAAK,UAAqB,EAAE,CAAC;YAChE,OAAO,GAAG,KAAK,CAAC;YAChB,SAAS;QACV,CAAC;QAED,UAAU,IAAI,QAAQ,CAAC;IACxB,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACX,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { IExecuteFunctions, ICredentialTestFunctions, ICredentialsDecrypted, INodeCredentialTestResult, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class OneBill implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ credentialTest: {
6
+ testOneBillCredential(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<INodeCredentialTestResult>;
7
+ };
8
+ };
9
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
10
+ }