/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import type { Observable } from 'rxjs';
import type { AdminBasket } from '../models/AdminBasket';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
@Injectable({
    providedIn: 'root',
})
export class AdminService {
    constructor(public readonly http: HttpClient) {}
    /**
     * Get Baskets
     * @returns any Successful Response
     * @throws ApiError
     */
    public getBasketsApiAdminBasketGet(): Observable<any> {
        return __request(OpenAPI, this.http, {
            method: 'GET',
            url: '/api/admin/basket',
            errors: {
                404: `Not found`,
            },
        });
    }
    /**
     * Get Basket
     * @returns AdminBasket Successful Response
     * @throws ApiError
     */
    public getBasketApiAdminBasketNameGet({
        name,
    }: {
        name: string,
    }): Observable<AdminBasket> {
        return __request(OpenAPI, this.http, {
            method: 'GET',
            url: '/api/admin/basket/{name}',
            path: {
                'name': name,
            },
            errors: {
                404: `Not found`,
                422: `Validation Error`,
            },
        });
    }
}
