effect-slack 0.1.0

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 (167) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +322 -0
  3. package/dist/Errors.d.ts +103 -0
  4. package/dist/Errors.d.ts.map +1 -0
  5. package/dist/Errors.js +84 -0
  6. package/dist/Errors.js.map +1 -0
  7. package/dist/Retry.d.ts +63 -0
  8. package/dist/Retry.d.ts.map +1 -0
  9. package/dist/Retry.js +77 -0
  10. package/dist/Retry.js.map +1 -0
  11. package/dist/SlackClient.d.ts +19 -0
  12. package/dist/SlackClient.d.ts.map +1 -0
  13. package/dist/SlackClient.js +21 -0
  14. package/dist/SlackClient.js.map +1 -0
  15. package/dist/SlackConfig.d.ts +26 -0
  16. package/dist/SlackConfig.d.ts.map +1 -0
  17. package/dist/SlackConfig.js +19 -0
  18. package/dist/SlackConfig.js.map +1 -0
  19. package/dist/SlackService.d.ts +32 -0
  20. package/dist/SlackService.d.ts.map +1 -0
  21. package/dist/SlackService.js +135 -0
  22. package/dist/SlackService.js.map +1 -0
  23. package/dist/generated/AdminService.d.ts +174 -0
  24. package/dist/generated/AdminService.d.ts.map +1 -0
  25. package/dist/generated/AdminService.js +1029 -0
  26. package/dist/generated/AdminService.js.map +1 -0
  27. package/dist/generated/ApiService.d.ts +18 -0
  28. package/dist/generated/ApiService.d.ts.map +1 -0
  29. package/dist/generated/ApiService.js +27 -0
  30. package/dist/generated/ApiService.js.map +1 -0
  31. package/dist/generated/AppsService.d.ts +33 -0
  32. package/dist/generated/AppsService.d.ts.map +1 -0
  33. package/dist/generated/AppsService.js +105 -0
  34. package/dist/generated/AppsService.js.map +1 -0
  35. package/dist/generated/AssistantService.d.ts +22 -0
  36. package/dist/generated/AssistantService.d.ts.map +1 -0
  37. package/dist/generated/AssistantService.js +49 -0
  38. package/dist/generated/AssistantService.js.map +1 -0
  39. package/dist/generated/AuthService.d.ts +22 -0
  40. package/dist/generated/AuthService.d.ts.map +1 -0
  41. package/dist/generated/AuthService.js +46 -0
  42. package/dist/generated/AuthService.js.map +1 -0
  43. package/dist/generated/BookmarksService.d.ts +21 -0
  44. package/dist/generated/BookmarksService.d.ts.map +1 -0
  45. package/dist/generated/BookmarksService.js +57 -0
  46. package/dist/generated/BookmarksService.js.map +1 -0
  47. package/dist/generated/BotsService.d.ts +18 -0
  48. package/dist/generated/BotsService.d.ts.map +1 -0
  49. package/dist/generated/BotsService.js +27 -0
  50. package/dist/generated/BotsService.js.map +1 -0
  51. package/dist/generated/CallsService.d.ts +25 -0
  52. package/dist/generated/CallsService.d.ts.map +1 -0
  53. package/dist/generated/CallsService.js +76 -0
  54. package/dist/generated/CallsService.js.map +1 -0
  55. package/dist/generated/CanvasesService.d.ts +27 -0
  56. package/dist/generated/CanvasesService.d.ts.map +1 -0
  57. package/dist/generated/CanvasesService.js +81 -0
  58. package/dist/generated/CanvasesService.js.map +1 -0
  59. package/dist/generated/ChatService.d.ts +32 -0
  60. package/dist/generated/ChatService.d.ts.map +1 -0
  61. package/dist/generated/ChatService.js +149 -0
  62. package/dist/generated/ChatService.js.map +1 -0
  63. package/dist/generated/ConversationsService.d.ts +51 -0
  64. package/dist/generated/ConversationsService.d.ts.map +1 -0
  65. package/dist/generated/ConversationsService.js +303 -0
  66. package/dist/generated/ConversationsService.js.map +1 -0
  67. package/dist/generated/DialogService.d.ts +18 -0
  68. package/dist/generated/DialogService.d.ts.map +1 -0
  69. package/dist/generated/DialogService.js +27 -0
  70. package/dist/generated/DialogService.js.map +1 -0
  71. package/dist/generated/DndService.d.ts +22 -0
  72. package/dist/generated/DndService.d.ts.map +1 -0
  73. package/dist/generated/DndService.js +67 -0
  74. package/dist/generated/DndService.js.map +1 -0
  75. package/dist/generated/EmojiService.d.ts +18 -0
  76. package/dist/generated/EmojiService.d.ts.map +1 -0
  77. package/dist/generated/EmojiService.js +27 -0
  78. package/dist/generated/EmojiService.js.map +1 -0
  79. package/dist/generated/EntityService.d.ts +18 -0
  80. package/dist/generated/EntityService.d.ts.map +1 -0
  81. package/dist/generated/EntityService.js +27 -0
  82. package/dist/generated/EntityService.js.map +1 -0
  83. package/dist/generated/FilesService.d.ts +37 -0
  84. package/dist/generated/FilesService.d.ts.map +1 -0
  85. package/dist/generated/FilesService.js +182 -0
  86. package/dist/generated/FilesService.js.map +1 -0
  87. package/dist/generated/FunctionsService.d.ts +19 -0
  88. package/dist/generated/FunctionsService.d.ts.map +1 -0
  89. package/dist/generated/FunctionsService.js +37 -0
  90. package/dist/generated/FunctionsService.js.map +1 -0
  91. package/dist/generated/MigrationService.d.ts +18 -0
  92. package/dist/generated/MigrationService.d.ts.map +1 -0
  93. package/dist/generated/MigrationService.js +27 -0
  94. package/dist/generated/MigrationService.js.map +1 -0
  95. package/dist/generated/OauthService.d.ts +22 -0
  96. package/dist/generated/OauthService.d.ts.map +1 -0
  97. package/dist/generated/OauthService.js +50 -0
  98. package/dist/generated/OauthService.js.map +1 -0
  99. package/dist/generated/OpenidService.d.ts +21 -0
  100. package/dist/generated/OpenidService.d.ts.map +1 -0
  101. package/dist/generated/OpenidService.js +39 -0
  102. package/dist/generated/OpenidService.js.map +1 -0
  103. package/dist/generated/PinsService.d.ts +20 -0
  104. package/dist/generated/PinsService.d.ts.map +1 -0
  105. package/dist/generated/PinsService.js +47 -0
  106. package/dist/generated/PinsService.js.map +1 -0
  107. package/dist/generated/ReactionsService.d.ts +21 -0
  108. package/dist/generated/ReactionsService.d.ts.map +1 -0
  109. package/dist/generated/ReactionsService.js +57 -0
  110. package/dist/generated/ReactionsService.js.map +1 -0
  111. package/dist/generated/RemindersService.d.ts +22 -0
  112. package/dist/generated/RemindersService.d.ts.map +1 -0
  113. package/dist/generated/RemindersService.js +67 -0
  114. package/dist/generated/RemindersService.js.map +1 -0
  115. package/dist/generated/RtmService.d.ts +19 -0
  116. package/dist/generated/RtmService.d.ts.map +1 -0
  117. package/dist/generated/RtmService.js +38 -0
  118. package/dist/generated/RtmService.js.map +1 -0
  119. package/dist/generated/SearchService.d.ts +20 -0
  120. package/dist/generated/SearchService.d.ts.map +1 -0
  121. package/dist/generated/SearchService.js +47 -0
  122. package/dist/generated/SearchService.js.map +1 -0
  123. package/dist/generated/SlackListsService.d.ts +35 -0
  124. package/dist/generated/SlackListsService.d.ts.map +1 -0
  125. package/dist/generated/SlackListsService.js +143 -0
  126. package/dist/generated/SlackListsService.js.map +1 -0
  127. package/dist/generated/StarsService.d.ts +20 -0
  128. package/dist/generated/StarsService.d.ts.map +1 -0
  129. package/dist/generated/StarsService.js +50 -0
  130. package/dist/generated/StarsService.js.map +1 -0
  131. package/dist/generated/TeamService.d.ts +34 -0
  132. package/dist/generated/TeamService.d.ts.map +1 -0
  133. package/dist/generated/TeamService.js +115 -0
  134. package/dist/generated/TeamService.js.map +1 -0
  135. package/dist/generated/ToolingService.d.ts +20 -0
  136. package/dist/generated/ToolingService.d.ts.map +1 -0
  137. package/dist/generated/ToolingService.js +29 -0
  138. package/dist/generated/ToolingService.js.map +1 -0
  139. package/dist/generated/UsergroupsService.d.ts +26 -0
  140. package/dist/generated/UsergroupsService.d.ts.map +1 -0
  141. package/dist/generated/UsergroupsService.js +89 -0
  142. package/dist/generated/UsergroupsService.js.map +1 -0
  143. package/dist/generated/UsersService.d.ts +33 -0
  144. package/dist/generated/UsersService.d.ts.map +1 -0
  145. package/dist/generated/UsersService.js +141 -0
  146. package/dist/generated/UsersService.js.map +1 -0
  147. package/dist/generated/ViewsService.d.ts +21 -0
  148. package/dist/generated/ViewsService.d.ts.map +1 -0
  149. package/dist/generated/ViewsService.js +57 -0
  150. package/dist/generated/ViewsService.js.map +1 -0
  151. package/dist/generated/WorkflowsService.d.ts +26 -0
  152. package/dist/generated/WorkflowsService.d.ts.map +1 -0
  153. package/dist/generated/WorkflowsService.js +92 -0
  154. package/dist/generated/WorkflowsService.js.map +1 -0
  155. package/dist/generated/index.d.ts +38 -0
  156. package/dist/generated/index.d.ts.map +1 -0
  157. package/dist/generated/index.js +38 -0
  158. package/dist/generated/index.js.map +1 -0
  159. package/dist/index.d.ts +8 -0
  160. package/dist/index.d.ts.map +1 -0
  161. package/dist/index.js +11 -0
  162. package/dist/index.js.map +1 -0
  163. package/dist/internal/errors.d.ts +13 -0
  164. package/dist/internal/errors.d.ts.map +1 -0
  165. package/dist/internal/errors.js +68 -0
  166. package/dist/internal/errors.js.map +1 -0
  167. package/package.json +80 -0
@@ -0,0 +1,182 @@
1
+ /**
2
+ * Generated Slack Files Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import { SlackClient } from "../SlackClient.js";
7
+ import { mapSlackError, annotateSpanWithError } from "../internal/errors.js";
8
+ export class FilesService extends Effect.Service()("effect-slack/FilesService", {
9
+ effect: Effect.gen(function* () {
10
+ const client = yield* SlackClient;
11
+ /**
12
+ * Finishes an upload started with {@link https://docs.slack.dev/reference/methods/files.getUploadURLExternal `files.getUploadURLExternal`}.
13
+ */
14
+ const completeUploadExternal = (args) => Effect.tryPromise({
15
+ try: () => client.files.completeUploadExternal(args),
16
+ catch: mapSlackError
17
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.completeUploadExternal", {
18
+ attributes: { "slack.method": "files.completeUploadExternal" }
19
+ }));
20
+ /**
21
+ * Deletes a file.
22
+ */
23
+ const delete_ = (args) => Effect.tryPromise({
24
+ try: () => client.files.delete(args),
25
+ catch: mapSlackError
26
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.delete_", {
27
+ attributes: { "slack.method": "files.delete" }
28
+ }));
29
+ /**
30
+ * Gets a URL for an edge external file upload.
31
+ */
32
+ const getUploadURLExternal = (args) => Effect.tryPromise({
33
+ try: () => client.files.getUploadURLExternal(args),
34
+ catch: mapSlackError
35
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.getUploadURLExternal", {
36
+ attributes: { "slack.method": "files.getUploadURLExternal" }
37
+ }));
38
+ /**
39
+ * Gets information about a file.
40
+ */
41
+ const info = (args) => Effect.tryPromise({
42
+ try: () => client.files.info(args),
43
+ catch: mapSlackError
44
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.info", {
45
+ attributes: { "slack.method": "files.info" }
46
+ }));
47
+ /**
48
+ * List files for a team, in a channel, or from a user with applied filters.
49
+ */
50
+ const list = (args) => Effect.tryPromise({
51
+ try: () => client.files.list(args),
52
+ catch: mapSlackError
53
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.list", {
54
+ attributes: { "slack.method": "files.list" }
55
+ }));
56
+ /**
57
+ * Revokes public/external sharing access for a file.
58
+ */
59
+ const revokePublicURL = (args) => Effect.tryPromise({
60
+ try: () => client.files.revokePublicURL(args),
61
+ catch: mapSlackError
62
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.revokePublicURL", {
63
+ attributes: { "slack.method": "files.revokePublicURL" }
64
+ }));
65
+ /**
66
+ * Enables a file for public/external sharing.
67
+ */
68
+ const sharedPublicURL = (args) => Effect.tryPromise({
69
+ try: () => client.files.sharedPublicURL(args),
70
+ catch: mapSlackError
71
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.sharedPublicURL", {
72
+ attributes: { "slack.method": "files.sharedPublicURL" }
73
+ }));
74
+ /**
75
+ * Uploads or creates a file.
76
+ * @deprecated
77
+ */
78
+ const upload = (args) => Effect.tryPromise({
79
+ try: () => client.files.upload(args),
80
+ catch: mapSlackError
81
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.upload", {
82
+ attributes: { "slack.method": "files.upload" }
83
+ }));
84
+ /**
85
+ * Custom method to support a new way of uploading files to Slack. Supports a single file upload Supply: - (required) single file or content - (optional) channel, alt_text, snippet_type, Supports multiple file uploads Supply: - multiple upload_files Will try to honor both single file or content data supplied as well as multiple file uploads property.
86
+ */
87
+ const uploadV2 = (args) => Effect.tryPromise({
88
+ try: () => client.files.uploadV2(args),
89
+ catch: mapSlackError
90
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.uploadV2", {
91
+ attributes: { "slack.method": "files.uploadV2" }
92
+ }));
93
+ /**
94
+ * Deletes an existing comment on a file.
95
+ */
96
+ const CommentsDelete_ = (args) => Effect.tryPromise({
97
+ try: () => client.files.comments.delete(args),
98
+ catch: mapSlackError
99
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.comments.delete_", {
100
+ attributes: { "slack.method": "files.comments.delete" }
101
+ }));
102
+ /**
103
+ * Adds a file from a remote service.
104
+ */
105
+ const RemoteAdd = (args) => Effect.tryPromise({
106
+ try: () => client.files.remote.add(args),
107
+ catch: mapSlackError
108
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.remote.add", {
109
+ attributes: { "slack.method": "files.remote.add" }
110
+ }));
111
+ /**
112
+ * Retrieve information about a remote file added to Slack.
113
+ */
114
+ const RemoteInfo = (args) => Effect.tryPromise({
115
+ try: () => client.files.remote.info(args),
116
+ catch: mapSlackError
117
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.remote.info", {
118
+ attributes: { "slack.method": "files.remote.info" }
119
+ }));
120
+ /**
121
+ * List remote files added to Slack.
122
+ */
123
+ const RemoteList = (args) => Effect.tryPromise({
124
+ try: () => client.files.remote.list(args),
125
+ catch: mapSlackError
126
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.remote.list", {
127
+ attributes: { "slack.method": "files.remote.list" }
128
+ }));
129
+ /**
130
+ * Remove a remote file.
131
+ */
132
+ const RemoteRemove = (args) => Effect.tryPromise({
133
+ try: () => client.files.remote.remove(args),
134
+ catch: mapSlackError
135
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.remote.remove", {
136
+ attributes: { "slack.method": "files.remote.remove" }
137
+ }));
138
+ /**
139
+ * Share a remote file into a channel.
140
+ */
141
+ const RemoteShare = (args) => Effect.tryPromise({
142
+ try: () => client.files.remote.share(args),
143
+ catch: mapSlackError
144
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.remote.share", {
145
+ attributes: { "slack.method": "files.remote.share" }
146
+ }));
147
+ /**
148
+ * Updates an existing remote file.
149
+ */
150
+ const RemoteUpdate = (args) => Effect.tryPromise({
151
+ try: () => client.files.remote.update(args),
152
+ catch: mapSlackError
153
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FilesService.remote.update", {
154
+ attributes: { "slack.method": "files.remote.update" }
155
+ }));
156
+ return {
157
+ completeUploadExternal,
158
+ delete_,
159
+ getUploadURLExternal,
160
+ info,
161
+ list,
162
+ revokePublicURL,
163
+ sharedPublicURL,
164
+ upload,
165
+ uploadV2,
166
+ comments: {
167
+ delete_: CommentsDelete_
168
+ },
169
+ remote: {
170
+ add: RemoteAdd,
171
+ info: RemoteInfo,
172
+ list: RemoteList,
173
+ remove: RemoteRemove,
174
+ share: RemoteShare,
175
+ update: RemoteUpdate
176
+ }
177
+ };
178
+ }),
179
+ dependencies: [SlackClient.Default]
180
+ }) {
181
+ }
182
+ //# sourceMappingURL=FilesService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilesService.js","sourceRoot":"","sources":["../../src/generated/FilesService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAmC/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAmB,MAAM,uBAAuB,CAAA;AAE7F,MAAM,OAAO,YAAa,SAAQ,MAAM,CAAC,OAAO,EAAgB,CAAC,2BAA2B,EAAE;IAC5F,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC1B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,WAAW,CAAA;QAEjC;;WA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,CAAC,qBAAqB,CAAC,EACtC,MAAM,CAAC,QAAQ,CAAC,4BAA4B,EAAE;YAC5C,UAAU,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE;SACtD,CAAC,CACH,CAAA;QAEH,OAAO;YACL,sBAAsB;YACtB,OAAO;YACP,oBAAoB;YACpB,IAAI;YACJ,IAAI;YACJ,eAAe;YACf,eAAe;YACf,MAAM;YACN,QAAQ;YACR,QAAQ,EAAE;gBACR,OAAO,EAAE,eAAe;aACzB;YACD,MAAM,EAAE;gBACN,GAAG,EAAE,SAAS;gBACd,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,UAAU;gBAChB,MAAM,EAAE,YAAY;gBACpB,KAAK,EAAE,WAAW;gBAClB,MAAM,EAAE,YAAY;aACrB;SACO,CAAA;IACZ,CAAC,CAAC;IACF,YAAY,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;CACpC,CAAC;CAAG"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Generated Slack Functions Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import type { FunctionsCompleteErrorArguments, FunctionsCompleteErrorResponse, FunctionsCompleteSuccessArguments, FunctionsCompleteSuccessResponse } from "@slack/web-api";
7
+ import { SlackClient } from "../SlackClient.js";
8
+ import { type SlackError } from "../internal/errors.js";
9
+ declare const FunctionsService_base: Effect.Service.Class<FunctionsService, "effect-slack/FunctionsService", {
10
+ readonly effect: Effect.Effect<{
11
+ readonly completeError: (args: FunctionsCompleteErrorArguments) => Effect.Effect<FunctionsCompleteErrorResponse, SlackError>;
12
+ readonly completeSuccess: (args: FunctionsCompleteSuccessArguments) => Effect.Effect<FunctionsCompleteSuccessResponse, SlackError>;
13
+ }, never, SlackClient>;
14
+ readonly dependencies: readonly [import("effect/Layer").Layer<SlackClient, never, import("../SlackConfig.js").SlackConfig>];
15
+ }>;
16
+ export declare class FunctionsService extends FunctionsService_base {
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=FunctionsService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionsService.d.ts","sourceRoot":"","sources":["../../src/generated/FunctionsService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EACV,+BAA+B,EAC/B,8BAA8B,EAC9B,iCAAiC,EACjC,gCAAgC,EACjC,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;;;uCAUjF,+BAA+B,KACpC,MAAM,CAAC,MAAM,CAAC,8BAA8B,EAAE,UAAU,CAAC;yCAepD,iCAAiC,KACtC,MAAM,CAAC,MAAM,CAAC,gCAAgC,EAAE,UAAU,CAAC;;;;AAzBlE,qBAAa,gBAAiB,SAAQ,qBA0CpC;CAAG"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Generated Slack Functions Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import { SlackClient } from "../SlackClient.js";
7
+ import { mapSlackError, annotateSpanWithError } from "../internal/errors.js";
8
+ export class FunctionsService extends Effect.Service()("effect-slack/FunctionsService", {
9
+ effect: Effect.gen(function* () {
10
+ const client = yield* SlackClient;
11
+ /**
12
+ * Signal the failure to execute a Custom Function.
13
+ */
14
+ const completeError = (args) => Effect.tryPromise({
15
+ try: () => client.functions.completeError(args),
16
+ catch: mapSlackError
17
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FunctionsService.completeError", {
18
+ attributes: { "slack.method": "functions.completeError" }
19
+ }));
20
+ /**
21
+ * Signal the successful completion of a Custom Function.
22
+ */
23
+ const completeSuccess = (args) => Effect.tryPromise({
24
+ try: () => client.functions.completeSuccess(args),
25
+ catch: mapSlackError
26
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("FunctionsService.completeSuccess", {
27
+ attributes: { "slack.method": "functions.completeSuccess" }
28
+ }));
29
+ return {
30
+ completeError,
31
+ completeSuccess
32
+ };
33
+ }),
34
+ dependencies: [SlackClient.Default]
35
+ }) {
36
+ }
37
+ //# sourceMappingURL=FunctionsService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FunctionsService.js","sourceRoot":"","sources":["../../src/generated/FunctionsService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAO/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAmB,MAAM,uBAAuB,CAAA;AAE7F,MAAM,OAAO,gBAAiB,SAAQ,MAAM,CAAC,OAAO,EAAoB,CAAC,+BAA+B,EAAE;IACxG,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC1B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,WAAW,CAAA;QAEjC;;WAEG;QACH,MAAM,aAAa,GAAG,CACpB,IAAqC,EACsB,EAAE,CAC7D,MAAM,CAAC,UAAU,CAAC;YAChB,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC;YAC/C,KAAK,EAAE,aAAa;SACrB,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EACtC,MAAM,CAAC,QAAQ,CAAC,gCAAgC,EAAE;YAChD,UAAU,EAAE,EAAE,cAAc,EAAE,yBAAyB,EAAE;SAC1D,CAAC,CACH,CAAA;QAEH;;WAEG;QACH,MAAM,eAAe,GAAG,CACtB,IAAuC,EACsB,EAAE,CAC/D,MAAM,CAAC,UAAU,CAAC;YAChB,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC;YACjD,KAAK,EAAE,aAAa;SACrB,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EACtC,MAAM,CAAC,QAAQ,CAAC,kCAAkC,EAAE;YAClD,UAAU,EAAE,EAAE,cAAc,EAAE,2BAA2B,EAAE;SAC5D,CAAC,CACH,CAAA;QAEH,OAAO;YACL,aAAa;YACb,eAAe;SACP,CAAA;IACZ,CAAC,CAAC;IACF,YAAY,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;CACpC,CAAC;CAAG"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Generated Slack Migration Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import type { MigrationExchangeArguments, MigrationExchangeResponse } from "@slack/web-api";
7
+ import { SlackClient } from "../SlackClient.js";
8
+ import { type SlackError } from "../internal/errors.js";
9
+ declare const MigrationService_base: Effect.Service.Class<MigrationService, "effect-slack/MigrationService", {
10
+ readonly effect: Effect.Effect<{
11
+ readonly exchange: (args: MigrationExchangeArguments) => Effect.Effect<MigrationExchangeResponse, SlackError>;
12
+ }, never, SlackClient>;
13
+ readonly dependencies: readonly [import("effect/Layer").Layer<SlackClient, never, import("../SlackConfig.js").SlackConfig>];
14
+ }>;
15
+ export declare class MigrationService extends MigrationService_base {
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=MigrationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationService.d.ts","sourceRoot":"","sources":["../../src/generated/MigrationService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EACV,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;;;kCAUjF,0BAA0B,KAC/B,MAAM,CAAC,MAAM,CAAC,yBAAyB,EAAE,UAAU,CAAC;;;;AAT3D,qBAAa,gBAAiB,SAAQ,qBAyBpC;CAAG"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Generated Slack Migration Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import { SlackClient } from "../SlackClient.js";
7
+ import { mapSlackError, annotateSpanWithError } from "../internal/errors.js";
8
+ export class MigrationService extends Effect.Service()("effect-slack/MigrationService", {
9
+ effect: Effect.gen(function* () {
10
+ const client = yield* SlackClient;
11
+ /**
12
+ * For Enterprise Grid workspaces, map local user IDs to global user IDs.
13
+ */
14
+ const exchange = (args) => Effect.tryPromise({
15
+ try: () => client.migration.exchange(args),
16
+ catch: mapSlackError
17
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("MigrationService.exchange", {
18
+ attributes: { "slack.method": "migration.exchange" }
19
+ }));
20
+ return {
21
+ exchange
22
+ };
23
+ }),
24
+ dependencies: [SlackClient.Default]
25
+ }) {
26
+ }
27
+ //# sourceMappingURL=MigrationService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MigrationService.js","sourceRoot":"","sources":["../../src/generated/MigrationService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAK/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAmB,MAAM,uBAAuB,CAAA;AAE7F,MAAM,OAAO,gBAAiB,SAAQ,MAAM,CAAC,OAAO,EAAoB,CAAC,+BAA+B,EAAE;IACxG,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC1B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,WAAW,CAAA;QAEjC;;WAEG;QACH,MAAM,QAAQ,GAAG,CACf,IAAgC,EACsB,EAAE,CACxD,MAAM,CAAC,UAAU,CAAC;YAChB,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC1C,KAAK,EAAE,aAAa;SACrB,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EACtC,MAAM,CAAC,QAAQ,CAAC,2BAA2B,EAAE;YAC3C,UAAU,EAAE,EAAE,cAAc,EAAE,oBAAoB,EAAE;SACrD,CAAC,CACH,CAAA;QAEH,OAAO;YACL,QAAQ;SACA,CAAA;IACZ,CAAC,CAAC;IACF,YAAY,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;CACpC,CAAC;CAAG"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Generated Slack Oauth Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import type { OAuthAccessArguments, OAuthV2AccessArguments, OAuthV2ExchangeArguments, OauthAccessResponse, OauthV2AccessResponse, OauthV2ExchangeResponse } from "@slack/web-api";
7
+ import { SlackClient } from "../SlackClient.js";
8
+ import { type SlackError } from "../internal/errors.js";
9
+ declare const OauthService_base: Effect.Service.Class<OauthService, "effect-slack/OauthService", {
10
+ readonly effect: Effect.Effect<{
11
+ readonly access: (args: OAuthAccessArguments) => Effect.Effect<OauthAccessResponse, SlackError>;
12
+ readonly v2: {
13
+ readonly access: (args: OAuthV2AccessArguments) => Effect.Effect<OauthV2AccessResponse, SlackError>;
14
+ readonly exchange: (args: OAuthV2ExchangeArguments) => Effect.Effect<OauthV2ExchangeResponse, SlackError>;
15
+ };
16
+ }, never, SlackClient>;
17
+ readonly dependencies: readonly [import("effect/Layer").Layer<SlackClient, never, import("../SlackConfig.js").SlackConfig>];
18
+ }>;
19
+ export declare class OauthService extends OauthService_base {
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=OauthService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OauthService.d.ts","sourceRoot":"","sources":["../../src/generated/OauthService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;;;gCAWjF,oBAAoB,KACzB,MAAM,CAAC,MAAM,CAAC,mBAAmB,EAAE,UAAU,CAAC;;oCAezC,sBAAsB,KAC3B,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE,UAAU,CAAC;sCAe3C,wBAAwB,KAC7B,MAAM,CAAC,MAAM,CAAC,uBAAuB,EAAE,UAAU,CAAC;;;;;AA1CzD,qBAAa,YAAa,SAAQ,iBA8DhC;CAAG"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Generated Slack Oauth Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import { SlackClient } from "../SlackClient.js";
7
+ import { mapSlackError, annotateSpanWithError } from "../internal/errors.js";
8
+ export class OauthService extends Effect.Service()("effect-slack/OauthService", {
9
+ effect: Effect.gen(function* () {
10
+ const client = yield* SlackClient;
11
+ /**
12
+ * Exchanges a temporary OAuth verifier code for an access token.
13
+ * @deprecated
14
+ */
15
+ const access = (args) => Effect.tryPromise({
16
+ try: () => client.oauth.access(args),
17
+ catch: mapSlackError
18
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("OauthService.access", {
19
+ attributes: { "slack.method": "oauth.access" }
20
+ }));
21
+ /**
22
+ * Exchanges a temporary OAuth verifier code for an access token.
23
+ */
24
+ const V2Access = (args) => Effect.tryPromise({
25
+ try: () => client.oauth.v2.access(args),
26
+ catch: mapSlackError
27
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("OauthService.v2.access", {
28
+ attributes: { "slack.method": "oauth.v2.access" }
29
+ }));
30
+ /**
31
+ * Exchanges a legacy access token for a new expiring access token and refresh token.
32
+ */
33
+ const V2Exchange = (args) => Effect.tryPromise({
34
+ try: () => client.oauth.v2.exchange(args),
35
+ catch: mapSlackError
36
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("OauthService.v2.exchange", {
37
+ attributes: { "slack.method": "oauth.v2.exchange" }
38
+ }));
39
+ return {
40
+ access,
41
+ v2: {
42
+ access: V2Access,
43
+ exchange: V2Exchange
44
+ }
45
+ };
46
+ }),
47
+ dependencies: [SlackClient.Default]
48
+ }) {
49
+ }
50
+ //# sourceMappingURL=OauthService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OauthService.js","sourceRoot":"","sources":["../../src/generated/OauthService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAS/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAmB,MAAM,uBAAuB,CAAA;AAE7F,MAAM,OAAO,YAAa,SAAQ,MAAM,CAAC,OAAO,EAAgB,CAAC,2BAA2B,EAAE;IAC5F,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC1B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,WAAW,CAAA;QAEjC;;;WAGG;QACH,MAAM,MAAM,GAAG,CACb,IAA0B,EACsB,EAAE,CAClD,MAAM,CAAC,UAAU,CAAC;YAChB,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;YACpC,KAA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ated Slack Openid Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import type { OpenIDConnectTokenArguments, OpenIDConnectTokenResponse, OpenIDConnectUserInfoArguments, OpenIDConnectUserInfoResponse } from "@slack/web-api";
7
+ import { SlackClient } from "../SlackClient.js";
8
+ import { type SlackError } from "../internal/errors.js";
9
+ declare const OpenidService_base: Effect.Service.Class<OpenidService, "effect-slack/OpenidService", {
10
+ readonly effect: Effect.Effect<{
11
+ readonly connect: {
12
+ readonly token: (args: OpenIDConnectTokenArguments) => Effect.Effect<OpenIDConnectTokenResponse, SlackError>;
13
+ readonly userInfo: (args?: OpenIDConnectUserInfoArguments) => Effect.Effect<OpenIDConnectUserInfoResponse, SlackError>;
14
+ };
15
+ }, never, SlackClient>;
16
+ readonly dependencies: readonly [import("effect/Layer").Layer<SlackClient, never, import("../SlackConfig.js").SlackConfig>];
17
+ }>;
18
+ export declare class OpenidService extends OpenidService_base {
19
+ }
20
+ export {};
21
+ //# sourceMappingURL=OpenidService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenidService.d.ts","sourceRoot":"","sources":["../../src/generated/OpenidService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;;;;mCAUjF,2BAA2B,KAChC,MAAM,CAAC,MAAM,CAAC,0BAA0B,EAAE,UAAU,CAAC;uCAe/C,8BAA8B,KACpC,MAAM,CAAC,MAAM,CAAC,6BAA6B,EAAE,UAAU,CAAC;;;;;AAzB/D,qBAAa,aAAc,SAAQ,kBA4CjC;CAAG"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Generated Slack Openid Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import { SlackClient } from "../SlackClient.js";
7
+ import { mapSlackError, annotateSpanWithError } from "../internal/errors.js";
8
+ export class OpenidService extends Effect.Service()("effect-slack/OpenidService", {
9
+ effect: Effect.gen(function* () {
10
+ const client = yield* SlackClient;
11
+ /**
12
+ * Exchanges a temporary OAuth verifier code for an access token for {@link https://docs.slack.dev/authentication/sign-in-with-slack Sign in with Slack}.
13
+ */
14
+ const ConnectToken = (args) => Effect.tryPromise({
15
+ try: () => client.openid.connect.token(args),
16
+ catch: mapSlackError
17
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("OpenidService.connect.token", {
18
+ attributes: { "slack.method": "openid.connect.token" }
19
+ }));
20
+ /**
21
+ * Get the identity of a user who has authorized {@link https://docs.slack.dev/authentication/sign-in-with-slack Sign in with Slack}.
22
+ */
23
+ const ConnectUserInfo = (args) => Effect.tryPromise({
24
+ try: () => client.openid.connect.userInfo(args),
25
+ catch: mapSlackError
26
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("OpenidService.connect.userInfo", {
27
+ attributes: { "slack.method": "openid.connect.userInfo" }
28
+ }));
29
+ return {
30
+ connect: {
31
+ token: ConnectToken,
32
+ userInfo: ConnectUserInfo
33
+ }
34
+ };
35
+ }),
36
+ dependencies: [SlackClient.Default]
37
+ }) {
38
+ }
39
+ //# sourceMappingURL=OpenidService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenidService.js","sourceRoot":"","sources":["../../src/generated/OpenidService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAO/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAA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2
+ * Generated Slack Pins Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import type { PinsAddArguments, PinsAddResponse, PinsListArguments, PinsListResponse, PinsRemoveArguments, PinsRemoveResponse } from "@slack/web-api";
7
+ import { SlackClient } from "../SlackClient.js";
8
+ import { type SlackError } from "../internal/errors.js";
9
+ declare const PinsService_base: Effect.Service.Class<PinsService, "effect-slack/PinsService", {
10
+ readonly effect: Effect.Effect<{
11
+ readonly add: (args: PinsAddArguments) => Effect.Effect<PinsAddResponse, SlackError>;
12
+ readonly list: (args: PinsListArguments) => Effect.Effect<PinsListResponse, SlackError>;
13
+ readonly remove: (args: PinsRemoveArguments) => Effect.Effect<PinsRemoveResponse, SlackError>;
14
+ }, never, SlackClient>;
15
+ readonly dependencies: readonly [import("effect/Layer").Layer<SlackClient, never, import("../SlackConfig.js").SlackConfig>];
16
+ }>;
17
+ export declare class PinsService extends PinsService_base {
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=PinsService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PinsService.d.ts","sourceRoot":"","sources":["../../src/generated/PinsService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;;;6BAUjF,gBAAgB,KACrB,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,UAAU,CAAC;8BAerC,iBAAiB,KACtB,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,UAAU,CAAC;gCAetC,mBAAmB,KACxB,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE,UAAU,CAAC;;;;AAzCpD,qBAAa,WAAY,SAAQ,gBA2D/B;CAAG"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Generated Slack Pins Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import { SlackClient } from "../SlackClient.js";
7
+ import { mapSlackError, annotateSpanWithError } from "../internal/errors.js";
8
+ export class PinsService extends Effect.Service()("effect-slack/PinsService", {
9
+ effect: Effect.gen(function* () {
10
+ const client = yield* SlackClient;
11
+ /**
12
+ * Pins an item to a channel.
13
+ */
14
+ const add = (args) => Effect.tryPromise({
15
+ try: () => client.pins.add(args),
16
+ catch: mapSlackError
17
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("PinsService.add", {
18
+ attributes: { "slack.method": "pins.add" }
19
+ }));
20
+ /**
21
+ * Lists items pinned to a channel.
22
+ */
23
+ const list = (args) => Effect.tryPromise({
24
+ try: () => client.pins.list(args),
25
+ catch: mapSlackError
26
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("PinsService.list", {
27
+ attributes: { "slack.method": "pins.list" }
28
+ }));
29
+ /**
30
+ * Un-pins an item from a channel.
31
+ */
32
+ const remove = (args) => Effect.tryPromise({
33
+ try: () => client.pins.remove(args),
34
+ catch: mapSlackError
35
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("PinsService.remove", {
36
+ attributes: { "slack.method": "pins.remove" }
37
+ }));
38
+ return {
39
+ add,
40
+ list,
41
+ remove
42
+ };
43
+ }),
44
+ dependencies: [SlackClient.Default]
45
+ }) {
46
+ }
47
+ //# sourceMappingURL=PinsService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PinsService.js","sourceRoot":"","sources":["../../src/generated/PinsService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAS/B,OAAO,EA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,CAAC;YACnC,KAAK,EAAE,aAAa;SACrB,CAAC,CAAC,IAAI,CACL,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EACtC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE;YACpC,UAAU,EAAE,EAAE,cAAc,EAAE,aAAa,EAAE;SAC9C,CAAC,CACH,CAAA;QAEH,OAAO;YACL,GAAG;YACH,IAAI;YACJ,MAAM;SACE,CAAA;IACZ,CAAC,CAAC;IACF,YAAY,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;CACpC,CAAC;CAAG"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Generated Slack Reactions Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import type { ReactionsAddArguments, ReactionsAddResponse, ReactionsGetArguments, ReactionsGetResponse, ReactionsListArguments, ReactionsListResponse, ReactionsRemoveArguments, ReactionsRemoveResponse } from "@slack/web-api";
7
+ import { SlackClient } from "../SlackClient.js";
8
+ import { type SlackError } from "../internal/errors.js";
9
+ declare const ReactionsService_base: Effect.Service.Class<ReactionsService, "effect-slack/ReactionsService", {
10
+ readonly effect: Effect.Effect<{
11
+ readonly add: (args: ReactionsAddArguments) => Effect.Effect<ReactionsAddResponse, SlackError>;
12
+ readonly get: (args: ReactionsGetArguments) => Effect.Effect<ReactionsGetResponse, SlackError>;
13
+ readonly list: (args?: ReactionsListArguments) => Effect.Effect<ReactionsListResponse, SlackError>;
14
+ readonly remove: (args: ReactionsRemoveArguments) => Effect.Effect<ReactionsRemoveResponse, SlackError>;
15
+ }, never, SlackClient>;
16
+ readonly dependencies: readonly [import("effect/Layer").Layer<SlackClient, never, import("../SlackConfig.js").SlackConfig>];
17
+ }>;
18
+ export declare class ReactionsService extends ReactionsService_base {
19
+ }
20
+ export {};
21
+ //# sourceMappingURL=ReactionsService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReactionsService.d.ts","sourceRoot":"","sources":["../../src/generated/ReactionsService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAwC,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;;;6BAUjF,qBAAqB,KAC1B,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,UAAU,CAAC;6BAe1C,qBAAqB,KAC1B,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,UAAU,CAAC;+BAezC,sBAAsB,KAC5B,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE,UAAU,CAAC;gCAe3C,wBAAwB,KAC7B,MAAM,CAAC,MAAM,CAAC,uBAAuB,EAAE,UAAU,CAAC;;;;AAzDzD,qBAAa,gBAAiB,SAAQ,qBA4EpC;CAAG"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Generated Slack Reactions Service
3
+ * DO NOT EDIT - This file is auto-generated by scripts/generate-services.ts
4
+ */
5
+ import { Effect } from "effect";
6
+ import { SlackClient } from "../SlackClient.js";
7
+ import { mapSlackError, annotateSpanWithError } from "../internal/errors.js";
8
+ export class ReactionsService extends Effect.Service()("effect-slack/ReactionsService", {
9
+ effect: Effect.gen(function* () {
10
+ const client = yield* SlackClient;
11
+ /**
12
+ * Adds a reaction to an item.
13
+ */
14
+ const add = (args) => Effect.tryPromise({
15
+ try: () => client.reactions.add(args),
16
+ catch: mapSlackError
17
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("ReactionsService.add", {
18
+ attributes: { "slack.method": "reactions.add" }
19
+ }));
20
+ /**
21
+ * Gets reactions for an item.
22
+ */
23
+ const get = (args) => Effect.tryPromise({
24
+ try: () => client.reactions.get(args),
25
+ catch: mapSlackError
26
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("ReactionsService.get", {
27
+ attributes: { "slack.method": "reactions.get" }
28
+ }));
29
+ /**
30
+ * List reactions made by a user.
31
+ */
32
+ const list = (args) => Effect.tryPromise({
33
+ try: () => client.reactions.list(args),
34
+ catch: mapSlackError
35
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("ReactionsService.list", {
36
+ attributes: { "slack.method": "reactions.list" }
37
+ }));
38
+ /**
39
+ * Removes a reaction from an item.
40
+ */
41
+ const remove = (args) => Effect.tryPromise({
42
+ try: () => client.reactions.remove(args),
43
+ catch: mapSlackError
44
+ }).pipe(Effect.tapError(annotateSpanWithError), Effect.withSpan("ReactionsService.remove", {
45
+ attributes: { "slack.method": "reactions.remove" }
46
+ }));
47
+ return {
48
+ add,
49
+ get,
50
+ list,
51
+ remove
52
+ };
53
+ }),
54
+ dependencies: [SlackClient.Default]
55
+ }) {
56
+ }
57
+ //# sourceMappingURL=ReactionsService.js.map