n8n-nodes-didar-crm 0.0.6 โ†’ 0.0.8

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025
3
+ Copyright (c) 2025 Ali Mozayyani
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,45 +1,138 @@
1
1
  # n8n-nodes-didar-crm
2
2
 
3
- Community node for [n8n](https://n8n.io) to integrate with [Didar CRM](https://app.didar.me).
3
+ Custom **n8n nodes** for integrating with **Didar CRM**.
4
+ This package provides actions and triggers to automate workflows with your Didar CRM account.
4
5
 
5
- This node allows you to:
6
- - **Trigger workflows** from Didar CRM webhooks
7
- - **Create Deals** with all required fields (Title, Owner, Pipeline, Stage, Person, Company, Status)
8
- - Use **Additional Fields** like description, source, lost reason, price, currency, custom fields, etc.
9
- - Select Owner, Pipeline, and Stage from dropdowns (or manually enter IDs).
6
+ ---
7
+
8
+ ## โœจ Features
9
+
10
+ * **Trigger**
11
+
12
+ * Receive webhook events from Didar CRM (entity changes, updates, deletions, etc.)
13
+
14
+ * **Deal**
15
+
16
+ * Create a deal
17
+ * Update a deal (by Id)
18
+ * Get deal details (by Id)
19
+
20
+ * **Person (Contact)**
21
+
22
+ * Create a person
23
+ * Update a person (by Id)
24
+ * Get person details (by Id)
25
+
26
+ * **Common**
27
+
28
+ * Dropdown selectors for Pipelines, Pipeline Stages, Owners (Users)
29
+ * Manual ID input option for each dropdown field
30
+ * Support for additional fields like Source, Lost Reason, Visibility Type, Custom Fields, etc.
31
+ * Proper handling of default values (zero-guid where needed)
32
+ * Webhook trigger enforces POST requests
33
+
34
+ ---
35
+
36
+ ## ๐Ÿ“ฆ Installation
37
+
38
+ ```bash
39
+ npm install n8n-nodes-didar-crm
40
+ ```
10
41
 
11
- More operations (update deal, get deal, person/company operations) will be added soon.
42
+ Then, place the module inside your n8n custom directory (usually `~/.n8n/custom/`) and restart n8n.
12
43
 
13
44
  ---
14
45
 
15
- ## โš™๏ธ Installation
46
+ ## โšก Usage
47
+
48
+ ### 1. Trigger node
49
+
50
+ Add the **Didar CRM Trigger** node to your workflow.
51
+
52
+ * It exposes a webhook URL in n8n.
53
+ * Only **POST** requests are accepted.
54
+ * Returns payload structured into:
16
55
 
17
- In your n8n instance, go to:
56
+ ```json
57
+ {
58
+ "data": { ... },
59
+ "changes": [ ... ],
60
+ "meta": { ... },
61
+ "raw": { ... },
62
+ "receivedAt": "timestamp"
63
+ }
64
+ ```
18
65
 
19
- `Settings > Community Nodes > Install`
66
+ ### 2. Deal operations
20
67
 
21
- and enter: n8n-nodes-didar-crm
68
+ * **Create Deal** โ†’ required fields: `Title`, `OwnerId`, `PipelineId`, `PipelineStageId`, `PersonId`, `CompanyId`, `Status`
69
+ * **Update Deal** โ†’ same as Create, plus required `Id`
70
+ * **Get Deal** โ†’ requires `Id`
22
71
 
72
+ ### 3. Person (Contact) operations
73
+
74
+ * **Create Person** โ†’ required fields: `LastName`, `OwnerId`
75
+ * **Update Person** โ†’ same as Create, plus required `Id`
76
+ * **Get Person** โ†’ requires `Id`
23
77
 
24
78
  ---
25
79
 
26
- ## ๐Ÿ”‘ Authentication
80
+ ## ๐Ÿ”‘ Credentials
81
+
82
+ A new credential type **Didar API** is provided.
83
+
84
+ * You must set your **API Key** and (if required) authentication cookies.
85
+ * Used across all operations.
27
86
 
28
- Currently the node uses an **API Key** (query param `?apikey=...`) for authentication.
29
- You need to generate and provide your API key from your Didar CRM account.
87
+ ---
88
+
89
+ ## ๐Ÿ“‚ Project structure
90
+
91
+ ```
92
+ n8n-nodes-didar-crm/
93
+ โ”‚โ”€โ”€ package.json
94
+ โ”‚โ”€โ”€ README.md
95
+ โ”‚โ”€โ”€ LICENSE
96
+ โ”‚โ”€โ”€ nodes/
97
+ โ”‚ โ”œโ”€โ”€ DidarCrm.node.ts # Main entry for resource & operation switch
98
+ โ”‚ โ”œโ”€โ”€ DidarCrmTrigger.node.ts # Trigger node
99
+ โ”‚ โ””โ”€โ”€ deal/ # Deal operations
100
+ โ”‚ โ”œโ”€โ”€ create.operation.ts
101
+ โ”‚ โ”œโ”€โ”€ update.operation.ts
102
+ โ”‚ โ””โ”€โ”€ get.operation.ts
103
+ โ”‚ โ””โ”€โ”€ person/ # Person operations
104
+ โ”‚ โ”œโ”€โ”€ create.operation.ts
105
+ โ”‚ โ”œโ”€โ”€ update.operation.ts
106
+ โ”‚ โ””โ”€โ”€ get.operation.ts
107
+ โ”‚โ”€โ”€ lib/
108
+ โ”œโ”€โ”€ http.ts # Request helper
109
+ โ””โ”€โ”€ loadOptions.ts # Dropdown population (pipelines, stages, users)
110
+ ```
30
111
 
31
112
  ---
32
113
 
33
- ## ๐Ÿงช Development
114
+ ## ๐Ÿ›  Development
34
115
 
35
- Clone repo and build:
116
+ 1. Clone the repo
117
+ 2. Install dependencies:
36
118
 
37
- ```bash
38
- npm install
39
- npm run build
119
+ ```bash
120
+ npm install
121
+ ```
122
+ 3. Build:
123
+
124
+ ```bash
125
+ npm run build
126
+ ```
127
+ 4. Link into your n8n custom directory and restart n8n:
128
+
129
+ ```bash
130
+ npm link
131
+ n8n start
132
+ ```
133
+
134
+ ---
40
135
 
41
- For local testing in n8n:
136
+ ## ๐Ÿ“œ License
42
137
 
43
- # inside n8n custom folder
44
- cd ~/.n8n/custom
45
- npm install /path/to/n8n-nodes-didar-crm
138
+ MIT License โ€“ see [LICENSE](./LICENSE) for details.