rerobe-js-orm 4.4.6 → 4.4.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/lib/constants/file-constants.d.ts +4 -4
- package/lib/constants/ledger-constants.js +6 -6
- package/lib/constants/merchant-constants.d.ts +84 -43
- package/lib/constants/merchant-constants.js +43 -1
- package/lib/constants/notification-constants.d.ts +9 -9
- package/lib/constants/order-constants.d.ts +44 -35
- package/lib/constants/product-constants.d.ts +193 -193
- package/lib/constants/product-constants.js +3 -3
- package/lib/factories/Product/ProductFromFormState.js +4 -4
- package/lib/form-states/Merchant/MerchantConfigAutomatedPayoutsFormState.d.ts +10 -0
- package/lib/form-states/Merchant/MerchantConfigAutomatedPayoutsFormState.js +174 -0
- package/lib/helpers/CryptoPolyfill.js +1 -2
- package/lib/helpers/OrderHelpers.js +2 -2
- package/lib/helpers/SellerProductLedgerHelpers.js +1 -1
- package/lib/helpers/Utilities.js +6 -7
- package/lib/index.d.ts +3 -1
- package/lib/index.js +5 -1
- package/lib/models/Merchant.js +1 -1
- package/lib/models/MerchantConfigAutomatedPayouts.d.ts +13 -0
- package/lib/models/MerchantConfigAutomatedPayouts.js +44 -0
- package/lib/models/Order.js +1 -1
- package/lib/models/PayoutAccount.js +1 -1
- package/lib/models/Product.js +15 -11
- package/lib/models/ProductCollection.js +2 -2
- package/lib/models/ProductStateManager.js +1 -1
- package/lib/types/ledger-transaction-types.d.ts +6 -6
- package/lib/types/merchant-config-types.d.ts +24 -0
- package/lib/types/merchant-config-types.js +1 -0
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export namespace RIBBN_FILE_CATEGORY {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
let product: string;
|
|
3
|
+
let generalAsset: string;
|
|
4
|
+
let collection: string;
|
|
5
|
+
let mobileAppOnboarding: string;
|
|
6
6
|
}
|
|
@@ -27,12 +27,12 @@ exports.SaleType = {
|
|
|
27
27
|
DIRECT_SALE: 'DIRECT_SALE',
|
|
28
28
|
};
|
|
29
29
|
exports.SellerProductLedgerStatus = {
|
|
30
|
-
PENDING_RETURN_PERIOD_COMPLETION: 'PENDING_RETURN_PERIOD_COMPLETION',
|
|
31
|
-
RETURNED_AND_RELISTED: 'RETURNED_AND_RELISTED',
|
|
32
|
-
SELLER_LIQUIDATED: 'SELLER_LIQUIDATED',
|
|
33
|
-
MERCHANT_DONATED: 'MERCHANT_DONATED',
|
|
34
|
-
SELLER_TO_BE_PAID: 'SELLER_TO_BE_PAID',
|
|
35
|
-
PAYMENT_IN_PROGRESS: 'PAYMENT_IN_PROGRESS',
|
|
30
|
+
PENDING_RETURN_PERIOD_COMPLETION: 'PENDING_RETURN_PERIOD_COMPLETION', // Order is created => each item in order should get created (or logged if already created); Admin can also add to ledger from Products Table Action
|
|
31
|
+
RETURNED_AND_RELISTED: 'RETURNED_AND_RELISTED', // Merchant will be the actor to move ledgerEntity to this state once item has cleared the return period. We can set up scheduledFunctionToTagSellerProductLedgerEntities to tag ledger entities on how long ago the item sold and how long it's been in return period
|
|
32
|
+
SELLER_LIQUIDATED: 'SELLER_LIQUIDATED', // Item was returned and relisted but then seller decides to take item back. In this case, item amount owed to seller goes to zero
|
|
33
|
+
MERCHANT_DONATED: 'MERCHANT_DONATED', // Item was returned and relisted but merchant decides to donate item and seller does not want it back. In this case, item amount owed to seller goes to zero
|
|
34
|
+
SELLER_TO_BE_PAID: 'SELLER_TO_BE_PAID', // From here
|
|
35
|
+
PAYMENT_IN_PROGRESS: 'PAYMENT_IN_PROGRESS', // to here is when fees would be added in Admin UI
|
|
36
36
|
SELLER_PAID: 'SELLER_PAID',
|
|
37
37
|
DISPUTED: 'DISPUTED',
|
|
38
38
|
RESOLVED: 'RESOLVED',
|
|
@@ -1,75 +1,116 @@
|
|
|
1
1
|
export namespace MERCHANT_TYPES {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
let individual: string;
|
|
3
|
+
let business: string;
|
|
4
|
+
let enterprise: string;
|
|
5
5
|
}
|
|
6
6
|
export namespace PAYMENT_TIERS {
|
|
7
7
|
export namespace starter {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
let id: string;
|
|
9
|
+
let monthlyFee: number;
|
|
10
|
+
let transactionFee: number;
|
|
11
|
+
let currency: string;
|
|
12
12
|
}
|
|
13
13
|
export namespace business_1 {
|
|
14
|
-
|
|
14
|
+
let id_1: string;
|
|
15
15
|
export { id_1 as id };
|
|
16
|
-
|
|
16
|
+
let monthlyFee_1: number;
|
|
17
17
|
export { monthlyFee_1 as monthlyFee };
|
|
18
|
-
|
|
18
|
+
let transactionFee_1: number;
|
|
19
19
|
export { transactionFee_1 as transactionFee };
|
|
20
|
-
|
|
20
|
+
let currency_1: string;
|
|
21
21
|
export { currency_1 as currency };
|
|
22
22
|
}
|
|
23
23
|
export { business_1 as business };
|
|
24
24
|
export namespace enterprise_1 {
|
|
25
|
-
|
|
25
|
+
let id_2: string;
|
|
26
26
|
export { id_2 as id };
|
|
27
|
-
|
|
27
|
+
let monthlyFee_2: number;
|
|
28
28
|
export { monthlyFee_2 as monthlyFee };
|
|
29
|
-
|
|
29
|
+
let transactionFee_2: number;
|
|
30
30
|
export { transactionFee_2 as transactionFee };
|
|
31
|
-
|
|
31
|
+
let currency_2: string;
|
|
32
32
|
export { currency_2 as currency };
|
|
33
33
|
}
|
|
34
34
|
export { enterprise_1 as enterprise };
|
|
35
35
|
}
|
|
36
36
|
export namespace INDUSTRY_TYPES {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
let beauty: string;
|
|
38
|
+
let clothing: string;
|
|
39
|
+
let electronics: string;
|
|
40
|
+
let furniture: string;
|
|
41
|
+
let handcrafts: string;
|
|
42
|
+
let jewelry: string;
|
|
43
|
+
let sports: string;
|
|
44
|
+
let toys: string;
|
|
45
|
+
let other: string;
|
|
46
46
|
}
|
|
47
47
|
export namespace UNIT_SYSTEM_TYPES {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
let metric: string;
|
|
49
|
+
let imperial: string;
|
|
50
50
|
}
|
|
51
51
|
export namespace METRIC_WEIGHT_TYPES {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
let kilogram: string;
|
|
53
|
+
let gram: string;
|
|
54
54
|
}
|
|
55
55
|
export namespace IMPERIAL_WEIGHT_TYPES {
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
let pound: string;
|
|
57
|
+
let once: string;
|
|
58
58
|
}
|
|
59
59
|
export namespace RIBBN_WEBHOOK_EVENT_DICT {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
let productCreate: string;
|
|
61
|
+
let productUpdate: string;
|
|
62
|
+
let productDelete: string;
|
|
63
63
|
}
|
|
64
64
|
export namespace SUBSCRIPTION_STATUSES {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
let active: string;
|
|
66
|
+
let activeNoSellRequests: string;
|
|
67
|
+
let past_due: string;
|
|
68
|
+
let canceled: string;
|
|
69
|
+
let unpaid: string;
|
|
70
|
+
let trialing: string;
|
|
71
|
+
let incomplete: string;
|
|
72
|
+
let incomplete_expired: string;
|
|
73
|
+
let paused: string;
|
|
74
|
+
let special: string;
|
|
75
|
+
}
|
|
76
|
+
export namespace AUTOMATED_PAYOUT_SCHEDULE {
|
|
77
|
+
let daily: string;
|
|
78
|
+
let afterBusinessDays: string;
|
|
79
|
+
}
|
|
80
|
+
export namespace AUTOMATED_PAYOUT_BUSINESS_DAYS {
|
|
81
|
+
let monday: string;
|
|
82
|
+
let tuesday: string;
|
|
83
|
+
let wednesday: string;
|
|
84
|
+
let thursday: string;
|
|
85
|
+
let friday: string;
|
|
86
|
+
}
|
|
87
|
+
export namespace AUTOMATED_PAYOUT_MONTH_DAYS {
|
|
88
|
+
let d1: string;
|
|
89
|
+
let d2: string;
|
|
90
|
+
let d3: string;
|
|
91
|
+
let d4: string;
|
|
92
|
+
let d5: string;
|
|
93
|
+
let d6: string;
|
|
94
|
+
let d7: string;
|
|
95
|
+
let d8: string;
|
|
96
|
+
let d9: string;
|
|
97
|
+
let d10: string;
|
|
98
|
+
let d11: string;
|
|
99
|
+
let d12: string;
|
|
100
|
+
let d13: string;
|
|
101
|
+
let d14: string;
|
|
102
|
+
let d15: string;
|
|
103
|
+
let d16: string;
|
|
104
|
+
let d17: string;
|
|
105
|
+
let d18: string;
|
|
106
|
+
let d19: string;
|
|
107
|
+
let d20: string;
|
|
108
|
+
let d21: string;
|
|
109
|
+
let d22: string;
|
|
110
|
+
let d23: string;
|
|
111
|
+
let d24: string;
|
|
112
|
+
let d25: string;
|
|
113
|
+
let d26: string;
|
|
114
|
+
let d27: string;
|
|
115
|
+
let d28: string;
|
|
75
116
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SUBSCRIPTION_STATUSES = exports.RIBBN_WEBHOOK_EVENT_DICT = exports.IMPERIAL_WEIGHT_TYPES = exports.METRIC_WEIGHT_TYPES = exports.UNIT_SYSTEM_TYPES = exports.INDUSTRY_TYPES = exports.PAYMENT_TIERS = exports.MERCHANT_TYPES = void 0;
|
|
3
|
+
exports.AUTOMATED_PAYOUT_MONTH_DAYS = exports.AUTOMATED_PAYOUT_BUSINESS_DAYS = exports.AUTOMATED_PAYOUT_SCHEDULE = exports.SUBSCRIPTION_STATUSES = exports.RIBBN_WEBHOOK_EVENT_DICT = exports.IMPERIAL_WEIGHT_TYPES = exports.METRIC_WEIGHT_TYPES = exports.UNIT_SYSTEM_TYPES = exports.INDUSTRY_TYPES = exports.PAYMENT_TIERS = exports.MERCHANT_TYPES = void 0;
|
|
4
4
|
exports.MERCHANT_TYPES = {
|
|
5
5
|
individual: 'INDIVIDUAL',
|
|
6
6
|
business: 'BUSINESS',
|
|
@@ -67,3 +67,45 @@ exports.SUBSCRIPTION_STATUSES = {
|
|
|
67
67
|
paused: 'PAUSED',
|
|
68
68
|
special: 'SPECIAL',
|
|
69
69
|
};
|
|
70
|
+
// Automated Payouts
|
|
71
|
+
exports.AUTOMATED_PAYOUT_SCHEDULE = {
|
|
72
|
+
daily: 'DAILY',
|
|
73
|
+
afterBusinessDays: 'AFTER_BUSINESS_DAYS',
|
|
74
|
+
};
|
|
75
|
+
exports.AUTOMATED_PAYOUT_BUSINESS_DAYS = {
|
|
76
|
+
monday: '1',
|
|
77
|
+
tuesday: '2',
|
|
78
|
+
wednesday: '3',
|
|
79
|
+
thursday: '4',
|
|
80
|
+
friday: '5',
|
|
81
|
+
};
|
|
82
|
+
exports.AUTOMATED_PAYOUT_MONTH_DAYS = {
|
|
83
|
+
d1: '1',
|
|
84
|
+
d2: '2',
|
|
85
|
+
d3: '3',
|
|
86
|
+
d4: '4',
|
|
87
|
+
d5: '5',
|
|
88
|
+
d6: '6',
|
|
89
|
+
d7: '7',
|
|
90
|
+
d8: '8',
|
|
91
|
+
d9: '9',
|
|
92
|
+
d10: '10',
|
|
93
|
+
d11: '11',
|
|
94
|
+
d12: '12',
|
|
95
|
+
d13: '13',
|
|
96
|
+
d14: '14',
|
|
97
|
+
d15: '15',
|
|
98
|
+
d16: '16',
|
|
99
|
+
d17: '17',
|
|
100
|
+
d18: '18',
|
|
101
|
+
d19: '19',
|
|
102
|
+
d20: '20',
|
|
103
|
+
d21: '21',
|
|
104
|
+
d22: '22',
|
|
105
|
+
d23: '23',
|
|
106
|
+
d24: '24',
|
|
107
|
+
d25: '25',
|
|
108
|
+
d26: '26',
|
|
109
|
+
d27: '27',
|
|
110
|
+
d28: '28',
|
|
111
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export namespace CUSTOMER_NOTIFICATION_TYPES {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
let orderConfirmation: string;
|
|
3
|
+
let orderCancellation: string;
|
|
4
|
+
let orderRefund: string;
|
|
5
|
+
let orderReadyForPickUp: string;
|
|
6
|
+
let orderComplete: string;
|
|
7
|
+
let shippingConfirmation: string;
|
|
8
|
+
let generalMessage: string;
|
|
9
|
+
let abandonedCart: string;
|
|
10
|
+
let orderReceiptStore: string;
|
|
11
11
|
}
|
|
@@ -1,51 +1,60 @@
|
|
|
1
1
|
export namespace SHIPPING_TYPES {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
let localPickUp: string;
|
|
3
|
+
let localDelivery: string;
|
|
4
|
+
let shipping: string;
|
|
5
5
|
}
|
|
6
6
|
export namespace PAYMENT_TYPES {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
let creditCard: string;
|
|
8
|
+
let klarna: string;
|
|
9
|
+
let swish: string;
|
|
10
|
+
let shoppingCredit: string;
|
|
11
|
+
let cash: string;
|
|
12
|
+
let mobilePayment: string;
|
|
13
13
|
}
|
|
14
14
|
export namespace ORDER_STATES {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
let draft: string;
|
|
16
|
+
let completed: string;
|
|
17
17
|
}
|
|
18
18
|
export namespace SALES_CHANNELS {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
let mobileApp: string;
|
|
20
|
+
let webApp: string;
|
|
21
|
+
let store: string;
|
|
22
|
+
let onlineStore: string;
|
|
23
|
+
let thirdParty: string;
|
|
24
|
+
let ahlens: string;
|
|
25
|
+
let ribbnMobilePOS: string;
|
|
26
|
+
let ribbnWebPOS: string;
|
|
27
|
+
let ribbnSellThroughChannelPartner: string;
|
|
28
|
+
let ribbnSellOnChannelPartner: string;
|
|
29
29
|
}
|
|
30
30
|
export namespace FULFILLMENT_TYPES {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
let fulfilled: string;
|
|
32
|
+
let partiallyFulfilled: string;
|
|
33
|
+
let unfulfilled: string;
|
|
34
|
+
let inProgress: string;
|
|
35
|
+
let canceled: string;
|
|
36
|
+
let restocked: string;
|
|
37
37
|
}
|
|
38
38
|
export namespace FINANCIAL_TYPES {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
let paid: string;
|
|
40
|
+
let pending: string;
|
|
41
|
+
let refunded: string;
|
|
42
|
+
let partiallyRefunded: string;
|
|
43
|
+
let authorized: string;
|
|
44
44
|
}
|
|
45
45
|
export namespace RETURN_POLICY_TYPES {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
let inStore: string;
|
|
47
|
+
let online: string;
|
|
48
48
|
}
|
|
49
49
|
export const SALES_CHANNEL_TO_RETURN_POLICY_MAPPING: {
|
|
50
|
-
[
|
|
50
|
+
[SALES_CHANNELS.mobileApp]: string;
|
|
51
|
+
[SALES_CHANNELS.webApp]: string;
|
|
52
|
+
[SALES_CHANNELS.store]: string;
|
|
53
|
+
[SALES_CHANNELS.onlineStore]: string;
|
|
54
|
+
[SALES_CHANNELS.thirdParty]: string;
|
|
55
|
+
[SALES_CHANNELS.ahlens]: string;
|
|
56
|
+
[SALES_CHANNELS.ribbnMobilePOS]: string;
|
|
57
|
+
[SALES_CHANNELS.ribbnWebPOS]: string;
|
|
58
|
+
[SALES_CHANNELS.ribbnSellThroughChannelPartner]: string;
|
|
59
|
+
[SALES_CHANNELS.ribbnSellOnChannelPartner]: string;
|
|
51
60
|
};
|