@infrab4a/connect 5.8.5 → 5.8.8
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 +215 -50
- package/index.esm.js +200 -51
- 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 +19 -1
- package/src/domain/shopping/models/campaign-hashtag.d.ts +6 -1
- package/src/domain/shopping/models/campaign-settings.d.ts +11 -0
- package/src/domain/shopping/models/checkout.d.ts +1 -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 +2 -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-settings.repository.d.ts +4 -0
- package/src/domain/shopping/repositories/index.d.ts +2 -0
- package/src/domain/shopping/repositories/pending-order.repository.d.ts +4 -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 +2 -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'];
|
|
@@ -1818,6 +1900,28 @@ tslib.__decorate([
|
|
|
1818
1900
|
tslib.__metadata("design:type", Coupon)
|
|
1819
1901
|
], Checkout.prototype, "coupon", void 0);
|
|
1820
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
|
+
|
|
1821
1925
|
exports.CheckoutTypes = void 0;
|
|
1822
1926
|
(function (CheckoutTypes) {
|
|
1823
1927
|
CheckoutTypes[CheckoutTypes["ECOMMERCE"] = 1] = "ECOMMERCE";
|
|
@@ -1880,6 +1984,27 @@ class OrderBlocked extends BaseModel {
|
|
|
1880
1984
|
}
|
|
1881
1985
|
}
|
|
1882
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
|
+
|
|
1883
2008
|
class ShoppingRecurrence extends BaseModel {
|
|
1884
2009
|
static get identifiersFields() {
|
|
1885
2010
|
return ['id'];
|
|
@@ -5671,6 +5796,18 @@ class CampaignHashtagPostsFirestoreRepository extends withCrudFirestore(withHelp
|
|
|
5671
5796
|
}
|
|
5672
5797
|
}
|
|
5673
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
|
+
|
|
5674
5811
|
class CheckoutFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5675
5812
|
constructor({ firestore, interceptors, cache, }) {
|
|
5676
5813
|
super({
|
|
@@ -5826,6 +5963,18 @@ class PaymentFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
5826
5963
|
}
|
|
5827
5964
|
}
|
|
5828
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
|
+
|
|
5829
5978
|
class ShoppingRecurrenceEditionFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5830
5979
|
constructor({ firestore, interceptors, cache, }) {
|
|
5831
5980
|
super({
|
|
@@ -11925,6 +12074,7 @@ exports.BrandCategoryFirestoreRepository = BrandCategoryFirestoreRepository;
|
|
|
11925
12074
|
exports.BusinessError = BusinessError;
|
|
11926
12075
|
exports.Buy2Win = Buy2Win;
|
|
11927
12076
|
exports.Buy2WinFirestoreRepository = Buy2WinFirestoreRepository;
|
|
12077
|
+
exports.CAMPAIGN_SETTINGS_DOCUMENT_ID = CAMPAIGN_SETTINGS_DOCUMENT_ID;
|
|
11928
12078
|
exports.Campaign = Campaign;
|
|
11929
12079
|
exports.CampaignBanner = CampaignBanner;
|
|
11930
12080
|
exports.CampaignDashboard = CampaignDashboard;
|
|
@@ -11933,6 +12083,8 @@ exports.CampaignHashtag = CampaignHashtag;
|
|
|
11933
12083
|
exports.CampaignHashtagFirestoreRepository = CampaignHashtagFirestoreRepository;
|
|
11934
12084
|
exports.CampaignHashtagPosts = CampaignHashtagPosts;
|
|
11935
12085
|
exports.CampaignHashtagPostsFirestoreRepository = CampaignHashtagPostsFirestoreRepository;
|
|
12086
|
+
exports.CampaignSettings = CampaignSettings;
|
|
12087
|
+
exports.CampaignSettingsFirestoreRepository = CampaignSettingsFirestoreRepository;
|
|
11936
12088
|
exports.Category = Category;
|
|
11937
12089
|
exports.CategoryCollectionChildren = CategoryCollectionChildren;
|
|
11938
12090
|
exports.CategoryCollectionChildrenHasuraGraphQLRepository = CategoryCollectionChildrenHasuraGraphQLRepository;
|
|
@@ -11955,6 +12107,8 @@ exports.ConnectFirestoreService = ConnectFirestoreService;
|
|
|
11955
12107
|
exports.Coupon = Coupon;
|
|
11956
12108
|
exports.CouponFirestoreRepository = CouponFirestoreRepository;
|
|
11957
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;
|
|
11958
12112
|
exports.DEFAULT_SHOP_ANTIFRAUD_CONFIG = DEFAULT_SHOP_ANTIFRAUD_CONFIG;
|
|
11959
12113
|
exports.Debug = Debug;
|
|
11960
12114
|
exports.DebugDecoratorHelper = DebugDecoratorHelper;
|
|
@@ -11985,6 +12139,7 @@ exports.Log = Log;
|
|
|
11985
12139
|
exports.LogDocument = LogDocument;
|
|
11986
12140
|
exports.LogFirestoreRepository = LogFirestoreRepository;
|
|
11987
12141
|
exports.Logger = Logger;
|
|
12142
|
+
exports.MIN_CAMPAIGN_AI_MODELS = MIN_CAMPAIGN_AI_MODELS;
|
|
11988
12143
|
exports.MercadoPagoBankSlipAxiosAdapter = MercadoPagoBankSlipAxiosAdapter;
|
|
11989
12144
|
exports.MercadoPagoCardAxiosAdapter = MercadoPagoCardAxiosAdapter;
|
|
11990
12145
|
exports.MercadoPagoErrorHelper = MercadoPagoErrorHelper;
|
|
@@ -12011,6 +12166,8 @@ exports.PaymentError = PaymentError;
|
|
|
12011
12166
|
exports.PaymentFirestoreRepository = PaymentFirestoreRepository;
|
|
12012
12167
|
exports.PaymentProviderFactory = PaymentProviderFactory;
|
|
12013
12168
|
exports.PaymentTransaction = PaymentTransaction;
|
|
12169
|
+
exports.PendingOrder = PendingOrder;
|
|
12170
|
+
exports.PendingOrderFirestoreRepository = PendingOrderFirestoreRepository;
|
|
12014
12171
|
exports.Product = Product;
|
|
12015
12172
|
exports.ProductCatalogHasuraGraphQL = ProductCatalogHasuraGraphQL;
|
|
12016
12173
|
exports.ProductCatalogHasuraGraphQLRepository = ProductCatalogHasuraGraphQLRepository;
|
|
@@ -12089,16 +12246,24 @@ exports.VertexAxiosAdapter = VertexAxiosAdapter;
|
|
|
12089
12246
|
exports.WeakPasswordError = WeakPasswordError;
|
|
12090
12247
|
exports.Wishlist = Wishlist;
|
|
12091
12248
|
exports.WishlistHasuraGraphQLRepository = WishlistHasuraGraphQLRepository;
|
|
12249
|
+
exports.assertValidCampaignAiModelOrder = assertValidCampaignAiModelOrder;
|
|
12250
|
+
exports.createDefaultCampaignSettings = createDefaultCampaignSettings;
|
|
12251
|
+
exports.createDefaultCampaignSettingsAi = createDefaultCampaignSettingsAi;
|
|
12252
|
+
exports.createDefaultCampaignSettingsCosts = createDefaultCampaignSettingsCosts;
|
|
12253
|
+
exports.createDefaultCampaignSettingsHome = createDefaultCampaignSettingsHome;
|
|
12092
12254
|
exports.deserialize = deserialize;
|
|
12093
12255
|
exports.getClass = getClass;
|
|
12094
12256
|
exports.is = is;
|
|
12095
12257
|
exports.isAntifraudEnabled = isAntifraudEnabled;
|
|
12258
|
+
exports.isCampaignLlmModel = isCampaignLlmModel;
|
|
12096
12259
|
exports.isDebuggable = isDebuggable;
|
|
12097
12260
|
exports.isUUID = isUUID;
|
|
12261
|
+
exports.isValidCampaignAiModelOrder = isValidCampaignAiModelOrder;
|
|
12098
12262
|
exports.parseDateTime = parseDateTime;
|
|
12099
12263
|
exports.registerClass = registerClass;
|
|
12100
12264
|
exports.resolveAntifraudVolumeLimits = resolveAntifraudVolumeLimits;
|
|
12101
12265
|
exports.resolveCacheConfig = resolveCacheConfig;
|
|
12266
|
+
exports.resolveCampaignGlampointsAmount = resolveCampaignGlampointsAmount;
|
|
12102
12267
|
exports.resolveClass = resolveClass;
|
|
12103
12268
|
exports.serialize = serialize;
|
|
12104
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'];
|
|
@@ -1812,6 +1894,28 @@ __decorate([
|
|
|
1812
1894
|
__metadata("design:type", Coupon)
|
|
1813
1895
|
], Checkout.prototype, "coupon", void 0);
|
|
1814
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
|
+
|
|
1815
1919
|
var CheckoutTypes;
|
|
1816
1920
|
(function (CheckoutTypes) {
|
|
1817
1921
|
CheckoutTypes[CheckoutTypes["ECOMMERCE"] = 1] = "ECOMMERCE";
|
|
@@ -1874,6 +1978,27 @@ class OrderBlocked extends BaseModel {
|
|
|
1874
1978
|
}
|
|
1875
1979
|
}
|
|
1876
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
|
+
|
|
1877
2002
|
class ShoppingRecurrence extends BaseModel {
|
|
1878
2003
|
static get identifiersFields() {
|
|
1879
2004
|
return ['id'];
|
|
@@ -5665,6 +5790,18 @@ class CampaignHashtagPostsFirestoreRepository extends withCrudFirestore(withHelp
|
|
|
5665
5790
|
}
|
|
5666
5791
|
}
|
|
5667
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
|
+
|
|
5668
5805
|
class CheckoutFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5669
5806
|
constructor({ firestore, interceptors, cache, }) {
|
|
5670
5807
|
super({
|
|
@@ -5820,6 +5957,18 @@ class PaymentFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
5820
5957
|
}
|
|
5821
5958
|
}
|
|
5822
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
|
+
|
|
5823
5972
|
class ShoppingRecurrenceEditionFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
5824
5973
|
constructor({ firestore, interceptors, cache, }) {
|
|
5825
5974
|
super({
|
|
@@ -11770,4 +11919,4 @@ class ProductsVertexSearch {
|
|
|
11770
11919
|
}
|
|
11771
11920
|
}
|
|
11772
11921
|
|
|
11773
|
-
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, CampaignHashtagPosts, CampaignHashtagPostsFirestoreRepository, 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;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
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';
|
|
2
6
|
export declare class CampaignHashtagPosts extends BaseModel<CampaignHashtagPosts> {
|
|
3
7
|
id: string;
|
|
4
8
|
campaignId: string;
|
|
5
9
|
postUrl: string;
|
|
6
|
-
status:
|
|
10
|
+
status: CampaignHashtagPostsStatus;
|
|
7
11
|
approved: boolean;
|
|
8
12
|
rating: number;
|
|
9
13
|
personId: number;
|
|
@@ -17,6 +21,20 @@ export declare class CampaignHashtagPosts extends BaseModel<CampaignHashtagPosts
|
|
|
17
21
|
UserAgent: string;
|
|
18
22
|
Platform: string;
|
|
19
23
|
};
|
|
24
|
+
socialNetwork?: CampaignSocialNetwork;
|
|
25
|
+
thumbnailUrl?: string;
|
|
26
|
+
imageUrl?: string;
|
|
27
|
+
caption?: string;
|
|
28
|
+
likeCount?: number;
|
|
29
|
+
commentCount?: number;
|
|
30
|
+
takenAt?: Date;
|
|
31
|
+
finalRating?: number;
|
|
32
|
+
aiModel?: CampaignLlmModel;
|
|
33
|
+
analysisCost?: number;
|
|
34
|
+
glampointsCredited?: boolean;
|
|
35
|
+
glampointsCreditedAt?: Date;
|
|
36
|
+
glampointsAmountCredited?: number;
|
|
37
|
+
glampointsStatus?: CampaignGlampointsStatus;
|
|
20
38
|
createdAt?: Date;
|
|
21
39
|
updatedAt?: Date;
|
|
22
40
|
static get identifiersFields(): GenericIdentifier[];
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
active: boolean;
|
|
5
6
|
title: string;
|
|
6
|
-
hashtagCode: string;
|
|
7
7
|
image?: string;
|
|
8
8
|
minimumGlampoints: number;
|
|
9
9
|
maximumGlampoints: number;
|
|
@@ -14,6 +14,11 @@ export declare class CampaignHashtag extends BaseModel<CampaignHashtag> {
|
|
|
14
14
|
rules?: string[];
|
|
15
15
|
postsToShowInHome?: number;
|
|
16
16
|
topPosts?: string[];
|
|
17
|
+
socialNetwork?: CampaignSocialNetwork;
|
|
18
|
+
awardGlampoints?: boolean;
|
|
19
|
+
glampointsAmount?: number;
|
|
20
|
+
briefing?: string;
|
|
21
|
+
llmCost?: number;
|
|
17
22
|
createdAt?: Date;
|
|
18
23
|
updatedAt?: Date;
|
|
19
24
|
static get identifiersFields(): GenericIdentifier[];
|
|
@@ -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';
|
|
@@ -2,12 +2,14 @@ export * from './buy-2-win';
|
|
|
2
2
|
export * from './campaign-dashboard';
|
|
3
3
|
export * from './campaign-hashtag';
|
|
4
4
|
export * from './campaign-hashtag-posts';
|
|
5
|
+
export * from './campaign-settings';
|
|
5
6
|
export * from './checkout';
|
|
6
7
|
export * from './coupons';
|
|
7
8
|
export * from './enums';
|
|
8
9
|
export * from './line-item';
|
|
9
10
|
export * from './order';
|
|
10
11
|
export * from './order-blocked';
|
|
12
|
+
export * from './pending-order';
|
|
11
13
|
export * from './payment';
|
|
12
14
|
export * from './payment-transaction';
|
|
13
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
|
+
}
|
|
@@ -2,11 +2,13 @@ export * from './buy-2-win.repository';
|
|
|
2
2
|
export * from './campaign-dashboard.repository';
|
|
3
3
|
export * from './campaign-hashtag.repository';
|
|
4
4
|
export * from './campaign-hashtag-posts.repository';
|
|
5
|
+
export * from './campaign-settings.repository';
|
|
5
6
|
export * from './checkout.repository';
|
|
6
7
|
export * from './coupon.repository';
|
|
7
8
|
export * from './legacy-order.repository';
|
|
8
9
|
export * from './order-blocked.repository';
|
|
9
10
|
export * from './order.repository';
|
|
11
|
+
export * from './pending-order.repository';
|
|
10
12
|
export * from './payment.repository';
|
|
11
13
|
export * from './recurrence';
|
|
12
14
|
export * from './subscription';
|
|
@@ -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 {};
|
|
@@ -2,6 +2,7 @@ export * from './buy-2-win-firestore.repository';
|
|
|
2
2
|
export * from './campaign-dashboard-firestore.repository';
|
|
3
3
|
export * from './campaign-hashtag-firestore.repository';
|
|
4
4
|
export * from './campaign-hashtag-posts-firestore.repository';
|
|
5
|
+
export * from './campaign-settings-firestore.repository';
|
|
5
6
|
export * from './checkout-firestore.repository';
|
|
6
7
|
export * from './checkout-subscription-firestore.repository';
|
|
7
8
|
export * from './coupon-firestore.repository';
|
|
@@ -9,6 +10,7 @@ export * from './legacy-order-firestore.repository';
|
|
|
9
10
|
export * from './order-blocked-firestore.repository';
|
|
10
11
|
export * from './order-firestore.repository';
|
|
11
12
|
export * from './payment-firestore.repository';
|
|
13
|
+
export * from './pending-order-firestore.repository';
|
|
12
14
|
export * from './shopping-recurrence-edition-firestore.repository';
|
|
13
15
|
export * from './shopping-recurrence-error-log-firestore.repository';
|
|
14
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 {};
|