@omerikanec/api-client-demo 2.0.3 → 3.0.0
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/CHANGELOG.md +17 -0
- package/dist/api.schemas.d.ts +1809 -0
- package/dist/api.schemas.js +61 -0
- package/dist/auth/auth.d.ts +79 -0
- package/dist/auth/auth.js +71 -0
- package/dist/breed/breed.d.ts +144 -0
- package/dist/breed/breed.js +148 -0
- package/dist/club-documents/club-documents.d.ts +73 -0
- package/dist/club-documents/club-documents.js +78 -0
- package/dist/club-stats/club-stats.d.ts +34 -0
- package/dist/club-stats/club-stats.js +40 -0
- package/dist/content-dictionary/content-dictionary.d.ts +116 -0
- package/dist/content-dictionary/content-dictionary.js +116 -0
- package/dist/dog-references/dog-references.d.ts +357 -0
- package/dist/dog-references/dog-references.js +358 -0
- package/dist/dogs/dogs.d.ts +348 -0
- package/dist/dogs/dogs.js +329 -0
- package/dist/event-reports/event-reports.d.ts +73 -0
- package/dist/event-reports/event-reports.js +78 -0
- package/dist/events/events.d.ts +73 -0
- package/dist/events/events.js +78 -0
- package/dist/galleries/galleries.d.ts +105 -0
- package/dist/galleries/galleries.js +117 -0
- package/dist/home/home.d.ts +34 -0
- package/dist/home/home.js +40 -0
- package/dist/import-breedarchive/import-breedarchive.d.ts +174 -0
- package/dist/import-breedarchive/import-breedarchive.js +140 -0
- package/dist/import-hybrid/import-hybrid.d.ts +131 -0
- package/dist/import-hybrid/import-hybrid.js +107 -0
- package/dist/import-hybrid-full/import-hybrid-full.d.ts +131 -0
- package/dist/import-hybrid-full/import-hybrid-full.js +107 -0
- package/dist/import-zooportal/import-zooportal.d.ts +143 -0
- package/dist/import-zooportal/import-zooportal.js +107 -0
- package/dist/{index.ts → index.d.ts} +0 -1
- package/dist/index.js +31 -0
- package/dist/judges/judges.d.ts +144 -0
- package/dist/judges/judges.js +148 -0
- package/dist/leadership/leadership.d.ts +143 -0
- package/dist/leadership/leadership.js +148 -0
- package/dist/my-achievements/my-achievements.d.ts +84 -0
- package/dist/my-achievements/my-achievements.js +77 -0
- package/dist/my-applications/my-applications.d.ts +287 -0
- package/dist/my-applications/my-applications.js +207 -0
- package/dist/my-dogs/my-dogs.d.ts +326 -0
- package/dist/my-dogs/my-dogs.js +245 -0
- package/dist/my-kennels/my-kennels.d.ts +287 -0
- package/dist/my-kennels/my-kennels.js +207 -0
- package/dist/my-litters/my-litters.d.ts +287 -0
- package/dist/my-litters/my-litters.js +207 -0
- package/dist/news/news.d.ts +73 -0
- package/dist/news/news.js +78 -0
- package/dist/pages/pages.d.ts +73 -0
- package/dist/pages/pages.js +78 -0
- package/dist/profile/profile.d.ts +96 -0
- package/dist/profile/profile.js +72 -0
- package/dist/status-of-import-task/status-of-import-task.d.ts +41 -0
- package/dist/status-of-import-task/status-of-import-task.js +39 -0
- package/impact-report.html +108 -0
- package/impact-report.json +52 -0
- package/package.json +6 -2
- package/postinstall.js +29 -0
- package/dist/.api-sync/incremental-spec.json +0 -71
- package/dist/api.schemas.ts +0 -12
- package/dist/auth/auth.ts +0 -221
- package/dist/breed/breed.ts +0 -434
- package/dist/club-documents/club-documents.ts +0 -231
- package/dist/club-stats/club-stats.ts +0 -122
- package/dist/content-dictionary/content-dictionary.ts +0 -345
- package/dist/dog-references/dog-references.ts +0 -1043
- package/dist/dogs/dogs.ts +0 -972
- package/dist/event-reports/event-reports.ts +0 -231
- package/dist/events/events.ts +0 -231
- package/dist/galleries/galleries.ts +0 -332
- package/dist/home/home.ts +0 -122
- package/dist/import-breedarchive/import-breedarchive.ts +0 -417
- package/dist/import-hybrid/import-hybrid.ts +0 -320
- package/dist/import-hybrid-full/import-hybrid-full.ts +0 -320
- package/dist/import-zooportal/import-zooportal.ts +0 -335
- package/dist/judges/judges.ts +0 -434
- package/dist/leadership/leadership.ts +0 -433
- package/dist/my-achievements/my-achievements.ts +0 -243
- package/dist/my-applications/my-applications.ts +0 -665
- package/dist/my-dogs/my-dogs.ts +0 -772
- package/dist/my-kennels/my-kennels.ts +0 -665
- package/dist/my-litters/my-litters.ts +0 -665
- package/dist/news/news.ts +0 -231
- package/dist/pages/pages.ts +0 -231
- package/dist/profile/profile.ts +0 -246
- package/dist/status-of-import-task/status-of-import-task.ts +0 -129
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { QueryKey, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { ClubStats } from '../api.schemas';
|
|
3
|
+
/**
|
|
4
|
+
* Возвращает последнюю запись статистики клуба. Если данных ещё нет — возвращает нулевые значения.
|
|
5
|
+
* @summary Статистика клуба
|
|
6
|
+
*/
|
|
7
|
+
export type clubStatsListResponse200 = {
|
|
8
|
+
data: ClubStats[];
|
|
9
|
+
status: 200;
|
|
10
|
+
};
|
|
11
|
+
export type clubStatsListResponseSuccess = (clubStatsListResponse200) & {
|
|
12
|
+
headers: Headers;
|
|
13
|
+
};
|
|
14
|
+
export type clubStatsListResponse = (clubStatsListResponseSuccess);
|
|
15
|
+
export declare const getClubStatsListUrl: () => string;
|
|
16
|
+
export declare const clubStatsList: (options?: RequestInit) => Promise<clubStatsListResponse>;
|
|
17
|
+
export declare const getClubStatsListQueryKey: () => readonly ["/api/club/stats/"];
|
|
18
|
+
export declare const getClubStatsListQueryOptions: <TData = Awaited<ReturnType<typeof clubStatsList>>, TError = unknown>(options?: {
|
|
19
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof clubStatsList>>, TError, TData>;
|
|
20
|
+
fetch?: RequestInit;
|
|
21
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof clubStatsList>>, TError, TData> & {
|
|
22
|
+
queryKey: QueryKey;
|
|
23
|
+
};
|
|
24
|
+
export type ClubStatsListQueryResult = NonNullable<Awaited<ReturnType<typeof clubStatsList>>>;
|
|
25
|
+
export type ClubStatsListQueryError = unknown;
|
|
26
|
+
/**
|
|
27
|
+
* @summary Статистика клуба
|
|
28
|
+
*/
|
|
29
|
+
export declare function useClubStatsList<TData = Awaited<ReturnType<typeof clubStatsList>>, TError = unknown>(options?: {
|
|
30
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof clubStatsList>>, TError, TData>;
|
|
31
|
+
fetch?: RequestInit;
|
|
32
|
+
}): UseQueryResult<TData, TError> & {
|
|
33
|
+
queryKey: QueryKey;
|
|
34
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* НКП Сибирский Хаски API
|
|
5
|
+
* API для Национального клуба породы Сибирский хаски
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
import { useQuery } from '@tanstack/react-query';
|
|
9
|
+
;
|
|
10
|
+
export const getClubStatsListUrl = () => {
|
|
11
|
+
return `/api/club/stats/`;
|
|
12
|
+
};
|
|
13
|
+
export const clubStatsList = async (options) => {
|
|
14
|
+
const res = await fetch(getClubStatsListUrl(), {
|
|
15
|
+
...options,
|
|
16
|
+
method: 'GET'
|
|
17
|
+
});
|
|
18
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
19
|
+
const data = body ? JSON.parse(body) : {};
|
|
20
|
+
return { data, status: res.status, headers: res.headers };
|
|
21
|
+
};
|
|
22
|
+
export const getClubStatsListQueryKey = () => {
|
|
23
|
+
return [
|
|
24
|
+
`/api/club/stats/`
|
|
25
|
+
];
|
|
26
|
+
};
|
|
27
|
+
export const getClubStatsListQueryOptions = (options) => {
|
|
28
|
+
const { query: queryOptions, fetch: fetchOptions } = options ?? {};
|
|
29
|
+
const queryKey = queryOptions?.queryKey ?? getClubStatsListQueryKey();
|
|
30
|
+
const queryFn = ({ signal }) => clubStatsList({ signal, ...fetchOptions });
|
|
31
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* @summary Статистика клуба
|
|
35
|
+
*/
|
|
36
|
+
export function useClubStatsList(options) {
|
|
37
|
+
const queryOptions = getClubStatsListQueryOptions(options);
|
|
38
|
+
const query = useQuery(queryOptions);
|
|
39
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
40
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { QueryKey, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { ContentByKeyResponse, ContentDictionary, DictByKeyRetrieveParams, DictListParams, PaginatedContentDictionaryList } from '../api.schemas';
|
|
3
|
+
/**
|
|
4
|
+
* Возвращает все записи контент-справочника. Поддерживает фильтрацию по странице и ключу.
|
|
5
|
+
* @summary Список контент-записей
|
|
6
|
+
*/
|
|
7
|
+
export type dictListResponse200 = {
|
|
8
|
+
data: PaginatedContentDictionaryList;
|
|
9
|
+
status: 200;
|
|
10
|
+
};
|
|
11
|
+
export type dictListResponseSuccess = (dictListResponse200) & {
|
|
12
|
+
headers: Headers;
|
|
13
|
+
};
|
|
14
|
+
export type dictListResponse = (dictListResponseSuccess);
|
|
15
|
+
export declare const getDictListUrl: (params?: DictListParams) => string;
|
|
16
|
+
export declare const dictList: (params?: DictListParams, options?: RequestInit) => Promise<dictListResponse>;
|
|
17
|
+
export declare const getDictListQueryKey: (params?: DictListParams) => readonly ["/api/dict/", ...DictListParams[]];
|
|
18
|
+
export declare const getDictListQueryOptions: <TData = Awaited<ReturnType<typeof dictList>>, TError = unknown>(params?: DictListParams, options?: {
|
|
19
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof dictList>>, TError, TData>;
|
|
20
|
+
fetch?: RequestInit;
|
|
21
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof dictList>>, TError, TData> & {
|
|
22
|
+
queryKey: QueryKey;
|
|
23
|
+
};
|
|
24
|
+
export type DictListQueryResult = NonNullable<Awaited<ReturnType<typeof dictList>>>;
|
|
25
|
+
export type DictListQueryError = unknown;
|
|
26
|
+
/**
|
|
27
|
+
* @summary Список контент-записей
|
|
28
|
+
*/
|
|
29
|
+
export declare function useDictList<TData = Awaited<ReturnType<typeof dictList>>, TError = unknown>(params?: DictListParams, options?: {
|
|
30
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof dictList>>, TError, TData>;
|
|
31
|
+
fetch?: RequestInit;
|
|
32
|
+
}): UseQueryResult<TData, TError> & {
|
|
33
|
+
queryKey: QueryKey;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* API для контент-справочника
|
|
37
|
+
* @summary Получить запись по ID
|
|
38
|
+
*/
|
|
39
|
+
export type dictRetrieveResponse200 = {
|
|
40
|
+
data: ContentDictionary;
|
|
41
|
+
status: 200;
|
|
42
|
+
};
|
|
43
|
+
export type dictRetrieveResponse404 = {
|
|
44
|
+
data: void;
|
|
45
|
+
status: 404;
|
|
46
|
+
};
|
|
47
|
+
export type dictRetrieveResponseSuccess = (dictRetrieveResponse200) & {
|
|
48
|
+
headers: Headers;
|
|
49
|
+
};
|
|
50
|
+
export type dictRetrieveResponseError = (dictRetrieveResponse404) & {
|
|
51
|
+
headers: Headers;
|
|
52
|
+
};
|
|
53
|
+
export type dictRetrieveResponse = (dictRetrieveResponseSuccess | dictRetrieveResponseError);
|
|
54
|
+
export declare const getDictRetrieveUrl: (id: number) => string;
|
|
55
|
+
export declare const dictRetrieve: (id: number, options?: RequestInit) => Promise<dictRetrieveResponse>;
|
|
56
|
+
export declare const getDictRetrieveQueryKey: (id: number) => readonly [`/api/dict/${number}/`];
|
|
57
|
+
export declare const getDictRetrieveQueryOptions: <TData = Awaited<ReturnType<typeof dictRetrieve>>, TError = void>(id: number, options?: {
|
|
58
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof dictRetrieve>>, TError, TData>;
|
|
59
|
+
fetch?: RequestInit;
|
|
60
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof dictRetrieve>>, TError, TData> & {
|
|
61
|
+
queryKey: QueryKey;
|
|
62
|
+
};
|
|
63
|
+
export type DictRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof dictRetrieve>>>;
|
|
64
|
+
export type DictRetrieveQueryError = void;
|
|
65
|
+
/**
|
|
66
|
+
* @summary Получить запись по ID
|
|
67
|
+
*/
|
|
68
|
+
export declare function useDictRetrieve<TData = Awaited<ReturnType<typeof dictRetrieve>>, TError = void>(id: number, options?: {
|
|
69
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof dictRetrieve>>, TError, TData>;
|
|
70
|
+
fetch?: RequestInit;
|
|
71
|
+
}): UseQueryResult<TData, TError> & {
|
|
72
|
+
queryKey: QueryKey;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Возвращает одну запись контент-справочника по точному совпадению ключа.
|
|
76
|
+
* @summary Получить значение по ключу
|
|
77
|
+
*/
|
|
78
|
+
export type dictByKeyRetrieveResponse200 = {
|
|
79
|
+
data: ContentByKeyResponse;
|
|
80
|
+
status: 200;
|
|
81
|
+
};
|
|
82
|
+
export type dictByKeyRetrieveResponse400 = {
|
|
83
|
+
data: void;
|
|
84
|
+
status: 400;
|
|
85
|
+
};
|
|
86
|
+
export type dictByKeyRetrieveResponse404 = {
|
|
87
|
+
data: void;
|
|
88
|
+
status: 404;
|
|
89
|
+
};
|
|
90
|
+
export type dictByKeyRetrieveResponseSuccess = (dictByKeyRetrieveResponse200) & {
|
|
91
|
+
headers: Headers;
|
|
92
|
+
};
|
|
93
|
+
export type dictByKeyRetrieveResponseError = (dictByKeyRetrieveResponse400 | dictByKeyRetrieveResponse404) & {
|
|
94
|
+
headers: Headers;
|
|
95
|
+
};
|
|
96
|
+
export type dictByKeyRetrieveResponse = (dictByKeyRetrieveResponseSuccess | dictByKeyRetrieveResponseError);
|
|
97
|
+
export declare const getDictByKeyRetrieveUrl: (params: DictByKeyRetrieveParams) => string;
|
|
98
|
+
export declare const dictByKeyRetrieve: (params: DictByKeyRetrieveParams, options?: RequestInit) => Promise<dictByKeyRetrieveResponse>;
|
|
99
|
+
export declare const getDictByKeyRetrieveQueryKey: (params?: DictByKeyRetrieveParams) => readonly ["/api/dict/by_key/", ...DictByKeyRetrieveParams[]];
|
|
100
|
+
export declare const getDictByKeyRetrieveQueryOptions: <TData = Awaited<ReturnType<typeof dictByKeyRetrieve>>, TError = void>(params: DictByKeyRetrieveParams, options?: {
|
|
101
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof dictByKeyRetrieve>>, TError, TData>;
|
|
102
|
+
fetch?: RequestInit;
|
|
103
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof dictByKeyRetrieve>>, TError, TData> & {
|
|
104
|
+
queryKey: QueryKey;
|
|
105
|
+
};
|
|
106
|
+
export type DictByKeyRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof dictByKeyRetrieve>>>;
|
|
107
|
+
export type DictByKeyRetrieveQueryError = void;
|
|
108
|
+
/**
|
|
109
|
+
* @summary Получить значение по ключу
|
|
110
|
+
*/
|
|
111
|
+
export declare function useDictByKeyRetrieve<TData = Awaited<ReturnType<typeof dictByKeyRetrieve>>, TError = void>(params: DictByKeyRetrieveParams, options?: {
|
|
112
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof dictByKeyRetrieve>>, TError, TData>;
|
|
113
|
+
fetch?: RequestInit;
|
|
114
|
+
}): UseQueryResult<TData, TError> & {
|
|
115
|
+
queryKey: QueryKey;
|
|
116
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.5.3 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* НКП Сибирский Хаски API
|
|
5
|
+
* API для Национального клуба породы Сибирский хаски
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
import { useQuery } from '@tanstack/react-query';
|
|
9
|
+
;
|
|
10
|
+
export const getDictListUrl = (params) => {
|
|
11
|
+
const normalizedParams = new URLSearchParams();
|
|
12
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
13
|
+
if (value !== undefined) {
|
|
14
|
+
normalizedParams.append(key, value === null ? 'null' : value.toString());
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const stringifiedParams = normalizedParams.toString();
|
|
18
|
+
return stringifiedParams.length > 0 ? `/api/dict/?${stringifiedParams}` : `/api/dict/`;
|
|
19
|
+
};
|
|
20
|
+
export const dictList = async (params, options) => {
|
|
21
|
+
const res = await fetch(getDictListUrl(params), {
|
|
22
|
+
...options,
|
|
23
|
+
method: 'GET'
|
|
24
|
+
});
|
|
25
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
26
|
+
const data = body ? JSON.parse(body) : {};
|
|
27
|
+
return { data, status: res.status, headers: res.headers };
|
|
28
|
+
};
|
|
29
|
+
export const getDictListQueryKey = (params) => {
|
|
30
|
+
return [
|
|
31
|
+
`/api/dict/`, ...(params ? [params] : [])
|
|
32
|
+
];
|
|
33
|
+
};
|
|
34
|
+
export const getDictListQueryOptions = (params, options) => {
|
|
35
|
+
const { query: queryOptions, fetch: fetchOptions } = options ?? {};
|
|
36
|
+
const queryKey = queryOptions?.queryKey ?? getDictListQueryKey(params);
|
|
37
|
+
const queryFn = ({ signal }) => dictList(params, { signal, ...fetchOptions });
|
|
38
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* @summary Список контент-записей
|
|
42
|
+
*/
|
|
43
|
+
export function useDictList(params, options) {
|
|
44
|
+
const queryOptions = getDictListQueryOptions(params, options);
|
|
45
|
+
const query = useQuery(queryOptions);
|
|
46
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
47
|
+
}
|
|
48
|
+
export const getDictRetrieveUrl = (id) => {
|
|
49
|
+
return `/api/dict/${id}/`;
|
|
50
|
+
};
|
|
51
|
+
export const dictRetrieve = async (id, options) => {
|
|
52
|
+
const res = await fetch(getDictRetrieveUrl(id), {
|
|
53
|
+
...options,
|
|
54
|
+
method: 'GET'
|
|
55
|
+
});
|
|
56
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
57
|
+
const data = body ? JSON.parse(body) : {};
|
|
58
|
+
return { data, status: res.status, headers: res.headers };
|
|
59
|
+
};
|
|
60
|
+
export const getDictRetrieveQueryKey = (id) => {
|
|
61
|
+
return [
|
|
62
|
+
`/api/dict/${id}/`
|
|
63
|
+
];
|
|
64
|
+
};
|
|
65
|
+
export const getDictRetrieveQueryOptions = (id, options) => {
|
|
66
|
+
const { query: queryOptions, fetch: fetchOptions } = options ?? {};
|
|
67
|
+
const queryKey = queryOptions?.queryKey ?? getDictRetrieveQueryKey(id);
|
|
68
|
+
const queryFn = ({ signal }) => dictRetrieve(id, { signal, ...fetchOptions });
|
|
69
|
+
return { queryKey, queryFn, enabled: !!(id), ...queryOptions };
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* @summary Получить запись по ID
|
|
73
|
+
*/
|
|
74
|
+
export function useDictRetrieve(id, options) {
|
|
75
|
+
const queryOptions = getDictRetrieveQueryOptions(id, options);
|
|
76
|
+
const query = useQuery(queryOptions);
|
|
77
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
78
|
+
}
|
|
79
|
+
export const getDictByKeyRetrieveUrl = (params) => {
|
|
80
|
+
const normalizedParams = new URLSearchParams();
|
|
81
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
82
|
+
if (value !== undefined) {
|
|
83
|
+
normalizedParams.append(key, value === null ? 'null' : value.toString());
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
const stringifiedParams = normalizedParams.toString();
|
|
87
|
+
return stringifiedParams.length > 0 ? `/api/dict/by_key/?${stringifiedParams}` : `/api/dict/by_key/`;
|
|
88
|
+
};
|
|
89
|
+
export const dictByKeyRetrieve = async (params, options) => {
|
|
90
|
+
const res = await fetch(getDictByKeyRetrieveUrl(params), {
|
|
91
|
+
...options,
|
|
92
|
+
method: 'GET'
|
|
93
|
+
});
|
|
94
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
95
|
+
const data = body ? JSON.parse(body) : {};
|
|
96
|
+
return { data, status: res.status, headers: res.headers };
|
|
97
|
+
};
|
|
98
|
+
export const getDictByKeyRetrieveQueryKey = (params) => {
|
|
99
|
+
return [
|
|
100
|
+
`/api/dict/by_key/`, ...(params ? [params] : [])
|
|
101
|
+
];
|
|
102
|
+
};
|
|
103
|
+
export const getDictByKeyRetrieveQueryOptions = (params, options) => {
|
|
104
|
+
const { query: queryOptions, fetch: fetchOptions } = options ?? {};
|
|
105
|
+
const queryKey = queryOptions?.queryKey ?? getDictByKeyRetrieveQueryKey(params);
|
|
106
|
+
const queryFn = ({ signal }) => dictByKeyRetrieve(params, { signal, ...fetchOptions });
|
|
107
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* @summary Получить значение по ключу
|
|
111
|
+
*/
|
|
112
|
+
export function useDictByKeyRetrieve(params, options) {
|
|
113
|
+
const queryOptions = getDictByKeyRetrieveQueryOptions(params, options);
|
|
114
|
+
const query = useQuery(queryOptions);
|
|
115
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
116
|
+
}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import type { QueryKey, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import type { Breeder, BreedersListParams, Litter, LittersListParams, MedicalRecord, MedicalRecordsListParams, Owner, OwnersListParams, PaginatedBreederList, PaginatedLitterList, PaginatedMedicalRecordList, PaginatedOwnerList, PaginatedTitleList, Title, TitlesListParams } from '../api.schemas';
|
|
3
|
+
/**
|
|
4
|
+
* ViewSet для заводчиков
|
|
5
|
+
* @summary Список заводчиков
|
|
6
|
+
*/
|
|
7
|
+
export type breedersListResponse200 = {
|
|
8
|
+
data: PaginatedBreederList;
|
|
9
|
+
status: 200;
|
|
10
|
+
};
|
|
11
|
+
export type breedersListResponseSuccess = (breedersListResponse200) & {
|
|
12
|
+
headers: Headers;
|
|
13
|
+
};
|
|
14
|
+
export type breedersListResponse = (breedersListResponseSuccess);
|
|
15
|
+
export declare const getBreedersListUrl: (params?: BreedersListParams) => string;
|
|
16
|
+
export declare const breedersList: (params?: BreedersListParams, options?: RequestInit) => Promise<breedersListResponse>;
|
|
17
|
+
export declare const getBreedersListQueryKey: (params?: BreedersListParams) => readonly ["/api/breeders/", ...BreedersListParams[]];
|
|
18
|
+
export declare const getBreedersListQueryOptions: <TData = Awaited<ReturnType<typeof breedersList>>, TError = unknown>(params?: BreedersListParams, options?: {
|
|
19
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof breedersList>>, TError, TData>;
|
|
20
|
+
fetch?: RequestInit;
|
|
21
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof breedersList>>, TError, TData> & {
|
|
22
|
+
queryKey: QueryKey;
|
|
23
|
+
};
|
|
24
|
+
export type BreedersListQueryResult = NonNullable<Awaited<ReturnType<typeof breedersList>>>;
|
|
25
|
+
export type BreedersListQueryError = unknown;
|
|
26
|
+
/**
|
|
27
|
+
* @summary Список заводчиков
|
|
28
|
+
*/
|
|
29
|
+
export declare function useBreedersList<TData = Awaited<ReturnType<typeof breedersList>>, TError = unknown>(params?: BreedersListParams, options?: {
|
|
30
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof breedersList>>, TError, TData>;
|
|
31
|
+
fetch?: RequestInit;
|
|
32
|
+
}): UseQueryResult<TData, TError> & {
|
|
33
|
+
queryKey: QueryKey;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* ViewSet для заводчиков
|
|
37
|
+
* @summary Получить заводчика по ID
|
|
38
|
+
*/
|
|
39
|
+
export type breedersRetrieveResponse200 = {
|
|
40
|
+
data: Breeder;
|
|
41
|
+
status: 200;
|
|
42
|
+
};
|
|
43
|
+
export type breedersRetrieveResponse404 = {
|
|
44
|
+
data: void;
|
|
45
|
+
status: 404;
|
|
46
|
+
};
|
|
47
|
+
export type breedersRetrieveResponseSuccess = (breedersRetrieveResponse200) & {
|
|
48
|
+
headers: Headers;
|
|
49
|
+
};
|
|
50
|
+
export type breedersRetrieveResponseError = (breedersRetrieveResponse404) & {
|
|
51
|
+
headers: Headers;
|
|
52
|
+
};
|
|
53
|
+
export type breedersRetrieveResponse = (breedersRetrieveResponseSuccess | breedersRetrieveResponseError);
|
|
54
|
+
export declare const getBreedersRetrieveUrl: (id: number) => string;
|
|
55
|
+
export declare const breedersRetrieve: (id: number, options?: RequestInit) => Promise<breedersRetrieveResponse>;
|
|
56
|
+
export declare const getBreedersRetrieveQueryKey: (id: number) => readonly [`/api/breeders/${number}/`];
|
|
57
|
+
export declare const getBreedersRetrieveQueryOptions: <TData = Awaited<ReturnType<typeof breedersRetrieve>>, TError = void>(id: number, options?: {
|
|
58
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof breedersRetrieve>>, TError, TData>;
|
|
59
|
+
fetch?: RequestInit;
|
|
60
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof breedersRetrieve>>, TError, TData> & {
|
|
61
|
+
queryKey: QueryKey;
|
|
62
|
+
};
|
|
63
|
+
export type BreedersRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof breedersRetrieve>>>;
|
|
64
|
+
export type BreedersRetrieveQueryError = void;
|
|
65
|
+
/**
|
|
66
|
+
* @summary Получить заводчика по ID
|
|
67
|
+
*/
|
|
68
|
+
export declare function useBreedersRetrieve<TData = Awaited<ReturnType<typeof breedersRetrieve>>, TError = void>(id: number, options?: {
|
|
69
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof breedersRetrieve>>, TError, TData>;
|
|
70
|
+
fetch?: RequestInit;
|
|
71
|
+
}): UseQueryResult<TData, TError> & {
|
|
72
|
+
queryKey: QueryKey;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* ViewSet для помётов
|
|
76
|
+
* @summary Список помётов
|
|
77
|
+
*/
|
|
78
|
+
export type littersListResponse200 = {
|
|
79
|
+
data: PaginatedLitterList;
|
|
80
|
+
status: 200;
|
|
81
|
+
};
|
|
82
|
+
export type littersListResponseSuccess = (littersListResponse200) & {
|
|
83
|
+
headers: Headers;
|
|
84
|
+
};
|
|
85
|
+
export type littersListResponse = (littersListResponseSuccess);
|
|
86
|
+
export declare const getLittersListUrl: (params?: LittersListParams) => string;
|
|
87
|
+
export declare const littersList: (params?: LittersListParams, options?: RequestInit) => Promise<littersListResponse>;
|
|
88
|
+
export declare const getLittersListQueryKey: (params?: LittersListParams) => readonly ["/api/litters/", ...LittersListParams[]];
|
|
89
|
+
export declare const getLittersListQueryOptions: <TData = Awaited<ReturnType<typeof littersList>>, TError = unknown>(params?: LittersListParams, options?: {
|
|
90
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof littersList>>, TError, TData>;
|
|
91
|
+
fetch?: RequestInit;
|
|
92
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof littersList>>, TError, TData> & {
|
|
93
|
+
queryKey: QueryKey;
|
|
94
|
+
};
|
|
95
|
+
export type LittersListQueryResult = NonNullable<Awaited<ReturnType<typeof littersList>>>;
|
|
96
|
+
export type LittersListQueryError = unknown;
|
|
97
|
+
/**
|
|
98
|
+
* @summary Список помётов
|
|
99
|
+
*/
|
|
100
|
+
export declare function useLittersList<TData = Awaited<ReturnType<typeof littersList>>, TError = unknown>(params?: LittersListParams, options?: {
|
|
101
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof littersList>>, TError, TData>;
|
|
102
|
+
fetch?: RequestInit;
|
|
103
|
+
}): UseQueryResult<TData, TError> & {
|
|
104
|
+
queryKey: QueryKey;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* ViewSet для помётов
|
|
108
|
+
* @summary Получить помёт по ID
|
|
109
|
+
*/
|
|
110
|
+
export type littersRetrieveResponse200 = {
|
|
111
|
+
data: Litter;
|
|
112
|
+
status: 200;
|
|
113
|
+
};
|
|
114
|
+
export type littersRetrieveResponse404 = {
|
|
115
|
+
data: void;
|
|
116
|
+
status: 404;
|
|
117
|
+
};
|
|
118
|
+
export type littersRetrieveResponseSuccess = (littersRetrieveResponse200) & {
|
|
119
|
+
headers: Headers;
|
|
120
|
+
};
|
|
121
|
+
export type littersRetrieveResponseError = (littersRetrieveResponse404) & {
|
|
122
|
+
headers: Headers;
|
|
123
|
+
};
|
|
124
|
+
export type littersRetrieveResponse = (littersRetrieveResponseSuccess | littersRetrieveResponseError);
|
|
125
|
+
export declare const getLittersRetrieveUrl: (id: number) => string;
|
|
126
|
+
export declare const littersRetrieve: (id: number, options?: RequestInit) => Promise<littersRetrieveResponse>;
|
|
127
|
+
export declare const getLittersRetrieveQueryKey: (id: number) => readonly [`/api/litters/${number}/`];
|
|
128
|
+
export declare const getLittersRetrieveQueryOptions: <TData = Awaited<ReturnType<typeof littersRetrieve>>, TError = void>(id: number, options?: {
|
|
129
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof littersRetrieve>>, TError, TData>;
|
|
130
|
+
fetch?: RequestInit;
|
|
131
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof littersRetrieve>>, TError, TData> & {
|
|
132
|
+
queryKey: QueryKey;
|
|
133
|
+
};
|
|
134
|
+
export type LittersRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof littersRetrieve>>>;
|
|
135
|
+
export type LittersRetrieveQueryError = void;
|
|
136
|
+
/**
|
|
137
|
+
* @summary Получить помёт по ID
|
|
138
|
+
*/
|
|
139
|
+
export declare function useLittersRetrieve<TData = Awaited<ReturnType<typeof littersRetrieve>>, TError = void>(id: number, options?: {
|
|
140
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof littersRetrieve>>, TError, TData>;
|
|
141
|
+
fetch?: RequestInit;
|
|
142
|
+
}): UseQueryResult<TData, TError> & {
|
|
143
|
+
queryKey: QueryKey;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* ViewSet для медицинских записей
|
|
147
|
+
* @summary Список медицинских записей
|
|
148
|
+
*/
|
|
149
|
+
export type medicalRecordsListResponse200 = {
|
|
150
|
+
data: PaginatedMedicalRecordList;
|
|
151
|
+
status: 200;
|
|
152
|
+
};
|
|
153
|
+
export type medicalRecordsListResponseSuccess = (medicalRecordsListResponse200) & {
|
|
154
|
+
headers: Headers;
|
|
155
|
+
};
|
|
156
|
+
export type medicalRecordsListResponse = (medicalRecordsListResponseSuccess);
|
|
157
|
+
export declare const getMedicalRecordsListUrl: (params?: MedicalRecordsListParams) => string;
|
|
158
|
+
export declare const medicalRecordsList: (params?: MedicalRecordsListParams, options?: RequestInit) => Promise<medicalRecordsListResponse>;
|
|
159
|
+
export declare const getMedicalRecordsListQueryKey: (params?: MedicalRecordsListParams) => readonly ["/api/medical-records/", ...MedicalRecordsListParams[]];
|
|
160
|
+
export declare const getMedicalRecordsListQueryOptions: <TData = Awaited<ReturnType<typeof medicalRecordsList>>, TError = unknown>(params?: MedicalRecordsListParams, options?: {
|
|
161
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof medicalRecordsList>>, TError, TData>;
|
|
162
|
+
fetch?: RequestInit;
|
|
163
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof medicalRecordsList>>, TError, TData> & {
|
|
164
|
+
queryKey: QueryKey;
|
|
165
|
+
};
|
|
166
|
+
export type MedicalRecordsListQueryResult = NonNullable<Awaited<ReturnType<typeof medicalRecordsList>>>;
|
|
167
|
+
export type MedicalRecordsListQueryError = unknown;
|
|
168
|
+
/**
|
|
169
|
+
* @summary Список медицинских записей
|
|
170
|
+
*/
|
|
171
|
+
export declare function useMedicalRecordsList<TData = Awaited<ReturnType<typeof medicalRecordsList>>, TError = unknown>(params?: MedicalRecordsListParams, options?: {
|
|
172
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof medicalRecordsList>>, TError, TData>;
|
|
173
|
+
fetch?: RequestInit;
|
|
174
|
+
}): UseQueryResult<TData, TError> & {
|
|
175
|
+
queryKey: QueryKey;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* ViewSet для медицинских записей
|
|
179
|
+
* @summary Получить медицинскую запись по ID
|
|
180
|
+
*/
|
|
181
|
+
export type medicalRecordsRetrieveResponse200 = {
|
|
182
|
+
data: MedicalRecord;
|
|
183
|
+
status: 200;
|
|
184
|
+
};
|
|
185
|
+
export type medicalRecordsRetrieveResponse404 = {
|
|
186
|
+
data: void;
|
|
187
|
+
status: 404;
|
|
188
|
+
};
|
|
189
|
+
export type medicalRecordsRetrieveResponseSuccess = (medicalRecordsRetrieveResponse200) & {
|
|
190
|
+
headers: Headers;
|
|
191
|
+
};
|
|
192
|
+
export type medicalRecordsRetrieveResponseError = (medicalRecordsRetrieveResponse404) & {
|
|
193
|
+
headers: Headers;
|
|
194
|
+
};
|
|
195
|
+
export type medicalRecordsRetrieveResponse = (medicalRecordsRetrieveResponseSuccess | medicalRecordsRetrieveResponseError);
|
|
196
|
+
export declare const getMedicalRecordsRetrieveUrl: (id: number) => string;
|
|
197
|
+
export declare const medicalRecordsRetrieve: (id: number, options?: RequestInit) => Promise<medicalRecordsRetrieveResponse>;
|
|
198
|
+
export declare const getMedicalRecordsRetrieveQueryKey: (id: number) => readonly [`/api/medical-records/${number}/`];
|
|
199
|
+
export declare const getMedicalRecordsRetrieveQueryOptions: <TData = Awaited<ReturnType<typeof medicalRecordsRetrieve>>, TError = void>(id: number, options?: {
|
|
200
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof medicalRecordsRetrieve>>, TError, TData>;
|
|
201
|
+
fetch?: RequestInit;
|
|
202
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof medicalRecordsRetrieve>>, TError, TData> & {
|
|
203
|
+
queryKey: QueryKey;
|
|
204
|
+
};
|
|
205
|
+
export type MedicalRecordsRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof medicalRecordsRetrieve>>>;
|
|
206
|
+
export type MedicalRecordsRetrieveQueryError = void;
|
|
207
|
+
/**
|
|
208
|
+
* @summary Получить медицинскую запись по ID
|
|
209
|
+
*/
|
|
210
|
+
export declare function useMedicalRecordsRetrieve<TData = Awaited<ReturnType<typeof medicalRecordsRetrieve>>, TError = void>(id: number, options?: {
|
|
211
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof medicalRecordsRetrieve>>, TError, TData>;
|
|
212
|
+
fetch?: RequestInit;
|
|
213
|
+
}): UseQueryResult<TData, TError> & {
|
|
214
|
+
queryKey: QueryKey;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* ViewSet для владельцев
|
|
218
|
+
* @summary Список владельцев
|
|
219
|
+
*/
|
|
220
|
+
export type ownersListResponse200 = {
|
|
221
|
+
data: PaginatedOwnerList;
|
|
222
|
+
status: 200;
|
|
223
|
+
};
|
|
224
|
+
export type ownersListResponseSuccess = (ownersListResponse200) & {
|
|
225
|
+
headers: Headers;
|
|
226
|
+
};
|
|
227
|
+
export type ownersListResponse = (ownersListResponseSuccess);
|
|
228
|
+
export declare const getOwnersListUrl: (params?: OwnersListParams) => string;
|
|
229
|
+
export declare const ownersList: (params?: OwnersListParams, options?: RequestInit) => Promise<ownersListResponse>;
|
|
230
|
+
export declare const getOwnersListQueryKey: (params?: OwnersListParams) => readonly ["/api/owners/", ...OwnersListParams[]];
|
|
231
|
+
export declare const getOwnersListQueryOptions: <TData = Awaited<ReturnType<typeof ownersList>>, TError = unknown>(params?: OwnersListParams, options?: {
|
|
232
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof ownersList>>, TError, TData>;
|
|
233
|
+
fetch?: RequestInit;
|
|
234
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof ownersList>>, TError, TData> & {
|
|
235
|
+
queryKey: QueryKey;
|
|
236
|
+
};
|
|
237
|
+
export type OwnersListQueryResult = NonNullable<Awaited<ReturnType<typeof ownersList>>>;
|
|
238
|
+
export type OwnersListQueryError = unknown;
|
|
239
|
+
/**
|
|
240
|
+
* @summary Список владельцев
|
|
241
|
+
*/
|
|
242
|
+
export declare function useOwnersList<TData = Awaited<ReturnType<typeof ownersList>>, TError = unknown>(params?: OwnersListParams, options?: {
|
|
243
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof ownersList>>, TError, TData>;
|
|
244
|
+
fetch?: RequestInit;
|
|
245
|
+
}): UseQueryResult<TData, TError> & {
|
|
246
|
+
queryKey: QueryKey;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* ViewSet для владельцев
|
|
250
|
+
* @summary Получить владельца по ID
|
|
251
|
+
*/
|
|
252
|
+
export type ownersRetrieveResponse200 = {
|
|
253
|
+
data: Owner;
|
|
254
|
+
status: 200;
|
|
255
|
+
};
|
|
256
|
+
export type ownersRetrieveResponse404 = {
|
|
257
|
+
data: void;
|
|
258
|
+
status: 404;
|
|
259
|
+
};
|
|
260
|
+
export type ownersRetrieveResponseSuccess = (ownersRetrieveResponse200) & {
|
|
261
|
+
headers: Headers;
|
|
262
|
+
};
|
|
263
|
+
export type ownersRetrieveResponseError = (ownersRetrieveResponse404) & {
|
|
264
|
+
headers: Headers;
|
|
265
|
+
};
|
|
266
|
+
export type ownersRetrieveResponse = (ownersRetrieveResponseSuccess | ownersRetrieveResponseError);
|
|
267
|
+
export declare const getOwnersRetrieveUrl: (id: number) => string;
|
|
268
|
+
export declare const ownersRetrieve: (id: number, options?: RequestInit) => Promise<ownersRetrieveResponse>;
|
|
269
|
+
export declare const getOwnersRetrieveQueryKey: (id: number) => readonly [`/api/owners/${number}/`];
|
|
270
|
+
export declare const getOwnersRetrieveQueryOptions: <TData = Awaited<ReturnType<typeof ownersRetrieve>>, TError = void>(id: number, options?: {
|
|
271
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof ownersRetrieve>>, TError, TData>;
|
|
272
|
+
fetch?: RequestInit;
|
|
273
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof ownersRetrieve>>, TError, TData> & {
|
|
274
|
+
queryKey: QueryKey;
|
|
275
|
+
};
|
|
276
|
+
export type OwnersRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof ownersRetrieve>>>;
|
|
277
|
+
export type OwnersRetrieveQueryError = void;
|
|
278
|
+
/**
|
|
279
|
+
* @summary Получить владельца по ID
|
|
280
|
+
*/
|
|
281
|
+
export declare function useOwnersRetrieve<TData = Awaited<ReturnType<typeof ownersRetrieve>>, TError = void>(id: number, options?: {
|
|
282
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof ownersRetrieve>>, TError, TData>;
|
|
283
|
+
fetch?: RequestInit;
|
|
284
|
+
}): UseQueryResult<TData, TError> & {
|
|
285
|
+
queryKey: QueryKey;
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* ViewSet для титулов
|
|
289
|
+
* @summary Список титулов
|
|
290
|
+
*/
|
|
291
|
+
export type titlesListResponse200 = {
|
|
292
|
+
data: PaginatedTitleList;
|
|
293
|
+
status: 200;
|
|
294
|
+
};
|
|
295
|
+
export type titlesListResponseSuccess = (titlesListResponse200) & {
|
|
296
|
+
headers: Headers;
|
|
297
|
+
};
|
|
298
|
+
export type titlesListResponse = (titlesListResponseSuccess);
|
|
299
|
+
export declare const getTitlesListUrl: (params?: TitlesListParams) => string;
|
|
300
|
+
export declare const titlesList: (params?: TitlesListParams, options?: RequestInit) => Promise<titlesListResponse>;
|
|
301
|
+
export declare const getTitlesListQueryKey: (params?: TitlesListParams) => readonly ["/api/titles/", ...TitlesListParams[]];
|
|
302
|
+
export declare const getTitlesListQueryOptions: <TData = Awaited<ReturnType<typeof titlesList>>, TError = unknown>(params?: TitlesListParams, options?: {
|
|
303
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof titlesList>>, TError, TData>;
|
|
304
|
+
fetch?: RequestInit;
|
|
305
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof titlesList>>, TError, TData> & {
|
|
306
|
+
queryKey: QueryKey;
|
|
307
|
+
};
|
|
308
|
+
export type TitlesListQueryResult = NonNullable<Awaited<ReturnType<typeof titlesList>>>;
|
|
309
|
+
export type TitlesListQueryError = unknown;
|
|
310
|
+
/**
|
|
311
|
+
* @summary Список титулов
|
|
312
|
+
*/
|
|
313
|
+
export declare function useTitlesList<TData = Awaited<ReturnType<typeof titlesList>>, TError = unknown>(params?: TitlesListParams, options?: {
|
|
314
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof titlesList>>, TError, TData>;
|
|
315
|
+
fetch?: RequestInit;
|
|
316
|
+
}): UseQueryResult<TData, TError> & {
|
|
317
|
+
queryKey: QueryKey;
|
|
318
|
+
};
|
|
319
|
+
/**
|
|
320
|
+
* ViewSet для титулов
|
|
321
|
+
* @summary Получить титул по ID
|
|
322
|
+
*/
|
|
323
|
+
export type titlesRetrieveResponse200 = {
|
|
324
|
+
data: Title;
|
|
325
|
+
status: 200;
|
|
326
|
+
};
|
|
327
|
+
export type titlesRetrieveResponse404 = {
|
|
328
|
+
data: void;
|
|
329
|
+
status: 404;
|
|
330
|
+
};
|
|
331
|
+
export type titlesRetrieveResponseSuccess = (titlesRetrieveResponse200) & {
|
|
332
|
+
headers: Headers;
|
|
333
|
+
};
|
|
334
|
+
export type titlesRetrieveResponseError = (titlesRetrieveResponse404) & {
|
|
335
|
+
headers: Headers;
|
|
336
|
+
};
|
|
337
|
+
export type titlesRetrieveResponse = (titlesRetrieveResponseSuccess | titlesRetrieveResponseError);
|
|
338
|
+
export declare const getTitlesRetrieveUrl: (id: number) => string;
|
|
339
|
+
export declare const titlesRetrieve: (id: number, options?: RequestInit) => Promise<titlesRetrieveResponse>;
|
|
340
|
+
export declare const getTitlesRetrieveQueryKey: (id: number) => readonly [`/api/titles/${number}/`];
|
|
341
|
+
export declare const getTitlesRetrieveQueryOptions: <TData = Awaited<ReturnType<typeof titlesRetrieve>>, TError = void>(id: number, options?: {
|
|
342
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof titlesRetrieve>>, TError, TData>;
|
|
343
|
+
fetch?: RequestInit;
|
|
344
|
+
}) => UseQueryOptions<Awaited<ReturnType<typeof titlesRetrieve>>, TError, TData> & {
|
|
345
|
+
queryKey: QueryKey;
|
|
346
|
+
};
|
|
347
|
+
export type TitlesRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof titlesRetrieve>>>;
|
|
348
|
+
export type TitlesRetrieveQueryError = void;
|
|
349
|
+
/**
|
|
350
|
+
* @summary Получить титул по ID
|
|
351
|
+
*/
|
|
352
|
+
export declare function useTitlesRetrieve<TData = Awaited<ReturnType<typeof titlesRetrieve>>, TError = void>(id: number, options?: {
|
|
353
|
+
query?: UseQueryOptions<Awaited<ReturnType<typeof titlesRetrieve>>, TError, TData>;
|
|
354
|
+
fetch?: RequestInit;
|
|
355
|
+
}): UseQueryResult<TData, TError> & {
|
|
356
|
+
queryKey: QueryKey;
|
|
357
|
+
};
|