Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

72.6 KB
Raw Blame
// This file is auto-generated by @hey-api/openapi-ts

import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';
import { client } from './client.gen';
import type { AgentSetupData, AgentSetupErrors, AgentSetupResponses, AppleLoginData, AppleLoginErrors, AppleLoginResponses, CancelCodexLoginData, CancelCodexLoginResponses, ChangePlanData, ChangePlanErrors, ChangePlanResponses, CheckGithubLinkStatusData, CheckGithubLinkStatusErrors, CheckGithubLinkStatusResponses, CheckGmailLinkStatusData, CheckGmailLinkStatusErrors, CheckGmailLinkStatusResponses, ConfigureCodexData, ConfigureCodexResponses, CreateAiCreditCheckoutData, CreateAiCreditCheckoutErrors, CreateAiCreditCheckoutResponses, CreateCheckoutSessionV2Data, CreateCheckoutSessionV2Errors, CreateCheckoutSessionV2Responses, CreateGtmInviteLinkData, CreateGtmInviteLinkErrors, CreateGtmInviteLinkResponses, CreateInProgressLinkData, CreateInProgressLinkErrors, CreateInProgressLinkResponses, CreateMergeRequestData, CreateMergeRequestErrors, CreateMergeRequestResponses, CreatePortalSessionData, CreatePortalSessionErrors, CreatePortalSessionResponses, CreateProfilePictureUploadData, CreateProfilePictureUploadErrors, CreateProfilePictureUploadResponses, CreateTeamData, CreateTeamErrors, CreateTeamInviteLinkData, CreateTeamInviteLinkErrors, CreateTeamInviteLinkResponses, CreateTeamResponses, DeleteAgentApiKeyData, DeleteAgentApiKeyErrors, DeleteAgentApiKeyResponses, DeleteCursorApiKeyData, DeleteCursorApiKeyErrors, DeleteCursorApiKeyResponses, DeleteGithubLinkData, DeleteGithubLinkErrors, DeleteGithubLinkResponses, DeleteTeamData, DeleteTeamErrors, DeleteTeamInviteHandlerData, DeleteTeamInviteHandlerErrors, DeleteTeamInviteHandlerResponses, DeleteTeamInviteLinkData, DeleteTeamInviteLinkErrors, DeleteTeamInviteLinkResponses, DeleteTeamResponses, DeleteUserData, DeleteUserErrors, DeleteUserResponses, DisconnectCodexData, DisconnectCodexResponses, EmailConnectionProvidersData, EmailConnectionProvidersErrors, EmailConnectionProvidersResponses, EnrichGithubPullRequestsData, EnrichGithubPullRequestsErrors, EnrichGithubPullRequestsResponses, GenerateEmailLinkData, GenerateEmailLinkErrors, GenerateEmailLinkResponses, GetAgentApiKeyData, GetAgentApiKeyErrors, GetAgentApiKeyResponses, GetAiBillingPlansData, GetAiBillingPlansResponses, GetAiBillingSummaryData, GetAiBillingSummaryErrors, GetAiBillingSummaryResponses, GetCodexConnectionData, GetCodexConnectionResponses, GetCursorApiKeyData, GetCursorApiKeyErrors, GetCursorApiKeyResponses, GetGithubPullRequestMergeabilityData, GetGithubPullRequestMergeabilityErrors, GetGithubPullRequestMergeabilityResponses, GetGtmInviteOfferData, GetGtmInviteOfferErrors, GetGtmInviteOfferResponses, GetLegacyUserPermissionsData, GetLegacyUserPermissionsErrors, GetLegacyUserPermissionsResponses, GetPermissionsData, GetPermissionsErrors, GetPermissionsResponses, GetReferralCodeData, GetReferralCodeErrors, GetReferralCodeResponses, GetSubscriptionStatusData, GetSubscriptionStatusErrors, GetSubscriptionStatusResponses, GetSystemStatusData, GetSystemStatusErrors, GetSystemStatusResponses, GetTeamByInviteLinkData, GetTeamByInviteLinkErrors, GetTeamByInviteLinkResponses, GetTeamData, GetTeamErrors, GetTeamInviteLinkData, GetTeamInviteLinkErrors, GetTeamInviteLinkResponses, GetTeamInvitesData, GetTeamInvitesErrors, GetTeamInvitesResponses, GetTeamResponses, GetTrialEligibilityData, GetTrialEligibilityErrors, GetTrialEligibilityResponses, GetUserInfoData, GetUserInfoErrors, GetUserInfoResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserLanguageData, GetUserLanguageErrors, GetUserLanguageResponses, GetUserLinkExistsData, GetUserLinkExistsErrors, GetUserLinkExistsResponses, GetUserNameData, GetUserNameErrors, GetUserNameResponses, GetUserNamesData, GetUserNamesErrors, GetUserNamesResponses, GetUserNamesWithEmailData, GetUserNamesWithEmailErrors, GetUserNamesWithEmailResponses, GetUserOrganizationData, GetUserOrganizationErrors, GetUserOrganizationResponses, GetUserPermissionsData, GetUserPermissionsErrors, GetUserPermissionsResponses, GetUserQuotaData, GetUserQuotaErrors, GetUserQuotaResponses, GetUserTeamsData, GetUserTeamsErrors, GetUserTeamsResponses, HealthHandlerData, HealthHandlerResponses, InitGithubLinkData, InitGithubLinkErrors, InitGithubLinkResponses, InitGmailLinkData, InitGmailLinkErrors, InitGmailLinkResponses, InitOutlookLinkData, InitOutlookLinkErrors, InitOutlookLinkResponses, InviteToTeamData, InviteToTeamErrors, InviteToTeamResponses, JoinTeamByInviteLinkData, JoinTeamByInviteLinkErrors, JoinTeamByInviteLinkResponses, JoinTeamData, JoinTeamErrors, JoinTeamResponses, ListCodexEnvironmentsData, ListCodexEnvironmentsResponses, ListCursorModelsData, ListCursorModelsErrors, ListCursorModelsResponses, ListGtmInviteLinksData, ListGtmInviteLinksErrors, ListGtmInviteLinksResponses, ListSystemStatusHistoryData, ListSystemStatusHistoryErrors, ListSystemStatusHistoryResponses, LogoutData, LogoutResponses, MacroApiTokenData, MacroApiTokenErrors, MacroApiTokenResponses, MergeGithubPullRequestData, MergeGithubPullRequestErrors, MergeGithubPullRequestResponses, Oauth2CallbackData, Oauth2CallbackErrors, Oauth2CallbackResponses, OauthRedirectData, OauthRedirectErrors, OauthRedirectResponses, PasswordlessCallbackData, PasswordlessCallbackErrors, PasswordlessCallbackResponses, PasswordlessLoginData, PasswordlessLoginErrors, PasswordlessLoginResponses, PasswordLoginData, PasswordLoginErrors, PasswordLoginResponses, PatchTeamCrmSettingsData, PatchTeamCrmSettingsErrors, PatchTeamCrmSettingsResponses, PatchTeamData, PatchTeamErrors, PatchTeamMemberPlanData, PatchTeamMemberPlanErrors, PatchTeamMemberPlanResponses, PatchTeamResponses, PatchUserGroupData, PatchUserGroupErrors, PatchUserGroupResponses, PatchUserOnboardingData, PatchUserOnboardingErrors, PatchUserOnboardingResponses, PatchUserTutorialData, PatchUserTutorialErrors, PatchUserTutorialResponses, PollCodexLoginData, PollCodexLoginResponses, PostProfilePicturesData, PostProfilePicturesErrors, PostProfilePicturesResponses, PurchaseAiCreditsData, PurchaseAiCreditsErrors, PurchaseAiCreditsResponses, PutAgentApiKeyData, PutAgentApiKeyErrors, PutAgentApiKeyResponses, PutCursorApiKeyData, PutCursorApiKeyErrors, PutCursorApiKeyResponses, PutCursorDefaultModelData, PutCursorDefaultModelErrors, PutCursorDefaultModelResponses, PutProfilePictureData, PutProfilePictureErrors, PutProfilePictureFileData, PutProfilePictureFileErrors, PutProfilePictureFileResponses, PutProfilePictureResponses, PutUserLanguageData, PutUserLanguageErrors, PutUserLanguageResponses, PutUserNameData, PutUserNameErrors, PutUserNameResponses, RedeemGtmInviteLinkData, RedeemGtmInviteLinkErrors, RedeemGtmInviteLinkResponses, RefreshData, RefreshErrors, RefreshResponses, RejectInvitationData, RejectInvitationErrors, RejectInvitationResponses, RemoveUserFromTeamData, RemoveUserFromTeamErrors, RemoveUserFromTeamResponses, ResendFusionauthVerifyUserEmailData, ResendFusionauthVerifyUserEmailErrors, ResendFusionauthVerifyUserEmailResponses, ResolveGtmInviteLinkData, ResolveGtmInviteLinkErrors, ResolveGtmInviteLinkResponses, RevokeGtmInviteLinkData, RevokeGtmInviteLinkErrors, RevokeGtmInviteLinkResponses, SendMobileWelcomeEmailData, SendMobileWelcomeEmailErrors, SendMobileWelcomeEmailResponses, SendReferralCodeData, SendReferralCodeErrors, SendReferralCodeResponses, SendTeamDomainNoticeData, SendTeamDomainNoticeErrors, SendTeamDomainNoticeResponses, SessionCreationData, SessionCreationErrors, SessionCreationResponses, SessionLoginData, SessionLoginErrors, SessionLoginResponses, SetGithubPullRequestDraftData, SetGithubPullRequestDraftErrors, SetGithubPullRequestDraftResponses, SetGithubPullRequestStateData, SetGithubPullRequestStateErrors, SetGithubPullRequestStateResponses, SetSystemStatusData, SetSystemStatusErrors, SetSystemStatusResponses, SsoLoginData, SsoLoginErrors, SsoLoginResponses, StartCodexLoginData, StartCodexLoginResponses, ToggleTeamAutoJoinDomainData, ToggleTeamAutoJoinDomainErrors, ToggleTeamAutoJoinDomainResponses, ToggleTeamNonAdminInvitesData, ToggleTeamNonAdminInvitesErrors, ToggleTeamNonAdminInvitesResponses, UpdateAiBillingAutoReloadData, UpdateAiBillingAutoReloadErrors, UpdateAiBillingAutoReloadResponses, UpdateAiBillingOverageData, UpdateAiBillingOverageErrors, UpdateAiBillingOverageResponses, VerifyEmailLinkData, VerifyEmailLinkErrors, VerifyEmailLinkResponses, VerifyFusionauthUserEmailData, VerifyFusionauthUserEmailErrors, VerifyFusionauthUserEmailResponses, VerifyMergeRequestData, VerifyMergeRequestErrors, VerifyMergeRequestResponses } from './types.gen';

export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
    /**
     * You can provide a client instance returned by `createClient()` instead of
     * individual options. This might be also useful if you want to implement a
     * custom client.
     */
    client?: Client;
    /**
     * You can pass arbitrary values through the `meta` object. This can be
     * used to access values that aren't defined as part of the SDK function.
     */
    meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
};

class HeyApiClient {
    protected client: Client;

    constructor(args?: {
        client?: Client;
    }) {
        this.client = args?.client ?? client;
    }
}

class HeyApiRegistry<T> {
    private readonly defaultKey = 'default';

    private readonly instances: Map<string, T> = new Map();

    get(key?: string): T {
        const instance = this.instances.get(key ?? this.defaultKey);
        if (!instance) {
            throw new Error(`No SDK client found. Create one with "new Sdk()" to fix this error.`);
        }
        return instance;
    }

    set(value: T, key?: string): void {
        this.instances.set(key ?? this.defaultKey, value);
    }
}

export class Sdk extends HeyApiClient {
    public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();

    constructor(args?: {
        client?: Client;
        key?: string;
    }) {
        super(args);
        Sdk.__registry.set(this, args?.key);
    }

    /**
     * Forgets the agent's API key. Does not revoke it at the provider; succeeds
     * when there was none.
     */
    public deleteAgentApiKey<ThrowOnError extends boolean = false>(options: Options<DeleteAgentApiKeyData, ThrowOnError>): RequestResult<DeleteAgentApiKeyResponses, DeleteAgentApiKeyErrors, ThrowOnError> {
        return (options.client ?? this.client).delete<DeleteAgentApiKeyResponses, DeleteAgentApiKeyErrors, ThrowOnError>({ url: '/agents/{agent_id}/api-key', ...options });
    }

    /**
     * The agent's API key, if it has one, and whether its plan allows one.
     */
    public getAgentApiKey<ThrowOnError extends boolean = false>(options: Options<GetAgentApiKeyData, ThrowOnError>): RequestResult<GetAgentApiKeyResponses, GetAgentApiKeyErrors, ThrowOnError> {
        return (options.client ?? this.client).get<GetAgentApiKeyResponses, GetAgentApiKeyErrors, ThrowOnError>({ url: '/agents/{agent_id}/api-key', ...options });
    }

    /**
     * Registers or replaces the agent's API key, for its model's provider.
     * Only in-memory agents on an Anthropic or OpenAI model, on a paid plan.
     */
    public putAgentApiKey<ThrowOnError extends boolean = false>(options: Options<PutAgentApiKeyData, ThrowOnError>): RequestResult<PutAgentApiKeyResponses, PutAgentApiKeyErrors, ThrowOnError> {
        return (options.client ?? this.client).put<PutAgentApiKeyResponses, PutAgentApiKeyErrors, ThrowOnError>({
            url: '/agents/{agent_id}/api-key',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Turn automatic credit reloads on with the given
     * thresholds, or off. Payer only. Enabling settles right away, so a balance
     * already under the minimum reloads immediately.
     */
    public updateAiBillingAutoReload<ThrowOnError extends boolean = false>(options: Options<UpdateAiBillingAutoReloadData, ThrowOnError>): RequestResult<UpdateAiBillingAutoReloadResponses, UpdateAiBillingAutoReloadErrors, ThrowOnError> {
        return (options.client ?? this.client).patch<UpdateAiBillingAutoReloadResponses, UpdateAiBillingAutoReloadErrors, ThrowOnError>({
            url: '/ai-billing/auto-reload',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Start a Stripe Checkout for a credit pack. Payer only.
     */
    public createAiCreditCheckout<ThrowOnError extends boolean = false>(options: Options<CreateAiCreditCheckoutData, ThrowOnError>): RequestResult<CreateAiCreditCheckoutResponses, CreateAiCreditCheckoutErrors, ThrowOnError> {
        return (options.client ?? this.client).post<CreateAiCreditCheckoutResponses, CreateAiCreditCheckoutErrors, ThrowOnError>({
            url: '/ai-billing/credits/checkout',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Buy a credit pack now, charged to the payer's card on file. Any paid team
     * member may buy, within the team's monthly credit limit.
     */
    public purchaseAiCredits<ThrowOnError extends boolean = false>(options: Options<PurchaseAiCreditsData, ThrowOnError>): RequestResult<PurchaseAiCreditsResponses, PurchaseAiCreditsErrors, ThrowOnError> {
        return (options.client ?? this.client).post<PurchaseAiCreditsResponses, PurchaseAiCreditsErrors, ThrowOnError>({
            url: '/ai-billing/credits/purchase',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Retired direct-usage opt-in. Enabling is rejected; disabling remains supported.
     */
    public updateAiBillingOverage<ThrowOnError extends boolean = false>(options: Options<UpdateAiBillingOverageData, ThrowOnError>): RequestResult<UpdateAiBillingOverageResponses, UpdateAiBillingOverageErrors, ThrowOnError> {
        return (options.client ?? this.client).patch<UpdateAiBillingOverageResponses, UpdateAiBillingOverageErrors, ThrowOnError>({
            url: '/ai-billing/overage',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * The plan catalog, credit packs, overage cap bounds, and automatic reload
     * defaults and bounds.
     */
    public getAiBillingPlans<ThrowOnError extends boolean = false>(options?: Options<GetAiBillingPlansData, ThrowOnError>): RequestResult<GetAiBillingPlansResponses, unknown, ThrowOnError> {
        return (options?.client ?? this.client).get<GetAiBillingPlansResponses, unknown, ThrowOnError>({ url: '/ai-billing/plans', ...options });
    }

    /**
     * The caller's current-period AI usage, credits, and overage settings.
     *
     * Runs a settlement first so the position reflects any credits or overage
     * that were waiting to be booked.
     */
    public getAiBillingSummary<ThrowOnError extends boolean = false>(options?: Options<GetAiBillingSummaryData, ThrowOnError>): RequestResult<GetAiBillingSummaryResponses, GetAiBillingSummaryErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetAiBillingSummaryResponses, GetAiBillingSummaryErrors, ThrowOnError>({ url: '/ai-billing/summary', ...options });
    }

    public disconnectCodex<ThrowOnError extends boolean = false>(options?: Options<DisconnectCodexData, ThrowOnError>): RequestResult<DisconnectCodexResponses, unknown, ThrowOnError> {
        return (options?.client ?? this.client).delete<DisconnectCodexResponses, unknown, ThrowOnError>({ url: '/codex', ...options });
    }

    public getCodexConnection<ThrowOnError extends boolean = false>(options?: Options<GetCodexConnectionData, ThrowOnError>): RequestResult<GetCodexConnectionResponses, unknown, ThrowOnError> {
        return (options?.client ?? this.client).get<GetCodexConnectionResponses, unknown, ThrowOnError>({ url: '/codex', ...options });
    }

    public configureCodex<ThrowOnError extends boolean = false>(options: Options<ConfigureCodexData, ThrowOnError>): RequestResult<ConfigureCodexResponses, unknown, ThrowOnError> {
        return (options.client ?? this.client).put<ConfigureCodexResponses, unknown, ThrowOnError>({
            url: '/codex/config',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    public listCodexEnvironments<ThrowOnError extends boolean = false>(options?: Options<ListCodexEnvironmentsData, ThrowOnError>): RequestResult<ListCodexEnvironmentsResponses, unknown, ThrowOnError> {
        return (options?.client ?? this.client).get<ListCodexEnvironmentsResponses, unknown, ThrowOnError>({ url: '/codex/environments', ...options });
    }

    public startCodexLogin<ThrowOnError extends boolean = false>(options?: Options<StartCodexLoginData, ThrowOnError>): RequestResult<StartCodexLoginResponses, unknown, ThrowOnError> {
        return (options?.client ?? this.client).post<StartCodexLoginResponses, unknown, ThrowOnError>({ url: '/codex/login', ...options });
    }

    public cancelCodexLogin<ThrowOnError extends boolean = false>(options: Options<CancelCodexLoginData, ThrowOnError>): RequestResult<CancelCodexLoginResponses, unknown, ThrowOnError> {
        return (options.client ?? this.client).delete<CancelCodexLoginResponses, unknown, ThrowOnError>({ url: '/codex/login/{attempt_id}', ...options });
    }

    public pollCodexLogin<ThrowOnError extends boolean = false>(options: Options<PollCodexLoginData, ThrowOnError>): RequestResult<PollCodexLoginResponses, unknown, ThrowOnError> {
        return (options.client ?? this.client).get<PollCodexLoginResponses, unknown, ThrowOnError>({ url: '/codex/login/{attempt_id}', ...options });
    }

    /**
     * Forgets the caller's Cursor API key.
     *
     * This does **not** revoke the key at Cursor — it keeps working everywhere
     * else it is used, and only Cursor can revoke it. Any UI offering this has to
     * say so rather than implying otherwise.
     *
     * Deleting when there is nothing to delete succeeds: the caller's intent is
     * "I should have no key registered", and that is already true.
     */
    public deleteCursorApiKey<ThrowOnError extends boolean = false>(options?: Options<DeleteCursorApiKeyData, ThrowOnError>): RequestResult<DeleteCursorApiKeyResponses, DeleteCursorApiKeyErrors, ThrowOnError> {
        return (options?.client ?? this.client).delete<DeleteCursorApiKeyResponses, DeleteCursorApiKeyErrors, ThrowOnError>({ url: '/cursor-api-key', ...options });
    }

    /**
     * Whether the caller has a Cursor API key registered.
     *
     * Never returns the key, or any part of it. There is no screen that needs one,
     * and a masked key still leaks its length and alphabet.
     */
    public getCursorApiKey<ThrowOnError extends boolean = false>(options?: Options<GetCursorApiKeyData, ThrowOnError>): RequestResult<GetCursorApiKeyResponses, GetCursorApiKeyErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetCursorApiKeyResponses, GetCursorApiKeyErrors, ThrowOnError>({ url: '/cursor-api-key', ...options });
    }

    /**
     * Registers or replaces the caller's Cursor API key.
     *
     * The key is validated on shape alone — this cannot distinguish a live key
     * from forty random characters behind the right prefix. Confirming it against
     * Cursor's `GET /v1/me` is the obvious improvement, and is what would let this
     * report the connected account rather than only that a key exists.
     */
    public putCursorApiKey<ThrowOnError extends boolean = false>(options: Options<PutCursorApiKeyData, ThrowOnError>): RequestResult<PutCursorApiKeyResponses, PutCursorApiKeyErrors, ThrowOnError> {
        return (options.client ?? this.client).put<PutCursorApiKeyResponses, PutCursorApiKeyErrors, ThrowOnError>({
            url: '/cursor-api-key',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Choose the model this user's `@cursor` sessions start on.
     *
     * Stores the id only; its parameters are resolved from Cursor's own default
     * variant at session start. Not validated against the live model list here —
     * the settings dropdown offers only real ids, and a stale id degrades to the
     * deployment default at spawn rather than failing, so a round trip to Cursor
     * on every save would buy nothing.
     */
    public putCursorDefaultModel<ThrowOnError extends boolean = false>(options: Options<PutCursorDefaultModelData, ThrowOnError>): RequestResult<PutCursorDefaultModelResponses, PutCursorDefaultModelErrors, ThrowOnError> {
        return (options.client ?? this.client).put<PutCursorDefaultModelResponses, PutCursorDefaultModelErrors, ThrowOnError>({
            url: '/cursor-api-key/default-model',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * List the models the caller's Cursor account offers.
     *
     * Reached only from the settings dropdown, so it decrypts the user's own key
     * and asks Cursor directly — the list is per-account and changes, so there is
     * nothing to cache statically. Reuses the harness's Cursor client rather than
     * reimplementing the `/v1/models` parse, keeping one source of truth for what
     * a model is.
     */
    public listCursorModels<ThrowOnError extends boolean = false>(options?: Options<ListCursorModelsData, ThrowOnError>): RequestResult<ListCursorModelsResponses, ListCursorModelsErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<ListCursorModelsResponses, ListCursorModelsErrors, ThrowOnError>({ url: '/cursor-api-key/models', ...options });
    }

    /**
     * Verifies the user's primary email for FusionAuth
     */
    public verifyFusionauthUserEmail<ThrowOnError extends boolean = false>(options: Options<VerifyFusionauthUserEmailData, ThrowOnError>): RequestResult<VerifyFusionauthUserEmailResponses, VerifyFusionauthUserEmailErrors, ThrowOnError> {
        return (options.client ?? this.client).get<VerifyFusionauthUserEmailResponses, VerifyFusionauthUserEmailErrors, ThrowOnError>({ url: '/email/fusionauth/verify/{verification_id}', ...options });
    }

    /**
     * Resend the user's primary email verification for FusionAuth
     */
    public resendFusionauthVerifyUserEmail<ThrowOnError extends boolean = false>(options: Options<ResendFusionauthVerifyUserEmailData, ThrowOnError>): RequestResult<ResendFusionauthVerifyUserEmailResponses, ResendFusionauthVerifyUserEmailErrors, ThrowOnError> {
        return (options.client ?? this.client).post<ResendFusionauthVerifyUserEmailResponses, ResendFusionauthVerifyUserEmailErrors, ThrowOnError>({
            url: '/email/fusionauth_resend',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Generates an email link for the user to verify their email address.
     */
    public generateEmailLink<ThrowOnError extends boolean = false>(options: Options<GenerateEmailLinkData, ThrowOnError>): RequestResult<GenerateEmailLinkResponses, GenerateEmailLinkErrors, ThrowOnError> {
        return (options.client ?? this.client).post<GenerateEmailLinkResponses, GenerateEmailLinkErrors, ThrowOnError>({
            url: '/email/generate/link',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Verifies the user's email for a user profile
     */
    public verifyEmailLink<ThrowOnError extends boolean = false>(options: Options<VerifyEmailLinkData, ThrowOnError>): RequestResult<VerifyEmailLinkResponses, VerifyEmailLinkErrors, ThrowOnError> {
        return (options.client ?? this.client).get<VerifyEmailLinkResponses, VerifyEmailLinkErrors, ThrowOnError>({ url: '/email/verify/{verification_id}', ...options });
    }

    /**
     * Converts a GitHub pull request to a draft, or marks it ready for review,
     * as the authenticated user with their own GitHub grant.
     */
    public setGithubPullRequestDraft<ThrowOnError extends boolean = false>(options: Options<SetGithubPullRequestDraftData, ThrowOnError>): RequestResult<SetGithubPullRequestDraftResponses, SetGithubPullRequestDraftErrors, ThrowOnError> {
        return (options.client ?? this.client).post<SetGithubPullRequestDraftResponses, SetGithubPullRequestDraftErrors, ThrowOnError>({
            url: '/github_pull_requests/draft',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Enriches GitHub pull request references with live GitHub data for the authenticated user.
     */
    public enrichGithubPullRequests<ThrowOnError extends boolean = false>(options: Options<EnrichGithubPullRequestsData, ThrowOnError>): RequestResult<EnrichGithubPullRequestsResponses, EnrichGithubPullRequestsErrors, ThrowOnError> {
        return (options.client ?? this.client).post<EnrichGithubPullRequestsResponses, EnrichGithubPullRequestsErrors, ThrowOnError>({
            url: '/github_pull_requests/enrich',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Merges a GitHub pull request as the authenticated user, with their own
     * GitHub grant. GitHub applies the user's permissions and the repository's
     * branch protections; a refusal is returned with GitHub's message.
     */
    public mergeGithubPullRequest<ThrowOnError extends boolean = false>(options: Options<MergeGithubPullRequestData, ThrowOnError>): RequestResult<MergeGithubPullRequestResponses, MergeGithubPullRequestErrors, ThrowOnError> {
        return (options.client ?? this.client).post<MergeGithubPullRequestResponses, MergeGithubPullRequestErrors, ThrowOnError>({
            url: '/github_pull_requests/merge',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Reads whether each GitHub pull request merges cleanly into its base, as
     * the authenticated user sees it. Pull requests the user cannot see are
     * left out.
     */
    public getGithubPullRequestMergeability<ThrowOnError extends boolean = false>(options: Options<GetGithubPullRequestMergeabilityData, ThrowOnError>): RequestResult<GetGithubPullRequestMergeabilityResponses, GetGithubPullRequestMergeabilityErrors, ThrowOnError> {
        return (options.client ?? this.client).post<GetGithubPullRequestMergeabilityResponses, GetGithubPullRequestMergeabilityErrors, ThrowOnError>({
            url: '/github_pull_requests/mergeability',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Closes a GitHub pull request, or reopens it, as the authenticated user
     * with their own GitHub grant.
     */
    public setGithubPullRequestState<ThrowOnError extends boolean = false>(options: Options<SetGithubPullRequestStateData, ThrowOnError>): RequestResult<SetGithubPullRequestStateResponses, SetGithubPullRequestStateErrors, ThrowOnError> {
        return (options.client ?? this.client).post<SetGithubPullRequestStateResponses, SetGithubPullRequestStateErrors, ThrowOnError>({
            url: '/github_pull_requests/state',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Lists invite links, newest first. Macro staff only.
     */
    public listGtmInviteLinks<ThrowOnError extends boolean = false>(options?: Options<ListGtmInviteLinksData, ThrowOnError>): RequestResult<ListGtmInviteLinksResponses, ListGtmInviteLinksErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<ListGtmInviteLinksResponses, ListGtmInviteLinksErrors, ThrowOnError>({ url: '/gtm-invite/links', ...options });
    }

    /**
     * Creates an invite link. Macro staff only.
     */
    public createGtmInviteLink<ThrowOnError extends boolean = false>(options: Options<CreateGtmInviteLinkData, ThrowOnError>): RequestResult<CreateGtmInviteLinkResponses, CreateGtmInviteLinkErrors, ThrowOnError> {
        return (options.client ?? this.client).post<CreateGtmInviteLinkResponses, CreateGtmInviteLinkErrors, ThrowOnError>({
            url: '/gtm-invite/links',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Revokes an invite link nobody has signed up through. Macro staff only.
     */
    public revokeGtmInviteLink<ThrowOnError extends boolean = false>(options: Options<RevokeGtmInviteLinkData, ThrowOnError>): RequestResult<RevokeGtmInviteLinkResponses, RevokeGtmInviteLinkErrors, ThrowOnError> {
        return (options.client ?? this.client).delete<RevokeGtmInviteLinkResponses, RevokeGtmInviteLinkErrors, ThrowOnError>({ url: '/gtm-invite/links/{id}', ...options });
    }

    /**
     * The promotion the signed-in user's account holds from an invite link, if
     * they redeemed one and have not started a paid subscription yet.
     */
    public getGtmInviteOffer<ThrowOnError extends boolean = false>(options?: Options<GetGtmInviteOfferData, ThrowOnError>): RequestResult<GetGtmInviteOfferResponses, GetGtmInviteOfferErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetGtmInviteOfferResponses, GetGtmInviteOfferErrors, ThrowOnError>({ url: '/gtm-invite/offer', ...options });
    }

    /**
     * Resolves an invite link for the public welcome page and counts the open.
     *
     * Unauthenticated: the recipient has no account yet. Only the first name and
     * whether the link is still usable are exposed.
     */
    public resolveGtmInviteLink<ThrowOnError extends boolean = false>(options: Options<ResolveGtmInviteLinkData, ThrowOnError>): RequestResult<ResolveGtmInviteLinkResponses, ResolveGtmInviteLinkErrors, ThrowOnError> {
        return (options.client ?? this.client).get<ResolveGtmInviteLinkResponses, ResolveGtmInviteLinkErrors, ThrowOnError>({ url: '/gtm-invite/public/{token}', ...options });
    }

    /**
     * Attributes the signed-in user's account to the invite link they opened and
     * grants them its offer. Idempotent for the same account.
     */
    public redeemGtmInviteLink<ThrowOnError extends boolean = false>(options: Options<RedeemGtmInviteLinkData, ThrowOnError>): RequestResult<RedeemGtmInviteLinkResponses, RedeemGtmInviteLinkErrors, ThrowOnError> {
        return (options.client ?? this.client).post<RedeemGtmInviteLinkResponses, RedeemGtmInviteLinkErrors, ThrowOnError>({
            url: '/gtm-invite/redeem',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Health check
     */
    public healthHandler<ThrowOnError extends boolean = false>(options?: Options<HealthHandlerData, ThrowOnError>): RequestResult<HealthHandlerResponses, unknown, ThrowOnError> {
        return (options?.client ?? this.client).get<HealthHandlerResponses, unknown, ThrowOnError>({ url: '/health', ...options });
    }

    /**
     * Generates a macro-api-token using the user's macro-access-token
     * You can either have your access token in the cookies or in the request
     * headers
     * Authorization: Bearer <access_token>
     * This returns a new macro-api-token
     */
    public macroApiToken<ThrowOnError extends boolean = false>(options: Options<MacroApiTokenData, ThrowOnError>): RequestResult<MacroApiTokenResponses, MacroApiTokenErrors, ThrowOnError> {
        return (options.client ?? this.client).get<MacroApiTokenResponses, MacroApiTokenErrors, ThrowOnError>({ url: '/jwt/macro_api_token', ...options });
    }

    /**
     * Refreshes a JWT token
     * You can either have your access token and refresh token in the cookies or in the request
     * headers
     * Authorization: Bearer <access_token>
     * x-macro-refresh-token: <refresh_token>
     * This returns the cookies with the new access and refresh token
     */
    public refresh<ThrowOnError extends boolean = false>(options?: Options<RefreshData, ThrowOnError>): RequestResult<RefreshResponses, RefreshErrors, ThrowOnError> {
        return (options?.client ?? this.client).post<RefreshResponses, RefreshErrors, ThrowOnError>({ url: '/jwt/refresh', ...options });
    }

    /**
     * Initiates a link for a user
     */
    public createInProgressLink<ThrowOnError extends boolean = false>(options?: Options<CreateInProgressLinkData, ThrowOnError>): RequestResult<CreateInProgressLinkResponses, CreateInProgressLinkErrors, ThrowOnError> {
        return (options?.client ?? this.client).post<CreateInProgressLinkResponses, CreateInProgressLinkErrors, ThrowOnError>({ url: '/link', ...options });
    }

    public emailConnectionProviders<ThrowOnError extends boolean = false>(options?: Options<EmailConnectionProvidersData, ThrowOnError>): RequestResult<EmailConnectionProvidersResponses, EmailConnectionProvidersErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<EmailConnectionProvidersResponses, EmailConnectionProvidersErrors, ThrowOnError>({ url: '/link/email/providers', ...options });
    }

    /**
     * Deletes a github link for a user
     */
    public deleteGithubLink<ThrowOnError extends boolean = false>(options?: Options<DeleteGithubLinkData, ThrowOnError>): RequestResult<DeleteGithubLinkResponses, DeleteGithubLinkErrors, ThrowOnError> {
        return (options?.client ?? this.client).delete<DeleteGithubLinkResponses, DeleteGithubLinkErrors, ThrowOnError>({ url: '/link/github', ...options });
    }

    /**
     * Initiates a link for a user
     */
    public initGithubLink<ThrowOnError extends boolean = false>(options: Options<InitGithubLinkData, ThrowOnError>): RequestResult<InitGithubLinkResponses, InitGithubLinkErrors, ThrowOnError> {
        return (options.client ?? this.client).post<InitGithubLinkResponses, InitGithubLinkErrors, ThrowOnError>({ url: '/link/github', ...options });
    }

    /**
     * Checks whether the authenticated user's GitHub link token is valid.
     */
    public checkGithubLinkStatus<ThrowOnError extends boolean = false>(options?: Options<CheckGithubLinkStatusData, ThrowOnError>): RequestResult<CheckGithubLinkStatusResponses, CheckGithubLinkStatusErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<CheckGithubLinkStatusResponses, CheckGithubLinkStatusErrors, ThrowOnError>({ url: '/link/github/status', ...options });
    }

    /**
     * Initiates a Gmail link for a user
     */
    public initGmailLink<ThrowOnError extends boolean = false>(options: Options<InitGmailLinkData, ThrowOnError>): RequestResult<InitGmailLinkResponses, InitGmailLinkErrors, ThrowOnError> {
        return (options.client ?? this.client).post<InitGmailLinkResponses, InitGmailLinkErrors, ThrowOnError>({ url: '/link/gmail', ...options });
    }

    /**
     * Checks whether the authenticated user's gmail link is valid.
     */
    public checkGmailLinkStatus<ThrowOnError extends boolean = false>(options?: Options<CheckGmailLinkStatusData, ThrowOnError>): RequestResult<CheckGmailLinkStatusResponses, CheckGmailLinkStatusErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<CheckGmailLinkStatusResponses, CheckGmailLinkStatusErrors, ThrowOnError>({ url: '/link/gmail/status', ...options });
    }

    /**
     * Initiates a Microsoft Outlook account link for an authenticated user.
     */
    public initOutlookLink<ThrowOnError extends boolean = false>(options?: Options<InitOutlookLinkData, ThrowOnError>): RequestResult<InitOutlookLinkResponses, InitOutlookLinkErrors, ThrowOnError> {
        return (options?.client ?? this.client).post<InitOutlookLinkResponses, InitOutlookLinkErrors, ThrowOnError>({ url: '/link/outlook', ...options });
    }

    /**
     * Completes the apple login flow
     */
    public appleLogin<ThrowOnError extends boolean = false>(options: Options<AppleLoginData, ThrowOnError>): RequestResult<AppleLoginResponses, AppleLoginErrors, ThrowOnError> {
        return (options.client ?? this.client).post<AppleLoginResponses, AppleLoginErrors, ThrowOnError>({
            url: '/login/apple',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Performs a password login
     */
    public passwordLogin<ThrowOnError extends boolean = false>(options: Options<PasswordLoginData, ThrowOnError>): RequestResult<PasswordLoginResponses, PasswordLoginErrors, ThrowOnError> {
        return (options.client ?? this.client).post<PasswordLoginResponses, PasswordLoginErrors, ThrowOnError>({
            url: '/login/password',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Initiates a passwordless login
     */
    public passwordlessLogin<ThrowOnError extends boolean = false>(options: Options<PasswordlessLoginData, ThrowOnError>): RequestResult<PasswordlessLoginResponses, PasswordlessLoginErrors, ThrowOnError> {
        return (options.client ?? this.client).post<PasswordlessLoginResponses, PasswordlessLoginErrors, ThrowOnError>({
            url: '/login/passwordless',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Initiates an SSO login
     */
    public ssoLogin<ThrowOnError extends boolean = false>(options: Options<SsoLoginData, ThrowOnError>): RequestResult<SsoLoginResponses, SsoLoginErrors, ThrowOnError> {
        return (options.client ?? this.client).get<SsoLoginResponses, SsoLoginErrors, ThrowOnError>({ url: '/login/sso', ...options });
    }

    /**
     * Initiates a passwordless login
     */
    public logout<ThrowOnError extends boolean = false>(options?: Options<LogoutData, ThrowOnError>): RequestResult<LogoutResponses, unknown, ThrowOnError> {
        return (options?.client ?? this.client).post<LogoutResponses, unknown, ThrowOnError>({ url: '/logout', ...options });
    }

    /**
     * Creates a merge request used to verify the user's email address in order to merge their
     * accounts.
     * This is different than generate_email_link which is used to verify a new email address to add a
     * new profile to a user's account.
     */
    public createMergeRequest<ThrowOnError extends boolean = false>(options: Options<CreateMergeRequestData, ThrowOnError>): RequestResult<CreateMergeRequestResponses, CreateMergeRequestErrors, ThrowOnError> {
        return (options.client ?? this.client).post<CreateMergeRequestResponses, CreateMergeRequestErrors, ThrowOnError>({
            url: '/merge',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Verifies the merge request
     */
    public verifyMergeRequest<ThrowOnError extends boolean = false>(options: Options<VerifyMergeRequestData, ThrowOnError>): RequestResult<VerifyMergeRequestResponses, VerifyMergeRequestErrors, ThrowOnError> {
        return (options.client ?? this.client).get<VerifyMergeRequestResponses, VerifyMergeRequestErrors, ThrowOnError>({ url: '/merge/verify/{code}', ...options });
    }

    /**
     * Emails a mobile lead a link to continue onboarding on desktop and enrolls
     * them in the Loops welcome sequence. No-ops if the address was already
     * captured, and rejects blocked addresses.
     */
    public sendMobileWelcomeEmail<ThrowOnError extends boolean = false>(options: Options<SendMobileWelcomeEmailData, ThrowOnError>): RequestResult<SendMobileWelcomeEmailResponses, SendMobileWelcomeEmailErrors, ThrowOnError> {
        return (options.client ?? this.client).post<SendMobileWelcomeEmailResponses, SendMobileWelcomeEmailErrors, ThrowOnError>({
            url: '/mobile-welcome-email',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Handles oauth redirect
     */
    public passwordlessCallback<ThrowOnError extends boolean = false>(options: Options<PasswordlessCallbackData, ThrowOnError>): RequestResult<PasswordlessCallbackResponses, PasswordlessCallbackErrors, ThrowOnError> {
        return (options.client ?? this.client).get<PasswordlessCallbackResponses, PasswordlessCallbackErrors, ThrowOnError>({ url: '/oauth/passwordless/{code}', ...options });
    }

    /**
     * Handles oauth redirect
     */
    public oauthRedirect<ThrowOnError extends boolean = false>(options?: Options<OauthRedirectData, ThrowOnError>): RequestResult<OauthRedirectResponses, OauthRedirectErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<OauthRedirectResponses, OauthRedirectErrors, ThrowOnError>({ url: '/oauth/redirect', ...options });
    }

    /**
     * Custom OAuth2 callback
     */
    public oauth2Callback<ThrowOnError extends boolean = false>(options: Options<Oauth2CallbackData, ThrowOnError>): RequestResult<Oauth2CallbackResponses, Oauth2CallbackErrors, ThrowOnError> {
        return (options.client ?? this.client).get<Oauth2CallbackResponses, Oauth2CallbackErrors, ThrowOnError>({ url: '/oauth2/{provider}/callback', ...options });
    }

    /**
     * Gets all permissions
     */
    public getPermissions<ThrowOnError extends boolean = false>(options?: Options<GetPermissionsData, ThrowOnError>): RequestResult<GetPermissionsResponses, GetPermissionsErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetPermissionsResponses, GetPermissionsErrors, ThrowOnError>({ url: '/permissions', ...options });
    }

    /**
     * Gets a list of the users permissions
     */
    public getUserPermissions<ThrowOnError extends boolean = false>(options?: Options<GetUserPermissionsData, ThrowOnError>): RequestResult<GetUserPermissionsResponses, GetUserPermissionsErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetUserPermissionsResponses, GetUserPermissionsErrors, ThrowOnError>({ url: '/permissions/me', ...options });
    }

    /**
     * Handler for `GET /referral-code`.
     *
     * Returns the authenticated user's referral code.
     */
    public getReferralCode<ThrowOnError extends boolean = false>(options?: Options<GetReferralCodeData, ThrowOnError>): RequestResult<GetReferralCodeResponses, GetReferralCodeErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetReferralCodeResponses, GetReferralCodeErrors, ThrowOnError>({ url: '/referral/code', ...options });
    }

    /**
     * Handler for `POST /referral/send`.
     *
     * Sends a referral code via email to a user
     */
    public sendReferralCode<ThrowOnError extends boolean = false>(options: Options<SendReferralCodeData, ThrowOnError>): RequestResult<SendReferralCodeResponses, SendReferralCodeErrors, ThrowOnError> {
        return (options.client ?? this.client).post<SendReferralCodeResponses, SendReferralCodeErrors, ThrowOnError>({
            url: '/referral/send',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Refreshes a JWT token
     */
    public sessionCreation<ThrowOnError extends boolean = false>(options?: Options<SessionCreationData, ThrowOnError>): RequestResult<SessionCreationResponses, SessionCreationErrors, ThrowOnError> {
        return (options?.client ?? this.client).post<SessionCreationResponses, SessionCreationErrors, ThrowOnError>({ url: '/session', ...options });
    }

    /**
     * Performs a login via session code
     */
    public sessionLogin<ThrowOnError extends boolean = false>(options: Options<SessionLoginData, ThrowOnError>): RequestResult<SessionLoginResponses, SessionLoginErrors, ThrowOnError> {
        return (options.client ?? this.client).get<SessionLoginResponses, SessionLoginErrors, ThrowOnError>({ url: '/session/login/{session_code}', ...options });
    }

    /**
     * The status every user sees. Public: the banner shows wherever the app
     * runs, signed in or not.
     */
    public getSystemStatus<ThrowOnError extends boolean = false>(options?: Options<GetSystemStatusData, ThrowOnError>): RequestResult<GetSystemStatusResponses, GetSystemStatusErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetSystemStatusResponses, GetSystemStatusErrors, ThrowOnError>({ url: '/system-status', ...options });
    }

    /**
     * Sets the status every user sees and pushes it to every open app. Macro
     * staff only.
     *
     * Authenticate with a Macro session, or from a script with a personal API
     * key (Settings → API keys) in the `x-macro-user-api-key` header. The body
     * is the new status:
     *
     * - `{"status": "operational"}` clears the banner. It takes no message.
     * - `{"status": "degraded", "message": "Search is slow to update."}`
     * - `{"status": "major_outage", "message": "Macro is unavailable. We're on it."}`
     *
     * Messages are trimmed and must be 1–500 characters. Every call is kept in
     * the history, even when it repeats the current status.
     */
    public setSystemStatus<ThrowOnError extends boolean = false>(options: Options<SetSystemStatusData, ThrowOnError>): RequestResult<SetSystemStatusResponses, SetSystemStatusErrors, ThrowOnError> {
        return (options.client ?? this.client).post<SetSystemStatusResponses, SetSystemStatusErrors, ThrowOnError>({
            url: '/system-status',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Recent status updates, newest first, with who set each. Macro staff only.
     */
    public listSystemStatusHistory<ThrowOnError extends boolean = false>(options?: Options<ListSystemStatusHistoryData, ThrowOnError>): RequestResult<ListSystemStatusHistoryResponses, ListSystemStatusHistoryErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<ListSystemStatusHistoryResponses, ListSystemStatusHistoryErrors, ThrowOnError>({ url: '/system-status/history', ...options });
    }

    /**
     * Deletes a team.
     * This will update all team members roles and cancel your subscription for the team.
     * This action is **irreversible** and you will not be able to recover the team afterwards.
     */
    public deleteTeam<ThrowOnError extends boolean = false>(options?: Options<DeleteTeamData, ThrowOnError>): RequestResult<DeleteTeamResponses, DeleteTeamErrors, ThrowOnError> {
        return (options?.client ?? this.client).delete<DeleteTeamResponses, DeleteTeamErrors, ThrowOnError>({ url: '/team', ...options });
    }

    /**
     * Gets a team by ID.
     */
    public getTeam<ThrowOnError extends boolean = false>(options?: Options<GetTeamData, ThrowOnError>): RequestResult<GetTeamResponses, GetTeamErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetTeamResponses, GetTeamErrors, ThrowOnError>({ url: '/team', ...options });
    }

    /**
     * Updates a team.
     */
    public patchTeam<ThrowOnError extends boolean = false>(options: Options<PatchTeamData, ThrowOnError>): RequestResult<PatchTeamResponses, PatchTeamErrors, ThrowOnError> {
        return (options.client ?? this.client).patch<PatchTeamResponses, PatchTeamErrors, ThrowOnError>({
            url: '/team',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Creates a new team.
     */
    public createTeam<ThrowOnError extends boolean = false>(options: Options<CreateTeamData, ThrowOnError>): RequestResult<CreateTeamResponses, CreateTeamErrors, ThrowOnError> {
        return (options.client ?? this.client).post<CreateTeamResponses, CreateTeamErrors, ThrowOnError>({
            url: '/team',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Toggles automatic domain joining for the team. When the team has no
     * auto-join domain, sets it to the team owner's email domain — rejected
     * with a 400 when that domain is a generic email provider domain (e.g.
     * gmail.com). When one is already set, removes it. New users whose email
     * domain matches a team's auto-join domain are added to that team on
     * signup. Requires the caller to be an Admin or Owner of the team.
     */
    public toggleTeamAutoJoinDomain<ThrowOnError extends boolean = false>(options?: Options<ToggleTeamAutoJoinDomainData, ThrowOnError>): RequestResult<ToggleTeamAutoJoinDomainResponses, ToggleTeamAutoJoinDomainErrors, ThrowOnError> {
        return (options?.client ?? this.client).post<ToggleTeamAutoJoinDomainResponses, ToggleTeamAutoJoinDomainErrors, ThrowOnError>({ url: '/team/auto-join-domain/toggle', ...options });
    }

    /**
     * Enables or disables CRM for the team. On enable with `backfill`
     * (the default), kicks off a best-effort backfill that enqueues a
     * `PopulateCrmForUser` message per team member (no-op if CRM is
     * already enabled); without `backfill` the CRM starts empty and fills
     * from new activity only. On disable,
     * flips the flag and purges the team's CRM data (cascading through
     * `crm_companies` → `crm_domains` / `crm_contacts` /
     * `crm_contact_sources`). Requires the caller to be an Admin or
     * Owner of the team.
     */
    public patchTeamCrmSettings<ThrowOnError extends boolean = false>(options: Options<PatchTeamCrmSettingsData, ThrowOnError>): RequestResult<PatchTeamCrmSettingsResponses, PatchTeamCrmSettingsErrors, ThrowOnError> {
        return (options.client ?? this.client).patch<PatchTeamCrmSettingsResponses, PatchTeamCrmSettingsErrors, ThrowOnError>({
            url: '/team/crm',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Emails the caller's contacts on the team's auto-join domain that the team
     * exists, so they can sign up and join. Contacts already on Macro, on the
     * team, invited, or emailed before are skipped, and a team emails at most 25
     * people in total. Call it after sending the team's invites. Requires the
     * caller to be an Admin or Owner of the team.
     */
    public sendTeamDomainNotice<ThrowOnError extends boolean = false>(options?: Options<SendTeamDomainNoticeData, ThrowOnError>): RequestResult<SendTeamDomainNoticeResponses, SendTeamDomainNoticeErrors, ThrowOnError> {
        return (options?.client ?? this.client).post<SendTeamDomainNoticeResponses, SendTeamDomainNoticeErrors, ThrowOnError>({ url: '/team/domain-notice', ...options });
    }

    /**
     * Invites a user to a team.
     */
    public inviteToTeam<ThrowOnError extends boolean = false>(options: Options<InviteToTeamData, ThrowOnError>): RequestResult<InviteToTeamResponses, InviteToTeamErrors, ThrowOnError> {
        return (options.client ?? this.client).post<InviteToTeamResponses, InviteToTeamErrors, ThrowOnError>({
            url: '/team/invite',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Turns off the team's invite link. Requires a team admin or owner.
     */
    public deleteTeamInviteLink<ThrowOnError extends boolean = false>(options?: Options<DeleteTeamInviteLinkData, ThrowOnError>): RequestResult<DeleteTeamInviteLinkResponses, DeleteTeamInviteLinkErrors, ThrowOnError> {
        return (options?.client ?? this.client).delete<DeleteTeamInviteLinkResponses, DeleteTeamInviteLinkErrors, ThrowOnError>({ url: '/team/invite-link', ...options });
    }

    /**
     * Gets the team's invite link. Anyone who may invite people to the team may
     * see it.
     */
    public getTeamInviteLink<ThrowOnError extends boolean = false>(options?: Options<GetTeamInviteLinkData, ThrowOnError>): RequestResult<GetTeamInviteLinkResponses, GetTeamInviteLinkErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetTeamInviteLinkResponses, GetTeamInviteLinkErrors, ThrowOnError>({ url: '/team/invite-link', ...options });
    }

    /**
     * Creates the team's invite link, replacing any existing one. Anyone who may
     * invite people may create the first link; replacing one requires a team
     * admin or owner.
     */
    public createTeamInviteLink<ThrowOnError extends boolean = false>(options?: Options<CreateTeamInviteLinkData, ThrowOnError>): RequestResult<CreateTeamInviteLinkResponses, CreateTeamInviteLinkErrors, ThrowOnError> {
        return (options?.client ?? this.client).post<CreateTeamInviteLinkResponses, CreateTeamInviteLinkErrors, ThrowOnError>({ url: '/team/invite-link', ...options });
    }

    /**
     * Joins the team an invite link belongs to.
     */
    public joinTeamByInviteLink<ThrowOnError extends boolean = false>(options: Options<JoinTeamByInviteLinkData, ThrowOnError>): RequestResult<JoinTeamByInviteLinkResponses, JoinTeamByInviteLinkErrors, ThrowOnError> {
        return (options.client ?? this.client).post<JoinTeamByInviteLinkResponses, JoinTeamByInviteLinkErrors, ThrowOnError>({
            url: '/team/invite-link/join',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Gets the team an invite link joins, so the user can see it before joining.
     */
    public getTeamByInviteLink<ThrowOnError extends boolean = false>(options: Options<GetTeamByInviteLinkData, ThrowOnError>): RequestResult<GetTeamByInviteLinkResponses, GetTeamByInviteLinkErrors, ThrowOnError> {
        return (options.client ?? this.client).post<GetTeamByInviteLinkResponses, GetTeamByInviteLinkErrors, ThrowOnError>({
            url: '/team/invite-link/team',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Deletes a team invite from a team.
     */
    public deleteTeamInviteHandler<ThrowOnError extends boolean = false>(options: Options<DeleteTeamInviteHandlerData, ThrowOnError>): RequestResult<DeleteTeamInviteHandlerResponses, DeleteTeamInviteHandlerErrors, ThrowOnError> {
        return (options.client ?? this.client).delete<DeleteTeamInviteHandlerResponses, DeleteTeamInviteHandlerErrors, ThrowOnError>({ url: '/team/invite/{team_invite_id}', ...options });
    }

    /**
     * Gets all invites for a team.
     */
    public getTeamInvites<ThrowOnError extends boolean = false>(options?: Options<GetTeamInvitesData, ThrowOnError>): RequestResult<GetTeamInvitesResponses, GetTeamInvitesErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetTeamInvitesResponses, GetTeamInvitesErrors, ThrowOnError>({ url: '/team/invites', ...options });
    }

    /**
     * Rejects an invitation to join a team.
     */
    public rejectInvitation<ThrowOnError extends boolean = false>(options: Options<RejectInvitationData, ThrowOnError>): RequestResult<RejectInvitationResponses, RejectInvitationErrors, ThrowOnError> {
        return (options.client ?? this.client).delete<RejectInvitationResponses, RejectInvitationErrors, ThrowOnError>({ url: '/team/join/{team_invite_id}', ...options });
    }

    /**
     * Joins a team by accepting an invite.
     */
    public joinTeam<ThrowOnError extends boolean = false>(options: Options<JoinTeamData, ThrowOnError>): RequestResult<JoinTeamResponses, JoinTeamErrors, ThrowOnError> {
        return (options.client ?? this.client).get<JoinTeamResponses, JoinTeamErrors, ThrowOnError>({ url: '/team/join/{team_invite_id}', ...options });
    }

    /**
     * Moves one team member's seat between paid plans.
     *
     * Team admins and owners only. The team's subscription is re-billed for
     * the seat at once (prorated); the member's tier role and individual AI
     * allowance follow immediately.
     */
    public patchTeamMemberPlan<ThrowOnError extends boolean = false>(options: Options<PatchTeamMemberPlanData, ThrowOnError>): RequestResult<PatchTeamMemberPlanResponses, PatchTeamMemberPlanErrors, ThrowOnError> {
        return (options.client ?? this.client).patch<PatchTeamMemberPlanResponses, PatchTeamMemberPlanErrors, ThrowOnError>({
            url: '/team/members/{member_user_id}/plan',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Toggles whether non-admin members may invite users to the team. Teams
     * start with this on (any member can invite); turning it off restricts
     * inviting to team admins and owners. Requires the caller to be an Admin
     * or Owner of the team.
     */
    public toggleTeamNonAdminInvites<ThrowOnError extends boolean = false>(options?: Options<ToggleTeamNonAdminInvitesData, ThrowOnError>): RequestResult<ToggleTeamNonAdminInvitesResponses, ToggleTeamNonAdminInvitesErrors, ThrowOnError> {
        return (options?.client ?? this.client).post<ToggleTeamNonAdminInvitesResponses, ToggleTeamNonAdminInvitesErrors, ThrowOnError>({ url: '/team/non-admin-invites/toggle', ...options });
    }

    /**
     * Removes a user from a team.
     */
    public removeUserFromTeam<ThrowOnError extends boolean = false>(options: Options<RemoveUserFromTeamData, ThrowOnError>): RequestResult<RemoveUserFromTeamResponses, RemoveUserFromTeamErrors, ThrowOnError> {
        return (options.client ?? this.client).delete<RemoveUserFromTeamResponses, RemoveUserFromTeamErrors, ThrowOnError>({ url: '/team/remove/{remove_user_id}', ...options });
    }

    /**
     * Gets all teams for the authenticated user.
     */
    public getUserTeams<ThrowOnError extends boolean = false>(options?: Options<GetUserTeamsData, ThrowOnError>): RequestResult<GetUserTeamsResponses, GetUserTeamsErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetUserTeamsResponses, GetUserTeamsErrors, ThrowOnError>({ url: '/team/user', ...options });
    }

    /**
     * Gets all of a user's invitations.
     */
    public getUserInvites<ThrowOnError extends boolean = false>(options?: Options<GetUserInvitesData, ThrowOnError>): RequestResult<GetUserInvitesResponses, GetUserInvitesErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetUserInvitesResponses, GetUserInvitesErrors, ThrowOnError>({ url: '/team/user/invites', ...options });
    }

    /**
     * Finishes an agent's signup: joins the team that invited it and mints its
     * SDK token.
     *
     * Safe to repeat until the agent confirms it saved the token: a reload replaces
     * the key, and a failed join stays pending for the next attempt.
     */
    public agentSetup<ThrowOnError extends boolean = false>(options?: Options<AgentSetupData, ThrowOnError>): RequestResult<AgentSetupResponses, AgentSetupErrors, ThrowOnError> {
        return (options?.client ?? this.client).post<AgentSetupResponses, AgentSetupErrors, ThrowOnError>({ url: '/user/agent_setup', ...options });
    }

    /**
     * Retrieves user names in bulk
     */
    public getUserNames<ThrowOnError extends boolean = false>(options: Options<GetUserNamesData, ThrowOnError>): RequestResult<GetUserNamesResponses, GetUserNamesErrors, ThrowOnError> {
        return (options.client ?? this.client).post<GetUserNamesResponses, GetUserNamesErrors, ThrowOnError>({
            url: '/user/get_names',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Gets names for passed user profile ids, falling back to the requesting user's email contact names
     */
    public getUserNamesWithEmail<ThrowOnError extends boolean = false>(options: Options<GetUserNamesWithEmailData, ThrowOnError>): RequestResult<GetUserNamesWithEmailResponses, GetUserNamesWithEmailErrors, ThrowOnError> {
        return (options.client ?? this.client).post<GetUserNamesWithEmailResponses, GetUserNamesWithEmailErrors, ThrowOnError>({
            url: '/user/get_names_with_email',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Updates the user's group.
     */
    public patchUserGroup<ThrowOnError extends boolean = false>(options: Options<PatchUserGroupData, ThrowOnError>): RequestResult<PatchUserGroupResponses, PatchUserGroupErrors, ThrowOnError> {
        return (options.client ?? this.client).patch<PatchUserGroupResponses, PatchUserGroupErrors, ThrowOnError>({
            url: '/user/group',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Get the caller's interface language.
     */
    public getUserLanguage<ThrowOnError extends boolean = false>(options?: Options<GetUserLanguageData, ThrowOnError>): RequestResult<GetUserLanguageResponses, GetUserLanguageErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetUserLanguageResponses, GetUserLanguageErrors, ThrowOnError>({ url: '/user/language', ...options });
    }

    /**
     * Set the caller's interface language, or clear it to follow their team's,
     * else their browser's.
     */
    public putUserLanguage<ThrowOnError extends boolean = false>(options: Options<PutUserLanguageData, ThrowOnError>): RequestResult<PutUserLanguageResponses, PutUserLanguageErrors, ThrowOnError> {
        return (options.client ?? this.client).put<PutUserLanguageResponses, PutUserLanguageErrors, ThrowOnError>({
            url: '/user/language',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Gets the calling user's info which matches what was given in the **deprecated**
     * getUserPermissions query in our graphql api.
     * This will eventually be removed and optimized to use smaller calls that grab
     * what is needed for various parts of the UI.
     */
    public getLegacyUserPermissions<ThrowOnError extends boolean = false>(options?: Options<GetLegacyUserPermissionsData, ThrowOnError>): RequestResult<GetLegacyUserPermissionsResponses, GetLegacyUserPermissionsErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetLegacyUserPermissionsResponses, GetLegacyUserPermissionsErrors, ThrowOnError>({ url: '/user/legacy_user_permissions', ...options });
    }

    /**
     * Returns whether or not a given idp link exists for a user
     */
    public getUserLinkExists<ThrowOnError extends boolean = false>(options: Options<GetUserLinkExistsData, ThrowOnError>): RequestResult<GetUserLinkExistsResponses, GetUserLinkExistsErrors, ThrowOnError> {
        return (options.client ?? this.client).get<GetUserLinkExistsResponses, GetUserLinkExistsErrors, ThrowOnError>({ url: '/user/link_exists', ...options });
    }

    /**
     * Deletes the user who calls this endpoint
     */
    public deleteUser<ThrowOnError extends boolean = false>(options?: Options<DeleteUserData, ThrowOnError>): RequestResult<DeleteUserResponses, DeleteUserErrors, ThrowOnError> {
        return (options?.client ?? this.client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({ url: '/user/me', ...options });
    }

    /**
     * Gets the calling user's info
     */
    public getUserInfo<ThrowOnError extends boolean = false>(options?: Options<GetUserInfoData, ThrowOnError>): RequestResult<GetUserInfoResponses, GetUserInfoErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetUserInfoResponses, GetUserInfoErrors, ThrowOnError>({ url: '/user/me', ...options });
    }

    /**
     * Retrieves the name of a particular user.
     */
    public getUserName<ThrowOnError extends boolean = false>(options?: Options<GetUserNameData, ThrowOnError>): RequestResult<GetUserNameResponses, GetUserNameErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetUserNameResponses, GetUserNameErrors, ThrowOnError>({ url: '/user/name', ...options });
    }

    /**
     * Sets the name of a particular user
     */
    public putUserName<ThrowOnError extends boolean = false>(options?: Options<PutUserNameData, ThrowOnError>): RequestResult<PutUserNameResponses, PutUserNameErrors, ThrowOnError> {
        return (options?.client ?? this.client).put<PutUserNameResponses, PutUserNameErrors, ThrowOnError>({ url: '/user/name', ...options });
    }

    /**
     * Updates the user's onboarding.
     */
    public patchUserOnboarding<ThrowOnError extends boolean = false>(options: Options<PatchUserOnboardingData, ThrowOnError>): RequestResult<PatchUserOnboardingResponses, PatchUserOnboardingErrors, ThrowOnError> {
        return (options.client ?? this.client).patch<PatchUserOnboardingResponses, PatchUserOnboardingErrors, ThrowOnError>({
            url: '/user/onboarding',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Retrieves the users organization if present.
     * Returns NO_CONTENT if the user is a not part of an organization.
     */
    public getUserOrganization<ThrowOnError extends boolean = false>(options?: Options<GetUserOrganizationData, ThrowOnError>): RequestResult<GetUserOrganizationResponses, GetUserOrganizationErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetUserOrganizationResponses, GetUserOrganizationErrors, ThrowOnError>({ url: '/user/organization', ...options });
    }

    /**
     * Sets the profile picture URL for a particular user
     */
    public putProfilePicture<ThrowOnError extends boolean = false>(options: Options<PutProfilePictureData, ThrowOnError>): RequestResult<PutProfilePictureResponses, PutProfilePictureErrors, ThrowOnError> {
        return (options.client ?? this.client).put<PutProfilePictureResponses, PutProfilePictureErrors, ThrowOnError>({ url: '/user/profile_picture', ...options });
    }

    /**
     * Reserves storage for a new profile picture. Static file storage has no
     * MacroDB, so it cannot check API keys; this route lets key holders upload.
     */
    public createProfilePictureUpload<ThrowOnError extends boolean = false>(options: Options<CreateProfilePictureUploadData, ThrowOnError>): RequestResult<CreateProfilePictureUploadResponses, CreateProfilePictureUploadErrors, ThrowOnError> {
        return (options.client ?? this.client).post<CreateProfilePictureUploadResponses, CreateProfilePictureUploadErrors, ThrowOnError>({
            url: '/user/profile_picture/file',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Sets the caller's profile picture to an image they uploaded.
     */
    public putProfilePictureFile<ThrowOnError extends boolean = false>(options: Options<PutProfilePictureFileData, ThrowOnError>): RequestResult<PutProfilePictureFileResponses, PutProfilePictureFileErrors, ThrowOnError> {
        return (options.client ?? this.client).put<PutProfilePictureFileResponses, PutProfilePictureFileErrors, ThrowOnError>({
            url: '/user/profile_picture/file',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Retrieves profile picture URLs for a list of users
     */
    public postProfilePictures<ThrowOnError extends boolean = false>(options: Options<PostProfilePicturesData, ThrowOnError>): RequestResult<PostProfilePicturesResponses, PostProfilePicturesErrors, ThrowOnError> {
        return (options.client ?? this.client).post<PostProfilePicturesResponses, PostProfilePicturesErrors, ThrowOnError>({
            url: '/user/profile_pictures',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Retrieves the users quota.
     * Returns NO_CONTENT if the user is a premium user with no quota.
     */
    public getUserQuota<ThrowOnError extends boolean = false>(options?: Options<GetUserQuotaData, ThrowOnError>): RequestResult<GetUserQuotaResponses, GetUserQuotaErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetUserQuotaResponses, GetUserQuotaErrors, ThrowOnError>({ url: '/user/quota', ...options });
    }

    /**
     * Creates a Stripe checkout session for the user to subscribe.
     */
    public createCheckoutSessionV2<ThrowOnError extends boolean = false>(options: Options<CreateCheckoutSessionV2Data, ThrowOnError>): RequestResult<CreateCheckoutSessionV2Responses, CreateCheckoutSessionV2Errors, ThrowOnError> {
        return (options.client ?? this.client).post<CreateCheckoutSessionV2Responses, CreateCheckoutSessionV2Errors, ThrowOnError>({
            url: '/user/stripe/checkoutv2',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Read subscription state for the authenticated user's seat.
     */
    public getSubscriptionStatus<ThrowOnError extends boolean = false>(options?: Options<GetSubscriptionStatusData, ThrowOnError>): RequestResult<GetSubscriptionStatusResponses, GetSubscriptionStatusErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetSubscriptionStatusResponses, GetSubscriptionStatusErrors, ThrowOnError>({ url: '/user/stripe/plan', ...options });
    }

    /**
     * Changes the caller's paid plan. Upgrades are prorated immediately;
     * downgrades retain the active plan until renewal. Selecting the active plan
     * cancels a pending downgrade without charging or resetting usage.
     */
    public changePlan<ThrowOnError extends boolean = false>(options: Options<ChangePlanData, ThrowOnError>): RequestResult<ChangePlanResponses, ChangePlanErrors, ThrowOnError> {
        return (options.client ?? this.client).post<ChangePlanResponses, ChangePlanErrors, ThrowOnError>({
            url: '/user/stripe/plan',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Creates a Stripe billing portal session.
     */
    public createPortalSession<ThrowOnError extends boolean = false>(options: Options<CreatePortalSessionData, ThrowOnError>): RequestResult<CreatePortalSessionResponses, CreatePortalSessionErrors, ThrowOnError> {
        return (options.client ?? this.client).post<CreatePortalSessionResponses, CreatePortalSessionErrors, ThrowOnError>({
            url: '/user/stripe/portal',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }

    /**
     * Read the caller's eligibility; checkout revalidates before granting a trial.
     */
    public getTrialEligibility<ThrowOnError extends boolean = false>(options?: Options<GetTrialEligibilityData, ThrowOnError>): RequestResult<GetTrialEligibilityResponses, GetTrialEligibilityErrors, ThrowOnError> {
        return (options?.client ?? this.client).get<GetTrialEligibilityResponses, GetTrialEligibilityErrors, ThrowOnError>({ url: '/user/stripe/trial_eligibility', ...options });
    }

    /**
     * Updates the user's tutorialComplete flag.
     */
    public patchUserTutorial<ThrowOnError extends boolean = false>(options: Options<PatchUserTutorialData, ThrowOnError>): RequestResult<PatchUserTutorialResponses, PatchUserTutorialErrors, ThrowOnError> {
        return (options.client ?? this.client).patch<PatchUserTutorialResponses, PatchUserTutorialErrors, ThrowOnError>({
            url: '/user/tutorial',
            ...options,
            headers: {
                'Content-Type': 'application/json',
                ...options.headers
            }
        });
    }
}