import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** * Rich context object with id and optional data */ export type GenerateChatOauthUrlRequestDtoContext2 = { id: string; /** * Optional additional context data */ data?: { [k: string]: any; } | undefined; }; export type GenerateChatOauthUrlRequestDtoContext = GenerateChatOauthUrlRequestDtoContext2 | string; /** * OAuth flow mode. Use "connect" (default) to create a workspace channel connection, or "link_user" to identify the subscriber's Slack user ID without creating a connection. */ export declare const Mode: { readonly Connect: "connect"; readonly LinkUser: "link_user"; }; /** * OAuth flow mode. Use "connect" (default) to create a workspace channel connection, or "link_user" to identify the subscriber's Slack user ID without creating a connection. */ export type Mode = ClosedEnum; /** * Connection mode that determines how the channel connection is scoped. Use "subscriber" (default) to associate the connection with a specific subscriber. Use "shared" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection. */ export declare const GenerateChatOauthUrlRequestDtoConnectionMode: { readonly Subscriber: "subscriber"; readonly Shared: "shared"; }; /** * Connection mode that determines how the channel connection is scoped. Use "subscriber" (default) to associate the connection with a specific subscriber. Use "shared" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection. */ export type GenerateChatOauthUrlRequestDtoConnectionMode = ClosedEnum; export type GenerateChatOauthUrlRequestDto = { /** * The subscriber ID to link the channel connection to. For Slack: Required for incoming webhook endpoints, optional for workspace connections. For MS Teams: Optional. Admin consent is tenant-wide and can be associated with a subscriber for organizational purposes. */ subscriberId?: string | undefined; /** * Integration identifier */ integrationIdentifier: string; /** * Identifier of the channel connection that will be created. It is generated automatically if not provided. */ connectionIdentifier?: string | undefined; context?: { [k: string]: GenerateChatOauthUrlRequestDtoContext2 | string; } | undefined; /** * **Slack only**: OAuth scopes to request during authorization. These define the permissions your Slack integration will have. If not specified, default scopes will be used: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email. **MS Teams**: This parameter is ignored. MS Teams uses admin consent with pre-configured permissions in Azure AD. Note: The generated OAuth URL expires after 5 minutes. */ scope?: Array | undefined; /** * **Slack only, link_user mode**: User-level OAuth scopes to request during authorization. Used when mode is "link_user" to identify the Slack user via "Sign in with Slack". If not specified, defaults to: identity.basic. */ userScope?: Array | undefined; /** * OAuth flow mode. Use "connect" (default) to create a workspace channel connection, or "link_user" to identify the subscriber's Slack user ID without creating a connection. */ mode?: Mode | undefined; /** * Connection mode that determines how the channel connection is scoped. Use "subscriber" (default) to associate the connection with a specific subscriber. Use "shared" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection. */ connectionMode?: GenerateChatOauthUrlRequestDtoConnectionMode | undefined; /** * When true, after the workspace/tenant connection is created the OAuth flow also links the subscriber who clicked "Connect" as a personal endpoint. For Slack, this uses the authed_user.id already returned by oauth.v2.access — no extra redirect. For MS Teams, this triggers a second OAuth redirect for delegated user-identity consent. Defaults to false when omitted; the SlackConnectButton and MsTeamsConnectButton SDK components default this to true. */ autoLinkUser?: boolean | undefined; }; /** @internal */ export type GenerateChatOauthUrlRequestDtoContext2$Outbound = { id: string; data?: { [k: string]: any; } | undefined; }; /** @internal */ export declare const GenerateChatOauthUrlRequestDtoContext2$outboundSchema: z.ZodType; export declare function generateChatOauthUrlRequestDtoContext2ToJSON(generateChatOauthUrlRequestDtoContext2: GenerateChatOauthUrlRequestDtoContext2): string; /** @internal */ export type GenerateChatOauthUrlRequestDtoContext$Outbound = GenerateChatOauthUrlRequestDtoContext2$Outbound | string; /** @internal */ export declare const GenerateChatOauthUrlRequestDtoContext$outboundSchema: z.ZodType; export declare function generateChatOauthUrlRequestDtoContextToJSON(generateChatOauthUrlRequestDtoContext: GenerateChatOauthUrlRequestDtoContext): string; /** @internal */ export declare const Mode$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const GenerateChatOauthUrlRequestDtoConnectionMode$outboundSchema: z.ZodNativeEnum; /** @internal */ export type GenerateChatOauthUrlRequestDto$Outbound = { subscriberId?: string | undefined; integrationIdentifier: string; connectionIdentifier?: string | undefined; context?: { [k: string]: GenerateChatOauthUrlRequestDtoContext2$Outbound | string; } | undefined; scope?: Array | undefined; userScope?: Array | undefined; mode?: string | undefined; connectionMode?: string | undefined; autoLinkUser?: boolean | undefined; }; /** @internal */ export declare const GenerateChatOauthUrlRequestDto$outboundSchema: z.ZodType; export declare function generateChatOauthUrlRequestDtoToJSON(generateChatOauthUrlRequestDto: GenerateChatOauthUrlRequestDto): string; //# sourceMappingURL=generatechatoauthurlrequestdto.d.ts.map