@konplit-services/common 1.0.133 → 1.0.135

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.
Files changed (27) hide show
  1. package/build/events/index.d.ts +1 -0
  2. package/build/events/index.js +1 -0
  3. package/build/events/subjects.d.ts +7 -1
  4. package/build/events/subjects.js +7 -0
  5. package/build/events/transaction/interfaces/index.d.ts +6 -0
  6. package/build/events/transaction/interfaces/index.js +22 -0
  7. package/build/events/transaction/interfaces/transaction-aborted.interface.d.ts +11 -0
  8. package/build/events/transaction/interfaces/transaction-aborted.interface.js +2 -0
  9. package/build/events/transaction/interfaces/transaction-cancelled.interface.d.ts +11 -0
  10. package/build/events/transaction/interfaces/transaction-cancelled.interface.js +2 -0
  11. package/build/events/transaction/interfaces/transaction-completed.interface.d.ts +11 -0
  12. package/build/events/transaction/interfaces/transaction-completed.interface.js +2 -0
  13. package/build/events/transaction/interfaces/transaction-declined.interface.d.ts +11 -0
  14. package/build/events/transaction/interfaces/transaction-declined.interface.js +2 -0
  15. package/build/events/transaction/interfaces/transaction-failed.interface.d.ts +11 -0
  16. package/build/events/transaction/interfaces/transaction-failed.interface.js +2 -0
  17. package/build/events/transaction/interfaces/transaction-processing.interface.d.ts +11 -0
  18. package/build/events/transaction/interfaces/transaction-processing.interface.js +2 -0
  19. package/build/events/transaction/interfaces/transaction-success.interface.d.ts +12 -0
  20. package/build/events/transaction/interfaces/transaction-success.interface.js +2 -0
  21. package/build/events/transaction/interfaces/wallet-credited.interface.d.ts +12 -0
  22. package/build/events/transaction/interfaces/wallet-credited.interface.js +2 -0
  23. package/build/events/transaction/interfaces/wallet-debited.interface.d.ts +12 -0
  24. package/build/events/transaction/interfaces/wallet-debited.interface.js +2 -0
  25. package/build/helper/settlement.d.ts +2 -1
  26. package/build/helper/settlement.js +1 -0
  27. package/package.json +1 -1
@@ -4,5 +4,6 @@ export * from "./logs-events/interfaces";
4
4
  export * from "./notification-events/interfaces";
5
5
  export * from "./wallets/interfaces";
6
6
  export * from "./merchants-events/interfaces";
7
+ export * from "./transaction/interfaces";
7
8
  export * from "./base-events";
8
9
  export * from "./types";
@@ -20,5 +20,6 @@ __exportStar(require("./logs-events/interfaces"), exports);
20
20
  __exportStar(require("./notification-events/interfaces"), exports);
21
21
  __exportStar(require("./wallets/interfaces"), exports);
22
22
  __exportStar(require("./merchants-events/interfaces"), exports);
23
+ __exportStar(require("./transaction/interfaces"), exports);
23
24
  __exportStar(require("./base-events"), exports);
24
25
  __exportStar(require("./types"), exports);
@@ -32,5 +32,11 @@ export declare enum Subjects {
32
32
  APIConfigUpdated = "events.apiconfig.updated",
33
33
  DefaultChargeUpdated = "events.default.charge.updated",
34
34
  SettingCreated = "events.setting.created",
35
- SettingUpdated = "events.setting.updated"
35
+ SettingUpdated = "events.setting.updated",
36
+ transactionCompleted = "events.transaction.completed",
37
+ transactionAborted = "events.transaction.aborted",
38
+ transactionFailed = "events.transaction.failed",
39
+ transactionProcessing = "events.transaction.processing",
40
+ transactionCancelled = "events.transaction.cancelled",
41
+ transactionDeclined = "events.transaction.declined"
36
42
  }
@@ -51,4 +51,11 @@ var Subjects;
51
51
  //Settings
52
52
  Subjects["SettingCreated"] = "events.setting.created";
53
53
  Subjects["SettingUpdated"] = "events.setting.updated";
54
+ //Transactions
55
+ Subjects["transactionCompleted"] = "events.transaction.completed";
56
+ Subjects["transactionAborted"] = "events.transaction.aborted";
57
+ Subjects["transactionFailed"] = "events.transaction.failed";
58
+ Subjects["transactionProcessing"] = "events.transaction.processing";
59
+ Subjects["transactionCancelled"] = "events.transaction.cancelled";
60
+ Subjects["transactionDeclined"] = "events.transaction.declined";
54
61
  })(Subjects = exports.Subjects || (exports.Subjects = {}));
@@ -0,0 +1,6 @@
1
+ export * from "./transaction-completed.interface";
2
+ export * from "./transaction-cancelled.interface";
3
+ export * from "./transaction-failed.interface";
4
+ export * from "./transaction-declined.interface";
5
+ export * from "./transaction-processing.interface";
6
+ export * from "./transaction-aborted.interface";
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./transaction-completed.interface"), exports);
18
+ __exportStar(require("./transaction-cancelled.interface"), exports);
19
+ __exportStar(require("./transaction-failed.interface"), exports);
20
+ __exportStar(require("./transaction-declined.interface"), exports);
21
+ __exportStar(require("./transaction-processing.interface"), exports);
22
+ __exportStar(require("./transaction-aborted.interface"), exports);
@@ -0,0 +1,11 @@
1
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
2
+ export interface TransactionAbortedEvent {
3
+ subject: Subjects.transactionAborted;
4
+ streamName: StreamName.name;
5
+ streamEvents: StreamEvent.Event;
6
+ data: {
7
+ merchantId: string;
8
+ transactionId: string;
9
+ amount: number;
10
+ };
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
2
+ export interface TransactionCancelledEvent {
3
+ subject: Subjects.transactionCancelled;
4
+ streamName: StreamName.name;
5
+ streamEvents: StreamEvent.Event;
6
+ data: {
7
+ merchantId: string;
8
+ transactionId: string;
9
+ amount: number;
10
+ };
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
2
+ export interface TransactionCompletedEvent {
3
+ subject: Subjects.transactionCompleted;
4
+ streamName: StreamName.name;
5
+ streamEvents: StreamEvent.Event;
6
+ data: {
7
+ merchantId: string;
8
+ transactionId: string;
9
+ amount: number;
10
+ };
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
2
+ export interface TransactionDeclinedEvent {
3
+ subject: Subjects.transactionDeclined;
4
+ streamName: StreamName.name;
5
+ streamEvents: StreamEvent.Event;
6
+ data: {
7
+ merchantId: string;
8
+ transactionId: string;
9
+ amount: number;
10
+ };
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
2
+ export interface TransactionFailedEvent {
3
+ subject: Subjects.transactionFailed;
4
+ streamName: StreamName.name;
5
+ streamEvents: StreamEvent.Event;
6
+ data: {
7
+ merchantId: string;
8
+ transactionId: string;
9
+ amount: number;
10
+ };
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
2
+ export interface TransactionProcessingEvent {
3
+ subject: Subjects.transactionProcessing;
4
+ streamName: StreamName.name;
5
+ streamEvents: StreamEvent.Event;
6
+ data: {
7
+ merchantId: string;
8
+ transactionId: string;
9
+ amount: number;
10
+ };
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { CURRENCY_TYPE } from "../../../helper";
2
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
3
+ export interface WalletCreatedEvent {
4
+ subject: Subjects.WalletCreated;
5
+ streamName: StreamName.name;
6
+ streamEvents: StreamEvent.Event;
7
+ data: {
8
+ merchantId: string;
9
+ accountId: string;
10
+ currencyType?: CURRENCY_TYPE;
11
+ };
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { CURRENCY_TYPE } from "../../../helper";
2
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
3
+ export interface WalletCreditedEvent {
4
+ subject: Subjects.WalletCreated;
5
+ streamName: StreamName.name;
6
+ streamEvents: StreamEvent.Event;
7
+ data: {
8
+ merchantId: string;
9
+ amount: number;
10
+ currencyType?: CURRENCY_TYPE;
11
+ };
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { CURRENCY_TYPE } from "../../../helper";
2
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
3
+ export interface WalletDebitedEvent {
4
+ subject: Subjects.WalletDebited;
5
+ streamName: StreamName.name;
6
+ streamEvents: StreamEvent.Event;
7
+ data: {
8
+ merchantId: string;
9
+ amount: number;
10
+ currencyType?: CURRENCY_TYPE;
11
+ };
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,5 +9,6 @@ export declare enum Settlement_TYPES {
9
9
  export declare enum Settlement_Status {
10
10
  PENDING = "PENDING",
11
11
  FAILED = "FAILED",
12
- SETTLED = "SETTLED"
12
+ SETTLED = "SETTLED",
13
+ PROCESSING = "PROCESSING"
13
14
  }
@@ -17,4 +17,5 @@ var Settlement_Status;
17
17
  Settlement_Status["PENDING"] = "PENDING";
18
18
  Settlement_Status["FAILED"] = "FAILED";
19
19
  Settlement_Status["SETTLED"] = "SETTLED";
20
+ Settlement_Status["PROCESSING"] = "PROCESSING";
20
21
  })(Settlement_Status = exports.Settlement_Status || (exports.Settlement_Status = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.133",
3
+ "version": "1.0.135",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",