Function createHeseyaApiService
create Heseya Api Service( axios: AxiosInstance ) : { 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 ; }
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
Global Seo: GlobalSeoService
Languages: LanguagesService
Media: MediaService
Order Statuses: OrderStatusesService
Orders: OrdersService
Pages: PagesService
Payment Methods: PaymentMethodsService
Payments: PaymentsService
Prices: PricesService
Product Sets: ProductSetsService
Products: ProductsService
Redirects: RedirectsService
Roles: RolesService
Sales: SalesService
Sales Channels: SalesChannelsService
Schemas: SchemasService
Settings: SettingsService
Shipping Methods: ShippingMethodsService
Tags: TagsService
User Profile: UserProfileService
Users: UsersService
Warehouse: WarehouseService
Webhooks: WebhooksService
Wishlist: WishlistService
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:
Example