Function createHeseyaApiService

  • Factory to create whole Heseya e-commerce API service

    Why not use the default axios instance? Because, user may want to extend axios instance with some middlewares/interceptors (ex. for user token refreshment)

    What axios instance should have to this to work:

    • Base URL
    • Authentication header

    Example

    heseya.Products.get() // Return all products
    

    Parameters

    • axios: AxiosInstance

    Returns {
        Analytics: AnalyticsService;
        Apps: AppsService;
        Attributes: AttributesService;
        Auth: AuthService;
        Banners: BannersService;
        Consents: ConsentsService;
        Coupons: CouponsService;
        Currencies: CurrenciesService;
        Emails: EmailService;
        GlobalSeo: GlobalSeoService;
        Languages: LanguagesService;
        Media: MediaService;
        OrderStatuses: OrderStatusesService;
        Orders: OrdersService;
        Pages: PagesService;
        PaymentMethods: PaymentMethodsService;
        Payments: PaymentsService;
        Prices: PricesService;
        ProductSets: ProductSetsService;
        Products: ProductsService;
        Redirects: RedirectsService;
        Roles: RolesService;
        Sales: SalesService;
        SalesChannels: SalesChannelsService;
        Schemas: SchemasService;
        Settings: SettingsService;
        ShippingMethods: ShippingMethodsService;
        Tags: TagsService;
        UserProfile: UserProfileService;
        Users: UsersService;
        Warehouse: WarehouseService;
        Webhooks: WebhooksService;
        Wishlist: WishlistService;
    }

    • Analytics: AnalyticsService
    • Apps: AppsService
    • Attributes: AttributesService
    • Auth: AuthService
    • Banners: BannersService
    • Consents: ConsentsService
    • Coupons: CouponsService
    • Currencies: CurrenciesService
    • Emails: EmailService
    • GlobalSeo: GlobalSeoService
    • Languages: LanguagesService
    • Media: MediaService
    • OrderStatuses: OrderStatusesService
    • Orders: OrdersService
    • Pages: PagesService
    • PaymentMethods: PaymentMethodsService
    • Payments: PaymentsService
    • Prices: PricesService
    • ProductSets: ProductSetsService
    • Products: ProductsService
    • Redirects: RedirectsService
    • Roles: RolesService
    • Sales: SalesService
    • SalesChannels: SalesChannelsService
    • Schemas: SchemasService
    • Settings: SettingsService
    • ShippingMethods: ShippingMethodsService
    • Tags: TagsService
    • UserProfile: UserProfileService
    • Users: UsersService
    • Warehouse: WarehouseService
    • Webhooks: WebhooksService
    • Wishlist: WishlistService

Generated using TypeDoc