@unipile/sdk 2.0.0 → 2.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 (50) hide show
  1. package/README.md +1 -7
  2. package/dist/client/client.gen.d.ts +3 -0
  3. package/dist/client/client.gen.d.ts.map +1 -0
  4. package/dist/client/client.gen.js +238 -0
  5. package/dist/client/index.d.ts +9 -0
  6. package/dist/client/index.d.ts.map +1 -0
  7. package/dist/client/index.js +17 -0
  8. package/dist/client/types.gen.d.ts +118 -0
  9. package/dist/client/types.gen.d.ts.map +1 -0
  10. package/dist/client/types.gen.js +3 -0
  11. package/dist/client/utils.gen.d.ts +34 -0
  12. package/dist/client/utils.gen.d.ts.map +1 -0
  13. package/dist/client/utils.gen.js +241 -0
  14. package/dist/client.gen.d.ts +13 -0
  15. package/dist/client.gen.d.ts.map +1 -0
  16. package/dist/client.gen.js +6 -0
  17. package/dist/core/auth.gen.d.ts +19 -0
  18. package/dist/core/auth.gen.d.ts.map +1 -0
  19. package/dist/core/auth.gen.js +18 -0
  20. package/dist/core/bodySerializer.gen.d.ts +26 -0
  21. package/dist/core/bodySerializer.gen.d.ts.map +1 -0
  22. package/dist/core/bodySerializer.gen.js +60 -0
  23. package/dist/core/params.gen.d.ts +44 -0
  24. package/dist/core/params.gen.d.ts.map +1 -0
  25. package/dist/core/params.gen.js +104 -0
  26. package/dist/core/pathSerializer.gen.d.ts +34 -0
  27. package/dist/core/pathSerializer.gen.d.ts.map +1 -0
  28. package/dist/core/pathSerializer.gen.js +115 -0
  29. package/dist/core/queryKeySerializer.gen.d.ts +19 -0
  30. package/dist/core/queryKeySerializer.gen.d.ts.map +1 -0
  31. package/dist/core/queryKeySerializer.gen.js +98 -0
  32. package/dist/core/serverSentEvents.gen.d.ts +72 -0
  33. package/dist/core/serverSentEvents.gen.d.ts.map +1 -0
  34. package/dist/core/serverSentEvents.gen.js +137 -0
  35. package/dist/core/types.gen.d.ts +79 -0
  36. package/dist/core/types.gen.d.ts.map +1 -0
  37. package/dist/core/types.gen.js +3 -0
  38. package/dist/core/utils.gen.d.ts +20 -0
  39. package/dist/core/utils.gen.d.ts.map +1 -0
  40. package/dist/core/utils.gen.js +93 -0
  41. package/dist/index.d.ts +3 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +16 -0
  44. package/dist/sdk.gen.d.ts +1187 -0
  45. package/dist/sdk.gen.d.ts.map +1 -0
  46. package/dist/sdk.gen.js +2605 -0
  47. package/dist/types.gen.d.ts +41328 -0
  48. package/dist/types.gen.d.ts.map +1 -0
  49. package/dist/types.gen.js +3 -0
  50. package/package.json +6 -2
@@ -0,0 +1,2605 @@
1
+ "use strict";
2
+ // This file is auto-generated by @hey-api/openapi-ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.UnipileWebhooks = exports.UnipileAccounts = exports.UnipileHostedAuth = exports.UnipileCustomAuth = exports.UnipileInstagram = exports.UnipileLinkedIn = exports.UnipileCalendar = exports.UnipilePosts = exports.UnipileUsers = exports.UnipileEmails = exports.UnipileMessaging = void 0;
5
+ const client_gen_1 = require("./client.gen");
6
+ class HeyApiClient {
7
+ constructor(args) {
8
+ this.client = args?.client ?? client_gen_1.client;
9
+ }
10
+ }
11
+ class HeyApiRegistry {
12
+ constructor() {
13
+ this.defaultKey = 'default';
14
+ this.instances = new Map();
15
+ }
16
+ get(key) {
17
+ const instance = this.instances.get(key ?? this.defaultKey);
18
+ if (!instance) {
19
+ throw new Error(`No SDK client found. Create one with "new UnipileMessaging()" to fix this error.`);
20
+ }
21
+ return instance;
22
+ }
23
+ set(value, key) {
24
+ this.instances.set(key ?? this.defaultKey, value);
25
+ }
26
+ }
27
+ class HeyApiClient2 {
28
+ constructor(args) {
29
+ this.client = args?.client ?? client_gen_1.client;
30
+ }
31
+ }
32
+ class HeyApiRegistry2 {
33
+ constructor() {
34
+ this.defaultKey = 'default';
35
+ this.instances = new Map();
36
+ }
37
+ get(key) {
38
+ const instance = this.instances.get(key ?? this.defaultKey);
39
+ if (!instance) {
40
+ throw new Error(`No SDK client found. Create one with "new UnipileEmails()" to fix this error.`);
41
+ }
42
+ return instance;
43
+ }
44
+ set(value, key) {
45
+ this.instances.set(key ?? this.defaultKey, value);
46
+ }
47
+ }
48
+ class HeyApiClient3 {
49
+ constructor(args) {
50
+ this.client = args?.client ?? client_gen_1.client;
51
+ }
52
+ }
53
+ class HeyApiRegistry3 {
54
+ constructor() {
55
+ this.defaultKey = 'default';
56
+ this.instances = new Map();
57
+ }
58
+ get(key) {
59
+ const instance = this.instances.get(key ?? this.defaultKey);
60
+ if (!instance) {
61
+ throw new Error(`No SDK client found. Create one with "new UnipileUsers()" to fix this error.`);
62
+ }
63
+ return instance;
64
+ }
65
+ set(value, key) {
66
+ this.instances.set(key ?? this.defaultKey, value);
67
+ }
68
+ }
69
+ class HeyApiClient4 {
70
+ constructor(args) {
71
+ this.client = args?.client ?? client_gen_1.client;
72
+ }
73
+ }
74
+ class HeyApiRegistry4 {
75
+ constructor() {
76
+ this.defaultKey = 'default';
77
+ this.instances = new Map();
78
+ }
79
+ get(key) {
80
+ const instance = this.instances.get(key ?? this.defaultKey);
81
+ if (!instance) {
82
+ throw new Error(`No SDK client found. Create one with "new UnipilePosts()" to fix this error.`);
83
+ }
84
+ return instance;
85
+ }
86
+ set(value, key) {
87
+ this.instances.set(key ?? this.defaultKey, value);
88
+ }
89
+ }
90
+ class HeyApiClient5 {
91
+ constructor(args) {
92
+ this.client = args?.client ?? client_gen_1.client;
93
+ }
94
+ }
95
+ class HeyApiRegistry5 {
96
+ constructor() {
97
+ this.defaultKey = 'default';
98
+ this.instances = new Map();
99
+ }
100
+ get(key) {
101
+ const instance = this.instances.get(key ?? this.defaultKey);
102
+ if (!instance) {
103
+ throw new Error(`No SDK client found. Create one with "new UnipileCalendar()" to fix this error.`);
104
+ }
105
+ return instance;
106
+ }
107
+ set(value, key) {
108
+ this.instances.set(key ?? this.defaultKey, value);
109
+ }
110
+ }
111
+ class HeyApiClient6 {
112
+ constructor(args) {
113
+ this.client = args?.client ?? client_gen_1.client;
114
+ }
115
+ }
116
+ class HeyApiRegistry6 {
117
+ constructor() {
118
+ this.defaultKey = 'default';
119
+ this.instances = new Map();
120
+ }
121
+ get(key) {
122
+ const instance = this.instances.get(key ?? this.defaultKey);
123
+ if (!instance) {
124
+ throw new Error(`No SDK client found. Create one with "new UnipileLinkedIn()" to fix this error.`);
125
+ }
126
+ return instance;
127
+ }
128
+ set(value, key) {
129
+ this.instances.set(key ?? this.defaultKey, value);
130
+ }
131
+ }
132
+ class HeyApiClient7 {
133
+ constructor(args) {
134
+ this.client = args?.client ?? client_gen_1.client;
135
+ }
136
+ }
137
+ class HeyApiRegistry7 {
138
+ constructor() {
139
+ this.defaultKey = 'default';
140
+ this.instances = new Map();
141
+ }
142
+ get(key) {
143
+ const instance = this.instances.get(key ?? this.defaultKey);
144
+ if (!instance) {
145
+ throw new Error(`No SDK client found. Create one with "new UnipileInstagram()" to fix this error.`);
146
+ }
147
+ return instance;
148
+ }
149
+ set(value, key) {
150
+ this.instances.set(key ?? this.defaultKey, value);
151
+ }
152
+ }
153
+ class HeyApiClient8 {
154
+ constructor(args) {
155
+ this.client = args?.client ?? client_gen_1.client;
156
+ }
157
+ }
158
+ class HeyApiRegistry8 {
159
+ constructor() {
160
+ this.defaultKey = 'default';
161
+ this.instances = new Map();
162
+ }
163
+ get(key) {
164
+ const instance = this.instances.get(key ?? this.defaultKey);
165
+ if (!instance) {
166
+ throw new Error(`No SDK client found. Create one with "new UnipileCustomAuth()" to fix this error.`);
167
+ }
168
+ return instance;
169
+ }
170
+ set(value, key) {
171
+ this.instances.set(key ?? this.defaultKey, value);
172
+ }
173
+ }
174
+ class HeyApiClient9 {
175
+ constructor(args) {
176
+ this.client = args?.client ?? client_gen_1.client;
177
+ }
178
+ }
179
+ class HeyApiRegistry9 {
180
+ constructor() {
181
+ this.defaultKey = 'default';
182
+ this.instances = new Map();
183
+ }
184
+ get(key) {
185
+ const instance = this.instances.get(key ?? this.defaultKey);
186
+ if (!instance) {
187
+ throw new Error(`No SDK client found. Create one with "new UnipileHostedAuth()" to fix this error.`);
188
+ }
189
+ return instance;
190
+ }
191
+ set(value, key) {
192
+ this.instances.set(key ?? this.defaultKey, value);
193
+ }
194
+ }
195
+ class HeyApiClient10 {
196
+ constructor(args) {
197
+ this.client = args?.client ?? client_gen_1.client;
198
+ }
199
+ }
200
+ class HeyApiRegistry10 {
201
+ constructor() {
202
+ this.defaultKey = 'default';
203
+ this.instances = new Map();
204
+ }
205
+ get(key) {
206
+ const instance = this.instances.get(key ?? this.defaultKey);
207
+ if (!instance) {
208
+ throw new Error(`No SDK client found. Create one with "new UnipileAccounts()" to fix this error.`);
209
+ }
210
+ return instance;
211
+ }
212
+ set(value, key) {
213
+ this.instances.set(key ?? this.defaultKey, value);
214
+ }
215
+ }
216
+ class HeyApiClient11 {
217
+ constructor(args) {
218
+ this.client = args?.client ?? client_gen_1.client;
219
+ }
220
+ }
221
+ class HeyApiRegistry11 {
222
+ constructor() {
223
+ this.defaultKey = 'default';
224
+ this.instances = new Map();
225
+ }
226
+ get(key) {
227
+ const instance = this.instances.get(key ?? this.defaultKey);
228
+ if (!instance) {
229
+ throw new Error(`No SDK client found. Create one with "new UnipileWebhooks()" to fix this error.`);
230
+ }
231
+ return instance;
232
+ }
233
+ set(value, key) {
234
+ this.instances.set(key ?? this.defaultKey, value);
235
+ }
236
+ }
237
+ class UnipileMessaging extends HeyApiClient {
238
+ constructor(args) {
239
+ super(args);
240
+ UnipileMessaging.__registry.set(this, args?.key);
241
+ }
242
+ /**
243
+ * List all Chats
244
+ *
245
+ * Returns a list of account's chats, whatever the inbox they belong to. The chats are returned sorted by their last message date, with the most recent appearing first. You might want to use the <a href="https://developer.unipile.com/v2.0/reference/get_v2-account-id-inboxes-inbox-id-chats">List inbox Chats</a> instead if not supported by the provider. Filters are applied with an AND logic if supported by the provider.
246
+ */
247
+ getChatsList(options) {
248
+ return (options.client ?? this.client).get({
249
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
250
+ url: '/v2/{account_id}/chats',
251
+ ...options
252
+ });
253
+ }
254
+ /**
255
+ * List all Inboxes
256
+ *
257
+ * Returns a list of the account's Inboxes.
258
+ */
259
+ getInboxesList(options) {
260
+ return (options.client ?? this.client).get({
261
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
262
+ url: '/v2/{account_id}/inboxes',
263
+ ...options
264
+ });
265
+ }
266
+ /**
267
+ * List Inbox Chats
268
+ *
269
+ * Returns a list of account's chats from a specific inbox. The chats are returned sorted by their last message date, with the most recent appearing first. Filters are applied with an AND logic if supported by the provider.
270
+ */
271
+ getInboxChatsList(options) {
272
+ return (options.client ?? this.client).get({
273
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
274
+ url: '/v2/{account_id}/inboxes/{inbox_id}/chats',
275
+ ...options
276
+ });
277
+ }
278
+ /**
279
+ * Delete a Chat
280
+ *
281
+ * Deletes a chat if supported by the provider.
282
+ */
283
+ deleteChat(options) {
284
+ return (options.client ?? this.client).delete({
285
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
286
+ url: '/v2/{account_id}/chats/{chat_id}',
287
+ ...options
288
+ });
289
+ }
290
+ /**
291
+ * Get a Chat
292
+ *
293
+ * Retrieves a Chat object.
294
+ */
295
+ getChat(options) {
296
+ return (options.client ?? this.client).get({
297
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
298
+ url: '/v2/{account_id}/chats/{chat_id}',
299
+ ...options
300
+ });
301
+ }
302
+ /**
303
+ * Update a Chat
304
+ *
305
+ * Updates the specified chat by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
306
+ */
307
+ updateChat(options) {
308
+ return (options.client ?? this.client).patch({
309
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
310
+ url: '/v2/{account_id}/chats/{chat_id}',
311
+ ...options,
312
+ headers: {
313
+ 'Content-Type': 'application/json',
314
+ ...options.headers
315
+ }
316
+ });
317
+ }
318
+ /**
319
+ * Get a User Chat
320
+ *
321
+ * Resolves chat identifiers associated with the specified User. Depending on the provider, the result may include chats with or without message history, and may return multiple matches across inboxes or contexts.
322
+ */
323
+ getUserChat(options) {
324
+ return (options.client ?? this.client).get({
325
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
326
+ url: '/v2/{account_id}/users/{user_id}/chat',
327
+ ...options
328
+ });
329
+ }
330
+ /**
331
+ * Start a Chat
332
+ *
333
+ * Starts a new 1to1 or group chat by sending the first message.
334
+ * <br/>
335
+ * Use <a href="https://developer.unipile.com/v2.0/reference/post_v2-account-id-chats-chat-id-messages-send">Send a Message</a> if a conversation already exist with the wanted user(s).
336
+ * <br/>
337
+ * Use <a href="https://developer.unipile.com/v2.0/reference/post_v2-account-id-inboxes-inbox-id-chats">Start a Chat from Inbox</a> if the provider uses the inbox concept.
338
+ * <br/>
339
+ * Multipart supported, refer to <a href="https://developer.unipile.com/v2.0/reference/api-usage#sending-files">Sending Files</a>.
340
+ */
341
+ startChat(options) {
342
+ return (options.client ?? this.client).post({
343
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
344
+ url: '/v2/{account_id}/chats/send',
345
+ ...options,
346
+ headers: {
347
+ 'Content-Type': 'application/json',
348
+ ...options.headers
349
+ }
350
+ });
351
+ }
352
+ /**
353
+ * Start a Chat from Inbox
354
+ *
355
+ * Starts a new 1to1 or group chat in the given inbox by sending the first message.
356
+ * <br/>
357
+ * Use <a href="https://developer.unipile.com/v2.0/reference/post_v2-account-id-chats-chat-id-messages-send">Send a Message</a> if a conversation already exist with the wanted user(s).
358
+ * <br/>
359
+ * Use <a href="https://developer.unipile.com/v2.0/reference/post_v2-account-id-chats-send">Start a Chat</a> instead if the provider does not use the inbox concept.
360
+ *
361
+ * <br/>
362
+ * Multipart supported, refer to <a href="https://developer.unipile.com/v2.0/reference/api-usage#sending-files">Sending Files</a>.
363
+ */
364
+ startChatFromInbox(options) {
365
+ return (options.client ?? this.client).post({
366
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
367
+ url: '/v2/{account_id}/inboxes/{inbox_id}/chats/send',
368
+ ...options,
369
+ headers: {
370
+ 'Content-Type': 'application/json',
371
+ ...options.headers
372
+ }
373
+ });
374
+ }
375
+ /**
376
+ * List all Chat Messages
377
+ *
378
+ * Returns a list of messages in a chat. The messages are returned sorted by their timestamp, with the most recent appearing first.
379
+ */
380
+ getMessagesList(options) {
381
+ return (options.client ?? this.client).get({
382
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
383
+ url: '/v2/{account_id}/chats/{chat_id}/messages',
384
+ ...options
385
+ });
386
+ }
387
+ /**
388
+ * Delete a Message
389
+ *
390
+ * Deletes one of your own messages. Depending of the provider, the message might still be visible as deleted.
391
+ * <br />
392
+ * Trying to delete the message of another user will fail.
393
+ */
394
+ deleteMessage(options) {
395
+ return (options.client ?? this.client).delete({
396
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
397
+ url: '/v2/{account_id}/chats/{chat_id}/messages/{message_id}',
398
+ ...options
399
+ });
400
+ }
401
+ /**
402
+ * Get a Message
403
+ *
404
+ * Retrieves a message object.
405
+ */
406
+ getMessage(options) {
407
+ return (options.client ?? this.client).get({
408
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
409
+ url: '/v2/{account_id}/chats/{chat_id}/messages/{message_id}',
410
+ ...options
411
+ });
412
+ }
413
+ /**
414
+ * Send a Message
415
+ *
416
+ * Sends a message in the specified chat.
417
+ * <br/>
418
+ * Use <a href="https://developer.unipile.com/v2.0/reference/post_v2-account-id-chats-send">Start a Chat</a> if you don't have a conversation with the wanted user(s) yet.
419
+ * <br/>
420
+ * Multipart supported, refer to <a href="https://developer.unipile.com/v2.0/reference/api-usage#sending-files">Sending Files</a>.
421
+ */
422
+ sendMessage(options) {
423
+ return (options.client ?? this.client).post({
424
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
425
+ url: '/v2/{account_id}/chats/{chat_id}/messages/send',
426
+ ...options,
427
+ headers: {
428
+ 'Content-Type': 'application/json',
429
+ ...options.headers
430
+ }
431
+ });
432
+ }
433
+ /**
434
+ * Forward a Message
435
+ *
436
+ * Forwards a message to another chat.
437
+ */
438
+ forwardMessage(options) {
439
+ return (options.client ?? this.client).post({
440
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
441
+ url: '/v2/{account_id}/chats/{chat_id}/messages/{message_id}/forward',
442
+ ...options,
443
+ headers: {
444
+ 'Content-Type': 'application/json',
445
+ ...options.headers
446
+ }
447
+ });
448
+ }
449
+ /**
450
+ * Modify a Message
451
+ *
452
+ * Modifies one of the account's owner messages.
453
+ * <br/>
454
+ * Trying to modify the message of another user will fail.
455
+ */
456
+ modifyMessage(options) {
457
+ return (options.client ?? this.client).post({
458
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
459
+ url: '/v2/{account_id}/chats/{chat_id}/messages/{message_id}/modify',
460
+ ...options,
461
+ headers: {
462
+ 'Content-Type': 'application/json',
463
+ ...options.headers
464
+ }
465
+ });
466
+ }
467
+ /**
468
+ * Read a Message
469
+ *
470
+ * Marks a message sent in the chat by another user as read by you.
471
+ * Trying to mark your own messages as read will fail.
472
+ * This does not affect the read status of the chat. Use <a href="https://developer.unipile.com/v2.0/reference/patch_v2-account-id-chats-chat-id">Update a Chat</a> to mark a chat as read.
473
+ */
474
+ readMessage(options) {
475
+ return (options.client ?? this.client).post({
476
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
477
+ url: '/v2/{account_id}/chats/{chat_id}/messages/{message_id}/read',
478
+ ...options
479
+ });
480
+ }
481
+ /**
482
+ * List all Chat Participants
483
+ *
484
+ * Returns a list of participants in the specified group chat. For 1to1 chats, the unique participant is given in the chat object.
485
+ * <br />
486
+ * Trying to retrieve the list of participants of a 1to1 chat will fail.
487
+ */
488
+ getParticipantsList(options) {
489
+ return (options.client ?? this.client).get({
490
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
491
+ url: '/v2/{account_id}/chats/{chat_id}/participants',
492
+ ...options
493
+ });
494
+ }
495
+ /**
496
+ * Add a Chat Participant
497
+ *
498
+ * Adds a new user as participant of chat if you have the rights to. Providers might requires an admin role or some permissions.
499
+ * <br />
500
+ * Trying to add a participant into a 1to1 chat can fail depending on the provider.
501
+ */
502
+ addParticipant(options) {
503
+ return (options.client ?? this.client).post({
504
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
505
+ url: '/v2/{account_id}/chats/{chat_id}/participants',
506
+ ...options,
507
+ headers: {
508
+ 'Content-Type': 'application/json',
509
+ ...options.headers
510
+ }
511
+ });
512
+ }
513
+ /**
514
+ * Remove a Chat Participant
515
+ *
516
+ * Removes a participant user from a chat if you have the rights to. Providers might requires an admin role or some permissions.
517
+ * <br />
518
+ * Trying to remove a participant from a 1to1 chat will fail.
519
+ */
520
+ removeParticipant(options) {
521
+ return (options.client ?? this.client).delete({
522
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
523
+ url: '/v2/{account_id}/chats/{chat_id}/participants/{user_id}',
524
+ ...options
525
+ });
526
+ }
527
+ /**
528
+ * Remove a Message Reaction
529
+ *
530
+ * Removes a reaction of the account's owner from a message. Trying to remove a reaction from another user will fail.
531
+ */
532
+ removeMessageReaction(options) {
533
+ return (options.client ?? this.client).delete({
534
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
535
+ url: '/v2/{account_id}/chats/{chat_id}/messages/{message_id}/reactions',
536
+ ...options,
537
+ headers: {
538
+ 'Content-Type': 'application/json',
539
+ ...options.headers
540
+ }
541
+ });
542
+ }
543
+ /**
544
+ * List all Message's Reactions
545
+ *
546
+ * Returns the list of reactions made to a message. Reaction counts are given with the Message object. This is useful to show a detailed list of all reactions and their author.
547
+ */
548
+ getMessageReactionsList(options) {
549
+ return (options.client ?? this.client).get({
550
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
551
+ url: '/v2/{account_id}/chats/{chat_id}/messages/{message_id}/reactions',
552
+ ...options
553
+ });
554
+ }
555
+ /**
556
+ * Add a Message Reaction
557
+ *
558
+ * Adds a reaction to a message. Some providers only allow the use of a limited list of emojis, trying to react with an unsupported emoji will fail.
559
+ */
560
+ addMessageReaction(options) {
561
+ return (options.client ?? this.client).post({
562
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
563
+ url: '/v2/{account_id}/chats/{chat_id}/messages/{message_id}/reactions',
564
+ ...options,
565
+ headers: {
566
+ 'Content-Type': 'application/json',
567
+ ...options.headers
568
+ }
569
+ });
570
+ }
571
+ /**
572
+ * Get a Message Attachment
573
+ *
574
+ * Download the attachment file of a message.
575
+ */
576
+ getAttachment(options) {
577
+ return (options.client ?? this.client).get({
578
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
579
+ url: '/v2/{account_id}/chats/{chat_id}/messages/{message_id}/attachments/{attachment_id}',
580
+ ...options
581
+ });
582
+ }
583
+ /**
584
+ * Set Presence
585
+ *
586
+ * Sets the presence of the user.
587
+ */
588
+ setPresence(options) {
589
+ return (options.client ?? this.client).post({
590
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
591
+ url: '/v2/{account_id}/presence',
592
+ ...options,
593
+ headers: {
594
+ 'Content-Type': 'application/json',
595
+ ...options.headers
596
+ }
597
+ });
598
+ }
599
+ /**
600
+ * Set Composing Status
601
+ *
602
+ * Sets the composing status of the user in a chat.
603
+ */
604
+ setComposingStatus(options) {
605
+ return (options.client ?? this.client).post({
606
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
607
+ url: '/v2/{account_id}/chats/{chat_id}/composing',
608
+ ...options
609
+ });
610
+ }
611
+ }
612
+ exports.UnipileMessaging = UnipileMessaging;
613
+ UnipileMessaging.__registry = new HeyApiRegistry();
614
+ class UnipileEmails extends HeyApiClient {
615
+ constructor(args) {
616
+ super(args);
617
+ UnipileEmails.__registry.set(this, args?.key);
618
+ }
619
+ /**
620
+ * List all Emails
621
+ *
622
+ * Returns a list of emails in the account mailbox. Emails are returned sorted by their `date`, with the most recent appearing first.
623
+ */
624
+ getEmailsList(options) {
625
+ return (options.client ?? this.client).get({
626
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
627
+ url: '/v2/{account_id}/emails',
628
+ ...options
629
+ });
630
+ }
631
+ /**
632
+ * List folder Emails
633
+ *
634
+ * Returns a list of emails in the specific folder of the account mailbox. Emails are returned sorted by their `date`, with the most recent appearing first.
635
+ */
636
+ getFolderEmailsList(options) {
637
+ return (options.client ?? this.client).get({
638
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
639
+ url: '/v2/{account_id}/folders/{folder_id}/emails',
640
+ ...options
641
+ });
642
+ }
643
+ /**
644
+ * Get a Thread
645
+ *
646
+ * Returns a list of emails belonging to the specific thread. Emails are returned sorted by their `date`, with the most recent appearing first.
647
+ */
648
+ getThread(options) {
649
+ return (options.client ?? this.client).get({
650
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
651
+ url: '/v2/{account_id}/threads/{thread_id}',
652
+ ...options
653
+ });
654
+ }
655
+ /**
656
+ * Trash an Email
657
+ *
658
+ * Moves the specified Email to the trash.
659
+ */
660
+ trashEmail(options) {
661
+ return (options.client ?? this.client).delete({
662
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
663
+ url: '/v2/{account_id}/emails/{email_id}',
664
+ ...options
665
+ });
666
+ }
667
+ /**
668
+ * Get an Email
669
+ *
670
+ * Retrieve the specified Email.
671
+ */
672
+ getEmail(options) {
673
+ return (options.client ?? this.client).get({
674
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
675
+ url: '/v2/{account_id}/emails/{email_id}',
676
+ ...options
677
+ });
678
+ }
679
+ /**
680
+ * Get an Email Attachment
681
+ *
682
+ * Download the attachment file of an Email.
683
+ */
684
+ getAttachment1(options) {
685
+ return (options.client ?? this.client).get({
686
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
687
+ url: '/v2/{account_id}/emails/{email_id}/attachments/{attachment_id}',
688
+ ...options
689
+ });
690
+ }
691
+ /**
692
+ * Modify an Email
693
+ *
694
+ * Modifies the folder(s) and/or provider-specific properties on the specified Email.
695
+ */
696
+ modifyEmail(options) {
697
+ return (options.client ?? this.client).post({
698
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
699
+ url: '/v2/{account_id}/emails/{email_id}/modify',
700
+ ...options,
701
+ headers: {
702
+ 'Content-Type': 'application/json',
703
+ ...options.headers
704
+ }
705
+ });
706
+ }
707
+ /**
708
+ * Unread an Email
709
+ *
710
+ * Mark the specified Email as unread.
711
+ */
712
+ unreadEmail(options) {
713
+ return (options.client ?? this.client).post({
714
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
715
+ url: '/v2/{account_id}/emails/{email_id}/unread',
716
+ ...options
717
+ });
718
+ }
719
+ /**
720
+ * Read an Email
721
+ *
722
+ * Mark the specified Email as read.
723
+ */
724
+ readEmail(options) {
725
+ return (options.client ?? this.client).post({
726
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
727
+ url: '/v2/{account_id}/emails/{email_id}/read',
728
+ ...options
729
+ });
730
+ }
731
+ /**
732
+ * Send an Email
733
+ *
734
+ * Sends an Email to the recipients in the `to`, `cc`, and `bcc`.
735
+ * <br/>
736
+ * Multipart supported, refer to <a href="https://developer.unipile.com/v2.0/reference/api-usage#sending-files">Sending Files</a>.
737
+ */
738
+ sendEmail(options) {
739
+ return (options.client ?? this.client).post({
740
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
741
+ url: '/v2/{account_id}/emails/send',
742
+ ...options,
743
+ headers: {
744
+ 'Content-Type': 'application/json',
745
+ ...options.headers
746
+ }
747
+ });
748
+ }
749
+ /**
750
+ * List all Drafts
751
+ *
752
+ * Returns a list of the account drafts. Drafts are returned sorted by their creation date, with the most recent appearing first.
753
+ */
754
+ getDraftsList(options) {
755
+ return (options.client ?? this.client).get({
756
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
757
+ url: '/v2/{account_id}/drafts',
758
+ ...options
759
+ });
760
+ }
761
+ /**
762
+ * Create a Draft
763
+ *
764
+ * Creates a new Draft in the draft folder of the provider. Use <a href="@todo">Send a Draft</a> to send the Email later.
765
+ * <br/>
766
+ * Multipart supported, refer to <a href="https://developer.unipile.com/v2.0/reference/api-usage#sending-files">Sending Files</a>.
767
+ */
768
+ createDraft(options) {
769
+ return (options.client ?? this.client).post({
770
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
771
+ url: '/v2/{account_id}/drafts',
772
+ ...options,
773
+ headers: {
774
+ 'Content-Type': 'application/json',
775
+ ...options.headers
776
+ }
777
+ });
778
+ }
779
+ /**
780
+ * Delete a Draft
781
+ *
782
+ * Permanently deletes the specified Draft.
783
+ */
784
+ deleteDraft(options) {
785
+ return (options.client ?? this.client).delete({
786
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
787
+ url: '/v2/{account_id}/drafts/{draft_id}',
788
+ ...options
789
+ });
790
+ }
791
+ /**
792
+ * Get a Draft
793
+ *
794
+ * Retrieve the specified Draft.
795
+ */
796
+ getDraft(options) {
797
+ return (options.client ?? this.client).get({
798
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
799
+ url: '/v2/{account_id}/drafts/{draft_id}',
800
+ ...options
801
+ });
802
+ }
803
+ /**
804
+ * Update a Draft
805
+ *
806
+ * Updates the specified Draft by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
807
+ * <br/>
808
+ * Multipart supported, refer to <a href="https://developer.unipile.com/v2.0/reference/api-usage#sending-files">Sending Files</a>.
809
+ */
810
+ updateDraft(options) {
811
+ return (options.client ?? this.client).patch({
812
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
813
+ url: '/v2/{account_id}/drafts/{draft_id}',
814
+ ...options,
815
+ headers: {
816
+ 'Content-Type': 'application/json',
817
+ ...options.headers
818
+ }
819
+ });
820
+ }
821
+ /**
822
+ * Send a Draft
823
+ *
824
+ * Sends the specified Draft to the recipients in the `to`, `cc`, and `bcc` fields of the draft.
825
+ */
826
+ sendDraft(options) {
827
+ return (options.client ?? this.client).post({
828
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
829
+ url: '/v2/{account_id}/drafts/{draft_id}/send',
830
+ ...options
831
+ });
832
+ }
833
+ /**
834
+ * List all Folders
835
+ *
836
+ * Returns a list of folders in the account mailbox.
837
+ */
838
+ getFoldersList(options) {
839
+ return (options.client ?? this.client).get({
840
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
841
+ url: '/v2/{account_id}/folders',
842
+ ...options
843
+ });
844
+ }
845
+ /**
846
+ * Create a Folder
847
+ *
848
+ * Creates a new Folder in the account mailbox.
849
+ */
850
+ createFolder(options) {
851
+ return (options.client ?? this.client).post({
852
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
853
+ url: '/v2/{account_id}/folders',
854
+ ...options,
855
+ headers: {
856
+ 'Content-Type': 'application/json',
857
+ ...options.headers
858
+ }
859
+ });
860
+ }
861
+ /**
862
+ * Delete a Folder
863
+ *
864
+ * Deletes the specified Folder
865
+ */
866
+ deleteFolder(options) {
867
+ return (options.client ?? this.client).delete({
868
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
869
+ url: '/v2/{account_id}/folders/{folder_id}',
870
+ ...options
871
+ });
872
+ }
873
+ /**
874
+ * Get a Folder
875
+ *
876
+ * Retrieves the specified Folder
877
+ */
878
+ getFolder(options) {
879
+ return (options.client ?? this.client).get({
880
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
881
+ url: '/v2/{account_id}/folders/{folder_id}',
882
+ ...options
883
+ });
884
+ }
885
+ /**
886
+ * Update a Folder
887
+ *
888
+ * Updates the specified Folder by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
889
+ */
890
+ updateFolder(options) {
891
+ return (options.client ?? this.client).patch({
892
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
893
+ url: '/v2/{account_id}/folders/{folder_id}',
894
+ ...options,
895
+ headers: {
896
+ 'Content-Type': 'application/json',
897
+ ...options.headers
898
+ }
899
+ });
900
+ }
901
+ /**
902
+ * List email contacts
903
+ *
904
+ * Returns a list of contacts from the email provider.
905
+ */
906
+ getEmailContactsList(options) {
907
+ return (options.client ?? this.client).get({
908
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
909
+ url: '/v2/{account_id}/contacts',
910
+ ...options
911
+ });
912
+ }
913
+ }
914
+ exports.UnipileEmails = UnipileEmails;
915
+ UnipileEmails.__registry = new HeyApiRegistry2();
916
+ class UnipileUsers extends HeyApiClient {
917
+ constructor(args) {
918
+ super(args);
919
+ UnipileUsers.__registry.set(this, args?.key);
920
+ }
921
+ /**
922
+ * Get a User Profile
923
+ *
924
+ * Retrieves the specified User profile. Use `me` as `user_id` to specify the owner of the connected account.
925
+ */
926
+ getUserProfile(options) {
927
+ return (options.client ?? this.client).get({
928
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
929
+ url: '/v2/{account_id}/users/{user_id}',
930
+ ...options
931
+ });
932
+ }
933
+ /**
934
+ * Update a User Profile
935
+ *
936
+ * Updates the specified User profile. Use `me` as `user_id` to update the account owner profile.
937
+ * <br/>
938
+ * Multipart supported, refer to <a href="https://developer.unipile.com/v2.0/reference/api-usage#sending-files">Sending Files</a>.
939
+ */
940
+ updateUserProfile(options) {
941
+ return (options.client ?? this.client).patch({
942
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
943
+ url: '/v2/{account_id}/users/{user_id}',
944
+ ...options,
945
+ headers: {
946
+ 'Content-Type': 'application/json',
947
+ ...options.headers
948
+ }
949
+ });
950
+ }
951
+ /**
952
+ * Report a Profile Visit
953
+ *
954
+ * Report to the provider that you have visited a given user profile. This can be used to simulate engagement and activity.
955
+ */
956
+ visitUserProfile(options) {
957
+ return (options.client ?? this.client).post({
958
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
959
+ url: '/v2/{account_id}/users/visit-profile',
960
+ ...options
961
+ });
962
+ }
963
+ /**
964
+ * List Relations of a User
965
+ *
966
+ * Returns a list of bi-directional relations for the specified User. Use `me` as `user_id` to specify the owner of the connected account.
967
+ */
968
+ getUserRelations(options) {
969
+ return (options.client ?? this.client).get({
970
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
971
+ url: '/v2/{account_id}/users/{user_id}/relations',
972
+ ...options
973
+ });
974
+ }
975
+ /**
976
+ * Delete a Relation
977
+ *
978
+ * Deletes a bi-directional relation with another user. For uni-directional relations, use `Unfollow User` instead.
979
+ */
980
+ deleteRelation(options) {
981
+ return (options.client ?? this.client).delete({
982
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
983
+ url: '/v2/{account_id}/users/me/relations/{user_id}',
984
+ ...options
985
+ });
986
+ }
987
+ /**
988
+ * List all pending Relation / Follow requests
989
+ *
990
+ * Returns a list of pending relation / follow requests that have been sent or received by the owner of the account.
991
+ */
992
+ getRelationRequestsList(options) {
993
+ return (options.client ?? this.client).get({
994
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
995
+ url: '/v2/{account_id}/users/me/relation-requests',
996
+ ...options
997
+ });
998
+ }
999
+ /**
1000
+ * Send a Relation request
1001
+ *
1002
+ * Sends a bi-directional relation request to a user. Trying to send a relation request to an existing relation will fail. For uni-directional relations, use `Follow User` instead.
1003
+ */
1004
+ createRelationRequest(options) {
1005
+ return (options.client ?? this.client).post({
1006
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1007
+ url: '/v2/{account_id}/users/me/relation-requests',
1008
+ ...options,
1009
+ headers: {
1010
+ 'Content-Type': 'application/json',
1011
+ ...options.headers
1012
+ }
1013
+ });
1014
+ }
1015
+ /**
1016
+ * Cancel or Refuse a Relation / Follow request
1017
+ *
1018
+ * Cancels the relation / follow request if sent by the owner of the account to another user. Refuses the relation / follow request if received by the owner of the account from another user.
1019
+ */
1020
+ cancelRelationRequest(options) {
1021
+ return (options.client ?? this.client).post({
1022
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1023
+ url: '/v2/{account_id}/users/me/relation-requests/{request_id}/cancel',
1024
+ ...options
1025
+ });
1026
+ }
1027
+ /**
1028
+ * Accept a Relation request
1029
+ *
1030
+ * Accepts a received relation request from another user. Trying to accept a sent relation request will fail.
1031
+ */
1032
+ acceptRelationRequest(options) {
1033
+ return (options.client ?? this.client).post({
1034
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1035
+ url: '/v2/{account_id}/users/me/relation-requests/{request_id}/accept',
1036
+ ...options
1037
+ });
1038
+ }
1039
+ /**
1040
+ * List Followers of a User
1041
+ *
1042
+ * Returns a list of followers of the specified User. Set `me` as `user_id` to specify the owner of the connected account.
1043
+ */
1044
+ listUserFollowers(options) {
1045
+ return (options.client ?? this.client).get({
1046
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1047
+ url: '/v2/{account_id}/users/{user_id}/followers',
1048
+ ...options
1049
+ });
1050
+ }
1051
+ /**
1052
+ * List Following of a User
1053
+ *
1054
+ * Returns a list of Users followed by the specified User. Set `me` as `user_id` to specify the owner of the connected account.
1055
+ */
1056
+ listUserFollowing(options) {
1057
+ return (options.client ?? this.client).get({
1058
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1059
+ url: '/v2/{account_id}/users/{user_id}/following',
1060
+ ...options
1061
+ });
1062
+ }
1063
+ /**
1064
+ * Follow a User
1065
+ *
1066
+ * Follows a user. Trying to follow an already followed User will fail. For bi-directional relations, use `Send Relation Request` instead. If the User has a private profile, this will create a Follow Request.
1067
+ */
1068
+ followUser(options) {
1069
+ return (options.client ?? this.client).post({
1070
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1071
+ url: '/v2/{account_id}/users/me/follow/{user_id}',
1072
+ ...options
1073
+ });
1074
+ }
1075
+ /**
1076
+ * Unfollow a User
1077
+ *
1078
+ * Unfollows a user. Trying to unfollow a not followed User will fail.
1079
+ */
1080
+ unfollowUser(options) {
1081
+ return (options.client ?? this.client).post({
1082
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1083
+ url: '/v2/{account_id}/users/me/unfollow/{user_id}',
1084
+ ...options
1085
+ });
1086
+ }
1087
+ /**
1088
+ * List all User's Posts
1089
+ *
1090
+ * Returns a list of posts created or shared by a user. Use `me` as `user_id` to specify the owner of the connected account.
1091
+ */
1092
+ getPostsList(options) {
1093
+ return (options.client ?? this.client).get({
1094
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1095
+ url: '/v2/{account_id}/users/{user_id}/posts',
1096
+ ...options
1097
+ });
1098
+ }
1099
+ }
1100
+ exports.UnipileUsers = UnipileUsers;
1101
+ UnipileUsers.__registry = new HeyApiRegistry3();
1102
+ class UnipilePosts extends HeyApiClient {
1103
+ constructor(args) {
1104
+ super(args);
1105
+ UnipilePosts.__registry.set(this, args?.key);
1106
+ }
1107
+ /**
1108
+ * List all User's Posts
1109
+ *
1110
+ * Returns a list of posts created or shared by a user. Use `me` as `user_id` to specify the owner of the connected account.
1111
+ */
1112
+ getPostsList(options) {
1113
+ return (options.client ?? this.client).get({
1114
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1115
+ url: '/v2/{account_id}/users/{user_id}/posts',
1116
+ ...options
1117
+ });
1118
+ }
1119
+ /**
1120
+ * Delete a Post
1121
+ *
1122
+ * Deletes a post created by the owner of the account. Trying to delete a post created by another user will fail.
1123
+ */
1124
+ deletePost(options) {
1125
+ return (options.client ?? this.client).delete({
1126
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1127
+ url: '/v2/{account_id}/posts/{post_id}',
1128
+ ...options
1129
+ });
1130
+ }
1131
+ /**
1132
+ * Get a Post
1133
+ *
1134
+ * Retrieves the specified post.
1135
+ */
1136
+ getPost(options) {
1137
+ return (options.client ?? this.client).get({
1138
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1139
+ url: '/v2/{account_id}/posts/{post_id}',
1140
+ ...options
1141
+ });
1142
+ }
1143
+ /**
1144
+ * Update a Post
1145
+ *
1146
+ * Updates an existing post.
1147
+ */
1148
+ updatePost(options) {
1149
+ return (options.client ?? this.client).patch({
1150
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1151
+ url: '/v2/{account_id}/posts/{post_id}',
1152
+ ...options,
1153
+ headers: {
1154
+ 'Content-Type': 'application/json',
1155
+ ...options.headers
1156
+ }
1157
+ });
1158
+ }
1159
+ /**
1160
+ * Create a Post
1161
+ *
1162
+ * Creates a new post.
1163
+ * <br/>
1164
+ * Multipart supported, refer to <a href="https://developer.unipile.com/v2.0/reference/api-usage#sending-files">Sending Files</a>.
1165
+ */
1166
+ createPost(options) {
1167
+ return (options.client ?? this.client).post({
1168
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1169
+ url: '/v2/{account_id}/posts',
1170
+ ...options,
1171
+ headers: {
1172
+ 'Content-Type': 'application/json',
1173
+ ...options.headers
1174
+ }
1175
+ });
1176
+ }
1177
+ /**
1178
+ * Remove Reaction from a Post
1179
+ *
1180
+ * Removes a reaction from a post.
1181
+ */
1182
+ removePostReaction(options) {
1183
+ return (options.client ?? this.client).delete({
1184
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1185
+ url: '/v2/{account_id}/posts/{post_id}/reactions',
1186
+ ...options,
1187
+ headers: {
1188
+ 'Content-Type': 'application/json',
1189
+ ...options.headers
1190
+ }
1191
+ });
1192
+ }
1193
+ /**
1194
+ * List all Post's Reactions
1195
+ *
1196
+ * Returns the list of reactions made to a post. Reaction counts are given with the Post object. This is useful to show a detailed list of all reactions and their author. LIMITATIONS: On Instagram, the list is always limited to a maximum of 100 reactions.
1197
+ */
1198
+ getPostReactionsList(options) {
1199
+ return (options.client ?? this.client).get({
1200
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1201
+ url: '/v2/{account_id}/posts/{post_id}/reactions',
1202
+ ...options
1203
+ });
1204
+ }
1205
+ /**
1206
+ * Add Reaction to a Post
1207
+ *
1208
+ * Adds a reaction to a post.
1209
+ */
1210
+ addPostReaction(options) {
1211
+ return (options.client ?? this.client).post({
1212
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1213
+ url: '/v2/{account_id}/posts/{post_id}/reactions',
1214
+ ...options,
1215
+ headers: {
1216
+ 'Content-Type': 'application/json',
1217
+ ...options.headers
1218
+ }
1219
+ });
1220
+ }
1221
+ /**
1222
+ * List all Post's Comments
1223
+ *
1224
+ * Returns a list of post comments. The comments are returned sorted by their creation date, with the most recent appearing first.
1225
+ */
1226
+ getPostCommentsList(options) {
1227
+ return (options.client ?? this.client).get({
1228
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1229
+ url: '/v2/{account_id}/posts/{post_id}/comments',
1230
+ ...options
1231
+ });
1232
+ }
1233
+ /**
1234
+ * Add Comment to a Post
1235
+ *
1236
+ * Adds a comment to a post.
1237
+ * <br/>
1238
+ * Multipart supported, refer to <a href="https://developer.unipile.com/v2.0/reference/api-usage#sending-files">Sending Files</a>.
1239
+ */
1240
+ addPostComment(options) {
1241
+ return (options.client ?? this.client).post({
1242
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1243
+ url: '/v2/{account_id}/posts/{post_id}/comments',
1244
+ ...options,
1245
+ headers: {
1246
+ 'Content-Type': 'application/json',
1247
+ ...options.headers
1248
+ }
1249
+ });
1250
+ }
1251
+ /**
1252
+ * Delete Comment from a Post
1253
+ *
1254
+ * Deletes a comment of the account's owner from a post. Trying to delete a comment from another user will fail.
1255
+ */
1256
+ deletePostComment(options) {
1257
+ return (options.client ?? this.client).delete({
1258
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1259
+ url: '/v2/{account_id}/posts/{post_id}/comments/{comment_id}',
1260
+ ...options
1261
+ });
1262
+ }
1263
+ /**
1264
+ * Update a Comment
1265
+ *
1266
+ * Updates an existing comment.
1267
+ */
1268
+ updatePostComment(options) {
1269
+ return (options.client ?? this.client).patch({
1270
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1271
+ url: '/v2/{account_id}/posts/{post_id}/comments/{comment_id}',
1272
+ ...options,
1273
+ headers: {
1274
+ 'Content-Type': 'application/json',
1275
+ ...options.headers
1276
+ }
1277
+ });
1278
+ }
1279
+ /**
1280
+ * Reply to a Comment
1281
+ *
1282
+ * Replies to a particular comment.
1283
+ * <br/>
1284
+ * Multipart supported, refer to <a href="https://developer.unipile.com/v2.0/reference/api-usage#sending-files">Sending Files</a>.
1285
+ */
1286
+ replyToComment(options) {
1287
+ return (options.client ?? this.client).post({
1288
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1289
+ url: '/v2/{account_id}/posts/{post_id}/comments/{comment_id}',
1290
+ ...options,
1291
+ headers: {
1292
+ 'Content-Type': 'application/json',
1293
+ ...options.headers
1294
+ }
1295
+ });
1296
+ }
1297
+ /**
1298
+ * List all Comment's Replies
1299
+ *
1300
+ * Returns the list of replies to a comment. The replies are returned sorted by their creation date, with the most recent appearing first.
1301
+ */
1302
+ getPostCommentRepliesList(options) {
1303
+ return (options.client ?? this.client).get({
1304
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1305
+ url: '/v2/{account_id}/posts/{post_id}/comments/{comment_id}/replies',
1306
+ ...options
1307
+ });
1308
+ }
1309
+ /**
1310
+ * Remove Reaction from a Comment
1311
+ *
1312
+ * Removes a reaction of the account's owner from a comment. Trying to remove a reaction from another user will fail.
1313
+ */
1314
+ removePostCommentReaction(options) {
1315
+ return (options.client ?? this.client).delete({
1316
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1317
+ url: '/v2/{account_id}/posts/{post_id}/comments/{comment_id}/reactions',
1318
+ ...options,
1319
+ headers: {
1320
+ 'Content-Type': 'application/json',
1321
+ ...options.headers
1322
+ }
1323
+ });
1324
+ }
1325
+ /**
1326
+ * List all Comment's Reactions
1327
+ *
1328
+ * Returns the list of reactions made to a comment. Reaction counts are given with the Comment object. This is useful to show a detailed list of all reactions and their author.
1329
+ */
1330
+ getPostCommentReactionsList(options) {
1331
+ return (options.client ?? this.client).get({
1332
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1333
+ url: '/v2/{account_id}/posts/{post_id}/comments/{comment_id}/reactions',
1334
+ ...options
1335
+ });
1336
+ }
1337
+ /**
1338
+ * Add Reaction to a Comment
1339
+ *
1340
+ * Adds a reaction to a post.
1341
+ */
1342
+ addPostCommentReaction(options) {
1343
+ return (options.client ?? this.client).post({
1344
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1345
+ url: '/v2/{account_id}/posts/{post_id}/comments/{comment_id}/reactions',
1346
+ ...options,
1347
+ headers: {
1348
+ 'Content-Type': 'application/json',
1349
+ ...options.headers
1350
+ }
1351
+ });
1352
+ }
1353
+ /**
1354
+ * List all User Comments
1355
+ *
1356
+ * Returns the list of comments made by a user to posts. Use `me` as `user_id` to specify the owner of the connected account.
1357
+ */
1358
+ getUserCommentsList(options) {
1359
+ return (options.client ?? this.client).get({
1360
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1361
+ url: '/v2/{account_id}/users/{user_id}/comments',
1362
+ ...options
1363
+ });
1364
+ }
1365
+ /**
1366
+ * List all User Reactions
1367
+ *
1368
+ * Returns the list of reactions made by a user to posts. Use `me` as `user_id` to specify the owner of the connected account.
1369
+ */
1370
+ getUserReactionsList(options) {
1371
+ return (options.client ?? this.client).get({
1372
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1373
+ url: '/v2/{account_id}/users/{user_id}/reactions',
1374
+ ...options
1375
+ });
1376
+ }
1377
+ }
1378
+ exports.UnipilePosts = UnipilePosts;
1379
+ UnipilePosts.__registry = new HeyApiRegistry4();
1380
+ class UnipileCalendar extends HeyApiClient {
1381
+ constructor(args) {
1382
+ super(args);
1383
+ UnipileCalendar.__registry.set(this, args?.key);
1384
+ }
1385
+ /**
1386
+ * List all Calendars
1387
+ *
1388
+ * Returns a list of calendars.
1389
+ */
1390
+ getCalendarsList(options) {
1391
+ return (options.client ?? this.client).get({
1392
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1393
+ url: '/v2/{account_id}/calendars',
1394
+ ...options
1395
+ });
1396
+ }
1397
+ /**
1398
+ * Create a Calendar
1399
+ *
1400
+ * Create a new calendar.
1401
+ */
1402
+ createCalendar(options) {
1403
+ return (options.client ?? this.client).post({
1404
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1405
+ url: '/v2/{account_id}/calendars',
1406
+ ...options,
1407
+ headers: {
1408
+ 'Content-Type': 'application/json',
1409
+ ...options.headers
1410
+ }
1411
+ });
1412
+ }
1413
+ /**
1414
+ * Delete a Calendar
1415
+ *
1416
+ * Delete the specified calendar.
1417
+ */
1418
+ deleteCalendar(options) {
1419
+ return (options.client ?? this.client).delete({
1420
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1421
+ url: '/v2/{account_id}/calendars/{calendar_id}',
1422
+ ...options
1423
+ });
1424
+ }
1425
+ /**
1426
+ * Get a Calendar
1427
+ *
1428
+ * Retrieves the specified Calendar.
1429
+ */
1430
+ getCalendar(options) {
1431
+ return (options.client ?? this.client).get({
1432
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1433
+ url: '/v2/{account_id}/calendars/{calendar_id}',
1434
+ ...options
1435
+ });
1436
+ }
1437
+ /**
1438
+ * Update a Calendar
1439
+ *
1440
+ * Updates the specified calendar by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1441
+ */
1442
+ updateCalendar(options) {
1443
+ return (options.client ?? this.client).patch({
1444
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1445
+ url: '/v2/{account_id}/calendars/{calendar_id}',
1446
+ ...options,
1447
+ headers: {
1448
+ 'Content-Type': 'application/json',
1449
+ ...options.headers
1450
+ }
1451
+ });
1452
+ }
1453
+ /**
1454
+ * List all calendar events
1455
+ *
1456
+ * Returns a list of calendar events.
1457
+ */
1458
+ getCalendarEventList(options) {
1459
+ return (options.client ?? this.client).get({
1460
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1461
+ url: '/v2/{account_id}/calendars/{calendar_id}/events',
1462
+ ...options
1463
+ });
1464
+ }
1465
+ /**
1466
+ * Create a calendar event
1467
+ *
1468
+ * Create a brand new calendar event.
1469
+ */
1470
+ createCalendarEvent(options) {
1471
+ return (options.client ?? this.client).post({
1472
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1473
+ url: '/v2/{account_id}/calendars/{calendar_id}/events',
1474
+ ...options,
1475
+ headers: {
1476
+ 'Content-Type': 'application/json',
1477
+ ...options.headers
1478
+ }
1479
+ });
1480
+ }
1481
+ /**
1482
+ * Delete a Calendar event
1483
+ *
1484
+ * Delete the specified calendar event.
1485
+ */
1486
+ deleteCalendarEvent(options) {
1487
+ return (options.client ?? this.client).delete({
1488
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1489
+ url: '/v2/{account_id}/calendars/{calendar_id}/events/{event_id}',
1490
+ ...options
1491
+ });
1492
+ }
1493
+ /**
1494
+ * Get a calendar event
1495
+ *
1496
+ * Retrieves a calendar event object.
1497
+ */
1498
+ getCalendarEvent(options) {
1499
+ return (options.client ?? this.client).get({
1500
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1501
+ url: '/v2/{account_id}/calendars/{calendar_id}/events/{event_id}',
1502
+ ...options
1503
+ });
1504
+ }
1505
+ /**
1506
+ * Update a calendar event
1507
+ *
1508
+ * Updates the specified calendar by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1509
+ */
1510
+ updateCalendarEvent(options) {
1511
+ return (options.client ?? this.client).patch({
1512
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1513
+ url: '/v2/{account_id}/calendars/{calendar_id}/events/{event_id}',
1514
+ ...options,
1515
+ headers: {
1516
+ 'Content-Type': 'application/json',
1517
+ ...options.headers
1518
+ }
1519
+ });
1520
+ }
1521
+ }
1522
+ exports.UnipileCalendar = UnipileCalendar;
1523
+ UnipileCalendar.__registry = new HeyApiRegistry5();
1524
+ class UnipileLinkedIn extends HeyApiClient {
1525
+ constructor(args) {
1526
+ super(args);
1527
+ UnipileLinkedIn.__registry.set(this, args?.key);
1528
+ }
1529
+ /**
1530
+ * Perform a Request to any LinkedIn API Endpoint
1531
+ *
1532
+ * Allows advanced users to implement any LinkedIn feature that is not yet supported by our platform.
1533
+ */
1534
+ proxyRequest(options) {
1535
+ return (options.client ?? this.client).post({
1536
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1537
+ url: '/v2/{account_id}/linkedin/',
1538
+ ...options,
1539
+ headers: {
1540
+ 'Content-Type': 'application/json',
1541
+ ...options.headers
1542
+ }
1543
+ });
1544
+ }
1545
+ /**
1546
+ * Get InMail Credits
1547
+ *
1548
+ * Retrieves InMail credits by service or for all subscribed services.
1549
+ */
1550
+ getInmailCredits(options) {
1551
+ return (options.client ?? this.client).get({
1552
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1553
+ url: '/v2/{account_id}/linkedin/inmail-credits',
1554
+ ...options
1555
+ });
1556
+ }
1557
+ /**
1558
+ * List Available Contracts
1559
+ *
1560
+ * Returns a list of Recruiter/Sales Navigator contracts associated with your account.
1561
+ */
1562
+ getAvailableContracts(options) {
1563
+ return (options.client ?? this.client).get({
1564
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1565
+ url: '/v2/{account_id}/linkedin/contracts',
1566
+ ...options
1567
+ });
1568
+ }
1569
+ /**
1570
+ * Select a Contract
1571
+ *
1572
+ * Activates a given Recruiter/Sales Navigator contract on your account.
1573
+ */
1574
+ selectContract(options) {
1575
+ return (options.client ?? this.client).post({
1576
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1577
+ url: '/v2/{account_id}/linkedin/contracts/{contract_id}/select',
1578
+ ...options
1579
+ });
1580
+ }
1581
+ /**
1582
+ * Get a Company Profile
1583
+ *
1584
+ * Retrieves the specified company profile.
1585
+ */
1586
+ getClassicCompanyProfile(options) {
1587
+ return (options.client ?? this.client).get({
1588
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1589
+ url: '/v2/{account_id}/linkedin/company/{company_id}',
1590
+ ...options
1591
+ });
1592
+ }
1593
+ /**
1594
+ * Verify Company Member Identity
1595
+ *
1596
+ * Verifies member identity by submitting an email address.
1597
+ */
1598
+ verifyClassicCompanyMemberIdentity(options) {
1599
+ return (options.client ?? this.client).post({
1600
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1601
+ url: '/v2/{account_id}/linkedin/company/{company_id}/member/verify-email',
1602
+ ...options,
1603
+ headers: {
1604
+ 'Content-Type': 'application/json',
1605
+ ...options.headers
1606
+ }
1607
+ });
1608
+ }
1609
+ /**
1610
+ * Submit Otp Verification Code
1611
+ *
1612
+ * Completes the process of member identity verification.
1613
+ */
1614
+ submitClassicCompanyOtpCode(options) {
1615
+ return (options.client ?? this.client).post({
1616
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1617
+ url: '/v2/{account_id}/linkedin/company/{company_id}/member/submit-otp',
1618
+ ...options,
1619
+ headers: {
1620
+ 'Content-Type': 'application/json',
1621
+ ...options.headers
1622
+ }
1623
+ });
1624
+ }
1625
+ /**
1626
+ * Endorse a Member's Skill
1627
+ *
1628
+ * Validates a given skill for one of your relations.
1629
+ */
1630
+ endorseClassicMemberSkill(options) {
1631
+ return (options.client ?? this.client).post({
1632
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1633
+ url: '/v2/{account_id}/linkedin/member/{member_id}/endorse-skill',
1634
+ ...options,
1635
+ headers: {
1636
+ 'Content-Type': 'application/json',
1637
+ ...options.headers
1638
+ }
1639
+ });
1640
+ }
1641
+ /**
1642
+ * List Search Parameters
1643
+ *
1644
+ * Returns a list of parameters to be used in the search route.
1645
+ */
1646
+ getClassicSearchParameters(options) {
1647
+ return (options.client ?? this.client).get({
1648
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1649
+ url: '/v2/{account_id}/linkedin/search/parameters',
1650
+ ...options
1651
+ });
1652
+ }
1653
+ /**
1654
+ * Perform Classic Search from URL
1655
+ *
1656
+ * Returns a list of results from a LinkedIn Classic search URL.
1657
+ */
1658
+ performClassicSearchFromUrl(options) {
1659
+ return (options.client ?? this.client).post({
1660
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1661
+ url: '/v2/{account_id}/linkedin/search',
1662
+ ...options,
1663
+ headers: {
1664
+ 'Content-Type': 'application/json',
1665
+ ...options.headers
1666
+ }
1667
+ });
1668
+ }
1669
+ /**
1670
+ * Perform People Search
1671
+ *
1672
+ * Returns a list of people from search results.
1673
+ */
1674
+ performClassicPeopleSearch(options) {
1675
+ return (options.client ?? this.client).post({
1676
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1677
+ url: '/v2/{account_id}/linkedin/search/people',
1678
+ ...options,
1679
+ headers: {
1680
+ 'Content-Type': 'application/json',
1681
+ ...options.headers
1682
+ }
1683
+ });
1684
+ }
1685
+ /**
1686
+ * Perform Companies Search
1687
+ *
1688
+ * Returns a list of companies from search results.
1689
+ */
1690
+ performClassicCompaniesSearch(options) {
1691
+ return (options.client ?? this.client).post({
1692
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1693
+ url: '/v2/{account_id}/linkedin/search/companies',
1694
+ ...options,
1695
+ headers: {
1696
+ 'Content-Type': 'application/json',
1697
+ ...options.headers
1698
+ }
1699
+ });
1700
+ }
1701
+ /**
1702
+ * Perform Posts Search
1703
+ *
1704
+ * Returns a list of posts from search results.
1705
+ */
1706
+ performClassicPostsSearch(options) {
1707
+ return (options.client ?? this.client).post({
1708
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1709
+ url: '/v2/{account_id}/linkedin/search/posts',
1710
+ ...options,
1711
+ headers: {
1712
+ 'Content-Type': 'application/json',
1713
+ ...options.headers
1714
+ }
1715
+ });
1716
+ }
1717
+ /**
1718
+ * Perform Jobs Search
1719
+ *
1720
+ * Returns a list of job postings from search results.
1721
+ */
1722
+ performClassicJobsSearch(options) {
1723
+ return (options.client ?? this.client).post({
1724
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1725
+ url: '/v2/{account_id}/linkedin/search/jobs',
1726
+ ...options,
1727
+ headers: {
1728
+ 'Content-Type': 'application/json',
1729
+ ...options.headers
1730
+ }
1731
+ });
1732
+ }
1733
+ /**
1734
+ * List User Job Postings
1735
+ *
1736
+ * Returns a list of job postings created by the current user.
1737
+ */
1738
+ listClassicUserJobPostings(options) {
1739
+ return (options.client ?? this.client).get({
1740
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1741
+ url: '/v2/{account_id}/linkedin/jobs',
1742
+ ...options
1743
+ });
1744
+ }
1745
+ /**
1746
+ * Create a Job Posting Draft
1747
+ *
1748
+ * Creates a new job posting as draft.
1749
+ * <br/>
1750
+ * Use <a href="https://developer.unipile.com/v2.0/reference/post_v2-account-id-linkedin-jobs-job-id-publish">Publish a Job Posting Draft</a> to publish the job once you are ready.
1751
+ *
1752
+ */
1753
+ createClassicJobPostingDraft(options) {
1754
+ return (options.client ?? this.client).post({
1755
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1756
+ url: '/v2/{account_id}/linkedin/jobs',
1757
+ ...options,
1758
+ headers: {
1759
+ 'Content-Type': 'application/json',
1760
+ ...options.headers
1761
+ }
1762
+ });
1763
+ }
1764
+ /**
1765
+ * Get a Job Posting
1766
+ *
1767
+ * Retrieves a job posting by its ID.
1768
+ */
1769
+ getClassicJobPosting(options) {
1770
+ return (options.client ?? this.client).get({
1771
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1772
+ url: '/v2/{account_id}/linkedin/jobs/{job_id}',
1773
+ ...options
1774
+ });
1775
+ }
1776
+ /**
1777
+ * Edit an existing Job Posting
1778
+ *
1779
+ * Edits a job posting created by the current user.
1780
+ */
1781
+ editClassicJobPosting(options) {
1782
+ return (options.client ?? this.client).patch({
1783
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1784
+ url: '/v2/{account_id}/linkedin/jobs/{job_id}',
1785
+ ...options,
1786
+ headers: {
1787
+ 'Content-Type': 'application/json',
1788
+ ...options.headers
1789
+ }
1790
+ });
1791
+ }
1792
+ /**
1793
+ * Get the Budget for a Job Posting
1794
+ *
1795
+ * Returns available budget ranges, recommended budgets, and estimated impact.
1796
+ */
1797
+ getClassicJobPostingBudget(options) {
1798
+ return (options.client ?? this.client).get({
1799
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1800
+ url: '/v2/{account_id}/linkedin/jobs/{job_id}/budget',
1801
+ ...options
1802
+ });
1803
+ }
1804
+ /**
1805
+ * Publish a Job Posting
1806
+ *
1807
+ * Publishes a job posting with specific budget options.
1808
+ */
1809
+ publishClassicJobPosting(options) {
1810
+ return (options.client ?? this.client).post({
1811
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1812
+ url: '/v2/{account_id}/linkedin/jobs/{job_id}/publish',
1813
+ ...options,
1814
+ headers: {
1815
+ 'Content-Type': 'application/json',
1816
+ ...options.headers
1817
+ }
1818
+ });
1819
+ }
1820
+ /**
1821
+ * Close a Job Posting
1822
+ *
1823
+ * Closes a job posting so applications cannot be submitted anymore.
1824
+ */
1825
+ closeClassicJobPosting(options) {
1826
+ return (options.client ?? this.client).post({
1827
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1828
+ url: '/v2/{account_id}/linkedin/jobs/{job_id}/close',
1829
+ ...options
1830
+ });
1831
+ }
1832
+ /**
1833
+ * List Job Posting Applicants
1834
+ *
1835
+ * Returns a list of the applicants to a job posting.
1836
+ */
1837
+ getClassicApplicants(options) {
1838
+ return (options.client ?? this.client).post({
1839
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1840
+ url: '/v2/{account_id}/linkedin/jobs/{job_id}/applicants',
1841
+ ...options,
1842
+ headers: {
1843
+ 'Content-Type': 'application/json',
1844
+ ...options.headers
1845
+ }
1846
+ });
1847
+ }
1848
+ /**
1849
+ * Get an Applicant
1850
+ *
1851
+ * Retrieves an applicant by ID.
1852
+ */
1853
+ getClassicApplicantById(options) {
1854
+ return (options.client ?? this.client).get({
1855
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1856
+ url: '/v2/{account_id}/linkedin/jobs/{job_id}/applicants/{applicant_id}',
1857
+ ...options
1858
+ });
1859
+ }
1860
+ /**
1861
+ * Get an Applicant's Resume
1862
+ *
1863
+ * Downloads the resume of a given applicant.
1864
+ */
1865
+ getClassicApplicantResume(options) {
1866
+ return (options.client ?? this.client).get({
1867
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1868
+ url: '/v2/{account_id}/linkedin/jobs/{job_id}/applicants/{applicant_id}/resume',
1869
+ ...options
1870
+ });
1871
+ }
1872
+ /**
1873
+ * List Projects
1874
+ *
1875
+ * Returns a list of hiring projects created in the current contract scope.
1876
+ */
1877
+ getRecruiterHiringProjectList(options) {
1878
+ return (options.client ?? this.client).get({
1879
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1880
+ url: '/v2/{account_id}/linkedin/recruiter/projects',
1881
+ ...options
1882
+ });
1883
+ }
1884
+ /**
1885
+ * Create a New Project
1886
+ *
1887
+ * Creates a new project in the current contract.
1888
+ */
1889
+ createRecruiterHiringProject(options) {
1890
+ return (options.client ?? this.client).post({
1891
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1892
+ url: '/v2/{account_id}/linkedin/recruiter/projects',
1893
+ ...options,
1894
+ headers: {
1895
+ 'Content-Type': 'application/json',
1896
+ ...options.headers
1897
+ }
1898
+ });
1899
+ }
1900
+ /**
1901
+ * Get a Project
1902
+ *
1903
+ * Retrieves the specified hiring project.
1904
+ */
1905
+ getRecruiterHiringProject(options) {
1906
+ return (options.client ?? this.client).get({
1907
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1908
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}',
1909
+ ...options
1910
+ });
1911
+ }
1912
+ /**
1913
+ * Edit a Project
1914
+ *
1915
+ * Edits the specified hiring project.
1916
+ */
1917
+ editRecruiterHiringProject(options) {
1918
+ return (options.client ?? this.client).patch({
1919
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1920
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}',
1921
+ ...options,
1922
+ headers: {
1923
+ 'Content-Type': 'application/json',
1924
+ ...options.headers
1925
+ }
1926
+ });
1927
+ }
1928
+ /**
1929
+ * List Job Posting Applicants
1930
+ *
1931
+ * Returns a list of applicants from the talent pool of a project.
1932
+ */
1933
+ getRecruiterTalentPoolApplicants(options) {
1934
+ return (options.client ?? this.client).post({
1935
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1936
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/talent-pool/applicants',
1937
+ ...options,
1938
+ headers: {
1939
+ 'Content-Type': 'application/json',
1940
+ ...options.headers
1941
+ }
1942
+ });
1943
+ }
1944
+ /**
1945
+ * Get an Applicant
1946
+ *
1947
+ * Retrieves an applicant by ID.
1948
+ */
1949
+ getRecruiterApplicantById(options) {
1950
+ return (options.client ?? this.client).get({
1951
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1952
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/talent-pool/applicants/{applicant_id}',
1953
+ ...options
1954
+ });
1955
+ }
1956
+ /**
1957
+ * Get an Applicant's Resume
1958
+ *
1959
+ * Downloads the resume of a given applicant.
1960
+ */
1961
+ getRecruiterApplicantResume(options) {
1962
+ return (options.client ?? this.client).get({
1963
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1964
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/talent-pool/applicants/{applicant_id}/resume',
1965
+ ...options
1966
+ });
1967
+ }
1968
+ /**
1969
+ * List Pipeline Candidates
1970
+ *
1971
+ * Returns a list of candidates from the pipeline of a project.
1972
+ */
1973
+ getRecruiterPipelineCandidates(options) {
1974
+ return (options.client ?? this.client).post({
1975
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1976
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/pipeline',
1977
+ ...options,
1978
+ headers: {
1979
+ 'Content-Type': 'application/json',
1980
+ ...options.headers
1981
+ }
1982
+ });
1983
+ }
1984
+ /**
1985
+ * Save a Candidate
1986
+ *
1987
+ * Saves a candidate to the pipeline of a project
1988
+ */
1989
+ saveRecruiterCandidateToPipeline(options) {
1990
+ return (options.client ?? this.client).post({
1991
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
1992
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/pipeline/candidate/save',
1993
+ ...options,
1994
+ headers: {
1995
+ 'Content-Type': 'application/json',
1996
+ ...options.headers
1997
+ }
1998
+ });
1999
+ }
2000
+ /**
2001
+ * Perform People Search From Talent Pool
2002
+ *
2003
+ * Returns a list of people from search results.
2004
+ */
2005
+ performRecruiterPeopleSearchFromTalentPool(options) {
2006
+ return (options.client ?? this.client).post({
2007
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2008
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/talent-pool/search',
2009
+ ...options,
2010
+ headers: {
2011
+ 'Content-Type': 'application/json',
2012
+ ...options.headers
2013
+ }
2014
+ });
2015
+ }
2016
+ /**
2017
+ * Get a Job Posting by Project
2018
+ *
2019
+ * Retrieves a job posting by project.
2020
+ */
2021
+ getRecruiterJobPostingByProjectId(options) {
2022
+ return (options.client ?? this.client).get({
2023
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2024
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/jobs',
2025
+ ...options
2026
+ });
2027
+ }
2028
+ /**
2029
+ * Create a Job Posting Draft in an Existing Project
2030
+ *
2031
+ * Creates a new job posting as draft in a new project.
2032
+ */
2033
+ createRecruiterJobPostingDraftInExistingProject(options) {
2034
+ return (options.client ?? this.client).post({
2035
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2036
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/jobs',
2037
+ ...options,
2038
+ headers: {
2039
+ 'Content-Type': 'application/json',
2040
+ ...options.headers
2041
+ }
2042
+ });
2043
+ }
2044
+ /**
2045
+ * Get the Budget for a Job Posting
2046
+ *
2047
+ * Returns available budget ranges, recommended budgets, and estimated impact.
2048
+ */
2049
+ getRecruiterJobPostingBudget(options) {
2050
+ return (options.client ?? this.client).get({
2051
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2052
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/jobs/{job_id}/budget',
2053
+ ...options
2054
+ });
2055
+ }
2056
+ /**
2057
+ * List Job Postings
2058
+ *
2059
+ * Returns a list of job postings created by the current user or related job posters.
2060
+ */
2061
+ getRecruiterJobPostingList(options) {
2062
+ return (options.client ?? this.client).get({
2063
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2064
+ url: '/v2/{account_id}/linkedin/recruiter/jobs',
2065
+ ...options
2066
+ });
2067
+ }
2068
+ /**
2069
+ * Create a Job Posting Draft in a New Project
2070
+ *
2071
+ * Creates a new job posting as draft in a new project.
2072
+ * <br/>
2073
+ * Use <a href="https://developer.unipile.com/v2.0/reference/post_v2-account-id-linkedin-recruiter-projects-project-id-jobs-job-id-publish">Publish a Job Posting Draft</a> to publish the job once you are ready.
2074
+ *
2075
+ */
2076
+ createRecruiterJobPostingDraftInNewProject(options) {
2077
+ return (options.client ?? this.client).post({
2078
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2079
+ url: '/v2/{account_id}/linkedin/recruiter/jobs',
2080
+ ...options,
2081
+ headers: {
2082
+ 'Content-Type': 'application/json',
2083
+ ...options.headers
2084
+ }
2085
+ });
2086
+ }
2087
+ /**
2088
+ * Edit an Existing Job Posting
2089
+ *
2090
+ * Edits an existing job posting from a project.
2091
+ */
2092
+ editRecruiterJobPosting(options) {
2093
+ return (options.client ?? this.client).patch({
2094
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2095
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/jobs/{job_id}',
2096
+ ...options,
2097
+ headers: {
2098
+ 'Content-Type': 'application/json',
2099
+ ...options.headers
2100
+ }
2101
+ });
2102
+ }
2103
+ /**
2104
+ * Publish a Job Posting
2105
+ *
2106
+ * Publishes a job posting with specific budget options.
2107
+ */
2108
+ publishRecruiterJobPosting(options) {
2109
+ return (options.client ?? this.client).post({
2110
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2111
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/jobs/{job_id}/publish',
2112
+ ...options,
2113
+ headers: {
2114
+ 'Content-Type': 'application/json',
2115
+ ...options.headers
2116
+ }
2117
+ });
2118
+ }
2119
+ /**
2120
+ * Close a Job Posting
2121
+ *
2122
+ * Closes a job posting so applications cannot be submitted anymore.
2123
+ */
2124
+ closeRecruiterJobPosting(options) {
2125
+ return (options.client ?? this.client).post({
2126
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2127
+ url: '/v2/{account_id}/linkedin/recruiter/projects/{project_id}/jobs/{job_id}/close',
2128
+ ...options
2129
+ });
2130
+ }
2131
+ /**
2132
+ * Get a Job Posting
2133
+ *
2134
+ * Retrieves a job posting by its ID.
2135
+ */
2136
+ getRecruiterJobPostingById(options) {
2137
+ return (options.client ?? this.client).get({
2138
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2139
+ url: '/v2/{account_id}/linkedin/recruiter/jobs/{job_id}',
2140
+ ...options
2141
+ });
2142
+ }
2143
+ /**
2144
+ * Perform Recruiter Search from URL
2145
+ *
2146
+ * Returns a list of results from a LinkedIn Recruiter search URL.
2147
+ */
2148
+ performRecruiterSearchFromUrl(options) {
2149
+ return (options.client ?? this.client).post({
2150
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2151
+ url: '/v2/{account_id}/linkedin/recruiter/search',
2152
+ ...options,
2153
+ headers: {
2154
+ 'Content-Type': 'application/json',
2155
+ ...options.headers
2156
+ }
2157
+ });
2158
+ }
2159
+ /**
2160
+ * List Search Parameters
2161
+ *
2162
+ * Returns a list of parameters to be used in Recruiter search endpoints.
2163
+ */
2164
+ getRecruiterSearchParameters(options) {
2165
+ return (options.client ?? this.client).post({
2166
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2167
+ url: '/v2/{account_id}/linkedin/recruiter/search/parameters',
2168
+ ...options,
2169
+ headers: {
2170
+ 'Content-Type': 'application/json',
2171
+ ...options.headers
2172
+ }
2173
+ });
2174
+ }
2175
+ /**
2176
+ * Perform People Search
2177
+ *
2178
+ * Returns a list of people from search results.
2179
+ */
2180
+ performRecruiterPeopleSearch(options) {
2181
+ return (options.client ?? this.client).post({
2182
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2183
+ url: '/v2/{account_id}/linkedin/recruiter/search/people',
2184
+ ...options,
2185
+ headers: {
2186
+ 'Content-Type': 'application/json',
2187
+ ...options.headers
2188
+ }
2189
+ });
2190
+ }
2191
+ /**
2192
+ * Verify Company Member Identity
2193
+ *
2194
+ * Verifies member identity by submitting an email address.
2195
+ */
2196
+ verifyRecruiterCompanyMemberIdentity(options) {
2197
+ return (options.client ?? this.client).post({
2198
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2199
+ url: '/v2/{account_id}/linkedin/recruiter/company/{company_id}/member/verify-email',
2200
+ ...options,
2201
+ headers: {
2202
+ 'Content-Type': 'application/json',
2203
+ ...options.headers
2204
+ }
2205
+ });
2206
+ }
2207
+ /**
2208
+ * Submit Otp Verification Code
2209
+ *
2210
+ * Completes the process of member identity verification.
2211
+ */
2212
+ submitRecruiterOtpCode(options) {
2213
+ return (options.client ?? this.client).post({
2214
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2215
+ url: '/v2/{account_id}/linkedin/recruiter/company/{company_id}/member/submit-otp',
2216
+ ...options,
2217
+ headers: {
2218
+ 'Content-Type': 'application/json',
2219
+ ...options.headers
2220
+ }
2221
+ });
2222
+ }
2223
+ /**
2224
+ * Perform Search from URL
2225
+ *
2226
+ * Returns a list of results from a LinkedIn Sales navigator search URL.
2227
+ */
2228
+ performSalesSearchFromUrl(options) {
2229
+ return (options.client ?? this.client).post({
2230
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2231
+ url: '/v2/{account_id}/linkedin/sales-navigator/search',
2232
+ ...options,
2233
+ headers: {
2234
+ 'Content-Type': 'application/json',
2235
+ ...options.headers
2236
+ }
2237
+ });
2238
+ }
2239
+ /**
2240
+ * List Search Parameters
2241
+ *
2242
+ * Returns a list of parameters to be used in Sales navigator search endpoints.
2243
+ */
2244
+ getSalesSearchParameters(options) {
2245
+ return (options.client ?? this.client).get({
2246
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2247
+ url: '/v2/{account_id}/linkedin/sales-navigator/search/parameters',
2248
+ ...options
2249
+ });
2250
+ }
2251
+ /**
2252
+ * Perform People Search
2253
+ *
2254
+ * Returns a list of people from search results.
2255
+ */
2256
+ performSalesPeopleSearch(options) {
2257
+ return (options.client ?? this.client).post({
2258
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2259
+ url: '/v2/{account_id}/linkedin/sales-navigator/search/people',
2260
+ ...options,
2261
+ headers: {
2262
+ 'Content-Type': 'application/json',
2263
+ ...options.headers
2264
+ }
2265
+ });
2266
+ }
2267
+ /**
2268
+ * Perform Companies Search
2269
+ *
2270
+ * Returns a list of companies from search results.
2271
+ */
2272
+ performSalesCompaniesSearch(options) {
2273
+ return (options.client ?? this.client).post({
2274
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2275
+ url: '/v2/{account_id}/linkedin/sales-navigator/search/companies',
2276
+ ...options,
2277
+ headers: {
2278
+ 'Content-Type': 'application/json',
2279
+ ...options.headers
2280
+ }
2281
+ });
2282
+ }
2283
+ /**
2284
+ * Get Leads Lists
2285
+ *
2286
+ * Returns your leads lists.
2287
+ */
2288
+ getSalesLeadLists(options) {
2289
+ return (options.client ?? this.client).get({
2290
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2291
+ url: '/v2/{account_id}/linkedin/sales-navigator/lead-lists',
2292
+ ...options
2293
+ });
2294
+ }
2295
+ /**
2296
+ * Browse a Lead List
2297
+ *
2298
+ * Returns the leads that have been saved in the given list.
2299
+ */
2300
+ browseSalesLeadList(options) {
2301
+ return (options.client ?? this.client).post({
2302
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2303
+ url: '/v2/{account_id}/linkedin/sales-navigator/lead-lists/{list_id}',
2304
+ ...options,
2305
+ headers: {
2306
+ 'Content-Type': 'application/json',
2307
+ ...options.headers
2308
+ }
2309
+ });
2310
+ }
2311
+ /**
2312
+ * Save a Lead To a List
2313
+ *
2314
+ * Add a lead to an existing list
2315
+ */
2316
+ saveSalesLeadToList(options) {
2317
+ return (options.client ?? this.client).post({
2318
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2319
+ url: '/v2/{account_id}/linkedin/sales-navigator/lead-lists/{list_id}/save',
2320
+ ...options,
2321
+ headers: {
2322
+ 'Content-Type': 'application/json',
2323
+ ...options.headers
2324
+ }
2325
+ });
2326
+ }
2327
+ /**
2328
+ * Get Accounts Lists
2329
+ *
2330
+ * Returns your accounts lists.
2331
+ */
2332
+ getSalesAccountLists(options) {
2333
+ return (options.client ?? this.client).get({
2334
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2335
+ url: '/v2/{account_id}/linkedin/sales-navigator/account-lists',
2336
+ ...options
2337
+ });
2338
+ }
2339
+ /**
2340
+ * Browse an Account List
2341
+ *
2342
+ * Returns the accounts that have been saved in the given list.
2343
+ */
2344
+ browseSalesAccountList(options) {
2345
+ return (options.client ?? this.client).post({
2346
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2347
+ url: '/v2/{account_id}/linkedin/sales-navigator/account-lists/{list_id}',
2348
+ ...options,
2349
+ headers: {
2350
+ 'Content-Type': 'application/json',
2351
+ ...options.headers
2352
+ }
2353
+ });
2354
+ }
2355
+ /**
2356
+ * Save an Account To a List
2357
+ *
2358
+ * Add an account to an existing list
2359
+ */
2360
+ saveSalesAccountToList(options) {
2361
+ return (options.client ?? this.client).post({
2362
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2363
+ url: '/v2/{account_id}/linkedin/sales-navigator/account-lists/{list_id}/save',
2364
+ ...options,
2365
+ headers: {
2366
+ 'Content-Type': 'application/json',
2367
+ ...options.headers
2368
+ }
2369
+ });
2370
+ }
2371
+ }
2372
+ exports.UnipileLinkedIn = UnipileLinkedIn;
2373
+ UnipileLinkedIn.__registry = new HeyApiRegistry6();
2374
+ class UnipileInstagram extends HeyApiClient {
2375
+ constructor(args) {
2376
+ super(args);
2377
+ UnipileInstagram.__registry.set(this, args?.key);
2378
+ }
2379
+ /**
2380
+ * Search locations
2381
+ *
2382
+ * Return a list of Instagram locations. Use `latitude` and `longitude` to orient search query results by influencing their relevance ranking. When a search query is performed, locations that are considered most relevant in relation to the provided geographic coordinates are prioritized in the results. This can be used to tag a Post with a location.
2383
+ */
2384
+ searchLocations(options) {
2385
+ return (options.client ?? this.client).get({
2386
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2387
+ url: '/v2/{account_id}/instagram/search/locations',
2388
+ ...options
2389
+ });
2390
+ }
2391
+ }
2392
+ exports.UnipileInstagram = UnipileInstagram;
2393
+ UnipileInstagram.__registry = new HeyApiRegistry7();
2394
+ class UnipileCustomAuth extends HeyApiClient {
2395
+ constructor(args) {
2396
+ super(args);
2397
+ UnipileCustomAuth.__registry.set(this, args?.key);
2398
+ }
2399
+ /**
2400
+ * Solve a Checkpoint
2401
+ *
2402
+ * Solve the current checkpoint for the given authentication intent.
2403
+ */
2404
+ solveCheckpoint(options) {
2405
+ return (options.client ?? this.client).post({
2406
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2407
+ url: '/v2/auth/checkpoint',
2408
+ ...options,
2409
+ headers: {
2410
+ 'Content-Type': 'application/json',
2411
+ ...options.headers
2412
+ }
2413
+ });
2414
+ }
2415
+ /**
2416
+ * Start Auth Intent
2417
+ *
2418
+ * Start an auth intent for a provider. This might require handling of checkpoints and oauth flows depending on the provider. Use <a href="https://developer.unipile.com/v2.0/reference/post_v2-auth-link">Create Auth Link</a> to let Unipile handle everything for you.
2419
+ */
2420
+ startAuthIntent(options) {
2421
+ return (options?.client ?? this.client).post({
2422
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2423
+ url: '/v2/auth/intent',
2424
+ ...options,
2425
+ headers: {
2426
+ 'Content-Type': 'application/json',
2427
+ ...options?.headers
2428
+ }
2429
+ });
2430
+ }
2431
+ }
2432
+ exports.UnipileCustomAuth = UnipileCustomAuth;
2433
+ UnipileCustomAuth.__registry = new HeyApiRegistry8();
2434
+ class UnipileHostedAuth extends HeyApiClient {
2435
+ constructor(args) {
2436
+ super(args);
2437
+ UnipileHostedAuth.__registry.set(this, args?.key);
2438
+ }
2439
+ /**
2440
+ * Create Auth Link
2441
+ *
2442
+ * Create a link to the hosted authentication wizard for the user to authenticate with the provider.
2443
+ */
2444
+ createAuthLink(options) {
2445
+ return (options?.client ?? this.client).post({
2446
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2447
+ url: '/v2/auth/link',
2448
+ ...options,
2449
+ headers: {
2450
+ 'Content-Type': 'application/json',
2451
+ ...options?.headers
2452
+ }
2453
+ });
2454
+ }
2455
+ }
2456
+ exports.UnipileHostedAuth = UnipileHostedAuth;
2457
+ UnipileHostedAuth.__registry = new HeyApiRegistry9();
2458
+ class UnipileAccounts extends HeyApiClient {
2459
+ constructor(args) {
2460
+ super(args);
2461
+ UnipileAccounts.__registry.set(this, args?.key);
2462
+ }
2463
+ /**
2464
+ * Remove an Account
2465
+ *
2466
+ * Remove an Account from Unipile by its ID. This action is irreversible and will remove all data associated with the Account.
2467
+ */
2468
+ removeAccount(options) {
2469
+ return (options.client ?? this.client).delete({
2470
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2471
+ url: '/v2/accounts/{account_id}',
2472
+ ...options
2473
+ });
2474
+ }
2475
+ /**
2476
+ * Get an Account
2477
+ *
2478
+ * Retrieve an Account.
2479
+ */
2480
+ getAccount(options) {
2481
+ return (options.client ?? this.client).get({
2482
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2483
+ url: '/v2/accounts/{account_id}',
2484
+ ...options
2485
+ });
2486
+ }
2487
+ /**
2488
+ * Update an Account
2489
+ *
2490
+ * Update an Account by ID.
2491
+ */
2492
+ updateAccount(options) {
2493
+ return (options.client ?? this.client).patch({
2494
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2495
+ url: '/v2/accounts/{account_id}',
2496
+ ...options,
2497
+ headers: {
2498
+ 'Content-Type': 'application/json',
2499
+ ...options.headers
2500
+ }
2501
+ });
2502
+ }
2503
+ /**
2504
+ * List all Accounts
2505
+ *
2506
+ * Returns a list of all Accounts associated with the current Application. The accounts are returned sorted alphabeticaly on `name`.
2507
+ */
2508
+ listAccounts(options) {
2509
+ return (options?.client ?? this.client).get({
2510
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2511
+ url: '/v2/accounts/',
2512
+ ...options
2513
+ });
2514
+ }
2515
+ }
2516
+ exports.UnipileAccounts = UnipileAccounts;
2517
+ UnipileAccounts.__registry = new HeyApiRegistry10();
2518
+ class UnipileWebhooks extends HeyApiClient {
2519
+ constructor(args) {
2520
+ super(args);
2521
+ UnipileWebhooks.__registry.set(this, args?.key);
2522
+ }
2523
+ /**
2524
+ * List all Webhook Conversations
2525
+ *
2526
+ * Returns a list of all Webhook Conversations associated with the current Application. The conversations are returned sorted by their creation date, with the most recent appearing first.
2527
+ */
2528
+ listWebhookConversations(options) {
2529
+ return (options.client ?? this.client).get({
2530
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2531
+ url: '/v2/webhooks/conversations/',
2532
+ ...options
2533
+ });
2534
+ }
2535
+ /**
2536
+ * List all Webhook Endpoints
2537
+ *
2538
+ * Returns a list of all Webhook Endpoints associated with the current Application.
2539
+ */
2540
+ listWebhookEndpoints(options) {
2541
+ return (options?.client ?? this.client).get({
2542
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2543
+ url: '/v2/webhooks/endpoints/',
2544
+ ...options
2545
+ });
2546
+ }
2547
+ /**
2548
+ * Create a Webhook Endpoint
2549
+ *
2550
+ * Creates a new webhook endpoint.
2551
+ */
2552
+ createWebhookEndpoint(options) {
2553
+ return (options.client ?? this.client).post({
2554
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2555
+ url: '/v2/webhooks/endpoints/',
2556
+ ...options,
2557
+ headers: {
2558
+ 'Content-Type': 'application/json',
2559
+ ...options.headers
2560
+ }
2561
+ });
2562
+ }
2563
+ /**
2564
+ * Delete a Webhook Endpoint
2565
+ *
2566
+ * Deletes a webhook endpoint by ID.
2567
+ */
2568
+ deleteWebhookEndpoint(options) {
2569
+ return (options.client ?? this.client).delete({
2570
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2571
+ url: '/v2/webhooks/endpoints/{id}',
2572
+ ...options
2573
+ });
2574
+ }
2575
+ /**
2576
+ * Get a Webhook Endpoint
2577
+ *
2578
+ * Retrieves a webhook endpoint by ID.
2579
+ */
2580
+ getWebhookEndpoint(options) {
2581
+ return (options.client ?? this.client).get({
2582
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2583
+ url: '/v2/webhooks/endpoints/{id}',
2584
+ ...options
2585
+ });
2586
+ }
2587
+ /**
2588
+ * Update a Webhook Endpoint
2589
+ *
2590
+ * Updates a webhook endpoint by ID.
2591
+ */
2592
+ updateWebhookEndpoint(options) {
2593
+ return (options.client ?? this.client).patch({
2594
+ security: [{ name: 'X-API-KEY', type: 'apiKey' }],
2595
+ url: '/v2/webhooks/endpoints/{id}',
2596
+ ...options,
2597
+ headers: {
2598
+ 'Content-Type': 'application/json',
2599
+ ...options.headers
2600
+ }
2601
+ });
2602
+ }
2603
+ }
2604
+ exports.UnipileWebhooks = UnipileWebhooks;
2605
+ UnipileWebhooks.__registry = new HeyApiRegistry11();