@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,13 +11,26 @@ 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: "Canvases",
24
+ propagate: "w3c",
25
+ } as const;
26
+
14
27
  export interface CreateCanvaseRequest {
15
28
  /** Title of the newly created canvas */
16
- title?: string;
29
+ title?: string | undefined;
17
30
  /** Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters). */
18
- document_content?: unknown;
31
+ document_content?: unknown | undefined;
19
32
  /** Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams. */
20
- channel_id?: string;
33
+ channel_id?: string | undefined;
21
34
  }
22
35
  export interface CreateCanvaseResponse {
23
36
  /** Always `true` (a failed call raises a typed error instead). */
@@ -26,16 +39,16 @@ export interface CreateCanvaseResponse {
26
39
  canvas_id: string;
27
40
  }
28
41
  /** List of channels you wish to update access for */
29
- export type DeleteAccessRequestChannelIdsList = Array<string>;
42
+ export type DeleteAccessRequestChannelIdsList = Array<unknown>;
30
43
  /** List of users you wish to update access for */
31
44
  export type DeleteAccessRequestUserIdsList = Array<string>;
32
45
  export interface DeleteAccessRequest {
33
46
  /** Encoded ID of the canvas */
34
47
  canvas_id: string;
35
48
  /** List of channels you wish to update access for */
36
- channel_ids?: DeleteAccessRequestChannelIdsList;
49
+ channel_ids?: DeleteAccessRequestChannelIdsList | undefined;
37
50
  /** List of users you wish to update access for */
38
- user_ids?: DeleteAccessRequestUserIdsList;
51
+ user_ids?: DeleteAccessRequestUserIdsList | undefined;
39
52
  }
40
53
  /** The channel IDs that could not be updated */
41
54
  export type DeleteAccessResponseFailedToUpdateChannelIdsList = Array<string>;
@@ -45,9 +58,9 @@ export interface DeleteAccessResponse {
45
58
  /** Always `true` (a failed call raises a typed error instead). */
46
59
  ok: boolean;
47
60
  /** The channel IDs that could not be updated */
48
- failed_to_update_channel_ids?: DeleteAccessResponseFailedToUpdateChannelIdsList;
61
+ failed_to_update_channel_ids?: DeleteAccessResponseFailedToUpdateChannelIdsList | undefined;
49
62
  /** The user IDs that could not be updated */
50
- failed_to_update_user_ids?: DeleteAccessResponseFailedToUpdateUserIdsList;
63
+ failed_to_update_user_ids?: DeleteAccessResponseFailedToUpdateUserIdsList | undefined;
51
64
  }
52
65
  export interface DeleteCanvaseRequest {
53
66
  /** Encoded ID of the canvas */
@@ -75,7 +88,7 @@ export interface GetContentRequest {
75
88
  /** Encoded ID of the canvas */
76
89
  canvas_id: string;
77
90
  /** Format in which to return the canvas content. Defaults to markdown. */
78
- content_type?: GetContentRequestContentType | (string & {});
91
+ content_type?: GetContentRequestContentType | (string & {}) | undefined;
79
92
  }
80
93
  export interface GetContentResponse {
81
94
  /** Always `true` (a failed call raises a typed error instead). */
@@ -94,7 +107,7 @@ export type LookupSectionResponseSectionsItemChildSectionIdsList = Array<string>
94
107
  export interface LookupSectionResponseSectionsItem {
95
108
  id: string;
96
109
  /** IDs of child sections within a layout container (blockquote, callout, flexbox, or table). */
97
- child_section_ids?: LookupSectionResponseSectionsItemChildSectionIdsList;
110
+ child_section_ids?: LookupSectionResponseSectionsItemChildSectionIdsList | undefined;
98
111
  }
99
112
  /** Sections in the canvas that match the provided criteria */
100
113
  export type LookupSectionResponseSectionsList = Array<LookupSectionResponseSectionsItem>;
@@ -105,7 +118,7 @@ export interface LookupSectionResponse {
105
118
  sections: LookupSectionResponseSectionsList;
106
119
  }
107
120
  /** List of channels you wish to update access for. Can only be used if user_ids is not provided. */
108
- export type SetAccessRequestChannelIdsList = Array<string>;
121
+ export type SetAccessRequestChannelIdsList = Array<unknown>;
109
122
  /** List of users you wish to update access for. Can only be used if channel_ids is not provided. */
110
123
  export type SetAccessRequestUserIdsList = Array<string>;
111
124
  export interface SetAccessRequest {
@@ -114,9 +127,9 @@ export interface SetAccessRequest {
114
127
  /** Desired level of access */
115
128
  access_level: string;
116
129
  /** List of channels you wish to update access for. Can only be used if user_ids is not provided. */
117
- channel_ids?: SetAccessRequestChannelIdsList;
130
+ channel_ids?: SetAccessRequestChannelIdsList | undefined;
118
131
  /** List of users you wish to update access for. Can only be used if channel_ids is not provided. */
119
- user_ids?: SetAccessRequestUserIdsList;
132
+ user_ids?: SetAccessRequestUserIdsList | undefined;
120
133
  }
121
134
  /** The channel IDs that could not be updated */
122
135
  export type SetAccessResponseFailedToUpdateChannelIdsList = Array<string>;
@@ -126,9 +139,9 @@ export interface SetAccessResponse {
126
139
  /** Always `true` (a failed call raises a typed error instead). */
127
140
  ok: boolean;
128
141
  /** The channel IDs that could not be updated */
129
- failed_to_update_channel_ids?: SetAccessResponseFailedToUpdateChannelIdsList;
142
+ failed_to_update_channel_ids?: SetAccessResponseFailedToUpdateChannelIdsList | undefined;
130
143
  /** The user IDs that could not be updated */
131
- failed_to_update_user_ids?: SetAccessResponseFailedToUpdateUserIdsList;
144
+ failed_to_update_user_ids?: SetAccessResponseFailedToUpdateUserIdsList | undefined;
132
145
  }
133
146
  export type CreateCanvaseError = SlackOpError;
134
147
  /** Create canvas for a user Required scopes -- bot: `canvases:write`; user: `canvases:write`; seamless_user: `seamless.user` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `restricted_action` -- User does not have permission to perform this action. - `canvas_creation_failed` -- Canvas was unable to be created. - `free_team_canvas_tab_already_exists` -- Free teams are limited to one canvas tab per channel - `free_teams_cannot_create_standalone_canvases` -- Free teams cannot create standalone canvases See https://docs.slack.dev/reference/methods/canvases.create */
@@ -143,6 +156,8 @@ export const createCanvase: API.OperationMethod<
143
156
  errors: [SlackError, SlackRateLimited],
144
157
  protocol: SlackProtocol,
145
158
  retry: Retry.Retry,
159
+ telemetry: TELEMETRY,
160
+ span: "CreateCanvase",
146
161
  }));
147
162
 
148
163
  export type DeleteAccessError = SlackOpError;
@@ -154,55 +169,63 @@ export const deleteAccess: API.OperationMethod<
154
169
  SlackOpContext
155
170
  > = /*@__PURE__*/ API.make(() => ({
156
171
  input: __S(4, __c1, 0) as any as S.Schema<DeleteAccessRequest>,
157
- output: __S(12, __c3, 0) as any as S.Schema<DeleteAccessResponse>,
172
+ output: __S(16, __c4, 0) as any as S.Schema<DeleteAccessResponse>,
158
173
  errors: [SlackError, SlackRateLimited],
159
174
  protocol: SlackProtocol,
160
175
  retry: Retry.Retry,
176
+ telemetry: TELEMETRY,
177
+ span: "DeleteAccess",
161
178
  }));
162
179
 
163
180
  export type DeleteCanvaseError = SlackOpError;
164
- /** Deletes a canvas Required scopes -- bot: `canvases:write`; user: `canvases:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_deleting_disabled` -- This functionality is disabled. - `canvas_not_found` -- The canvas does not exist, or is not visible to the calling user. - `restricted_action` -- User does not have permission to perform this action. See https://docs.slack.dev/reference/methods/canvases.delete */
181
+ /** Deletes a canvas Required scopes -- bot: `canvases:write`; user: `canvases:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_deleting_disabled` -- This functionality is disabled. - `canvas_not_found` -- The canvas does not exist, or is not visible to the calling user. - `restricted_action` -- User does not have permission to perform this action. - `use_skills_api` -- When the Skills API is enabled for the caller, skill canvases must be deleted with slackbot.skills.delete using a user OAuth token with skills:write. Pass the canvas ID as skill_id. The success response remains ok: true. The skill and its canvas have not been deleted. See https://docs.slack.dev/reference/methods/canvases.delete */
165
182
  export const deleteCanvase: API.OperationMethod<
166
183
  DeleteCanvaseRequest,
167
184
  DeleteCanvaseResponse,
168
185
  DeleteCanvaseError,
169
186
  SlackOpContext
170
187
  > = /*@__PURE__*/ API.make(() => ({
171
- input: __S(16, __c4, 0) as any as S.Schema<DeleteCanvaseRequest>,
172
- output: __S(20, __c5, 0) as any as S.Schema<DeleteCanvaseResponse>,
188
+ input: __S(20, __c5, 0) as any as S.Schema<DeleteCanvaseRequest>,
189
+ output: __S(24, __c6, 0) as any as S.Schema<DeleteCanvaseResponse>,
173
190
  errors: [SlackError, SlackRateLimited],
174
191
  protocol: SlackProtocol,
175
192
  retry: Retry.Retry,
193
+ telemetry: TELEMETRY,
194
+ span: "DeleteCanvase",
176
195
  }));
177
196
 
178
197
  export type EditCanvaseError = SlackOpError;
179
- /** Update an existing canvas Required scopes -- bot: `canvases:write`; user: `canvases:write`; seamless_user: `seamless.user` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_not_found` -- The canvas you wish to apply changes to is not available. - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `free_teams_cannot_edit_standalone_canvases` -- Free teams cannot edit standalone canvases - `restricted_action` -- User does not have permission to perform this action. - `canvas_editing_failed` -- The changes to the canvas failed to be applied. - `canvas_editing_locked` -- Another edit to this canvas is currently in progress. Please retry after a short delay. - `canvas_too_large` -- The canvas is too large to apply the requested changes. Reduce the size of the canvas or the edit and try again. See https://docs.slack.dev/reference/methods/canvases.edit */
198
+ /** Update an existing canvas Required scopes -- bot: `canvases:write`; user: `canvases:write`; seamless_user: `seamless.user` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_not_found` -- The canvas you wish to apply changes to is not available. - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `free_teams_cannot_edit_standalone_canvases` -- Free teams cannot edit standalone canvases - `restricted_action` -- User does not have permission to perform this action. - `canvas_editing_failed` -- The changes to the canvas failed to be applied. - `canvas_editing_locked` -- Another edit to this canvas is currently in progress. Please retry after a short delay. - `canvas_too_large` -- The canvas is too large to apply the requested changes. Reduce the size of the canvas or the edit and try again. - `use_skills_api` -- When the Skills API is enabled for the caller, skill canvases must be updated with slackbot.skills.update using a user OAuth token with skills:write. Pass the canvas ID as skill_id. The instructions input replaces the whole document; section edits are not supported. The response contains a skill object. No changes were made. See https://docs.slack.dev/reference/methods/canvases.edit */
180
199
  export const editCanvase: API.OperationMethod<
181
200
  EditCanvaseRequest,
182
201
  EditCanvaseResponse,
183
202
  EditCanvaseError,
184
203
  SlackOpContext
185
204
  > = /*@__PURE__*/ API.make(() => ({
186
- input: __S(25, __c6, 1) as any as S.Schema<EditCanvaseRequest>,
187
- output: __S(20, __c5, 0) as any as S.Schema<EditCanvaseResponse>,
205
+ input: __S(28, __c7, 0) as any as S.Schema<EditCanvaseRequest>,
206
+ output: __S(24, __c6, 0) as any as S.Schema<EditCanvaseResponse>,
188
207
  errors: [SlackError, SlackRateLimited],
189
208
  protocol: SlackProtocol,
190
209
  retry: Retry.Retry,
210
+ telemetry: TELEMETRY,
211
+ span: "EditCanvase",
191
212
  }));
192
213
 
193
214
  export type GetContentError = SlackOpError;
194
- /** Get the content of a canvas as markdown (default) or HTML. Required scopes -- bot: `canvases:read`; user: `canvases:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `canvas_not_found` -- The canvas does not exist, or is not visible to the calling user. See https://docs.slack.dev/reference/methods/canvases.getContent */
215
+ /** Get the content of a canvas as markdown (default) or HTML. Required scopes -- bot: `canvases:read`; user: `canvases:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `canvas_not_found` -- The canvas does not exist, or is not visible to the calling user. - `internal_error` -- The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised. See https://docs.slack.dev/reference/methods/canvases.getContent */
195
216
  export const getContent: API.OperationMethod<
196
217
  GetContentRequest,
197
218
  GetContentResponse,
198
219
  GetContentError,
199
220
  SlackOpContext
200
221
  > = /*@__PURE__*/ API.make(() => ({
201
- input: __S(28, __c7, 0) as any as S.Schema<GetContentRequest>,
202
- output: __S(29, __c7, 1) as any as S.Schema<GetContentResponse>,
222
+ input: __S(32, __c8, 0) as any as S.Schema<GetContentRequest>,
223
+ output: __S(33, __c8, 1) as any as S.Schema<GetContentResponse>,
203
224
  errors: [SlackError, SlackRateLimited],
204
225
  protocol: SlackProtocol,
205
226
  retry: Retry.Retry,
227
+ telemetry: TELEMETRY,
228
+ span: "GetContent",
206
229
  }));
207
230
 
208
231
  export type LookupSectionError = SlackOpError;
@@ -213,11 +236,13 @@ export const lookupSection: API.OperationMethod<
213
236
  LookupSectionError,
214
237
  SlackOpContext
215
238
  > = /*@__PURE__*/ API.make(() => ({
216
- input: __S(32, __c8, 0) as any as S.Schema<LookupSectionRequest>,
217
- output: __S(35, __c8, 3) as any as S.Schema<LookupSectionResponse>,
239
+ input: __S(36, __c9, 0) as any as S.Schema<LookupSectionRequest>,
240
+ output: __S(39, __c9, 3) as any as S.Schema<LookupSectionResponse>,
218
241
  errors: [SlackError, SlackRateLimited],
219
242
  protocol: SlackProtocol,
220
243
  retry: Retry.Retry,
244
+ telemetry: TELEMETRY,
245
+ span: "LookupSection",
221
246
  }));
222
247
 
223
248
  export type SetAccessError = SlackOpError;
@@ -228,11 +253,13 @@ export const setAccess: API.OperationMethod<
228
253
  SetAccessError,
229
254
  SlackOpContext
230
255
  > = /*@__PURE__*/ API.make(() => ({
231
- input: __S(36, __c9, 0) as any as S.Schema<SetAccessRequest>,
232
- output: __S(12, __c3, 0) as any as S.Schema<SetAccessResponse>,
256
+ input: __S(40, __c10, 0) as any as S.Schema<SetAccessRequest>,
257
+ output: __S(16, __c4, 0) as any as S.Schema<SetAccessResponse>,
233
258
  errors: [SlackError, SlackRateLimited],
234
259
  protocol: SlackProtocol,
235
260
  retry: Retry.Retry,
261
+ telemetry: TELEMETRY,
262
+ span: "SetAccess",
236
263
  }));
237
264
 
238
265
  // Schema builders: each runs one schema initializer, on that schema's first use.
@@ -262,7 +289,7 @@ function __c1(j: number): any {
262
289
  S.Struct({
263
290
  canvas_id: S.String,
264
291
  channel_ids: S.optional(__S(8, __c2, 0)),
265
- user_ids: S.optional(__S(8, __c2, 0)),
292
+ user_ids: S.optional(__S(12, __c3, 0)),
266
293
  }).pipe(T.Http({ method: "POST", uri: "/canvases.access.delete", code: 200 })),
267
294
  ).annotate({ identifier: "DeleteAccessRequest" });
268
295
  }
@@ -270,22 +297,28 @@ function __c1(j: number): any {
270
297
  function __c2(j: number): any {
271
298
  switch (j) {
272
299
  case 0:
273
- return S.Array(S.String);
300
+ return S.Array(S.Unknown);
274
301
  }
275
302
  }
276
303
  function __c3(j: number): any {
304
+ switch (j) {
305
+ case 0:
306
+ return S.Array(S.String);
307
+ }
308
+ }
309
+ function __c4(j: number): any {
277
310
  switch (j) {
278
311
  case 0:
279
312
  return S.suspend(() =>
280
313
  S.Struct({
281
314
  ok: S.Boolean,
282
- failed_to_update_channel_ids: S.optional(__S(8, __c2, 0)),
283
- failed_to_update_user_ids: S.optional(__S(8, __c2, 0)),
315
+ failed_to_update_channel_ids: S.optional(__S(12, __c3, 0)),
316
+ failed_to_update_user_ids: S.optional(__S(12, __c3, 0)),
284
317
  }),
285
318
  ).annotate({ identifier: "DeleteAccessResponse" });
286
319
  }
287
320
  }
288
- function __c4(j: number): any {
321
+ function __c5(j: number): any {
289
322
  switch (j) {
290
323
  case 0:
291
324
  return S.suspend(() =>
@@ -295,7 +328,7 @@ function __c4(j: number): any {
295
328
  ).annotate({ identifier: "DeleteCanvaseRequest" });
296
329
  }
297
330
  }
298
- function __c5(j: number): any {
331
+ function __c6(j: number): any {
299
332
  switch (j) {
300
333
  case 0:
301
334
  return S.suspend(() =>
@@ -305,20 +338,18 @@ function __c5(j: number): any {
305
338
  ).annotate({ identifier: "DeleteCanvaseResponse" });
306
339
  }
307
340
  }
308
- function __c6(j: number): any {
341
+ function __c7(j: number): any {
309
342
  switch (j) {
310
343
  case 0:
311
- return S.Array(S.Unknown);
312
- case 1:
313
344
  return S.suspend(() =>
314
345
  S.Struct({
315
346
  canvas_id: S.String,
316
- changes: __S(24, __c6, 0),
347
+ changes: __S(8, __c2, 0),
317
348
  }).pipe(T.Http({ method: "POST", uri: "/canvases.edit", code: 200 })),
318
349
  ).annotate({ identifier: "EditCanvaseRequest" });
319
350
  }
320
351
  }
321
- function __c7(j: number): any {
352
+ function __c8(j: number): any {
322
353
  switch (j) {
323
354
  case 0:
324
355
  return S.suspend(() =>
@@ -336,7 +367,7 @@ function __c7(j: number): any {
336
367
  ).annotate({ identifier: "GetContentResponse" });
337
368
  }
338
369
  }
339
- function __c8(j: number): any {
370
+ function __c9(j: number): any {
340
371
  switch (j) {
341
372
  case 0:
342
373
  return S.suspend(() =>
@@ -349,21 +380,21 @@ function __c8(j: number): any {
349
380
  return S.suspend(() =>
350
381
  S.Struct({
351
382
  id: S.String,
352
- child_section_ids: S.optional(__S(8, __c2, 0)),
383
+ child_section_ids: S.optional(__S(12, __c3, 0)),
353
384
  }),
354
385
  ).annotate({ identifier: "LookupSectionResponseSectionsItem" });
355
386
  case 2:
356
- return S.Array(__S(33, __c8, 1));
387
+ return S.Array(__S(37, __c9, 1));
357
388
  case 3:
358
389
  return S.suspend(() =>
359
390
  S.Struct({
360
391
  ok: S.Boolean,
361
- sections: __S(34, __c8, 2),
392
+ sections: __S(38, __c9, 2),
362
393
  }),
363
394
  ).annotate({ identifier: "LookupSectionResponse" });
364
395
  }
365
396
  }
366
- function __c9(j: number): any {
397
+ function __c10(j: number): any {
367
398
  switch (j) {
368
399
  case 0:
369
400
  return S.suspend(() =>
@@ -371,7 +402,7 @@ function __c9(j: number): any {
371
402
  canvas_id: S.String,
372
403
  access_level: S.String,
373
404
  channel_ids: S.optional(__S(8, __c2, 0)),
374
- user_ids: S.optional(__S(8, __c2, 0)),
405
+ user_ids: S.optional(__S(12, __c3, 0)),
375
406
  }).pipe(T.Http({ method: "POST", uri: "/canvases.access.set", code: 200 })),
376
407
  ).annotate({ identifier: "SetAccessRequest" });
377
408
  }