addressesApi: {
    getAll: () => Promise<AxiosResponse<any, any, {}>>;
    getById: (id: number) => Promise<AxiosResponse<any, any, {}>>;
    create: (
        data: {
            label: string;
            name: string;
            address_line1: string;
            address_line2?: string;
            postal_code: string;
            city: string;
            country?: string;
            is_default?: boolean;
        },
    ) => Promise<AxiosResponse<any, any, {}>>;
    update: (
        id: number,
        data: Partial<
            {
                label: string;
                name: string;
                address_line1: string;
                address_line2: string;
                postal_code: string;
                city: string;
                country: string;
                is_default: boolean;
            },
        >,
    ) => Promise<AxiosResponse<any, any, {}>>;
    delete: (id: number) => Promise<AxiosResponse<any, any, {}>>;
    setDefault: (id: number) => Promise<AxiosResponse<any, any, {}>>;
} = ...

Type declaration

  • getAll: () => Promise<AxiosResponse<any, any, {}>>
  • getById: (id: number) => Promise<AxiosResponse<any, any, {}>>
  • create: (
        data: {
            label: string;
            name: string;
            address_line1: string;
            address_line2?: string;
            postal_code: string;
            city: string;
            country?: string;
            is_default?: boolean;
        },
    ) => Promise<AxiosResponse<any, any, {}>>
  • update: (
        id: number,
        data: Partial<
            {
                label: string;
                name: string;
                address_line1: string;
                address_line2: string;
                postal_code: string;
                city: string;
                country: string;
                is_default: boolean;
            },
        >,
    ) => Promise<AxiosResponse<any, any, {}>>
  • delete: (id: number) => Promise<AxiosResponse<any, any, {}>>
  • setDefault: (id: number) => Promise<AxiosResponse<any, any, {}>>