@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
@@ -12,29 +12,42 @@ const __s: any[] = [];
12
12
 
13
13
  export type { SlackOpError, SlackOpContext };
14
14
 
15
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
16
+ const TELEMETRY = {
17
+ system: "slack-api",
18
+ responseHeaders: [
19
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
20
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
21
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
22
+ ],
23
+ prefix: "Slack",
24
+ service: "Stars",
25
+ propagate: "w3c",
26
+ } as const;
27
+
15
28
  export interface AddStarRequest {
16
29
  /** Channel to add star to, or channel where the message to add star to was posted (used with `timestamp`). */
17
- channel?: string;
30
+ channel?: string | undefined;
18
31
  /** File to add star to. */
19
- file?: string;
32
+ file?: string | undefined;
20
33
  /** File comment to add star to. */
21
- file_comment?: string;
34
+ file_comment?: string | undefined;
22
35
  /** Timestamp of the message to add star to. */
23
- timestamp?: string;
36
+ timestamp?: string | undefined;
24
37
  }
25
38
  export interface AddStarResponse {
26
39
  /** Always `true` (a failed call raises a typed error instead). */
27
40
  ok: boolean;
28
41
  }
29
42
  export interface ListStarsRequest {
30
- count?: number;
43
+ count?: number | undefined;
31
44
  /** Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more details. */
32
- cursor?: string;
45
+ cursor?: string | undefined;
33
46
  /** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. */
34
- limit?: number;
35
- page?: number;
47
+ limit?: number | undefined;
48
+ page?: number | undefined;
36
49
  /** encoded team id to list stars in, required if org token is used */
37
- team_id?: string;
50
+ team_id?: string | undefined;
38
51
  }
39
52
  export type ListStarsResponseItemsItemCase0Type = "message";
40
53
  export interface ListStarsResponseItemsItemCase0 {
@@ -85,25 +98,25 @@ export type ListStarsResponseItemsList = Array<ListStarsResponseItemsItem>;
85
98
  /** Pagination metadata. An empty `next_cursor` means the last page. */
86
99
  export interface ListStarsResponseResponseMetadata {
87
100
  /** Cursor for the next page -- pass as `cursor` on the next call. */
88
- next_cursor?: string;
101
+ next_cursor?: string | undefined;
89
102
  }
90
103
  export interface ListStarsResponse {
91
104
  /** Always `true` (a failed call raises a typed error instead). */
92
105
  ok: boolean;
93
106
  items: ListStarsResponseItemsList;
94
- paging?: unknown;
107
+ paging?: unknown | undefined;
95
108
  /** Pagination metadata. An empty `next_cursor` means the last page. */
96
- response_metadata?: ListStarsResponseResponseMetadata;
109
+ response_metadata?: ListStarsResponseResponseMetadata | undefined;
97
110
  }
98
111
  export interface RemoveStarRequest {
99
112
  /** Channel to remove star from, or channel where the message to remove star from was posted (used with `timestamp`). */
100
- channel?: string;
113
+ channel?: string | undefined;
101
114
  /** File to remove star from. */
102
- file?: string;
115
+ file?: string | undefined;
103
116
  /** File comment to remove star from. */
104
- file_comment?: string;
117
+ file_comment?: string | undefined;
105
118
  /** Timestamp of the message to remove star from. */
106
- timestamp?: string;
119
+ timestamp?: string | undefined;
107
120
  }
108
121
  export interface RemoveStarResponse {
109
122
  /** Always `true` (a failed call raises a typed error instead). */
@@ -122,6 +135,8 @@ export const addStar: API.OperationMethod<
122
135
  errors: [SlackError, SlackRateLimited],
123
136
  protocol: SlackProtocol,
124
137
  retry: Retry.Retry,
138
+ telemetry: TELEMETRY,
139
+ span: "AddStar",
125
140
  }));
126
141
 
127
142
  export type ListStarsError = SlackOpError;
@@ -139,6 +154,8 @@ export const listStars: API.PaginatedOperationMethod<
139
154
  errors: [SlackError, SlackRateLimited],
140
155
  protocol: SlackProtocol,
141
156
  retry: Retry.Retry,
157
+ telemetry: TELEMETRY,
158
+ span: "ListStars",
142
159
  pagination: {
143
160
  mode: "cursor",
144
161
  inputToken: "cursor",
@@ -163,6 +180,8 @@ export const removeStar: API.OperationMethod<
163
180
  errors: [SlackError, SlackRateLimited],
164
181
  protocol: SlackProtocol,
165
182
  retry: Retry.Retry,
183
+ telemetry: TELEMETRY,
184
+ span: "RemoveStar",
166
185
  }));
167
186
 
168
187
  // Schema builders: each runs one schema initializer, on that schema's first use.
@@ -12,19 +12,32 @@ const __s: any[] = [];
12
12
 
13
13
  export type { SlackOpError, SlackOpContext };
14
14
 
15
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
16
+ const TELEMETRY = {
17
+ system: "slack-api",
18
+ responseHeaders: [
19
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
20
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
21
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
22
+ ],
23
+ prefix: "Slack",
24
+ service: "Team",
25
+ propagate: "w3c",
26
+ } as const;
27
+
15
28
  export type AccessLogsRequestBeforeCase0 = "now";
16
29
  export type AccessLogsRequestBefore = AccessLogsRequestBeforeCase0 | (string & {}) | string;
17
30
  export interface AccessLogsRequest {
18
31
  /** End of time range of logs to include in results (inclusive). */
19
- before?: AccessLogsRequestBefore;
20
- count?: string;
21
- page?: string;
32
+ before?: AccessLogsRequestBefore | undefined;
33
+ count?: string | undefined;
34
+ page?: string | undefined;
22
35
  /** Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more details. */
23
- cursor?: string;
36
+ cursor?: string | undefined;
24
37
  /** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. If specified, result is returned using a cursor-based approach instead of a classic one. */
25
- limit?: number;
38
+ limit?: number | undefined;
26
39
  /** encoded team id to get logs from, required if org token is used */
27
- team_id?: string;
40
+ team_id?: string | undefined;
28
41
  }
29
42
  export interface AccessLogsResponseLoginsItem {
30
43
  username: string;
@@ -48,25 +61,25 @@ export interface AccessLogsResponsePaging {
48
61
  /** Pagination metadata. An empty `next_cursor` means the last page. */
49
62
  export interface AccessLogsResponseResponseMetadata {
50
63
  /** Cursor for the next page -- pass as `cursor` on the next call. */
51
- next_cursor?: string;
64
+ next_cursor?: string | undefined;
52
65
  }
53
66
  export interface AccessLogsResponse {
54
67
  /** Always `true` (a failed call raises a typed error instead). */
55
68
  ok: boolean;
56
69
  logins: AccessLogsResponseLoginsList;
57
- paging?: AccessLogsResponsePaging;
70
+ paging?: AccessLogsResponsePaging | undefined;
58
71
  /** Pagination metadata. An empty `next_cursor` means the last page. */
59
- response_metadata?: AccessLogsResponseResponseMetadata;
72
+ response_metadata?: AccessLogsResponseResponseMetadata | undefined;
60
73
  }
61
74
  export interface BillableInfoRequest {
62
75
  /** Set `cursor` to `next_cursor` returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page. */
63
- cursor?: string;
76
+ cursor?: string | undefined;
64
77
  /** The maximum number of items to return. */
65
- limit?: number;
78
+ limit?: number | undefined;
66
79
  /** A user to retrieve the billable information for. Defaults to all users. */
67
- user?: string;
80
+ user?: string | undefined;
68
81
  /** encoded team id to get the billable information from, required if org token is used */
69
- team_id?: string;
82
+ team_id?: string | undefined;
70
83
  }
71
84
  /** Pagination metadata. An empty `next_cursor` means the last page. */
72
85
  export type BillableInfoResponseResponseMetadata = AccessLogsResponseResponseMetadata;
@@ -75,7 +88,7 @@ export interface BillableInfoResponse {
75
88
  /** Always `true` (a failed call raises a typed error instead). */
76
89
  ok: boolean;
77
90
  /** Pagination metadata. An empty `next_cursor` means the last page. */
78
- response_metadata?: AccessLogsResponseResponseMetadata;
91
+ response_metadata?: AccessLogsResponseResponseMetadata | undefined;
79
92
  billable_info: BillableInfoResponseBillableInfoMap;
80
93
  }
81
94
  export interface BillingInfoRequest {}
@@ -96,13 +109,13 @@ export interface DisconnectExternalTeamResponse {
96
109
  export type GetProfileRequestVisibility = "all" | "visible" | "hidden";
97
110
  export interface GetProfileRequest {
98
111
  /** Filter by visibility. */
99
- visibility?: GetProfileRequestVisibility | (string & {});
112
+ visibility?: GetProfileRequestVisibility | (string & {}) | undefined;
100
113
  }
101
114
  export type GetProfileResponseProfileFieldsList = Array<unknown>;
102
115
  export type GetProfileResponseProfileSectionsList = Array<unknown>;
103
116
  export interface GetProfileResponseProfile {
104
- fields?: GetProfileResponseProfileFieldsList;
105
- sections?: GetProfileResponseProfileSectionsList;
117
+ fields?: GetProfileResponseProfileFieldsList | undefined;
118
+ sections?: GetProfileResponseProfileSectionsList | undefined;
106
119
  }
107
120
  export interface GetProfileResponse {
108
121
  /** Always `true` (a failed call raises a typed error instead). */
@@ -117,17 +130,17 @@ export type IntegrationLogsRequestChangeType =
117
130
  | "updated";
118
131
  export interface IntegrationLogsRequest {
119
132
  /** Filter logs to this Slack app. Defaults to all logs. */
120
- app_id?: string;
133
+ app_id?: string | undefined;
121
134
  /** Filter logs with this change type. Possible values are `added`, `removed`, `enabled`, `disabled`, and `updated`. Defaults to all logs. */
122
- change_type?: IntegrationLogsRequestChangeType | (string & {});
123
- count?: string;
124
- page?: string;
135
+ change_type?: IntegrationLogsRequestChangeType | (string & {}) | undefined;
136
+ count?: string | undefined;
137
+ page?: string | undefined;
125
138
  /** Filter logs to this service. Defaults to all logs. */
126
- service_id?: string;
139
+ service_id?: string | undefined;
127
140
  /** encoded team id to get logs from, required if org token is used */
128
- team_id?: string;
141
+ team_id?: string | undefined;
129
142
  /** Filter logs generated by this user's actions. Defaults to all logs. */
130
- user?: string;
143
+ user?: string | undefined;
131
144
  }
132
145
  export type IntegrationLogsResponseLogsItemMap = { [key: string]: unknown | undefined };
133
146
  export type IntegrationLogsResponseLogsList = Array<IntegrationLogsResponseLogsItemMap>;
@@ -149,7 +162,6 @@ export type ListExternalTeamsRequestSlackConnectPrefFilterItem =
149
162
  | "away_team_sc_invite_permissions"
150
163
  | "accept_sc_invites"
151
164
  | "sc_mpdm_to_private"
152
- | "require_sc_channel_for_sc_dm"
153
165
  | "external_awareness_context_bar"
154
166
  | "interact_with_externally_owned_workflows"
155
167
  | "external_teams_interact_with_locally_owned_workflows";
@@ -164,19 +176,22 @@ export type ListExternalTeamsRequestConnectionStatusFilter =
164
176
  | "IN_REVIEW";
165
177
  export interface ListExternalTeamsRequest {
166
178
  /** The maximum number of items to return per page */
167
- limit?: number;
179
+ limit?: number | undefined;
168
180
  /** Paginate through collections of data by setting parameter to the `team_id` attribute returned by a previous request's `response_metadata`. If not provided, the first page of the collection is returned. See [pagination](/apis/web-api/pagination#cursors) for more detail. */
169
- cursor?: string;
181
+ cursor?: string | undefined;
170
182
  /** Name of the parameter that we are sorting by */
171
- sort_field?: ListExternalTeamsRequestSortField | (string & {});
183
+ sort_field?: ListExternalTeamsRequestSortField | (string & {}) | undefined;
172
184
  /** Direction to sort in asc or desc */
173
- sort_direction?: ListExternalTeamsRequestSortDirection | (string & {});
185
+ sort_direction?: ListExternalTeamsRequestSortDirection | (string & {}) | undefined;
174
186
  /** Filters connected orgs by Slack Connect pref override(s). Value can be: `approved_orgs_only` `allow_sc_file_uploads` `profile_visibility` `away_team_sc_invite_permissions` `accept_sc_invites` `sc_mpdm_to_private` `require_sc_channel_for_sc_dm` `external_awareness_context_bar` */
175
- slack_connect_pref_filter?: ListExternalTeamsRequestSlackConnectPrefFilterList;
187
+ slack_connect_pref_filter?: ListExternalTeamsRequestSlackConnectPrefFilterList | undefined;
176
188
  /** Shows connected orgs which are connected on a specified encoded workspace ID */
177
- workspace_filter?: ListExternalTeamsRequestWorkspaceFilterList;
189
+ workspace_filter?: ListExternalTeamsRequestWorkspaceFilterList | undefined;
178
190
  /** Status of the connected team. */
179
- connection_status_filter?: ListExternalTeamsRequestConnectionStatusFilter | (string & {});
191
+ connection_status_filter?:
192
+ | ListExternalTeamsRequestConnectionStatusFilter
193
+ | (string & {})
194
+ | undefined;
180
195
  }
181
196
  export interface ListExternalTeamsResponseOrganizationsItemConnectedWorkspacesItem {
182
197
  workspace_id: string;
@@ -232,8 +247,8 @@ export interface ListExternalTeamsResponseOrganizationsItem {
232
247
  last_active_timestamp: number;
233
248
  /** True when team is on a free plan. False otherwise. */
234
249
  is_sponsored: boolean;
235
- canvas?: ListExternalTeamsResponseOrganizationsItemCanvas;
236
- lists?: ListExternalTeamsResponseOrganizationsItemLists;
250
+ canvas?: ListExternalTeamsResponseOrganizationsItemCanvas | undefined;
251
+ lists?: ListExternalTeamsResponseOrganizationsItemLists | undefined;
237
252
  }
238
253
  export type ListExternalTeamsResponseOrganizationsList =
239
254
  Array<ListExternalTeamsResponseOrganizationsItem>;
@@ -245,7 +260,7 @@ export interface ListExternalTeamsResponse {
245
260
  organizations: ListExternalTeamsResponseOrganizationsList;
246
261
  total_count: number;
247
262
  /** Pagination metadata. An empty `next_cursor` means the last page. */
248
- response_metadata?: AccessLogsResponseResponseMetadata;
263
+ response_metadata?: AccessLogsResponseResponseMetadata | undefined;
249
264
  }
250
265
  export interface ListPreferencesRequest {}
251
266
  export interface ListPreferencesResponse {
@@ -258,9 +273,11 @@ export interface ListPreferencesResponse {
258
273
  }
259
274
  export interface TeamInfoRequest {
260
275
  /** Query by domain instead of team (only when team is null). This only works for domains in the same enterprise as the querying team token. This also expects the domain to belong to a team and not the enterprise itself. This is the value set up for the 'Joining This Workspace' workspace setting. If it contains more than one domain, the field will contain multiple comma-separated domain values. If no domain is set, the field is empty. */
261
- domain?: string;
276
+ domain?: string | undefined;
262
277
  /** Team to get info about; if omitted, will return information about the current team. */
263
- team?: string;
278
+ team?: string | undefined;
279
+ /** Include advisory Slackbot availability for the returned workspace or organization. Only applies to a single team in the caller's own workspace or organization; omitted for external teams. Does not guarantee individual eligibility, remaining usage, or access to a particular app. */
280
+ include_slackbot_availability?: boolean | undefined;
264
281
  }
265
282
  export interface TeamInfoResponse {
266
283
  /** Always `true` (a failed call raises a typed error instead). */
@@ -281,6 +298,8 @@ export const accessLogs: API.PaginatedOperationMethod<
281
298
  errors: [SlackError, SlackRateLimited],
282
299
  protocol: SlackProtocol,
283
300
  retry: Retry.Retry,
301
+ telemetry: TELEMETRY,
302
+ span: "AccessLogs",
284
303
  pagination: {
285
304
  mode: "cursor",
286
305
  inputToken: "cursor",
@@ -305,6 +324,8 @@ export const billableInfo: API.OperationMethod<
305
324
  errors: [SlackError, SlackRateLimited],
306
325
  protocol: SlackProtocol,
307
326
  retry: Retry.Retry,
327
+ telemetry: TELEMETRY,
328
+ span: "BillableInfo",
308
329
  }));
309
330
 
310
331
  export type BillingInfoError = SlackOpError;
@@ -320,6 +341,8 @@ export const billingInfo: API.OperationMethod<
320
341
  errors: [SlackError, SlackRateLimited],
321
342
  protocol: SlackProtocol,
322
343
  retry: Retry.Retry,
344
+ telemetry: TELEMETRY,
345
+ span: "BillingInfo",
323
346
  }));
324
347
 
325
348
  export type DisconnectExternalTeamError = SlackOpError;
@@ -335,6 +358,8 @@ export const disconnectExternalTeam: API.OperationMethod<
335
358
  errors: [SlackError, SlackRateLimited],
336
359
  protocol: SlackProtocol,
337
360
  retry: Retry.Retry,
361
+ telemetry: TELEMETRY,
362
+ span: "DisconnectExternalTeam",
338
363
  }));
339
364
 
340
365
  export type GetProfileError = SlackOpError;
@@ -350,6 +375,8 @@ export const getProfile: API.OperationMethod<
350
375
  errors: [SlackError, SlackRateLimited],
351
376
  protocol: SlackProtocol,
352
377
  retry: Retry.Retry,
378
+ telemetry: TELEMETRY,
379
+ span: "GetProfile",
353
380
  }));
354
381
 
355
382
  export type IntegrationLogsError = SlackOpError;
@@ -365,6 +392,8 @@ export const integrationLogs: API.OperationMethod<
365
392
  errors: [SlackError, SlackRateLimited],
366
393
  protocol: SlackProtocol,
367
394
  retry: Retry.Retry,
395
+ telemetry: TELEMETRY,
396
+ span: "IntegrationLogs",
368
397
  }));
369
398
 
370
399
  export type ListExternalTeamsError = SlackOpError;
@@ -382,6 +411,8 @@ export const listExternalTeams: API.PaginatedOperationMethod<
382
411
  errors: [SlackError, SlackRateLimited],
383
412
  protocol: SlackProtocol,
384
413
  retry: Retry.Retry,
414
+ telemetry: TELEMETRY,
415
+ span: "ListExternalTeams",
385
416
  pagination: {
386
417
  mode: "cursor",
387
418
  inputToken: "cursor",
@@ -406,6 +437,8 @@ export const listPreferences: API.OperationMethod<
406
437
  errors: [SlackError, SlackRateLimited],
407
438
  protocol: SlackProtocol,
408
439
  retry: Retry.Retry,
440
+ telemetry: TELEMETRY,
441
+ span: "ListPreferences",
409
442
  }));
410
443
 
411
444
  export type TeamInfoError = SlackOpError;
@@ -421,6 +454,8 @@ export const teamInfo: API.OperationMethod<
421
454
  errors: [SlackError, SlackRateLimited],
422
455
  protocol: SlackProtocol,
423
456
  retry: Retry.Retry,
457
+ telemetry: TELEMETRY,
458
+ span: "TeamInfo",
424
459
  }));
425
460
 
426
461
  // Schema builders: each runs one schema initializer, on that schema's first use.
@@ -708,6 +743,7 @@ function __c10(j: number): any {
708
743
  S.Struct({
709
744
  domain: S.optional(S.String.pipe(T.Query())),
710
745
  team: S.optional(S.String.pipe(T.Query())),
746
+ include_slackbot_availability: S.optional(S.Boolean.pipe(T.Query())),
711
747
  }).pipe(T.Http({ method: "GET", uri: "/team.info", code: 200 })),
712
748
  ).annotate({ identifier: "TeamInfoRequest" });
713
749
  case 1:
@@ -12,6 +12,19 @@ const __s: any[] = [];
12
12
 
13
13
  export type { SlackOpError, SlackOpContext };
14
14
 
15
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
16
+ const TELEMETRY = {
17
+ system: "slack-api",
18
+ responseHeaders: [
19
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
20
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
21
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
22
+ ],
23
+ prefix: "Slack",
24
+ service: "Tooling",
25
+ propagate: "w3c",
26
+ } as const;
27
+
15
28
  export interface RotateTokenRequest {
16
29
  /** The `xoxe` refresh token that was issued along with the old app configuration token. */
17
30
  refresh_token: string | Redacted.Redacted<string>;
@@ -45,6 +58,8 @@ export const rotateToken: API.OperationMethod<
45
58
  errors: [SlackError, SlackRateLimited],
46
59
  protocol: SlackProtocol,
47
60
  retry: Retry.Retry,
61
+ telemetry: TELEMETRY,
62
+ span: "RotateToken",
48
63
  }));
49
64
 
50
65
  // Schema builders: each runs one schema initializer, on that schema's first use.
@@ -11,27 +11,40 @@ 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: "Usergroups",
24
+ propagate: "w3c",
25
+ } as const;
26
+
14
27
  /** A comma separated string of encoded channel IDs for which the User Group uses as a default. */
15
28
  export type CreateUsergroupRequestChannelsList = Array<string>;
16
29
  /** A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too. */
17
30
  export type CreateUsergroupRequestAdditionalChannelsList = Array<string>;
18
31
  export interface CreateUsergroupRequest {
19
32
  /** A comma separated string of encoded channel IDs for which the User Group uses as a default. */
20
- channels?: CreateUsergroupRequestChannelsList;
33
+ channels?: CreateUsergroupRequestChannelsList | undefined;
21
34
  /** A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too. */
22
- additional_channels?: CreateUsergroupRequestAdditionalChannelsList;
35
+ additional_channels?: CreateUsergroupRequestAdditionalChannelsList | undefined;
23
36
  /** A short description of the User Group. */
24
- description?: string;
37
+ description?: string | undefined;
25
38
  /** A mention handle. Must be unique among channels, users and User Groups. */
26
- handle?: string;
39
+ handle?: string | undefined;
27
40
  /** Include the number of users in each User Group. */
28
- include_count?: boolean;
41
+ include_count?: boolean | undefined;
29
42
  /** A name for the User Group. Must be unique among User Groups. */
30
43
  name: string;
31
44
  /** Encoded team id where the user group has to be created, required if org token is used. */
32
- team_id?: string;
45
+ team_id?: string | undefined;
33
46
  /** Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added. */
34
- enable_section?: boolean;
47
+ enable_section?: boolean | undefined;
35
48
  }
36
49
  export interface CreateUsergroupResponse {
37
50
  /** Always `true` (a failed call raises a typed error instead). */
@@ -40,9 +53,9 @@ export interface CreateUsergroupResponse {
40
53
  }
41
54
  export interface DisableUsergroupRequest {
42
55
  /** Include the number of users in the User Group. */
43
- include_count?: boolean;
56
+ include_count?: boolean | undefined;
44
57
  /** Encoded target team id where the user group is, required if org token is used. */
45
- team_id?: string;
58
+ team_id?: string | undefined;
46
59
  /** The encoded ID of the User Group to disable. */
47
60
  usergroup: string;
48
61
  }
@@ -53,9 +66,9 @@ export interface DisableUsergroupResponse {
53
66
  }
54
67
  export interface EnableUsergroupRequest {
55
68
  /** Include the number of users in the User Group. */
56
- include_count?: boolean;
69
+ include_count?: boolean | undefined;
57
70
  /** Encoded team id where the user group is, required if org token is used. */
58
- team_id?: string;
71
+ team_id?: string | undefined;
59
72
  /** The encoded ID of the User Group to enable. */
60
73
  usergroup: string;
61
74
  }
@@ -66,13 +79,13 @@ export interface EnableUsergroupResponse {
66
79
  }
67
80
  export interface ListUsergroupsRequest {
68
81
  /** Include the number of users in each User Group. */
69
- include_count?: boolean;
82
+ include_count?: boolean | undefined;
70
83
  /** Include results for disabled User Groups. */
71
- include_disabled?: boolean;
84
+ include_disabled?: boolean | undefined;
72
85
  /** Include the list of users for each User Group. */
73
- include_users?: boolean;
86
+ include_users?: boolean | undefined;
74
87
  /** The user group's encoded team ID. Required if org token is used. */
75
- team_id?: string;
88
+ team_id?: string | undefined;
76
89
  }
77
90
  export type ListUsergroupsResponseUsergroupsList = Array<unknown>;
78
91
  export interface ListUsergroupsResponse {
@@ -82,11 +95,11 @@ export interface ListUsergroupsResponse {
82
95
  }
83
96
  export interface ListUsersRequest {
84
97
  /** Include results for disabled User Groups. */
85
- include_disabled?: boolean;
98
+ include_disabled?: boolean | undefined;
86
99
  /** The encoded ID of the User Group. */
87
100
  usergroup: string;
88
101
  /** The user group's encoded team ID. Required if org token is used. */
89
- team_id?: string;
102
+ team_id?: string | undefined;
90
103
  }
91
104
  export type ListUsersResponseUsersList = Array<unknown>;
92
105
  export interface ListUsersResponse {
@@ -100,17 +113,17 @@ export type UpdateUserRequestUsersList = Array<string>;
100
113
  export type UpdateUserRequestAdditionalChannelsList = Array<string>;
101
114
  export interface UpdateUserRequest {
102
115
  /** Include the number of users in the user group. */
103
- include_count?: boolean;
116
+ include_count?: boolean | undefined;
104
117
  /** encoded team id where the user group exists, required if org token is used */
105
- team_id?: string;
118
+ team_id?: string | undefined;
106
119
  /** The encoded ID of the user group to update. */
107
120
  usergroup: string;
108
121
  /** A comma separated string of encoded user IDs that represent the entire list of users for the user group. */
109
122
  users: UpdateUserRequestUsersList;
110
123
  /** A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too. */
111
- additional_channels?: UpdateUserRequestAdditionalChannelsList;
124
+ additional_channels?: UpdateUserRequestAdditionalChannelsList | undefined;
112
125
  /** Boolean to identify if the API is getting called when a shared section is getting shared */
113
- is_shared?: boolean;
126
+ is_shared?: boolean | undefined;
114
127
  }
115
128
  export interface UpdateUserResponse {
116
129
  /** Always `true` (a failed call raises a typed error instead). */
@@ -123,23 +136,23 @@ export type UpdateUsergroupRequestChannelsList = Array<string>;
123
136
  export type UpdateUsergroupRequestAdditionalChannelsList = Array<string>;
124
137
  export interface UpdateUsergroupRequest {
125
138
  /** A comma separated string of encoded channel IDs for which the User Group uses as a default. */
126
- channels?: UpdateUsergroupRequestChannelsList;
139
+ channels?: UpdateUsergroupRequestChannelsList | undefined;
127
140
  /** A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too. */
128
- additional_channels?: UpdateUsergroupRequestAdditionalChannelsList;
141
+ additional_channels?: UpdateUsergroupRequestAdditionalChannelsList | undefined;
129
142
  /** A short description of the User Group. */
130
- description?: string;
143
+ description?: string | undefined;
131
144
  /** A mention handle. Must be unique among channels, users and User Groups. */
132
- handle?: string;
145
+ handle?: string | undefined;
133
146
  /** Include the number of users in the User Group. */
134
- include_count?: boolean;
147
+ include_count?: boolean | undefined;
135
148
  /** A name for the User Group. Must be unique among User Groups. */
136
- name?: string;
149
+ name?: string | undefined;
137
150
  /** encoded team id where the user group exists, required if org token is used */
138
- team_id?: string;
151
+ team_id?: string | undefined;
139
152
  /** The encoded ID of the User Group to update. */
140
153
  usergroup: string;
141
154
  /** Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added. */
142
- enable_section?: boolean;
155
+ enable_section?: boolean | undefined;
143
156
  }
144
157
  /** List of user IDs who would exceed their channel limit */
145
158
  export type UpdateUsergroupResponseChannelLimitUserIdsList = Array<string>;
@@ -148,7 +161,7 @@ export interface UpdateUsergroupResponse {
148
161
  ok: boolean;
149
162
  usergroup: unknown;
150
163
  /** List of user IDs who would exceed their channel limit */
151
- channel_limit_user_ids?: UpdateUsergroupResponseChannelLimitUserIdsList;
164
+ channel_limit_user_ids?: UpdateUsergroupResponseChannelLimitUserIdsList | undefined;
152
165
  }
153
166
  export type CreateUsergroupError = SlackOpError;
154
167
  /** Create a User Group. Required scopes -- bot: `usergroups:write`; user: `usergroups:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bad_handle` -- Handle is invalid - `description_too_long` -- Given usergroup description is too long - `forbidden_handle` -- Handle is invalid - `handle_already_exists` -- Handle is already in use on this workspace - `invalid_channel_provided` -- An invalid channel ID was provided - `invalid_group_provided` -- An invalid group ID was provided - `missing_argument` -- A required argument is missing. - `missing_subteam_name` -- Subteam name is required - `name_already_exists` -- Name is already in use on this workspace - `name_too_long` -- Name too long. - `paid_teams_only` -- Usergroups can only be used on paid Slack teams - `permission_denied` -- The user does not have permission to create a User Group. - `plan_upgrade_required` -- This workspace does not have access to User Groups, as that feature is only available on Standard and above plans. - `target_team_not_on_org` -- Target team specified is not on the org in context - `target_team_must_be_specified_in_org_context` -- No target team was specified but the team in context is an org See https://docs.slack.dev/reference/methods/usergroups.create */
@@ -163,6 +176,8 @@ export const createUsergroup: API.OperationMethod<
163
176
  errors: [SlackError, SlackRateLimited],
164
177
  protocol: SlackProtocol,
165
178
  retry: Retry.Retry,
179
+ telemetry: TELEMETRY,
180
+ span: "CreateUsergroup",
166
181
  }));
167
182
 
168
183
  export type DisableUsergroupError = SlackOpError;
@@ -178,6 +193,8 @@ export const disableUsergroup: API.OperationMethod<
178
193
  errors: [SlackError, SlackRateLimited],
179
194
  protocol: SlackProtocol,
180
195
  retry: Retry.Retry,
196
+ telemetry: TELEMETRY,
197
+ span: "DisableUsergroup",
181
198
  }));
182
199
 
183
200
  export type EnableUsergroupError = SlackOpError;
@@ -193,6 +210,8 @@ export const enableUsergroup: API.OperationMethod<
193
210
  errors: [SlackError, SlackRateLimited],
194
211
  protocol: SlackProtocol,
195
212
  retry: Retry.Retry,
213
+ telemetry: TELEMETRY,
214
+ span: "EnableUsergroup",
196
215
  }));
197
216
 
198
217
  export type ListUsergroupsError = SlackOpError;
@@ -208,6 +227,8 @@ export const listUsergroups: API.OperationMethod<
208
227
  errors: [SlackError, SlackRateLimited],
209
228
  protocol: SlackProtocol,
210
229
  retry: Retry.Retry,
230
+ telemetry: TELEMETRY,
231
+ span: "ListUsergroups",
211
232
  }));
212
233
 
213
234
  export type ListUsersError = SlackOpError;
@@ -223,6 +244,8 @@ export const listUsers: API.OperationMethod<
223
244
  errors: [SlackError, SlackRateLimited],
224
245
  protocol: SlackProtocol,
225
246
  retry: Retry.Retry,
247
+ telemetry: TELEMETRY,
248
+ span: "ListUsers",
226
249
  }));
227
250
 
228
251
  export type UpdateUserError = SlackOpError;
@@ -238,6 +261,8 @@ export const updateUser: API.OperationMethod<
238
261
  errors: [SlackError, SlackRateLimited],
239
262
  protocol: SlackProtocol,
240
263
  retry: Retry.Retry,
264
+ telemetry: TELEMETRY,
265
+ span: "UpdateUser",
241
266
  }));
242
267
 
243
268
  export type UpdateUsergroupError = SlackOpError;
@@ -253,6 +278,8 @@ export const updateUsergroup: API.OperationMethod<
253
278
  errors: [SlackError, SlackRateLimited],
254
279
  protocol: SlackProtocol,
255
280
  retry: Retry.Retry,
281
+ telemetry: TELEMETRY,
282
+ span: "UpdateUsergroup",
256
283
  }));
257
284
 
258
285
  // Schema builders: each runs one schema initializer, on that schema's first use.