@touhidrahman/restauth-sdk 1.0.0 → 1.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/index.cjs.default.js +1 -0
- package/index.cjs.js +2888 -0
- package/index.cjs.mjs +2 -0
- package/index.d.ts +1 -0
- package/index.esm.js +2775 -0
- package/package.json +14 -15
- package/src/hey-api/client/client.gen.js +0 -217
- package/src/hey-api/client/index.js +0 -6
- package/src/hey-api/client/types.gen.js +0 -2
- package/src/hey-api/client/utils.gen.js +0 -233
- package/src/hey-api/client.gen.js +0 -3
- package/src/hey-api/core/auth.gen.js +0 -14
- package/src/hey-api/core/bodySerializer.gen.js +0 -57
- package/src/hey-api/core/params.gen.js +0 -106
- package/src/hey-api/core/pathSerializer.gen.js +0 -118
- package/src/hey-api/core/queryKeySerializer.gen.js +0 -100
- package/src/hey-api/core/serverSentEvents.gen.js +0 -136
- package/src/hey-api/core/types.gen.js +0 -2
- package/src/hey-api/core/utils.gen.js +0 -88
- package/src/hey-api/index.js +0 -2
- package/src/hey-api/sdk.gen.js +0 -698
- package/src/hey-api/transformers.gen.js +0 -1221
- package/src/hey-api/types.gen.js +0 -2
- package/src/index.js +0 -3
package/index.esm.js
ADDED
|
@@ -0,0 +1,2775 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
const jsonBodySerializer = {
|
|
3
|
+
bodySerializer: body => JSON.stringify(body, (_key, value) => typeof value === 'bigint' ? value.toString() : value)
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
7
|
+
function createSseClient({
|
|
8
|
+
onRequest,
|
|
9
|
+
onSseError,
|
|
10
|
+
onSseEvent,
|
|
11
|
+
responseTransformer,
|
|
12
|
+
responseValidator,
|
|
13
|
+
sseDefaultRetryDelay,
|
|
14
|
+
sseMaxRetryAttempts,
|
|
15
|
+
sseMaxRetryDelay,
|
|
16
|
+
sseSleepFn,
|
|
17
|
+
url,
|
|
18
|
+
...options
|
|
19
|
+
}) {
|
|
20
|
+
let lastEventId;
|
|
21
|
+
const sleep = sseSleepFn ?? (ms => new Promise(resolve => setTimeout(resolve, ms)));
|
|
22
|
+
const createStream = async function* () {
|
|
23
|
+
let retryDelay = sseDefaultRetryDelay ?? 3000;
|
|
24
|
+
let attempt = 0;
|
|
25
|
+
const signal = options.signal ?? new AbortController().signal;
|
|
26
|
+
while (true) {
|
|
27
|
+
if (signal.aborted) break;
|
|
28
|
+
attempt++;
|
|
29
|
+
const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
|
|
30
|
+
if (lastEventId !== undefined) {
|
|
31
|
+
headers.set('Last-Event-ID', lastEventId);
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
const requestInit = {
|
|
35
|
+
redirect: 'follow',
|
|
36
|
+
...options,
|
|
37
|
+
body: options.serializedBody,
|
|
38
|
+
headers,
|
|
39
|
+
signal
|
|
40
|
+
};
|
|
41
|
+
let request = new Request(url, requestInit);
|
|
42
|
+
if (onRequest) {
|
|
43
|
+
request = await onRequest(url, requestInit);
|
|
44
|
+
}
|
|
45
|
+
// fetch must be assigned here, otherwise it would throw the error:
|
|
46
|
+
// TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
|
|
47
|
+
const _fetch = options.fetch ?? globalThis.fetch;
|
|
48
|
+
const response = await _fetch(request);
|
|
49
|
+
if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
50
|
+
if (!response.body) throw new Error('No body in SSE response');
|
|
51
|
+
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
52
|
+
let buffer = '';
|
|
53
|
+
const abortHandler = () => {
|
|
54
|
+
try {
|
|
55
|
+
reader.cancel();
|
|
56
|
+
} catch {
|
|
57
|
+
// noop
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
signal.addEventListener('abort', abortHandler);
|
|
61
|
+
try {
|
|
62
|
+
while (true) {
|
|
63
|
+
const {
|
|
64
|
+
done,
|
|
65
|
+
value
|
|
66
|
+
} = await reader.read();
|
|
67
|
+
if (done) break;
|
|
68
|
+
buffer += value;
|
|
69
|
+
buffer = buffer.replace(/\r\n?/g, '\n'); // normalize line endings
|
|
70
|
+
const chunks = buffer.split('\n\n');
|
|
71
|
+
buffer = chunks.pop() ?? '';
|
|
72
|
+
for (const chunk of chunks) {
|
|
73
|
+
const lines = chunk.split('\n');
|
|
74
|
+
const dataLines = [];
|
|
75
|
+
let eventName;
|
|
76
|
+
for (const line of lines) {
|
|
77
|
+
if (line.startsWith('data:')) {
|
|
78
|
+
dataLines.push(line.replace(/^data:\s*/, ''));
|
|
79
|
+
} else if (line.startsWith('event:')) {
|
|
80
|
+
eventName = line.replace(/^event:\s*/, '');
|
|
81
|
+
} else if (line.startsWith('id:')) {
|
|
82
|
+
lastEventId = line.replace(/^id:\s*/, '');
|
|
83
|
+
} else if (line.startsWith('retry:')) {
|
|
84
|
+
const parsed = Number.parseInt(line.replace(/^retry:\s*/, ''), 10);
|
|
85
|
+
if (!Number.isNaN(parsed)) {
|
|
86
|
+
retryDelay = parsed;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
let data;
|
|
91
|
+
let parsedJson = false;
|
|
92
|
+
if (dataLines.length) {
|
|
93
|
+
const rawData = dataLines.join('\n');
|
|
94
|
+
try {
|
|
95
|
+
data = JSON.parse(rawData);
|
|
96
|
+
parsedJson = true;
|
|
97
|
+
} catch {
|
|
98
|
+
data = rawData;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (parsedJson) {
|
|
102
|
+
if (responseValidator) {
|
|
103
|
+
await responseValidator(data);
|
|
104
|
+
}
|
|
105
|
+
if (responseTransformer) {
|
|
106
|
+
data = await responseTransformer(data);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
onSseEvent?.({
|
|
110
|
+
data,
|
|
111
|
+
event: eventName,
|
|
112
|
+
id: lastEventId,
|
|
113
|
+
retry: retryDelay
|
|
114
|
+
});
|
|
115
|
+
if (dataLines.length) {
|
|
116
|
+
yield data;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
} finally {
|
|
121
|
+
signal.removeEventListener('abort', abortHandler);
|
|
122
|
+
reader.releaseLock();
|
|
123
|
+
}
|
|
124
|
+
break; // exit loop on normal completion
|
|
125
|
+
} catch (error) {
|
|
126
|
+
// connection failed or aborted; retry after delay
|
|
127
|
+
onSseError?.(error);
|
|
128
|
+
if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
|
|
129
|
+
break; // stop after firing error
|
|
130
|
+
}
|
|
131
|
+
// exponential backoff: double retry each attempt, cap at 30s
|
|
132
|
+
const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);
|
|
133
|
+
await sleep(backoff);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const stream = createStream();
|
|
138
|
+
return {
|
|
139
|
+
stream
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
144
|
+
const separatorArrayExplode = style => {
|
|
145
|
+
switch (style) {
|
|
146
|
+
case 'label':
|
|
147
|
+
return '.';
|
|
148
|
+
case 'matrix':
|
|
149
|
+
return ';';
|
|
150
|
+
case 'simple':
|
|
151
|
+
return ',';
|
|
152
|
+
default:
|
|
153
|
+
return '&';
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
const separatorArrayNoExplode = style => {
|
|
157
|
+
switch (style) {
|
|
158
|
+
case 'form':
|
|
159
|
+
return ',';
|
|
160
|
+
case 'pipeDelimited':
|
|
161
|
+
return '|';
|
|
162
|
+
case 'spaceDelimited':
|
|
163
|
+
return '%20';
|
|
164
|
+
default:
|
|
165
|
+
return ',';
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
const separatorObjectExplode = style => {
|
|
169
|
+
switch (style) {
|
|
170
|
+
case 'label':
|
|
171
|
+
return '.';
|
|
172
|
+
case 'matrix':
|
|
173
|
+
return ';';
|
|
174
|
+
case 'simple':
|
|
175
|
+
return ',';
|
|
176
|
+
default:
|
|
177
|
+
return '&';
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const serializeArrayParam = ({
|
|
181
|
+
allowReserved,
|
|
182
|
+
explode,
|
|
183
|
+
name,
|
|
184
|
+
style,
|
|
185
|
+
value
|
|
186
|
+
}) => {
|
|
187
|
+
if (!explode) {
|
|
188
|
+
const joinedValues = (allowReserved ? value : value.map(v => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
|
|
189
|
+
switch (style) {
|
|
190
|
+
case 'label':
|
|
191
|
+
return `.${joinedValues}`;
|
|
192
|
+
case 'matrix':
|
|
193
|
+
return `;${name}=${joinedValues}`;
|
|
194
|
+
case 'simple':
|
|
195
|
+
return joinedValues;
|
|
196
|
+
default:
|
|
197
|
+
return `${name}=${joinedValues}`;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const separator = separatorArrayExplode(style);
|
|
201
|
+
const joinedValues = value.map(v => {
|
|
202
|
+
if (style === 'label' || style === 'simple') {
|
|
203
|
+
return allowReserved ? v : encodeURIComponent(v);
|
|
204
|
+
}
|
|
205
|
+
return serializePrimitiveParam({
|
|
206
|
+
allowReserved,
|
|
207
|
+
name,
|
|
208
|
+
value: v
|
|
209
|
+
});
|
|
210
|
+
}).join(separator);
|
|
211
|
+
return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;
|
|
212
|
+
};
|
|
213
|
+
const serializePrimitiveParam = ({
|
|
214
|
+
allowReserved,
|
|
215
|
+
name,
|
|
216
|
+
value
|
|
217
|
+
}) => {
|
|
218
|
+
if (value === undefined || value === null) {
|
|
219
|
+
return '';
|
|
220
|
+
}
|
|
221
|
+
if (typeof value === 'object') {
|
|
222
|
+
throw new Error('Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.');
|
|
223
|
+
}
|
|
224
|
+
return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
|
|
225
|
+
};
|
|
226
|
+
const serializeObjectParam = ({
|
|
227
|
+
allowReserved,
|
|
228
|
+
explode,
|
|
229
|
+
name,
|
|
230
|
+
style,
|
|
231
|
+
value,
|
|
232
|
+
valueOnly
|
|
233
|
+
}) => {
|
|
234
|
+
if (value instanceof Date) {
|
|
235
|
+
return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
|
|
236
|
+
}
|
|
237
|
+
if (style !== 'deepObject' && !explode) {
|
|
238
|
+
let values = [];
|
|
239
|
+
Object.entries(value).forEach(([key, v]) => {
|
|
240
|
+
values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
|
|
241
|
+
});
|
|
242
|
+
const joinedValues = values.join(',');
|
|
243
|
+
switch (style) {
|
|
244
|
+
case 'form':
|
|
245
|
+
return `${name}=${joinedValues}`;
|
|
246
|
+
case 'label':
|
|
247
|
+
return `.${joinedValues}`;
|
|
248
|
+
case 'matrix':
|
|
249
|
+
return `;${name}=${joinedValues}`;
|
|
250
|
+
default:
|
|
251
|
+
return joinedValues;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
const separator = separatorObjectExplode(style);
|
|
255
|
+
const joinedValues = Object.entries(value).map(([key, v]) => serializePrimitiveParam({
|
|
256
|
+
allowReserved,
|
|
257
|
+
name: style === 'deepObject' ? `${name}[${key}]` : key,
|
|
258
|
+
value: v
|
|
259
|
+
})).join(separator);
|
|
260
|
+
return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
264
|
+
const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
265
|
+
const defaultPathSerializer = ({
|
|
266
|
+
path,
|
|
267
|
+
url: _url
|
|
268
|
+
}) => {
|
|
269
|
+
let url = _url;
|
|
270
|
+
const matches = _url.match(PATH_PARAM_RE);
|
|
271
|
+
if (matches) {
|
|
272
|
+
for (const match of matches) {
|
|
273
|
+
let explode = false;
|
|
274
|
+
let name = match.substring(1, match.length - 1);
|
|
275
|
+
let style = 'simple';
|
|
276
|
+
if (name.endsWith('*')) {
|
|
277
|
+
explode = true;
|
|
278
|
+
name = name.substring(0, name.length - 1);
|
|
279
|
+
}
|
|
280
|
+
if (name.startsWith('.')) {
|
|
281
|
+
name = name.substring(1);
|
|
282
|
+
style = 'label';
|
|
283
|
+
} else if (name.startsWith(';')) {
|
|
284
|
+
name = name.substring(1);
|
|
285
|
+
style = 'matrix';
|
|
286
|
+
}
|
|
287
|
+
const value = path[name];
|
|
288
|
+
if (value === undefined || value === null) {
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
if (Array.isArray(value)) {
|
|
292
|
+
url = url.replace(match, serializeArrayParam({
|
|
293
|
+
explode,
|
|
294
|
+
name,
|
|
295
|
+
style,
|
|
296
|
+
value
|
|
297
|
+
}));
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
if (typeof value === 'object') {
|
|
301
|
+
url = url.replace(match, serializeObjectParam({
|
|
302
|
+
explode,
|
|
303
|
+
name,
|
|
304
|
+
style,
|
|
305
|
+
value: value,
|
|
306
|
+
valueOnly: true
|
|
307
|
+
}));
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
if (style === 'matrix') {
|
|
311
|
+
url = url.replace(match, `;${serializePrimitiveParam({
|
|
312
|
+
name,
|
|
313
|
+
value: value
|
|
314
|
+
})}`);
|
|
315
|
+
continue;
|
|
316
|
+
}
|
|
317
|
+
const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
|
|
318
|
+
url = url.replace(match, replaceValue);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
return url;
|
|
322
|
+
};
|
|
323
|
+
const getUrl = ({
|
|
324
|
+
baseUrl,
|
|
325
|
+
path,
|
|
326
|
+
query,
|
|
327
|
+
querySerializer,
|
|
328
|
+
url: _url
|
|
329
|
+
}) => {
|
|
330
|
+
const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
|
|
331
|
+
let url = (baseUrl ?? '') + pathUrl;
|
|
332
|
+
if (path) {
|
|
333
|
+
url = defaultPathSerializer({
|
|
334
|
+
path,
|
|
335
|
+
url
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
let search = query ? querySerializer(query) : '';
|
|
339
|
+
if (search.startsWith('?')) {
|
|
340
|
+
search = search.substring(1);
|
|
341
|
+
}
|
|
342
|
+
if (search) {
|
|
343
|
+
url += `?${search}`;
|
|
344
|
+
}
|
|
345
|
+
return url;
|
|
346
|
+
};
|
|
347
|
+
function getValidRequestBody(options) {
|
|
348
|
+
const hasBody = options.body !== undefined;
|
|
349
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
350
|
+
if (isSerializedBody) {
|
|
351
|
+
if ('serializedBody' in options) {
|
|
352
|
+
const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== '';
|
|
353
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
354
|
+
}
|
|
355
|
+
// not all clients implement a serializedBody property (i.e., client-axios)
|
|
356
|
+
return options.body !== '' ? options.body : null;
|
|
357
|
+
}
|
|
358
|
+
// plain/text body
|
|
359
|
+
if (hasBody) {
|
|
360
|
+
return options.body;
|
|
361
|
+
}
|
|
362
|
+
// no body was provided
|
|
363
|
+
return undefined;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
367
|
+
const getAuthToken = async (auth, callback) => {
|
|
368
|
+
const token = typeof callback === 'function' ? await callback(auth) : callback;
|
|
369
|
+
if (!token) {
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
if (auth.scheme === 'bearer') {
|
|
373
|
+
return `Bearer ${token}`;
|
|
374
|
+
}
|
|
375
|
+
if (auth.scheme === 'basic') {
|
|
376
|
+
return `Basic ${btoa(token)}`;
|
|
377
|
+
}
|
|
378
|
+
return token;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
382
|
+
const createQuerySerializer = ({
|
|
383
|
+
parameters = {},
|
|
384
|
+
...args
|
|
385
|
+
} = {}) => {
|
|
386
|
+
const querySerializer = queryParams => {
|
|
387
|
+
const search = [];
|
|
388
|
+
if (queryParams && typeof queryParams === 'object') {
|
|
389
|
+
for (const name in queryParams) {
|
|
390
|
+
const value = queryParams[name];
|
|
391
|
+
if (value === undefined || value === null) {
|
|
392
|
+
continue;
|
|
393
|
+
}
|
|
394
|
+
const options = parameters[name] || args;
|
|
395
|
+
if (Array.isArray(value)) {
|
|
396
|
+
const serializedArray = serializeArrayParam({
|
|
397
|
+
allowReserved: options.allowReserved,
|
|
398
|
+
explode: true,
|
|
399
|
+
name,
|
|
400
|
+
style: 'form',
|
|
401
|
+
value,
|
|
402
|
+
...options.array
|
|
403
|
+
});
|
|
404
|
+
if (serializedArray) search.push(serializedArray);
|
|
405
|
+
} else if (typeof value === 'object') {
|
|
406
|
+
const serializedObject = serializeObjectParam({
|
|
407
|
+
allowReserved: options.allowReserved,
|
|
408
|
+
explode: true,
|
|
409
|
+
name,
|
|
410
|
+
style: 'deepObject',
|
|
411
|
+
value: value,
|
|
412
|
+
...options.object
|
|
413
|
+
});
|
|
414
|
+
if (serializedObject) search.push(serializedObject);
|
|
415
|
+
} else {
|
|
416
|
+
const serializedPrimitive = serializePrimitiveParam({
|
|
417
|
+
allowReserved: options.allowReserved,
|
|
418
|
+
name,
|
|
419
|
+
value: value
|
|
420
|
+
});
|
|
421
|
+
if (serializedPrimitive) search.push(serializedPrimitive);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return search.join('&');
|
|
426
|
+
};
|
|
427
|
+
return querySerializer;
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* Infers parseAs value from provided Content-Type header.
|
|
431
|
+
*/
|
|
432
|
+
const getParseAs = contentType => {
|
|
433
|
+
if (!contentType) {
|
|
434
|
+
// If no Content-Type header is provided, the best we can do is return the raw response body,
|
|
435
|
+
// which is effectively the same as the 'stream' option.
|
|
436
|
+
return 'stream';
|
|
437
|
+
}
|
|
438
|
+
const cleanContent = contentType.split(';')[0]?.trim();
|
|
439
|
+
if (!cleanContent) {
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) {
|
|
443
|
+
return 'json';
|
|
444
|
+
}
|
|
445
|
+
if (cleanContent === 'multipart/form-data') {
|
|
446
|
+
return 'formData';
|
|
447
|
+
}
|
|
448
|
+
if (['application/', 'audio/', 'image/', 'video/'].some(type => cleanContent.startsWith(type))) {
|
|
449
|
+
return 'blob';
|
|
450
|
+
}
|
|
451
|
+
if (cleanContent.startsWith('text/')) {
|
|
452
|
+
return 'text';
|
|
453
|
+
}
|
|
454
|
+
return;
|
|
455
|
+
};
|
|
456
|
+
const checkForExistence = (options, name) => {
|
|
457
|
+
if (!name) {
|
|
458
|
+
return false;
|
|
459
|
+
}
|
|
460
|
+
if (options.headers.has(name) || options.query?.[name] || options.headers.get('Cookie')?.includes(`${name}=`)) {
|
|
461
|
+
return true;
|
|
462
|
+
}
|
|
463
|
+
return false;
|
|
464
|
+
};
|
|
465
|
+
async function setAuthParams(options) {
|
|
466
|
+
for (const auth of options.security ?? []) {
|
|
467
|
+
if (checkForExistence(options, auth.name)) {
|
|
468
|
+
continue;
|
|
469
|
+
}
|
|
470
|
+
const token = await getAuthToken(auth, options.auth);
|
|
471
|
+
if (!token) {
|
|
472
|
+
continue;
|
|
473
|
+
}
|
|
474
|
+
const name = auth.name ?? 'Authorization';
|
|
475
|
+
switch (auth.in) {
|
|
476
|
+
case 'query':
|
|
477
|
+
if (!options.query) {
|
|
478
|
+
options.query = {};
|
|
479
|
+
}
|
|
480
|
+
options.query[name] = token;
|
|
481
|
+
break;
|
|
482
|
+
case 'cookie':
|
|
483
|
+
options.headers.append('Cookie', `${name}=${token}`);
|
|
484
|
+
break;
|
|
485
|
+
case 'header':
|
|
486
|
+
default:
|
|
487
|
+
options.headers.set(name, token);
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
const buildUrl = options => getUrl({
|
|
493
|
+
baseUrl: options.baseUrl,
|
|
494
|
+
path: options.path,
|
|
495
|
+
query: options.query,
|
|
496
|
+
querySerializer: typeof options.querySerializer === 'function' ? options.querySerializer : createQuerySerializer(options.querySerializer),
|
|
497
|
+
url: options.url
|
|
498
|
+
});
|
|
499
|
+
const mergeConfigs = (a, b) => {
|
|
500
|
+
const config = {
|
|
501
|
+
...a,
|
|
502
|
+
...b
|
|
503
|
+
};
|
|
504
|
+
if (config.baseUrl?.endsWith('/')) {
|
|
505
|
+
config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
|
|
506
|
+
}
|
|
507
|
+
config.headers = mergeHeaders(a.headers, b.headers);
|
|
508
|
+
return config;
|
|
509
|
+
};
|
|
510
|
+
const headersEntries = headers => {
|
|
511
|
+
const entries = [];
|
|
512
|
+
headers.forEach((value, key) => {
|
|
513
|
+
entries.push([key, value]);
|
|
514
|
+
});
|
|
515
|
+
return entries;
|
|
516
|
+
};
|
|
517
|
+
const mergeHeaders = (...headers) => {
|
|
518
|
+
const mergedHeaders = new Headers();
|
|
519
|
+
for (const header of headers) {
|
|
520
|
+
if (!header) {
|
|
521
|
+
continue;
|
|
522
|
+
}
|
|
523
|
+
const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
|
|
524
|
+
for (const [key, value] of iterator) {
|
|
525
|
+
if (value === null) {
|
|
526
|
+
mergedHeaders.delete(key);
|
|
527
|
+
} else if (Array.isArray(value)) {
|
|
528
|
+
for (const v of value) {
|
|
529
|
+
mergedHeaders.append(key, v);
|
|
530
|
+
}
|
|
531
|
+
} else if (value !== undefined) {
|
|
532
|
+
// assume object headers are meant to be JSON stringified, i.e., their
|
|
533
|
+
// content value in OpenAPI specification is 'application/json'
|
|
534
|
+
mergedHeaders.set(key, typeof value === 'object' ? JSON.stringify(value) : value);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
return mergedHeaders;
|
|
539
|
+
};
|
|
540
|
+
class Interceptors {
|
|
541
|
+
fns = [];
|
|
542
|
+
clear() {
|
|
543
|
+
this.fns = [];
|
|
544
|
+
}
|
|
545
|
+
eject(id) {
|
|
546
|
+
const index = this.getInterceptorIndex(id);
|
|
547
|
+
if (this.fns[index]) {
|
|
548
|
+
this.fns[index] = null;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
exists(id) {
|
|
552
|
+
const index = this.getInterceptorIndex(id);
|
|
553
|
+
return Boolean(this.fns[index]);
|
|
554
|
+
}
|
|
555
|
+
getInterceptorIndex(id) {
|
|
556
|
+
if (typeof id === 'number') {
|
|
557
|
+
return this.fns[id] ? id : -1;
|
|
558
|
+
}
|
|
559
|
+
return this.fns.indexOf(id);
|
|
560
|
+
}
|
|
561
|
+
update(id, fn) {
|
|
562
|
+
const index = this.getInterceptorIndex(id);
|
|
563
|
+
if (this.fns[index]) {
|
|
564
|
+
this.fns[index] = fn;
|
|
565
|
+
return id;
|
|
566
|
+
}
|
|
567
|
+
return false;
|
|
568
|
+
}
|
|
569
|
+
use(fn) {
|
|
570
|
+
this.fns.push(fn);
|
|
571
|
+
return this.fns.length - 1;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
const createInterceptors = () => ({
|
|
575
|
+
error: new Interceptors(),
|
|
576
|
+
request: new Interceptors(),
|
|
577
|
+
response: new Interceptors()
|
|
578
|
+
});
|
|
579
|
+
const defaultQuerySerializer = createQuerySerializer({
|
|
580
|
+
allowReserved: false,
|
|
581
|
+
array: {
|
|
582
|
+
explode: true,
|
|
583
|
+
style: 'form'
|
|
584
|
+
},
|
|
585
|
+
object: {
|
|
586
|
+
explode: true,
|
|
587
|
+
style: 'deepObject'
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
const defaultHeaders = {
|
|
591
|
+
'Content-Type': 'application/json'
|
|
592
|
+
};
|
|
593
|
+
const createConfig = (override = {}) => ({
|
|
594
|
+
...jsonBodySerializer,
|
|
595
|
+
headers: defaultHeaders,
|
|
596
|
+
parseAs: 'auto',
|
|
597
|
+
querySerializer: defaultQuerySerializer,
|
|
598
|
+
...override
|
|
599
|
+
});
|
|
600
|
+
|
|
601
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
602
|
+
const createClient = (config = {}) => {
|
|
603
|
+
let _config = mergeConfigs(createConfig(), config);
|
|
604
|
+
const getConfig = () => ({
|
|
605
|
+
..._config
|
|
606
|
+
});
|
|
607
|
+
const setConfig = config => {
|
|
608
|
+
_config = mergeConfigs(_config, config);
|
|
609
|
+
return getConfig();
|
|
610
|
+
};
|
|
611
|
+
const interceptors = createInterceptors();
|
|
612
|
+
const beforeRequest = async options => {
|
|
613
|
+
const opts = {
|
|
614
|
+
..._config,
|
|
615
|
+
...options,
|
|
616
|
+
fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
|
|
617
|
+
headers: mergeHeaders(_config.headers, options.headers),
|
|
618
|
+
serializedBody: undefined
|
|
619
|
+
};
|
|
620
|
+
if (opts.security) {
|
|
621
|
+
await setAuthParams(opts);
|
|
622
|
+
}
|
|
623
|
+
if (opts.requestValidator) {
|
|
624
|
+
await opts.requestValidator(opts);
|
|
625
|
+
}
|
|
626
|
+
if (opts.body !== undefined && opts.bodySerializer) {
|
|
627
|
+
opts.serializedBody = opts.bodySerializer(opts.body);
|
|
628
|
+
}
|
|
629
|
+
// remove Content-Type header if body is empty to avoid sending invalid requests
|
|
630
|
+
if (opts.body === undefined || opts.serializedBody === '') {
|
|
631
|
+
opts.headers.delete('Content-Type');
|
|
632
|
+
}
|
|
633
|
+
const resolvedOpts = opts;
|
|
634
|
+
const url = buildUrl(resolvedOpts);
|
|
635
|
+
return {
|
|
636
|
+
opts: resolvedOpts,
|
|
637
|
+
url
|
|
638
|
+
};
|
|
639
|
+
};
|
|
640
|
+
const request = async options => {
|
|
641
|
+
const throwOnError = options.throwOnError ?? _config.throwOnError;
|
|
642
|
+
const responseStyle = options.responseStyle ?? _config.responseStyle;
|
|
643
|
+
let request;
|
|
644
|
+
let response;
|
|
645
|
+
try {
|
|
646
|
+
const {
|
|
647
|
+
opts,
|
|
648
|
+
url
|
|
649
|
+
} = await beforeRequest(options);
|
|
650
|
+
const requestInit = {
|
|
651
|
+
redirect: 'follow',
|
|
652
|
+
...opts,
|
|
653
|
+
body: getValidRequestBody(opts)
|
|
654
|
+
};
|
|
655
|
+
request = new Request(url, requestInit);
|
|
656
|
+
for (const fn of interceptors.request.fns) {
|
|
657
|
+
if (fn) {
|
|
658
|
+
request = await fn(request, opts);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
// fetch must be assigned here, otherwise it would throw the error:
|
|
662
|
+
// TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
|
|
663
|
+
const _fetch = opts.fetch;
|
|
664
|
+
response = await _fetch(request);
|
|
665
|
+
for (const fn of interceptors.response.fns) {
|
|
666
|
+
if (fn) {
|
|
667
|
+
response = await fn(response, request, opts);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
const result = {
|
|
671
|
+
request,
|
|
672
|
+
response
|
|
673
|
+
};
|
|
674
|
+
if (response.ok) {
|
|
675
|
+
const parseAs = (opts.parseAs === 'auto' ? getParseAs(response.headers.get('Content-Type')) : opts.parseAs) ?? 'json';
|
|
676
|
+
if (response.status === 204 || response.headers.get('Content-Length') === '0') {
|
|
677
|
+
let emptyData;
|
|
678
|
+
switch (parseAs) {
|
|
679
|
+
case 'arrayBuffer':
|
|
680
|
+
case 'blob':
|
|
681
|
+
case 'text':
|
|
682
|
+
emptyData = await response[parseAs]();
|
|
683
|
+
break;
|
|
684
|
+
case 'formData':
|
|
685
|
+
emptyData = new FormData();
|
|
686
|
+
break;
|
|
687
|
+
case 'stream':
|
|
688
|
+
emptyData = response.body;
|
|
689
|
+
break;
|
|
690
|
+
case 'json':
|
|
691
|
+
default:
|
|
692
|
+
emptyData = {};
|
|
693
|
+
break;
|
|
694
|
+
}
|
|
695
|
+
return opts.responseStyle === 'data' ? emptyData : {
|
|
696
|
+
data: emptyData,
|
|
697
|
+
...result
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
let data;
|
|
701
|
+
switch (parseAs) {
|
|
702
|
+
case 'arrayBuffer':
|
|
703
|
+
case 'blob':
|
|
704
|
+
case 'formData':
|
|
705
|
+
case 'text':
|
|
706
|
+
data = await response[parseAs]();
|
|
707
|
+
break;
|
|
708
|
+
case 'json':
|
|
709
|
+
{
|
|
710
|
+
// Some servers return 200 with no Content-Length and empty body.
|
|
711
|
+
// response.json() would throw; read as text and parse if non-empty.
|
|
712
|
+
const text = await response.text();
|
|
713
|
+
data = text ? JSON.parse(text) : {};
|
|
714
|
+
break;
|
|
715
|
+
}
|
|
716
|
+
case 'stream':
|
|
717
|
+
return opts.responseStyle === 'data' ? response.body : {
|
|
718
|
+
data: response.body,
|
|
719
|
+
...result
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
if (parseAs === 'json') {
|
|
723
|
+
if (opts.responseValidator) {
|
|
724
|
+
await opts.responseValidator(data);
|
|
725
|
+
}
|
|
726
|
+
if (opts.responseTransformer) {
|
|
727
|
+
data = await opts.responseTransformer(data);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
return opts.responseStyle === 'data' ? data : {
|
|
731
|
+
data,
|
|
732
|
+
...result
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
const textError = await response.text();
|
|
736
|
+
let jsonError;
|
|
737
|
+
try {
|
|
738
|
+
jsonError = JSON.parse(textError);
|
|
739
|
+
} catch {
|
|
740
|
+
// noop
|
|
741
|
+
}
|
|
742
|
+
throw jsonError ?? textError;
|
|
743
|
+
} catch (error) {
|
|
744
|
+
let finalError = error;
|
|
745
|
+
for (const fn of interceptors.error.fns) {
|
|
746
|
+
if (fn) {
|
|
747
|
+
finalError = await fn(finalError, response, request, options);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
finalError = finalError || {};
|
|
751
|
+
if (throwOnError) {
|
|
752
|
+
throw finalError;
|
|
753
|
+
}
|
|
754
|
+
// TODO: we probably want to return error and improve types
|
|
755
|
+
return responseStyle === 'data' ? undefined : {
|
|
756
|
+
error: finalError,
|
|
757
|
+
request,
|
|
758
|
+
response
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
const makeMethodFn = method => options => request({
|
|
763
|
+
...options,
|
|
764
|
+
method
|
|
765
|
+
});
|
|
766
|
+
const makeSseFn = method => async options => {
|
|
767
|
+
const {
|
|
768
|
+
opts,
|
|
769
|
+
url
|
|
770
|
+
} = await beforeRequest(options);
|
|
771
|
+
return createSseClient({
|
|
772
|
+
...opts,
|
|
773
|
+
body: opts.body,
|
|
774
|
+
method,
|
|
775
|
+
onRequest: async (url, init) => {
|
|
776
|
+
let request = new Request(url, init);
|
|
777
|
+
for (const fn of interceptors.request.fns) {
|
|
778
|
+
if (fn) {
|
|
779
|
+
request = await fn(request, opts);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
return request;
|
|
783
|
+
},
|
|
784
|
+
serializedBody: getValidRequestBody(opts),
|
|
785
|
+
url
|
|
786
|
+
});
|
|
787
|
+
};
|
|
788
|
+
const _buildUrl = options => buildUrl({
|
|
789
|
+
..._config,
|
|
790
|
+
...options
|
|
791
|
+
});
|
|
792
|
+
return {
|
|
793
|
+
buildUrl: _buildUrl,
|
|
794
|
+
connect: makeMethodFn('CONNECT'),
|
|
795
|
+
delete: makeMethodFn('DELETE'),
|
|
796
|
+
get: makeMethodFn('GET'),
|
|
797
|
+
getConfig,
|
|
798
|
+
head: makeMethodFn('HEAD'),
|
|
799
|
+
interceptors,
|
|
800
|
+
options: makeMethodFn('OPTIONS'),
|
|
801
|
+
patch: makeMethodFn('PATCH'),
|
|
802
|
+
post: makeMethodFn('POST'),
|
|
803
|
+
put: makeMethodFn('PUT'),
|
|
804
|
+
request,
|
|
805
|
+
setConfig,
|
|
806
|
+
sse: {
|
|
807
|
+
connect: makeSseFn('CONNECT'),
|
|
808
|
+
delete: makeSseFn('DELETE'),
|
|
809
|
+
get: makeSseFn('GET'),
|
|
810
|
+
head: makeSseFn('HEAD'),
|
|
811
|
+
options: makeSseFn('OPTIONS'),
|
|
812
|
+
patch: makeSseFn('PATCH'),
|
|
813
|
+
post: makeSseFn('POST'),
|
|
814
|
+
put: makeSseFn('PUT'),
|
|
815
|
+
trace: makeSseFn('TRACE')
|
|
816
|
+
},
|
|
817
|
+
trace: makeMethodFn('TRACE')
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
822
|
+
const client = createClient(createConfig({
|
|
823
|
+
baseUrl: 'https://auth-api.mattrika.com'
|
|
824
|
+
}));
|
|
825
|
+
|
|
826
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
827
|
+
const postAdminNewTokenResponseTransformer = async data => {
|
|
828
|
+
if (data.data.lastLogin) {
|
|
829
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
830
|
+
}
|
|
831
|
+
return data;
|
|
832
|
+
};
|
|
833
|
+
const postAdminLoginResponseTransformer = async data => {
|
|
834
|
+
if (data.data.lastLogin) {
|
|
835
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
836
|
+
}
|
|
837
|
+
return data;
|
|
838
|
+
};
|
|
839
|
+
const getOrganizationsByOrganizationIdBranchesMyResponseTransformer = async data => {
|
|
840
|
+
data.data = data.data.map(item => {
|
|
841
|
+
if (item.createdAt) {
|
|
842
|
+
item.createdAt = new Date(item.createdAt);
|
|
843
|
+
}
|
|
844
|
+
if (item.updatedAt) {
|
|
845
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
846
|
+
}
|
|
847
|
+
return item;
|
|
848
|
+
});
|
|
849
|
+
return data;
|
|
850
|
+
};
|
|
851
|
+
const getOrganizationsByOrganizationIdBranchesResponseTransformer = async data => {
|
|
852
|
+
data.data = data.data.map(item => {
|
|
853
|
+
if (item.createdAt) {
|
|
854
|
+
item.createdAt = new Date(item.createdAt);
|
|
855
|
+
}
|
|
856
|
+
if (item.updatedAt) {
|
|
857
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
858
|
+
}
|
|
859
|
+
return item;
|
|
860
|
+
});
|
|
861
|
+
return data;
|
|
862
|
+
};
|
|
863
|
+
const postOrganizationsByOrganizationIdBranchesResponseTransformer = async data => {
|
|
864
|
+
if (data.data.createdAt) {
|
|
865
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
866
|
+
}
|
|
867
|
+
if (data.data.updatedAt) {
|
|
868
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
869
|
+
}
|
|
870
|
+
return data;
|
|
871
|
+
};
|
|
872
|
+
const deleteOrganizationsByOrganizationIdBranchesByIdResponseTransformer = async data => {
|
|
873
|
+
if (data.data.createdAt) {
|
|
874
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
875
|
+
}
|
|
876
|
+
if (data.data.updatedAt) {
|
|
877
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
878
|
+
}
|
|
879
|
+
return data;
|
|
880
|
+
};
|
|
881
|
+
const getOrganizationsByOrganizationIdBranchesByIdResponseTransformer = async data => {
|
|
882
|
+
if (data.data.createdAt) {
|
|
883
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
884
|
+
}
|
|
885
|
+
if (data.data.updatedAt) {
|
|
886
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
887
|
+
}
|
|
888
|
+
return data;
|
|
889
|
+
};
|
|
890
|
+
const putOrganizationsByOrganizationIdBranchesByIdResponseTransformer = async data => {
|
|
891
|
+
if (data.data.createdAt) {
|
|
892
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
893
|
+
}
|
|
894
|
+
if (data.data.updatedAt) {
|
|
895
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
896
|
+
}
|
|
897
|
+
return data;
|
|
898
|
+
};
|
|
899
|
+
const getGroupsMyResponseTransformer = async data => {
|
|
900
|
+
data.data = data.data.map(item => {
|
|
901
|
+
if (item.createdAt) {
|
|
902
|
+
item.createdAt = new Date(item.createdAt);
|
|
903
|
+
}
|
|
904
|
+
if (item.updatedAt) {
|
|
905
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
906
|
+
}
|
|
907
|
+
return item;
|
|
908
|
+
});
|
|
909
|
+
return data;
|
|
910
|
+
};
|
|
911
|
+
const getGroupsByIdUsersResponseTransformer = async data => {
|
|
912
|
+
data.data = data.data.map(item => {
|
|
913
|
+
if (item.lastLogin) {
|
|
914
|
+
item.lastLogin = new Date(item.lastLogin);
|
|
915
|
+
}
|
|
916
|
+
if (item.bannedAt) {
|
|
917
|
+
item.bannedAt = new Date(item.bannedAt);
|
|
918
|
+
}
|
|
919
|
+
if (item.verifiedAt) {
|
|
920
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
921
|
+
}
|
|
922
|
+
if (item.createdAt) {
|
|
923
|
+
item.createdAt = new Date(item.createdAt);
|
|
924
|
+
}
|
|
925
|
+
if (item.updatedAt) {
|
|
926
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
927
|
+
}
|
|
928
|
+
return item;
|
|
929
|
+
});
|
|
930
|
+
return data;
|
|
931
|
+
};
|
|
932
|
+
const getGroupsResponseTransformer = async data => {
|
|
933
|
+
data.data = data.data.map(item => {
|
|
934
|
+
if (item.createdAt) {
|
|
935
|
+
item.createdAt = new Date(item.createdAt);
|
|
936
|
+
}
|
|
937
|
+
if (item.updatedAt) {
|
|
938
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
939
|
+
}
|
|
940
|
+
return item;
|
|
941
|
+
});
|
|
942
|
+
return data;
|
|
943
|
+
};
|
|
944
|
+
const postGroupsResponseTransformer = async data => {
|
|
945
|
+
if (data.data.createdAt) {
|
|
946
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
947
|
+
}
|
|
948
|
+
if (data.data.updatedAt) {
|
|
949
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
950
|
+
}
|
|
951
|
+
return data;
|
|
952
|
+
};
|
|
953
|
+
const deleteGroupsByIdResponseTransformer = async data => {
|
|
954
|
+
if (data.data.createdAt) {
|
|
955
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
956
|
+
}
|
|
957
|
+
if (data.data.updatedAt) {
|
|
958
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
959
|
+
}
|
|
960
|
+
return data;
|
|
961
|
+
};
|
|
962
|
+
const getGroupsByIdResponseTransformer = async data => {
|
|
963
|
+
if (data.data.createdAt) {
|
|
964
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
965
|
+
}
|
|
966
|
+
if (data.data.updatedAt) {
|
|
967
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
968
|
+
}
|
|
969
|
+
return data;
|
|
970
|
+
};
|
|
971
|
+
const putGroupsByIdResponseTransformer = async data => {
|
|
972
|
+
if (data.data.createdAt) {
|
|
973
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
974
|
+
}
|
|
975
|
+
if (data.data.updatedAt) {
|
|
976
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
977
|
+
}
|
|
978
|
+
return data;
|
|
979
|
+
};
|
|
980
|
+
const getInvitesResponseTransformer = async data => {
|
|
981
|
+
data.data = data.data.map(item => {
|
|
982
|
+
if (item.expiresAt) {
|
|
983
|
+
item.expiresAt = new Date(item.expiresAt);
|
|
984
|
+
}
|
|
985
|
+
if (item.acceptedAt) {
|
|
986
|
+
item.acceptedAt = new Date(item.acceptedAt);
|
|
987
|
+
}
|
|
988
|
+
if (item.createdAt) {
|
|
989
|
+
item.createdAt = new Date(item.createdAt);
|
|
990
|
+
}
|
|
991
|
+
if (item.updatedAt) {
|
|
992
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
993
|
+
}
|
|
994
|
+
return item;
|
|
995
|
+
});
|
|
996
|
+
return data;
|
|
997
|
+
};
|
|
998
|
+
const postInvitesResponseTransformer = async data => {
|
|
999
|
+
if (data.data.expiresAt) {
|
|
1000
|
+
data.data.expiresAt = new Date(data.data.expiresAt);
|
|
1001
|
+
}
|
|
1002
|
+
if (data.data.acceptedAt) {
|
|
1003
|
+
data.data.acceptedAt = new Date(data.data.acceptedAt);
|
|
1004
|
+
}
|
|
1005
|
+
if (data.data.createdAt) {
|
|
1006
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1007
|
+
}
|
|
1008
|
+
if (data.data.updatedAt) {
|
|
1009
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1010
|
+
}
|
|
1011
|
+
return data;
|
|
1012
|
+
};
|
|
1013
|
+
const deleteInvitesByIdResponseTransformer = async data => {
|
|
1014
|
+
if (data.data.expiresAt) {
|
|
1015
|
+
data.data.expiresAt = new Date(data.data.expiresAt);
|
|
1016
|
+
}
|
|
1017
|
+
if (data.data.acceptedAt) {
|
|
1018
|
+
data.data.acceptedAt = new Date(data.data.acceptedAt);
|
|
1019
|
+
}
|
|
1020
|
+
if (data.data.createdAt) {
|
|
1021
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1022
|
+
}
|
|
1023
|
+
if (data.data.updatedAt) {
|
|
1024
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1025
|
+
}
|
|
1026
|
+
return data;
|
|
1027
|
+
};
|
|
1028
|
+
const getInvitesByIdResponseTransformer = async data => {
|
|
1029
|
+
if (data.data.expiresAt) {
|
|
1030
|
+
data.data.expiresAt = new Date(data.data.expiresAt);
|
|
1031
|
+
}
|
|
1032
|
+
if (data.data.acceptedAt) {
|
|
1033
|
+
data.data.acceptedAt = new Date(data.data.acceptedAt);
|
|
1034
|
+
}
|
|
1035
|
+
if (data.data.createdAt) {
|
|
1036
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1037
|
+
}
|
|
1038
|
+
if (data.data.updatedAt) {
|
|
1039
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1040
|
+
}
|
|
1041
|
+
return data;
|
|
1042
|
+
};
|
|
1043
|
+
const putInvitesByIdResponseTransformer = async data => {
|
|
1044
|
+
if (data.data.expiresAt) {
|
|
1045
|
+
data.data.expiresAt = new Date(data.data.expiresAt);
|
|
1046
|
+
}
|
|
1047
|
+
if (data.data.acceptedAt) {
|
|
1048
|
+
data.data.acceptedAt = new Date(data.data.acceptedAt);
|
|
1049
|
+
}
|
|
1050
|
+
if (data.data.createdAt) {
|
|
1051
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1052
|
+
}
|
|
1053
|
+
if (data.data.updatedAt) {
|
|
1054
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1055
|
+
}
|
|
1056
|
+
return data;
|
|
1057
|
+
};
|
|
1058
|
+
const postMembershipsByIdZoneResponseTransformer = async data => {
|
|
1059
|
+
if (data.data.createdAt) {
|
|
1060
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1061
|
+
}
|
|
1062
|
+
if (data.data.updatedAt) {
|
|
1063
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1064
|
+
}
|
|
1065
|
+
return data;
|
|
1066
|
+
};
|
|
1067
|
+
const getMembershipsZoneByZoneIdResponseTransformer = async data => {
|
|
1068
|
+
data.data = data.data.map(item => {
|
|
1069
|
+
if (item.createdAt) {
|
|
1070
|
+
item.createdAt = new Date(item.createdAt);
|
|
1071
|
+
}
|
|
1072
|
+
if (item.updatedAt) {
|
|
1073
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1074
|
+
}
|
|
1075
|
+
return item;
|
|
1076
|
+
});
|
|
1077
|
+
return data;
|
|
1078
|
+
};
|
|
1079
|
+
const postMembershipsByIdBranchResponseTransformer = async data => {
|
|
1080
|
+
if (data.data.createdAt) {
|
|
1081
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1082
|
+
}
|
|
1083
|
+
if (data.data.updatedAt) {
|
|
1084
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1085
|
+
}
|
|
1086
|
+
return data;
|
|
1087
|
+
};
|
|
1088
|
+
const getMembershipsBranchByIdResponseTransformer = async data => {
|
|
1089
|
+
data.data = data.data.map(item => {
|
|
1090
|
+
if (item.createdAt) {
|
|
1091
|
+
item.createdAt = new Date(item.createdAt);
|
|
1092
|
+
}
|
|
1093
|
+
if (item.updatedAt) {
|
|
1094
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1095
|
+
}
|
|
1096
|
+
return item;
|
|
1097
|
+
});
|
|
1098
|
+
return data;
|
|
1099
|
+
};
|
|
1100
|
+
const getMembershipsMyResponseTransformer = async data => {
|
|
1101
|
+
data.data = data.data.map(item => {
|
|
1102
|
+
if (item.createdAt) {
|
|
1103
|
+
item.createdAt = new Date(item.createdAt);
|
|
1104
|
+
}
|
|
1105
|
+
if (item.updatedAt) {
|
|
1106
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1107
|
+
}
|
|
1108
|
+
return item;
|
|
1109
|
+
});
|
|
1110
|
+
return data;
|
|
1111
|
+
};
|
|
1112
|
+
const getMembershipsResponseTransformer = async data => {
|
|
1113
|
+
data.data = data.data.map(item => {
|
|
1114
|
+
if (item.createdAt) {
|
|
1115
|
+
item.createdAt = new Date(item.createdAt);
|
|
1116
|
+
}
|
|
1117
|
+
if (item.updatedAt) {
|
|
1118
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1119
|
+
}
|
|
1120
|
+
if (item.project) {
|
|
1121
|
+
if (item.project.createdAt) {
|
|
1122
|
+
item.project.createdAt = new Date(item.project.createdAt);
|
|
1123
|
+
}
|
|
1124
|
+
if (item.project.updatedAt) {
|
|
1125
|
+
item.project.updatedAt = new Date(item.project.updatedAt);
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
if (item.user) {
|
|
1129
|
+
if (item.user.lastLogin) {
|
|
1130
|
+
item.user.lastLogin = new Date(item.user.lastLogin);
|
|
1131
|
+
}
|
|
1132
|
+
if (item.user.bannedAt) {
|
|
1133
|
+
item.user.bannedAt = new Date(item.user.bannedAt);
|
|
1134
|
+
}
|
|
1135
|
+
if (item.user.verifiedAt) {
|
|
1136
|
+
item.user.verifiedAt = new Date(item.user.verifiedAt);
|
|
1137
|
+
}
|
|
1138
|
+
if (item.user.createdAt) {
|
|
1139
|
+
item.user.createdAt = new Date(item.user.createdAt);
|
|
1140
|
+
}
|
|
1141
|
+
if (item.user.updatedAt) {
|
|
1142
|
+
item.user.updatedAt = new Date(item.user.updatedAt);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
if (item.role) {
|
|
1146
|
+
if (item.role.createdAt) {
|
|
1147
|
+
item.role.createdAt = new Date(item.role.createdAt);
|
|
1148
|
+
}
|
|
1149
|
+
if (item.role.updatedAt) {
|
|
1150
|
+
item.role.updatedAt = new Date(item.role.updatedAt);
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
if (item.group) {
|
|
1154
|
+
if (item.group.createdAt) {
|
|
1155
|
+
item.group.createdAt = new Date(item.group.createdAt);
|
|
1156
|
+
}
|
|
1157
|
+
if (item.group.updatedAt) {
|
|
1158
|
+
item.group.updatedAt = new Date(item.group.updatedAt);
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
if (item.organization) {
|
|
1162
|
+
if (item.organization.createdAt) {
|
|
1163
|
+
item.organization.createdAt = new Date(item.organization.createdAt);
|
|
1164
|
+
}
|
|
1165
|
+
if (item.organization.updatedAt) {
|
|
1166
|
+
item.organization.updatedAt = new Date(item.organization.updatedAt);
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
return item;
|
|
1170
|
+
});
|
|
1171
|
+
return data;
|
|
1172
|
+
};
|
|
1173
|
+
const postMembershipsResponseTransformer = async data => {
|
|
1174
|
+
if (data.data.createdAt) {
|
|
1175
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1176
|
+
}
|
|
1177
|
+
if (data.data.updatedAt) {
|
|
1178
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1179
|
+
}
|
|
1180
|
+
if (data.data.project) {
|
|
1181
|
+
if (data.data.project.createdAt) {
|
|
1182
|
+
data.data.project.createdAt = new Date(data.data.project.createdAt);
|
|
1183
|
+
}
|
|
1184
|
+
if (data.data.project.updatedAt) {
|
|
1185
|
+
data.data.project.updatedAt = new Date(data.data.project.updatedAt);
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
if (data.data.user) {
|
|
1189
|
+
if (data.data.user.lastLogin) {
|
|
1190
|
+
data.data.user.lastLogin = new Date(data.data.user.lastLogin);
|
|
1191
|
+
}
|
|
1192
|
+
if (data.data.user.bannedAt) {
|
|
1193
|
+
data.data.user.bannedAt = new Date(data.data.user.bannedAt);
|
|
1194
|
+
}
|
|
1195
|
+
if (data.data.user.verifiedAt) {
|
|
1196
|
+
data.data.user.verifiedAt = new Date(data.data.user.verifiedAt);
|
|
1197
|
+
}
|
|
1198
|
+
if (data.data.user.createdAt) {
|
|
1199
|
+
data.data.user.createdAt = new Date(data.data.user.createdAt);
|
|
1200
|
+
}
|
|
1201
|
+
if (data.data.user.updatedAt) {
|
|
1202
|
+
data.data.user.updatedAt = new Date(data.data.user.updatedAt);
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
if (data.data.role) {
|
|
1206
|
+
if (data.data.role.createdAt) {
|
|
1207
|
+
data.data.role.createdAt = new Date(data.data.role.createdAt);
|
|
1208
|
+
}
|
|
1209
|
+
if (data.data.role.updatedAt) {
|
|
1210
|
+
data.data.role.updatedAt = new Date(data.data.role.updatedAt);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
if (data.data.group) {
|
|
1214
|
+
if (data.data.group.createdAt) {
|
|
1215
|
+
data.data.group.createdAt = new Date(data.data.group.createdAt);
|
|
1216
|
+
}
|
|
1217
|
+
if (data.data.group.updatedAt) {
|
|
1218
|
+
data.data.group.updatedAt = new Date(data.data.group.updatedAt);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
if (data.data.organization) {
|
|
1222
|
+
if (data.data.organization.createdAt) {
|
|
1223
|
+
data.data.organization.createdAt = new Date(data.data.organization.createdAt);
|
|
1224
|
+
}
|
|
1225
|
+
if (data.data.organization.updatedAt) {
|
|
1226
|
+
data.data.organization.updatedAt = new Date(data.data.organization.updatedAt);
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
return data;
|
|
1230
|
+
};
|
|
1231
|
+
const deleteMembershipsByIdResponseTransformer = async data => {
|
|
1232
|
+
if (data.data.createdAt) {
|
|
1233
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1234
|
+
}
|
|
1235
|
+
if (data.data.updatedAt) {
|
|
1236
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1237
|
+
}
|
|
1238
|
+
return data;
|
|
1239
|
+
};
|
|
1240
|
+
const getMembershipsByIdResponseTransformer = async data => {
|
|
1241
|
+
if (data.data.createdAt) {
|
|
1242
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1243
|
+
}
|
|
1244
|
+
if (data.data.updatedAt) {
|
|
1245
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1246
|
+
}
|
|
1247
|
+
return data;
|
|
1248
|
+
};
|
|
1249
|
+
const getOrganizationsByUserByUserIdResponseTransformer = async data => {
|
|
1250
|
+
data.data = data.data.map(item => {
|
|
1251
|
+
if (item.createdAt) {
|
|
1252
|
+
item.createdAt = new Date(item.createdAt);
|
|
1253
|
+
}
|
|
1254
|
+
if (item.updatedAt) {
|
|
1255
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1256
|
+
}
|
|
1257
|
+
return item;
|
|
1258
|
+
});
|
|
1259
|
+
return data;
|
|
1260
|
+
};
|
|
1261
|
+
const getOrganizationsByOwnerByUserIdResponseTransformer = async data => {
|
|
1262
|
+
data.data = data.data.map(item => {
|
|
1263
|
+
if (item.createdAt) {
|
|
1264
|
+
item.createdAt = new Date(item.createdAt);
|
|
1265
|
+
}
|
|
1266
|
+
if (item.updatedAt) {
|
|
1267
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1268
|
+
}
|
|
1269
|
+
return item;
|
|
1270
|
+
});
|
|
1271
|
+
return data;
|
|
1272
|
+
};
|
|
1273
|
+
const getOrganizationsByOrganizationIdMembersResponseTransformer = async data => {
|
|
1274
|
+
data.data = data.data.map(item => {
|
|
1275
|
+
if (item.lastLogin) {
|
|
1276
|
+
item.lastLogin = new Date(item.lastLogin);
|
|
1277
|
+
}
|
|
1278
|
+
if (item.bannedAt) {
|
|
1279
|
+
item.bannedAt = new Date(item.bannedAt);
|
|
1280
|
+
}
|
|
1281
|
+
if (item.verifiedAt) {
|
|
1282
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1283
|
+
}
|
|
1284
|
+
if (item.createdAt) {
|
|
1285
|
+
item.createdAt = new Date(item.createdAt);
|
|
1286
|
+
}
|
|
1287
|
+
if (item.updatedAt) {
|
|
1288
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1289
|
+
}
|
|
1290
|
+
return item;
|
|
1291
|
+
});
|
|
1292
|
+
return data;
|
|
1293
|
+
};
|
|
1294
|
+
const getOrganizationsByOrganizationIdCreatorResponseTransformer = async data => {
|
|
1295
|
+
if (data.data.lastLogin) {
|
|
1296
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
1297
|
+
}
|
|
1298
|
+
if (data.data.bannedAt) {
|
|
1299
|
+
data.data.bannedAt = new Date(data.data.bannedAt);
|
|
1300
|
+
}
|
|
1301
|
+
if (data.data.verifiedAt) {
|
|
1302
|
+
data.data.verifiedAt = new Date(data.data.verifiedAt);
|
|
1303
|
+
}
|
|
1304
|
+
if (data.data.createdAt) {
|
|
1305
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1306
|
+
}
|
|
1307
|
+
if (data.data.updatedAt) {
|
|
1308
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1309
|
+
}
|
|
1310
|
+
return data;
|
|
1311
|
+
};
|
|
1312
|
+
const getOrganizationsResponseTransformer = async data => {
|
|
1313
|
+
data.data = data.data.map(item => {
|
|
1314
|
+
if (item.createdAt) {
|
|
1315
|
+
item.createdAt = new Date(item.createdAt);
|
|
1316
|
+
}
|
|
1317
|
+
if (item.updatedAt) {
|
|
1318
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1319
|
+
}
|
|
1320
|
+
return item;
|
|
1321
|
+
});
|
|
1322
|
+
return data;
|
|
1323
|
+
};
|
|
1324
|
+
const postOrganizationsResponseTransformer = async data => {
|
|
1325
|
+
if (data.data.createdAt) {
|
|
1326
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1327
|
+
}
|
|
1328
|
+
if (data.data.updatedAt) {
|
|
1329
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1330
|
+
}
|
|
1331
|
+
return data;
|
|
1332
|
+
};
|
|
1333
|
+
const deleteOrganizationsByIdResponseTransformer = async data => {
|
|
1334
|
+
if (data.data.createdAt) {
|
|
1335
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1336
|
+
}
|
|
1337
|
+
if (data.data.updatedAt) {
|
|
1338
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1339
|
+
}
|
|
1340
|
+
return data;
|
|
1341
|
+
};
|
|
1342
|
+
const getOrganizationsByIdResponseTransformer = async data => {
|
|
1343
|
+
if (data.data.createdAt) {
|
|
1344
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1345
|
+
}
|
|
1346
|
+
if (data.data.updatedAt) {
|
|
1347
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1348
|
+
}
|
|
1349
|
+
return data;
|
|
1350
|
+
};
|
|
1351
|
+
const putOrganizationsByIdResponseTransformer = async data => {
|
|
1352
|
+
if (data.data.createdAt) {
|
|
1353
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1354
|
+
}
|
|
1355
|
+
if (data.data.updatedAt) {
|
|
1356
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1357
|
+
}
|
|
1358
|
+
return data;
|
|
1359
|
+
};
|
|
1360
|
+
const getProjectsResponseTransformer = async data => {
|
|
1361
|
+
data.data = data.data.map(item => {
|
|
1362
|
+
if (item.createdAt) {
|
|
1363
|
+
item.createdAt = new Date(item.createdAt);
|
|
1364
|
+
}
|
|
1365
|
+
if (item.updatedAt) {
|
|
1366
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1367
|
+
}
|
|
1368
|
+
return item;
|
|
1369
|
+
});
|
|
1370
|
+
return data;
|
|
1371
|
+
};
|
|
1372
|
+
const postProjectsResponseTransformer = async data => {
|
|
1373
|
+
if (data.data.createdAt) {
|
|
1374
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1375
|
+
}
|
|
1376
|
+
if (data.data.updatedAt) {
|
|
1377
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1378
|
+
}
|
|
1379
|
+
return data;
|
|
1380
|
+
};
|
|
1381
|
+
const deleteProjectsByProjectIdResponseTransformer = async data => {
|
|
1382
|
+
if (data.data.createdAt) {
|
|
1383
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1384
|
+
}
|
|
1385
|
+
if (data.data.updatedAt) {
|
|
1386
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1387
|
+
}
|
|
1388
|
+
return data;
|
|
1389
|
+
};
|
|
1390
|
+
const getProjectsByProjectIdResponseTransformer = async data => {
|
|
1391
|
+
if (data.data.createdAt) {
|
|
1392
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1393
|
+
}
|
|
1394
|
+
if (data.data.updatedAt) {
|
|
1395
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1396
|
+
}
|
|
1397
|
+
return data;
|
|
1398
|
+
};
|
|
1399
|
+
const putProjectsByProjectIdResponseTransformer = async data => {
|
|
1400
|
+
if (data.data.createdAt) {
|
|
1401
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1402
|
+
}
|
|
1403
|
+
if (data.data.updatedAt) {
|
|
1404
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1405
|
+
}
|
|
1406
|
+
return data;
|
|
1407
|
+
};
|
|
1408
|
+
const getRolesByIdUsersResponseTransformer = async data => {
|
|
1409
|
+
data.data = data.data.map(item => {
|
|
1410
|
+
if (item.lastLogin) {
|
|
1411
|
+
item.lastLogin = new Date(item.lastLogin);
|
|
1412
|
+
}
|
|
1413
|
+
if (item.bannedAt) {
|
|
1414
|
+
item.bannedAt = new Date(item.bannedAt);
|
|
1415
|
+
}
|
|
1416
|
+
if (item.verifiedAt) {
|
|
1417
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1418
|
+
}
|
|
1419
|
+
if (item.createdAt) {
|
|
1420
|
+
item.createdAt = new Date(item.createdAt);
|
|
1421
|
+
}
|
|
1422
|
+
if (item.updatedAt) {
|
|
1423
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1424
|
+
}
|
|
1425
|
+
return item;
|
|
1426
|
+
});
|
|
1427
|
+
return data;
|
|
1428
|
+
};
|
|
1429
|
+
const getRolesResponseTransformer = async data => {
|
|
1430
|
+
data.data = data.data.map(item => {
|
|
1431
|
+
if (item.createdAt) {
|
|
1432
|
+
item.createdAt = new Date(item.createdAt);
|
|
1433
|
+
}
|
|
1434
|
+
if (item.updatedAt) {
|
|
1435
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1436
|
+
}
|
|
1437
|
+
return item;
|
|
1438
|
+
});
|
|
1439
|
+
return data;
|
|
1440
|
+
};
|
|
1441
|
+
const postRolesResponseTransformer = async data => {
|
|
1442
|
+
if (data.data.createdAt) {
|
|
1443
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1444
|
+
}
|
|
1445
|
+
if (data.data.updatedAt) {
|
|
1446
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1447
|
+
}
|
|
1448
|
+
return data;
|
|
1449
|
+
};
|
|
1450
|
+
const deleteRolesByIdResponseTransformer = async data => {
|
|
1451
|
+
if (data.data.createdAt) {
|
|
1452
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1453
|
+
}
|
|
1454
|
+
if (data.data.updatedAt) {
|
|
1455
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1456
|
+
}
|
|
1457
|
+
return data;
|
|
1458
|
+
};
|
|
1459
|
+
const getRolesByIdResponseTransformer = async data => {
|
|
1460
|
+
if (data.data.createdAt) {
|
|
1461
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1462
|
+
}
|
|
1463
|
+
if (data.data.updatedAt) {
|
|
1464
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1465
|
+
}
|
|
1466
|
+
return data;
|
|
1467
|
+
};
|
|
1468
|
+
const putRolesByIdResponseTransformer = async data => {
|
|
1469
|
+
if (data.data.createdAt) {
|
|
1470
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1471
|
+
}
|
|
1472
|
+
if (data.data.updatedAt) {
|
|
1473
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1474
|
+
}
|
|
1475
|
+
return data;
|
|
1476
|
+
};
|
|
1477
|
+
const getSecretKeysResponseTransformer = async data => {
|
|
1478
|
+
data.data = data.data.map(item => {
|
|
1479
|
+
if (item.expiresAt) {
|
|
1480
|
+
item.expiresAt = new Date(item.expiresAt);
|
|
1481
|
+
}
|
|
1482
|
+
if (item.createdAt) {
|
|
1483
|
+
item.createdAt = new Date(item.createdAt);
|
|
1484
|
+
}
|
|
1485
|
+
return item;
|
|
1486
|
+
});
|
|
1487
|
+
return data;
|
|
1488
|
+
};
|
|
1489
|
+
const postSecretKeysResponseTransformer = async data => {
|
|
1490
|
+
if (data.data.expiresAt) {
|
|
1491
|
+
data.data.expiresAt = new Date(data.data.expiresAt);
|
|
1492
|
+
}
|
|
1493
|
+
if (data.data.createdAt) {
|
|
1494
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1495
|
+
}
|
|
1496
|
+
return data;
|
|
1497
|
+
};
|
|
1498
|
+
const deleteSecretKeysByIdResponseTransformer = async data => {
|
|
1499
|
+
if (data.data.expiresAt) {
|
|
1500
|
+
data.data.expiresAt = new Date(data.data.expiresAt);
|
|
1501
|
+
}
|
|
1502
|
+
if (data.data.createdAt) {
|
|
1503
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1504
|
+
}
|
|
1505
|
+
return data;
|
|
1506
|
+
};
|
|
1507
|
+
const getSecretKeysByIdResponseTransformer = async data => {
|
|
1508
|
+
if (data.data.expiresAt) {
|
|
1509
|
+
data.data.expiresAt = new Date(data.data.expiresAt);
|
|
1510
|
+
}
|
|
1511
|
+
if (data.data.createdAt) {
|
|
1512
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1513
|
+
}
|
|
1514
|
+
return data;
|
|
1515
|
+
};
|
|
1516
|
+
const getUsersByIdIdentifiersResponseTransformer = async data => {
|
|
1517
|
+
data.data = data.data.map(item => {
|
|
1518
|
+
if (item.verifiedAt) {
|
|
1519
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1520
|
+
}
|
|
1521
|
+
if (item.createdAt) {
|
|
1522
|
+
item.createdAt = new Date(item.createdAt);
|
|
1523
|
+
}
|
|
1524
|
+
if (item.updatedAt) {
|
|
1525
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1526
|
+
}
|
|
1527
|
+
return item;
|
|
1528
|
+
});
|
|
1529
|
+
return data;
|
|
1530
|
+
};
|
|
1531
|
+
const postUserPasswordsUpsertResponseTransformer = async data => {
|
|
1532
|
+
if (data.data.createdAt) {
|
|
1533
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1534
|
+
}
|
|
1535
|
+
if (data.data.updatedAt) {
|
|
1536
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1537
|
+
}
|
|
1538
|
+
return data;
|
|
1539
|
+
};
|
|
1540
|
+
const deleteUsersByIdMembershipsByMembershipIdResponseTransformer = async data => {
|
|
1541
|
+
if (data.data.createdAt) {
|
|
1542
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1543
|
+
}
|
|
1544
|
+
if (data.data.updatedAt) {
|
|
1545
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1546
|
+
}
|
|
1547
|
+
return data;
|
|
1548
|
+
};
|
|
1549
|
+
const postUsersPasswordResetByTokenResponseTransformer = async data => {
|
|
1550
|
+
if (data.data.user.lastLogin) {
|
|
1551
|
+
data.data.user.lastLogin = new Date(data.data.user.lastLogin);
|
|
1552
|
+
}
|
|
1553
|
+
if (data.data.user.bannedAt) {
|
|
1554
|
+
data.data.user.bannedAt = new Date(data.data.user.bannedAt);
|
|
1555
|
+
}
|
|
1556
|
+
if (data.data.user.verifiedAt) {
|
|
1557
|
+
data.data.user.verifiedAt = new Date(data.data.user.verifiedAt);
|
|
1558
|
+
}
|
|
1559
|
+
if (data.data.user.createdAt) {
|
|
1560
|
+
data.data.user.createdAt = new Date(data.data.user.createdAt);
|
|
1561
|
+
}
|
|
1562
|
+
if (data.data.user.updatedAt) {
|
|
1563
|
+
data.data.user.updatedAt = new Date(data.data.user.updatedAt);
|
|
1564
|
+
}
|
|
1565
|
+
data.data.userIdentifiers = data.data.userIdentifiers.map(item => {
|
|
1566
|
+
if (item.verifiedAt) {
|
|
1567
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1568
|
+
}
|
|
1569
|
+
if (item.createdAt) {
|
|
1570
|
+
item.createdAt = new Date(item.createdAt);
|
|
1571
|
+
}
|
|
1572
|
+
if (item.updatedAt) {
|
|
1573
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1574
|
+
}
|
|
1575
|
+
return item;
|
|
1576
|
+
});
|
|
1577
|
+
if (data.data.role) {
|
|
1578
|
+
if (data.data.role.createdAt) {
|
|
1579
|
+
data.data.role.createdAt = new Date(data.data.role.createdAt);
|
|
1580
|
+
}
|
|
1581
|
+
if (data.data.role.updatedAt) {
|
|
1582
|
+
data.data.role.updatedAt = new Date(data.data.role.updatedAt);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
if (data.data.organization) {
|
|
1586
|
+
if (data.data.organization.createdAt) {
|
|
1587
|
+
data.data.organization.createdAt = new Date(data.data.organization.createdAt);
|
|
1588
|
+
}
|
|
1589
|
+
if (data.data.organization.updatedAt) {
|
|
1590
|
+
data.data.organization.updatedAt = new Date(data.data.organization.updatedAt);
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
if (data.data.group) {
|
|
1594
|
+
if (data.data.group.createdAt) {
|
|
1595
|
+
data.data.group.createdAt = new Date(data.data.group.createdAt);
|
|
1596
|
+
}
|
|
1597
|
+
if (data.data.group.updatedAt) {
|
|
1598
|
+
data.data.group.updatedAt = new Date(data.data.group.updatedAt);
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
if (data.data.lastLogin) {
|
|
1602
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
1603
|
+
}
|
|
1604
|
+
return data;
|
|
1605
|
+
};
|
|
1606
|
+
const postUsersByIdPasswordChangeResponseTransformer = async data => {
|
|
1607
|
+
if (data.data.lastLogin) {
|
|
1608
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
1609
|
+
}
|
|
1610
|
+
if (data.data.bannedAt) {
|
|
1611
|
+
data.data.bannedAt = new Date(data.data.bannedAt);
|
|
1612
|
+
}
|
|
1613
|
+
if (data.data.verifiedAt) {
|
|
1614
|
+
data.data.verifiedAt = new Date(data.data.verifiedAt);
|
|
1615
|
+
}
|
|
1616
|
+
if (data.data.createdAt) {
|
|
1617
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1618
|
+
}
|
|
1619
|
+
if (data.data.updatedAt) {
|
|
1620
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1621
|
+
}
|
|
1622
|
+
return data;
|
|
1623
|
+
};
|
|
1624
|
+
const postUsersLoginResponseTransformer = async data => {
|
|
1625
|
+
if (data.data.user.lastLogin) {
|
|
1626
|
+
data.data.user.lastLogin = new Date(data.data.user.lastLogin);
|
|
1627
|
+
}
|
|
1628
|
+
if (data.data.user.bannedAt) {
|
|
1629
|
+
data.data.user.bannedAt = new Date(data.data.user.bannedAt);
|
|
1630
|
+
}
|
|
1631
|
+
if (data.data.user.verifiedAt) {
|
|
1632
|
+
data.data.user.verifiedAt = new Date(data.data.user.verifiedAt);
|
|
1633
|
+
}
|
|
1634
|
+
if (data.data.user.createdAt) {
|
|
1635
|
+
data.data.user.createdAt = new Date(data.data.user.createdAt);
|
|
1636
|
+
}
|
|
1637
|
+
if (data.data.user.updatedAt) {
|
|
1638
|
+
data.data.user.updatedAt = new Date(data.data.user.updatedAt);
|
|
1639
|
+
}
|
|
1640
|
+
data.data.userIdentifiers = data.data.userIdentifiers.map(item => {
|
|
1641
|
+
if (item.verifiedAt) {
|
|
1642
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1643
|
+
}
|
|
1644
|
+
if (item.createdAt) {
|
|
1645
|
+
item.createdAt = new Date(item.createdAt);
|
|
1646
|
+
}
|
|
1647
|
+
if (item.updatedAt) {
|
|
1648
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1649
|
+
}
|
|
1650
|
+
return item;
|
|
1651
|
+
});
|
|
1652
|
+
if (data.data.role) {
|
|
1653
|
+
if (data.data.role.createdAt) {
|
|
1654
|
+
data.data.role.createdAt = new Date(data.data.role.createdAt);
|
|
1655
|
+
}
|
|
1656
|
+
if (data.data.role.updatedAt) {
|
|
1657
|
+
data.data.role.updatedAt = new Date(data.data.role.updatedAt);
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
if (data.data.organization) {
|
|
1661
|
+
if (data.data.organization.createdAt) {
|
|
1662
|
+
data.data.organization.createdAt = new Date(data.data.organization.createdAt);
|
|
1663
|
+
}
|
|
1664
|
+
if (data.data.organization.updatedAt) {
|
|
1665
|
+
data.data.organization.updatedAt = new Date(data.data.organization.updatedAt);
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
if (data.data.group) {
|
|
1669
|
+
if (data.data.group.createdAt) {
|
|
1670
|
+
data.data.group.createdAt = new Date(data.data.group.createdAt);
|
|
1671
|
+
}
|
|
1672
|
+
if (data.data.group.updatedAt) {
|
|
1673
|
+
data.data.group.updatedAt = new Date(data.data.group.updatedAt);
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
if (data.data.lastLogin) {
|
|
1677
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
1678
|
+
}
|
|
1679
|
+
return data;
|
|
1680
|
+
};
|
|
1681
|
+
const postUsersLoginSwitchResponseTransformer = async data => {
|
|
1682
|
+
if (data.data.user.lastLogin) {
|
|
1683
|
+
data.data.user.lastLogin = new Date(data.data.user.lastLogin);
|
|
1684
|
+
}
|
|
1685
|
+
if (data.data.user.bannedAt) {
|
|
1686
|
+
data.data.user.bannedAt = new Date(data.data.user.bannedAt);
|
|
1687
|
+
}
|
|
1688
|
+
if (data.data.user.verifiedAt) {
|
|
1689
|
+
data.data.user.verifiedAt = new Date(data.data.user.verifiedAt);
|
|
1690
|
+
}
|
|
1691
|
+
if (data.data.user.createdAt) {
|
|
1692
|
+
data.data.user.createdAt = new Date(data.data.user.createdAt);
|
|
1693
|
+
}
|
|
1694
|
+
if (data.data.user.updatedAt) {
|
|
1695
|
+
data.data.user.updatedAt = new Date(data.data.user.updatedAt);
|
|
1696
|
+
}
|
|
1697
|
+
data.data.userIdentifiers = data.data.userIdentifiers.map(item => {
|
|
1698
|
+
if (item.verifiedAt) {
|
|
1699
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1700
|
+
}
|
|
1701
|
+
if (item.createdAt) {
|
|
1702
|
+
item.createdAt = new Date(item.createdAt);
|
|
1703
|
+
}
|
|
1704
|
+
if (item.updatedAt) {
|
|
1705
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1706
|
+
}
|
|
1707
|
+
return item;
|
|
1708
|
+
});
|
|
1709
|
+
if (data.data.role) {
|
|
1710
|
+
if (data.data.role.createdAt) {
|
|
1711
|
+
data.data.role.createdAt = new Date(data.data.role.createdAt);
|
|
1712
|
+
}
|
|
1713
|
+
if (data.data.role.updatedAt) {
|
|
1714
|
+
data.data.role.updatedAt = new Date(data.data.role.updatedAt);
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
if (data.data.organization) {
|
|
1718
|
+
if (data.data.organization.createdAt) {
|
|
1719
|
+
data.data.organization.createdAt = new Date(data.data.organization.createdAt);
|
|
1720
|
+
}
|
|
1721
|
+
if (data.data.organization.updatedAt) {
|
|
1722
|
+
data.data.organization.updatedAt = new Date(data.data.organization.updatedAt);
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
if (data.data.group) {
|
|
1726
|
+
if (data.data.group.createdAt) {
|
|
1727
|
+
data.data.group.createdAt = new Date(data.data.group.createdAt);
|
|
1728
|
+
}
|
|
1729
|
+
if (data.data.group.updatedAt) {
|
|
1730
|
+
data.data.group.updatedAt = new Date(data.data.group.updatedAt);
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
if (data.data.lastLogin) {
|
|
1734
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
1735
|
+
}
|
|
1736
|
+
return data;
|
|
1737
|
+
};
|
|
1738
|
+
const postUsersRegisterResponseTransformer = async data => {
|
|
1739
|
+
if (data.data.lastLogin) {
|
|
1740
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
1741
|
+
}
|
|
1742
|
+
if (data.data.bannedAt) {
|
|
1743
|
+
data.data.bannedAt = new Date(data.data.bannedAt);
|
|
1744
|
+
}
|
|
1745
|
+
if (data.data.verifiedAt) {
|
|
1746
|
+
data.data.verifiedAt = new Date(data.data.verifiedAt);
|
|
1747
|
+
}
|
|
1748
|
+
if (data.data.createdAt) {
|
|
1749
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1750
|
+
}
|
|
1751
|
+
if (data.data.updatedAt) {
|
|
1752
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1753
|
+
}
|
|
1754
|
+
return data;
|
|
1755
|
+
};
|
|
1756
|
+
const getUsersMeResponseTransformer = async data => {
|
|
1757
|
+
if (data.data.user.lastLogin) {
|
|
1758
|
+
data.data.user.lastLogin = new Date(data.data.user.lastLogin);
|
|
1759
|
+
}
|
|
1760
|
+
if (data.data.user.bannedAt) {
|
|
1761
|
+
data.data.user.bannedAt = new Date(data.data.user.bannedAt);
|
|
1762
|
+
}
|
|
1763
|
+
if (data.data.user.verifiedAt) {
|
|
1764
|
+
data.data.user.verifiedAt = new Date(data.data.user.verifiedAt);
|
|
1765
|
+
}
|
|
1766
|
+
if (data.data.user.createdAt) {
|
|
1767
|
+
data.data.user.createdAt = new Date(data.data.user.createdAt);
|
|
1768
|
+
}
|
|
1769
|
+
if (data.data.user.updatedAt) {
|
|
1770
|
+
data.data.user.updatedAt = new Date(data.data.user.updatedAt);
|
|
1771
|
+
}
|
|
1772
|
+
data.data.userIdentifiers = data.data.userIdentifiers.map(item => {
|
|
1773
|
+
if (item.verifiedAt) {
|
|
1774
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1775
|
+
}
|
|
1776
|
+
if (item.createdAt) {
|
|
1777
|
+
item.createdAt = new Date(item.createdAt);
|
|
1778
|
+
}
|
|
1779
|
+
if (item.updatedAt) {
|
|
1780
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1781
|
+
}
|
|
1782
|
+
return item;
|
|
1783
|
+
});
|
|
1784
|
+
if (data.data.role) {
|
|
1785
|
+
if (data.data.role.createdAt) {
|
|
1786
|
+
data.data.role.createdAt = new Date(data.data.role.createdAt);
|
|
1787
|
+
}
|
|
1788
|
+
if (data.data.role.updatedAt) {
|
|
1789
|
+
data.data.role.updatedAt = new Date(data.data.role.updatedAt);
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
if (data.data.organization) {
|
|
1793
|
+
if (data.data.organization.createdAt) {
|
|
1794
|
+
data.data.organization.createdAt = new Date(data.data.organization.createdAt);
|
|
1795
|
+
}
|
|
1796
|
+
if (data.data.organization.updatedAt) {
|
|
1797
|
+
data.data.organization.updatedAt = new Date(data.data.organization.updatedAt);
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
if (data.data.group) {
|
|
1801
|
+
if (data.data.group.createdAt) {
|
|
1802
|
+
data.data.group.createdAt = new Date(data.data.group.createdAt);
|
|
1803
|
+
}
|
|
1804
|
+
if (data.data.group.updatedAt) {
|
|
1805
|
+
data.data.group.updatedAt = new Date(data.data.group.updatedAt);
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
return data;
|
|
1809
|
+
};
|
|
1810
|
+
const getUsersCustomActiveResponseTransformer = async data => {
|
|
1811
|
+
data.data = data.data.map(item => {
|
|
1812
|
+
if (item.lastLogin) {
|
|
1813
|
+
item.lastLogin = new Date(item.lastLogin);
|
|
1814
|
+
}
|
|
1815
|
+
if (item.bannedAt) {
|
|
1816
|
+
item.bannedAt = new Date(item.bannedAt);
|
|
1817
|
+
}
|
|
1818
|
+
if (item.verifiedAt) {
|
|
1819
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1820
|
+
}
|
|
1821
|
+
if (item.createdAt) {
|
|
1822
|
+
item.createdAt = new Date(item.createdAt);
|
|
1823
|
+
}
|
|
1824
|
+
if (item.updatedAt) {
|
|
1825
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1826
|
+
}
|
|
1827
|
+
return item;
|
|
1828
|
+
});
|
|
1829
|
+
return data;
|
|
1830
|
+
};
|
|
1831
|
+
const getUsersCustomBannedResponseTransformer = async data => {
|
|
1832
|
+
data.data = data.data.map(item => {
|
|
1833
|
+
if (item.lastLogin) {
|
|
1834
|
+
item.lastLogin = new Date(item.lastLogin);
|
|
1835
|
+
}
|
|
1836
|
+
if (item.bannedAt) {
|
|
1837
|
+
item.bannedAt = new Date(item.bannedAt);
|
|
1838
|
+
}
|
|
1839
|
+
if (item.verifiedAt) {
|
|
1840
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1841
|
+
}
|
|
1842
|
+
if (item.createdAt) {
|
|
1843
|
+
item.createdAt = new Date(item.createdAt);
|
|
1844
|
+
}
|
|
1845
|
+
if (item.updatedAt) {
|
|
1846
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1847
|
+
}
|
|
1848
|
+
return item;
|
|
1849
|
+
});
|
|
1850
|
+
return data;
|
|
1851
|
+
};
|
|
1852
|
+
const getUsersCustomUnverifiedResponseTransformer = async data => {
|
|
1853
|
+
data.data = data.data.map(item => {
|
|
1854
|
+
if (item.lastLogin) {
|
|
1855
|
+
item.lastLogin = new Date(item.lastLogin);
|
|
1856
|
+
}
|
|
1857
|
+
if (item.bannedAt) {
|
|
1858
|
+
item.bannedAt = new Date(item.bannedAt);
|
|
1859
|
+
}
|
|
1860
|
+
if (item.verifiedAt) {
|
|
1861
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1862
|
+
}
|
|
1863
|
+
if (item.createdAt) {
|
|
1864
|
+
item.createdAt = new Date(item.createdAt);
|
|
1865
|
+
}
|
|
1866
|
+
if (item.updatedAt) {
|
|
1867
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1868
|
+
}
|
|
1869
|
+
return item;
|
|
1870
|
+
});
|
|
1871
|
+
return data;
|
|
1872
|
+
};
|
|
1873
|
+
const getUsersCustomInactiveResponseTransformer = async data => {
|
|
1874
|
+
data.data = data.data.map(item => {
|
|
1875
|
+
if (item.lastLogin) {
|
|
1876
|
+
item.lastLogin = new Date(item.lastLogin);
|
|
1877
|
+
}
|
|
1878
|
+
if (item.bannedAt) {
|
|
1879
|
+
item.bannedAt = new Date(item.bannedAt);
|
|
1880
|
+
}
|
|
1881
|
+
if (item.verifiedAt) {
|
|
1882
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1883
|
+
}
|
|
1884
|
+
if (item.createdAt) {
|
|
1885
|
+
item.createdAt = new Date(item.createdAt);
|
|
1886
|
+
}
|
|
1887
|
+
if (item.updatedAt) {
|
|
1888
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1889
|
+
}
|
|
1890
|
+
return item;
|
|
1891
|
+
});
|
|
1892
|
+
return data;
|
|
1893
|
+
};
|
|
1894
|
+
const getUsersResponseTransformer = async data => {
|
|
1895
|
+
data.data = data.data.map(item => {
|
|
1896
|
+
if (item.lastLogin) {
|
|
1897
|
+
item.lastLogin = new Date(item.lastLogin);
|
|
1898
|
+
}
|
|
1899
|
+
if (item.bannedAt) {
|
|
1900
|
+
item.bannedAt = new Date(item.bannedAt);
|
|
1901
|
+
}
|
|
1902
|
+
if (item.verifiedAt) {
|
|
1903
|
+
item.verifiedAt = new Date(item.verifiedAt);
|
|
1904
|
+
}
|
|
1905
|
+
if (item.createdAt) {
|
|
1906
|
+
item.createdAt = new Date(item.createdAt);
|
|
1907
|
+
}
|
|
1908
|
+
if (item.updatedAt) {
|
|
1909
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1910
|
+
}
|
|
1911
|
+
return item;
|
|
1912
|
+
});
|
|
1913
|
+
return data;
|
|
1914
|
+
};
|
|
1915
|
+
const postUsersResponseTransformer = async data => {
|
|
1916
|
+
if (data.data.lastLogin) {
|
|
1917
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
1918
|
+
}
|
|
1919
|
+
if (data.data.bannedAt) {
|
|
1920
|
+
data.data.bannedAt = new Date(data.data.bannedAt);
|
|
1921
|
+
}
|
|
1922
|
+
if (data.data.verifiedAt) {
|
|
1923
|
+
data.data.verifiedAt = new Date(data.data.verifiedAt);
|
|
1924
|
+
}
|
|
1925
|
+
if (data.data.createdAt) {
|
|
1926
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1927
|
+
}
|
|
1928
|
+
if (data.data.updatedAt) {
|
|
1929
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1930
|
+
}
|
|
1931
|
+
return data;
|
|
1932
|
+
};
|
|
1933
|
+
const deleteUsersByIdResponseTransformer = async data => {
|
|
1934
|
+
if (data.data.lastLogin) {
|
|
1935
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
1936
|
+
}
|
|
1937
|
+
if (data.data.bannedAt) {
|
|
1938
|
+
data.data.bannedAt = new Date(data.data.bannedAt);
|
|
1939
|
+
}
|
|
1940
|
+
if (data.data.verifiedAt) {
|
|
1941
|
+
data.data.verifiedAt = new Date(data.data.verifiedAt);
|
|
1942
|
+
}
|
|
1943
|
+
if (data.data.createdAt) {
|
|
1944
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1945
|
+
}
|
|
1946
|
+
if (data.data.updatedAt) {
|
|
1947
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1948
|
+
}
|
|
1949
|
+
return data;
|
|
1950
|
+
};
|
|
1951
|
+
const getUsersByIdResponseTransformer = async data => {
|
|
1952
|
+
if (data.data.lastLogin) {
|
|
1953
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
1954
|
+
}
|
|
1955
|
+
if (data.data.bannedAt) {
|
|
1956
|
+
data.data.bannedAt = new Date(data.data.bannedAt);
|
|
1957
|
+
}
|
|
1958
|
+
if (data.data.verifiedAt) {
|
|
1959
|
+
data.data.verifiedAt = new Date(data.data.verifiedAt);
|
|
1960
|
+
}
|
|
1961
|
+
if (data.data.createdAt) {
|
|
1962
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1963
|
+
}
|
|
1964
|
+
if (data.data.updatedAt) {
|
|
1965
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1966
|
+
}
|
|
1967
|
+
return data;
|
|
1968
|
+
};
|
|
1969
|
+
const putUsersByIdResponseTransformer = async data => {
|
|
1970
|
+
if (data.data.lastLogin) {
|
|
1971
|
+
data.data.lastLogin = new Date(data.data.lastLogin);
|
|
1972
|
+
}
|
|
1973
|
+
if (data.data.bannedAt) {
|
|
1974
|
+
data.data.bannedAt = new Date(data.data.bannedAt);
|
|
1975
|
+
}
|
|
1976
|
+
if (data.data.verifiedAt) {
|
|
1977
|
+
data.data.verifiedAt = new Date(data.data.verifiedAt);
|
|
1978
|
+
}
|
|
1979
|
+
if (data.data.createdAt) {
|
|
1980
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
1981
|
+
}
|
|
1982
|
+
if (data.data.updatedAt) {
|
|
1983
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
1984
|
+
}
|
|
1985
|
+
return data;
|
|
1986
|
+
};
|
|
1987
|
+
const getOrganizationsByOrganizationIdZonesMyResponseTransformer = async data => {
|
|
1988
|
+
data.data = data.data.map(item => {
|
|
1989
|
+
if (item.createdAt) {
|
|
1990
|
+
item.createdAt = new Date(item.createdAt);
|
|
1991
|
+
}
|
|
1992
|
+
if (item.updatedAt) {
|
|
1993
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
1994
|
+
}
|
|
1995
|
+
return item;
|
|
1996
|
+
});
|
|
1997
|
+
return data;
|
|
1998
|
+
};
|
|
1999
|
+
const getOrganizationsByOrganizationIdZonesResponseTransformer = async data => {
|
|
2000
|
+
data.data = data.data.map(item => {
|
|
2001
|
+
if (item.createdAt) {
|
|
2002
|
+
item.createdAt = new Date(item.createdAt);
|
|
2003
|
+
}
|
|
2004
|
+
if (item.updatedAt) {
|
|
2005
|
+
item.updatedAt = new Date(item.updatedAt);
|
|
2006
|
+
}
|
|
2007
|
+
return item;
|
|
2008
|
+
});
|
|
2009
|
+
return data;
|
|
2010
|
+
};
|
|
2011
|
+
const postOrganizationsByOrganizationIdZonesResponseTransformer = async data => {
|
|
2012
|
+
if (data.data.createdAt) {
|
|
2013
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
2014
|
+
}
|
|
2015
|
+
if (data.data.updatedAt) {
|
|
2016
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
2017
|
+
}
|
|
2018
|
+
return data;
|
|
2019
|
+
};
|
|
2020
|
+
const deleteOrganizationsByOrganizationIdZonesByIdResponseTransformer = async data => {
|
|
2021
|
+
if (data.data.createdAt) {
|
|
2022
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
2023
|
+
}
|
|
2024
|
+
if (data.data.updatedAt) {
|
|
2025
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
2026
|
+
}
|
|
2027
|
+
return data;
|
|
2028
|
+
};
|
|
2029
|
+
const getOrganizationsByOrganizationIdZonesByIdResponseTransformer = async data => {
|
|
2030
|
+
if (data.data.createdAt) {
|
|
2031
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
2032
|
+
}
|
|
2033
|
+
if (data.data.updatedAt) {
|
|
2034
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
2035
|
+
}
|
|
2036
|
+
return data;
|
|
2037
|
+
};
|
|
2038
|
+
const putOrganizationsByOrganizationIdZonesByIdResponseTransformer = async data => {
|
|
2039
|
+
if (data.data.createdAt) {
|
|
2040
|
+
data.data.createdAt = new Date(data.data.createdAt);
|
|
2041
|
+
}
|
|
2042
|
+
if (data.data.updatedAt) {
|
|
2043
|
+
data.data.updatedAt = new Date(data.data.updatedAt);
|
|
2044
|
+
}
|
|
2045
|
+
return data;
|
|
2046
|
+
};
|
|
2047
|
+
|
|
2048
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2049
|
+
const get = options => (options?.client ?? client).get({
|
|
2050
|
+
url: '/',
|
|
2051
|
+
...options
|
|
2052
|
+
});
|
|
2053
|
+
const postAdminNewToken = options => (options.client ?? client).post({
|
|
2054
|
+
responseTransformer: postAdminNewTokenResponseTransformer,
|
|
2055
|
+
url: '/admin/new-token',
|
|
2056
|
+
...options,
|
|
2057
|
+
headers: {
|
|
2058
|
+
'Content-Type': 'application/json',
|
|
2059
|
+
...options.headers
|
|
2060
|
+
}
|
|
2061
|
+
});
|
|
2062
|
+
const postAdminLogin = options => (options.client ?? client).post({
|
|
2063
|
+
responseTransformer: postAdminLoginResponseTransformer,
|
|
2064
|
+
url: '/admin/login',
|
|
2065
|
+
...options,
|
|
2066
|
+
headers: {
|
|
2067
|
+
'Content-Type': 'application/json',
|
|
2068
|
+
...options.headers
|
|
2069
|
+
}
|
|
2070
|
+
});
|
|
2071
|
+
const getOrganizationsByOrganizationIdBranchesMy = options => (options.client ?? client).get({
|
|
2072
|
+
responseTransformer: getOrganizationsByOrganizationIdBranchesMyResponseTransformer,
|
|
2073
|
+
url: '/organizations/{organizationId}/branches/my',
|
|
2074
|
+
...options
|
|
2075
|
+
});
|
|
2076
|
+
const getOrganizationsByOrganizationIdBranches = options => (options.client ?? client).get({
|
|
2077
|
+
responseTransformer: getOrganizationsByOrganizationIdBranchesResponseTransformer,
|
|
2078
|
+
url: '/organizations/{organizationId}/branches',
|
|
2079
|
+
...options
|
|
2080
|
+
});
|
|
2081
|
+
const postOrganizationsByOrganizationIdBranches = options => (options.client ?? client).post({
|
|
2082
|
+
responseTransformer: postOrganizationsByOrganizationIdBranchesResponseTransformer,
|
|
2083
|
+
url: '/organizations/{organizationId}/branches',
|
|
2084
|
+
...options,
|
|
2085
|
+
headers: {
|
|
2086
|
+
'Content-Type': 'application/json',
|
|
2087
|
+
...options.headers
|
|
2088
|
+
}
|
|
2089
|
+
});
|
|
2090
|
+
const deleteOrganizationsByOrganizationIdBranchesById = options => (options.client ?? client).delete({
|
|
2091
|
+
responseTransformer: deleteOrganizationsByOrganizationIdBranchesByIdResponseTransformer,
|
|
2092
|
+
url: '/organizations/{organizationId}/branches/{id}',
|
|
2093
|
+
...options
|
|
2094
|
+
});
|
|
2095
|
+
const getOrganizationsByOrganizationIdBranchesById = options => (options.client ?? client).get({
|
|
2096
|
+
responseTransformer: getOrganizationsByOrganizationIdBranchesByIdResponseTransformer,
|
|
2097
|
+
url: '/organizations/{organizationId}/branches/{id}',
|
|
2098
|
+
...options
|
|
2099
|
+
});
|
|
2100
|
+
const putOrganizationsByOrganizationIdBranchesById = options => (options.client ?? client).put({
|
|
2101
|
+
responseTransformer: putOrganizationsByOrganizationIdBranchesByIdResponseTransformer,
|
|
2102
|
+
url: '/organizations/{organizationId}/branches/{id}',
|
|
2103
|
+
...options,
|
|
2104
|
+
headers: {
|
|
2105
|
+
'Content-Type': 'application/json',
|
|
2106
|
+
...options.headers
|
|
2107
|
+
}
|
|
2108
|
+
});
|
|
2109
|
+
const putOrganizationsByOrganizationIdBranchesByIdChangeId = options => (options.client ?? client).put({
|
|
2110
|
+
url: '/organizations/{organizationId}/branches/{id}/change-id',
|
|
2111
|
+
...options,
|
|
2112
|
+
headers: {
|
|
2113
|
+
'Content-Type': 'application/json',
|
|
2114
|
+
...options.headers
|
|
2115
|
+
}
|
|
2116
|
+
});
|
|
2117
|
+
const getGroupsMy = options => (options?.client ?? client).get({
|
|
2118
|
+
responseTransformer: getGroupsMyResponseTransformer,
|
|
2119
|
+
url: '/groups/my',
|
|
2120
|
+
...options
|
|
2121
|
+
});
|
|
2122
|
+
const getGroupsByIdPermissions = options => (options.client ?? client).get({
|
|
2123
|
+
url: '/groups/{id}/permissions',
|
|
2124
|
+
...options
|
|
2125
|
+
});
|
|
2126
|
+
const postGroupsByIdPermissions = options => (options.client ?? client).post({
|
|
2127
|
+
url: '/groups/{id}/permissions',
|
|
2128
|
+
...options,
|
|
2129
|
+
headers: {
|
|
2130
|
+
'Content-Type': 'application/json',
|
|
2131
|
+
...options.headers
|
|
2132
|
+
}
|
|
2133
|
+
});
|
|
2134
|
+
const getGroupsByIdUsers = options => (options.client ?? client).get({
|
|
2135
|
+
responseTransformer: getGroupsByIdUsersResponseTransformer,
|
|
2136
|
+
url: '/groups/{id}/users',
|
|
2137
|
+
...options
|
|
2138
|
+
});
|
|
2139
|
+
const deleteGroupsByGroupIdUsersByUserId = options => (options.client ?? client).delete({
|
|
2140
|
+
url: '/groups/{groupId}/users/{userId}',
|
|
2141
|
+
...options
|
|
2142
|
+
});
|
|
2143
|
+
const getGroups = options => (options?.client ?? client).get({
|
|
2144
|
+
responseTransformer: getGroupsResponseTransformer,
|
|
2145
|
+
url: '/groups',
|
|
2146
|
+
...options
|
|
2147
|
+
});
|
|
2148
|
+
const postGroups = options => (options?.client ?? client).post({
|
|
2149
|
+
responseTransformer: postGroupsResponseTransformer,
|
|
2150
|
+
url: '/groups',
|
|
2151
|
+
...options,
|
|
2152
|
+
headers: {
|
|
2153
|
+
'Content-Type': 'application/json',
|
|
2154
|
+
...options?.headers
|
|
2155
|
+
}
|
|
2156
|
+
});
|
|
2157
|
+
const deleteGroupsById = options => (options.client ?? client).delete({
|
|
2158
|
+
responseTransformer: deleteGroupsByIdResponseTransformer,
|
|
2159
|
+
url: '/groups/{id}',
|
|
2160
|
+
...options
|
|
2161
|
+
});
|
|
2162
|
+
const getGroupsById = options => (options.client ?? client).get({
|
|
2163
|
+
responseTransformer: getGroupsByIdResponseTransformer,
|
|
2164
|
+
url: '/groups/{id}',
|
|
2165
|
+
...options
|
|
2166
|
+
});
|
|
2167
|
+
const putGroupsById = options => (options.client ?? client).put({
|
|
2168
|
+
responseTransformer: putGroupsByIdResponseTransformer,
|
|
2169
|
+
url: '/groups/{id}',
|
|
2170
|
+
...options,
|
|
2171
|
+
headers: {
|
|
2172
|
+
'Content-Type': 'application/json',
|
|
2173
|
+
...options.headers
|
|
2174
|
+
}
|
|
2175
|
+
});
|
|
2176
|
+
const putGroupsByIdChangeId = options => (options.client ?? client).put({
|
|
2177
|
+
url: '/groups/{id}/change-id',
|
|
2178
|
+
...options,
|
|
2179
|
+
headers: {
|
|
2180
|
+
'Content-Type': 'application/json',
|
|
2181
|
+
...options.headers
|
|
2182
|
+
}
|
|
2183
|
+
});
|
|
2184
|
+
const getInvites = options => (options?.client ?? client).get({
|
|
2185
|
+
responseTransformer: getInvitesResponseTransformer,
|
|
2186
|
+
url: '/invites',
|
|
2187
|
+
...options
|
|
2188
|
+
});
|
|
2189
|
+
const postInvites = options => (options?.client ?? client).post({
|
|
2190
|
+
responseTransformer: postInvitesResponseTransformer,
|
|
2191
|
+
url: '/invites',
|
|
2192
|
+
...options,
|
|
2193
|
+
headers: {
|
|
2194
|
+
'Content-Type': 'application/json',
|
|
2195
|
+
...options?.headers
|
|
2196
|
+
}
|
|
2197
|
+
});
|
|
2198
|
+
const deleteInvitesById = options => (options.client ?? client).delete({
|
|
2199
|
+
responseTransformer: deleteInvitesByIdResponseTransformer,
|
|
2200
|
+
url: '/invites/{id}',
|
|
2201
|
+
...options
|
|
2202
|
+
});
|
|
2203
|
+
const getInvitesById = options => (options.client ?? client).get({
|
|
2204
|
+
responseTransformer: getInvitesByIdResponseTransformer,
|
|
2205
|
+
url: '/invites/{id}',
|
|
2206
|
+
...options
|
|
2207
|
+
});
|
|
2208
|
+
const putInvitesById = options => (options.client ?? client).put({
|
|
2209
|
+
responseTransformer: putInvitesByIdResponseTransformer,
|
|
2210
|
+
url: '/invites/{id}',
|
|
2211
|
+
...options,
|
|
2212
|
+
headers: {
|
|
2213
|
+
'Content-Type': 'application/json',
|
|
2214
|
+
...options.headers
|
|
2215
|
+
}
|
|
2216
|
+
});
|
|
2217
|
+
const putInvitesByIdChangeId = options => (options.client ?? client).put({
|
|
2218
|
+
url: '/invites/{id}/change-id',
|
|
2219
|
+
...options,
|
|
2220
|
+
headers: {
|
|
2221
|
+
'Content-Type': 'application/json',
|
|
2222
|
+
...options.headers
|
|
2223
|
+
}
|
|
2224
|
+
});
|
|
2225
|
+
const deleteMembershipsByIdZone = options => (options.client ?? client).delete({
|
|
2226
|
+
url: '/memberships/{id}/zone',
|
|
2227
|
+
...options,
|
|
2228
|
+
headers: {
|
|
2229
|
+
'Content-Type': 'application/json',
|
|
2230
|
+
...options.headers
|
|
2231
|
+
}
|
|
2232
|
+
});
|
|
2233
|
+
const postMembershipsByIdZone = options => (options.client ?? client).post({
|
|
2234
|
+
responseTransformer: postMembershipsByIdZoneResponseTransformer,
|
|
2235
|
+
url: '/memberships/{id}/zone',
|
|
2236
|
+
...options,
|
|
2237
|
+
headers: {
|
|
2238
|
+
'Content-Type': 'application/json',
|
|
2239
|
+
...options.headers
|
|
2240
|
+
}
|
|
2241
|
+
});
|
|
2242
|
+
const getMembershipsZoneByZoneId = options => (options.client ?? client).get({
|
|
2243
|
+
responseTransformer: getMembershipsZoneByZoneIdResponseTransformer,
|
|
2244
|
+
url: '/memberships/zone/{zoneId}',
|
|
2245
|
+
...options
|
|
2246
|
+
});
|
|
2247
|
+
const deleteMembershipsByIdBranch = options => (options.client ?? client).delete({
|
|
2248
|
+
url: '/memberships/{id}/branch',
|
|
2249
|
+
...options,
|
|
2250
|
+
headers: {
|
|
2251
|
+
'Content-Type': 'application/json',
|
|
2252
|
+
...options.headers
|
|
2253
|
+
}
|
|
2254
|
+
});
|
|
2255
|
+
const postMembershipsByIdBranch = options => (options.client ?? client).post({
|
|
2256
|
+
responseTransformer: postMembershipsByIdBranchResponseTransformer,
|
|
2257
|
+
url: '/memberships/{id}/branch',
|
|
2258
|
+
...options,
|
|
2259
|
+
headers: {
|
|
2260
|
+
'Content-Type': 'application/json',
|
|
2261
|
+
...options.headers
|
|
2262
|
+
}
|
|
2263
|
+
});
|
|
2264
|
+
const getMembershipsBranchById = options => (options.client ?? client).get({
|
|
2265
|
+
responseTransformer: getMembershipsBranchByIdResponseTransformer,
|
|
2266
|
+
url: '/memberships/branch/{id}',
|
|
2267
|
+
...options,
|
|
2268
|
+
headers: {
|
|
2269
|
+
'Content-Type': 'application/json',
|
|
2270
|
+
...options.headers
|
|
2271
|
+
}
|
|
2272
|
+
});
|
|
2273
|
+
const getMembershipsMy = options => (options?.client ?? client).get({
|
|
2274
|
+
responseTransformer: getMembershipsMyResponseTransformer,
|
|
2275
|
+
url: '/memberships/my',
|
|
2276
|
+
...options
|
|
2277
|
+
});
|
|
2278
|
+
const getMembershipsByIdPermissions = options => (options.client ?? client).get({
|
|
2279
|
+
url: '/memberships/{id}/permissions',
|
|
2280
|
+
...options
|
|
2281
|
+
});
|
|
2282
|
+
const deleteMemberships = options => (options?.client ?? client).delete({
|
|
2283
|
+
url: '/memberships',
|
|
2284
|
+
...options,
|
|
2285
|
+
headers: {
|
|
2286
|
+
'Content-Type': 'application/json',
|
|
2287
|
+
...options?.headers
|
|
2288
|
+
}
|
|
2289
|
+
});
|
|
2290
|
+
const getMemberships = options => (options?.client ?? client).get({
|
|
2291
|
+
responseTransformer: getMembershipsResponseTransformer,
|
|
2292
|
+
url: '/memberships',
|
|
2293
|
+
...options
|
|
2294
|
+
});
|
|
2295
|
+
const postMemberships = options => (options?.client ?? client).post({
|
|
2296
|
+
responseTransformer: postMembershipsResponseTransformer,
|
|
2297
|
+
url: '/memberships',
|
|
2298
|
+
...options,
|
|
2299
|
+
headers: {
|
|
2300
|
+
'Content-Type': 'application/json',
|
|
2301
|
+
...options?.headers
|
|
2302
|
+
}
|
|
2303
|
+
});
|
|
2304
|
+
const deleteMembershipsById = options => (options.client ?? client).delete({
|
|
2305
|
+
responseTransformer: deleteMembershipsByIdResponseTransformer,
|
|
2306
|
+
url: '/memberships/{id}',
|
|
2307
|
+
...options
|
|
2308
|
+
});
|
|
2309
|
+
const getMembershipsById = options => (options.client ?? client).get({
|
|
2310
|
+
responseTransformer: getMembershipsByIdResponseTransformer,
|
|
2311
|
+
url: '/memberships/{id}',
|
|
2312
|
+
...options
|
|
2313
|
+
});
|
|
2314
|
+
const putMembershipsByIdChangeId = options => (options.client ?? client).put({
|
|
2315
|
+
url: '/memberships/{id}/change-id',
|
|
2316
|
+
...options,
|
|
2317
|
+
headers: {
|
|
2318
|
+
'Content-Type': 'application/json',
|
|
2319
|
+
...options.headers
|
|
2320
|
+
}
|
|
2321
|
+
});
|
|
2322
|
+
const getOrganizationsByUserByUserId = options => (options.client ?? client).get({
|
|
2323
|
+
responseTransformer: getOrganizationsByUserByUserIdResponseTransformer,
|
|
2324
|
+
url: '/organizations/by-user/{userId}',
|
|
2325
|
+
...options
|
|
2326
|
+
});
|
|
2327
|
+
const getOrganizationsByOwnerByUserId = options => (options.client ?? client).get({
|
|
2328
|
+
responseTransformer: getOrganizationsByOwnerByUserIdResponseTransformer,
|
|
2329
|
+
url: '/organizations/by-owner/{userId}',
|
|
2330
|
+
...options
|
|
2331
|
+
});
|
|
2332
|
+
const getOrganizationsByOrganizationIdMembers = options => (options.client ?? client).get({
|
|
2333
|
+
responseTransformer: getOrganizationsByOrganizationIdMembersResponseTransformer,
|
|
2334
|
+
url: '/organizations/{organizationId}/members',
|
|
2335
|
+
...options
|
|
2336
|
+
});
|
|
2337
|
+
const getOrganizationsByOrganizationIdCreator = options => (options.client ?? client).get({
|
|
2338
|
+
responseTransformer: getOrganizationsByOrganizationIdCreatorResponseTransformer,
|
|
2339
|
+
url: '/organizations/{organizationId}/creator',
|
|
2340
|
+
...options
|
|
2341
|
+
});
|
|
2342
|
+
const getOrganizations = options => (options?.client ?? client).get({
|
|
2343
|
+
responseTransformer: getOrganizationsResponseTransformer,
|
|
2344
|
+
url: '/organizations',
|
|
2345
|
+
...options
|
|
2346
|
+
});
|
|
2347
|
+
const postOrganizations = options => (options?.client ?? client).post({
|
|
2348
|
+
responseTransformer: postOrganizationsResponseTransformer,
|
|
2349
|
+
url: '/organizations',
|
|
2350
|
+
...options,
|
|
2351
|
+
headers: {
|
|
2352
|
+
'Content-Type': 'application/json',
|
|
2353
|
+
...options?.headers
|
|
2354
|
+
}
|
|
2355
|
+
});
|
|
2356
|
+
const deleteOrganizationsById = options => (options.client ?? client).delete({
|
|
2357
|
+
responseTransformer: deleteOrganizationsByIdResponseTransformer,
|
|
2358
|
+
url: '/organizations/{id}',
|
|
2359
|
+
...options
|
|
2360
|
+
});
|
|
2361
|
+
const getOrganizationsById = options => (options.client ?? client).get({
|
|
2362
|
+
responseTransformer: getOrganizationsByIdResponseTransformer,
|
|
2363
|
+
url: '/organizations/{id}',
|
|
2364
|
+
...options
|
|
2365
|
+
});
|
|
2366
|
+
const putOrganizationsById = options => (options.client ?? client).put({
|
|
2367
|
+
responseTransformer: putOrganizationsByIdResponseTransformer,
|
|
2368
|
+
url: '/organizations/{id}',
|
|
2369
|
+
...options,
|
|
2370
|
+
headers: {
|
|
2371
|
+
'Content-Type': 'application/json',
|
|
2372
|
+
...options.headers
|
|
2373
|
+
}
|
|
2374
|
+
});
|
|
2375
|
+
const putOrganizationsByIdChangeId = options => (options.client ?? client).put({
|
|
2376
|
+
url: '/organizations/{id}/change-id',
|
|
2377
|
+
...options,
|
|
2378
|
+
headers: {
|
|
2379
|
+
'Content-Type': 'application/json',
|
|
2380
|
+
...options.headers
|
|
2381
|
+
}
|
|
2382
|
+
});
|
|
2383
|
+
const getPermissions = options => (options?.client ?? client).get({
|
|
2384
|
+
url: '/permissions',
|
|
2385
|
+
...options
|
|
2386
|
+
});
|
|
2387
|
+
const postPermissions = options => (options?.client ?? client).post({
|
|
2388
|
+
url: '/permissions',
|
|
2389
|
+
...options,
|
|
2390
|
+
headers: {
|
|
2391
|
+
'Content-Type': 'application/json',
|
|
2392
|
+
...options?.headers
|
|
2393
|
+
}
|
|
2394
|
+
});
|
|
2395
|
+
const deletePermissionsById = options => (options.client ?? client).delete({
|
|
2396
|
+
url: '/permissions/{id}',
|
|
2397
|
+
...options
|
|
2398
|
+
});
|
|
2399
|
+
const getPermissionsById = options => (options.client ?? client).get({
|
|
2400
|
+
url: '/permissions/{id}',
|
|
2401
|
+
...options
|
|
2402
|
+
});
|
|
2403
|
+
const putPermissionsById = options => (options.client ?? client).put({
|
|
2404
|
+
url: '/permissions/{id}',
|
|
2405
|
+
...options,
|
|
2406
|
+
headers: {
|
|
2407
|
+
'Content-Type': 'application/json',
|
|
2408
|
+
...options.headers
|
|
2409
|
+
}
|
|
2410
|
+
});
|
|
2411
|
+
const getProjects = options => (options?.client ?? client).get({
|
|
2412
|
+
responseTransformer: getProjectsResponseTransformer,
|
|
2413
|
+
url: '/projects',
|
|
2414
|
+
...options
|
|
2415
|
+
});
|
|
2416
|
+
const postProjects = options => (options?.client ?? client).post({
|
|
2417
|
+
responseTransformer: postProjectsResponseTransformer,
|
|
2418
|
+
url: '/projects',
|
|
2419
|
+
...options,
|
|
2420
|
+
headers: {
|
|
2421
|
+
'Content-Type': 'application/json',
|
|
2422
|
+
...options?.headers
|
|
2423
|
+
}
|
|
2424
|
+
});
|
|
2425
|
+
const deleteProjectsByProjectId = options => (options.client ?? client).delete({
|
|
2426
|
+
responseTransformer: deleteProjectsByProjectIdResponseTransformer,
|
|
2427
|
+
url: '/projects/{projectId}',
|
|
2428
|
+
...options
|
|
2429
|
+
});
|
|
2430
|
+
const getProjectsByProjectId = options => (options.client ?? client).get({
|
|
2431
|
+
responseTransformer: getProjectsByProjectIdResponseTransformer,
|
|
2432
|
+
url: '/projects/{projectId}',
|
|
2433
|
+
...options
|
|
2434
|
+
});
|
|
2435
|
+
const putProjectsByProjectId = options => (options.client ?? client).put({
|
|
2436
|
+
responseTransformer: putProjectsByProjectIdResponseTransformer,
|
|
2437
|
+
url: '/projects/{projectId}',
|
|
2438
|
+
...options,
|
|
2439
|
+
headers: {
|
|
2440
|
+
'Content-Type': 'application/json',
|
|
2441
|
+
...options.headers
|
|
2442
|
+
}
|
|
2443
|
+
});
|
|
2444
|
+
const putProjectsByProjectIdChangeId = options => (options.client ?? client).put({
|
|
2445
|
+
url: '/projects/{projectId}/change-id',
|
|
2446
|
+
...options,
|
|
2447
|
+
headers: {
|
|
2448
|
+
'Content-Type': 'application/json',
|
|
2449
|
+
...options.headers
|
|
2450
|
+
}
|
|
2451
|
+
});
|
|
2452
|
+
const deleteRolesByIdPermissions = options => (options.client ?? client).delete({
|
|
2453
|
+
url: '/roles/{id}/permissions',
|
|
2454
|
+
...options,
|
|
2455
|
+
headers: {
|
|
2456
|
+
'Content-Type': 'application/json',
|
|
2457
|
+
...options.headers
|
|
2458
|
+
}
|
|
2459
|
+
});
|
|
2460
|
+
const getRolesByIdPermissions = options => (options.client ?? client).get({
|
|
2461
|
+
url: '/roles/{id}/permissions',
|
|
2462
|
+
...options
|
|
2463
|
+
});
|
|
2464
|
+
const postRolesByIdPermissions = options => (options.client ?? client).post({
|
|
2465
|
+
url: '/roles/{id}/permissions',
|
|
2466
|
+
...options,
|
|
2467
|
+
headers: {
|
|
2468
|
+
'Content-Type': 'application/json',
|
|
2469
|
+
...options.headers
|
|
2470
|
+
}
|
|
2471
|
+
});
|
|
2472
|
+
const getRolesByIdUsers = options => (options.client ?? client).get({
|
|
2473
|
+
responseTransformer: getRolesByIdUsersResponseTransformer,
|
|
2474
|
+
url: '/roles/{id}/users',
|
|
2475
|
+
...options
|
|
2476
|
+
});
|
|
2477
|
+
const getRoles = options => (options?.client ?? client).get({
|
|
2478
|
+
responseTransformer: getRolesResponseTransformer,
|
|
2479
|
+
url: '/roles',
|
|
2480
|
+
...options
|
|
2481
|
+
});
|
|
2482
|
+
const postRoles = options => (options?.client ?? client).post({
|
|
2483
|
+
responseTransformer: postRolesResponseTransformer,
|
|
2484
|
+
url: '/roles',
|
|
2485
|
+
...options,
|
|
2486
|
+
headers: {
|
|
2487
|
+
'Content-Type': 'application/json',
|
|
2488
|
+
...options?.headers
|
|
2489
|
+
}
|
|
2490
|
+
});
|
|
2491
|
+
const deleteRolesById = options => (options.client ?? client).delete({
|
|
2492
|
+
responseTransformer: deleteRolesByIdResponseTransformer,
|
|
2493
|
+
url: '/roles/{id}',
|
|
2494
|
+
...options
|
|
2495
|
+
});
|
|
2496
|
+
const getRolesById = options => (options.client ?? client).get({
|
|
2497
|
+
responseTransformer: getRolesByIdResponseTransformer,
|
|
2498
|
+
url: '/roles/{id}',
|
|
2499
|
+
...options
|
|
2500
|
+
});
|
|
2501
|
+
const putRolesById = options => (options.client ?? client).put({
|
|
2502
|
+
responseTransformer: putRolesByIdResponseTransformer,
|
|
2503
|
+
url: '/roles/{id}',
|
|
2504
|
+
...options,
|
|
2505
|
+
headers: {
|
|
2506
|
+
'Content-Type': 'application/json',
|
|
2507
|
+
...options.headers
|
|
2508
|
+
}
|
|
2509
|
+
});
|
|
2510
|
+
const putRolesByIdChangeId = options => (options.client ?? client).put({
|
|
2511
|
+
url: '/roles/{id}/change-id',
|
|
2512
|
+
...options,
|
|
2513
|
+
headers: {
|
|
2514
|
+
'Content-Type': 'application/json',
|
|
2515
|
+
...options.headers
|
|
2516
|
+
}
|
|
2517
|
+
});
|
|
2518
|
+
const getSecretKeys = options => (options?.client ?? client).get({
|
|
2519
|
+
responseTransformer: getSecretKeysResponseTransformer,
|
|
2520
|
+
url: '/secret-keys',
|
|
2521
|
+
...options
|
|
2522
|
+
});
|
|
2523
|
+
const postSecretKeys = options => (options?.client ?? client).post({
|
|
2524
|
+
responseTransformer: postSecretKeysResponseTransformer,
|
|
2525
|
+
url: '/secret-keys',
|
|
2526
|
+
...options,
|
|
2527
|
+
headers: {
|
|
2528
|
+
'Content-Type': 'application/json',
|
|
2529
|
+
...options?.headers
|
|
2530
|
+
}
|
|
2531
|
+
});
|
|
2532
|
+
const deleteSecretKeysById = options => (options.client ?? client).delete({
|
|
2533
|
+
responseTransformer: deleteSecretKeysByIdResponseTransformer,
|
|
2534
|
+
url: '/secret-keys/{id}',
|
|
2535
|
+
...options
|
|
2536
|
+
});
|
|
2537
|
+
const getSecretKeysById = options => (options.client ?? client).get({
|
|
2538
|
+
responseTransformer: getSecretKeysByIdResponseTransformer,
|
|
2539
|
+
url: '/secret-keys/{id}',
|
|
2540
|
+
...options
|
|
2541
|
+
});
|
|
2542
|
+
const postUsersByIdIdentifierAdd = options => (options.client ?? client).post({
|
|
2543
|
+
url: '/users/{id}/identifier/add',
|
|
2544
|
+
...options,
|
|
2545
|
+
headers: {
|
|
2546
|
+
'Content-Type': 'application/json',
|
|
2547
|
+
...options.headers
|
|
2548
|
+
}
|
|
2549
|
+
});
|
|
2550
|
+
const postUsersByIdIdentifierDelete = options => (options.client ?? client).post({
|
|
2551
|
+
url: '/users/{id}/identifier/delete',
|
|
2552
|
+
...options,
|
|
2553
|
+
headers: {
|
|
2554
|
+
'Content-Type': 'application/json',
|
|
2555
|
+
...options.headers
|
|
2556
|
+
}
|
|
2557
|
+
});
|
|
2558
|
+
const getUsersByIdIdentifiers = options => (options.client ?? client).get({
|
|
2559
|
+
responseTransformer: getUsersByIdIdentifiersResponseTransformer,
|
|
2560
|
+
url: '/users/{id}/identifiers',
|
|
2561
|
+
...options
|
|
2562
|
+
});
|
|
2563
|
+
const postUserPasswordsUpsert = options => (options?.client ?? client).post({
|
|
2564
|
+
responseTransformer: postUserPasswordsUpsertResponseTransformer,
|
|
2565
|
+
url: '/user-passwords/upsert',
|
|
2566
|
+
...options,
|
|
2567
|
+
headers: {
|
|
2568
|
+
'Content-Type': 'application/json',
|
|
2569
|
+
...options?.headers
|
|
2570
|
+
}
|
|
2571
|
+
});
|
|
2572
|
+
const getUserPasswords = options => (options.client ?? client).get({
|
|
2573
|
+
url: '/user-passwords',
|
|
2574
|
+
...options
|
|
2575
|
+
});
|
|
2576
|
+
const postUsersVerifyByToken = options => (options.client ?? client).post({
|
|
2577
|
+
url: '/users/verify/{token}',
|
|
2578
|
+
...options
|
|
2579
|
+
});
|
|
2580
|
+
const postUsersByIdNewVerificationToken = options => (options.client ?? client).post({
|
|
2581
|
+
url: '/users/{id}/new-verification-token',
|
|
2582
|
+
...options,
|
|
2583
|
+
headers: {
|
|
2584
|
+
'Content-Type': 'application/json',
|
|
2585
|
+
...options.headers
|
|
2586
|
+
}
|
|
2587
|
+
});
|
|
2588
|
+
const deleteUsersByIdMembershipsByMembershipId = options => (options.client ?? client).delete({
|
|
2589
|
+
responseTransformer: deleteUsersByIdMembershipsByMembershipIdResponseTransformer,
|
|
2590
|
+
url: '/users/{id}/memberships/{membershipId}',
|
|
2591
|
+
...options
|
|
2592
|
+
});
|
|
2593
|
+
const postUsersPasswordForgot = options => (options.client ?? client).post({
|
|
2594
|
+
url: '/users/password/forgot',
|
|
2595
|
+
...options,
|
|
2596
|
+
headers: {
|
|
2597
|
+
'Content-Type': 'application/json',
|
|
2598
|
+
...options.headers
|
|
2599
|
+
}
|
|
2600
|
+
});
|
|
2601
|
+
const postUsersPasswordResetByToken = options => (options.client ?? client).post({
|
|
2602
|
+
responseTransformer: postUsersPasswordResetByTokenResponseTransformer,
|
|
2603
|
+
url: '/users/password/reset/{token}',
|
|
2604
|
+
...options,
|
|
2605
|
+
headers: {
|
|
2606
|
+
'Content-Type': 'application/json',
|
|
2607
|
+
...options.headers
|
|
2608
|
+
}
|
|
2609
|
+
});
|
|
2610
|
+
const postUsersByIdPasswordChange = options => (options.client ?? client).post({
|
|
2611
|
+
responseTransformer: postUsersByIdPasswordChangeResponseTransformer,
|
|
2612
|
+
url: '/users/{id}/password/change',
|
|
2613
|
+
...options,
|
|
2614
|
+
headers: {
|
|
2615
|
+
'Content-Type': 'application/json',
|
|
2616
|
+
...options.headers
|
|
2617
|
+
}
|
|
2618
|
+
});
|
|
2619
|
+
const postUsersLogin = options => (options.client ?? client).post({
|
|
2620
|
+
responseTransformer: postUsersLoginResponseTransformer,
|
|
2621
|
+
url: '/users/login',
|
|
2622
|
+
...options,
|
|
2623
|
+
headers: {
|
|
2624
|
+
'Content-Type': 'application/json',
|
|
2625
|
+
...options.headers
|
|
2626
|
+
}
|
|
2627
|
+
});
|
|
2628
|
+
const postUsersLoginSwitch = options => (options?.client ?? client).post({
|
|
2629
|
+
responseTransformer: postUsersLoginSwitchResponseTransformer,
|
|
2630
|
+
url: '/users/login/switch',
|
|
2631
|
+
...options
|
|
2632
|
+
});
|
|
2633
|
+
const postUsersRegister = options => (options.client ?? client).post({
|
|
2634
|
+
responseTransformer: postUsersRegisterResponseTransformer,
|
|
2635
|
+
url: '/users/register',
|
|
2636
|
+
...options,
|
|
2637
|
+
headers: {
|
|
2638
|
+
'Content-Type': 'application/json',
|
|
2639
|
+
...options.headers
|
|
2640
|
+
}
|
|
2641
|
+
});
|
|
2642
|
+
const postUsersToken = options => (options.client ?? client).post({
|
|
2643
|
+
url: '/users/token',
|
|
2644
|
+
...options,
|
|
2645
|
+
headers: {
|
|
2646
|
+
'Content-Type': 'application/json',
|
|
2647
|
+
...options.headers
|
|
2648
|
+
}
|
|
2649
|
+
});
|
|
2650
|
+
const postUsersLogout = options => (options?.client ?? client).post({
|
|
2651
|
+
url: '/users/logout',
|
|
2652
|
+
...options
|
|
2653
|
+
});
|
|
2654
|
+
const getUsersMe = options => (options?.client ?? client).get({
|
|
2655
|
+
responseTransformer: getUsersMeResponseTransformer,
|
|
2656
|
+
url: '/users/me',
|
|
2657
|
+
...options
|
|
2658
|
+
});
|
|
2659
|
+
const getUsersCustomActive = options => (options?.client ?? client).get({
|
|
2660
|
+
responseTransformer: getUsersCustomActiveResponseTransformer,
|
|
2661
|
+
url: '/users/custom/active',
|
|
2662
|
+
...options
|
|
2663
|
+
});
|
|
2664
|
+
const getUsersCustomBanned = options => (options?.client ?? client).get({
|
|
2665
|
+
responseTransformer: getUsersCustomBannedResponseTransformer,
|
|
2666
|
+
url: '/users/custom/banned',
|
|
2667
|
+
...options
|
|
2668
|
+
});
|
|
2669
|
+
const getUsersCustomUnverified = options => (options?.client ?? client).get({
|
|
2670
|
+
responseTransformer: getUsersCustomUnverifiedResponseTransformer,
|
|
2671
|
+
url: '/users/custom/unverified',
|
|
2672
|
+
...options
|
|
2673
|
+
});
|
|
2674
|
+
const getUsersCustomInactive = options => (options.client ?? client).get({
|
|
2675
|
+
responseTransformer: getUsersCustomInactiveResponseTransformer,
|
|
2676
|
+
url: '/users/custom/inactive',
|
|
2677
|
+
...options
|
|
2678
|
+
});
|
|
2679
|
+
const deleteUsers = options => (options?.client ?? client).delete({
|
|
2680
|
+
url: '/users',
|
|
2681
|
+
...options,
|
|
2682
|
+
headers: {
|
|
2683
|
+
'Content-Type': 'application/json',
|
|
2684
|
+
...options?.headers
|
|
2685
|
+
}
|
|
2686
|
+
});
|
|
2687
|
+
const getUsers = options => (options?.client ?? client).get({
|
|
2688
|
+
responseTransformer: getUsersResponseTransformer,
|
|
2689
|
+
url: '/users',
|
|
2690
|
+
...options
|
|
2691
|
+
});
|
|
2692
|
+
const postUsers = options => (options?.client ?? client).post({
|
|
2693
|
+
responseTransformer: postUsersResponseTransformer,
|
|
2694
|
+
url: '/users',
|
|
2695
|
+
...options,
|
|
2696
|
+
headers: {
|
|
2697
|
+
'Content-Type': 'application/json',
|
|
2698
|
+
...options?.headers
|
|
2699
|
+
}
|
|
2700
|
+
});
|
|
2701
|
+
const deleteUsersById = options => (options.client ?? client).delete({
|
|
2702
|
+
responseTransformer: deleteUsersByIdResponseTransformer,
|
|
2703
|
+
url: '/users/{id}',
|
|
2704
|
+
...options
|
|
2705
|
+
});
|
|
2706
|
+
const getUsersById = options => (options.client ?? client).get({
|
|
2707
|
+
responseTransformer: getUsersByIdResponseTransformer,
|
|
2708
|
+
url: '/users/{id}',
|
|
2709
|
+
...options
|
|
2710
|
+
});
|
|
2711
|
+
const putUsersById = options => (options.client ?? client).put({
|
|
2712
|
+
responseTransformer: putUsersByIdResponseTransformer,
|
|
2713
|
+
url: '/users/{id}',
|
|
2714
|
+
...options,
|
|
2715
|
+
headers: {
|
|
2716
|
+
'Content-Type': 'application/json',
|
|
2717
|
+
...options.headers
|
|
2718
|
+
}
|
|
2719
|
+
});
|
|
2720
|
+
const putUsersByIdChangeId = options => (options.client ?? client).put({
|
|
2721
|
+
url: '/users/{id}/change-id',
|
|
2722
|
+
...options,
|
|
2723
|
+
headers: {
|
|
2724
|
+
'Content-Type': 'application/json',
|
|
2725
|
+
...options.headers
|
|
2726
|
+
}
|
|
2727
|
+
});
|
|
2728
|
+
const getOrganizationsByOrganizationIdZonesMy = options => (options.client ?? client).get({
|
|
2729
|
+
responseTransformer: getOrganizationsByOrganizationIdZonesMyResponseTransformer,
|
|
2730
|
+
url: '/organizations/{organizationId}/zones/my',
|
|
2731
|
+
...options
|
|
2732
|
+
});
|
|
2733
|
+
const getOrganizationsByOrganizationIdZones = options => (options.client ?? client).get({
|
|
2734
|
+
responseTransformer: getOrganizationsByOrganizationIdZonesResponseTransformer,
|
|
2735
|
+
url: '/organizations/{organizationId}/zones',
|
|
2736
|
+
...options
|
|
2737
|
+
});
|
|
2738
|
+
const postOrganizationsByOrganizationIdZones = options => (options.client ?? client).post({
|
|
2739
|
+
responseTransformer: postOrganizationsByOrganizationIdZonesResponseTransformer,
|
|
2740
|
+
url: '/organizations/{organizationId}/zones',
|
|
2741
|
+
...options,
|
|
2742
|
+
headers: {
|
|
2743
|
+
'Content-Type': 'application/json',
|
|
2744
|
+
...options.headers
|
|
2745
|
+
}
|
|
2746
|
+
});
|
|
2747
|
+
const deleteOrganizationsByOrganizationIdZonesById = options => (options.client ?? client).delete({
|
|
2748
|
+
responseTransformer: deleteOrganizationsByOrganizationIdZonesByIdResponseTransformer,
|
|
2749
|
+
url: '/organizations/{organizationId}/zones/{id}',
|
|
2750
|
+
...options
|
|
2751
|
+
});
|
|
2752
|
+
const getOrganizationsByOrganizationIdZonesById = options => (options.client ?? client).get({
|
|
2753
|
+
responseTransformer: getOrganizationsByOrganizationIdZonesByIdResponseTransformer,
|
|
2754
|
+
url: '/organizations/{organizationId}/zones/{id}',
|
|
2755
|
+
...options
|
|
2756
|
+
});
|
|
2757
|
+
const putOrganizationsByOrganizationIdZonesById = options => (options.client ?? client).put({
|
|
2758
|
+
responseTransformer: putOrganizationsByOrganizationIdZonesByIdResponseTransformer,
|
|
2759
|
+
url: '/organizations/{organizationId}/zones/{id}',
|
|
2760
|
+
...options,
|
|
2761
|
+
headers: {
|
|
2762
|
+
'Content-Type': 'application/json',
|
|
2763
|
+
...options.headers
|
|
2764
|
+
}
|
|
2765
|
+
});
|
|
2766
|
+
const putOrganizationsByOrganizationIdZonesByIdChangeId = options => (options.client ?? client).put({
|
|
2767
|
+
url: '/organizations/{organizationId}/zones/{id}/change-id',
|
|
2768
|
+
...options,
|
|
2769
|
+
headers: {
|
|
2770
|
+
'Content-Type': 'application/json',
|
|
2771
|
+
...options.headers
|
|
2772
|
+
}
|
|
2773
|
+
});
|
|
2774
|
+
|
|
2775
|
+
export { client, deleteGroupsByGroupIdUsersByUserId, deleteGroupsById, deleteInvitesById, deleteMemberships, deleteMembershipsById, deleteMembershipsByIdBranch, deleteMembershipsByIdZone, deleteOrganizationsById, deleteOrganizationsByOrganizationIdBranchesById, deleteOrganizationsByOrganizationIdZonesById, deletePermissionsById, deleteProjectsByProjectId, deleteRolesById, deleteRolesByIdPermissions, deleteSecretKeysById, deleteUsers, deleteUsersById, deleteUsersByIdMembershipsByMembershipId, get, getGroups, getGroupsById, getGroupsByIdPermissions, getGroupsByIdUsers, getGroupsMy, getInvites, getInvitesById, getMemberships, getMembershipsBranchById, getMembershipsById, getMembershipsByIdPermissions, getMembershipsMy, getMembershipsZoneByZoneId, getOrganizations, getOrganizationsById, getOrganizationsByOrganizationIdBranches, getOrganizationsByOrganizationIdBranchesById, getOrganizationsByOrganizationIdBranchesMy, getOrganizationsByOrganizationIdCreator, getOrganizationsByOrganizationIdMembers, getOrganizationsByOrganizationIdZones, getOrganizationsByOrganizationIdZonesById, getOrganizationsByOrganizationIdZonesMy, getOrganizationsByOwnerByUserId, getOrganizationsByUserByUserId, getPermissions, getPermissionsById, getProjects, getProjectsByProjectId, getRoles, getRolesById, getRolesByIdPermissions, getRolesByIdUsers, getSecretKeys, getSecretKeysById, getUserPasswords, getUsers, getUsersById, getUsersByIdIdentifiers, getUsersCustomActive, getUsersCustomBanned, getUsersCustomInactive, getUsersCustomUnverified, getUsersMe, postAdminLogin, postAdminNewToken, postGroups, postGroupsByIdPermissions, postInvites, postMemberships, postMembershipsByIdBranch, postMembershipsByIdZone, postOrganizations, postOrganizationsByOrganizationIdBranches, postOrganizationsByOrganizationIdZones, postPermissions, postProjects, postRoles, postRolesByIdPermissions, postSecretKeys, postUserPasswordsUpsert, postUsers, postUsersByIdIdentifierAdd, postUsersByIdIdentifierDelete, postUsersByIdNewVerificationToken, postUsersByIdPasswordChange, postUsersLogin, postUsersLoginSwitch, postUsersLogout, postUsersPasswordForgot, postUsersPasswordResetByToken, postUsersRegister, postUsersToken, postUsersVerifyByToken, putGroupsById, putGroupsByIdChangeId, putInvitesById, putInvitesByIdChangeId, putMembershipsByIdChangeId, putOrganizationsById, putOrganizationsByIdChangeId, putOrganizationsByOrganizationIdBranchesById, putOrganizationsByOrganizationIdBranchesByIdChangeId, putOrganizationsByOrganizationIdZonesById, putOrganizationsByOrganizationIdZonesByIdChangeId, putPermissionsById, putProjectsByProjectId, putProjectsByProjectIdChangeId, putRolesById, putRolesByIdChangeId, putUsersById, putUsersByIdChangeId };
|