@distilled.cloud/slack 1.0.0-rc.15 → 1.0.0-rc.16

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 (209) hide show
  1. package/lib/credentials.d.ts +1 -1
  2. package/lib/credentials.d.ts.map +1 -1
  3. package/lib/credentials.js +39 -34
  4. package/lib/credentials.js.map +1 -1
  5. package/lib/errors.d.ts +31 -31
  6. package/lib/errors.d.ts.map +1 -1
  7. package/lib/errors.js +41 -41
  8. package/lib/errors.js.map +1 -1
  9. package/lib/index.d.ts +1 -1
  10. package/lib/index.js +9 -9
  11. package/lib/pagination.d.ts +2 -2
  12. package/lib/pagination.js +28 -28
  13. package/lib/protocol.d.ts.map +1 -1
  14. package/lib/protocol.js +61 -59
  15. package/lib/protocol.js.map +1 -1
  16. package/lib/retry.d.ts +2 -2
  17. package/lib/retry.d.ts.map +1 -1
  18. package/lib/retry.js +34 -33
  19. package/lib/retry.js.map +1 -1
  20. package/lib/services/admin.d.ts +123 -575
  21. package/lib/services/admin.d.ts.map +1 -1
  22. package/lib/services/admin.js +304 -2878
  23. package/lib/services/agents.d.ts +13 -55
  24. package/lib/services/agents.d.ts.map +1 -1
  25. package/lib/services/agents.js +48 -309
  26. package/lib/services/api.d.ts +0 -4
  27. package/lib/services/api.d.ts.map +1 -1
  28. package/lib/services/api.js +16 -18
  29. package/lib/services/apps.d.ts +25 -106
  30. package/lib/services/apps.d.ts.map +1 -1
  31. package/lib/services/apps.js +84 -509
  32. package/lib/services/assistant.d.ts +6 -40
  33. package/lib/services/assistant.d.ts.map +1 -1
  34. package/lib/services/assistant.js +33 -204
  35. package/lib/services/auth.d.ts +4 -15
  36. package/lib/services/auth.d.ts.map +1 -1
  37. package/lib/services/auth.js +22 -90
  38. package/lib/services/blocks.d.ts +1 -7
  39. package/lib/services/blocks.d.ts.map +1 -1
  40. package/lib/services/blocks.js +16 -21
  41. package/lib/services/bookmarks.d.ts +4 -15
  42. package/lib/services/bookmarks.d.ts.map +1 -1
  43. package/lib/services/bookmarks.js +27 -76
  44. package/lib/services/bots.d.ts +1 -9
  45. package/lib/services/bots.d.ts.map +1 -1
  46. package/lib/services/bots.js +17 -54
  47. package/lib/services/calls.d.ts +6 -22
  48. package/lib/services/calls.d.ts.map +1 -1
  49. package/lib/services/calls.js +35 -110
  50. package/lib/services/canvases.d.ts +7 -35
  51. package/lib/services/canvases.d.ts.map +1 -1
  52. package/lib/services/canvases.js +39 -135
  53. package/lib/services/chat.d.ts +14 -83
  54. package/lib/services/chat.d.ts.map +1 -1
  55. package/lib/services/chat.js +59 -381
  56. package/lib/services/conversations.d.ts +31 -116
  57. package/lib/services/conversations.d.ts.map +1 -1
  58. package/lib/services/conversations.js +94 -690
  59. package/lib/services/dialog.d.ts +1 -4
  60. package/lib/services/dialog.d.ts.map +1 -1
  61. package/lib/services/dialog.js +13 -17
  62. package/lib/services/dnd.d.ts +5 -17
  63. package/lib/services/dnd.d.ts.map +1 -1
  64. package/lib/services/dnd.js +26 -91
  65. package/lib/services/emoji.d.ts +1 -8
  66. package/lib/services/emoji.d.ts.map +1 -1
  67. package/lib/services/emoji.js +18 -29
  68. package/lib/services/entity.d.ts +4 -16
  69. package/lib/services/entity.d.ts.map +1 -1
  70. package/lib/services/entity.js +29 -71
  71. package/lib/services/files.d.ts +16 -80
  72. package/lib/services/files.d.ts.map +1 -1
  73. package/lib/services/files.js +75 -433
  74. package/lib/services/functions.d.ts +8 -49
  75. package/lib/services/functions.d.ts.map +1 -1
  76. package/lib/services/functions.js +45 -203
  77. package/lib/services/lists.d.ts +13 -55
  78. package/lib/services/lists.d.ts.map +1 -1
  79. package/lib/services/lists.js +53 -248
  80. package/lib/services/migration.d.ts +1 -7
  81. package/lib/services/migration.d.ts.map +1 -1
  82. package/lib/services/migration.js +18 -27
  83. package/lib/services/oauth.d.ts +7 -43
  84. package/lib/services/oauth.d.ts.map +1 -1
  85. package/lib/services/oauth.js +34 -289
  86. package/lib/services/openid.d.ts +3 -10
  87. package/lib/services/openid.d.ts.map +1 -1
  88. package/lib/services/openid.js +19 -79
  89. package/lib/services/pins.d.ts +3 -13
  90. package/lib/services/pins.d.ts.map +1 -1
  91. package/lib/services/pins.js +27 -61
  92. package/lib/services/reactions.d.ts +5 -17
  93. package/lib/services/reactions.d.ts.map +1 -1
  94. package/lib/services/reactions.js +30 -96
  95. package/lib/services/reminders.d.ts +5 -17
  96. package/lib/services/reminders.d.ts.map +1 -1
  97. package/lib/services/reminders.js +33 -83
  98. package/lib/services/rtm.d.ts +2 -11
  99. package/lib/services/rtm.d.ts.map +1 -1
  100. package/lib/services/rtm.js +22 -56
  101. package/lib/services/search.d.ts +4 -35
  102. package/lib/services/search.d.ts.map +1 -1
  103. package/lib/services/search.js +28 -167
  104. package/lib/services/stars.d.ts +4 -26
  105. package/lib/services/stars.d.ts.map +1 -1
  106. package/lib/services/stars.js +28 -128
  107. package/lib/services/team.d.ts +11 -63
  108. package/lib/services/team.d.ts.map +1 -1
  109. package/lib/services/team.js +45 -289
  110. package/lib/services/tooling.d.ts +2 -5
  111. package/lib/services/tooling.d.ts.map +1 -1
  112. package/lib/services/tooling.js +15 -28
  113. package/lib/services/usergroups.d.ts +7 -31
  114. package/lib/services/usergroups.d.ts.map +1 -1
  115. package/lib/services/usergroups.js +40 -146
  116. package/lib/services/users.d.ts +14 -48
  117. package/lib/services/users.d.ts.map +1 -1
  118. package/lib/services/users.js +54 -249
  119. package/lib/services/views.d.ts +4 -14
  120. package/lib/services/views.d.ts.map +1 -1
  121. package/lib/services/views.js +28 -73
  122. package/lib/services/workflows.d.ts +8 -51
  123. package/lib/services/workflows.d.ts.map +1 -1
  124. package/lib/services/workflows.js +37 -188
  125. package/lib/traits.d.ts +1 -1
  126. package/lib/traits.js +8 -8
  127. package/package.json +14 -10
  128. package/src/credentials.ts +20 -21
  129. package/src/errors.ts +31 -27
  130. package/src/index.ts +1 -1
  131. package/src/pagination.ts +2 -2
  132. package/src/protocol.ts +30 -29
  133. package/src/retry.ts +6 -6
  134. package/src/services/admin.ts +2717 -3451
  135. package/src/services/agents.ts +380 -370
  136. package/src/services/api.ts +31 -21
  137. package/src/services/apps.ts +569 -621
  138. package/src/services/assistant.ts +235 -270
  139. package/src/services/auth.ts +118 -100
  140. package/src/services/blocks.ts +33 -29
  141. package/src/services/bookmarks.ts +101 -83
  142. package/src/services/bots.ts +74 -67
  143. package/src/services/calls.ts +118 -124
  144. package/src/services/canvases.ts +171 -178
  145. package/src/services/chat.ts +428 -496
  146. package/src/services/conversations.ts +675 -761
  147. package/src/services/dialog.ts +30 -17
  148. package/src/services/dnd.ts +125 -99
  149. package/src/services/emoji.ts +46 -42
  150. package/src/services/entity.ts +94 -92
  151. package/src/services/files.ts +536 -531
  152. package/src/services/functions.ts +209 -274
  153. package/src/services/lists.ts +289 -304
  154. package/src/services/migration.ts +39 -37
  155. package/src/services/oauth.ts +345 -361
  156. package/src/services/openid.ts +137 -122
  157. package/src/services/pins.ts +83 -70
  158. package/src/services/reactions.ts +119 -103
  159. package/src/services/reminders.ts +112 -90
  160. package/src/services/rtm.ts +73 -65
  161. package/src/services/search.ts +193 -244
  162. package/src/services/stars.ts +101 -160
  163. package/src/services/team.ts +333 -369
  164. package/src/services/tooling.ts +43 -30
  165. package/src/services/usergroups.ts +175 -179
  166. package/src/services/users.ts +301 -268
  167. package/src/services/views.ts +85 -80
  168. package/src/services/workflows.ts +184 -269
  169. package/src/traits.ts +1 -1
  170. package/lib/protocol.test.d.ts +0 -2
  171. package/lib/protocol.test.d.ts.map +0 -1
  172. package/lib/protocol.test.js +0 -288
  173. package/lib/protocol.test.js.map +0 -1
  174. package/lib/services/admin.js.map +0 -1
  175. package/lib/services/agents.js.map +0 -1
  176. package/lib/services/api.js.map +0 -1
  177. package/lib/services/apps.js.map +0 -1
  178. package/lib/services/assistant.js.map +0 -1
  179. package/lib/services/auth.js.map +0 -1
  180. package/lib/services/blocks.js.map +0 -1
  181. package/lib/services/bookmarks.js.map +0 -1
  182. package/lib/services/bots.js.map +0 -1
  183. package/lib/services/calls.js.map +0 -1
  184. package/lib/services/canvases.js.map +0 -1
  185. package/lib/services/chat.js.map +0 -1
  186. package/lib/services/conversations.js.map +0 -1
  187. package/lib/services/dialog.js.map +0 -1
  188. package/lib/services/dnd.js.map +0 -1
  189. package/lib/services/emoji.js.map +0 -1
  190. package/lib/services/entity.js.map +0 -1
  191. package/lib/services/files.js.map +0 -1
  192. package/lib/services/functions.js.map +0 -1
  193. package/lib/services/lists.js.map +0 -1
  194. package/lib/services/migration.js.map +0 -1
  195. package/lib/services/oauth.js.map +0 -1
  196. package/lib/services/openid.js.map +0 -1
  197. package/lib/services/pins.js.map +0 -1
  198. package/lib/services/reactions.js.map +0 -1
  199. package/lib/services/reminders.js.map +0 -1
  200. package/lib/services/rtm.js.map +0 -1
  201. package/lib/services/search.js.map +0 -1
  202. package/lib/services/stars.js.map +0 -1
  203. package/lib/services/team.js.map +0 -1
  204. package/lib/services/tooling.js.map +0 -1
  205. package/lib/services/usergroups.js.map +0 -1
  206. package/lib/services/users.js.map +0 -1
  207. package/lib/services/views.js.map +0 -1
  208. package/lib/services/workflows.js.map +0 -1
  209. package/src/protocol.test.ts +0 -372
@@ -1,19 +1,18 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
3
- import * as S from "@distilled.cloud/core/schema";
3
+ import * as S from "@distilled.cloud/core/schema-lite";
4
+ import * as __L from "@distilled.cloud/core/schema-lite";
4
5
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
6
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
6
7
  import * as Retry from "../retry.ts";
7
8
  import * as T from "../traits.ts";
9
+ // Schema table, filled on first reach (see __S at the end).
10
+ const __s: any[] = [];
8
11
 
9
12
  export type { SlackOpError, SlackOpContext };
10
13
 
11
14
  /** List of encoded user IDs */
12
15
  export type AddDistributionsPermissionsRequestUserIdsList = Array<string>;
13
- export const AddDistributionsPermissionsRequestUserIdsList = /*@__PURE__*/ S.Array(
14
- S.String,
15
- ) as any as S.Schema<AddDistributionsPermissionsRequestUserIdsList>;
16
-
17
16
  export interface AddDistributionsPermissionsRequest {
18
17
  /** The encoded ID of the function */
19
18
  function_id?: string;
@@ -24,114 +23,46 @@ export interface AddDistributionsPermissionsRequest {
24
23
  /** List of encoded user IDs */
25
24
  user_ids?: AddDistributionsPermissionsRequestUserIdsList;
26
25
  }
27
- export const AddDistributionsPermissionsRequest = /*@__PURE__*/ S.suspend(() =>
28
- S.Struct({
29
- function_id: S.optional(S.String),
30
- function_callback_id: S.optional(S.String),
31
- function_app_id: S.optional(S.String),
32
- user_ids: S.optional(AddDistributionsPermissionsRequestUserIdsList),
33
- }).pipe(T.Http({ method: "POST", uri: "/functions.distributions.permissions.add", code: 200 })),
34
- ).annotate({
35
- identifier: "AddDistributionsPermissionsRequest",
36
- }) as any as S.Schema<AddDistributionsPermissionsRequest>;
37
-
38
26
  export type AddDistributionsPermissionsResponsePermissionType =
39
27
  | "everyone"
40
28
  | "app_collaborators"
41
29
  | "named_entities"
42
30
  | "system";
43
- export const AddDistributionsPermissionsResponsePermissionType = S.String;
44
-
45
31
  export interface AddDistributionsPermissionsResponseUsersItem {
46
32
  user_id?: string;
47
33
  username?: string;
48
34
  email?: string;
49
35
  }
50
- export const AddDistributionsPermissionsResponseUsersItem = /*@__PURE__*/ S.suspend(() =>
51
- S.Struct({
52
- user_id: S.optional(S.String),
53
- username: S.optional(S.String),
54
- email: S.optional(S.String),
55
- }),
56
- ).annotate({
57
- identifier: "AddDistributionsPermissionsResponseUsersItem",
58
- }) as any as S.Schema<AddDistributionsPermissionsResponseUsersItem>;
59
-
60
36
  export type AddDistributionsPermissionsResponseUsersList =
61
37
  Array<AddDistributionsPermissionsResponseUsersItem>;
62
- export const AddDistributionsPermissionsResponseUsersList = /*@__PURE__*/ S.Array(
63
- AddDistributionsPermissionsResponseUsersItem,
64
- ) as any as S.Schema<AddDistributionsPermissionsResponseUsersList>;
65
-
66
38
  export interface AddDistributionsPermissionsResponse {
67
39
  /** Always `true` (a failed call raises a typed error instead). */
68
40
  ok: boolean;
69
41
  permission_type: AddDistributionsPermissionsResponsePermissionType;
70
42
  users?: AddDistributionsPermissionsResponseUsersList;
71
43
  }
72
- export const AddDistributionsPermissionsResponse = /*@__PURE__*/ S.suspend(() =>
73
- S.Struct({
74
- ok: S.Boolean,
75
- permission_type: AddDistributionsPermissionsResponsePermissionType,
76
- users: S.optional(AddDistributionsPermissionsResponseUsersList),
77
- }),
78
- ).annotate({
79
- identifier: "AddDistributionsPermissionsResponse",
80
- }) as any as S.Schema<AddDistributionsPermissionsResponse>;
81
-
82
44
  export interface CompleteErrorRequest {
83
45
  /** Context identifier that maps to the executed function */
84
46
  function_execution_id: string;
85
47
  /** A human-readable error message that contains information about why the function failed to complete */
86
48
  error: string;
87
49
  }
88
- export const CompleteErrorRequest = /*@__PURE__*/ S.suspend(() =>
89
- S.Struct({
90
- function_execution_id: S.String,
91
- error: S.String,
92
- }).pipe(T.Http({ method: "POST", uri: "/functions.completeError", code: 200 })),
93
- ).annotate({ identifier: "CompleteErrorRequest" }) as any as S.Schema<CompleteErrorRequest>;
94
-
95
50
  export interface CompleteErrorResponse {
96
51
  /** Always `true` (a failed call raises a typed error instead). */
97
52
  ok: boolean;
98
53
  }
99
- export const CompleteErrorResponse = /*@__PURE__*/ S.suspend(() =>
100
- S.Struct({
101
- ok: S.Boolean,
102
- }),
103
- ).annotate({ identifier: "CompleteErrorResponse" }) as any as S.Schema<CompleteErrorResponse>;
104
-
105
54
  /** A JSON-based object that conforms to the [output parameters](https://docs.slack.dev/deno-slack-sdk/guides/creating-custom-functions#input-output) schema for the custom function defined in the manifest */
106
55
  export type CompleteSuccessRequestOutputsMap = { [key: string]: unknown | undefined };
107
- export const CompleteSuccessRequestOutputsMap = /*@__PURE__*/ S.Record(
108
- S.String,
109
- S.Unknown,
110
- ) as any as S.Schema<CompleteSuccessRequestOutputsMap>;
111
-
112
56
  export interface CompleteSuccessRequest {
113
57
  /** Context identifier that maps to the executed function */
114
58
  function_execution_id: string;
115
59
  /** A JSON-based object that conforms to the [output parameters](https://docs.slack.dev/deno-slack-sdk/guides/creating-custom-functions#input-output) schema for the custom function defined in the manifest */
116
60
  outputs: CompleteSuccessRequestOutputsMap;
117
61
  }
118
- export const CompleteSuccessRequest = /*@__PURE__*/ S.suspend(() =>
119
- S.Struct({
120
- function_execution_id: S.String,
121
- outputs: CompleteSuccessRequestOutputsMap,
122
- }).pipe(T.Http({ method: "POST", uri: "/functions.completeSuccess", code: 200 })),
123
- ).annotate({ identifier: "CompleteSuccessRequest" }) as any as S.Schema<CompleteSuccessRequest>;
124
-
125
62
  export interface CompleteSuccessResponse {
126
63
  /** Always `true` (a failed call raises a typed error instead). */
127
64
  ok: boolean;
128
65
  }
129
- export const CompleteSuccessResponse = /*@__PURE__*/ S.suspend(() =>
130
- S.Struct({
131
- ok: S.Boolean,
132
- }),
133
- ).annotate({ identifier: "CompleteSuccessResponse" }) as any as S.Schema<CompleteSuccessResponse>;
134
-
135
66
  export interface ExportWorkflowsStepsResponseRequest {
136
67
  /** The workflow ID, starts with Wf* */
137
68
  workflow_id?: string;
@@ -142,31 +73,10 @@ export interface ExportWorkflowsStepsResponseRequest {
142
73
  /** The ID of the OpenForm step to export. */
143
74
  step_id: string;
144
75
  }
145
- export const ExportWorkflowsStepsResponseRequest = /*@__PURE__*/ S.suspend(() =>
146
- S.Struct({
147
- workflow_id: S.optional(S.String),
148
- workflow: S.optional(S.String),
149
- workflow_app_id: S.optional(S.String),
150
- step_id: S.String,
151
- }).pipe(
152
- T.Http({ method: "POST", uri: "/functions.workflows.steps.responses.export", code: 200 }),
153
- ),
154
- ).annotate({
155
- identifier: "ExportWorkflowsStepsResponseRequest",
156
- }) as any as S.Schema<ExportWorkflowsStepsResponseRequest>;
157
-
158
76
  export interface ExportWorkflowsStepsResponseResponse {
159
77
  /** Always `true` (a failed call raises a typed error instead). */
160
78
  ok: boolean;
161
79
  }
162
- export const ExportWorkflowsStepsResponseResponse = /*@__PURE__*/ S.suspend(() =>
163
- S.Struct({
164
- ok: S.Boolean,
165
- }),
166
- ).annotate({
167
- identifier: "ExportWorkflowsStepsResponseResponse",
168
- }) as any as S.Schema<ExportWorkflowsStepsResponseResponse>;
169
-
170
80
  export interface ListDistributionsPermissionsRequest {
171
81
  /** The encoded ID of the function */
172
82
  function_id?: string;
@@ -175,46 +85,19 @@ export interface ListDistributionsPermissionsRequest {
175
85
  /** The encoded ID of the app */
176
86
  function_app_id?: string;
177
87
  }
178
- export const ListDistributionsPermissionsRequest = /*@__PURE__*/ S.suspend(() =>
179
- S.Struct({
180
- function_id: S.optional(S.String),
181
- function_callback_id: S.optional(S.String),
182
- function_app_id: S.optional(S.String),
183
- }).pipe(T.Http({ method: "POST", uri: "/functions.distributions.permissions.list", code: 200 })),
184
- ).annotate({
185
- identifier: "ListDistributionsPermissionsRequest",
186
- }) as any as S.Schema<ListDistributionsPermissionsRequest>;
187
-
188
88
  export type ListDistributionsPermissionsResponsePermissionType =
189
89
  | "everyone"
190
90
  | "app_collaborators"
191
91
  | "named_entities"
192
92
  | "system";
193
- export const ListDistributionsPermissionsResponsePermissionType = S.String;
194
-
195
93
  export type ListDistributionsPermissionsResponseUsersItem =
196
94
  AddDistributionsPermissionsResponseUsersItem;
197
- export const ListDistributionsPermissionsResponseUsersItem =
198
- AddDistributionsPermissionsResponseUsersItem;
199
-
200
95
  export type ListDistributionsPermissionsResponseUsersList =
201
96
  Array<AddDistributionsPermissionsResponseUsersItem>;
202
- export const ListDistributionsPermissionsResponseUsersList = /*@__PURE__*/ S.Array(
203
- AddDistributionsPermissionsResponseUsersItem,
204
- ) as any as S.Schema<ListDistributionsPermissionsResponseUsersList>;
205
-
206
97
  /** List of team IDs allowed with named_entities permission. */
207
98
  export type ListDistributionsPermissionsResponseTeamIdsList = Array<string>;
208
- export const ListDistributionsPermissionsResponseTeamIdsList = /*@__PURE__*/ S.Array(
209
- S.String,
210
- ) as any as S.Schema<ListDistributionsPermissionsResponseTeamIdsList>;
211
-
212
99
  /** List of org IDs allowed with named_entities permission. */
213
100
  export type ListDistributionsPermissionsResponseOrgIdsList = Array<string>;
214
- export const ListDistributionsPermissionsResponseOrgIdsList = /*@__PURE__*/ S.Array(
215
- S.String,
216
- ) as any as S.Schema<ListDistributionsPermissionsResponseOrgIdsList>;
217
-
218
101
  export interface ListDistributionsPermissionsResponse {
219
102
  /** Always `true` (a failed call raises a typed error instead). */
220
103
  ok: boolean;
@@ -225,18 +108,6 @@ export interface ListDistributionsPermissionsResponse {
225
108
  /** List of org IDs allowed with named_entities permission. */
226
109
  org_ids?: ListDistributionsPermissionsResponseOrgIdsList;
227
110
  }
228
- export const ListDistributionsPermissionsResponse = /*@__PURE__*/ S.suspend(() =>
229
- S.Struct({
230
- ok: S.Boolean,
231
- permission_type: ListDistributionsPermissionsResponsePermissionType,
232
- users: S.optional(ListDistributionsPermissionsResponseUsersList),
233
- team_ids: S.optional(ListDistributionsPermissionsResponseTeamIdsList),
234
- org_ids: S.optional(ListDistributionsPermissionsResponseOrgIdsList),
235
- }),
236
- ).annotate({
237
- identifier: "ListDistributionsPermissionsResponse",
238
- }) as any as S.Schema<ListDistributionsPermissionsResponse>;
239
-
240
111
  export interface ListWorkflowsStepsRequest {
241
112
  /** The workflow ID, starts with Wf* */
242
113
  workflow_id?: string;
@@ -247,42 +118,14 @@ export interface ListWorkflowsStepsRequest {
247
118
  /** The ID of the function to query */
248
119
  function_id: string;
249
120
  }
250
- export const ListWorkflowsStepsRequest = /*@__PURE__*/ S.suspend(() =>
251
- S.Struct({
252
- workflow_id: S.optional(S.String),
253
- workflow: S.optional(S.String),
254
- workflow_app_id: S.optional(S.String),
255
- function_id: S.String,
256
- }).pipe(T.Http({ method: "POST", uri: "/functions.workflows.steps.list", code: 200 })),
257
- ).annotate({
258
- identifier: "ListWorkflowsStepsRequest",
259
- }) as any as S.Schema<ListWorkflowsStepsRequest>;
260
-
261
121
  export type ListWorkflowsStepsResponseStepsVersionsList = Array<unknown>;
262
- export const ListWorkflowsStepsResponseStepsVersionsList = /*@__PURE__*/ S.Array(
263
- S.Unknown,
264
- ) as any as S.Schema<ListWorkflowsStepsResponseStepsVersionsList>;
265
-
266
122
  export interface ListWorkflowsStepsResponse {
267
123
  /** Always `true` (a failed call raises a typed error instead). */
268
124
  ok: boolean;
269
125
  steps_versions: ListWorkflowsStepsResponseStepsVersionsList;
270
126
  }
271
- export const ListWorkflowsStepsResponse = /*@__PURE__*/ S.suspend(() =>
272
- S.Struct({
273
- ok: S.Boolean,
274
- steps_versions: ListWorkflowsStepsResponseStepsVersionsList,
275
- }),
276
- ).annotate({
277
- identifier: "ListWorkflowsStepsResponse",
278
- }) as any as S.Schema<ListWorkflowsStepsResponse>;
279
-
280
127
  /** List of encoded user IDs */
281
128
  export type RemoveDistributionsPermissionsRequestUserIdsList = Array<string>;
282
- export const RemoveDistributionsPermissionsRequestUserIdsList = /*@__PURE__*/ S.Array(
283
- S.String,
284
- ) as any as S.Schema<RemoveDistributionsPermissionsRequestUserIdsList>;
285
-
286
129
  export interface RemoveDistributionsPermissionsRequest {
287
130
  /** The encoded ID of the function */
288
131
  function_id?: string;
@@ -293,79 +136,33 @@ export interface RemoveDistributionsPermissionsRequest {
293
136
  /** List of encoded user IDs */
294
137
  user_ids?: RemoveDistributionsPermissionsRequestUserIdsList;
295
138
  }
296
- export const RemoveDistributionsPermissionsRequest = /*@__PURE__*/ S.suspend(() =>
297
- S.Struct({
298
- function_id: S.optional(S.String),
299
- function_callback_id: S.optional(S.String),
300
- function_app_id: S.optional(S.String),
301
- user_ids: S.optional(RemoveDistributionsPermissionsRequestUserIdsList),
302
- }).pipe(
303
- T.Http({ method: "POST", uri: "/functions.distributions.permissions.remove", code: 200 }),
304
- ),
305
- ).annotate({
306
- identifier: "RemoveDistributionsPermissionsRequest",
307
- }) as any as S.Schema<RemoveDistributionsPermissionsRequest>;
308
-
309
139
  export type RemoveDistributionsPermissionsResponsePermissionType =
310
140
  | "everyone"
311
141
  | "app_collaborators"
312
142
  | "named_entities"
313
143
  | "system";
314
- export const RemoveDistributionsPermissionsResponsePermissionType = S.String;
315
-
316
144
  export type RemoveDistributionsPermissionsResponseUsersItem =
317
145
  AddDistributionsPermissionsResponseUsersItem;
318
- export const RemoveDistributionsPermissionsResponseUsersItem =
319
- AddDistributionsPermissionsResponseUsersItem;
320
-
321
146
  export type RemoveDistributionsPermissionsResponseUsersList =
322
147
  Array<AddDistributionsPermissionsResponseUsersItem>;
323
- export const RemoveDistributionsPermissionsResponseUsersList = /*@__PURE__*/ S.Array(
324
- AddDistributionsPermissionsResponseUsersItem,
325
- ) as any as S.Schema<RemoveDistributionsPermissionsResponseUsersList>;
326
-
327
148
  export interface RemoveDistributionsPermissionsResponse {
328
149
  /** Always `true` (a failed call raises a typed error instead). */
329
150
  ok: boolean;
330
151
  permission_type: RemoveDistributionsPermissionsResponsePermissionType;
331
152
  users?: RemoveDistributionsPermissionsResponseUsersList;
332
153
  }
333
- export const RemoveDistributionsPermissionsResponse = /*@__PURE__*/ S.suspend(() =>
334
- S.Struct({
335
- ok: S.Boolean,
336
- permission_type: RemoveDistributionsPermissionsResponsePermissionType,
337
- users: S.optional(RemoveDistributionsPermissionsResponseUsersList),
338
- }),
339
- ).annotate({
340
- identifier: "RemoveDistributionsPermissionsResponse",
341
- }) as any as S.Schema<RemoveDistributionsPermissionsResponse>;
342
-
343
154
  /** The type of permission that defines how the function can be distributed */
344
155
  export type SetDistributionsPermissionsRequestPermissionType =
345
156
  | "everyone"
346
157
  | "app_collaborators"
347
158
  | "named_entities"
348
159
  | "system";
349
- export const SetDistributionsPermissionsRequestPermissionType = S.String;
350
-
351
160
  /** List of encoded user IDs */
352
161
  export type SetDistributionsPermissionsRequestUserIdsList = Array<string>;
353
- export const SetDistributionsPermissionsRequestUserIdsList = /*@__PURE__*/ S.Array(
354
- S.String,
355
- ) as any as S.Schema<SetDistributionsPermissionsRequestUserIdsList>;
356
-
357
162
  /** List of team IDs to allow for named_entities permission */
358
163
  export type SetDistributionsPermissionsRequestTeamIdsList = Array<string>;
359
- export const SetDistributionsPermissionsRequestTeamIdsList = /*@__PURE__*/ S.Array(
360
- S.String,
361
- ) as any as S.Schema<SetDistributionsPermissionsRequestTeamIdsList>;
362
-
363
164
  /** List of org IDs to allow for named_entities permission */
364
165
  export type SetDistributionsPermissionsRequestOrgIdsList = Array<string>;
365
- export const SetDistributionsPermissionsRequestOrgIdsList = /*@__PURE__*/ S.Array(
366
- S.String,
367
- ) as any as S.Schema<SetDistributionsPermissionsRequestOrgIdsList>;
368
-
369
166
  export interface SetDistributionsPermissionsRequest {
370
167
  /** The encoded ID of the function */
371
168
  function_id?: string;
@@ -382,50 +179,19 @@ export interface SetDistributionsPermissionsRequest {
382
179
  /** List of org IDs to allow for named_entities permission */
383
180
  org_ids?: SetDistributionsPermissionsRequestOrgIdsList;
384
181
  }
385
- export const SetDistributionsPermissionsRequest = /*@__PURE__*/ S.suspend(() =>
386
- S.Struct({
387
- function_id: S.optional(S.String),
388
- function_callback_id: S.optional(S.String),
389
- function_app_id: S.optional(S.String),
390
- permission_type: S.optional(SetDistributionsPermissionsRequestPermissionType),
391
- user_ids: S.optional(SetDistributionsPermissionsRequestUserIdsList),
392
- team_ids: S.optional(SetDistributionsPermissionsRequestTeamIdsList),
393
- org_ids: S.optional(SetDistributionsPermissionsRequestOrgIdsList),
394
- }).pipe(T.Http({ method: "POST", uri: "/functions.distributions.permissions.set", code: 200 })),
395
- ).annotate({
396
- identifier: "SetDistributionsPermissionsRequest",
397
- }) as any as S.Schema<SetDistributionsPermissionsRequest>;
398
-
399
182
  export type SetDistributionsPermissionsResponsePermissionType =
400
183
  | "everyone"
401
184
  | "app_collaborators"
402
185
  | "named_entities"
403
186
  | "system";
404
- export const SetDistributionsPermissionsResponsePermissionType = S.String;
405
-
406
187
  export type SetDistributionsPermissionsResponseUsersItem =
407
188
  AddDistributionsPermissionsResponseUsersItem;
408
- export const SetDistributionsPermissionsResponseUsersItem =
409
- AddDistributionsPermissionsResponseUsersItem;
410
-
411
189
  export type SetDistributionsPermissionsResponseUsersList =
412
190
  Array<AddDistributionsPermissionsResponseUsersItem>;
413
- export const SetDistributionsPermissionsResponseUsersList = /*@__PURE__*/ S.Array(
414
- AddDistributionsPermissionsResponseUsersItem,
415
- ) as any as S.Schema<SetDistributionsPermissionsResponseUsersList>;
416
-
417
191
  /** List of team IDs allowed with named_entities permission. */
418
192
  export type SetDistributionsPermissionsResponseTeamIdsList = Array<string>;
419
- export const SetDistributionsPermissionsResponseTeamIdsList = /*@__PURE__*/ S.Array(
420
- S.String,
421
- ) as any as S.Schema<SetDistributionsPermissionsResponseTeamIdsList>;
422
-
423
193
  /** List of org IDs allowed with named_entities permission. */
424
194
  export type SetDistributionsPermissionsResponseOrgIdsList = Array<string>;
425
- export const SetDistributionsPermissionsResponseOrgIdsList = /*@__PURE__*/ S.Array(
426
- S.String,
427
- ) as any as S.Schema<SetDistributionsPermissionsResponseOrgIdsList>;
428
-
429
195
  export interface SetDistributionsPermissionsResponse {
430
196
  /** Always `true` (a failed call raises a typed error instead). */
431
197
  ok: boolean;
@@ -436,134 +202,303 @@ export interface SetDistributionsPermissionsResponse {
436
202
  /** List of org IDs allowed with named_entities permission. */
437
203
  org_ids?: SetDistributionsPermissionsResponseOrgIdsList;
438
204
  }
439
- export const SetDistributionsPermissionsResponse = /*@__PURE__*/ S.suspend(() =>
440
- S.Struct({
441
- ok: S.Boolean,
442
- permission_type: SetDistributionsPermissionsResponsePermissionType,
443
- users: S.optional(SetDistributionsPermissionsResponseUsersList),
444
- team_ids: S.optional(SetDistributionsPermissionsResponseTeamIdsList),
445
- org_ids: S.optional(SetDistributionsPermissionsResponseOrgIdsList),
446
- }),
447
- ).annotate({
448
- identifier: "SetDistributionsPermissionsResponse",
449
- }) as any as S.Schema<SetDistributionsPermissionsResponse>;
450
-
451
205
  export type AddDistributionsPermissionsError = SlackOpError;
452
- /** Grant users access to a custom slack function if its permission_type is set to named_entities Required scopes — configuration: `app_configurations:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` — This method does not exist. - `access_denied` — This actor does not have access to the permissions on this resource. - `function_not_found` — This function does not exist. - `invalid_permission_type` — This function requires permission_type to be set as named_entities before adding users. - `user_not_found` — One or more of the named entities was not found. - `app_not_found` — This app does not exist. See https://docs.slack.dev/reference/methods/functions.distributions.permissions.add */
206
+ /** Grant users access to a custom slack function if its permission_type is set to named_entities Required scopes -- configuration: `app_configurations:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` -- This method does not exist. - `access_denied` -- This actor does not have access to the permissions on this resource. - `function_not_found` -- This function does not exist. - `invalid_permission_type` -- This function requires permission_type to be set as named_entities before adding users. - `user_not_found` -- One or more of the named entities was not found. - `app_not_found` -- This app does not exist. See https://docs.slack.dev/reference/methods/functions.distributions.permissions.add */
453
207
  export const addDistributionsPermissions: API.OperationMethod<
454
208
  AddDistributionsPermissionsRequest,
455
209
  AddDistributionsPermissionsResponse,
456
210
  AddDistributionsPermissionsError,
457
211
  SlackOpContext
458
212
  > = /*@__PURE__*/ API.make(() => ({
459
- input: AddDistributionsPermissionsRequest,
460
- output: AddDistributionsPermissionsResponse,
213
+ input: __S(0, __c0, 0) as any as S.Schema<AddDistributionsPermissionsRequest>,
214
+ output: __S(8, __c2, 0) as any as S.Schema<AddDistributionsPermissionsResponse>,
461
215
  errors: [SlackError, SlackRateLimited],
462
216
  protocol: SlackProtocol,
463
217
  retry: Retry.Retry,
464
218
  }));
465
219
 
466
220
  export type CompleteErrorError = SlackOpError;
467
- /** Signal that a function failed to complete Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` — This method does not exist. - `function_execution_not_found` — The specified function execution cannot be found. - `access_denied` — This actor does not have access to this function execution. - `execution_not_in_running_state` — The function execution is no longer in a state to be completed. See https://docs.slack.dev/reference/methods/functions.completeError */
221
+ /** Signal that a function failed to complete Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` -- This method does not exist. - `function_execution_not_found` -- The specified function execution cannot be found. - `access_denied` -- This actor does not have access to this function execution. - `execution_not_in_running_state` -- The function execution is no longer in a state to be completed. See https://docs.slack.dev/reference/methods/functions.completeError */
468
222
  export const completeError: API.OperationMethod<
469
223
  CompleteErrorRequest,
470
224
  CompleteErrorResponse,
471
225
  CompleteErrorError,
472
226
  SlackOpContext
473
227
  > = /*@__PURE__*/ API.make(() => ({
474
- input: CompleteErrorRequest,
475
- output: CompleteErrorResponse,
228
+ input: __S(12, __c3, 0) as any as S.Schema<CompleteErrorRequest>,
229
+ output: __S(16, __c4, 0) as any as S.Schema<CompleteErrorResponse>,
476
230
  errors: [SlackError, SlackRateLimited],
477
231
  protocol: SlackProtocol,
478
232
  retry: Retry.Retry,
479
233
  }));
480
234
 
481
235
  export type CompleteSuccessError = SlackOpError;
482
- /** Signal the successful completion of a function Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` — This method does not exist. - `function_execution_not_found` — The specified function execution cannot be found. - `access_denied` — This actor does not have access to this function execution. - `execution_not_in_running_state` — The function execution is no longer in a state to be completed. - `parameter_validation_failed` — There were problems when validating the outputs against the Function parameters. See API response for more details. See https://docs.slack.dev/reference/methods/functions.completeSuccess */
236
+ /** Signal the successful completion of a function Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` -- This method does not exist. - `function_execution_not_found` -- The specified function execution cannot be found. - `access_denied` -- This actor does not have access to this function execution. - `execution_not_in_running_state` -- The function execution is no longer in a state to be completed. - `parameter_validation_failed` -- There were problems when validating the outputs against the Function parameters. See API response for more details. See https://docs.slack.dev/reference/methods/functions.completeSuccess */
483
237
  export const completeSuccess: API.OperationMethod<
484
238
  CompleteSuccessRequest,
485
239
  CompleteSuccessResponse,
486
240
  CompleteSuccessError,
487
241
  SlackOpContext
488
242
  > = /*@__PURE__*/ API.make(() => ({
489
- input: CompleteSuccessRequest,
490
- output: CompleteSuccessResponse,
243
+ input: __S(21, __c5, 1) as any as S.Schema<CompleteSuccessRequest>,
244
+ output: __S(16, __c4, 0) as any as S.Schema<CompleteSuccessResponse>,
491
245
  errors: [SlackError, SlackRateLimited],
492
246
  protocol: SlackProtocol,
493
247
  retry: Retry.Retry,
494
248
  }));
495
249
 
496
250
  export type ExportWorkflowsStepsResponseError = SlackOpError;
497
- /** Download form responses of a workflow Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` — This method does not exist. - `access_denied` — This actor does not have access to the functions on this team. - `workflows_export_csv_not_enabled` — Downloading form responses is not allowed. Admin pref needs to be enabled. - `unknown_workflow_id` — The passed in workflow_id is invalid. - `unknown_step_id` — The passed in step_id is invalid. - `invalid_arguments` — The arguments passed in are invalid. - `unknown_app_id` — The passed in workflow_app_id is invalid. See https://docs.slack.dev/reference/methods/functions.workflows.steps.responses.export */
251
+ /** Download form responses of a workflow Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` -- This method does not exist. - `access_denied` -- This actor does not have access to the functions on this team. - `workflows_export_csv_not_enabled` -- Downloading form responses is not allowed. Admin pref needs to be enabled. - `unknown_workflow_id` -- The passed in workflow_id is invalid. - `unknown_step_id` -- The passed in step_id is invalid. - `invalid_arguments` -- The arguments passed in are invalid. - `unknown_app_id` -- The passed in workflow_app_id is invalid. See https://docs.slack.dev/reference/methods/functions.workflows.steps.responses.export */
498
252
  export const exportWorkflowsStepsResponse: API.OperationMethod<
499
253
  ExportWorkflowsStepsResponseRequest,
500
254
  ExportWorkflowsStepsResponseResponse,
501
255
  ExportWorkflowsStepsResponseError,
502
256
  SlackOpContext
503
257
  > = /*@__PURE__*/ API.make(() => ({
504
- input: ExportWorkflowsStepsResponseRequest,
505
- output: ExportWorkflowsStepsResponseResponse,
258
+ input: __S(24, __c6, 0) as any as S.Schema<ExportWorkflowsStepsResponseRequest>,
259
+ output: __S(16, __c4, 0) as any as S.Schema<ExportWorkflowsStepsResponseResponse>,
506
260
  errors: [SlackError, SlackRateLimited],
507
261
  protocol: SlackProtocol,
508
262
  retry: Retry.Retry,
509
263
  }));
510
264
 
511
265
  export type ListDistributionsPermissionsError = SlackOpError;
512
- /** List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities Required scopes — configuration: `app_configurations:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` — This method does not exist. - `access_denied` — This actor does not have access to the permissions on this resource. - `function_not_found` — This function does not exist. - `user_not_found` — One or more of the named entities was not found. - `app_not_found` — This app does not exist. See https://docs.slack.dev/reference/methods/functions.distributions.permissions.list */
266
+ /** List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities Required scopes -- configuration: `app_configurations:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` -- This method does not exist. - `access_denied` -- This actor does not have access to the permissions on this resource. - `function_not_found` -- This function does not exist. - `user_not_found` -- One or more of the named entities was not found. - `app_not_found` -- This app does not exist. See https://docs.slack.dev/reference/methods/functions.distributions.permissions.list */
513
267
  export const listDistributionsPermissions: API.OperationMethod<
514
268
  ListDistributionsPermissionsRequest,
515
269
  ListDistributionsPermissionsResponse,
516
270
  ListDistributionsPermissionsError,
517
271
  SlackOpContext
518
272
  > = /*@__PURE__*/ API.make(() => ({
519
- input: ListDistributionsPermissionsRequest,
520
- output: ListDistributionsPermissionsResponse,
273
+ input: __S(28, __c7, 0) as any as S.Schema<ListDistributionsPermissionsRequest>,
274
+ output: __S(32, __c8, 0) as any as S.Schema<ListDistributionsPermissionsResponse>,
521
275
  errors: [SlackError, SlackRateLimited],
522
276
  protocol: SlackProtocol,
523
277
  retry: Retry.Retry,
524
278
  }));
525
279
 
526
280
  export type ListWorkflowsStepsError = SlackOpError;
527
- /** List the steps of a specific function of a workflow's versions Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` — This method does not exist. - `access_denied` — This actor does not have access to the functions on this team. - `unknown_workflow_id` — The passed in workflow_id is invalid. - `unknown_function_id` — The passed in function_id is invalid. - `invalid_arguments` — The arguments passed in are invalid. - `unknown_app_id` — The passed in workflow_app_id is invalid. - `missing_step_ids` — The passed in workflow is missing step IDs - `cannot_fetch_versions` — Encountered unexpected error while trying to fetch versions See https://docs.slack.dev/reference/methods/functions.workflows.steps.list */
281
+ /** List the steps of a specific function of a workflow's versions Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` -- This method does not exist. - `access_denied` -- This actor does not have access to the functions on this team. - `unknown_workflow_id` -- The passed in workflow_id is invalid. - `unknown_function_id` -- The passed in function_id is invalid. - `invalid_arguments` -- The arguments passed in are invalid. - `unknown_app_id` -- The passed in workflow_app_id is invalid. - `missing_step_ids` -- The passed in workflow is missing step IDs - `cannot_fetch_versions` -- Encountered unexpected error while trying to fetch versions See https://docs.slack.dev/reference/methods/functions.workflows.steps.list */
528
282
  export const listWorkflowsSteps: API.OperationMethod<
529
283
  ListWorkflowsStepsRequest,
530
284
  ListWorkflowsStepsResponse,
531
285
  ListWorkflowsStepsError,
532
286
  SlackOpContext
533
287
  > = /*@__PURE__*/ API.make(() => ({
534
- input: ListWorkflowsStepsRequest,
535
- output: ListWorkflowsStepsResponse,
288
+ input: __S(36, __c9, 0) as any as S.Schema<ListWorkflowsStepsRequest>,
289
+ output: __S(38, __c9, 2) as any as S.Schema<ListWorkflowsStepsResponse>,
536
290
  errors: [SlackError, SlackRateLimited],
537
291
  protocol: SlackProtocol,
538
292
  retry: Retry.Retry,
539
293
  }));
540
294
 
541
295
  export type RemoveDistributionsPermissionsError = SlackOpError;
542
- /** Revoke user access to a custom slack function if permission_type set to named_entities Required scopes — configuration: `app_configurations:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` — This method does not exist. - `access_denied` — This actor does not have access to the permissions on this resource. - `function_not_found` — This function does not exist. - `user_not_found` — One or more of the named entities was not found. - `invalid_permission_type` — This function requires permission_type to be set as named_entities before adding users. - `app_not_found` — This app does not exist. See https://docs.slack.dev/reference/methods/functions.distributions.permissions.remove */
296
+ /** Revoke user access to a custom slack function if permission_type set to named_entities Required scopes -- configuration: `app_configurations:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` -- This method does not exist. - `access_denied` -- This actor does not have access to the permissions on this resource. - `function_not_found` -- This function does not exist. - `user_not_found` -- One or more of the named entities was not found. - `invalid_permission_type` -- This function requires permission_type to be set as named_entities before adding users. - `app_not_found` -- This app does not exist. See https://docs.slack.dev/reference/methods/functions.distributions.permissions.remove */
543
297
  export const removeDistributionsPermissions: API.OperationMethod<
544
298
  RemoveDistributionsPermissionsRequest,
545
299
  RemoveDistributionsPermissionsResponse,
546
300
  RemoveDistributionsPermissionsError,
547
301
  SlackOpContext
548
302
  > = /*@__PURE__*/ API.make(() => ({
549
- input: RemoveDistributionsPermissionsRequest,
550
- output: RemoveDistributionsPermissionsResponse,
303
+ input: __S(40, __c10, 0) as any as S.Schema<RemoveDistributionsPermissionsRequest>,
304
+ output: __S(8, __c2, 0) as any as S.Schema<RemoveDistributionsPermissionsResponse>,
551
305
  errors: [SlackError, SlackRateLimited],
552
306
  protocol: SlackProtocol,
553
307
  retry: Retry.Retry,
554
308
  }));
555
309
 
556
310
  export type SetDistributionsPermissionsError = SlackOpError;
557
- /** Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities Required scopes — configuration: `app_configurations:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` — This method does not exist. - `access_denied` — This actor does not have access to the permissions on this resource. - `function_not_found` — This function does not exist. - `invalid_named_entities` — One or more of the named entities was not found - `invalid_permission_type` — This function requires permission_type to be set as named_entities before adding users. - `user_not_found` — One or more of the named entities was not found. - `app_not_found` — This app does not exist. - `permission_type_required` — `permission_type` is a required input. See https://docs.slack.dev/reference/methods/functions.distributions.permissions.set */
311
+ /** Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities Required scopes -- configuration: `app_configurations:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `unknown_method` -- This method does not exist. - `access_denied` -- This actor does not have access to the permissions on this resource. - `function_not_found` -- This function does not exist. - `invalid_named_entities` -- One or more of the named entities was not found - `invalid_permission_type` -- This function requires permission_type to be set as named_entities before adding users. - `user_not_found` -- One or more of the named entities was not found. - `app_not_found` -- This app does not exist. - `permission_type_required` -- `permission_type` is a required input. See https://docs.slack.dev/reference/methods/functions.distributions.permissions.set */
558
312
  export const setDistributionsPermissions: API.OperationMethod<
559
313
  SetDistributionsPermissionsRequest,
560
314
  SetDistributionsPermissionsResponse,
561
315
  SetDistributionsPermissionsError,
562
316
  SlackOpContext
563
317
  > = /*@__PURE__*/ API.make(() => ({
564
- input: SetDistributionsPermissionsRequest,
565
- output: SetDistributionsPermissionsResponse,
318
+ input: __S(44, __c11, 0) as any as S.Schema<SetDistributionsPermissionsRequest>,
319
+ output: __S(32, __c8, 0) as any as S.Schema<SetDistributionsPermissionsResponse>,
566
320
  errors: [SlackError, SlackRateLimited],
567
321
  protocol: SlackProtocol,
568
322
  retry: Retry.Retry,
569
323
  }));
324
+
325
+ // Schema builders: each runs one schema initializer, on that schema's first use.
326
+ function __c0(j: number): any {
327
+ switch (j) {
328
+ case 0:
329
+ return S.suspend(() =>
330
+ S.Struct({
331
+ function_id: S.optional(S.String),
332
+ function_callback_id: S.optional(S.String),
333
+ function_app_id: S.optional(S.String),
334
+ user_ids: S.optional(__S(4, __c1, 0)),
335
+ }).pipe(
336
+ T.Http({ method: "POST", uri: "/functions.distributions.permissions.add", code: 200 }),
337
+ ),
338
+ ).annotate({ identifier: "AddDistributionsPermissionsRequest" });
339
+ }
340
+ }
341
+ function __c1(j: number): any {
342
+ switch (j) {
343
+ case 0:
344
+ return S.Array(S.String);
345
+ case 1:
346
+ return S.suspend(() =>
347
+ S.Struct({
348
+ user_id: S.optional(S.String),
349
+ username: S.optional(S.String),
350
+ email: S.optional(S.String),
351
+ }),
352
+ ).annotate({ identifier: "AddDistributionsPermissionsResponseUsersItem" });
353
+ case 2:
354
+ return S.Array(__S(5, __c1, 1));
355
+ }
356
+ }
357
+ function __c2(j: number): any {
358
+ switch (j) {
359
+ case 0:
360
+ return S.suspend(() =>
361
+ S.Struct({
362
+ ok: S.Boolean,
363
+ permission_type: S.String,
364
+ users: S.optional(__S(6, __c1, 2)),
365
+ }),
366
+ ).annotate({ identifier: "AddDistributionsPermissionsResponse" });
367
+ }
368
+ }
369
+ function __c3(j: number): any {
370
+ switch (j) {
371
+ case 0:
372
+ return S.suspend(() =>
373
+ S.Struct({
374
+ function_execution_id: S.String,
375
+ error: S.String,
376
+ }).pipe(T.Http({ method: "POST", uri: "/functions.completeError", code: 200 })),
377
+ ).annotate({ identifier: "CompleteErrorRequest" });
378
+ }
379
+ }
380
+ function __c4(j: number): any {
381
+ switch (j) {
382
+ case 0:
383
+ return S.suspend(() =>
384
+ S.Struct({
385
+ ok: S.Boolean,
386
+ }),
387
+ ).annotate({ identifier: "CompleteErrorResponse" });
388
+ }
389
+ }
390
+ function __c5(j: number): any {
391
+ switch (j) {
392
+ case 0:
393
+ return S.Record(S.String, S.Unknown);
394
+ case 1:
395
+ return S.suspend(() =>
396
+ S.Struct({
397
+ function_execution_id: S.String,
398
+ outputs: __S(20, __c5, 0),
399
+ }).pipe(T.Http({ method: "POST", uri: "/functions.completeSuccess", code: 200 })),
400
+ ).annotate({ identifier: "CompleteSuccessRequest" });
401
+ }
402
+ }
403
+ function __c6(j: number): any {
404
+ switch (j) {
405
+ case 0:
406
+ return S.suspend(() =>
407
+ S.Struct({
408
+ workflow_id: S.optional(S.String),
409
+ workflow: S.optional(S.String),
410
+ workflow_app_id: S.optional(S.String),
411
+ step_id: S.String,
412
+ }).pipe(
413
+ T.Http({ method: "POST", uri: "/functions.workflows.steps.responses.export", code: 200 }),
414
+ ),
415
+ ).annotate({ identifier: "ExportWorkflowsStepsResponseRequest" });
416
+ }
417
+ }
418
+ function __c7(j: number): any {
419
+ switch (j) {
420
+ case 0:
421
+ return S.suspend(() =>
422
+ S.Struct({
423
+ function_id: S.optional(S.String),
424
+ function_callback_id: S.optional(S.String),
425
+ function_app_id: S.optional(S.String),
426
+ }).pipe(
427
+ T.Http({ method: "POST", uri: "/functions.distributions.permissions.list", code: 200 }),
428
+ ),
429
+ ).annotate({ identifier: "ListDistributionsPermissionsRequest" });
430
+ }
431
+ }
432
+ function __c8(j: number): any {
433
+ switch (j) {
434
+ case 0:
435
+ return S.suspend(() =>
436
+ S.Struct({
437
+ ok: S.Boolean,
438
+ permission_type: S.String,
439
+ users: S.optional(__S(6, __c1, 2)),
440
+ team_ids: S.optional(__S(4, __c1, 0)),
441
+ org_ids: S.optional(__S(4, __c1, 0)),
442
+ }),
443
+ ).annotate({ identifier: "ListDistributionsPermissionsResponse" });
444
+ }
445
+ }
446
+ function __c9(j: number): any {
447
+ switch (j) {
448
+ case 0:
449
+ return S.suspend(() =>
450
+ S.Struct({
451
+ workflow_id: S.optional(S.String),
452
+ workflow: S.optional(S.String),
453
+ workflow_app_id: S.optional(S.String),
454
+ function_id: S.String,
455
+ }).pipe(T.Http({ method: "POST", uri: "/functions.workflows.steps.list", code: 200 })),
456
+ ).annotate({ identifier: "ListWorkflowsStepsRequest" });
457
+ case 1:
458
+ return S.Array(S.Unknown);
459
+ case 2:
460
+ return S.suspend(() =>
461
+ S.Struct({
462
+ ok: S.Boolean,
463
+ steps_versions: __S(37, __c9, 1),
464
+ }),
465
+ ).annotate({ identifier: "ListWorkflowsStepsResponse" });
466
+ }
467
+ }
468
+ function __c10(j: number): any {
469
+ switch (j) {
470
+ case 0:
471
+ return S.suspend(() =>
472
+ S.Struct({
473
+ function_id: S.optional(S.String),
474
+ function_callback_id: S.optional(S.String),
475
+ function_app_id: S.optional(S.String),
476
+ user_ids: S.optional(__S(4, __c1, 0)),
477
+ }).pipe(
478
+ T.Http({ method: "POST", uri: "/functions.distributions.permissions.remove", code: 200 }),
479
+ ),
480
+ ).annotate({ identifier: "RemoveDistributionsPermissionsRequest" });
481
+ }
482
+ }
483
+ function __c11(j: number): any {
484
+ switch (j) {
485
+ case 0:
486
+ return S.suspend(() =>
487
+ S.Struct({
488
+ function_id: S.optional(S.String),
489
+ function_callback_id: S.optional(S.String),
490
+ function_app_id: S.optional(S.String),
491
+ permission_type: S.optional(S.String),
492
+ user_ids: S.optional(__S(4, __c1, 0)),
493
+ team_ids: S.optional(__S(4, __c1, 0)),
494
+ org_ids: S.optional(__S(4, __c1, 0)),
495
+ }).pipe(
496
+ T.Http({ method: "POST", uri: "/functions.distributions.permissions.set", code: 200 }),
497
+ ),
498
+ ).annotate({ identifier: "SetDistributionsPermissionsRequest" });
499
+ }
500
+ }
501
+ // Schema table: entry i is schema j of builder f, made on first reach.
502
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
503
+ return (__s[i] ??= __L.at(f, j));
504
+ }