@handsondigital/idplugger-admin 2.0.2 → 2.1.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/api.ts CHANGED
@@ -130,6 +130,98 @@ export interface AdminPromotionCacheClear500Response {
130
130
  */
131
131
  'message'?: string;
132
132
  }
133
+ /**
134
+ *
135
+ * @export
136
+ * @interface ApiLog
137
+ */
138
+ export interface ApiLog {
139
+ /**
140
+ *
141
+ * @type {number}
142
+ * @memberof ApiLog
143
+ */
144
+ 'id'?: number;
145
+ /**
146
+ *
147
+ * @type {string}
148
+ * @memberof ApiLog
149
+ */
150
+ 'path'?: string;
151
+ /**
152
+ *
153
+ * @type {string}
154
+ * @memberof ApiLog
155
+ */
156
+ 'method'?: string;
157
+ /**
158
+ *
159
+ * @type {string}
160
+ * @memberof ApiLog
161
+ */
162
+ 'ip'?: string;
163
+ /**
164
+ *
165
+ * @type {string}
166
+ * @memberof ApiLog
167
+ */
168
+ 'http_version'?: string;
169
+ /**
170
+ *
171
+ * @type {string}
172
+ * @memberof ApiLog
173
+ */
174
+ 'api_username'?: string | null;
175
+ /**
176
+ *
177
+ * @type {number}
178
+ * @memberof ApiLog
179
+ */
180
+ 'status_code'?: number;
181
+ /**
182
+ *
183
+ * @type {object}
184
+ * @memberof ApiLog
185
+ */
186
+ 'request'?: object;
187
+ /**
188
+ *
189
+ * @type {object}
190
+ * @memberof ApiLog
191
+ */
192
+ 'response'?: object;
193
+ /**
194
+ *
195
+ * @type {string}
196
+ * @memberof ApiLog
197
+ */
198
+ 'created_at'?: string;
199
+ }
200
+ /**
201
+ *
202
+ * @export
203
+ * @interface ApiLogPaginated
204
+ */
205
+ export interface ApiLogPaginated {
206
+ /**
207
+ *
208
+ * @type {string}
209
+ * @memberof ApiLogPaginated
210
+ */
211
+ 'message'?: string;
212
+ /**
213
+ *
214
+ * @type {Array<ApiLog>}
215
+ * @memberof ApiLogPaginated
216
+ */
217
+ 'content'?: Array<ApiLog>;
218
+ /**
219
+ *
220
+ * @type {Pagination}
221
+ * @memberof ApiLogPaginated
222
+ */
223
+ 'paging'?: Pagination;
224
+ }
133
225
  /**
134
226
  *
135
227
  * @export
@@ -306,6 +398,105 @@ export interface AuthRefreshTokenRequest {
306
398
  */
307
399
  'refresh_token'?: string;
308
400
  }
401
+ /**
402
+ *
403
+ * @export
404
+ * @interface ErrorReport
405
+ */
406
+ export interface ErrorReport {
407
+ /**
408
+ *
409
+ * @type {string}
410
+ * @memberof ErrorReport
411
+ */
412
+ 'id'?: string;
413
+ /**
414
+ *
415
+ * @type {string}
416
+ * @memberof ErrorReport
417
+ */
418
+ 'message'?: string;
419
+ /**
420
+ *
421
+ * @type {string}
422
+ * @memberof ErrorReport
423
+ */
424
+ 'trace'?: string;
425
+ /**
426
+ *
427
+ * @type {string}
428
+ * @memberof ErrorReport
429
+ */
430
+ 'exception_class'?: string;
431
+ /**
432
+ *
433
+ * @type {string}
434
+ * @memberof ErrorReport
435
+ */
436
+ 'file'?: string;
437
+ /**
438
+ *
439
+ * @type {number}
440
+ * @memberof ErrorReport
441
+ */
442
+ 'line'?: number;
443
+ /**
444
+ *
445
+ * @type {object}
446
+ * @memberof ErrorReport
447
+ */
448
+ 'context'?: object | null;
449
+ /**
450
+ *
451
+ * @type {string}
452
+ * @memberof ErrorReport
453
+ */
454
+ 'created_at'?: string;
455
+ }
456
+ /**
457
+ *
458
+ * @export
459
+ * @interface ErrorReportPaginated
460
+ */
461
+ export interface ErrorReportPaginated {
462
+ /**
463
+ *
464
+ * @type {string}
465
+ * @memberof ErrorReportPaginated
466
+ */
467
+ 'message'?: string;
468
+ /**
469
+ *
470
+ * @type {Array<ErrorReport>}
471
+ * @memberof ErrorReportPaginated
472
+ */
473
+ 'content'?: Array<ErrorReport>;
474
+ /**
475
+ *
476
+ * @type {Pagination}
477
+ * @memberof ErrorReportPaginated
478
+ */
479
+ 'paging'?: Pagination;
480
+ }
481
+ /**
482
+ *
483
+ * @export
484
+ * @interface ErrorResponse
485
+ */
486
+ export interface ErrorResponse {
487
+ /**
488
+ *
489
+ * @type {string}
490
+ * @memberof ErrorResponse
491
+ */
492
+ 'message'?: string;
493
+ /**
494
+ *
495
+ * @type {{ [key: string]: Array<string>; }}
496
+ * @memberof ErrorResponse
497
+ */
498
+ 'errors'?: { [key: string]: Array<string>; };
499
+ }
309
500
  /**
310
501
  *
311
502
  * @export
@@ -363,6 +554,110 @@ export interface Metrics400Response {
363
554
  */
364
555
  'message'?: string;
365
556
  }
557
+ /**
558
+ *
559
+ * @export
560
+ * @interface Pagination
561
+ */
562
+ export interface Pagination {
563
+ /**
564
+ *
565
+ * @type {number}
566
+ * @memberof Pagination
567
+ */
568
+ 'current_page'?: number;
569
+ /**
570
+ *
571
+ * @type {string}
572
+ * @memberof Pagination
573
+ */
574
+ 'first_page_url'?: string;
575
+ /**
576
+ *
577
+ * @type {number}
578
+ * @memberof Pagination
579
+ */
580
+ 'from'?: number;
581
+ /**
582
+ *
583
+ * @type {number}
584
+ * @memberof Pagination
585
+ */
586
+ 'last_page'?: number;
587
+ /**
588
+ *
589
+ * @type {string}
590
+ * @memberof Pagination
591
+ */
592
+ 'last_page_url'?: string;
593
+ /**
594
+ *
595
+ * @type {Array<PaginationLinksInner>}
596
+ * @memberof Pagination
597
+ */
598
+ 'links'?: Array<PaginationLinksInner>;
599
+ /**
600
+ *
601
+ * @type {string}
602
+ * @memberof Pagination
603
+ */
604
+ 'next_page_url'?: string;
605
+ /**
606
+ *
607
+ * @type {string}
608
+ * @memberof Pagination
609
+ */
610
+ 'path'?: string;
611
+ /**
612
+ *
613
+ * @type {string}
614
+ * @memberof Pagination
615
+ */
616
+ 'per_page'?: string;
617
+ /**
618
+ *
619
+ * @type {string}
620
+ * @memberof Pagination
621
+ */
622
+ 'prev_page_url'?: string;
623
+ /**
624
+ *
625
+ * @type {number}
626
+ * @memberof Pagination
627
+ */
628
+ 'to'?: number;
629
+ /**
630
+ *
631
+ * @type {number}
632
+ * @memberof Pagination
633
+ */
634
+ 'total'?: number;
635
+ }
636
+ /**
637
+ *
638
+ * @export
639
+ * @interface PaginationLinksInner
640
+ */
641
+ export interface PaginationLinksInner {
642
+ /**
643
+ *
644
+ * @type {string}
645
+ * @memberof PaginationLinksInner
646
+ */
647
+ 'url'?: string;
648
+ /**
649
+ *
650
+ * @type {string}
651
+ * @memberof PaginationLinksInner
652
+ */
653
+ 'label'?: string;
654
+ /**
655
+ *
656
+ * @type {string}
657
+ * @memberof PaginationLinksInner
658
+ */
659
+ 'active'?: string;
660
+ }
366
661
  /**
367
662
  *
368
663
  * @export
@@ -1363,6 +1658,19 @@ export interface StepsUnallow409Response {
1363
1658
  */
1364
1659
  'message'?: string;
1365
1660
  }
1661
+ /**
1662
+ *
1663
+ * @export
1664
+ * @interface SuccessResponse
1665
+ */
1666
+ export interface SuccessResponse {
1667
+ /**
1668
+ *
1669
+ * @type {string}
1670
+ * @memberof SuccessResponse
1671
+ */
1672
+ 'message'?: string;
1673
+ }
1366
1674
  /**
1367
1675
  *
1368
1676
  * @export
@@ -1839,20 +2147,21 @@ export interface UserUpdateRequest {
1839
2147
  }
1840
2148
 
1841
2149
  /**
1842
- * AuthApi - axios parameter creator
2150
+ * ApiLogsApi - axios parameter creator
1843
2151
  * @export
1844
2152
  */
1845
- export const AuthApiAxiosParamCreator = function (configuration?: Configuration) {
2153
+ export const ApiLogsApiAxiosParamCreator = function (configuration?: Configuration) {
1846
2154
  return {
1847
2155
  /**
1848
2156
  *
1849
- * @summary Solicita envio de token de login por email
1850
- * @param {AdminAuthRequestTokenRequest} [adminAuthRequestTokenRequest]
2157
+ * @summary List API logs
2158
+ * @param {string} [q] Search text
2159
+ * @param {string} [date] Filter by date (YYYY-MM-DD)
1851
2160
  * @param {*} [options] Override http request option.
1852
2161
  * @throws {RequiredError}
1853
2162
  */
1854
- adminAuthRequestToken: async (adminAuthRequestTokenRequest?: AdminAuthRequestTokenRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1855
- const localVarPath = `/admin/auth/request-token`;
2163
+ adminLogsGet: async (q?: string, date?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2164
+ const localVarPath = `/admin/logs`;
1856
2165
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1857
2166
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1858
2167
  let baseOptions;
@@ -1860,18 +2169,25 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1860
2169
  baseOptions = configuration.baseOptions;
1861
2170
  }
1862
2171
 
1863
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2172
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1864
2173
  const localVarHeaderParameter = {} as any;
1865
2174
  const localVarQueryParameter = {} as any;
1866
2175
 
2176
+ if (q !== undefined) {
2177
+ localVarQueryParameter['q'] = q;
2178
+ }
1867
2179
 
1868
-
1869
- localVarHeaderParameter['Content-Type'] = 'application/json';
2180
+ if (date !== undefined) {
2181
+ localVarQueryParameter['date'] = (date as any instanceof Date) ?
2182
+ (date as any).toISOString().substring(0,10) :
2183
+ date;
2184
+ }
1870
2185
 
2186
+
2187
+
1871
2188
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1872
2189
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1873
2190
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1874
- localVarRequestOptions.data = serializeDataIfNeeded(adminAuthRequestTokenRequest, localVarRequestOptions, configuration)
1875
2191
 
1876
2192
  return {
1877
2193
  url: toPathString(localVarUrlObj),
@@ -1880,13 +2196,16 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1880
2196
  },
1881
2197
  /**
1882
2198
  *
1883
- * @summary Login na API
1884
- * @param {AuthLoginRequest} [authLoginRequest]
2199
+ * @summary Get specific API log
2200
+ * @param {number} id
1885
2201
  * @param {*} [options] Override http request option.
1886
2202
  * @throws {RequiredError}
1887
2203
  */
1888
- authLogin: async (authLoginRequest?: AuthLoginRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1889
- const localVarPath = `/v3/login`;
2204
+ adminLogsIdGet: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2205
+ // verify required parameter 'id' is not null or undefined
2206
+ assertParamExists('adminLogsIdGet', 'id', id)
2207
+ const localVarPath = `/admin/logs/{id}`
2208
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1890
2209
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1891
2210
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1892
2211
  let baseOptions;
@@ -1894,44 +2213,254 @@ export const AuthApiAxiosParamCreator = function (configuration?: Configuration)
1894
2213
  baseOptions = configuration.baseOptions;
1895
2214
  }
1896
2215
 
1897
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2216
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1898
2217
  const localVarHeaderParameter = {} as any;
1899
2218
  const localVarQueryParameter = {} as any;
1900
2219
 
1901
2220
 
1902
2221
 
1903
- localVarHeaderParameter['Content-Type'] = 'application/json';
1904
-
1905
2222
  setSearchParams(localVarUrlObj, localVarQueryParameter);
1906
2223
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1907
2224
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1908
- localVarRequestOptions.data = serializeDataIfNeeded(authLoginRequest, localVarRequestOptions, configuration)
1909
2225
 
1910
2226
  return {
1911
2227
  url: toPathString(localVarUrlObj),
1912
2228
  options: localVarRequestOptions,
1913
2229
  };
1914
2230
  },
2231
+ }
2232
+ };
2233
+
2234
+ /**
2235
+ * ApiLogsApi - functional programming interface
2236
+ * @export
2237
+ */
2238
+ export const ApiLogsApiFp = function(configuration?: Configuration) {
2239
+ const localVarAxiosParamCreator = ApiLogsApiAxiosParamCreator(configuration)
2240
+ return {
1915
2241
  /**
1916
2242
  *
1917
- * @summary Login na API via e-mail e token
1918
- * @param {AuthLoginByTokenRequest} [authLoginByTokenRequest]
2243
+ * @summary List API logs
2244
+ * @param {string} [q] Search text
2245
+ * @param {string} [date] Filter by date (YYYY-MM-DD)
1919
2246
  * @param {*} [options] Override http request option.
1920
2247
  * @throws {RequiredError}
1921
2248
  */
1922
- authLoginByToken: async (authLoginByTokenRequest?: AuthLoginByTokenRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1923
- const localVarPath = `/admin/auth/login`;
1924
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1925
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1926
- let baseOptions;
1927
- if (configuration) {
1928
- baseOptions = configuration.baseOptions;
1929
- }
1930
-
1931
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1932
- const localVarHeaderParameter = {} as any;
1933
- const localVarQueryParameter = {} as any;
1934
-
2249
+ async adminLogsGet(q?: string, date?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiLogPaginated>> {
2250
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminLogsGet(q, date, options);
2251
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2252
+ const localVarOperationServerBasePath = operationServerMap['ApiLogsApi.adminLogsGet']?.[localVarOperationServerIndex]?.url;
2253
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2254
+ },
2255
+ /**
2256
+ *
2257
+ * @summary Get specific API log
2258
+ * @param {number} id
2259
+ * @param {*} [options] Override http request option.
2260
+ * @throws {RequiredError}
2261
+ */
2262
+ async adminLogsIdGet(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiLog>> {
2263
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminLogsIdGet(id, options);
2264
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2265
+ const localVarOperationServerBasePath = operationServerMap['ApiLogsApi.adminLogsIdGet']?.[localVarOperationServerIndex]?.url;
2266
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2267
+ },
2268
+ }
2269
+ };
2270
+
2271
+ /**
2272
+ * ApiLogsApi - factory interface
2273
+ * @export
2274
+ */
2275
+ export const ApiLogsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2276
+ const localVarFp = ApiLogsApiFp(configuration)
2277
+ return {
2278
+ /**
2279
+ *
2280
+ * @summary List API logs
2281
+ * @param {ApiLogsApiAdminLogsGetRequest} requestParameters Request parameters.
2282
+ * @param {*} [options] Override http request option.
2283
+ * @throws {RequiredError}
2284
+ */
2285
+ adminLogsGet(requestParameters: ApiLogsApiAdminLogsGetRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<ApiLogPaginated> {
2286
+ return localVarFp.adminLogsGet(requestParameters.q, requestParameters.date, options).then((request) => request(axios, basePath));
2287
+ },
2288
+ /**
2289
+ *
2290
+ * @summary Get specific API log
2291
+ * @param {ApiLogsApiAdminLogsIdGetRequest} requestParameters Request parameters.
2292
+ * @param {*} [options] Override http request option.
2293
+ * @throws {RequiredError}
2294
+ */
2295
+ adminLogsIdGet(requestParameters: ApiLogsApiAdminLogsIdGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<ApiLog> {
2296
+ return localVarFp.adminLogsIdGet(requestParameters.id, options).then((request) => request(axios, basePath));
2297
+ },
2298
+ };
2299
+ };
2300
+
2301
+ /**
2302
+ * Request parameters for adminLogsGet operation in ApiLogsApi.
2303
+ * @export
2304
+ * @interface ApiLogsApiAdminLogsGetRequest
2305
+ */
2306
+ export interface ApiLogsApiAdminLogsGetRequest {
2307
+ /**
2308
+ * Search text
2309
+ * @type {string}
2310
+ * @memberof ApiLogsApiAdminLogsGet
2311
+ */
2312
+ readonly q?: string
2313
+
2314
+ /**
2315
+ * Filter by date (YYYY-MM-DD)
2316
+ * @type {string}
2317
+ * @memberof ApiLogsApiAdminLogsGet
2318
+ */
2319
+ readonly date?: string
2320
+ }
2321
+
2322
+ /**
2323
+ * Request parameters for adminLogsIdGet operation in ApiLogsApi.
2324
+ * @export
2325
+ * @interface ApiLogsApiAdminLogsIdGetRequest
2326
+ */
2327
+ export interface ApiLogsApiAdminLogsIdGetRequest {
2328
+ /**
2329
+ *
2330
+ * @type {number}
2331
+ * @memberof ApiLogsApiAdminLogsIdGet
2332
+ */
2333
+ readonly id: number
2334
+ }
2335
+
2336
+ /**
2337
+ * ApiLogsApi - object-oriented interface
2338
+ * @export
2339
+ * @class ApiLogsApi
2340
+ * @extends {BaseAPI}
2341
+ */
2342
+ export class ApiLogsApi extends BaseAPI {
2343
+ /**
2344
+ *
2345
+ * @summary List API logs
2346
+ * @param {ApiLogsApiAdminLogsGetRequest} requestParameters Request parameters.
2347
+ * @param {*} [options] Override http request option.
2348
+ * @throws {RequiredError}
2349
+ * @memberof ApiLogsApi
2350
+ */
2351
+ public adminLogsGet(requestParameters: ApiLogsApiAdminLogsGetRequest = {}, options?: RawAxiosRequestConfig) {
2352
+ return ApiLogsApiFp(this.configuration).adminLogsGet(requestParameters.q, requestParameters.date, options).then((request) => request(this.axios, this.basePath));
2353
+ }
2354
+
2355
+ /**
2356
+ *
2357
+ * @summary Get specific API log
2358
+ * @param {ApiLogsApiAdminLogsIdGetRequest} requestParameters Request parameters.
2359
+ * @param {*} [options] Override http request option.
2360
+ * @throws {RequiredError}
2361
+ * @memberof ApiLogsApi
2362
+ */
2363
+ public adminLogsIdGet(requestParameters: ApiLogsApiAdminLogsIdGetRequest, options?: RawAxiosRequestConfig) {
2364
+ return ApiLogsApiFp(this.configuration).adminLogsIdGet(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
2365
+ }
2366
+ }
2367
+
2368
+
2369
+
2370
+ /**
2371
+ * AuthApi - axios parameter creator
2372
+ * @export
2373
+ */
2374
+ export const AuthApiAxiosParamCreator = function (configuration?: Configuration) {
2375
+ return {
2376
+ /**
2377
+ *
2378
+ * @summary Solicita envio de token de login por email
2379
+ * @param {AdminAuthRequestTokenRequest} [adminAuthRequestTokenRequest]
2380
+ * @param {*} [options] Override http request option.
2381
+ * @throws {RequiredError}
2382
+ */
2383
+ adminAuthRequestToken: async (adminAuthRequestTokenRequest?: AdminAuthRequestTokenRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2384
+ const localVarPath = `/admin/auth/request-token`;
2385
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2386
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2387
+ let baseOptions;
2388
+ if (configuration) {
2389
+ baseOptions = configuration.baseOptions;
2390
+ }
2391
+
2392
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2393
+ const localVarHeaderParameter = {} as any;
2394
+ const localVarQueryParameter = {} as any;
2395
+
2396
+
2397
+
2398
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2399
+
2400
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2401
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2402
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2403
+ localVarRequestOptions.data = serializeDataIfNeeded(adminAuthRequestTokenRequest, localVarRequestOptions, configuration)
2404
+
2405
+ return {
2406
+ url: toPathString(localVarUrlObj),
2407
+ options: localVarRequestOptions,
2408
+ };
2409
+ },
2410
+ /**
2411
+ *
2412
+ * @summary Login na API
2413
+ * @param {AuthLoginRequest} [authLoginRequest]
2414
+ * @param {*} [options] Override http request option.
2415
+ * @throws {RequiredError}
2416
+ */
2417
+ authLogin: async (authLoginRequest?: AuthLoginRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2418
+ const localVarPath = `/v3/login`;
2419
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2420
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2421
+ let baseOptions;
2422
+ if (configuration) {
2423
+ baseOptions = configuration.baseOptions;
2424
+ }
2425
+
2426
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2427
+ const localVarHeaderParameter = {} as any;
2428
+ const localVarQueryParameter = {} as any;
2429
+
2430
+
2431
+
2432
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2433
+
2434
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2435
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2436
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2437
+ localVarRequestOptions.data = serializeDataIfNeeded(authLoginRequest, localVarRequestOptions, configuration)
2438
+
2439
+ return {
2440
+ url: toPathString(localVarUrlObj),
2441
+ options: localVarRequestOptions,
2442
+ };
2443
+ },
2444
+ /**
2445
+ *
2446
+ * @summary Login na API via e-mail e token
2447
+ * @param {AuthLoginByTokenRequest} [authLoginByTokenRequest]
2448
+ * @param {*} [options] Override http request option.
2449
+ * @throws {RequiredError}
2450
+ */
2451
+ authLoginByToken: async (authLoginByTokenRequest?: AuthLoginByTokenRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2452
+ const localVarPath = `/admin/auth/login`;
2453
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2454
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2455
+ let baseOptions;
2456
+ if (configuration) {
2457
+ baseOptions = configuration.baseOptions;
2458
+ }
2459
+
2460
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2461
+ const localVarHeaderParameter = {} as any;
2462
+ const localVarQueryParameter = {} as any;
2463
+
1935
2464
 
1936
2465
 
1937
2466
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -2275,6 +2804,323 @@ export class AuthApi extends BaseAPI {
2275
2804
 
2276
2805
 
2277
2806
 
2807
+ /**
2808
+ * ErrorReportsApi - axios parameter creator
2809
+ * @export
2810
+ */
2811
+ export const ErrorReportsApiAxiosParamCreator = function (configuration?: Configuration) {
2812
+ return {
2813
+ /**
2814
+ *
2815
+ * @summary List error reports
2816
+ * @param {string} [q] Search through id, message, exception class, file
2817
+ * @param {string} [_class] Filter by exception class
2818
+ * @param {string} [date] Filter by date
2819
+ * @param {*} [options] Override http request option.
2820
+ * @throws {RequiredError}
2821
+ */
2822
+ adminErrorsGet: async (q?: string, _class?: string, date?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2823
+ const localVarPath = `/admin/errors`;
2824
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2825
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2826
+ let baseOptions;
2827
+ if (configuration) {
2828
+ baseOptions = configuration.baseOptions;
2829
+ }
2830
+
2831
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2832
+ const localVarHeaderParameter = {} as any;
2833
+ const localVarQueryParameter = {} as any;
2834
+
2835
+ if (q !== undefined) {
2836
+ localVarQueryParameter['q'] = q;
2837
+ }
2838
+
2839
+ if (_class !== undefined) {
2840
+ localVarQueryParameter['class'] = _class;
2841
+ }
2842
+
2843
+ if (date !== undefined) {
2844
+ localVarQueryParameter['date'] = (date as any instanceof Date) ?
2845
+ (date as any).toISOString().substring(0,10) :
2846
+ date;
2847
+ }
2848
+
2849
+
2850
+
2851
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2852
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2853
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2854
+
2855
+ return {
2856
+ url: toPathString(localVarUrlObj),
2857
+ options: localVarRequestOptions,
2858
+ };
2859
+ },
2860
+ /**
2861
+ *
2862
+ * @summary Delete error report
2863
+ * @param {string} id
2864
+ * @param {*} [options] Override http request option.
2865
+ * @throws {RequiredError}
2866
+ */
2867
+ adminErrorsIdDelete: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2868
+ // verify required parameter 'id' is not null or undefined
2869
+ assertParamExists('adminErrorsIdDelete', 'id', id)
2870
+ const localVarPath = `/admin/errors/{id}`
2871
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2872
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2873
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2874
+ let baseOptions;
2875
+ if (configuration) {
2876
+ baseOptions = configuration.baseOptions;
2877
+ }
2878
+
2879
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
2880
+ const localVarHeaderParameter = {} as any;
2881
+ const localVarQueryParameter = {} as any;
2882
+
2883
+
2884
+
2885
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2886
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2887
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2888
+
2889
+ return {
2890
+ url: toPathString(localVarUrlObj),
2891
+ options: localVarRequestOptions,
2892
+ };
2893
+ },
2894
+ /**
2895
+ *
2896
+ * @summary Get specific error report
2897
+ * @param {string} id
2898
+ * @param {*} [options] Override http request option.
2899
+ * @throws {RequiredError}
2900
+ */
2901
+ adminErrorsIdGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2902
+ // verify required parameter 'id' is not null or undefined
2903
+ assertParamExists('adminErrorsIdGet', 'id', id)
2904
+ const localVarPath = `/admin/errors/{id}`
2905
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2906
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2907
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2908
+ let baseOptions;
2909
+ if (configuration) {
2910
+ baseOptions = configuration.baseOptions;
2911
+ }
2912
+
2913
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2914
+ const localVarHeaderParameter = {} as any;
2915
+ const localVarQueryParameter = {} as any;
2916
+
2917
+
2918
+
2919
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2920
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2921
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2922
+
2923
+ return {
2924
+ url: toPathString(localVarUrlObj),
2925
+ options: localVarRequestOptions,
2926
+ };
2927
+ },
2928
+ }
2929
+ };
2930
+
2931
+ /**
2932
+ * ErrorReportsApi - functional programming interface
2933
+ * @export
2934
+ */
2935
+ export const ErrorReportsApiFp = function(configuration?: Configuration) {
2936
+ const localVarAxiosParamCreator = ErrorReportsApiAxiosParamCreator(configuration)
2937
+ return {
2938
+ /**
2939
+ *
2940
+ * @summary List error reports
2941
+ * @param {string} [q] Search through id, message, exception class, file
2942
+ * @param {string} [_class] Filter by exception class
2943
+ * @param {string} [date] Filter by date
2944
+ * @param {*} [options] Override http request option.
2945
+ * @throws {RequiredError}
2946
+ */
2947
+ async adminErrorsGet(q?: string, _class?: string, date?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ErrorReportPaginated>> {
2948
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminErrorsGet(q, _class, date, options);
2949
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2950
+ const localVarOperationServerBasePath = operationServerMap['ErrorReportsApi.adminErrorsGet']?.[localVarOperationServerIndex]?.url;
2951
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2952
+ },
2953
+ /**
2954
+ *
2955
+ * @summary Delete error report
2956
+ * @param {string} id
2957
+ * @param {*} [options] Override http request option.
2958
+ * @throws {RequiredError}
2959
+ */
2960
+ async adminErrorsIdDelete(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SuccessResponse>> {
2961
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminErrorsIdDelete(id, options);
2962
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2963
+ const localVarOperationServerBasePath = operationServerMap['ErrorReportsApi.adminErrorsIdDelete']?.[localVarOperationServerIndex]?.url;
2964
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2965
+ },
2966
+ /**
2967
+ *
2968
+ * @summary Get specific error report
2969
+ * @param {string} id
2970
+ * @param {*} [options] Override http request option.
2971
+ * @throws {RequiredError}
2972
+ */
2973
+ async adminErrorsIdGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ErrorReport>> {
2974
+ const localVarAxiosArgs = await localVarAxiosParamCreator.adminErrorsIdGet(id, options);
2975
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2976
+ const localVarOperationServerBasePath = operationServerMap['ErrorReportsApi.adminErrorsIdGet']?.[localVarOperationServerIndex]?.url;
2977
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2978
+ },
2979
+ }
2980
+ };
2981
+
2982
+ /**
2983
+ * ErrorReportsApi - factory interface
2984
+ * @export
2985
+ */
2986
+ export const ErrorReportsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2987
+ const localVarFp = ErrorReportsApiFp(configuration)
2988
+ return {
2989
+ /**
2990
+ *
2991
+ * @summary List error reports
2992
+ * @param {ErrorReportsApiAdminErrorsGetRequest} requestParameters Request parameters.
2993
+ * @param {*} [options] Override http request option.
2994
+ * @throws {RequiredError}
2995
+ */
2996
+ adminErrorsGet(requestParameters: ErrorReportsApiAdminErrorsGetRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<ErrorReportPaginated> {
2997
+ return localVarFp.adminErrorsGet(requestParameters.q, requestParameters._class, requestParameters.date, options).then((request) => request(axios, basePath));
2998
+ },
2999
+ /**
3000
+ *
3001
+ * @summary Delete error report
3002
+ * @param {ErrorReportsApiAdminErrorsIdDeleteRequest} requestParameters Request parameters.
3003
+ * @param {*} [options] Override http request option.
3004
+ * @throws {RequiredError}
3005
+ */
3006
+ adminErrorsIdDelete(requestParameters: ErrorReportsApiAdminErrorsIdDeleteRequest, options?: RawAxiosRequestConfig): AxiosPromise<SuccessResponse> {
3007
+ return localVarFp.adminErrorsIdDelete(requestParameters.id, options).then((request) => request(axios, basePath));
3008
+ },
3009
+ /**
3010
+ *
3011
+ * @summary Get specific error report
3012
+ * @param {ErrorReportsApiAdminErrorsIdGetRequest} requestParameters Request parameters.
3013
+ * @param {*} [options] Override http request option.
3014
+ * @throws {RequiredError}
3015
+ */
3016
+ adminErrorsIdGet(requestParameters: ErrorReportsApiAdminErrorsIdGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<ErrorReport> {
3017
+ return localVarFp.adminErrorsIdGet(requestParameters.id, options).then((request) => request(axios, basePath));
3018
+ },
3019
+ };
3020
+ };
3021
+
3022
+ /**
3023
+ * Request parameters for adminErrorsGet operation in ErrorReportsApi.
3024
+ * @export
3025
+ * @interface ErrorReportsApiAdminErrorsGetRequest
3026
+ */
3027
+ export interface ErrorReportsApiAdminErrorsGetRequest {
3028
+ /**
3029
+ * Search through id, message, exception class, file
3030
+ * @type {string}
3031
+ * @memberof ErrorReportsApiAdminErrorsGet
3032
+ */
3033
+ readonly q?: string
3034
+
3035
+ /**
3036
+ * Filter by exception class
3037
+ * @type {string}
3038
+ * @memberof ErrorReportsApiAdminErrorsGet
3039
+ */
3040
+ readonly _class?: string
3041
+
3042
+ /**
3043
+ * Filter by date
3044
+ * @type {string}
3045
+ * @memberof ErrorReportsApiAdminErrorsGet
3046
+ */
3047
+ readonly date?: string
3048
+ }
3049
+
3050
+ /**
3051
+ * Request parameters for adminErrorsIdDelete operation in ErrorReportsApi.
3052
+ * @export
3053
+ * @interface ErrorReportsApiAdminErrorsIdDeleteRequest
3054
+ */
3055
+ export interface ErrorReportsApiAdminErrorsIdDeleteRequest {
3056
+ /**
3057
+ *
3058
+ * @type {string}
3059
+ * @memberof ErrorReportsApiAdminErrorsIdDelete
3060
+ */
3061
+ readonly id: string
3062
+ }
3063
+
3064
+ /**
3065
+ * Request parameters for adminErrorsIdGet operation in ErrorReportsApi.
3066
+ * @export
3067
+ * @interface ErrorReportsApiAdminErrorsIdGetRequest
3068
+ */
3069
+ export interface ErrorReportsApiAdminErrorsIdGetRequest {
3070
+ /**
3071
+ *
3072
+ * @type {string}
3073
+ * @memberof ErrorReportsApiAdminErrorsIdGet
3074
+ */
3075
+ readonly id: string
3076
+ }
3077
+
3078
+ /**
3079
+ * ErrorReportsApi - object-oriented interface
3080
+ * @export
3081
+ * @class ErrorReportsApi
3082
+ * @extends {BaseAPI}
3083
+ */
3084
+ export class ErrorReportsApi extends BaseAPI {
3085
+ /**
3086
+ *
3087
+ * @summary List error reports
3088
+ * @param {ErrorReportsApiAdminErrorsGetRequest} requestParameters Request parameters.
3089
+ * @param {*} [options] Override http request option.
3090
+ * @throws {RequiredError}
3091
+ * @memberof ErrorReportsApi
3092
+ */
3093
+ public adminErrorsGet(requestParameters: ErrorReportsApiAdminErrorsGetRequest = {}, options?: RawAxiosRequestConfig) {
3094
+ return ErrorReportsApiFp(this.configuration).adminErrorsGet(requestParameters.q, requestParameters._class, requestParameters.date, options).then((request) => request(this.axios, this.basePath));
3095
+ }
3096
+
3097
+ /**
3098
+ *
3099
+ * @summary Delete error report
3100
+ * @param {ErrorReportsApiAdminErrorsIdDeleteRequest} requestParameters Request parameters.
3101
+ * @param {*} [options] Override http request option.
3102
+ * @throws {RequiredError}
3103
+ * @memberof ErrorReportsApi
3104
+ */
3105
+ public adminErrorsIdDelete(requestParameters: ErrorReportsApiAdminErrorsIdDeleteRequest, options?: RawAxiosRequestConfig) {
3106
+ return ErrorReportsApiFp(this.configuration).adminErrorsIdDelete(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
3107
+ }
3108
+
3109
+ /**
3110
+ *
3111
+ * @summary Get specific error report
3112
+ * @param {ErrorReportsApiAdminErrorsIdGetRequest} requestParameters Request parameters.
3113
+ * @param {*} [options] Override http request option.
3114
+ * @throws {RequiredError}
3115
+ * @memberof ErrorReportsApi
3116
+ */
3117
+ public adminErrorsIdGet(requestParameters: ErrorReportsApiAdminErrorsIdGetRequest, options?: RawAxiosRequestConfig) {
3118
+ return ErrorReportsApiFp(this.configuration).adminErrorsIdGet(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
3119
+ }
3120
+ }
3121
+
3122
+
3123
+
2278
3124
  /**
2279
3125
  * MetricsApi - axios parameter creator
2280
3126
  * @export