@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
|
@@ -1,417 +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
|
-
useMutation
|
|
10
|
-
} from '@tanstack/react-query';
|
|
11
|
-
import type {
|
|
12
|
-
MutationFunction,
|
|
13
|
-
UseMutationOptions,
|
|
14
|
-
UseMutationResult
|
|
15
|
-
} from '@tanstack/react-query';
|
|
16
|
-
|
|
17
|
-
import type {
|
|
18
|
-
ImportBreedarchiveBrowseRequest,
|
|
19
|
-
ImportBreedarchiveDogRequest,
|
|
20
|
-
ImportBreedarchiveFullPedigreeRequest,
|
|
21
|
-
ImportBreedarchiveRecentRequest,
|
|
22
|
-
TaskResponse
|
|
23
|
-
} from '../api.schemas';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
type AwaitedInput<T> = PromiseLike<T> | T;
|
|
27
|
-
|
|
28
|
-
type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Импорт собак, изменённых за последние N дней, через browse-страницу (Playwright).
|
|
35
|
-
* @summary Импорт собак через browse-страницу BreedArchive
|
|
36
|
-
*/
|
|
37
|
-
export type dogsImportBreedarchiveBrowseCreateResponse202 = {
|
|
38
|
-
data: TaskResponse
|
|
39
|
-
status: 202
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type dogsImportBreedarchiveBrowseCreateResponse400 = {
|
|
43
|
-
data: void
|
|
44
|
-
status: 400
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export type dogsImportBreedarchiveBrowseCreateResponseSuccess = (dogsImportBreedarchiveBrowseCreateResponse202) & {
|
|
48
|
-
headers: Headers;
|
|
49
|
-
};
|
|
50
|
-
export type dogsImportBreedarchiveBrowseCreateResponseError = (dogsImportBreedarchiveBrowseCreateResponse400) & {
|
|
51
|
-
headers: Headers;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export type dogsImportBreedarchiveBrowseCreateResponse = (dogsImportBreedarchiveBrowseCreateResponseSuccess | dogsImportBreedarchiveBrowseCreateResponseError)
|
|
55
|
-
|
|
56
|
-
export const getDogsImportBreedarchiveBrowseCreateUrl = () => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return `/api/dogs/import/breedarchive/browse/`
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export const dogsImportBreedarchiveBrowseCreate = async (importBreedarchiveBrowseRequest: ImportBreedarchiveBrowseRequest, options?: RequestInit): Promise<dogsImportBreedarchiveBrowseCreateResponse> => {
|
|
65
|
-
|
|
66
|
-
const res = await fetch(getDogsImportBreedarchiveBrowseCreateUrl(),
|
|
67
|
-
{
|
|
68
|
-
...options,
|
|
69
|
-
method: 'POST',
|
|
70
|
-
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
71
|
-
body: JSON.stringify(
|
|
72
|
-
importBreedarchiveBrowseRequest,)
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
77
|
-
|
|
78
|
-
const data: dogsImportBreedarchiveBrowseCreateResponse['data'] = body ? JSON.parse(body) : {}
|
|
79
|
-
return { data, status: res.status, headers: res.headers } as dogsImportBreedarchiveBrowseCreateResponse
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
export const getDogsImportBreedarchiveBrowseCreateMutationOptions = <TError = void,
|
|
86
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveBrowseCreate>>, TError,{data: ImportBreedarchiveBrowseRequest}, TContext>, fetch?: RequestInit}
|
|
87
|
-
): UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveBrowseCreate>>, TError,{data: ImportBreedarchiveBrowseRequest}, TContext> => {
|
|
88
|
-
|
|
89
|
-
const mutationKey = ['dogsImportBreedarchiveBrowseCreate'];
|
|
90
|
-
const {mutation: mutationOptions, fetch: fetchOptions} = options ?
|
|
91
|
-
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
92
|
-
options
|
|
93
|
-
: {...options, mutation: {...options.mutation, mutationKey}}
|
|
94
|
-
: {mutation: { mutationKey, }, fetch: undefined};
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof dogsImportBreedarchiveBrowseCreate>>, {data: ImportBreedarchiveBrowseRequest}> = (props) => {
|
|
100
|
-
const {data} = props ?? {};
|
|
101
|
-
|
|
102
|
-
return dogsImportBreedarchiveBrowseCreate(data,fetchOptions)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return { mutationFn, ...mutationOptions }}
|
|
111
|
-
|
|
112
|
-
export type DogsImportBreedarchiveBrowseCreateMutationResult = NonNullable<Awaited<ReturnType<typeof dogsImportBreedarchiveBrowseCreate>>>
|
|
113
|
-
export type DogsImportBreedarchiveBrowseCreateMutationBody = ImportBreedarchiveBrowseRequest
|
|
114
|
-
export type DogsImportBreedarchiveBrowseCreateMutationError = void
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* @summary Импорт собак через browse-страницу BreedArchive
|
|
118
|
-
*/
|
|
119
|
-
export const useDogsImportBreedarchiveBrowseCreate = <TError = void,
|
|
120
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveBrowseCreate>>, TError,{data: ImportBreedarchiveBrowseRequest}, TContext>, fetch?: RequestInit}
|
|
121
|
-
): UseMutationResult<
|
|
122
|
-
Awaited<ReturnType<typeof dogsImportBreedarchiveBrowseCreate>>,
|
|
123
|
-
TError,
|
|
124
|
-
{data: ImportBreedarchiveBrowseRequest},
|
|
125
|
-
TContext
|
|
126
|
-
> => {
|
|
127
|
-
return useMutation(getDogsImportBreedarchiveBrowseCreateMutationOptions(options));
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Импорт одной собаки из BreedArchive по UUID.
|
|
131
|
-
* @summary Импорт одной собаки из BreedArchive
|
|
132
|
-
*/
|
|
133
|
-
export type dogsImportBreedarchiveDogCreateResponse202 = {
|
|
134
|
-
data: TaskResponse
|
|
135
|
-
status: 202
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export type dogsImportBreedarchiveDogCreateResponse400 = {
|
|
139
|
-
data: void
|
|
140
|
-
status: 400
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export type dogsImportBreedarchiveDogCreateResponseSuccess = (dogsImportBreedarchiveDogCreateResponse202) & {
|
|
144
|
-
headers: Headers;
|
|
145
|
-
};
|
|
146
|
-
export type dogsImportBreedarchiveDogCreateResponseError = (dogsImportBreedarchiveDogCreateResponse400) & {
|
|
147
|
-
headers: Headers;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export type dogsImportBreedarchiveDogCreateResponse = (dogsImportBreedarchiveDogCreateResponseSuccess | dogsImportBreedarchiveDogCreateResponseError)
|
|
151
|
-
|
|
152
|
-
export const getDogsImportBreedarchiveDogCreateUrl = () => {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return `/api/dogs/import/breedarchive/dog/`
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export const dogsImportBreedarchiveDogCreate = async (importBreedarchiveDogRequest: ImportBreedarchiveDogRequest, options?: RequestInit): Promise<dogsImportBreedarchiveDogCreateResponse> => {
|
|
161
|
-
|
|
162
|
-
const res = await fetch(getDogsImportBreedarchiveDogCreateUrl(),
|
|
163
|
-
{
|
|
164
|
-
...options,
|
|
165
|
-
method: 'POST',
|
|
166
|
-
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
167
|
-
body: JSON.stringify(
|
|
168
|
-
importBreedarchiveDogRequest,)
|
|
169
|
-
}
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
173
|
-
|
|
174
|
-
const data: dogsImportBreedarchiveDogCreateResponse['data'] = body ? JSON.parse(body) : {}
|
|
175
|
-
return { data, status: res.status, headers: res.headers } as dogsImportBreedarchiveDogCreateResponse
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
export const getDogsImportBreedarchiveDogCreateMutationOptions = <TError = void,
|
|
182
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveDogCreate>>, TError,{data: ImportBreedarchiveDogRequest}, TContext>, fetch?: RequestInit}
|
|
183
|
-
): UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveDogCreate>>, TError,{data: ImportBreedarchiveDogRequest}, TContext> => {
|
|
184
|
-
|
|
185
|
-
const mutationKey = ['dogsImportBreedarchiveDogCreate'];
|
|
186
|
-
const {mutation: mutationOptions, fetch: fetchOptions} = options ?
|
|
187
|
-
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
188
|
-
options
|
|
189
|
-
: {...options, mutation: {...options.mutation, mutationKey}}
|
|
190
|
-
: {mutation: { mutationKey, }, fetch: undefined};
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof dogsImportBreedarchiveDogCreate>>, {data: ImportBreedarchiveDogRequest}> = (props) => {
|
|
196
|
-
const {data} = props ?? {};
|
|
197
|
-
|
|
198
|
-
return dogsImportBreedarchiveDogCreate(data,fetchOptions)
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return { mutationFn, ...mutationOptions }}
|
|
207
|
-
|
|
208
|
-
export type DogsImportBreedarchiveDogCreateMutationResult = NonNullable<Awaited<ReturnType<typeof dogsImportBreedarchiveDogCreate>>>
|
|
209
|
-
export type DogsImportBreedarchiveDogCreateMutationBody = ImportBreedarchiveDogRequest
|
|
210
|
-
export type DogsImportBreedarchiveDogCreateMutationError = void
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* @summary Импорт одной собаки из BreedArchive
|
|
214
|
-
*/
|
|
215
|
-
export const useDogsImportBreedarchiveDogCreate = <TError = void,
|
|
216
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveDogCreate>>, TError,{data: ImportBreedarchiveDogRequest}, TContext>, fetch?: RequestInit}
|
|
217
|
-
): UseMutationResult<
|
|
218
|
-
Awaited<ReturnType<typeof dogsImportBreedarchiveDogCreate>>,
|
|
219
|
-
TError,
|
|
220
|
-
{data: ImportBreedarchiveDogRequest},
|
|
221
|
-
TContext
|
|
222
|
-
> => {
|
|
223
|
-
return useMutation(getDogsImportBreedarchiveDogCreateMutationOptions(options));
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Запускает рекурсивную загрузку всех предков из BreedArchive. Каждый граничный предок (sire/dam=null, но sireId/damId>0) запрашивается отдельно до тех пор, пока не будут загружены все поколения. Возвращает task_id для отслеживания прогресса.
|
|
227
|
-
* @summary Загрузка полной родословной по UUID (все поколения)
|
|
228
|
-
*/
|
|
229
|
-
export type dogsImportBreedarchiveDogFullPedigreeCreateResponse202 = {
|
|
230
|
-
data: TaskResponse
|
|
231
|
-
status: 202
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export type dogsImportBreedarchiveDogFullPedigreeCreateResponse400 = {
|
|
235
|
-
data: void
|
|
236
|
-
status: 400
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export type dogsImportBreedarchiveDogFullPedigreeCreateResponseSuccess = (dogsImportBreedarchiveDogFullPedigreeCreateResponse202) & {
|
|
240
|
-
headers: Headers;
|
|
241
|
-
};
|
|
242
|
-
export type dogsImportBreedarchiveDogFullPedigreeCreateResponseError = (dogsImportBreedarchiveDogFullPedigreeCreateResponse400) & {
|
|
243
|
-
headers: Headers;
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
export type dogsImportBreedarchiveDogFullPedigreeCreateResponse = (dogsImportBreedarchiveDogFullPedigreeCreateResponseSuccess | dogsImportBreedarchiveDogFullPedigreeCreateResponseError)
|
|
247
|
-
|
|
248
|
-
export const getDogsImportBreedarchiveDogFullPedigreeCreateUrl = () => {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
return `/api/dogs/import/breedarchive/dog/full-pedigree/`
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export const dogsImportBreedarchiveDogFullPedigreeCreate = async (importBreedarchiveFullPedigreeRequest: ImportBreedarchiveFullPedigreeRequest, options?: RequestInit): Promise<dogsImportBreedarchiveDogFullPedigreeCreateResponse> => {
|
|
257
|
-
|
|
258
|
-
const res = await fetch(getDogsImportBreedarchiveDogFullPedigreeCreateUrl(),
|
|
259
|
-
{
|
|
260
|
-
...options,
|
|
261
|
-
method: 'POST',
|
|
262
|
-
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
263
|
-
body: JSON.stringify(
|
|
264
|
-
importBreedarchiveFullPedigreeRequest,)
|
|
265
|
-
}
|
|
266
|
-
)
|
|
267
|
-
|
|
268
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
269
|
-
|
|
270
|
-
const data: dogsImportBreedarchiveDogFullPedigreeCreateResponse['data'] = body ? JSON.parse(body) : {}
|
|
271
|
-
return { data, status: res.status, headers: res.headers } as dogsImportBreedarchiveDogFullPedigreeCreateResponse
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
export const getDogsImportBreedarchiveDogFullPedigreeCreateMutationOptions = <TError = void,
|
|
278
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveDogFullPedigreeCreate>>, TError,{data: ImportBreedarchiveFullPedigreeRequest}, TContext>, fetch?: RequestInit}
|
|
279
|
-
): UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveDogFullPedigreeCreate>>, TError,{data: ImportBreedarchiveFullPedigreeRequest}, TContext> => {
|
|
280
|
-
|
|
281
|
-
const mutationKey = ['dogsImportBreedarchiveDogFullPedigreeCreate'];
|
|
282
|
-
const {mutation: mutationOptions, fetch: fetchOptions} = options ?
|
|
283
|
-
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
284
|
-
options
|
|
285
|
-
: {...options, mutation: {...options.mutation, mutationKey}}
|
|
286
|
-
: {mutation: { mutationKey, }, fetch: undefined};
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof dogsImportBreedarchiveDogFullPedigreeCreate>>, {data: ImportBreedarchiveFullPedigreeRequest}> = (props) => {
|
|
292
|
-
const {data} = props ?? {};
|
|
293
|
-
|
|
294
|
-
return dogsImportBreedarchiveDogFullPedigreeCreate(data,fetchOptions)
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
return { mutationFn, ...mutationOptions }}
|
|
303
|
-
|
|
304
|
-
export type DogsImportBreedarchiveDogFullPedigreeCreateMutationResult = NonNullable<Awaited<ReturnType<typeof dogsImportBreedarchiveDogFullPedigreeCreate>>>
|
|
305
|
-
export type DogsImportBreedarchiveDogFullPedigreeCreateMutationBody = ImportBreedarchiveFullPedigreeRequest
|
|
306
|
-
export type DogsImportBreedarchiveDogFullPedigreeCreateMutationError = void
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* @summary Загрузка полной родословной по UUID (все поколения)
|
|
310
|
-
*/
|
|
311
|
-
export const useDogsImportBreedarchiveDogFullPedigreeCreate = <TError = void,
|
|
312
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveDogFullPedigreeCreate>>, TError,{data: ImportBreedarchiveFullPedigreeRequest}, TContext>, fetch?: RequestInit}
|
|
313
|
-
): UseMutationResult<
|
|
314
|
-
Awaited<ReturnType<typeof dogsImportBreedarchiveDogFullPedigreeCreate>>,
|
|
315
|
-
TError,
|
|
316
|
-
{data: ImportBreedarchiveFullPedigreeRequest},
|
|
317
|
-
TContext
|
|
318
|
-
> => {
|
|
319
|
-
return useMutation(getDogsImportBreedarchiveDogFullPedigreeCreateMutationOptions(options));
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Импорт последних обновлённых собак из BreedArchive (operation=all).
|
|
323
|
-
* @summary Импорт последних обновлений BreedArchive
|
|
324
|
-
*/
|
|
325
|
-
export type dogsImportBreedarchiveRecentCreateResponse202 = {
|
|
326
|
-
data: TaskResponse
|
|
327
|
-
status: 202
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
export type dogsImportBreedarchiveRecentCreateResponse400 = {
|
|
331
|
-
data: void
|
|
332
|
-
status: 400
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export type dogsImportBreedarchiveRecentCreateResponseSuccess = (dogsImportBreedarchiveRecentCreateResponse202) & {
|
|
336
|
-
headers: Headers;
|
|
337
|
-
};
|
|
338
|
-
export type dogsImportBreedarchiveRecentCreateResponseError = (dogsImportBreedarchiveRecentCreateResponse400) & {
|
|
339
|
-
headers: Headers;
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
export type dogsImportBreedarchiveRecentCreateResponse = (dogsImportBreedarchiveRecentCreateResponseSuccess | dogsImportBreedarchiveRecentCreateResponseError)
|
|
343
|
-
|
|
344
|
-
export const getDogsImportBreedarchiveRecentCreateUrl = () => {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
return `/api/dogs/import/breedarchive/recent/`
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
export const dogsImportBreedarchiveRecentCreate = async (importBreedarchiveRecentRequest: ImportBreedarchiveRecentRequest, options?: RequestInit): Promise<dogsImportBreedarchiveRecentCreateResponse> => {
|
|
353
|
-
|
|
354
|
-
const res = await fetch(getDogsImportBreedarchiveRecentCreateUrl(),
|
|
355
|
-
{
|
|
356
|
-
...options,
|
|
357
|
-
method: 'POST',
|
|
358
|
-
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
359
|
-
body: JSON.stringify(
|
|
360
|
-
importBreedarchiveRecentRequest,)
|
|
361
|
-
}
|
|
362
|
-
)
|
|
363
|
-
|
|
364
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
365
|
-
|
|
366
|
-
const data: dogsImportBreedarchiveRecentCreateResponse['data'] = body ? JSON.parse(body) : {}
|
|
367
|
-
return { data, status: res.status, headers: res.headers } as dogsImportBreedarchiveRecentCreateResponse
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
export const getDogsImportBreedarchiveRecentCreateMutationOptions = <TError = void,
|
|
374
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveRecentCreate>>, TError,{data: ImportBreedarchiveRecentRequest}, TContext>, fetch?: RequestInit}
|
|
375
|
-
): UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveRecentCreate>>, TError,{data: ImportBreedarchiveRecentRequest}, TContext> => {
|
|
376
|
-
|
|
377
|
-
const mutationKey = ['dogsImportBreedarchiveRecentCreate'];
|
|
378
|
-
const {mutation: mutationOptions, fetch: fetchOptions} = options ?
|
|
379
|
-
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
380
|
-
options
|
|
381
|
-
: {...options, mutation: {...options.mutation, mutationKey}}
|
|
382
|
-
: {mutation: { mutationKey, }, fetch: undefined};
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<typeof dogsImportBreedarchiveRecentCreate>>, {data: ImportBreedarchiveRecentRequest}> = (props) => {
|
|
388
|
-
const {data} = props ?? {};
|
|
389
|
-
|
|
390
|
-
return dogsImportBreedarchiveRecentCreate(data,fetchOptions)
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
return { mutationFn, ...mutationOptions }}
|
|
399
|
-
|
|
400
|
-
export type DogsImportBreedarchiveRecentCreateMutationResult = NonNullable<Awaited<ReturnType<typeof dogsImportBreedarchiveRecentCreate>>>
|
|
401
|
-
export type DogsImportBreedarchiveRecentCreateMutationBody = ImportBreedarchiveRecentRequest
|
|
402
|
-
export type DogsImportBreedarchiveRecentCreateMutationError = void
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* @summary Импорт последних обновлений BreedArchive
|
|
406
|
-
*/
|
|
407
|
-
export const useDogsImportBreedarchiveRecentCreate = <TError = void,
|
|
408
|
-
TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof dogsImportBreedarchiveRecentCreate>>, TError,{data: ImportBreedarchiveRecentRequest}, TContext>, fetch?: RequestInit}
|
|
409
|
-
): UseMutationResult<
|
|
410
|
-
Awaited<ReturnType<typeof dogsImportBreedarchiveRecentCreate>>,
|
|
411
|
-
TError,
|
|
412
|
-
{data: ImportBreedarchiveRecentRequest},
|
|
413
|
-
TContext
|
|
414
|
-
> => {
|
|
415
|
-
return useMutation(getDogsImportBreedarchiveRecentCreateMutationOptions(options));
|
|
416
|
-
}
|
|
417
|
-
|