@managemint-solutions/entities 1.0.9 → 1.0.11
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/modules/enum/index.d.ts +3 -0
- package/dist/organization/dto/index.d.ts +40 -0
- package/dist/organization/enum/index.d.ts +4 -0
- package/dist/organization/index.d.ts +54 -0
- package/dist/payments/enums/index.d.ts +39 -0
- package/dist/subscription/enum/index.d.ts +12 -0
- package/package.json +29 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Modules } from "../../modules/enum";
|
|
2
|
+
import { PaymentIntervals } from "../../payments/enums";
|
|
3
|
+
import { OrganizationTypes } from "../enum";
|
|
4
|
+
export type CreateOrganizationDto = {
|
|
5
|
+
org_type: OrganizationTypes;
|
|
6
|
+
org_name: string;
|
|
7
|
+
org_trading_name?: string | null;
|
|
8
|
+
org_vat_number?: string | null;
|
|
9
|
+
org_registration_number?: string | null;
|
|
10
|
+
org_email: string;
|
|
11
|
+
org_website?: URL | null;
|
|
12
|
+
org_phone?: string | null;
|
|
13
|
+
org_address_line_1?: string | null;
|
|
14
|
+
org_address_line_2?: string | null;
|
|
15
|
+
org_city?: string | null;
|
|
16
|
+
org_state?: string | null;
|
|
17
|
+
org_postal_code?: string | null;
|
|
18
|
+
org_country?: string | null;
|
|
19
|
+
use_address_for_billing: boolean;
|
|
20
|
+
org_billing_address_line_1?: string | null;
|
|
21
|
+
org_billing_address_line_2?: string | null;
|
|
22
|
+
org_billing_city?: string | null;
|
|
23
|
+
org_billing_state?: string | null;
|
|
24
|
+
org_billing_postal_code?: string | null;
|
|
25
|
+
org_billing_country?: string | null;
|
|
26
|
+
org_consent_given: boolean;
|
|
27
|
+
org_industry?: string | null;
|
|
28
|
+
org_marketting_consent_given: boolean;
|
|
29
|
+
org_currency: string;
|
|
30
|
+
owner_first_name: string;
|
|
31
|
+
owner_last_name: string;
|
|
32
|
+
owner_email: string;
|
|
33
|
+
owner_password: string;
|
|
34
|
+
owner_country_code: string;
|
|
35
|
+
owner_phone: string;
|
|
36
|
+
owner_profile_image?: string | null;
|
|
37
|
+
modules: Modules[];
|
|
38
|
+
seats_needed: number;
|
|
39
|
+
payment_frequency: PaymentIntervals.MONTHLY;
|
|
40
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { UUID } from 'crypto';
|
|
2
|
+
import { Modules } from '../modules/enum/index';
|
|
3
|
+
import { UserIdentity } from '../users';
|
|
4
|
+
import { SubscriptionCancellationStatus, SubscriptionReinstateStatus } from '../subscription/enum';
|
|
5
|
+
import { PaymentStatuses } from '../payments/enums';
|
|
6
|
+
export type Organization = {
|
|
7
|
+
mms_id: UUID;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
type: string;
|
|
10
|
+
name: string;
|
|
11
|
+
trading_name: string;
|
|
12
|
+
vat_number: string;
|
|
13
|
+
registration_number: string;
|
|
14
|
+
email: string;
|
|
15
|
+
phone: string;
|
|
16
|
+
website: string;
|
|
17
|
+
marketing_consent: boolean;
|
|
18
|
+
industry: string;
|
|
19
|
+
currency: string;
|
|
20
|
+
updated_at: Date;
|
|
21
|
+
last_updated_by: UserIdentity | null;
|
|
22
|
+
address_details: {
|
|
23
|
+
address_line_1: string;
|
|
24
|
+
address_line_2: string;
|
|
25
|
+
city: string;
|
|
26
|
+
state: string;
|
|
27
|
+
post_code: string;
|
|
28
|
+
country: string;
|
|
29
|
+
};
|
|
30
|
+
billing_address_details: {
|
|
31
|
+
use_address_for_billing: boolean;
|
|
32
|
+
address_line_1: string;
|
|
33
|
+
address_line_2: string;
|
|
34
|
+
city: string;
|
|
35
|
+
state: string;
|
|
36
|
+
post_code: string;
|
|
37
|
+
country: string;
|
|
38
|
+
};
|
|
39
|
+
leave_calendar_start_month: number;
|
|
40
|
+
billing_cycle_locked: boolean;
|
|
41
|
+
modules: Modules[];
|
|
42
|
+
payment_frequency: string;
|
|
43
|
+
last_payment_date: Date;
|
|
44
|
+
next_payment_date: Date;
|
|
45
|
+
payment_status: PaymentStatuses;
|
|
46
|
+
payment_status_updated_at: Date;
|
|
47
|
+
seats: number;
|
|
48
|
+
cancellation_status: SubscriptionCancellationStatus;
|
|
49
|
+
reinstate_status: SubscriptionReinstateStatus;
|
|
50
|
+
card_expiring_soon: boolean;
|
|
51
|
+
card_expiry_date: string | null;
|
|
52
|
+
card_description: string | null;
|
|
53
|
+
card_brand: string | null;
|
|
54
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare enum PaymentStatuses {
|
|
2
|
+
PAID = "paid",
|
|
3
|
+
AWAITING_INITIAL_PAYMENT = "awaiting initial payment",
|
|
4
|
+
INITIAL_AMOUNT_PAID = "initial amount paid",
|
|
5
|
+
INITIAL_PAYMENT_FAILED = "initial payment failed",
|
|
6
|
+
AWAITING_PLAN = "awaiting plan",
|
|
7
|
+
AWAITING_SUBSCRIPTION = "awaiting subscription",
|
|
8
|
+
SUBSCRIPTION_PAYMENT_FAILED = "subscription payment failed",
|
|
9
|
+
CANCELLED = "cancelled"
|
|
10
|
+
}
|
|
11
|
+
export declare enum PaymentIntervals {
|
|
12
|
+
HOURLY = "hourly",
|
|
13
|
+
DAILY = "daily",
|
|
14
|
+
WEEKLY = "weekly",
|
|
15
|
+
MONTHLY = "monthly",
|
|
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"
|
|
26
|
+
}
|
|
27
|
+
export declare enum PaystackWebhookEvents {
|
|
28
|
+
CHARGE_SUCCESS = "charge.success",
|
|
29
|
+
SUBSCRIPTION_CREATE = "subscription.create",
|
|
30
|
+
SUBSCRIPTION_NOT_RENEW = "subscription.not_renew",
|
|
31
|
+
SUBSCRIPTION_EXPIRING_CARDS = "subscription.expiring_cards",
|
|
32
|
+
INVOICE_PAYMENT_FAILED = "invoice.payment_failed",
|
|
33
|
+
INVOICE_CREATE = "invoice.create",
|
|
34
|
+
INVOICE_UPDATE = "invoice.update",
|
|
35
|
+
REFUND_PROCESSED = "refund.processed"
|
|
36
|
+
}
|
|
37
|
+
export declare enum PaystackMetadataActions {
|
|
38
|
+
INITIAL_PAYMENT = "initial-payment"
|
|
39
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum SubscriptionCancellationStatus {
|
|
2
|
+
NONE = "none",
|
|
3
|
+
PAYSTACK_SUBSCRIPTION_CANCELLED = "paystack_subscription_cancelled",
|
|
4
|
+
CANCELLED = "cancelled"
|
|
5
|
+
}
|
|
6
|
+
export declare enum SubscriptionReinstateStatus {
|
|
7
|
+
NONE = "none",
|
|
8
|
+
REINSTATE_REQUESTED = "reinstate_requested",
|
|
9
|
+
AUTHORIZATION_CHARGED = "authorization_charged",
|
|
10
|
+
SUBSCRIPTION_REINSTATED = "subscription_reinstated",
|
|
11
|
+
COMPLETED = "completed"
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@managemint-solutions/entities",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Entity types used by both the api and portal",
|
|
5
5
|
"homepage": "https://github.com/ManageMint-Solutions/managemint-solutions-entities#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -52,6 +52,34 @@
|
|
|
52
52
|
"./users/enum": {
|
|
53
53
|
"types": "./dist/users/enum/index.d.ts",
|
|
54
54
|
"default": "./dist/users/enum/index.js"
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
"./organization": {
|
|
58
|
+
"types": "./dist/organization/index.d.ts",
|
|
59
|
+
"default": "./dist/organization/index.js"
|
|
60
|
+
},
|
|
61
|
+
"./organization/dto": {
|
|
62
|
+
"types": "./dist/organization/dto/index.d.ts",
|
|
63
|
+
"default": "./dist/organization/dto/index.js"
|
|
64
|
+
},
|
|
65
|
+
"./organization/enum": {
|
|
66
|
+
"types": "./dist/organization/enum/index.d.ts",
|
|
67
|
+
"default": "./dist/organization/enum/index.js"
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
"./modules/enum": {
|
|
71
|
+
"types": "./dist/modules/enum/index.d.ts",
|
|
72
|
+
"default": "./dist/modules/enum/index.js"
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
"./payments/enum": {
|
|
76
|
+
"types": "./dist/payments/enum/index.d.ts",
|
|
77
|
+
"default": "./dist/payments/enum/index.js"
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
"./subscription/enum": {
|
|
81
|
+
"types": "./dist/subscription/enum/index.d.ts",
|
|
82
|
+
"default": "./dist/subscription/enum/index.js"
|
|
55
83
|
}
|
|
56
84
|
},
|
|
57
85
|
"scripts": {
|