@sendhome/common 1.0.250 → 1.0.252

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.
@@ -0,0 +1,17 @@
1
+ import { Subjects } from "../subjects/subjects";
2
+ export interface ExchangeRateCreatedEvent {
3
+ subject: Subjects.ExchangeRateCreated;
4
+ data: {
5
+ id: string;
6
+ from_currency: string;
7
+ to_currency: string;
8
+ rate: number;
9
+ source: string;
10
+ valid_from: Date;
11
+ valid_until?: Date;
12
+ is_active: boolean;
13
+ created_at: Date;
14
+ updated_at: Date;
15
+ version: number;
16
+ };
17
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var SupportedCurrency;
4
+ (function (SupportedCurrency) {
5
+ SupportedCurrency["USD"] = "USD";
6
+ SupportedCurrency["ZAR"] = "ZAR";
7
+ SupportedCurrency["GBP"] = "GBP";
8
+ SupportedCurrency["EUR"] = "EUR";
9
+ })(SupportedCurrency || (SupportedCurrency = {}));
@@ -0,0 +1,17 @@
1
+ import { Subjects } from "../subjects/subjects";
2
+ export interface ExchangeRateUpdatedEvent {
3
+ subject: Subjects.ExchangeRateUpdated;
4
+ data: {
5
+ id: string;
6
+ from_currency: string;
7
+ to_currency: string;
8
+ rate: number;
9
+ source: string;
10
+ valid_from: Date;
11
+ valid_until?: Date;
12
+ is_active: boolean;
13
+ created_at: Date;
14
+ updated_at: Date;
15
+ version: number;
16
+ };
17
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var SupportedCurrency;
4
+ (function (SupportedCurrency) {
5
+ SupportedCurrency["USD"] = "USD";
6
+ SupportedCurrency["ZAR"] = "ZAR";
7
+ SupportedCurrency["GBP"] = "GBP";
8
+ SupportedCurrency["EUR"] = "EUR";
9
+ })(SupportedCurrency || (SupportedCurrency = {}));
@@ -0,0 +1,27 @@
1
+ import { Subjects } from "../subjects/subjects";
2
+ export declare enum SupportedCurrency {
3
+ USD = "USD",
4
+ ZAR = "ZAR",
5
+ GBP = "GBP",
6
+ EUR = "EUR"
7
+ }
8
+ export interface ForexGainRate {
9
+ from_currency: string;
10
+ to_currency: string;
11
+ gain_ratio: number;
12
+ is_active: boolean;
13
+ }
14
+ export interface ForexGainCreatedEvent {
15
+ subject: Subjects.ForexGainCreated;
16
+ data: {
17
+ id: string;
18
+ default_gain_ratio: number;
19
+ currency_specific_rates: ForexGainRate[];
20
+ is_active: boolean;
21
+ created_by: string;
22
+ updated_by: string;
23
+ created_at: Date;
24
+ updated_at: Date;
25
+ version: number;
26
+ };
27
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SupportedCurrency = void 0;
4
+ var SupportedCurrency;
5
+ (function (SupportedCurrency) {
6
+ SupportedCurrency["USD"] = "USD";
7
+ SupportedCurrency["ZAR"] = "ZAR";
8
+ SupportedCurrency["GBP"] = "GBP";
9
+ SupportedCurrency["EUR"] = "EUR";
10
+ })(SupportedCurrency = exports.SupportedCurrency || (exports.SupportedCurrency = {}));
@@ -0,0 +1,22 @@
1
+ import { Subjects } from "../subjects/subjects";
2
+ interface ForexGainRate {
3
+ from_currency: string;
4
+ to_currency: string;
5
+ gain_ratio: number;
6
+ is_active: boolean;
7
+ }
8
+ export interface ForexGainUpdatedEvent {
9
+ subject: Subjects.ForexGainUpdated;
10
+ data: {
11
+ id: string;
12
+ default_gain_ratio: number;
13
+ currency_specific_rates: ForexGainRate[];
14
+ is_active: boolean;
15
+ created_by: string;
16
+ updated_by: string;
17
+ created_at: Date;
18
+ updated_at: Date;
19
+ version: number;
20
+ };
21
+ }
22
+ export {};
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var SupportedCurrency;
4
+ (function (SupportedCurrency) {
5
+ SupportedCurrency["USD"] = "USD";
6
+ SupportedCurrency["ZAR"] = "ZAR";
7
+ SupportedCurrency["GBP"] = "GBP";
8
+ SupportedCurrency["EUR"] = "EUR";
9
+ })(SupportedCurrency || (SupportedCurrency = {}));
@@ -69,5 +69,9 @@ export declare enum Subjects {
69
69
  CountryCreated = "country:created",
70
70
  CountryUpdated = "country:updated",
71
71
  CityCreated = "city:created",
72
- CityUpdated = "city:updated"
72
+ CityUpdated = "city:updated",
73
+ ExchangeRateCreated = "exchange-rate:created",
74
+ ExchangeRateUpdated = "exchange-rate:updated",
75
+ ForexGainCreated = "forex-gain:created",
76
+ ForexGainUpdated = "forex-gain:updated"
73
77
  }
@@ -105,4 +105,10 @@ var Subjects;
105
105
  // City
106
106
  Subjects["CityCreated"] = "city:created";
107
107
  Subjects["CityUpdated"] = "city:updated";
108
+ // Exchange Rates
109
+ Subjects["ExchangeRateCreated"] = "exchange-rate:created";
110
+ Subjects["ExchangeRateUpdated"] = "exchange-rate:updated";
111
+ // Forex Gains
112
+ Subjects["ForexGainCreated"] = "forex-gain:created";
113
+ Subjects["ForexGainUpdated"] = "forex-gain:updated";
108
114
  })(Subjects = exports.Subjects || (exports.Subjects = {}));
package/build/index.d.ts CHANGED
@@ -40,8 +40,12 @@ export * from "./events/publishers/coupon-updated-event";
40
40
  export * from "./events/publishers/coupon-expired-event";
41
41
  export * from "./events/publishers/delivery-created-event";
42
42
  export * from "./events/publishers/delivery-updated-event";
43
+ export * from "./events/publishers/exchange-rate-created-event";
44
+ export * from "./events/publishers/exchange-rate-updated-event";
43
45
  export * from "./events/publishers/faq-created-event";
44
46
  export * from "./events/publishers/faq-updated-event";
47
+ export * from "./events/publishers/forex-gain-created-event";
48
+ export * from "./events/publishers/forex-gain-updated-event";
45
49
  export * from "./events/publishers/location-created-event";
46
50
  export * from "./events/publishers/location-updated-event";
47
51
  export * from "./events/publishers/module-created-event";
package/build/index.js CHANGED
@@ -53,8 +53,12 @@ __exportStar(require("./events/publishers/coupon-updated-event"), exports);
53
53
  __exportStar(require("./events/publishers/coupon-expired-event"), exports);
54
54
  __exportStar(require("./events/publishers/delivery-created-event"), exports);
55
55
  __exportStar(require("./events/publishers/delivery-updated-event"), exports);
56
+ __exportStar(require("./events/publishers/exchange-rate-created-event"), exports);
57
+ __exportStar(require("./events/publishers/exchange-rate-updated-event"), exports);
56
58
  __exportStar(require("./events/publishers/faq-created-event"), exports);
57
59
  __exportStar(require("./events/publishers/faq-updated-event"), exports);
60
+ __exportStar(require("./events/publishers/forex-gain-created-event"), exports);
61
+ __exportStar(require("./events/publishers/forex-gain-updated-event"), exports);
58
62
  __exportStar(require("./events/publishers/location-created-event"), exports);
59
63
  __exportStar(require("./events/publishers/location-updated-event"), exports);
60
64
  __exportStar(require("./events/publishers/module-created-event"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendhome/common",
3
- "version": "1.0.250",
3
+ "version": "1.0.252",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",