@infrab4a/connect 4.0.0-beta.15 → 4.0.0-beta.17
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 +4 -1
- 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 +12 -5
- package/fesm2015/infrab4a-connect.mjs.map +1 -1
- package/fesm2020/infrab4a-connect.mjs +13 -7
- 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,6 +1307,9 @@ 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)));
|
|
1310
1313
|
const instance = this.model.toInstance(this.model.identifiersFields.reduce((acc, field) => ({ ...acc, [field]: identifiers[field] }), {}));
|
|
1311
1314
|
const intercepted = await this.interceptors?.request?.({ instance });
|
|
1312
1315
|
const builded = intercepted?.instance || instance;
|
|
@@ -2443,11 +2446,14 @@ const withHasuraGraphQL = (MixinBase) => {
|
|
|
2443
2446
|
get headers() {
|
|
2444
2447
|
return {
|
|
2445
2448
|
'Content-Type': 'application/json',
|
|
2446
|
-
...(isNil(this.authOptions
|
|
2447
|
-
...(isNil(this.authOptions
|
|
2448
|
-
...(isNil(this.authOptions
|
|
2449
|
+
...(isNil(this.authOptions?.authToken) ? {} : { Authorization: this.authOptions?.authToken }),
|
|
2450
|
+
...(isNil(this.authOptions?.adminSecret) ? {} : { 'X-Hasura-Admin-Secret': this.authOptions?.adminSecret }),
|
|
2451
|
+
...(isNil(this.authOptions?.authRole)
|
|
2449
2452
|
? {}
|
|
2450
|
-
: {
|
|
2453
|
+
: {
|
|
2454
|
+
'X-Hasura-Role': this.authOptions.authRole.role,
|
|
2455
|
+
'X-Hasura-User-Id': this.authOptions?.authRole?.userId,
|
|
2456
|
+
}),
|
|
2451
2457
|
};
|
|
2452
2458
|
}
|
|
2453
2459
|
async mutation(operation, fields, variables) {
|
|
@@ -2695,7 +2701,7 @@ class VariantHasuraGraphQL extends Variant {
|
|
|
2695
2701
|
}
|
|
2696
2702
|
|
|
2697
2703
|
class CategoryFilterHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
2698
|
-
constructor(endpoint, authOptions) {
|
|
2704
|
+
constructor({ endpoint, authOptions, interceptors, }) {
|
|
2699
2705
|
super({
|
|
2700
2706
|
tableName: 'category_filter',
|
|
2701
2707
|
model: CategoryFilter,
|
|
@@ -3047,7 +3053,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
3047
3053
|
}
|
|
3048
3054
|
|
|
3049
3055
|
class FilterHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
3050
|
-
constructor(endpoint, authOptions, filterOptionRepository, categoryFilterRepository) {
|
|
3056
|
+
constructor({ endpoint, authOptions, interceptors, }, filterOptionRepository, categoryFilterRepository) {
|
|
3051
3057
|
super({
|
|
3052
3058
|
tableName: 'filter',
|
|
3053
3059
|
model: Filter,
|
|
@@ -3148,7 +3154,7 @@ class FilterHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGrap
|
|
|
3148
3154
|
}
|
|
3149
3155
|
|
|
3150
3156
|
class FilterOptionHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
3151
|
-
constructor(endpoint, authOptions) {
|
|
3157
|
+
constructor({ endpoint, authOptions, interceptors, }) {
|
|
3152
3158
|
super({
|
|
3153
3159
|
tableName: 'filter_option',
|
|
3154
3160
|
model: FilterOption,
|