@omerikanec/api-client-demo 2.0.3 → 2.0.4
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/{api.schemas.ts → api.schemas.d.ts} +2 -3
- package/dist/api.schemas.js +1 -0
- package/dist/auth/auth.d.ts +82 -0
- package/dist/auth/auth.js +71 -0
- package/dist/breed/breed.d.ts +147 -0
- package/dist/breed/breed.js +148 -0
- package/dist/club-documents/club-documents.d.ts +76 -0
- package/dist/club-documents/club-documents.js +78 -0
- package/dist/club-stats/club-stats.d.ts +37 -0
- package/dist/club-stats/club-stats.js +40 -0
- package/dist/content-dictionary/content-dictionary.d.ts +119 -0
- package/dist/content-dictionary/content-dictionary.js +116 -0
- package/dist/dog-references/dog-references.d.ts +360 -0
- package/dist/dog-references/dog-references.js +358 -0
- package/dist/dogs/dogs.d.ts +351 -0
- package/dist/dogs/dogs.js +329 -0
- package/dist/event-reports/event-reports.d.ts +76 -0
- package/dist/event-reports/event-reports.js +78 -0
- package/dist/events/events.d.ts +76 -0
- package/dist/events/events.js +78 -0
- package/dist/galleries/galleries.d.ts +108 -0
- package/dist/galleries/galleries.js +117 -0
- package/dist/home/home.d.ts +37 -0
- package/dist/home/home.js +40 -0
- package/dist/import-breedarchive/import-breedarchive.d.ts +177 -0
- package/dist/import-breedarchive/import-breedarchive.js +140 -0
- package/dist/import-hybrid/import-hybrid.d.ts +134 -0
- package/dist/import-hybrid/import-hybrid.js +107 -0
- package/dist/import-hybrid-full/import-hybrid-full.d.ts +134 -0
- package/dist/import-hybrid-full/import-hybrid-full.js +107 -0
- package/dist/import-zooportal/import-zooportal.d.ts +146 -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 +147 -0
- package/dist/judges/judges.js +148 -0
- package/dist/leadership/leadership.d.ts +146 -0
- package/dist/leadership/leadership.js +148 -0
- package/dist/my-achievements/my-achievements.d.ts +87 -0
- package/dist/my-achievements/my-achievements.js +77 -0
- package/dist/my-applications/my-applications.d.ts +290 -0
- package/dist/my-applications/my-applications.js +207 -0
- package/dist/my-dogs/my-dogs.d.ts +329 -0
- package/dist/my-dogs/my-dogs.js +245 -0
- package/dist/my-kennels/my-kennels.d.ts +290 -0
- package/dist/my-kennels/my-kennels.js +207 -0
- package/dist/my-litters/my-litters.d.ts +290 -0
- package/dist/my-litters/my-litters.js +207 -0
- package/dist/news/news.d.ts +76 -0
- package/dist/news/news.js +78 -0
- package/dist/pages/pages.d.ts +76 -0
- package/dist/pages/pages.js +78 -0
- package/dist/profile/profile.d.ts +99 -0
- package/dist/profile/profile.js +72 -0
- package/dist/status-of-import-task/status-of-import-task.d.ts +44 -0
- package/dist/status-of-import-task/status-of-import-task.js +39 -0
- package/package.json +1 -1
- package/dist/.api-sync/incremental-spec.json +0 -71
- 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
|
@@ -1,129 +0,0 @@
|
|
|
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 {
|
|
9
|
-
useQuery
|
|
10
|
-
} from '@tanstack/react-query';
|
|
11
|
-
import type {
|
|
12
|
-
QueryFunction,
|
|
13
|
-
QueryKey,
|
|
14
|
-
UseQueryOptions,
|
|
15
|
-
UseQueryResult
|
|
16
|
-
} from '@tanstack/react-query';
|
|
17
|
-
|
|
18
|
-
import type {
|
|
19
|
-
TaskStatusResponse
|
|
20
|
-
} from '../api.schemas';
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type AwaitedInput<T> = PromiseLike<T> | T;
|
|
24
|
-
|
|
25
|
-
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Получить статус выполнения задачи по её ID.
|
|
32
|
-
* @summary Статус задачи импорта
|
|
33
|
-
*/
|
|
34
|
-
export type dogsImportStatusRetrieveResponse200 = {
|
|
35
|
-
data: TaskStatusResponse
|
|
36
|
-
status: 200
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type dogsImportStatusRetrieveResponse500 = {
|
|
40
|
-
data: void
|
|
41
|
-
status: 500
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export type dogsImportStatusRetrieveResponseSuccess = (dogsImportStatusRetrieveResponse200) & {
|
|
45
|
-
headers: Headers;
|
|
46
|
-
};
|
|
47
|
-
export type dogsImportStatusRetrieveResponseError = (dogsImportStatusRetrieveResponse500) & {
|
|
48
|
-
headers: Headers;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export type dogsImportStatusRetrieveResponse = (dogsImportStatusRetrieveResponseSuccess | dogsImportStatusRetrieveResponseError)
|
|
52
|
-
|
|
53
|
-
export const getDogsImportStatusRetrieveUrl = (taskId: string,) => {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return `/api/dogs/import/status/${taskId}/`
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export const dogsImportStatusRetrieve = async (taskId: string, options?: RequestInit): Promise<dogsImportStatusRetrieveResponse> => {
|
|
62
|
-
|
|
63
|
-
const res = await fetch(getDogsImportStatusRetrieveUrl(taskId),
|
|
64
|
-
{
|
|
65
|
-
...options,
|
|
66
|
-
method: 'GET'
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
73
|
-
|
|
74
|
-
const data: dogsImportStatusRetrieveResponse['data'] = body ? JSON.parse(body) : {}
|
|
75
|
-
return { data, status: res.status, headers: res.headers } as dogsImportStatusRetrieveResponse
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
export const getDogsImportStatusRetrieveQueryKey = (taskId: string,) => {
|
|
83
|
-
return [
|
|
84
|
-
`/api/dogs/import/status/${taskId}/`
|
|
85
|
-
] as const;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
export const getDogsImportStatusRetrieveQueryOptions = <TData = Awaited<ReturnType<typeof dogsImportStatusRetrieve>>, TError = void>(taskId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof dogsImportStatusRetrieve>>, TError, TData>, fetch?: RequestInit}
|
|
90
|
-
) => {
|
|
91
|
-
|
|
92
|
-
const {query: queryOptions, fetch: fetchOptions} = options ?? {};
|
|
93
|
-
|
|
94
|
-
const queryKey = queryOptions?.queryKey ?? getDogsImportStatusRetrieveQueryKey(taskId);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const queryFn: QueryFunction<Awaited<ReturnType<typeof dogsImportStatusRetrieve>>> = ({ signal }) => dogsImportStatusRetrieve(taskId, { signal, ...fetchOptions });
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return { queryKey, queryFn, enabled: !!(taskId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof dogsImportStatusRetrieve>>, TError, TData> & { queryKey: QueryKey }
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export type DogsImportStatusRetrieveQueryResult = NonNullable<Awaited<ReturnType<typeof dogsImportStatusRetrieve>>>
|
|
108
|
-
export type DogsImportStatusRetrieveQueryError = void
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* @summary Статус задачи импорта
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
export function useDogsImportStatusRetrieve<TData = Awaited<ReturnType<typeof dogsImportStatusRetrieve>>, TError = void>(
|
|
116
|
-
taskId: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof dogsImportStatusRetrieve>>, TError, TData>, fetch?: RequestInit}
|
|
117
|
-
|
|
118
|
-
): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
|
|
119
|
-
|
|
120
|
-
const queryOptions = getDogsImportStatusRetrieveQueryOptions(taskId,options)
|
|
121
|
-
|
|
122
|
-
const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
|
|
123
|
-
|
|
124
|
-
return { ...query, queryKey: queryOptions.queryKey };
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|