@omerikanec/api-client-demo 0.0.1
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 +895 -0
- package/dist/api.schemas.ts +1923 -0
- package/dist/auth/auth.ts +221 -0
- package/dist/breed/breed.ts +434 -0
- package/dist/club-documents/club-documents.ts +231 -0
- package/dist/club-stats/club-stats.ts +122 -0
- package/dist/content-dictionary/content-dictionary.ts +345 -0
- package/dist/dog-references/dog-references.ts +1043 -0
- package/dist/dogs/dogs.ts +972 -0
- package/dist/event-reports/event-reports.ts +231 -0
- package/dist/events/events.ts +231 -0
- package/dist/galleries/galleries.ts +332 -0
- package/dist/home/home.ts +216 -0
- package/dist/import-breedarchive/import-breedarchive.ts +417 -0
- package/dist/import-hybrid/import-hybrid.ts +320 -0
- package/dist/import-hybrid-full/import-hybrid-full.ts +320 -0
- package/dist/import-zooportal/import-zooportal.ts +335 -0
- package/dist/index.ts +32 -0
- package/dist/judges/judges.ts +434 -0
- package/dist/leadership/leadership.ts +433 -0
- package/dist/my-achievements/my-achievements.ts +243 -0
- package/dist/my-applications/my-applications.ts +665 -0
- package/dist/my-dogs/my-dogs.ts +772 -0
- package/dist/my-kennels/my-kennels.ts +665 -0
- package/dist/my-litters/my-litters.ts +665 -0
- package/dist/news/news.ts +231 -0
- package/dist/pages/pages.ts +231 -0
- package/dist/profile/profile.ts +246 -0
- package/dist/status-of-import-task/status-of-import-task.ts +129 -0
- package/package.json +37 -0
|
@@ -0,0 +1,417 @@
|
|
|
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
|
+
|