@handsondigital/idplugger-admin 2.6.2 → 2.7.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.
package/dist/api.js CHANGED
@@ -84,13 +84,53 @@ 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.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.CustomerServiceApi = exports.CustomerServiceApiFactory = exports.CustomerServiceApiFp = exports.CustomerServiceApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.ApiLogsApi = exports.ApiLogsApiFactory = exports.ApiLogsApiFp = exports.ApiLogsApiAxiosParamCreator = exports.PromotionStartRequestPermissionsEnum = exports.PromotionStart200ResponseUserPermissionsEnum = void 0;
87
+ 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.CustomerServiceApi = exports.CustomerServiceApiFactory = exports.CustomerServiceApiFp = exports.CustomerServiceApiAxiosParamCreator = exports.AdminPromotionConfigsIndexTypeEnum = exports.ConfigsApi = exports.ConfigsApiFactory = exports.ConfigsApiFp = exports.ConfigsApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.ApiLogsApi = exports.ApiLogsApiFactory = exports.ApiLogsApiFp = exports.ApiLogsApiAxiosParamCreator = exports.PromotionStartRequestPermissionsEnum = exports.PromotionStart200ResponseUserPermissionsEnum = exports.AdminPromotionConfigsUpdateRequestTypeEnum = exports.AdminPromotionConfigsStoreRequestTypeEnum = exports.AdminPromotionConfigsIndex200ResponseConfigsInnerTypeEnum = void 0;
88
+ exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.StepsApi = exports.StepsApiFactory = exports.StepsApiFp = exports.StepsApiAxiosParamCreator = void 0;
88
89
  var axios_1 = require("axios");
89
90
  // Some imports not used depending on template conditions
90
91
  // @ts-ignore
91
92
  var common_1 = require("./common");
92
93
  // @ts-ignore
93
94
  var base_1 = require("./base");
95
+ exports.AdminPromotionConfigsIndex200ResponseConfigsInnerTypeEnum = {
96
+ Text: 'text',
97
+ Uuid: 'uuid',
98
+ Html: 'html',
99
+ Url: 'url',
100
+ PathUrl: 'path_url',
101
+ Integer: 'integer',
102
+ Double: 'double',
103
+ File: 'file',
104
+ Json: 'json',
105
+ Date: 'date',
106
+ Datetime: 'datetime'
107
+ };
108
+ exports.AdminPromotionConfigsStoreRequestTypeEnum = {
109
+ Text: 'text',
110
+ Uuid: 'uuid',
111
+ Html: 'html',
112
+ Url: 'url',
113
+ PathUrl: 'path_url',
114
+ Integer: 'integer',
115
+ Double: 'double',
116
+ File: 'file',
117
+ Json: 'json',
118
+ Date: 'date',
119
+ Datetime: 'datetime'
120
+ };
121
+ exports.AdminPromotionConfigsUpdateRequestTypeEnum = {
122
+ Text: 'text',
123
+ Uuid: 'uuid',
124
+ Html: 'html',
125
+ Url: 'url',
126
+ PathUrl: 'path_url',
127
+ Integer: 'integer',
128
+ Double: 'double',
129
+ File: 'file',
130
+ Json: 'json',
131
+ Date: 'date',
132
+ Datetime: 'datetime'
133
+ };
94
134
  exports.PromotionStart200ResponseUserPermissionsEnum = {
95
135
  PromotionUsersIndex: 'promotion.users.index',
96
136
  PromotionUsersCreate: 'promotion.users.create',
@@ -891,6 +931,666 @@ var AuthApi = /** @class */ (function (_super) {
891
931
  return AuthApi;
892
932
  }(base_1.BaseAPI));
893
933
  exports.AuthApi = AuthApi;
934
+ /**
935
+ * ConfigsApi - axios parameter creator
936
+ * @export
937
+ */
938
+ var ConfigsApiAxiosParamCreator = function (configuration) {
939
+ var _this = this;
940
+ return {
941
+ /**
942
+ *
943
+ * @summary Listar configurações de uma promoção
944
+ * @param {string} promotionId UUID da promoção
945
+ * @param {string} [key] Filtrar por chave (busca parcial)
946
+ * @param {string} [grupo] Filtrar por grupo
947
+ * @param {AdminPromotionConfigsIndexTypeEnum} [type] Filtrar por tipo
948
+ * @param {number} [perPage] Itens por página
949
+ * @param {*} [options] Override http request option.
950
+ * @throws {RequiredError}
951
+ */
952
+ adminPromotionConfigsIndex: function (promotionId_1, key_1, grupo_1, type_1, perPage_1) {
953
+ var args_1 = [];
954
+ for (var _i = 5; _i < arguments.length; _i++) {
955
+ args_1[_i - 5] = arguments[_i];
956
+ }
957
+ return __awaiter(_this, __spreadArray([promotionId_1, key_1, grupo_1, type_1, perPage_1], args_1, true), void 0, function (promotionId, key, grupo, type, perPage, options) {
958
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
959
+ if (options === void 0) { options = {}; }
960
+ return __generator(this, function (_a) {
961
+ switch (_a.label) {
962
+ case 0:
963
+ // verify required parameter 'promotionId' is not null or undefined
964
+ (0, common_1.assertParamExists)('adminPromotionConfigsIndex', 'promotionId', promotionId);
965
+ localVarPath = "/v3/admin/promotion/{promotion_id}/configs"
966
+ .replace("{".concat("promotion_id", "}"), encodeURIComponent(String(promotionId)));
967
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
968
+ if (configuration) {
969
+ baseOptions = configuration.baseOptions;
970
+ }
971
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
972
+ localVarHeaderParameter = {};
973
+ localVarQueryParameter = {};
974
+ // authentication bearerAuth required
975
+ // http bearer authentication required
976
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
977
+ case 1:
978
+ // authentication bearerAuth required
979
+ // http bearer authentication required
980
+ _a.sent();
981
+ if (key !== undefined) {
982
+ localVarQueryParameter['key'] = key;
983
+ }
984
+ if (grupo !== undefined) {
985
+ localVarQueryParameter['grupo'] = grupo;
986
+ }
987
+ if (type !== undefined) {
988
+ localVarQueryParameter['type'] = type;
989
+ }
990
+ if (perPage !== undefined) {
991
+ localVarQueryParameter['_per_page'] = perPage;
992
+ }
993
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
994
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
995
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
996
+ return [2 /*return*/, {
997
+ url: (0, common_1.toPathString)(localVarUrlObj),
998
+ options: localVarRequestOptions,
999
+ }];
1000
+ }
1001
+ });
1002
+ });
1003
+ },
1004
+ /**
1005
+ *
1006
+ * @summary Buscar configuração por chave
1007
+ * @param {string} promotionId UUID da promoção
1008
+ * @param {string} key Chave da configuração
1009
+ * @param {*} [options] Override http request option.
1010
+ * @throws {RequiredError}
1011
+ */
1012
+ adminPromotionConfigsShow: function (promotionId_1, key_1) {
1013
+ var args_1 = [];
1014
+ for (var _i = 2; _i < arguments.length; _i++) {
1015
+ args_1[_i - 2] = arguments[_i];
1016
+ }
1017
+ return __awaiter(_this, __spreadArray([promotionId_1, key_1], args_1, true), void 0, function (promotionId, key, options) {
1018
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1019
+ if (options === void 0) { options = {}; }
1020
+ return __generator(this, function (_a) {
1021
+ switch (_a.label) {
1022
+ case 0:
1023
+ // verify required parameter 'promotionId' is not null or undefined
1024
+ (0, common_1.assertParamExists)('adminPromotionConfigsShow', 'promotionId', promotionId);
1025
+ // verify required parameter 'key' is not null or undefined
1026
+ (0, common_1.assertParamExists)('adminPromotionConfigsShow', 'key', key);
1027
+ localVarPath = "/v3/admin/promotion/{promotion_id}/configs/{key}"
1028
+ .replace("{".concat("promotion_id", "}"), encodeURIComponent(String(promotionId)))
1029
+ .replace("{".concat("key", "}"), encodeURIComponent(String(key)));
1030
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1031
+ if (configuration) {
1032
+ baseOptions = configuration.baseOptions;
1033
+ }
1034
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1035
+ localVarHeaderParameter = {};
1036
+ localVarQueryParameter = {};
1037
+ // authentication bearerAuth required
1038
+ // http bearer authentication required
1039
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1040
+ case 1:
1041
+ // authentication bearerAuth required
1042
+ // http bearer authentication required
1043
+ _a.sent();
1044
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1045
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1046
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1047
+ return [2 /*return*/, {
1048
+ url: (0, common_1.toPathString)(localVarUrlObj),
1049
+ options: localVarRequestOptions,
1050
+ }];
1051
+ }
1052
+ });
1053
+ });
1054
+ },
1055
+ /**
1056
+ *
1057
+ * @summary Criar nova configuração
1058
+ * @param {string} promotionId UUID da promoção
1059
+ * @param {AdminPromotionConfigsStoreRequest} adminPromotionConfigsStoreRequest
1060
+ * @param {*} [options] Override http request option.
1061
+ * @throws {RequiredError}
1062
+ */
1063
+ adminPromotionConfigsStore: function (promotionId_1, adminPromotionConfigsStoreRequest_1) {
1064
+ var args_1 = [];
1065
+ for (var _i = 2; _i < arguments.length; _i++) {
1066
+ args_1[_i - 2] = arguments[_i];
1067
+ }
1068
+ return __awaiter(_this, __spreadArray([promotionId_1, adminPromotionConfigsStoreRequest_1], args_1, true), void 0, function (promotionId, adminPromotionConfigsStoreRequest, options) {
1069
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1070
+ if (options === void 0) { options = {}; }
1071
+ return __generator(this, function (_a) {
1072
+ switch (_a.label) {
1073
+ case 0:
1074
+ // verify required parameter 'promotionId' is not null or undefined
1075
+ (0, common_1.assertParamExists)('adminPromotionConfigsStore', 'promotionId', promotionId);
1076
+ // verify required parameter 'adminPromotionConfigsStoreRequest' is not null or undefined
1077
+ (0, common_1.assertParamExists)('adminPromotionConfigsStore', 'adminPromotionConfigsStoreRequest', adminPromotionConfigsStoreRequest);
1078
+ localVarPath = "/v3/admin/promotion/{promotion_id}/configs"
1079
+ .replace("{".concat("promotion_id", "}"), encodeURIComponent(String(promotionId)));
1080
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1081
+ if (configuration) {
1082
+ baseOptions = configuration.baseOptions;
1083
+ }
1084
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1085
+ localVarHeaderParameter = {};
1086
+ localVarQueryParameter = {};
1087
+ // authentication bearerAuth required
1088
+ // http bearer authentication required
1089
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1090
+ case 1:
1091
+ // authentication bearerAuth required
1092
+ // http bearer authentication required
1093
+ _a.sent();
1094
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1095
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1096
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1097
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1098
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adminPromotionConfigsStoreRequest, localVarRequestOptions, configuration);
1099
+ return [2 /*return*/, {
1100
+ url: (0, common_1.toPathString)(localVarUrlObj),
1101
+ options: localVarRequestOptions,
1102
+ }];
1103
+ }
1104
+ });
1105
+ });
1106
+ },
1107
+ /**
1108
+ *
1109
+ * @summary Atualizar configuração por chave
1110
+ * @param {string} promotionId UUID da promoção
1111
+ * @param {string} key Chave da configuração
1112
+ * @param {AdminPromotionConfigsUpdateRequest} adminPromotionConfigsUpdateRequest
1113
+ * @param {*} [options] Override http request option.
1114
+ * @throws {RequiredError}
1115
+ */
1116
+ adminPromotionConfigsUpdate: function (promotionId_1, key_1, adminPromotionConfigsUpdateRequest_1) {
1117
+ var args_1 = [];
1118
+ for (var _i = 3; _i < arguments.length; _i++) {
1119
+ args_1[_i - 3] = arguments[_i];
1120
+ }
1121
+ return __awaiter(_this, __spreadArray([promotionId_1, key_1, adminPromotionConfigsUpdateRequest_1], args_1, true), void 0, function (promotionId, key, adminPromotionConfigsUpdateRequest, options) {
1122
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1123
+ if (options === void 0) { options = {}; }
1124
+ return __generator(this, function (_a) {
1125
+ switch (_a.label) {
1126
+ case 0:
1127
+ // verify required parameter 'promotionId' is not null or undefined
1128
+ (0, common_1.assertParamExists)('adminPromotionConfigsUpdate', 'promotionId', promotionId);
1129
+ // verify required parameter 'key' is not null or undefined
1130
+ (0, common_1.assertParamExists)('adminPromotionConfigsUpdate', 'key', key);
1131
+ // verify required parameter 'adminPromotionConfigsUpdateRequest' is not null or undefined
1132
+ (0, common_1.assertParamExists)('adminPromotionConfigsUpdate', 'adminPromotionConfigsUpdateRequest', adminPromotionConfigsUpdateRequest);
1133
+ localVarPath = "/v3/admin/promotion/{promotion_id}/configs/{key}"
1134
+ .replace("{".concat("promotion_id", "}"), encodeURIComponent(String(promotionId)))
1135
+ .replace("{".concat("key", "}"), encodeURIComponent(String(key)));
1136
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1137
+ if (configuration) {
1138
+ baseOptions = configuration.baseOptions;
1139
+ }
1140
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
1141
+ localVarHeaderParameter = {};
1142
+ localVarQueryParameter = {};
1143
+ // authentication bearerAuth required
1144
+ // http bearer authentication required
1145
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1146
+ case 1:
1147
+ // authentication bearerAuth required
1148
+ // http bearer authentication required
1149
+ _a.sent();
1150
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1151
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1152
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1153
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1154
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adminPromotionConfigsUpdateRequest, localVarRequestOptions, configuration);
1155
+ return [2 /*return*/, {
1156
+ url: (0, common_1.toPathString)(localVarUrlObj),
1157
+ options: localVarRequestOptions,
1158
+ }];
1159
+ }
1160
+ });
1161
+ });
1162
+ },
1163
+ /**
1164
+ *
1165
+ * @summary Criar ou atualizar configuração por chave (upsert)
1166
+ * @param {string} promotionId UUID da promoção
1167
+ * @param {AdminPromotionConfigsStoreRequest} adminPromotionConfigsStoreRequest
1168
+ * @param {*} [options] Override http request option.
1169
+ * @throws {RequiredError}
1170
+ */
1171
+ adminPromotionConfigsUpsert: function (promotionId_1, adminPromotionConfigsStoreRequest_1) {
1172
+ var args_1 = [];
1173
+ for (var _i = 2; _i < arguments.length; _i++) {
1174
+ args_1[_i - 2] = arguments[_i];
1175
+ }
1176
+ return __awaiter(_this, __spreadArray([promotionId_1, adminPromotionConfigsStoreRequest_1], args_1, true), void 0, function (promotionId, adminPromotionConfigsStoreRequest, options) {
1177
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1178
+ if (options === void 0) { options = {}; }
1179
+ return __generator(this, function (_a) {
1180
+ switch (_a.label) {
1181
+ case 0:
1182
+ // verify required parameter 'promotionId' is not null or undefined
1183
+ (0, common_1.assertParamExists)('adminPromotionConfigsUpsert', 'promotionId', promotionId);
1184
+ // verify required parameter 'adminPromotionConfigsStoreRequest' is not null or undefined
1185
+ (0, common_1.assertParamExists)('adminPromotionConfigsUpsert', 'adminPromotionConfigsStoreRequest', adminPromotionConfigsStoreRequest);
1186
+ localVarPath = "/v3/admin/promotion/{promotion_id}/configs/upsert"
1187
+ .replace("{".concat("promotion_id", "}"), encodeURIComponent(String(promotionId)));
1188
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1189
+ if (configuration) {
1190
+ baseOptions = configuration.baseOptions;
1191
+ }
1192
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1193
+ localVarHeaderParameter = {};
1194
+ localVarQueryParameter = {};
1195
+ // authentication bearerAuth required
1196
+ // http bearer authentication required
1197
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1198
+ case 1:
1199
+ // authentication bearerAuth required
1200
+ // http bearer authentication required
1201
+ _a.sent();
1202
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1203
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1204
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1205
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1206
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adminPromotionConfigsStoreRequest, localVarRequestOptions, configuration);
1207
+ return [2 /*return*/, {
1208
+ url: (0, common_1.toPathString)(localVarUrlObj),
1209
+ options: localVarRequestOptions,
1210
+ }];
1211
+ }
1212
+ });
1213
+ });
1214
+ },
1215
+ /**
1216
+ *
1217
+ * @summary Listar chaves válidas do ConfigKeyEnum
1218
+ * @param {string} promotionId UUID da promoção
1219
+ * @param {*} [options] Override http request option.
1220
+ * @throws {RequiredError}
1221
+ */
1222
+ adminPromotionConfigsValidKeys: function (promotionId_1) {
1223
+ var args_1 = [];
1224
+ for (var _i = 1; _i < arguments.length; _i++) {
1225
+ args_1[_i - 1] = arguments[_i];
1226
+ }
1227
+ return __awaiter(_this, __spreadArray([promotionId_1], args_1, true), void 0, function (promotionId, options) {
1228
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1229
+ if (options === void 0) { options = {}; }
1230
+ return __generator(this, function (_a) {
1231
+ switch (_a.label) {
1232
+ case 0:
1233
+ // verify required parameter 'promotionId' is not null or undefined
1234
+ (0, common_1.assertParamExists)('adminPromotionConfigsValidKeys', 'promotionId', promotionId);
1235
+ localVarPath = "/v3/admin/promotion/{promotion_id}/configs/valid-keys"
1236
+ .replace("{".concat("promotion_id", "}"), encodeURIComponent(String(promotionId)));
1237
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1238
+ if (configuration) {
1239
+ baseOptions = configuration.baseOptions;
1240
+ }
1241
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1242
+ localVarHeaderParameter = {};
1243
+ localVarQueryParameter = {};
1244
+ // authentication bearerAuth required
1245
+ // http bearer authentication required
1246
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1247
+ case 1:
1248
+ // authentication bearerAuth required
1249
+ // http bearer authentication required
1250
+ _a.sent();
1251
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1252
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1253
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1254
+ return [2 /*return*/, {
1255
+ url: (0, common_1.toPathString)(localVarUrlObj),
1256
+ options: localVarRequestOptions,
1257
+ }];
1258
+ }
1259
+ });
1260
+ });
1261
+ },
1262
+ };
1263
+ };
1264
+ exports.ConfigsApiAxiosParamCreator = ConfigsApiAxiosParamCreator;
1265
+ /**
1266
+ * ConfigsApi - functional programming interface
1267
+ * @export
1268
+ */
1269
+ var ConfigsApiFp = function (configuration) {
1270
+ var localVarAxiosParamCreator = (0, exports.ConfigsApiAxiosParamCreator)(configuration);
1271
+ return {
1272
+ /**
1273
+ *
1274
+ * @summary Listar configurações de uma promoção
1275
+ * @param {string} promotionId UUID da promoção
1276
+ * @param {string} [key] Filtrar por chave (busca parcial)
1277
+ * @param {string} [grupo] Filtrar por grupo
1278
+ * @param {AdminPromotionConfigsIndexTypeEnum} [type] Filtrar por tipo
1279
+ * @param {number} [perPage] Itens por página
1280
+ * @param {*} [options] Override http request option.
1281
+ * @throws {RequiredError}
1282
+ */
1283
+ adminPromotionConfigsIndex: function (promotionId, key, grupo, type, perPage, options) {
1284
+ return __awaiter(this, void 0, void 0, function () {
1285
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1286
+ var _a, _b, _c;
1287
+ return __generator(this, function (_d) {
1288
+ switch (_d.label) {
1289
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPromotionConfigsIndex(promotionId, key, grupo, type, perPage, options)];
1290
+ case 1:
1291
+ localVarAxiosArgs = _d.sent();
1292
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1293
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConfigsApi.adminPromotionConfigsIndex']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1294
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1295
+ }
1296
+ });
1297
+ });
1298
+ },
1299
+ /**
1300
+ *
1301
+ * @summary Buscar configuração por chave
1302
+ * @param {string} promotionId UUID da promoção
1303
+ * @param {string} key Chave da configuração
1304
+ * @param {*} [options] Override http request option.
1305
+ * @throws {RequiredError}
1306
+ */
1307
+ adminPromotionConfigsShow: function (promotionId, key, options) {
1308
+ return __awaiter(this, void 0, void 0, function () {
1309
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1310
+ var _a, _b, _c;
1311
+ return __generator(this, function (_d) {
1312
+ switch (_d.label) {
1313
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPromotionConfigsShow(promotionId, key, options)];
1314
+ case 1:
1315
+ localVarAxiosArgs = _d.sent();
1316
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1317
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConfigsApi.adminPromotionConfigsShow']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1318
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1319
+ }
1320
+ });
1321
+ });
1322
+ },
1323
+ /**
1324
+ *
1325
+ * @summary Criar nova configuração
1326
+ * @param {string} promotionId UUID da promoção
1327
+ * @param {AdminPromotionConfigsStoreRequest} adminPromotionConfigsStoreRequest
1328
+ * @param {*} [options] Override http request option.
1329
+ * @throws {RequiredError}
1330
+ */
1331
+ adminPromotionConfigsStore: function (promotionId, adminPromotionConfigsStoreRequest, options) {
1332
+ return __awaiter(this, void 0, void 0, function () {
1333
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1334
+ var _a, _b, _c;
1335
+ return __generator(this, function (_d) {
1336
+ switch (_d.label) {
1337
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPromotionConfigsStore(promotionId, adminPromotionConfigsStoreRequest, options)];
1338
+ case 1:
1339
+ localVarAxiosArgs = _d.sent();
1340
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1341
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConfigsApi.adminPromotionConfigsStore']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1342
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1343
+ }
1344
+ });
1345
+ });
1346
+ },
1347
+ /**
1348
+ *
1349
+ * @summary Atualizar configuração por chave
1350
+ * @param {string} promotionId UUID da promoção
1351
+ * @param {string} key Chave da configuração
1352
+ * @param {AdminPromotionConfigsUpdateRequest} adminPromotionConfigsUpdateRequest
1353
+ * @param {*} [options] Override http request option.
1354
+ * @throws {RequiredError}
1355
+ */
1356
+ adminPromotionConfigsUpdate: function (promotionId, key, adminPromotionConfigsUpdateRequest, options) {
1357
+ return __awaiter(this, void 0, void 0, function () {
1358
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1359
+ var _a, _b, _c;
1360
+ return __generator(this, function (_d) {
1361
+ switch (_d.label) {
1362
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPromotionConfigsUpdate(promotionId, key, adminPromotionConfigsUpdateRequest, options)];
1363
+ case 1:
1364
+ localVarAxiosArgs = _d.sent();
1365
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1366
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConfigsApi.adminPromotionConfigsUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1367
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1368
+ }
1369
+ });
1370
+ });
1371
+ },
1372
+ /**
1373
+ *
1374
+ * @summary Criar ou atualizar configuração por chave (upsert)
1375
+ * @param {string} promotionId UUID da promoção
1376
+ * @param {AdminPromotionConfigsStoreRequest} adminPromotionConfigsStoreRequest
1377
+ * @param {*} [options] Override http request option.
1378
+ * @throws {RequiredError}
1379
+ */
1380
+ adminPromotionConfigsUpsert: function (promotionId, adminPromotionConfigsStoreRequest, options) {
1381
+ return __awaiter(this, void 0, void 0, function () {
1382
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1383
+ var _a, _b, _c;
1384
+ return __generator(this, function (_d) {
1385
+ switch (_d.label) {
1386
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPromotionConfigsUpsert(promotionId, adminPromotionConfigsStoreRequest, options)];
1387
+ case 1:
1388
+ localVarAxiosArgs = _d.sent();
1389
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1390
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConfigsApi.adminPromotionConfigsUpsert']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1391
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1392
+ }
1393
+ });
1394
+ });
1395
+ },
1396
+ /**
1397
+ *
1398
+ * @summary Listar chaves válidas do ConfigKeyEnum
1399
+ * @param {string} promotionId UUID da promoção
1400
+ * @param {*} [options] Override http request option.
1401
+ * @throws {RequiredError}
1402
+ */
1403
+ adminPromotionConfigsValidKeys: function (promotionId, options) {
1404
+ return __awaiter(this, void 0, void 0, function () {
1405
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1406
+ var _a, _b, _c;
1407
+ return __generator(this, function (_d) {
1408
+ switch (_d.label) {
1409
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.adminPromotionConfigsValidKeys(promotionId, options)];
1410
+ case 1:
1411
+ localVarAxiosArgs = _d.sent();
1412
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1413
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ConfigsApi.adminPromotionConfigsValidKeys']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1414
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1415
+ }
1416
+ });
1417
+ });
1418
+ },
1419
+ };
1420
+ };
1421
+ exports.ConfigsApiFp = ConfigsApiFp;
1422
+ /**
1423
+ * ConfigsApi - factory interface
1424
+ * @export
1425
+ */
1426
+ var ConfigsApiFactory = function (configuration, basePath, axios) {
1427
+ var localVarFp = (0, exports.ConfigsApiFp)(configuration);
1428
+ return {
1429
+ /**
1430
+ *
1431
+ * @summary Listar configurações de uma promoção
1432
+ * @param {ConfigsApiAdminPromotionConfigsIndexRequest} requestParameters Request parameters.
1433
+ * @param {*} [options] Override http request option.
1434
+ * @throws {RequiredError}
1435
+ */
1436
+ adminPromotionConfigsIndex: function (requestParameters, options) {
1437
+ return localVarFp.adminPromotionConfigsIndex(requestParameters.promotionId, requestParameters.key, requestParameters.grupo, requestParameters.type, requestParameters.perPage, options).then(function (request) { return request(axios, basePath); });
1438
+ },
1439
+ /**
1440
+ *
1441
+ * @summary Buscar configuração por chave
1442
+ * @param {ConfigsApiAdminPromotionConfigsShowRequest} requestParameters Request parameters.
1443
+ * @param {*} [options] Override http request option.
1444
+ * @throws {RequiredError}
1445
+ */
1446
+ adminPromotionConfigsShow: function (requestParameters, options) {
1447
+ return localVarFp.adminPromotionConfigsShow(requestParameters.promotionId, requestParameters.key, options).then(function (request) { return request(axios, basePath); });
1448
+ },
1449
+ /**
1450
+ *
1451
+ * @summary Criar nova configuração
1452
+ * @param {ConfigsApiAdminPromotionConfigsStoreRequest} requestParameters Request parameters.
1453
+ * @param {*} [options] Override http request option.
1454
+ * @throws {RequiredError}
1455
+ */
1456
+ adminPromotionConfigsStore: function (requestParameters, options) {
1457
+ return localVarFp.adminPromotionConfigsStore(requestParameters.promotionId, requestParameters.adminPromotionConfigsStoreRequest, options).then(function (request) { return request(axios, basePath); });
1458
+ },
1459
+ /**
1460
+ *
1461
+ * @summary Atualizar configuração por chave
1462
+ * @param {ConfigsApiAdminPromotionConfigsUpdateRequest} requestParameters Request parameters.
1463
+ * @param {*} [options] Override http request option.
1464
+ * @throws {RequiredError}
1465
+ */
1466
+ adminPromotionConfigsUpdate: function (requestParameters, options) {
1467
+ return localVarFp.adminPromotionConfigsUpdate(requestParameters.promotionId, requestParameters.key, requestParameters.adminPromotionConfigsUpdateRequest, options).then(function (request) { return request(axios, basePath); });
1468
+ },
1469
+ /**
1470
+ *
1471
+ * @summary Criar ou atualizar configuração por chave (upsert)
1472
+ * @param {ConfigsApiAdminPromotionConfigsUpsertRequest} requestParameters Request parameters.
1473
+ * @param {*} [options] Override http request option.
1474
+ * @throws {RequiredError}
1475
+ */
1476
+ adminPromotionConfigsUpsert: function (requestParameters, options) {
1477
+ return localVarFp.adminPromotionConfigsUpsert(requestParameters.promotionId, requestParameters.adminPromotionConfigsStoreRequest, options).then(function (request) { return request(axios, basePath); });
1478
+ },
1479
+ /**
1480
+ *
1481
+ * @summary Listar chaves válidas do ConfigKeyEnum
1482
+ * @param {ConfigsApiAdminPromotionConfigsValidKeysRequest} requestParameters Request parameters.
1483
+ * @param {*} [options] Override http request option.
1484
+ * @throws {RequiredError}
1485
+ */
1486
+ adminPromotionConfigsValidKeys: function (requestParameters, options) {
1487
+ return localVarFp.adminPromotionConfigsValidKeys(requestParameters.promotionId, options).then(function (request) { return request(axios, basePath); });
1488
+ },
1489
+ };
1490
+ };
1491
+ exports.ConfigsApiFactory = ConfigsApiFactory;
1492
+ /**
1493
+ * ConfigsApi - object-oriented interface
1494
+ * @export
1495
+ * @class ConfigsApi
1496
+ * @extends {BaseAPI}
1497
+ */
1498
+ var ConfigsApi = /** @class */ (function (_super) {
1499
+ __extends(ConfigsApi, _super);
1500
+ function ConfigsApi() {
1501
+ return _super !== null && _super.apply(this, arguments) || this;
1502
+ }
1503
+ /**
1504
+ *
1505
+ * @summary Listar configurações de uma promoção
1506
+ * @param {ConfigsApiAdminPromotionConfigsIndexRequest} requestParameters Request parameters.
1507
+ * @param {*} [options] Override http request option.
1508
+ * @throws {RequiredError}
1509
+ * @memberof ConfigsApi
1510
+ */
1511
+ ConfigsApi.prototype.adminPromotionConfigsIndex = function (requestParameters, options) {
1512
+ var _this = this;
1513
+ return (0, exports.ConfigsApiFp)(this.configuration).adminPromotionConfigsIndex(requestParameters.promotionId, requestParameters.key, requestParameters.grupo, requestParameters.type, requestParameters.perPage, options).then(function (request) { return request(_this.axios, _this.basePath); });
1514
+ };
1515
+ /**
1516
+ *
1517
+ * @summary Buscar configuração por chave
1518
+ * @param {ConfigsApiAdminPromotionConfigsShowRequest} requestParameters Request parameters.
1519
+ * @param {*} [options] Override http request option.
1520
+ * @throws {RequiredError}
1521
+ * @memberof ConfigsApi
1522
+ */
1523
+ ConfigsApi.prototype.adminPromotionConfigsShow = function (requestParameters, options) {
1524
+ var _this = this;
1525
+ return (0, exports.ConfigsApiFp)(this.configuration).adminPromotionConfigsShow(requestParameters.promotionId, requestParameters.key, options).then(function (request) { return request(_this.axios, _this.basePath); });
1526
+ };
1527
+ /**
1528
+ *
1529
+ * @summary Criar nova configuração
1530
+ * @param {ConfigsApiAdminPromotionConfigsStoreRequest} requestParameters Request parameters.
1531
+ * @param {*} [options] Override http request option.
1532
+ * @throws {RequiredError}
1533
+ * @memberof ConfigsApi
1534
+ */
1535
+ ConfigsApi.prototype.adminPromotionConfigsStore = function (requestParameters, options) {
1536
+ var _this = this;
1537
+ return (0, exports.ConfigsApiFp)(this.configuration).adminPromotionConfigsStore(requestParameters.promotionId, requestParameters.adminPromotionConfigsStoreRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
1538
+ };
1539
+ /**
1540
+ *
1541
+ * @summary Atualizar configuração por chave
1542
+ * @param {ConfigsApiAdminPromotionConfigsUpdateRequest} requestParameters Request parameters.
1543
+ * @param {*} [options] Override http request option.
1544
+ * @throws {RequiredError}
1545
+ * @memberof ConfigsApi
1546
+ */
1547
+ ConfigsApi.prototype.adminPromotionConfigsUpdate = function (requestParameters, options) {
1548
+ var _this = this;
1549
+ return (0, exports.ConfigsApiFp)(this.configuration).adminPromotionConfigsUpdate(requestParameters.promotionId, requestParameters.key, requestParameters.adminPromotionConfigsUpdateRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
1550
+ };
1551
+ /**
1552
+ *
1553
+ * @summary Criar ou atualizar configuração por chave (upsert)
1554
+ * @param {ConfigsApiAdminPromotionConfigsUpsertRequest} requestParameters Request parameters.
1555
+ * @param {*} [options] Override http request option.
1556
+ * @throws {RequiredError}
1557
+ * @memberof ConfigsApi
1558
+ */
1559
+ ConfigsApi.prototype.adminPromotionConfigsUpsert = function (requestParameters, options) {
1560
+ var _this = this;
1561
+ return (0, exports.ConfigsApiFp)(this.configuration).adminPromotionConfigsUpsert(requestParameters.promotionId, requestParameters.adminPromotionConfigsStoreRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
1562
+ };
1563
+ /**
1564
+ *
1565
+ * @summary Listar chaves válidas do ConfigKeyEnum
1566
+ * @param {ConfigsApiAdminPromotionConfigsValidKeysRequest} requestParameters Request parameters.
1567
+ * @param {*} [options] Override http request option.
1568
+ * @throws {RequiredError}
1569
+ * @memberof ConfigsApi
1570
+ */
1571
+ ConfigsApi.prototype.adminPromotionConfigsValidKeys = function (requestParameters, options) {
1572
+ var _this = this;
1573
+ return (0, exports.ConfigsApiFp)(this.configuration).adminPromotionConfigsValidKeys(requestParameters.promotionId, options).then(function (request) { return request(_this.axios, _this.basePath); });
1574
+ };
1575
+ return ConfigsApi;
1576
+ }(base_1.BaseAPI));
1577
+ exports.ConfigsApi = ConfigsApi;
1578
+ /**
1579
+ * @export
1580
+ */
1581
+ exports.AdminPromotionConfigsIndexTypeEnum = {
1582
+ Text: 'text',
1583
+ Uuid: 'uuid',
1584
+ Html: 'html',
1585
+ Url: 'url',
1586
+ PathUrl: 'path_url',
1587
+ Integer: 'integer',
1588
+ Double: 'double',
1589
+ File: 'file',
1590
+ Json: 'json',
1591
+ Date: 'date',
1592
+ Datetime: 'datetime'
1593
+ };
894
1594
  /**
895
1595
  * CustomerServiceApi - axios parameter creator
896
1596
  * @export