n8n-nodes-setforth 1.0.0
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 +46 -0
- package/README.md +306 -0
- package/dist/credentials/SetforthOAuth2Api.credentials.d.ts +10 -0
- package/dist/credentials/SetforthOAuth2Api.credentials.js +89 -0
- package/dist/credentials/SetforthOAuth2Api.credentials.js.map +1 -0
- package/dist/nodes/Setforth/GenericFunctions.d.ts +13 -0
- package/dist/nodes/Setforth/GenericFunctions.js +81 -0
- package/dist/nodes/Setforth/GenericFunctions.js.map +1 -0
- package/dist/nodes/Setforth/LicenseNotice.d.ts +5 -0
- package/dist/nodes/Setforth/LicenseNotice.js +26 -0
- package/dist/nodes/Setforth/LicenseNotice.js.map +1 -0
- package/dist/nodes/Setforth/Setforth.node.d.ts +5 -0
- package/dist/nodes/Setforth/Setforth.node.js +324 -0
- package/dist/nodes/Setforth/Setforth.node.js.map +1 -0
- package/dist/nodes/Setforth/SetforthTrigger.node.d.ts +12 -0
- package/dist/nodes/Setforth/SetforthTrigger.node.js +209 -0
- package/dist/nodes/Setforth/SetforthTrigger.node.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/AccountStatementDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/AccountStatementDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/AccountStatementDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/AdminUserDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/AdminUserDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/AdminUserDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/BulkDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/BulkDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/BulkDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/CalendarEventDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/CalendarEventDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/CalendarEventDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/CallDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/CallDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/CallDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/CampaignDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/CampaignDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/CampaignDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ClixsignDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ClixsignDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ClixsignDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContactAlertDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContactAlertDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ContactAlertDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContactBankingDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContactBankingDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ContactBankingDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContactCommunicationDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContactCommunicationDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ContactCommunicationDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContactCreditDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContactCreditDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ContactCreditDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContactDebtDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContactDebtDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ContactDebtDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContactDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContactDescription.js +372 -0
- package/dist/nodes/Setforth/descriptions/ContactDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContactDocumentDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContactDocumentDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ContactDocumentDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContactListDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContactListDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ContactListDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContactNoteDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContactNoteDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ContactNoteDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContactWorkflowDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContactWorkflowDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ContactWorkflowDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ContentConfigDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ContentConfigDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ContentConfigDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/CreditorDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/CreditorDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/CreditorDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/DebtDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/DebtDescription.js +252 -0
- package/dist/nodes/Setforth/descriptions/DebtDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/DebtNoteDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/DebtNoteDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/DebtNoteDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/DebtTaskDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/DebtTaskDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/DebtTaskDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/DocumentDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/DocumentDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/DocumentDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/DocumentPackageDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/DocumentPackageDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/DocumentPackageDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/DocumentPackageTemplateDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/DocumentPackageTemplateDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/DocumentPackageTemplateDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/DocumentTemplateDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/DocumentTemplateDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/DocumentTemplateDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/DocumentTypeDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/DocumentTypeDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/DocumentTypeDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/EmailTemplateDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/EmailTemplateDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/EmailTemplateDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/EnrollmentDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/EnrollmentDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/EnrollmentDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/ForthCreditDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/ForthCreditDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/ForthCreditDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/LenderDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/LenderDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/LenderDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/PayeeDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/PayeeDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/PayeeDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/SettlementOfferDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/SettlementOfferDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/SettlementOfferDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/TaskDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/TaskDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/TaskDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/TeamDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/TeamDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/TeamDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/TransactionDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/TransactionDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/TransactionDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/UserDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/UserDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/UserDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/UtilityDescription.d.ts +3 -0
- package/dist/nodes/Setforth/descriptions/UtilityDescription.js +85 -0
- package/dist/nodes/Setforth/descriptions/UtilityDescription.js.map +1 -0
- package/dist/nodes/Setforth/descriptions/index.d.ts +38 -0
- package/dist/nodes/Setforth/descriptions/index.js +61 -0
- package/dist/nodes/Setforth/descriptions/index.js.map +1 -0
- package/dist/nodes/Setforth/setforth.svg +4 -0
- package/package.json +78 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Velocity BPA, LLC
|
|
4
|
+
* Licensed under the Business Source License 1.1
|
|
5
|
+
* Commercial use requires a separate commercial license.
|
|
6
|
+
* See LICENSE file for details.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Setforth = void 0;
|
|
10
|
+
const GenericFunctions_1 = require("./GenericFunctions");
|
|
11
|
+
const LicenseNotice_1 = require("./LicenseNotice");
|
|
12
|
+
const descriptions_1 = require("./descriptions");
|
|
13
|
+
class Setforth {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.description = {
|
|
16
|
+
displayName: 'Setforth',
|
|
17
|
+
name: 'setforth',
|
|
18
|
+
icon: 'file:setforth.svg',
|
|
19
|
+
group: ['transform'],
|
|
20
|
+
version: 1,
|
|
21
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
22
|
+
description: 'Interact with the Setforth (FORTH) API for debt resolution services',
|
|
23
|
+
defaults: {
|
|
24
|
+
name: 'Setforth',
|
|
25
|
+
},
|
|
26
|
+
inputs: ['main'],
|
|
27
|
+
outputs: ['main'],
|
|
28
|
+
credentials: [
|
|
29
|
+
{
|
|
30
|
+
name: 'setforthOAuth2Api',
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
properties: [
|
|
35
|
+
{
|
|
36
|
+
displayName: 'Resource',
|
|
37
|
+
name: 'resource',
|
|
38
|
+
type: 'options',
|
|
39
|
+
noDataExpression: true,
|
|
40
|
+
options: [
|
|
41
|
+
{ name: 'Account Statement', value: 'accountStatement' },
|
|
42
|
+
{ name: 'Admin User', value: 'adminUser' },
|
|
43
|
+
{ name: 'Bulk Operations', value: 'bulk' },
|
|
44
|
+
{ name: 'Calendar Event', value: 'calendarEvent' },
|
|
45
|
+
{ name: 'Call', value: 'call' },
|
|
46
|
+
{ name: 'Campaign', value: 'campaign' },
|
|
47
|
+
{ name: 'Clixsign (E-Signature)', value: 'clixsign' },
|
|
48
|
+
{ name: 'Contact', value: 'contact' },
|
|
49
|
+
{ name: 'Contact Alert', value: 'contactAlert' },
|
|
50
|
+
{ name: 'Contact Banking', value: 'contactBanking' },
|
|
51
|
+
{ name: 'Contact Communication', value: 'contactCommunication' },
|
|
52
|
+
{ name: 'Contact Credit Report', value: 'contactCredit' },
|
|
53
|
+
{ name: 'Contact Debt', value: 'contactDebt' },
|
|
54
|
+
{ name: 'Contact Document', value: 'contactDocument' },
|
|
55
|
+
{ name: 'Contact List', value: 'contactList' },
|
|
56
|
+
{ name: 'Contact Note', value: 'contactNote' },
|
|
57
|
+
{ name: 'Contact Workflow', value: 'contactWorkflow' },
|
|
58
|
+
{ name: 'Content Configuration', value: 'contentConfig' },
|
|
59
|
+
{ name: 'Creditor', value: 'creditor' },
|
|
60
|
+
{ name: 'Debt', value: 'debt' },
|
|
61
|
+
{ name: 'Debt Note', value: 'debtNote' },
|
|
62
|
+
{ name: 'Debt Task', value: 'debtTask' },
|
|
63
|
+
{ name: 'Document', value: 'document' },
|
|
64
|
+
{ name: 'Document Package', value: 'documentPackage' },
|
|
65
|
+
{ name: 'Document Package Template', value: 'documentPackageTemplate' },
|
|
66
|
+
{ name: 'Document Template', value: 'documentTemplate' },
|
|
67
|
+
{ name: 'Document Type', value: 'documentType' },
|
|
68
|
+
{ name: 'Email Template', value: 'emailTemplate' },
|
|
69
|
+
{ name: 'Enrollment', value: 'enrollment' },
|
|
70
|
+
{ name: 'Forth Credit', value: 'forthCredit' },
|
|
71
|
+
{ name: 'Lender', value: 'lender' },
|
|
72
|
+
{ name: 'Payee', value: 'payee' },
|
|
73
|
+
{ name: 'Settlement Offer', value: 'settlementOffer' },
|
|
74
|
+
{ name: 'Task', value: 'task' },
|
|
75
|
+
{ name: 'Team', value: 'team' },
|
|
76
|
+
{ name: 'Transaction', value: 'transaction' },
|
|
77
|
+
{ name: 'User', value: 'user' },
|
|
78
|
+
{ name: 'Utility', value: 'utility' },
|
|
79
|
+
],
|
|
80
|
+
default: 'contact',
|
|
81
|
+
},
|
|
82
|
+
// Contact
|
|
83
|
+
...descriptions_1.contactOperations,
|
|
84
|
+
...descriptions_1.contactFields,
|
|
85
|
+
// Debt
|
|
86
|
+
...descriptions_1.debtOperations,
|
|
87
|
+
...descriptions_1.debtFields,
|
|
88
|
+
// Enrollment
|
|
89
|
+
...descriptions_1.enrollmentOperations,
|
|
90
|
+
...descriptions_1.enrollmentFields,
|
|
91
|
+
// Settlement Offer
|
|
92
|
+
...descriptions_1.settlementOfferOperations,
|
|
93
|
+
...descriptions_1.settlementOfferFields,
|
|
94
|
+
// Clixsign
|
|
95
|
+
...descriptions_1.clixsignOperations,
|
|
96
|
+
...descriptions_1.clixsignFields,
|
|
97
|
+
// Forth Credit
|
|
98
|
+
...descriptions_1.forthCreditOperations,
|
|
99
|
+
...descriptions_1.forthCreditFields,
|
|
100
|
+
// Contact Alert
|
|
101
|
+
...descriptions_1.contactAlertOperations,
|
|
102
|
+
...descriptions_1.contactAlertFields,
|
|
103
|
+
// Contact Note
|
|
104
|
+
...descriptions_1.contactNoteOperations,
|
|
105
|
+
...descriptions_1.contactNoteFields,
|
|
106
|
+
// Contact Communication
|
|
107
|
+
...descriptions_1.contactCommunicationOperations,
|
|
108
|
+
...descriptions_1.contactCommunicationFields,
|
|
109
|
+
// Contact Document
|
|
110
|
+
...descriptions_1.contactDocumentOperations,
|
|
111
|
+
...descriptions_1.contactDocumentFields,
|
|
112
|
+
// Contact Debt
|
|
113
|
+
...descriptions_1.contactDebtOperations,
|
|
114
|
+
...descriptions_1.contactDebtFields,
|
|
115
|
+
// Contact Workflow
|
|
116
|
+
...descriptions_1.contactWorkflowOperations,
|
|
117
|
+
...descriptions_1.contactWorkflowFields,
|
|
118
|
+
// Contact Banking
|
|
119
|
+
...descriptions_1.contactBankingOperations,
|
|
120
|
+
...descriptions_1.contactBankingFields,
|
|
121
|
+
// Contact List
|
|
122
|
+
...descriptions_1.contactListOperations,
|
|
123
|
+
...descriptions_1.contactListFields,
|
|
124
|
+
// Contact Credit
|
|
125
|
+
...descriptions_1.contactCreditOperations,
|
|
126
|
+
...descriptions_1.contactCreditFields,
|
|
127
|
+
// Debt Task
|
|
128
|
+
...descriptions_1.debtTaskOperations,
|
|
129
|
+
...descriptions_1.debtTaskFields,
|
|
130
|
+
// Debt Note
|
|
131
|
+
...descriptions_1.debtNoteOperations,
|
|
132
|
+
...descriptions_1.debtNoteFields,
|
|
133
|
+
// Call
|
|
134
|
+
...descriptions_1.callOperations,
|
|
135
|
+
...descriptions_1.callFields,
|
|
136
|
+
// Document
|
|
137
|
+
...descriptions_1.documentOperations,
|
|
138
|
+
...descriptions_1.documentFields,
|
|
139
|
+
// Document Package
|
|
140
|
+
...descriptions_1.documentPackageOperations,
|
|
141
|
+
...descriptions_1.documentPackageFields,
|
|
142
|
+
// Document Type
|
|
143
|
+
...descriptions_1.documentTypeOperations,
|
|
144
|
+
...descriptions_1.documentTypeFields,
|
|
145
|
+
// Document Template
|
|
146
|
+
...descriptions_1.documentTemplateOperations,
|
|
147
|
+
...descriptions_1.documentTemplateFields,
|
|
148
|
+
// Document Package Template
|
|
149
|
+
...descriptions_1.documentPackageTemplateOperations,
|
|
150
|
+
...descriptions_1.documentPackageTemplateFields,
|
|
151
|
+
// Task
|
|
152
|
+
...descriptions_1.taskOperations,
|
|
153
|
+
...descriptions_1.taskFields,
|
|
154
|
+
// Calendar Event
|
|
155
|
+
...descriptions_1.calendarEventOperations,
|
|
156
|
+
...descriptions_1.calendarEventFields,
|
|
157
|
+
// User
|
|
158
|
+
...descriptions_1.userOperations,
|
|
159
|
+
...descriptions_1.userFields,
|
|
160
|
+
// Campaign
|
|
161
|
+
...descriptions_1.campaignOperations,
|
|
162
|
+
...descriptions_1.campaignFields,
|
|
163
|
+
// Email Template
|
|
164
|
+
...descriptions_1.emailTemplateOperations,
|
|
165
|
+
...descriptions_1.emailTemplateFields,
|
|
166
|
+
// Team
|
|
167
|
+
...descriptions_1.teamOperations,
|
|
168
|
+
...descriptions_1.teamFields,
|
|
169
|
+
// Admin User
|
|
170
|
+
...descriptions_1.adminUserOperations,
|
|
171
|
+
...descriptions_1.adminUserFields,
|
|
172
|
+
// Payee
|
|
173
|
+
...descriptions_1.payeeOperations,
|
|
174
|
+
...descriptions_1.payeeFields,
|
|
175
|
+
// Content Config
|
|
176
|
+
...descriptions_1.contentConfigOperations,
|
|
177
|
+
...descriptions_1.contentConfigFields,
|
|
178
|
+
// Creditor
|
|
179
|
+
...descriptions_1.creditorOperations,
|
|
180
|
+
...descriptions_1.creditorFields,
|
|
181
|
+
// Transaction
|
|
182
|
+
...descriptions_1.transactionOperations,
|
|
183
|
+
...descriptions_1.transactionFields,
|
|
184
|
+
// Account Statement
|
|
185
|
+
...descriptions_1.accountStatementOperations,
|
|
186
|
+
...descriptions_1.accountStatementFields,
|
|
187
|
+
// Lender
|
|
188
|
+
...descriptions_1.lenderOperations,
|
|
189
|
+
...descriptions_1.lenderFields,
|
|
190
|
+
// Utility
|
|
191
|
+
...descriptions_1.utilityOperations,
|
|
192
|
+
...descriptions_1.utilityFields,
|
|
193
|
+
// Bulk
|
|
194
|
+
...descriptions_1.bulkOperations,
|
|
195
|
+
...descriptions_1.bulkFields,
|
|
196
|
+
],
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
async execute() {
|
|
200
|
+
// Log license notice (once per node load)
|
|
201
|
+
(0, LicenseNotice_1.logLicenseNotice)('Setforth');
|
|
202
|
+
const items = this.getInputData();
|
|
203
|
+
const returnData = [];
|
|
204
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
205
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
206
|
+
for (let i = 0; i < items.length; i++) {
|
|
207
|
+
try {
|
|
208
|
+
let responseData = {};
|
|
209
|
+
// Contact Resource
|
|
210
|
+
if (resource === 'contact') {
|
|
211
|
+
if (operation === 'create') {
|
|
212
|
+
const body = {
|
|
213
|
+
first_name: this.getNodeParameter('firstName', i),
|
|
214
|
+
last_name: this.getNodeParameter('lastName', i),
|
|
215
|
+
};
|
|
216
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
217
|
+
Object.assign(body, additionalFields);
|
|
218
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'POST', '/v1/contacts', body);
|
|
219
|
+
}
|
|
220
|
+
else if (operation === 'get') {
|
|
221
|
+
const contactId = this.getNodeParameter('contactId', i);
|
|
222
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'GET', `/v1/contacts/${contactId}`);
|
|
223
|
+
}
|
|
224
|
+
else if (operation === 'getAll') {
|
|
225
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
226
|
+
const filters = this.getNodeParameter('filters', i);
|
|
227
|
+
if (returnAll) {
|
|
228
|
+
responseData = await GenericFunctions_1.setforthApiRequestAllItems.call(this, 'GET', '/v1/contacts', {}, filters);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
const limit = this.getNodeParameter('limit', i);
|
|
232
|
+
filters.limit = limit;
|
|
233
|
+
const response = await GenericFunctions_1.setforthApiRequest.call(this, 'GET', '/v1/contacts', {}, filters);
|
|
234
|
+
responseData = response.data || [];
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else if (operation === 'update') {
|
|
238
|
+
const contactId = this.getNodeParameter('contactId', i);
|
|
239
|
+
const updateFields = this.getNodeParameter('updateFields', i);
|
|
240
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'PATCH', `/v1/contacts/${contactId}`, updateFields);
|
|
241
|
+
}
|
|
242
|
+
else if (operation === 'delete') {
|
|
243
|
+
const contactId = this.getNodeParameter('contactId', i);
|
|
244
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'DELETE', `/v1/contacts/${contactId}`);
|
|
245
|
+
}
|
|
246
|
+
else if (operation === 'search') {
|
|
247
|
+
const searchParams = this.getNodeParameter('searchParams', i);
|
|
248
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'POST', '/v1/contacts/search', searchParams);
|
|
249
|
+
}
|
|
250
|
+
else if (operation === 'getHistoryFeed') {
|
|
251
|
+
const contactId = this.getNodeParameter('contactId', i);
|
|
252
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'GET', `/v1/contacts/${contactId}/history`);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
// Debt Resource
|
|
256
|
+
else if (resource === 'debt') {
|
|
257
|
+
if (operation === 'create') {
|
|
258
|
+
const body = {
|
|
259
|
+
contact_id: this.getNodeParameter('contactId', i),
|
|
260
|
+
creditor_name: this.getNodeParameter('creditorName', i),
|
|
261
|
+
original_balance: this.getNodeParameter('originalBalance', i),
|
|
262
|
+
current_balance: this.getNodeParameter('currentBalance', i),
|
|
263
|
+
};
|
|
264
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
265
|
+
Object.assign(body, additionalFields);
|
|
266
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'POST', '/v1/debts', body);
|
|
267
|
+
}
|
|
268
|
+
else if (operation === 'get') {
|
|
269
|
+
const debtId = this.getNodeParameter('debtId', i);
|
|
270
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'GET', `/v1/debts/${debtId}`);
|
|
271
|
+
}
|
|
272
|
+
else if (operation === 'update') {
|
|
273
|
+
const debtId = this.getNodeParameter('debtId', i);
|
|
274
|
+
const updateFields = this.getNodeParameter('updateFields', i);
|
|
275
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'PATCH', `/v1/debts/${debtId}`, updateFields);
|
|
276
|
+
}
|
|
277
|
+
else if (operation === 'delete') {
|
|
278
|
+
const debtId = this.getNodeParameter('debtId', i);
|
|
279
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'DELETE', `/v1/debts/${debtId}`);
|
|
280
|
+
}
|
|
281
|
+
else if (operation === 'getDocuments') {
|
|
282
|
+
const debtId = this.getNodeParameter('debtId', i);
|
|
283
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'GET', `/v1/debts/${debtId}/documents`);
|
|
284
|
+
}
|
|
285
|
+
else if (operation === 'updateType') {
|
|
286
|
+
const debtId = this.getNodeParameter('debtId', i);
|
|
287
|
+
const newType = this.getNodeParameter('newType', i);
|
|
288
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'PATCH', `/v1/debts/${debtId}/type`, { type: newType });
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
// Generic handler for other resources
|
|
292
|
+
else {
|
|
293
|
+
const id = this.getNodeParameter('id', i, '');
|
|
294
|
+
if (operation === 'get' && id) {
|
|
295
|
+
responseData = await GenericFunctions_1.setforthApiRequest.call(this, 'GET', `/v1/${resource}s/${id}`);
|
|
296
|
+
}
|
|
297
|
+
else if (operation === 'getAll') {
|
|
298
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
299
|
+
if (returnAll) {
|
|
300
|
+
responseData = await GenericFunctions_1.setforthApiRequestAllItems.call(this, 'GET', `/v1/${resource}s`);
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
const limit = this.getNodeParameter('limit', i);
|
|
304
|
+
const response = await GenericFunctions_1.setforthApiRequest.call(this, 'GET', `/v1/${resource}s`, {}, { limit });
|
|
305
|
+
responseData = response.data || [];
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
310
|
+
returnData.push(...executionData);
|
|
311
|
+
}
|
|
312
|
+
catch (error) {
|
|
313
|
+
if (this.continueOnFail()) {
|
|
314
|
+
returnData.push({ json: { error: error.message }, pairedItem: { item: i } });
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
throw error;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return [returnData];
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
exports.Setforth = Setforth;
|
|
324
|
+
//# sourceMappingURL=Setforth.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Setforth.node.js","sourceRoot":"","sources":["../../../nodes/Setforth/Setforth.node.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAUH,yDAAoF;AACpF,mDAAmD;AAEnD,iDA6EwB;AAExB,MAAa,QAAQ;IAArB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,qEAAqE;YAClF,QAAQ,EAAE;gBACT,IAAI,EAAE,UAAU;aAChB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,mBAAmB;oBACzB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,kBAAkB,EAAE;wBACxD,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE;wBAC1C,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE;wBAC1C,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,eAAe,EAAE;wBAClD,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;wBAC/B,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;wBACvC,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,UA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WebhookFunctions, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow';
|
|
2
|
+
export declare class SetforthTrigger implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
webhookMethods: {
|
|
5
|
+
default: {
|
|
6
|
+
checkExists(this: IHookFunctions): Promise<boolean>;
|
|
7
|
+
create(this: IHookFunctions): Promise<boolean>;
|
|
8
|
+
delete(this: IHookFunctions): Promise<boolean>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Velocity BPA, LLC
|
|
4
|
+
* Licensed under the Business Source License 1.1
|
|
5
|
+
* Commercial use requires a separate commercial license.
|
|
6
|
+
* See LICENSE file for details.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SetforthTrigger = void 0;
|
|
10
|
+
const GenericFunctions_1 = require("./GenericFunctions");
|
|
11
|
+
const LicenseNotice_1 = require("./LicenseNotice");
|
|
12
|
+
class SetforthTrigger {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.description = {
|
|
15
|
+
displayName: 'Setforth Trigger',
|
|
16
|
+
name: 'setforthTrigger',
|
|
17
|
+
icon: 'file:setforth.svg',
|
|
18
|
+
group: ['trigger'],
|
|
19
|
+
version: 1,
|
|
20
|
+
subtitle: '={{$parameter["event"]}}',
|
|
21
|
+
description: 'Starts the workflow when Setforth events occur',
|
|
22
|
+
defaults: {
|
|
23
|
+
name: 'Setforth Trigger',
|
|
24
|
+
},
|
|
25
|
+
inputs: [],
|
|
26
|
+
outputs: ['main'],
|
|
27
|
+
credentials: [
|
|
28
|
+
{
|
|
29
|
+
name: 'setforthOAuth2Api',
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
webhooks: [
|
|
34
|
+
{
|
|
35
|
+
name: 'default',
|
|
36
|
+
httpMethod: 'POST',
|
|
37
|
+
responseMode: 'onReceived',
|
|
38
|
+
path: 'webhook',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
properties: [
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Event',
|
|
44
|
+
name: 'event',
|
|
45
|
+
type: 'options',
|
|
46
|
+
required: true,
|
|
47
|
+
default: 'contact.created',
|
|
48
|
+
options: [
|
|
49
|
+
{
|
|
50
|
+
name: 'Contact Created',
|
|
51
|
+
value: 'contact.created',
|
|
52
|
+
description: 'Triggers when a new contact is created',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Contact Updated',
|
|
56
|
+
value: 'contact.updated',
|
|
57
|
+
description: 'Triggers when a contact is updated',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Debt Created',
|
|
61
|
+
value: 'debt.created',
|
|
62
|
+
description: 'Triggers when a new debt is created',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Debt Status Changed',
|
|
66
|
+
value: 'debt.status_changed',
|
|
67
|
+
description: 'Triggers when a debt status changes',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Document Signed (Clixsign)',
|
|
71
|
+
value: 'clixsign.document_signed',
|
|
72
|
+
description: 'Triggers when a document is signed via Clixsign',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Enrollment Approved',
|
|
76
|
+
value: 'enrollment.approved',
|
|
77
|
+
description: 'Triggers when an enrollment is approved',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Enrollment Submitted',
|
|
81
|
+
value: 'enrollment.submitted',
|
|
82
|
+
description: 'Triggers when an enrollment is submitted',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'Payment Received',
|
|
86
|
+
value: 'payment.received',
|
|
87
|
+
description: 'Triggers when a payment is received',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Settlement Offer Created',
|
|
91
|
+
value: 'settlement.created',
|
|
92
|
+
description: 'Triggers when a settlement offer is created',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'Settlement Offer Status Changed',
|
|
96
|
+
value: 'settlement.status_changed',
|
|
97
|
+
description: 'Triggers when a settlement offer status changes',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'Task Completed',
|
|
101
|
+
value: 'task.completed',
|
|
102
|
+
description: 'Triggers when a task is completed',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'Workflow Status Changed',
|
|
106
|
+
value: 'workflow.status_changed',
|
|
107
|
+
description: 'Triggers when a contact workflow status changes',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
displayName: 'Options',
|
|
113
|
+
name: 'options',
|
|
114
|
+
type: 'collection',
|
|
115
|
+
placeholder: 'Add Option',
|
|
116
|
+
default: {},
|
|
117
|
+
options: [
|
|
118
|
+
{
|
|
119
|
+
displayName: 'Filter by Contact ID',
|
|
120
|
+
name: 'contactId',
|
|
121
|
+
type: 'string',
|
|
122
|
+
default: '',
|
|
123
|
+
description: 'Only trigger for events related to this contact ID',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
displayName: 'Filter by Status',
|
|
127
|
+
name: 'status',
|
|
128
|
+
type: 'string',
|
|
129
|
+
default: '',
|
|
130
|
+
description: 'Only trigger for events with this status',
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
};
|
|
136
|
+
this.webhookMethods = {
|
|
137
|
+
default: {
|
|
138
|
+
async checkExists() {
|
|
139
|
+
const webhookUrl = this.getNodeWebhookUrl('default');
|
|
140
|
+
const event = this.getNodeParameter('event');
|
|
141
|
+
try {
|
|
142
|
+
const webhooks = (await GenericFunctions_1.setforthApiRequest.call(this, 'GET', '/v1/webhooks'));
|
|
143
|
+
for (const webhook of webhooks) {
|
|
144
|
+
if (webhook.url === webhookUrl && webhook.event === event) {
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
return false;
|
|
153
|
+
},
|
|
154
|
+
async create() {
|
|
155
|
+
const webhookUrl = this.getNodeWebhookUrl('default');
|
|
156
|
+
const event = this.getNodeParameter('event');
|
|
157
|
+
const body = {
|
|
158
|
+
url: webhookUrl,
|
|
159
|
+
event,
|
|
160
|
+
active: true,
|
|
161
|
+
};
|
|
162
|
+
try {
|
|
163
|
+
await GenericFunctions_1.setforthApiRequest.call(this, 'POST', '/v1/webhooks', body);
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
return true;
|
|
169
|
+
},
|
|
170
|
+
async delete() {
|
|
171
|
+
const webhookUrl = this.getNodeWebhookUrl('default');
|
|
172
|
+
const event = this.getNodeParameter('event');
|
|
173
|
+
try {
|
|
174
|
+
const webhooks = (await GenericFunctions_1.setforthApiRequest.call(this, 'GET', '/v1/webhooks'));
|
|
175
|
+
for (const webhook of webhooks) {
|
|
176
|
+
if (webhook.url === webhookUrl && webhook.event === event) {
|
|
177
|
+
await GenericFunctions_1.setforthApiRequest.call(this, 'DELETE', `/v1/webhooks/${webhook.id}`);
|
|
178
|
+
return true;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
return false;
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
async webhook() {
|
|
191
|
+
// Log license notice (once per node load)
|
|
192
|
+
(0, LicenseNotice_1.logLicenseNotice)('SetforthTrigger');
|
|
193
|
+
const req = this.getRequestObject();
|
|
194
|
+
const body = req.body;
|
|
195
|
+
const options = this.getNodeParameter('options');
|
|
196
|
+
// Apply filters if configured
|
|
197
|
+
if (options.contactId && body.contact_id !== options.contactId) {
|
|
198
|
+
return { noWebhookResponse: true };
|
|
199
|
+
}
|
|
200
|
+
if (options.status && body.status !== options.status) {
|
|
201
|
+
return { noWebhookResponse: true };
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
workflowData: [this.helpers.returnJsonArray(body)],
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
exports.SetforthTrigger = SetforthTrigger;
|
|
209
|
+
//# sourceMappingURL=SetforthTrigger.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetforthTrigger.node.js","sourceRoot":"","sources":["../../../nodes/Setforth/SetforthTrigger.node.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAWH,yDAAwD;AACxD,mDAAmD;AAEnD,MAAa,eAAe;IAA5B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,0BAA0B;YACpC,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE;gBACT,IAAI,EAAE,kBAAkB;aACxB;YACD,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,mBAAmB;oBACzB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,QAAQ,EAAE;gBACT;oBACC,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,MAAM;oBAClB,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE,SAAS;iBACf;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,OAAO;oBACpB,IAAI,EAAE,OAAO;oBACb,IAA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