@infrab4a/connect 3.4.0-beta.2 → 3.4.0-beta.4
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 +14 -100
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/esm2015/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.js +10 -33
- package/esm2015/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.js +3 -29
- package/esm2015/utils/index.js +6 -6
- package/fesm2015/infrab4a-connect.js +12 -59
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.d.ts +1 -4
- package/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.d.ts +1 -5
- package/package.json +1 -1
- package/utils/index.d.ts +5 -5
|
@@ -832,8 +832,6 @@
|
|
|
832
832
|
return Address;
|
|
833
833
|
}(BaseModel));
|
|
834
834
|
|
|
835
|
-
var isUUID = function (value) { return lodash.isString(value) && /[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}/.test(value); };
|
|
836
|
-
|
|
837
835
|
var Base = /** @class */ (function () {
|
|
838
836
|
function Base() {
|
|
839
837
|
var args = [];
|
|
@@ -845,6 +843,8 @@
|
|
|
845
843
|
return Base;
|
|
846
844
|
}());
|
|
847
845
|
|
|
846
|
+
var isUUID = function (value) { return lodash.isString(value) && /[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}/.test(value); };
|
|
847
|
+
|
|
848
848
|
var parseDateTime = function (value) {
|
|
849
849
|
if (!lodash.isString(value))
|
|
850
850
|
return value;
|
|
@@ -4110,6 +4110,7 @@
|
|
|
4110
4110
|
fields: [
|
|
4111
4111
|
'id',
|
|
4112
4112
|
'description',
|
|
4113
|
+
'slug',
|
|
4113
4114
|
'enabled',
|
|
4114
4115
|
{ createdAt: { columnName: 'created_at' } },
|
|
4115
4116
|
{ updatedAt: { columnName: 'updated_at' } },
|
|
@@ -4117,7 +4118,13 @@
|
|
|
4117
4118
|
options: {
|
|
4118
4119
|
columnName: 'options',
|
|
4119
4120
|
foreignKeyColumn: { filterId: 'id' },
|
|
4120
|
-
fields: [
|
|
4121
|
+
fields: [
|
|
4122
|
+
'id',
|
|
4123
|
+
{ filterId: { columnName: 'filter_id' } },
|
|
4124
|
+
'description',
|
|
4125
|
+
{ createdAt: { columnName: 'created_at' } },
|
|
4126
|
+
{ updatedAt: { columnName: 'updated_at' } },
|
|
4127
|
+
],
|
|
4121
4128
|
},
|
|
4122
4129
|
},
|
|
4123
4130
|
],
|
|
@@ -4125,56 +4132,6 @@
|
|
|
4125
4132
|
_this.filterOptionRepository = filterOptionRepository;
|
|
4126
4133
|
return _this;
|
|
4127
4134
|
}
|
|
4128
|
-
FilterHasuraGraphQLRepository.prototype.get = function (identifiers) {
|
|
4129
|
-
var _super = Object.create(null, {
|
|
4130
|
-
get: { get: function () { return _super_1.prototype.get; } }
|
|
4131
|
-
});
|
|
4132
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4133
|
-
var filter;
|
|
4134
|
-
return __generator(this, function (_a) {
|
|
4135
|
-
switch (_a.label) {
|
|
4136
|
-
case 0: return [4 /*yield*/, _super.get.call(this, identifiers)];
|
|
4137
|
-
case 1:
|
|
4138
|
-
filter = _a.sent();
|
|
4139
|
-
if (!filter)
|
|
4140
|
-
throw new NotFoundError('Filter not found');
|
|
4141
|
-
return [2 /*return*/, filter];
|
|
4142
|
-
}
|
|
4143
|
-
});
|
|
4144
|
-
});
|
|
4145
|
-
};
|
|
4146
|
-
FilterHasuraGraphQLRepository.prototype.find = function (options) {
|
|
4147
|
-
var _super = Object.create(null, {
|
|
4148
|
-
find: { get: function () { return _super_1.prototype.find; } }
|
|
4149
|
-
});
|
|
4150
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4151
|
-
var filter;
|
|
4152
|
-
return __generator(this, function (_a) {
|
|
4153
|
-
switch (_a.label) {
|
|
4154
|
-
case 0: return [4 /*yield*/, _super.find.call(this, options)];
|
|
4155
|
-
case 1:
|
|
4156
|
-
filter = _a.sent();
|
|
4157
|
-
return [2 /*return*/, filter];
|
|
4158
|
-
}
|
|
4159
|
-
});
|
|
4160
|
-
});
|
|
4161
|
-
};
|
|
4162
|
-
FilterHasuraGraphQLRepository.prototype.create = function (params) {
|
|
4163
|
-
var _super = Object.create(null, {
|
|
4164
|
-
create: { get: function () { return _super_1.prototype.create; } }
|
|
4165
|
-
});
|
|
4166
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4167
|
-
var filter;
|
|
4168
|
-
return __generator(this, function (_a) {
|
|
4169
|
-
switch (_a.label) {
|
|
4170
|
-
case 0: return [4 /*yield*/, _super.create.call(this, params)];
|
|
4171
|
-
case 1:
|
|
4172
|
-
filter = _a.sent();
|
|
4173
|
-
return [2 /*return*/, filter];
|
|
4174
|
-
}
|
|
4175
|
-
});
|
|
4176
|
-
});
|
|
4177
|
-
};
|
|
4178
4135
|
FilterHasuraGraphQLRepository.prototype.update = function (params) {
|
|
4179
4136
|
var _super = Object.create(null, {
|
|
4180
4137
|
update: { get: function () { return _super_1.prototype.update; } }
|
|
@@ -4250,11 +4207,11 @@
|
|
|
4250
4207
|
return FilterHasuraGraphQLRepository;
|
|
4251
4208
|
}(withCrudHasuraGraphQL(withHasuraGraphQL(Base))));
|
|
4252
4209
|
|
|
4253
|
-
var FilterOptionHasuraGraphQLRepository = /** @class */ (function (
|
|
4254
|
-
__extends(FilterOptionHasuraGraphQLRepository,
|
|
4210
|
+
var FilterOptionHasuraGraphQLRepository = /** @class */ (function (_super) {
|
|
4211
|
+
__extends(FilterOptionHasuraGraphQLRepository, _super);
|
|
4255
4212
|
function FilterOptionHasuraGraphQLRepository(endpoint, authOptions) {
|
|
4256
|
-
return
|
|
4257
|
-
tableName: '
|
|
4213
|
+
return _super.call(this, {
|
|
4214
|
+
tableName: 'filter_option',
|
|
4258
4215
|
model: FilterOption,
|
|
4259
4216
|
endpoint: endpoint,
|
|
4260
4217
|
authOptions: authOptions,
|
|
@@ -4267,45 +4224,6 @@
|
|
|
4267
4224
|
],
|
|
4268
4225
|
}) || this;
|
|
4269
4226
|
}
|
|
4270
|
-
FilterOptionHasuraGraphQLRepository.prototype.create = function (params) {
|
|
4271
|
-
return _super_1.prototype.create.call(this, params);
|
|
4272
|
-
};
|
|
4273
|
-
FilterOptionHasuraGraphQLRepository.prototype.find = function (options) {
|
|
4274
|
-
var _super = Object.create(null, {
|
|
4275
|
-
find: { get: function () { return _super_1.prototype.find; } }
|
|
4276
|
-
});
|
|
4277
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4278
|
-
var filterOptions;
|
|
4279
|
-
return __generator(this, function (_a) {
|
|
4280
|
-
switch (_a.label) {
|
|
4281
|
-
case 0: return [4 /*yield*/, _super.find.call(this, options)];
|
|
4282
|
-
case 1:
|
|
4283
|
-
filterOptions = _a.sent();
|
|
4284
|
-
return [2 /*return*/, filterOptions];
|
|
4285
|
-
}
|
|
4286
|
-
});
|
|
4287
|
-
});
|
|
4288
|
-
};
|
|
4289
|
-
FilterOptionHasuraGraphQLRepository.prototype.delete = function (identifiers) {
|
|
4290
|
-
return _super_1.prototype.delete.call(this, identifiers);
|
|
4291
|
-
};
|
|
4292
|
-
FilterOptionHasuraGraphQLRepository.prototype.findByFilter = function (filterId) {
|
|
4293
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4294
|
-
var options;
|
|
4295
|
-
return __generator(this, function (_a) {
|
|
4296
|
-
switch (_a.label) {
|
|
4297
|
-
case 0: return [4 /*yield*/, this.find({
|
|
4298
|
-
filters: {
|
|
4299
|
-
filterId: filterId,
|
|
4300
|
-
},
|
|
4301
|
-
})];
|
|
4302
|
-
case 1:
|
|
4303
|
-
options = _a.sent();
|
|
4304
|
-
return [2 /*return*/, options];
|
|
4305
|
-
}
|
|
4306
|
-
});
|
|
4307
|
-
});
|
|
4308
|
-
};
|
|
4309
4227
|
return FilterOptionHasuraGraphQLRepository;
|
|
4310
4228
|
}(withCrudHasuraGraphQL(withHasuraGraphQL(Base))));
|
|
4311
4229
|
|
|
@@ -5177,10 +5095,6 @@
|
|
|
5177
5095
|
enumerable: true,
|
|
5178
5096
|
get: function () { return lodash.chunk; }
|
|
5179
5097
|
});
|
|
5180
|
-
Object.defineProperty(exports, 'difference', {
|
|
5181
|
-
enumerable: true,
|
|
5182
|
-
get: function () { return lodash.difference; }
|
|
5183
|
-
});
|
|
5184
5098
|
Object.defineProperty(exports, 'isBoolean', {
|
|
5185
5099
|
enumerable: true,
|
|
5186
5100
|
get: function () { return lodash.isBoolean; }
|