export type GetApiApiShebaCachesArgs = {'accountComment.contains'?: string | undefined, 'accountComment.doesNotContain'?: string | undefined, 'accountComment.equals'?: string | undefined, 'accountComment.in'?: Array | undefined, 'accountComment.notEquals'?: string | undefined, 'accountComment.notIn'?: Array | undefined, 'accountComment.specified'?: boolean | undefined, 'accountDescription.contains'?: string | undefined, 'accountDescription.doesNotContain'?: string | undefined, 'accountDescription.equals'?: string | undefined, 'accountDescription.in'?: Array | undefined, 'accountDescription.notEquals'?: string | undefined, 'accountDescription.notIn'?: Array | undefined, 'accountDescription.specified'?: boolean | undefined, 'accountNumber.contains'?: string | undefined, 'accountNumber.doesNotContain'?: string | undefined, 'accountNumber.equals'?: string | undefined, 'accountNumber.in'?: Array | undefined, 'accountNumber.notEquals'?: string | undefined, 'accountNumber.notIn'?: Array | undefined, 'accountNumber.specified'?: boolean | undefined, 'accountOwners.contains'?: string | undefined, 'accountOwners.doesNotContain'?: string | undefined, 'accountOwners.equals'?: string | undefined, 'accountOwners.in'?: Array | undefined, 'accountOwners.notEquals'?: string | undefined, 'accountOwners.notIn'?: Array | undefined, 'accountOwners.specified'?: boolean | undefined, 'accountStatus.contains'?: string | undefined, 'accountStatus.doesNotContain'?: string | undefined, 'accountStatus.equals'?: string | undefined, 'accountStatus.in'?: Array | undefined, 'accountStatus.notEquals'?: string | undefined, 'accountStatus.notIn'?: Array | undefined, 'accountStatus.specified'?: boolean | undefined, 'bankName.contains'?: string | undefined, 'bankName.doesNotContain'?: string | undefined, 'bankName.equals'?: string | undefined, 'bankName.in'?: Array | undefined, 'bankName.notEquals'?: string | undefined, 'bankName.notIn'?: Array | undefined, 'bankName.specified'?: boolean | undefined, 'iban.contains'?: string | undefined, 'iban.doesNotContain'?: string | undefined, 'iban.equals'?: string | undefined, 'iban.in'?: Array | undefined, 'iban.notEquals'?: string | undefined, 'iban.notIn'?: Array | undefined, 'iban.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, page?: number | undefined, size?: number | undefined, sort?: Array | undefined, 'trackId.contains'?: string | undefined, 'trackId.doesNotContain'?: string | undefined, 'trackId.equals'?: string | undefined, 'trackId.in'?: Array | undefined, 'trackId.notEquals'?: string | undefined, 'trackId.notIn'?: Array | undefined, 'trackId.specified'?: boolean | undefined}; export type GetApiApiShebaCachesOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * getAllShebaCaches * * GET /api/sheba-caches */ export const getApiApiShebaCaches = async (args: GetApiApiShebaCachesArgs, options: GetApiApiShebaCachesOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args['accountComment.contains'] != null) query.append("accountComment.contains", String(args['accountComment.contains'])) if (args['accountComment.doesNotContain'] != null) query.append("accountComment.doesNotContain", String(args['accountComment.doesNotContain'])) if (args['accountComment.equals'] != null) query.append("accountComment.equals", String(args['accountComment.equals'])) for (const item of args['accountComment.in'] ?? []) query.append("accountComment.in", String(item)) if (args['accountComment.notEquals'] != null) query.append("accountComment.notEquals", String(args['accountComment.notEquals'])) for (const item of args['accountComment.notIn'] ?? []) query.append("accountComment.notIn", String(item)) if (args['accountComment.specified'] != null) query.append("accountComment.specified", String(args['accountComment.specified'])) if (args['accountDescription.contains'] != null) query.append("accountDescription.contains", String(args['accountDescription.contains'])) if (args['accountDescription.doesNotContain'] != null) query.append("accountDescription.doesNotContain", String(args['accountDescription.doesNotContain'])) if (args['accountDescription.equals'] != null) query.append("accountDescription.equals", String(args['accountDescription.equals'])) for (const item of args['accountDescription.in'] ?? []) query.append("accountDescription.in", String(item)) if (args['accountDescription.notEquals'] != null) query.append("accountDescription.notEquals", String(args['accountDescription.notEquals'])) for (const item of args['accountDescription.notIn'] ?? []) query.append("accountDescription.notIn", String(item)) if (args['accountDescription.specified'] != null) query.append("accountDescription.specified", String(args['accountDescription.specified'])) if (args['accountNumber.contains'] != null) query.append("accountNumber.contains", String(args['accountNumber.contains'])) if (args['accountNumber.doesNotContain'] != null) query.append("accountNumber.doesNotContain", String(args['accountNumber.doesNotContain'])) if (args['accountNumber.equals'] != null) query.append("accountNumber.equals", String(args['accountNumber.equals'])) for (const item of args['accountNumber.in'] ?? []) query.append("accountNumber.in", String(item)) if (args['accountNumber.notEquals'] != null) query.append("accountNumber.notEquals", String(args['accountNumber.notEquals'])) for (const item of args['accountNumber.notIn'] ?? []) query.append("accountNumber.notIn", String(item)) if (args['accountNumber.specified'] != null) query.append("accountNumber.specified", String(args['accountNumber.specified'])) if (args['accountOwners.contains'] != null) query.append("accountOwners.contains", String(args['accountOwners.contains'])) if (args['accountOwners.doesNotContain'] != null) query.append("accountOwners.doesNotContain", String(args['accountOwners.doesNotContain'])) if (args['accountOwners.equals'] != null) query.append("accountOwners.equals", String(args['accountOwners.equals'])) for (const item of args['accountOwners.in'] ?? []) query.append("accountOwners.in", String(item)) if (args['accountOwners.notEquals'] != null) query.append("accountOwners.notEquals", String(args['accountOwners.notEquals'])) for (const item of args['accountOwners.notIn'] ?? []) query.append("accountOwners.notIn", String(item)) if (args['accountOwners.specified'] != null) query.append("accountOwners.specified", String(args['accountOwners.specified'])) if (args['accountStatus.contains'] != null) query.append("accountStatus.contains", String(args['accountStatus.contains'])) if (args['accountStatus.doesNotContain'] != null) query.append("accountStatus.doesNotContain", String(args['accountStatus.doesNotContain'])) if (args['accountStatus.equals'] != null) query.append("accountStatus.equals", String(args['accountStatus.equals'])) for (const item of args['accountStatus.in'] ?? []) query.append("accountStatus.in", String(item)) if (args['accountStatus.notEquals'] != null) query.append("accountStatus.notEquals", String(args['accountStatus.notEquals'])) for (const item of args['accountStatus.notIn'] ?? []) query.append("accountStatus.notIn", String(item)) if (args['accountStatus.specified'] != null) query.append("accountStatus.specified", String(args['accountStatus.specified'])) if (args['bankName.contains'] != null) query.append("bankName.contains", String(args['bankName.contains'])) if (args['bankName.doesNotContain'] != null) query.append("bankName.doesNotContain", String(args['bankName.doesNotContain'])) if (args['bankName.equals'] != null) query.append("bankName.equals", String(args['bankName.equals'])) for (const item of args['bankName.in'] ?? []) query.append("bankName.in", String(item)) if (args['bankName.notEquals'] != null) query.append("bankName.notEquals", String(args['bankName.notEquals'])) for (const item of args['bankName.notIn'] ?? []) query.append("bankName.notIn", String(item)) if (args['bankName.specified'] != null) query.append("bankName.specified", String(args['bankName.specified'])) if (args['iban.contains'] != null) query.append("iban.contains", String(args['iban.contains'])) if (args['iban.doesNotContain'] != null) query.append("iban.doesNotContain", String(args['iban.doesNotContain'])) if (args['iban.equals'] != null) query.append("iban.equals", String(args['iban.equals'])) for (const item of args['iban.in'] ?? []) query.append("iban.in", String(item)) if (args['iban.notEquals'] != null) query.append("iban.notEquals", String(args['iban.notEquals'])) for (const item of args['iban.notIn'] ?? []) query.append("iban.notIn", String(item)) if (args['iban.specified'] != null) query.append("iban.specified", String(args['iban.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.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['trackId.contains'] != null) query.append("trackId.contains", String(args['trackId.contains'])) if (args['trackId.doesNotContain'] != null) query.append("trackId.doesNotContain", String(args['trackId.doesNotContain'])) if (args['trackId.equals'] != null) query.append("trackId.equals", String(args['trackId.equals'])) for (const item of args['trackId.in'] ?? []) query.append("trackId.in", String(item)) if (args['trackId.notEquals'] != null) query.append("trackId.notEquals", String(args['trackId.notEquals'])) for (const item of args['trackId.notIn'] ?? []) query.append("trackId.notIn", String(item)) if (args['trackId.specified'] != null) query.append("trackId.specified", String(args['trackId.specified'])) const url = `${baseUrl.replace(/\/+$/, '')}/api/sheba-caches${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() };