@eeplatform/core 1.4.0 → 1.4.2
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/.github/workflows/publish.yml +1 -0
- package/CHANGELOG.md +14 -0
- package/dist/index.js +26 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -30
- package/dist/index.mjs.map +1 -1
- package/dist/public/handlebars/sign-up.hbs +22 -12
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12784,7 +12784,7 @@ function useVerificationService() {
|
|
|
12784
12784
|
to: email,
|
|
12785
12785
|
subject: "Member Invite",
|
|
12786
12786
|
html: emailContent2,
|
|
12787
|
-
from:
|
|
12787
|
+
from: "EEPlatform"
|
|
12788
12788
|
}).catch((error) => {
|
|
12789
12789
|
logger4.log({
|
|
12790
12790
|
level: "error",
|
|
@@ -12806,7 +12806,7 @@ function useVerificationService() {
|
|
|
12806
12806
|
to: email,
|
|
12807
12807
|
subject: "User Invite",
|
|
12808
12808
|
html: emailContent,
|
|
12809
|
-
from: "
|
|
12809
|
+
from: "EEPlatform"
|
|
12810
12810
|
}).catch((error) => {
|
|
12811
12811
|
logger4.log({
|
|
12812
12812
|
level: "error",
|
|
@@ -12840,7 +12840,7 @@ function useVerificationService() {
|
|
|
12840
12840
|
mailer.sendMail({
|
|
12841
12841
|
to: email,
|
|
12842
12842
|
subject: "Forget Password",
|
|
12843
|
-
from: "
|
|
12843
|
+
from: "EEPlatform",
|
|
12844
12844
|
html: emailContent
|
|
12845
12845
|
}).catch((error) => {
|
|
12846
12846
|
logger4.log({
|
|
@@ -13035,7 +13035,7 @@ function useVerificationService() {
|
|
|
13035
13035
|
to: email,
|
|
13036
13036
|
subject: "Sign Up Verification",
|
|
13037
13037
|
html: emailContent,
|
|
13038
|
-
from: "
|
|
13038
|
+
from: "EEPlatform"
|
|
13039
13039
|
}).catch((error) => {
|
|
13040
13040
|
logger4.log({
|
|
13041
13041
|
level: "error",
|
|
@@ -17120,7 +17120,7 @@ function useXenditService() {
|
|
|
17120
17120
|
}
|
|
17121
17121
|
},
|
|
17122
17122
|
reusability: "MULTIPLE_USE",
|
|
17123
|
-
description: "Linking card to
|
|
17123
|
+
description: "Linking card to EEPlatform account."
|
|
17124
17124
|
});
|
|
17125
17125
|
return res.data;
|
|
17126
17126
|
} catch (error) {
|
|
@@ -21539,13 +21539,13 @@ function usePaypalService() {
|
|
|
21539
21539
|
name: {
|
|
21540
21540
|
full_name: data.customerName
|
|
21541
21541
|
},
|
|
21542
|
-
website: "www.
|
|
21542
|
+
website: "www.eeplatform.org"
|
|
21543
21543
|
},
|
|
21544
21544
|
primary_recipients: [
|
|
21545
21545
|
{
|
|
21546
21546
|
billing_info: {
|
|
21547
21547
|
name: {
|
|
21548
|
-
full_name: data.customerName || "
|
|
21548
|
+
full_name: data.customerName || "EEPlatform Customer"
|
|
21549
21549
|
},
|
|
21550
21550
|
email_address: data.customerEmail
|
|
21551
21551
|
}
|
|
@@ -21608,7 +21608,7 @@ function usePaypalService() {
|
|
|
21608
21608
|
await axios_default.post(
|
|
21609
21609
|
`${PAYPAL_API_URL}/v2/invoicing/invoices/${invoiceId}/send`,
|
|
21610
21610
|
{
|
|
21611
|
-
subject: "
|
|
21611
|
+
subject: "EEPlatform Monthly Invoice",
|
|
21612
21612
|
send_to_recipient: true,
|
|
21613
21613
|
send_to_invoicer: false
|
|
21614
21614
|
},
|
|
@@ -21705,7 +21705,7 @@ function useSubscriptionService() {
|
|
|
21705
21705
|
totalCost += tierCost;
|
|
21706
21706
|
nonProratedCost += seatsInTier * price;
|
|
21707
21707
|
items.push({
|
|
21708
|
-
description: `
|
|
21708
|
+
description: `EEPlatform Subscription - ${seatsInTier} seats @ ${price} per seat`,
|
|
21709
21709
|
unitPrice: price,
|
|
21710
21710
|
quantity: seatsInTier,
|
|
21711
21711
|
seats: seatsInTier,
|
|
@@ -21763,7 +21763,7 @@ function useSubscriptionService() {
|
|
|
21763
21763
|
session
|
|
21764
21764
|
);
|
|
21765
21765
|
}
|
|
21766
|
-
const description = "
|
|
21766
|
+
const description = "EEPlatform Organization Monthly Subscription.";
|
|
21767
21767
|
const monthlySubscriptionPrice = await getByNameType(
|
|
21768
21768
|
"organization-subscription",
|
|
21769
21769
|
"monthly-subscription"
|
|
@@ -21788,7 +21788,7 @@ function useSubscriptionService() {
|
|
|
21788
21788
|
if (promoCode && promoCode.type === "fixed" && promoCode.fixed_rate !== void 0 && promoCode.fixed_rate >= 0) {
|
|
21789
21789
|
amount = promoCode.fixed_rate;
|
|
21790
21790
|
items.push({
|
|
21791
|
-
description: "
|
|
21791
|
+
description: "EEPlatform Monthly Subscription",
|
|
21792
21792
|
unitPrice: promoCode.fixed_rate,
|
|
21793
21793
|
quantity: 1,
|
|
21794
21794
|
seats: value.seats,
|
|
@@ -21847,7 +21847,7 @@ function useSubscriptionService() {
|
|
|
21847
21847
|
status: "paid",
|
|
21848
21848
|
items: items && items.length ? items : [
|
|
21849
21849
|
{
|
|
21850
|
-
description: "
|
|
21850
|
+
description: "EEPlatform Monthly Subscription",
|
|
21851
21851
|
unitPrice: amount,
|
|
21852
21852
|
quantity: 1,
|
|
21853
21853
|
seats: value.seats,
|
|
@@ -21957,7 +21957,7 @@ function useSubscriptionService() {
|
|
|
21957
21957
|
}
|
|
21958
21958
|
value.billingAddress.org = orgId.toString();
|
|
21959
21959
|
await addAddress(value.billingAddress, session);
|
|
21960
|
-
const description = "
|
|
21960
|
+
const description = "EEPlatform Organization Monthly Subscription.";
|
|
21961
21961
|
if (value.promoCode) {
|
|
21962
21962
|
await assignByUserId(
|
|
21963
21963
|
{ user: value.user, code: value.promoCode },
|
|
@@ -21983,7 +21983,7 @@ function useSubscriptionService() {
|
|
|
21983
21983
|
if (promoCode && promoCode.type === "fixed" && promoCode.fixed_rate !== void 0 && promoCode.fixed_rate >= 0) {
|
|
21984
21984
|
amount = promoCode.fixed_rate;
|
|
21985
21985
|
items.push({
|
|
21986
|
-
description: "
|
|
21986
|
+
description: "EEPlatform Monthly Subscription",
|
|
21987
21987
|
unitPrice: promoCode.fixed_rate,
|
|
21988
21988
|
quantity: 1,
|
|
21989
21989
|
seats: value.seats,
|
|
@@ -22043,7 +22043,7 @@ function useSubscriptionService() {
|
|
|
22043
22043
|
status: "paid",
|
|
22044
22044
|
items: items && items.length ? items : [
|
|
22045
22045
|
{
|
|
22046
|
-
description: "
|
|
22046
|
+
description: "EEPlatform Monthly Subscription",
|
|
22047
22047
|
unitPrice: amount,
|
|
22048
22048
|
quantity: 1,
|
|
22049
22049
|
seats: value.seats,
|
|
@@ -22103,7 +22103,7 @@ function useSubscriptionService() {
|
|
|
22103
22103
|
throw new BadRequestError33("User not found.");
|
|
22104
22104
|
}
|
|
22105
22105
|
await addAddress(value.billingAddress, session);
|
|
22106
|
-
const description = "
|
|
22106
|
+
const description = "EEPlatform affiliate yearly Subscription.";
|
|
22107
22107
|
const customer = await getCustomerById(value.customer_id);
|
|
22108
22108
|
if (!customer.id) {
|
|
22109
22109
|
throw new BadRequestError33("Xendit customer account required.");
|
|
@@ -22130,7 +22130,7 @@ function useSubscriptionService() {
|
|
|
22130
22130
|
if (promoCode && promoCode.type === "fixed" && promoCode.fixed_rate !== void 0 && promoCode.fixed_rate >= 0) {
|
|
22131
22131
|
amount = promoCode.fixed_rate;
|
|
22132
22132
|
items.push({
|
|
22133
|
-
description: "
|
|
22133
|
+
description: "EEPlatform Yearly Affiliate Subscription",
|
|
22134
22134
|
unitPrice: promoCode.fixed_rate,
|
|
22135
22135
|
quantity: 1,
|
|
22136
22136
|
seats: 1,
|
|
@@ -22178,7 +22178,7 @@ function useSubscriptionService() {
|
|
|
22178
22178
|
status: "paid",
|
|
22179
22179
|
items: items.length ? items : [
|
|
22180
22180
|
{
|
|
22181
|
-
description: "
|
|
22181
|
+
description: "EEPlatform Yearly Affiliate Subscription",
|
|
22182
22182
|
unitPrice: amount,
|
|
22183
22183
|
quantity: 1,
|
|
22184
22184
|
seats: 1,
|
|
@@ -22279,7 +22279,7 @@ function useSubscriptionService() {
|
|
|
22279
22279
|
}
|
|
22280
22280
|
const promoCode = await getByCode(code).catch(() => null);
|
|
22281
22281
|
let amount = price.value * chargeableSeats;
|
|
22282
|
-
const description = `
|
|
22282
|
+
const description = `EEPlatform ${sub.type} ${sub.billingCycle} Subscription`;
|
|
22283
22283
|
const items = [];
|
|
22284
22284
|
if (code && promoCode && promoCode.type === "fixed" && promoCode.fixed_rate !== void 0 && promoCode.fixed_rate >= 0) {
|
|
22285
22285
|
amount = promoCode.fixed_rate * chargeableSeats;
|
|
@@ -22456,7 +22456,7 @@ function useSubscriptionService() {
|
|
|
22456
22456
|
newMonthSubscriptionFee = formatAmount(perSeatPrice * seats);
|
|
22457
22457
|
items = [
|
|
22458
22458
|
{
|
|
22459
|
-
description: `
|
|
22459
|
+
description: `EEPlatform Subscription - ${seats} seats @ ${perSeatPrice} per seat`,
|
|
22460
22460
|
unitPrice: perSeatPrice,
|
|
22461
22461
|
quantity: 1,
|
|
22462
22462
|
seats,
|
|
@@ -22619,7 +22619,7 @@ function useSubscriptionService() {
|
|
|
22619
22619
|
status: "paid",
|
|
22620
22620
|
items: [
|
|
22621
22621
|
{
|
|
22622
|
-
description: "
|
|
22622
|
+
description: "EEPlatform Monthly Subscription",
|
|
22623
22623
|
unitPrice: formatAmount(perSeatPrice),
|
|
22624
22624
|
quantity: 1,
|
|
22625
22625
|
seats,
|
|
@@ -22640,7 +22640,7 @@ function useSubscriptionService() {
|
|
|
22640
22640
|
payment_method_id: subscription.paymentMethodId ?? "",
|
|
22641
22641
|
amount: formatAmount(amount),
|
|
22642
22642
|
currency: subscription.currency,
|
|
22643
|
-
description: "
|
|
22643
|
+
description: "EEPlatform Organization Monthly Subscription."
|
|
22644
22644
|
});
|
|
22645
22645
|
}
|
|
22646
22646
|
const paymentMethod = await getPaymentMethodById(
|
|
@@ -22830,7 +22830,7 @@ function useSubscriptionService() {
|
|
|
22830
22830
|
status: "paid",
|
|
22831
22831
|
items: [
|
|
22832
22832
|
{
|
|
22833
|
-
description: "
|
|
22833
|
+
description: "EEPlatform Monthly Subscription",
|
|
22834
22834
|
unitPrice: formatAmount(perSeatPrice),
|
|
22835
22835
|
quantity: 1,
|
|
22836
22836
|
seats,
|
|
@@ -22966,7 +22966,7 @@ function useSubscriptionService() {
|
|
|
22966
22966
|
payment_method_id: subscription.paymentMethodId,
|
|
22967
22967
|
amount: subscription.amount,
|
|
22968
22968
|
currency: subscription.currency,
|
|
22969
|
-
description: "
|
|
22969
|
+
description: "EEPlatform Subscription Payment"
|
|
22970
22970
|
});
|
|
22971
22971
|
if (!payment.id) {
|
|
22972
22972
|
throw new BadRequestError33("Failed to process payment.");
|
|
@@ -27782,7 +27782,7 @@ import Joi34 from "joi";
|
|
|
27782
27782
|
// src/services/building.service.ts
|
|
27783
27783
|
import {
|
|
27784
27784
|
BadRequestError as BadRequestError62,
|
|
27785
|
-
NotFoundError as
|
|
27785
|
+
NotFoundError as NotFoundError9,
|
|
27786
27786
|
useAtlas as useAtlas33
|
|
27787
27787
|
} from "@eeplatform/nodejs-utils";
|
|
27788
27788
|
function useBuildingService() {
|
|
@@ -27798,7 +27798,7 @@ function useBuildingService() {
|
|
|
27798
27798
|
try {
|
|
27799
27799
|
const building = await _getById(id);
|
|
27800
27800
|
if (!building) {
|
|
27801
|
-
throw new
|
|
27801
|
+
throw new NotFoundError9("Building not found.");
|
|
27802
27802
|
}
|
|
27803
27803
|
if (data.levels < building.levels) {
|
|
27804
27804
|
const unit = await getByBuildingLevel(id, building.levels);
|
|
@@ -28847,7 +28847,7 @@ var schemaStockCard = Joi38.object({
|
|
|
28847
28847
|
qty: Joi38.number().required(),
|
|
28848
28848
|
unitCost: Joi38.number().optional().allow(null, 0),
|
|
28849
28849
|
totalCost: Joi38.number().optional().allow(null, 0),
|
|
28850
|
-
status: Joi38.string().
|
|
28850
|
+
status: Joi38.string().optional().allow(null, ""),
|
|
28851
28851
|
condition: Joi38.string().required(),
|
|
28852
28852
|
supplier: Joi38.string().optional().allow("", null),
|
|
28853
28853
|
location: Joi38.string().optional().allow("", null),
|
|
@@ -28888,7 +28888,7 @@ function MStockCard(value) {
|
|
|
28888
28888
|
qty: value.qty,
|
|
28889
28889
|
unitCost: value.unitCost,
|
|
28890
28890
|
totalCost: value.totalCost,
|
|
28891
|
-
status: value.status,
|
|
28891
|
+
status: value.status ?? "in stock",
|
|
28892
28892
|
condition: value.condition,
|
|
28893
28893
|
supplier: value.supplier ?? "",
|
|
28894
28894
|
location: value.location ?? void 0,
|
|
@@ -29123,7 +29123,7 @@ import Joi39 from "joi";
|
|
|
29123
29123
|
// src/services/stock-card.service.ts
|
|
29124
29124
|
import {
|
|
29125
29125
|
BadRequestError as BadRequestError70,
|
|
29126
|
-
NotFoundError as
|
|
29126
|
+
NotFoundError as NotFoundError10,
|
|
29127
29127
|
useAtlas as useAtlas37
|
|
29128
29128
|
} from "@eeplatform/nodejs-utils";
|
|
29129
29129
|
function useStockCardService() {
|
|
@@ -29138,7 +29138,7 @@ function useStockCardService() {
|
|
|
29138
29138
|
try {
|
|
29139
29139
|
const asset = await _getAssetById(data.item);
|
|
29140
29140
|
if (!asset) {
|
|
29141
|
-
throw new
|
|
29141
|
+
throw new NotFoundError10("Asset not found.");
|
|
29142
29142
|
}
|
|
29143
29143
|
data.balance = (asset.qty ?? 0) + data.qty;
|
|
29144
29144
|
await _add(data, session);
|