export type CustomStorage = {type?: ('S3' | 'S3_COMPATIBLE' | 'GCP' | 'AZURE' | 'DISTRIBUTOR_CLOUD') | undefined, s3Key?: string | undefined, s3Secret?: string | undefined, s3Region?: ('US_EST' | 'EU' | 'EU_FRANKFURT' | 'CANADA' | 'ASIA_SIDNEY' | 'ASIA_TOKYO' | 'LONDON' | 'EU_PARIS' | 'AFRICA_CAPE_TOWN' | 'ASIA_MUMBAI' | 'EU_ZURICH') | undefined, s3Bucket?: string | undefined, endPoint?: string | undefined}; export type NotificationDto = {provideType: 'LINK' | 'CSV', reportFreq?: ('DAILY' | 'WEEKLY' | 'MONTHLY') | undefined, reportDay?: ('MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY') | undefined, sendSummaryReport?: boolean | undefined, failureOnlyReport?: boolean | undefined}; export type ResellerInfoDto = {resellerName: string, contactName?: string | undefined, resellerEmail: string, resellerPassword?: string | undefined, region: 'US_EST' | 'EU' | 'EU_FRANKFURT' | 'CANADA' | 'ASIA_SIDNEY' | 'ASIA_TOKYO' | 'LONDON' | 'EU_PARIS' | 'AFRICA_CAPE_TOWN' | 'ASIA_MUMBAI' | 'EU_ZURICH', customStorage?: CustomStorage | undefined, countryCode: string, waiveSharedMailboxes?: boolean | undefined, notificationSettings?: NotificationDto | undefined}; export type CreateApiV1PartnersResellersArgs = {body: ResellerInfoDto}; export type CreateApiV1PartnersResellersOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * create reseller * * POST /v1/partners/resellers */ export const createApiV1PartnersResellers = async (args: CreateApiV1PartnersResellersArgs, options?: CreateApiV1PartnersResellersOptions) => { const {baseUrl = "https://api.cloudally.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/v1/partners/resellers${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 res.blob() };