@managemint-solutions/entities 1.1.23 → 1.1.25

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.
@@ -26,3 +26,16 @@ export declare enum BillingTransactionStatus {
26
26
  CANCELLED = "cancelled",
27
27
  EXPIRED = "expired"
28
28
  }
29
+ export declare enum PaystackWebhookProcessingStatus {
30
+ RECEIVED = "received",
31
+ PROCESSING = "processing",
32
+ PROCESSED = "processed",
33
+ IGNORED_DUPLICATE = "ignored_duplicate",
34
+ FAILED = "failed"
35
+ }
36
+ export declare enum BillingEventSource {
37
+ SYSTEM = "system",
38
+ USER = "user",
39
+ WEBHOOK = "webhook",
40
+ SCHEDULER = "scheduler"
41
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BillingTransactionStatus = exports.BillingTransactionType = exports.BillingStatus = void 0;
3
+ exports.BillingEventSource = exports.PaystackWebhookProcessingStatus = exports.BillingTransactionStatus = exports.BillingTransactionType = exports.BillingStatus = void 0;
4
4
  var BillingStatus;
5
5
  (function (BillingStatus) {
6
6
  BillingStatus["PENDING_CUSTOMER_CREATION"] = "pending_customer_creation";
@@ -35,3 +35,20 @@ var BillingTransactionStatus;
35
35
  BillingTransactionStatus["EXPIRED"] = "expired";
36
36
  })(BillingTransactionStatus || (exports.BillingTransactionStatus = BillingTransactionStatus = {}));
37
37
  ;
38
+ var PaystackWebhookProcessingStatus;
39
+ (function (PaystackWebhookProcessingStatus) {
40
+ PaystackWebhookProcessingStatus["RECEIVED"] = "received";
41
+ PaystackWebhookProcessingStatus["PROCESSING"] = "processing";
42
+ PaystackWebhookProcessingStatus["PROCESSED"] = "processed";
43
+ PaystackWebhookProcessingStatus["IGNORED_DUPLICATE"] = "ignored_duplicate";
44
+ PaystackWebhookProcessingStatus["FAILED"] = "failed";
45
+ })(PaystackWebhookProcessingStatus || (exports.PaystackWebhookProcessingStatus = PaystackWebhookProcessingStatus = {}));
46
+ ;
47
+ var BillingEventSource;
48
+ (function (BillingEventSource) {
49
+ BillingEventSource["SYSTEM"] = "system";
50
+ BillingEventSource["USER"] = "user";
51
+ BillingEventSource["WEBHOOK"] = "webhook";
52
+ BillingEventSource["SCHEDULER"] = "scheduler";
53
+ })(BillingEventSource || (exports.BillingEventSource = BillingEventSource = {}));
54
+ ;
@@ -83,3 +83,17 @@ export type PurchaseModuleResponse = {
83
83
  export type UpdateCardDetails = {
84
84
  link: string;
85
85
  };
86
+ /**
87
+ * Response of GET /billing/pro-rata: what a mid-cycle charge would cost today,
88
+ * priced from the organization's pinned pricebook for the remainder of the
89
+ * current anchored period (day 25 inclusive to day 25 exclusive).
90
+ */
91
+ export type ProRataQuote = {
92
+ amount_minor: number;
93
+ monthly_total_minor: number;
94
+ period_start: string;
95
+ period_end: string;
96
+ days_remaining: number;
97
+ days_in_period: number;
98
+ currency: string;
99
+ };
@@ -12,9 +12,3 @@ export declare enum PaystackWebhookEvent {
12
12
  SUBSCRIPTIONS_WITH_EXPIRING_CARDS = "subscription.expiring_cards",
13
13
  TRANSACTION_SUCCESSFUL = "charge.success"
14
14
  }
15
- export declare enum PaystackWebhookProcessingStatus {
16
- PROCESSING = "processing",
17
- PROCESSED = "processed",
18
- FAILED = "failed",
19
- DUPLICATE = "ignored_duplicate"
20
- }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaystackWebhookProcessingStatus = exports.PaystackWebhookEvent = void 0;
3
+ exports.PaystackWebhookEvent = void 0;
4
4
  var PaystackWebhookEvent;
5
5
  (function (PaystackWebhookEvent) {
6
6
  PaystackWebhookEvent["INVOICE_CREATED"] = "invoice.create";
@@ -17,10 +17,3 @@ var PaystackWebhookEvent;
17
17
  PaystackWebhookEvent["TRANSACTION_SUCCESSFUL"] = "charge.success";
18
18
  })(PaystackWebhookEvent || (exports.PaystackWebhookEvent = PaystackWebhookEvent = {}));
19
19
  ;
20
- var PaystackWebhookProcessingStatus;
21
- (function (PaystackWebhookProcessingStatus) {
22
- PaystackWebhookProcessingStatus["PROCESSING"] = "processing";
23
- PaystackWebhookProcessingStatus["PROCESSED"] = "processed";
24
- PaystackWebhookProcessingStatus["FAILED"] = "failed";
25
- PaystackWebhookProcessingStatus["DUPLICATE"] = "ignored_duplicate";
26
- })(PaystackWebhookProcessingStatus || (exports.PaystackWebhookProcessingStatus = PaystackWebhookProcessingStatus = {}));
@@ -162,6 +162,7 @@ export interface Alerts {
162
162
  payment_retry_processing: boolean;
163
163
  pending_cancellation: boolean;
164
164
  cancelled: boolean;
165
+ card_expiring_soon: boolean;
165
166
  }
166
167
  export interface LoggedInUser extends UserEntity, Permissions {
167
168
  alerts: Alerts | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managemint-solutions/entities",
3
- "version": "1.1.23",
3
+ "version": "1.1.25",
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": {
@@ -12,7 +12,6 @@
12
12
  },
13
13
  "license": "UNLICENSED",
14
14
  "author": "Scott Bebington <scottbebington@gmail.com>",
15
-
16
15
  "type": "commonjs",
17
16
  "exports": {
18
17
  "./package.json": "./package.json",
@@ -21,16 +20,13 @@
21
20
  "default": "./dist/*/index.js"
22
21
  }
23
22
  },
24
-
25
23
  "scripts": {
26
24
  "build": "tsc",
27
25
  "release": "npm run build && npm publish --access public"
28
26
  },
29
-
30
27
  "files": [
31
28
  "dist"
32
29
  ],
33
-
34
30
  "devDependencies": {
35
31
  "@types/node": "^25.6.0"
36
32
  }
@@ -1,25 +0,0 @@
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
- }
@@ -1,31 +0,0 @@
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
- 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 = {}));
@@ -1,12 +0,0 @@
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
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionReinstateStatus = exports.SubscriptionCancellationStatus = void 0;
4
- var SubscriptionCancellationStatus;
5
- (function (SubscriptionCancellationStatus) {
6
- SubscriptionCancellationStatus["NONE"] = "none";
7
- SubscriptionCancellationStatus["PAYSTACK_SUBSCRIPTION_CANCELLED"] = "paystack_subscription_cancelled";
8
- SubscriptionCancellationStatus["CANCELLED"] = "cancelled";
9
- })(SubscriptionCancellationStatus || (exports.SubscriptionCancellationStatus = SubscriptionCancellationStatus = {}));
10
- ;
11
- var SubscriptionReinstateStatus;
12
- (function (SubscriptionReinstateStatus) {
13
- SubscriptionReinstateStatus["NONE"] = "none";
14
- SubscriptionReinstateStatus["REINSTATE_REQUESTED"] = "reinstate_requested";
15
- SubscriptionReinstateStatus["AUTHORIZATION_CHARGED"] = "authorization_charged";
16
- SubscriptionReinstateStatus["SUBSCRIPTION_REINSTATED"] = "subscription_reinstated";
17
- SubscriptionReinstateStatus["COMPLETED"] = "completed";
18
- })(SubscriptionReinstateStatus || (exports.SubscriptionReinstateStatus = SubscriptionReinstateStatus = {}));
19
- ;