@infrab4a/connect 4.0.0-beta.18 → 4.0.0-beta.19
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/esm2020/infra/firebase/firestore/mixins/with-get-firestore.mixin.mjs +1 -4
- package/esm2020/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.mjs +8 -5
- package/esm2020/infra/hasura-graphql/repositories/catalog/category-filter-hasura-graphql.repository.mjs +2 -2
- package/esm2020/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.mjs +2 -2
- package/esm2020/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.mjs +2 -2
- package/fesm2015/infrab4a-connect.mjs +9 -8
- package/fesm2015/infrab4a-connect.mjs.map +1 -1
- package/fesm2020/infrab4a-connect.mjs +10 -10
- package/fesm2020/infrab4a-connect.mjs.map +1 -1
- package/infra/hasura-graphql/repositories/catalog/category-filter-hasura-graphql.repository.d.ts +4 -4
- package/infra/hasura-graphql/repositories/catalog/filter-hasura-graphql.repository.d.ts +4 -4
- package/infra/hasura-graphql/repositories/catalog/filter-option-hasura-graphql.repository.d.ts +4 -4
- package/package.json +1 -1
|
@@ -1307,9 +1307,6 @@ const withHelpers = (MixinBase) => {
|
|
|
1307
1307
|
const withGetFirestore = (MixinBase) => {
|
|
1308
1308
|
return class GetFirestore extends MixinBase {
|
|
1309
1309
|
async get(identifiers) {
|
|
1310
|
-
console.log(this.buildCollectionPathForGet(identifiers));
|
|
1311
|
-
console.log(this.firestore);
|
|
1312
|
-
console.log(this.collection(this.buildCollectionPathForGet(identifiers)));
|
|
1313
1310
|
const instance = this.model.toInstance(this.model.identifiersFields.reduce((acc, field) => ({ ...acc, [field]: identifiers[field] }), {}));
|
|
1314
1311
|
const intercepted = await this.interceptors?.request?.({ instance });
|
|
1315
1312
|
const builded = intercepted?.instance || instance;
|
|
@@ -2446,11 +2443,14 @@ const withHasuraGraphQL = (MixinBase) => {
|
|
|
2446
2443
|
get headers() {
|
|
2447
2444
|
return {
|
|
2448
2445
|
'Content-Type': 'application/json',
|
|
2449
|
-
...(isNil(this.authOptions
|
|
2450
|
-
...(isNil(this.authOptions
|
|
2451
|
-
...(isNil(this.authOptions
|
|
2446
|
+
...(isNil(this.authOptions?.authToken) ? {} : { Authorization: this.authOptions?.authToken }),
|
|
2447
|
+
...(isNil(this.authOptions?.adminSecret) ? {} : { 'X-Hasura-Admin-Secret': this.authOptions?.adminSecret }),
|
|
2448
|
+
...(isNil(this.authOptions?.authRole)
|
|
2452
2449
|
? {}
|
|
2453
|
-
: {
|
|
2450
|
+
: {
|
|
2451
|
+
'X-Hasura-Role': this.authOptions.authRole.role,
|
|
2452
|
+
'X-Hasura-User-Id': this.authOptions?.authRole?.userId,
|
|
2453
|
+
}),
|
|
2454
2454
|
};
|
|
2455
2455
|
}
|
|
2456
2456
|
async mutation(operation, fields, variables) {
|
|
@@ -2698,7 +2698,7 @@ class VariantHasuraGraphQL extends Variant {
|
|
|
2698
2698
|
}
|
|
2699
2699
|
|
|
2700
2700
|
class CategoryFilterHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
2701
|
-
constructor(endpoint, authOptions) {
|
|
2701
|
+
constructor({ endpoint, authOptions, interceptors, }) {
|
|
2702
2702
|
super({
|
|
2703
2703
|
tableName: 'category_filter',
|
|
2704
2704
|
model: CategoryFilter,
|
|
@@ -3050,7 +3050,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
3050
3050
|
}
|
|
3051
3051
|
|
|
3052
3052
|
class FilterHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
3053
|
-
constructor(endpoint, authOptions, filterOptionRepository, categoryFilterRepository) {
|
|
3053
|
+
constructor({ endpoint, authOptions, interceptors, }, filterOptionRepository, categoryFilterRepository) {
|
|
3054
3054
|
super({
|
|
3055
3055
|
tableName: 'filter',
|
|
3056
3056
|
model: Filter,
|
|
@@ -3151,7 +3151,7 @@ class FilterHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGrap
|
|
|
3151
3151
|
}
|
|
3152
3152
|
|
|
3153
3153
|
class FilterOptionHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
3154
|
-
constructor(endpoint, authOptions) {
|
|
3154
|
+
constructor({ endpoint, authOptions, interceptors, }) {
|
|
3155
3155
|
super({
|
|
3156
3156
|
tableName: 'filter_option',
|
|
3157
3157
|
model: FilterOption,
|