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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/lib/_bundle/sdk.js +1 -1
  2. package/lib/_bundle/sdk.js.map +1 -1
  3. package/lib/credentials.d.ts +2 -1
  4. package/lib/credentials.d.ts.map +1 -1
  5. package/lib/index.d.ts +3 -4
  6. package/lib/index.d.ts.map +1 -1
  7. package/lib/index.lazy.js.map +1 -1
  8. package/lib/protocol.d.ts +3 -2
  9. package/lib/protocol.d.ts.map +1 -1
  10. package/lib/services/admin.d.ts +594 -356
  11. package/lib/services/admin.d.ts.map +1 -1
  12. package/lib/services/admin.js +149 -139
  13. package/lib/services/admin.js.map +1 -1
  14. package/lib/services/agents.d.ts +89 -97
  15. package/lib/services/agents.d.ts.map +1 -1
  16. package/lib/services/agents.js +1 -1
  17. package/lib/services/agents.js.map +1 -1
  18. package/lib/services/api.d.ts +2 -2
  19. package/lib/services/api.d.ts.map +1 -1
  20. package/lib/services/api.js +1 -1
  21. package/lib/services/api.js.map +1 -1
  22. package/lib/services/apps.d.ts +74 -74
  23. package/lib/services/apps.d.ts.map +1 -1
  24. package/lib/services/apps.js +34 -33
  25. package/lib/services/apps.js.map +1 -1
  26. package/lib/services/assistant.d.ts +55 -46
  27. package/lib/services/assistant.d.ts.map +1 -1
  28. package/lib/services/assistant.js +1 -1
  29. package/lib/services/assistant.js.map +1 -1
  30. package/lib/services/auth.d.ts +27 -27
  31. package/lib/services/auth.d.ts.map +1 -1
  32. package/lib/services/auth.js +1 -1
  33. package/lib/services/auth.js.map +1 -1
  34. package/lib/services/blocks.d.ts +3 -3
  35. package/lib/services/blocks.d.ts.map +1 -1
  36. package/lib/services/blocks.js +1 -1
  37. package/lib/services/blocks.js.map +1 -1
  38. package/lib/services/bookmarks.d.ts +19 -19
  39. package/lib/services/bookmarks.d.ts.map +1 -1
  40. package/lib/services/bookmarks.js +1 -1
  41. package/lib/services/bookmarks.js.map +1 -1
  42. package/lib/services/bots.d.ts +23 -23
  43. package/lib/services/bots.d.ts.map +1 -1
  44. package/lib/services/bots.js +1 -1
  45. package/lib/services/bots.js.map +1 -1
  46. package/lib/services/calls.d.ts +10 -10
  47. package/lib/services/calls.d.ts.map +1 -1
  48. package/lib/services/calls.js +1 -1
  49. package/lib/services/calls.js.map +1 -1
  50. package/lib/services/canvases.d.ts +18 -18
  51. package/lib/services/canvases.d.ts.map +1 -1
  52. package/lib/services/canvases.js +1 -1
  53. package/lib/services/canvases.js.map +1 -1
  54. package/lib/services/chat.d.ts +103 -103
  55. package/lib/services/chat.d.ts.map +1 -1
  56. package/lib/services/chat.js +1 -1
  57. package/lib/services/chat.js.map +1 -1
  58. package/lib/services/conversations.d.ts +109 -103
  59. package/lib/services/conversations.d.ts.map +1 -1
  60. package/lib/services/conversations.js +39 -38
  61. package/lib/services/conversations.js.map +1 -1
  62. package/lib/services/dialog.d.ts.map +1 -1
  63. package/lib/services/dialog.js +1 -1
  64. package/lib/services/dialog.js.map +1 -1
  65. package/lib/services/dnd.d.ts +14 -14
  66. package/lib/services/dnd.d.ts.map +1 -1
  67. package/lib/services/dnd.js +1 -1
  68. package/lib/services/dnd.js.map +1 -1
  69. package/lib/services/emoji.d.ts +6 -6
  70. package/lib/services/emoji.d.ts.map +1 -1
  71. package/lib/services/emoji.js +1 -1
  72. package/lib/services/emoji.js.map +1 -1
  73. package/lib/services/entity.d.ts +14 -14
  74. package/lib/services/entity.d.ts.map +1 -1
  75. package/lib/services/entity.js +1 -1
  76. package/lib/services/entity.js.map +1 -1
  77. package/lib/services/files.d.ts +106 -106
  78. package/lib/services/files.d.ts.map +1 -1
  79. package/lib/services/files.js +30 -1
  80. package/lib/services/files.js.map +1 -1
  81. package/lib/services/functions.d.ts +37 -37
  82. package/lib/services/functions.d.ts.map +1 -1
  83. package/lib/services/functions.js +1 -1
  84. package/lib/services/functions.js.map +1 -1
  85. package/lib/services/index.d.ts +1 -0
  86. package/lib/services/index.d.ts.map +1 -1
  87. package/lib/services/index.js +1 -0
  88. package/lib/services/lists.d.ts +47 -45
  89. package/lib/services/lists.d.ts.map +1 -1
  90. package/lib/services/lists.js +1 -1
  91. package/lib/services/lists.js.map +1 -1
  92. package/lib/services/migration.d.ts +3 -3
  93. package/lib/services/migration.d.ts.map +1 -1
  94. package/lib/services/migration.js +1 -1
  95. package/lib/services/migration.js.map +1 -1
  96. package/lib/services/oauth.d.ts +102 -102
  97. package/lib/services/oauth.d.ts.map +1 -1
  98. package/lib/services/oauth.js +1 -1
  99. package/lib/services/oauth.js.map +1 -1
  100. package/lib/services/openid.d.ts +40 -40
  101. package/lib/services/openid.d.ts.map +1 -1
  102. package/lib/services/openid.js +1 -1
  103. package/lib/services/openid.js.map +1 -1
  104. package/lib/services/pins.d.ts +9 -9
  105. package/lib/services/pins.d.ts.map +1 -1
  106. package/lib/services/pins.js +1 -1
  107. package/lib/services/pins.js.map +1 -1
  108. package/lib/services/reactions.d.ts +23 -23
  109. package/lib/services/reactions.d.ts.map +1 -1
  110. package/lib/services/reactions.js +1 -1
  111. package/lib/services/reactions.js.map +1 -1
  112. package/lib/services/reminders.d.ts +8 -8
  113. package/lib/services/reminders.d.ts.map +1 -1
  114. package/lib/services/reminders.js +1 -1
  115. package/lib/services/reminders.js.map +1 -1
  116. package/lib/services/rtm.d.ts +11 -11
  117. package/lib/services/rtm.d.ts.map +1 -1
  118. package/lib/services/rtm.js +1 -1
  119. package/lib/services/rtm.js.map +1 -1
  120. package/lib/services/search.d.ts +84 -80
  121. package/lib/services/search.d.ts.map +1 -1
  122. package/lib/services/search.js +1 -1
  123. package/lib/services/search.js.map +1 -1
  124. package/lib/services/slackbot.d.ts +366 -0
  125. package/lib/services/slackbot.d.ts.map +1 -0
  126. package/lib/services/slackbot.js +2 -0
  127. package/lib/services/slackbot.js.map +1 -0
  128. package/lib/services/stars.d.ts +16 -16
  129. package/lib/services/stars.d.ts.map +1 -1
  130. package/lib/services/stars.js +1 -1
  131. package/lib/services/stars.js.map +1 -1
  132. package/lib/services/team.d.ts +39 -37
  133. package/lib/services/team.d.ts.map +1 -1
  134. package/lib/services/team.js +1 -1
  135. package/lib/services/team.js.map +1 -1
  136. package/lib/services/tooling.d.ts.map +1 -1
  137. package/lib/services/tooling.js +1 -1
  138. package/lib/services/tooling.js.map +1 -1
  139. package/lib/services/usergroups.d.ts +30 -30
  140. package/lib/services/usergroups.d.ts.map +1 -1
  141. package/lib/services/usergroups.js +1 -1
  142. package/lib/services/usergroups.js.map +1 -1
  143. package/lib/services/users.d.ts +37 -37
  144. package/lib/services/users.d.ts.map +1 -1
  145. package/lib/services/users.js +1 -1
  146. package/lib/services/users.js.map +1 -1
  147. package/lib/services/views.d.ts +9 -9
  148. package/lib/services/views.d.ts.map +1 -1
  149. package/lib/services/views.js +1 -1
  150. package/lib/services/views.js.map +1 -1
  151. package/lib/services/workflows.d.ts +16 -16
  152. package/lib/services/workflows.d.ts.map +1 -1
  153. package/lib/services/workflows.js +1 -1
  154. package/lib/services/workflows.js.map +1 -1
  155. package/lib/services.lazy/admin.js +2 -2
  156. package/lib/services.lazy/apps.js +1 -1
  157. package/lib/services.lazy/conversations.js +1 -1
  158. package/lib/services.lazy/files.js +3 -1
  159. package/lib/services.lazy/index.js +2 -2
  160. package/lib/services.lazy/slackbot.js +1 -0
  161. package/package.json +8 -7
  162. package/src/credentials.ts +3 -2
  163. package/src/index.ts +3 -4
  164. package/src/protocol.ts +23 -21
  165. package/src/services/admin.ts +1882 -1034
  166. package/src/services/agents.ts +128 -103
  167. package/src/services/api.ts +17 -2
  168. package/src/services/apps.ts +133 -74
  169. package/src/services/assistant.ts +109 -54
  170. package/src/services/auth.ts +46 -27
  171. package/src/services/blocks.ts +18 -3
  172. package/src/services/bookmarks.ts +40 -19
  173. package/src/services/bots.ts +38 -23
  174. package/src/services/calls.ts +35 -10
  175. package/src/services/canvases.ts +77 -46
  176. package/src/services/chat.ts +142 -103
  177. package/src/services/conversations.ts +195 -115
  178. package/src/services/dialog.ts +15 -0
  179. package/src/services/dnd.ts +37 -14
  180. package/src/services/emoji.ts +21 -6
  181. package/src/services/entity.ts +33 -14
  182. package/src/services/files.ts +149 -106
  183. package/src/services/functions.ts +66 -37
  184. package/src/services/index.ts +1 -0
  185. package/src/services/lists.ts +86 -46
  186. package/src/services/migration.ts +18 -3
  187. package/src/services/oauth.ts +127 -102
  188. package/src/services/openid.ts +57 -40
  189. package/src/services/pins.ts +28 -9
  190. package/src/services/reactions.ts +44 -23
  191. package/src/services/reminders.ts +31 -8
  192. package/src/services/rtm.ts +28 -11
  193. package/src/services/search.ts +142 -130
  194. package/src/services/slackbot.ts +766 -0
  195. package/src/services/stars.ts +35 -16
  196. package/src/services/team.ts +73 -37
  197. package/src/services/tooling.ts +15 -0
  198. package/src/services/usergroups.ts +57 -30
  199. package/src/services/users.ts +76 -37
  200. package/src/services/views.ts +30 -9
  201. package/src/services/workflows.ts +45 -16
@@ -11,11 +11,24 @@ const __s: any[] = [];
11
11
 
12
12
  export type { SlackOpError, SlackOpContext };
13
13
 
14
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
15
+ const TELEMETRY = {
16
+ system: "slack-api",
17
+ responseHeaders: [
18
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
19
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
20
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
21
+ ],
22
+ prefix: "Slack",
23
+ service: "Pins",
24
+ propagate: "w3c",
25
+ } as const;
26
+
14
27
  export interface AddPinRequest {
15
- /** Channel to pin the messsage to. You must also include a `timestamp` when pinning messages. */
28
+ /** Channel to pin the message to. You must also include a `timestamp` when pinning messages. */
16
29
  channel: string;
17
30
  /** Timestamp of the message to pin. You must also include the `channel`. */
18
- timestamp?: string;
31
+ timestamp?: string | undefined;
19
32
  }
20
33
  export interface AddPinResponse {
21
34
  /** Always `true` (a failed call raises a typed error instead). */
@@ -30,23 +43,23 @@ export interface ListPinsResponseItemsItem {
30
43
  type: ListPinsResponseItemsItemType;
31
44
  created: number;
32
45
  created_by: string;
33
- channel?: string;
34
- message?: unknown;
35
- file?: unknown;
36
- comment?: string;
46
+ channel?: string | undefined;
47
+ message?: unknown | undefined;
48
+ file?: unknown | undefined;
49
+ comment?: string | undefined;
37
50
  }
38
51
  export type ListPinsResponseItemsList = Array<ListPinsResponseItemsItem>;
39
52
  export interface ListPinsResponse {
40
53
  /** Always `true` (a failed call raises a typed error instead). */
41
54
  ok: boolean;
42
- items?: ListPinsResponseItemsList;
43
- count?: number;
55
+ items?: ListPinsResponseItemsList | undefined;
56
+ count?: number | undefined;
44
57
  }
45
58
  export interface RemovePinRequest {
46
59
  /** Channel where the item is pinned to. */
47
60
  channel: string;
48
61
  /** Timestamp of the message to un-pin. */
49
- timestamp?: string;
62
+ timestamp?: string | undefined;
50
63
  }
51
64
  export interface RemovePinResponse {
52
65
  /** Always `true` (a failed call raises a typed error instead). */
@@ -65,6 +78,8 @@ export const addPin: API.OperationMethod<
65
78
  errors: [SlackError, SlackRateLimited],
66
79
  protocol: SlackProtocol,
67
80
  retry: Retry.Retry,
81
+ telemetry: TELEMETRY,
82
+ span: "AddPin",
68
83
  }));
69
84
 
70
85
  export type ListPinsError = SlackOpError;
@@ -80,6 +95,8 @@ export const listPins: API.OperationMethod<
80
95
  errors: [SlackError, SlackRateLimited],
81
96
  protocol: SlackProtocol,
82
97
  retry: Retry.Retry,
98
+ telemetry: TELEMETRY,
99
+ span: "ListPins",
83
100
  }));
84
101
 
85
102
  export type RemovePinError = SlackOpError;
@@ -95,6 +112,8 @@ export const removePin: API.OperationMethod<
95
112
  errors: [SlackError, SlackRateLimited],
96
113
  protocol: SlackProtocol,
97
114
  retry: Retry.Retry,
115
+ telemetry: TELEMETRY,
116
+ span: "RemovePin",
98
117
  }));
99
118
 
100
119
  // Schema builders: each runs one schema initializer, on that schema's first use.
@@ -12,6 +12,19 @@ const __s: any[] = [];
12
12
 
13
13
  export type { SlackOpError, SlackOpContext };
14
14
 
15
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
16
+ const TELEMETRY = {
17
+ system: "slack-api",
18
+ responseHeaders: [
19
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
20
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
21
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
22
+ ],
23
+ prefix: "Slack",
24
+ service: "Reactions",
25
+ propagate: "w3c",
26
+ } as const;
27
+
15
28
  export interface AddReactionRequest {
16
29
  /** Channel where the message to add reaction to was posted. */
17
30
  channel: string;
@@ -26,65 +39,65 @@ export interface AddReactionResponse {
26
39
  }
27
40
  export interface GetReactionRequest {
28
41
  /** Channel where the message to get reactions for was posted. */
29
- channel?: string;
42
+ channel?: string | undefined;
30
43
  /** File to get reactions for. */
31
- file?: string;
44
+ file?: string | undefined;
32
45
  /** File comment to get reactions for. */
33
- file_comment?: string;
46
+ file_comment?: string | undefined;
34
47
  /** If true always return the complete reaction list. */
35
- full?: boolean;
48
+ full?: boolean | undefined;
36
49
  /** Timestamp of the message to get reactions for. */
37
- timestamp?: string;
50
+ timestamp?: string | undefined;
38
51
  }
39
52
  export interface GetReactionResponse {
40
53
  /** Always `true` (a failed call raises a typed error instead). */
41
54
  ok: boolean;
42
- comment?: unknown;
43
- message?: unknown;
55
+ comment?: unknown | undefined;
56
+ message?: unknown | undefined;
44
57
  type: string;
45
- channel?: string;
46
- file?: unknown;
58
+ channel?: string | undefined;
59
+ file?: unknown | undefined;
47
60
  }
48
61
  export interface ListReactionsRequest {
49
62
  /** Show reactions made by this user. Defaults to the authed user. */
50
- user?: string;
63
+ user?: string | undefined;
51
64
  /** If true always return the complete reaction list. */
52
- full?: boolean;
53
- count?: number;
54
- page?: number;
65
+ full?: boolean | undefined;
66
+ count?: number | undefined;
67
+ page?: number | undefined;
55
68
  /** Parameter for pagination. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more details. */
56
- cursor?: string;
69
+ cursor?: string | undefined;
57
70
  /** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. */
58
- limit?: number;
71
+ limit?: number | undefined;
59
72
  /** encoded team id to list reactions in, required if org token is used */
60
- team_id?: string;
73
+ team_id?: string | undefined;
61
74
  }
62
75
  export type ListReactionsResponseItemsItemMap = { [key: string]: unknown | undefined };
63
76
  export type ListReactionsResponseItemsList = Array<ListReactionsResponseItemsItemMap>;
64
77
  /** Pagination metadata. An empty `next_cursor` means the last page. */
65
78
  export interface ListReactionsResponseResponseMetadata {
66
79
  /** Cursor for the next page -- pass as `cursor` on the next call. */
67
- next_cursor?: string;
80
+ next_cursor?: string | undefined;
68
81
  }
69
82
  export interface ListReactionsResponse {
70
83
  /** Always `true` (a failed call raises a typed error instead). */
71
84
  ok: boolean;
72
85
  items: ListReactionsResponseItemsList;
73
- paging?: unknown;
86
+ paging?: unknown | undefined;
74
87
  /** Pagination metadata. An empty `next_cursor` means the last page. */
75
- response_metadata?: ListReactionsResponseResponseMetadata;
88
+ response_metadata?: ListReactionsResponseResponseMetadata | undefined;
76
89
  }
77
90
  export interface RemoveReactionRequest {
78
91
  /** Reaction (emoji) name. */
79
92
  name: string;
80
93
  /** File to remove reaction from. */
81
- file?: string;
94
+ file?: string | undefined;
82
95
  /** File comment to remove reaction from. */
83
- file_comment?: string;
96
+ file_comment?: string | undefined;
84
97
  /** Channel where the message to remove reaction from was posted. */
85
- channel?: string;
98
+ channel?: string | undefined;
86
99
  /** Timestamp of the message to remove reaction from. */
87
- timestamp?: string;
100
+ timestamp?: string | undefined;
88
101
  }
89
102
  export interface RemoveReactionResponse {
90
103
  /** Always `true` (a failed call raises a typed error instead). */
@@ -103,6 +116,8 @@ export const addReaction: API.OperationMethod<
103
116
  errors: [SlackError, SlackRateLimited],
104
117
  protocol: SlackProtocol,
105
118
  retry: Retry.Retry,
119
+ telemetry: TELEMETRY,
120
+ span: "AddReaction",
106
121
  }));
107
122
 
108
123
  export type GetReactionError = SlackOpError;
@@ -118,6 +133,8 @@ export const getReaction: API.OperationMethod<
118
133
  errors: [SlackError, SlackRateLimited],
119
134
  protocol: SlackProtocol,
120
135
  retry: Retry.Retry,
136
+ telemetry: TELEMETRY,
137
+ span: "GetReaction",
121
138
  }));
122
139
 
123
140
  export type ListReactionsError = SlackOpError;
@@ -135,6 +152,8 @@ export const listReactions: API.PaginatedOperationMethod<
135
152
  errors: [SlackError, SlackRateLimited],
136
153
  protocol: SlackProtocol,
137
154
  retry: Retry.Retry,
155
+ telemetry: TELEMETRY,
156
+ span: "ListReactions",
138
157
  pagination: {
139
158
  mode: "cursor",
140
159
  inputToken: "cursor",
@@ -159,6 +178,8 @@ export const removeReaction: API.OperationMethod<
159
178
  errors: [SlackError, SlackRateLimited],
160
179
  protocol: SlackProtocol,
161
180
  retry: Retry.Retry,
181
+ telemetry: TELEMETRY,
182
+ span: "RemoveReaction",
162
183
  }));
163
184
 
164
185
  // Schema builders: each runs one schema initializer, on that schema's first use.
@@ -11,17 +11,30 @@ const __s: any[] = [];
11
11
 
12
12
  export type { SlackOpError, SlackOpContext };
13
13
 
14
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
15
+ const TELEMETRY = {
16
+ system: "slack-api",
17
+ responseHeaders: [
18
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
19
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
20
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
21
+ ],
22
+ prefix: "Slack",
23
+ service: "Reminders",
24
+ propagate: "w3c",
25
+ } as const;
26
+
14
27
  export interface AddReminderRequest {
15
28
  /** The content of the reminder */
16
29
  text: string;
17
30
  /** Can also take a type of integer. When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday") */
18
31
  time: string;
19
32
  /** No longer supported - reminders cannot be set for other users. Previously, was the user who would receive the reminder. */
20
- user?: string;
33
+ user?: string | undefined;
21
34
  /** Encoded team id, required if org token is used */
22
- team_id?: string;
35
+ team_id?: string | undefined;
23
36
  /** Specify the repeating behavior of a reminder. Available options: `daily`, `weekly`, `monthly`, or `yearly`. If `weekly`, may further specify the days of the week. */
24
- recurrence?: unknown;
37
+ recurrence?: unknown | undefined;
25
38
  }
26
39
  export interface AddReminderResponse {
27
40
  /** Always `true` (a failed call raises a typed error instead). */
@@ -32,7 +45,7 @@ export interface CompleteReminderRequest {
32
45
  /** The ID of the reminder to be marked as complete */
33
46
  reminder: string;
34
47
  /** Encoded team id, required if org token is used */
35
- team_id?: string;
48
+ team_id?: string | undefined;
36
49
  }
37
50
  export interface CompleteReminderResponse {
38
51
  /** Always `true` (a failed call raises a typed error instead). */
@@ -42,7 +55,7 @@ export interface DeleteReminderRequest {
42
55
  /** The ID of the reminder */
43
56
  reminder: string;
44
57
  /** Encoded team id, required if org token is used */
45
- team_id?: string;
58
+ team_id?: string | undefined;
46
59
  }
47
60
  export interface DeleteReminderResponse {
48
61
  /** Always `true` (a failed call raises a typed error instead). */
@@ -50,19 +63,19 @@ export interface DeleteReminderResponse {
50
63
  }
51
64
  export interface ListRemindersRequest {
52
65
  /** Encoded team id, required if org token is passed */
53
- team_id?: string;
66
+ team_id?: string | undefined;
54
67
  }
55
68
  export type ListRemindersResponseRemindersList = Array<unknown>;
56
69
  export interface ListRemindersResponse {
57
70
  /** Always `true` (a failed call raises a typed error instead). */
58
71
  ok: boolean;
59
- reminders?: ListRemindersResponseRemindersList;
72
+ reminders?: ListRemindersResponseRemindersList | undefined;
60
73
  }
61
74
  export interface RemindersInfoRequest {
62
75
  /** The ID of the reminder */
63
76
  reminder: string;
64
77
  /** Encoded team id, required if org token is passed */
65
- team_id?: string;
78
+ team_id?: string | undefined;
66
79
  }
67
80
  export interface RemindersInfoResponse {
68
81
  /** Always `true` (a failed call raises a typed error instead). */
@@ -82,6 +95,8 @@ export const addReminder: API.OperationMethod<
82
95
  errors: [SlackError, SlackRateLimited],
83
96
  protocol: SlackProtocol,
84
97
  retry: Retry.Retry,
98
+ telemetry: TELEMETRY,
99
+ span: "AddReminder",
85
100
  }));
86
101
 
87
102
  export type CompleteReminderError = SlackOpError;
@@ -97,6 +112,8 @@ export const completeReminder: API.OperationMethod<
97
112
  errors: [SlackError, SlackRateLimited],
98
113
  protocol: SlackProtocol,
99
114
  retry: Retry.Retry,
115
+ telemetry: TELEMETRY,
116
+ span: "CompleteReminder",
100
117
  }));
101
118
 
102
119
  export type DeleteReminderError = SlackOpError;
@@ -112,6 +129,8 @@ export const deleteReminder: API.OperationMethod<
112
129
  errors: [SlackError, SlackRateLimited],
113
130
  protocol: SlackProtocol,
114
131
  retry: Retry.Retry,
132
+ telemetry: TELEMETRY,
133
+ span: "DeleteReminder",
115
134
  }));
116
135
 
117
136
  export type ListRemindersError = SlackOpError;
@@ -127,6 +146,8 @@ export const listReminders: API.OperationMethod<
127
146
  errors: [SlackError, SlackRateLimited],
128
147
  protocol: SlackProtocol,
129
148
  retry: Retry.Retry,
149
+ telemetry: TELEMETRY,
150
+ span: "ListReminders",
130
151
  }));
131
152
 
132
153
  export type RemindersInfoError = SlackOpError;
@@ -142,6 +163,8 @@ export const remindersInfo: API.OperationMethod<
142
163
  errors: [SlackError, SlackRateLimited],
143
164
  protocol: SlackProtocol,
144
165
  retry: Retry.Retry,
166
+ telemetry: TELEMETRY,
167
+ span: "RemindersInfo",
145
168
  }));
146
169
 
147
170
  // Schema builders: each runs one schema initializer, on that schema's first use.
@@ -11,11 +11,24 @@ const __s: any[] = [];
11
11
 
12
12
  export type { SlackOpError, SlackOpContext };
13
13
 
14
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
15
+ const TELEMETRY = {
16
+ system: "slack-api",
17
+ responseHeaders: [
18
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
19
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
20
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
21
+ ],
22
+ prefix: "Slack",
23
+ service: "Rtm",
24
+ propagate: "w3c",
25
+ } as const;
26
+
14
27
  export interface ConnectRtmRequest {
15
28
  /** Batch presence deliveries via subscription. Enabling changes the shape of `presence_change` events. See [batch presence](/apis/web-api/user-presence-and-status#batching). */
16
- batch_presence_aware?: boolean;
29
+ batch_presence_aware?: boolean | undefined;
17
30
  /** Only deliver presence events when requested by subscription. See [presence subscriptions](/apis/web-api/user-presence-and-status#subscriptions). */
18
- presence_sub?: boolean;
31
+ presence_sub?: boolean | undefined;
19
32
  }
20
33
  export interface ConnectRtmResponseSelf {
21
34
  id: string;
@@ -25,8 +38,8 @@ export interface ConnectRtmResponseTeam {
25
38
  domain: string;
26
39
  id: string;
27
40
  name: string;
28
- enterprise_id?: string;
29
- enterprise_name?: string;
41
+ enterprise_id?: string | undefined;
42
+ enterprise_name?: string | undefined;
30
43
  }
31
44
  export interface ConnectRtmResponse {
32
45
  /** Always `true` (a failed call raises a typed error instead). */
@@ -37,19 +50,19 @@ export interface ConnectRtmResponse {
37
50
  }
38
51
  export interface StartRtmRequest {
39
52
  /** Return timestamp only for latest message object of each channel (improves performance). */
40
- simple_latest?: boolean;
53
+ simple_latest?: boolean | undefined;
41
54
  /** Skip unread counts for each channel (improves performance). */
42
- no_unreads?: boolean;
55
+ no_unreads?: boolean | undefined;
43
56
  /** Returns MPIMs to the client in the API response. */
44
- mpim_aware?: boolean;
57
+ mpim_aware?: boolean | undefined;
45
58
  /** Only deliver presence events when requested by subscription. See [presence subscriptions](/apis/web-api/user-presence-and-status#subscriptions). */
46
- presence_sub?: boolean;
59
+ presence_sub?: boolean | undefined;
47
60
  /** Batch presence deliveries via subscription. Enabling changes the shape of `presence_change` events. See [batch presence](/apis/web-api/user-presence-and-status#batching). */
48
- batch_presence_aware?: boolean;
61
+ batch_presence_aware?: boolean | undefined;
49
62
  /** Exclude latest timestamps for channels, groups, mpims, and ims. Automatically sets `no_unreads` to `1` */
50
- no_latest?: boolean;
63
+ no_latest?: boolean | undefined;
51
64
  /** Set this to `true` to receive the locale for users and channels. Defaults to `false` */
52
- include_locale?: boolean;
65
+ include_locale?: boolean | undefined;
53
66
  }
54
67
  export type StartRtmResponseSelf = ConnectRtmResponseSelf;
55
68
  export type StartRtmResponseTeam = ConnectRtmResponseTeam;
@@ -73,6 +86,8 @@ export const connectRtm: API.OperationMethod<
73
86
  errors: [SlackError, SlackRateLimited],
74
87
  protocol: SlackProtocol,
75
88
  retry: Retry.Retry,
89
+ telemetry: TELEMETRY,
90
+ span: "ConnectRtm",
76
91
  }));
77
92
 
78
93
  export type StartRtmError = SlackOpError;
@@ -88,6 +103,8 @@ export const startRtm: API.OperationMethod<
88
103
  errors: [SlackError, SlackRateLimited],
89
104
  protocol: SlackProtocol,
90
105
  retry: Retry.Retry,
106
+ telemetry: TELEMETRY,
107
+ span: "StartRtm",
91
108
  }));
92
109
 
93
110
  // Schema builders: each runs one schema initializer, on that schema's first use.