/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; export type GetGroupRequest = { /** * Use group name instead of id */ id: string; }; export type Extras = { visibleGroupNames: Array; }; export type ImapUpdatedBy = {}; export type SmtpUpdatedBy = {}; export type GetGroupGroup = { allowMembershipRequests: boolean; allowUnknownSenderTopicReplies: boolean; associatedGroupIds?: Array | undefined; automatic: boolean; automaticMembershipEmailDomains: string | null; bioCooked: string | null; bioExcerpt: string | null; bioRaw: string | null; canAdminGroup: boolean; canEditGroup?: boolean | undefined; canSeeMembers: boolean; defaultNotificationLevel: number; emailFromAlias?: string | null | undefined; emailPassword: string | null; emailUsername: string | null; flairBgColor: string | null; flairColor: string | null; flairUrl: string | null; fullName: string | null; grantTrustLevel: string | null; hasMessages: boolean; id: number; imapEnabled?: boolean | undefined; imapLastError: string | null; imapMailboxName: string; imapMailboxes: Array; imapNewEmails: string | null; imapOldEmails: string | null; imapPort: string | null; imapServer: string | null; imapSsl: string | null; imapUpdatedAt?: string | null | undefined; imapUpdatedBy?: ImapUpdatedBy | null | undefined; incomingEmail: string | null; isGroupOwnerDisplay: boolean; isGroupUser: boolean; membersVisibilityLevel: number; membershipRequestTemplate: string | null; mentionable: boolean; mentionableLevel: number; messageCount: number; messageable: boolean; messageableLevel: number; mutedCategoryIds: Array; mutedTags?: Array | undefined; name: string; primaryGroup: boolean; publicAdmission: boolean; publicExit: boolean; publishReadState: boolean; regularCategoryIds: Array; regularTags?: Array | undefined; smtpEnabled?: boolean | undefined; smtpPort: string | null; smtpServer: string | null; smtpSsl: string | null; smtpUpdatedAt?: string | null | undefined; smtpUpdatedBy?: SmtpUpdatedBy | null | undefined; title: string | null; trackingCategoryIds: Array; trackingTags?: Array | undefined; userCount: number; visibilityLevel: number; watchingCategoryIds: Array; watchingFirstPostCategoryIds: Array; watchingFirstPostTags?: Array | undefined; watchingTags?: Array | undefined; }; /** * success response */ export type GetGroupResponseBody = { extras: Extras; group: GetGroupGroup; }; /** @internal */ export const GetGroupRequest$inboundSchema: z.ZodType< GetGroupRequest, z.ZodTypeDef, unknown > = z.object({ id: z.string(), }); /** @internal */ export type GetGroupRequest$Outbound = { id: string; }; /** @internal */ export const GetGroupRequest$outboundSchema: z.ZodType< GetGroupRequest$Outbound, z.ZodTypeDef, GetGroupRequest > = z.object({ id: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGroupRequest$ { /** @deprecated use `GetGroupRequest$inboundSchema` instead. */ export const inboundSchema = GetGroupRequest$inboundSchema; /** @deprecated use `GetGroupRequest$outboundSchema` instead. */ export const outboundSchema = GetGroupRequest$outboundSchema; /** @deprecated use `GetGroupRequest$Outbound` instead. */ export type Outbound = GetGroupRequest$Outbound; } /** @internal */ export const Extras$inboundSchema: z.ZodType = z .object({ visible_group_names: z.array(z.any()), }).transform((v) => { return remap$(v, { "visible_group_names": "visibleGroupNames", }); }); /** @internal */ export type Extras$Outbound = { visible_group_names: Array; }; /** @internal */ export const Extras$outboundSchema: z.ZodType< Extras$Outbound, z.ZodTypeDef, Extras > = z.object({ visibleGroupNames: z.array(z.any()), }).transform((v) => { return remap$(v, { visibleGroupNames: "visible_group_names", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Extras$ { /** @deprecated use `Extras$inboundSchema` instead. */ export const inboundSchema = Extras$inboundSchema; /** @deprecated use `Extras$outboundSchema` instead. */ export const outboundSchema = Extras$outboundSchema; /** @deprecated use `Extras$Outbound` instead. */ export type Outbound = Extras$Outbound; } /** @internal */ export const ImapUpdatedBy$inboundSchema: z.ZodType< ImapUpdatedBy, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ export type ImapUpdatedBy$Outbound = {}; /** @internal */ export const ImapUpdatedBy$outboundSchema: z.ZodType< ImapUpdatedBy$Outbound, z.ZodTypeDef, ImapUpdatedBy > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ImapUpdatedBy$ { /** @deprecated use `ImapUpdatedBy$inboundSchema` instead. */ export const inboundSchema = ImapUpdatedBy$inboundSchema; /** @deprecated use `ImapUpdatedBy$outboundSchema` instead. */ export const outboundSchema = ImapUpdatedBy$outboundSchema; /** @deprecated use `ImapUpdatedBy$Outbound` instead. */ export type Outbound = ImapUpdatedBy$Outbound; } /** @internal */ export const SmtpUpdatedBy$inboundSchema: z.ZodType< SmtpUpdatedBy, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ export type SmtpUpdatedBy$Outbound = {}; /** @internal */ export const SmtpUpdatedBy$outboundSchema: z.ZodType< SmtpUpdatedBy$Outbound, z.ZodTypeDef, SmtpUpdatedBy > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SmtpUpdatedBy$ { /** @deprecated use `SmtpUpdatedBy$inboundSchema` instead. */ export const inboundSchema = SmtpUpdatedBy$inboundSchema; /** @deprecated use `SmtpUpdatedBy$outboundSchema` instead. */ export const outboundSchema = SmtpUpdatedBy$outboundSchema; /** @deprecated use `SmtpUpdatedBy$Outbound` instead. */ export type Outbound = SmtpUpdatedBy$Outbound; } /** @internal */ export const GetGroupGroup$inboundSchema: z.ZodType< GetGroupGroup, z.ZodTypeDef, unknown > = z.object({ allow_membership_requests: z.boolean(), allow_unknown_sender_topic_replies: z.boolean(), associated_group_ids: z.array(z.any()).optional(), automatic: z.boolean(), automatic_membership_email_domains: z.nullable(z.string()), bio_cooked: z.nullable(z.string()), bio_excerpt: z.nullable(z.string()), bio_raw: z.nullable(z.string()), can_admin_group: z.boolean(), can_edit_group: z.boolean().optional(), can_see_members: z.boolean(), default_notification_level: z.number().int(), email_from_alias: z.nullable(z.string()).optional(), email_password: z.nullable(z.string()), email_username: z.nullable(z.string()), flair_bg_color: z.nullable(z.string()), flair_color: z.nullable(z.string()), flair_url: z.nullable(z.string()), full_name: z.nullable(z.string()), grant_trust_level: z.nullable(z.string()), has_messages: z.boolean(), id: z.number().int(), imap_enabled: z.boolean().optional(), imap_last_error: z.nullable(z.string()), imap_mailbox_name: z.string(), imap_mailboxes: z.array(z.any()), imap_new_emails: z.nullable(z.string()), imap_old_emails: z.nullable(z.string()), imap_port: z.nullable(z.string()), imap_server: z.nullable(z.string()), imap_ssl: z.nullable(z.string()), imap_updated_at: z.nullable(z.string()).optional(), imap_updated_by: z.nullable(z.lazy(() => ImapUpdatedBy$inboundSchema)) .optional(), incoming_email: z.nullable(z.string()), is_group_owner_display: z.boolean(), is_group_user: z.boolean(), members_visibility_level: z.number().int(), membership_request_template: z.nullable(z.string()), mentionable: z.boolean(), mentionable_level: z.number().int(), message_count: z.number().int(), messageable: z.boolean(), messageable_level: z.number().int(), muted_category_ids: z.array(z.any()), muted_tags: z.array(z.any()).optional(), name: z.string(), primary_group: z.boolean(), public_admission: z.boolean(), public_exit: z.boolean(), publish_read_state: z.boolean(), regular_category_ids: z.array(z.any()), regular_tags: z.array(z.any()).optional(), smtp_enabled: z.boolean().optional(), smtp_port: z.nullable(z.string()), smtp_server: z.nullable(z.string()), smtp_ssl: z.nullable(z.string()), smtp_updated_at: z.nullable(z.string()).optional(), smtp_updated_by: z.nullable(z.lazy(() => SmtpUpdatedBy$inboundSchema)) .optional(), title: z.nullable(z.string()), tracking_category_ids: z.array(z.any()), tracking_tags: z.array(z.any()).optional(), user_count: z.number().int(), visibility_level: z.number().int(), watching_category_ids: z.array(z.any()), watching_first_post_category_ids: z.array(z.any()), watching_first_post_tags: z.array(z.any()).optional(), watching_tags: z.array(z.any()).optional(), }).transform((v) => { return remap$(v, { "allow_membership_requests": "allowMembershipRequests", "allow_unknown_sender_topic_replies": "allowUnknownSenderTopicReplies", "associated_group_ids": "associatedGroupIds", "automatic_membership_email_domains": "automaticMembershipEmailDomains", "bio_cooked": "bioCooked", "bio_excerpt": "bioExcerpt", "bio_raw": "bioRaw", "can_admin_group": "canAdminGroup", "can_edit_group": "canEditGroup", "can_see_members": "canSeeMembers", "default_notification_level": "defaultNotificationLevel", "email_from_alias": "emailFromAlias", "email_password": "emailPassword", "email_username": "emailUsername", "flair_bg_color": "flairBgColor", "flair_color": "flairColor", "flair_url": "flairUrl", "full_name": "fullName", "grant_trust_level": "grantTrustLevel", "has_messages": "hasMessages", "imap_enabled": "imapEnabled", "imap_last_error": "imapLastError", "imap_mailbox_name": "imapMailboxName", "imap_mailboxes": "imapMailboxes", "imap_new_emails": "imapNewEmails", "imap_old_emails": "imapOldEmails", "imap_port": "imapPort", "imap_server": "imapServer", "imap_ssl": "imapSsl", "imap_updated_at": "imapUpdatedAt", "imap_updated_by": "imapUpdatedBy", "incoming_email": "incomingEmail", "is_group_owner_display": "isGroupOwnerDisplay", "is_group_user": "isGroupUser", "members_visibility_level": "membersVisibilityLevel", "membership_request_template": "membershipRequestTemplate", "mentionable_level": "mentionableLevel", "message_count": "messageCount", "messageable_level": "messageableLevel", "muted_category_ids": "mutedCategoryIds", "muted_tags": "mutedTags", "primary_group": "primaryGroup", "public_admission": "publicAdmission", "public_exit": "publicExit", "publish_read_state": "publishReadState", "regular_category_ids": "regularCategoryIds", "regular_tags": "regularTags", "smtp_enabled": "smtpEnabled", "smtp_port": "smtpPort", "smtp_server": "smtpServer", "smtp_ssl": "smtpSsl", "smtp_updated_at": "smtpUpdatedAt", "smtp_updated_by": "smtpUpdatedBy", "tracking_category_ids": "trackingCategoryIds", "tracking_tags": "trackingTags", "user_count": "userCount", "visibility_level": "visibilityLevel", "watching_category_ids": "watchingCategoryIds", "watching_first_post_category_ids": "watchingFirstPostCategoryIds", "watching_first_post_tags": "watchingFirstPostTags", "watching_tags": "watchingTags", }); }); /** @internal */ export type GetGroupGroup$Outbound = { allow_membership_requests: boolean; allow_unknown_sender_topic_replies: boolean; associated_group_ids?: Array | undefined; automatic: boolean; automatic_membership_email_domains: string | null; bio_cooked: string | null; bio_excerpt: string | null; bio_raw: string | null; can_admin_group: boolean; can_edit_group?: boolean | undefined; can_see_members: boolean; default_notification_level: number; email_from_alias?: string | null | undefined; email_password: string | null; email_username: string | null; flair_bg_color: string | null; flair_color: string | null; flair_url: string | null; full_name: string | null; grant_trust_level: string | null; has_messages: boolean; id: number; imap_enabled?: boolean | undefined; imap_last_error: string | null; imap_mailbox_name: string; imap_mailboxes: Array; imap_new_emails: string | null; imap_old_emails: string | null; imap_port: string | null; imap_server: string | null; imap_ssl: string | null; imap_updated_at?: string | null | undefined; imap_updated_by?: ImapUpdatedBy$Outbound | null | undefined; incoming_email: string | null; is_group_owner_display: boolean; is_group_user: boolean; members_visibility_level: number; membership_request_template: string | null; mentionable: boolean; mentionable_level: number; message_count: number; messageable: boolean; messageable_level: number; muted_category_ids: Array; muted_tags?: Array | undefined; name: string; primary_group: boolean; public_admission: boolean; public_exit: boolean; publish_read_state: boolean; regular_category_ids: Array; regular_tags?: Array | undefined; smtp_enabled?: boolean | undefined; smtp_port: string | null; smtp_server: string | null; smtp_ssl: string | null; smtp_updated_at?: string | null | undefined; smtp_updated_by?: SmtpUpdatedBy$Outbound | null | undefined; title: string | null; tracking_category_ids: Array; tracking_tags?: Array | undefined; user_count: number; visibility_level: number; watching_category_ids: Array; watching_first_post_category_ids: Array; watching_first_post_tags?: Array | undefined; watching_tags?: Array | undefined; }; /** @internal */ export const GetGroupGroup$outboundSchema: z.ZodType< GetGroupGroup$Outbound, z.ZodTypeDef, GetGroupGroup > = z.object({ allowMembershipRequests: z.boolean(), allowUnknownSenderTopicReplies: z.boolean(), associatedGroupIds: z.array(z.any()).optional(), automatic: z.boolean(), automaticMembershipEmailDomains: z.nullable(z.string()), bioCooked: z.nullable(z.string()), bioExcerpt: z.nullable(z.string()), bioRaw: z.nullable(z.string()), canAdminGroup: z.boolean(), canEditGroup: z.boolean().optional(), canSeeMembers: z.boolean(), defaultNotificationLevel: z.number().int(), emailFromAlias: z.nullable(z.string()).optional(), emailPassword: z.nullable(z.string()), emailUsername: z.nullable(z.string()), flairBgColor: z.nullable(z.string()), flairColor: z.nullable(z.string()), flairUrl: z.nullable(z.string()), fullName: z.nullable(z.string()), grantTrustLevel: z.nullable(z.string()), hasMessages: z.boolean(), id: z.number().int(), imapEnabled: z.boolean().optional(), imapLastError: z.nullable(z.string()), imapMailboxName: z.string(), imapMailboxes: z.array(z.any()), imapNewEmails: z.nullable(z.string()), imapOldEmails: z.nullable(z.string()), imapPort: z.nullable(z.string()), imapServer: z.nullable(z.string()), imapSsl: z.nullable(z.string()), imapUpdatedAt: z.nullable(z.string()).optional(), imapUpdatedBy: z.nullable(z.lazy(() => ImapUpdatedBy$outboundSchema)) .optional(), incomingEmail: z.nullable(z.string()), isGroupOwnerDisplay: z.boolean(), isGroupUser: z.boolean(), membersVisibilityLevel: z.number().int(), membershipRequestTemplate: z.nullable(z.string()), mentionable: z.boolean(), mentionableLevel: z.number().int(), messageCount: z.number().int(), messageable: z.boolean(), messageableLevel: z.number().int(), mutedCategoryIds: z.array(z.any()), mutedTags: z.array(z.any()).optional(), name: z.string(), primaryGroup: z.boolean(), publicAdmission: z.boolean(), publicExit: z.boolean(), publishReadState: z.boolean(), regularCategoryIds: z.array(z.any()), regularTags: z.array(z.any()).optional(), smtpEnabled: z.boolean().optional(), smtpPort: z.nullable(z.string()), smtpServer: z.nullable(z.string()), smtpSsl: z.nullable(z.string()), smtpUpdatedAt: z.nullable(z.string()).optional(), smtpUpdatedBy: z.nullable(z.lazy(() => SmtpUpdatedBy$outboundSchema)) .optional(), title: z.nullable(z.string()), trackingCategoryIds: z.array(z.any()), trackingTags: z.array(z.any()).optional(), userCount: z.number().int(), visibilityLevel: z.number().int(), watchingCategoryIds: z.array(z.any()), watchingFirstPostCategoryIds: z.array(z.any()), watchingFirstPostTags: z.array(z.any()).optional(), watchingTags: z.array(z.any()).optional(), }).transform((v) => { return remap$(v, { allowMembershipRequests: "allow_membership_requests", allowUnknownSenderTopicReplies: "allow_unknown_sender_topic_replies", associatedGroupIds: "associated_group_ids", automaticMembershipEmailDomains: "automatic_membership_email_domains", bioCooked: "bio_cooked", bioExcerpt: "bio_excerpt", bioRaw: "bio_raw", canAdminGroup: "can_admin_group", canEditGroup: "can_edit_group", canSeeMembers: "can_see_members", defaultNotificationLevel: "default_notification_level", emailFromAlias: "email_from_alias", emailPassword: "email_password", emailUsername: "email_username", flairBgColor: "flair_bg_color", flairColor: "flair_color", flairUrl: "flair_url", fullName: "full_name", grantTrustLevel: "grant_trust_level", hasMessages: "has_messages", imapEnabled: "imap_enabled", imapLastError: "imap_last_error", imapMailboxName: "imap_mailbox_name", imapMailboxes: "imap_mailboxes", imapNewEmails: "imap_new_emails", imapOldEmails: "imap_old_emails", imapPort: "imap_port", imapServer: "imap_server", imapSsl: "imap_ssl", imapUpdatedAt: "imap_updated_at", imapUpdatedBy: "imap_updated_by", incomingEmail: "incoming_email", isGroupOwnerDisplay: "is_group_owner_display", isGroupUser: "is_group_user", membersVisibilityLevel: "members_visibility_level", membershipRequestTemplate: "membership_request_template", mentionableLevel: "mentionable_level", messageCount: "message_count", messageableLevel: "messageable_level", mutedCategoryIds: "muted_category_ids", mutedTags: "muted_tags", primaryGroup: "primary_group", publicAdmission: "public_admission", publicExit: "public_exit", publishReadState: "publish_read_state", regularCategoryIds: "regular_category_ids", regularTags: "regular_tags", smtpEnabled: "smtp_enabled", smtpPort: "smtp_port", smtpServer: "smtp_server", smtpSsl: "smtp_ssl", smtpUpdatedAt: "smtp_updated_at", smtpUpdatedBy: "smtp_updated_by", trackingCategoryIds: "tracking_category_ids", trackingTags: "tracking_tags", userCount: "user_count", visibilityLevel: "visibility_level", watchingCategoryIds: "watching_category_ids", watchingFirstPostCategoryIds: "watching_first_post_category_ids", watchingFirstPostTags: "watching_first_post_tags", watchingTags: "watching_tags", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGroupGroup$ { /** @deprecated use `GetGroupGroup$inboundSchema` instead. */ export const inboundSchema = GetGroupGroup$inboundSchema; /** @deprecated use `GetGroupGroup$outboundSchema` instead. */ export const outboundSchema = GetGroupGroup$outboundSchema; /** @deprecated use `GetGroupGroup$Outbound` instead. */ export type Outbound = GetGroupGroup$Outbound; } /** @internal */ export const GetGroupResponseBody$inboundSchema: z.ZodType< GetGroupResponseBody, z.ZodTypeDef, unknown > = z.object({ extras: z.lazy(() => Extras$inboundSchema), group: z.lazy(() => GetGroupGroup$inboundSchema), }); /** @internal */ export type GetGroupResponseBody$Outbound = { extras: Extras$Outbound; group: GetGroupGroup$Outbound; }; /** @internal */ export const GetGroupResponseBody$outboundSchema: z.ZodType< GetGroupResponseBody$Outbound, z.ZodTypeDef, GetGroupResponseBody > = z.object({ extras: z.lazy(() => Extras$outboundSchema), group: z.lazy(() => GetGroupGroup$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGroupResponseBody$ { /** @deprecated use `GetGroupResponseBody$inboundSchema` instead. */ export const inboundSchema = GetGroupResponseBody$inboundSchema; /** @deprecated use `GetGroupResponseBody$outboundSchema` instead. */ export const outboundSchema = GetGroupResponseBody$outboundSchema; /** @deprecated use `GetGroupResponseBody$Outbound` instead. */ export type Outbound = GetGroupResponseBody$Outbound; }