UNPKG

1.87 kBTypeScriptView Raw
1import type { TokenOverridable } from '../common';
2interface Date {
3 /**
4 * @description Date to retrieve the analytics data for, expressed as `YYYY-MM-DD` in UTC.
5 * Required unless `metadata_only` is set to `true`.
6 */
7 date: string;
8}
9interface MemberArgs extends Date {
10 /**
11 * @description The type of analytics to retrieve. The options are currently limited to
12 * `member` (for grid member analytics) and `public_channel` (for public channel analytics).
13 */
14 type: 'member';
15}
16interface TypeChannel {
17 /**
18 * @description The type of analytics to retrieve. The options are currently limited to
19 * `member` (for grid member analytics) and `public_channel` (for public channel analytics).
20 */
21 type: 'public_channel';
22}
23interface PublicChannelWithDate extends TypeChannel, Date {
24 /**
25 * @description Retrieve metadata for the `type` of analytics indicated. Can be used only with `type` set to
26 * `public_channel` analytics. Omit the date parameter when using this argument. Defaults to `false`.
27 * @see {@link https://api.slack.com/methods/admin.analytics.getFile#metadata_only Public channel metadata}.
28 */
29 metadata_only?: false;
30}
31interface PublicChannelWithMetadata extends TypeChannel {
32 /**
33 * @description Retrieve metadata for the `type` of analytics indicated. Can be used only with `type` set to
34 * `public_channel` analytics. Omit the date parameter when using this argument. Defaults to `false`.
35 * @see {@link https://api.slack.com/methods/admin.analytics.getFile#metadata_only Public channel metadata}.
36 */
37 metadata_only: true;
38}
39type PublicChannelArgs = PublicChannelWithDate | PublicChannelWithMetadata;
40export type AdminAnalyticsGetFileArguments = TokenOverridable & (MemberArgs | PublicChannelArgs);
41export {};
42//# sourceMappingURL=analytics.d.ts.map
\No newline at end of file