@brigadasos/nadeshiko-sdk 1.0.0 → 1.4.0-dev.2819d72
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/LICENSE +21 -0
- package/README.md +22 -125
- package/dist/client/client.gen.d.ts.map +1 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/types.gen.d.ts.map +1 -0
- package/dist/client/utils.gen.d.ts.map +1 -0
- package/dist/client.gen.d.ts.map +1 -0
- package/dist/core/auth.gen.d.ts.map +1 -0
- package/dist/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/core/params.gen.d.ts.map +1 -0
- package/dist/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/core/types.gen.d.ts.map +1 -0
- package/dist/core/utils.gen.d.ts.map +1 -0
- package/dist/index.cjs +1482 -0
- package/dist/index.cjs.map +20 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1461 -6
- package/dist/index.js.map +20 -1
- package/dist/internal/lists.gen.d.ts +2 -0
- package/dist/internal/lists.gen.d.ts.map +1 -0
- package/dist/internal/media.gen.d.ts +2 -0
- package/dist/internal/media.gen.d.ts.map +1 -0
- package/dist/internal/search.gen.d.ts +2 -0
- package/dist/internal/search.gen.d.ts.map +1 -0
- package/dist/internal.gen.d.ts +4 -0
- package/dist/internal.gen.d.ts.map +1 -0
- package/dist/nadeshiko.gen.d.ts +74 -0
- package/dist/nadeshiko.gen.d.ts.map +1 -0
- package/dist/sdk.gen.d.ts +641 -0
- package/dist/sdk.gen.d.ts.map +1 -0
- package/dist/types.gen.d.ts +4793 -0
- package/dist/types.gen.d.ts.map +1 -0
- package/package.json +13 -20
- package/dist/generated/client/client.gen.d.ts.map +0 -1
- package/dist/generated/client/client.gen.js +0 -236
- package/dist/generated/client/client.gen.js.map +0 -1
- package/dist/generated/client/index.d.ts.map +0 -1
- package/dist/generated/client/index.js +0 -7
- package/dist/generated/client/index.js.map +0 -1
- package/dist/generated/client/types.gen.d.ts.map +0 -1
- package/dist/generated/client/types.gen.js +0 -3
- package/dist/generated/client/types.gen.js.map +0 -1
- package/dist/generated/client/utils.gen.d.ts.map +0 -1
- package/dist/generated/client/utils.gen.js +0 -234
- package/dist/generated/client/utils.gen.js.map +0 -1
- package/dist/generated/client.gen.d.ts.map +0 -1
- package/dist/generated/client.gen.js +0 -4
- package/dist/generated/client.gen.js.map +0 -1
- package/dist/generated/core/auth.gen.d.ts.map +0 -1
- package/dist/generated/core/auth.gen.js +0 -15
- package/dist/generated/core/auth.gen.js.map +0 -1
- package/dist/generated/core/bodySerializer.gen.d.ts.map +0 -1
- package/dist/generated/core/bodySerializer.gen.js +0 -58
- package/dist/generated/core/bodySerializer.gen.js.map +0 -1
- package/dist/generated/core/params.gen.d.ts.map +0 -1
- package/dist/generated/core/params.gen.js +0 -101
- package/dist/generated/core/params.gen.js.map +0 -1
- package/dist/generated/core/pathSerializer.gen.d.ts.map +0 -1
- package/dist/generated/core/pathSerializer.gen.js +0 -115
- package/dist/generated/core/pathSerializer.gen.js.map +0 -1
- package/dist/generated/core/queryKeySerializer.gen.d.ts.map +0 -1
- package/dist/generated/core/queryKeySerializer.gen.js +0 -100
- package/dist/generated/core/queryKeySerializer.gen.js.map +0 -1
- package/dist/generated/core/serverSentEvents.gen.d.ts.map +0 -1
- package/dist/generated/core/serverSentEvents.gen.js +0 -138
- package/dist/generated/core/serverSentEvents.gen.js.map +0 -1
- package/dist/generated/core/types.gen.d.ts.map +0 -1
- package/dist/generated/core/types.gen.js +0 -3
- package/dist/generated/core/types.gen.js.map +0 -1
- package/dist/generated/core/utils.gen.d.ts.map +0 -1
- package/dist/generated/core/utils.gen.js +0 -88
- package/dist/generated/core/utils.gen.js.map +0 -1
- package/dist/generated/index.d.ts +0 -3
- package/dist/generated/index.d.ts.map +0 -1
- package/dist/generated/index.js +0 -3
- package/dist/generated/index.js.map +0 -1
- package/dist/generated/sdk.gen.d.ts +0 -97
- package/dist/generated/sdk.gen.d.ts.map +0 -1
- package/dist/generated/sdk.gen.js +0 -132
- package/dist/generated/sdk.gen.js.map +0 -1
- package/dist/generated/types.gen.d.ts +0 -726
- package/dist/generated/types.gen.d.ts.map +0 -1
- package/dist/generated/types.gen.js +0 -3
- package/dist/generated/types.gen.js.map +0 -1
- package/dist/nadeshiko.d.ts +0 -70
- package/dist/nadeshiko.d.ts.map +0 -1
- package/dist/nadeshiko.js +0 -84
- package/dist/nadeshiko.js.map +0 -1
- /package/dist/{generated/client → client}/client.gen.d.ts +0 -0
- /package/dist/{generated/client → client}/index.d.ts +0 -0
- /package/dist/{generated/client → client}/types.gen.d.ts +0 -0
- /package/dist/{generated/client → client}/utils.gen.d.ts +0 -0
- /package/dist/{generated/client.gen.d.ts → client.gen.d.ts} +0 -0
- /package/dist/{generated/core → core}/auth.gen.d.ts +0 -0
- /package/dist/{generated/core → core}/bodySerializer.gen.d.ts +0 -0
- /package/dist/{generated/core → core}/params.gen.d.ts +0 -0
- /package/dist/{generated/core → core}/pathSerializer.gen.d.ts +0 -0
- /package/dist/{generated/core → core}/queryKeySerializer.gen.d.ts +0 -0
- /package/dist/{generated/core → core}/serverSentEvents.gen.d.ts +0 -0
- /package/dist/{generated/core → core}/types.gen.d.ts +0 -0
- /package/dist/{generated/core → core}/utils.gen.d.ts +0 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,1482 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
6
|
+
var __toCommonJS = (from) => {
|
|
7
|
+
var entry = __moduleCache.get(from), desc;
|
|
8
|
+
if (entry)
|
|
9
|
+
return entry;
|
|
10
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
}));
|
|
16
|
+
__moduleCache.set(from, entry);
|
|
17
|
+
return entry;
|
|
18
|
+
};
|
|
19
|
+
var __export = (target, all) => {
|
|
20
|
+
for (var name in all)
|
|
21
|
+
__defProp(target, name, {
|
|
22
|
+
get: all[name],
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
set: (newValue) => all[name] = () => newValue
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// generated/dev/index.ts
|
|
30
|
+
var exports_dev = {};
|
|
31
|
+
__export(exports_dev, {
|
|
32
|
+
userReportIndex: () => userReportIndex,
|
|
33
|
+
userReportCreate: () => userReportCreate,
|
|
34
|
+
userQuotaShow: () => userQuotaShow,
|
|
35
|
+
userPreferencesUpdate: () => userPreferencesUpdate,
|
|
36
|
+
userPreferencesShow: () => userPreferencesShow,
|
|
37
|
+
userExportShow: () => userExportShow,
|
|
38
|
+
userActivityStatsShow: () => userActivityStatsShow,
|
|
39
|
+
userActivityIndex: () => userActivityIndex,
|
|
40
|
+
userActivityDestroy: () => userActivityDestroy,
|
|
41
|
+
seiyuuShow: () => seiyuuShow,
|
|
42
|
+
segmentUpdate: () => segmentUpdate,
|
|
43
|
+
segmentShowByUuid: () => segmentShowByUuid,
|
|
44
|
+
segmentShow: () => segmentShow,
|
|
45
|
+
segmentIndex: () => segmentIndex,
|
|
46
|
+
segmentDestroy: () => segmentDestroy,
|
|
47
|
+
segmentCreate: () => segmentCreate,
|
|
48
|
+
segmentContextShow: () => segmentContextShow,
|
|
49
|
+
searchWords: () => searchWords,
|
|
50
|
+
searchStats: () => searchStats,
|
|
51
|
+
searchIndex: () => searchIndex,
|
|
52
|
+
search: () => exports_search_gen,
|
|
53
|
+
mediaUpdate: () => mediaUpdate,
|
|
54
|
+
mediaShow: () => mediaShow,
|
|
55
|
+
mediaIndex: () => mediaIndex,
|
|
56
|
+
mediaDestroy: () => mediaDestroy,
|
|
57
|
+
mediaCreate: () => mediaCreate,
|
|
58
|
+
media: () => exports_media_gen,
|
|
59
|
+
lists: () => exports_lists_gen,
|
|
60
|
+
listUpdateSegment: () => listUpdateSegment,
|
|
61
|
+
listUpdateItem: () => listUpdateItem,
|
|
62
|
+
listUpdate: () => listUpdate,
|
|
63
|
+
listShow: () => listShow,
|
|
64
|
+
listRemoveSegment: () => listRemoveSegment,
|
|
65
|
+
listRemoveItem: () => listRemoveItem,
|
|
66
|
+
listIndex: () => listIndex,
|
|
67
|
+
listGetSegments: () => listGetSegments,
|
|
68
|
+
listDestroy: () => listDestroy,
|
|
69
|
+
listCreate: () => listCreate,
|
|
70
|
+
listAddSegment: () => listAddSegment,
|
|
71
|
+
listAddItem: () => listAddItem,
|
|
72
|
+
labIndex: () => labIndex,
|
|
73
|
+
healthCheck: () => healthCheck,
|
|
74
|
+
episodeUpdate: () => episodeUpdate,
|
|
75
|
+
episodeShow: () => episodeShow,
|
|
76
|
+
episodeIndex: () => episodeIndex,
|
|
77
|
+
episodeDestroy: () => episodeDestroy,
|
|
78
|
+
episodeCreate: () => episodeCreate,
|
|
79
|
+
createNadeshikoClient: () => createNadeshikoClient,
|
|
80
|
+
createClient: () => createClient2,
|
|
81
|
+
client: () => client,
|
|
82
|
+
characterShow: () => characterShow,
|
|
83
|
+
adminReviewRunShow: () => adminReviewRunShow,
|
|
84
|
+
adminReviewRunIndex: () => adminReviewRunIndex,
|
|
85
|
+
adminReviewRunCreate: () => adminReviewRunCreate,
|
|
86
|
+
adminReviewCheckUpdate: () => adminReviewCheckUpdate,
|
|
87
|
+
adminReviewCheckIndex: () => adminReviewCheckIndex,
|
|
88
|
+
adminReviewAllowlistIndex: () => adminReviewAllowlistIndex,
|
|
89
|
+
adminReviewAllowlistDestroy: () => adminReviewAllowlistDestroy,
|
|
90
|
+
adminReviewAllowlistCreate: () => adminReviewAllowlistCreate,
|
|
91
|
+
adminReportUpdate: () => adminReportUpdate,
|
|
92
|
+
adminReportIndex: () => adminReportIndex,
|
|
93
|
+
adminReindexCreate: () => adminReindexCreate,
|
|
94
|
+
adminQueueStatsIndex: () => adminQueueStatsIndex,
|
|
95
|
+
adminQueueShow: () => adminQueueShow,
|
|
96
|
+
adminQueueRetryCreate: () => adminQueueRetryCreate,
|
|
97
|
+
adminQueueFailedIndex: () => adminQueueFailedIndex,
|
|
98
|
+
adminQueueFailedDestroy: () => adminQueueFailedDestroy,
|
|
99
|
+
adminMorphemeBackfillCreate: () => adminMorphemeBackfillCreate
|
|
100
|
+
});
|
|
101
|
+
module.exports = __toCommonJS(exports_dev);
|
|
102
|
+
|
|
103
|
+
// generated/dev/core/bodySerializer.gen.ts
|
|
104
|
+
var jsonBodySerializer = {
|
|
105
|
+
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
106
|
+
};
|
|
107
|
+
// generated/dev/core/params.gen.ts
|
|
108
|
+
var extraPrefixesMap = {
|
|
109
|
+
$body_: "body",
|
|
110
|
+
$headers_: "headers",
|
|
111
|
+
$path_: "path",
|
|
112
|
+
$query_: "query"
|
|
113
|
+
};
|
|
114
|
+
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
115
|
+
// generated/dev/core/serverSentEvents.gen.ts
|
|
116
|
+
var createSseClient = ({
|
|
117
|
+
onRequest,
|
|
118
|
+
onSseError,
|
|
119
|
+
onSseEvent,
|
|
120
|
+
responseTransformer,
|
|
121
|
+
responseValidator,
|
|
122
|
+
sseDefaultRetryDelay,
|
|
123
|
+
sseMaxRetryAttempts,
|
|
124
|
+
sseMaxRetryDelay,
|
|
125
|
+
sseSleepFn,
|
|
126
|
+
url,
|
|
127
|
+
...options
|
|
128
|
+
}) => {
|
|
129
|
+
let lastEventId;
|
|
130
|
+
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
131
|
+
const createStream = async function* () {
|
|
132
|
+
let retryDelay = sseDefaultRetryDelay ?? 3000;
|
|
133
|
+
let attempt = 0;
|
|
134
|
+
const signal = options.signal ?? new AbortController().signal;
|
|
135
|
+
while (true) {
|
|
136
|
+
if (signal.aborted)
|
|
137
|
+
break;
|
|
138
|
+
attempt++;
|
|
139
|
+
const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
|
|
140
|
+
if (lastEventId !== undefined) {
|
|
141
|
+
headers.set("Last-Event-ID", lastEventId);
|
|
142
|
+
}
|
|
143
|
+
try {
|
|
144
|
+
const requestInit = {
|
|
145
|
+
redirect: "follow",
|
|
146
|
+
...options,
|
|
147
|
+
body: options.serializedBody,
|
|
148
|
+
headers,
|
|
149
|
+
signal
|
|
150
|
+
};
|
|
151
|
+
let request = new Request(url, requestInit);
|
|
152
|
+
if (onRequest) {
|
|
153
|
+
request = await onRequest(url, requestInit);
|
|
154
|
+
}
|
|
155
|
+
const _fetch = options.fetch ?? globalThis.fetch;
|
|
156
|
+
const response = await _fetch(request);
|
|
157
|
+
if (!response.ok)
|
|
158
|
+
throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
159
|
+
if (!response.body)
|
|
160
|
+
throw new Error("No body in SSE response");
|
|
161
|
+
const reader = response.body.pipeThrough(new TextDecoderStream).getReader();
|
|
162
|
+
let buffer = "";
|
|
163
|
+
const abortHandler = () => {
|
|
164
|
+
try {
|
|
165
|
+
reader.cancel();
|
|
166
|
+
} catch {}
|
|
167
|
+
};
|
|
168
|
+
signal.addEventListener("abort", abortHandler);
|
|
169
|
+
try {
|
|
170
|
+
while (true) {
|
|
171
|
+
const { done, value } = await reader.read();
|
|
172
|
+
if (done)
|
|
173
|
+
break;
|
|
174
|
+
buffer += value;
|
|
175
|
+
buffer = buffer.replace(/\r\n/g, `
|
|
176
|
+
`).replace(/\r/g, `
|
|
177
|
+
`);
|
|
178
|
+
const chunks = buffer.split(`
|
|
179
|
+
|
|
180
|
+
`);
|
|
181
|
+
buffer = chunks.pop() ?? "";
|
|
182
|
+
for (const chunk of chunks) {
|
|
183
|
+
const lines = chunk.split(`
|
|
184
|
+
`);
|
|
185
|
+
const dataLines = [];
|
|
186
|
+
let eventName;
|
|
187
|
+
for (const line of lines) {
|
|
188
|
+
if (line.startsWith("data:")) {
|
|
189
|
+
dataLines.push(line.replace(/^data:\s*/, ""));
|
|
190
|
+
} else if (line.startsWith("event:")) {
|
|
191
|
+
eventName = line.replace(/^event:\s*/, "");
|
|
192
|
+
} else if (line.startsWith("id:")) {
|
|
193
|
+
lastEventId = line.replace(/^id:\s*/, "");
|
|
194
|
+
} else if (line.startsWith("retry:")) {
|
|
195
|
+
const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
|
|
196
|
+
if (!Number.isNaN(parsed)) {
|
|
197
|
+
retryDelay = parsed;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
let data;
|
|
202
|
+
let parsedJson = false;
|
|
203
|
+
if (dataLines.length) {
|
|
204
|
+
const rawData = dataLines.join(`
|
|
205
|
+
`);
|
|
206
|
+
try {
|
|
207
|
+
data = JSON.parse(rawData);
|
|
208
|
+
parsedJson = true;
|
|
209
|
+
} catch {
|
|
210
|
+
data = rawData;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (parsedJson) {
|
|
214
|
+
if (responseValidator) {
|
|
215
|
+
await responseValidator(data);
|
|
216
|
+
}
|
|
217
|
+
if (responseTransformer) {
|
|
218
|
+
data = await responseTransformer(data);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
onSseEvent?.({
|
|
222
|
+
data,
|
|
223
|
+
event: eventName,
|
|
224
|
+
id: lastEventId,
|
|
225
|
+
retry: retryDelay
|
|
226
|
+
});
|
|
227
|
+
if (dataLines.length) {
|
|
228
|
+
yield data;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
} finally {
|
|
233
|
+
signal.removeEventListener("abort", abortHandler);
|
|
234
|
+
reader.releaseLock();
|
|
235
|
+
}
|
|
236
|
+
break;
|
|
237
|
+
} catch (error) {
|
|
238
|
+
onSseError?.(error);
|
|
239
|
+
if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);
|
|
243
|
+
await sleep(backoff);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
const stream = createStream();
|
|
248
|
+
return { stream };
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// generated/dev/core/pathSerializer.gen.ts
|
|
252
|
+
var separatorArrayExplode = (style) => {
|
|
253
|
+
switch (style) {
|
|
254
|
+
case "label":
|
|
255
|
+
return ".";
|
|
256
|
+
case "matrix":
|
|
257
|
+
return ";";
|
|
258
|
+
case "simple":
|
|
259
|
+
return ",";
|
|
260
|
+
default:
|
|
261
|
+
return "&";
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
var separatorArrayNoExplode = (style) => {
|
|
265
|
+
switch (style) {
|
|
266
|
+
case "form":
|
|
267
|
+
return ",";
|
|
268
|
+
case "pipeDelimited":
|
|
269
|
+
return "|";
|
|
270
|
+
case "spaceDelimited":
|
|
271
|
+
return "%20";
|
|
272
|
+
default:
|
|
273
|
+
return ",";
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
var separatorObjectExplode = (style) => {
|
|
277
|
+
switch (style) {
|
|
278
|
+
case "label":
|
|
279
|
+
return ".";
|
|
280
|
+
case "matrix":
|
|
281
|
+
return ";";
|
|
282
|
+
case "simple":
|
|
283
|
+
return ",";
|
|
284
|
+
default:
|
|
285
|
+
return "&";
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
var serializeArrayParam = ({
|
|
289
|
+
allowReserved,
|
|
290
|
+
explode,
|
|
291
|
+
name,
|
|
292
|
+
style,
|
|
293
|
+
value
|
|
294
|
+
}) => {
|
|
295
|
+
if (!explode) {
|
|
296
|
+
const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
|
|
297
|
+
switch (style) {
|
|
298
|
+
case "label":
|
|
299
|
+
return `.${joinedValues2}`;
|
|
300
|
+
case "matrix":
|
|
301
|
+
return `;${name}=${joinedValues2}`;
|
|
302
|
+
case "simple":
|
|
303
|
+
return joinedValues2;
|
|
304
|
+
default:
|
|
305
|
+
return `${name}=${joinedValues2}`;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
const separator = separatorArrayExplode(style);
|
|
309
|
+
const joinedValues = value.map((v) => {
|
|
310
|
+
if (style === "label" || style === "simple") {
|
|
311
|
+
return allowReserved ? v : encodeURIComponent(v);
|
|
312
|
+
}
|
|
313
|
+
return serializePrimitiveParam({
|
|
314
|
+
allowReserved,
|
|
315
|
+
name,
|
|
316
|
+
value: v
|
|
317
|
+
});
|
|
318
|
+
}).join(separator);
|
|
319
|
+
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
320
|
+
};
|
|
321
|
+
var serializePrimitiveParam = ({
|
|
322
|
+
allowReserved,
|
|
323
|
+
name,
|
|
324
|
+
value
|
|
325
|
+
}) => {
|
|
326
|
+
if (value === undefined || value === null) {
|
|
327
|
+
return "";
|
|
328
|
+
}
|
|
329
|
+
if (typeof value === "object") {
|
|
330
|
+
throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");
|
|
331
|
+
}
|
|
332
|
+
return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
|
|
333
|
+
};
|
|
334
|
+
var serializeObjectParam = ({
|
|
335
|
+
allowReserved,
|
|
336
|
+
explode,
|
|
337
|
+
name,
|
|
338
|
+
style,
|
|
339
|
+
value,
|
|
340
|
+
valueOnly
|
|
341
|
+
}) => {
|
|
342
|
+
if (value instanceof Date) {
|
|
343
|
+
return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
|
|
344
|
+
}
|
|
345
|
+
if (style !== "deepObject" && !explode) {
|
|
346
|
+
let values = [];
|
|
347
|
+
Object.entries(value).forEach(([key, v]) => {
|
|
348
|
+
values = [
|
|
349
|
+
...values,
|
|
350
|
+
key,
|
|
351
|
+
allowReserved ? v : encodeURIComponent(v)
|
|
352
|
+
];
|
|
353
|
+
});
|
|
354
|
+
const joinedValues2 = values.join(",");
|
|
355
|
+
switch (style) {
|
|
356
|
+
case "form":
|
|
357
|
+
return `${name}=${joinedValues2}`;
|
|
358
|
+
case "label":
|
|
359
|
+
return `.${joinedValues2}`;
|
|
360
|
+
case "matrix":
|
|
361
|
+
return `;${name}=${joinedValues2}`;
|
|
362
|
+
default:
|
|
363
|
+
return joinedValues2;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
const separator = separatorObjectExplode(style);
|
|
367
|
+
const joinedValues = Object.entries(value).map(([key, v]) => serializePrimitiveParam({
|
|
368
|
+
allowReserved,
|
|
369
|
+
name: style === "deepObject" ? `${name}[${key}]` : key,
|
|
370
|
+
value: v
|
|
371
|
+
})).join(separator);
|
|
372
|
+
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
// generated/dev/core/utils.gen.ts
|
|
376
|
+
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
377
|
+
var defaultPathSerializer = ({ path, url: _url }) => {
|
|
378
|
+
let url = _url;
|
|
379
|
+
const matches = _url.match(PATH_PARAM_RE);
|
|
380
|
+
if (matches) {
|
|
381
|
+
for (const match of matches) {
|
|
382
|
+
let explode = false;
|
|
383
|
+
let name = match.substring(1, match.length - 1);
|
|
384
|
+
let style = "simple";
|
|
385
|
+
if (name.endsWith("*")) {
|
|
386
|
+
explode = true;
|
|
387
|
+
name = name.substring(0, name.length - 1);
|
|
388
|
+
}
|
|
389
|
+
if (name.startsWith(".")) {
|
|
390
|
+
name = name.substring(1);
|
|
391
|
+
style = "label";
|
|
392
|
+
} else if (name.startsWith(";")) {
|
|
393
|
+
name = name.substring(1);
|
|
394
|
+
style = "matrix";
|
|
395
|
+
}
|
|
396
|
+
const value = path[name];
|
|
397
|
+
if (value === undefined || value === null) {
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
if (Array.isArray(value)) {
|
|
401
|
+
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
if (typeof value === "object") {
|
|
405
|
+
url = url.replace(match, serializeObjectParam({
|
|
406
|
+
explode,
|
|
407
|
+
name,
|
|
408
|
+
style,
|
|
409
|
+
value,
|
|
410
|
+
valueOnly: true
|
|
411
|
+
}));
|
|
412
|
+
continue;
|
|
413
|
+
}
|
|
414
|
+
if (style === "matrix") {
|
|
415
|
+
url = url.replace(match, `;${serializePrimitiveParam({
|
|
416
|
+
name,
|
|
417
|
+
value
|
|
418
|
+
})}`);
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
|
|
422
|
+
url = url.replace(match, replaceValue);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return url;
|
|
426
|
+
};
|
|
427
|
+
var getUrl = ({
|
|
428
|
+
baseUrl,
|
|
429
|
+
path,
|
|
430
|
+
query,
|
|
431
|
+
querySerializer,
|
|
432
|
+
url: _url
|
|
433
|
+
}) => {
|
|
434
|
+
const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
|
|
435
|
+
let url = (baseUrl ?? "") + pathUrl;
|
|
436
|
+
if (path) {
|
|
437
|
+
url = defaultPathSerializer({ path, url });
|
|
438
|
+
}
|
|
439
|
+
let search = query ? querySerializer(query) : "";
|
|
440
|
+
if (search.startsWith("?")) {
|
|
441
|
+
search = search.substring(1);
|
|
442
|
+
}
|
|
443
|
+
if (search) {
|
|
444
|
+
url += `?${search}`;
|
|
445
|
+
}
|
|
446
|
+
return url;
|
|
447
|
+
};
|
|
448
|
+
function getValidRequestBody(options) {
|
|
449
|
+
const hasBody = options.body !== undefined;
|
|
450
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
451
|
+
if (isSerializedBody) {
|
|
452
|
+
if ("serializedBody" in options) {
|
|
453
|
+
const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== "";
|
|
454
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
455
|
+
}
|
|
456
|
+
return options.body !== "" ? options.body : null;
|
|
457
|
+
}
|
|
458
|
+
if (hasBody) {
|
|
459
|
+
return options.body;
|
|
460
|
+
}
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
// generated/dev/core/auth.gen.ts
|
|
465
|
+
var getAuthToken = async (auth, callback) => {
|
|
466
|
+
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
467
|
+
if (!token) {
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
if (auth.scheme === "bearer") {
|
|
471
|
+
return `Bearer ${token}`;
|
|
472
|
+
}
|
|
473
|
+
if (auth.scheme === "basic") {
|
|
474
|
+
return `Basic ${btoa(token)}`;
|
|
475
|
+
}
|
|
476
|
+
return token;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
// generated/dev/client/utils.gen.ts
|
|
480
|
+
var createQuerySerializer = ({
|
|
481
|
+
parameters = {},
|
|
482
|
+
...args
|
|
483
|
+
} = {}) => {
|
|
484
|
+
const querySerializer = (queryParams) => {
|
|
485
|
+
const search = [];
|
|
486
|
+
if (queryParams && typeof queryParams === "object") {
|
|
487
|
+
for (const name in queryParams) {
|
|
488
|
+
const value = queryParams[name];
|
|
489
|
+
if (value === undefined || value === null) {
|
|
490
|
+
continue;
|
|
491
|
+
}
|
|
492
|
+
const options = parameters[name] || args;
|
|
493
|
+
if (Array.isArray(value)) {
|
|
494
|
+
const serializedArray = serializeArrayParam({
|
|
495
|
+
allowReserved: options.allowReserved,
|
|
496
|
+
explode: true,
|
|
497
|
+
name,
|
|
498
|
+
style: "form",
|
|
499
|
+
value,
|
|
500
|
+
...options.array
|
|
501
|
+
});
|
|
502
|
+
if (serializedArray)
|
|
503
|
+
search.push(serializedArray);
|
|
504
|
+
} else if (typeof value === "object") {
|
|
505
|
+
const serializedObject = serializeObjectParam({
|
|
506
|
+
allowReserved: options.allowReserved,
|
|
507
|
+
explode: true,
|
|
508
|
+
name,
|
|
509
|
+
style: "deepObject",
|
|
510
|
+
value,
|
|
511
|
+
...options.object
|
|
512
|
+
});
|
|
513
|
+
if (serializedObject)
|
|
514
|
+
search.push(serializedObject);
|
|
515
|
+
} else {
|
|
516
|
+
const serializedPrimitive = serializePrimitiveParam({
|
|
517
|
+
allowReserved: options.allowReserved,
|
|
518
|
+
name,
|
|
519
|
+
value
|
|
520
|
+
});
|
|
521
|
+
if (serializedPrimitive)
|
|
522
|
+
search.push(serializedPrimitive);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return search.join("&");
|
|
527
|
+
};
|
|
528
|
+
return querySerializer;
|
|
529
|
+
};
|
|
530
|
+
var getParseAs = (contentType) => {
|
|
531
|
+
if (!contentType) {
|
|
532
|
+
return "stream";
|
|
533
|
+
}
|
|
534
|
+
const cleanContent = contentType.split(";")[0]?.trim();
|
|
535
|
+
if (!cleanContent) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
|
|
539
|
+
return "json";
|
|
540
|
+
}
|
|
541
|
+
if (cleanContent === "multipart/form-data") {
|
|
542
|
+
return "formData";
|
|
543
|
+
}
|
|
544
|
+
if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
|
|
545
|
+
return "blob";
|
|
546
|
+
}
|
|
547
|
+
if (cleanContent.startsWith("text/")) {
|
|
548
|
+
return "text";
|
|
549
|
+
}
|
|
550
|
+
return;
|
|
551
|
+
};
|
|
552
|
+
var checkForExistence = (options, name) => {
|
|
553
|
+
if (!name) {
|
|
554
|
+
return false;
|
|
555
|
+
}
|
|
556
|
+
if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
|
|
557
|
+
return true;
|
|
558
|
+
}
|
|
559
|
+
return false;
|
|
560
|
+
};
|
|
561
|
+
var setAuthParams = async ({
|
|
562
|
+
security,
|
|
563
|
+
...options
|
|
564
|
+
}) => {
|
|
565
|
+
for (const auth of security) {
|
|
566
|
+
if (checkForExistence(options, auth.name)) {
|
|
567
|
+
continue;
|
|
568
|
+
}
|
|
569
|
+
const token = await getAuthToken(auth, options.auth);
|
|
570
|
+
if (!token) {
|
|
571
|
+
continue;
|
|
572
|
+
}
|
|
573
|
+
const name = auth.name ?? "Authorization";
|
|
574
|
+
switch (auth.in) {
|
|
575
|
+
case "query":
|
|
576
|
+
if (!options.query) {
|
|
577
|
+
options.query = {};
|
|
578
|
+
}
|
|
579
|
+
options.query[name] = token;
|
|
580
|
+
break;
|
|
581
|
+
case "cookie":
|
|
582
|
+
options.headers.append("Cookie", `${name}=${token}`);
|
|
583
|
+
break;
|
|
584
|
+
case "header":
|
|
585
|
+
default:
|
|
586
|
+
options.headers.set(name, token);
|
|
587
|
+
break;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
var buildUrl = (options) => getUrl({
|
|
592
|
+
baseUrl: options.baseUrl,
|
|
593
|
+
path: options.path,
|
|
594
|
+
query: options.query,
|
|
595
|
+
querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
|
|
596
|
+
url: options.url
|
|
597
|
+
});
|
|
598
|
+
var mergeConfigs = (a, b) => {
|
|
599
|
+
const config = { ...a, ...b };
|
|
600
|
+
if (config.baseUrl?.endsWith("/")) {
|
|
601
|
+
config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
|
|
602
|
+
}
|
|
603
|
+
config.headers = mergeHeaders(a.headers, b.headers);
|
|
604
|
+
return config;
|
|
605
|
+
};
|
|
606
|
+
var headersEntries = (headers) => {
|
|
607
|
+
const entries = [];
|
|
608
|
+
headers.forEach((value, key) => {
|
|
609
|
+
entries.push([key, value]);
|
|
610
|
+
});
|
|
611
|
+
return entries;
|
|
612
|
+
};
|
|
613
|
+
var mergeHeaders = (...headers) => {
|
|
614
|
+
const mergedHeaders = new Headers;
|
|
615
|
+
for (const header of headers) {
|
|
616
|
+
if (!header) {
|
|
617
|
+
continue;
|
|
618
|
+
}
|
|
619
|
+
const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
|
|
620
|
+
for (const [key, value] of iterator) {
|
|
621
|
+
if (value === null) {
|
|
622
|
+
mergedHeaders.delete(key);
|
|
623
|
+
} else if (Array.isArray(value)) {
|
|
624
|
+
for (const v of value) {
|
|
625
|
+
mergedHeaders.append(key, v);
|
|
626
|
+
}
|
|
627
|
+
} else if (value !== undefined) {
|
|
628
|
+
mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
return mergedHeaders;
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
class Interceptors {
|
|
636
|
+
fns = [];
|
|
637
|
+
clear() {
|
|
638
|
+
this.fns = [];
|
|
639
|
+
}
|
|
640
|
+
eject(id) {
|
|
641
|
+
const index = this.getInterceptorIndex(id);
|
|
642
|
+
if (this.fns[index]) {
|
|
643
|
+
this.fns[index] = null;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
exists(id) {
|
|
647
|
+
const index = this.getInterceptorIndex(id);
|
|
648
|
+
return Boolean(this.fns[index]);
|
|
649
|
+
}
|
|
650
|
+
getInterceptorIndex(id) {
|
|
651
|
+
if (typeof id === "number") {
|
|
652
|
+
return this.fns[id] ? id : -1;
|
|
653
|
+
}
|
|
654
|
+
return this.fns.indexOf(id);
|
|
655
|
+
}
|
|
656
|
+
update(id, fn) {
|
|
657
|
+
const index = this.getInterceptorIndex(id);
|
|
658
|
+
if (this.fns[index]) {
|
|
659
|
+
this.fns[index] = fn;
|
|
660
|
+
return id;
|
|
661
|
+
}
|
|
662
|
+
return false;
|
|
663
|
+
}
|
|
664
|
+
use(fn) {
|
|
665
|
+
this.fns.push(fn);
|
|
666
|
+
return this.fns.length - 1;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
var createInterceptors = () => ({
|
|
670
|
+
error: new Interceptors,
|
|
671
|
+
request: new Interceptors,
|
|
672
|
+
response: new Interceptors
|
|
673
|
+
});
|
|
674
|
+
var defaultQuerySerializer = createQuerySerializer({
|
|
675
|
+
allowReserved: false,
|
|
676
|
+
array: {
|
|
677
|
+
explode: true,
|
|
678
|
+
style: "form"
|
|
679
|
+
},
|
|
680
|
+
object: {
|
|
681
|
+
explode: true,
|
|
682
|
+
style: "deepObject"
|
|
683
|
+
}
|
|
684
|
+
});
|
|
685
|
+
var defaultHeaders = {
|
|
686
|
+
"Content-Type": "application/json"
|
|
687
|
+
};
|
|
688
|
+
var createConfig = (override = {}) => ({
|
|
689
|
+
...jsonBodySerializer,
|
|
690
|
+
headers: defaultHeaders,
|
|
691
|
+
parseAs: "auto",
|
|
692
|
+
querySerializer: defaultQuerySerializer,
|
|
693
|
+
...override
|
|
694
|
+
});
|
|
695
|
+
|
|
696
|
+
// generated/dev/client/client.gen.ts
|
|
697
|
+
var createClient = (config = {}) => {
|
|
698
|
+
let _config = mergeConfigs(createConfig(), config);
|
|
699
|
+
const getConfig = () => ({ ..._config });
|
|
700
|
+
const setConfig = (config2) => {
|
|
701
|
+
_config = mergeConfigs(_config, config2);
|
|
702
|
+
return getConfig();
|
|
703
|
+
};
|
|
704
|
+
const interceptors = createInterceptors();
|
|
705
|
+
const beforeRequest = async (options) => {
|
|
706
|
+
const opts = {
|
|
707
|
+
..._config,
|
|
708
|
+
...options,
|
|
709
|
+
fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
|
|
710
|
+
headers: mergeHeaders(_config.headers, options.headers),
|
|
711
|
+
serializedBody: undefined
|
|
712
|
+
};
|
|
713
|
+
if (opts.security) {
|
|
714
|
+
await setAuthParams({
|
|
715
|
+
...opts,
|
|
716
|
+
security: opts.security
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
if (opts.requestValidator) {
|
|
720
|
+
await opts.requestValidator(opts);
|
|
721
|
+
}
|
|
722
|
+
if (opts.body !== undefined && opts.bodySerializer) {
|
|
723
|
+
opts.serializedBody = opts.bodySerializer(opts.body);
|
|
724
|
+
}
|
|
725
|
+
if (opts.body === undefined || opts.serializedBody === "") {
|
|
726
|
+
opts.headers.delete("Content-Type");
|
|
727
|
+
}
|
|
728
|
+
const url = buildUrl(opts);
|
|
729
|
+
return { opts, url };
|
|
730
|
+
};
|
|
731
|
+
const request = async (options) => {
|
|
732
|
+
const { opts, url } = await beforeRequest(options);
|
|
733
|
+
const requestInit = {
|
|
734
|
+
redirect: "follow",
|
|
735
|
+
...opts,
|
|
736
|
+
body: getValidRequestBody(opts)
|
|
737
|
+
};
|
|
738
|
+
let request2 = new Request(url, requestInit);
|
|
739
|
+
for (const fn of interceptors.request.fns) {
|
|
740
|
+
if (fn) {
|
|
741
|
+
request2 = await fn(request2, opts);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
const _fetch = opts.fetch;
|
|
745
|
+
let response;
|
|
746
|
+
try {
|
|
747
|
+
response = await _fetch(request2);
|
|
748
|
+
} catch (error2) {
|
|
749
|
+
let finalError2 = error2;
|
|
750
|
+
for (const fn of interceptors.error.fns) {
|
|
751
|
+
if (fn) {
|
|
752
|
+
finalError2 = await fn(error2, undefined, request2, opts);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
finalError2 = finalError2 || {};
|
|
756
|
+
if (opts.throwOnError) {
|
|
757
|
+
throw finalError2;
|
|
758
|
+
}
|
|
759
|
+
return opts.responseStyle === "data" ? undefined : {
|
|
760
|
+
error: finalError2,
|
|
761
|
+
request: request2,
|
|
762
|
+
response: undefined
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
for (const fn of interceptors.response.fns) {
|
|
766
|
+
if (fn) {
|
|
767
|
+
response = await fn(response, request2, opts);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
const result = {
|
|
771
|
+
request: request2,
|
|
772
|
+
response
|
|
773
|
+
};
|
|
774
|
+
if (response.ok) {
|
|
775
|
+
const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
776
|
+
if (response.status === 204 || response.headers.get("Content-Length") === "0") {
|
|
777
|
+
let emptyData;
|
|
778
|
+
switch (parseAs) {
|
|
779
|
+
case "arrayBuffer":
|
|
780
|
+
case "blob":
|
|
781
|
+
case "text":
|
|
782
|
+
emptyData = await response[parseAs]();
|
|
783
|
+
break;
|
|
784
|
+
case "formData":
|
|
785
|
+
emptyData = new FormData;
|
|
786
|
+
break;
|
|
787
|
+
case "stream":
|
|
788
|
+
emptyData = response.body;
|
|
789
|
+
break;
|
|
790
|
+
case "json":
|
|
791
|
+
default:
|
|
792
|
+
emptyData = {};
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
return opts.responseStyle === "data" ? emptyData : {
|
|
796
|
+
data: emptyData,
|
|
797
|
+
...result
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
let data;
|
|
801
|
+
switch (parseAs) {
|
|
802
|
+
case "arrayBuffer":
|
|
803
|
+
case "blob":
|
|
804
|
+
case "formData":
|
|
805
|
+
case "text":
|
|
806
|
+
data = await response[parseAs]();
|
|
807
|
+
break;
|
|
808
|
+
case "json": {
|
|
809
|
+
const text = await response.text();
|
|
810
|
+
data = text ? JSON.parse(text) : {};
|
|
811
|
+
break;
|
|
812
|
+
}
|
|
813
|
+
case "stream":
|
|
814
|
+
return opts.responseStyle === "data" ? response.body : {
|
|
815
|
+
data: response.body,
|
|
816
|
+
...result
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
if (parseAs === "json") {
|
|
820
|
+
if (opts.responseValidator) {
|
|
821
|
+
await opts.responseValidator(data);
|
|
822
|
+
}
|
|
823
|
+
if (opts.responseTransformer) {
|
|
824
|
+
data = await opts.responseTransformer(data);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
return opts.responseStyle === "data" ? data : {
|
|
828
|
+
data,
|
|
829
|
+
...result
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
const textError = await response.text();
|
|
833
|
+
let jsonError;
|
|
834
|
+
try {
|
|
835
|
+
jsonError = JSON.parse(textError);
|
|
836
|
+
} catch {}
|
|
837
|
+
const error = jsonError ?? textError;
|
|
838
|
+
let finalError = error;
|
|
839
|
+
for (const fn of interceptors.error.fns) {
|
|
840
|
+
if (fn) {
|
|
841
|
+
finalError = await fn(error, response, request2, opts);
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
finalError = finalError || {};
|
|
845
|
+
if (opts.throwOnError) {
|
|
846
|
+
throw finalError;
|
|
847
|
+
}
|
|
848
|
+
return opts.responseStyle === "data" ? undefined : {
|
|
849
|
+
error: finalError,
|
|
850
|
+
...result
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
const makeMethodFn = (method) => (options) => request({ ...options, method });
|
|
854
|
+
const makeSseFn = (method) => async (options) => {
|
|
855
|
+
const { opts, url } = await beforeRequest(options);
|
|
856
|
+
return createSseClient({
|
|
857
|
+
...opts,
|
|
858
|
+
body: opts.body,
|
|
859
|
+
headers: opts.headers,
|
|
860
|
+
method,
|
|
861
|
+
onRequest: async (url2, init) => {
|
|
862
|
+
let request2 = new Request(url2, init);
|
|
863
|
+
for (const fn of interceptors.request.fns) {
|
|
864
|
+
if (fn) {
|
|
865
|
+
request2 = await fn(request2, opts);
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
return request2;
|
|
869
|
+
},
|
|
870
|
+
serializedBody: getValidRequestBody(opts),
|
|
871
|
+
url
|
|
872
|
+
});
|
|
873
|
+
};
|
|
874
|
+
return {
|
|
875
|
+
buildUrl,
|
|
876
|
+
connect: makeMethodFn("CONNECT"),
|
|
877
|
+
delete: makeMethodFn("DELETE"),
|
|
878
|
+
get: makeMethodFn("GET"),
|
|
879
|
+
getConfig,
|
|
880
|
+
head: makeMethodFn("HEAD"),
|
|
881
|
+
interceptors,
|
|
882
|
+
options: makeMethodFn("OPTIONS"),
|
|
883
|
+
patch: makeMethodFn("PATCH"),
|
|
884
|
+
post: makeMethodFn("POST"),
|
|
885
|
+
put: makeMethodFn("PUT"),
|
|
886
|
+
request,
|
|
887
|
+
setConfig,
|
|
888
|
+
sse: {
|
|
889
|
+
connect: makeSseFn("CONNECT"),
|
|
890
|
+
delete: makeSseFn("DELETE"),
|
|
891
|
+
get: makeSseFn("GET"),
|
|
892
|
+
head: makeSseFn("HEAD"),
|
|
893
|
+
options: makeSseFn("OPTIONS"),
|
|
894
|
+
patch: makeSseFn("PATCH"),
|
|
895
|
+
post: makeSseFn("POST"),
|
|
896
|
+
put: makeSseFn("PUT"),
|
|
897
|
+
trace: makeSseFn("TRACE")
|
|
898
|
+
},
|
|
899
|
+
trace: makeMethodFn("TRACE")
|
|
900
|
+
};
|
|
901
|
+
};
|
|
902
|
+
// generated/dev/client.gen.ts
|
|
903
|
+
var client = createClient(createConfig({ baseUrl: "http://localhost:5000" }));
|
|
904
|
+
|
|
905
|
+
// generated/dev/sdk.gen.ts
|
|
906
|
+
var healthCheck = (options) => (options?.client ?? client).get({
|
|
907
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
908
|
+
url: "/v1/health",
|
|
909
|
+
...options
|
|
910
|
+
});
|
|
911
|
+
var searchIndex = (options) => (options?.client ?? client).post({
|
|
912
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
913
|
+
in: "cookie",
|
|
914
|
+
name: "nadeshiko.session_token",
|
|
915
|
+
type: "apiKey"
|
|
916
|
+
}],
|
|
917
|
+
url: "/v1/search",
|
|
918
|
+
...options,
|
|
919
|
+
headers: {
|
|
920
|
+
"Content-Type": "application/json",
|
|
921
|
+
...options?.headers
|
|
922
|
+
}
|
|
923
|
+
});
|
|
924
|
+
var searchStats = (options) => (options?.client ?? client).post({
|
|
925
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
926
|
+
in: "cookie",
|
|
927
|
+
name: "nadeshiko.session_token",
|
|
928
|
+
type: "apiKey"
|
|
929
|
+
}],
|
|
930
|
+
url: "/v1/search/stats",
|
|
931
|
+
...options,
|
|
932
|
+
headers: {
|
|
933
|
+
"Content-Type": "application/json",
|
|
934
|
+
...options?.headers
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
var searchWords = (options) => (options.client ?? client).post({
|
|
938
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
939
|
+
in: "cookie",
|
|
940
|
+
name: "nadeshiko.session_token",
|
|
941
|
+
type: "apiKey"
|
|
942
|
+
}],
|
|
943
|
+
url: "/v1/search/words",
|
|
944
|
+
...options,
|
|
945
|
+
headers: {
|
|
946
|
+
"Content-Type": "application/json",
|
|
947
|
+
...options.headers
|
|
948
|
+
}
|
|
949
|
+
});
|
|
950
|
+
var mediaIndex = (options) => (options?.client ?? client).get({
|
|
951
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
952
|
+
url: "/v1/media",
|
|
953
|
+
...options
|
|
954
|
+
});
|
|
955
|
+
var mediaCreate = (options) => (options.client ?? client).post({
|
|
956
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
957
|
+
url: "/v1/media",
|
|
958
|
+
...options,
|
|
959
|
+
headers: {
|
|
960
|
+
"Content-Type": "application/json",
|
|
961
|
+
...options.headers
|
|
962
|
+
}
|
|
963
|
+
});
|
|
964
|
+
var mediaDestroy = (options) => (options.client ?? client).delete({
|
|
965
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
966
|
+
url: "/v1/media/{id}",
|
|
967
|
+
...options
|
|
968
|
+
});
|
|
969
|
+
var mediaShow = (options) => (options.client ?? client).get({
|
|
970
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
971
|
+
url: "/v1/media/{id}",
|
|
972
|
+
...options
|
|
973
|
+
});
|
|
974
|
+
var mediaUpdate = (options) => (options.client ?? client).patch({
|
|
975
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
976
|
+
url: "/v1/media/{id}",
|
|
977
|
+
...options,
|
|
978
|
+
headers: {
|
|
979
|
+
"Content-Type": "application/json",
|
|
980
|
+
...options.headers
|
|
981
|
+
}
|
|
982
|
+
});
|
|
983
|
+
var episodeIndex = (options) => (options.client ?? client).get({
|
|
984
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
985
|
+
url: "/v1/media/{mediaId}/episodes",
|
|
986
|
+
...options
|
|
987
|
+
});
|
|
988
|
+
var episodeCreate = (options) => (options.client ?? client).post({
|
|
989
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
990
|
+
url: "/v1/media/{mediaId}/episodes",
|
|
991
|
+
...options,
|
|
992
|
+
headers: {
|
|
993
|
+
"Content-Type": "application/json",
|
|
994
|
+
...options.headers
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
var episodeDestroy = (options) => (options.client ?? client).delete({
|
|
998
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
999
|
+
url: "/v1/media/{mediaId}/episodes/{episodeNumber}",
|
|
1000
|
+
...options
|
|
1001
|
+
});
|
|
1002
|
+
var episodeShow = (options) => (options.client ?? client).get({
|
|
1003
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1004
|
+
url: "/v1/media/{mediaId}/episodes/{episodeNumber}",
|
|
1005
|
+
...options
|
|
1006
|
+
});
|
|
1007
|
+
var episodeUpdate = (options) => (options.client ?? client).patch({
|
|
1008
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1009
|
+
url: "/v1/media/{mediaId}/episodes/{episodeNumber}",
|
|
1010
|
+
...options,
|
|
1011
|
+
headers: {
|
|
1012
|
+
"Content-Type": "application/json",
|
|
1013
|
+
...options.headers
|
|
1014
|
+
}
|
|
1015
|
+
});
|
|
1016
|
+
var segmentIndex = (options) => (options.client ?? client).get({
|
|
1017
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1018
|
+
url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments",
|
|
1019
|
+
...options
|
|
1020
|
+
});
|
|
1021
|
+
var segmentCreate = (options) => (options.client ?? client).post({
|
|
1022
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1023
|
+
url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments",
|
|
1024
|
+
...options,
|
|
1025
|
+
headers: {
|
|
1026
|
+
"Content-Type": "application/json",
|
|
1027
|
+
...options.headers
|
|
1028
|
+
}
|
|
1029
|
+
});
|
|
1030
|
+
var segmentDestroy = (options) => (options.client ?? client).delete({
|
|
1031
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1032
|
+
url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}",
|
|
1033
|
+
...options
|
|
1034
|
+
});
|
|
1035
|
+
var segmentShow = (options) => (options.client ?? client).get({
|
|
1036
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1037
|
+
url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}",
|
|
1038
|
+
...options
|
|
1039
|
+
});
|
|
1040
|
+
var segmentUpdate = (options) => (options.client ?? client).patch({
|
|
1041
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1042
|
+
url: "/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}",
|
|
1043
|
+
...options,
|
|
1044
|
+
headers: {
|
|
1045
|
+
"Content-Type": "application/json",
|
|
1046
|
+
...options.headers
|
|
1047
|
+
}
|
|
1048
|
+
});
|
|
1049
|
+
var segmentShowByUuid = (options) => (options.client ?? client).get({
|
|
1050
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1051
|
+
url: "/v1/media/segments/{uuid}",
|
|
1052
|
+
...options
|
|
1053
|
+
});
|
|
1054
|
+
var segmentContextShow = (options) => (options.client ?? client).get({
|
|
1055
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1056
|
+
url: "/v1/media/segments/{uuid}/context",
|
|
1057
|
+
...options
|
|
1058
|
+
});
|
|
1059
|
+
var characterShow = (options) => (options.client ?? client).get({
|
|
1060
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1061
|
+
url: "/v1/media/characters/{id}",
|
|
1062
|
+
...options
|
|
1063
|
+
});
|
|
1064
|
+
var seiyuuShow = (options) => (options.client ?? client).get({
|
|
1065
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1066
|
+
url: "/v1/media/seiyuu/{id}",
|
|
1067
|
+
...options
|
|
1068
|
+
});
|
|
1069
|
+
var userQuotaShow = (options) => (options?.client ?? client).get({
|
|
1070
|
+
security: [{
|
|
1071
|
+
in: "cookie",
|
|
1072
|
+
name: "nadeshiko.session_token",
|
|
1073
|
+
type: "apiKey"
|
|
1074
|
+
}],
|
|
1075
|
+
url: "/v1/user/quota",
|
|
1076
|
+
...options
|
|
1077
|
+
});
|
|
1078
|
+
var userReportIndex = (options) => (options?.client ?? client).get({
|
|
1079
|
+
security: [{
|
|
1080
|
+
in: "cookie",
|
|
1081
|
+
name: "nadeshiko.session_token",
|
|
1082
|
+
type: "apiKey"
|
|
1083
|
+
}],
|
|
1084
|
+
url: "/v1/user/reports",
|
|
1085
|
+
...options
|
|
1086
|
+
});
|
|
1087
|
+
var userReportCreate = (options) => (options.client ?? client).post({
|
|
1088
|
+
security: [{
|
|
1089
|
+
in: "cookie",
|
|
1090
|
+
name: "nadeshiko.session_token",
|
|
1091
|
+
type: "apiKey"
|
|
1092
|
+
}],
|
|
1093
|
+
url: "/v1/user/reports",
|
|
1094
|
+
...options,
|
|
1095
|
+
headers: {
|
|
1096
|
+
"Content-Type": "application/json",
|
|
1097
|
+
...options.headers
|
|
1098
|
+
}
|
|
1099
|
+
});
|
|
1100
|
+
var userPreferencesShow = (options) => (options?.client ?? client).get({
|
|
1101
|
+
security: [{
|
|
1102
|
+
in: "cookie",
|
|
1103
|
+
name: "nadeshiko.session_token",
|
|
1104
|
+
type: "apiKey"
|
|
1105
|
+
}],
|
|
1106
|
+
url: "/v1/user/preferences",
|
|
1107
|
+
...options
|
|
1108
|
+
});
|
|
1109
|
+
var userPreferencesUpdate = (options) => (options.client ?? client).patch({
|
|
1110
|
+
security: [{
|
|
1111
|
+
in: "cookie",
|
|
1112
|
+
name: "nadeshiko.session_token",
|
|
1113
|
+
type: "apiKey"
|
|
1114
|
+
}],
|
|
1115
|
+
url: "/v1/user/preferences",
|
|
1116
|
+
...options,
|
|
1117
|
+
headers: {
|
|
1118
|
+
"Content-Type": "application/json",
|
|
1119
|
+
...options.headers
|
|
1120
|
+
}
|
|
1121
|
+
});
|
|
1122
|
+
var userActivityDestroy = (options) => (options?.client ?? client).delete({
|
|
1123
|
+
security: [{
|
|
1124
|
+
in: "cookie",
|
|
1125
|
+
name: "nadeshiko.session_token",
|
|
1126
|
+
type: "apiKey"
|
|
1127
|
+
}],
|
|
1128
|
+
url: "/v1/user/activity",
|
|
1129
|
+
...options
|
|
1130
|
+
});
|
|
1131
|
+
var userActivityIndex = (options) => (options?.client ?? client).get({
|
|
1132
|
+
security: [{
|
|
1133
|
+
in: "cookie",
|
|
1134
|
+
name: "nadeshiko.session_token",
|
|
1135
|
+
type: "apiKey"
|
|
1136
|
+
}],
|
|
1137
|
+
url: "/v1/user/activity",
|
|
1138
|
+
...options
|
|
1139
|
+
});
|
|
1140
|
+
var userActivityStatsShow = (options) => (options?.client ?? client).get({
|
|
1141
|
+
security: [{
|
|
1142
|
+
in: "cookie",
|
|
1143
|
+
name: "nadeshiko.session_token",
|
|
1144
|
+
type: "apiKey"
|
|
1145
|
+
}],
|
|
1146
|
+
url: "/v1/user/activity/stats",
|
|
1147
|
+
...options
|
|
1148
|
+
});
|
|
1149
|
+
var userExportShow = (options) => (options?.client ?? client).get({
|
|
1150
|
+
security: [{
|
|
1151
|
+
in: "cookie",
|
|
1152
|
+
name: "nadeshiko.session_token",
|
|
1153
|
+
type: "apiKey"
|
|
1154
|
+
}],
|
|
1155
|
+
url: "/v1/user/export",
|
|
1156
|
+
...options
|
|
1157
|
+
});
|
|
1158
|
+
var labIndex = (options) => (options?.client ?? client).get({
|
|
1159
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1160
|
+
in: "cookie",
|
|
1161
|
+
name: "nadeshiko.session_token",
|
|
1162
|
+
type: "apiKey"
|
|
1163
|
+
}],
|
|
1164
|
+
url: "/v1/labs",
|
|
1165
|
+
...options
|
|
1166
|
+
});
|
|
1167
|
+
var listIndex = (options) => (options?.client ?? client).get({
|
|
1168
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1169
|
+
url: "/v1/lists",
|
|
1170
|
+
...options
|
|
1171
|
+
});
|
|
1172
|
+
var listCreate = (options) => (options.client ?? client).post({
|
|
1173
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1174
|
+
url: "/v1/lists",
|
|
1175
|
+
...options,
|
|
1176
|
+
headers: {
|
|
1177
|
+
"Content-Type": "application/json",
|
|
1178
|
+
...options.headers
|
|
1179
|
+
}
|
|
1180
|
+
});
|
|
1181
|
+
var listDestroy = (options) => (options.client ?? client).delete({
|
|
1182
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1183
|
+
url: "/v1/lists/{id}",
|
|
1184
|
+
...options
|
|
1185
|
+
});
|
|
1186
|
+
var listShow = (options) => (options.client ?? client).get({
|
|
1187
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1188
|
+
url: "/v1/lists/{id}",
|
|
1189
|
+
...options
|
|
1190
|
+
});
|
|
1191
|
+
var listUpdate = (options) => (options.client ?? client).patch({
|
|
1192
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1193
|
+
url: "/v1/lists/{id}",
|
|
1194
|
+
...options,
|
|
1195
|
+
headers: {
|
|
1196
|
+
"Content-Type": "application/json",
|
|
1197
|
+
...options.headers
|
|
1198
|
+
}
|
|
1199
|
+
});
|
|
1200
|
+
var listAddItem = (options) => (options.client ?? client).post({
|
|
1201
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1202
|
+
url: "/v1/lists/{id}/items",
|
|
1203
|
+
...options,
|
|
1204
|
+
headers: {
|
|
1205
|
+
"Content-Type": "application/json",
|
|
1206
|
+
...options.headers
|
|
1207
|
+
}
|
|
1208
|
+
});
|
|
1209
|
+
var listRemoveItem = (options) => (options.client ?? client).delete({
|
|
1210
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1211
|
+
url: "/v1/lists/{id}/items/{mediaId}",
|
|
1212
|
+
...options
|
|
1213
|
+
});
|
|
1214
|
+
var listUpdateItem = (options) => (options.client ?? client).patch({
|
|
1215
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1216
|
+
url: "/v1/lists/{id}/items/{mediaId}",
|
|
1217
|
+
...options,
|
|
1218
|
+
headers: {
|
|
1219
|
+
"Content-Type": "application/json",
|
|
1220
|
+
...options.headers
|
|
1221
|
+
}
|
|
1222
|
+
});
|
|
1223
|
+
var listGetSegments = (options) => (options.client ?? client).get({
|
|
1224
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1225
|
+
in: "cookie",
|
|
1226
|
+
name: "nadeshiko.session_token",
|
|
1227
|
+
type: "apiKey"
|
|
1228
|
+
}],
|
|
1229
|
+
url: "/v1/lists/{id}/segments",
|
|
1230
|
+
...options
|
|
1231
|
+
});
|
|
1232
|
+
var listAddSegment = (options) => (options.client ?? client).post({
|
|
1233
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1234
|
+
in: "cookie",
|
|
1235
|
+
name: "nadeshiko.session_token",
|
|
1236
|
+
type: "apiKey"
|
|
1237
|
+
}],
|
|
1238
|
+
url: "/v1/lists/{id}/segments",
|
|
1239
|
+
...options,
|
|
1240
|
+
headers: {
|
|
1241
|
+
"Content-Type": "application/json",
|
|
1242
|
+
...options.headers
|
|
1243
|
+
}
|
|
1244
|
+
});
|
|
1245
|
+
var listRemoveSegment = (options) => (options.client ?? client).delete({
|
|
1246
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1247
|
+
in: "cookie",
|
|
1248
|
+
name: "nadeshiko.session_token",
|
|
1249
|
+
type: "apiKey"
|
|
1250
|
+
}],
|
|
1251
|
+
url: "/v1/lists/{id}/segments/{uuid}",
|
|
1252
|
+
...options
|
|
1253
|
+
});
|
|
1254
|
+
var listUpdateSegment = (options) => (options.client ?? client).patch({
|
|
1255
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1256
|
+
in: "cookie",
|
|
1257
|
+
name: "nadeshiko.session_token",
|
|
1258
|
+
type: "apiKey"
|
|
1259
|
+
}],
|
|
1260
|
+
url: "/v1/lists/{id}/segments/{uuid}",
|
|
1261
|
+
...options,
|
|
1262
|
+
headers: {
|
|
1263
|
+
"Content-Type": "application/json",
|
|
1264
|
+
...options.headers
|
|
1265
|
+
}
|
|
1266
|
+
});
|
|
1267
|
+
var adminReindexCreate = (options) => (options?.client ?? client).post({
|
|
1268
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1269
|
+
url: "/v1/admin/reindex",
|
|
1270
|
+
...options,
|
|
1271
|
+
headers: {
|
|
1272
|
+
"Content-Type": "application/json",
|
|
1273
|
+
...options?.headers
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
1276
|
+
var adminQueueStatsIndex = (options) => (options?.client ?? client).get({
|
|
1277
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1278
|
+
url: "/v1/admin/queues/stats",
|
|
1279
|
+
...options
|
|
1280
|
+
});
|
|
1281
|
+
var adminQueueShow = (options) => (options.client ?? client).get({
|
|
1282
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1283
|
+
url: "/v1/admin/queues/{queueName}",
|
|
1284
|
+
...options
|
|
1285
|
+
});
|
|
1286
|
+
var adminQueueFailedIndex = (options) => (options.client ?? client).get({
|
|
1287
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1288
|
+
url: "/v1/admin/queues/{queueName}/failed",
|
|
1289
|
+
...options
|
|
1290
|
+
});
|
|
1291
|
+
var adminQueueRetryCreate = (options) => (options.client ?? client).post({
|
|
1292
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1293
|
+
url: "/v1/admin/queues/{queueName}/retry",
|
|
1294
|
+
...options
|
|
1295
|
+
});
|
|
1296
|
+
var adminQueueFailedDestroy = (options) => (options.client ?? client).delete({
|
|
1297
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1298
|
+
url: "/v1/admin/queues/{queueName}/purge",
|
|
1299
|
+
...options
|
|
1300
|
+
});
|
|
1301
|
+
var adminMorphemeBackfillCreate = (options) => (options?.client ?? client).post({
|
|
1302
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1303
|
+
in: "cookie",
|
|
1304
|
+
name: "nadeshiko.session_token",
|
|
1305
|
+
type: "apiKey"
|
|
1306
|
+
}],
|
|
1307
|
+
url: "/v1/admin/morpheme-backfill",
|
|
1308
|
+
...options
|
|
1309
|
+
});
|
|
1310
|
+
var adminReportIndex = (options) => (options?.client ?? client).get({
|
|
1311
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1312
|
+
url: "/v1/admin/reports",
|
|
1313
|
+
...options
|
|
1314
|
+
});
|
|
1315
|
+
var adminReportUpdate = (options) => (options.client ?? client).patch({
|
|
1316
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1317
|
+
url: "/v1/admin/reports/{id}",
|
|
1318
|
+
...options,
|
|
1319
|
+
headers: {
|
|
1320
|
+
"Content-Type": "application/json",
|
|
1321
|
+
...options.headers
|
|
1322
|
+
}
|
|
1323
|
+
});
|
|
1324
|
+
var adminReviewRunCreate = (options) => (options?.client ?? client).post({
|
|
1325
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1326
|
+
url: "/v1/admin/review/run",
|
|
1327
|
+
...options
|
|
1328
|
+
});
|
|
1329
|
+
var adminReviewCheckIndex = (options) => (options?.client ?? client).get({
|
|
1330
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1331
|
+
url: "/v1/admin/review/checks",
|
|
1332
|
+
...options
|
|
1333
|
+
});
|
|
1334
|
+
var adminReviewCheckUpdate = (options) => (options.client ?? client).patch({
|
|
1335
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1336
|
+
url: "/v1/admin/review/checks/{name}",
|
|
1337
|
+
...options,
|
|
1338
|
+
headers: {
|
|
1339
|
+
"Content-Type": "application/json",
|
|
1340
|
+
...options.headers
|
|
1341
|
+
}
|
|
1342
|
+
});
|
|
1343
|
+
var adminReviewRunIndex = (options) => (options?.client ?? client).get({
|
|
1344
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1345
|
+
url: "/v1/admin/review/runs",
|
|
1346
|
+
...options
|
|
1347
|
+
});
|
|
1348
|
+
var adminReviewRunShow = (options) => (options.client ?? client).get({
|
|
1349
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1350
|
+
url: "/v1/admin/review/runs/{id}",
|
|
1351
|
+
...options
|
|
1352
|
+
});
|
|
1353
|
+
var adminReviewAllowlistIndex = (options) => (options?.client ?? client).get({
|
|
1354
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1355
|
+
url: "/v1/admin/review/allowlist",
|
|
1356
|
+
...options
|
|
1357
|
+
});
|
|
1358
|
+
var adminReviewAllowlistCreate = (options) => (options.client ?? client).post({
|
|
1359
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1360
|
+
url: "/v1/admin/review/allowlist",
|
|
1361
|
+
...options,
|
|
1362
|
+
headers: {
|
|
1363
|
+
"Content-Type": "application/json",
|
|
1364
|
+
...options.headers
|
|
1365
|
+
}
|
|
1366
|
+
});
|
|
1367
|
+
var adminReviewAllowlistDestroy = (options) => (options.client ?? client).delete({
|
|
1368
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1369
|
+
url: "/v1/admin/review/allowlist/{id}",
|
|
1370
|
+
...options
|
|
1371
|
+
});
|
|
1372
|
+
// generated/dev/nadeshiko.gen.ts
|
|
1373
|
+
var environments = {
|
|
1374
|
+
LOCAL: "http://localhost:5000/api",
|
|
1375
|
+
DEVELOPMENT: "https://api.dev.brigadasos.xyz/api",
|
|
1376
|
+
PRODUCTION: "https://api.brigadasos.xyz/api"
|
|
1377
|
+
};
|
|
1378
|
+
function createNadeshikoClient(config) {
|
|
1379
|
+
const baseUrl = config.baseUrl ? config.baseUrl in environments ? environments[config.baseUrl] : config.baseUrl : environments.PRODUCTION;
|
|
1380
|
+
const clientInstance = createClient(createConfig({
|
|
1381
|
+
baseUrl,
|
|
1382
|
+
headers: { Authorization: `Bearer ${config.apiKey}` }
|
|
1383
|
+
}));
|
|
1384
|
+
return {
|
|
1385
|
+
client: clientInstance,
|
|
1386
|
+
searchIndex: (options) => searchIndex({ ...options, client: clientInstance }),
|
|
1387
|
+
searchStats: (options) => searchStats({ ...options, client: clientInstance }),
|
|
1388
|
+
searchWords: (options) => searchWords({ ...options, client: clientInstance }),
|
|
1389
|
+
mediaIndex: (options) => mediaIndex({ ...options, client: clientInstance }),
|
|
1390
|
+
mediaShow: (options) => mediaShow({ ...options, client: clientInstance }),
|
|
1391
|
+
episodeIndex: (options) => episodeIndex({ ...options, client: clientInstance }),
|
|
1392
|
+
episodeShow: (options) => episodeShow({ ...options, client: clientInstance }),
|
|
1393
|
+
segmentShow: (options) => segmentShow({ ...options, client: clientInstance }),
|
|
1394
|
+
segmentShowByUuid: (options) => segmentShowByUuid({ ...options, client: clientInstance }),
|
|
1395
|
+
segmentContextShow: (options) => segmentContextShow({ ...options, client: clientInstance }),
|
|
1396
|
+
characterShow: (options) => characterShow({ ...options, client: clientInstance }),
|
|
1397
|
+
seiyuuShow: (options) => seiyuuShow({ ...options, client: clientInstance }),
|
|
1398
|
+
userQuotaShow: (options) => userQuotaShow({ ...options, client: clientInstance }),
|
|
1399
|
+
userReportCreate: (options) => userReportCreate({ ...options, client: clientInstance }),
|
|
1400
|
+
userReportIndex: (options) => userReportIndex({ ...options, client: clientInstance }),
|
|
1401
|
+
userPreferencesShow: (options) => userPreferencesShow({ ...options, client: clientInstance }),
|
|
1402
|
+
userPreferencesUpdate: (options) => userPreferencesUpdate({ ...options, client: clientInstance }),
|
|
1403
|
+
userActivityIndex: (options) => userActivityIndex({ ...options, client: clientInstance }),
|
|
1404
|
+
userActivityDestroy: (options) => userActivityDestroy({ ...options, client: clientInstance }),
|
|
1405
|
+
userActivityStatsShow: (options) => userActivityStatsShow({ ...options, client: clientInstance }),
|
|
1406
|
+
userExportShow: (options) => userExportShow({ ...options, client: clientInstance }),
|
|
1407
|
+
labIndex: (options) => labIndex({ ...options, client: clientInstance }),
|
|
1408
|
+
listIndex: (options) => listIndex({ ...options, client: clientInstance }),
|
|
1409
|
+
listShow: (options) => listShow({ ...options, client: clientInstance }),
|
|
1410
|
+
listGetSegments: (options) => listGetSegments({ ...options, client: clientInstance }),
|
|
1411
|
+
listAddSegment: (options) => listAddSegment({ ...options, client: clientInstance }),
|
|
1412
|
+
listUpdateSegment: (options) => listUpdateSegment({ ...options, client: clientInstance }),
|
|
1413
|
+
listRemoveSegment: (options) => listRemoveSegment({ ...options, client: clientInstance }),
|
|
1414
|
+
adminReindexCreate: (options) => adminReindexCreate({ ...options, client: clientInstance }),
|
|
1415
|
+
adminQueueStatsIndex: (options) => adminQueueStatsIndex({ ...options, client: clientInstance }),
|
|
1416
|
+
adminQueueShow: (options) => adminQueueShow({ ...options, client: clientInstance }),
|
|
1417
|
+
adminQueueFailedIndex: (options) => adminQueueFailedIndex({ ...options, client: clientInstance }),
|
|
1418
|
+
adminQueueRetryCreate: (options) => adminQueueRetryCreate({ ...options, client: clientInstance }),
|
|
1419
|
+
adminQueueFailedDestroy: (options) => adminQueueFailedDestroy({ ...options, client: clientInstance }),
|
|
1420
|
+
adminMorphemeBackfillCreate: (options) => adminMorphemeBackfillCreate({ ...options, client: clientInstance }),
|
|
1421
|
+
adminReportIndex: (options) => adminReportIndex({ ...options, client: clientInstance }),
|
|
1422
|
+
adminReportUpdate: (options) => adminReportUpdate({ ...options, client: clientInstance }),
|
|
1423
|
+
adminReviewRunCreate: (options) => adminReviewRunCreate({ ...options, client: clientInstance }),
|
|
1424
|
+
adminReviewCheckIndex: (options) => adminReviewCheckIndex({ ...options, client: clientInstance }),
|
|
1425
|
+
adminReviewCheckUpdate: (options) => adminReviewCheckUpdate({ ...options, client: clientInstance }),
|
|
1426
|
+
adminReviewRunIndex: (options) => adminReviewRunIndex({ ...options, client: clientInstance }),
|
|
1427
|
+
adminReviewRunShow: (options) => adminReviewRunShow({ ...options, client: clientInstance }),
|
|
1428
|
+
adminReviewAllowlistIndex: (options) => adminReviewAllowlistIndex({ ...options, client: clientInstance }),
|
|
1429
|
+
adminReviewAllowlistCreate: (options) => adminReviewAllowlistCreate({ ...options, client: clientInstance }),
|
|
1430
|
+
adminReviewAllowlistDestroy: (options) => adminReviewAllowlistDestroy({ ...options, client: clientInstance }),
|
|
1431
|
+
healthCheck: (options) => healthCheck({ ...options, client: clientInstance }),
|
|
1432
|
+
mediaCreate: (options) => mediaCreate({ ...options, client: clientInstance }),
|
|
1433
|
+
mediaUpdate: (options) => mediaUpdate({ ...options, client: clientInstance }),
|
|
1434
|
+
mediaDestroy: (options) => mediaDestroy({ ...options, client: clientInstance }),
|
|
1435
|
+
episodeCreate: (options) => episodeCreate({ ...options, client: clientInstance }),
|
|
1436
|
+
episodeUpdate: (options) => episodeUpdate({ ...options, client: clientInstance }),
|
|
1437
|
+
episodeDestroy: (options) => episodeDestroy({ ...options, client: clientInstance }),
|
|
1438
|
+
segmentIndex: (options) => segmentIndex({ ...options, client: clientInstance }),
|
|
1439
|
+
segmentCreate: (options) => segmentCreate({ ...options, client: clientInstance }),
|
|
1440
|
+
segmentUpdate: (options) => segmentUpdate({ ...options, client: clientInstance }),
|
|
1441
|
+
segmentDestroy: (options) => segmentDestroy({ ...options, client: clientInstance }),
|
|
1442
|
+
listCreate: (options) => listCreate({ ...options, client: clientInstance }),
|
|
1443
|
+
listUpdate: (options) => listUpdate({ ...options, client: clientInstance }),
|
|
1444
|
+
listDestroy: (options) => listDestroy({ ...options, client: clientInstance }),
|
|
1445
|
+
listAddItem: (options) => listAddItem({ ...options, client: clientInstance }),
|
|
1446
|
+
listUpdateItem: (options) => listUpdateItem({ ...options, client: clientInstance }),
|
|
1447
|
+
listRemoveItem: (options) => listRemoveItem({ ...options, client: clientInstance })
|
|
1448
|
+
};
|
|
1449
|
+
}
|
|
1450
|
+
var createClient2 = createNadeshikoClient;
|
|
1451
|
+
// generated/dev/internal/search.gen.ts
|
|
1452
|
+
var exports_search_gen = {};
|
|
1453
|
+
__export(exports_search_gen, {
|
|
1454
|
+
healthCheck: () => healthCheck
|
|
1455
|
+
});
|
|
1456
|
+
// generated/dev/internal/media.gen.ts
|
|
1457
|
+
var exports_media_gen = {};
|
|
1458
|
+
__export(exports_media_gen, {
|
|
1459
|
+
segmentUpdate: () => segmentUpdate,
|
|
1460
|
+
segmentIndex: () => segmentIndex,
|
|
1461
|
+
segmentDestroy: () => segmentDestroy,
|
|
1462
|
+
segmentCreate: () => segmentCreate,
|
|
1463
|
+
mediaUpdate: () => mediaUpdate,
|
|
1464
|
+
mediaDestroy: () => mediaDestroy,
|
|
1465
|
+
mediaCreate: () => mediaCreate,
|
|
1466
|
+
episodeUpdate: () => episodeUpdate,
|
|
1467
|
+
episodeDestroy: () => episodeDestroy,
|
|
1468
|
+
episodeCreate: () => episodeCreate
|
|
1469
|
+
});
|
|
1470
|
+
// generated/dev/internal/lists.gen.ts
|
|
1471
|
+
var exports_lists_gen = {};
|
|
1472
|
+
__export(exports_lists_gen, {
|
|
1473
|
+
listUpdateItem: () => listUpdateItem,
|
|
1474
|
+
listUpdate: () => listUpdate,
|
|
1475
|
+
listRemoveItem: () => listRemoveItem,
|
|
1476
|
+
listDestroy: () => listDestroy,
|
|
1477
|
+
listCreate: () => listCreate,
|
|
1478
|
+
listAddItem: () => listAddItem
|
|
1479
|
+
});
|
|
1480
|
+
|
|
1481
|
+
//# debugId=BF824D857B17D1BC64756E2164756E21
|
|
1482
|
+
//# sourceMappingURL=index.js.map
|