export type GetApiApiPendyUserComunitiesArgs = {'activated.equals'?: boolean | undefined, 'activated.in'?: Array | undefined, 'activated.notEquals'?: boolean | undefined, 'activated.notIn'?: Array | undefined, 'activated.specified'?: boolean | undefined, 'comunityType.equals'?: ('PENY_PAY' | 'PENDY_SHOP' | 'AYRIA') | undefined, 'comunityType.in'?: (Array<'PENY_PAY' | 'PENDY_SHOP' | 'AYRIA'>) | undefined, 'comunityType.notEquals'?: ('PENY_PAY' | 'PENDY_SHOP' | 'AYRIA') | undefined, 'comunityType.notIn'?: (Array<'PENY_PAY' | 'PENDY_SHOP' | 'AYRIA'>) | undefined, 'comunityType.specified'?: boolean | undefined, 'createdDate.equals'?: string | undefined, 'createdDate.greaterThan'?: string | undefined, 'createdDate.greaterThanOrEqual'?: string | undefined, 'createdDate.in[0].epochSecond'?: number | undefined, 'createdDate.in[0].nano'?: number | undefined, 'createdDate.lessThan'?: string | undefined, 'createdDate.lessThanOrEqual'?: string | undefined, 'createdDate.notEquals'?: string | undefined, 'createdDate.notIn[0].epochSecond'?: number | undefined, 'createdDate.notIn[0].nano'?: number | undefined, 'createdDate.specified'?: boolean | undefined, 'faveriteContact.equals'?: boolean | undefined, 'faveriteContact.in'?: Array | undefined, 'faveriteContact.notEquals'?: boolean | undefined, 'faveriteContact.notIn'?: Array | undefined, 'faveriteContact.specified'?: boolean | undefined, 'id.equals'?: number | undefined, 'id.greaterThan'?: number | undefined, 'id.greaterThanOrEqual'?: number | undefined, 'id.in'?: Array | undefined, 'id.lessThan'?: number | undefined, 'id.lessThanOrEqual'?: number | undefined, 'id.notEquals'?: number | undefined, 'id.notIn'?: Array | undefined, 'id.specified'?: boolean | undefined, 'mobile.contains'?: string | undefined, 'mobile.doesNotContain'?: string | undefined, 'mobile.equals'?: string | undefined, 'mobile.in'?: Array | undefined, 'mobile.notEquals'?: string | undefined, 'mobile.notIn'?: Array | undefined, 'mobile.specified'?: boolean | undefined, 'name.contains'?: string | undefined, 'name.doesNotContain'?: string | undefined, 'name.equals'?: string | undefined, 'name.in'?: Array | undefined, 'name.notEquals'?: string | undefined, 'name.notIn'?: Array | undefined, 'name.specified'?: boolean | undefined, page?: number | undefined, size?: number | undefined, sort?: Array | undefined, 'userId.equals'?: number | undefined, 'userId.greaterThan'?: number | undefined, 'userId.greaterThanOrEqual'?: number | undefined, 'userId.in'?: Array | undefined, 'userId.lessThan'?: number | undefined, 'userId.lessThanOrEqual'?: number | undefined, 'userId.notEquals'?: number | undefined, 'userId.notIn'?: Array | undefined, 'userId.specified'?: boolean | undefined}; export type GetApiApiPendyUserComunitiesOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * getAllPendyUserComunities * * GET /api/pendy-user-comunities */ export const getApiApiPendyUserComunities = async (args: GetApiApiPendyUserComunitiesArgs, options: GetApiApiPendyUserComunitiesOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args['activated.equals'] != null) query.append("activated.equals", String(args['activated.equals'])) for (const item of args['activated.in'] ?? []) query.append("activated.in", String(item)) if (args['activated.notEquals'] != null) query.append("activated.notEquals", String(args['activated.notEquals'])) for (const item of args['activated.notIn'] ?? []) query.append("activated.notIn", String(item)) if (args['activated.specified'] != null) query.append("activated.specified", String(args['activated.specified'])) if (args['comunityType.equals'] != null) query.append("comunityType.equals", String(args['comunityType.equals'])) for (const item of args['comunityType.in'] ?? []) query.append("comunityType.in", String(item)) if (args['comunityType.notEquals'] != null) query.append("comunityType.notEquals", String(args['comunityType.notEquals'])) for (const item of args['comunityType.notIn'] ?? []) query.append("comunityType.notIn", String(item)) if (args['comunityType.specified'] != null) query.append("comunityType.specified", String(args['comunityType.specified'])) if (args['createdDate.equals'] != null) query.append("createdDate.equals", String(args['createdDate.equals'])) if (args['createdDate.greaterThan'] != null) query.append("createdDate.greaterThan", String(args['createdDate.greaterThan'])) if (args['createdDate.greaterThanOrEqual'] != null) query.append("createdDate.greaterThanOrEqual", String(args['createdDate.greaterThanOrEqual'])) if (args['createdDate.in[0].epochSecond'] != null) query.append("createdDate.in[0].epochSecond", String(args['createdDate.in[0].epochSecond'])) if (args['createdDate.in[0].nano'] != null) query.append("createdDate.in[0].nano", String(args['createdDate.in[0].nano'])) if (args['createdDate.lessThan'] != null) query.append("createdDate.lessThan", String(args['createdDate.lessThan'])) if (args['createdDate.lessThanOrEqual'] != null) query.append("createdDate.lessThanOrEqual", String(args['createdDate.lessThanOrEqual'])) if (args['createdDate.notEquals'] != null) query.append("createdDate.notEquals", String(args['createdDate.notEquals'])) if (args['createdDate.notIn[0].epochSecond'] != null) query.append("createdDate.notIn[0].epochSecond", String(args['createdDate.notIn[0].epochSecond'])) if (args['createdDate.notIn[0].nano'] != null) query.append("createdDate.notIn[0].nano", String(args['createdDate.notIn[0].nano'])) if (args['createdDate.specified'] != null) query.append("createdDate.specified", String(args['createdDate.specified'])) if (args['faveriteContact.equals'] != null) query.append("faveriteContact.equals", String(args['faveriteContact.equals'])) for (const item of args['faveriteContact.in'] ?? []) query.append("faveriteContact.in", String(item)) if (args['faveriteContact.notEquals'] != null) query.append("faveriteContact.notEquals", String(args['faveriteContact.notEquals'])) for (const item of args['faveriteContact.notIn'] ?? []) query.append("faveriteContact.notIn", String(item)) if (args['faveriteContact.specified'] != null) query.append("faveriteContact.specified", String(args['faveriteContact.specified'])) if (args['id.equals'] != null) query.append("id.equals", String(args['id.equals'])) if (args['id.greaterThan'] != null) query.append("id.greaterThan", String(args['id.greaterThan'])) if (args['id.greaterThanOrEqual'] != null) query.append("id.greaterThanOrEqual", String(args['id.greaterThanOrEqual'])) for (const item of args['id.in'] ?? []) query.append("id.in", String(item)) if (args['id.lessThan'] != null) query.append("id.lessThan", String(args['id.lessThan'])) if (args['id.lessThanOrEqual'] != null) query.append("id.lessThanOrEqual", String(args['id.lessThanOrEqual'])) if (args['id.notEquals'] != null) query.append("id.notEquals", String(args['id.notEquals'])) for (const item of args['id.notIn'] ?? []) query.append("id.notIn", String(item)) if (args['id.specified'] != null) query.append("id.specified", String(args['id.specified'])) if (args['mobile.contains'] != null) query.append("mobile.contains", String(args['mobile.contains'])) if (args['mobile.doesNotContain'] != null) query.append("mobile.doesNotContain", String(args['mobile.doesNotContain'])) if (args['mobile.equals'] != null) query.append("mobile.equals", String(args['mobile.equals'])) for (const item of args['mobile.in'] ?? []) query.append("mobile.in", String(item)) if (args['mobile.notEquals'] != null) query.append("mobile.notEquals", String(args['mobile.notEquals'])) for (const item of args['mobile.notIn'] ?? []) query.append("mobile.notIn", String(item)) if (args['mobile.specified'] != null) query.append("mobile.specified", String(args['mobile.specified'])) if (args['name.contains'] != null) query.append("name.contains", String(args['name.contains'])) if (args['name.doesNotContain'] != null) query.append("name.doesNotContain", String(args['name.doesNotContain'])) if (args['name.equals'] != null) query.append("name.equals", String(args['name.equals'])) for (const item of args['name.in'] ?? []) query.append("name.in", String(item)) if (args['name.notEquals'] != null) query.append("name.notEquals", String(args['name.notEquals'])) for (const item of args['name.notIn'] ?? []) query.append("name.notIn", String(item)) if (args['name.specified'] != null) query.append("name.specified", String(args['name.specified'])) if (args.page != null) query.append("page", String(args.page)) if (args.size != null) query.append("size", String(args.size)) for (const item of args.sort ?? []) query.append("sort", String(item)) if (args['userId.equals'] != null) query.append("userId.equals", String(args['userId.equals'])) if (args['userId.greaterThan'] != null) query.append("userId.greaterThan", String(args['userId.greaterThan'])) if (args['userId.greaterThanOrEqual'] != null) query.append("userId.greaterThanOrEqual", String(args['userId.greaterThanOrEqual'])) for (const item of args['userId.in'] ?? []) query.append("userId.in", String(item)) if (args['userId.lessThan'] != null) query.append("userId.lessThan", String(args['userId.lessThan'])) if (args['userId.lessThanOrEqual'] != null) query.append("userId.lessThanOrEqual", String(args['userId.lessThanOrEqual'])) if (args['userId.notEquals'] != null) query.append("userId.notEquals", String(args['userId.notEquals'])) for (const item of args['userId.notIn'] ?? []) query.append("userId.notIn", String(item)) if (args['userId.specified'] != null) query.append("userId.specified", String(args['userId.specified'])) const url = `${baseUrl.replace(/\/+$/, '')}/api/pendy-user-comunities${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };