@novacodehq/n8n-nodes-servicefusion 0.1.5

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,118 @@
1
+ # n8n-nodes-servicefusion
2
+
3
+ Self-hosted n8n community node for working with ServiceFusion.
4
+
5
+ This package provides a single **ServiceFusion** node with resource/operation style actions backed by `@pmip/servicefusion-adapter`.
6
+
7
+ ## Self-hosted only
8
+
9
+ This package is intended for **self-hosted n8n**.
10
+ It is **not configured for n8n Cloud verification** because it depends on the ServiceFusion adapter at runtime.
11
+
12
+ ## Installation
13
+
14
+ ### From a packed/published package
15
+
16
+ Install the package alongside your self-hosted n8n instance:
17
+
18
+ ```bash
19
+ npm install n8n-nodes-servicefusion
20
+ ```
21
+
22
+ Then restart n8n.
23
+
24
+ ### Local development
25
+
26
+ In this package directory:
27
+
28
+ ```bash
29
+ npm install
30
+ npm run build
31
+ npm run dev
32
+ ```
33
+
34
+ ## Credentials
35
+
36
+ Create a **ServiceFusion API** credential in n8n with:
37
+
38
+ - **Client ID**
39
+ - **Client Secret**
40
+ - **Base URL** (optional, defaults to `https://api.servicefusion.com/v1`)
41
+
42
+ The node uses the adapter's OAuth/token handling internally.
43
+
44
+ ## Operations
45
+
46
+ ### Customer
47
+
48
+ - Get All
49
+ - Get
50
+ - Create
51
+ - Update
52
+ - Delete
53
+ - Search
54
+
55
+ ### Job
56
+
57
+ - Get All
58
+ - Get
59
+ - Create
60
+ - Update
61
+ - Delete
62
+ - Search
63
+ - Get All Paged
64
+ - Batch Sync
65
+
66
+ ### Estimate
67
+
68
+ - Get All
69
+ - Get
70
+ - Create
71
+ - Update
72
+ - Convert To Job
73
+
74
+ ### Invoice
75
+
76
+ - Get All
77
+ - Get
78
+ - Create
79
+ - Update
80
+ - Send
81
+
82
+ ### Technician
83
+
84
+ - Get All
85
+ - Get
86
+ - Get Schedule
87
+ - Assign Job
88
+
89
+ ### Webhook
90
+
91
+ - Get All
92
+ - Create
93
+ - Delete
94
+
95
+ ## Compatibility
96
+
97
+ - Built as an n8n community node package
98
+ - Intended for modern self-hosted n8n versions using `@n8n/node-cli`
99
+ - Verified in this repo with:
100
+ - TypeScript compile success
101
+ - `n8n-node build` success
102
+ - node export/runtime smoke checks
103
+
104
+ ## Notes
105
+
106
+ - This package vendors a bundled copy of the ServiceFusion adapter into the published `dist/` output so it can stay self-hosted and still satisfy n8n's no-runtime-dependencies packaging rule.
107
+ - For local `n8n-node dev`, Node.js 22 LTS is recommended for the smoothest `isolated-vm` compatibility.
108
+
109
+ ## Resources
110
+
111
+ - [n8n community nodes docs](https://docs.n8n.io/integrations/#community-nodes)
112
+ - [ServiceFusion Adapter repository](https://github.com/rashidazarang/servicefusion-adapter)
113
+
114
+ ## Version history
115
+
116
+ ### 0.1.0
117
+
118
+ Initial self-hosted release with ServiceFusion customer, job, estimate, invoice, technician, and webhook operations.
@@ -0,0 +1,8 @@
1
+ import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class ServiceFusionApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ icon: "fa:building";
6
+ documentationUrl: string;
7
+ properties: INodeProperties[];
8
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceFusionApi = void 0;
4
+ class ServiceFusionApi {
5
+ constructor() {
6
+ this.name = 'serviceFusionApi';
7
+ this.displayName = 'ServiceFusion API';
8
+ this.icon = 'fa:building';
9
+ this.documentationUrl = 'https://github.com/rashidazarang/servicefusion-adapter';
10
+ this.properties = [
11
+ {
12
+ displayName: 'Client ID',
13
+ name: 'clientId',
14
+ type: 'string',
15
+ default: '',
16
+ required: true,
17
+ description: 'The OAuth client ID for the ServiceFusion API',
18
+ },
19
+ {
20
+ displayName: 'Client Secret',
21
+ name: 'clientSecret',
22
+ type: 'string',
23
+ typeOptions: { password: true },
24
+ default: '',
25
+ required: true,
26
+ description: 'The OAuth client secret for the ServiceFusion API',
27
+ },
28
+ {
29
+ displayName: 'Base URL',
30
+ name: 'baseUrl',
31
+ type: 'string',
32
+ default: 'https://api.servicefusion.com/v1',
33
+ required: false,
34
+ description: 'The base URL for the ServiceFusion API',
35
+ },
36
+ ];
37
+ }
38
+ }
39
+ exports.ServiceFusionApi = ServiceFusionApi;
40
+ //# sourceMappingURL=ServiceFusionApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceFusionApi.credentials.js","sourceRoot":"","sources":["../../credentials/ServiceFusionApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,gBAAgB;IAA7B;QACC,SAAI,GAAG,kBAAkB,CAAC;QAE1B,gBAAW,GAAG,mBAAmB,CAAC;QAElC,SAAI,GAAG,aAAsB,CAAC;QAE9B,qBAAgB,GAAG,wDAAwD,CAAC;QAE5E,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,+CAA+C;aAC5D;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,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,mDAAmD;aAChE;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,wCAAwC;aACrD;SACD,CAAC;IAIH,CAAC;CAAA;AAvCD,4CAuCC"}
@@ -0,0 +1,4 @@
1
+ import type { ICredentialDataDecryptedObject } from 'n8n-workflow';
2
+ import { ServiceFusionAdapter } from './vendor/servicefusion-adapter.bundle';
3
+ export declare function createAdapter(credentials: ICredentialDataDecryptedObject): Promise<ServiceFusionAdapter>;
4
+ export declare function disconnectAdapter(adapter: ServiceFusionAdapter | null): Promise<void>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAdapter = createAdapter;
4
+ exports.disconnectAdapter = disconnectAdapter;
5
+ const servicefusion_adapter_bundle_1 = require("./vendor/servicefusion-adapter.bundle");
6
+ async function createAdapter(credentials) {
7
+ const adapter = new servicefusion_adapter_bundle_1.ServiceFusionAdapter({
8
+ clientId: credentials.clientId,
9
+ clientSecret: credentials.clientSecret,
10
+ baseUrl: credentials.baseUrl || 'https://api.servicefusion.com/v1',
11
+ });
12
+ await adapter.connect();
13
+ return adapter;
14
+ }
15
+ async function disconnectAdapter(adapter) {
16
+ if (adapter) {
17
+ try {
18
+ await adapter.disconnect();
19
+ }
20
+ catch {
21
+ }
22
+ }
23
+ }
24
+ //# sourceMappingURL=GenericFunctions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/ServiceFusion/GenericFunctions.ts"],"names":[],"mappings":";;AAMA,sCAWC;AAKD,8CAQC;AA7BD,wFAA6E;AAKtE,KAAK,UAAU,aAAa,CAClC,WAA2C;IAE3C,MAAM,OAAO,GAAG,IAAI,mDAAoB,CAAC;QACxC,QAAQ,EAAE,WAAW,CAAC,QAAkB;QACxC,YAAY,EAAE,WAAW,CAAC,YAAsB;QAChD,OAAO,EAAG,WAAW,CAAC,OAAkB,IAAI,kCAAkC;KAC9E,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IACxB,OAAO,OAAO,CAAC;AAChB,CAAC;AAKM,KAAK,UAAU,iBAAiB,CAAC,OAAoC;IAC3E,IAAI,OAAO,EAAE,CAAC;QACb,IAAI,CAAC;YACJ,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;QAC5B,CAAC;QAAC,MAAM,CAAC;QAET,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class ServiceFusion implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }