export type TypeOfUseEnum = 'PERSONAL' | 'SCHOOL' | 'WORK'; export type CompanySizeEnum = '1-10' | '11-50' | '51-200' | '201-500' | '500+'; export type SignUpRequest = {first_name: string, last_name: string, user_email: string, type_of_use: TypeOfUseEnum, qovery_usage: string, company_name?: (string | null) | undefined, company_size?: CompanySizeEnum | undefined, user_role?: (string | null) | undefined, qovery_usage_other?: (string | null) | undefined, user_questions?: (string | null) | undefined, current_step?: (string | null) | undefined, dx_auth?: (boolean | null) | undefined, infrastructure_hosting?: (string | null) | undefined}; export type CreateApiAdminUserSignUpArgs = {body: SignUpRequest}; export type CreateApiAdminUserSignUpOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Send Sign Up request * * POST /admin/userSignUp * * Also accepts auth: bearerAuth */ export const createApiAdminUserSignUp = async (args: CreateApiAdminUserSignUpArgs, options?: CreateApiAdminUserSignUpOptions) => { const {baseUrl = "https://api.qovery.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (ApiKeyAuth !== undefined) headers.set("Authorization", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/admin/userSignUp${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };