@infrab4a/connect 3.4.0-beta.5 → 3.4.0-beta.7
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/bundles/infrab4a-connect.umd.js +41 -14
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/domain/catalog/models/category-filter.d.ts +8 -0
- package/domain/catalog/models/category.d.ts +3 -2
- package/domain/catalog/models/filter-option.d.ts +1 -1
- package/domain/catalog/models/index.d.ts +1 -0
- package/domain/catalog/models/types/index.d.ts +0 -1
- package/esm2015/domain/catalog/models/category-filter.js +10 -0
- package/esm2015/domain/catalog/models/category.js +1 -1
- package/esm2015/domain/catalog/models/filter-option.js +1 -1
- package/esm2015/domain/catalog/models/index.js +2 -1
- package/esm2015/domain/catalog/models/types/index.js +1 -2
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.js +5 -1
- package/esm2015/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.js +9 -8
- package/fesm2015/infrab4a-connect.js +22 -8
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/package.json +1 -1
- package/domain/catalog/models/types/category-filter.type.d.ts +0 -4
- package/esm2015/domain/catalog/models/types/category-filter.type.js +0 -2
|
@@ -1270,6 +1270,24 @@
|
|
|
1270
1270
|
return Category;
|
|
1271
1271
|
}(BaseModel));
|
|
1272
1272
|
|
|
1273
|
+
var CategoryFilter = /** @class */ (function (_super) {
|
|
1274
|
+
__extends(CategoryFilter, _super);
|
|
1275
|
+
function CategoryFilter() {
|
|
1276
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1277
|
+
}
|
|
1278
|
+
CategoryFilter.prototype.identifierFields = function () {
|
|
1279
|
+
return ['id'];
|
|
1280
|
+
};
|
|
1281
|
+
Object.defineProperty(CategoryFilter, "identifiersFields", {
|
|
1282
|
+
get: function () {
|
|
1283
|
+
return ['id'];
|
|
1284
|
+
},
|
|
1285
|
+
enumerable: false,
|
|
1286
|
+
configurable: true
|
|
1287
|
+
});
|
|
1288
|
+
return CategoryFilter;
|
|
1289
|
+
}(BaseModel));
|
|
1290
|
+
|
|
1273
1291
|
exports.GenderDestination = void 0;
|
|
1274
1292
|
(function (GenderDestination) {
|
|
1275
1293
|
GenderDestination["FEMALE"] = "female";
|
|
@@ -3775,6 +3793,10 @@
|
|
|
3775
3793
|
},
|
|
3776
3794
|
},
|
|
3777
3795
|
'filters',
|
|
3796
|
+
// {
|
|
3797
|
+
// filters: {
|
|
3798
|
+
// }
|
|
3799
|
+
// },
|
|
3778
3800
|
{ createdAt: { columnName: 'created_at' } },
|
|
3779
3801
|
{ updatedAt: { columnName: 'updated_at' } },
|
|
3780
3802
|
{
|
|
@@ -4157,7 +4179,7 @@
|
|
|
4157
4179
|
FilterHasuraGraphQLRepository.prototype.updateOptions = function (filterId, _a) {
|
|
4158
4180
|
var options = _a.options;
|
|
4159
4181
|
return __awaiter(this, void 0, void 0, function () {
|
|
4160
|
-
var i, filterOptions, i, hasFilter, newOption;
|
|
4182
|
+
var i, filterOptions, i, hasFilter, error_1, newOption;
|
|
4161
4183
|
return __generator(this, function (_a) {
|
|
4162
4184
|
switch (_a.label) {
|
|
4163
4185
|
case 0:
|
|
@@ -4177,29 +4199,33 @@
|
|
|
4177
4199
|
return [3 /*break*/, 1];
|
|
4178
4200
|
case 4: return [2 /*return*/, []];
|
|
4179
4201
|
case 5:
|
|
4180
|
-
if (!('action' in options && options.action === '
|
|
4202
|
+
if (!('action' in options && options.action === 'merge')) return [3 /*break*/, 13];
|
|
4181
4203
|
filterOptions = [];
|
|
4182
4204
|
i = 0;
|
|
4183
4205
|
_a.label = 6;
|
|
4184
4206
|
case 6:
|
|
4185
|
-
if (!(i < options.value.length)) return [3 /*break*/,
|
|
4186
|
-
|
|
4207
|
+
if (!(i < options.value.length)) return [3 /*break*/, 12];
|
|
4208
|
+
_a.label = 7;
|
|
4187
4209
|
case 7:
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
return [4 /*yield*/, this.filterOptionRepository.create(options.value[i])];
|
|
4210
|
+
_a.trys.push([7, 9, , 11]);
|
|
4211
|
+
return [4 /*yield*/, this.filterOptionRepository.get({ id: options.value[i].id })];
|
|
4191
4212
|
case 8:
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4213
|
+
hasFilter = _a.sent();
|
|
4214
|
+
if (hasFilter)
|
|
4215
|
+
filterOptions.push(hasFilter);
|
|
4216
|
+
return [3 /*break*/, 11];
|
|
4195
4217
|
case 9:
|
|
4196
|
-
|
|
4197
|
-
|
|
4218
|
+
error_1 = _a.sent();
|
|
4219
|
+
return [4 /*yield*/, this.filterOptionRepository.create(Object.assign(Object.assign({}, options.value[i]), { filterId: filterId }))];
|
|
4198
4220
|
case 10:
|
|
4221
|
+
newOption = _a.sent();
|
|
4222
|
+
filterOptions.push(newOption);
|
|
4223
|
+
return [3 /*break*/, 11];
|
|
4224
|
+
case 11:
|
|
4199
4225
|
i++;
|
|
4200
4226
|
return [3 /*break*/, 6];
|
|
4201
|
-
case
|
|
4202
|
-
case
|
|
4227
|
+
case 12: return [2 /*return*/, filterOptions];
|
|
4228
|
+
case 13: return [2 /*return*/];
|
|
4203
4229
|
}
|
|
4204
4230
|
});
|
|
4205
4231
|
});
|
|
@@ -5158,6 +5184,7 @@
|
|
|
5158
5184
|
exports.Buy2Win = Buy2Win;
|
|
5159
5185
|
exports.Buy2WinFirestoreRepository = Buy2WinFirestoreRepository;
|
|
5160
5186
|
exports.Category = Category;
|
|
5187
|
+
exports.CategoryFilter = CategoryFilter;
|
|
5161
5188
|
exports.CategoryFirestoreRepository = CategoryFirestoreRepository;
|
|
5162
5189
|
exports.CategoryHasuraGraphQL = CategoryHasuraGraphQL;
|
|
5163
5190
|
exports.CategoryHasuraGraphQLRepository = CategoryHasuraGraphQLRepository;
|