@infrab4a/connect 5.8.4 → 5.8.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/index.cjs.js +236 -51
- package/index.esm.js +219 -52
- package/package.json +1 -1
- package/src/domain/shopping/helpers/campaign-settings.helper.d.ts +15 -0
- package/src/domain/shopping/helpers/index.d.ts +1 -0
- package/src/domain/shopping/models/campaign-hashtag-posts.d.ts +40 -0
- package/src/domain/shopping/models/campaign-hashtag.d.ts +17 -10
- package/src/domain/shopping/models/campaign-settings.d.ts +11 -0
- package/src/domain/shopping/models/enums/campaign-glampoints-status.enum.d.ts +6 -0
- package/src/domain/shopping/models/enums/campaign-hashtag-posts-status.enum.d.ts +5 -0
- package/src/domain/shopping/models/enums/campaign-home-sort-mode.enum.d.ts +4 -0
- package/src/domain/shopping/models/enums/campaign-llm-model.enum.d.ts +7 -0
- package/src/domain/shopping/models/enums/campaign-social-network.enum.d.ts +5 -0
- package/src/domain/shopping/models/enums/index.d.ts +5 -0
- package/src/domain/shopping/models/index.d.ts +3 -0
- package/src/domain/shopping/models/pending-order.d.ts +21 -0
- package/src/domain/shopping/models/types/campaign-settings.type.d.ts +13 -0
- package/src/domain/shopping/models/types/index.d.ts +1 -0
- package/src/domain/shopping/repositories/campaign-hashtag-posts.repository.d.ts +4 -0
- package/src/domain/shopping/repositories/campaign-settings.repository.d.ts +4 -0
- package/src/domain/shopping/repositories/index.d.ts +3 -0
- package/src/domain/shopping/repositories/pending-order.repository.d.ts +4 -0
- package/src/infra/firebase/firestore/repositories/shopping/campaign-hashtag-posts-firestore.repository.d.ts +8 -0
- package/src/infra/firebase/firestore/repositories/shopping/campaign-settings-firestore.repository.d.ts +8 -0
- package/src/infra/firebase/firestore/repositories/shopping/index.d.ts +3 -0
- package/src/infra/firebase/firestore/repositories/shopping/pending-order-firestore.repository.d.ts +7 -0
package/index.cjs.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('reflect-metadata');
|
|
6
|
-
var tslib = require('tslib');
|
|
7
6
|
var classTransformer = require('class-transformer');
|
|
7
|
+
var tslib = require('tslib');
|
|
8
8
|
var dateFns = require('date-fns');
|
|
9
9
|
var dateFnsTz = require('date-fns-tz');
|
|
10
10
|
var lodash = require('lodash');
|
|
@@ -274,6 +274,137 @@ function resolveAntifraudVolumeLimits(antifraude) {
|
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
+
class BaseModel {
|
|
278
|
+
get identifier() {
|
|
279
|
+
const fields = this.constructor.identifiersFields.filter((field) => field !== 'identifier');
|
|
280
|
+
const data = this;
|
|
281
|
+
return fields.reduce((object, field) => ({ ...object, [field]: data[field] }), {});
|
|
282
|
+
}
|
|
283
|
+
get identifiersFields() {
|
|
284
|
+
return this.constructor.identifiersFields;
|
|
285
|
+
}
|
|
286
|
+
constructor(args) {
|
|
287
|
+
Object.assign(this, args);
|
|
288
|
+
}
|
|
289
|
+
static toInstance(data) {
|
|
290
|
+
return classTransformer.plainToInstance(this, data || {});
|
|
291
|
+
}
|
|
292
|
+
static isModel(value) {
|
|
293
|
+
return value instanceof this;
|
|
294
|
+
}
|
|
295
|
+
toPlain() {
|
|
296
|
+
return classTransformer.instanceToPlain(this);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
exports.Where = void 0;
|
|
301
|
+
(function (Where) {
|
|
302
|
+
Where["EQUALS"] = "==";
|
|
303
|
+
Where["NOTEQUALS"] = "!=";
|
|
304
|
+
Where["GT"] = ">";
|
|
305
|
+
Where["GTE"] = ">=";
|
|
306
|
+
Where["IN"] = "in";
|
|
307
|
+
Where["NOTIN"] = "not in";
|
|
308
|
+
Where["LT"] = "<";
|
|
309
|
+
Where["LTE"] = "<=";
|
|
310
|
+
Where["LIKE"] = "like";
|
|
311
|
+
Where["NOTLIKE"] = "not like";
|
|
312
|
+
Where["ISNULL"] = "is null";
|
|
313
|
+
Where["ISNOTNULL"] = "is not null";
|
|
314
|
+
Where["IREGEX"] = "iregex";
|
|
315
|
+
})(exports.Where || (exports.Where = {}));
|
|
316
|
+
|
|
317
|
+
exports.UpdateOptionActions = void 0;
|
|
318
|
+
(function (UpdateOptionActions) {
|
|
319
|
+
UpdateOptionActions["UPDATE"] = "update";
|
|
320
|
+
UpdateOptionActions["MERGE"] = "merge";
|
|
321
|
+
UpdateOptionActions["REMOVE"] = "remove";
|
|
322
|
+
UpdateOptionActions["REMOVE_FIELD"] = "removeField";
|
|
323
|
+
UpdateOptionActions["NULL"] = "null";
|
|
324
|
+
})(exports.UpdateOptionActions || (exports.UpdateOptionActions = {}));
|
|
325
|
+
|
|
326
|
+
class CampaignSettings extends BaseModel {
|
|
327
|
+
static get identifiersFields() {
|
|
328
|
+
return ['id'];
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
exports.CampaignHomeSortMode = void 0;
|
|
333
|
+
(function (CampaignHomeSortMode) {
|
|
334
|
+
CampaignHomeSortMode["AUTOMATIC"] = "automatic";
|
|
335
|
+
CampaignHomeSortMode["MANUAL"] = "manual";
|
|
336
|
+
})(exports.CampaignHomeSortMode || (exports.CampaignHomeSortMode = {}));
|
|
337
|
+
|
|
338
|
+
exports.CampaignLlmModel = void 0;
|
|
339
|
+
(function (CampaignLlmModel) {
|
|
340
|
+
CampaignLlmModel["GROK"] = "grok";
|
|
341
|
+
CampaignLlmModel["KIMI"] = "kimi";
|
|
342
|
+
CampaignLlmModel["GLM"] = "glm";
|
|
343
|
+
CampaignLlmModel["GEMINI"] = "gemini";
|
|
344
|
+
CampaignLlmModel["ANTHROPIC"] = "anthropic";
|
|
345
|
+
})(exports.CampaignLlmModel || (exports.CampaignLlmModel = {}));
|
|
346
|
+
|
|
347
|
+
const CAMPAIGN_SETTINGS_DOCUMENT_ID = 'glam';
|
|
348
|
+
const DEFAULT_CAMPAIGN_GLAMPOINTS_AMOUNT = 15;
|
|
349
|
+
const MIN_CAMPAIGN_AI_MODELS = 2;
|
|
350
|
+
const DEFAULT_CAMPAIGN_AI_MODEL_ORDER = [
|
|
351
|
+
exports.CampaignLlmModel.GROK,
|
|
352
|
+
exports.CampaignLlmModel.GEMINI,
|
|
353
|
+
];
|
|
354
|
+
const CAMPAIGN_LLM_MODELS = new Set(Object.values(exports.CampaignLlmModel));
|
|
355
|
+
function isCampaignLlmModel(value) {
|
|
356
|
+
return typeof value === 'string' && CAMPAIGN_LLM_MODELS.has(value);
|
|
357
|
+
}
|
|
358
|
+
function isValidCampaignAiModelOrder(modelOrder) {
|
|
359
|
+
if (!Array.isArray(modelOrder) || modelOrder.length < MIN_CAMPAIGN_AI_MODELS) {
|
|
360
|
+
return false;
|
|
361
|
+
}
|
|
362
|
+
const unique = new Set();
|
|
363
|
+
for (const model of modelOrder) {
|
|
364
|
+
if (!isCampaignLlmModel(model) || unique.has(model)) {
|
|
365
|
+
return false;
|
|
366
|
+
}
|
|
367
|
+
unique.add(model);
|
|
368
|
+
}
|
|
369
|
+
return true;
|
|
370
|
+
}
|
|
371
|
+
function assertValidCampaignAiModelOrder(modelOrder) {
|
|
372
|
+
if (!isValidCampaignAiModelOrder(modelOrder)) {
|
|
373
|
+
throw new Error(`Campaign AI modelOrder must contain at least ${MIN_CAMPAIGN_AI_MODELS} distinct models`);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
function resolveCampaignGlampointsAmount(value) {
|
|
377
|
+
if (typeof value !== 'number' || !Number.isFinite(value) || value < 0) {
|
|
378
|
+
return DEFAULT_CAMPAIGN_GLAMPOINTS_AMOUNT;
|
|
379
|
+
}
|
|
380
|
+
return value;
|
|
381
|
+
}
|
|
382
|
+
function createDefaultCampaignSettingsHome() {
|
|
383
|
+
return {
|
|
384
|
+
sortMode: exports.CampaignHomeSortMode.AUTOMATIC,
|
|
385
|
+
pinnedPostIds: [],
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
function createDefaultCampaignSettingsAi() {
|
|
389
|
+
return {
|
|
390
|
+
modelOrder: [...DEFAULT_CAMPAIGN_AI_MODEL_ORDER],
|
|
391
|
+
globalRules: '',
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
function createDefaultCampaignSettingsCosts() {
|
|
395
|
+
return {
|
|
396
|
+
totalLlm: 0,
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
function createDefaultCampaignSettings() {
|
|
400
|
+
return CampaignSettings.toInstance({
|
|
401
|
+
id: CAMPAIGN_SETTINGS_DOCUMENT_ID,
|
|
402
|
+
home: createDefaultCampaignSettingsHome(),
|
|
403
|
+
ai: createDefaultCampaignSettingsAi(),
|
|
404
|
+
costs: createDefaultCampaignSettingsCosts(),
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
|
|
277
408
|
const registry = new Map();
|
|
278
409
|
function registerClass(name, classConstructor) {
|
|
279
410
|
registry.set(name, classConstructor);
|
|
@@ -775,29 +906,6 @@ function toCents(amount) {
|
|
|
775
906
|
return sign * (Number(whole) * 100 + Number(fraction));
|
|
776
907
|
}
|
|
777
908
|
|
|
778
|
-
class BaseModel {
|
|
779
|
-
get identifier() {
|
|
780
|
-
const fields = this.constructor.identifiersFields.filter((field) => field !== 'identifier');
|
|
781
|
-
const data = this;
|
|
782
|
-
return fields.reduce((object, field) => ({ ...object, [field]: data[field] }), {});
|
|
783
|
-
}
|
|
784
|
-
get identifiersFields() {
|
|
785
|
-
return this.constructor.identifiersFields;
|
|
786
|
-
}
|
|
787
|
-
constructor(args) {
|
|
788
|
-
Object.assign(this, args);
|
|
789
|
-
}
|
|
790
|
-
static toInstance(data) {
|
|
791
|
-
return classTransformer.plainToInstance(this, data || {});
|
|
792
|
-
}
|
|
793
|
-
static isModel(value) {
|
|
794
|
-
return value instanceof this;
|
|
795
|
-
}
|
|
796
|
-
toPlain() {
|
|
797
|
-
return classTransformer.instanceToPlain(this);
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
|
|
801
909
|
exports.BrandEquityOptions = void 0;
|
|
802
910
|
(function (BrandEquityOptions) {
|
|
803
911
|
BrandEquityOptions["1_DETRACTOR"] = "detractor";
|
|
@@ -1077,32 +1185,6 @@ tslib.__decorate([
|
|
|
1077
1185
|
tslib.__metadata("design:type", Object)
|
|
1078
1186
|
], ProductErrors.prototype, "product", void 0);
|
|
1079
1187
|
|
|
1080
|
-
exports.Where = void 0;
|
|
1081
|
-
(function (Where) {
|
|
1082
|
-
Where["EQUALS"] = "==";
|
|
1083
|
-
Where["NOTEQUALS"] = "!=";
|
|
1084
|
-
Where["GT"] = ">";
|
|
1085
|
-
Where["GTE"] = ">=";
|
|
1086
|
-
Where["IN"] = "in";
|
|
1087
|
-
Where["NOTIN"] = "not in";
|
|
1088
|
-
Where["LT"] = "<";
|
|
1089
|
-
Where["LTE"] = "<=";
|
|
1090
|
-
Where["LIKE"] = "like";
|
|
1091
|
-
Where["NOTLIKE"] = "not like";
|
|
1092
|
-
Where["ISNULL"] = "is null";
|
|
1093
|
-
Where["ISNOTNULL"] = "is not null";
|
|
1094
|
-
Where["IREGEX"] = "iregex";
|
|
1095
|
-
})(exports.Where || (exports.Where = {}));
|
|
1096
|
-
|
|
1097
|
-
exports.UpdateOptionActions = void 0;
|
|
1098
|
-
(function (UpdateOptionActions) {
|
|
1099
|
-
UpdateOptionActions["UPDATE"] = "update";
|
|
1100
|
-
UpdateOptionActions["MERGE"] = "merge";
|
|
1101
|
-
UpdateOptionActions["REMOVE"] = "remove";
|
|
1102
|
-
UpdateOptionActions["REMOVE_FIELD"] = "removeField";
|
|
1103
|
-
UpdateOptionActions["NULL"] = "null";
|
|
1104
|
-
})(exports.UpdateOptionActions || (exports.UpdateOptionActions = {}));
|
|
1105
|
-
|
|
1106
1188
|
class ProductGroup extends BaseModel {
|
|
1107
1189
|
static get identifiersFields() {
|
|
1108
1190
|
return ['id'];
|
|
@@ -1155,6 +1237,12 @@ class CampaignHashtag extends BaseModel {
|
|
|
1155
1237
|
}
|
|
1156
1238
|
}
|
|
1157
1239
|
|
|
1240
|
+
class CampaignHashtagPosts extends BaseModel {
|
|
1241
|
+
static get identifiersFields() {
|
|
1242
|
+
return ['id'];
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1158
1246
|
class BeautyProfile extends BaseModel {
|
|
1159
1247
|
toPlain() {
|
|
1160
1248
|
const plain = super.toPlain();
|
|
@@ -1812,6 +1900,28 @@ tslib.__decorate([
|
|
|
1812
1900
|
tslib.__metadata("design:type", Coupon)
|
|
1813
1901
|
], Checkout.prototype, "coupon", void 0);
|
|
1814
1902
|
|
|
1903
|
+
exports.CampaignGlampointsStatus = void 0;
|
|
1904
|
+
(function (CampaignGlampointsStatus) {
|
|
1905
|
+
CampaignGlampointsStatus["NOT_ELIGIBLE"] = "not_eligible";
|
|
1906
|
+
CampaignGlampointsStatus["PENDING_SOCIAL"] = "pending_social";
|
|
1907
|
+
CampaignGlampointsStatus["CREDITED"] = "credited";
|
|
1908
|
+
CampaignGlampointsStatus["ALREADY_CREDITED_OTHER_POST"] = "already_credited_other_post";
|
|
1909
|
+
})(exports.CampaignGlampointsStatus || (exports.CampaignGlampointsStatus = {}));
|
|
1910
|
+
|
|
1911
|
+
exports.CampaignHashtagPostsStatus = void 0;
|
|
1912
|
+
(function (CampaignHashtagPostsStatus) {
|
|
1913
|
+
CampaignHashtagPostsStatus["PENDING"] = "PENDING";
|
|
1914
|
+
CampaignHashtagPostsStatus["APPROVED"] = "APPROVED";
|
|
1915
|
+
CampaignHashtagPostsStatus["REJECTED"] = "REJECTED";
|
|
1916
|
+
})(exports.CampaignHashtagPostsStatus || (exports.CampaignHashtagPostsStatus = {}));
|
|
1917
|
+
|
|
1918
|
+
exports.CampaignSocialNetwork = void 0;
|
|
1919
|
+
(function (CampaignSocialNetwork) {
|
|
1920
|
+
CampaignSocialNetwork["INSTAGRAM"] = "instagram";
|
|
1921
|
+
CampaignSocialNetwork["TIKTOK"] = "tiktok";
|
|
1922
|
+
CampaignSocialNetwork["YOUTUBE"] = "youtube";
|
|
1923
|
+
})(exports.CampaignSocialNetwork || (exports.CampaignSocialNetwork = {}));
|
|
1924
|
+
|
|
1815
1925
|
exports.CheckoutTypes = void 0;
|
|
1816
1926
|
(function (CheckoutTypes) {
|
|
1817
1927
|
CheckoutTypes[CheckoutTypes["ECOMMERCE"] = 1] = "ECOMMERCE";
|
|
@@ -1874,6 +1984,27 @@ class OrderBlocked extends BaseModel {
|
|
|
1874
1984
|
}
|
|
1875
1985
|
}
|
|
1876
1986
|
|
|
1987
|
+
/**
|
|
1988
|
+
* Queue document for millenium shop-order send/retry.
|
|
1989
|
+
* Firestore collection remains `transId` (see PendingOrderFirestoreRepository).
|
|
1990
|
+
*/
|
|
1991
|
+
class PendingOrder extends BaseModel {
|
|
1992
|
+
static get identifiersFields() {
|
|
1993
|
+
return ['id'];
|
|
1994
|
+
}
|
|
1995
|
+
get firstErrorMessage() {
|
|
1996
|
+
if (!Array.isArray(this.errorMessage) || this.errorMessage.length === 0) {
|
|
1997
|
+
return null;
|
|
1998
|
+
}
|
|
1999
|
+
const first = this.errorMessage[0];
|
|
2000
|
+
if (typeof first !== 'string') {
|
|
2001
|
+
return null;
|
|
2002
|
+
}
|
|
2003
|
+
const trimmed = first.trim();
|
|
2004
|
+
return trimmed ? trimmed : null;
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
|
|
1877
2008
|
class ShoppingRecurrence extends BaseModel {
|
|
1878
2009
|
static get identifiersFields() {
|
|
1879
2010
|
return ['id'];
|
|
@@ -5645,7 +5776,7 @@ class CampaignHashtagFirestoreRepository extends withCrudFirestore(withHelpers(w
|
|
|
5645
5776
|
constructor({ firestore, interceptors, cache, }) {
|
|
5646
5777
|
super({
|
|
5647
5778
|
firestore,
|
|
5648
|
-
collectionName: '
|
|
5779
|
+
collectionName: 'CampaignsHashtags',
|
|
5649
5780
|
model: CampaignHashtag,
|
|
5650
5781
|
interceptors,
|
|
5651
5782
|
cache,
|
|
@@ -5653,6 +5784,30 @@ class CampaignHashtagFirestoreRepository extends withCrudFirestore(withHelpers(w
|
|
|
5653
5784
|
}
|
|
5654
5785
|
}
|
|
5655
5786
|
|
|
5787
|
+
class CampaignHashtagPostsFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5788
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5789
|
+
super({
|
|
5790
|
+
firestore,
|
|
5791
|
+
collectionName: 'CampaignsHashtagsPosts',
|
|
5792
|
+
model: CampaignHashtagPosts,
|
|
5793
|
+
interceptors,
|
|
5794
|
+
cache,
|
|
5795
|
+
});
|
|
5796
|
+
}
|
|
5797
|
+
}
|
|
5798
|
+
|
|
5799
|
+
class CampaignSettingsFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5800
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5801
|
+
super({
|
|
5802
|
+
firestore,
|
|
5803
|
+
collectionName: 'CampaignSettings',
|
|
5804
|
+
model: CampaignSettings,
|
|
5805
|
+
interceptors,
|
|
5806
|
+
cache,
|
|
5807
|
+
});
|
|
5808
|
+
}
|
|
5809
|
+
}
|
|
5810
|
+
|
|
5656
5811
|
class CheckoutFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5657
5812
|
constructor({ firestore, interceptors, cache, }) {
|
|
5658
5813
|
super({
|
|
@@ -5808,6 +5963,18 @@ class PaymentFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
5808
5963
|
}
|
|
5809
5964
|
}
|
|
5810
5965
|
|
|
5966
|
+
class PendingOrderFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5967
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5968
|
+
super({
|
|
5969
|
+
firestore,
|
|
5970
|
+
collectionName: 'transId',
|
|
5971
|
+
model: PendingOrder,
|
|
5972
|
+
interceptors,
|
|
5973
|
+
cache,
|
|
5974
|
+
});
|
|
5975
|
+
}
|
|
5976
|
+
}
|
|
5977
|
+
|
|
5811
5978
|
class ShoppingRecurrenceEditionFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5812
5979
|
constructor({ firestore, interceptors, cache, }) {
|
|
5813
5980
|
super({
|
|
@@ -11907,12 +12074,17 @@ exports.BrandCategoryFirestoreRepository = BrandCategoryFirestoreRepository;
|
|
|
11907
12074
|
exports.BusinessError = BusinessError;
|
|
11908
12075
|
exports.Buy2Win = Buy2Win;
|
|
11909
12076
|
exports.Buy2WinFirestoreRepository = Buy2WinFirestoreRepository;
|
|
12077
|
+
exports.CAMPAIGN_SETTINGS_DOCUMENT_ID = CAMPAIGN_SETTINGS_DOCUMENT_ID;
|
|
11910
12078
|
exports.Campaign = Campaign;
|
|
11911
12079
|
exports.CampaignBanner = CampaignBanner;
|
|
11912
12080
|
exports.CampaignDashboard = CampaignDashboard;
|
|
11913
12081
|
exports.CampaignDashboardFirestoreRepository = CampaignDashboardFirestoreRepository;
|
|
11914
12082
|
exports.CampaignHashtag = CampaignHashtag;
|
|
11915
12083
|
exports.CampaignHashtagFirestoreRepository = CampaignHashtagFirestoreRepository;
|
|
12084
|
+
exports.CampaignHashtagPosts = CampaignHashtagPosts;
|
|
12085
|
+
exports.CampaignHashtagPostsFirestoreRepository = CampaignHashtagPostsFirestoreRepository;
|
|
12086
|
+
exports.CampaignSettings = CampaignSettings;
|
|
12087
|
+
exports.CampaignSettingsFirestoreRepository = CampaignSettingsFirestoreRepository;
|
|
11916
12088
|
exports.Category = Category;
|
|
11917
12089
|
exports.CategoryCollectionChildren = CategoryCollectionChildren;
|
|
11918
12090
|
exports.CategoryCollectionChildrenHasuraGraphQLRepository = CategoryCollectionChildrenHasuraGraphQLRepository;
|
|
@@ -11935,6 +12107,8 @@ exports.ConnectFirestoreService = ConnectFirestoreService;
|
|
|
11935
12107
|
exports.Coupon = Coupon;
|
|
11936
12108
|
exports.CouponFirestoreRepository = CouponFirestoreRepository;
|
|
11937
12109
|
exports.DEFAULT_ANTIFRAUD_VOLUME_LIMITS = DEFAULT_ANTIFRAUD_VOLUME_LIMITS;
|
|
12110
|
+
exports.DEFAULT_CAMPAIGN_AI_MODEL_ORDER = DEFAULT_CAMPAIGN_AI_MODEL_ORDER;
|
|
12111
|
+
exports.DEFAULT_CAMPAIGN_GLAMPOINTS_AMOUNT = DEFAULT_CAMPAIGN_GLAMPOINTS_AMOUNT;
|
|
11938
12112
|
exports.DEFAULT_SHOP_ANTIFRAUD_CONFIG = DEFAULT_SHOP_ANTIFRAUD_CONFIG;
|
|
11939
12113
|
exports.Debug = Debug;
|
|
11940
12114
|
exports.DebugDecoratorHelper = DebugDecoratorHelper;
|
|
@@ -11965,6 +12139,7 @@ exports.Log = Log;
|
|
|
11965
12139
|
exports.LogDocument = LogDocument;
|
|
11966
12140
|
exports.LogFirestoreRepository = LogFirestoreRepository;
|
|
11967
12141
|
exports.Logger = Logger;
|
|
12142
|
+
exports.MIN_CAMPAIGN_AI_MODELS = MIN_CAMPAIGN_AI_MODELS;
|
|
11968
12143
|
exports.MercadoPagoBankSlipAxiosAdapter = MercadoPagoBankSlipAxiosAdapter;
|
|
11969
12144
|
exports.MercadoPagoCardAxiosAdapter = MercadoPagoCardAxiosAdapter;
|
|
11970
12145
|
exports.MercadoPagoErrorHelper = MercadoPagoErrorHelper;
|
|
@@ -11991,6 +12166,8 @@ exports.PaymentError = PaymentError;
|
|
|
11991
12166
|
exports.PaymentFirestoreRepository = PaymentFirestoreRepository;
|
|
11992
12167
|
exports.PaymentProviderFactory = PaymentProviderFactory;
|
|
11993
12168
|
exports.PaymentTransaction = PaymentTransaction;
|
|
12169
|
+
exports.PendingOrder = PendingOrder;
|
|
12170
|
+
exports.PendingOrderFirestoreRepository = PendingOrderFirestoreRepository;
|
|
11994
12171
|
exports.Product = Product;
|
|
11995
12172
|
exports.ProductCatalogHasuraGraphQL = ProductCatalogHasuraGraphQL;
|
|
11996
12173
|
exports.ProductCatalogHasuraGraphQLRepository = ProductCatalogHasuraGraphQLRepository;
|
|
@@ -12069,16 +12246,24 @@ exports.VertexAxiosAdapter = VertexAxiosAdapter;
|
|
|
12069
12246
|
exports.WeakPasswordError = WeakPasswordError;
|
|
12070
12247
|
exports.Wishlist = Wishlist;
|
|
12071
12248
|
exports.WishlistHasuraGraphQLRepository = WishlistHasuraGraphQLRepository;
|
|
12249
|
+
exports.assertValidCampaignAiModelOrder = assertValidCampaignAiModelOrder;
|
|
12250
|
+
exports.createDefaultCampaignSettings = createDefaultCampaignSettings;
|
|
12251
|
+
exports.createDefaultCampaignSettingsAi = createDefaultCampaignSettingsAi;
|
|
12252
|
+
exports.createDefaultCampaignSettingsCosts = createDefaultCampaignSettingsCosts;
|
|
12253
|
+
exports.createDefaultCampaignSettingsHome = createDefaultCampaignSettingsHome;
|
|
12072
12254
|
exports.deserialize = deserialize;
|
|
12073
12255
|
exports.getClass = getClass;
|
|
12074
12256
|
exports.is = is;
|
|
12075
12257
|
exports.isAntifraudEnabled = isAntifraudEnabled;
|
|
12258
|
+
exports.isCampaignLlmModel = isCampaignLlmModel;
|
|
12076
12259
|
exports.isDebuggable = isDebuggable;
|
|
12077
12260
|
exports.isUUID = isUUID;
|
|
12261
|
+
exports.isValidCampaignAiModelOrder = isValidCampaignAiModelOrder;
|
|
12078
12262
|
exports.parseDateTime = parseDateTime;
|
|
12079
12263
|
exports.registerClass = registerClass;
|
|
12080
12264
|
exports.resolveAntifraudVolumeLimits = resolveAntifraudVolumeLimits;
|
|
12081
12265
|
exports.resolveCacheConfig = resolveCacheConfig;
|
|
12266
|
+
exports.resolveCampaignGlampointsAmount = resolveCampaignGlampointsAmount;
|
|
12082
12267
|
exports.resolveClass = resolveClass;
|
|
12083
12268
|
exports.serialize = serialize;
|
|
12084
12269
|
exports.toCents = toCents;
|
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
import { __decorate, __metadata } from 'tslib';
|
|
3
2
|
import { plainToInstance, instanceToPlain, Type } from 'class-transformer';
|
|
3
|
+
import { __decorate, __metadata } from 'tslib';
|
|
4
4
|
import { parseISO, startOfDay, endOfDay, addHours, subDays, format, addDays } from 'date-fns';
|
|
5
5
|
export { add, addBusinessDays, addDays, addHours, addMonths, addYears, endOfDay, format, formatISO9075, parseISO, startOfDay, sub, subDays } from 'date-fns';
|
|
6
6
|
import { utcToZonedTime } from 'date-fns-tz';
|
|
@@ -268,6 +268,137 @@ function resolveAntifraudVolumeLimits(antifraude) {
|
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
+
class BaseModel {
|
|
272
|
+
get identifier() {
|
|
273
|
+
const fields = this.constructor.identifiersFields.filter((field) => field !== 'identifier');
|
|
274
|
+
const data = this;
|
|
275
|
+
return fields.reduce((object, field) => ({ ...object, [field]: data[field] }), {});
|
|
276
|
+
}
|
|
277
|
+
get identifiersFields() {
|
|
278
|
+
return this.constructor.identifiersFields;
|
|
279
|
+
}
|
|
280
|
+
constructor(args) {
|
|
281
|
+
Object.assign(this, args);
|
|
282
|
+
}
|
|
283
|
+
static toInstance(data) {
|
|
284
|
+
return plainToInstance(this, data || {});
|
|
285
|
+
}
|
|
286
|
+
static isModel(value) {
|
|
287
|
+
return value instanceof this;
|
|
288
|
+
}
|
|
289
|
+
toPlain() {
|
|
290
|
+
return instanceToPlain(this);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
var Where;
|
|
295
|
+
(function (Where) {
|
|
296
|
+
Where["EQUALS"] = "==";
|
|
297
|
+
Where["NOTEQUALS"] = "!=";
|
|
298
|
+
Where["GT"] = ">";
|
|
299
|
+
Where["GTE"] = ">=";
|
|
300
|
+
Where["IN"] = "in";
|
|
301
|
+
Where["NOTIN"] = "not in";
|
|
302
|
+
Where["LT"] = "<";
|
|
303
|
+
Where["LTE"] = "<=";
|
|
304
|
+
Where["LIKE"] = "like";
|
|
305
|
+
Where["NOTLIKE"] = "not like";
|
|
306
|
+
Where["ISNULL"] = "is null";
|
|
307
|
+
Where["ISNOTNULL"] = "is not null";
|
|
308
|
+
Where["IREGEX"] = "iregex";
|
|
309
|
+
})(Where || (Where = {}));
|
|
310
|
+
|
|
311
|
+
var UpdateOptionActions;
|
|
312
|
+
(function (UpdateOptionActions) {
|
|
313
|
+
UpdateOptionActions["UPDATE"] = "update";
|
|
314
|
+
UpdateOptionActions["MERGE"] = "merge";
|
|
315
|
+
UpdateOptionActions["REMOVE"] = "remove";
|
|
316
|
+
UpdateOptionActions["REMOVE_FIELD"] = "removeField";
|
|
317
|
+
UpdateOptionActions["NULL"] = "null";
|
|
318
|
+
})(UpdateOptionActions || (UpdateOptionActions = {}));
|
|
319
|
+
|
|
320
|
+
class CampaignSettings extends BaseModel {
|
|
321
|
+
static get identifiersFields() {
|
|
322
|
+
return ['id'];
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
var CampaignHomeSortMode;
|
|
327
|
+
(function (CampaignHomeSortMode) {
|
|
328
|
+
CampaignHomeSortMode["AUTOMATIC"] = "automatic";
|
|
329
|
+
CampaignHomeSortMode["MANUAL"] = "manual";
|
|
330
|
+
})(CampaignHomeSortMode || (CampaignHomeSortMode = {}));
|
|
331
|
+
|
|
332
|
+
var CampaignLlmModel;
|
|
333
|
+
(function (CampaignLlmModel) {
|
|
334
|
+
CampaignLlmModel["GROK"] = "grok";
|
|
335
|
+
CampaignLlmModel["KIMI"] = "kimi";
|
|
336
|
+
CampaignLlmModel["GLM"] = "glm";
|
|
337
|
+
CampaignLlmModel["GEMINI"] = "gemini";
|
|
338
|
+
CampaignLlmModel["ANTHROPIC"] = "anthropic";
|
|
339
|
+
})(CampaignLlmModel || (CampaignLlmModel = {}));
|
|
340
|
+
|
|
341
|
+
const CAMPAIGN_SETTINGS_DOCUMENT_ID = 'glam';
|
|
342
|
+
const DEFAULT_CAMPAIGN_GLAMPOINTS_AMOUNT = 15;
|
|
343
|
+
const MIN_CAMPAIGN_AI_MODELS = 2;
|
|
344
|
+
const DEFAULT_CAMPAIGN_AI_MODEL_ORDER = [
|
|
345
|
+
CampaignLlmModel.GROK,
|
|
346
|
+
CampaignLlmModel.GEMINI,
|
|
347
|
+
];
|
|
348
|
+
const CAMPAIGN_LLM_MODELS = new Set(Object.values(CampaignLlmModel));
|
|
349
|
+
function isCampaignLlmModel(value) {
|
|
350
|
+
return typeof value === 'string' && CAMPAIGN_LLM_MODELS.has(value);
|
|
351
|
+
}
|
|
352
|
+
function isValidCampaignAiModelOrder(modelOrder) {
|
|
353
|
+
if (!Array.isArray(modelOrder) || modelOrder.length < MIN_CAMPAIGN_AI_MODELS) {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
const unique = new Set();
|
|
357
|
+
for (const model of modelOrder) {
|
|
358
|
+
if (!isCampaignLlmModel(model) || unique.has(model)) {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
unique.add(model);
|
|
362
|
+
}
|
|
363
|
+
return true;
|
|
364
|
+
}
|
|
365
|
+
function assertValidCampaignAiModelOrder(modelOrder) {
|
|
366
|
+
if (!isValidCampaignAiModelOrder(modelOrder)) {
|
|
367
|
+
throw new Error(`Campaign AI modelOrder must contain at least ${MIN_CAMPAIGN_AI_MODELS} distinct models`);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
function resolveCampaignGlampointsAmount(value) {
|
|
371
|
+
if (typeof value !== 'number' || !Number.isFinite(value) || value < 0) {
|
|
372
|
+
return DEFAULT_CAMPAIGN_GLAMPOINTS_AMOUNT;
|
|
373
|
+
}
|
|
374
|
+
return value;
|
|
375
|
+
}
|
|
376
|
+
function createDefaultCampaignSettingsHome() {
|
|
377
|
+
return {
|
|
378
|
+
sortMode: CampaignHomeSortMode.AUTOMATIC,
|
|
379
|
+
pinnedPostIds: [],
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
function createDefaultCampaignSettingsAi() {
|
|
383
|
+
return {
|
|
384
|
+
modelOrder: [...DEFAULT_CAMPAIGN_AI_MODEL_ORDER],
|
|
385
|
+
globalRules: '',
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
function createDefaultCampaignSettingsCosts() {
|
|
389
|
+
return {
|
|
390
|
+
totalLlm: 0,
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
function createDefaultCampaignSettings() {
|
|
394
|
+
return CampaignSettings.toInstance({
|
|
395
|
+
id: CAMPAIGN_SETTINGS_DOCUMENT_ID,
|
|
396
|
+
home: createDefaultCampaignSettingsHome(),
|
|
397
|
+
ai: createDefaultCampaignSettingsAi(),
|
|
398
|
+
costs: createDefaultCampaignSettingsCosts(),
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
|
|
271
402
|
const registry = new Map();
|
|
272
403
|
function registerClass(name, classConstructor) {
|
|
273
404
|
registry.set(name, classConstructor);
|
|
@@ -769,29 +900,6 @@ function toCents(amount) {
|
|
|
769
900
|
return sign * (Number(whole) * 100 + Number(fraction));
|
|
770
901
|
}
|
|
771
902
|
|
|
772
|
-
class BaseModel {
|
|
773
|
-
get identifier() {
|
|
774
|
-
const fields = this.constructor.identifiersFields.filter((field) => field !== 'identifier');
|
|
775
|
-
const data = this;
|
|
776
|
-
return fields.reduce((object, field) => ({ ...object, [field]: data[field] }), {});
|
|
777
|
-
}
|
|
778
|
-
get identifiersFields() {
|
|
779
|
-
return this.constructor.identifiersFields;
|
|
780
|
-
}
|
|
781
|
-
constructor(args) {
|
|
782
|
-
Object.assign(this, args);
|
|
783
|
-
}
|
|
784
|
-
static toInstance(data) {
|
|
785
|
-
return plainToInstance(this, data || {});
|
|
786
|
-
}
|
|
787
|
-
static isModel(value) {
|
|
788
|
-
return value instanceof this;
|
|
789
|
-
}
|
|
790
|
-
toPlain() {
|
|
791
|
-
return instanceToPlain(this);
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
|
|
795
903
|
var BrandEquityOptions;
|
|
796
904
|
(function (BrandEquityOptions) {
|
|
797
905
|
BrandEquityOptions["1_DETRACTOR"] = "detractor";
|
|
@@ -1071,32 +1179,6 @@ __decorate([
|
|
|
1071
1179
|
__metadata("design:type", Object)
|
|
1072
1180
|
], ProductErrors.prototype, "product", void 0);
|
|
1073
1181
|
|
|
1074
|
-
var Where;
|
|
1075
|
-
(function (Where) {
|
|
1076
|
-
Where["EQUALS"] = "==";
|
|
1077
|
-
Where["NOTEQUALS"] = "!=";
|
|
1078
|
-
Where["GT"] = ">";
|
|
1079
|
-
Where["GTE"] = ">=";
|
|
1080
|
-
Where["IN"] = "in";
|
|
1081
|
-
Where["NOTIN"] = "not in";
|
|
1082
|
-
Where["LT"] = "<";
|
|
1083
|
-
Where["LTE"] = "<=";
|
|
1084
|
-
Where["LIKE"] = "like";
|
|
1085
|
-
Where["NOTLIKE"] = "not like";
|
|
1086
|
-
Where["ISNULL"] = "is null";
|
|
1087
|
-
Where["ISNOTNULL"] = "is not null";
|
|
1088
|
-
Where["IREGEX"] = "iregex";
|
|
1089
|
-
})(Where || (Where = {}));
|
|
1090
|
-
|
|
1091
|
-
var UpdateOptionActions;
|
|
1092
|
-
(function (UpdateOptionActions) {
|
|
1093
|
-
UpdateOptionActions["UPDATE"] = "update";
|
|
1094
|
-
UpdateOptionActions["MERGE"] = "merge";
|
|
1095
|
-
UpdateOptionActions["REMOVE"] = "remove";
|
|
1096
|
-
UpdateOptionActions["REMOVE_FIELD"] = "removeField";
|
|
1097
|
-
UpdateOptionActions["NULL"] = "null";
|
|
1098
|
-
})(UpdateOptionActions || (UpdateOptionActions = {}));
|
|
1099
|
-
|
|
1100
1182
|
class ProductGroup extends BaseModel {
|
|
1101
1183
|
static get identifiersFields() {
|
|
1102
1184
|
return ['id'];
|
|
@@ -1149,6 +1231,12 @@ class CampaignHashtag extends BaseModel {
|
|
|
1149
1231
|
}
|
|
1150
1232
|
}
|
|
1151
1233
|
|
|
1234
|
+
class CampaignHashtagPosts extends BaseModel {
|
|
1235
|
+
static get identifiersFields() {
|
|
1236
|
+
return ['id'];
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1152
1240
|
class BeautyProfile extends BaseModel {
|
|
1153
1241
|
toPlain() {
|
|
1154
1242
|
const plain = super.toPlain();
|
|
@@ -1806,6 +1894,28 @@ __decorate([
|
|
|
1806
1894
|
__metadata("design:type", Coupon)
|
|
1807
1895
|
], Checkout.prototype, "coupon", void 0);
|
|
1808
1896
|
|
|
1897
|
+
var CampaignGlampointsStatus;
|
|
1898
|
+
(function (CampaignGlampointsStatus) {
|
|
1899
|
+
CampaignGlampointsStatus["NOT_ELIGIBLE"] = "not_eligible";
|
|
1900
|
+
CampaignGlampointsStatus["PENDING_SOCIAL"] = "pending_social";
|
|
1901
|
+
CampaignGlampointsStatus["CREDITED"] = "credited";
|
|
1902
|
+
CampaignGlampointsStatus["ALREADY_CREDITED_OTHER_POST"] = "already_credited_other_post";
|
|
1903
|
+
})(CampaignGlampointsStatus || (CampaignGlampointsStatus = {}));
|
|
1904
|
+
|
|
1905
|
+
var CampaignHashtagPostsStatus;
|
|
1906
|
+
(function (CampaignHashtagPostsStatus) {
|
|
1907
|
+
CampaignHashtagPostsStatus["PENDING"] = "PENDING";
|
|
1908
|
+
CampaignHashtagPostsStatus["APPROVED"] = "APPROVED";
|
|
1909
|
+
CampaignHashtagPostsStatus["REJECTED"] = "REJECTED";
|
|
1910
|
+
})(CampaignHashtagPostsStatus || (CampaignHashtagPostsStatus = {}));
|
|
1911
|
+
|
|
1912
|
+
var CampaignSocialNetwork;
|
|
1913
|
+
(function (CampaignSocialNetwork) {
|
|
1914
|
+
CampaignSocialNetwork["INSTAGRAM"] = "instagram";
|
|
1915
|
+
CampaignSocialNetwork["TIKTOK"] = "tiktok";
|
|
1916
|
+
CampaignSocialNetwork["YOUTUBE"] = "youtube";
|
|
1917
|
+
})(CampaignSocialNetwork || (CampaignSocialNetwork = {}));
|
|
1918
|
+
|
|
1809
1919
|
var CheckoutTypes;
|
|
1810
1920
|
(function (CheckoutTypes) {
|
|
1811
1921
|
CheckoutTypes[CheckoutTypes["ECOMMERCE"] = 1] = "ECOMMERCE";
|
|
@@ -1868,6 +1978,27 @@ class OrderBlocked extends BaseModel {
|
|
|
1868
1978
|
}
|
|
1869
1979
|
}
|
|
1870
1980
|
|
|
1981
|
+
/**
|
|
1982
|
+
* Queue document for millenium shop-order send/retry.
|
|
1983
|
+
* Firestore collection remains `transId` (see PendingOrderFirestoreRepository).
|
|
1984
|
+
*/
|
|
1985
|
+
class PendingOrder extends BaseModel {
|
|
1986
|
+
static get identifiersFields() {
|
|
1987
|
+
return ['id'];
|
|
1988
|
+
}
|
|
1989
|
+
get firstErrorMessage() {
|
|
1990
|
+
if (!Array.isArray(this.errorMessage) || this.errorMessage.length === 0) {
|
|
1991
|
+
return null;
|
|
1992
|
+
}
|
|
1993
|
+
const first = this.errorMessage[0];
|
|
1994
|
+
if (typeof first !== 'string') {
|
|
1995
|
+
return null;
|
|
1996
|
+
}
|
|
1997
|
+
const trimmed = first.trim();
|
|
1998
|
+
return trimmed ? trimmed : null;
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
|
|
1871
2002
|
class ShoppingRecurrence extends BaseModel {
|
|
1872
2003
|
static get identifiersFields() {
|
|
1873
2004
|
return ['id'];
|
|
@@ -5639,7 +5770,7 @@ class CampaignHashtagFirestoreRepository extends withCrudFirestore(withHelpers(w
|
|
|
5639
5770
|
constructor({ firestore, interceptors, cache, }) {
|
|
5640
5771
|
super({
|
|
5641
5772
|
firestore,
|
|
5642
|
-
collectionName: '
|
|
5773
|
+
collectionName: 'CampaignsHashtags',
|
|
5643
5774
|
model: CampaignHashtag,
|
|
5644
5775
|
interceptors,
|
|
5645
5776
|
cache,
|
|
@@ -5647,6 +5778,30 @@ class CampaignHashtagFirestoreRepository extends withCrudFirestore(withHelpers(w
|
|
|
5647
5778
|
}
|
|
5648
5779
|
}
|
|
5649
5780
|
|
|
5781
|
+
class CampaignHashtagPostsFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5782
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5783
|
+
super({
|
|
5784
|
+
firestore,
|
|
5785
|
+
collectionName: 'CampaignsHashtagsPosts',
|
|
5786
|
+
model: CampaignHashtagPosts,
|
|
5787
|
+
interceptors,
|
|
5788
|
+
cache,
|
|
5789
|
+
});
|
|
5790
|
+
}
|
|
5791
|
+
}
|
|
5792
|
+
|
|
5793
|
+
class CampaignSettingsFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5794
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5795
|
+
super({
|
|
5796
|
+
firestore,
|
|
5797
|
+
collectionName: 'CampaignSettings',
|
|
5798
|
+
model: CampaignSettings,
|
|
5799
|
+
interceptors,
|
|
5800
|
+
cache,
|
|
5801
|
+
});
|
|
5802
|
+
}
|
|
5803
|
+
}
|
|
5804
|
+
|
|
5650
5805
|
class CheckoutFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5651
5806
|
constructor({ firestore, interceptors, cache, }) {
|
|
5652
5807
|
super({
|
|
@@ -5802,6 +5957,18 @@ class PaymentFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
5802
5957
|
}
|
|
5803
5958
|
}
|
|
5804
5959
|
|
|
5960
|
+
class PendingOrderFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5961
|
+
constructor({ firestore, interceptors, cache, }) {
|
|
5962
|
+
super({
|
|
5963
|
+
firestore,
|
|
5964
|
+
collectionName: 'transId',
|
|
5965
|
+
model: PendingOrder,
|
|
5966
|
+
interceptors,
|
|
5967
|
+
cache,
|
|
5968
|
+
});
|
|
5969
|
+
}
|
|
5970
|
+
}
|
|
5971
|
+
|
|
5805
5972
|
class ShoppingRecurrenceEditionFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5806
5973
|
constructor({ firestore, interceptors, cache, }) {
|
|
5807
5974
|
super({
|
|
@@ -11752,4 +11919,4 @@ class ProductsVertexSearch {
|
|
|
11752
11919
|
}
|
|
11753
11920
|
}
|
|
11754
11921
|
|
|
11755
|
-
export { ANTIFRAUD_CONFIG_CACHE_TTL_SECONDS, AccessoryImportances, Address, AdyenCardAxiosAdapter, AdyenPaymentMethodFactory, AntifraudBankSlipService, AntifraudCardService, AntifraudGlampointsService, AntifraudPixService, AntifraudProviderFactory, AntifraudProviders, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, BrandCategory, BrandCategoryFirestoreRepository, BrandEquityOptions, BusinessError, BusinessUnitEnum, Buy2Win, Buy2WinFirestoreRepository, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignHashtag, CampaignHashtagFirestoreRepository, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, CategoryProduct, CategoryProductHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponCategories, CouponCategory, CouponChannels, CouponFirestoreRepository, CouponOldCategories, CouponSubtypes, CouponTypes, DEFAULT_ANTIFRAUD_VOLUME_LIMITS, DEFAULT_SHOP_ANTIFRAUD_CONFIG, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, ErrorsCode, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, FraudValidationError, GenderDestination, GlampointsPaymentMethodFactory, GlampointsPaymentService, Group, GroupFirestoreRepository, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, InvalidCheckoutError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, LogDocument, LogFirestoreRepository, Logger, MercadoPagoBankSlipAxiosAdapter, MercadoPagoCardAxiosAdapter, MercadoPagoErrorHelper, MercadoPagoPaymentMethodFactory, MercadoPagoPixAxiosAdapter, MercadoPagoRequestHelper, MercadoPagoResponseHelper, MercadoPagoStatusDetailEnum, MercadoPagoStatusEnum, NotFoundError, ObsEmitter, OfficePosition, Order, OrderBlocked, OrderBlockedFirestoreRepository, OrderBlockedType, OrderFirestoreRepository, OrderPaymentStatus, OrderStatus, PagarMeV5OrderStatus, PagarMeV5PaymentStatus, PagarmeBankSlipAxiosAdapter, PagarmeCardAxiosAdapter, PagarmePaymentMethodFactory, PagarmePaymentStatus, PagarmePixAxiosAdapter, PagarmeV5BankSlipAxiosAdapter, PagarmeV5BaseAxiosAdapter, PagarmeV5CardAxiosAdapter, PagarmeV5PixAxiosAdapter, Payment, PaymentError, PaymentFirestoreRepository, PaymentMethods, PaymentProviderFactory, PaymentProviders, PaymentTransaction, PaymentType, PersonTypes, Plans, Product, ProductCatalogHasuraGraphQL, ProductCatalogHasuraGraphQLRepository, ProductErrors, ProductErrorsHasuraGraphQL, ProductErrorsHasuraGraphQLRepository, ProductFirestoreRepository, ProductGroup, ProductGroupHasuraGraphQLRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductPriceLog, ProductPriceLogHasuraGraphQLRepository, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, ProductStockEntry, ProductStockEntryHasuraGraphQL, ProductStockEntryHasuraGraphQLRepository, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, ProductsVertexSearch, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RestCacheAdapter, RoundProductPricesHelper, Sequence, SequenceFirestoreRepository, ShippingMethod, ShopConfigs, ShopConfigsFirestoreRepository, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, ShoppingRecurrence, ShoppingRecurrenceCycle, ShoppingRecurrenceEdition, ShoppingRecurrenceEditionFirestoreRepository, ShoppingRecurrenceEditionStatus, ShoppingRecurrenceErrorLog, ShoppingRecurrenceErrorLogFirestoreRepository, ShoppingRecurrenceFirestoreRepository, ShoppingRecurrenceStatus, Shops, SignInMethods, SignOut, Status, StockLimitError, StockOutError, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, TransactionPaymentMethods, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, VertexAxiosAdapter, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, WishlistLogType, deserialize, getClass, is, isAntifraudEnabled, isDebuggable, isUUID, parseDateTime, registerClass, resolveAntifraudVolumeLimits, resolveCacheConfig, resolveClass, serialize, toCents, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
|
11922
|
+
export { ANTIFRAUD_CONFIG_CACHE_TTL_SECONDS, AccessoryImportances, Address, AdyenCardAxiosAdapter, AdyenPaymentMethodFactory, AntifraudBankSlipService, AntifraudCardService, AntifraudGlampointsService, AntifraudPixService, AntifraudProviderFactory, AntifraudProviders, Area, Authentication, AuthenticationFirebaseAuthService, AxiosAdapter, Base, BaseModel, BeardProblems, BeardSizes, BeautyProductImportances, BeautyProfile, BeautyQuestionsHelper, BillingStatus, BodyProblems, BodyShapes, BodyTattoos, BrandCategory, BrandCategoryFirestoreRepository, BrandEquityOptions, BusinessError, BusinessUnitEnum, Buy2Win, Buy2WinFirestoreRepository, CAMPAIGN_SETTINGS_DOCUMENT_ID, Campaign, CampaignBanner, CampaignDashboard, CampaignDashboardFirestoreRepository, CampaignGlampointsStatus, CampaignHashtag, CampaignHashtagFirestoreRepository, CampaignHashtagPosts, CampaignHashtagPostsFirestoreRepository, CampaignHashtagPostsStatus, CampaignHomeSortMode, CampaignLlmModel, CampaignSettings, CampaignSettingsFirestoreRepository, CampaignSocialNetwork, Category, CategoryCollectionChildren, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryFilter, CategoryFilterHasuraGraphQLRepository, CategoryFirestoreRepository, CategoryHasuraGraphQL, CategoryHasuraGraphQLRepository, CategoryProduct, CategoryProductHasuraGraphQLRepository, Checkout, CheckoutFirestoreRepository, CheckoutSubscription, CheckoutSubscriptionFirestoreRepository, CheckoutTypes, ClassNameHelper, ConnectBaseDocumentSnapshot, ConnectCollectionService, ConnectDocumentService, ConnectFirestoreService, Coupon, CouponCategories, CouponCategory, CouponChannels, CouponFirestoreRepository, CouponOldCategories, CouponSubtypes, CouponTypes, DEFAULT_ANTIFRAUD_VOLUME_LIMITS, DEFAULT_CAMPAIGN_AI_MODEL_ORDER, DEFAULT_CAMPAIGN_GLAMPOINTS_AMOUNT, DEFAULT_SHOP_ANTIFRAUD_CONFIG, Debug, DebugDecoratorHelper, DebugHelper, DebugNamespaces, DuplicatedResultsError, Edition, EditionStatus, ErrorsCode, Exclusivities, FaceSkinOilinesses, FaceSkinProblems, FaceSkinTones, FamilyIncomes, Filter, FilterHasuraGraphQLRepository, FilterOption, FilterOptionHasuraGraphQLRepository, FilterType, FirebaseFileUploaderService, FragranceImportances, FraudValidationError, GenderDestination, GlampointsPaymentMethodFactory, GlampointsPaymentService, Group, GroupFirestoreRepository, HairColors, HairProblems, HairStrands, HairTypes, Home, HomeFirestoreRepository, InvalidArgumentError, InvalidCheckoutError, KitProduct, KitProductHasuraGraphQL, Lead, LeadFirestoreRepository, LegacyOrderFirestoreRepository, LineItem, Log, LogDocument, LogFirestoreRepository, Logger, MIN_CAMPAIGN_AI_MODELS, MercadoPagoBankSlipAxiosAdapter, MercadoPagoCardAxiosAdapter, MercadoPagoErrorHelper, MercadoPagoPaymentMethodFactory, MercadoPagoPixAxiosAdapter, MercadoPagoRequestHelper, MercadoPagoResponseHelper, MercadoPagoStatusDetailEnum, MercadoPagoStatusEnum, NotFoundError, ObsEmitter, OfficePosition, Order, OrderBlocked, OrderBlockedFirestoreRepository, OrderBlockedType, OrderFirestoreRepository, OrderPaymentStatus, OrderStatus, PagarMeV5OrderStatus, PagarMeV5PaymentStatus, PagarmeBankSlipAxiosAdapter, PagarmeCardAxiosAdapter, PagarmePaymentMethodFactory, PagarmePaymentStatus, PagarmePixAxiosAdapter, PagarmeV5BankSlipAxiosAdapter, PagarmeV5BaseAxiosAdapter, PagarmeV5CardAxiosAdapter, PagarmeV5PixAxiosAdapter, Payment, PaymentError, PaymentFirestoreRepository, PaymentMethods, PaymentProviderFactory, PaymentProviders, PaymentTransaction, PaymentType, PendingOrder, PendingOrderFirestoreRepository, PersonTypes, Plans, Product, ProductCatalogHasuraGraphQL, ProductCatalogHasuraGraphQLRepository, ProductErrors, ProductErrorsHasuraGraphQL, ProductErrorsHasuraGraphQLRepository, ProductFirestoreRepository, ProductGroup, ProductGroupHasuraGraphQLRepository, ProductHasuraGraphQL, ProductHasuraGraphQLRepository, ProductLabelEnum, ProductPriceLog, ProductPriceLogHasuraGraphQLRepository, ProductReview, ProductReviewHasuraGraphQLRepository, ProductSpents, ProductStockEntry, ProductStockEntryHasuraGraphQL, ProductStockEntryHasuraGraphQLRepository, ProductStockNotification, ProductStockNotificationHasuraGraphQLRepository, ProductVariantFirestoreRepository, ProductsIndex, ProductsVertexSearch, QuestionsFilters, RecoveryPassword, ReflectHelper, Register, RegisterFirebaseAuthService, RequiredArgumentError, RestCacheAdapter, RoundProductPricesHelper, Sequence, SequenceFirestoreRepository, ShippingMethod, ShopConfigs, ShopConfigsFirestoreRepository, ShopMenu, ShopMenuFirestoreRepository, ShopPageName, ShopSettings, ShopSettingsFirestoreRepository, ShoppingRecurrence, ShoppingRecurrenceCycle, ShoppingRecurrenceEdition, ShoppingRecurrenceEditionFirestoreRepository, ShoppingRecurrenceEditionStatus, ShoppingRecurrenceErrorLog, ShoppingRecurrenceErrorLogFirestoreRepository, ShoppingRecurrenceFirestoreRepository, ShoppingRecurrenceStatus, Shops, SignInMethods, SignOut, Status, StockLimitError, StockOutError, Subscription, SubscriptionEditionFirestoreRepository, SubscriptionFirestoreRepository, SubscriptionMaterialization, SubscriptionMaterializationFirestoreRepository, SubscriptionPayment, SubscriptionPaymentFirestoreRepository, SubscriptionPlan, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionSummary, SubscriptionSummaryFirestoreRepository, Trace, TransactionPaymentMethods, UnauthorizedError, UpdateOptionActions, UpdateUserImage, User, UserAddress, UserAddressFirestoreRepository, UserAlreadyRegisteredError, UserBeautyProfileFirestoreRepository, UserFirestoreRepository, UserPaymentMethod, UserPaymentMethodFirestoreRepository, UserType, Variant, VariantHasuraGraphQL, VariantHasuraGraphQLRepository, VertexAxiosAdapter, WeakPasswordError, Where, Wishlist, WishlistHasuraGraphQLRepository, WishlistLogType, assertValidCampaignAiModelOrder, createDefaultCampaignSettings, createDefaultCampaignSettingsAi, createDefaultCampaignSettingsCosts, createDefaultCampaignSettingsHome, deserialize, getClass, is, isAntifraudEnabled, isCampaignLlmModel, isDebuggable, isUUID, isValidCampaignAiModelOrder, parseDateTime, registerClass, resolveAntifraudVolumeLimits, resolveCacheConfig, resolveCampaignGlampointsAmount, resolveClass, serialize, toCents, withCreateFirestore, withCreateHasuraGraphQL, withCrudFirestore, withCrudHasuraGraphQL, withDeleteFirestore, withDeleteHasuraGraphQL, withFindFirestore, withFindHasuraGraphQL, withFirestore, withGetFirestore, withGetHasuraGraphQL, withHasuraGraphQL, withHelpers, withSubCollection, withUpdateFirestore, withUpdateHasuraGraphQL };
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CampaignSettings } from '../models/campaign-settings';
|
|
2
|
+
import { CampaignLlmModel } from '../models/enums/campaign-llm-model.enum';
|
|
3
|
+
import { CampaignSettingsAi, CampaignSettingsCosts, CampaignSettingsHome } from '../models/types/campaign-settings.type';
|
|
4
|
+
export declare const CAMPAIGN_SETTINGS_DOCUMENT_ID = "glam";
|
|
5
|
+
export declare const DEFAULT_CAMPAIGN_GLAMPOINTS_AMOUNT = 15;
|
|
6
|
+
export declare const MIN_CAMPAIGN_AI_MODELS = 2;
|
|
7
|
+
export declare const DEFAULT_CAMPAIGN_AI_MODEL_ORDER: CampaignLlmModel[];
|
|
8
|
+
export declare function isCampaignLlmModel(value: unknown): value is CampaignLlmModel;
|
|
9
|
+
export declare function isValidCampaignAiModelOrder(modelOrder: unknown): modelOrder is CampaignLlmModel[];
|
|
10
|
+
export declare function assertValidCampaignAiModelOrder(modelOrder: unknown): asserts modelOrder is CampaignLlmModel[];
|
|
11
|
+
export declare function resolveCampaignGlampointsAmount(value?: number | null): number;
|
|
12
|
+
export declare function createDefaultCampaignSettingsHome(): CampaignSettingsHome;
|
|
13
|
+
export declare function createDefaultCampaignSettingsAi(): CampaignSettingsAi;
|
|
14
|
+
export declare function createDefaultCampaignSettingsCosts(): CampaignSettingsCosts;
|
|
15
|
+
export declare function createDefaultCampaignSettings(): CampaignSettings;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic';
|
|
2
|
+
import { CampaignGlampointsStatus } from './enums/campaign-glampoints-status.enum';
|
|
3
|
+
import { CampaignHashtagPostsStatus } from './enums/campaign-hashtag-posts-status.enum';
|
|
4
|
+
import { CampaignLlmModel } from './enums/campaign-llm-model.enum';
|
|
5
|
+
import { CampaignSocialNetwork } from './enums/campaign-social-network.enum';
|
|
6
|
+
export declare class CampaignHashtagPosts extends BaseModel<CampaignHashtagPosts> {
|
|
7
|
+
id: string;
|
|
8
|
+
campaignId: string;
|
|
9
|
+
postUrl: string;
|
|
10
|
+
status: CampaignHashtagPostsStatus;
|
|
11
|
+
approved: boolean;
|
|
12
|
+
rating: number;
|
|
13
|
+
personId: number;
|
|
14
|
+
personAccount: string;
|
|
15
|
+
postAnalysis: string;
|
|
16
|
+
postEvaluationDate?: Date;
|
|
17
|
+
consent?: boolean;
|
|
18
|
+
consentDate?: Date;
|
|
19
|
+
metadata: {
|
|
20
|
+
IPAddress: string;
|
|
21
|
+
UserAgent: string;
|
|
22
|
+
Platform: string;
|
|
23
|
+
};
|
|
24
|
+
socialNetwork?: CampaignSocialNetwork;
|
|
25
|
+
thumbnailUrl?: string;
|
|
26
|
+
caption?: string;
|
|
27
|
+
likeCount?: number;
|
|
28
|
+
commentCount?: number;
|
|
29
|
+
takenAt?: Date;
|
|
30
|
+
finalRating?: number;
|
|
31
|
+
aiModel?: CampaignLlmModel;
|
|
32
|
+
analysisCost?: number;
|
|
33
|
+
glampointsCredited?: boolean;
|
|
34
|
+
glampointsCreditedAt?: Date;
|
|
35
|
+
glampointsAmountCredited?: number;
|
|
36
|
+
glampointsStatus?: CampaignGlampointsStatus;
|
|
37
|
+
createdAt?: Date;
|
|
38
|
+
updatedAt?: Date;
|
|
39
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
40
|
+
}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import { BaseModel, GenericIdentifier } from '../../generic';
|
|
2
|
+
import { CampaignSocialNetwork } from './enums/campaign-social-network.enum';
|
|
2
3
|
export declare class CampaignHashtag extends BaseModel<CampaignHashtag> {
|
|
3
4
|
id: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
campaignMaxGlampoints?: number;
|
|
11
|
-
campaignReferCode?: string;
|
|
12
|
-
campaignDescription?: string;
|
|
5
|
+
active: boolean;
|
|
6
|
+
title: string;
|
|
7
|
+
image?: string;
|
|
8
|
+
minimumGlampoints: number;
|
|
9
|
+
maximumGlampoints: number;
|
|
10
|
+
description?: string;
|
|
13
11
|
startDate?: Date;
|
|
14
12
|
endDate?: Date;
|
|
15
|
-
|
|
13
|
+
steps?: string[];
|
|
16
14
|
rules?: string[];
|
|
15
|
+
postsToShowInHome?: number;
|
|
16
|
+
topPosts?: string[];
|
|
17
|
+
socialNetwork?: CampaignSocialNetwork;
|
|
18
|
+
awardGlampoints?: boolean;
|
|
19
|
+
glampointsAmount?: number;
|
|
20
|
+
briefing?: string;
|
|
21
|
+
llmCost?: number;
|
|
22
|
+
createdAt?: Date;
|
|
23
|
+
updatedAt?: Date;
|
|
17
24
|
static get identifiersFields(): GenericIdentifier[];
|
|
18
25
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic';
|
|
2
|
+
import { CampaignSettingsAi, CampaignSettingsCosts, CampaignSettingsHome } from './types/campaign-settings.type';
|
|
3
|
+
export declare class CampaignSettings extends BaseModel<CampaignSettings> {
|
|
4
|
+
id: string;
|
|
5
|
+
home: CampaignSettingsHome;
|
|
6
|
+
ai: CampaignSettingsAi;
|
|
7
|
+
costs: CampaignSettingsCosts;
|
|
8
|
+
createdAt?: Date;
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
11
|
+
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export * from './campaign-glampoints-status.enum';
|
|
2
|
+
export * from './campaign-hashtag-posts-status.enum';
|
|
3
|
+
export * from './campaign-home-sort-mode.enum';
|
|
4
|
+
export * from './campaign-llm-model.enum';
|
|
5
|
+
export * from './campaign-social-network.enum';
|
|
1
6
|
export * from './checkout-types.enum';
|
|
2
7
|
export * from './order-status.enum';
|
|
3
8
|
export * from './shopping-recurrence-cycle.enum';
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
export * from './buy-2-win';
|
|
2
2
|
export * from './campaign-dashboard';
|
|
3
3
|
export * from './campaign-hashtag';
|
|
4
|
+
export * from './campaign-hashtag-posts';
|
|
5
|
+
export * from './campaign-settings';
|
|
4
6
|
export * from './checkout';
|
|
5
7
|
export * from './coupons';
|
|
6
8
|
export * from './enums';
|
|
7
9
|
export * from './line-item';
|
|
8
10
|
export * from './order';
|
|
9
11
|
export * from './order-blocked';
|
|
12
|
+
export * from './pending-order';
|
|
10
13
|
export * from './payment';
|
|
11
14
|
export * from './payment-transaction';
|
|
12
15
|
export * from './recurrence';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
|
|
2
|
+
export type PendingOrderProduct = {
|
|
3
|
+
barra: string;
|
|
4
|
+
brindesite: boolean;
|
|
5
|
+
desconto: number;
|
|
6
|
+
item: string;
|
|
7
|
+
preco: number;
|
|
8
|
+
quantidade: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Queue document for millenium shop-order send/retry.
|
|
12
|
+
* Firestore collection remains `transId` (see PendingOrderFirestoreRepository).
|
|
13
|
+
*/
|
|
14
|
+
export declare class PendingOrder extends BaseModel<PendingOrder> {
|
|
15
|
+
id: string;
|
|
16
|
+
errorMessage?: string[];
|
|
17
|
+
products?: PendingOrderProduct[];
|
|
18
|
+
isReshipment?: boolean;
|
|
19
|
+
static get identifiersFields(): GenericIdentifier[];
|
|
20
|
+
get firstErrorMessage(): string | null;
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CampaignHomeSortMode } from '../enums/campaign-home-sort-mode.enum';
|
|
2
|
+
import { CampaignLlmModel } from '../enums/campaign-llm-model.enum';
|
|
3
|
+
export interface CampaignSettingsHome {
|
|
4
|
+
sortMode: CampaignHomeSortMode;
|
|
5
|
+
pinnedPostIds: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface CampaignSettingsAi {
|
|
8
|
+
modelOrder: CampaignLlmModel[];
|
|
9
|
+
globalRules: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CampaignSettingsCosts {
|
|
12
|
+
totalLlm: number;
|
|
13
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export * from './buy-2-win.repository';
|
|
2
2
|
export * from './campaign-dashboard.repository';
|
|
3
3
|
export * from './campaign-hashtag.repository';
|
|
4
|
+
export * from './campaign-hashtag-posts.repository';
|
|
5
|
+
export * from './campaign-settings.repository';
|
|
4
6
|
export * from './checkout.repository';
|
|
5
7
|
export * from './coupon.repository';
|
|
6
8
|
export * from './legacy-order.repository';
|
|
7
9
|
export * from './order-blocked.repository';
|
|
8
10
|
export * from './order.repository';
|
|
11
|
+
export * from './pending-order.repository';
|
|
9
12
|
export * from './payment.repository';
|
|
10
13
|
export * from './recurrence';
|
|
11
14
|
export * from './subscription';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CampaignHashtagPosts } from '../../../../../domain/shopping/models/campaign-hashtag-posts';
|
|
2
|
+
import { CampaignHashtagPostsRepository } from '../../../../../domain/shopping/repositories/campaign-hashtag-posts.repository';
|
|
3
|
+
import { FirestoreConstructorParams } from '../../mixins';
|
|
4
|
+
declare const CampaignHashtagPostsFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<CampaignHashtagPosts> & import("../../../../..").CrudRepository<CampaignHashtagPosts, import("../../../../..").CrudParams<CampaignHashtagPosts>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<CampaignHashtagPosts>, ...any[]]>;
|
|
5
|
+
export declare class CampaignHashtagPostsFirestoreRepository extends CampaignHashtagPostsFirestoreRepository_base implements CampaignHashtagPostsRepository {
|
|
6
|
+
constructor({ firestore, interceptors, cache, }: Pick<FirestoreConstructorParams<CampaignHashtagPosts>, 'firestore' | 'interceptors' | 'cache'>);
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CampaignSettings } from '../../../../../domain/shopping/models/campaign-settings';
|
|
2
|
+
import { CampaignSettingsRepository } from '../../../../../domain/shopping/repositories/campaign-settings.repository';
|
|
3
|
+
import { FirestoreConstructorParams } from '../../mixins';
|
|
4
|
+
declare const CampaignSettingsFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<CampaignSettings> & import("../../../../..").CrudRepository<CampaignSettings, import("../../../../..").CrudParams<CampaignSettings>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<CampaignSettings>, ...any[]]>;
|
|
5
|
+
export declare class CampaignSettingsFirestoreRepository extends CampaignSettingsFirestoreRepository_base implements CampaignSettingsRepository {
|
|
6
|
+
constructor({ firestore, interceptors, cache, }: Pick<FirestoreConstructorParams<CampaignSettings>, 'firestore' | 'interceptors' | 'cache'>);
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './buy-2-win-firestore.repository';
|
|
2
2
|
export * from './campaign-dashboard-firestore.repository';
|
|
3
3
|
export * from './campaign-hashtag-firestore.repository';
|
|
4
|
+
export * from './campaign-hashtag-posts-firestore.repository';
|
|
5
|
+
export * from './campaign-settings-firestore.repository';
|
|
4
6
|
export * from './checkout-firestore.repository';
|
|
5
7
|
export * from './checkout-subscription-firestore.repository';
|
|
6
8
|
export * from './coupon-firestore.repository';
|
|
@@ -8,6 +10,7 @@ export * from './legacy-order-firestore.repository';
|
|
|
8
10
|
export * from './order-blocked-firestore.repository';
|
|
9
11
|
export * from './order-firestore.repository';
|
|
10
12
|
export * from './payment-firestore.repository';
|
|
13
|
+
export * from './pending-order-firestore.repository';
|
|
11
14
|
export * from './shopping-recurrence-edition-firestore.repository';
|
|
12
15
|
export * from './shopping-recurrence-error-log-firestore.repository';
|
|
13
16
|
export * from './shopping-recurrence-firestore.repository';
|
package/src/infra/firebase/firestore/repositories/shopping/pending-order-firestore.repository.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PendingOrder, PendingOrderRepository } from '../../../../../domain';
|
|
2
|
+
import { FirestoreConstructorParams } from '../../mixins';
|
|
3
|
+
declare const PendingOrderFirestoreRepository_base: import("../../../../../utils").MixinCtor<import("../..").FirestoreRepository<PendingOrder> & import("../../../../../domain").CrudRepository<PendingOrder, import("../../../../../domain").CrudParams<PendingOrder>> & import("../..").FirestoreHelpers, [FirestoreConstructorParams<PendingOrder>, ...any[]]>;
|
|
4
|
+
export declare class PendingOrderFirestoreRepository extends PendingOrderFirestoreRepository_base implements PendingOrderRepository {
|
|
5
|
+
constructor({ firestore, interceptors, cache, }: Pick<FirestoreConstructorParams<PendingOrder>, 'firestore' | 'interceptors' | 'cache'>);
|
|
6
|
+
}
|
|
7
|
+
export {};
|