@replyio/n8n-nodes-reply 0.1.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.
Files changed (118) hide show
  1. package/README.md +46 -0
  2. package/dist/credentials/ReplyApi.credentials.d.ts +20 -0
  3. package/dist/credentials/ReplyApi.credentials.js +36 -0
  4. package/dist/credentials/ReplyApi.credentials.js.map +1 -0
  5. package/dist/icons/reply.dark.svg +58 -0
  6. package/dist/icons/reply.svg +1 -0
  7. package/dist/nodes/Reply/Reply.node.d.ts +5 -0
  8. package/dist/nodes/Reply/Reply.node.js +64 -0
  9. package/dist/nodes/Reply/Reply.node.js.map +1 -0
  10. package/dist/nodes/Reply/Reply.node.json +19 -0
  11. package/dist/nodes/Reply/ReplyTrigger.node.d.ts +12 -0
  12. package/dist/nodes/Reply/ReplyTrigger.node.js +308 -0
  13. package/dist/nodes/Reply/ReplyTrigger.node.js.map +1 -0
  14. package/dist/nodes/Reply/actions/contact/create.operation.d.ts +2 -0
  15. package/dist/nodes/Reply/actions/contact/create.operation.js +29 -0
  16. package/dist/nodes/Reply/actions/contact/create.operation.js.map +1 -0
  17. package/dist/nodes/Reply/actions/contact/delete.operation.d.ts +2 -0
  18. package/dist/nodes/Reply/actions/contact/delete.operation.js +26 -0
  19. package/dist/nodes/Reply/actions/contact/delete.operation.js.map +1 -0
  20. package/dist/nodes/Reply/actions/contact/getAll.operation.d.ts +2 -0
  21. package/dist/nodes/Reply/actions/contact/getAll.operation.js +15 -0
  22. package/dist/nodes/Reply/actions/contact/getAll.operation.js.map +1 -0
  23. package/dist/nodes/Reply/actions/contact/getByEmail.operation.d.ts +2 -0
  24. package/dist/nodes/Reply/actions/contact/getByEmail.operation.js +23 -0
  25. package/dist/nodes/Reply/actions/contact/getByEmail.operation.js.map +1 -0
  26. package/dist/nodes/Reply/actions/contact/getById.operation.d.ts +2 -0
  27. package/dist/nodes/Reply/actions/contact/getById.operation.js +20 -0
  28. package/dist/nodes/Reply/actions/contact/getById.operation.js.map +1 -0
  29. package/dist/nodes/Reply/actions/contact/index.d.ts +16 -0
  30. package/dist/nodes/Reply/actions/contact/index.js +429 -0
  31. package/dist/nodes/Reply/actions/contact/index.js.map +1 -0
  32. package/dist/nodes/Reply/actions/contact/update.operation.d.ts +2 -0
  33. package/dist/nodes/Reply/actions/contact/update.operation.js +54 -0
  34. package/dist/nodes/Reply/actions/contact/update.operation.js.map +1 -0
  35. package/dist/nodes/Reply/actions/contactStatus/index.d.ts +24 -0
  36. package/dist/nodes/Reply/actions/contactStatus/index.js +191 -0
  37. package/dist/nodes/Reply/actions/contactStatus/index.js.map +1 -0
  38. package/dist/nodes/Reply/actions/contactStatus/markAsActive.operation.d.ts +2 -0
  39. package/dist/nodes/Reply/actions/contactStatus/markAsActive.operation.js +8 -0
  40. package/dist/nodes/Reply/actions/contactStatus/markAsActive.operation.js.map +1 -0
  41. package/dist/nodes/Reply/actions/contactStatus/markAsBounced.operation.d.ts +2 -0
  42. package/dist/nodes/Reply/actions/contactStatus/markAsBounced.operation.js +8 -0
  43. package/dist/nodes/Reply/actions/contactStatus/markAsBounced.operation.js.map +1 -0
  44. package/dist/nodes/Reply/actions/contactStatus/markAsCalled.operation.d.ts +2 -0
  45. package/dist/nodes/Reply/actions/contactStatus/markAsCalled.operation.js +8 -0
  46. package/dist/nodes/Reply/actions/contactStatus/markAsCalled.operation.js.map +1 -0
  47. package/dist/nodes/Reply/actions/contactStatus/markAsFinished.operation.d.ts +2 -0
  48. package/dist/nodes/Reply/actions/contactStatus/markAsFinished.operation.js +8 -0
  49. package/dist/nodes/Reply/actions/contactStatus/markAsFinished.operation.js.map +1 -0
  50. package/dist/nodes/Reply/actions/contactStatus/markAsMeetingBooked.operation.d.ts +2 -0
  51. package/dist/nodes/Reply/actions/contactStatus/markAsMeetingBooked.operation.js +8 -0
  52. package/dist/nodes/Reply/actions/contactStatus/markAsMeetingBooked.operation.js.map +1 -0
  53. package/dist/nodes/Reply/actions/contactStatus/markAsOptedOut.operation.d.ts +2 -0
  54. package/dist/nodes/Reply/actions/contactStatus/markAsOptedOut.operation.js +8 -0
  55. package/dist/nodes/Reply/actions/contactStatus/markAsOptedOut.operation.js.map +1 -0
  56. package/dist/nodes/Reply/actions/contactStatus/markAsOutOfOffice.operation.d.ts +2 -0
  57. package/dist/nodes/Reply/actions/contactStatus/markAsOutOfOffice.operation.js +8 -0
  58. package/dist/nodes/Reply/actions/contactStatus/markAsOutOfOffice.operation.js.map +1 -0
  59. package/dist/nodes/Reply/actions/contactStatus/markAsPaused.operation.d.ts +2 -0
  60. package/dist/nodes/Reply/actions/contactStatus/markAsPaused.operation.js +8 -0
  61. package/dist/nodes/Reply/actions/contactStatus/markAsPaused.operation.js.map +1 -0
  62. package/dist/nodes/Reply/actions/contactStatus/markAsReplied.operation.d.ts +2 -0
  63. package/dist/nodes/Reply/actions/contactStatus/markAsReplied.operation.js +8 -0
  64. package/dist/nodes/Reply/actions/contactStatus/markAsReplied.operation.js.map +1 -0
  65. package/dist/nodes/Reply/actions/contactStatus/markAsToCall.operation.d.ts +2 -0
  66. package/dist/nodes/Reply/actions/contactStatus/markAsToCall.operation.js +8 -0
  67. package/dist/nodes/Reply/actions/contactStatus/markAsToCall.operation.js.map +1 -0
  68. package/dist/nodes/Reply/actions/contactStatus/statusHelper.d.ts +3 -0
  69. package/dist/nodes/Reply/actions/contactStatus/statusHelper.js +68 -0
  70. package/dist/nodes/Reply/actions/contactStatus/statusHelper.js.map +1 -0
  71. package/dist/nodes/Reply/actions/router.d.ts +2 -0
  72. package/dist/nodes/Reply/actions/router.js +45 -0
  73. package/dist/nodes/Reply/actions/router.js.map +1 -0
  74. package/dist/nodes/Reply/actions/sequence/addContact.operation.d.ts +2 -0
  75. package/dist/nodes/Reply/actions/sequence/addContact.operation.js +55 -0
  76. package/dist/nodes/Reply/actions/sequence/addContact.operation.js.map +1 -0
  77. package/dist/nodes/Reply/actions/sequence/archive.operation.d.ts +2 -0
  78. package/dist/nodes/Reply/actions/sequence/archive.operation.js +26 -0
  79. package/dist/nodes/Reply/actions/sequence/archive.operation.js.map +1 -0
  80. package/dist/nodes/Reply/actions/sequence/getAll.operation.d.ts +2 -0
  81. package/dist/nodes/Reply/actions/sequence/getAll.operation.js +15 -0
  82. package/dist/nodes/Reply/actions/sequence/getAll.operation.js.map +1 -0
  83. package/dist/nodes/Reply/actions/sequence/getById.operation.d.ts +2 -0
  84. package/dist/nodes/Reply/actions/sequence/getById.operation.js +20 -0
  85. package/dist/nodes/Reply/actions/sequence/getById.operation.js.map +1 -0
  86. package/dist/nodes/Reply/actions/sequence/getContacts.operation.d.ts +2 -0
  87. package/dist/nodes/Reply/actions/sequence/getContacts.operation.js +26 -0
  88. package/dist/nodes/Reply/actions/sequence/getContacts.operation.js.map +1 -0
  89. package/dist/nodes/Reply/actions/sequence/index.d.ts +18 -0
  90. package/dist/nodes/Reply/actions/sequence/index.js +388 -0
  91. package/dist/nodes/Reply/actions/sequence/index.js.map +1 -0
  92. package/dist/nodes/Reply/actions/sequence/pause.operation.d.ts +2 -0
  93. package/dist/nodes/Reply/actions/sequence/pause.operation.js +26 -0
  94. package/dist/nodes/Reply/actions/sequence/pause.operation.js.map +1 -0
  95. package/dist/nodes/Reply/actions/sequence/start.operation.d.ts +2 -0
  96. package/dist/nodes/Reply/actions/sequence/start.operation.js +26 -0
  97. package/dist/nodes/Reply/actions/sequence/start.operation.js.map +1 -0
  98. package/dist/nodes/Reply/triggers/filters.d.ts +6 -0
  99. package/dist/nodes/Reply/triggers/filters.js +53 -0
  100. package/dist/nodes/Reply/triggers/filters.js.map +1 -0
  101. package/dist/nodes/Reply/utils/GenericFunctions.d.ts +4 -0
  102. package/dist/nodes/Reply/utils/GenericFunctions.js +62 -0
  103. package/dist/nodes/Reply/utils/GenericFunctions.js.map +1 -0
  104. package/dist/nodes/Reply/utils/constants.d.ts +61 -0
  105. package/dist/nodes/Reply/utils/constants.js +44 -0
  106. package/dist/nodes/Reply/utils/constants.js.map +1 -0
  107. package/dist/nodes/Reply/utils/mappings.d.ts +11 -0
  108. package/dist/nodes/Reply/utils/mappings.js +18 -0
  109. package/dist/nodes/Reply/utils/mappings.js.map +1 -0
  110. package/dist/nodes/Reply/utils/validation.d.ts +51 -0
  111. package/dist/nodes/Reply/utils/validation.js +220 -0
  112. package/dist/nodes/Reply/utils/validation.js.map +1 -0
  113. package/dist/package.json +58 -0
  114. package/dist/publicUrls.d.ts +3 -0
  115. package/dist/publicUrls.js +7 -0
  116. package/dist/publicUrls.js.map +1 -0
  117. package/dist/tsconfig.tsbuildinfo +1 -0
  118. package/package.json +58 -0
@@ -0,0 +1,24 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ import * as markAsActive from './markAsActive.operation';
3
+ import * as markAsBounced from './markAsBounced.operation';
4
+ import * as markAsCalled from './markAsCalled.operation';
5
+ import * as markAsFinished from './markAsFinished.operation';
6
+ import * as markAsMeetingBooked from './markAsMeetingBooked.operation';
7
+ import * as markAsOptedOut from './markAsOptedOut.operation';
8
+ import * as markAsOutOfOffice from './markAsOutOfOffice.operation';
9
+ import * as markAsPaused from './markAsPaused.operation';
10
+ import * as markAsReplied from './markAsReplied.operation';
11
+ import * as markAsToCall from './markAsToCall.operation';
12
+ export declare const operations: {
13
+ markAsActive: typeof markAsActive;
14
+ markAsBounced: typeof markAsBounced;
15
+ markAsCalled: typeof markAsCalled;
16
+ markAsFinished: typeof markAsFinished;
17
+ markAsMeetingBooked: typeof markAsMeetingBooked;
18
+ markAsOptedOut: typeof markAsOptedOut;
19
+ markAsOutOfOffice: typeof markAsOutOfOffice;
20
+ markAsPaused: typeof markAsPaused;
21
+ markAsReplied: typeof markAsReplied;
22
+ markAsToCall: typeof markAsToCall;
23
+ };
24
+ export declare const description: INodeProperties[];
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.description = exports.operations = void 0;
37
+ const markAsActive = __importStar(require("./markAsActive.operation"));
38
+ const markAsBounced = __importStar(require("./markAsBounced.operation"));
39
+ const markAsCalled = __importStar(require("./markAsCalled.operation"));
40
+ const markAsFinished = __importStar(require("./markAsFinished.operation"));
41
+ const markAsMeetingBooked = __importStar(require("./markAsMeetingBooked.operation"));
42
+ const markAsOptedOut = __importStar(require("./markAsOptedOut.operation"));
43
+ const markAsOutOfOffice = __importStar(require("./markAsOutOfOffice.operation"));
44
+ const markAsPaused = __importStar(require("./markAsPaused.operation"));
45
+ const markAsReplied = __importStar(require("./markAsReplied.operation"));
46
+ const markAsToCall = __importStar(require("./markAsToCall.operation"));
47
+ exports.operations = {
48
+ markAsActive,
49
+ markAsBounced,
50
+ markAsCalled,
51
+ markAsFinished,
52
+ markAsMeetingBooked,
53
+ markAsOptedOut,
54
+ markAsOutOfOffice,
55
+ markAsPaused,
56
+ markAsReplied,
57
+ markAsToCall,
58
+ };
59
+ const statusOpsWithSequence = [
60
+ 'markAsActive',
61
+ 'markAsBounced',
62
+ 'markAsFinished',
63
+ 'markAsOutOfOffice',
64
+ 'markAsPaused',
65
+ 'markAsReplied',
66
+ ];
67
+ const statusOpsWithoutSequence = [
68
+ 'markAsCalled',
69
+ 'markAsMeetingBooked',
70
+ 'markAsOptedOut',
71
+ 'markAsToCall',
72
+ ];
73
+ exports.description = [
74
+ {
75
+ displayName: 'Operation',
76
+ name: 'operation',
77
+ type: 'options',
78
+ noDataExpression: true,
79
+ displayOptions: {
80
+ show: {
81
+ resource: ['contactStatus'],
82
+ },
83
+ },
84
+ options: [
85
+ {
86
+ name: 'Mark As Active',
87
+ value: 'markAsActive',
88
+ description: 'Restore a contact to active status in a sequence',
89
+ action: 'Mark contact as active',
90
+ },
91
+ {
92
+ name: 'Mark As Bounced',
93
+ value: 'markAsBounced',
94
+ description: 'Mark a contact as bounced in a sequence',
95
+ action: 'Mark contact as bounced',
96
+ },
97
+ {
98
+ name: 'Mark As Called',
99
+ value: 'markAsCalled',
100
+ description: 'Mark a contact as called',
101
+ action: 'Mark contact as called',
102
+ },
103
+ {
104
+ name: 'Mark As Finished',
105
+ value: 'markAsFinished',
106
+ description: 'Mark a contact as finished in a sequence',
107
+ action: 'Mark contact as finished',
108
+ },
109
+ {
110
+ name: 'Mark As Meeting Booked',
111
+ value: 'markAsMeetingBooked',
112
+ description: 'Mark a contact as meeting booked',
113
+ action: 'Mark contact as meeting booked',
114
+ },
115
+ {
116
+ name: 'Mark As Opted Out',
117
+ value: 'markAsOptedOut',
118
+ description: 'Opt out a contact globally',
119
+ action: 'Mark contact as opted out',
120
+ },
121
+ {
122
+ name: 'Mark As Out Of Office',
123
+ value: 'markAsOutOfOffice',
124
+ description: 'Mark a contact as out of office in a sequence',
125
+ action: 'Mark contact as out of office',
126
+ },
127
+ {
128
+ name: 'Mark As Paused',
129
+ value: 'markAsPaused',
130
+ description: 'Pause a contact in a sequence',
131
+ action: 'Mark contact as paused',
132
+ },
133
+ {
134
+ name: 'Mark As Replied',
135
+ value: 'markAsReplied',
136
+ description: 'Mark a contact as replied in a sequence',
137
+ action: 'Mark contact as replied',
138
+ },
139
+ {
140
+ name: 'Mark As To Call',
141
+ value: 'markAsToCall',
142
+ description: 'Mark a contact as to-call',
143
+ action: 'Mark contact as to call',
144
+ },
145
+ ],
146
+ default: 'markAsActive',
147
+ },
148
+ {
149
+ displayName: 'Contact ID',
150
+ name: 'contactId',
151
+ type: 'number',
152
+ required: true,
153
+ default: 0,
154
+ description: 'The ID of the contact to update status',
155
+ displayOptions: {
156
+ show: {
157
+ resource: ['contactStatus'],
158
+ operation: statusOpsWithSequence,
159
+ },
160
+ },
161
+ },
162
+ {
163
+ displayName: 'Sequence ID',
164
+ name: 'sequenceId',
165
+ type: 'number',
166
+ required: true,
167
+ default: 0,
168
+ description: 'The ID of the sequence where the status change applies',
169
+ displayOptions: {
170
+ show: {
171
+ resource: ['contactStatus'],
172
+ operation: statusOpsWithSequence,
173
+ },
174
+ },
175
+ },
176
+ {
177
+ displayName: 'Contact ID',
178
+ name: 'contactId',
179
+ type: 'number',
180
+ required: true,
181
+ default: 0,
182
+ description: 'The ID of the contact to update status',
183
+ displayOptions: {
184
+ show: {
185
+ resource: ['contactStatus'],
186
+ operation: statusOpsWithoutSequence,
187
+ },
188
+ },
189
+ },
190
+ ];
191
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uEAAyD;AACzD,yEAA2D;AAC3D,uEAAyD;AACzD,2EAA6D;AAC7D,qFAAuE;AACvE,2EAA6D;A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QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,wCAAwC;QACrD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,eAAe,CAAC;gBAC3B,SAAS,EAAE,wBAAwB;aACnC;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const statusHelper_1 = require("./statusHelper");
5
+ async function execute(i) {
6
+ return (0, statusHelper_1.executeStatusWithSequence)(this, i, 'Active');
7
+ }
8
+ //# sourceMappingURL=markAsActive.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markAsActive.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/markAsActive.operation.ts"],"names":[],"mappings":";;AAGA,0BAEC;AAJD,iDAA2D;AAEpD,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,OAAO,IAAA,wCAAyB,EAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const statusHelper_1 = require("./statusHelper");
5
+ async function execute(i) {
6
+ return (0, statusHelper_1.executeStatusWithSequence)(this, i, 'Bounced');
7
+ }
8
+ //# sourceMappingURL=markAsBounced.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markAsBounced.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/markAsBounced.operation.ts"],"names":[],"mappings":";;AAGA,0BAEC;AAJD,iDAA2D;AAEpD,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,OAAO,IAAA,wCAAyB,EAAC,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const statusHelper_1 = require("./statusHelper");
5
+ async function execute(i) {
6
+ return (0, statusHelper_1.executeStatusWithoutSequence)(this, i, 'Called');
7
+ }
8
+ //# sourceMappingURL=markAsCalled.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markAsCalled.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/markAsCalled.operation.ts"],"names":[],"mappings":";;AAGA,0BAEC;AAJD,iDAA8D;AAEvD,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,OAAO,IAAA,2CAA4B,EAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const statusHelper_1 = require("./statusHelper");
5
+ async function execute(i) {
6
+ return (0, statusHelper_1.executeStatusWithSequence)(this, i, 'Finished');
7
+ }
8
+ //# sourceMappingURL=markAsFinished.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markAsFinished.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/markAsFinished.operation.ts"],"names":[],"mappings":";;AAGA,0BAEC;AAJD,iDAA2D;AAEpD,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,OAAO,IAAA,wCAAyB,EAAC,IAAI,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;AACvD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const statusHelper_1 = require("./statusHelper");
5
+ async function execute(i) {
6
+ return (0, statusHelper_1.executeStatusWithoutSequence)(this, i, 'MeetingBooked');
7
+ }
8
+ //# sourceMappingURL=markAsMeetingBooked.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markAsMeetingBooked.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/markAsMeetingBooked.operation.ts"],"names":[],"mappings":";;AAGA,0BAEC;AAJD,iDAA8D;AAEvD,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,OAAO,IAAA,2CAA4B,EAAC,IAAI,EAAE,CAAC,EAAE,eAAe,CAAC,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const statusHelper_1 = require("./statusHelper");
5
+ async function execute(i) {
6
+ return (0, statusHelper_1.executeStatusWithoutSequence)(this, i, 'OptedOut');
7
+ }
8
+ //# sourceMappingURL=markAsOptedOut.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markAsOptedOut.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/markAsOptedOut.operation.ts"],"names":[],"mappings":";;AAGA,0BAEC;AAJD,iDAA8D;AAEvD,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,OAAO,IAAA,2CAA4B,EAAC,IAAI,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const statusHelper_1 = require("./statusHelper");
5
+ async function execute(i) {
6
+ return (0, statusHelper_1.executeStatusWithSequence)(this, i, 'OutOfOffice');
7
+ }
8
+ //# sourceMappingURL=markAsOutOfOffice.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markAsOutOfOffice.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/markAsOutOfOffice.operation.ts"],"names":[],"mappings":";;AAGA,0BAEC;AAJD,iDAA2D;AAEpD,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,OAAO,IAAA,wCAAyB,EAAC,IAAI,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const statusHelper_1 = require("./statusHelper");
5
+ async function execute(i) {
6
+ return (0, statusHelper_1.executeStatusWithSequence)(this, i, 'Paused');
7
+ }
8
+ //# sourceMappingURL=markAsPaused.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markAsPaused.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/markAsPaused.operation.ts"],"names":[],"mappings":";;AAGA,0BAEC;AAJD,iDAA2D;AAEpD,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,OAAO,IAAA,wCAAyB,EAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const statusHelper_1 = require("./statusHelper");
5
+ async function execute(i) {
6
+ return (0, statusHelper_1.executeStatusWithSequence)(this, i, 'Replied');
7
+ }
8
+ //# sourceMappingURL=markAsReplied.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markAsReplied.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/markAsReplied.operation.ts"],"names":[],"mappings":";;AAGA,0BAEC;AAJD,iDAA2D;AAEpD,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,OAAO,IAAA,wCAAyB,EAAC,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;AACtD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const statusHelper_1 = require("./statusHelper");
5
+ async function execute(i) {
6
+ return (0, statusHelper_1.executeStatusWithoutSequence)(this, i, 'ToCall');
7
+ }
8
+ //# sourceMappingURL=markAsToCall.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markAsToCall.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/markAsToCall.operation.ts"],"names":[],"mappings":";;AAGA,0BAEC;AAJD,iDAA8D;AAEvD,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,OAAO,IAAA,2CAA4B,EAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function executeStatusWithSequence(ctx: IExecuteFunctions, i: number, status: string): Promise<INodeExecutionData[]>;
3
+ export declare function executeStatusWithoutSequence(ctx: IExecuteFunctions, i: number, status: string): Promise<INodeExecutionData[]>;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeStatusWithSequence = executeStatusWithSequence;
4
+ exports.executeStatusWithoutSequence = executeStatusWithoutSequence;
5
+ const n8n_workflow_1 = require("n8n-workflow");
6
+ const GenericFunctions_1 = require("../../utils/GenericFunctions");
7
+ const validation_1 = require("../../utils/validation");
8
+ async function executeStatusWithSequence(ctx, i, status) {
9
+ const contactId = ctx.getNodeParameter('contactId', i);
10
+ const sequenceId = ctx.getNodeParameter('sequenceId', i);
11
+ try {
12
+ (0, validation_1.validateContactId)(contactId);
13
+ (0, validation_1.validateSequenceId)(sequenceId);
14
+ }
15
+ catch (validationError) {
16
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), validationError.message, {
17
+ itemIndex: i,
18
+ });
19
+ }
20
+ const body = {
21
+ contactIds: [contactId],
22
+ status,
23
+ sequenceId,
24
+ };
25
+ const response = await GenericFunctions_1.replyApiRequest.call(ctx, 'POST', '/v3/contacts/status', body);
26
+ return [
27
+ {
28
+ json: response
29
+ ? response
30
+ : {
31
+ success: true,
32
+ contactId,
33
+ sequenceId,
34
+ status,
35
+ message: `Contact marked as ${status.toLowerCase()}`,
36
+ },
37
+ },
38
+ ];
39
+ }
40
+ async function executeStatusWithoutSequence(ctx, i, status) {
41
+ const contactId = ctx.getNodeParameter('contactId', i);
42
+ try {
43
+ (0, validation_1.validateContactId)(contactId);
44
+ }
45
+ catch (validationError) {
46
+ throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), validationError.message, {
47
+ itemIndex: i,
48
+ });
49
+ }
50
+ const body = {
51
+ contactIds: [contactId],
52
+ status,
53
+ };
54
+ const response = await GenericFunctions_1.replyApiRequest.call(ctx, 'POST', '/v3/contacts/status', body);
55
+ return [
56
+ {
57
+ json: response
58
+ ? response
59
+ : {
60
+ success: true,
61
+ contactId,
62
+ status,
63
+ message: `Contact marked as ${status.toLowerCase()}`,
64
+ },
65
+ },
66
+ ];
67
+ }
68
+ //# sourceMappingURL=statusHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statusHelper.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/contactStatus/statusHelper.ts"],"names":[],"mappings":";;AAMA,8DAsCC;AAED,oEAkCC;AA/ED,+CAAkD;AAElD,mEAA+D;AAC/D,uDAA+E;AAExE,KAAK,UAAU,yBAAyB,CAC9C,GAAsB,EACtB,CAAS,EACT,MAAc;IAEd,MAAM,SAAS,GAAG,GAAG,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;IACjE,MAAM,UAAU,GAAG,GAAG,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAW,CAAC;IAEnE,IAAI,CAAC;QACJ,IAAA,8BAAiB,EAAC,SAAS,CAAC,CAAC;QAC7B,IAAA,+BAAkB,EAAC,UAAU,CAAC,CAAC;IAChC,CAAC;IAAC,OAAO,eAAe,EAAE,CAAC;QAC1B,MAAM,IAAI,iCAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,EAAG,eAAyB,CAAC,OAAO,EAAE;YAC/E,SAAS,EAAE,CAAC;SACZ,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAgB;QACzB,UAAU,EA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,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function router(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.router = router;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const contact_1 = require("./contact");
6
+ const contactStatus_1 = require("./contactStatus");
7
+ const sequence_1 = require("./sequence");
8
+ const resourceOperations = {
9
+ contact: contact_1.operations,
10
+ contactStatus: contactStatus_1.operations,
11
+ sequence: sequence_1.operations,
12
+ };
13
+ async function router() {
14
+ const items = this.getInputData();
15
+ const returnData = [];
16
+ const resource = this.getNodeParameter('resource', 0);
17
+ const operation = this.getNodeParameter('operation', 0);
18
+ const operations = resourceOperations[resource];
19
+ if (!operations) {
20
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown resource: ${resource}`);
21
+ }
22
+ const operationHandler = operations[operation];
23
+ if (!operationHandler) {
24
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown operation '${operation}' for resource '${resource}'`);
25
+ }
26
+ for (let i = 0; i < items.length; i++) {
27
+ try {
28
+ const results = await operationHandler.execute.call(this, i);
29
+ returnData.push(...results);
30
+ }
31
+ catch (error) {
32
+ if (this.continueOnFail()) {
33
+ returnData.push({ json: { error: error.message }, pairedItem: i });
34
+ }
35
+ else {
36
+ if (error.context) {
37
+ throw error;
38
+ }
39
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
40
+ }
41
+ }
42
+ }
43
+ return [returnData];
44
+ }
45
+ //# sourceMappingURL=router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.js","sourceRoot":"","sources":["../../../../nodes/Reply/actions/router.ts"],"names":[],"mappings":";;AAmBA,wBAqCC;AAvDD,+CAAkD;AAElD,uCAA4D;AAC5D,mDAAwE;AACxE,yCAA8D;AAQ9D,MAAM,kBAAkB,GAA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,KAAe,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;YAC/E,CAAC;iBAAM,CAAC;gBACP,IAAK,KAA4B,CAAC,OAAO,EAAE,CAAC;oBAC3C,MAAM,KAAK,CAAC;gBACb,CAAC;gBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;YAChF,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAC;AACrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const GenericFunctions_1 = require("../../utils/GenericFunctions");
6
+ const validation_1 = require("../../utils/validation");
7
+ async function execute(i) {
8
+ const sequenceId = this.getNodeParameter('sequenceId', i);
9
+ const contactMode = this.getNodeParameter('contactMode', i);
10
+ const forcePush = this.getNodeParameter('forcePush', i);
11
+ let body;
12
+ if (contactMode === 'existingContact') {
13
+ const contactId = this.getNodeParameter('contactId', i);
14
+ body = { contactId, forcePush };
15
+ try {
16
+ (0, validation_1.validateEnrollmentById)(body);
17
+ }
18
+ catch (validationError) {
19
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), validationError.message, {
20
+ itemIndex: i,
21
+ });
22
+ }
23
+ }
24
+ else {
25
+ const contactEmail = this.getNodeParameter('contactEmail', i);
26
+ const contactFields = this.getNodeParameter('contactFields', i);
27
+ const contact = { email: contactEmail, ...contactFields };
28
+ body = { contact, forcePush };
29
+ try {
30
+ (0, validation_1.validateEnrollmentByContact)(body);
31
+ }
32
+ catch (validationError) {
33
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), validationError.message, {
34
+ itemIndex: i,
35
+ });
36
+ }
37
+ }
38
+ const endpoint = `/v3/sequences/${sequenceId}/contacts`;
39
+ const response = (await GenericFunctions_1.replyApiRequest.call(this, 'POST', endpoint, body));
40
+ let outcome = 'enrolled';
41
+ let reason;
42
+ if (response.skipped || response.alreadyEnrolled) {
43
+ outcome = 'skipped';
44
+ reason = 'already_enrolled';
45
+ }
46
+ else if (forcePush && response.forcePushed) {
47
+ outcome = 'force_pushed';
48
+ }
49
+ return [
50
+ {
51
+ json: { ...response, outcome, ...(reason && { reason }) },
52
+ },
53
+ ];
54
+ }
55
+ //# sourceMappingURL=addContact.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addContact.operation.js","sourceRoot":"","sources":["../../../../../nodes/Reply/actions/sequence/addContact.operation.ts"],"names":[],"mappings":";;AAMA,0BAoDC;AAzDD,+CAAkD;AAElD,mEAA+D;AAC/D,uDAA6F;AAEtF,KAAK,UAAU,OAAO,CAA0B,CAAS;IAC/D,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC,CAAW,CAAC;IACpE,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAW,CAAC;IACtE,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAY,CAAC;IAEnE,IAAI,IAAiB,CAAC;IAEtB,IAAI,WAAW,KAAK,iBAAiB,EAAE,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAW,CAAC;QAClE,IAAI,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;QAEhC,IAAI,CAAC;YACJ,IAAA,mCAAsB,EAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;QAAC,OAAO,eAAe,EAAE,CAAC;YAC1B,MAAM,IAAI,iCAAkB,CAAC,I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AAO,EAAE,GAAG,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE;SACzD;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = execute;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const GenericFunctions_1 = require("../../utils/GenericFunctions");
6
+ const validation_1 = require("../../utils/validation");
7
+ async function execute(i) {
8
+ const sequenceId = this.getNodeParameter('sequenceId', i);
9
+ try {
10
+ (0, validation_1.validateSequenceId)(sequenceId);
11
+ }
12
+ catch (validationError) {
13
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), validationError.message, {
14
+ itemIndex: i,
15
+ });
16
+ }
17
+ const response = await GenericFunctions_1.replyApiRequest.call(this, 'POST', `/v3/sequences/${sequenceId}/archive`);
18
+ return [
19
+ {
20
+ json: response
21
+ ? response
22
+ : { success: true, sequenceId, message: 'Sequence archived' },
23
+ },
24
+ ];
25
+ }
26
+ //# sourceMappingURL=archive.operation.js.map