@distilled.cloud/slack 1.0.0-rc.17 → 1.0.0-rc.19

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 (201) hide show
  1. package/lib/_bundle/sdk.js +1 -1
  2. package/lib/_bundle/sdk.js.map +1 -1
  3. package/lib/credentials.d.ts +2 -1
  4. package/lib/credentials.d.ts.map +1 -1
  5. package/lib/index.d.ts +3 -4
  6. package/lib/index.d.ts.map +1 -1
  7. package/lib/index.lazy.js.map +1 -1
  8. package/lib/protocol.d.ts +3 -2
  9. package/lib/protocol.d.ts.map +1 -1
  10. package/lib/services/admin.d.ts +594 -356
  11. package/lib/services/admin.d.ts.map +1 -1
  12. package/lib/services/admin.js +149 -139
  13. package/lib/services/admin.js.map +1 -1
  14. package/lib/services/agents.d.ts +89 -97
  15. package/lib/services/agents.d.ts.map +1 -1
  16. package/lib/services/agents.js +1 -1
  17. package/lib/services/agents.js.map +1 -1
  18. package/lib/services/api.d.ts +2 -2
  19. package/lib/services/api.d.ts.map +1 -1
  20. package/lib/services/api.js +1 -1
  21. package/lib/services/api.js.map +1 -1
  22. package/lib/services/apps.d.ts +74 -74
  23. package/lib/services/apps.d.ts.map +1 -1
  24. package/lib/services/apps.js +34 -33
  25. package/lib/services/apps.js.map +1 -1
  26. package/lib/services/assistant.d.ts +55 -46
  27. package/lib/services/assistant.d.ts.map +1 -1
  28. package/lib/services/assistant.js +1 -1
  29. package/lib/services/assistant.js.map +1 -1
  30. package/lib/services/auth.d.ts +27 -27
  31. package/lib/services/auth.d.ts.map +1 -1
  32. package/lib/services/auth.js +1 -1
  33. package/lib/services/auth.js.map +1 -1
  34. package/lib/services/blocks.d.ts +3 -3
  35. package/lib/services/blocks.d.ts.map +1 -1
  36. package/lib/services/blocks.js +1 -1
  37. package/lib/services/blocks.js.map +1 -1
  38. package/lib/services/bookmarks.d.ts +19 -19
  39. package/lib/services/bookmarks.d.ts.map +1 -1
  40. package/lib/services/bookmarks.js +1 -1
  41. package/lib/services/bookmarks.js.map +1 -1
  42. package/lib/services/bots.d.ts +23 -23
  43. package/lib/services/bots.d.ts.map +1 -1
  44. package/lib/services/bots.js +1 -1
  45. package/lib/services/bots.js.map +1 -1
  46. package/lib/services/calls.d.ts +10 -10
  47. package/lib/services/calls.d.ts.map +1 -1
  48. package/lib/services/calls.js +1 -1
  49. package/lib/services/calls.js.map +1 -1
  50. package/lib/services/canvases.d.ts +18 -18
  51. package/lib/services/canvases.d.ts.map +1 -1
  52. package/lib/services/canvases.js +1 -1
  53. package/lib/services/canvases.js.map +1 -1
  54. package/lib/services/chat.d.ts +103 -103
  55. package/lib/services/chat.d.ts.map +1 -1
  56. package/lib/services/chat.js +1 -1
  57. package/lib/services/chat.js.map +1 -1
  58. package/lib/services/conversations.d.ts +109 -103
  59. package/lib/services/conversations.d.ts.map +1 -1
  60. package/lib/services/conversations.js +39 -38
  61. package/lib/services/conversations.js.map +1 -1
  62. package/lib/services/dialog.d.ts.map +1 -1
  63. package/lib/services/dialog.js +1 -1
  64. package/lib/services/dialog.js.map +1 -1
  65. package/lib/services/dnd.d.ts +14 -14
  66. package/lib/services/dnd.d.ts.map +1 -1
  67. package/lib/services/dnd.js +1 -1
  68. package/lib/services/dnd.js.map +1 -1
  69. package/lib/services/emoji.d.ts +6 -6
  70. package/lib/services/emoji.d.ts.map +1 -1
  71. package/lib/services/emoji.js +1 -1
  72. package/lib/services/emoji.js.map +1 -1
  73. package/lib/services/entity.d.ts +14 -14
  74. package/lib/services/entity.d.ts.map +1 -1
  75. package/lib/services/entity.js +1 -1
  76. package/lib/services/entity.js.map +1 -1
  77. package/lib/services/files.d.ts +106 -106
  78. package/lib/services/files.d.ts.map +1 -1
  79. package/lib/services/files.js +30 -1
  80. package/lib/services/files.js.map +1 -1
  81. package/lib/services/functions.d.ts +37 -37
  82. package/lib/services/functions.d.ts.map +1 -1
  83. package/lib/services/functions.js +1 -1
  84. package/lib/services/functions.js.map +1 -1
  85. package/lib/services/index.d.ts +1 -0
  86. package/lib/services/index.d.ts.map +1 -1
  87. package/lib/services/index.js +1 -0
  88. package/lib/services/lists.d.ts +47 -45
  89. package/lib/services/lists.d.ts.map +1 -1
  90. package/lib/services/lists.js +1 -1
  91. package/lib/services/lists.js.map +1 -1
  92. package/lib/services/migration.d.ts +3 -3
  93. package/lib/services/migration.d.ts.map +1 -1
  94. package/lib/services/migration.js +1 -1
  95. package/lib/services/migration.js.map +1 -1
  96. package/lib/services/oauth.d.ts +102 -102
  97. package/lib/services/oauth.d.ts.map +1 -1
  98. package/lib/services/oauth.js +1 -1
  99. package/lib/services/oauth.js.map +1 -1
  100. package/lib/services/openid.d.ts +40 -40
  101. package/lib/services/openid.d.ts.map +1 -1
  102. package/lib/services/openid.js +1 -1
  103. package/lib/services/openid.js.map +1 -1
  104. package/lib/services/pins.d.ts +9 -9
  105. package/lib/services/pins.d.ts.map +1 -1
  106. package/lib/services/pins.js +1 -1
  107. package/lib/services/pins.js.map +1 -1
  108. package/lib/services/reactions.d.ts +23 -23
  109. package/lib/services/reactions.d.ts.map +1 -1
  110. package/lib/services/reactions.js +1 -1
  111. package/lib/services/reactions.js.map +1 -1
  112. package/lib/services/reminders.d.ts +8 -8
  113. package/lib/services/reminders.d.ts.map +1 -1
  114. package/lib/services/reminders.js +1 -1
  115. package/lib/services/reminders.js.map +1 -1
  116. package/lib/services/rtm.d.ts +11 -11
  117. package/lib/services/rtm.d.ts.map +1 -1
  118. package/lib/services/rtm.js +1 -1
  119. package/lib/services/rtm.js.map +1 -1
  120. package/lib/services/search.d.ts +84 -80
  121. package/lib/services/search.d.ts.map +1 -1
  122. package/lib/services/search.js +1 -1
  123. package/lib/services/search.js.map +1 -1
  124. package/lib/services/slackbot.d.ts +366 -0
  125. package/lib/services/slackbot.d.ts.map +1 -0
  126. package/lib/services/slackbot.js +2 -0
  127. package/lib/services/slackbot.js.map +1 -0
  128. package/lib/services/stars.d.ts +16 -16
  129. package/lib/services/stars.d.ts.map +1 -1
  130. package/lib/services/stars.js +1 -1
  131. package/lib/services/stars.js.map +1 -1
  132. package/lib/services/team.d.ts +39 -37
  133. package/lib/services/team.d.ts.map +1 -1
  134. package/lib/services/team.js +1 -1
  135. package/lib/services/team.js.map +1 -1
  136. package/lib/services/tooling.d.ts.map +1 -1
  137. package/lib/services/tooling.js +1 -1
  138. package/lib/services/tooling.js.map +1 -1
  139. package/lib/services/usergroups.d.ts +30 -30
  140. package/lib/services/usergroups.d.ts.map +1 -1
  141. package/lib/services/usergroups.js +1 -1
  142. package/lib/services/usergroups.js.map +1 -1
  143. package/lib/services/users.d.ts +37 -37
  144. package/lib/services/users.d.ts.map +1 -1
  145. package/lib/services/users.js +1 -1
  146. package/lib/services/users.js.map +1 -1
  147. package/lib/services/views.d.ts +9 -9
  148. package/lib/services/views.d.ts.map +1 -1
  149. package/lib/services/views.js +1 -1
  150. package/lib/services/views.js.map +1 -1
  151. package/lib/services/workflows.d.ts +16 -16
  152. package/lib/services/workflows.d.ts.map +1 -1
  153. package/lib/services/workflows.js +1 -1
  154. package/lib/services/workflows.js.map +1 -1
  155. package/lib/services.lazy/admin.js +2 -2
  156. package/lib/services.lazy/apps.js +1 -1
  157. package/lib/services.lazy/conversations.js +1 -1
  158. package/lib/services.lazy/files.js +3 -1
  159. package/lib/services.lazy/index.js +2 -2
  160. package/lib/services.lazy/slackbot.js +1 -0
  161. package/package.json +8 -7
  162. package/src/credentials.ts +3 -2
  163. package/src/index.ts +3 -4
  164. package/src/protocol.ts +23 -21
  165. package/src/services/admin.ts +1882 -1034
  166. package/src/services/agents.ts +128 -103
  167. package/src/services/api.ts +17 -2
  168. package/src/services/apps.ts +133 -74
  169. package/src/services/assistant.ts +109 -54
  170. package/src/services/auth.ts +46 -27
  171. package/src/services/blocks.ts +18 -3
  172. package/src/services/bookmarks.ts +40 -19
  173. package/src/services/bots.ts +38 -23
  174. package/src/services/calls.ts +35 -10
  175. package/src/services/canvases.ts +77 -46
  176. package/src/services/chat.ts +142 -103
  177. package/src/services/conversations.ts +195 -115
  178. package/src/services/dialog.ts +15 -0
  179. package/src/services/dnd.ts +37 -14
  180. package/src/services/emoji.ts +21 -6
  181. package/src/services/entity.ts +33 -14
  182. package/src/services/files.ts +149 -106
  183. package/src/services/functions.ts +66 -37
  184. package/src/services/index.ts +1 -0
  185. package/src/services/lists.ts +86 -46
  186. package/src/services/migration.ts +18 -3
  187. package/src/services/oauth.ts +127 -102
  188. package/src/services/openid.ts +57 -40
  189. package/src/services/pins.ts +28 -9
  190. package/src/services/reactions.ts +44 -23
  191. package/src/services/reminders.ts +31 -8
  192. package/src/services/rtm.ts +28 -11
  193. package/src/services/search.ts +142 -130
  194. package/src/services/slackbot.ts +766 -0
  195. package/src/services/stars.ts +35 -16
  196. package/src/services/team.ts +73 -37
  197. package/src/services/tooling.ts +15 -0
  198. package/src/services/usergroups.ts +57 -30
  199. package/src/services/users.ts +76 -37
  200. package/src/services/views.ts +30 -9
  201. package/src/services/workflows.ts +45 -16
@@ -11,25 +11,38 @@ const __s: any[] = [];
11
11
 
12
12
  export type { SlackOpError, SlackOpContext };
13
13
 
14
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
15
+ const TELEMETRY = {
16
+ system: "slack-api",
17
+ responseHeaders: [
18
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
19
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
20
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
21
+ ],
22
+ prefix: "Slack",
23
+ service: "Bookmarks",
24
+ propagate: "w3c",
25
+ } as const;
26
+
14
27
  /** The level that we are setting the file's permission to (read or write) */
15
28
  export type AddBookmarkRequestAccessLevel = "read" | "write";
16
29
  export interface AddBookmarkRequest {
17
30
  /** Channel to add bookmark in. Required for public channels. */
18
- channel_id?: string;
31
+ channel_id?: string | undefined;
19
32
  /** Title for the bookmark. */
20
33
  title: string;
21
34
  /** Link to bookmark. */
22
- link?: string;
35
+ link?: string | undefined;
23
36
  /** Type of the bookmark i.e link. */
24
37
  type: string;
25
38
  /** Emoji tag to apply to the link. */
26
- emoji?: string;
39
+ emoji?: string | undefined;
27
40
  /** ID of the entity being bookmarked. Only applies to message and file types. */
28
- entity_id?: string;
41
+ entity_id?: string | undefined;
29
42
  /** The level that we are setting the file's permission to (read or write) */
30
- access_level?: AddBookmarkRequestAccessLevel | (string & {});
43
+ access_level?: AddBookmarkRequestAccessLevel | (string & {}) | undefined;
31
44
  /** Id of this bookmark's parent */
32
- parent_id?: string;
45
+ parent_id?: string | undefined;
33
46
  }
34
47
  export interface AddBookmarkResponse {
35
48
  /** Always `true` (a failed call raises a typed error instead). */
@@ -38,15 +51,15 @@ export interface AddBookmarkResponse {
38
51
  }
39
52
  export interface EditBookmarkRequest {
40
53
  /** Channel to update bookmark in. Required for public channels. */
41
- channel_id?: string;
54
+ channel_id?: string | undefined;
42
55
  /** Bookmark to update. Required for public channels. */
43
- bookmark_id?: string;
56
+ bookmark_id?: string | undefined;
44
57
  /** Title for the bookmark. */
45
- title?: string;
58
+ title?: string | undefined;
46
59
  /** Link to bookmark. */
47
- link?: string;
60
+ link?: string | undefined;
48
61
  /** Emoji tag to apply to the link. */
49
- emoji?: string;
62
+ emoji?: string | undefined;
50
63
  }
51
64
  export interface EditBookmarkResponse {
52
65
  /** Always `true` (a failed call raises a typed error instead). */
@@ -55,7 +68,7 @@ export interface EditBookmarkResponse {
55
68
  }
56
69
  export interface ListBookmarksRequest {
57
70
  /** Channel to list bookmarks in. Required for public channels. */
58
- channel_id?: string;
71
+ channel_id?: string | undefined;
59
72
  }
60
73
  export type ListBookmarksResponseBookmarksList = Array<unknown>;
61
74
  export interface ListBookmarksResponse {
@@ -65,18 +78,18 @@ export interface ListBookmarksResponse {
65
78
  }
66
79
  export interface RemoveBookmarkRequest {
67
80
  /** Channel to remove bookmark. Required for public channels. */
68
- channel_id?: string;
81
+ channel_id?: string | undefined;
69
82
  /** Bookmark to remove. Required for public channels. */
70
- bookmark_id?: string;
83
+ bookmark_id?: string | undefined;
71
84
  /** Quip section ID to unbookmark */
72
- quip_section_id?: string;
85
+ quip_section_id?: string | undefined;
73
86
  }
74
87
  export interface RemoveBookmarkResponse {
75
88
  /** Always `true` (a failed call raises a typed error instead). */
76
89
  ok: boolean;
77
90
  }
78
91
  export type AddBookmarkError = SlackOpError;
79
- /** Add bookmark to a channel. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `cannot_bookmark_from_external_org` -- File is an external file and cannot be bookmarked. - `cannot_bookmark_restricted_sharing_enabled` -- File has restricted sharing enabled and cannot be bookmarked. - `channel_not_found` -- Channel cannot be found. - `file_already_added` -- The file has already been added to the folder. - `file_not_found` -- File cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `invalid_app_action_type` -- App action type is not valid. - `invalid_shortcut_type` -- Shortcut type is not valid. - `invalid_child_type` -- Child type is not valid. - `invalid_emoji` -- Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_entity_id` -- Invalid entity_id, file or message type bookmark should have original file or message ID. - `invalid_link` -- Invalid link, link should begin with either http:// or https://. - `invalid_parent_type` -- Parent type is not valid. - `not_implemented` -- bookmarking not available for the user. - `parent_bookmark_disabled` -- Parent bookmark feature flag is off. - `parent_with_link` -- Parent bookmark should not have link. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot add workflow bookmarks to this channel. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect communications - `too_many_bookmarks` -- Bookmark limit reached for channel. - `too_many_tabs` -- tab limit reached for channel. - `too_many_requests` -- Too many concurrent requests. Please retry. See https://docs.slack.dev/reference/methods/bookmarks.add */
92
+ /** Add bookmark to a channel. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `cannot_bookmark_from_external_org` -- File is an external file and cannot be bookmarked. - `cannot_bookmark_restricted_sharing_enabled` -- File has restricted sharing enabled and cannot be bookmarked. - `channel_not_found` -- Channel cannot be found. - `file_already_added` -- The file has already been added to the folder. - `file_not_found` -- File cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `invalid_app_action_type` -- App action type is not valid. - `invalid_shortcut_type` -- Shortcut type is not valid. - `invalid_child_type` -- Child type is not valid. - `invalid_emoji` -- Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_entity_id` -- Invalid entity_id, file or message type bookmark should have original file or message ID. - `invalid_link` -- Invalid link, link should begin with either http:// or https://. - `invalid_parent_type` -- Parent type is not valid. - `parent_bookmark_disabled` -- Parent bookmark feature flag is off. - `parent_with_link` -- Parent bookmark should not have link. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot add workflow bookmarks to this channel. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect communications - `too_many_bookmarks` -- Bookmark limit reached for channel. - `too_many_tabs` -- tab limit reached for channel. - `too_many_requests` -- Too many concurrent requests. Please retry. See https://docs.slack.dev/reference/methods/bookmarks.add */
80
93
  export const addBookmark: API.OperationMethod<
81
94
  AddBookmarkRequest,
82
95
  AddBookmarkResponse,
@@ -88,10 +101,12 @@ export const addBookmark: API.OperationMethod<
88
101
  errors: [SlackError, SlackRateLimited],
89
102
  protocol: SlackProtocol,
90
103
  retry: Retry.Retry,
104
+ telemetry: TELEMETRY,
105
+ span: "AddBookmark",
91
106
  }));
92
107
 
93
108
  export type EditBookmarkError = SlackOpError;
94
- /** Edit bookmark. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `invalid_emoji` -- Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_link` -- Invalid link, link should begin with either http:// or https://. - `not_found` -- Bookmark cannot be found. - `not_implemented` -- bookmarking not available for the user. - `parent_with_link` -- Parent bookmark should not have link. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot edit workflow bookmarks in this channel. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect communications See https://docs.slack.dev/reference/methods/bookmarks.edit */
109
+ /** Edit bookmark. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `invalid_emoji` -- Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_link` -- Invalid link, link should begin with either http:// or https://. - `not_found` -- Bookmark cannot be found. - `parent_with_link` -- Parent bookmark should not have link. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot edit workflow bookmarks in this channel. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect communications See https://docs.slack.dev/reference/methods/bookmarks.edit */
95
110
  export const editBookmark: API.OperationMethod<
96
111
  EditBookmarkRequest,
97
112
  EditBookmarkResponse,
@@ -103,10 +118,12 @@ export const editBookmark: API.OperationMethod<
103
118
  errors: [SlackError, SlackRateLimited],
104
119
  protocol: SlackProtocol,
105
120
  retry: Retry.Retry,
121
+ telemetry: TELEMETRY,
122
+ span: "EditBookmark",
106
123
  }));
107
124
 
108
125
  export type ListBookmarksError = SlackOpError;
109
- /** List bookmark for the channel. Required scopes -- bot: `bookmarks:read`; user: `bookmarks:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `not_implemented` -- bookmarking not available for the user. See https://docs.slack.dev/reference/methods/bookmarks.list */
126
+ /** List bookmark for the channel. Required scopes -- bot: `bookmarks:read`; user: `bookmarks:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. See https://docs.slack.dev/reference/methods/bookmarks.list */
110
127
  export const listBookmarks: API.OperationMethod<
111
128
  ListBookmarksRequest,
112
129
  ListBookmarksResponse,
@@ -118,10 +135,12 @@ export const listBookmarks: API.OperationMethod<
118
135
  errors: [SlackError, SlackRateLimited],
119
136
  protocol: SlackProtocol,
120
137
  retry: Retry.Retry,
138
+ telemetry: TELEMETRY,
139
+ span: "ListBookmarks",
121
140
  }));
122
141
 
123
142
  export type RemoveBookmarkError = SlackOpError;
124
- /** Remove bookmark from the channel. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `user_not_found` -- User cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `not_found` -- Bookmark cannot be found. - `not_implemented` -- bookmarking not available for the user. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot remove workflow bookmarks from this channel. See https://docs.slack.dev/reference/methods/bookmarks.remove */
143
+ /** Remove bookmark from the channel. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `user_not_found` -- User cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `not_found` -- Bookmark cannot be found. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot remove workflow bookmarks from this channel. See https://docs.slack.dev/reference/methods/bookmarks.remove */
125
144
  export const removeBookmark: API.OperationMethod<
126
145
  RemoveBookmarkRequest,
127
146
  RemoveBookmarkResponse,
@@ -133,6 +152,8 @@ export const removeBookmark: API.OperationMethod<
133
152
  errors: [SlackError, SlackRateLimited],
134
153
  protocol: SlackProtocol,
135
154
  retry: Retry.Retry,
155
+ telemetry: TELEMETRY,
156
+ span: "RemoveBookmark",
136
157
  }));
137
158
 
138
159
  // Schema builders: each runs one schema initializer, on that schema's first use.
@@ -11,50 +11,63 @@ const __s: any[] = [];
11
11
 
12
12
  export type { SlackOpError, SlackOpContext };
13
13
 
14
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
15
+ const TELEMETRY = {
16
+ system: "slack-api",
17
+ responseHeaders: [
18
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
19
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
20
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
21
+ ],
22
+ prefix: "Slack",
23
+ service: "Bots",
24
+ propagate: "w3c",
25
+ } as const;
26
+
14
27
  export interface BotsInfoRequest {
15
28
  /** Bot user to get info on */
16
- bot?: string;
29
+ bot?: string | undefined;
17
30
  /** encoded team id or enterprise id where the bot exists, required if org token is used */
18
- team_id?: string;
31
+ team_id?: string | undefined;
19
32
  }
20
33
  export interface BotsInfoResponseBotsItemIcons {
21
- emoji?: string;
22
- image_36?: string;
23
- image_48?: string;
24
- image_64?: string;
25
- image_72?: string;
34
+ emoji?: string | undefined;
35
+ image_36?: string | undefined;
36
+ image_48?: string | undefined;
37
+ image_64?: string | undefined;
38
+ image_72?: string | undefined;
26
39
  }
27
40
  export interface BotsInfoResponseBotsItem {
28
41
  updated: number;
29
- name?: string;
30
- icons?: BotsInfoResponseBotsItemIcons;
42
+ name?: string | undefined;
43
+ icons?: BotsInfoResponseBotsItemIcons | undefined;
31
44
  deleted: boolean;
32
- app_id?: string;
45
+ app_id?: string | undefined;
33
46
  id: string;
34
- is_workflow_bot?: boolean;
35
- is_connector_bot?: boolean;
36
- is_legacy_workflow_bot?: boolean;
37
- user_id?: string;
47
+ is_workflow_bot?: boolean | undefined;
48
+ is_connector_bot?: boolean | undefined;
49
+ is_legacy_workflow_bot?: boolean | undefined;
50
+ user_id?: string | undefined;
38
51
  }
39
52
  export type BotsInfoResponseBotsList = Array<BotsInfoResponseBotsItem>;
40
53
  export type BotsInfoResponseBotIcons = BotsInfoResponseBotsItemIcons;
41
54
  export interface BotsInfoResponseBot {
42
55
  updated: number;
43
- user_id?: string;
44
- name?: string;
45
- icons?: BotsInfoResponseBotsItemIcons;
56
+ user_id?: string | undefined;
57
+ name?: string | undefined;
58
+ icons?: BotsInfoResponseBotsItemIcons | undefined;
46
59
  deleted: boolean;
47
- app_id?: string;
60
+ app_id?: string | undefined;
48
61
  id: string;
49
- is_workflow_bot?: boolean;
50
- is_connector_bot?: boolean;
51
- is_legacy_workflow_bot?: boolean;
62
+ is_workflow_bot?: boolean | undefined;
63
+ is_connector_bot?: boolean | undefined;
64
+ is_legacy_workflow_bot?: boolean | undefined;
52
65
  }
53
66
  export interface BotsInfoResponse {
54
67
  /** Always `true` (a failed call raises a typed error instead). */
55
68
  ok: boolean;
56
- bots?: BotsInfoResponseBotsList;
57
- bot?: BotsInfoResponseBot;
69
+ bots?: BotsInfoResponseBotsList | undefined;
70
+ bot?: BotsInfoResponseBot | undefined;
58
71
  }
59
72
  export type BotsInfoError = SlackOpError;
60
73
  /** Gets information about a bot user. Required scopes -- bot: `users:read`; user: `users:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bot_not_found` -- Value passed for `bot` was invalid. - `bots_not_found` -- At least one value passed for `bots` was invalid. - `missing_argument` -- A required argument is missing. - `team_not_found` -- Value passed for `team_id` was invalid. See https://docs.slack.dev/reference/methods/bots.info */
@@ -69,6 +82,8 @@ export const botsInfo: API.OperationMethod<
69
82
  errors: [SlackError, SlackRateLimited],
70
83
  protocol: SlackProtocol,
71
84
  retry: Retry.Retry,
85
+ telemetry: TELEMETRY,
86
+ span: "BotsInfo",
72
87
  }));
73
88
 
74
89
  // Schema builders: each runs one schema initializer, on that schema's first use.
@@ -11,25 +11,38 @@ const __s: any[] = [];
11
11
 
12
12
  export type { SlackOpError, SlackOpContext };
13
13
 
14
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
15
+ const TELEMETRY = {
16
+ system: "slack-api",
17
+ responseHeaders: [
18
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
19
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
20
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
21
+ ],
22
+ prefix: "Slack",
23
+ service: "Calls",
24
+ propagate: "w3c",
25
+ } as const;
26
+
14
27
  /** The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
15
28
  export type AddCallRequestUsersList = Array<unknown>;
16
29
  export interface AddCallRequest {
17
30
  /** An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service. */
18
31
  external_unique_id: string;
19
32
  /** An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object. */
20
- external_display_id?: string;
33
+ external_display_id?: string | undefined;
21
34
  /** The URL required for a client to join the Call. */
22
35
  join_url: string;
23
36
  /** When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL. */
24
- desktop_app_join_url?: string;
37
+ desktop_app_join_url?: string | undefined;
25
38
  /** Unix timestamp of the call start time */
26
- date_start?: number;
39
+ date_start?: number | undefined;
27
40
  /** The name of the Call. */
28
- title?: string;
41
+ title?: string | undefined;
29
42
  /** The valid Slack user ID of the user who created this Call. When this method is called with a user token, the `created_by` field is optional and defaults to the authed user of the token. Otherwise, the field is required. */
30
- created_by?: string;
43
+ created_by?: string | undefined;
31
44
  /** The list of users to register as participants in the Call. [Read more on how to specify users here](/apis/web-api/using-the-calls-api#users). */
32
- users?: AddCallRequestUsersList;
45
+ users?: AddCallRequestUsersList | undefined;
33
46
  }
34
47
  export interface AddCallResponse {
35
48
  /** Always `true` (a failed call raises a typed error instead). */
@@ -53,7 +66,7 @@ export interface CallsEndRequest {
53
66
  /** `id` returned when registering the call using the [`calls.add`](/reference/methods/calls.add) method. */
54
67
  id: string;
55
68
  /** Call duration in seconds */
56
- duration?: number;
69
+ duration?: number | undefined;
57
70
  }
58
71
  export interface CallsEndResponse {
59
72
  /** Always `true` (a failed call raises a typed error instead). */
@@ -86,11 +99,11 @@ export interface UpdateCallRequest {
86
99
  /** `id` returned by the [`calls.add`](/reference/methods/calls.add) method. */
87
100
  id: string;
88
101
  /** The name of the Call. */
89
- title?: string;
102
+ title?: string | undefined;
90
103
  /** The URL required for a client to join the Call. */
91
- join_url?: string;
104
+ join_url?: string | undefined;
92
105
  /** When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL. */
93
- desktop_app_join_url?: string;
106
+ desktop_app_join_url?: string | undefined;
94
107
  }
95
108
  export interface UpdateCallResponse {
96
109
  /** Always `true` (a failed call raises a typed error instead). */
@@ -110,6 +123,8 @@ export const addCall: API.OperationMethod<
110
123
  errors: [SlackError, SlackRateLimited],
111
124
  protocol: SlackProtocol,
112
125
  retry: Retry.Retry,
126
+ telemetry: TELEMETRY,
127
+ span: "AddCall",
113
128
  }));
114
129
 
115
130
  export type AddParticipantError = SlackOpError;
@@ -125,6 +140,8 @@ export const addParticipant: API.OperationMethod<
125
140
  errors: [SlackError, SlackRateLimited],
126
141
  protocol: SlackProtocol,
127
142
  retry: Retry.Retry,
143
+ telemetry: TELEMETRY,
144
+ span: "AddParticipant",
128
145
  }));
129
146
 
130
147
  export type CallsEndError = SlackOpError;
@@ -140,6 +157,8 @@ export const callsEnd: API.OperationMethod<
140
157
  errors: [SlackError, SlackRateLimited],
141
158
  protocol: SlackProtocol,
142
159
  retry: Retry.Retry,
160
+ telemetry: TELEMETRY,
161
+ span: "CallsEnd",
143
162
  }));
144
163
 
145
164
  export type CallsInfoError = SlackOpError;
@@ -155,6 +174,8 @@ export const callsInfo: API.OperationMethod<
155
174
  errors: [SlackError, SlackRateLimited],
156
175
  protocol: SlackProtocol,
157
176
  retry: Retry.Retry,
177
+ telemetry: TELEMETRY,
178
+ span: "CallsInfo",
158
179
  }));
159
180
 
160
181
  export type RemoveParticipantError = SlackOpError;
@@ -170,6 +191,8 @@ export const removeParticipant: API.OperationMethod<
170
191
  errors: [SlackError, SlackRateLimited],
171
192
  protocol: SlackProtocol,
172
193
  retry: Retry.Retry,
194
+ telemetry: TELEMETRY,
195
+ span: "RemoveParticipant",
173
196
  }));
174
197
 
175
198
  export type UpdateCallError = SlackOpError;
@@ -185,6 +208,8 @@ export const updateCall: API.OperationMethod<
185
208
  errors: [SlackError, SlackRateLimited],
186
209
  protocol: SlackProtocol,
187
210
  retry: Retry.Retry,
211
+ telemetry: TELEMETRY,
212
+ span: "UpdateCall",
188
213
  }));
189
214
 
190
215
  // Schema builders: each runs one schema initializer, on that schema's first use.