@horpynka/api-sdk 1.0.9 → 1.0.11
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.cjs +348 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +136 -5
- package/dist/index.d.ts +136 -5
- package/dist/index.js +345 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -549,6 +549,19 @@ interface Product {
|
|
|
549
549
|
*/
|
|
550
550
|
'updatedAt': string;
|
|
551
551
|
}
|
|
552
|
+
/**
|
|
553
|
+
*
|
|
554
|
+
* @export
|
|
555
|
+
* @interface SessionResponseDto
|
|
556
|
+
*/
|
|
557
|
+
interface SessionResponseDto {
|
|
558
|
+
/**
|
|
559
|
+
*
|
|
560
|
+
* @type {string}
|
|
561
|
+
* @memberof SessionResponseDto
|
|
562
|
+
*/
|
|
563
|
+
'email': string;
|
|
564
|
+
}
|
|
552
565
|
/**
|
|
553
566
|
*
|
|
554
567
|
* @export
|
|
@@ -646,6 +659,13 @@ type UpdateOrderDtoStatusEnum = typeof UpdateOrderDtoStatusEnum[keyof typeof Upd
|
|
|
646
659
|
* @extends {BaseAPI}
|
|
647
660
|
*/
|
|
648
661
|
declare class AuthApi extends BaseAPI {
|
|
662
|
+
/**
|
|
663
|
+
*
|
|
664
|
+
* @param {*} [options] Override http request option.
|
|
665
|
+
* @throws {RequiredError}
|
|
666
|
+
* @memberof AuthApi
|
|
667
|
+
*/
|
|
668
|
+
getSession(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<SessionResponseDto, any, {}, any>>;
|
|
649
669
|
/**
|
|
650
670
|
*
|
|
651
671
|
* @param {*} [options] Override http request option.
|
|
@@ -670,6 +690,44 @@ declare class AuthApi extends BaseAPI {
|
|
|
670
690
|
*/
|
|
671
691
|
signUp(signUpUserDTO: SignUpUserDTO, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>>;
|
|
672
692
|
}
|
|
693
|
+
/**
|
|
694
|
+
* CategoriesApi - object-oriented interface
|
|
695
|
+
* @export
|
|
696
|
+
* @class CategoriesApi
|
|
697
|
+
* @extends {BaseAPI}
|
|
698
|
+
*/
|
|
699
|
+
declare class CategoriesApi extends BaseAPI {
|
|
700
|
+
/**
|
|
701
|
+
*
|
|
702
|
+
* @param {*} [options] Override http request option.
|
|
703
|
+
* @throws {RequiredError}
|
|
704
|
+
* @memberof CategoriesApi
|
|
705
|
+
*/
|
|
706
|
+
findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<object, any, {}, any>>;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* DishesApi - object-oriented interface
|
|
710
|
+
* @export
|
|
711
|
+
* @class DishesApi
|
|
712
|
+
* @extends {BaseAPI}
|
|
713
|
+
*/
|
|
714
|
+
declare class DishesApi extends BaseAPI {
|
|
715
|
+
/**
|
|
716
|
+
*
|
|
717
|
+
* @param {*} [options] Override http request option.
|
|
718
|
+
* @throws {RequiredError}
|
|
719
|
+
* @memberof DishesApi
|
|
720
|
+
*/
|
|
721
|
+
findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Dish[], any, {}, any>>;
|
|
722
|
+
/**
|
|
723
|
+
*
|
|
724
|
+
* @param {number} id
|
|
725
|
+
* @param {*} [options] Override http request option.
|
|
726
|
+
* @throws {RequiredError}
|
|
727
|
+
* @memberof DishesApi
|
|
728
|
+
*/
|
|
729
|
+
findOne(id: number, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Dish, any, {}, any>>;
|
|
730
|
+
}
|
|
673
731
|
/**
|
|
674
732
|
* OrdersApi - object-oriented interface
|
|
675
733
|
* @export
|
|
@@ -721,19 +779,64 @@ declare class OrdersApi extends BaseAPI {
|
|
|
721
779
|
*/
|
|
722
780
|
update(id: number, updateOrderDto: UpdateOrderDto, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Order, any, {}, any>>;
|
|
723
781
|
}
|
|
782
|
+
/**
|
|
783
|
+
* ProductsApi - object-oriented interface
|
|
784
|
+
* @export
|
|
785
|
+
* @class ProductsApi
|
|
786
|
+
* @extends {BaseAPI}
|
|
787
|
+
*/
|
|
788
|
+
declare class ProductsApi extends BaseAPI {
|
|
789
|
+
/**
|
|
790
|
+
*
|
|
791
|
+
* @param {*} [options] Override http request option.
|
|
792
|
+
* @throws {RequiredError}
|
|
793
|
+
* @memberof ProductsApi
|
|
794
|
+
*/
|
|
795
|
+
findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Product[], any, {}, any>>;
|
|
796
|
+
}
|
|
724
797
|
|
|
725
798
|
declare let tanstackClient: QueryClient;
|
|
726
|
-
declare let ordersApi: OrdersApi;
|
|
727
799
|
declare let authApi: AuthApi;
|
|
800
|
+
declare let categoriesApi: CategoriesApi;
|
|
801
|
+
declare let dishesApi: DishesApi;
|
|
802
|
+
declare let ordersApi: OrdersApi;
|
|
803
|
+
declare let productsApi: ProductsApi;
|
|
728
804
|
declare function initApiClient(config: CreateAxiosDefaults): AxiosInstance;
|
|
729
805
|
|
|
730
|
-
declare const
|
|
731
|
-
|
|
806
|
+
declare const useAuthApi: () => {
|
|
807
|
+
mutateRefresh: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<void, any, {}, any>, Error, {
|
|
808
|
+
onSettledCallback?: () => void;
|
|
809
|
+
}, unknown>;
|
|
810
|
+
mutateSignIn: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>, Error, {
|
|
732
811
|
params: {
|
|
733
|
-
|
|
812
|
+
signInUserDTO: SignInUserDTO;
|
|
734
813
|
};
|
|
735
814
|
onSettledCallback?: () => void;
|
|
736
815
|
}, unknown>;
|
|
816
|
+
mutateSignUp: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>, Error, {
|
|
817
|
+
params: {
|
|
818
|
+
signUpUserDTO: SignUpUserDTO;
|
|
819
|
+
};
|
|
820
|
+
onSettledCallback?: () => void;
|
|
821
|
+
}, unknown>;
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
declare const useCategoriesApi: () => {
|
|
825
|
+
getCategoriesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<object, Error, object, string[]>, "queryFn"> & {
|
|
826
|
+
queryFn?: _tanstack_query_core.QueryFunction<object, string[], never> | undefined;
|
|
827
|
+
} & _tanstack_query_core.QueryKeyWithDataTag<string[], object, Error>;
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
declare const useDishesApi: () => {
|
|
831
|
+
getDishesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Dish[], Error, Dish[], string[]>, "queryFn"> & {
|
|
832
|
+
queryFn?: _tanstack_query_core.QueryFunction<Dish[], string[], never> | undefined;
|
|
833
|
+
} & _tanstack_query_core.QueryKeyWithDataTag<string[], Dish[], Error>;
|
|
834
|
+
getDishQuery: (id: number) => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Dish, Error, Dish, (string | number)[]>, "queryFn"> & {
|
|
835
|
+
queryFn?: _tanstack_query_core.QueryFunction<Dish, (string | number)[], never> | undefined;
|
|
836
|
+
} & _tanstack_query_core.QueryKeyWithDataTag<(string | number)[], Dish, Error>;
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
declare const useOrdersApi: () => {
|
|
737
840
|
getOrdersQuery: (params?: {
|
|
738
841
|
page?: number;
|
|
739
842
|
limit?: number;
|
|
@@ -753,6 +856,34 @@ declare const useOrdersApi: () => {
|
|
|
753
856
|
limit?: number;
|
|
754
857
|
status?: string;
|
|
755
858
|
} | undefined)[], Order[], Error>;
|
|
859
|
+
getOrderQuery: (id: number) => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Order, Error, Order, (string | number)[]>, "queryFn"> & {
|
|
860
|
+
queryFn?: _tanstack_query_core.QueryFunction<Order, (string | number)[], never> | undefined;
|
|
861
|
+
} & _tanstack_query_core.QueryKeyWithDataTag<(string | number)[], Order, Error>;
|
|
862
|
+
mutateCreateOrder: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
|
|
863
|
+
params: {
|
|
864
|
+
createOrderDto: CreateOrderDto;
|
|
865
|
+
};
|
|
866
|
+
onSettledCallback?: () => void;
|
|
867
|
+
}, unknown>;
|
|
868
|
+
mutateUpdateOrder: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
|
|
869
|
+
params: {
|
|
870
|
+
id: number;
|
|
871
|
+
updateOrderDto: UpdateOrderDto;
|
|
872
|
+
};
|
|
873
|
+
onSettledCallback?: () => void;
|
|
874
|
+
}, unknown>;
|
|
875
|
+
mutateDeleteReceipt: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
|
|
876
|
+
params: {
|
|
877
|
+
id: number;
|
|
878
|
+
};
|
|
879
|
+
onSettledCallback?: () => void;
|
|
880
|
+
}, unknown>;
|
|
881
|
+
};
|
|
882
|
+
|
|
883
|
+
declare const useProductsApi: () => {
|
|
884
|
+
getProductsQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Product[], Error, Product[], string[]>, "queryFn"> & {
|
|
885
|
+
queryFn?: _tanstack_query_core.QueryFunction<Product[], string[], never> | undefined;
|
|
886
|
+
} & _tanstack_query_core.QueryKeyWithDataTag<string[], Product[], Error>;
|
|
756
887
|
};
|
|
757
888
|
|
|
758
|
-
export { authApi, initApiClient, ordersApi, tanstackClient, useOrdersApi };
|
|
889
|
+
export { authApi, categoriesApi, dishesApi, initApiClient, ordersApi, productsApi, tanstackClient, useAuthApi, useCategoriesApi, useDishesApi, useOrdersApi, useProductsApi };
|
package/dist/index.d.ts
CHANGED
|
@@ -549,6 +549,19 @@ interface Product {
|
|
|
549
549
|
*/
|
|
550
550
|
'updatedAt': string;
|
|
551
551
|
}
|
|
552
|
+
/**
|
|
553
|
+
*
|
|
554
|
+
* @export
|
|
555
|
+
* @interface SessionResponseDto
|
|
556
|
+
*/
|
|
557
|
+
interface SessionResponseDto {
|
|
558
|
+
/**
|
|
559
|
+
*
|
|
560
|
+
* @type {string}
|
|
561
|
+
* @memberof SessionResponseDto
|
|
562
|
+
*/
|
|
563
|
+
'email': string;
|
|
564
|
+
}
|
|
552
565
|
/**
|
|
553
566
|
*
|
|
554
567
|
* @export
|
|
@@ -646,6 +659,13 @@ type UpdateOrderDtoStatusEnum = typeof UpdateOrderDtoStatusEnum[keyof typeof Upd
|
|
|
646
659
|
* @extends {BaseAPI}
|
|
647
660
|
*/
|
|
648
661
|
declare class AuthApi extends BaseAPI {
|
|
662
|
+
/**
|
|
663
|
+
*
|
|
664
|
+
* @param {*} [options] Override http request option.
|
|
665
|
+
* @throws {RequiredError}
|
|
666
|
+
* @memberof AuthApi
|
|
667
|
+
*/
|
|
668
|
+
getSession(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<SessionResponseDto, any, {}, any>>;
|
|
649
669
|
/**
|
|
650
670
|
*
|
|
651
671
|
* @param {*} [options] Override http request option.
|
|
@@ -670,6 +690,44 @@ declare class AuthApi extends BaseAPI {
|
|
|
670
690
|
*/
|
|
671
691
|
signUp(signUpUserDTO: SignUpUserDTO, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>>;
|
|
672
692
|
}
|
|
693
|
+
/**
|
|
694
|
+
* CategoriesApi - object-oriented interface
|
|
695
|
+
* @export
|
|
696
|
+
* @class CategoriesApi
|
|
697
|
+
* @extends {BaseAPI}
|
|
698
|
+
*/
|
|
699
|
+
declare class CategoriesApi extends BaseAPI {
|
|
700
|
+
/**
|
|
701
|
+
*
|
|
702
|
+
* @param {*} [options] Override http request option.
|
|
703
|
+
* @throws {RequiredError}
|
|
704
|
+
* @memberof CategoriesApi
|
|
705
|
+
*/
|
|
706
|
+
findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<object, any, {}, any>>;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* DishesApi - object-oriented interface
|
|
710
|
+
* @export
|
|
711
|
+
* @class DishesApi
|
|
712
|
+
* @extends {BaseAPI}
|
|
713
|
+
*/
|
|
714
|
+
declare class DishesApi extends BaseAPI {
|
|
715
|
+
/**
|
|
716
|
+
*
|
|
717
|
+
* @param {*} [options] Override http request option.
|
|
718
|
+
* @throws {RequiredError}
|
|
719
|
+
* @memberof DishesApi
|
|
720
|
+
*/
|
|
721
|
+
findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Dish[], any, {}, any>>;
|
|
722
|
+
/**
|
|
723
|
+
*
|
|
724
|
+
* @param {number} id
|
|
725
|
+
* @param {*} [options] Override http request option.
|
|
726
|
+
* @throws {RequiredError}
|
|
727
|
+
* @memberof DishesApi
|
|
728
|
+
*/
|
|
729
|
+
findOne(id: number, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Dish, any, {}, any>>;
|
|
730
|
+
}
|
|
673
731
|
/**
|
|
674
732
|
* OrdersApi - object-oriented interface
|
|
675
733
|
* @export
|
|
@@ -721,19 +779,64 @@ declare class OrdersApi extends BaseAPI {
|
|
|
721
779
|
*/
|
|
722
780
|
update(id: number, updateOrderDto: UpdateOrderDto, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Order, any, {}, any>>;
|
|
723
781
|
}
|
|
782
|
+
/**
|
|
783
|
+
* ProductsApi - object-oriented interface
|
|
784
|
+
* @export
|
|
785
|
+
* @class ProductsApi
|
|
786
|
+
* @extends {BaseAPI}
|
|
787
|
+
*/
|
|
788
|
+
declare class ProductsApi extends BaseAPI {
|
|
789
|
+
/**
|
|
790
|
+
*
|
|
791
|
+
* @param {*} [options] Override http request option.
|
|
792
|
+
* @throws {RequiredError}
|
|
793
|
+
* @memberof ProductsApi
|
|
794
|
+
*/
|
|
795
|
+
findAll(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Product[], any, {}, any>>;
|
|
796
|
+
}
|
|
724
797
|
|
|
725
798
|
declare let tanstackClient: QueryClient;
|
|
726
|
-
declare let ordersApi: OrdersApi;
|
|
727
799
|
declare let authApi: AuthApi;
|
|
800
|
+
declare let categoriesApi: CategoriesApi;
|
|
801
|
+
declare let dishesApi: DishesApi;
|
|
802
|
+
declare let ordersApi: OrdersApi;
|
|
803
|
+
declare let productsApi: ProductsApi;
|
|
728
804
|
declare function initApiClient(config: CreateAxiosDefaults): AxiosInstance;
|
|
729
805
|
|
|
730
|
-
declare const
|
|
731
|
-
|
|
806
|
+
declare const useAuthApi: () => {
|
|
807
|
+
mutateRefresh: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<void, any, {}, any>, Error, {
|
|
808
|
+
onSettledCallback?: () => void;
|
|
809
|
+
}, unknown>;
|
|
810
|
+
mutateSignIn: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>, Error, {
|
|
732
811
|
params: {
|
|
733
|
-
|
|
812
|
+
signInUserDTO: SignInUserDTO;
|
|
734
813
|
};
|
|
735
814
|
onSettledCallback?: () => void;
|
|
736
815
|
}, unknown>;
|
|
816
|
+
mutateSignUp: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<AccessTokenResponseDto, any, {}, any>, Error, {
|
|
817
|
+
params: {
|
|
818
|
+
signUpUserDTO: SignUpUserDTO;
|
|
819
|
+
};
|
|
820
|
+
onSettledCallback?: () => void;
|
|
821
|
+
}, unknown>;
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
declare const useCategoriesApi: () => {
|
|
825
|
+
getCategoriesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<object, Error, object, string[]>, "queryFn"> & {
|
|
826
|
+
queryFn?: _tanstack_query_core.QueryFunction<object, string[], never> | undefined;
|
|
827
|
+
} & _tanstack_query_core.QueryKeyWithDataTag<string[], object, Error>;
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
declare const useDishesApi: () => {
|
|
831
|
+
getDishesQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Dish[], Error, Dish[], string[]>, "queryFn"> & {
|
|
832
|
+
queryFn?: _tanstack_query_core.QueryFunction<Dish[], string[], never> | undefined;
|
|
833
|
+
} & _tanstack_query_core.QueryKeyWithDataTag<string[], Dish[], Error>;
|
|
834
|
+
getDishQuery: (id: number) => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Dish, Error, Dish, (string | number)[]>, "queryFn"> & {
|
|
835
|
+
queryFn?: _tanstack_query_core.QueryFunction<Dish, (string | number)[], never> | undefined;
|
|
836
|
+
} & _tanstack_query_core.QueryKeyWithDataTag<(string | number)[], Dish, Error>;
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
declare const useOrdersApi: () => {
|
|
737
840
|
getOrdersQuery: (params?: {
|
|
738
841
|
page?: number;
|
|
739
842
|
limit?: number;
|
|
@@ -753,6 +856,34 @@ declare const useOrdersApi: () => {
|
|
|
753
856
|
limit?: number;
|
|
754
857
|
status?: string;
|
|
755
858
|
} | undefined)[], Order[], Error>;
|
|
859
|
+
getOrderQuery: (id: number) => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Order, Error, Order, (string | number)[]>, "queryFn"> & {
|
|
860
|
+
queryFn?: _tanstack_query_core.QueryFunction<Order, (string | number)[], never> | undefined;
|
|
861
|
+
} & _tanstack_query_core.QueryKeyWithDataTag<(string | number)[], Order, Error>;
|
|
862
|
+
mutateCreateOrder: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
|
|
863
|
+
params: {
|
|
864
|
+
createOrderDto: CreateOrderDto;
|
|
865
|
+
};
|
|
866
|
+
onSettledCallback?: () => void;
|
|
867
|
+
}, unknown>;
|
|
868
|
+
mutateUpdateOrder: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
|
|
869
|
+
params: {
|
|
870
|
+
id: number;
|
|
871
|
+
updateOrderDto: UpdateOrderDto;
|
|
872
|
+
};
|
|
873
|
+
onSettledCallback?: () => void;
|
|
874
|
+
}, unknown>;
|
|
875
|
+
mutateDeleteReceipt: _tanstack_react_query.UseMutationResult<axios.AxiosResponse<Order, any, {}, any>, Error, {
|
|
876
|
+
params: {
|
|
877
|
+
id: number;
|
|
878
|
+
};
|
|
879
|
+
onSettledCallback?: () => void;
|
|
880
|
+
}, unknown>;
|
|
881
|
+
};
|
|
882
|
+
|
|
883
|
+
declare const useProductsApi: () => {
|
|
884
|
+
getProductsQuery: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<Product[], Error, Product[], string[]>, "queryFn"> & {
|
|
885
|
+
queryFn?: _tanstack_query_core.QueryFunction<Product[], string[], never> | undefined;
|
|
886
|
+
} & _tanstack_query_core.QueryKeyWithDataTag<string[], Product[], Error>;
|
|
756
887
|
};
|
|
757
888
|
|
|
758
|
-
export { authApi, initApiClient, ordersApi, tanstackClient, useOrdersApi };
|
|
889
|
+
export { authApi, categoriesApi, dishesApi, initApiClient, ordersApi, productsApi, tanstackClient, useAuthApi, useCategoriesApi, useDishesApi, useOrdersApi, useProductsApi };
|