@horpynka/api-sdk 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -332,6 +332,12 @@ interface Ingredient {
332
332
  * @memberof Ingredient
333
333
  */
334
334
  'id': number;
335
+ /**
336
+ *
337
+ * @type {string}
338
+ * @memberof Ingredient
339
+ */
340
+ 'name': string;
335
341
  /**
336
342
  *
337
343
  * @type {string}
@@ -690,6 +696,52 @@ declare class AuthApi extends BaseAPI {
690
696
  */
691
697
  signUp(signUpUserDTO: SignUpUserDTO, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>>;
692
698
  }
699
+ /**
700
+ * CategoriesApi - object-oriented interface
701
+ * @export
702
+ * @class CategoriesApi
703
+ * @extends {BaseAPI}
704
+ */
705
+ declare class CategoriesApi extends BaseAPI {
706
+ /**
707
+ *
708
+ * @param {*} [options] Override http request option.
709
+ * @throws {RequiredError}
710
+ * @memberof CategoriesApi
711
+ */
712
+ findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<object, any, {}, any>>;
713
+ /**
714
+ *
715
+ * @param {number} id
716
+ * @param {*} [options] Override http request option.
717
+ * @throws {RequiredError}
718
+ * @memberof CategoriesApi
719
+ */
720
+ findOne(id: number, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Category, any, {}, any>>;
721
+ }
722
+ /**
723
+ * DishesApi - object-oriented interface
724
+ * @export
725
+ * @class DishesApi
726
+ * @extends {BaseAPI}
727
+ */
728
+ declare class DishesApi extends BaseAPI {
729
+ /**
730
+ *
731
+ * @param {*} [options] Override http request option.
732
+ * @throws {RequiredError}
733
+ * @memberof DishesApi
734
+ */
735
+ findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Dish[], any, {}, any>>;
736
+ /**
737
+ *
738
+ * @param {number} id
739
+ * @param {*} [options] Override http request option.
740
+ * @throws {RequiredError}
741
+ * @memberof DishesApi
742
+ */
743
+ findOne(id: number, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Dish, any, {}, any>>;
744
+ }
693
745
  /**
694
746
  * OrdersApi - object-oriented interface
695
747
  * @export
@@ -741,19 +793,72 @@ declare class OrdersApi extends BaseAPI {
741
793
  */
742
794
  update(id: number, updateOrderDto: UpdateOrderDto, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Order, any, {}, any>>;
743
795
  }
796
+ /**
797
+ * ProductsApi - object-oriented interface
798
+ * @export
799
+ * @class ProductsApi
800
+ * @extends {BaseAPI}
801
+ */
802
+ declare class ProductsApi extends BaseAPI {
803
+ /**
804
+ *
805
+ * @param {*} [options] Override http request option.
806
+ * @throws {RequiredError}
807
+ * @memberof ProductsApi
808
+ */
809
+ findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Product[], any, {}, any>>;
810
+ /**
811
+ *
812
+ * @param {number} id
813
+ * @param {*} [options] Override http request option.
814
+ * @throws {RequiredError}
815
+ * @memberof ProductsApi
816
+ */
817
+ findOne(id: number, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Product, any, {}, any>>;
818
+ }
744
819
 
745
820
  declare let tanstackClient: QueryClient;
746
- declare let ordersApi: OrdersApi;
747
821
  declare let authApi: AuthApi;
822
+ declare let categoriesApi: CategoriesApi;
823
+ declare let dishesApi: DishesApi;
824
+ declare let ordersApi: OrdersApi;
825
+ declare let productsApi: ProductsApi;
748
826
  declare function initApiClient(config: CreateAxiosDefaults): AxiosInstance;
749
827
 
750
- declare const useOrdersApi: () => {
751
- mutateDeleteReceipt: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
828
+ declare const useAuthApi: () => {
829
+ mutateRefresh: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<void, any, {}, any>, Error, {
830
+ onSettledCallback?: () => void;
831
+ }, unknown>;
832
+ mutateSignIn: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>, Error, {
752
833
  params: {
753
- id: number;
834
+ signInUserDTO: SignInUserDTO;
754
835
  };
755
836
  onSettledCallback?: () => void;
756
837
  }, unknown>;
838
+ mutateSignUp: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>, Error, {
839
+ params: {
840
+ signUpUserDTO: SignUpUserDTO;
841
+ };
842
+ onSettledCallback?: () => void;
843
+ }, unknown>;
844
+ };
845
+
846
+ declare const useCategoriesApi: () => {
847
+ getCategoriesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<object, Error, object, string[]>, "queryFn"> & {
848
+ queryFn?: _tanstack_query_core.QueryFunction<object, string[], never> | undefined;
849
+ } & _tanstack_query_core.QueryKeyWithDataTag<string[], object, Error>;
850
+ };
851
+
852
+ declare const useDishesApi: () => {
853
+ getDishesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Dish[], Error, Dish[], string[]>, "queryFn"> & {
854
+ queryFn?: _tanstack_query_core.QueryFunction<Dish[], string[], never> | undefined;
855
+ } & _tanstack_query_core.QueryKeyWithDataTag<string[], Dish[], Error>;
856
+ getDishQuery: (id: number) => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Dish, Error, Dish, (string | number)[]>, "queryFn"> & {
857
+ queryFn?: _tanstack_query_core.QueryFunction<Dish, (string | number)[], never> | undefined;
858
+ } & _tanstack_query_core.QueryKeyWithDataTag<(string | number)[], Dish, Error>;
859
+ };
860
+
861
+ declare const useOrdersApi: () => {
757
862
  getOrdersQuery: (params?: {
758
863
  page?: number;
759
864
  limit?: number;
@@ -773,6 +878,34 @@ declare const useOrdersApi: () => {
773
878
  limit?: number;
774
879
  status?: string;
775
880
  } | undefined)[], Order[], Error>;
881
+ getOrderQuery: (id: number) => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Order, Error, Order, (string | number)[]>, "queryFn"> & {
882
+ queryFn?: _tanstack_query_core.QueryFunction<Order, (string | number)[], never> | undefined;
883
+ } & _tanstack_query_core.QueryKeyWithDataTag<(string | number)[], Order, Error>;
884
+ mutateCreateOrder: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
885
+ params: {
886
+ createOrderDto: CreateOrderDto;
887
+ };
888
+ onSettledCallback?: () => void;
889
+ }, unknown>;
890
+ mutateUpdateOrder: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
891
+ params: {
892
+ id: number;
893
+ updateOrderDto: UpdateOrderDto;
894
+ };
895
+ onSettledCallback?: () => void;
896
+ }, unknown>;
897
+ mutateDeleteReceipt: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
898
+ params: {
899
+ id: number;
900
+ };
901
+ onSettledCallback?: () => void;
902
+ }, unknown>;
903
+ };
904
+
905
+ declare const useProductsApi: () => {
906
+ getProductsQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Product[], Error, Product[], string[]>, "queryFn"> & {
907
+ queryFn?: _tanstack_query_core.QueryFunction<Product[], string[], never> | undefined;
908
+ } & _tanstack_query_core.QueryKeyWithDataTag<string[], Product[], Error>;
776
909
  };
777
910
 
778
- export { authApi, initApiClient, ordersApi, tanstackClient, useOrdersApi };
911
+ export { authApi, categoriesApi, dishesApi, initApiClient, ordersApi, productsApi, tanstackClient, useAuthApi, useCategoriesApi, useDishesApi, useOrdersApi, useProductsApi };
package/dist/index.d.ts CHANGED
@@ -332,6 +332,12 @@ interface Ingredient {
332
332
  * @memberof Ingredient
333
333
  */
334
334
  'id': number;
335
+ /**
336
+ *
337
+ * @type {string}
338
+ * @memberof Ingredient
339
+ */
340
+ 'name': string;
335
341
  /**
336
342
  *
337
343
  * @type {string}
@@ -690,6 +696,52 @@ declare class AuthApi extends BaseAPI {
690
696
  */
691
697
  signUp(signUpUserDTO: SignUpUserDTO, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>>;
692
698
  }
699
+ /**
700
+ * CategoriesApi - object-oriented interface
701
+ * @export
702
+ * @class CategoriesApi
703
+ * @extends {BaseAPI}
704
+ */
705
+ declare class CategoriesApi extends BaseAPI {
706
+ /**
707
+ *
708
+ * @param {*} [options] Override http request option.
709
+ * @throws {RequiredError}
710
+ * @memberof CategoriesApi
711
+ */
712
+ findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<object, any, {}, any>>;
713
+ /**
714
+ *
715
+ * @param {number} id
716
+ * @param {*} [options] Override http request option.
717
+ * @throws {RequiredError}
718
+ * @memberof CategoriesApi
719
+ */
720
+ findOne(id: number, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Category, any, {}, any>>;
721
+ }
722
+ /**
723
+ * DishesApi - object-oriented interface
724
+ * @export
725
+ * @class DishesApi
726
+ * @extends {BaseAPI}
727
+ */
728
+ declare class DishesApi extends BaseAPI {
729
+ /**
730
+ *
731
+ * @param {*} [options] Override http request option.
732
+ * @throws {RequiredError}
733
+ * @memberof DishesApi
734
+ */
735
+ findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Dish[], any, {}, any>>;
736
+ /**
737
+ *
738
+ * @param {number} id
739
+ * @param {*} [options] Override http request option.
740
+ * @throws {RequiredError}
741
+ * @memberof DishesApi
742
+ */
743
+ findOne(id: number, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Dish, any, {}, any>>;
744
+ }
693
745
  /**
694
746
  * OrdersApi - object-oriented interface
695
747
  * @export
@@ -741,19 +793,72 @@ declare class OrdersApi extends BaseAPI {
741
793
  */
742
794
  update(id: number, updateOrderDto: UpdateOrderDto, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Order, any, {}, any>>;
743
795
  }
796
+ /**
797
+ * ProductsApi - object-oriented interface
798
+ * @export
799
+ * @class ProductsApi
800
+ * @extends {BaseAPI}
801
+ */
802
+ declare class ProductsApi extends BaseAPI {
803
+ /**
804
+ *
805
+ * @param {*} [options] Override http request option.
806
+ * @throws {RequiredError}
807
+ * @memberof ProductsApi
808
+ */
809
+ findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Product[], any, {}, any>>;
810
+ /**
811
+ *
812
+ * @param {number} id
813
+ * @param {*} [options] Override http request option.
814
+ * @throws {RequiredError}
815
+ * @memberof ProductsApi
816
+ */
817
+ findOne(id: number, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Product, any, {}, any>>;
818
+ }
744
819
 
745
820
  declare let tanstackClient: QueryClient;
746
- declare let ordersApi: OrdersApi;
747
821
  declare let authApi: AuthApi;
822
+ declare let categoriesApi: CategoriesApi;
823
+ declare let dishesApi: DishesApi;
824
+ declare let ordersApi: OrdersApi;
825
+ declare let productsApi: ProductsApi;
748
826
  declare function initApiClient(config: CreateAxiosDefaults): AxiosInstance;
749
827
 
750
- declare const useOrdersApi: () => {
751
- mutateDeleteReceipt: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
828
+ declare const useAuthApi: () => {
829
+ mutateRefresh: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<void, any, {}, any>, Error, {
830
+ onSettledCallback?: () => void;
831
+ }, unknown>;
832
+ mutateSignIn: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>, Error, {
752
833
  params: {
753
- id: number;
834
+ signInUserDTO: SignInUserDTO;
754
835
  };
755
836
  onSettledCallback?: () => void;
756
837
  }, unknown>;
838
+ mutateSignUp: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>, Error, {
839
+ params: {
840
+ signUpUserDTO: SignUpUserDTO;
841
+ };
842
+ onSettledCallback?: () => void;
843
+ }, unknown>;
844
+ };
845
+
846
+ declare const useCategoriesApi: () => {
847
+ getCategoriesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<object, Error, object, string[]>, "queryFn"> & {
848
+ queryFn?: _tanstack_query_core.QueryFunction<object, string[], never> | undefined;
849
+ } & _tanstack_query_core.QueryKeyWithDataTag<string[], object, Error>;
850
+ };
851
+
852
+ declare const useDishesApi: () => {
853
+ getDishesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Dish[], Error, Dish[], string[]>, "queryFn"> & {
854
+ queryFn?: _tanstack_query_core.QueryFunction<Dish[], string[], never> | undefined;
855
+ } & _tanstack_query_core.QueryKeyWithDataTag<string[], Dish[], Error>;
856
+ getDishQuery: (id: number) => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Dish, Error, Dish, (string | number)[]>, "queryFn"> & {
857
+ queryFn?: _tanstack_query_core.QueryFunction<Dish, (string | number)[], never> | undefined;
858
+ } & _tanstack_query_core.QueryKeyWithDataTag<(string | number)[], Dish, Error>;
859
+ };
860
+
861
+ declare const useOrdersApi: () => {
757
862
  getOrdersQuery: (params?: {
758
863
  page?: number;
759
864
  limit?: number;
@@ -773,6 +878,34 @@ declare const useOrdersApi: () => {
773
878
  limit?: number;
774
879
  status?: string;
775
880
  } | undefined)[], Order[], Error>;
881
+ getOrderQuery: (id: number) => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Order, Error, Order, (string | number)[]>, "queryFn"> & {
882
+ queryFn?: _tanstack_query_core.QueryFunction<Order, (string | number)[], never> | undefined;
883
+ } & _tanstack_query_core.QueryKeyWithDataTag<(string | number)[], Order, Error>;
884
+ mutateCreateOrder: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
885
+ params: {
886
+ createOrderDto: CreateOrderDto;
887
+ };
888
+ onSettledCallback?: () => void;
889
+ }, unknown>;
890
+ mutateUpdateOrder: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
891
+ params: {
892
+ id: number;
893
+ updateOrderDto: UpdateOrderDto;
894
+ };
895
+ onSettledCallback?: () => void;
896
+ }, unknown>;
897
+ mutateDeleteReceipt: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
898
+ params: {
899
+ id: number;
900
+ };
901
+ onSettledCallback?: () => void;
902
+ }, unknown>;
903
+ };
904
+
905
+ declare const useProductsApi: () => {
906
+ getProductsQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Product[], Error, Product[], string[]>, "queryFn"> & {
907
+ queryFn?: _tanstack_query_core.QueryFunction<Product[], string[], never> | undefined;
908
+ } & _tanstack_query_core.QueryKeyWithDataTag<string[], Product[], Error>;
776
909
  };
777
910
 
778
- export { authApi, initApiClient, ordersApi, tanstackClient, useOrdersApi };
911
+ export { authApi, categoriesApi, dishesApi, initApiClient, ordersApi, productsApi, tanstackClient, useAuthApi, useCategoriesApi, useDishesApi, useOrdersApi, useProductsApi };