import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** * Rich context object with id and optional data */ export type GenerateConnectOauthUrlRequestDtoContext2 = { id: string; /** * Optional additional context data */ data?: { [k: string]: any; } | undefined; }; export type GenerateConnectOauthUrlRequestDtoContext = GenerateConnectOauthUrlRequestDtoContext2 | string; /** * Connection mode that determines how the channel connection is scoped. "subscriber" (default) associates the connection with a specific subscriber. "shared" associates the connection with a context instead of a subscriber. */ export declare const GenerateConnectOauthUrlRequestDtoConnectionMode: { readonly Subscriber: "subscriber"; readonly Shared: "shared"; }; /** * Connection mode that determines how the channel connection is scoped. "subscriber" (default) associates the connection with a specific subscriber. "shared" associates the connection with a context instead of a subscriber. */ export type GenerateConnectOauthUrlRequestDtoConnectionMode = ClosedEnum; export type GenerateConnectOauthUrlRequestDto = { /** * The subscriber ID to associate with the channel connection. For Slack: optional for workspace connections (required only for incoming-webhook scope). For MS Teams: optional. Admin consent is tenant-wide. */ subscriberId?: string | undefined; /** * Integration identifier */ integrationIdentifier: string; /** * Identifier of the channel connection that will be created. Generated automatically if not provided. */ connectionIdentifier?: string | undefined; context?: { [k: string]: GenerateConnectOauthUrlRequestDtoContext2 | string; } | undefined; /** * **Slack only**: OAuth scopes to request during authorization. If not specified, default scopes will be used: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email. **MS Teams**: ignored — uses admin consent with pre-configured Azure AD permissions. */ scope?: Array | undefined; /** * Connection mode that determines how the channel connection is scoped. "subscriber" (default) associates the connection with a specific subscriber. "shared" associates the connection with a context instead of a subscriber. */ connectionMode?: GenerateConnectOauthUrlRequestDtoConnectionMode | undefined; /** * When true (default when connectionMode is "subscriber"), after the workspace/tenant connection is created the OAuth flow also links the subscriber who clicked "Connect" as a personal endpoint. For Slack, uses the authed_user.id returned by oauth.v2.access — no extra redirect. For MS Teams, triggers a second OAuth redirect for delegated user-identity consent. Set to false to only create the workspace connection without linking the individual user. */ autoLinkUser?: boolean | undefined; }; /** @internal */ export type GenerateConnectOauthUrlRequestDtoContext2$Outbound = { id: string; data?: { [k: string]: any; } | undefined; }; /** @internal */ export declare const GenerateConnectOauthUrlRequestDtoContext2$outboundSchema: z.ZodType; export declare function generateConnectOauthUrlRequestDtoContext2ToJSON(generateConnectOauthUrlRequestDtoContext2: GenerateConnectOauthUrlRequestDtoContext2): string; /** @internal */ export type GenerateConnectOauthUrlRequestDtoContext$Outbound = GenerateConnectOauthUrlRequestDtoContext2$Outbound | string; /** @internal */ export declare const GenerateConnectOauthUrlRequestDtoContext$outboundSchema: z.ZodType; export declare function generateConnectOauthUrlRequestDtoContextToJSON(generateConnectOauthUrlRequestDtoContext: GenerateConnectOauthUrlRequestDtoContext): string; /** @internal */ export declare const GenerateConnectOauthUrlRequestDtoConnectionMode$outboundSchema: z.ZodNativeEnum; /** @internal */ export type GenerateConnectOauthUrlRequestDto$Outbound = { subscriberId?: string | undefined; integrationIdentifier: string; connectionIdentifier?: string | undefined; context?: { [k: string]: GenerateConnectOauthUrlRequestDtoContext2$Outbound | string; } | undefined; scope?: Array | undefined; connectionMode?: string | undefined; autoLinkUser?: boolean | undefined; }; /** @internal */ export declare const GenerateConnectOauthUrlRequestDto$outboundSchema: z.ZodType; export declare function generateConnectOauthUrlRequestDtoToJSON(generateConnectOauthUrlRequestDto: GenerateConnectOauthUrlRequestDto): string; //# sourceMappingURL=generateconnectoauthurlrequestdto.d.ts.map