1 | import type { View } from '@slack/types';
|
2 | import type { TokenOverridable } from './common';
|
3 | export interface BaseViewsArguments {
|
4 | /** @description A {@link https://api.slack.com/reference/surfaces/views view payload}. */
|
5 | view: View;
|
6 | }
|
7 | export interface ViewTriggerId {
|
8 | /**
|
9 | * @description An access token originating from a user interaction in the Slack client.
|
10 | * One of `trigger_id` or `interactivity_pointer` is required to interact with views.
|
11 | */
|
12 | trigger_id: string;
|
13 | }
|
14 | export interface ViewInteractivityPointer {
|
15 | /**
|
16 | * @description An access token originating from a user interaction in the Slack client.
|
17 | * One of `trigger_id` or `interactivity_pointer` is required to interact with views.
|
18 | */
|
19 | interactivity_pointer: string;
|
20 | }
|
21 | export type ViewsOpenArguments = BaseViewsArguments & TokenOverridable & (ViewTriggerId | ViewInteractivityPointer);
|
22 | export type ViewsPushArguments = BaseViewsArguments & TokenOverridable & (ViewTriggerId | ViewInteractivityPointer);
|
23 | export interface ViewHash {
|
24 | /**
|
25 | * @description A string that represents view state to protect against possible race conditions.
|
26 | * @see {@link https://api.slack.com/surfaces/modals#handling_race_conditions Avoiding race conditions when using views}.
|
27 | */
|
28 | hash?: string;
|
29 | }
|
30 | export interface ViewsPublishArguments extends BaseViewsArguments, TokenOverridable, ViewHash {
|
31 | /** @description ID of the user you want publish a view to. */
|
32 | user_id: string;
|
33 | }
|
34 | export interface ViewExternalId {
|
35 | /**
|
36 | * @description A unique identifier of the view set by the developer. Must be unique for all views on a team.
|
37 | * Max length of 255 characters. Either `view_id` or `external_id` is required.
|
38 | */
|
39 | external_id: string;
|
40 | }
|
41 | export interface ViewViewId {
|
42 | /**
|
43 | * @description A unique identifier of the view to be updated. Either `view_id` or `external_id` is required.
|
44 | */
|
45 | view_id: string;
|
46 | }
|
47 | export type ViewsUpdateArguments = BaseViewsArguments & TokenOverridable & (ViewExternalId | ViewViewId) & ViewHash;
|
48 | //# sourceMappingURL=views.d.ts.map |
\ | No newline at end of file |