@activepieces/piece-moxie-crm 0.0.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.
- package/README.md +7 -0
- package/package.json +19 -0
- package/src/index.d.ts +8 -0
- package/src/index.js +45 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/create-client.d.ts +26 -0
- package/src/lib/actions/create-client.js +123 -0
- package/src/lib/actions/create-client.js.map +1 -0
- package/src/lib/actions/create-project.d.ts +16 -0
- package/src/lib/actions/create-project.js +154 -0
- package/src/lib/actions/create-project.js.map +1 -0
- package/src/lib/actions/create-task.d.ts +16 -0
- package/src/lib/actions/create-task.js +154 -0
- package/src/lib/actions/create-task.js.map +1 -0
- package/src/lib/common/client.d.ts +16 -0
- package/src/lib/common/client.js +68 -0
- package/src/lib/common/client.js.map +1 -0
- package/src/lib/common/index.d.ts +5 -0
- package/src/lib/common/index.js +19 -0
- package/src/lib/common/index.js.map +1 -0
- package/src/lib/common/models.d.ts +77 -0
- package/src/lib/common/models.js +3 -0
- package/src/lib/common/models.js.map +1 -0
- package/src/lib/triggers/index.d.ts +30 -0
- package/src/lib/triggers/index.js +828 -0
- package/src/lib/triggers/index.js.map +1 -0
- package/src/lib/triggers/register-trigger.d.ts +14 -0
- package/src/lib/triggers/register-trigger.js +48 -0
- package/src/lib/triggers/register-trigger.js.map +1 -0
|
@@ -0,0 +1,828 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moxieCRMTriggers = void 0;
|
|
4
|
+
const register_trigger_1 = require("./register-trigger");
|
|
5
|
+
const MoxieCRMWebhookSampleData = {
|
|
6
|
+
PROJECT_EVENT_SAMPLE_DATA: {
|
|
7
|
+
id: '6434749e852ec5116d546759',
|
|
8
|
+
accountId: 10016,
|
|
9
|
+
sampleData: false,
|
|
10
|
+
clientId: '64230b34bd4bbd275c1f1739',
|
|
11
|
+
name: 'Design & Development of Website',
|
|
12
|
+
description: null,
|
|
13
|
+
active: true,
|
|
14
|
+
startDate: '2023-05-16',
|
|
15
|
+
dueDate: '2023-06-06',
|
|
16
|
+
dateCreated: '2023-04-10T20:42:06.572Z',
|
|
17
|
+
client: {
|
|
18
|
+
accountId: 10016,
|
|
19
|
+
sampleData: false,
|
|
20
|
+
id: '64230b34bd4bbd275c1f1739',
|
|
21
|
+
clientType: 'Client',
|
|
22
|
+
name: 'Moxie',
|
|
23
|
+
initials: 'MOX1',
|
|
24
|
+
locality: 'CO',
|
|
25
|
+
country: null,
|
|
26
|
+
color: '#3BDBBE',
|
|
27
|
+
projects: [],
|
|
28
|
+
hourlyAmount: 0,
|
|
29
|
+
archive: false,
|
|
30
|
+
currency: 'AUD',
|
|
31
|
+
logo: 'https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://www.withmoxie.com&size=64',
|
|
32
|
+
leadSource: 'Google',
|
|
33
|
+
contact: null,
|
|
34
|
+
},
|
|
35
|
+
leadGenArchived: false,
|
|
36
|
+
feeSchedule: {
|
|
37
|
+
feeType: 'Fixed Price',
|
|
38
|
+
amount: 5000,
|
|
39
|
+
retainerSchedule: null,
|
|
40
|
+
estimateMax: null,
|
|
41
|
+
estimateMin: null,
|
|
42
|
+
retainerStart: null,
|
|
43
|
+
retainerTiming: 'Advanced',
|
|
44
|
+
retainerOverageRate: null,
|
|
45
|
+
taxable: false,
|
|
46
|
+
fromProposalId: null,
|
|
47
|
+
fromProposalSignedDate: null,
|
|
48
|
+
updatedDate: '2023-04-10T20:42:16.141Z',
|
|
49
|
+
updatedBy: 'G. Mina',
|
|
50
|
+
},
|
|
51
|
+
proposalId: null,
|
|
52
|
+
proposalName: null,
|
|
53
|
+
hexColor: '#3BDBBEFF',
|
|
54
|
+
portalAccess: 'Overview',
|
|
55
|
+
showTimeWorkedInPortal: true,
|
|
56
|
+
files: [],
|
|
57
|
+
deliverables: [],
|
|
58
|
+
},
|
|
59
|
+
CLIENT_EVENT_SAMPLE_DATA: {
|
|
60
|
+
id: '63c5ea0c840e3207033931b5',
|
|
61
|
+
accountId: 10016,
|
|
62
|
+
name: 'Moxie',
|
|
63
|
+
clientType: 'Client',
|
|
64
|
+
initials: 'MOX',
|
|
65
|
+
address1: '123 Any Street',
|
|
66
|
+
address2: 'Suite 100',
|
|
67
|
+
city: 'Anytown',
|
|
68
|
+
locality: 'NY',
|
|
69
|
+
postal: '12345',
|
|
70
|
+
country: 'US',
|
|
71
|
+
website: 'www.withmoxie.com',
|
|
72
|
+
phone: '+18887231235',
|
|
73
|
+
color: '#CE62E9',
|
|
74
|
+
logo: 'https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://www.withmoxie.com&size=64',
|
|
75
|
+
s3LogoFile: null,
|
|
76
|
+
taxId: '1212121212',
|
|
77
|
+
leadSource: 'PPC',
|
|
78
|
+
archive: false,
|
|
79
|
+
leadGenArchived: false,
|
|
80
|
+
paymentTerms: {
|
|
81
|
+
paymentDays: 7,
|
|
82
|
+
latePaymentFee: 5,
|
|
83
|
+
depositAmount: 50,
|
|
84
|
+
depositType: 'Percentage',
|
|
85
|
+
whoPaysCardFees: 'Freelancer',
|
|
86
|
+
fromProposalId: '640b60752a524d1c45b6c528',
|
|
87
|
+
fromProposalSignedDate: '2023-03-14T14:41:01.908Z',
|
|
88
|
+
updatedDate: '2023-04-04T16:17:27.315Z',
|
|
89
|
+
updatedBy: 'G. Mina',
|
|
90
|
+
},
|
|
91
|
+
payInstructions: null,
|
|
92
|
+
hourlyAmount: 100,
|
|
93
|
+
roundingIncrement: 1,
|
|
94
|
+
currency: 'USD',
|
|
95
|
+
lastInvoiceRunDate: null,
|
|
96
|
+
nextInvoiceRunDate: null,
|
|
97
|
+
importRecordId: null,
|
|
98
|
+
integrationKeys: {
|
|
99
|
+
quickbooksId: null,
|
|
100
|
+
xeroId: null,
|
|
101
|
+
},
|
|
102
|
+
files: [],
|
|
103
|
+
comments: [],
|
|
104
|
+
created: '2023-01-17T00:21:32.663Z',
|
|
105
|
+
sampleData: false,
|
|
106
|
+
stripeClientId: 'cus_NFTM1mAFkgtfUI',
|
|
107
|
+
notes: null,
|
|
108
|
+
notifyOnCreate: null,
|
|
109
|
+
contacts: [
|
|
110
|
+
{
|
|
111
|
+
id: '63d431ab3813ca3d0789d2cc',
|
|
112
|
+
accountId: 10016,
|
|
113
|
+
clientId: '63c5ea0c840e3207033931b5',
|
|
114
|
+
clientPortalUserId: -66,
|
|
115
|
+
firstName: 'Jeffrey',
|
|
116
|
+
lastName: 'Marna',
|
|
117
|
+
role: null,
|
|
118
|
+
phone: null,
|
|
119
|
+
email: 'geoff.mina@withmoxie.com',
|
|
120
|
+
mobile: null,
|
|
121
|
+
notes: null,
|
|
122
|
+
defaultContact: true,
|
|
123
|
+
invoiceContact: false,
|
|
124
|
+
portalAccess: true,
|
|
125
|
+
importRecordId: null,
|
|
126
|
+
sampleData: null,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
PROJECT_TASK_EVENT_SAMPLE_DATA: {
|
|
131
|
+
id: '64b3eba1249a076683fe3560',
|
|
132
|
+
clientId: '6490580de30ecf51c2c22ffa',
|
|
133
|
+
projectId: '649c83111c9cbe6ba1d4cabe',
|
|
134
|
+
project: {
|
|
135
|
+
id: '649c83111c9cbe6ba1d4cabe',
|
|
136
|
+
accountId: 10016,
|
|
137
|
+
sampleData: false,
|
|
138
|
+
clientId: '6490580de30ecf51c2c22ffa',
|
|
139
|
+
name: 'Hourly Project',
|
|
140
|
+
description: null,
|
|
141
|
+
active: true,
|
|
142
|
+
startDate: null,
|
|
143
|
+
dueDate: null,
|
|
144
|
+
dateCreated: '2023-06-28T18:59:29.587Z',
|
|
145
|
+
client: null,
|
|
146
|
+
leadGenArchived: false,
|
|
147
|
+
feeSchedule: {
|
|
148
|
+
feeType: 'Hourly',
|
|
149
|
+
amount: 150,
|
|
150
|
+
retainerSchedule: null,
|
|
151
|
+
estimateMax: null,
|
|
152
|
+
estimateMin: null,
|
|
153
|
+
retainerStart: null,
|
|
154
|
+
retainerTiming: 'Advanced',
|
|
155
|
+
retainerOverageRate: null,
|
|
156
|
+
taxable: false,
|
|
157
|
+
fromProposalId: null,
|
|
158
|
+
fromProposalSignedDate: null,
|
|
159
|
+
updatedDate: null,
|
|
160
|
+
updatedBy: null,
|
|
161
|
+
},
|
|
162
|
+
proposalId: null,
|
|
163
|
+
proposalName: null,
|
|
164
|
+
hexColor: '#ffffff00',
|
|
165
|
+
portalAccess: 'Overview',
|
|
166
|
+
showTimeWorkedInPortal: true,
|
|
167
|
+
files: [],
|
|
168
|
+
deliverables: [],
|
|
169
|
+
},
|
|
170
|
+
client: {
|
|
171
|
+
accountId: 10016,
|
|
172
|
+
sampleData: false,
|
|
173
|
+
id: '6490580de30ecf51c2c22ffa',
|
|
174
|
+
clientType: 'Client',
|
|
175
|
+
name: 'Moxie',
|
|
176
|
+
initials: null,
|
|
177
|
+
locality: 'NY',
|
|
178
|
+
country: 'US',
|
|
179
|
+
color: '#8EA3B8',
|
|
180
|
+
projects: [],
|
|
181
|
+
hourlyAmount: 150,
|
|
182
|
+
archive: false,
|
|
183
|
+
currency: 'USD',
|
|
184
|
+
logo: null,
|
|
185
|
+
leadSource: null,
|
|
186
|
+
contact: {
|
|
187
|
+
id: '6490580de30ecf51c2c22ffb',
|
|
188
|
+
accountId: 10016,
|
|
189
|
+
clientId: '6490580de30ecf51c2c22ffa',
|
|
190
|
+
clientPortalUserId: -79,
|
|
191
|
+
firstName: 'Geoffrey',
|
|
192
|
+
lastName: 'Mina',
|
|
193
|
+
role: null,
|
|
194
|
+
phone: '+15555551212',
|
|
195
|
+
email: 'geoff.mina@withmoxie.com',
|
|
196
|
+
mobile: null,
|
|
197
|
+
notes: null,
|
|
198
|
+
defaultContact: true,
|
|
199
|
+
invoiceContact: false,
|
|
200
|
+
portalAccess: true,
|
|
201
|
+
importRecordId: null,
|
|
202
|
+
sampleData: null,
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
name: 'Another new task to build website and victory',
|
|
206
|
+
statusId: '05b26dd1-0668-4dcc-b438-87ac93d4eb15',
|
|
207
|
+
status: 'In Progress',
|
|
208
|
+
priority: 2,
|
|
209
|
+
description: 'This is the description of the task',
|
|
210
|
+
assignedTo: null,
|
|
211
|
+
assignedToList: [16, 222],
|
|
212
|
+
approvalRequired: false,
|
|
213
|
+
product: null,
|
|
214
|
+
quantity: 0,
|
|
215
|
+
invoiceId: null,
|
|
216
|
+
invoiceNumber: null,
|
|
217
|
+
customValues: [
|
|
218
|
+
{
|
|
219
|
+
fieldId: '4591275b-1c76-4eae-9257-0438fe1d2354',
|
|
220
|
+
fieldName: 'Text Input',
|
|
221
|
+
value: 'Text input',
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
fieldId: 'a7e49f95-e0f4-416e-9bbf-586d98e1a55e',
|
|
225
|
+
fieldName: 'Numeric Input',
|
|
226
|
+
value: 123,
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
fieldId: '0a95ed1a-f084-4e13-be02-6065bea93aed',
|
|
230
|
+
fieldName: 'Currency Input',
|
|
231
|
+
value: 2000,
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
fieldId: '399ac82b-e56e-4499-b4be-db7d3f81f0fc',
|
|
235
|
+
fieldName: 'Radio Input',
|
|
236
|
+
value: 'Two',
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
fieldId: '006ec49b-68e1-4ebd-9bdc-d18776551616',
|
|
240
|
+
fieldName: 'Checkbox Input',
|
|
241
|
+
value: 'Three',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
fieldId: 'd255032b-4f82-4f1b-8b61-4bccc66370c4',
|
|
245
|
+
fieldName: 'Phase',
|
|
246
|
+
value: 'Phase 1',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
fieldId: '4a281477-bed5-4f56-9e89-0bcb3758b3f8',
|
|
250
|
+
fieldName: 'Shoot Date',
|
|
251
|
+
value: '2023-07-07',
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
fieldId: '3fb9c4f2-8093-4315-b2cd-748a3526b497',
|
|
255
|
+
fieldName: 'Recurs',
|
|
256
|
+
value: 'Yes',
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
comments: [
|
|
260
|
+
{
|
|
261
|
+
id: '81eec0c6-4b6b-46f5-a412-cdc66c8571c8',
|
|
262
|
+
author: 'Geoffrey Mina',
|
|
263
|
+
authorId: '16',
|
|
264
|
+
comment: 'Comments in the task show up here.',
|
|
265
|
+
clientComment: false,
|
|
266
|
+
edited: false,
|
|
267
|
+
privateComment: false,
|
|
268
|
+
sendEmail: false,
|
|
269
|
+
timestamp: '2023-07-20T10:51:32.086Z',
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
startDate: '2023-07-01',
|
|
273
|
+
dueDate: '2023-07-31',
|
|
274
|
+
tasks: [
|
|
275
|
+
{
|
|
276
|
+
id: 'e105201a27f34a26a37ef54e6b0f522b',
|
|
277
|
+
description: 'One',
|
|
278
|
+
complete: true,
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
id: '6c436ea963844783b569639f4c26768e',
|
|
282
|
+
description: 'Two',
|
|
283
|
+
complete: true,
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
id: 'bf62b9745301466397d09ab9aaa4bd69',
|
|
287
|
+
description: 'Three',
|
|
288
|
+
complete: false,
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
id: 'dd932850c2094d879c7128cecc468d83',
|
|
292
|
+
description: 'Four',
|
|
293
|
+
complete: false,
|
|
294
|
+
},
|
|
295
|
+
],
|
|
296
|
+
archived: false,
|
|
297
|
+
kanbanSort: 2,
|
|
298
|
+
},
|
|
299
|
+
FORM_EVENT_SAMPLE_DATA: {
|
|
300
|
+
id: '64b8233d6ce6226305f24b47',
|
|
301
|
+
accountId: 10016,
|
|
302
|
+
client: null,
|
|
303
|
+
formName: 'test-new-client',
|
|
304
|
+
businessName: 'Moxie',
|
|
305
|
+
firstName: 'Geoffrey',
|
|
306
|
+
lastName: 'Mina',
|
|
307
|
+
phone: '+444445551212',
|
|
308
|
+
email: 'hello@withmoxie.com',
|
|
309
|
+
role: null,
|
|
310
|
+
address1: null,
|
|
311
|
+
address2: null,
|
|
312
|
+
city: null,
|
|
313
|
+
locality: null,
|
|
314
|
+
postal: null,
|
|
315
|
+
country: null,
|
|
316
|
+
website: null,
|
|
317
|
+
leadSource: null,
|
|
318
|
+
sourceUrl: 'https://hello.withmoxie.dev/00/hectic-lab/test-new-client?inPortal=true',
|
|
319
|
+
Field6: 'Answer to your first question',
|
|
320
|
+
Field7: 'Another to your other question',
|
|
321
|
+
submittedAt: '2023-07-19T17:54:05.257Z',
|
|
322
|
+
},
|
|
323
|
+
TIME_ENTRY_EVENT_SAMPLE_DATA: {
|
|
324
|
+
id: '64b857b0b17c7c727001331c',
|
|
325
|
+
accountId: 10016,
|
|
326
|
+
sampleData: false,
|
|
327
|
+
userId: 16,
|
|
328
|
+
timerStart: '2023-07-19T21:37:35.684Z',
|
|
329
|
+
timerEnd: '2023-07-19T21:37:52.431Z',
|
|
330
|
+
userFullName: 'Geoffrey Mina',
|
|
331
|
+
notes: 'These are some notes',
|
|
332
|
+
clientId: '6490580de30ecf51c2c22ffa',
|
|
333
|
+
projectId: '649976d658c17d4f29b068ee',
|
|
334
|
+
deliverableId: '649976e158c17d4f29b068ef',
|
|
335
|
+
clientName: 'Moxie',
|
|
336
|
+
projectName: 'Fun project for client',
|
|
337
|
+
deliverableName: 'Task 1',
|
|
338
|
+
timestamp: null,
|
|
339
|
+
timestampUpdated: null,
|
|
340
|
+
invoiceId: null,
|
|
341
|
+
invoiceNumber: null,
|
|
342
|
+
importRecordId: null,
|
|
343
|
+
feeSchedule: null,
|
|
344
|
+
duration: 16,
|
|
345
|
+
},
|
|
346
|
+
MEETING_EVENT_SAMPLE_DATA: {
|
|
347
|
+
id: '64b824df6ce6226305f24b53',
|
|
348
|
+
accountId: 10016,
|
|
349
|
+
ownerUserId: null,
|
|
350
|
+
sampleData: false,
|
|
351
|
+
meetingId: '63076a1320e0d10001e6cb63',
|
|
352
|
+
clientId: '63c5ea0c840e3207033931b5',
|
|
353
|
+
meetingStatus: 'Scheduled',
|
|
354
|
+
meetingName: 'Geoff Mina / 30 minute meeting',
|
|
355
|
+
schedulerName: '30 minute meeting',
|
|
356
|
+
confirmedTime: {
|
|
357
|
+
start: '2023-07-19T22:30:00.000Z',
|
|
358
|
+
end: '2023-07-19T23:00:00.000Z',
|
|
359
|
+
},
|
|
360
|
+
scheduledTimezone: 'America/New_York',
|
|
361
|
+
scheduledLocale: 'en-US',
|
|
362
|
+
formData: {
|
|
363
|
+
firstName: 'Geoff',
|
|
364
|
+
lastName: 'Mina',
|
|
365
|
+
email: 'geoff.mina@withmoxie.com',
|
|
366
|
+
phone: '+445555555555',
|
|
367
|
+
role: null,
|
|
368
|
+
businessName: null,
|
|
369
|
+
website: null,
|
|
370
|
+
address1: null,
|
|
371
|
+
address2: null,
|
|
372
|
+
city: null,
|
|
373
|
+
locality: null,
|
|
374
|
+
postal: null,
|
|
375
|
+
country: null,
|
|
376
|
+
sourceUrl: null,
|
|
377
|
+
opportunityId: null,
|
|
378
|
+
templateId: null,
|
|
379
|
+
cardTokenId: null,
|
|
380
|
+
leadSource: null,
|
|
381
|
+
answers: [],
|
|
382
|
+
},
|
|
383
|
+
location: {
|
|
384
|
+
type: 'Google',
|
|
385
|
+
},
|
|
386
|
+
zoomMeeting: null,
|
|
387
|
+
googleMeeting: {
|
|
388
|
+
googleUserId: 16,
|
|
389
|
+
eventId: '_6oq64e1i6hi6cdj3ckr34chm6co3aphi6hh3acq0d1im6t39cdgn0s1ecdnmq',
|
|
390
|
+
hangoutLink: 'https://meet.google.com/swq-azkw-zkt',
|
|
391
|
+
htmlLink: 'https://www.google.com/calendar/event?eid=XzZvcTY0ZTFpNmhpNmNkajNja3IzNGNobTZjbzNhcGhpNmhoM2FjcTBkMWltNnQzOWNkZ24wczFlY2RubXEgZ2VvZmYubWluYUBoZWN0aWMudXM',
|
|
392
|
+
googleUser: {
|
|
393
|
+
name: 'Geoff Mina',
|
|
394
|
+
given_name: 'Geoff',
|
|
395
|
+
family_name: 'Mina',
|
|
396
|
+
picture: 'https://lh3.googleusercontent.com/a/AGNmyxYxJL9h8SnY6z2oXg7fNHAdov1TJ4--RQtiAMn8=s96-c',
|
|
397
|
+
email: 'geoff.mina@hectic.us',
|
|
398
|
+
email_verified: true,
|
|
399
|
+
locale: 'en',
|
|
400
|
+
},
|
|
401
|
+
entryPoints: [
|
|
402
|
+
{
|
|
403
|
+
entryPointType: 'video',
|
|
404
|
+
label: 'meet.google.com/swq-azkw-zkt',
|
|
405
|
+
uri: 'https://meet.google.com/swq-azkw-zkt',
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
entryPointType: 'more',
|
|
409
|
+
pin: '4419810087411',
|
|
410
|
+
uri: 'https://tel.meet/swq-azkw-zkt?pin=4419810087411',
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
entryPointType: 'phone',
|
|
414
|
+
label: '+1 646-504-7945',
|
|
415
|
+
pin: '978184485',
|
|
416
|
+
regionCode: 'US',
|
|
417
|
+
uri: 'tel:+1-646-504-7945',
|
|
418
|
+
},
|
|
419
|
+
],
|
|
420
|
+
},
|
|
421
|
+
microsoftEvent: null,
|
|
422
|
+
connectedICalUid: null,
|
|
423
|
+
notes: null,
|
|
424
|
+
cancellationReason: null,
|
|
425
|
+
leadGenArchived: false,
|
|
426
|
+
opportunityId: null,
|
|
427
|
+
files: [],
|
|
428
|
+
meetingWith: 'Moxie',
|
|
429
|
+
incomeRecordId: null,
|
|
430
|
+
icalUid: '64b824df6ce6226305f24b53@hecticapp.com',
|
|
431
|
+
},
|
|
432
|
+
OPPORTUNITY_EVENT_SAMPLE_DATA: {
|
|
433
|
+
id: '642dfde9fd537145d22edbaa',
|
|
434
|
+
accountId: 10016,
|
|
435
|
+
clientId: '5f7b3335b50f2a000189217a',
|
|
436
|
+
statusId: '30180ce4-ba0a-4b5d-b92c-d2733e11b514',
|
|
437
|
+
kanbanSort: 1,
|
|
438
|
+
name: 'New Opportunity',
|
|
439
|
+
description: null,
|
|
440
|
+
sentiment: 2,
|
|
441
|
+
value: 1500,
|
|
442
|
+
timePeriod: 'OneTime',
|
|
443
|
+
periods: 1,
|
|
444
|
+
estCloseDate: '2023-07-31',
|
|
445
|
+
actualCloseDate: null,
|
|
446
|
+
formData: {
|
|
447
|
+
firstName: 'Geoff',
|
|
448
|
+
lastName: 'Mina',
|
|
449
|
+
email: 'geoff.mina@withmoxie.com',
|
|
450
|
+
phone: '555-555-5554',
|
|
451
|
+
role: 'Executive',
|
|
452
|
+
businessName: 'Moxie',
|
|
453
|
+
website: 'www.withmoxie.com',
|
|
454
|
+
address1: '123 Any Stree',
|
|
455
|
+
address2: 'Suite 100',
|
|
456
|
+
city: 'Boulder',
|
|
457
|
+
locality: 'CO',
|
|
458
|
+
postal: '80301',
|
|
459
|
+
country: 'US',
|
|
460
|
+
sourceUrl: 'https://hello.hecticapp.dev/00/hectic-lab/fancy-new-form-v2',
|
|
461
|
+
opportunityId: null,
|
|
462
|
+
templateId: '642356ec35707318aa08bd18',
|
|
463
|
+
cardTokenId: null,
|
|
464
|
+
leadSource: 'Google',
|
|
465
|
+
answers: [
|
|
466
|
+
{
|
|
467
|
+
id: '516e2366-a52f-4d69-8059-d2df8e692f12',
|
|
468
|
+
fieldKey: 'Field9',
|
|
469
|
+
fieldType: 'TextInput',
|
|
470
|
+
question: 'Enter question text',
|
|
471
|
+
answer: 'Blah',
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
id: 'e30eb7c2-2b69-4a88-a973-92321c5c147d',
|
|
475
|
+
fieldKey: 'Field16',
|
|
476
|
+
fieldType: 'Checkbox',
|
|
477
|
+
question: 'Choose an option',
|
|
478
|
+
answer: 'Option 1, Option 2',
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
id: 'ba71978a-67df-4335-9a70-7bfad8185788',
|
|
482
|
+
fieldKey: 'Field13',
|
|
483
|
+
fieldType: 'Radio',
|
|
484
|
+
question: 'Choose an option',
|
|
485
|
+
answer: 'Option 2',
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
id: '4dd4471d-04c0-4795-8859-5f4d3b0fb283',
|
|
489
|
+
fieldKey: 'Field7',
|
|
490
|
+
fieldType: 'DateInput',
|
|
491
|
+
question: 'Select a date',
|
|
492
|
+
answer: '2023-04-06',
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
id: 'a201bb30-48c4-4408-a35e-0ff619a660f9',
|
|
496
|
+
fieldKey: 'Field15',
|
|
497
|
+
fieldType: 'TextArea',
|
|
498
|
+
question: 'Enter question text',
|
|
499
|
+
answer: 'Blah',
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
id: '973d4b26-2629-4819-92ed-7f8c73268982',
|
|
503
|
+
fieldKey: 'Field8',
|
|
504
|
+
fieldType: 'FileInput',
|
|
505
|
+
question: 'Upload your file',
|
|
506
|
+
answer: '["4BFE0272-D8BC-46CA-A8C8-079BB34B1BA0.jpeg"]',
|
|
507
|
+
},
|
|
508
|
+
],
|
|
509
|
+
},
|
|
510
|
+
archive: false,
|
|
511
|
+
initialWorkflow: true,
|
|
512
|
+
toDos: [
|
|
513
|
+
{
|
|
514
|
+
id: '4ed64532451f4421a063a7b61f2016b7',
|
|
515
|
+
item: 'Make Phone Call',
|
|
516
|
+
complete: false,
|
|
517
|
+
dueDate: '2023-07-20',
|
|
518
|
+
dateCompleted: null,
|
|
519
|
+
relativeDueDate: {
|
|
520
|
+
duration: null,
|
|
521
|
+
timeUnit: null,
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
id: '404fd07b56494676b2dc3aaee7a3b30f',
|
|
526
|
+
item: 'Send Email',
|
|
527
|
+
complete: false,
|
|
528
|
+
dueDate: '2023-07-23',
|
|
529
|
+
dateCompleted: null,
|
|
530
|
+
relativeDueDate: {
|
|
531
|
+
duration: null,
|
|
532
|
+
timeUnit: null,
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
],
|
|
536
|
+
comments: [
|
|
537
|
+
{
|
|
538
|
+
id: null,
|
|
539
|
+
author: 'System',
|
|
540
|
+
authorId: '0',
|
|
541
|
+
comment: 'Auto created from form: Fancy New Form V2',
|
|
542
|
+
clientComment: false,
|
|
543
|
+
edited: false,
|
|
544
|
+
privateComment: false,
|
|
545
|
+
sendEmail: false,
|
|
546
|
+
timestamp: '2023-04-05T23:02:00.618Z',
|
|
547
|
+
},
|
|
548
|
+
],
|
|
549
|
+
files: [
|
|
550
|
+
{
|
|
551
|
+
fileName: 'Screenshot 2023-07-19 at 6.11.40 PM.png',
|
|
552
|
+
fileType: 'PNG',
|
|
553
|
+
timestamp: '2023-07-20T10:54:30.759Z',
|
|
554
|
+
fileIconUrl: 'https://struxture-www-assets.s3.us-east-2.amazonaws.com/file-icons/png.png',
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
fileName: 'Screenshot 2023-07-19 at 1.50.59 PM.png',
|
|
558
|
+
fileType: 'PNG',
|
|
559
|
+
timestamp: '2023-07-20T10:54:30.991Z',
|
|
560
|
+
fileIconUrl: 'https://struxture-www-assets.s3.us-east-2.amazonaws.com/file-icons/png.png',
|
|
561
|
+
},
|
|
562
|
+
],
|
|
563
|
+
workflow: [
|
|
564
|
+
{
|
|
565
|
+
id: 'c595dc6c-b7ea-4dfd-ac10-0883320e1eb8',
|
|
566
|
+
itemId: '642dfde2fd537145d22edba5',
|
|
567
|
+
itemType: 'Form',
|
|
568
|
+
properties: {},
|
|
569
|
+
timestamp: '2023-04-05T23:01:54.206Z',
|
|
570
|
+
},
|
|
571
|
+
],
|
|
572
|
+
customValues: [
|
|
573
|
+
{
|
|
574
|
+
fieldId: '5e9d7171-1988-431d-a1c8-491e4ae71613',
|
|
575
|
+
fieldName: 'Custom Field',
|
|
576
|
+
value: 'Custom Field Value',
|
|
577
|
+
},
|
|
578
|
+
],
|
|
579
|
+
history: [],
|
|
580
|
+
statusLabel: 'Contract',
|
|
581
|
+
},
|
|
582
|
+
INVOICE_EVENT_SAMPLE_DATA: {
|
|
583
|
+
id: '64ae5aea99f38e74fc78ae46',
|
|
584
|
+
invoiceNumber: 74,
|
|
585
|
+
invoiceNumberFormatted: 'E-2023-74',
|
|
586
|
+
accountId: 10016,
|
|
587
|
+
clientId: '6490580de30ecf51c2c22ffa',
|
|
588
|
+
dateCreated: '2023-07-16',
|
|
589
|
+
dateSent: '2023-07-12',
|
|
590
|
+
dateDue: '2023-08-11',
|
|
591
|
+
dateDueCalculated: null,
|
|
592
|
+
datePaid: '2023-07-12',
|
|
593
|
+
clientInfo: {
|
|
594
|
+
id: '6490580de30ecf51c2c22ffa',
|
|
595
|
+
name: 'E164',
|
|
596
|
+
initials: null,
|
|
597
|
+
address1: '123 Any Street',
|
|
598
|
+
address2: null,
|
|
599
|
+
city: 'Anytown',
|
|
600
|
+
locality: 'NY',
|
|
601
|
+
postal: '12020',
|
|
602
|
+
country: 'US',
|
|
603
|
+
phone: '+15555551212',
|
|
604
|
+
color: '#8EA3B8',
|
|
605
|
+
taxId: null,
|
|
606
|
+
website: null,
|
|
607
|
+
contact: {
|
|
608
|
+
id: '6490580de30ecf51c2c22ffb',
|
|
609
|
+
accountId: 10016,
|
|
610
|
+
clientId: '6490580de30ecf51c2c22ffa',
|
|
611
|
+
clientPortalUserId: -79,
|
|
612
|
+
firstName: 'Geoffrey',
|
|
613
|
+
lastName: 'Mina',
|
|
614
|
+
role: null,
|
|
615
|
+
phone: '+12224445234',
|
|
616
|
+
email: 'user@email.com',
|
|
617
|
+
mobile: null,
|
|
618
|
+
notes: null,
|
|
619
|
+
defaultContact: true,
|
|
620
|
+
invoiceContact: false,
|
|
621
|
+
portalAccess: true,
|
|
622
|
+
importRecordId: null,
|
|
623
|
+
sampleData: null,
|
|
624
|
+
},
|
|
625
|
+
roundingIncrement: 1,
|
|
626
|
+
customInfo: false,
|
|
627
|
+
},
|
|
628
|
+
status: 'PARTIAL',
|
|
629
|
+
invoiceType: 'STANDARD',
|
|
630
|
+
subTotal: 14950,
|
|
631
|
+
convenienceFee: 0,
|
|
632
|
+
lateFee: 0,
|
|
633
|
+
discountAmount: 0,
|
|
634
|
+
creditApplied: 0,
|
|
635
|
+
tax: 225,
|
|
636
|
+
total: 15175,
|
|
637
|
+
localTotal: 15175,
|
|
638
|
+
paymentTotal: 78.75,
|
|
639
|
+
localPaymentTotal: 78.75,
|
|
640
|
+
amountDue: 15096.25,
|
|
641
|
+
localAmountDue: 15096.25,
|
|
642
|
+
currency: 'USD',
|
|
643
|
+
integrationKeys: {
|
|
644
|
+
quickbooksId: null,
|
|
645
|
+
xeroId: null,
|
|
646
|
+
},
|
|
647
|
+
viewOnlineUrl: 'https://clients.domain.com/invoice?token=',
|
|
648
|
+
payments: [
|
|
649
|
+
{
|
|
650
|
+
id: '29e34d7b-ef69-4059-bbe9-7b214c38a011',
|
|
651
|
+
amount: 78.75,
|
|
652
|
+
pending: false,
|
|
653
|
+
paidBy: 'G. Mina',
|
|
654
|
+
paymentProvider: 'CHECK',
|
|
655
|
+
currency: 'USD',
|
|
656
|
+
referenceNumber: null,
|
|
657
|
+
memo: null,
|
|
658
|
+
datePaid: '2023-07-12',
|
|
659
|
+
timestamp: '2023-07-12T06:00:00.000Z',
|
|
660
|
+
integratedPayment: false,
|
|
661
|
+
forcePaidInFull: false,
|
|
662
|
+
integrationKeys: {
|
|
663
|
+
quickbooksId: null,
|
|
664
|
+
xeroId: null,
|
|
665
|
+
},
|
|
666
|
+
isFailedPayment: false,
|
|
667
|
+
localAmount: 78.75,
|
|
668
|
+
},
|
|
669
|
+
],
|
|
670
|
+
},
|
|
671
|
+
};
|
|
672
|
+
exports.moxieCRMTriggers = [
|
|
673
|
+
{
|
|
674
|
+
name: 'client_created',
|
|
675
|
+
displayName: 'Client Created',
|
|
676
|
+
description: 'Triggerd when a new client is created.',
|
|
677
|
+
eventType: "ClientCreate" /* MoxieCRMEventType.CLIENT_CREATED */,
|
|
678
|
+
sampleData: MoxieCRMWebhookSampleData.CLIENT_EVENT_SAMPLE_DATA,
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
name: 'client_updated',
|
|
682
|
+
displayName: 'Client Updated',
|
|
683
|
+
description: 'Triggerd when an existing client is updated.',
|
|
684
|
+
eventType: "ClientUpdate" /* MoxieCRMEventType.CLIENT_UPDATED */,
|
|
685
|
+
sampleData: MoxieCRMWebhookSampleData.CLIENT_EVENT_SAMPLE_DATA,
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: 'client_deleted',
|
|
689
|
+
displayName: 'Client Deleted',
|
|
690
|
+
description: 'Triggerd when an existing client is deleted.',
|
|
691
|
+
eventType: "ClientDelete" /* MoxieCRMEventType.CLIENT_DELETED */,
|
|
692
|
+
sampleData: MoxieCRMWebhookSampleData.CLIENT_EVENT_SAMPLE_DATA,
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
name: 'project_created',
|
|
696
|
+
displayName: 'Project Created',
|
|
697
|
+
description: 'Triggerd when a new project is created.',
|
|
698
|
+
eventType: "ProjectCreate" /* MoxieCRMEventType.PROJECT_CREATED */,
|
|
699
|
+
sampleData: MoxieCRMWebhookSampleData.PROJECT_EVENT_SAMPLE_DATA,
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
name: 'project_updated',
|
|
703
|
+
displayName: 'Project Updated',
|
|
704
|
+
description: 'Triggerd when an existing project is updated.',
|
|
705
|
+
eventType: "ProjectUpdate" /* MoxieCRMEventType.PROJECT_UPDATED */,
|
|
706
|
+
sampleData: MoxieCRMWebhookSampleData.PROJECT_EVENT_SAMPLE_DATA,
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
name: 'project_completed',
|
|
710
|
+
displayName: 'Project Completed',
|
|
711
|
+
description: 'Triggerd when an existing project is completed.',
|
|
712
|
+
eventType: "ProjectComplete" /* MoxieCRMEventType.PROJECT_COMPLETED */,
|
|
713
|
+
sampleData: MoxieCRMWebhookSampleData.PROJECT_EVENT_SAMPLE_DATA,
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
name: 'task_created',
|
|
717
|
+
displayName: 'Task Created',
|
|
718
|
+
description: 'Triggerd when a new task is created.',
|
|
719
|
+
eventType: "DeliverableCreate" /* MoxieCRMEventType.TASK_CREATED */,
|
|
720
|
+
sampleData: MoxieCRMWebhookSampleData.PROJECT_TASK_EVENT_SAMPLE_DATA,
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
name: 'task_updated',
|
|
724
|
+
displayName: 'Task Updated',
|
|
725
|
+
description: 'Triggerd when an existing task is updated.',
|
|
726
|
+
eventType: "DeliverableUpdate" /* MoxieCRMEventType.TASK_UPDATED */,
|
|
727
|
+
sampleData: MoxieCRMWebhookSampleData.PROJECT_TASK_EVENT_SAMPLE_DATA,
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
name: 'task_deleted',
|
|
731
|
+
displayName: 'Task Deleted',
|
|
732
|
+
description: 'Triggerd when an existing task is deleted.',
|
|
733
|
+
eventType: "DeliverableDelete" /* MoxieCRMEventType.TASK_DELETED */,
|
|
734
|
+
sampleData: MoxieCRMWebhookSampleData.PROJECT_TASK_EVENT_SAMPLE_DATA,
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
name: 'client_task_approval',
|
|
738
|
+
displayName: 'Client Task Approval',
|
|
739
|
+
description: 'Triggerd when a task is moved to client approval.',
|
|
740
|
+
eventType: "DeliverableApproval" /* MoxieCRMEventType.TASK_APPROVAL */,
|
|
741
|
+
sampleData: MoxieCRMWebhookSampleData.PROJECT_TASK_EVENT_SAMPLE_DATA,
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
name: 'form_submitted',
|
|
745
|
+
displayName: 'Form Submitted',
|
|
746
|
+
description: 'Triggerd when a new form is submitted.',
|
|
747
|
+
eventType: "FormCompleted" /* MoxieCRMEventType.FORM_SUBMITTED */,
|
|
748
|
+
sampleData: MoxieCRMWebhookSampleData.FORM_EVENT_SAMPLE_DATA,
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
name: 'time_entry_created',
|
|
752
|
+
displayName: 'Time Entry Created',
|
|
753
|
+
description: 'Triggerd when a new time entry is created.',
|
|
754
|
+
eventType: "TimerCreate" /* MoxieCRMEventType.TIME_ENTRY_CREATED */,
|
|
755
|
+
sampleData: MoxieCRMWebhookSampleData.TIME_ENTRY_EVENT_SAMPLE_DATA,
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
name: 'time_entry_updated',
|
|
759
|
+
displayName: 'Time Entry Updated',
|
|
760
|
+
description: 'Triggerd when an existing time entry is updated.',
|
|
761
|
+
eventType: "TimerUpdate" /* MoxieCRMEventType.TIME_ENTRY_UPDATED */,
|
|
762
|
+
sampleData: MoxieCRMWebhookSampleData.TIME_ENTRY_EVENT_SAMPLE_DATA,
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
name: 'time_entry_deleted',
|
|
766
|
+
displayName: 'Time Entry Deleted',
|
|
767
|
+
description: 'Triggerd when an existing time entry is deleted.',
|
|
768
|
+
eventType: "TimerDelete" /* MoxieCRMEventType.TIME_ENTRY_DELETED */,
|
|
769
|
+
sampleData: MoxieCRMWebhookSampleData.TIME_ENTRY_EVENT_SAMPLE_DATA,
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
name: 'meeting_scheduled',
|
|
773
|
+
displayName: 'Meeting Scheduled',
|
|
774
|
+
description: 'Triggerd when a new meeting is scheduled.',
|
|
775
|
+
eventType: "MeetingScheduled" /* MoxieCRMEventType.MEETING_SCHEDULED */,
|
|
776
|
+
sampleData: MoxieCRMWebhookSampleData.MEETING_EVENT_SAMPLE_DATA,
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
name: 'meeting_updated',
|
|
780
|
+
displayName: 'Meeting Updated',
|
|
781
|
+
description: 'Triggerd when an existing meeting is updated.',
|
|
782
|
+
eventType: "MeetingUpdated" /* MoxieCRMEventType.MEETING_UPDATED */,
|
|
783
|
+
sampleData: MoxieCRMWebhookSampleData.MEETING_EVENT_SAMPLE_DATA,
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
name: 'meeting_cancelled',
|
|
787
|
+
displayName: 'Meeting Cancelled',
|
|
788
|
+
description: 'Triggerd when a meeting is cancelled.',
|
|
789
|
+
eventType: "MeetingCancelled" /* MoxieCRMEventType.MEETING_CANCELLED */,
|
|
790
|
+
sampleData: MoxieCRMWebhookSampleData.MEETING_EVENT_SAMPLE_DATA,
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
name: 'opportunity_created',
|
|
794
|
+
displayName: 'Opportunity Created',
|
|
795
|
+
description: 'Triggerd when a new pipeline opportunity is created.',
|
|
796
|
+
eventType: "OpportunityCreate" /* MoxieCRMEventType.OPPORTUNITY_CREATED */,
|
|
797
|
+
sampleData: MoxieCRMWebhookSampleData.OPPORTUNITY_EVENT_SAMPLE_DATA,
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
name: 'opportunity_updated',
|
|
801
|
+
displayName: 'Opportunity Updated',
|
|
802
|
+
description: 'Triggerd when an existing opportunity is updated.',
|
|
803
|
+
eventType: "OpportunityUpdate" /* MoxieCRMEventType.OPPORTUNITY_UPDATED */,
|
|
804
|
+
sampleData: MoxieCRMWebhookSampleData.OPPORTUNITY_EVENT_SAMPLE_DATA,
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
name: 'opportunity_deleted',
|
|
808
|
+
displayName: 'Opportunity Deleted',
|
|
809
|
+
description: 'Triggerd when an existing pipeline opportunity is deleted.',
|
|
810
|
+
eventType: "OpportunityDelete" /* MoxieCRMEventType.OPPORTUNITY_DELETED */,
|
|
811
|
+
sampleData: MoxieCRMWebhookSampleData.OPPORTUNITY_EVENT_SAMPLE_DATA,
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
name: 'invoice_sent',
|
|
815
|
+
displayName: 'Invoice Sent',
|
|
816
|
+
description: 'Triggerd when an invoice is sent.',
|
|
817
|
+
eventType: "InvoiceSent" /* MoxieCRMEventType.INVOICE_SENT */,
|
|
818
|
+
sampleData: MoxieCRMWebhookSampleData.INVOICE_EVENT_SAMPLE_DATA,
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
name: 'payment_received',
|
|
822
|
+
displayName: 'Payment Received',
|
|
823
|
+
description: 'Triggerd when a payment is received.',
|
|
824
|
+
eventType: "PaymentReceived" /* MoxieCRMEventType.PAYMENT_RECEIVED */,
|
|
825
|
+
sampleData: MoxieCRMWebhookSampleData.INVOICE_EVENT_SAMPLE_DATA,
|
|
826
|
+
},
|
|
827
|
+
].map((props) => (0, register_trigger_1.moxieCRMRegisterTrigger)(props));
|
|
828
|
+
//# sourceMappingURL=index.js.map
|