@artisan-commerce/builders 0.7.0-canary.63 → 0.7.0-canary.64
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/dist/bundle.cjs +100 -100
- package/dist/bundle.cjs.map +1 -1
- package/dist/bundle.d.ts +1 -1
- package/dist/bundle.mjs +100 -100
- package/dist/bundle.mjs.map +1 -1
- package/dist/bundle.umd.js +100 -100
- package/dist/bundle.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/bundle.cjs
CHANGED
|
@@ -130,7 +130,7 @@ const genMobilPhone = (countryCode) => {
|
|
|
130
130
|
};
|
|
131
131
|
const genCountry = (id, name) => {
|
|
132
132
|
const country = {
|
|
133
|
-
id: id != null ? id :
|
|
133
|
+
id: id != null ? id : genId(),
|
|
134
134
|
name: name != null ? name : genCountryName()
|
|
135
135
|
};
|
|
136
136
|
return country;
|
|
@@ -252,7 +252,7 @@ var __spreadValues$h = (a, b) => {
|
|
|
252
252
|
};
|
|
253
253
|
const buildAccount = (overrides = {}) => {
|
|
254
254
|
return __spreadValues$h({
|
|
255
|
-
accountId:
|
|
255
|
+
accountId: genId(),
|
|
256
256
|
name: genName(),
|
|
257
257
|
description: genBiasBoolean(0.5) ? genParagraph() : void 0,
|
|
258
258
|
images: genCDNImages(void 0, { query: "brand" })
|
|
@@ -301,14 +301,14 @@ const buildBanner = (overrides = {}) => {
|
|
|
301
301
|
image_url: buildURLImage(),
|
|
302
302
|
banner_qr_code: "",
|
|
303
303
|
coupon: buildBannerCoupon(),
|
|
304
|
-
coupon_id:
|
|
304
|
+
coupon_id: genId(),
|
|
305
305
|
banner_type: chooseRandom(bannerTypes),
|
|
306
306
|
image_file_name: `${genWord}.jpg`,
|
|
307
307
|
benefits: genBannerBenefits(),
|
|
308
|
-
vendor_id:
|
|
308
|
+
vendor_id: genId(),
|
|
309
309
|
vendor_name: faker.faker.company.name(),
|
|
310
310
|
scope: chooseRandom(bannerScopes),
|
|
311
|
-
banner_category_id:
|
|
311
|
+
banner_category_id: genId(),
|
|
312
312
|
product_id: null,
|
|
313
313
|
product_name: null,
|
|
314
314
|
stores: [],
|
|
@@ -316,9 +316,9 @@ const buildBanner = (overrides = {}) => {
|
|
|
316
316
|
image_bucket: null,
|
|
317
317
|
image_cloud_front_url: genURL(),
|
|
318
318
|
image_key: `banners/${genWord}.jpg`,
|
|
319
|
-
category_id:
|
|
319
|
+
category_id: genId(),
|
|
320
320
|
category_name: faker.faker.company.name(),
|
|
321
|
-
channel_id:
|
|
321
|
+
channel_id: genId(),
|
|
322
322
|
images: genBannerImages(),
|
|
323
323
|
section: null
|
|
324
324
|
}, overrides);
|
|
@@ -332,7 +332,7 @@ const buildBannerCoupon = (overrides = {}) => {
|
|
|
332
332
|
};
|
|
333
333
|
const buildBannerBenefits = (overrides = {}) => {
|
|
334
334
|
return __spreadValues$g({
|
|
335
|
-
id:
|
|
335
|
+
id: genId(),
|
|
336
336
|
name: genWord()
|
|
337
337
|
}, overrides);
|
|
338
338
|
};
|
|
@@ -345,7 +345,7 @@ const genBanners = (quantity) => {
|
|
|
345
345
|
const buildBannerImage = (overrides = {}) => {
|
|
346
346
|
return __spreadValues$g({
|
|
347
347
|
file_name: `${genWord}.jpg`,
|
|
348
|
-
id:
|
|
348
|
+
id: genId(),
|
|
349
349
|
image_file_name: `${genWord}.jpg`,
|
|
350
350
|
image_key: `banners/${genWord}.jpg`,
|
|
351
351
|
image_url: buildURLImage(),
|
|
@@ -386,7 +386,7 @@ var __spreadValues$f = (a, b) => {
|
|
|
386
386
|
};
|
|
387
387
|
const buildBillingData = (overrides = {}) => {
|
|
388
388
|
return __spreadValues$f({
|
|
389
|
-
id:
|
|
389
|
+
id: genId(),
|
|
390
390
|
name: `${genName()} ${genName()}`,
|
|
391
391
|
nickname: genName(),
|
|
392
392
|
documentType: genDocumentType(),
|
|
@@ -721,7 +721,7 @@ var __spreadValues$c = (a, b) => {
|
|
|
721
721
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
722
722
|
const buildCategory = (overrides = {}) => {
|
|
723
723
|
return __spreadValues$c({
|
|
724
|
-
categoryId:
|
|
724
|
+
categoryId: genId(),
|
|
725
725
|
displayInMenu: genBiasBoolean(0.9),
|
|
726
726
|
images: genCDNImages(void 0, { width: 1200, height: 400 }),
|
|
727
727
|
name: genName(),
|
|
@@ -782,7 +782,7 @@ const countriesCodes = [
|
|
|
782
782
|
];
|
|
783
783
|
const buildCountryCurrency = (overrides = {}) => {
|
|
784
784
|
return __spreadValues$b({
|
|
785
|
-
id:
|
|
785
|
+
id: genId(),
|
|
786
786
|
name: chooseRandom(["USD", "EUR", "CHL"]),
|
|
787
787
|
sign: genSymbol(),
|
|
788
788
|
external_id: genId()
|
|
@@ -793,7 +793,7 @@ const genCountryCurrencies = (quantity) => {
|
|
|
793
793
|
};
|
|
794
794
|
const buildCountry = (overrides = {}) => {
|
|
795
795
|
return __spreadValues$b({
|
|
796
|
-
id:
|
|
796
|
+
id: genId(),
|
|
797
797
|
code: chooseRandom(countriesCodes),
|
|
798
798
|
currency: buildCountryCurrency(),
|
|
799
799
|
name: genName()
|
|
@@ -837,11 +837,11 @@ const buildBenefit = (overrides = {}) => {
|
|
|
837
837
|
];
|
|
838
838
|
const type = chooseRandom(benefitTypes);
|
|
839
839
|
return __spreadValues$a({
|
|
840
|
-
accountId:
|
|
840
|
+
accountId: genId(),
|
|
841
841
|
hash: genId(),
|
|
842
842
|
award: type === "PRODUCT" ? genAwards(1) : buildAward(),
|
|
843
|
-
benefitId:
|
|
844
|
-
benefitWalletId:
|
|
843
|
+
benefitId: genId(),
|
|
844
|
+
benefitWalletId: genId(),
|
|
845
845
|
code: null,
|
|
846
846
|
combined: genWord(),
|
|
847
847
|
createdAt: genDate(),
|
|
@@ -859,7 +859,7 @@ const buildBenefit = (overrides = {}) => {
|
|
|
859
859
|
title: genWords(3),
|
|
860
860
|
type,
|
|
861
861
|
updatedAt: genDate(),
|
|
862
|
-
channelId:
|
|
862
|
+
channelId: genId(),
|
|
863
863
|
vendorId: genNumber(30).toString()
|
|
864
864
|
}, overrides);
|
|
865
865
|
};
|
|
@@ -868,13 +868,13 @@ const genBenefits = (quantity) => {
|
|
|
868
868
|
};
|
|
869
869
|
const buildAward = (overrides = {}) => {
|
|
870
870
|
return __spreadValues$a({
|
|
871
|
-
benefitId:
|
|
871
|
+
benefitId: genId(),
|
|
872
872
|
discountPercentage: genNumber(100),
|
|
873
873
|
discountValue: null,
|
|
874
|
-
id:
|
|
874
|
+
id: genId(),
|
|
875
875
|
amount: genNumber(5),
|
|
876
876
|
productDescription: genWords(5),
|
|
877
|
-
productId:
|
|
877
|
+
productId: genId(),
|
|
878
878
|
vendorId: genNumber(99).toString()
|
|
879
879
|
}, overrides);
|
|
880
880
|
};
|
|
@@ -892,7 +892,7 @@ const genWallets = (quantity) => {
|
|
|
892
892
|
const buildStoreCoupon = (overrides = {}) => {
|
|
893
893
|
return __spreadValues$a({
|
|
894
894
|
featured: genBiasBoolean(0.5),
|
|
895
|
-
id:
|
|
895
|
+
id: genId(),
|
|
896
896
|
name: genCompanyName(),
|
|
897
897
|
vendor_id: genNumber(9999).toString(),
|
|
898
898
|
coupons: genCoupons()
|
|
@@ -904,12 +904,12 @@ const genStoreCoupons = (quantity) => {
|
|
|
904
904
|
const buildProductCoupon = (overrides = {}) => {
|
|
905
905
|
return __spreadValues$a({
|
|
906
906
|
amount: genNumber(1),
|
|
907
|
-
id:
|
|
908
|
-
benefitId:
|
|
907
|
+
id: genId(),
|
|
908
|
+
benefitId: genId(),
|
|
909
909
|
discountPercentage: genNumber(100),
|
|
910
910
|
discountValue: genNumber(10),
|
|
911
911
|
productDescription: genWords(3),
|
|
912
|
-
productId:
|
|
912
|
+
productId: genId(),
|
|
913
913
|
swapProductId: null,
|
|
914
914
|
vendorId: genNumber(999).toString()
|
|
915
915
|
}, overrides);
|
|
@@ -919,7 +919,7 @@ const genProductCoupons = (quantity) => {
|
|
|
919
919
|
};
|
|
920
920
|
const buildBenefitData = (overrides = {}) => {
|
|
921
921
|
return __spreadValues$a({
|
|
922
|
-
account_id:
|
|
922
|
+
account_id: genId(),
|
|
923
923
|
amount: genNumber(1),
|
|
924
924
|
automatic_redeemed: genBiasBoolean(0.1).toString(),
|
|
925
925
|
code: genWord().toUpperCase(),
|
|
@@ -931,7 +931,7 @@ const buildBenefitData = (overrides = {}) => {
|
|
|
931
931
|
error_validation: genWords(3),
|
|
932
932
|
expiration_date: genDate(),
|
|
933
933
|
external_id: genNumber(1e4).toString(),
|
|
934
|
-
id:
|
|
934
|
+
id: genId(),
|
|
935
935
|
image: null,
|
|
936
936
|
instruction: null,
|
|
937
937
|
limit_award: null,
|
|
@@ -963,7 +963,7 @@ const buildCoupon = (overrides = {}) => {
|
|
|
963
963
|
codes: genCodes(),
|
|
964
964
|
end_date: genDate(),
|
|
965
965
|
image: buildURLImage({ query: "coupon" }),
|
|
966
|
-
id:
|
|
966
|
+
id: genId(),
|
|
967
967
|
name: genWord(),
|
|
968
968
|
only_store: genBiasBoolean(0.6),
|
|
969
969
|
spend: genNumber(100),
|
|
@@ -982,7 +982,7 @@ const genCoupons = (quantity) => {
|
|
|
982
982
|
const buildCouponCategory = (overrides = {}) => {
|
|
983
983
|
return __spreadValues$a({
|
|
984
984
|
featured: genBiasBoolean(0.5),
|
|
985
|
-
id:
|
|
985
|
+
id: genId(),
|
|
986
986
|
name: genWord()
|
|
987
987
|
}, overrides);
|
|
988
988
|
};
|
|
@@ -992,8 +992,8 @@ const genCouponCategories = (quantity) => {
|
|
|
992
992
|
const buildCode = (overrides = {}) => {
|
|
993
993
|
return __spreadValues$a({
|
|
994
994
|
code: genWord().toUpperCase(),
|
|
995
|
-
coupon_id:
|
|
996
|
-
id:
|
|
995
|
+
coupon_id: genId(),
|
|
996
|
+
id: genId(),
|
|
997
997
|
status: chooseRandom(["ACTIVE", "INACTIVE"]),
|
|
998
998
|
jwt: buildToken(),
|
|
999
999
|
used: genBiasBoolean(0.5)
|
|
@@ -1019,7 +1019,7 @@ const buildStoreCouponDetail = (overrides = {}) => {
|
|
|
1019
1019
|
codes: genCodes(),
|
|
1020
1020
|
end_date: genDate(),
|
|
1021
1021
|
image: buildURLImage({ query: "coupon", height: 200, width: 544 }),
|
|
1022
|
-
id:
|
|
1022
|
+
id: genId(),
|
|
1023
1023
|
name: genWord(),
|
|
1024
1024
|
only_store: genBiasBoolean(0.6),
|
|
1025
1025
|
spend: genNumber(100),
|
|
@@ -1102,17 +1102,17 @@ const buildIssue = (overrides = {}) => {
|
|
|
1102
1102
|
children: [],
|
|
1103
1103
|
related: [],
|
|
1104
1104
|
step: buildStepWorkflow(),
|
|
1105
|
-
account_id:
|
|
1105
|
+
account_id: genId(),
|
|
1106
1106
|
additional_info: buildIssueAdditionalInfo(),
|
|
1107
|
-
client_issue_id:
|
|
1108
|
-
transaction_id:
|
|
1107
|
+
client_issue_id: genId(),
|
|
1108
|
+
transaction_id: genId(),
|
|
1109
1109
|
history: genIssueHistory(),
|
|
1110
|
-
id:
|
|
1110
|
+
id: genId(),
|
|
1111
1111
|
parent_issue_id: null,
|
|
1112
1112
|
related_issue_id: null,
|
|
1113
|
-
step_id:
|
|
1114
|
-
vendor_id:
|
|
1115
|
-
workflow_id:
|
|
1113
|
+
step_id: genId(),
|
|
1114
|
+
vendor_id: genId(),
|
|
1115
|
+
workflow_id: genId()
|
|
1116
1116
|
}, overrides);
|
|
1117
1117
|
};
|
|
1118
1118
|
const genIssues = (quantity) => {
|
|
@@ -1139,10 +1139,10 @@ const buildIssueHistory = (overrides = {}) => {
|
|
|
1139
1139
|
created_at: genDate(),
|
|
1140
1140
|
finished_at: genDate(),
|
|
1141
1141
|
additional_info: buildIssueAdditionalInfo(),
|
|
1142
|
-
id:
|
|
1143
|
-
step_id:
|
|
1142
|
+
id: genId(),
|
|
1143
|
+
step_id: genId(),
|
|
1144
1144
|
step_name: genWords(2),
|
|
1145
|
-
transition_id:
|
|
1145
|
+
transition_id: genId()
|
|
1146
1146
|
}, overrides);
|
|
1147
1147
|
};
|
|
1148
1148
|
const genIssueHistory = (quantity) => {
|
|
@@ -1151,7 +1151,7 @@ const genIssueHistory = (quantity) => {
|
|
|
1151
1151
|
const buildWorkflow = (overrides = {}) => {
|
|
1152
1152
|
return __spreadValues$9({
|
|
1153
1153
|
description: genWords(7),
|
|
1154
|
-
id:
|
|
1154
|
+
id: genId(),
|
|
1155
1155
|
name: genCompanyName(),
|
|
1156
1156
|
steps: genStepWorkflows(),
|
|
1157
1157
|
webhooks: genWebhookWorkflows()
|
|
@@ -1175,7 +1175,7 @@ const buildStepWorkflow = (overrides = {}) => {
|
|
|
1175
1175
|
category: chooseRandom(stepCategory),
|
|
1176
1176
|
code: chooseRandom(stepCode),
|
|
1177
1177
|
color: chooseRandom(["#FFFFFF", "#000000"]),
|
|
1178
|
-
id:
|
|
1178
|
+
id: genId(),
|
|
1179
1179
|
description: genWords(10),
|
|
1180
1180
|
description_frontend: genWords(5),
|
|
1181
1181
|
name: genCompanyName(),
|
|
@@ -1197,7 +1197,7 @@ const buildWebhookWorkflow = (overrides = {}) => {
|
|
|
1197
1197
|
"PUT"
|
|
1198
1198
|
];
|
|
1199
1199
|
return __spreadValues$9({
|
|
1200
|
-
id:
|
|
1200
|
+
id: genId(),
|
|
1201
1201
|
method: chooseRandom(methods),
|
|
1202
1202
|
url: genURL()
|
|
1203
1203
|
}, overrides);
|
|
@@ -1240,14 +1240,14 @@ const genStepWorkflowGroups = (quantity) => {
|
|
|
1240
1240
|
};
|
|
1241
1241
|
const buildTransitionWorkflow = (overrides = {}) => {
|
|
1242
1242
|
return __spreadValues$9({
|
|
1243
|
-
channel_id:
|
|
1243
|
+
channel_id: genId(),
|
|
1244
1244
|
conditions: [],
|
|
1245
1245
|
description: genWords(10),
|
|
1246
|
-
from_step_id:
|
|
1247
|
-
to_step_id:
|
|
1248
|
-
id:
|
|
1246
|
+
from_step_id: genId(),
|
|
1247
|
+
to_step_id: genId(),
|
|
1248
|
+
id: genId(),
|
|
1249
1249
|
name: genName(),
|
|
1250
|
-
vendor_id:
|
|
1250
|
+
vendor_id: genId()
|
|
1251
1251
|
}, overrides);
|
|
1252
1252
|
};
|
|
1253
1253
|
const genTransitionWorkflows = (quantity) => {
|
|
@@ -1396,7 +1396,7 @@ var __spreadValues$6 = (a, b) => {
|
|
|
1396
1396
|
};
|
|
1397
1397
|
const buildStore = (overrides = {}) => {
|
|
1398
1398
|
return __spreadValues$6({
|
|
1399
|
-
storeId:
|
|
1399
|
+
storeId: genId(),
|
|
1400
1400
|
storeName: faker.faker.name.jobTitle(),
|
|
1401
1401
|
address: faker.faker.address.street(),
|
|
1402
1402
|
vendor: buildVendor(),
|
|
@@ -1566,7 +1566,7 @@ const buildShoppingCart = (overrides = {}) => {
|
|
|
1566
1566
|
return __spreadValues$5({
|
|
1567
1567
|
name: "default",
|
|
1568
1568
|
billTotal: buildBillTotal(),
|
|
1569
|
-
channelId:
|
|
1569
|
+
channelId: genId(),
|
|
1570
1570
|
createdAt: new Date().toISOString(),
|
|
1571
1571
|
latitude: genNumber({ min: -20, max: 20, precision: 8 }),
|
|
1572
1572
|
longitude: genNumber({ min: -20, max: 20, precision: 8 }),
|
|
@@ -1584,7 +1584,7 @@ const buildShippingCost = (overrides = {}) => {
|
|
|
1584
1584
|
grossPrice: genNumber(100),
|
|
1585
1585
|
name: genWord(),
|
|
1586
1586
|
netPrice: genNumber(100),
|
|
1587
|
-
productId:
|
|
1587
|
+
productId: genId(),
|
|
1588
1588
|
subtotalBeforeTaxes: genNumber(100),
|
|
1589
1589
|
symbol: genSymbol(),
|
|
1590
1590
|
taxTotal: genNumber(100),
|
|
@@ -1616,8 +1616,8 @@ const buildDiscount = (overrides = {}) => {
|
|
|
1616
1616
|
];
|
|
1617
1617
|
const type = chooseRandom(benefitTypes);
|
|
1618
1618
|
return __spreadValues$5({
|
|
1619
|
-
benefitId:
|
|
1620
|
-
benefitWalletId:
|
|
1619
|
+
benefitId: genId(),
|
|
1620
|
+
benefitWalletId: genId(),
|
|
1621
1621
|
discountBase: genNumber(100),
|
|
1622
1622
|
hasTaxes: genBiasBoolean(0.5),
|
|
1623
1623
|
isInitialized: genBiasBoolean(0.5),
|
|
@@ -1698,11 +1698,11 @@ const genMessages = (quantity) => {
|
|
|
1698
1698
|
};
|
|
1699
1699
|
const buildLivingPlace = (overrides = {}) => {
|
|
1700
1700
|
return __spreadValues$4({
|
|
1701
|
-
id:
|
|
1701
|
+
id: genId(),
|
|
1702
1702
|
fields: genFields(2),
|
|
1703
1703
|
name: genWord(),
|
|
1704
1704
|
active: 1,
|
|
1705
|
-
countryId: 1
|
|
1705
|
+
countryId: "1"
|
|
1706
1706
|
}, overrides);
|
|
1707
1707
|
};
|
|
1708
1708
|
const genLivingPlaces = (quantity) => {
|
|
@@ -1710,7 +1710,7 @@ const genLivingPlaces = (quantity) => {
|
|
|
1710
1710
|
};
|
|
1711
1711
|
const buildShippingAddress = (overrides = {}) => {
|
|
1712
1712
|
return __spreadValues$4({
|
|
1713
|
-
id:
|
|
1713
|
+
id: genId(),
|
|
1714
1714
|
default: getBoolean(),
|
|
1715
1715
|
mainStreet: genStreetName(),
|
|
1716
1716
|
number: genStreetNumber(),
|
|
@@ -1841,13 +1841,13 @@ const buildBaseOrder = (overrides = {}) => {
|
|
|
1841
1841
|
const date = allocation !== "DELIVERY" ? genDate() : null;
|
|
1842
1842
|
const category = chooseRandom(stepCategory);
|
|
1843
1843
|
const code = chooseRandom(stepCode);
|
|
1844
|
-
const id =
|
|
1844
|
+
const id = genId();
|
|
1845
1845
|
const name = genWord();
|
|
1846
1846
|
return __spreadValues$2({
|
|
1847
1847
|
additionalMessage: genWords(3),
|
|
1848
1848
|
allocation,
|
|
1849
|
-
channelId:
|
|
1850
|
-
id:
|
|
1849
|
+
channelId: genId(),
|
|
1850
|
+
id: genId(),
|
|
1851
1851
|
orderDate: genDate(),
|
|
1852
1852
|
orderTime: genDate(),
|
|
1853
1853
|
pickupDate: date,
|
|
@@ -1859,9 +1859,9 @@ const buildBaseOrder = (overrides = {}) => {
|
|
|
1859
1859
|
stepCode: code,
|
|
1860
1860
|
stepId: id,
|
|
1861
1861
|
stepName: name,
|
|
1862
|
-
transactionId:
|
|
1863
|
-
vendorId:
|
|
1864
|
-
accountId:
|
|
1862
|
+
transactionId: genId(),
|
|
1863
|
+
vendorId: genId(),
|
|
1864
|
+
accountId: genId(),
|
|
1865
1865
|
uid: genId(),
|
|
1866
1866
|
hash: genId(),
|
|
1867
1867
|
pickupCooktime: null,
|
|
@@ -1896,7 +1896,7 @@ const buildOrderStep = (overrides = {}) => {
|
|
|
1896
1896
|
code: genWord(),
|
|
1897
1897
|
color: chooseRandom(["#FFFFFF", "#000000"]),
|
|
1898
1898
|
description: genWords(6),
|
|
1899
|
-
id:
|
|
1899
|
+
id: genId(),
|
|
1900
1900
|
name: genWord(),
|
|
1901
1901
|
additional_info: buildOrderStepAdditionalInfo(),
|
|
1902
1902
|
title_frontend: genWords(3)
|
|
@@ -1934,7 +1934,7 @@ const genOrderDetailShippingCosts = (quantity) => {
|
|
|
1934
1934
|
};
|
|
1935
1935
|
const buildOrderRetry = (overrides = {}) => {
|
|
1936
1936
|
return __spreadValues$2(__spreadProps$2(__spreadValues$2({
|
|
1937
|
-
id:
|
|
1937
|
+
id: genId(),
|
|
1938
1938
|
amount: genNumber(100).toString(),
|
|
1939
1939
|
created_at: genDate(),
|
|
1940
1940
|
updated_at: genDate(),
|
|
@@ -1947,7 +1947,7 @@ const buildOrderRetry = (overrides = {}) => {
|
|
|
1947
1947
|
step: buildOrderStep()
|
|
1948
1948
|
}, buildStatus()), {
|
|
1949
1949
|
status: genWord(),
|
|
1950
|
-
payment_method_by_order_id:
|
|
1950
|
+
payment_method_by_order_id: genId(),
|
|
1951
1951
|
user_agent: genWord(),
|
|
1952
1952
|
payment_method: null
|
|
1953
1953
|
}), overrides);
|
|
@@ -1956,7 +1956,7 @@ const buildStatus = (overrides = {}) => {
|
|
|
1956
1956
|
return __spreadValues$2({
|
|
1957
1957
|
status_category: genWord(),
|
|
1958
1958
|
status_code: genWord(),
|
|
1959
|
-
status_id:
|
|
1959
|
+
status_id: genId(),
|
|
1960
1960
|
status_name: genWord()
|
|
1961
1961
|
}, overrides);
|
|
1962
1962
|
};
|
|
@@ -1968,9 +1968,9 @@ const genOrderRetries = (quantity) => {
|
|
|
1968
1968
|
};
|
|
1969
1969
|
const buildOrderPaymentMethod = (overrides = {}) => {
|
|
1970
1970
|
return __spreadValues$2({
|
|
1971
|
-
id:
|
|
1971
|
+
id: genId(),
|
|
1972
1972
|
lastRetry: buildOrderRetry(),
|
|
1973
|
-
payment_method_id:
|
|
1973
|
+
payment_method_id: genId(),
|
|
1974
1974
|
status: chooseRandom(orderStatusOptions),
|
|
1975
1975
|
step: buildOrderStep(),
|
|
1976
1976
|
total: genNumber(200).toString(),
|
|
@@ -1990,7 +1990,7 @@ const buildOrderShoppingCart = (overrides = {}) => {
|
|
|
1990
1990
|
instructions: genWords(6),
|
|
1991
1991
|
statusName: genWord(),
|
|
1992
1992
|
paymentStatus: chooseRandom(paymentStatus),
|
|
1993
|
-
statusId:
|
|
1993
|
+
statusId: genId(),
|
|
1994
1994
|
statusCode: chooseRandom(stepCode),
|
|
1995
1995
|
issueId: genId(),
|
|
1996
1996
|
invoiceNumber: genId(),
|
|
@@ -2035,15 +2035,15 @@ const genOrderStoreDeliveries = (quantity) => {
|
|
|
2035
2035
|
};
|
|
2036
2036
|
const buildOrderStore = (overrides = {}) => {
|
|
2037
2037
|
return __spreadValues$2({
|
|
2038
|
-
id:
|
|
2039
|
-
orderId:
|
|
2038
|
+
id: genId(),
|
|
2039
|
+
orderId: genId(),
|
|
2040
2040
|
digitalCommandSent: genWord(),
|
|
2041
|
-
statusId:
|
|
2041
|
+
statusId: genId(),
|
|
2042
2042
|
statusName: genWord(),
|
|
2043
2043
|
statusCode: chooseRandom(stepCode),
|
|
2044
2044
|
billStoreTotal: buildOrderProductBillTotal(),
|
|
2045
2045
|
products: genOrderProducts(),
|
|
2046
|
-
storeId:
|
|
2046
|
+
storeId: genId(),
|
|
2047
2047
|
storeName: faker.faker.name.jobTitle(),
|
|
2048
2048
|
additionalInfo: buildOrderStoreAdditionalInfo()
|
|
2049
2049
|
}, overrides);
|
|
@@ -2068,7 +2068,7 @@ const buildOrderProductAdditionalInfo = (overrides = {}) => {
|
|
|
2068
2068
|
description: faker.faker.lorem.lines(2),
|
|
2069
2069
|
is_price_vip: genBiasBoolean(0.5),
|
|
2070
2070
|
max_amount_for_sale: genNumber(100),
|
|
2071
|
-
new_store:
|
|
2071
|
+
new_store: genId(),
|
|
2072
2072
|
out_of_service: genBiasBoolean(0.5),
|
|
2073
2073
|
out_of_stock: genBiasBoolean(0.5),
|
|
2074
2074
|
sponsored: genBiasBoolean(0.1),
|
|
@@ -2143,7 +2143,7 @@ const buildOrderProductPriceCategory = (overrides = {}) => {
|
|
|
2143
2143
|
subtotal_before_taxes_before_discounts: genNumber(30),
|
|
2144
2144
|
subtotal_without_taxes: genNumber(30),
|
|
2145
2145
|
subtotal_zero: 0,
|
|
2146
|
-
product_id:
|
|
2146
|
+
product_id: genId(),
|
|
2147
2147
|
symbol: genSymbol(),
|
|
2148
2148
|
tax_calcs: buildTaxCalculations(),
|
|
2149
2149
|
tax_total: genNumber(12),
|
|
@@ -2155,9 +2155,9 @@ const genOrderProductPriceCategories = (quantity) => {
|
|
|
2155
2155
|
};
|
|
2156
2156
|
const buildOrderProduct = (overrides = {}) => {
|
|
2157
2157
|
return __spreadValues$2({
|
|
2158
|
-
id:
|
|
2158
|
+
id: genId(),
|
|
2159
2159
|
additionalInfo: buildOrderProductAdditionalInfo(),
|
|
2160
|
-
productId:
|
|
2160
|
+
productId: genId(),
|
|
2161
2161
|
productName: genWords(5),
|
|
2162
2162
|
comment: genWords(5),
|
|
2163
2163
|
billProduct: buildOrderBillProduct(),
|
|
@@ -2203,7 +2203,7 @@ const genMetadataShippings = (quantity) => {
|
|
|
2203
2203
|
};
|
|
2204
2204
|
const buildBaseField = (overrides = {}) => {
|
|
2205
2205
|
return __spreadValues$2({
|
|
2206
|
-
id:
|
|
2206
|
+
id: genId(),
|
|
2207
2207
|
name: genName()
|
|
2208
2208
|
}, overrides);
|
|
2209
2209
|
};
|
|
@@ -2264,9 +2264,9 @@ const buildSuborder = (overrides = {}) => {
|
|
|
2264
2264
|
additional_info: genWord(),
|
|
2265
2265
|
created_at: genDate(),
|
|
2266
2266
|
updated_at: genDate(),
|
|
2267
|
-
order_id:
|
|
2268
|
-
id:
|
|
2269
|
-
store_id:
|
|
2267
|
+
order_id: genId(),
|
|
2268
|
+
id: genId(),
|
|
2269
|
+
store_id: genId(),
|
|
2270
2270
|
store_name: genCompanyName(),
|
|
2271
2271
|
vendor: genCompanyName(),
|
|
2272
2272
|
digital_command_sent: genBiasBoolean(0.5).toString()
|
|
@@ -2280,12 +2280,12 @@ const buildPaymentMethodByOrder = (overrides = {}) => {
|
|
|
2280
2280
|
amount: genNumber(200).toString(),
|
|
2281
2281
|
created_at: genDate(),
|
|
2282
2282
|
updated_at: genDate(),
|
|
2283
|
-
id:
|
|
2284
|
-
payment_method_id:
|
|
2283
|
+
id: genId(),
|
|
2284
|
+
payment_method_id: genId(),
|
|
2285
2285
|
status: genWord(),
|
|
2286
|
-
sri_payment_method_id:
|
|
2286
|
+
sri_payment_method_id: genId(),
|
|
2287
2287
|
order: buildOrderRetryPaymentMethod(),
|
|
2288
|
-
order_id:
|
|
2288
|
+
order_id: genId()
|
|
2289
2289
|
}), overrides);
|
|
2290
2290
|
};
|
|
2291
2291
|
const genPaymentMethodByOrders = (quantity) => {
|
|
@@ -2293,17 +2293,17 @@ const genPaymentMethodByOrders = (quantity) => {
|
|
|
2293
2293
|
};
|
|
2294
2294
|
const buildOrderRetryPaymentMethod = (overrides = {}) => {
|
|
2295
2295
|
return __spreadValues$2(__spreadProps$2(__spreadValues$2({
|
|
2296
|
-
account_id:
|
|
2297
|
-
vendor_id:
|
|
2296
|
+
account_id: genId(),
|
|
2297
|
+
vendor_id: genId(),
|
|
2298
2298
|
allocation: chooseRandom(allocationOptions),
|
|
2299
2299
|
billing_data_by_user_id: genId(),
|
|
2300
|
-
channel_id:
|
|
2300
|
+
channel_id: genId(),
|
|
2301
2301
|
created_at: genDate(),
|
|
2302
2302
|
latitude: genLatitude(),
|
|
2303
2303
|
longitude: genLongitude(),
|
|
2304
2304
|
uid: genId(),
|
|
2305
2305
|
insoft_order_process: genWord(),
|
|
2306
|
-
id:
|
|
2306
|
+
id: genId(),
|
|
2307
2307
|
sent_fulfillment: genWord(),
|
|
2308
2308
|
shopping_cart_id: genId()
|
|
2309
2309
|
}, buildStatus()), {
|
|
@@ -2410,7 +2410,7 @@ var __spreadValues$1 = (a, b) => {
|
|
|
2410
2410
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
2411
2411
|
const buildNotification = (overrides = {}) => {
|
|
2412
2412
|
return __spreadValues$1({
|
|
2413
|
-
id:
|
|
2413
|
+
id: genId(),
|
|
2414
2414
|
title: genWords(2),
|
|
2415
2415
|
description: genWords(6),
|
|
2416
2416
|
listTitle: genWords(2),
|
|
@@ -2444,7 +2444,7 @@ const genNotificationStores = (quantity) => {
|
|
|
2444
2444
|
};
|
|
2445
2445
|
const buildNotificationStep = (overrides = {}) => {
|
|
2446
2446
|
return __spreadValues$1({
|
|
2447
|
-
id:
|
|
2447
|
+
id: genId(),
|
|
2448
2448
|
name: genWord(),
|
|
2449
2449
|
code: chooseRandom(stepCode),
|
|
2450
2450
|
category: chooseRandom(stepCategory)
|
|
@@ -2458,7 +2458,7 @@ const buildNotificationAdditionalInfo = (overrides = {}) => {
|
|
|
2458
2458
|
parent_shopping_cart: getBoolean(),
|
|
2459
2459
|
metadata_shipping: buildMetadataShipping(),
|
|
2460
2460
|
aud: genCompanyName(),
|
|
2461
|
-
workflowId:
|
|
2461
|
+
workflowId: genId()
|
|
2462
2462
|
}, overrides);
|
|
2463
2463
|
};
|
|
2464
2464
|
const genNotificationAdditionalInfos = (quantity) => {
|
|
@@ -2467,16 +2467,16 @@ const genNotificationAdditionalInfos = (quantity) => {
|
|
|
2467
2467
|
const buildNotificationExtraData = (overrides = {}) => {
|
|
2468
2468
|
const vendorIncompat = buildBaseField();
|
|
2469
2469
|
return __spreadValues$1({
|
|
2470
|
-
id:
|
|
2470
|
+
id: genId(),
|
|
2471
2471
|
seqVal: genReference(),
|
|
2472
2472
|
uid: genId(),
|
|
2473
2473
|
user: buildNotificationUser(),
|
|
2474
|
-
accountId:
|
|
2474
|
+
accountId: genId(),
|
|
2475
2475
|
vendor: __spreadProps$1(__spreadValues$1({}, vendorIncompat), { id: vendorIncompat.id.toString() }),
|
|
2476
2476
|
city: buildBaseField(),
|
|
2477
2477
|
store: buildNotificationStore(),
|
|
2478
|
-
channel_id:
|
|
2479
|
-
countryId:
|
|
2478
|
+
channel_id: genId(),
|
|
2479
|
+
countryId: genId(),
|
|
2480
2480
|
step: buildNotificationStep(),
|
|
2481
2481
|
allocation: chooseRandom(allocationOptions),
|
|
2482
2482
|
paymentMethod: "Points",
|
|
@@ -2540,7 +2540,7 @@ const buildBasePaymentMethod = (overrides = {}) => {
|
|
|
2540
2540
|
created_at: genDate(),
|
|
2541
2541
|
deleted_at: genDate(),
|
|
2542
2542
|
updated_at: genDate(),
|
|
2543
|
-
id:
|
|
2543
|
+
id: genId()
|
|
2544
2544
|
}, overrides);
|
|
2545
2545
|
};
|
|
2546
2546
|
const genBasePaymentMethods = (quantity) => {
|
|
@@ -2590,7 +2590,7 @@ const buildCreditCardMapping = (overrides = {}) => {
|
|
|
2590
2590
|
"MasterCard"
|
|
2591
2591
|
];
|
|
2592
2592
|
return __spreadValues(__spreadProps(__spreadValues({}, buildBasePaymentMethod()), {
|
|
2593
|
-
id:
|
|
2593
|
+
id: genId(),
|
|
2594
2594
|
name: chooseRandom(cardsName),
|
|
2595
2595
|
image_url: buildURLImage(),
|
|
2596
2596
|
cc_brands_mapping: []
|
|
@@ -2604,7 +2604,7 @@ const buildCardInscription = (overrides = {}) => {
|
|
|
2604
2604
|
authCode: genNumericId().toString(),
|
|
2605
2605
|
bin: genWord(),
|
|
2606
2606
|
createdAt: new Date().toDateString(),
|
|
2607
|
-
id:
|
|
2607
|
+
id: genId(),
|
|
2608
2608
|
uid: genId(),
|
|
2609
2609
|
number: genNumericId().toString(),
|
|
2610
2610
|
paymentToken: genNumericId().toString(),
|