@managemint-solutions/entities 1.1.12 → 1.1.14
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/billing/enum/index.d.ts +25 -0
- package/dist/billing/enum/index.js +34 -0
- package/dist/billing/index.d.ts +9 -0
- package/dist/billing/index.js +2 -0
- package/dist/organization/dto/index.d.ts +0 -2
- package/dist/organization/index.d.ts +4 -6
- package/dist/payments/enums/index.d.ts +21 -35
- package/dist/payments/enums/index.js +29 -52
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare enum BillingStatus {
|
|
2
|
+
PENDING_CUSTOMER_CREATION = "pending_customer_creation",
|
|
3
|
+
PENDING_PLAN_CREATION = "pending_plan_creation",
|
|
4
|
+
PENDING_INITIAL_PAYMENT = "pending_initial_payment",
|
|
5
|
+
PENDING_SUBSCRIPTION_CREATION = "pending_subscription_creation",
|
|
6
|
+
ACTIVE = "active",
|
|
7
|
+
PAYMENT_FAILED = "payment_failed",
|
|
8
|
+
CANCELLATION_SCHEDULED = "cancellation_scheduled",
|
|
9
|
+
CANCELLED = "cancelled"
|
|
10
|
+
}
|
|
11
|
+
export declare enum BillingTransactionType {
|
|
12
|
+
INITIAL = "initial",
|
|
13
|
+
PRORATA = "prorata",
|
|
14
|
+
RENEWAL = "renewal",
|
|
15
|
+
REINSTATEMENT = "reinstatement"
|
|
16
|
+
}
|
|
17
|
+
export declare enum BillingTransactionStatus {
|
|
18
|
+
INITIALIZED = "initialized",
|
|
19
|
+
PENDING_PAYMENT = "pending_payment",
|
|
20
|
+
PROCESSING_WEBHOOK = "processing_webhook",
|
|
21
|
+
PAID = "paid",
|
|
22
|
+
FAILED = "failed",
|
|
23
|
+
CANCELLED = "cancelled",
|
|
24
|
+
EXPIRED = "expired"
|
|
25
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingTransactionStatus = exports.BillingTransactionType = exports.BillingStatus = void 0;
|
|
4
|
+
var BillingStatus;
|
|
5
|
+
(function (BillingStatus) {
|
|
6
|
+
BillingStatus["PENDING_CUSTOMER_CREATION"] = "pending_customer_creation";
|
|
7
|
+
BillingStatus["PENDING_PLAN_CREATION"] = "pending_plan_creation";
|
|
8
|
+
BillingStatus["PENDING_INITIAL_PAYMENT"] = "pending_initial_payment";
|
|
9
|
+
BillingStatus["PENDING_SUBSCRIPTION_CREATION"] = "pending_subscription_creation";
|
|
10
|
+
BillingStatus["ACTIVE"] = "active";
|
|
11
|
+
BillingStatus["PAYMENT_FAILED"] = "payment_failed";
|
|
12
|
+
BillingStatus["CANCELLATION_SCHEDULED"] = "cancellation_scheduled";
|
|
13
|
+
BillingStatus["CANCELLED"] = "cancelled";
|
|
14
|
+
})(BillingStatus || (exports.BillingStatus = BillingStatus = {}));
|
|
15
|
+
;
|
|
16
|
+
var BillingTransactionType;
|
|
17
|
+
(function (BillingTransactionType) {
|
|
18
|
+
BillingTransactionType["INITIAL"] = "initial";
|
|
19
|
+
BillingTransactionType["PRORATA"] = "prorata";
|
|
20
|
+
BillingTransactionType["RENEWAL"] = "renewal";
|
|
21
|
+
BillingTransactionType["REINSTATEMENT"] = "reinstatement";
|
|
22
|
+
})(BillingTransactionType || (exports.BillingTransactionType = BillingTransactionType = {}));
|
|
23
|
+
;
|
|
24
|
+
var BillingTransactionStatus;
|
|
25
|
+
(function (BillingTransactionStatus) {
|
|
26
|
+
BillingTransactionStatus["INITIALIZED"] = "initialized";
|
|
27
|
+
BillingTransactionStatus["PENDING_PAYMENT"] = "pending_payment";
|
|
28
|
+
BillingTransactionStatus["PROCESSING_WEBHOOK"] = "processing_webhook";
|
|
29
|
+
BillingTransactionStatus["PAID"] = "paid";
|
|
30
|
+
BillingTransactionStatus["FAILED"] = "failed";
|
|
31
|
+
BillingTransactionStatus["CANCELLED"] = "cancelled";
|
|
32
|
+
BillingTransactionStatus["EXPIRED"] = "expired";
|
|
33
|
+
})(BillingTransactionStatus || (exports.BillingTransactionStatus = BillingTransactionStatus = {}));
|
|
34
|
+
;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Modules } from "../../modules/enum";
|
|
2
|
-
import { PaymentIntervals } from "../../payments/enums";
|
|
3
2
|
import { OrganizationTypes } from "../enum";
|
|
4
3
|
export type CreateOrganizationDto = {
|
|
5
4
|
org_type: OrganizationTypes;
|
|
@@ -36,7 +35,6 @@ export type CreateOrganizationDto = {
|
|
|
36
35
|
owner_profile_image?: string | null;
|
|
37
36
|
modules: Modules[];
|
|
38
37
|
seats_needed: number;
|
|
39
|
-
payment_frequency: PaymentIntervals.MONTHLY;
|
|
40
38
|
};
|
|
41
39
|
export type UpdateOrganizationDto = {
|
|
42
40
|
type?: OrganizationTypes;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { UUID } from 'crypto';
|
|
2
2
|
import { Modules } from '../modules/enum/index';
|
|
3
3
|
import { UserIdentity } from '../users';
|
|
4
|
-
import {
|
|
5
|
-
import { PaymentStatuses } from '../payments/enums';
|
|
4
|
+
import { BillingStatus } from '../billing/enum';
|
|
6
5
|
export type OrganizationEntity = {
|
|
7
6
|
mms_id: UUID;
|
|
8
7
|
created_at: Date;
|
|
@@ -42,10 +41,9 @@ export type OrganizationEntity = {
|
|
|
42
41
|
payment_frequency: string;
|
|
43
42
|
last_payment_date: Date;
|
|
44
43
|
next_payment_date: Date;
|
|
45
|
-
payment_status:
|
|
44
|
+
payment_status: BillingStatus;
|
|
46
45
|
payment_status_updated_at: Date;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
reinstate_status: SubscriptionReinstateStatus;
|
|
46
|
+
active_seat_count: number;
|
|
47
|
+
paid_seat_count: number;
|
|
50
48
|
card_expiring_soon: boolean;
|
|
51
49
|
};
|
|
@@ -1,39 +1,25 @@
|
|
|
1
|
-
export declare enum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export declare enum BillingStatus {
|
|
2
|
+
PENDING_CUSTOMER_CREATION = "pending_customer_creation",
|
|
3
|
+
PENDING_PLAN_CREATION = "pending_plan_creation",
|
|
4
|
+
PENDING_INITIAL_PAYMENT = "pending_initial_payment",
|
|
5
|
+
PENDING_SUBSCRIPTION_CREATION = "pending_subscription_creation",
|
|
6
|
+
ACTIVE = "active",
|
|
7
|
+
PAYMENT_FAILED = "payment_failed",
|
|
8
|
+
CANCELLATION_SCHEDULED = "cancellation_scheduled",
|
|
9
9
|
CANCELLED = "cancelled"
|
|
10
10
|
}
|
|
11
|
-
export declare enum
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
QUARTERLY = "quarterly",
|
|
17
|
-
BIANNUALLY = "biannually",
|
|
18
|
-
ANNUALLY = "annually"
|
|
19
|
-
}
|
|
20
|
-
export declare enum PlanUpdateStatuses {
|
|
21
|
-
NONE = "none",
|
|
22
|
-
NEW_PLAN_REQUESTED = "new_plan_requested",
|
|
23
|
-
PRO_RATA_CHARGED = "pro_rata_charged",
|
|
24
|
-
PLAN_UPDATED = "plan_updated",
|
|
25
|
-
COMPLETED = "completed"
|
|
11
|
+
export declare enum BillingTransactionType {
|
|
12
|
+
INITIAL = "initial",
|
|
13
|
+
PRORATA = "prorata",
|
|
14
|
+
RENEWAL = "renewal",
|
|
15
|
+
REINSTATEMENT = "reinstatement"
|
|
26
16
|
}
|
|
27
|
-
export declare enum
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
REFUND_PROCESSED = "refund.processed"
|
|
36
|
-
}
|
|
37
|
-
export declare enum PaystackMetadataActions {
|
|
38
|
-
INITIAL_PAYMENT = "initial-payment"
|
|
17
|
+
export declare enum BillingTransactionStatus {
|
|
18
|
+
INITIALIZED = "initialized",
|
|
19
|
+
PENDING_PAYMENT = "pending_payment",
|
|
20
|
+
PROCESSING_WEBHOOK = "processing_webhook",
|
|
21
|
+
PAID = "paid",
|
|
22
|
+
FAILED = "failed",
|
|
23
|
+
CANCELLED = "cancelled",
|
|
24
|
+
EXPIRED = "expired"
|
|
39
25
|
}
|
|
@@ -1,54 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
(function (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})(
|
|
15
|
-
;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
PlanUpdateStatuses["PRO_RATA_CHARGED"] = "pro_rata_charged";
|
|
33
|
-
PlanUpdateStatuses["PLAN_UPDATED"] = "plan_updated";
|
|
34
|
-
// UPGRADE_CRON_JOB_CREATED = 'upgrade_cron_job_created',
|
|
35
|
-
PlanUpdateStatuses["COMPLETED"] = "completed";
|
|
36
|
-
})(PlanUpdateStatuses || (exports.PlanUpdateStatuses = PlanUpdateStatuses = {}));
|
|
37
|
-
;
|
|
38
|
-
var PaystackWebhookEvents;
|
|
39
|
-
(function (PaystackWebhookEvents) {
|
|
40
|
-
PaystackWebhookEvents["CHARGE_SUCCESS"] = "charge.success";
|
|
41
|
-
PaystackWebhookEvents["SUBSCRIPTION_CREATE"] = "subscription.create";
|
|
42
|
-
PaystackWebhookEvents["SUBSCRIPTION_NOT_RENEW"] = "subscription.not_renew";
|
|
43
|
-
PaystackWebhookEvents["SUBSCRIPTION_EXPIRING_CARDS"] = "subscription.expiring_cards";
|
|
44
|
-
PaystackWebhookEvents["INVOICE_PAYMENT_FAILED"] = "invoice.payment_failed";
|
|
45
|
-
PaystackWebhookEvents["INVOICE_CREATE"] = "invoice.create";
|
|
46
|
-
PaystackWebhookEvents["INVOICE_UPDATE"] = "invoice.update";
|
|
47
|
-
PaystackWebhookEvents["REFUND_PROCESSED"] = "refund.processed";
|
|
48
|
-
})(PaystackWebhookEvents || (exports.PaystackWebhookEvents = PaystackWebhookEvents = {}));
|
|
49
|
-
;
|
|
50
|
-
var PaystackMetadataActions;
|
|
51
|
-
(function (PaystackMetadataActions) {
|
|
52
|
-
PaystackMetadataActions["INITIAL_PAYMENT"] = "initial-payment";
|
|
53
|
-
})(PaystackMetadataActions || (exports.PaystackMetadataActions = PaystackMetadataActions = {}));
|
|
54
|
-
;
|
|
3
|
+
exports.BillingTransactionStatus = exports.BillingTransactionType = exports.BillingStatus = void 0;
|
|
4
|
+
var BillingStatus;
|
|
5
|
+
(function (BillingStatus) {
|
|
6
|
+
BillingStatus["PENDING_CUSTOMER_CREATION"] = "pending_customer_creation";
|
|
7
|
+
BillingStatus["PENDING_PLAN_CREATION"] = "pending_plan_creation";
|
|
8
|
+
BillingStatus["PENDING_INITIAL_PAYMENT"] = "pending_initial_payment";
|
|
9
|
+
BillingStatus["PENDING_SUBSCRIPTION_CREATION"] = "pending_subscription_creation";
|
|
10
|
+
BillingStatus["ACTIVE"] = "active";
|
|
11
|
+
BillingStatus["PAYMENT_FAILED"] = "payment_failed";
|
|
12
|
+
BillingStatus["CANCELLATION_SCHEDULED"] = "cancellation_scheduled";
|
|
13
|
+
BillingStatus["CANCELLED"] = "cancelled";
|
|
14
|
+
})(BillingStatus || (exports.BillingStatus = BillingStatus = {}));
|
|
15
|
+
var BillingTransactionType;
|
|
16
|
+
(function (BillingTransactionType) {
|
|
17
|
+
BillingTransactionType["INITIAL"] = "initial";
|
|
18
|
+
BillingTransactionType["PRORATA"] = "prorata";
|
|
19
|
+
BillingTransactionType["RENEWAL"] = "renewal";
|
|
20
|
+
BillingTransactionType["REINSTATEMENT"] = "reinstatement";
|
|
21
|
+
})(BillingTransactionType || (exports.BillingTransactionType = BillingTransactionType = {}));
|
|
22
|
+
var BillingTransactionStatus;
|
|
23
|
+
(function (BillingTransactionStatus) {
|
|
24
|
+
BillingTransactionStatus["INITIALIZED"] = "initialized";
|
|
25
|
+
BillingTransactionStatus["PENDING_PAYMENT"] = "pending_payment";
|
|
26
|
+
BillingTransactionStatus["PROCESSING_WEBHOOK"] = "processing_webhook";
|
|
27
|
+
BillingTransactionStatus["PAID"] = "paid";
|
|
28
|
+
BillingTransactionStatus["FAILED"] = "failed";
|
|
29
|
+
BillingTransactionStatus["CANCELLED"] = "cancelled";
|
|
30
|
+
BillingTransactionStatus["EXPIRED"] = "expired";
|
|
31
|
+
})(BillingTransactionStatus || (exports.BillingTransactionStatus = BillingTransactionStatus = {}));
|
package/package.json
CHANGED