@infrab4a/connect 3.14.3 → 3.15.0-beta.1
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 +148 -119
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/domain/catalog/models/category-filter.d.ts +0 -2
- package/domain/catalog/models/category.d.ts +0 -2
- package/domain/shop-settings/enums/index.d.ts +1 -0
- package/domain/shop-settings/enums/shop-page-name.enum.d.ts +19 -0
- package/domain/shop-settings/models/campaign-banner.d.ts +11 -0
- package/domain/shop-settings/models/campaign.d.ts +10 -0
- package/domain/shop-settings/models/index.d.ts +2 -0
- package/domain/shop-settings/models/shop-settings.d.ts +2 -1
- package/domain/shop-settings/models/types/campaign-page.d.ts +17 -0
- package/domain/shop-settings/models/types/index.d.ts +4 -0
- package/domain/shop-settings/models/types/sections.type.d.ts +17 -0
- package/domain/shop-settings/models/types/shop-gift.type.d.ts +8 -0
- package/domain/shop-settings/models/types/shop-post.type.d.ts +7 -0
- package/domain/shop-settings/models/types/shop-section.type.d.ts +3 -0
- package/domain/shop-settings/repositories/campaign-banner.repository.d.ts +4 -0
- package/domain/shop-settings/repositories/campaign.repository.d.ts +4 -0
- package/domain/shop-settings/repositories/index.d.ts +2 -0
- package/esm2015/domain/catalog/models/category-filter.js +1 -6
- package/esm2015/domain/catalog/models/category.js +1 -6
- package/esm2015/domain/shop-settings/enums/index.js +2 -1
- package/esm2015/domain/shop-settings/enums/shop-page-name.enum.js +21 -0
- package/esm2015/domain/shop-settings/models/campaign-banner.js +7 -0
- package/esm2015/domain/shop-settings/models/campaign.js +7 -0
- package/esm2015/domain/shop-settings/models/index.js +3 -1
- package/esm2015/domain/shop-settings/models/shop-settings.js +1 -1
- package/esm2015/domain/shop-settings/models/types/campaign-page.js +2 -0
- package/esm2015/domain/shop-settings/models/types/index.js +5 -1
- package/esm2015/domain/shop-settings/models/types/sections.type.js +2 -0
- package/esm2015/domain/shop-settings/models/types/shop-gift.type.js +2 -0
- package/esm2015/domain/shop-settings/models/types/shop-post.type.js +2 -0
- package/esm2015/domain/shop-settings/models/types/shop-section.type.js +1 -1
- package/esm2015/domain/shop-settings/repositories/campaign-banner.repository.js +2 -0
- package/esm2015/domain/shop-settings/repositories/campaign.repository.js +2 -0
- package/esm2015/domain/shop-settings/repositories/index.js +3 -1
- package/esm2015/infra/firebase/firestore/repositories/shop-settings/campaign-banner-firestore.repository.js +12 -0
- package/esm2015/infra/firebase/firestore/repositories/shop-settings/campaign-firestore.repository.js +12 -0
- package/esm2015/infra/firebase/firestore/repositories/shop-settings/index.js +3 -1
- package/esm2015/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.js +2 -2
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-filter-hasura-graphql.repository.js +1 -43
- package/fesm2015/infrab4a-connect.js +99 -98
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/infra/firebase/firestore/repositories/shop-settings/campaign-banner-firestore.repository.d.ts +8 -0
- package/infra/firebase/firestore/repositories/shop-settings/campaign-firestore.repository.d.ts +8 -0
- package/infra/firebase/firestore/repositories/shop-settings/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1823,74 +1823,6 @@
|
|
|
1823
1823
|
return Filter;
|
|
1824
1824
|
}(BaseModel));
|
|
1825
1825
|
|
|
1826
|
-
var KitProduct = /** @class */ (function (_super) {
|
|
1827
|
-
__extends(KitProduct, _super);
|
|
1828
|
-
function KitProduct() {
|
|
1829
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1830
|
-
}
|
|
1831
|
-
Object.defineProperty(KitProduct, "identifiersFields", {
|
|
1832
|
-
get: function () {
|
|
1833
|
-
return ['productId', 'kitProductId'];
|
|
1834
|
-
},
|
|
1835
|
-
enumerable: false,
|
|
1836
|
-
configurable: true
|
|
1837
|
-
});
|
|
1838
|
-
return KitProduct;
|
|
1839
|
-
}(BaseModel));
|
|
1840
|
-
__decorate([
|
|
1841
|
-
classTransformer.Type(function () { return Product; }),
|
|
1842
|
-
__metadata("design:type", Product)
|
|
1843
|
-
], KitProduct.prototype, "kit", void 0);
|
|
1844
|
-
__decorate([
|
|
1845
|
-
classTransformer.Type(function () { return Product; }),
|
|
1846
|
-
__metadata("design:type", Product)
|
|
1847
|
-
], KitProduct.prototype, "product", void 0);
|
|
1848
|
-
|
|
1849
|
-
var Product = /** @class */ (function (_super) {
|
|
1850
|
-
__extends(Product, _super);
|
|
1851
|
-
function Product() {
|
|
1852
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1853
|
-
}
|
|
1854
|
-
Object.defineProperty(Product.prototype, "evaluation", {
|
|
1855
|
-
get: function () {
|
|
1856
|
-
return {
|
|
1857
|
-
reviews: this.reviews,
|
|
1858
|
-
count: this.reviewsTotal,
|
|
1859
|
-
rating: this.rate,
|
|
1860
|
-
};
|
|
1861
|
-
},
|
|
1862
|
-
set: function (evaluation) {
|
|
1863
|
-
if (!evaluation) {
|
|
1864
|
-
this.reviews = null;
|
|
1865
|
-
this.reviewsTotal = null;
|
|
1866
|
-
this.rate = null;
|
|
1867
|
-
return;
|
|
1868
|
-
}
|
|
1869
|
-
this.reviews = evaluation.reviews || this.reviews;
|
|
1870
|
-
this.reviewsTotal = evaluation.count || this.reviewsTotal;
|
|
1871
|
-
this.rate = evaluation.rating || this.rate;
|
|
1872
|
-
},
|
|
1873
|
-
enumerable: false,
|
|
1874
|
-
configurable: true
|
|
1875
|
-
});
|
|
1876
|
-
Object.defineProperty(Product, "identifiersFields", {
|
|
1877
|
-
get: function () {
|
|
1878
|
-
return ['id'];
|
|
1879
|
-
},
|
|
1880
|
-
enumerable: false,
|
|
1881
|
-
configurable: true
|
|
1882
|
-
});
|
|
1883
|
-
return Product;
|
|
1884
|
-
}(BaseModel));
|
|
1885
|
-
__decorate([
|
|
1886
|
-
classTransformer.Type(function () { return Category; }),
|
|
1887
|
-
__metadata("design:type", Category)
|
|
1888
|
-
], Product.prototype, "category", void 0);
|
|
1889
|
-
__decorate([
|
|
1890
|
-
classTransformer.Type(function () { return KitProduct; }),
|
|
1891
|
-
__metadata("design:type", Array)
|
|
1892
|
-
], Product.prototype, "kitProducts", void 0);
|
|
1893
|
-
|
|
1894
1826
|
var Category = /** @class */ (function (_super) {
|
|
1895
1827
|
__extends(Category, _super);
|
|
1896
1828
|
function Category() {
|
|
@@ -1913,10 +1845,6 @@
|
|
|
1913
1845
|
classTransformer.Type(function () { return Filter; }),
|
|
1914
1846
|
__metadata("design:type", Array)
|
|
1915
1847
|
], Category.prototype, "filters", void 0);
|
|
1916
|
-
__decorate([
|
|
1917
|
-
classTransformer.Type(function () { return Product; }),
|
|
1918
|
-
__metadata("design:type", Array)
|
|
1919
|
-
], Category.prototype, "childrenProducts", void 0);
|
|
1920
1848
|
|
|
1921
1849
|
var CategoryCollectionChildren = /** @class */ (function (_super) {
|
|
1922
1850
|
__extends(CategoryCollectionChildren, _super);
|
|
@@ -1955,10 +1883,6 @@
|
|
|
1955
1883
|
classTransformer.Type(function () { return Filter; }),
|
|
1956
1884
|
__metadata("design:type", Filter)
|
|
1957
1885
|
], CategoryFilter.prototype, "filter", void 0);
|
|
1958
|
-
__decorate([
|
|
1959
|
-
classTransformer.Type(function () { return Category; }),
|
|
1960
|
-
__metadata("design:type", Category)
|
|
1961
|
-
], CategoryFilter.prototype, "category", void 0);
|
|
1962
1886
|
|
|
1963
1887
|
exports.GenderDestination = void 0;
|
|
1964
1888
|
(function (GenderDestination) {
|
|
@@ -1990,6 +1914,74 @@
|
|
|
1990
1914
|
return FilterOption;
|
|
1991
1915
|
}(BaseModel));
|
|
1992
1916
|
|
|
1917
|
+
var Product = /** @class */ (function (_super) {
|
|
1918
|
+
__extends(Product, _super);
|
|
1919
|
+
function Product() {
|
|
1920
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1921
|
+
}
|
|
1922
|
+
Object.defineProperty(Product.prototype, "evaluation", {
|
|
1923
|
+
get: function () {
|
|
1924
|
+
return {
|
|
1925
|
+
reviews: this.reviews,
|
|
1926
|
+
count: this.reviewsTotal,
|
|
1927
|
+
rating: this.rate,
|
|
1928
|
+
};
|
|
1929
|
+
},
|
|
1930
|
+
set: function (evaluation) {
|
|
1931
|
+
if (!evaluation) {
|
|
1932
|
+
this.reviews = null;
|
|
1933
|
+
this.reviewsTotal = null;
|
|
1934
|
+
this.rate = null;
|
|
1935
|
+
return;
|
|
1936
|
+
}
|
|
1937
|
+
this.reviews = evaluation.reviews || this.reviews;
|
|
1938
|
+
this.reviewsTotal = evaluation.count || this.reviewsTotal;
|
|
1939
|
+
this.rate = evaluation.rating || this.rate;
|
|
1940
|
+
},
|
|
1941
|
+
enumerable: false,
|
|
1942
|
+
configurable: true
|
|
1943
|
+
});
|
|
1944
|
+
Object.defineProperty(Product, "identifiersFields", {
|
|
1945
|
+
get: function () {
|
|
1946
|
+
return ['id'];
|
|
1947
|
+
},
|
|
1948
|
+
enumerable: false,
|
|
1949
|
+
configurable: true
|
|
1950
|
+
});
|
|
1951
|
+
return Product;
|
|
1952
|
+
}(BaseModel));
|
|
1953
|
+
__decorate([
|
|
1954
|
+
classTransformer.Type(function () { return Category; }),
|
|
1955
|
+
__metadata("design:type", Category)
|
|
1956
|
+
], Product.prototype, "category", void 0);
|
|
1957
|
+
__decorate([
|
|
1958
|
+
classTransformer.Type(function () { return KitProduct; }),
|
|
1959
|
+
__metadata("design:type", Array)
|
|
1960
|
+
], Product.prototype, "kitProducts", void 0);
|
|
1961
|
+
|
|
1962
|
+
var KitProduct = /** @class */ (function (_super) {
|
|
1963
|
+
__extends(KitProduct, _super);
|
|
1964
|
+
function KitProduct() {
|
|
1965
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1966
|
+
}
|
|
1967
|
+
Object.defineProperty(KitProduct, "identifiersFields", {
|
|
1968
|
+
get: function () {
|
|
1969
|
+
return ['productId', 'kitProductId'];
|
|
1970
|
+
},
|
|
1971
|
+
enumerable: false,
|
|
1972
|
+
configurable: true
|
|
1973
|
+
});
|
|
1974
|
+
return KitProduct;
|
|
1975
|
+
}(BaseModel));
|
|
1976
|
+
__decorate([
|
|
1977
|
+
classTransformer.Type(function () { return Product; }),
|
|
1978
|
+
__metadata("design:type", Product)
|
|
1979
|
+
], KitProduct.prototype, "kit", void 0);
|
|
1980
|
+
__decorate([
|
|
1981
|
+
classTransformer.Type(function () { return Product; }),
|
|
1982
|
+
__metadata("design:type", Product)
|
|
1983
|
+
], KitProduct.prototype, "product", void 0);
|
|
1984
|
+
|
|
1993
1985
|
var Variant = /** @class */ (function (_super) {
|
|
1994
1986
|
__extends(Variant, _super);
|
|
1995
1987
|
function Variant() {
|
|
@@ -2230,6 +2222,27 @@
|
|
|
2230
2222
|
QuestionsFilters["PRODUCT_SPENT"] = "Qual \u00E9 o seu nivel de gasto mensal em produtos de beleza e cuidados pessoais?";
|
|
2231
2223
|
})(exports.QuestionsFilters || (exports.QuestionsFilters = {}));
|
|
2232
2224
|
|
|
2225
|
+
exports.ShopPageName = void 0;
|
|
2226
|
+
(function (ShopPageName) {
|
|
2227
|
+
ShopPageName["LP_CLUB"] = "LP_CLUBE";
|
|
2228
|
+
ShopPageName["SUBSCRIBER_PANEL"] = "SUBSCRIBER_PANEL";
|
|
2229
|
+
ShopPageName["INVITE_FRIENDS"] = "INVITE_FRIENDS";
|
|
2230
|
+
ShopPageName["INVITE_AND_WIN"] = "INVITE_AND_WIN";
|
|
2231
|
+
ShopPageName["WIN_GLAMPOINTS"] = "WIN_GLAMPOINTS";
|
|
2232
|
+
ShopPageName["POSTS"] = "POSTS";
|
|
2233
|
+
ShopPageName["GLAMPOINTS_SHOWCASE"] = "GLAMPOINTS_SHOWCASE";
|
|
2234
|
+
ShopPageName["LP_EDITIONS"] = "LP_EDITIONS";
|
|
2235
|
+
ShopPageName["LP_GLAMBOX_EDITION"] = "LP_GLAMBOX_EDITION";
|
|
2236
|
+
ShopPageName["LP_GLAMBOX_PROMOTION"] = "LP_GLAMBOX_PROMOTION";
|
|
2237
|
+
ShopPageName["LP_GLAMBAG_PROMOTION"] = "LP_GLAMBAG_PROMOTION";
|
|
2238
|
+
ShopPageName["LP_GLAMPASS_PROMOTION"] = "LP_GLAMPASS_PROMOTION";
|
|
2239
|
+
ShopPageName["LP_SUBSCRIPTION_PROMOTION"] = "LP_SUBSCRIPTION_PROMOTION";
|
|
2240
|
+
ShopPageName["LP_GLAMPARTNER_PROMOTION"] = "LP_GLAMPARTNER_PROMOTION";
|
|
2241
|
+
ShopPageName["LP_GLAMQUEENS"] = "LP_GLAMQUEENS";
|
|
2242
|
+
ShopPageName["LP_INVITE"] = "LP_INVITE";
|
|
2243
|
+
ShopPageName["LP_LIVELO"] = "LP_LIVELO";
|
|
2244
|
+
})(exports.ShopPageName || (exports.ShopPageName = {}));
|
|
2245
|
+
|
|
2233
2246
|
var BeautyQuestionsHelper = /** @class */ (function () {
|
|
2234
2247
|
function BeautyQuestionsHelper() {
|
|
2235
2248
|
}
|
|
@@ -2277,6 +2290,36 @@
|
|
|
2277
2290
|
return BeautyQuestionsHelper;
|
|
2278
2291
|
}());
|
|
2279
2292
|
|
|
2293
|
+
var Campaign = /** @class */ (function (_super) {
|
|
2294
|
+
__extends(Campaign, _super);
|
|
2295
|
+
function Campaign() {
|
|
2296
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2297
|
+
}
|
|
2298
|
+
Object.defineProperty(Campaign, "identifiersFields", {
|
|
2299
|
+
get: function () {
|
|
2300
|
+
return ['id'];
|
|
2301
|
+
},
|
|
2302
|
+
enumerable: false,
|
|
2303
|
+
configurable: true
|
|
2304
|
+
});
|
|
2305
|
+
return Campaign;
|
|
2306
|
+
}(BaseModel));
|
|
2307
|
+
|
|
2308
|
+
var CampaignBanner = /** @class */ (function (_super) {
|
|
2309
|
+
__extends(CampaignBanner, _super);
|
|
2310
|
+
function CampaignBanner() {
|
|
2311
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2312
|
+
}
|
|
2313
|
+
Object.defineProperty(CampaignBanner, "identifiersFields", {
|
|
2314
|
+
get: function () {
|
|
2315
|
+
return ['id'];
|
|
2316
|
+
},
|
|
2317
|
+
enumerable: false,
|
|
2318
|
+
configurable: true
|
|
2319
|
+
});
|
|
2320
|
+
return CampaignBanner;
|
|
2321
|
+
}(BaseModel));
|
|
2322
|
+
|
|
2280
2323
|
var Home = /** @class */ (function (_super) {
|
|
2281
2324
|
__extends(Home, _super);
|
|
2282
2325
|
function Home() {
|
|
@@ -3640,6 +3683,30 @@
|
|
|
3640
3683
|
return SubscriptionPlanFirestoreRepository;
|
|
3641
3684
|
}(withCrudFirestore(withHelpers(withFirestore(Base)))));
|
|
3642
3685
|
|
|
3686
|
+
var CampaignBannerFirestoreRepository = /** @class */ (function (_super) {
|
|
3687
|
+
__extends(CampaignBannerFirestoreRepository, _super);
|
|
3688
|
+
function CampaignBannerFirestoreRepository(firestore) {
|
|
3689
|
+
var _this = _super.call(this) || this;
|
|
3690
|
+
_this.firestore = firestore;
|
|
3691
|
+
_this.collectionName = 'banners';
|
|
3692
|
+
_this.model = CampaignBanner;
|
|
3693
|
+
return _this;
|
|
3694
|
+
}
|
|
3695
|
+
return CampaignBannerFirestoreRepository;
|
|
3696
|
+
}(withCrudFirestore(withHelpers(withFirestore(Base)))));
|
|
3697
|
+
|
|
3698
|
+
var CampaignFirestoreRepository = /** @class */ (function (_super) {
|
|
3699
|
+
__extends(CampaignFirestoreRepository, _super);
|
|
3700
|
+
function CampaignFirestoreRepository(firestore) {
|
|
3701
|
+
var _this = _super.call(this) || this;
|
|
3702
|
+
_this.firestore = firestore;
|
|
3703
|
+
_this.collectionName = 'campaigns';
|
|
3704
|
+
_this.model = Campaign;
|
|
3705
|
+
return _this;
|
|
3706
|
+
}
|
|
3707
|
+
return CampaignFirestoreRepository;
|
|
3708
|
+
}(withCrudFirestore(withHelpers(withFirestore(Base)))));
|
|
3709
|
+
|
|
3643
3710
|
var HomeFirestoreRepository = /** @class */ (function (_super) {
|
|
3644
3711
|
__extends(HomeFirestoreRepository, _super);
|
|
3645
3712
|
function HomeFirestoreRepository(firestore) {
|
|
@@ -3946,7 +4013,7 @@
|
|
|
3946
4013
|
var fieldOptions = AttributeOptionHelper.FindByAttribute(key, (fieldSentenceOptions === null || fieldSentenceOptions === void 0 ? void 0 : fieldSentenceOptions.fields) || fields);
|
|
3947
4014
|
var columnName = fieldOptions.columnName;
|
|
3948
4015
|
var columnFields = fieldOptions.fields;
|
|
3949
|
-
return Object.assign(Object.assign({}, variables), (_a = {}, _a[columnName] = BindFilterQueryHelper.BuildWhereSentence(key, options[key],
|
|
4016
|
+
return Object.assign(Object.assign({}, variables), (_a = {}, _a[columnName] = BindFilterQueryHelper.BuildWhereSentence(key, options[key], columnFields || []), _a));
|
|
3950
4017
|
}, {});
|
|
3951
4018
|
if (!Array.isArray(options) && !lodash.isNil(fieldSentenceOptions.fields))
|
|
3952
4019
|
return _a = {},
|
|
@@ -4710,48 +4777,6 @@
|
|
|
4710
4777
|
],
|
|
4711
4778
|
},
|
|
4712
4779
|
},
|
|
4713
|
-
{
|
|
4714
|
-
category: {
|
|
4715
|
-
columnName: 'category',
|
|
4716
|
-
foreignKeyColumn: { id: 'categoryId' },
|
|
4717
|
-
fields: [
|
|
4718
|
-
'id',
|
|
4719
|
-
'description',
|
|
4720
|
-
{
|
|
4721
|
-
products: {
|
|
4722
|
-
columnName: 'products',
|
|
4723
|
-
fields: ['product_id'],
|
|
4724
|
-
from: function (value) { return value.map(function (product) { return product.product_id.toString(); }); },
|
|
4725
|
-
to: function (productIds) { return productIds.map(function (productId) { return ({
|
|
4726
|
-
product_id: +productId,
|
|
4727
|
-
}); }); },
|
|
4728
|
-
},
|
|
4729
|
-
},
|
|
4730
|
-
{
|
|
4731
|
-
childrenProducts: {
|
|
4732
|
-
columnName: 'children_products',
|
|
4733
|
-
foreignKeyColumn: { category_id: 'id' },
|
|
4734
|
-
fields: [
|
|
4735
|
-
'id',
|
|
4736
|
-
'name',
|
|
4737
|
-
'slug',
|
|
4738
|
-
{
|
|
4739
|
-
categories: {
|
|
4740
|
-
columnName: 'categories',
|
|
4741
|
-
fields: ['category_id'],
|
|
4742
|
-
bindPersistData: function (value) { return ({
|
|
4743
|
-
categories: { data: value.map(function (category) { return ({ category_id: +category }); }) },
|
|
4744
|
-
}); },
|
|
4745
|
-
to: function (categories) { return categories.map(function (categoryId) { return +categoryId; }); },
|
|
4746
|
-
from: function (categories) { return (categories === null || categories === void 0 ? void 0 : categories.map(function (category) { var _a; return (_a = category === null || category === void 0 ? void 0 : category.category_id) === null || _a === void 0 ? void 0 : _a.toString(); })) || []; },
|
|
4747
|
-
},
|
|
4748
|
-
},
|
|
4749
|
-
],
|
|
4750
|
-
},
|
|
4751
|
-
},
|
|
4752
|
-
],
|
|
4753
|
-
},
|
|
4754
|
-
},
|
|
4755
4780
|
],
|
|
4756
4781
|
}) || this;
|
|
4757
4782
|
}
|
|
@@ -6541,8 +6566,12 @@
|
|
|
6541
6566
|
exports.BeautyQuestionsHelper = BeautyQuestionsHelper;
|
|
6542
6567
|
exports.Buy2Win = Buy2Win;
|
|
6543
6568
|
exports.Buy2WinFirestoreRepository = Buy2WinFirestoreRepository;
|
|
6569
|
+
exports.Campaign = Campaign;
|
|
6570
|
+
exports.CampaignBanner = CampaignBanner;
|
|
6571
|
+
exports.CampaignBannerFirestoreRepository = CampaignBannerFirestoreRepository;
|
|
6544
6572
|
exports.CampaignDashboard = CampaignDashboard;
|
|
6545
6573
|
exports.CampaignDashboardFirestoreRepository = CampaignDashboardFirestoreRepository;
|
|
6574
|
+
exports.CampaignFirestoreRepository = CampaignFirestoreRepository;
|
|
6546
6575
|
exports.CampaignHashtag = CampaignHashtag;
|
|
6547
6576
|
exports.CampaignHashtagFirestoreRepository = CampaignHashtagFirestoreRepository;
|
|
6548
6577
|
exports.Category = Category;
|