loop-client 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/methods.js CHANGED
@@ -45,6 +45,11 @@ class Methods extends eventemitter3_1.default {
45
45
  * ============================================================================
46
46
  */
47
47
  bots = {
48
+ assign: bindApiCall(this, {
49
+ method: "POST",
50
+ path: "bots/:bot_user_id/assign/:user_id",
51
+ type: web_client_1.ContentType.JSON
52
+ }),
48
53
  convert: {
49
54
  /**
50
55
  * @description Convert a user to a bot.
@@ -74,21 +79,6 @@ class Methods extends eventemitter3_1.default {
74
79
  path: "bots",
75
80
  type: web_client_1.ContentType.JSON
76
81
  }),
77
- get: bindApiCall(this, {
78
- method: "GET",
79
- path: "bots/:user_id",
80
- type: web_client_1.ContentType.URLEncoded
81
- }),
82
- list: bindApiCallWithOptionalArg(this, {
83
- method: "GET",
84
- path: "bots",
85
- type: web_client_1.ContentType.URLEncoded
86
- }),
87
- patch: bindApiCall(this, {
88
- method: "PUT",
89
- path: "bots/:user_id",
90
- type: web_client_1.ContentType.JSON
91
- }),
92
82
  disable: bindApiCall(this, {
93
83
  method: "POST",
94
84
  path: "bots/:bot_user_id/disable",
@@ -99,12 +89,17 @@ class Methods extends eventemitter3_1.default {
99
89
  path: "bots/:bot_user_id/enable",
100
90
  type: web_client_1.ContentType.JSON
101
91
  }),
102
- assign: bindApiCall(this, {
103
- method: "POST",
104
- path: "bots/:bot_user_id/assign/:user_id",
105
- type: web_client_1.ContentType.JSON
92
+ get: bindApiCall(this, {
93
+ method: "GET",
94
+ path: "bots/:user_id",
95
+ type: web_client_1.ContentType.URLEncoded
106
96
  }),
107
97
  icon: {
98
+ delete: bindApiCall(this, {
99
+ method: "DELETE",
100
+ path: "bots/:bot_user_id/icon",
101
+ type: web_client_1.ContentType.JSON
102
+ }),
108
103
  get: bindApiCall(this, {
109
104
  method: "GET",
110
105
  path: "bots/:bot_user_id/icon",
@@ -114,13 +109,18 @@ class Methods extends eventemitter3_1.default {
114
109
  method: "POST",
115
110
  path: "bots/:bot_user_id/icon",
116
111
  type: web_client_1.ContentType.FormData
117
- }),
118
- delete: bindApiCall(this, {
119
- method: "DELETE",
120
- path: "bots/:bot_user_id/icon",
121
- type: web_client_1.ContentType.JSON
122
112
  })
123
- }
113
+ },
114
+ list: bindApiCallWithOptionalArg(this, {
115
+ method: "GET",
116
+ path: "bots",
117
+ type: web_client_1.ContentType.URLEncoded
118
+ }),
119
+ patch: bindApiCall(this, {
120
+ method: "PUT",
121
+ path: "bots/:user_id",
122
+ type: web_client_1.ContentType.JSON
123
+ })
124
124
  };
125
125
  /**
126
126
  * ============================================================================
@@ -129,13 +129,13 @@ class Methods extends eventemitter3_1.default {
129
129
  */
130
130
  brand = {
131
131
  image: {
132
- get: bindApiCall(this, {
133
- method: "GET",
132
+ delete: bindApiCallWithOptionalArg(this, {
133
+ method: "DELETE",
134
134
  path: "brand/image",
135
135
  type: web_client_1.ContentType.URLEncoded
136
136
  }),
137
- delete: bindApiCallWithOptionalArg(this, {
138
- method: "DELETE",
137
+ get: bindApiCall(this, {
138
+ method: "GET",
139
139
  path: "brand/image",
140
140
  type: web_client_1.ContentType.URLEncoded
141
141
  }),
@@ -185,11 +185,6 @@ class Methods extends eventemitter3_1.default {
185
185
  * If creating a private channel, create_private_channel permission is required.
186
186
  */
187
187
  create: {
188
- regular: bindApiCall(this, {
189
- method: "POST",
190
- path: "channels",
191
- type: web_client_1.ContentType.JSON
192
- }),
193
188
  direct: bindApiCall(this, {
194
189
  method: "POST",
195
190
  path: "channels/direct",
@@ -199,23 +194,75 @@ class Methods extends eventemitter3_1.default {
199
194
  method: "POST",
200
195
  path: "channels/group",
201
196
  type: web_client_1.ContentType.JSON
197
+ }),
198
+ regular: bindApiCall(this, {
199
+ method: "POST",
200
+ path: "channels",
201
+ type: web_client_1.ContentType.JSON
202
202
  })
203
203
  },
204
- list: {
204
+ /**
205
+ * @description Delete a channel.
206
+ */
207
+ delete: bindApiCall(this, {
208
+ method: "DELETE",
209
+ path: "channels/:channel_id",
210
+ type: web_client_1.ContentType.URLEncoded
211
+ }),
212
+ get: {
205
213
  /**
206
- * @description List all channels
214
+ * @description Get a channel by ID.
207
215
  */
208
- all: bindApiCallWithOptionalArg(this, {
216
+ byId: bindApiCall(this, {
209
217
  method: "GET",
210
- path: "channels",
218
+ path: "channels/:channel_id",
211
219
  type: web_client_1.ContentType.URLEncoded
212
220
  }),
213
221
  /**
214
- * @description List channels for a team.
222
+ * @description Get a channel by name.
215
223
  */
216
- inTeam: bindApiCall(this, {
224
+ byName: bindApiCall(this, {
217
225
  method: "GET",
218
- path: "teams/:team_id/channels",
226
+ path: "channels/:team_id/channels/:channel_name",
227
+ type: web_client_1.ContentType.URLEncoded
228
+ })
229
+ },
230
+ /**
231
+ * @description Get pinned posts in a channel.
232
+ */
233
+ getPinned: bindApiCall(this, {
234
+ method: "GET",
235
+ path: "channels/:channel_id/pinned",
236
+ type: web_client_1.ContentType.URLEncoded
237
+ }),
238
+ getStats: bindApiCall(this, {
239
+ method: "GET",
240
+ path: "channels/:channel_id/stats",
241
+ type: web_client_1.ContentType.URLEncoded
242
+ }),
243
+ /**
244
+ * @description Get timezones of users in a channel.
245
+ */
246
+ getTimezones: bindApiCall(this, {
247
+ method: "GET",
248
+ path: "channels/:channel_id/timezones",
249
+ type: web_client_1.ContentType.URLEncoded
250
+ }),
251
+ /**
252
+ * @description Get unread message and mention counts for a user in a channel.
253
+ */
254
+ getUnread: bindApiCall(this, {
255
+ method: "GET",
256
+ path: "users/:user_id/channels/:channel_id/unread",
257
+ type: web_client_1.ContentType.URLEncoded
258
+ }),
259
+ list: {
260
+ /**
261
+ * @description List all channels
262
+ */
263
+ all: bindApiCallWithOptionalArg(this, {
264
+ method: "GET",
265
+ path: "channels",
219
266
  type: web_client_1.ContentType.URLEncoded
220
267
  }),
221
268
  byIds: bindApiCall(this, {
@@ -223,6 +270,14 @@ class Methods extends eventemitter3_1.default {
223
270
  path: "teams/:team_id/channels/ids",
224
271
  type: web_client_1.ContentType.JSON
225
272
  }),
273
+ /**
274
+ * @description Get deleted channels for a team.
275
+ */
276
+ deleted: bindApiCall(this, {
277
+ method: "GET",
278
+ path: "teams/:team_id/channels/deleted",
279
+ type: web_client_1.ContentType.URLEncoded
280
+ }),
226
281
  /**
227
282
  * @description Get all channels for a user across all teams.
228
283
  */
@@ -240,110 +295,40 @@ class Methods extends eventemitter3_1.default {
240
295
  type: web_client_1.ContentType.URLEncoded
241
296
  }),
242
297
  /**
243
- * @description Get private channels for a team.
298
+ * @description List channels for a team.
244
299
  */
245
- private: bindApiCall(this, {
300
+ inTeam: bindApiCall(this, {
246
301
  method: "GET",
247
- path: "teams/:team_id/channels/private",
302
+ path: "teams/:team_id/channels",
248
303
  type: web_client_1.ContentType.URLEncoded
249
304
  }),
250
305
  /**
251
- * @description Get deleted channels for a team.
306
+ * @description Get private channels for a team.
252
307
  */
253
- deleted: bindApiCall(this, {
308
+ private: bindApiCall(this, {
254
309
  method: "GET",
255
- path: "teams/:team_id/channels/deleted",
310
+ path: "teams/:team_id/channels/private",
256
311
  type: web_client_1.ContentType.URLEncoded
257
312
  })
258
313
  },
259
- search: {
260
- team: bindApiCall(this, {
261
- method: "POST",
262
- path: "teams/:team_id/channels/search",
263
- type: web_client_1.ContentType.JSON
264
- }),
265
- all: bindApiCall(this, {
266
- method: "POST",
267
- path: "channels/search",
268
- type: web_client_1.ContentType.JSON
269
- }),
270
- archived: bindApiCall(this, {
271
- method: "POST",
272
- path: "teams/:team_id/channels/search_archived",
273
- type: web_client_1.ContentType.JSON
274
- }),
275
- /**
276
- * @description Autocomplete channels for search in a team.
277
- */
278
- autocomplete: bindApiCall(this, {
279
- method: "GET",
280
- path: "teams/:team_id/channels/search_autocomplete",
281
- type: web_client_1.ContentType.URLEncoded
282
- }),
314
+ members: {
283
315
  /**
284
- * @description Search for group message channels.
316
+ * @description Add a user to a channel.
317
+ * Requires `join_public_channels` for public channels.
285
318
  */
286
- groups: bindApiCall(this, {
319
+ add: bindApiCall(this, {
287
320
  method: "POST",
288
- path: "channels/group/search",
321
+ path: "channels/:channel_id/members",
289
322
  type: web_client_1.ContentType.JSON
290
- })
291
- },
292
- get: {
293
- /**
294
- * @description Get a channel by ID.
295
- */
296
- byId: bindApiCall(this, {
297
- method: "GET",
298
- path: "channels/:channel_id",
299
- type: web_client_1.ContentType.URLEncoded
300
323
  }),
301
324
  /**
302
- * @description Get a channel by name.
325
+ * @description Get member counts by group for a channel.
303
326
  */
304
- byName: bindApiCall(this, {
327
+ countByGroup: bindApiCall(this, {
305
328
  method: "GET",
306
- path: "channels/:team_id/channels/:channel_name",
329
+ path: "channels/:channel_id/member_counts_by_group",
307
330
  type: web_client_1.ContentType.URLEncoded
308
- })
309
- },
310
- /**
311
- * @description Update a channel.
312
- */
313
- update: bindApiCall(this, {
314
- method: "PUT",
315
- path: "channels/:channel_id",
316
- type: web_client_1.ContentType.JSON
317
- }),
318
- /**
319
- * @description Delete a channel.
320
- */
321
- delete: bindApiCall(this, {
322
- method: "DELETE",
323
- path: "channels/:channel_id",
324
- type: web_client_1.ContentType.URLEncoded
325
- }),
326
- patch: bindApiCall(this, {
327
- method: "PUT",
328
- path: "channels/:channel_id/patch",
329
- type: web_client_1.ContentType.JSON
330
- }),
331
- restore: bindApiCall(this, {
332
- method: "POST",
333
- path: "channels/:channel_id/restore",
334
- type: web_client_1.ContentType.URLEncoded
335
- }),
336
- getStats: bindApiCall(this, {
337
- method: "GET",
338
- path: "channels/:channel_id/stats",
339
- type: web_client_1.ContentType.URLEncoded
340
- }),
341
- view: bindApiCall(this, {
342
- method: "POST",
343
- path: "channels/members/:channel_id/view",
344
- type: web_client_1.ContentType.JSON
345
- }),
346
- members: {
331
+ }),
347
332
  /**
348
333
  * @description Get channel members.
349
334
  */
@@ -361,14 +346,22 @@ class Methods extends eventemitter3_1.default {
361
346
  type: web_client_1.ContentType.URLEncoded
362
347
  }),
363
348
  /**
364
- * @description Add a user to a channel.
365
- * Requires `join_public_channels` for public channels.
349
+ * @description Get channel members by user IDs.
366
350
  */
367
- add: bindApiCall(this, {
351
+ getByIds: bindApiCall(this, {
368
352
  method: "POST",
369
- path: "channels/:channel_id/members",
353
+ path: "channels/:channel_id/members/ids",
370
354
  type: web_client_1.ContentType.JSON
371
355
  }),
356
+ /**
357
+ * @description Get channel members minus group members.
358
+ * @permission Must have manage_system permission.
359
+ */
360
+ getMinusGroupMembers: bindApiCall(this, {
361
+ method: "GET",
362
+ path: "channels/:channel_id/members_minus_group_members",
363
+ type: web_client_1.ContentType.URLEncoded
364
+ }),
372
365
  /**
373
366
  * @description Remove a user from a channel.
374
367
  */
@@ -378,11 +371,11 @@ class Methods extends eventemitter3_1.default {
378
371
  type: web_client_1.ContentType.URLEncoded
379
372
  }),
380
373
  /**
381
- * @description Get channel members by user IDs.
374
+ * @description Update a user's notification properties for a channel.
382
375
  */
383
- getByIds: bindApiCall(this, {
384
- method: "POST",
385
- path: "channels/:channel_id/members/ids",
376
+ updateNotifyProps: bindApiCall(this, {
377
+ method: "PUT",
378
+ path: "channels/:channel_id/members/:user_id/notify_props",
386
379
  type: web_client_1.ContentType.JSON
387
380
  }),
388
381
  /**
@@ -400,42 +393,26 @@ class Methods extends eventemitter3_1.default {
400
393
  method: "PUT",
401
394
  path: "channels/:channel_id/members/:user_id/scheme_roles",
402
395
  type: web_client_1.ContentType.JSON
403
- }),
404
- /**
405
- * @description Update a user's notification properties for a channel.
406
- */
407
- updateNotifyProps: bindApiCall(this, {
408
- method: "PUT",
409
- path: "channels/:channel_id/members/:user_id/notify_props",
410
- type: web_client_1.ContentType.JSON
411
- }),
396
+ })
397
+ },
398
+ moderation: {
412
399
  /**
413
- * @description Get channel members minus group members.
414
- * @permission Must have manage_system permission.
400
+ * @description Get moderation settings for a channel.
415
401
  */
416
- getMinusGroupMembers: bindApiCall(this, {
402
+ get: bindApiCall(this, {
417
403
  method: "GET",
418
- path: "channels/:channel_id/members_minus_group_members",
404
+ path: "channels/:channel_id/moderations",
419
405
  type: web_client_1.ContentType.URLEncoded
420
406
  }),
421
407
  /**
422
- * @description Get member counts by group for a channel.
408
+ * @description Update moderation settings for a channel.
423
409
  */
424
- countByGroup: bindApiCall(this, {
425
- method: "GET",
426
- path: "channels/:channel_id/member_counts_by_group",
427
- type: web_client_1.ContentType.URLEncoded
410
+ update: bindApiCall(this, {
411
+ method: "PUT",
412
+ path: "channels/:channel_id/moderations/patch",
413
+ type: web_client_1.ContentType.JSON
428
414
  })
429
415
  },
430
- /**
431
- * @description Update a channel's privacy setting.
432
- * Converts a public channel to private or vice-versa.
433
- */
434
- updatePrivacy: bindApiCall(this, {
435
- method: "PUT",
436
- path: "channels/:channel_id/privacy",
437
- type: web_client_1.ContentType.JSON
438
- }),
439
416
  /**
440
417
  * @description Move a channel to a different team.
441
418
  */
@@ -444,56 +421,79 @@ class Methods extends eventemitter3_1.default {
444
421
  path: "channels/:channel_id/move",
445
422
  type: web_client_1.ContentType.JSON
446
423
  }),
447
- /**
448
- * @description Get pinned posts in a channel.
449
- */
450
- getPinned: bindApiCall(this, {
451
- method: "GET",
452
- path: "channels/:channel_id/pinned",
424
+ patch: bindApiCall(this, {
425
+ method: "PUT",
426
+ path: "channels/:channel_id/patch",
427
+ type: web_client_1.ContentType.JSON
428
+ }),
429
+ restore: bindApiCall(this, {
430
+ method: "POST",
431
+ path: "channels/:channel_id/restore",
453
432
  type: web_client_1.ContentType.URLEncoded
454
433
  }),
434
+ search: {
435
+ all: bindApiCall(this, {
436
+ method: "POST",
437
+ path: "channels/search",
438
+ type: web_client_1.ContentType.JSON
439
+ }),
440
+ archived: bindApiCall(this, {
441
+ method: "POST",
442
+ path: "teams/:team_id/channels/search_archived",
443
+ type: web_client_1.ContentType.JSON
444
+ }),
445
+ /**
446
+ * @description Autocomplete channels for search in a team.
447
+ */
448
+ autocomplete: bindApiCall(this, {
449
+ method: "GET",
450
+ path: "teams/:team_id/channels/search_autocomplete",
451
+ type: web_client_1.ContentType.URLEncoded
452
+ }),
453
+ /**
454
+ * @description Search for group message channels.
455
+ */
456
+ groups: bindApiCall(this, {
457
+ method: "POST",
458
+ path: "channels/group/search",
459
+ type: web_client_1.ContentType.JSON
460
+ }),
461
+ team: bindApiCall(this, {
462
+ method: "POST",
463
+ path: "teams/:team_id/channels/search",
464
+ type: web_client_1.ContentType.JSON
465
+ })
466
+ },
455
467
  /**
456
- * @description Get timezones of users in a channel.
468
+ * @description Set a channel's scheme.
457
469
  */
458
- getTimezones: bindApiCall(this, {
459
- method: "GET",
460
- path: "channels/:channel_id/timezones",
461
- type: web_client_1.ContentType.URLEncoded
470
+ setScheme: bindApiCall(this, {
471
+ method: "PUT",
472
+ path: "channels/:channel_id/scheme",
473
+ type: web_client_1.ContentType.JSON
462
474
  }),
463
475
  /**
464
- * @description Get unread message and mention counts for a user in a channel.
476
+ * @description Update a channel.
465
477
  */
466
- getUnread: bindApiCall(this, {
467
- method: "GET",
468
- path: "users/:user_id/channels/:channel_id/unread",
469
- type: web_client_1.ContentType.URLEncoded
478
+ update: bindApiCall(this, {
479
+ method: "PUT",
480
+ path: "channels/:channel_id",
481
+ type: web_client_1.ContentType.JSON
470
482
  }),
471
483
  /**
472
- * @description Set a channel's scheme.
484
+ * @description Update a channel's privacy setting.
485
+ * Converts a public channel to private or vice-versa.
473
486
  */
474
- setScheme: bindApiCall(this, {
487
+ updatePrivacy: bindApiCall(this, {
475
488
  method: "PUT",
476
- path: "channels/:channel_id/scheme",
489
+ path: "channels/:channel_id/privacy",
477
490
  type: web_client_1.ContentType.JSON
478
491
  }),
479
- moderation: {
480
- /**
481
- * @description Get moderation settings for a channel.
482
- */
483
- get: bindApiCall(this, {
484
- method: "GET",
485
- path: "channels/:channel_id/moderations",
486
- type: web_client_1.ContentType.URLEncoded
487
- }),
488
- /**
489
- * @description Update moderation settings for a channel.
490
- */
491
- update: bindApiCall(this, {
492
- method: "PUT",
493
- path: "channels/:channel_id/moderations/patch",
494
- type: web_client_1.ContentType.JSON
495
- })
496
- }
492
+ view: bindApiCall(this, {
493
+ method: "POST",
494
+ path: "channels/members/:channel_id/view",
495
+ type: web_client_1.ContentType.JSON
496
+ })
497
497
  };
498
498
  /**
499
499
  * ============================================================================
@@ -502,6 +502,11 @@ class Methods extends eventemitter3_1.default {
502
502
  */
503
503
  cloud = {
504
504
  customer: {
505
+ confirmPayment: bindApiCall(this, {
506
+ method: "POST",
507
+ path: "cloud/payment/confirm",
508
+ type: web_client_1.ContentType.JSON
509
+ }),
505
510
  get: bindApiCallWithOptionalArg(this, {
506
511
  method: "GET",
507
512
  path: "cloud/customer",
@@ -531,11 +536,6 @@ class Methods extends eventemitter3_1.default {
531
536
  method: "POST",
532
537
  path: "cloud/validate_business_email",
533
538
  type: web_client_1.ContentType.JSON
534
- }),
535
- confirmPayment: bindApiCall(this, {
536
- method: "POST",
537
- path: "cloud/payment/confirm",
538
- type: web_client_1.ContentType.JSON
539
539
  })
540
540
  },
541
541
  invoices: {
@@ -545,16 +545,11 @@ class Methods extends eventemitter3_1.default {
545
545
  type: web_client_1.ContentType.URLEncoded
546
546
  })
547
547
  },
548
- subscription: {
548
+ limits: {
549
549
  get: bindApiCallWithOptionalArg(this, {
550
550
  method: "GET",
551
- path: "cloud/subscription",
551
+ path: "cloud/limits",
552
552
  type: web_client_1.ContentType.URLEncoded
553
- }),
554
- update: bindApiCallWithOptionalArg(this, {
555
- method: "PUT",
556
- path: "cloud/subscription",
557
- type: web_client_1.ContentType.JSON
558
553
  })
559
554
  },
560
555
  products: {
@@ -564,11 +559,16 @@ class Methods extends eventemitter3_1.default {
564
559
  type: web_client_1.ContentType.URLEncoded
565
560
  })
566
561
  },
567
- limits: {
562
+ subscription: {
568
563
  get: bindApiCallWithOptionalArg(this, {
569
564
  method: "GET",
570
- path: "cloud/limits",
565
+ path: "cloud/subscription",
571
566
  type: web_client_1.ContentType.URLEncoded
567
+ }),
568
+ update: bindApiCallWithOptionalArg(this, {
569
+ method: "PUT",
570
+ path: "cloud/subscription",
571
+ type: web_client_1.ContentType.JSON
572
572
  })
573
573
  }
574
574
  };
@@ -579,90 +579,85 @@ class Methods extends eventemitter3_1.default {
579
579
  */
580
580
  dataRetention = {
581
581
  policies: {
582
+ channels: {
583
+ add: bindApiCall(this, {
584
+ method: "POST",
585
+ path: "data_retention/policies/:policy_id/channels",
586
+ type: web_client_1.ContentType.JSON
587
+ }),
588
+ get: bindApiCall(this, {
589
+ method: "GET",
590
+ path: "data_retention/policies/:policy_id/channels",
591
+ type: web_client_1.ContentType.URLEncoded
592
+ }),
593
+ remove: bindApiCall(this, {
594
+ method: "DELETE",
595
+ path: "data_retention/policies/:policy_id/channels/:channel_id",
596
+ type: web_client_1.ContentType.URLEncoded
597
+ }),
598
+ search: bindApiCall(this, {
599
+ method: "POST",
600
+ path: "data_retention/policies/:policy_id/channels/search",
601
+ type: web_client_1.ContentType.JSON
602
+ })
603
+ },
582
604
  create: bindApiCall(this, {
583
605
  method: "POST",
584
606
  path: "data_retention/policies",
585
607
  type: web_client_1.ContentType.JSON
586
608
  }),
587
- get: bindApiCall(this, {
588
- method: "GET",
589
- path: "data_retention/policies/:policy_id",
590
- type: web_client_1.ContentType.URLEncoded
591
- }),
592
609
  delete: bindApiCall(this, {
593
610
  method: "DELETE",
594
611
  path: "data_retention/policies/:policy_id",
595
612
  type: web_client_1.ContentType.URLEncoded
596
613
  }),
597
- update: bindApiCall(this, {
598
- method: "PUT",
599
- path: "data_retention/policies/:policy_id",
600
- type: web_client_1.ContentType.JSON
601
- }),
602
- patch: bindApiCall(this, {
603
- method: "PATCH",
614
+ get: bindApiCall(this, {
615
+ method: "GET",
604
616
  path: "data_retention/policies/:policy_id",
605
- type: web_client_1.ContentType.JSON
617
+ type: web_client_1.ContentType.URLEncoded
606
618
  }),
607
619
  list: bindApiCall(this, {
608
620
  method: "GET",
609
621
  path: "data_retention/policies",
610
622
  type: web_client_1.ContentType.URLEncoded
611
623
  }),
624
+ patch: bindApiCall(this, {
625
+ method: "PATCH",
626
+ path: "data_retention/policies/:policy_id",
627
+ type: web_client_1.ContentType.JSON
628
+ }),
612
629
  teams: {
613
- search: bindApiCall(this, {
614
- method: "POST",
615
- path: "data_retention/policies/:policy_id/teams/search",
616
- type: web_client_1.ContentType.JSON
617
- }),
618
630
  add: bindApiCall(this, {
619
631
  method: "POST",
620
632
  path: "data_retention/policies/:policy_id/teams",
621
633
  type: web_client_1.ContentType.JSON
622
634
  }),
623
- remove: bindApiCall(this, {
624
- method: "DELETE",
625
- path: "data_retention/policies/:policy_id/teams/:team_id",
626
- type: web_client_1.ContentType.URLEncoded
627
- }),
628
635
  get: bindApiCall(this, {
629
636
  method: "GET",
630
637
  path: "data_retention/policies/:policy_id/teams",
631
638
  type: web_client_1.ContentType.URLEncoded
632
- })
633
- },
634
- channels: {
635
- search: bindApiCall(this, {
636
- method: "POST",
637
- path: "data_retention/policies/:policy_id/channels/search",
638
- type: web_client_1.ContentType.JSON
639
- }),
640
- add: bindApiCall(this, {
641
- method: "POST",
642
- path: "data_retention/policies/:policy_id/channels",
643
- type: web_client_1.ContentType.JSON
644
639
  }),
645
640
  remove: bindApiCall(this, {
646
641
  method: "DELETE",
647
- path: "data_retention/policies/:policy_id/channels/:channel_id",
642
+ path: "data_retention/policies/:policy_id/teams/:team_id",
648
643
  type: web_client_1.ContentType.URLEncoded
649
644
  }),
650
- get: bindApiCall(this, {
651
- method: "GET",
652
- path: "data_retention/policies/:policy_id/channels",
653
- type: web_client_1.ContentType.URLEncoded
645
+ search: bindApiCall(this, {
646
+ method: "POST",
647
+ path: "data_retention/policies/:policy_id/teams/search",
648
+ type: web_client_1.ContentType.JSON
654
649
  })
655
- }
650
+ },
651
+ update: bindApiCall(this, {
652
+ method: "PUT",
653
+ path: "data_retention/policies/:policy_id",
654
+ type: web_client_1.ContentType.JSON
655
+ })
656
656
  },
657
- users: {
658
- getTeams: bindApiCall(this, {
657
+ policiesCount: {
658
+ get: bindApiCallWithOptionalArg(this, {
659
659
  method: "GET",
660
- path: "users/:user_id/teams/data_retention/policies",
661
- type: web_client_1.ContentType.URLEncoded
662
- }),
663
- getChannels: bindApiCall(this, {
664
- method: "GET",
665
- path: "users/:user_id/channels/data_retention/policies",
660
+ path: "data_retention/policies_count",
666
661
  type: web_client_1.ContentType.URLEncoded
667
662
  })
668
663
  },
@@ -673,10 +668,15 @@ class Methods extends eventemitter3_1.default {
673
668
  type: web_client_1.ContentType.URLEncoded
674
669
  })
675
670
  },
676
- policiesCount: {
677
- get: bindApiCallWithOptionalArg(this, {
671
+ users: {
672
+ getChannels: bindApiCall(this, {
678
673
  method: "GET",
679
- path: "data_retention/policies_count",
674
+ path: "users/:user_id/channels/data_retention/policies",
675
+ type: web_client_1.ContentType.URLEncoded
676
+ }),
677
+ getTeams: bindApiCall(this, {
678
+ method: "GET",
679
+ path: "users/:user_id/teams/data_retention/policies",
680
680
  type: web_client_1.ContentType.URLEncoded
681
681
  })
682
682
  }
@@ -697,10 +697,10 @@ class Methods extends eventemitter3_1.default {
697
697
  path: "emoji",
698
698
  type: web_client_1.ContentType.FormData
699
699
  }),
700
- list: bindApiCall(this, {
701
- method: "GET",
702
- path: "emoji",
703
- type: web_client_1.ContentType.URLEncoded
700
+ delete: bindApiCall(this, {
701
+ method: "DELETE",
702
+ path: "emoji/:emoji_id",
703
+ type: web_client_1.ContentType.JSON
704
704
  }),
705
705
  get: {
706
706
  byId: bindApiCall(this, {
@@ -714,16 +714,16 @@ class Methods extends eventemitter3_1.default {
714
714
  type: web_client_1.ContentType.URLEncoded
715
715
  })
716
716
  },
717
- delete: bindApiCall(this, {
718
- method: "DELETE",
719
- path: "emoji/:emoji_id",
720
- type: web_client_1.ContentType.JSON
721
- }),
722
717
  getImage: bindApiCall(this, {
723
718
  method: "GET",
724
719
  path: "emoji/:emoji_id/image",
725
720
  type: web_client_1.ContentType.URLEncoded
726
721
  }),
722
+ list: bindApiCall(this, {
723
+ method: "GET",
724
+ path: "emoji",
725
+ type: web_client_1.ContentType.URLEncoded
726
+ }),
727
727
  search: bindApiCall(this, {
728
728
  method: "POST",
729
729
  path: "emoji/search",
@@ -736,26 +736,6 @@ class Methods extends eventemitter3_1.default {
736
736
  * ============================================================================
737
737
  */
738
738
  files = {
739
- /**
740
- * Upload a file
741
- *
742
- * @description Uploads a file that can later be attached to a post.
743
- * This request can either be a multipart/form-data request with a channel_id,
744
- * files and optional client_ids defined in the FormData, or it can be a request
745
- * with the channel_id and filename defined as query parameters with the contents of a single file in the body of the request.
746
- *
747
- * Only multipart/form-data requests are supported by server versions up to and including 4.7.
748
- * Server versions 4.8 and higher support both types of requests.
749
- *
750
- * Must have upload_file permission.
751
- *
752
- * @see https://developers.loop.ru/API/4.0.0/upload-file
753
- */
754
- upload: bindApiCall(this, {
755
- method: "POST",
756
- path: "files",
757
- type: web_client_1.ContentType.FormData
758
- }),
759
739
  /**
760
740
  * @description Get file and various file-related data
761
741
  */
@@ -797,25 +777,25 @@ class Methods extends eventemitter3_1.default {
797
777
  type: web_client_1.ContentType.URLEncoded
798
778
  }),
799
779
  /**
800
- * Get a public file link
801
- *
802
- * @description Gets a public link for a file that can be accessed without logging into LOOP.
780
+ * Get a public file
803
781
  *
804
- * Must have read_channel permission or be uploader of the file.
782
+ * No permissions required.
805
783
  */
806
- publicLink: bindApiCall(this, {
784
+ publicFile: bindApiCall(this, {
807
785
  method: "GET",
808
- path: "files/:file_id/link",
786
+ path: "files/:file_id/public",
809
787
  type: web_client_1.ContentType.URLEncoded
810
788
  }),
811
789
  /**
812
- * Get a public file
790
+ * Get a public file link
813
791
  *
814
- * No permissions required.
792
+ * @description Gets a public link for a file that can be accessed without logging into LOOP.
793
+ *
794
+ * Must have read_channel permission or be uploader of the file.
815
795
  */
816
- publicFile: bindApiCall(this, {
796
+ publicLink: bindApiCall(this, {
817
797
  method: "GET",
818
- path: "files/:file_id/public",
798
+ path: "files/:file_id/link",
819
799
  type: web_client_1.ContentType.URLEncoded
820
800
  }),
821
801
  /**
@@ -846,6 +826,26 @@ class Methods extends eventemitter3_1.default {
846
826
  method: "POST",
847
827
  path: "teams/:team_id/files/search",
848
828
  type: web_client_1.ContentType.JSON
829
+ }),
830
+ /**
831
+ * Upload a file
832
+ *
833
+ * @description Uploads a file that can later be attached to a post.
834
+ * This request can either be a multipart/form-data request with a channel_id,
835
+ * files and optional client_ids defined in the FormData, or it can be a request
836
+ * with the channel_id and filename defined as query parameters with the contents of a single file in the body of the request.
837
+ *
838
+ * Only multipart/form-data requests are supported by server versions up to and including 4.7.
839
+ * Server versions 4.8 and higher support both types of requests.
840
+ *
841
+ * Must have upload_file permission.
842
+ *
843
+ * @see https://developers.loop.ru/API/4.0.0/upload-file
844
+ */
845
+ upload: bindApiCall(this, {
846
+ method: "POST",
847
+ path: "files",
848
+ type: web_client_1.ContentType.FormData
849
849
  })
850
850
  };
851
851
  /**
@@ -854,36 +854,6 @@ class Methods extends eventemitter3_1.default {
854
854
  * ============================================================================
855
855
  */
856
856
  integrations = {
857
- /**
858
- * ============================================================================
859
- * @description Integration interactive dialogs methods
860
- * ============================================================================
861
- */
862
- dialogs: {
863
- /**
864
- * @description Open an interactive dialog using a trigger ID provided
865
- * by a slash command, or some other action payload.
866
- * @see {@link https://docs.loop.ru/developer/interactive-dialogs.html | Interactive Dialogs}
867
- * for more information on interactive dialogs.
868
- * Minimum server @version 5.6
869
- */
870
- open: bindApiCall(this, {
871
- method: "POST",
872
- path: "actions/dialogs/open",
873
- type: web_client_1.ContentType.JSON
874
- }),
875
- /**
876
- * @description Endpoint used by the LOOP clients to submit a dialog.
877
- * @see {@link https://docs.loop.ru/developer/interactive-dialogs.html | Interactive Dialogs}
878
- * for more information on interactive dialogs.
879
- * Minimum server @version 5.6
880
- */
881
- submit: bindApiCall(this, {
882
- method: "POST",
883
- path: "actions/dialogs/submit",
884
- type: web_client_1.ContentType.JSON
885
- })
886
- },
887
857
  /**
888
858
  * ============================================================================
889
859
  * @description Integration commands methods
@@ -899,15 +869,6 @@ class Methods extends eventemitter3_1.default {
899
869
  path: "commands",
900
870
  type: web_client_1.ContentType.JSON
901
871
  }),
902
- /**
903
- * @description List commands for a team.
904
- * @permission `manage_slash_commands` if need to list custom commands.
905
- */
906
- update: bindApiCall(this, {
907
- method: "PUT",
908
- path: "commands/:id",
909
- type: web_client_1.ContentType.JSON
910
- }),
911
872
  /**
912
873
  * @description List autocomplete commands in the team.
913
874
  * @permisstion `view_team` for the team.
@@ -917,133 +878,172 @@ class Methods extends eventemitter3_1.default {
917
878
  path: "commands/:command_id",
918
879
  type: web_client_1.ContentType.URLEncoded
919
880
  }),
881
+ execute: bindApiCall(this, {
882
+ method: "POST",
883
+ path: "commands/execute",
884
+ type: web_client_1.ContentType.JSON
885
+ }),
920
886
  list: bindApiCall(this, {
921
887
  method: "GET",
922
888
  path: "commands",
923
889
  type: web_client_1.ContentType.URLEncoded
924
890
  }),
891
+ listAutocomplete: bindApiCall(this, {
892
+ method: "GET",
893
+ path: "teams/:team_id/commands/autocomplete",
894
+ type: web_client_1.ContentType.URLEncoded
895
+ }),
925
896
  regenerateToken: bindApiCall(this, {
926
897
  method: "PUT",
927
898
  path: "commands/:command_id/regen_token",
928
899
  type: web_client_1.ContentType.JSON
929
900
  }),
930
- execute: bindApiCall(this, {
901
+ /**
902
+ * @description List commands for a team.
903
+ * @permission `manage_slash_commands` if need to list custom commands.
904
+ */
905
+ update: bindApiCall(this, {
906
+ method: "PUT",
907
+ path: "commands/:id",
908
+ type: web_client_1.ContentType.JSON
909
+ })
910
+ },
911
+ /**
912
+ * ============================================================================
913
+ * @description Integration interactive dialogs methods
914
+ * ============================================================================
915
+ */
916
+ dialogs: {
917
+ /**
918
+ * @description Open an interactive dialog using a trigger ID provided
919
+ * by a slash command, or some other action payload.
920
+ * @see {@link https://docs.loop.ru/developer/interactive-dialogs.html | Interactive Dialogs}
921
+ * for more information on interactive dialogs.
922
+ * Minimum server @version 5.6
923
+ */
924
+ open: bindApiCall(this, {
931
925
  method: "POST",
932
- path: "commands/execute",
926
+ path: "actions/dialogs/open",
933
927
  type: web_client_1.ContentType.JSON
934
928
  }),
935
- listAutocomplete: bindApiCall(this, {
936
- method: "GET",
937
- path: "teams/:team_id/commands/autocomplete",
938
- type: web_client_1.ContentType.URLEncoded
929
+ /**
930
+ * @description Endpoint used by the LOOP clients to submit a dialog.
931
+ * @see {@link https://docs.loop.ru/developer/interactive-dialogs.html | Interactive Dialogs}
932
+ * for more information on interactive dialogs.
933
+ * Minimum server @version 5.6
934
+ */
935
+ submit: bindApiCall(this, {
936
+ method: "POST",
937
+ path: "actions/dialogs/submit",
938
+ type: web_client_1.ContentType.JSON
939
939
  })
940
940
  },
941
941
  /**
942
942
  * ============================================================================
943
- * @description Integration webhooks methods
943
+ * @description OAuth apps methods
944
944
  * ============================================================================
945
945
  */
946
- webhooks: {
947
- incoming: {
946
+ oauth: {
947
+ apps: {
948
948
  create: bindApiCall(this, {
949
949
  method: "POST",
950
- path: "hooks/incoming",
951
- type: web_client_1.ContentType.JSON
952
- }),
953
- update: bindApiCall(this, {
954
- method: "PUT",
955
- path: "hooks/incoming/:id",
950
+ path: "oauth/apps",
956
951
  type: web_client_1.ContentType.JSON
957
952
  }),
958
953
  delete: bindApiCall(this, {
959
954
  method: "DELETE",
960
- path: "hooks/incoming/:hook_id",
955
+ path: "oauth/apps/:app_id",
961
956
  type: web_client_1.ContentType.URLEncoded
962
957
  }),
963
- list: bindApiCall(this, {
958
+ get: bindApiCall(this, {
964
959
  method: "GET",
965
- path: "hooks/incoming",
960
+ path: "oauth/apps/:app_id",
966
961
  type: web_client_1.ContentType.URLEncoded
967
962
  }),
968
- get: bindApiCall(this, {
963
+ getInfo: bindApiCall(this, {
969
964
  method: "GET",
970
- path: "hooks/incoming/:hook_id",
965
+ path: "oauth/apps/:app_id/info",
971
966
  type: web_client_1.ContentType.URLEncoded
972
- })
973
- },
974
- outgoing: {
975
- create: bindApiCall(this, {
967
+ }),
968
+ list: bindApiCall(this, {
969
+ method: "GET",
970
+ path: "oauth/apps",
971
+ type: web_client_1.ContentType.URLEncoded
972
+ }),
973
+ regenerateSecret: bindApiCall(this, {
976
974
  method: "POST",
977
- path: "hooks/outgoing",
975
+ path: "oauth/apps/:app_id/regen_secret",
978
976
  type: web_client_1.ContentType.JSON
979
977
  }),
980
978
  update: bindApiCall(this, {
981
979
  method: "PUT",
982
- path: "hooks/outgoing/:id",
980
+ path: "oauth/apps/:id",
981
+ type: web_client_1.ContentType.JSON
982
+ })
983
+ }
984
+ },
985
+ /**
986
+ * ============================================================================
987
+ * @description Integration webhooks methods
988
+ * ============================================================================
989
+ */
990
+ webhooks: {
991
+ incoming: {
992
+ create: bindApiCall(this, {
993
+ method: "POST",
994
+ path: "hooks/incoming",
983
995
  type: web_client_1.ContentType.JSON
984
996
  }),
985
997
  delete: bindApiCall(this, {
986
998
  method: "DELETE",
987
- path: "hooks/outgoing/:hook_id",
999
+ path: "hooks/incoming/:hook_id",
988
1000
  type: web_client_1.ContentType.URLEncoded
989
1001
  }),
990
- list: bindApiCall(this, {
1002
+ get: bindApiCall(this, {
991
1003
  method: "GET",
992
- path: "hooks/outgoing",
1004
+ path: "hooks/incoming/:hook_id",
993
1005
  type: web_client_1.ContentType.URLEncoded
994
1006
  }),
995
- get: bindApiCall(this, {
1007
+ list: bindApiCall(this, {
996
1008
  method: "GET",
997
- path: "hooks/outgoing/:hook_id",
1009
+ path: "hooks/incoming",
998
1010
  type: web_client_1.ContentType.URLEncoded
999
1011
  }),
1000
- regenerateToken: bindApiCall(this, {
1001
- method: "POST",
1002
- path: "hooks/outgoing/:hook_id/regen_token",
1012
+ update: bindApiCall(this, {
1013
+ method: "PUT",
1014
+ path: "hooks/incoming/:id",
1003
1015
  type: web_client_1.ContentType.JSON
1004
1016
  })
1005
- }
1006
- },
1007
- /**
1008
- * ============================================================================
1009
- * @description OAuth apps methods
1010
- * ============================================================================
1011
- */
1012
- oauth: {
1013
- apps: {
1017
+ },
1018
+ outgoing: {
1014
1019
  create: bindApiCall(this, {
1015
1020
  method: "POST",
1016
- path: "oauth/apps",
1017
- type: web_client_1.ContentType.JSON
1018
- }),
1019
- update: bindApiCall(this, {
1020
- method: "PUT",
1021
- path: "oauth/apps/:id",
1021
+ path: "hooks/outgoing",
1022
1022
  type: web_client_1.ContentType.JSON
1023
1023
  }),
1024
1024
  delete: bindApiCall(this, {
1025
1025
  method: "DELETE",
1026
- path: "oauth/apps/:app_id",
1026
+ path: "hooks/outgoing/:hook_id",
1027
1027
  type: web_client_1.ContentType.URLEncoded
1028
1028
  }),
1029
1029
  get: bindApiCall(this, {
1030
1030
  method: "GET",
1031
- path: "oauth/apps/:app_id",
1032
- type: web_client_1.ContentType.URLEncoded
1033
- }),
1034
- getInfo: bindApiCall(this, {
1035
- method: "GET",
1036
- path: "oauth/apps/:app_id/info",
1031
+ path: "hooks/outgoing/:hook_id",
1037
1032
  type: web_client_1.ContentType.URLEncoded
1038
1033
  }),
1039
1034
  list: bindApiCall(this, {
1040
1035
  method: "GET",
1041
- path: "oauth/apps",
1036
+ path: "hooks/outgoing",
1042
1037
  type: web_client_1.ContentType.URLEncoded
1043
1038
  }),
1044
- regenerateSecret: bindApiCall(this, {
1039
+ regenerateToken: bindApiCall(this, {
1045
1040
  method: "POST",
1046
- path: "oauth/apps/:app_id/regen_secret",
1041
+ path: "hooks/outgoing/:hook_id/regen_token",
1042
+ type: web_client_1.ContentType.JSON
1043
+ }),
1044
+ update: bindApiCall(this, {
1045
+ method: "PUT",
1046
+ path: "hooks/outgoing/:id",
1047
1047
  type: web_client_1.ContentType.JSON
1048
1048
  })
1049
1049
  }
@@ -1055,6 +1055,16 @@ class Methods extends eventemitter3_1.default {
1055
1055
  * ============================================================================
1056
1056
  */
1057
1057
  groups = {
1058
+ channels: {
1059
+ /**
1060
+ * @description Get a group's channels.
1061
+ */
1062
+ get: bindApiCall(this, {
1063
+ method: "GET",
1064
+ path: "groups/:group_id/channels",
1065
+ type: web_client_1.ContentType.URLEncoded
1066
+ })
1067
+ },
1058
1068
  /**
1059
1069
  * @description Create a new group.
1060
1070
  * Requires `manage_system` permission.
@@ -1064,6 +1074,16 @@ class Methods extends eventemitter3_1.default {
1064
1074
  path: "groups",
1065
1075
  type: web_client_1.ContentType.JSON
1066
1076
  }),
1077
+ delete: bindApiCall(this, {
1078
+ method: "DELETE",
1079
+ path: "groups/:group_id",
1080
+ type: web_client_1.ContentType.URLEncoded
1081
+ }),
1082
+ deleteLdapLink: bindApiCall(this, {
1083
+ method: "DELETE",
1084
+ path: "groups/:group_id/link",
1085
+ type: web_client_1.ContentType.URLEncoded
1086
+ }),
1067
1087
  /**
1068
1088
  * @description Retrieve a group by its ID.
1069
1089
  * Requires `manage_system` permission.
@@ -1073,6 +1093,11 @@ class Methods extends eventemitter3_1.default {
1073
1093
  path: "groups/:group_id",
1074
1094
  type: web_client_1.ContentType.URLEncoded
1075
1095
  }),
1096
+ getStats: bindApiCall(this, {
1097
+ method: "GET",
1098
+ path: "groups/:group_id/stats",
1099
+ type: web_client_1.ContentType.URLEncoded
1100
+ }),
1076
1101
  /**
1077
1102
  * @description List all groups.
1078
1103
  * Requires `manage_system` permission.
@@ -1082,53 +1107,6 @@ class Methods extends eventemitter3_1.default {
1082
1107
  path: "groups",
1083
1108
  type: web_client_1.ContentType.URLEncoded
1084
1109
  }),
1085
- update: bindApiCall(this, {
1086
- method: "PUT",
1087
- path: "groups/:group_id",
1088
- type: web_client_1.ContentType.JSON
1089
- }),
1090
- delete: bindApiCall(this, {
1091
- method: "DELETE",
1092
- path: "groups/:group_id",
1093
- type: web_client_1.ContentType.URLEncoded
1094
- }),
1095
- patch: bindApiCall(this, {
1096
- method: "PUT",
1097
- path: "groups/:group_id/patch",
1098
- type: web_client_1.ContentType.JSON
1099
- }),
1100
- restore: bindApiCall(this, {
1101
- method: "POST",
1102
- path: "groups/:group_id/restore",
1103
- type: web_client_1.ContentType.URLEncoded
1104
- }),
1105
- getStats: bindApiCall(this, {
1106
- method: "GET",
1107
- path: "groups/:group_id/stats",
1108
- type: web_client_1.ContentType.URLEncoded
1109
- }),
1110
- syncables: {
1111
- list: bindApiCall(this, {
1112
- method: "GET",
1113
- path: "groups/:group_id/syncables",
1114
- type: web_client_1.ContentType.URLEncoded
1115
- }),
1116
- add: bindApiCall(this, {
1117
- method: "POST",
1118
- path: "groups/:group_id/syncables",
1119
- type: web_client_1.ContentType.JSON
1120
- }),
1121
- remove: bindApiCall(this, {
1122
- method: "DELETE",
1123
- path: "groups/:group_id/syncables/:syncable_id?syncable_type=:syncable_type",
1124
- type: web_client_1.ContentType.URLEncoded
1125
- }),
1126
- patch: bindApiCall(this, {
1127
- method: "PUT",
1128
- path: "groups/:group_id/syncables/:syncable_id/patch",
1129
- type: web_client_1.ContentType.JSON
1130
- })
1131
- },
1132
1110
  /**
1133
1111
  * ============================================================================
1134
1112
  * @description Group members methods
@@ -1136,12 +1114,12 @@ class Methods extends eventemitter3_1.default {
1136
1114
  */
1137
1115
  members: {
1138
1116
  /**
1139
- * @description Get groups for a user.
1117
+ * @description Add members to a custom group.
1140
1118
  */
1141
- listForUser: bindApiCall(this, {
1142
- method: "GET",
1143
- path: "users/:user_id/groups",
1144
- type: web_client_1.ContentType.URLEncoded
1119
+ add: bindApiCall(this, {
1120
+ method: "POST",
1121
+ path: "groups/:group_id/members",
1122
+ type: web_client_1.ContentType.JSON
1145
1123
  }),
1146
1124
  /**
1147
1125
  * @description Get members of a group.
@@ -1152,12 +1130,12 @@ class Methods extends eventemitter3_1.default {
1152
1130
  type: web_client_1.ContentType.URLEncoded
1153
1131
  }),
1154
1132
  /**
1155
- * @description Add members to a custom group.
1133
+ * @description Get groups for a user.
1156
1134
  */
1157
- add: bindApiCall(this, {
1158
- method: "POST",
1159
- path: "groups/:group_id/members",
1160
- type: web_client_1.ContentType.JSON
1135
+ listForUser: bindApiCall(this, {
1136
+ method: "GET",
1137
+ path: "users/:user_id/groups",
1138
+ type: web_client_1.ContentType.URLEncoded
1161
1139
  }),
1162
1140
  /**
1163
1141
  * @description Remove members from a custom group.
@@ -1168,30 +1146,52 @@ class Methods extends eventemitter3_1.default {
1168
1146
  type: web_client_1.ContentType.JSON
1169
1147
  })
1170
1148
  },
1171
- teams: {
1172
- /**
1173
- * @description Get a group's teams.
1174
- */
1175
- get: bindApiCall(this, {
1149
+ patch: bindApiCall(this, {
1150
+ method: "PUT",
1151
+ path: "groups/:group_id/patch",
1152
+ type: web_client_1.ContentType.JSON
1153
+ }),
1154
+ restore: bindApiCall(this, {
1155
+ method: "POST",
1156
+ path: "groups/:group_id/restore",
1157
+ type: web_client_1.ContentType.URLEncoded
1158
+ }),
1159
+ syncables: {
1160
+ add: bindApiCall(this, {
1161
+ method: "POST",
1162
+ path: "groups/:group_id/syncables",
1163
+ type: web_client_1.ContentType.JSON
1164
+ }),
1165
+ list: bindApiCall(this, {
1176
1166
  method: "GET",
1177
- path: "groups/:group_id/teams",
1167
+ path: "groups/:group_id/syncables",
1168
+ type: web_client_1.ContentType.URLEncoded
1169
+ }),
1170
+ patch: bindApiCall(this, {
1171
+ method: "PUT",
1172
+ path: "groups/:group_id/syncables/:syncable_id/patch",
1173
+ type: web_client_1.ContentType.JSON
1174
+ }),
1175
+ remove: bindApiCall(this, {
1176
+ method: "DELETE",
1177
+ path: "groups/:group_id/syncables/:syncable_id?syncable_type=:syncable_type",
1178
1178
  type: web_client_1.ContentType.URLEncoded
1179
1179
  })
1180
1180
  },
1181
- channels: {
1181
+ teams: {
1182
1182
  /**
1183
- * @description Get a group's channels.
1183
+ * @description Get a group's teams.
1184
1184
  */
1185
1185
  get: bindApiCall(this, {
1186
1186
  method: "GET",
1187
- path: "groups/:group_id/channels",
1187
+ path: "groups/:group_id/teams",
1188
1188
  type: web_client_1.ContentType.URLEncoded
1189
1189
  })
1190
1190
  },
1191
- deleteLdapLink: bindApiCall(this, {
1192
- method: "DELETE",
1193
- path: "groups/:group_id/link",
1194
- type: web_client_1.ContentType.URLEncoded
1191
+ update: bindApiCall(this, {
1192
+ method: "PUT",
1193
+ path: "groups/:group_id",
1194
+ type: web_client_1.ContentType.JSON
1195
1195
  })
1196
1196
  };
1197
1197
  /**
@@ -1200,6 +1200,14 @@ class Methods extends eventemitter3_1.default {
1200
1200
  * ============================================================================
1201
1201
  */
1202
1202
  jobs = {
1203
+ /**
1204
+ * @description Cancel a job.
1205
+ */
1206
+ cancel: bindApiCall(this, {
1207
+ method: "POST",
1208
+ path: "jobs/:job_id/cancel",
1209
+ type: web_client_1.ContentType.JSON
1210
+ }),
1203
1211
  /**
1204
1212
  * @description Create a new job.
1205
1213
  * Requires `manage_jobs` permission.
@@ -1229,50 +1237,21 @@ class Methods extends eventemitter3_1.default {
1229
1237
  * @description List jobs by type.
1230
1238
  */,
1231
1239
  byType: bindApiCall(this, {
1232
- method: "GET",
1233
- path: "jobs/type/:type",
1234
- type: web_client_1.ContentType.URLEncoded
1235
- })
1236
- },
1237
- /**
1238
- * @description Cancel a job.
1239
- */
1240
- cancel: bindApiCall(this, {
1241
- method: "POST",
1242
- path: "jobs/:job_id/cancel",
1243
- type: web_client_1.ContentType.JSON
1244
- })
1245
- };
1246
- /**
1247
- * ============================================================================
1248
- * @description Plugins methods
1249
- * ============================================================================
1250
- */
1251
- plugins = {
1252
- /**
1253
- * @description Upload a plugin.
1254
- * Requires `manage_system` permission.
1255
- */
1256
- upload: bindApiCall(this, {
1257
- method: "POST",
1258
- path: "plugins",
1259
- type: web_client_1.ContentType.FormData
1260
- }),
1261
- install: {
1262
- fromUrl: bindApiCall(this, {
1263
- method: "POST",
1264
- path: "plugins/install_from_url",
1265
- type: web_client_1.ContentType.JSON
1266
- }),
1267
- fromMarketplace: bindApiCall(this, {
1268
- method: "POST",
1269
- path: "plugins/marketplace",
1270
- type: web_client_1.ContentType.JSON
1240
+ method: "GET",
1241
+ path: "jobs/type/:type",
1242
+ type: web_client_1.ContentType.URLEncoded
1271
1243
  })
1272
- },
1273
- remove: bindApiCall(this, {
1274
- method: "DELETE",
1275
- path: "plugins/:plugin_id",
1244
+ }
1245
+ };
1246
+ /**
1247
+ * ============================================================================
1248
+ * @description Plugins methods
1249
+ * ============================================================================
1250
+ */
1251
+ plugins = {
1252
+ disable: bindApiCall(this, {
1253
+ method: "POST",
1254
+ path: "plugins/:plugin_id/disable",
1276
1255
  type: web_client_1.ContentType.URLEncoded
1277
1256
  }),
1278
1257
  enable: bindApiCall(this, {
@@ -1280,19 +1259,14 @@ class Methods extends eventemitter3_1.default {
1280
1259
  path: "plugins/:plugin_id/enable",
1281
1260
  type: web_client_1.ContentType.URLEncoded
1282
1261
  }),
1283
- disable: bindApiCall(this, {
1284
- method: "POST",
1285
- path: "plugins/:plugin_id/disable",
1286
- type: web_client_1.ContentType.URLEncoded
1287
- }),
1288
1262
  get: bindApiCallWithOptionalArg(this, {
1289
1263
  method: "GET",
1290
1264
  path: "plugins",
1291
1265
  type: web_client_1.ContentType.URLEncoded
1292
1266
  }),
1293
- getWebapp: bindApiCallWithOptionalArg(this, {
1267
+ getMarketplace: bindApiCall(this, {
1294
1268
  method: "GET",
1295
- path: "plugins/webapp",
1269
+ path: "plugins/marketplace",
1296
1270
  type: web_client_1.ContentType.URLEncoded
1297
1271
  }),
1298
1272
  getStatuses: bindApiCallWithOptionalArg(this, {
@@ -1300,10 +1274,36 @@ class Methods extends eventemitter3_1.default {
1300
1274
  path: "plugins/statuses",
1301
1275
  type: web_client_1.ContentType.URLEncoded
1302
1276
  }),
1303
- getMarketplace: bindApiCall(this, {
1277
+ getWebapp: bindApiCallWithOptionalArg(this, {
1304
1278
  method: "GET",
1305
- path: "plugins/marketplace",
1279
+ path: "plugins/webapp",
1280
+ type: web_client_1.ContentType.URLEncoded
1281
+ }),
1282
+ install: {
1283
+ fromMarketplace: bindApiCall(this, {
1284
+ method: "POST",
1285
+ path: "plugins/marketplace",
1286
+ type: web_client_1.ContentType.JSON
1287
+ }),
1288
+ fromUrl: bindApiCall(this, {
1289
+ method: "POST",
1290
+ path: "plugins/install_from_url",
1291
+ type: web_client_1.ContentType.JSON
1292
+ })
1293
+ },
1294
+ remove: bindApiCall(this, {
1295
+ method: "DELETE",
1296
+ path: "plugins/:plugin_id",
1306
1297
  type: web_client_1.ContentType.URLEncoded
1298
+ }),
1299
+ /**
1300
+ * @description Upload a plugin.
1301
+ * Requires `manage_system` permission.
1302
+ */
1303
+ upload: bindApiCall(this, {
1304
+ method: "POST",
1305
+ path: "plugins",
1306
+ type: web_client_1.ContentType.FormData
1307
1307
  })
1308
1308
  };
1309
1309
  /**
@@ -1386,14 +1386,19 @@ class Methods extends eventemitter3_1.default {
1386
1386
  * ============================================================================
1387
1387
  */
1388
1388
  teams = {
1389
+ checkNameExists: bindApiCall(this, {
1390
+ method: "GET",
1391
+ path: "teams/name/:name/exists",
1392
+ type: web_client_1.ContentType.URLEncoded
1393
+ }),
1389
1394
  create: bindApiCall(this, {
1390
1395
  method: "POST",
1391
1396
  path: "teams",
1392
1397
  type: web_client_1.ContentType.JSON
1393
1398
  }),
1394
- list: bindApiCallWithOptionalArg(this, {
1395
- method: "GET",
1396
- path: "teams",
1399
+ delete: bindApiCall(this, {
1400
+ method: "DELETE",
1401
+ path: "teams/:team_id",
1397
1402
  type: web_client_1.ContentType.URLEncoded
1398
1403
  }),
1399
1404
  get: {
@@ -1408,73 +1413,39 @@ class Methods extends eventemitter3_1.default {
1408
1413
  type: web_client_1.ContentType.URLEncoded
1409
1414
  })
1410
1415
  },
1411
- update: bindApiCall(this, {
1412
- method: "PUT",
1413
- path: "teams/:id",
1414
- type: web_client_1.ContentType.JSON
1415
- }),
1416
- delete: bindApiCall(this, {
1417
- method: "DELETE",
1418
- path: "teams/:team_id",
1419
- type: web_client_1.ContentType.URLEncoded
1420
- }),
1421
- patch: bindApiCall(this, {
1422
- method: "PUT",
1423
- path: "teams/:team_id/patch",
1424
- type: web_client_1.ContentType.JSON
1425
- }),
1426
- regenerateInviteId: bindApiCall(this, {
1427
- method: "POST",
1428
- path: "teams/:team_id/regenerate_invite_id",
1429
- type: web_client_1.ContentType.URLEncoded
1430
- }),
1431
1416
  getStats: bindApiCall(this, {
1432
1417
  method: "GET",
1433
1418
  path: "teams/:team_id/stats",
1434
1419
  type: web_client_1.ContentType.URLEncoded
1435
1420
  }),
1436
- search: bindApiCall(this, {
1437
- method: "POST",
1438
- path: "teams/search",
1439
- type: web_client_1.ContentType.JSON
1440
- }),
1441
- checkNameExists: bindApiCall(this, {
1442
- method: "GET",
1443
- path: "teams/name/:name/exists",
1444
- type: web_client_1.ContentType.URLEncoded
1445
- }),
1446
- import: bindApiCall(this, {
1447
- method: "POST",
1448
- path: "teams/import",
1449
- type: web_client_1.ContentType.FormData
1450
- }),
1451
1421
  icon: {
1452
- set: bindApiCall(this, {
1453
- method: "POST",
1422
+ get: bindApiCall(this, {
1423
+ method: "GET",
1454
1424
  path: "teams/:team_id/image",
1455
- type: web_client_1.ContentType.FormData
1425
+ type: web_client_1.ContentType.URLEncoded
1456
1426
  }),
1457
1427
  remove: bindApiCall(this, {
1458
1428
  method: "DELETE",
1459
1429
  path: "teams/:team_id/image",
1460
1430
  type: web_client_1.ContentType.URLEncoded
1461
1431
  }),
1462
- get: bindApiCall(this, {
1463
- method: "GET",
1432
+ set: bindApiCall(this, {
1433
+ method: "POST",
1464
1434
  path: "teams/:team_id/image",
1465
- type: web_client_1.ContentType.URLEncoded
1435
+ type: web_client_1.ContentType.FormData
1466
1436
  })
1467
1437
  },
1438
+ import: bindApiCall(this, {
1439
+ method: "POST",
1440
+ path: "teams/import",
1441
+ type: web_client_1.ContentType.FormData
1442
+ }),
1443
+ list: bindApiCallWithOptionalArg(this, {
1444
+ method: "GET",
1445
+ path: "teams",
1446
+ type: web_client_1.ContentType.URLEncoded
1447
+ }),
1468
1448
  members: {
1469
- /**
1470
- * @description Get a page of team members list.
1471
- * Requires `view_team` permission.
1472
- */
1473
- list: bindApiCall(this, {
1474
- method: "GET",
1475
- path: "teams/:team_id/members",
1476
- type: web_client_1.ContentType.URLEncoded
1477
- }),
1478
1449
  /**
1479
1450
  * @description Add a user to a team.
1480
1451
  * Requires `add_user_to_team` permission.
@@ -1501,6 +1472,23 @@ class Methods extends eventemitter3_1.default {
1501
1472
  path: "teams/:team_id/members/:user_id",
1502
1473
  type: web_client_1.ContentType.URLEncoded
1503
1474
  }),
1475
+ /**
1476
+ * @description Get a list of team members based on user IDs.
1477
+ */
1478
+ getByIds: bindApiCall(this, {
1479
+ method: "POST",
1480
+ path: "teams/:team_id/members/ids",
1481
+ type: web_client_1.ContentType.JSON
1482
+ }),
1483
+ /**
1484
+ * @description Get a page of team members list.
1485
+ * Requires `view_team` permission.
1486
+ */
1487
+ list: bindApiCall(this, {
1488
+ method: "GET",
1489
+ path: "teams/:team_id/members",
1490
+ type: web_client_1.ContentType.URLEncoded
1491
+ }),
1504
1492
  /**
1505
1493
  * @description Remove a user from a team.
1506
1494
  * Requires `remove_user_from_team` permission.
@@ -1510,14 +1498,6 @@ class Methods extends eventemitter3_1.default {
1510
1498
  path: "teams/:team_id/members/:user_id",
1511
1499
  type: web_client_1.ContentType.URLEncoded
1512
1500
  }),
1513
- /**
1514
- * @description Get a list of team members based on user IDs.
1515
- */
1516
- getByIds: bindApiCall(this, {
1517
- method: "POST",
1518
- path: "teams/:team_id/members/ids",
1519
- type: web_client_1.ContentType.JSON
1520
- }),
1521
1501
  /**
1522
1502
  * @description Update the roles of a team member.
1523
1503
  */
@@ -1534,26 +1514,31 @@ class Methods extends eventemitter3_1.default {
1534
1514
  path: "teams/:team_id/members/:user_id/scheme_roles",
1535
1515
  type: web_client_1.ContentType.JSON
1536
1516
  })
1537
- }
1538
- };
1539
- playbooks = {
1540
- list: bindApiCall(this, {
1541
- method: "GET",
1542
- path: "playbooks",
1543
- type: web_client_1.ContentType.URLEncoded
1517
+ },
1518
+ patch: bindApiCall(this, {
1519
+ method: "PUT",
1520
+ path: "teams/:team_id/patch",
1521
+ type: web_client_1.ContentType.JSON
1544
1522
  }),
1545
- get: bindApiCall(this, {
1546
- method: "GET",
1547
- path: "/playbooks/:id",
1523
+ regenerateInviteId: bindApiCall(this, {
1524
+ method: "POST",
1525
+ path: "teams/:team_id/regenerate_invite_id",
1548
1526
  type: web_client_1.ContentType.URLEncoded
1549
1527
  }),
1550
- create: bindApiCall(this, {
1528
+ search: bindApiCall(this, {
1551
1529
  method: "POST",
1552
- path: "playbooks",
1530
+ path: "teams/search",
1553
1531
  type: web_client_1.ContentType.JSON
1554
1532
  }),
1555
1533
  update: bindApiCall(this, {
1556
1534
  method: "PUT",
1535
+ path: "teams/:id",
1536
+ type: web_client_1.ContentType.JSON
1537
+ })
1538
+ };
1539
+ playbooks = {
1540
+ create: bindApiCall(this, {
1541
+ method: "POST",
1557
1542
  path: "playbooks",
1558
1543
  type: web_client_1.ContentType.JSON
1559
1544
  }),
@@ -1562,23 +1547,38 @@ class Methods extends eventemitter3_1.default {
1562
1547
  path: `playbooks/:id`,
1563
1548
  type: web_client_1.ContentType.URLEncoded
1564
1549
  }),
1550
+ get: bindApiCall(this, {
1551
+ method: "GET",
1552
+ path: "/playbooks/:id",
1553
+ type: web_client_1.ContentType.URLEncoded
1554
+ }),
1555
+ list: bindApiCall(this, {
1556
+ method: "GET",
1557
+ path: "playbooks",
1558
+ type: web_client_1.ContentType.URLEncoded
1559
+ }),
1565
1560
  runs: {
1566
- get: bindApiCall(this, {
1567
- method: "GET",
1568
- path: "runs/:id",
1569
- type: web_client_1.ContentType.URLEncoded
1570
- }),
1571
1561
  create: bindApiCall(this, {
1572
1562
  method: "POST",
1573
1563
  path: "runs",
1574
1564
  type: web_client_1.ContentType.JSON
1575
1565
  }),
1566
+ get: bindApiCall(this, {
1567
+ method: "GET",
1568
+ path: "runs/:id",
1569
+ type: web_client_1.ContentType.URLEncoded
1570
+ }),
1576
1571
  list: bindApiCall(this, {
1577
1572
  method: "GET",
1578
1573
  path: "runs",
1579
1574
  type: web_client_1.ContentType.URLEncoded
1580
1575
  })
1581
- }
1576
+ },
1577
+ update: bindApiCall(this, {
1578
+ method: "PUT",
1579
+ path: "playbooks",
1580
+ type: web_client_1.ContentType.JSON
1581
+ })
1582
1582
  };
1583
1583
  /**
1584
1584
  * ============================================================================
@@ -1600,9 +1600,18 @@ class Methods extends eventemitter3_1.default {
1600
1600
  path: "posts/ephemeral",
1601
1601
  type: web_client_1.ContentType.JSON
1602
1602
  }),
1603
- update: bindApiCall(this, {
1604
- method: "PUT",
1605
- path: "posts/:id",
1603
+ delete: bindApiCall(this, {
1604
+ method: "DELETE",
1605
+ path: "posts/:post_id",
1606
+ type: web_client_1.ContentType.URLEncoded
1607
+ }),
1608
+ /**
1609
+ * @description Perform a post action.
1610
+ * Perform an action on a post, such as clicking an interactive button.
1611
+ */
1612
+ doAction: bindApiCall(this, {
1613
+ method: "POST",
1614
+ path: "posts/:post_id/actions/:action_id",
1606
1615
  type: web_client_1.ContentType.JSON
1607
1616
  }),
1608
1617
  get: bindApiCall(this, {
@@ -1610,14 +1619,40 @@ class Methods extends eventemitter3_1.default {
1610
1619
  path: "posts/:post_id",
1611
1620
  type: web_client_1.ContentType.URLEncoded
1612
1621
  }),
1613
- delete: bindApiCall(this, {
1614
- method: "DELETE",
1615
- path: "posts/:post_id",
1622
+ /**
1623
+ * @description Get posts around the last unread.
1624
+ * Get the posts around the oldest unread post in a channel for a given user.
1625
+ */
1626
+ getAroundUnread: bindApiCall(this, {
1627
+ method: "GET",
1628
+ path: "users/:user_id/channels/:channel_id/posts/unread",
1629
+ type: web_client_1.ContentType.URLEncoded
1630
+ }),
1631
+ /**
1632
+ * @description Get posts by IDs.
1633
+ * Get a list of posts based on a provided list of post IDs.
1634
+ */
1635
+ getByIds: bindApiCall(this, {
1636
+ method: "POST",
1637
+ path: "posts/ids",
1638
+ type: web_client_1.ContentType.JSON
1639
+ }),
1640
+ /**
1641
+ * @description Get file info for a post.
1642
+ * Gets a list of file information objects for the files attached to a post.
1643
+ */
1644
+ getFilesInfo: bindApiCall(this, {
1645
+ method: "GET",
1646
+ path: "posts/:post_id/files/info",
1616
1647
  type: web_client_1.ContentType.URLEncoded
1617
1648
  }),
1618
- getThread: bindApiCall(this, {
1649
+ /**
1650
+ * @description Get a list of flagged posts for a user.
1651
+ * Retrieves posts that the specified user has flagged/saved.
1652
+ */
1653
+ getFlagged: bindApiCall(this, {
1619
1654
  method: "GET",
1620
- path: "posts/:post_id/thread",
1655
+ path: "users/:user_id/posts/flagged",
1621
1656
  type: web_client_1.ContentType.URLEncoded
1622
1657
  }),
1623
1658
  getForChannel: bindApiCall(this, {
@@ -1625,14 +1660,9 @@ class Methods extends eventemitter3_1.default {
1625
1660
  path: "channels/:channel_id/posts",
1626
1661
  type: web_client_1.ContentType.URLEncoded
1627
1662
  }),
1628
- pin: bindApiCall(this, {
1629
- method: "POST",
1630
- path: "posts/:post_id/pin",
1631
- type: web_client_1.ContentType.URLEncoded
1632
- }),
1633
- unpin: bindApiCall(this, {
1634
- method: "POST",
1635
- path: "posts/:post_id/unpin",
1663
+ getThread: bindApiCall(this, {
1664
+ method: "GET",
1665
+ path: "posts/:post_id/thread",
1636
1666
  type: web_client_1.ContentType.URLEncoded
1637
1667
  }),
1638
1668
  move: bindApiCall(this, {
@@ -1640,15 +1670,6 @@ class Methods extends eventemitter3_1.default {
1640
1670
  path: "posts/:post_id/move",
1641
1671
  type: web_client_1.ContentType.JSON
1642
1672
  }),
1643
- /**
1644
- * @description Mark a channel as being unread from a given post.
1645
- * Sets the last viewed at timestamp for the user's channel to the post's create_at timestamp.
1646
- */
1647
- setUnread: bindApiCall(this, {
1648
- method: "POST",
1649
- path: "users/:user_id/posts/:post_id/set_unread",
1650
- type: web_client_1.ContentType.JSON
1651
- }),
1652
1673
  /**
1653
1674
  * @description Partially update a post.
1654
1675
  * Updates a post by providing only the fields that need to change.
@@ -1658,31 +1679,9 @@ class Methods extends eventemitter3_1.default {
1658
1679
  path: "posts/:post_id/patch",
1659
1680
  type: web_client_1.ContentType.JSON
1660
1681
  }),
1661
- /**
1662
- * @description Get a list of flagged posts for a user.
1663
- * Retrieves posts that the specified user has flagged/saved.
1664
- */
1665
- getFlagged: bindApiCall(this, {
1666
- method: "GET",
1667
- path: "users/:user_id/posts/flagged",
1668
- type: web_client_1.ContentType.URLEncoded
1669
- }),
1670
- /**
1671
- * @description Get file info for a post.
1672
- * Gets a list of file information objects for the files attached to a post.
1673
- */
1674
- getFilesInfo: bindApiCall(this, {
1675
- method: "GET",
1676
- path: "posts/:post_id/files/info",
1677
- type: web_client_1.ContentType.URLEncoded
1678
- }),
1679
- /**
1680
- * @description Get posts around the last unread.
1681
- * Get the posts around the oldest unread post in a channel for a given user.
1682
- */
1683
- getAroundUnread: bindApiCall(this, {
1684
- method: "GET",
1685
- path: "users/:user_id/channels/:channel_id/posts/unread",
1682
+ pin: bindApiCall(this, {
1683
+ method: "POST",
1684
+ path: "posts/:post_id/pin",
1686
1685
  type: web_client_1.ContentType.URLEncoded
1687
1686
  }),
1688
1687
  /**
@@ -1695,30 +1694,31 @@ class Methods extends eventemitter3_1.default {
1695
1694
  type: web_client_1.ContentType.JSON
1696
1695
  }),
1697
1696
  /**
1698
- * @description Perform a post action.
1699
- * Perform an action on a post, such as clicking an interactive button.
1697
+ * @description Set a reminder for a post.
1698
+ * Set a reminder for the specified user on the specified post.
1700
1699
  */
1701
- doAction: bindApiCall(this, {
1700
+ setReminder: bindApiCall(this, {
1702
1701
  method: "POST",
1703
- path: "posts/:post_id/actions/:action_id",
1702
+ path: "users/:user_id/posts/:post_id/reminder",
1704
1703
  type: web_client_1.ContentType.JSON
1705
1704
  }),
1706
1705
  /**
1707
- * @description Get posts by IDs.
1708
- * Get a list of posts based on a provided list of post IDs.
1706
+ * @description Mark a channel as being unread from a given post.
1707
+ * Sets the last viewed at timestamp for the user's channel to the post's create_at timestamp.
1709
1708
  */
1710
- getByIds: bindApiCall(this, {
1709
+ setUnread: bindApiCall(this, {
1711
1710
  method: "POST",
1712
- path: "posts/ids",
1711
+ path: "users/:user_id/posts/:post_id/set_unread",
1713
1712
  type: web_client_1.ContentType.JSON
1714
1713
  }),
1715
- /**
1716
- * @description Set a reminder for a post.
1717
- * Set a reminder for the specified user on the specified post.
1718
- */
1719
- setReminder: bindApiCall(this, {
1714
+ unpin: bindApiCall(this, {
1720
1715
  method: "POST",
1721
- path: "users/:user_id/posts/:post_id/reminder",
1716
+ path: "posts/:post_id/unpin",
1717
+ type: web_client_1.ContentType.URLEncoded
1718
+ }),
1719
+ update: bindApiCall(this, {
1720
+ method: "PUT",
1721
+ path: "posts/:id",
1722
1722
  type: web_client_1.ContentType.JSON
1723
1723
  })
1724
1724
  };
@@ -1733,11 +1733,6 @@ class Methods extends eventemitter3_1.default {
1733
1733
  path: "reactions",
1734
1734
  type: web_client_1.ContentType.JSON
1735
1735
  }),
1736
- getForPost: bindApiCall(this, {
1737
- method: "GET",
1738
- path: "posts/:post_id/reactions",
1739
- type: web_client_1.ContentType.URLEncoded
1740
- }),
1741
1736
  delete: bindApiCall(this, {
1742
1737
  method: "DELETE",
1743
1738
  path: "users/:user_id/posts/:post_id/reactions/:emoji_name",
@@ -1747,6 +1742,11 @@ class Methods extends eventemitter3_1.default {
1747
1742
  method: "POST",
1748
1743
  path: "reactions/bulk",
1749
1744
  type: web_client_1.ContentType.JSON
1745
+ }),
1746
+ getForPost: bindApiCall(this, {
1747
+ method: "GET",
1748
+ path: "posts/:post_id/reactions",
1749
+ type: web_client_1.ContentType.URLEncoded
1750
1750
  })
1751
1751
  };
1752
1752
  /**
@@ -1755,16 +1755,16 @@ class Methods extends eventemitter3_1.default {
1755
1755
  * ============================================================================
1756
1756
  */
1757
1757
  system = {
1758
- checkHealth: bindApiCallWithOptionalArg(this, {
1759
- method: "GET",
1760
- path: "system/ping",
1761
- type: web_client_1.ContentType.URLEncoded
1762
- }),
1763
1758
  checkDatabaseIntegrity: bindApiCallWithOptionalArg(this, {
1764
1759
  method: "POST",
1765
1760
  path: "system/check_integrity",
1766
1761
  type: web_client_1.ContentType.JSON
1767
1762
  }),
1763
+ checkHealth: bindApiCallWithOptionalArg(this, {
1764
+ method: "GET",
1765
+ path: "system/ping",
1766
+ type: web_client_1.ContentType.URLEncoded
1767
+ }),
1768
1768
  getAnalytics: bindApiCall(this, {
1769
1769
  method: "GET",
1770
1770
  path: "analytics/old",
@@ -1846,11 +1846,6 @@ class Methods extends eventemitter3_1.default {
1846
1846
  * ============================================================================
1847
1847
  */
1848
1848
  users = {
1849
- list: bindApiCallWithOptionalArg(this, {
1850
- method: "GET",
1851
- path: "users",
1852
- type: web_client_1.ContentType.URLEncoded
1853
- }),
1854
1849
  autocomplete: bindApiCall(this, {
1855
1850
  method: "GET",
1856
1851
  path: "users/autocomplete",
@@ -1858,19 +1853,11 @@ class Methods extends eventemitter3_1.default {
1858
1853
  }),
1859
1854
  channels: {
1860
1855
  list: {
1861
- inTeam: this.channels.list.forUserInTeam,
1862
- all: this.channels.list.forUser
1856
+ all: this.channels.list.forUser,
1857
+ inTeam: this.channels.list.forUserInTeam
1863
1858
  },
1864
1859
  sidebar: {
1865
1860
  categories: {
1866
- /**
1867
- * @description Get sidebar categories for a user in a team.
1868
- */
1869
- list: bindApiCall(this, {
1870
- method: "GET",
1871
- path: "users/:user_id/teams/:team_id/channels/categories",
1872
- type: web_client_1.ContentType.URLEncoded
1873
- }),
1874
1861
  /**
1875
1862
  * @description Create a new sidebar category.
1876
1863
  */
@@ -1880,12 +1867,12 @@ class Methods extends eventemitter3_1.default {
1880
1867
  type: web_client_1.ContentType.JSON
1881
1868
  }),
1882
1869
  /**
1883
- * @description Update all sidebar categories for a user.
1870
+ * @description Delete a sidebar category.
1884
1871
  */
1885
- updateAll: bindApiCall(this, {
1886
- method: "PUT",
1887
- path: "users/:user_id/teams/:team_id/channels/categories",
1888
- type: web_client_1.ContentType.JSON
1872
+ delete: bindApiCall(this, {
1873
+ method: "DELETE",
1874
+ path: "users/:user_id/teams/:team_id/channels/categories/:category_id",
1875
+ type: web_client_1.ContentType.URLEncoded
1889
1876
  }),
1890
1877
  /**
1891
1878
  * @description Get a specific sidebar category.
@@ -1895,6 +1882,22 @@ class Methods extends eventemitter3_1.default {
1895
1882
  path: "users/:user_id/teams/:team_id/channels/categories/:category_id",
1896
1883
  type: web_client_1.ContentType.URLEncoded
1897
1884
  }),
1885
+ /**
1886
+ * @description Get sidebar category order.
1887
+ */
1888
+ getOrder: bindApiCall(this, {
1889
+ method: "GET",
1890
+ path: "users/:user_id/teams/:team_id/channels/categories/order",
1891
+ type: web_client_1.ContentType.URLEncoded
1892
+ }),
1893
+ /**
1894
+ * @description Get sidebar categories for a user in a team.
1895
+ */
1896
+ list: bindApiCall(this, {
1897
+ method: "GET",
1898
+ path: "users/:user_id/teams/:team_id/channels/categories",
1899
+ type: web_client_1.ContentType.URLEncoded
1900
+ }),
1898
1901
  /**
1899
1902
  * @description Update a specific sidebar category.
1900
1903
  */
@@ -1904,20 +1907,12 @@ class Methods extends eventemitter3_1.default {
1904
1907
  type: web_client_1.ContentType.JSON
1905
1908
  }),
1906
1909
  /**
1907
- * @description Delete a sidebar category.
1908
- */
1909
- delete: bindApiCall(this, {
1910
- method: "DELETE",
1911
- path: "users/:user_id/teams/:team_id/channels/categories/:category_id",
1912
- type: web_client_1.ContentType.URLEncoded
1913
- }),
1914
- /**
1915
- * @description Get sidebar category order.
1910
+ * @description Update all sidebar categories for a user.
1916
1911
  */
1917
- getOrder: bindApiCall(this, {
1918
- method: "GET",
1919
- path: "users/:user_id/teams/:team_id/channels/categories/order",
1920
- type: web_client_1.ContentType.URLEncoded
1912
+ updateAll: bindApiCall(this, {
1913
+ method: "PUT",
1914
+ path: "users/:user_id/teams/:team_id/channels/categories",
1915
+ type: web_client_1.ContentType.JSON
1921
1916
  }),
1922
1917
  /**
1923
1918
  * @description Update sidebar category order.
@@ -1937,15 +1932,37 @@ class Methods extends eventemitter3_1.default {
1937
1932
  * ============================================================================
1938
1933
  */
1939
1934
  guest: {
1935
+ fromUser: bindApiCall(this, {
1936
+ method: "post",
1937
+ path: `users/:user_id/demote`,
1938
+ type: web_client_1.ContentType.URLEncoded
1939
+ }),
1940
1940
  toUser: bindApiCall(this, {
1941
1941
  method: "POST",
1942
1942
  path: `users/:user_id/promote`,
1943
1943
  type: web_client_1.ContentType.URLEncoded
1944
+ })
1945
+ },
1946
+ list: bindApiCallWithOptionalArg(this, {
1947
+ method: "GET",
1948
+ path: "users",
1949
+ type: web_client_1.ContentType.URLEncoded
1950
+ }),
1951
+ preferences: {
1952
+ delete: bindApiCall(this, {
1953
+ method: "POST",
1954
+ path: "users/:user_id/preferences/delete",
1955
+ type: web_client_1.ContentType.JSON
1944
1956
  }),
1945
- fromUser: bindApiCall(this, {
1946
- method: "post",
1947
- path: `users/:user_id/demote`,
1957
+ get: bindApiCall(this, {
1958
+ method: "GET",
1959
+ path: "users/:user_id/preferences",
1948
1960
  type: web_client_1.ContentType.URLEncoded
1961
+ }),
1962
+ save: bindApiCall(this, {
1963
+ method: "PUT",
1964
+ path: "users/:user_id/preferences",
1965
+ type: web_client_1.ContentType.JSON
1949
1966
  })
1950
1967
  },
1951
1968
  /**
@@ -1956,11 +1973,11 @@ class Methods extends eventemitter3_1.default {
1956
1973
  profile: {
1957
1974
  get: {
1958
1975
  /**
1959
- * @description Retrieve a user's profile information, including their custom status.
1976
+ * @description Find a user with an email address.
1960
1977
  */
1961
- me: bindApiCallWithOptionalArg(this, {
1978
+ byEmail: bindApiCall(this, {
1962
1979
  method: "GET",
1963
- path: `users/:user_id`,
1980
+ path: `users/email/:email`,
1964
1981
  type: web_client_1.ContentType.URLEncoded
1965
1982
  }),
1966
1983
  /**
@@ -1974,33 +1991,29 @@ class Methods extends eventemitter3_1.default {
1974
1991
  /**
1975
1992
  * @description Find a user with an email address.
1976
1993
  */
1977
- byEmail: bindApiCall(this, {
1994
+ byUsername: bindApiCall(this, {
1978
1995
  method: "GET",
1979
- path: `users/email/:email`,
1996
+ path: `users/username/:username`,
1980
1997
  type: web_client_1.ContentType.URLEncoded
1981
1998
  }),
1982
1999
  /**
1983
- * @description Find a user with an email address.
2000
+ * @description Retrieve a user's profile information, including their custom status.
1984
2001
  */
1985
- byUsername: bindApiCall(this, {
2002
+ me: bindApiCallWithOptionalArg(this, {
1986
2003
  method: "GET",
1987
- path: `users/username/:username`,
2004
+ path: `users/:user_id`,
1988
2005
  type: web_client_1.ContentType.URLEncoded
1989
2006
  })
1990
2007
  },
1991
- /**
1992
- * @description Set a user's profile information, including custom status.
1993
- * @see {@link https://docs.slack.dev/reference/methods/users.profile.set `users.profile.set` API reference}.
1994
- */
1995
- patch: bindApiCall(this, {
1996
- method: "PUT",
1997
- path: `users/:user_id`,
1998
- type: web_client_1.ContentType.JSON
1999
- }),
2000
2008
  /**
2001
2009
  * @description Profile image methods
2002
2010
  */
2003
2011
  image: {
2012
+ delete: bindApiCallWithOptionalArg(this, {
2013
+ method: "DELETE",
2014
+ path: `users/:user_id/image`,
2015
+ type: web_client_1.ContentType.URLEncoded
2016
+ }),
2004
2017
  /**
2005
2018
  * @description Set the user profile image.
2006
2019
  */
@@ -2010,13 +2023,17 @@ class Methods extends eventemitter3_1.default {
2010
2023
  type: web_client_1.ContentType.URLEncoded
2011
2024
  }) /**
2012
2025
  * @description Delete the user profile image.
2013
- */,
2014
- delete: bindApiCallWithOptionalArg(this, {
2015
- method: "DELETE",
2016
- path: `users/:user_id/image`,
2017
- type: web_client_1.ContentType.URLEncoded
2018
- })
2019
- }
2026
+ */
2027
+ },
2028
+ /**
2029
+ * @description Set a user's profile information, including custom status.
2030
+ * @see {@link https://docs.slack.dev/reference/methods/users.profile.set `users.profile.set` API reference}.
2031
+ */
2032
+ patch: bindApiCall(this, {
2033
+ method: "PUT",
2034
+ path: `users/:user_id`,
2035
+ type: web_client_1.ContentType.JSON
2036
+ })
2020
2037
  },
2021
2038
  search: bindApiCall(this, {
2022
2039
  method: "POST",
@@ -2052,23 +2069,6 @@ class Methods extends eventemitter3_1.default {
2052
2069
  type: web_client_1.ContentType.URLEncoded
2053
2070
  })
2054
2071
  },
2055
- preferences: {
2056
- get: bindApiCall(this, {
2057
- method: "GET",
2058
- path: "users/:user_id/preferences",
2059
- type: web_client_1.ContentType.URLEncoded
2060
- }),
2061
- save: bindApiCall(this, {
2062
- method: "PUT",
2063
- path: "users/:user_id/preferences",
2064
- type: web_client_1.ContentType.JSON
2065
- }),
2066
- delete: bindApiCall(this, {
2067
- method: "POST",
2068
- path: "users/:user_id/preferences/delete",
2069
- type: web_client_1.ContentType.JSON
2070
- })
2071
- },
2072
2072
  updateRoles: bindApiCall(this, {
2073
2073
  method: "PUT",
2074
2074
  path: `users/:user_id/roles`,