@automate.ax/integration-contracts 0.145.1 → 0.146.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.
@@ -0,0 +1,740 @@
1
+ /** HighLevel OpenAPI products frozen into the Automate.ax integration. */
2
+ export type HighLevelOpenApiProduct =
3
+ | "calendars"
4
+ | "campaigns"
5
+ | "contacts"
6
+ | "conversations"
7
+ | "forms"
8
+ | "locations"
9
+ | "opportunities"
10
+ | "surveys"
11
+ | "users"
12
+ | "workflows"
13
+
14
+ /** Retry classification for one HighLevel operation. */
15
+ export type HighLevelReplaySafety = "safe" | "unsafe"
16
+
17
+ /** Hand-authored public metadata bound to one official OpenAPI operation. */
18
+ export interface HighLevelOperationDefinition {
19
+ readonly alias: string
20
+ readonly description: string
21
+ readonly exportName: string
22
+ readonly operationId: string
23
+ readonly product: HighLevelOpenApiProduct
24
+ readonly replaySafety: HighLevelReplaySafety
25
+ readonly title: string
26
+ }
27
+
28
+ /** Complete practical HighLevel CRM action surface. */
29
+ export const HIGH_LEVEL_OPERATION_DEFINITIONS = [
30
+ operation(
31
+ "contacts",
32
+ "get-contacts",
33
+ "listContacts",
34
+ "listHighLevelContacts",
35
+ "List HighLevel contacts",
36
+ "Lists contacts in the connected sub-account.",
37
+ "safe",
38
+ ),
39
+ operation(
40
+ "contacts",
41
+ "get-contact",
42
+ "getContact",
43
+ "getHighLevelContact",
44
+ "Get HighLevel contact",
45
+ "Retrieves one contact by ID.",
46
+ "safe",
47
+ ),
48
+ operation(
49
+ "contacts",
50
+ "search-contacts-advanced",
51
+ "searchContacts",
52
+ "searchHighLevelContacts",
53
+ "Search HighLevel contacts",
54
+ "Searches contacts with HighLevel's advanced filters and sorting.",
55
+ "safe",
56
+ ),
57
+ operation(
58
+ "contacts",
59
+ "get-duplicate-contact",
60
+ "findDuplicateContact",
61
+ "findDuplicateHighLevelContact",
62
+ "Find duplicate HighLevel contact",
63
+ "Finds an existing contact by email or phone before creation.",
64
+ "safe",
65
+ ),
66
+ operation(
67
+ "contacts",
68
+ "create-contact",
69
+ "createContact",
70
+ "createHighLevelContact",
71
+ "Create HighLevel contact",
72
+ "Creates a contact in the connected sub-account.",
73
+ "unsafe",
74
+ ),
75
+ operation(
76
+ "contacts",
77
+ "upsert-contact",
78
+ "upsertContact",
79
+ "upsertHighLevelContact",
80
+ "Upsert HighLevel contact",
81
+ "Creates or updates a contact using HighLevel's duplicate-contact policy.",
82
+ "unsafe",
83
+ ),
84
+ operation(
85
+ "contacts",
86
+ "update-contact",
87
+ "updateContact",
88
+ "updateHighLevelContact",
89
+ "Update HighLevel contact",
90
+ "Updates one contact by ID.",
91
+ "safe",
92
+ ),
93
+ operation(
94
+ "contacts",
95
+ "delete-contact",
96
+ "deleteContact",
97
+ "deleteHighLevelContact",
98
+ "Delete HighLevel contact",
99
+ "Permanently deletes one contact by ID.",
100
+ "safe",
101
+ ),
102
+ operation(
103
+ "contacts",
104
+ "add-tags",
105
+ "addContactTags",
106
+ "addHighLevelContactTags",
107
+ "Add HighLevel contact tags",
108
+ "Adds tags to one contact.",
109
+ "safe",
110
+ ),
111
+ operation(
112
+ "contacts",
113
+ "remove-tags",
114
+ "removeContactTags",
115
+ "removeHighLevelContactTags",
116
+ "Remove HighLevel contact tags",
117
+ "Removes tags from one contact.",
118
+ "safe",
119
+ ),
120
+ operation(
121
+ "contacts",
122
+ "get-all-tasks",
123
+ "listContactTasks",
124
+ "listHighLevelContactTasks",
125
+ "List HighLevel contact tasks",
126
+ "Lists tasks attached to one contact.",
127
+ "safe",
128
+ ),
129
+ operation(
130
+ "contacts",
131
+ "get-task",
132
+ "getContactTask",
133
+ "getHighLevelContactTask",
134
+ "Get HighLevel contact task",
135
+ "Retrieves one task attached to a contact.",
136
+ "safe",
137
+ ),
138
+ operation(
139
+ "contacts",
140
+ "create-task",
141
+ "createContactTask",
142
+ "createHighLevelContactTask",
143
+ "Create HighLevel contact task",
144
+ "Creates a task attached to one contact.",
145
+ "unsafe",
146
+ ),
147
+ operation(
148
+ "contacts",
149
+ "update-task",
150
+ "updateContactTask",
151
+ "updateHighLevelContactTask",
152
+ "Update HighLevel contact task",
153
+ "Updates one contact task.",
154
+ "safe",
155
+ ),
156
+ operation(
157
+ "contacts",
158
+ "update-task-completed",
159
+ "completeContactTask",
160
+ "completeHighLevelContactTask",
161
+ "Complete HighLevel contact task",
162
+ "Marks one contact task complete or incomplete.",
163
+ "safe",
164
+ ),
165
+ operation(
166
+ "contacts",
167
+ "delete-task",
168
+ "deleteContactTask",
169
+ "deleteHighLevelContactTask",
170
+ "Delete HighLevel contact task",
171
+ "Deletes one contact task.",
172
+ "safe",
173
+ ),
174
+ operation(
175
+ "contacts",
176
+ "get-all-notes",
177
+ "listContactNotes",
178
+ "listHighLevelContactNotes",
179
+ "List HighLevel contact notes",
180
+ "Lists notes attached to one contact.",
181
+ "safe",
182
+ ),
183
+ operation(
184
+ "contacts",
185
+ "get-note",
186
+ "getContactNote",
187
+ "getHighLevelContactNote",
188
+ "Get HighLevel contact note",
189
+ "Retrieves one note attached to a contact.",
190
+ "safe",
191
+ ),
192
+ operation(
193
+ "contacts",
194
+ "create-note",
195
+ "createContactNote",
196
+ "createHighLevelContactNote",
197
+ "Create HighLevel contact note",
198
+ "Creates a note attached to one contact.",
199
+ "unsafe",
200
+ ),
201
+ operation(
202
+ "contacts",
203
+ "update-note",
204
+ "updateContactNote",
205
+ "updateHighLevelContactNote",
206
+ "Update HighLevel contact note",
207
+ "Updates one contact note.",
208
+ "safe",
209
+ ),
210
+ operation(
211
+ "contacts",
212
+ "delete-note",
213
+ "deleteContactNote",
214
+ "deleteHighLevelContactNote",
215
+ "Delete HighLevel contact note",
216
+ "Deletes one contact note.",
217
+ "safe",
218
+ ),
219
+ operation(
220
+ "contacts",
221
+ "add-contact-to-campaign",
222
+ "addContactToCampaign",
223
+ "addHighLevelContactToCampaign",
224
+ "Add HighLevel contact to campaign",
225
+ "Adds one contact to a campaign.",
226
+ "unsafe",
227
+ ),
228
+ operation(
229
+ "contacts",
230
+ "remove-contact-from-campaign",
231
+ "removeContactFromCampaign",
232
+ "removeHighLevelContactFromCampaign",
233
+ "Remove HighLevel contact from campaign",
234
+ "Removes one contact from a campaign.",
235
+ "safe",
236
+ ),
237
+ operation(
238
+ "contacts",
239
+ "add-contact-to-workflow",
240
+ "addContactToWorkflow",
241
+ "addHighLevelContactToWorkflow",
242
+ "Add HighLevel contact to workflow",
243
+ "Adds one contact to a workflow.",
244
+ "unsafe",
245
+ ),
246
+ operation(
247
+ "contacts",
248
+ "delete-contact-from-workflow",
249
+ "removeContactFromWorkflow",
250
+ "removeHighLevelContactFromWorkflow",
251
+ "Remove HighLevel contact from workflow",
252
+ "Removes one contact from a workflow.",
253
+ "safe",
254
+ ),
255
+
256
+ operation(
257
+ "opportunities",
258
+ "search-opportunity",
259
+ "searchOpportunities",
260
+ "searchHighLevelOpportunities",
261
+ "Search HighLevel opportunities",
262
+ "Searches opportunities with pipeline, status, owner, and pagination filters.",
263
+ "safe",
264
+ ),
265
+ operation(
266
+ "opportunities",
267
+ "get-opportunity",
268
+ "getOpportunity",
269
+ "getHighLevelOpportunity",
270
+ "Get HighLevel opportunity",
271
+ "Retrieves one opportunity by ID.",
272
+ "safe",
273
+ ),
274
+ operation(
275
+ "opportunities",
276
+ "create-opportunity",
277
+ "createOpportunity",
278
+ "createHighLevelOpportunity",
279
+ "Create HighLevel opportunity",
280
+ "Creates an opportunity in a pipeline.",
281
+ "unsafe",
282
+ ),
283
+ operation(
284
+ "opportunities",
285
+ "Upsert-opportunity",
286
+ "upsertOpportunity",
287
+ "upsertHighLevelOpportunity",
288
+ "Upsert HighLevel opportunity",
289
+ "Creates or updates an opportunity using HighLevel's matching rules.",
290
+ "unsafe",
291
+ ),
292
+ operation(
293
+ "opportunities",
294
+ "update-opportunity",
295
+ "updateOpportunity",
296
+ "updateHighLevelOpportunity",
297
+ "Update HighLevel opportunity",
298
+ "Updates one opportunity by ID.",
299
+ "safe",
300
+ ),
301
+ operation(
302
+ "opportunities",
303
+ "update-opportunity-status",
304
+ "updateOpportunityStatus",
305
+ "updateHighLevelOpportunityStatus",
306
+ "Update HighLevel opportunity status",
307
+ "Changes one opportunity's open, won, lost, or abandoned status.",
308
+ "safe",
309
+ ),
310
+ operation(
311
+ "opportunities",
312
+ "delete-opportunity",
313
+ "deleteOpportunity",
314
+ "deleteHighLevelOpportunity",
315
+ "Delete HighLevel opportunity",
316
+ "Deletes one opportunity by ID.",
317
+ "safe",
318
+ ),
319
+ operation(
320
+ "opportunities",
321
+ "get-pipelines",
322
+ "listPipelines",
323
+ "listHighLevelPipelines",
324
+ "List HighLevel pipelines",
325
+ "Lists the connected sub-account's opportunity pipelines and stages.",
326
+ "safe",
327
+ ),
328
+ operation(
329
+ "opportunities",
330
+ "get-lost-reason",
331
+ "listOpportunityLostReasons",
332
+ "listHighLevelOpportunityLostReasons",
333
+ "List HighLevel opportunity lost reasons",
334
+ "Lists configured reasons for lost opportunities.",
335
+ "safe",
336
+ ),
337
+
338
+ operation(
339
+ "calendars",
340
+ "get-calendars",
341
+ "listCalendars",
342
+ "listHighLevelCalendars",
343
+ "List HighLevel calendars",
344
+ "Lists calendars in the connected sub-account.",
345
+ "safe",
346
+ ),
347
+ operation(
348
+ "calendars",
349
+ "get-calendar",
350
+ "getCalendar",
351
+ "getHighLevelCalendar",
352
+ "Get HighLevel calendar",
353
+ "Retrieves one calendar by ID.",
354
+ "safe",
355
+ ),
356
+ operation(
357
+ "calendars",
358
+ "create-calendar",
359
+ "createCalendar",
360
+ "createHighLevelCalendar",
361
+ "Create HighLevel calendar",
362
+ "Creates a calendar in the connected sub-account.",
363
+ "unsafe",
364
+ ),
365
+ operation(
366
+ "calendars",
367
+ "update-calendar",
368
+ "updateCalendar",
369
+ "updateHighLevelCalendar",
370
+ "Update HighLevel calendar",
371
+ "Updates one calendar by ID.",
372
+ "safe",
373
+ ),
374
+ operation(
375
+ "calendars",
376
+ "delete-calendar",
377
+ "deleteCalendar",
378
+ "deleteHighLevelCalendar",
379
+ "Delete HighLevel calendar",
380
+ "Deletes one calendar by ID.",
381
+ "safe",
382
+ ),
383
+ operation(
384
+ "calendars",
385
+ "get-slots",
386
+ "getCalendarFreeSlots",
387
+ "getHighLevelCalendarFreeSlots",
388
+ "Get HighLevel calendar free slots",
389
+ "Returns available slots for a calendar and date range.",
390
+ "safe",
391
+ ),
392
+ operation(
393
+ "calendars",
394
+ "get-calendar-events",
395
+ "listAppointments",
396
+ "listHighLevelAppointments",
397
+ "List HighLevel appointments",
398
+ "Lists calendar events and appointments in a date range.",
399
+ "safe",
400
+ ),
401
+ operation(
402
+ "calendars",
403
+ "get-appointment",
404
+ "getAppointment",
405
+ "getHighLevelAppointment",
406
+ "Get HighLevel appointment",
407
+ "Retrieves one appointment by event ID.",
408
+ "safe",
409
+ ),
410
+ operation(
411
+ "calendars",
412
+ "create-appointment",
413
+ "createAppointment",
414
+ "createHighLevelAppointment",
415
+ "Create HighLevel appointment",
416
+ "Creates an appointment on a calendar.",
417
+ "unsafe",
418
+ ),
419
+ operation(
420
+ "calendars",
421
+ "edit-appointment",
422
+ "updateAppointment",
423
+ "updateHighLevelAppointment",
424
+ "Update HighLevel appointment",
425
+ "Updates one calendar appointment.",
426
+ "safe",
427
+ ),
428
+ operation(
429
+ "calendars",
430
+ "delete-event",
431
+ "deleteAppointment",
432
+ "deleteHighLevelAppointment",
433
+ "Delete HighLevel appointment",
434
+ "Deletes one calendar event or appointment.",
435
+ "safe",
436
+ ),
437
+ operation(
438
+ "calendars",
439
+ "get-blocked-slots",
440
+ "listBlockedSlots",
441
+ "listHighLevelBlockedSlots",
442
+ "List HighLevel blocked slots",
443
+ "Lists blocked calendar slots in a date range.",
444
+ "safe",
445
+ ),
446
+ operation(
447
+ "calendars",
448
+ "create-block-slot",
449
+ "createBlockedSlot",
450
+ "createHighLevelBlockedSlot",
451
+ "Create HighLevel blocked slot",
452
+ "Blocks a time range on a calendar.",
453
+ "unsafe",
454
+ ),
455
+ operation(
456
+ "calendars",
457
+ "edit-block-slot",
458
+ "updateBlockedSlot",
459
+ "updateHighLevelBlockedSlot",
460
+ "Update HighLevel blocked slot",
461
+ "Updates one blocked calendar slot.",
462
+ "safe",
463
+ ),
464
+ operation(
465
+ "calendars",
466
+ "getAllSchedules",
467
+ "listSchedules",
468
+ "listHighLevelSchedules",
469
+ "List HighLevel schedules",
470
+ "Lists availability schedules for the connected sub-account.",
471
+ "safe",
472
+ ),
473
+ operation(
474
+ "calendars",
475
+ "getScheduleById",
476
+ "getSchedule",
477
+ "getHighLevelSchedule",
478
+ "Get HighLevel schedule",
479
+ "Retrieves one availability schedule by ID.",
480
+ "safe",
481
+ ),
482
+ operation(
483
+ "calendars",
484
+ "createSchedule",
485
+ "createSchedule",
486
+ "createHighLevelSchedule",
487
+ "Create HighLevel schedule",
488
+ "Creates an availability schedule.",
489
+ "unsafe",
490
+ ),
491
+ operation(
492
+ "calendars",
493
+ "updateSchedule",
494
+ "updateSchedule",
495
+ "updateHighLevelSchedule",
496
+ "Update HighLevel schedule",
497
+ "Updates one availability schedule.",
498
+ "safe",
499
+ ),
500
+ operation(
501
+ "calendars",
502
+ "deleteSchedule",
503
+ "deleteSchedule",
504
+ "deleteHighLevelSchedule",
505
+ "Delete HighLevel schedule",
506
+ "Deletes one availability schedule.",
507
+ "safe",
508
+ ),
509
+
510
+ operation(
511
+ "conversations",
512
+ "search-conversation",
513
+ "searchConversations",
514
+ "searchHighLevelConversations",
515
+ "Search HighLevel conversations",
516
+ "Searches conversations by contact, assignment, status, and pagination.",
517
+ "safe",
518
+ ),
519
+ operation(
520
+ "conversations",
521
+ "get-conversation",
522
+ "getConversation",
523
+ "getHighLevelConversation",
524
+ "Get HighLevel conversation",
525
+ "Retrieves one conversation by ID.",
526
+ "safe",
527
+ ),
528
+ operation(
529
+ "conversations",
530
+ "create-conversation",
531
+ "createConversation",
532
+ "createHighLevelConversation",
533
+ "Create HighLevel conversation",
534
+ "Creates a conversation for a contact.",
535
+ "unsafe",
536
+ ),
537
+ operation(
538
+ "conversations",
539
+ "update-conversation",
540
+ "updateConversation",
541
+ "updateHighLevelConversation",
542
+ "Update HighLevel conversation",
543
+ "Updates assignment, status, or read state for one conversation.",
544
+ "safe",
545
+ ),
546
+ operation(
547
+ "conversations",
548
+ "delete-conversation",
549
+ "deleteConversation",
550
+ "deleteHighLevelConversation",
551
+ "Delete HighLevel conversation",
552
+ "Deletes one conversation by ID.",
553
+ "safe",
554
+ ),
555
+ operation(
556
+ "conversations",
557
+ "get-messages",
558
+ "listMessages",
559
+ "listHighLevelMessages",
560
+ "List HighLevel messages",
561
+ "Lists messages in one conversation.",
562
+ "safe",
563
+ ),
564
+ operation(
565
+ "conversations",
566
+ "get-message",
567
+ "getMessage",
568
+ "getHighLevelMessage",
569
+ "Get HighLevel message",
570
+ "Retrieves one message by ID.",
571
+ "safe",
572
+ ),
573
+ operation(
574
+ "conversations",
575
+ "send-a-new-message",
576
+ "sendMessage",
577
+ "sendHighLevelMessage",
578
+ "Send HighLevel message",
579
+ "Sends a supported message through a contact conversation.",
580
+ "unsafe",
581
+ ),
582
+ operation(
583
+ "conversations",
584
+ "cancel-scheduled-message",
585
+ "cancelScheduledMessage",
586
+ "cancelScheduledHighLevelMessage",
587
+ "Cancel scheduled HighLevel message",
588
+ "Cancels one scheduled message before delivery.",
589
+ "safe",
590
+ ),
591
+ operation(
592
+ "conversations",
593
+ "get-message-recording",
594
+ "getMessageRecording",
595
+ "getHighLevelMessageRecording",
596
+ "Get HighLevel message recording",
597
+ "Returns the recording for a voice or call message.",
598
+ "safe",
599
+ ),
600
+ operation(
601
+ "conversations",
602
+ "get-message-transcription",
603
+ "getMessageTranscription",
604
+ "getHighLevelMessageTranscription",
605
+ "Get HighLevel message transcription",
606
+ "Returns the transcription for a supported message.",
607
+ "safe",
608
+ ),
609
+
610
+ operation(
611
+ "locations",
612
+ "get-location",
613
+ "getLocation",
614
+ "getHighLevelLocation",
615
+ "Get HighLevel location",
616
+ "Retrieves the connected sub-account's location record.",
617
+ "safe",
618
+ ),
619
+ operation(
620
+ "users",
621
+ "get-user-by-location",
622
+ "listUsers",
623
+ "listHighLevelUsers",
624
+ "List HighLevel users",
625
+ "Lists users assigned to the connected sub-account.",
626
+ "safe",
627
+ ),
628
+ operation(
629
+ "users",
630
+ "get-user",
631
+ "getUser",
632
+ "getHighLevelUser",
633
+ "Get HighLevel user",
634
+ "Retrieves one user by ID.",
635
+ "safe",
636
+ ),
637
+ operation(
638
+ "campaigns",
639
+ "get-campaigns",
640
+ "listCampaigns",
641
+ "listHighLevelCampaigns",
642
+ "List HighLevel campaigns",
643
+ "Lists campaigns in the connected sub-account.",
644
+ "safe",
645
+ ),
646
+ operation(
647
+ "workflows",
648
+ "get-workflow",
649
+ "listWorkflows",
650
+ "listHighLevelWorkflows",
651
+ "List HighLevel workflows",
652
+ "Lists workflows in the connected sub-account.",
653
+ "safe",
654
+ ),
655
+ operation(
656
+ "forms",
657
+ "get-forms",
658
+ "listForms",
659
+ "listHighLevelForms",
660
+ "List HighLevel forms",
661
+ "Lists forms in the connected sub-account.",
662
+ "safe",
663
+ ),
664
+ operation(
665
+ "forms",
666
+ "get-forms-submissions",
667
+ "listFormSubmissions",
668
+ "listHighLevelFormSubmissions",
669
+ "List HighLevel form submissions",
670
+ "Lists form submissions with date and pagination filters.",
671
+ "safe",
672
+ ),
673
+ operation(
674
+ "surveys",
675
+ "get-surveys",
676
+ "listSurveys",
677
+ "listHighLevelSurveys",
678
+ "List HighLevel surveys",
679
+ "Lists surveys in the connected sub-account.",
680
+ "safe",
681
+ ),
682
+ operation(
683
+ "surveys",
684
+ "get-surveys-submissions",
685
+ "listSurveySubmissions",
686
+ "listHighLevelSurveySubmissions",
687
+ "List HighLevel survey submissions",
688
+ "Lists survey submissions with date and pagination filters.",
689
+ "safe",
690
+ ),
691
+ ] as const satisfies readonly HighLevelOperationDefinition[]
692
+
693
+ /** Stable key joining an official HighLevel OpenAPI product and operation ID. */
694
+ export type HighLevelOperationKey = OperationKey<
695
+ (typeof HIGH_LEVEL_OPERATION_DEFINITIONS)[number]
696
+ >
697
+
698
+ /** Derives a product-qualified key from a manifest definition. */
699
+ type OperationKey<TDefinition> = TDefinition extends {
700
+ operationId: infer TOperationId extends string
701
+ product: infer TProduct extends string
702
+ }
703
+ ? `${TProduct}:${TOperationId}`
704
+ : never
705
+
706
+ /**
707
+ * Defines one public HighLevel action bound to an official operation.
708
+ *
709
+ * @param product - Provider OpenAPI product.
710
+ * @param operationId - Official operation identifier.
711
+ * @param alias - Public object alias.
712
+ * @param exportName - Named SDK export.
713
+ * @param title - Action title.
714
+ * @param description - Action description.
715
+ * @param replaySafety - Automatic replay classification.
716
+ */
717
+ function operation<
718
+ const TProduct extends HighLevelOpenApiProduct,
719
+ const TOperationId extends string,
720
+ const TAlias extends string,
721
+ const TExportName extends string,
722
+ >(
723
+ product: TProduct,
724
+ operationId: TOperationId,
725
+ alias: TAlias,
726
+ exportName: TExportName,
727
+ title: string,
728
+ description: string,
729
+ replaySafety: HighLevelReplaySafety,
730
+ ) {
731
+ return {
732
+ alias,
733
+ description,
734
+ exportName,
735
+ operationId,
736
+ product,
737
+ replaySafety,
738
+ title,
739
+ } as const
740
+ }