@handsondigital/idplugger-admin 2.1.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/.openapi-generator/FILES +34 -0
  2. package/README.md +47 -2
  3. package/api.ts +4029 -1514
  4. package/dist/api.d.ts +3123 -1297
  5. package/dist/api.js +1565 -74
  6. package/docs/AdminErrorsDestroy200Response.md +24 -0
  7. package/docs/AdminErrorsIndex200Response.md +26 -0
  8. package/docs/AdminErrorsIndex200ResponseContentInner.md +30 -0
  9. package/docs/AdminErrorsShow200Response.md +24 -0
  10. package/docs/AdminErrorsShow200ResponseContent.md +32 -0
  11. package/docs/AdminLogsIndex200Response.md +26 -0
  12. package/docs/AdminLogsIndex200ResponseContentInner.md +30 -0
  13. package/docs/AdminLogsShow200Response.md +24 -0
  14. package/docs/AdminLogsShow200ResponseContent.md +34 -0
  15. package/docs/AdminPermissionsByAction200Response.md +24 -0
  16. package/docs/AdminPermissionsByCategory200Response.md +24 -0
  17. package/docs/AdminPermissionsByCategory200ResponseContentInner.md +26 -0
  18. package/docs/AdminPermissionsCategories200Response.md +24 -0
  19. package/docs/AdminPermissionsGrouped200Response.md +24 -0
  20. package/docs/AdminPermissionsGrouped200ResponseContentValueInner.md +28 -0
  21. package/docs/AdminPermissionsIndex200Response.md +24 -0
  22. package/docs/AdminPermissionsIndex200ResponseContentInner.md +32 -0
  23. package/docs/AdminPermissionsIndex200ResponseContentInnerRolesInner.md +22 -0
  24. package/docs/AdminPermissionsShow200Response.md +24 -0
  25. package/docs/AdminPermissionsShow200ResponseContent.md +32 -0
  26. package/docs/AdminPromotionLuckyNumbersReset200Response.md +26 -0
  27. package/docs/AdminPromotionLuckyNumbersReset500Response.md +26 -0
  28. package/docs/AdminUsersList200Response.md +28 -0
  29. package/docs/AdminUsersList200ResponsePagination.md +40 -0
  30. package/docs/AdminUsersList200ResponseUsersInner.md +30 -0
  31. package/docs/AdminUsersList200ResponseUsersInnerPermissionsInner.md +22 -0
  32. package/docs/AdminUsersList500Response.md +24 -0
  33. package/docs/ErrorsApi.md +174 -0
  34. package/docs/LogsApi.md +133 -0
  35. package/docs/PermissionsApi.md +301 -0
  36. package/docs/PromotionApi.md +53 -0
  37. package/docs/UserApi.md +122 -0
  38. package/docs/UserResetPassword200Response.md +26 -0
  39. package/docs/UserResetPassword200ResponseUser.md +28 -0
  40. package/docs/UserResetPassword500Response.md +24 -0
  41. package/docs/UserResetPasswordRequest.md +22 -0
  42. package/package.json +1 -1
package/dist/api.js CHANGED
@@ -84,7 +84,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
84
84
  return to.concat(ar || Array.prototype.slice.call(from));
85
85
  };
86
86
  Object.defineProperty(exports, "__esModule", { value: true });
87
- exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.StepsApi = exports.StepsApiFactory = exports.StepsApiFp = exports.StepsApiAxiosParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = exports.RolesApiAxiosParamCreator = exports.PromotionApi = exports.PromotionApiFactory = exports.PromotionApiFp = exports.PromotionApiAxiosParamCreator = exports.MetricsApi = exports.MetricsApiFactory = exports.MetricsApiFp = exports.MetricsApiAxiosParamCreator = exports.ErrorReportsApi = exports.ErrorReportsApiFactory = exports.ErrorReportsApiFp = exports.ErrorReportsApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.ApiLogsApi = exports.ApiLogsApiFactory = exports.ApiLogsApiFp = exports.ApiLogsApiAxiosParamCreator = exports.PromotionStartRequestPermissionsEnum = exports.PromotionStart200ResponseUserPermissionsEnum = void 0;
87
+ exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.StepsApi = exports.StepsApiFactory = exports.StepsApiFp = exports.StepsApiAxiosParamCreator = exports.RolesApi = exports.RolesApiFactory = exports.RolesApiFp = exports.RolesApiAxiosParamCreator = exports.PromotionApi = exports.PromotionApiFactory = exports.PromotionApiFp = exports.PromotionApiAxiosParamCreator = exports.PermissionsApi = exports.PermissionsApiFactory = exports.PermissionsApiFp = exports.PermissionsApiAxiosParamCreator = exports.MetricsApi = exports.MetricsApiFactory = exports.MetricsApiFp = exports.MetricsApiAxiosParamCreator = exports.LogsApi = exports.LogsApiFactory = exports.LogsApiFp = exports.LogsApiAxiosParamCreator = exports.ErrorsApi = exports.ErrorsApiFactory = exports.ErrorsApiFp = exports.ErrorsApiAxiosParamCreator = exports.ErrorReportsApi = exports.ErrorReportsApiFactory = exports.ErrorReportsApiFp = exports.ErrorReportsApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.ApiLogsApi = exports.ApiLogsApiFactory = exports.ApiLogsApiFp = exports.ApiLogsApiAxiosParamCreator = exports.PromotionStartRequestPermissionsEnum = exports.PromotionStart200ResponseUserPermissionsEnum = void 0;
88
88
  var axios_1 = require("axios");
89
89
  // Some imports not used depending on template conditions
90
90
  // @ts-ignore
@@ -1184,45 +1184,39 @@ var ErrorReportsApi = /** @class */ (function (_super) {
1184
1184
  }(base_1.BaseAPI));
1185
1185
  exports.ErrorReportsApi = ErrorReportsApi;
1186
1186
  /**
1187
- * MetricsApi - axios parameter creator
1187
+ * ErrorsApi - axios parameter creator
1188
1188
  * @export
1189
1189
  */
1190
- var MetricsApiAxiosParamCreator = function (configuration) {
1190
+ var ErrorsApiAxiosParamCreator = function (configuration) {
1191
1191
  var _this = this;
1192
1192
  return {
1193
1193
  /**
1194
1194
  *
1195
- * @summary Devolve as métricas da promoção
1196
- * @param {string} promotionId ID da promoção
1197
- * @param {Array<string>} keys Chaves das métricas que deseja consultar. Exemplo: &#x60;keys[]&#x3D;users&amp;keys[]&#x3D;coupons&amp;keys[]&#x3D;luckyNumbers&#x60;
1198
- * @param {string} [startDate] Data inicial para filtrar as métricas
1199
- * @param {string} [endDate] Data final para filtrar as métricas
1200
- * @param {number} [limit] Limite de resultados
1201
- * @param {string} [resolution] Resolução das métricas. Exemplo: &#x60;minute&#x60;, &#x60;hour&#x60;, &#x60;day&#x60;
1195
+ * @summary Deletar relatório de erro
1196
+ * @param {string} id ID do relatório de erro
1202
1197
  * @param {*} [options] Override http request option.
1203
1198
  * @throws {RequiredError}
1204
1199
  */
1205
- metrics: function (promotionId_1, keys_1, startDate_1, endDate_1, limit_1, resolution_1) {
1200
+ adminErrorsDestroy: function (id_1) {
1206
1201
  var args_1 = [];
1207
- for (var _i = 6; _i < arguments.length; _i++) {
1208
- args_1[_i - 6] = arguments[_i];
1202
+ for (var _i = 1; _i < arguments.length; _i++) {
1203
+ args_1[_i - 1] = arguments[_i];
1209
1204
  }
1210
- return __awaiter(_this, __spreadArray([promotionId_1, keys_1, startDate_1, endDate_1, limit_1, resolution_1], args_1, true), void 0, function (promotionId, keys, startDate, endDate, limit, resolution, options) {
1205
+ return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
1211
1206
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1212
1207
  if (options === void 0) { options = {}; }
1213
1208
  return __generator(this, function (_a) {
1214
1209
  switch (_a.label) {
1215
1210
  case 0:
1216
- // verify required parameter 'promotionId' is not null or undefined
1217
- (0, common_1.assertParamExists)('metrics', 'promotionId', promotionId);
1218
- // verify required parameter 'keys' is not null or undefined
1219
- (0, common_1.assertParamExists)('metrics', 'keys', keys);
1220
- localVarPath = "/v3/metrics";
1211
+ // verify required parameter 'id' is not null or undefined
1212
+ (0, common_1.assertParamExists)('adminErrorsDestroy', 'id', id);
1213
+ localVarPath = "/v3/admin/errors/{id}"
1214
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
1221
1215
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1222
1216
  if (configuration) {
1223
1217
  baseOptions = configuration.baseOptions;
1224
1218
  }
1225
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1219
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
1226
1220
  localVarHeaderParameter = {};
1227
1221
  localVarQueryParameter = {};
1228
1222
  // authentication bearerAuth required
@@ -1232,24 +1226,114 @@ var MetricsApiAxiosParamCreator = function (configuration) {
1232
1226
  // authentication bearerAuth required
1233
1227
  // http bearer authentication required
1234
1228
  _a.sent();
1235
- if (promotionId !== undefined) {
1236
- localVarQueryParameter['promotion_id'] = promotionId;
1229
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1230
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1231
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1232
+ return [2 /*return*/, {
1233
+ url: (0, common_1.toPathString)(localVarUrlObj),
1234
+ options: localVarRequestOptions,
1235
+ }];
1236
+ }
1237
+ });
1238
+ });
1239
+ },
1240
+ /**
1241
+ *
1242
+ * @summary Listar relatórios de erro
1243
+ * @param {string} [q] Buscar em id, mensagem, classe da exceção, arquivo
1244
+ * @param {string} [_class] Filtrar por classe da exceção
1245
+ * @param {string} [date] Filtrar por data
1246
+ * @param {number} [page] Número da página
1247
+ * @param {*} [options] Override http request option.
1248
+ * @throws {RequiredError}
1249
+ */
1250
+ adminErrorsIndex: function (q_1, _class_1, date_1, page_1) {
1251
+ var args_1 = [];
1252
+ for (var _i = 4; _i < arguments.length; _i++) {
1253
+ args_1[_i - 4] = arguments[_i];
1254
+ }
1255
+ return __awaiter(_this, __spreadArray([q_1, _class_1, date_1, page_1], args_1, true), void 0, function (q, _class, date, page, options) {
1256
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1257
+ if (options === void 0) { options = {}; }
1258
+ return __generator(this, function (_a) {
1259
+ switch (_a.label) {
1260
+ case 0:
1261
+ localVarPath = "/v3/admin/errors/";
1262
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1263
+ if (configuration) {
1264
+ baseOptions = configuration.baseOptions;
1237
1265
  }
1238
- if (keys) {
1239
- localVarQueryParameter['keys'] = keys;
1266
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1267
+ localVarHeaderParameter = {};
1268
+ localVarQueryParameter = {};
1269
+ // authentication bearerAuth required
1270
+ // http bearer authentication required
1271
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1272
+ case 1:
1273
+ // authentication bearerAuth required
1274
+ // http bearer authentication required
1275
+ _a.sent();
1276
+ if (q !== undefined) {
1277
+ localVarQueryParameter['q'] = q;
1240
1278
  }
1241
- if (startDate !== undefined) {
1242
- localVarQueryParameter['start_date'] = startDate;
1279
+ if (_class !== undefined) {
1280
+ localVarQueryParameter['class'] = _class;
1243
1281
  }
1244
- if (endDate !== undefined) {
1245
- localVarQueryParameter['end_date'] = endDate;
1282
+ if (date !== undefined) {
1283
+ localVarQueryParameter['date'] = (date instanceof Date) ?
1284
+ date.toISOString().substring(0, 10) :
1285
+ date;
1246
1286
  }
1247
- if (limit !== undefined) {
1248
- localVarQueryParameter['limit'] = limit;
1287
+ if (page !== undefined) {
1288
+ localVarQueryParameter['page'] = page;
1249
1289
  }
1250
- if (resolution !== undefined) {
1251
- localVarQueryParameter['resolution'] = resolution;
1290
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1291
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1292
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1293
+ return [2 /*return*/, {
1294
+ url: (0, common_1.toPathString)(localVarUrlObj),
1295
+ options: localVarRequestOptions,
1296
+ }];
1297
+ }
1298
+ });
1299
+ });
1300
+ },
1301
+ /**
1302
+ *
1303
+ * @summary Visualizar erro específico
1304
+ * @param {string} id ID do relatório de erro
1305
+ * @param {*} [options] Override http request option.
1306
+ * @throws {RequiredError}
1307
+ */
1308
+ adminErrorsShow: function (id_1) {
1309
+ var args_1 = [];
1310
+ for (var _i = 1; _i < arguments.length; _i++) {
1311
+ args_1[_i - 1] = arguments[_i];
1312
+ }
1313
+ return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
1314
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1315
+ if (options === void 0) { options = {}; }
1316
+ return __generator(this, function (_a) {
1317
+ switch (_a.label) {
1318
+ case 0:
1319
+ // verify required parameter 'id' is not null or undefined
1320
+ (0, common_1.assertParamExists)('adminErrorsShow', 'id', id);
1321
+ localVarPath = "/v3/admin/errors/{id}"
1322
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
1323
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1324
+ if (configuration) {
1325
+ baseOptions = configuration.baseOptions;
1252
1326
  }
1327
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1328
+ localVarHeaderParameter = {};
1329
+ localVarQueryParameter = {};
1330
+ // authentication bearerAuth required
1331
+ // http bearer authentication required
1332
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1333
+ case 1:
1334
+ // authentication bearerAuth required
1335
+ // http bearer authentication required
1336
+ _a.sent();
1253
1337
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1254
1338
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1255
1339
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -1263,37 +1347,81 @@ var MetricsApiAxiosParamCreator = function (configuration) {
1263
1347
  },
1264
1348
  };
1265
1349
  };
1266
- exports.MetricsApiAxiosParamCreator = MetricsApiAxiosParamCreator;
1350
+ exports.ErrorsApiAxiosParamCreator = ErrorsApiAxiosParamCreator;
1267
1351
  /**
1268
- * MetricsApi - functional programming interface
1352
+ * ErrorsApi - functional programming interface
1269
1353
  * @export
1270
1354
  */
1271
- var MetricsApiFp = function (configuration) {
1272
- var localVarAxiosParamCreator = (0, exports.MetricsApiAxiosParamCreator)(configuration);
1355
+ var ErrorsApiFp = function (configuration) {
1356
+ var localVarAxiosParamCreator = (0, exports.ErrorsApiAxiosParamCreator)(configuration);
1273
1357
  return {
1274
1358
  /**
1275
1359
  *
1276
- * @summary Devolve as métricas da promoção
1277
- * @param {string} promotionId ID da promoção
1278
- * @param {Array<string>} keys Chaves das métricas que deseja consultar. Exemplo: &#x60;keys[]&#x3D;users&amp;keys[]&#x3D;coupons&amp;keys[]&#x3D;luckyNumbers&#x60;
1279
- * @param {string} [startDate] Data inicial para filtrar as métricas
1280
- * @param {string} [endDate] Data final para filtrar as métricas
1281
- * @param {number} [limit] Limite de resultados
1282
- * @param {string} [resolution] Resolução das métricas. Exemplo: &#x60;minute&#x60;, &#x60;hour&#x60;, &#x60;day&#x60;
1360
+ * @summary Deletar relatório de erro
1361
+ * @param {string} id ID do relatório de erro
1283
1362
  * @param {*} [options] Override http request option.
1284
1363
  * @throws {RequiredError}
1285
1364
  */
1286
- metrics: function (promotionId, keys, startDate, endDate, limit, resolution, options) {
1365
+ adminErrorsDestroy: function (id, options) {
1287
1366
  return __awaiter(this, void 0, void 0, function () {
1288
1367
  var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1289
1368
  var _a, _b, _c;
1290
1369
  return __generator(this, function (_d) {
1291
1370
  switch (_d.label) {
1292
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.metrics(promotionId, keys, startDate, endDate, limit, resolution, options)];
1371
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminErrorsDestroy(id, options)];
1293
1372
  case 1:
1294
1373
  localVarAxiosArgs = _d.sent();
1295
1374
  localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1296
- localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MetricsApi.metrics']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1375
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ErrorsApi.adminErrorsDestroy']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1376
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1377
+ }
1378
+ });
1379
+ });
1380
+ },
1381
+ /**
1382
+ *
1383
+ * @summary Listar relatórios de erro
1384
+ * @param {string} [q] Buscar em id, mensagem, classe da exceção, arquivo
1385
+ * @param {string} [_class] Filtrar por classe da exceção
1386
+ * @param {string} [date] Filtrar por data
1387
+ * @param {number} [page] Número da página
1388
+ * @param {*} [options] Override http request option.
1389
+ * @throws {RequiredError}
1390
+ */
1391
+ adminErrorsIndex: function (q, _class, date, page, options) {
1392
+ return __awaiter(this, void 0, void 0, function () {
1393
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1394
+ var _a, _b, _c;
1395
+ return __generator(this, function (_d) {
1396
+ switch (_d.label) {
1397
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminErrorsIndex(q, _class, date, page, options)];
1398
+ case 1:
1399
+ localVarAxiosArgs = _d.sent();
1400
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1401
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ErrorsApi.adminErrorsIndex']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1402
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1403
+ }
1404
+ });
1405
+ });
1406
+ },
1407
+ /**
1408
+ *
1409
+ * @summary Visualizar erro específico
1410
+ * @param {string} id ID do relatório de erro
1411
+ * @param {*} [options] Override http request option.
1412
+ * @throws {RequiredError}
1413
+ */
1414
+ adminErrorsShow: function (id, options) {
1415
+ return __awaiter(this, void 0, void 0, function () {
1416
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1417
+ var _a, _b, _c;
1418
+ return __generator(this, function (_d) {
1419
+ switch (_d.label) {
1420
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminErrorsShow(id, options)];
1421
+ case 1:
1422
+ localVarAxiosArgs = _d.sent();
1423
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1424
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ErrorsApi.adminErrorsShow']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1297
1425
  return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1298
1426
  }
1299
1427
  });
@@ -1301,53 +1429,1112 @@ var MetricsApiFp = function (configuration) {
1301
1429
  },
1302
1430
  };
1303
1431
  };
1304
- exports.MetricsApiFp = MetricsApiFp;
1432
+ exports.ErrorsApiFp = ErrorsApiFp;
1305
1433
  /**
1306
- * MetricsApi - factory interface
1434
+ * ErrorsApi - factory interface
1307
1435
  * @export
1308
1436
  */
1309
- var MetricsApiFactory = function (configuration, basePath, axios) {
1310
- var localVarFp = (0, exports.MetricsApiFp)(configuration);
1437
+ var ErrorsApiFactory = function (configuration, basePath, axios) {
1438
+ var localVarFp = (0, exports.ErrorsApiFp)(configuration);
1311
1439
  return {
1312
1440
  /**
1313
1441
  *
1314
- * @summary Devolve as métricas da promoção
1315
- * @param {MetricsApiMetricsRequest} requestParameters Request parameters.
1442
+ * @summary Deletar relatório de erro
1443
+ * @param {ErrorsApiAdminErrorsDestroyRequest} requestParameters Request parameters.
1316
1444
  * @param {*} [options] Override http request option.
1317
1445
  * @throws {RequiredError}
1318
1446
  */
1319
- metrics: function (requestParameters, options) {
1320
- return localVarFp.metrics(requestParameters.promotionId, requestParameters.keys, requestParameters.startDate, requestParameters.endDate, requestParameters.limit, requestParameters.resolution, options).then(function (request) { return request(axios, basePath); });
1447
+ adminErrorsDestroy: function (requestParameters, options) {
1448
+ return localVarFp.adminErrorsDestroy(requestParameters.id, options).then(function (request) { return request(axios, basePath); });
1449
+ },
1450
+ /**
1451
+ *
1452
+ * @summary Listar relatórios de erro
1453
+ * @param {ErrorsApiAdminErrorsIndexRequest} requestParameters Request parameters.
1454
+ * @param {*} [options] Override http request option.
1455
+ * @throws {RequiredError}
1456
+ */
1457
+ adminErrorsIndex: function (requestParameters, options) {
1458
+ if (requestParameters === void 0) { requestParameters = {}; }
1459
+ return localVarFp.adminErrorsIndex(requestParameters.q, requestParameters._class, requestParameters.date, requestParameters.page, options).then(function (request) { return request(axios, basePath); });
1460
+ },
1461
+ /**
1462
+ *
1463
+ * @summary Visualizar erro específico
1464
+ * @param {ErrorsApiAdminErrorsShowRequest} requestParameters Request parameters.
1465
+ * @param {*} [options] Override http request option.
1466
+ * @throws {RequiredError}
1467
+ */
1468
+ adminErrorsShow: function (requestParameters, options) {
1469
+ return localVarFp.adminErrorsShow(requestParameters.id, options).then(function (request) { return request(axios, basePath); });
1321
1470
  },
1322
1471
  };
1323
- };
1324
- exports.MetricsApiFactory = MetricsApiFactory;
1325
- /**
1326
- * MetricsApi - object-oriented interface
1327
- * @export
1328
- * @class MetricsApi
1329
- * @extends {BaseAPI}
1330
- */
1331
- var MetricsApi = /** @class */ (function (_super) {
1332
- __extends(MetricsApi, _super);
1333
- function MetricsApi() {
1334
- return _super !== null && _super.apply(this, arguments) || this;
1335
- }
1472
+ };
1473
+ exports.ErrorsApiFactory = ErrorsApiFactory;
1474
+ /**
1475
+ * ErrorsApi - object-oriented interface
1476
+ * @export
1477
+ * @class ErrorsApi
1478
+ * @extends {BaseAPI}
1479
+ */
1480
+ var ErrorsApi = /** @class */ (function (_super) {
1481
+ __extends(ErrorsApi, _super);
1482
+ function ErrorsApi() {
1483
+ return _super !== null && _super.apply(this, arguments) || this;
1484
+ }
1485
+ /**
1486
+ *
1487
+ * @summary Deletar relatório de erro
1488
+ * @param {ErrorsApiAdminErrorsDestroyRequest} requestParameters Request parameters.
1489
+ * @param {*} [options] Override http request option.
1490
+ * @throws {RequiredError}
1491
+ * @memberof ErrorsApi
1492
+ */
1493
+ ErrorsApi.prototype.adminErrorsDestroy = function (requestParameters, options) {
1494
+ var _this = this;
1495
+ return (0, exports.ErrorsApiFp)(this.configuration).adminErrorsDestroy(requestParameters.id, options).then(function (request) { return request(_this.axios, _this.basePath); });
1496
+ };
1497
+ /**
1498
+ *
1499
+ * @summary Listar relatórios de erro
1500
+ * @param {ErrorsApiAdminErrorsIndexRequest} requestParameters Request parameters.
1501
+ * @param {*} [options] Override http request option.
1502
+ * @throws {RequiredError}
1503
+ * @memberof ErrorsApi
1504
+ */
1505
+ ErrorsApi.prototype.adminErrorsIndex = function (requestParameters, options) {
1506
+ var _this = this;
1507
+ if (requestParameters === void 0) { requestParameters = {}; }
1508
+ return (0, exports.ErrorsApiFp)(this.configuration).adminErrorsIndex(requestParameters.q, requestParameters._class, requestParameters.date, requestParameters.page, options).then(function (request) { return request(_this.axios, _this.basePath); });
1509
+ };
1510
+ /**
1511
+ *
1512
+ * @summary Visualizar erro específico
1513
+ * @param {ErrorsApiAdminErrorsShowRequest} requestParameters Request parameters.
1514
+ * @param {*} [options] Override http request option.
1515
+ * @throws {RequiredError}
1516
+ * @memberof ErrorsApi
1517
+ */
1518
+ ErrorsApi.prototype.adminErrorsShow = function (requestParameters, options) {
1519
+ var _this = this;
1520
+ return (0, exports.ErrorsApiFp)(this.configuration).adminErrorsShow(requestParameters.id, options).then(function (request) { return request(_this.axios, _this.basePath); });
1521
+ };
1522
+ return ErrorsApi;
1523
+ }(base_1.BaseAPI));
1524
+ exports.ErrorsApi = ErrorsApi;
1525
+ /**
1526
+ * LogsApi - axios parameter creator
1527
+ * @export
1528
+ */
1529
+ var LogsApiAxiosParamCreator = function (configuration) {
1530
+ var _this = this;
1531
+ return {
1532
+ /**
1533
+ *
1534
+ * @summary Listar logs de requisições da API
1535
+ * @param {string} [path] Filtrar por caminho da requisição
1536
+ * @param {string} [method] Filtrar por método HTTP
1537
+ * @param {number} [status] Filtrar por status code
1538
+ * @param {string} [username] Filtrar por username do usuário
1539
+ * @param {string} [from] Data inicial (YYYY-MM-DD)
1540
+ * @param {string} [to] Data final (YYYY-MM-DD)
1541
+ * @param {number} [perPage] Itens por página
1542
+ * @param {number} [page] Número da página
1543
+ * @param {*} [options] Override http request option.
1544
+ * @throws {RequiredError}
1545
+ */
1546
+ adminLogsIndex: function (path_1, method_1, status_1, username_1, from_1, to_1, perPage_1, page_1) {
1547
+ var args_1 = [];
1548
+ for (var _i = 8; _i < arguments.length; _i++) {
1549
+ args_1[_i - 8] = arguments[_i];
1550
+ }
1551
+ return __awaiter(_this, __spreadArray([path_1, method_1, status_1, username_1, from_1, to_1, perPage_1, page_1], args_1, true), void 0, function (path, method, status, username, from, to, perPage, page, options) {
1552
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1553
+ if (options === void 0) { options = {}; }
1554
+ return __generator(this, function (_a) {
1555
+ switch (_a.label) {
1556
+ case 0:
1557
+ localVarPath = "/v3/admin/logs/";
1558
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1559
+ if (configuration) {
1560
+ baseOptions = configuration.baseOptions;
1561
+ }
1562
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1563
+ localVarHeaderParameter = {};
1564
+ localVarQueryParameter = {};
1565
+ // authentication bearerAuth required
1566
+ // http bearer authentication required
1567
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1568
+ case 1:
1569
+ // authentication bearerAuth required
1570
+ // http bearer authentication required
1571
+ _a.sent();
1572
+ if (path !== undefined) {
1573
+ localVarQueryParameter['path'] = path;
1574
+ }
1575
+ if (method !== undefined) {
1576
+ localVarQueryParameter['method'] = method;
1577
+ }
1578
+ if (status !== undefined) {
1579
+ localVarQueryParameter['status'] = status;
1580
+ }
1581
+ if (username !== undefined) {
1582
+ localVarQueryParameter['username'] = username;
1583
+ }
1584
+ if (from !== undefined) {
1585
+ localVarQueryParameter['from'] = (from instanceof Date) ?
1586
+ from.toISOString().substring(0, 10) :
1587
+ from;
1588
+ }
1589
+ if (to !== undefined) {
1590
+ localVarQueryParameter['to'] = (to instanceof Date) ?
1591
+ to.toISOString().substring(0, 10) :
1592
+ to;
1593
+ }
1594
+ if (perPage !== undefined) {
1595
+ localVarQueryParameter['per_page'] = perPage;
1596
+ }
1597
+ if (page !== undefined) {
1598
+ localVarQueryParameter['page'] = page;
1599
+ }
1600
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1601
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1602
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1603
+ return [2 /*return*/, {
1604
+ url: (0, common_1.toPathString)(localVarUrlObj),
1605
+ options: localVarRequestOptions,
1606
+ }];
1607
+ }
1608
+ });
1609
+ });
1610
+ },
1611
+ /**
1612
+ *
1613
+ * @summary Visualizar log específico
1614
+ * @param {number} id ID do log
1615
+ * @param {*} [options] Override http request option.
1616
+ * @throws {RequiredError}
1617
+ */
1618
+ adminLogsShow: function (id_1) {
1619
+ var args_1 = [];
1620
+ for (var _i = 1; _i < arguments.length; _i++) {
1621
+ args_1[_i - 1] = arguments[_i];
1622
+ }
1623
+ return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
1624
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1625
+ if (options === void 0) { options = {}; }
1626
+ return __generator(this, function (_a) {
1627
+ switch (_a.label) {
1628
+ case 0:
1629
+ // verify required parameter 'id' is not null or undefined
1630
+ (0, common_1.assertParamExists)('adminLogsShow', 'id', id);
1631
+ localVarPath = "/v3/admin/logs/{id}"
1632
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
1633
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1634
+ if (configuration) {
1635
+ baseOptions = configuration.baseOptions;
1636
+ }
1637
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1638
+ localVarHeaderParameter = {};
1639
+ localVarQueryParameter = {};
1640
+ // authentication bearerAuth required
1641
+ // http bearer authentication required
1642
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1643
+ case 1:
1644
+ // authentication bearerAuth required
1645
+ // http bearer authentication required
1646
+ _a.sent();
1647
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1648
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1649
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1650
+ return [2 /*return*/, {
1651
+ url: (0, common_1.toPathString)(localVarUrlObj),
1652
+ options: localVarRequestOptions,
1653
+ }];
1654
+ }
1655
+ });
1656
+ });
1657
+ },
1658
+ };
1659
+ };
1660
+ exports.LogsApiAxiosParamCreator = LogsApiAxiosParamCreator;
1661
+ /**
1662
+ * LogsApi - functional programming interface
1663
+ * @export
1664
+ */
1665
+ var LogsApiFp = function (configuration) {
1666
+ var localVarAxiosParamCreator = (0, exports.LogsApiAxiosParamCreator)(configuration);
1667
+ return {
1668
+ /**
1669
+ *
1670
+ * @summary Listar logs de requisições da API
1671
+ * @param {string} [path] Filtrar por caminho da requisição
1672
+ * @param {string} [method] Filtrar por método HTTP
1673
+ * @param {number} [status] Filtrar por status code
1674
+ * @param {string} [username] Filtrar por username do usuário
1675
+ * @param {string} [from] Data inicial (YYYY-MM-DD)
1676
+ * @param {string} [to] Data final (YYYY-MM-DD)
1677
+ * @param {number} [perPage] Itens por página
1678
+ * @param {number} [page] Número da página
1679
+ * @param {*} [options] Override http request option.
1680
+ * @throws {RequiredError}
1681
+ */
1682
+ adminLogsIndex: function (path, method, status, username, from, to, perPage, page, options) {
1683
+ return __awaiter(this, void 0, void 0, function () {
1684
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1685
+ var _a, _b, _c;
1686
+ return __generator(this, function (_d) {
1687
+ switch (_d.label) {
1688
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminLogsIndex(path, method, status, username, from, to, perPage, page, options)];
1689
+ case 1:
1690
+ localVarAxiosArgs = _d.sent();
1691
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1692
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['LogsApi.adminLogsIndex']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1693
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1694
+ }
1695
+ });
1696
+ });
1697
+ },
1698
+ /**
1699
+ *
1700
+ * @summary Visualizar log específico
1701
+ * @param {number} id ID do log
1702
+ * @param {*} [options] Override http request option.
1703
+ * @throws {RequiredError}
1704
+ */
1705
+ adminLogsShow: function (id, options) {
1706
+ return __awaiter(this, void 0, void 0, function () {
1707
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1708
+ var _a, _b, _c;
1709
+ return __generator(this, function (_d) {
1710
+ switch (_d.label) {
1711
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminLogsShow(id, options)];
1712
+ case 1:
1713
+ localVarAxiosArgs = _d.sent();
1714
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1715
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['LogsApi.adminLogsShow']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1716
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1717
+ }
1718
+ });
1719
+ });
1720
+ },
1721
+ };
1722
+ };
1723
+ exports.LogsApiFp = LogsApiFp;
1724
+ /**
1725
+ * LogsApi - factory interface
1726
+ * @export
1727
+ */
1728
+ var LogsApiFactory = function (configuration, basePath, axios) {
1729
+ var localVarFp = (0, exports.LogsApiFp)(configuration);
1730
+ return {
1731
+ /**
1732
+ *
1733
+ * @summary Listar logs de requisições da API
1734
+ * @param {LogsApiAdminLogsIndexRequest} requestParameters Request parameters.
1735
+ * @param {*} [options] Override http request option.
1736
+ * @throws {RequiredError}
1737
+ */
1738
+ adminLogsIndex: function (requestParameters, options) {
1739
+ if (requestParameters === void 0) { requestParameters = {}; }
1740
+ return localVarFp.adminLogsIndex(requestParameters.path, requestParameters.method, requestParameters.status, requestParameters.username, requestParameters.from, requestParameters.to, requestParameters.perPage, requestParameters.page, options).then(function (request) { return request(axios, basePath); });
1741
+ },
1742
+ /**
1743
+ *
1744
+ * @summary Visualizar log específico
1745
+ * @param {LogsApiAdminLogsShowRequest} requestParameters Request parameters.
1746
+ * @param {*} [options] Override http request option.
1747
+ * @throws {RequiredError}
1748
+ */
1749
+ adminLogsShow: function (requestParameters, options) {
1750
+ return localVarFp.adminLogsShow(requestParameters.id, options).then(function (request) { return request(axios, basePath); });
1751
+ },
1752
+ };
1753
+ };
1754
+ exports.LogsApiFactory = LogsApiFactory;
1755
+ /**
1756
+ * LogsApi - object-oriented interface
1757
+ * @export
1758
+ * @class LogsApi
1759
+ * @extends {BaseAPI}
1760
+ */
1761
+ var LogsApi = /** @class */ (function (_super) {
1762
+ __extends(LogsApi, _super);
1763
+ function LogsApi() {
1764
+ return _super !== null && _super.apply(this, arguments) || this;
1765
+ }
1766
+ /**
1767
+ *
1768
+ * @summary Listar logs de requisições da API
1769
+ * @param {LogsApiAdminLogsIndexRequest} requestParameters Request parameters.
1770
+ * @param {*} [options] Override http request option.
1771
+ * @throws {RequiredError}
1772
+ * @memberof LogsApi
1773
+ */
1774
+ LogsApi.prototype.adminLogsIndex = function (requestParameters, options) {
1775
+ var _this = this;
1776
+ if (requestParameters === void 0) { requestParameters = {}; }
1777
+ return (0, exports.LogsApiFp)(this.configuration).adminLogsIndex(requestParameters.path, requestParameters.method, requestParameters.status, requestParameters.username, requestParameters.from, requestParameters.to, requestParameters.perPage, requestParameters.page, options).then(function (request) { return request(_this.axios, _this.basePath); });
1778
+ };
1779
+ /**
1780
+ *
1781
+ * @summary Visualizar log específico
1782
+ * @param {LogsApiAdminLogsShowRequest} requestParameters Request parameters.
1783
+ * @param {*} [options] Override http request option.
1784
+ * @throws {RequiredError}
1785
+ * @memberof LogsApi
1786
+ */
1787
+ LogsApi.prototype.adminLogsShow = function (requestParameters, options) {
1788
+ var _this = this;
1789
+ return (0, exports.LogsApiFp)(this.configuration).adminLogsShow(requestParameters.id, options).then(function (request) { return request(_this.axios, _this.basePath); });
1790
+ };
1791
+ return LogsApi;
1792
+ }(base_1.BaseAPI));
1793
+ exports.LogsApi = LogsApi;
1794
+ /**
1795
+ * MetricsApi - axios parameter creator
1796
+ * @export
1797
+ */
1798
+ var MetricsApiAxiosParamCreator = function (configuration) {
1799
+ var _this = this;
1800
+ return {
1801
+ /**
1802
+ *
1803
+ * @summary Devolve as métricas da promoção
1804
+ * @param {string} promotionId ID da promoção
1805
+ * @param {Array<string>} keys Chaves das métricas que deseja consultar. Exemplo: &#x60;keys[]&#x3D;users&amp;keys[]&#x3D;coupons&amp;keys[]&#x3D;luckyNumbers&#x60;
1806
+ * @param {string} [startDate] Data inicial para filtrar as métricas
1807
+ * @param {string} [endDate] Data final para filtrar as métricas
1808
+ * @param {number} [limit] Limite de resultados
1809
+ * @param {string} [resolution] Resolução das métricas. Exemplo: &#x60;minute&#x60;, &#x60;hour&#x60;, &#x60;day&#x60;
1810
+ * @param {*} [options] Override http request option.
1811
+ * @throws {RequiredError}
1812
+ */
1813
+ metrics: function (promotionId_1, keys_1, startDate_1, endDate_1, limit_1, resolution_1) {
1814
+ var args_1 = [];
1815
+ for (var _i = 6; _i < arguments.length; _i++) {
1816
+ args_1[_i - 6] = arguments[_i];
1817
+ }
1818
+ return __awaiter(_this, __spreadArray([promotionId_1, keys_1, startDate_1, endDate_1, limit_1, resolution_1], args_1, true), void 0, function (promotionId, keys, startDate, endDate, limit, resolution, options) {
1819
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1820
+ if (options === void 0) { options = {}; }
1821
+ return __generator(this, function (_a) {
1822
+ switch (_a.label) {
1823
+ case 0:
1824
+ // verify required parameter 'promotionId' is not null or undefined
1825
+ (0, common_1.assertParamExists)('metrics', 'promotionId', promotionId);
1826
+ // verify required parameter 'keys' is not null or undefined
1827
+ (0, common_1.assertParamExists)('metrics', 'keys', keys);
1828
+ localVarPath = "/v3/metrics";
1829
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1830
+ if (configuration) {
1831
+ baseOptions = configuration.baseOptions;
1832
+ }
1833
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1834
+ localVarHeaderParameter = {};
1835
+ localVarQueryParameter = {};
1836
+ // authentication bearerAuth required
1837
+ // http bearer authentication required
1838
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1839
+ case 1:
1840
+ // authentication bearerAuth required
1841
+ // http bearer authentication required
1842
+ _a.sent();
1843
+ if (promotionId !== undefined) {
1844
+ localVarQueryParameter['promotion_id'] = promotionId;
1845
+ }
1846
+ if (keys) {
1847
+ localVarQueryParameter['keys'] = keys;
1848
+ }
1849
+ if (startDate !== undefined) {
1850
+ localVarQueryParameter['start_date'] = startDate;
1851
+ }
1852
+ if (endDate !== undefined) {
1853
+ localVarQueryParameter['end_date'] = endDate;
1854
+ }
1855
+ if (limit !== undefined) {
1856
+ localVarQueryParameter['limit'] = limit;
1857
+ }
1858
+ if (resolution !== undefined) {
1859
+ localVarQueryParameter['resolution'] = resolution;
1860
+ }
1861
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1862
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1863
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1864
+ return [2 /*return*/, {
1865
+ url: (0, common_1.toPathString)(localVarUrlObj),
1866
+ options: localVarRequestOptions,
1867
+ }];
1868
+ }
1869
+ });
1870
+ });
1871
+ },
1872
+ };
1873
+ };
1874
+ exports.MetricsApiAxiosParamCreator = MetricsApiAxiosParamCreator;
1875
+ /**
1876
+ * MetricsApi - functional programming interface
1877
+ * @export
1878
+ */
1879
+ var MetricsApiFp = function (configuration) {
1880
+ var localVarAxiosParamCreator = (0, exports.MetricsApiAxiosParamCreator)(configuration);
1881
+ return {
1882
+ /**
1883
+ *
1884
+ * @summary Devolve as métricas da promoção
1885
+ * @param {string} promotionId ID da promoção
1886
+ * @param {Array<string>} keys Chaves das métricas que deseja consultar. Exemplo: &#x60;keys[]&#x3D;users&amp;keys[]&#x3D;coupons&amp;keys[]&#x3D;luckyNumbers&#x60;
1887
+ * @param {string} [startDate] Data inicial para filtrar as métricas
1888
+ * @param {string} [endDate] Data final para filtrar as métricas
1889
+ * @param {number} [limit] Limite de resultados
1890
+ * @param {string} [resolution] Resolução das métricas. Exemplo: &#x60;minute&#x60;, &#x60;hour&#x60;, &#x60;day&#x60;
1891
+ * @param {*} [options] Override http request option.
1892
+ * @throws {RequiredError}
1893
+ */
1894
+ metrics: function (promotionId, keys, startDate, endDate, limit, resolution, options) {
1895
+ return __awaiter(this, void 0, void 0, function () {
1896
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1897
+ var _a, _b, _c;
1898
+ return __generator(this, function (_d) {
1899
+ switch (_d.label) {
1900
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.metrics(promotionId, keys, startDate, endDate, limit, resolution, options)];
1901
+ case 1:
1902
+ localVarAxiosArgs = _d.sent();
1903
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1904
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MetricsApi.metrics']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1905
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1906
+ }
1907
+ });
1908
+ });
1909
+ },
1910
+ };
1911
+ };
1912
+ exports.MetricsApiFp = MetricsApiFp;
1913
+ /**
1914
+ * MetricsApi - factory interface
1915
+ * @export
1916
+ */
1917
+ var MetricsApiFactory = function (configuration, basePath, axios) {
1918
+ var localVarFp = (0, exports.MetricsApiFp)(configuration);
1919
+ return {
1920
+ /**
1921
+ *
1922
+ * @summary Devolve as métricas da promoção
1923
+ * @param {MetricsApiMetricsRequest} requestParameters Request parameters.
1924
+ * @param {*} [options] Override http request option.
1925
+ * @throws {RequiredError}
1926
+ */
1927
+ metrics: function (requestParameters, options) {
1928
+ return localVarFp.metrics(requestParameters.promotionId, requestParameters.keys, requestParameters.startDate, requestParameters.endDate, requestParameters.limit, requestParameters.resolution, options).then(function (request) { return request(axios, basePath); });
1929
+ },
1930
+ };
1931
+ };
1932
+ exports.MetricsApiFactory = MetricsApiFactory;
1933
+ /**
1934
+ * MetricsApi - object-oriented interface
1935
+ * @export
1936
+ * @class MetricsApi
1937
+ * @extends {BaseAPI}
1938
+ */
1939
+ var MetricsApi = /** @class */ (function (_super) {
1940
+ __extends(MetricsApi, _super);
1941
+ function MetricsApi() {
1942
+ return _super !== null && _super.apply(this, arguments) || this;
1943
+ }
1944
+ /**
1945
+ *
1946
+ * @summary Devolve as métricas da promoção
1947
+ * @param {MetricsApiMetricsRequest} requestParameters Request parameters.
1948
+ * @param {*} [options] Override http request option.
1949
+ * @throws {RequiredError}
1950
+ * @memberof MetricsApi
1951
+ */
1952
+ MetricsApi.prototype.metrics = function (requestParameters, options) {
1953
+ var _this = this;
1954
+ return (0, exports.MetricsApiFp)(this.configuration).metrics(requestParameters.promotionId, requestParameters.keys, requestParameters.startDate, requestParameters.endDate, requestParameters.limit, requestParameters.resolution, options).then(function (request) { return request(_this.axios, _this.basePath); });
1955
+ };
1956
+ return MetricsApi;
1957
+ }(base_1.BaseAPI));
1958
+ exports.MetricsApi = MetricsApi;
1959
+ /**
1960
+ * PermissionsApi - axios parameter creator
1961
+ * @export
1962
+ */
1963
+ var PermissionsApiAxiosParamCreator = function (configuration) {
1964
+ var _this = this;
1965
+ return {
1966
+ /**
1967
+ *
1968
+ * @summary Buscar permissões por ação
1969
+ * @param {string} action Ação a filtrar
1970
+ * @param {*} [options] Override http request option.
1971
+ * @throws {RequiredError}
1972
+ */
1973
+ adminPermissionsByAction: function (action_1) {
1974
+ var args_1 = [];
1975
+ for (var _i = 1; _i < arguments.length; _i++) {
1976
+ args_1[_i - 1] = arguments[_i];
1977
+ }
1978
+ return __awaiter(_this, __spreadArray([action_1], args_1, true), void 0, function (action, options) {
1979
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1980
+ if (options === void 0) { options = {}; }
1981
+ return __generator(this, function (_a) {
1982
+ switch (_a.label) {
1983
+ case 0:
1984
+ // verify required parameter 'action' is not null or undefined
1985
+ (0, common_1.assertParamExists)('adminPermissionsByAction', 'action', action);
1986
+ localVarPath = "/v3/admin/permissions/action";
1987
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1988
+ if (configuration) {
1989
+ baseOptions = configuration.baseOptions;
1990
+ }
1991
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1992
+ localVarHeaderParameter = {};
1993
+ localVarQueryParameter = {};
1994
+ // authentication bearerAuth required
1995
+ // http bearer authentication required
1996
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1997
+ case 1:
1998
+ // authentication bearerAuth required
1999
+ // http bearer authentication required
2000
+ _a.sent();
2001
+ if (action !== undefined) {
2002
+ localVarQueryParameter['action'] = action;
2003
+ }
2004
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2005
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2006
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2007
+ return [2 /*return*/, {
2008
+ url: (0, common_1.toPathString)(localVarUrlObj),
2009
+ options: localVarRequestOptions,
2010
+ }];
2011
+ }
2012
+ });
2013
+ });
2014
+ },
2015
+ /**
2016
+ *
2017
+ * @summary Buscar permissões por categoria
2018
+ * @param {string} category Categoria a filtrar
2019
+ * @param {*} [options] Override http request option.
2020
+ * @throws {RequiredError}
2021
+ */
2022
+ adminPermissionsByCategory: function (category_1) {
2023
+ var args_1 = [];
2024
+ for (var _i = 1; _i < arguments.length; _i++) {
2025
+ args_1[_i - 1] = arguments[_i];
2026
+ }
2027
+ return __awaiter(_this, __spreadArray([category_1], args_1, true), void 0, function (category, options) {
2028
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2029
+ if (options === void 0) { options = {}; }
2030
+ return __generator(this, function (_a) {
2031
+ switch (_a.label) {
2032
+ case 0:
2033
+ // verify required parameter 'category' is not null or undefined
2034
+ (0, common_1.assertParamExists)('adminPermissionsByCategory', 'category', category);
2035
+ localVarPath = "/v3/admin/permissions/category";
2036
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2037
+ if (configuration) {
2038
+ baseOptions = configuration.baseOptions;
2039
+ }
2040
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
2041
+ localVarHeaderParameter = {};
2042
+ localVarQueryParameter = {};
2043
+ // authentication bearerAuth required
2044
+ // http bearer authentication required
2045
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2046
+ case 1:
2047
+ // authentication bearerAuth required
2048
+ // http bearer authentication required
2049
+ _a.sent();
2050
+ if (category !== undefined) {
2051
+ localVarQueryParameter['category'] = category;
2052
+ }
2053
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2054
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2055
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2056
+ return [2 /*return*/, {
2057
+ url: (0, common_1.toPathString)(localVarUrlObj),
2058
+ options: localVarRequestOptions,
2059
+ }];
2060
+ }
2061
+ });
2062
+ });
2063
+ },
2064
+ /**
2065
+ *
2066
+ * @summary Listar todas as categorias de permissões
2067
+ * @param {*} [options] Override http request option.
2068
+ * @throws {RequiredError}
2069
+ */
2070
+ adminPermissionsCategories: function () {
2071
+ var args_1 = [];
2072
+ for (var _i = 0; _i < arguments.length; _i++) {
2073
+ args_1[_i] = arguments[_i];
2074
+ }
2075
+ return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
2076
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2077
+ if (options === void 0) { options = {}; }
2078
+ return __generator(this, function (_a) {
2079
+ switch (_a.label) {
2080
+ case 0:
2081
+ localVarPath = "/v3/admin/permissions/categories";
2082
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2083
+ if (configuration) {
2084
+ baseOptions = configuration.baseOptions;
2085
+ }
2086
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
2087
+ localVarHeaderParameter = {};
2088
+ localVarQueryParameter = {};
2089
+ // authentication bearerAuth required
2090
+ // http bearer authentication required
2091
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2092
+ case 1:
2093
+ // authentication bearerAuth required
2094
+ // http bearer authentication required
2095
+ _a.sent();
2096
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2097
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2098
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2099
+ return [2 /*return*/, {
2100
+ url: (0, common_1.toPathString)(localVarUrlObj),
2101
+ options: localVarRequestOptions,
2102
+ }];
2103
+ }
2104
+ });
2105
+ });
2106
+ },
2107
+ /**
2108
+ *
2109
+ * @summary Listar permissões agrupadas por categoria
2110
+ * @param {*} [options] Override http request option.
2111
+ * @throws {RequiredError}
2112
+ */
2113
+ adminPermissionsGrouped: function () {
2114
+ var args_1 = [];
2115
+ for (var _i = 0; _i < arguments.length; _i++) {
2116
+ args_1[_i] = arguments[_i];
2117
+ }
2118
+ return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
2119
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2120
+ if (options === void 0) { options = {}; }
2121
+ return __generator(this, function (_a) {
2122
+ switch (_a.label) {
2123
+ case 0:
2124
+ localVarPath = "/v3/admin/permissions/grouped";
2125
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2126
+ if (configuration) {
2127
+ baseOptions = configuration.baseOptions;
2128
+ }
2129
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
2130
+ localVarHeaderParameter = {};
2131
+ localVarQueryParameter = {};
2132
+ // authentication bearerAuth required
2133
+ // http bearer authentication required
2134
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2135
+ case 1:
2136
+ // authentication bearerAuth required
2137
+ // http bearer authentication required
2138
+ _a.sent();
2139
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2140
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2141
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2142
+ return [2 /*return*/, {
2143
+ url: (0, common_1.toPathString)(localVarUrlObj),
2144
+ options: localVarRequestOptions,
2145
+ }];
2146
+ }
2147
+ });
2148
+ });
2149
+ },
2150
+ /**
2151
+ *
2152
+ * @summary Listar todas as permissões
2153
+ * @param {*} [options] Override http request option.
2154
+ * @throws {RequiredError}
2155
+ */
2156
+ adminPermissionsIndex: function () {
2157
+ var args_1 = [];
2158
+ for (var _i = 0; _i < arguments.length; _i++) {
2159
+ args_1[_i] = arguments[_i];
2160
+ }
2161
+ return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
2162
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2163
+ if (options === void 0) { options = {}; }
2164
+ return __generator(this, function (_a) {
2165
+ switch (_a.label) {
2166
+ case 0:
2167
+ localVarPath = "/v3/admin/permissions/";
2168
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2169
+ if (configuration) {
2170
+ baseOptions = configuration.baseOptions;
2171
+ }
2172
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
2173
+ localVarHeaderParameter = {};
2174
+ localVarQueryParameter = {};
2175
+ // authentication bearerAuth required
2176
+ // http bearer authentication required
2177
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2178
+ case 1:
2179
+ // authentication bearerAuth required
2180
+ // http bearer authentication required
2181
+ _a.sent();
2182
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2183
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2184
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2185
+ return [2 /*return*/, {
2186
+ url: (0, common_1.toPathString)(localVarUrlObj),
2187
+ options: localVarRequestOptions,
2188
+ }];
2189
+ }
2190
+ });
2191
+ });
2192
+ },
2193
+ /**
2194
+ *
2195
+ * @summary Buscar permissão específica por chave
2196
+ * @param {string} key Chave da permissão
2197
+ * @param {*} [options] Override http request option.
2198
+ * @throws {RequiredError}
2199
+ */
2200
+ adminPermissionsShow: function (key_1) {
2201
+ var args_1 = [];
2202
+ for (var _i = 1; _i < arguments.length; _i++) {
2203
+ args_1[_i - 1] = arguments[_i];
2204
+ }
2205
+ return __awaiter(_this, __spreadArray([key_1], args_1, true), void 0, function (key, options) {
2206
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2207
+ if (options === void 0) { options = {}; }
2208
+ return __generator(this, function (_a) {
2209
+ switch (_a.label) {
2210
+ case 0:
2211
+ // verify required parameter 'key' is not null or undefined
2212
+ (0, common_1.assertParamExists)('adminPermissionsShow', 'key', key);
2213
+ localVarPath = "/v3/admin/permissions/{key}"
2214
+ .replace("{".concat("key", "}"), encodeURIComponent(String(key)));
2215
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2216
+ if (configuration) {
2217
+ baseOptions = configuration.baseOptions;
2218
+ }
2219
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
2220
+ localVarHeaderParameter = {};
2221
+ localVarQueryParameter = {};
2222
+ // authentication bearerAuth required
2223
+ // http bearer authentication required
2224
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2225
+ case 1:
2226
+ // authentication bearerAuth required
2227
+ // http bearer authentication required
2228
+ _a.sent();
2229
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2230
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2231
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2232
+ return [2 /*return*/, {
2233
+ url: (0, common_1.toPathString)(localVarUrlObj),
2234
+ options: localVarRequestOptions,
2235
+ }];
2236
+ }
2237
+ });
2238
+ });
2239
+ },
2240
+ };
2241
+ };
2242
+ exports.PermissionsApiAxiosParamCreator = PermissionsApiAxiosParamCreator;
2243
+ /**
2244
+ * PermissionsApi - functional programming interface
2245
+ * @export
2246
+ */
2247
+ var PermissionsApiFp = function (configuration) {
2248
+ var localVarAxiosParamCreator = (0, exports.PermissionsApiAxiosParamCreator)(configuration);
2249
+ return {
2250
+ /**
2251
+ *
2252
+ * @summary Buscar permissões por ação
2253
+ * @param {string} action Ação a filtrar
2254
+ * @param {*} [options] Override http request option.
2255
+ * @throws {RequiredError}
2256
+ */
2257
+ adminPermissionsByAction: function (action, options) {
2258
+ return __awaiter(this, void 0, void 0, function () {
2259
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2260
+ var _a, _b, _c;
2261
+ return __generator(this, function (_d) {
2262
+ switch (_d.label) {
2263
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPermissionsByAction(action, options)];
2264
+ case 1:
2265
+ localVarAxiosArgs = _d.sent();
2266
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2267
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PermissionsApi.adminPermissionsByAction']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2268
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2269
+ }
2270
+ });
2271
+ });
2272
+ },
2273
+ /**
2274
+ *
2275
+ * @summary Buscar permissões por categoria
2276
+ * @param {string} category Categoria a filtrar
2277
+ * @param {*} [options] Override http request option.
2278
+ * @throws {RequiredError}
2279
+ */
2280
+ adminPermissionsByCategory: function (category, options) {
2281
+ return __awaiter(this, void 0, void 0, function () {
2282
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2283
+ var _a, _b, _c;
2284
+ return __generator(this, function (_d) {
2285
+ switch (_d.label) {
2286
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPermissionsByCategory(category, options)];
2287
+ case 1:
2288
+ localVarAxiosArgs = _d.sent();
2289
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2290
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PermissionsApi.adminPermissionsByCategory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2291
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2292
+ }
2293
+ });
2294
+ });
2295
+ },
2296
+ /**
2297
+ *
2298
+ * @summary Listar todas as categorias de permissões
2299
+ * @param {*} [options] Override http request option.
2300
+ * @throws {RequiredError}
2301
+ */
2302
+ adminPermissionsCategories: function (options) {
2303
+ return __awaiter(this, void 0, void 0, function () {
2304
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2305
+ var _a, _b, _c;
2306
+ return __generator(this, function (_d) {
2307
+ switch (_d.label) {
2308
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPermissionsCategories(options)];
2309
+ case 1:
2310
+ localVarAxiosArgs = _d.sent();
2311
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2312
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PermissionsApi.adminPermissionsCategories']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2313
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2314
+ }
2315
+ });
2316
+ });
2317
+ },
2318
+ /**
2319
+ *
2320
+ * @summary Listar permissões agrupadas por categoria
2321
+ * @param {*} [options] Override http request option.
2322
+ * @throws {RequiredError}
2323
+ */
2324
+ adminPermissionsGrouped: function (options) {
2325
+ return __awaiter(this, void 0, void 0, function () {
2326
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2327
+ var _a, _b, _c;
2328
+ return __generator(this, function (_d) {
2329
+ switch (_d.label) {
2330
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPermissionsGrouped(options)];
2331
+ case 1:
2332
+ localVarAxiosArgs = _d.sent();
2333
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2334
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PermissionsApi.adminPermissionsGrouped']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2335
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2336
+ }
2337
+ });
2338
+ });
2339
+ },
2340
+ /**
2341
+ *
2342
+ * @summary Listar todas as permissões
2343
+ * @param {*} [options] Override http request option.
2344
+ * @throws {RequiredError}
2345
+ */
2346
+ adminPermissionsIndex: function (options) {
2347
+ return __awaiter(this, void 0, void 0, function () {
2348
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2349
+ var _a, _b, _c;
2350
+ return __generator(this, function (_d) {
2351
+ switch (_d.label) {
2352
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPermissionsIndex(options)];
2353
+ case 1:
2354
+ localVarAxiosArgs = _d.sent();
2355
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2356
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PermissionsApi.adminPermissionsIndex']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2357
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2358
+ }
2359
+ });
2360
+ });
2361
+ },
2362
+ /**
2363
+ *
2364
+ * @summary Buscar permissão específica por chave
2365
+ * @param {string} key Chave da permissão
2366
+ * @param {*} [options] Override http request option.
2367
+ * @throws {RequiredError}
2368
+ */
2369
+ adminPermissionsShow: function (key, options) {
2370
+ return __awaiter(this, void 0, void 0, function () {
2371
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2372
+ var _a, _b, _c;
2373
+ return __generator(this, function (_d) {
2374
+ switch (_d.label) {
2375
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPermissionsShow(key, options)];
2376
+ case 1:
2377
+ localVarAxiosArgs = _d.sent();
2378
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2379
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PermissionsApi.adminPermissionsShow']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2380
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2381
+ }
2382
+ });
2383
+ });
2384
+ },
2385
+ };
2386
+ };
2387
+ exports.PermissionsApiFp = PermissionsApiFp;
2388
+ /**
2389
+ * PermissionsApi - factory interface
2390
+ * @export
2391
+ */
2392
+ var PermissionsApiFactory = function (configuration, basePath, axios) {
2393
+ var localVarFp = (0, exports.PermissionsApiFp)(configuration);
2394
+ return {
2395
+ /**
2396
+ *
2397
+ * @summary Buscar permissões por ação
2398
+ * @param {PermissionsApiAdminPermissionsByActionRequest} requestParameters Request parameters.
2399
+ * @param {*} [options] Override http request option.
2400
+ * @throws {RequiredError}
2401
+ */
2402
+ adminPermissionsByAction: function (requestParameters, options) {
2403
+ return localVarFp.adminPermissionsByAction(requestParameters.action, options).then(function (request) { return request(axios, basePath); });
2404
+ },
2405
+ /**
2406
+ *
2407
+ * @summary Buscar permissões por categoria
2408
+ * @param {PermissionsApiAdminPermissionsByCategoryRequest} requestParameters Request parameters.
2409
+ * @param {*} [options] Override http request option.
2410
+ * @throws {RequiredError}
2411
+ */
2412
+ adminPermissionsByCategory: function (requestParameters, options) {
2413
+ return localVarFp.adminPermissionsByCategory(requestParameters.category, options).then(function (request) { return request(axios, basePath); });
2414
+ },
2415
+ /**
2416
+ *
2417
+ * @summary Listar todas as categorias de permissões
2418
+ * @param {*} [options] Override http request option.
2419
+ * @throws {RequiredError}
2420
+ */
2421
+ adminPermissionsCategories: function (options) {
2422
+ return localVarFp.adminPermissionsCategories(options).then(function (request) { return request(axios, basePath); });
2423
+ },
2424
+ /**
2425
+ *
2426
+ * @summary Listar permissões agrupadas por categoria
2427
+ * @param {*} [options] Override http request option.
2428
+ * @throws {RequiredError}
2429
+ */
2430
+ adminPermissionsGrouped: function (options) {
2431
+ return localVarFp.adminPermissionsGrouped(options).then(function (request) { return request(axios, basePath); });
2432
+ },
2433
+ /**
2434
+ *
2435
+ * @summary Listar todas as permissões
2436
+ * @param {*} [options] Override http request option.
2437
+ * @throws {RequiredError}
2438
+ */
2439
+ adminPermissionsIndex: function (options) {
2440
+ return localVarFp.adminPermissionsIndex(options).then(function (request) { return request(axios, basePath); });
2441
+ },
2442
+ /**
2443
+ *
2444
+ * @summary Buscar permissão específica por chave
2445
+ * @param {PermissionsApiAdminPermissionsShowRequest} requestParameters Request parameters.
2446
+ * @param {*} [options] Override http request option.
2447
+ * @throws {RequiredError}
2448
+ */
2449
+ adminPermissionsShow: function (requestParameters, options) {
2450
+ return localVarFp.adminPermissionsShow(requestParameters.key, options).then(function (request) { return request(axios, basePath); });
2451
+ },
2452
+ };
2453
+ };
2454
+ exports.PermissionsApiFactory = PermissionsApiFactory;
2455
+ /**
2456
+ * PermissionsApi - object-oriented interface
2457
+ * @export
2458
+ * @class PermissionsApi
2459
+ * @extends {BaseAPI}
2460
+ */
2461
+ var PermissionsApi = /** @class */ (function (_super) {
2462
+ __extends(PermissionsApi, _super);
2463
+ function PermissionsApi() {
2464
+ return _super !== null && _super.apply(this, arguments) || this;
2465
+ }
2466
+ /**
2467
+ *
2468
+ * @summary Buscar permissões por ação
2469
+ * @param {PermissionsApiAdminPermissionsByActionRequest} requestParameters Request parameters.
2470
+ * @param {*} [options] Override http request option.
2471
+ * @throws {RequiredError}
2472
+ * @memberof PermissionsApi
2473
+ */
2474
+ PermissionsApi.prototype.adminPermissionsByAction = function (requestParameters, options) {
2475
+ var _this = this;
2476
+ return (0, exports.PermissionsApiFp)(this.configuration).adminPermissionsByAction(requestParameters.action, options).then(function (request) { return request(_this.axios, _this.basePath); });
2477
+ };
2478
+ /**
2479
+ *
2480
+ * @summary Buscar permissões por categoria
2481
+ * @param {PermissionsApiAdminPermissionsByCategoryRequest} requestParameters Request parameters.
2482
+ * @param {*} [options] Override http request option.
2483
+ * @throws {RequiredError}
2484
+ * @memberof PermissionsApi
2485
+ */
2486
+ PermissionsApi.prototype.adminPermissionsByCategory = function (requestParameters, options) {
2487
+ var _this = this;
2488
+ return (0, exports.PermissionsApiFp)(this.configuration).adminPermissionsByCategory(requestParameters.category, options).then(function (request) { return request(_this.axios, _this.basePath); });
2489
+ };
2490
+ /**
2491
+ *
2492
+ * @summary Listar todas as categorias de permissões
2493
+ * @param {*} [options] Override http request option.
2494
+ * @throws {RequiredError}
2495
+ * @memberof PermissionsApi
2496
+ */
2497
+ PermissionsApi.prototype.adminPermissionsCategories = function (options) {
2498
+ var _this = this;
2499
+ return (0, exports.PermissionsApiFp)(this.configuration).adminPermissionsCategories(options).then(function (request) { return request(_this.axios, _this.basePath); });
2500
+ };
2501
+ /**
2502
+ *
2503
+ * @summary Listar permissões agrupadas por categoria
2504
+ * @param {*} [options] Override http request option.
2505
+ * @throws {RequiredError}
2506
+ * @memberof PermissionsApi
2507
+ */
2508
+ PermissionsApi.prototype.adminPermissionsGrouped = function (options) {
2509
+ var _this = this;
2510
+ return (0, exports.PermissionsApiFp)(this.configuration).adminPermissionsGrouped(options).then(function (request) { return request(_this.axios, _this.basePath); });
2511
+ };
1336
2512
  /**
1337
2513
  *
1338
- * @summary Devolve as métricas da promoção
1339
- * @param {MetricsApiMetricsRequest} requestParameters Request parameters.
2514
+ * @summary Listar todas as permissões
1340
2515
  * @param {*} [options] Override http request option.
1341
2516
  * @throws {RequiredError}
1342
- * @memberof MetricsApi
2517
+ * @memberof PermissionsApi
1343
2518
  */
1344
- MetricsApi.prototype.metrics = function (requestParameters, options) {
2519
+ PermissionsApi.prototype.adminPermissionsIndex = function (options) {
1345
2520
  var _this = this;
1346
- return (0, exports.MetricsApiFp)(this.configuration).metrics(requestParameters.promotionId, requestParameters.keys, requestParameters.startDate, requestParameters.endDate, requestParameters.limit, requestParameters.resolution, options).then(function (request) { return request(_this.axios, _this.basePath); });
2521
+ return (0, exports.PermissionsApiFp)(this.configuration).adminPermissionsIndex(options).then(function (request) { return request(_this.axios, _this.basePath); });
1347
2522
  };
1348
- return MetricsApi;
2523
+ /**
2524
+ *
2525
+ * @summary Buscar permissão específica por chave
2526
+ * @param {PermissionsApiAdminPermissionsShowRequest} requestParameters Request parameters.
2527
+ * @param {*} [options] Override http request option.
2528
+ * @throws {RequiredError}
2529
+ * @memberof PermissionsApi
2530
+ */
2531
+ PermissionsApi.prototype.adminPermissionsShow = function (requestParameters, options) {
2532
+ var _this = this;
2533
+ return (0, exports.PermissionsApiFp)(this.configuration).adminPermissionsShow(requestParameters.key, options).then(function (request) { return request(_this.axios, _this.basePath); });
2534
+ };
2535
+ return PermissionsApi;
1349
2536
  }(base_1.BaseAPI));
1350
- exports.MetricsApi = MetricsApi;
2537
+ exports.PermissionsApi = PermissionsApi;
1351
2538
  /**
1352
2539
  * PromotionApi - axios parameter creator
1353
2540
  * @export
@@ -1402,6 +2589,53 @@ var PromotionApiAxiosParamCreator = function (configuration) {
1402
2589
  });
1403
2590
  });
1404
2591
  },
2592
+ /**
2593
+ *
2594
+ * @summary Resetar números da sorte de uma promoção
2595
+ * @param {string} promotionId UUID da promoção
2596
+ * @param {*} [options] Override http request option.
2597
+ * @throws {RequiredError}
2598
+ */
2599
+ adminPromotionLuckyNumbersReset: function (promotionId_1) {
2600
+ var args_1 = [];
2601
+ for (var _i = 1; _i < arguments.length; _i++) {
2602
+ args_1[_i - 1] = arguments[_i];
2603
+ }
2604
+ return __awaiter(_this, __spreadArray([promotionId_1], args_1, true), void 0, function (promotionId, options) {
2605
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2606
+ if (options === void 0) { options = {}; }
2607
+ return __generator(this, function (_a) {
2608
+ switch (_a.label) {
2609
+ case 0:
2610
+ // verify required parameter 'promotionId' is not null or undefined
2611
+ (0, common_1.assertParamExists)('adminPromotionLuckyNumbersReset', 'promotionId', promotionId);
2612
+ localVarPath = "/v3/admin/promotion/{promotion_id}/lucky-numbers/reset"
2613
+ .replace("{".concat("promotion_id", "}"), encodeURIComponent(String(promotionId)));
2614
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2615
+ if (configuration) {
2616
+ baseOptions = configuration.baseOptions;
2617
+ }
2618
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
2619
+ localVarHeaderParameter = {};
2620
+ localVarQueryParameter = {};
2621
+ // authentication bearerAuth required
2622
+ // http bearer authentication required
2623
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2624
+ case 1:
2625
+ // authentication bearerAuth required
2626
+ // http bearer authentication required
2627
+ _a.sent();
2628
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2629
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2630
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2631
+ return [2 /*return*/, {
2632
+ url: (0, common_1.toPathString)(localVarUrlObj),
2633
+ options: localVarRequestOptions,
2634
+ }];
2635
+ }
2636
+ });
2637
+ });
2638
+ },
1405
2639
  /**
1406
2640
  *
1407
2641
  * @summary Adicionar/Atualizar configurações de uma promoção ao orquestrador
@@ -1527,6 +2761,29 @@ var PromotionApiFp = function (configuration) {
1527
2761
  });
1528
2762
  });
1529
2763
  },
2764
+ /**
2765
+ *
2766
+ * @summary Resetar números da sorte de uma promoção
2767
+ * @param {string} promotionId UUID da promoção
2768
+ * @param {*} [options] Override http request option.
2769
+ * @throws {RequiredError}
2770
+ */
2771
+ adminPromotionLuckyNumbersReset: function (promotionId, options) {
2772
+ return __awaiter(this, void 0, void 0, function () {
2773
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2774
+ var _a, _b, _c;
2775
+ return __generator(this, function (_d) {
2776
+ switch (_d.label) {
2777
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPromotionLuckyNumbersReset(promotionId, options)];
2778
+ case 1:
2779
+ localVarAxiosArgs = _d.sent();
2780
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2781
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PromotionApi.adminPromotionLuckyNumbersReset']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2782
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
2783
+ }
2784
+ });
2785
+ });
2786
+ },
1530
2787
  /**
1531
2788
  *
1532
2789
  * @summary Adicionar/Atualizar configurações de uma promoção ao orquestrador
@@ -1593,6 +2850,16 @@ var PromotionApiFactory = function (configuration, basePath, axios) {
1593
2850
  adminPromotionCacheClear: function (requestParameters, options) {
1594
2851
  return localVarFp.adminPromotionCacheClear(requestParameters.promotionId, options).then(function (request) { return request(axios, basePath); });
1595
2852
  },
2853
+ /**
2854
+ *
2855
+ * @summary Resetar números da sorte de uma promoção
2856
+ * @param {PromotionApiAdminPromotionLuckyNumbersResetRequest} requestParameters Request parameters.
2857
+ * @param {*} [options] Override http request option.
2858
+ * @throws {RequiredError}
2859
+ */
2860
+ adminPromotionLuckyNumbersReset: function (requestParameters, options) {
2861
+ return localVarFp.adminPromotionLuckyNumbersReset(requestParameters.promotionId, options).then(function (request) { return request(axios, basePath); });
2862
+ },
1596
2863
  /**
1597
2864
  *
1598
2865
  * @summary Adicionar/Atualizar configurações de uma promoção ao orquestrador
@@ -1641,6 +2908,18 @@ var PromotionApi = /** @class */ (function (_super) {
1641
2908
  var _this = this;
1642
2909
  return (0, exports.PromotionApiFp)(this.configuration).adminPromotionCacheClear(requestParameters.promotionId, options).then(function (request) { return request(_this.axios, _this.basePath); });
1643
2910
  };
2911
+ /**
2912
+ *
2913
+ * @summary Resetar números da sorte de uma promoção
2914
+ * @param {PromotionApiAdminPromotionLuckyNumbersResetRequest} requestParameters Request parameters.
2915
+ * @param {*} [options] Override http request option.
2916
+ * @throws {RequiredError}
2917
+ * @memberof PromotionApi
2918
+ */
2919
+ PromotionApi.prototype.adminPromotionLuckyNumbersReset = function (requestParameters, options) {
2920
+ var _this = this;
2921
+ return (0, exports.PromotionApiFp)(this.configuration).adminPromotionLuckyNumbersReset(requestParameters.promotionId, options).then(function (request) { return request(_this.axios, _this.basePath); });
2922
+ };
1644
2923
  /**
1645
2924
  *
1646
2925
  * @summary Adicionar/Atualizar configurações de uma promoção ao orquestrador
@@ -2691,6 +3970,73 @@ exports.StepsApi = StepsApi;
2691
3970
  var UserApiAxiosParamCreator = function (configuration) {
2692
3971
  var _this = this;
2693
3972
  return {
3973
+ /**
3974
+ *
3975
+ * @summary Listar usuários da API
3976
+ * @param {string} [username] Filtrar por username (busca parcial)
3977
+ * @param {string} [email] Filtrar por email (busca parcial)
3978
+ * @param {string} [name] Filtrar por nome (busca parcial)
3979
+ * @param {string} [role] Filtrar por role exata
3980
+ * @param {string} [include] Incluir relacionamentos (separados por vírgula). Valores aceitos: permissions
3981
+ * @param {number} [page] Número da página para paginação
3982
+ * @param {*} [options] Override http request option.
3983
+ * @throws {RequiredError}
3984
+ */
3985
+ adminUsersList: function (username_1, email_1, name_1, role_1, include_1, page_1) {
3986
+ var args_1 = [];
3987
+ for (var _i = 6; _i < arguments.length; _i++) {
3988
+ args_1[_i - 6] = arguments[_i];
3989
+ }
3990
+ return __awaiter(_this, __spreadArray([username_1, email_1, name_1, role_1, include_1, page_1], args_1, true), void 0, function (username, email, name, role, include, page, options) {
3991
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
3992
+ if (options === void 0) { options = {}; }
3993
+ return __generator(this, function (_a) {
3994
+ switch (_a.label) {
3995
+ case 0:
3996
+ localVarPath = "/v3/admin/user/";
3997
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3998
+ if (configuration) {
3999
+ baseOptions = configuration.baseOptions;
4000
+ }
4001
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
4002
+ localVarHeaderParameter = {};
4003
+ localVarQueryParameter = {};
4004
+ // authentication bearerAuth required
4005
+ // http bearer authentication required
4006
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
4007
+ case 1:
4008
+ // authentication bearerAuth required
4009
+ // http bearer authentication required
4010
+ _a.sent();
4011
+ if (username !== undefined) {
4012
+ localVarQueryParameter['username'] = username;
4013
+ }
4014
+ if (email !== undefined) {
4015
+ localVarQueryParameter['email'] = email;
4016
+ }
4017
+ if (name !== undefined) {
4018
+ localVarQueryParameter['name'] = name;
4019
+ }
4020
+ if (role !== undefined) {
4021
+ localVarQueryParameter['role'] = role;
4022
+ }
4023
+ if (include !== undefined) {
4024
+ localVarQueryParameter['_include'] = include;
4025
+ }
4026
+ if (page !== undefined) {
4027
+ localVarQueryParameter['page'] = page;
4028
+ }
4029
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4030
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4031
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4032
+ return [2 /*return*/, {
4033
+ url: (0, common_1.toPathString)(localVarUrlObj),
4034
+ options: localVarRequestOptions,
4035
+ }];
4036
+ }
4037
+ });
4038
+ });
4039
+ },
2694
4040
  /**
2695
4041
  *
2696
4042
  * @summary Dar permissões a um usuário na API
@@ -2783,6 +4129,52 @@ var UserApiAxiosParamCreator = function (configuration) {
2783
4129
  });
2784
4130
  });
2785
4131
  },
4132
+ /**
4133
+ *
4134
+ * @summary Resetar senha do usuário na API
4135
+ * @param {UserResetPasswordRequest} [userResetPasswordRequest]
4136
+ * @param {*} [options] Override http request option.
4137
+ * @throws {RequiredError}
4138
+ */
4139
+ userResetPassword: function (userResetPasswordRequest_1) {
4140
+ var args_1 = [];
4141
+ for (var _i = 1; _i < arguments.length; _i++) {
4142
+ args_1[_i - 1] = arguments[_i];
4143
+ }
4144
+ return __awaiter(_this, __spreadArray([userResetPasswordRequest_1], args_1, true), void 0, function (userResetPasswordRequest, options) {
4145
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
4146
+ if (options === void 0) { options = {}; }
4147
+ return __generator(this, function (_a) {
4148
+ switch (_a.label) {
4149
+ case 0:
4150
+ localVarPath = "/v3/admin/user/resetpassword";
4151
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
4152
+ if (configuration) {
4153
+ baseOptions = configuration.baseOptions;
4154
+ }
4155
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
4156
+ localVarHeaderParameter = {};
4157
+ localVarQueryParameter = {};
4158
+ // authentication bearerAuth required
4159
+ // http bearer authentication required
4160
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
4161
+ case 1:
4162
+ // authentication bearerAuth required
4163
+ // http bearer authentication required
4164
+ _a.sent();
4165
+ localVarHeaderParameter['Content-Type'] = 'application/json';
4166
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
4167
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4168
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
4169
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(userResetPasswordRequest, localVarRequestOptions, configuration);
4170
+ return [2 /*return*/, {
4171
+ url: (0, common_1.toPathString)(localVarUrlObj),
4172
+ options: localVarRequestOptions,
4173
+ }];
4174
+ }
4175
+ });
4176
+ });
4177
+ },
2786
4178
  /**
2787
4179
  *
2788
4180
  * @summary Visualizar dados do usuário na API
@@ -2890,6 +4282,34 @@ exports.UserApiAxiosParamCreator = UserApiAxiosParamCreator;
2890
4282
  var UserApiFp = function (configuration) {
2891
4283
  var localVarAxiosParamCreator = (0, exports.UserApiAxiosParamCreator)(configuration);
2892
4284
  return {
4285
+ /**
4286
+ *
4287
+ * @summary Listar usuários da API
4288
+ * @param {string} [username] Filtrar por username (busca parcial)
4289
+ * @param {string} [email] Filtrar por email (busca parcial)
4290
+ * @param {string} [name] Filtrar por nome (busca parcial)
4291
+ * @param {string} [role] Filtrar por role exata
4292
+ * @param {string} [include] Incluir relacionamentos (separados por vírgula). Valores aceitos: permissions
4293
+ * @param {number} [page] Número da página para paginação
4294
+ * @param {*} [options] Override http request option.
4295
+ * @throws {RequiredError}
4296
+ */
4297
+ adminUsersList: function (username, email, name, role, include, page, options) {
4298
+ return __awaiter(this, void 0, void 0, function () {
4299
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
4300
+ var _a, _b, _c;
4301
+ return __generator(this, function (_d) {
4302
+ switch (_d.label) {
4303
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminUsersList(username, email, name, role, include, page, options)];
4304
+ case 1:
4305
+ localVarAxiosArgs = _d.sent();
4306
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4307
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UserApi.adminUsersList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4308
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
4309
+ }
4310
+ });
4311
+ });
4312
+ },
2893
4313
  /**
2894
4314
  *
2895
4315
  * @summary Dar permissões a um usuário na API
@@ -2936,6 +4356,29 @@ var UserApiFp = function (configuration) {
2936
4356
  });
2937
4357
  });
2938
4358
  },
4359
+ /**
4360
+ *
4361
+ * @summary Resetar senha do usuário na API
4362
+ * @param {UserResetPasswordRequest} [userResetPasswordRequest]
4363
+ * @param {*} [options] Override http request option.
4364
+ * @throws {RequiredError}
4365
+ */
4366
+ userResetPassword: function (userResetPasswordRequest, options) {
4367
+ return __awaiter(this, void 0, void 0, function () {
4368
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
4369
+ var _a, _b, _c;
4370
+ return __generator(this, function (_d) {
4371
+ switch (_d.label) {
4372
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.userResetPassword(userResetPasswordRequest, options)];
4373
+ case 1:
4374
+ localVarAxiosArgs = _d.sent();
4375
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
4376
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UserApi.userResetPassword']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
4377
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
4378
+ }
4379
+ });
4380
+ });
4381
+ },
2939
4382
  /**
2940
4383
  *
2941
4384
  * @summary Visualizar dados do usuário na API
@@ -2993,6 +4436,17 @@ exports.UserApiFp = UserApiFp;
2993
4436
  var UserApiFactory = function (configuration, basePath, axios) {
2994
4437
  var localVarFp = (0, exports.UserApiFp)(configuration);
2995
4438
  return {
4439
+ /**
4440
+ *
4441
+ * @summary Listar usuários da API
4442
+ * @param {UserApiAdminUsersListRequest} requestParameters Request parameters.
4443
+ * @param {*} [options] Override http request option.
4444
+ * @throws {RequiredError}
4445
+ */
4446
+ adminUsersList: function (requestParameters, options) {
4447
+ if (requestParameters === void 0) { requestParameters = {}; }
4448
+ return localVarFp.adminUsersList(requestParameters.username, requestParameters.email, requestParameters.name, requestParameters.role, requestParameters.include, requestParameters.page, options).then(function (request) { return request(axios, basePath); });
4449
+ },
2996
4450
  /**
2997
4451
  *
2998
4452
  * @summary Dar permissões a um usuário na API
@@ -3015,6 +4469,17 @@ var UserApiFactory = function (configuration, basePath, axios) {
3015
4469
  if (requestParameters === void 0) { requestParameters = {}; }
3016
4470
  return localVarFp.userRegister(requestParameters.userRegisterRequest, options).then(function (request) { return request(axios, basePath); });
3017
4471
  },
4472
+ /**
4473
+ *
4474
+ * @summary Resetar senha do usuário na API
4475
+ * @param {UserApiUserResetPasswordRequest} requestParameters Request parameters.
4476
+ * @param {*} [options] Override http request option.
4477
+ * @throws {RequiredError}
4478
+ */
4479
+ userResetPassword: function (requestParameters, options) {
4480
+ if (requestParameters === void 0) { requestParameters = {}; }
4481
+ return localVarFp.userResetPassword(requestParameters.userResetPasswordRequest, options).then(function (request) { return request(axios, basePath); });
4482
+ },
3018
4483
  /**
3019
4484
  *
3020
4485
  * @summary Visualizar dados do usuário na API
@@ -3049,6 +4514,19 @@ var UserApi = /** @class */ (function (_super) {
3049
4514
  function UserApi() {
3050
4515
  return _super !== null && _super.apply(this, arguments) || this;
3051
4516
  }
4517
+ /**
4518
+ *
4519
+ * @summary Listar usuários da API
4520
+ * @param {UserApiAdminUsersListRequest} requestParameters Request parameters.
4521
+ * @param {*} [options] Override http request option.
4522
+ * @throws {RequiredError}
4523
+ * @memberof UserApi
4524
+ */
4525
+ UserApi.prototype.adminUsersList = function (requestParameters, options) {
4526
+ var _this = this;
4527
+ if (requestParameters === void 0) { requestParameters = {}; }
4528
+ return (0, exports.UserApiFp)(this.configuration).adminUsersList(requestParameters.username, requestParameters.email, requestParameters.name, requestParameters.role, requestParameters.include, requestParameters.page, options).then(function (request) { return request(_this.axios, _this.basePath); });
4529
+ };
3052
4530
  /**
3053
4531
  *
3054
4532
  * @summary Dar permissões a um usuário na API
@@ -3075,6 +4553,19 @@ var UserApi = /** @class */ (function (_super) {
3075
4553
  if (requestParameters === void 0) { requestParameters = {}; }
3076
4554
  return (0, exports.UserApiFp)(this.configuration).userRegister(requestParameters.userRegisterRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
3077
4555
  };
4556
+ /**
4557
+ *
4558
+ * @summary Resetar senha do usuário na API
4559
+ * @param {UserApiUserResetPasswordRequest} requestParameters Request parameters.
4560
+ * @param {*} [options] Override http request option.
4561
+ * @throws {RequiredError}
4562
+ * @memberof UserApi
4563
+ */
4564
+ UserApi.prototype.userResetPassword = function (requestParameters, options) {
4565
+ var _this = this;
4566
+ if (requestParameters === void 0) { requestParameters = {}; }
4567
+ return (0, exports.UserApiFp)(this.configuration).userResetPassword(requestParameters.userResetPasswordRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
4568
+ };
3078
4569
  /**
3079
4570
  *
3080
4571
  * @summary Visualizar dados do usuário na API