n8n-nodes-proposaly 0.1.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 (118) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +153 -0
  3. package/dist/credentials/ProposalyApi.credentials.d.ts +9 -0
  4. package/dist/credentials/ProposalyApi.credentials.js +46 -0
  5. package/dist/credentials/ProposalyApi.credentials.js.map +1 -0
  6. package/dist/nodes/Proposaly/Proposaly.node.d.ts +14 -0
  7. package/dist/nodes/Proposaly/Proposaly.node.js +315 -0
  8. package/dist/nodes/Proposaly/Proposaly.node.js.map +1 -0
  9. package/dist/nodes/Proposaly/Proposaly.node.json +20 -0
  10. package/dist/nodes/Proposaly/ProposalyTrigger.node.d.ts +12 -0
  11. package/dist/nodes/Proposaly/ProposalyTrigger.node.js +198 -0
  12. package/dist/nodes/Proposaly/ProposalyTrigger.node.js.map +1 -0
  13. package/dist/nodes/Proposaly/actions/document/create.operation.d.ts +13 -0
  14. package/dist/nodes/Proposaly/actions/document/create.operation.js +35 -0
  15. package/dist/nodes/Proposaly/actions/document/create.operation.js.map +1 -0
  16. package/dist/nodes/Proposaly/actions/document/delete.operation.d.ts +2 -0
  17. package/dist/nodes/Proposaly/actions/document/delete.operation.js +13 -0
  18. package/dist/nodes/Proposaly/actions/document/delete.operation.js.map +1 -0
  19. package/dist/nodes/Proposaly/actions/document/duplicate.operation.d.ts +2 -0
  20. package/dist/nodes/Proposaly/actions/document/duplicate.operation.js +29 -0
  21. package/dist/nodes/Proposaly/actions/document/duplicate.operation.js.map +1 -0
  22. package/dist/nodes/Proposaly/actions/document/find.operation.d.ts +2 -0
  23. package/dist/nodes/Proposaly/actions/document/find.operation.js +19 -0
  24. package/dist/nodes/Proposaly/actions/document/find.operation.js.map +1 -0
  25. package/dist/nodes/Proposaly/actions/document/move.operation.d.ts +2 -0
  26. package/dist/nodes/Proposaly/actions/document/move.operation.js +25 -0
  27. package/dist/nodes/Proposaly/actions/document/move.operation.js.map +1 -0
  28. package/dist/nodes/Proposaly/actions/document/share-link.operation.d.ts +2 -0
  29. package/dist/nodes/Proposaly/actions/document/share-link.operation.js +17 -0
  30. package/dist/nodes/Proposaly/actions/document/share-link.operation.js.map +1 -0
  31. package/dist/nodes/Proposaly/actions/document/share.operation.d.ts +2 -0
  32. package/dist/nodes/Proposaly/actions/document/share.operation.js +19 -0
  33. package/dist/nodes/Proposaly/actions/document/share.operation.js.map +1 -0
  34. package/dist/nodes/Proposaly/actions/document/transfer.operation.d.ts +2 -0
  35. package/dist/nodes/Proposaly/actions/document/transfer.operation.js +18 -0
  36. package/dist/nodes/Proposaly/actions/document/transfer.operation.js.map +1 -0
  37. package/dist/nodes/Proposaly/actions/document/update.operation.d.ts +2 -0
  38. package/dist/nodes/Proposaly/actions/document/update.operation.js +36 -0
  39. package/dist/nodes/Proposaly/actions/document/update.operation.js.map +1 -0
  40. package/dist/nodes/Proposaly/actions/lead/add.operation.d.ts +2 -0
  41. package/dist/nodes/Proposaly/actions/lead/add.operation.js +44 -0
  42. package/dist/nodes/Proposaly/actions/lead/add.operation.js.map +1 -0
  43. package/dist/nodes/Proposaly/actions/lead/archive.operation.d.ts +2 -0
  44. package/dist/nodes/Proposaly/actions/lead/archive.operation.js +16 -0
  45. package/dist/nodes/Proposaly/actions/lead/archive.operation.js.map +1 -0
  46. package/dist/nodes/Proposaly/actions/lead/delete.operation.d.ts +2 -0
  47. package/dist/nodes/Proposaly/actions/lead/delete.operation.js +13 -0
  48. package/dist/nodes/Proposaly/actions/lead/delete.operation.js.map +1 -0
  49. package/dist/nodes/Proposaly/actions/lead/find.operation.d.ts +2 -0
  50. package/dist/nodes/Proposaly/actions/lead/find.operation.js +19 -0
  51. package/dist/nodes/Proposaly/actions/lead/find.operation.js.map +1 -0
  52. package/dist/nodes/Proposaly/actions/lead/reactivate.operation.d.ts +2 -0
  53. package/dist/nodes/Proposaly/actions/lead/reactivate.operation.js +16 -0
  54. package/dist/nodes/Proposaly/actions/lead/reactivate.operation.js.map +1 -0
  55. package/dist/nodes/Proposaly/actions/lead/update.operation.d.ts +2 -0
  56. package/dist/nodes/Proposaly/actions/lead/update.operation.js +39 -0
  57. package/dist/nodes/Proposaly/actions/lead/update.operation.js.map +1 -0
  58. package/dist/nodes/Proposaly/actions/recipient/add.operation.d.ts +2 -0
  59. package/dist/nodes/Proposaly/actions/recipient/add.operation.js +29 -0
  60. package/dist/nodes/Proposaly/actions/recipient/add.operation.js.map +1 -0
  61. package/dist/nodes/Proposaly/actions/recipient/delete.operation.d.ts +2 -0
  62. package/dist/nodes/Proposaly/actions/recipient/delete.operation.js +13 -0
  63. package/dist/nodes/Proposaly/actions/recipient/delete.operation.js.map +1 -0
  64. package/dist/nodes/Proposaly/actions/recipient/find.operation.d.ts +2 -0
  65. package/dist/nodes/Proposaly/actions/recipient/find.operation.js +23 -0
  66. package/dist/nodes/Proposaly/actions/recipient/find.operation.js.map +1 -0
  67. package/dist/nodes/Proposaly/actions/recipient/get-notification.operation.d.ts +2 -0
  68. package/dist/nodes/Proposaly/actions/recipient/get-notification.operation.js +13 -0
  69. package/dist/nodes/Proposaly/actions/recipient/get-notification.operation.js.map +1 -0
  70. package/dist/nodes/Proposaly/actions/recipient/update-notification.operation.d.ts +2 -0
  71. package/dist/nodes/Proposaly/actions/recipient/update-notification.operation.js +43 -0
  72. package/dist/nodes/Proposaly/actions/recipient/update-notification.operation.js.map +1 -0
  73. package/dist/nodes/Proposaly/actions/recipient/update.operation.d.ts +2 -0
  74. package/dist/nodes/Proposaly/actions/recipient/update.operation.js +43 -0
  75. package/dist/nodes/Proposaly/actions/recipient/update.operation.js.map +1 -0
  76. package/dist/nodes/Proposaly/actions/workspace/add.operation.d.ts +2 -0
  77. package/dist/nodes/Proposaly/actions/workspace/add.operation.js +19 -0
  78. package/dist/nodes/Proposaly/actions/workspace/add.operation.js.map +1 -0
  79. package/dist/nodes/Proposaly/actions/workspace/find.operation.d.ts +2 -0
  80. package/dist/nodes/Proposaly/actions/workspace/find.operation.js +19 -0
  81. package/dist/nodes/Proposaly/actions/workspace/find.operation.js.map +1 -0
  82. package/dist/nodes/Proposaly/descriptions/DocumentDescription.d.ts +3 -0
  83. package/dist/nodes/Proposaly/descriptions/DocumentDescription.js +454 -0
  84. package/dist/nodes/Proposaly/descriptions/DocumentDescription.js.map +1 -0
  85. package/dist/nodes/Proposaly/descriptions/LeadDescription.d.ts +3 -0
  86. package/dist/nodes/Proposaly/descriptions/LeadDescription.js +596 -0
  87. package/dist/nodes/Proposaly/descriptions/LeadDescription.js.map +1 -0
  88. package/dist/nodes/Proposaly/descriptions/RecipientDescription.d.ts +3 -0
  89. package/dist/nodes/Proposaly/descriptions/RecipientDescription.js +544 -0
  90. package/dist/nodes/Proposaly/descriptions/RecipientDescription.js.map +1 -0
  91. package/dist/nodes/Proposaly/descriptions/WorkspaceDescription.d.ts +3 -0
  92. package/dist/nodes/Proposaly/descriptions/WorkspaceDescription.js +82 -0
  93. package/dist/nodes/Proposaly/descriptions/WorkspaceDescription.js.map +1 -0
  94. package/dist/nodes/Proposaly/proposaly.svg +1 -0
  95. package/dist/nodes/Proposaly/transport.d.ts +9 -0
  96. package/dist/nodes/Proposaly/transport.js +189 -0
  97. package/dist/nodes/Proposaly/transport.js.map +1 -0
  98. package/dist/nodes/Proposaly/triggers/document.triggers.d.ts +2 -0
  99. package/dist/nodes/Proposaly/triggers/document.triggers.js +150 -0
  100. package/dist/nodes/Proposaly/triggers/document.triggers.js.map +1 -0
  101. package/dist/nodes/Proposaly/triggers/lead.triggers.d.ts +2 -0
  102. package/dist/nodes/Proposaly/triggers/lead.triggers.js +89 -0
  103. package/dist/nodes/Proposaly/triggers/lead.triggers.js.map +1 -0
  104. package/dist/nodes/Proposaly/triggers/recipient.triggers.d.ts +2 -0
  105. package/dist/nodes/Proposaly/triggers/recipient.triggers.js +57 -0
  106. package/dist/nodes/Proposaly/triggers/recipient.triggers.js.map +1 -0
  107. package/dist/nodes/Proposaly/triggers/workspace.triggers.d.ts +2 -0
  108. package/dist/nodes/Proposaly/triggers/workspace.triggers.js +52 -0
  109. package/dist/nodes/Proposaly/triggers/workspace.triggers.js.map +1 -0
  110. package/dist/nodes/Proposaly/types.d.ts +95 -0
  111. package/dist/nodes/Proposaly/types.js +22 -0
  112. package/dist/nodes/Proposaly/types.js.map +1 -0
  113. package/dist/nodes/Proposaly/utils.d.ts +3 -0
  114. package/dist/nodes/Proposaly/utils.js +7 -0
  115. package/dist/nodes/Proposaly/utils.js.map +1 -0
  116. package/dist/package.json +58 -0
  117. package/dist/tsconfig.tsbuildinfo +1 -0
  118. package/package.json +58 -0
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Proposaly Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,153 @@
1
+ # n8n-nodes-proposaly
2
+
3
+ This is an n8n community node. It lets you use [Proposaly](https://proposaly.io) in your n8n workflows.
4
+
5
+ Proposaly unifies presentations, proposals, agreements, and payments into one seamless, client-ready experience - helping you close faster and smarter.
6
+
7
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
8
+
9
+ [Installation](#installation)
10
+ [Operations](#operations)
11
+ [Credentials](#credentials)
12
+ [Compatibility](#compatibility)
13
+ [Usage](#usage)
14
+ [Resources](#resources)
15
+ [Version history](#version-history)
16
+
17
+ ## Installation
18
+
19
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
20
+
21
+ ## Operations
22
+
23
+ This node supports the following resources and operations:
24
+
25
+ ### Lead
26
+
27
+ | Operation | Description |
28
+ |-----------|-------------|
29
+ | Create | Create a new lead |
30
+ | Archive | Archive an existing lead |
31
+ | Delete | Permanently delete a lead |
32
+ | Find By ID | Retrieve a lead by its ID |
33
+ | Reactivate | Reactivate an archived lead |
34
+ | Update | Update lead properties |
35
+
36
+ ### Document
37
+
38
+ | Operation | Description |
39
+ |-----------|-------------|
40
+ | Create | Create a new document |
41
+ | Delete | Permanently delete a document |
42
+ | Duplicate | Create a copy of an existing document |
43
+ | Find By ID | Retrieve a document by its ID |
44
+ | Move Stage | Move a document to a different stage |
45
+ | Create View Only Link | Generate a shareable view-only link |
46
+ | Share | Share a document with recipients |
47
+ | Transfer Ownership | Transfer document ownership to another user |
48
+ | Update | Update document properties |
49
+
50
+ ### Recipient
51
+
52
+ | Operation | Description |
53
+ |-----------|-------------|
54
+ | Add | Add a recipient to a document |
55
+ | Delete | Remove a recipient from a document |
56
+ | Find | Find recipients on a document |
57
+ | Update | Update recipient details |
58
+ | Get Notification Settings | Retrieve notification preferences for a recipient |
59
+ | Update Notification Settings | Modify notification preferences for a recipient |
60
+
61
+ ### Workspace
62
+
63
+ | Operation | Description |
64
+ |-----------|-------------|
65
+ | Add | Add a new workspace |
66
+ | Find By ID | Retrieve a workspace by its ID |
67
+
68
+ ### Trigger Node
69
+
70
+ The package also includes a **Proposaly Trigger** node that listens for webhook events from Proposaly, allowing you to start workflows when events occur in your Proposaly account.
71
+
72
+ ## Credentials
73
+
74
+ To authenticate with Proposaly, you need an API key from your Proposaly workspace.
75
+
76
+ ### How to obtain your API Key
77
+
78
+ 1. Log in to your Proposaly account
79
+ 2. Open the **Menu** in your company's workspace
80
+ 3. Navigate to **Company** → **Settings**
81
+ 4. Open the **Integrations** tab
82
+ 5. Click **"Generate an API Key"** (or if you already have a key, click the 3 dots and select **"Edit"**)
83
+ 6. Copy the API Key
84
+
85
+ ### Setting up credentials in n8n
86
+
87
+ 1. In n8n, go to **Credentials**
88
+ 2. Click **Add Credential**
89
+ 3. Search for **Proposaly API**
90
+ 4. Paste your API Key
91
+ 5. The default API URL is `https://api.proposaly.io/v2/public-api` (only change if instructed by Proposaly support)
92
+ 6. Click **Save**
93
+
94
+ ## Compatibility
95
+
96
+ This node has been tested with n8n version **1.x** and later.
97
+
98
+ **Minimum n8n version:** 1.0.0
99
+
100
+ ## Usage
101
+
102
+ ### Basic Example: Create a Lead
103
+
104
+ 1. Add a **Proposaly** node to your workflow
105
+ 2. Select **Lead** as the resource
106
+ 3. Select **Create** as the operation
107
+ 4. Fill in the required fields:
108
+ - **Email**: The lead's email address
109
+ - **First Name**: The lead's first name
110
+ - **Last Name**: The lead's last name
111
+ 5. Execute the node
112
+
113
+ ### Using with AI Agents
114
+
115
+ This node is compatible with n8n's AI Agent functionality. You can use it as a tool within AI workflows to automate proposal and document management based on natural language instructions.
116
+
117
+ Example using `$fromAI()`:
118
+
119
+ ```javascript
120
+ // In a Code node before the Proposaly node
121
+ return {
122
+ email: $fromAI("email", "The client's email address"),
123
+ firstName: $fromAI("firstName", "The client's first name"),
124
+ lastName: $fromAI("lastName", "The client's last name")
125
+ };
126
+ ```
127
+
128
+ ### Tips
129
+
130
+ - **Webhook Trigger**: Use the Proposaly Trigger node to automatically start workflows when documents are viewed, signed, or when other events occur
131
+ - **Error Handling**: Enable "Continue On Fail" if you want your workflow to continue even if a Proposaly operation fails
132
+ - **Batch Operations**: When processing multiple items, the node automatically handles each item in the input
133
+
134
+ ## Resources
135
+
136
+ - [Proposaly Website](https://proposaly.io)
137
+ - [Proposaly API Documentation](https://api.proposaly.io/redoc)
138
+ - [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
139
+ - [GitHub Repository](https://github.com/ADCORE-INC/n8n.proposaly.io)
140
+
141
+ ## Version history
142
+
143
+ See [CHANGELOG.md](CHANGELOG.md) for a detailed version history.
144
+
145
+ ### 0.1.0
146
+
147
+ Initial release with support for:
148
+
149
+ - **Lead** management (Create, Archive, Delete, Find, Reactivate, Update)
150
+ - **Document** operations (Create, Delete, Duplicate, Find, Move Stage, Share, Share Link, Transfer, Update)
151
+ - **Recipient** handling (Add, Delete, Find, Update, Notification Settings)
152
+ - **Workspace** operations (Add, Find)
153
+ - **Webhook Trigger** for real-time event handling
@@ -0,0 +1,9 @@
1
+ import type { IAuthenticateGeneric, ICredentialType, ICredentialTestRequest, INodeProperties } from 'n8n-workflow';
2
+ export declare class ProposalyApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProposalyApi = void 0;
4
+ class ProposalyApi {
5
+ constructor() {
6
+ this.name = 'proposalyApi';
7
+ this.displayName = 'Proposaly API';
8
+ this.documentationUrl = 'https://docs.proposaly.com/';
9
+ this.properties = [
10
+ {
11
+ displayName: 'API Key',
12
+ name: 'apiKey',
13
+ type: 'string',
14
+ typeOptions: { password: true },
15
+ required: true,
16
+ default: '',
17
+ },
18
+ {
19
+ displayName: 'Base URL',
20
+ name: 'url',
21
+ type: 'string',
22
+ default: 'https://api.proposaly.io/v2/public-api',
23
+ description: 'Override the default base URL for the API',
24
+ },
25
+ ];
26
+ this.authenticate = {
27
+ type: 'generic',
28
+ properties: {
29
+ headers: {
30
+ Authorization: '=Bearer {{$credentials.apiKey}}',
31
+ },
32
+ },
33
+ };
34
+ this.test = {
35
+ request: {
36
+ method: 'GET',
37
+ url: '={{$credentials.url}}/validate',
38
+ headers: {
39
+ Authorization: '=Bearer {{$credentials.apiKey}}',
40
+ },
41
+ },
42
+ };
43
+ }
44
+ }
45
+ exports.ProposalyApi = ProposalyApi;
46
+ //# sourceMappingURL=ProposalyApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProposalyApi.credentials.js","sourceRoot":"","sources":["../../credentials/ProposalyApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QAEtB,gBAAW,GAAG,eAAe,CAAC;QAE9B,qBAAgB,GAAG,6BAA6B,CAAC;QAEjD,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,wCAAwC;gBACjD,WAAW,EAAE,2CAA2C;aACxD;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,gCAAgC;gBACrC,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA3CD,oCA2CC"}
@@ -0,0 +1,14 @@
1
+ import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Proposaly implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ loadOptions: {
6
+ getWorkspaces(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
+ getDocumentTemplates(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
8
+ getDocuments(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
9
+ getArchivedLeads(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
10
+ getRecipients(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
11
+ };
12
+ };
13
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][] | null>;
14
+ }
@@ -0,0 +1,315 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Proposaly = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const create_operation_1 = require("./actions/document/create.operation");
6
+ const delete_operation_1 = require("./actions/document/delete.operation");
7
+ const duplicate_operation_1 = require("./actions/document/duplicate.operation");
8
+ const find_operation_1 = require("./actions/document/find.operation");
9
+ const move_operation_1 = require("./actions/document/move.operation");
10
+ const share_link_operation_1 = require("./actions/document/share-link.operation");
11
+ const share_operation_1 = require("./actions/document/share.operation");
12
+ const transfer_operation_1 = require("./actions/document/transfer.operation");
13
+ const update_operation_1 = require("./actions/document/update.operation");
14
+ const add_operation_1 = require("./actions/lead/add.operation");
15
+ const archive_operation_1 = require("./actions/lead/archive.operation");
16
+ const delete_operation_2 = require("./actions/lead/delete.operation");
17
+ const find_operation_2 = require("./actions/lead/find.operation");
18
+ const reactivate_operation_1 = require("./actions/lead/reactivate.operation");
19
+ const update_operation_2 = require("./actions/lead/update.operation");
20
+ const add_operation_2 = require("./actions/recipient/add.operation");
21
+ const delete_operation_3 = require("./actions/recipient/delete.operation");
22
+ const find_operation_3 = require("./actions/recipient/find.operation");
23
+ const get_notification_operation_1 = require("./actions/recipient/get-notification.operation");
24
+ const update_notification_operation_1 = require("./actions/recipient/update-notification.operation");
25
+ const update_operation_3 = require("./actions/recipient/update.operation");
26
+ const add_operation_3 = require("./actions/workspace/add.operation");
27
+ const find_operation_4 = require("./actions/workspace/find.operation");
28
+ const DocumentDescription_1 = require("./descriptions/DocumentDescription");
29
+ const LeadDescription_1 = require("./descriptions/LeadDescription");
30
+ const RecipientDescription_1 = require("./descriptions/RecipientDescription");
31
+ const WorkspaceDescription_1 = require("./descriptions/WorkspaceDescription");
32
+ const transport_1 = require("./transport");
33
+ async function executeItems(context, handler) {
34
+ const items = context.getInputData();
35
+ const returnData = [];
36
+ for (let i = 0; i < items.length; i++) {
37
+ try {
38
+ const result = await handler(i);
39
+ returnData.push(result);
40
+ }
41
+ catch (error) {
42
+ if (context.continueOnFail()) {
43
+ returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
44
+ }
45
+ else {
46
+ throw error;
47
+ }
48
+ }
49
+ }
50
+ return [returnData];
51
+ }
52
+ class Proposaly {
53
+ constructor() {
54
+ this.description = {
55
+ displayName: 'Proposaly',
56
+ name: 'proposaly',
57
+ icon: 'file:proposaly.svg',
58
+ group: ['transform'],
59
+ version: 1,
60
+ usableAsTool: true,
61
+ description: 'Consume Proposaly API',
62
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
63
+ defaults: {
64
+ name: 'Proposaly',
65
+ },
66
+ inputs: ['main'],
67
+ outputs: ['main'],
68
+ credentials: [
69
+ {
70
+ name: 'proposalyApi',
71
+ required: true,
72
+ },
73
+ ],
74
+ properties: [
75
+ {
76
+ displayName: 'Resource',
77
+ name: 'resource',
78
+ type: 'options',
79
+ options: [
80
+ {
81
+ name: 'Lead',
82
+ value: 'lead',
83
+ },
84
+ {
85
+ name: 'Recipient',
86
+ value: 'recipient',
87
+ },
88
+ {
89
+ name: 'Document',
90
+ value: 'document',
91
+ },
92
+ {
93
+ name: 'Workspace',
94
+ value: 'workspace',
95
+ },
96
+ ],
97
+ default: 'lead',
98
+ noDataExpression: true,
99
+ required: true,
100
+ },
101
+ ...LeadDescription_1.leadOperations,
102
+ ...LeadDescription_1.leadFields,
103
+ ...RecipientDescription_1.recipientOperations,
104
+ ...RecipientDescription_1.recipientFields,
105
+ ...DocumentDescription_1.documentOperations,
106
+ ...DocumentDescription_1.documentFields,
107
+ ...WorkspaceDescription_1.workspaceOperations,
108
+ ...WorkspaceDescription_1.workspaceFields,
109
+ ],
110
+ };
111
+ this.methods = {
112
+ loadOptions: {
113
+ async getWorkspaces() {
114
+ const workspaces = await (0, transport_1.proposalyRequest)(this, {
115
+ method: 'GET',
116
+ path: '/workspaces',
117
+ });
118
+ const items = Array.isArray(workspaces) ? workspaces : [];
119
+ return items.map((workspace) => ({
120
+ name: workspace.workspace_name,
121
+ value: workspace.workspace_id,
122
+ }));
123
+ },
124
+ async getDocumentTemplates() {
125
+ const workspaceId = this.getNodeParameter('workspaceId', 0);
126
+ if (!workspaceId) {
127
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The parameter "Workspace ID" has to be set to load document templates!');
128
+ }
129
+ const allDocuments = await (0, transport_1.proposalyRequestAll)(this, '/documents', {
130
+ workspace_id: workspaceId,
131
+ });
132
+ const templates = allDocuments.filter((doc) => doc.is_template === true);
133
+ return templates.map((template) => ({
134
+ name: template.document_title,
135
+ value: template.document_id,
136
+ }));
137
+ },
138
+ async getDocuments() {
139
+ const workspaceId = this.getNodeParameter('workspaceId', 0);
140
+ if (!workspaceId) {
141
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The parameter "Workspace ID" has to be set to load documents!');
142
+ }
143
+ const allDocuments = await (0, transport_1.proposalyRequestAll)(this, '/documents', {
144
+ workspace_id: workspaceId,
145
+ });
146
+ return allDocuments.map((doc) => ({
147
+ name: doc.document_title,
148
+ value: doc.document_id,
149
+ }));
150
+ },
151
+ async getArchivedLeads() {
152
+ const workspaceId = this.getNodeParameter('workspaceId', 0);
153
+ if (!workspaceId) {
154
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The parameter "Workspace ID" has to be set to load archived leads!');
155
+ }
156
+ const leads = await (0, transport_1.proposalyRequestAll)(this, '/leads', {
157
+ workspace_id: workspaceId,
158
+ lead_status: 'Archived',
159
+ });
160
+ return leads.map((lead) => ({
161
+ name: lead.company || lead.lead_id,
162
+ value: lead.lead_id,
163
+ }));
164
+ },
165
+ async getRecipients() {
166
+ const documentId = this.getNodeParameter('documentId', 0);
167
+ if (!documentId) {
168
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The parameter "Document ID" has to be set to load recipients!');
169
+ }
170
+ const recipients = await (0, transport_1.proposalyRequest)(this, {
171
+ method: 'GET',
172
+ path: '/recipients',
173
+ qs: {
174
+ document_id: documentId,
175
+ },
176
+ });
177
+ return recipients.map((recipient) => ({
178
+ name: recipient.email
179
+ ? `${recipient.first_name} ${recipient.last_name} (${recipient.email})`
180
+ : `${recipient.first_name} ${recipient.last_name}`,
181
+ value: recipient.recipient_id,
182
+ }));
183
+ },
184
+ },
185
+ };
186
+ }
187
+ async execute() {
188
+ const items = this.getInputData();
189
+ const resource = this.getNodeParameter('resource', 0);
190
+ const operation = this.getNodeParameter('operation', 0);
191
+ if (resource === 'lead') {
192
+ if (operation === 'createLead') {
193
+ return executeItems(this, (i) => (0, add_operation_1.addLeadOperation)(this, items, i));
194
+ }
195
+ if (operation === 'archiveLead') {
196
+ return executeItems(this, (i) => (0, archive_operation_1.archiveLeadOperation)(this, items, i));
197
+ }
198
+ if (operation === 'deleteLead') {
199
+ return executeItems(this, (i) => (0, delete_operation_2.deleteLeadOperation)(this, items, i));
200
+ }
201
+ if (operation === 'updateLead') {
202
+ return executeItems(this, (i) => (0, update_operation_2.updateLeadOperation)(this, items, i));
203
+ }
204
+ if (operation === 'reactivateLead') {
205
+ return executeItems(this, (i) => (0, reactivate_operation_1.reactivateLeadOperation)(this, items, i));
206
+ }
207
+ if (operation === 'findLeadById') {
208
+ return executeItems(this, (i) => (0, find_operation_2.findLeadByIdOperation)(this, items, i));
209
+ }
210
+ }
211
+ if (resource === 'document') {
212
+ if (operation === 'createDocument') {
213
+ return executeItems(this, (i) => {
214
+ const workspaceId = this.getNodeParameter('workspaceId', i);
215
+ const title = this.getNodeParameter('documentTitle', i);
216
+ return (0, create_operation_1.createDocumentOperation)(this, items, i, {
217
+ workspaceId,
218
+ title,
219
+ });
220
+ });
221
+ }
222
+ if (operation === 'createDocumentFromLead') {
223
+ return executeItems(this, (i) => {
224
+ const workspaceId = this.getNodeParameter('workspaceId', i);
225
+ const title = this.getNodeParameter('documentTitle', i);
226
+ const leadId = this.getNodeParameter('leadId', i);
227
+ return (0, create_operation_1.createDocumentOperation)(this, items, i, {
228
+ workspaceId,
229
+ title,
230
+ leadId,
231
+ });
232
+ });
233
+ }
234
+ if (operation === 'createDocumentFromTemplate') {
235
+ return executeItems(this, (i) => {
236
+ const workspaceId = this.getNodeParameter('workspaceId', i);
237
+ const title = this.getNodeParameter('documentTitle', i);
238
+ const templateDocumentId = this.getNodeParameter('documentTemplateId', i);
239
+ const copyRecipients = this.getNodeParameter('copyRecipients', i, false);
240
+ const copyPriceQuote = this.getNodeParameter('copyPriceQuote', i, false);
241
+ const copyAddons = this.getNodeParameter('copyAddons', i, false);
242
+ const copyAttachments = this.getNodeParameter('copyAttachments', i, false);
243
+ return (0, create_operation_1.createDocumentOperation)(this, items, i, {
244
+ workspaceId,
245
+ title,
246
+ templateDocumentId,
247
+ copyRecipients,
248
+ copyPriceQuote,
249
+ copyAddons,
250
+ copyAttachments,
251
+ });
252
+ });
253
+ }
254
+ if (operation === 'createDocumentViewOnlyLink') {
255
+ return executeItems(this, (i) => {
256
+ const documentId = this.getNodeParameter('documentId', i);
257
+ const expiresAfter = this.getNodeParameter('expiresAfter', i);
258
+ return (0, share_link_operation_1.createDocumentShareLinkOperation)(this, items, i, documentId, expiresAfter);
259
+ });
260
+ }
261
+ if (operation === 'deleteDocument') {
262
+ return executeItems(this, (i) => (0, delete_operation_1.deleteDocumentOperation)(this, items, i));
263
+ }
264
+ if (operation === 'duplicateDocument') {
265
+ return executeItems(this, (i) => (0, duplicate_operation_1.duplicateDocumentOperation)(this, items, i));
266
+ }
267
+ if (operation === 'moveDocumentStage') {
268
+ return executeItems(this, (i) => (0, move_operation_1.moveDocumentStageOperation)(this, items, i));
269
+ }
270
+ if (operation === 'shareDocument') {
271
+ return executeItems(this, (i) => (0, share_operation_1.shareDocumentOperation)(this, items, i));
272
+ }
273
+ if (operation === 'transferDocumentOwnership') {
274
+ return executeItems(this, (i) => (0, transfer_operation_1.transferDocumentOwnershipOperation)(this, items, i));
275
+ }
276
+ if (operation === 'updateDocument') {
277
+ return executeItems(this, (i) => (0, update_operation_1.updateDocumentOperation)(this, items, i));
278
+ }
279
+ if (operation === 'findDocumentById') {
280
+ return executeItems(this, (i) => (0, find_operation_1.findDocumentOperation)(this, items, i));
281
+ }
282
+ }
283
+ if (resource === 'recipient') {
284
+ if (operation === 'addRecipient') {
285
+ return executeItems(this, (i) => (0, add_operation_2.addRecipientOperation)(this, items, i));
286
+ }
287
+ if (operation === 'updateRecipient') {
288
+ return executeItems(this, (i) => (0, update_operation_3.updateRecipientOperation)(this, items, i));
289
+ }
290
+ if (operation === 'deleteRecipient') {
291
+ return executeItems(this, (i) => (0, delete_operation_3.deleteRecipientOperation)(this, items, i));
292
+ }
293
+ if (operation === 'findRecipient') {
294
+ return executeItems(this, (i) => (0, find_operation_3.findRecipientOperation)(this, items, i));
295
+ }
296
+ if (operation === 'updateRecipientNotificationSettings') {
297
+ return executeItems(this, (i) => (0, update_notification_operation_1.updateRecipientNotificationOperation)(this, items, i));
298
+ }
299
+ if (operation === 'getRecipientNotificationSettings') {
300
+ return executeItems(this, (i) => (0, get_notification_operation_1.getRecipientNotificationSettingsOperation)(this, items, i));
301
+ }
302
+ }
303
+ if (resource === 'workspace') {
304
+ if (operation === 'addWorkspace') {
305
+ return executeItems(this, (i) => (0, add_operation_3.addWorkspaceOperation)(this, items, i));
306
+ }
307
+ if (operation === 'findWorkspaceById') {
308
+ return executeItems(this, (i) => (0, find_operation_4.findWorkspaceOperation)(this, items, i));
309
+ }
310
+ }
311
+ return null;
312
+ }
313
+ }
314
+ exports.Proposaly = Proposaly;
315
+ //# sourceMappingURL=Proposaly.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Proposaly.node.js","sourceRoot":"","sources":["../../../nodes/Proposaly/Proposaly.node.ts"],"names":[],"mappings":";;;AAMA,+CASsB;AACtB,0EAA8E;AAC9E,0EAA8E;AAC9E,gFAAoF;AACpF,sEAA0E;AAC1E,sEAA+E;AAC/E,kFAA2F;AAC3F,wEAA4E;AAC5E,8EAA2F;AAC3F,0EAA8E;AAC9E,gEAAgE;AAChE,wEAAwE;AACxE,sEAAsE;AACtE,kEAAsE;AACtE,8EAA8E;AAC9E,sEAAsE;AACtE,qEAA0E;AAC1E,2EAAgF;AAChF,uEAA4E;AAC5E,+FAA2G;AAC3G,qGAAyG;AACzG,2EAAgF;AAChF,qEAA0E;AAC1E,uEAA4E;AAG5E,4EAAwF;AACxF,oEAA4E;AAC5E,8EAA2F;AAC3F,8EAA2F;AAC3F,2CAAoE;AAEpE,KAAK,UAAU,YAAY,CAC1B,OAA0B,EAC1B,OAAuD;IAEvD,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IACrC,MAAM,UAAU,GAAyB,EAAE,CAAC;IAE5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,IAAI,CAAC;YACJ,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC;YAChC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;QAAC,OAAO,K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,qCAAqB,EAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;YACzE,CAAC;YAED,IAAI,SAAS,KAAK,mBAAmB,EAAE,CAAC;gBACvC,OAAO,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,uCAAsB,EAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;YAC1E,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AA9TD,8BA8TC"}
@@ -0,0 +1,20 @@
1
+ {
2
+ "node": "n8n-nodes-base.Proposaly",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": [
6
+ "Data Transformation"
7
+ ],
8
+ "resources": {
9
+ "credentialDocumentation": [
10
+ {
11
+ "url": "https://api.proposaly.io/redoc"
12
+ }
13
+ ],
14
+ "primaryDocumentation": [
15
+ {
16
+ "url": "https://github.com/ADCORE-INC/n8n.proposaly.io"
17
+ }
18
+ ]
19
+ }
20
+ }
@@ -0,0 +1,12 @@
1
+ import type { INodeExecutionData, INodeType, INodeTypeDescription, IPollFunctions, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
+ export declare class ProposalyTrigger implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ loadOptions: {
6
+ getWorkspaces(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
+ getWorkspaceStages(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
8
+ getDocuments(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
9
+ };
10
+ };
11
+ poll(this: IPollFunctions): Promise<INodeExecutionData[][] | null>;
12
+ }