@taphealth/kafka 1.3.8 → 1.3.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.
@@ -1,10 +1,16 @@
1
1
  import { Topics } from "../topics";
2
- import { PaymentType } from "../types/payment";
2
+ import { PaymentProvider, PaymentType } from "../types/payment";
3
3
  export interface PaymentCapturedEvent {
4
4
  topic: Topics.PaymentCaptured;
5
5
  data: {
6
6
  type: PaymentType;
7
- razorpayOrderId?: string;
8
- razorpaySubscriptionId?: string;
7
+ provider: PaymentProvider;
8
+ providerMetadata: {
9
+ orderId?: string;
10
+ subscriptionId?: string;
11
+ paymentId: string;
12
+ };
13
+ amount: number;
14
+ currency: string;
9
15
  };
10
16
  }
@@ -1,10 +1,15 @@
1
1
  import { Topics } from "../topics";
2
- import { PaymentType } from "../types/payment";
2
+ import { PaymentProvider, PaymentType } from "../types/payment";
3
3
  export interface PaymentFailedEvent {
4
4
  topic: Topics.PaymentFailed;
5
5
  data: {
6
6
  type: PaymentType;
7
- razorpayOrderId?: string;
8
- razorpaySubscriptionId?: string;
7
+ provider: PaymentProvider;
8
+ providerMetadata: {
9
+ orderId?: string;
10
+ subscriptionId?: string;
11
+ paymentId: string;
12
+ };
13
+ error?: string;
9
14
  };
10
15
  }
@@ -1,10 +1,16 @@
1
1
  import { Topics } from "../topics";
2
- import { PaymentType } from "../types/payment";
2
+ import { PaymentProvider, PaymentType } from "../types/payment";
3
3
  export interface RefundInitiateEvent {
4
4
  topic: Topics.RefundInitiate;
5
5
  data: {
6
6
  type: PaymentType;
7
- razorpayOrderId?: string;
8
- razorpaySubscriptionId?: string;
7
+ provider: PaymentProvider;
8
+ providerMetadata: {
9
+ orderId?: string;
10
+ subscriptionId?: string;
11
+ paymentId: string;
12
+ };
13
+ amount: number;
14
+ reason?: string;
9
15
  };
10
16
  }
@@ -1,10 +1,16 @@
1
1
  import { Topics } from "../topics";
2
- import { PaymentType } from "../types/payment";
2
+ import { PaymentProvider, PaymentType } from "../types/payment";
3
3
  export interface RefundProcessedEvent {
4
4
  topic: Topics.RefundProcessed;
5
5
  data: {
6
6
  type: PaymentType;
7
- razorpayOrderId?: string;
8
- razorpaySubscriptionId?: string;
7
+ provider: PaymentProvider;
8
+ providerMetadata: {
9
+ orderId?: string;
10
+ subscriptionId?: string;
11
+ paymentId: string;
12
+ refundId: string;
13
+ };
14
+ amount: number;
9
15
  };
10
16
  }
package/dist/index.d.ts CHANGED
@@ -3,7 +3,6 @@ export * from "./kafka";
3
3
  export * from "./producer";
4
4
  export * from "./consumer";
5
5
  export * from "./types/appointment";
6
- export * from "./types/refund";
7
6
  export * from "./types/payment";
8
7
  export * from "./types/profile";
9
8
  export * from "./types/glucose";
package/dist/index.js CHANGED
@@ -19,7 +19,6 @@ __exportStar(require("./kafka"), exports);
19
19
  __exportStar(require("./producer"), exports);
20
20
  __exportStar(require("./consumer"), exports);
21
21
  __exportStar(require("./types/appointment"), exports);
22
- __exportStar(require("./types/refund"), exports);
23
22
  __exportStar(require("./types/payment"), exports);
24
23
  __exportStar(require("./types/profile"), exports);
25
24
  __exportStar(require("./types/glucose"), exports);
@@ -1,5 +1,7 @@
1
1
  export declare enum PaymentType {
2
- OnlineAppointment = "online_appointment",
3
- OfflineAppointment = "offline_appointment",
4
- Dtx = "dtx"
2
+ SUBSCRIPTION = 0,
3
+ ONE_TIME = 1
4
+ }
5
+ export declare enum PaymentProvider {
6
+ RAZORPAY = 0
5
7
  }
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaymentType = void 0;
3
+ exports.PaymentProvider = exports.PaymentType = void 0;
4
4
  var PaymentType;
5
5
  (function (PaymentType) {
6
- PaymentType["OnlineAppointment"] = "online_appointment";
7
- PaymentType["OfflineAppointment"] = "offline_appointment";
8
- PaymentType["Dtx"] = "dtx";
6
+ PaymentType[PaymentType["SUBSCRIPTION"] = 0] = "SUBSCRIPTION";
7
+ PaymentType[PaymentType["ONE_TIME"] = 1] = "ONE_TIME";
9
8
  })(PaymentType || (exports.PaymentType = PaymentType = {}));
9
+ var PaymentProvider;
10
+ (function (PaymentProvider) {
11
+ PaymentProvider[PaymentProvider["RAZORPAY"] = 0] = "RAZORPAY";
12
+ })(PaymentProvider || (exports.PaymentProvider = PaymentProvider = {}));
@@ -29,9 +29,6 @@ export interface ProfileUpdatedData {
29
29
  }
30
30
  export interface settings {
31
31
  personal: PersonalSettings;
32
- breakfast: BreakfastSettings;
33
- lunch: LunchSettings;
34
- dinner: DinnerSettings;
35
32
  diet: DietSettings;
36
33
  lifestyleRoutine: LifeStyleRoutineSettings;
37
34
  medical: MedicalSettings;
@@ -76,38 +73,6 @@ export interface DietSettings {
76
73
  medications: string[];
77
74
  calorieIntake?: number;
78
75
  }
79
- export interface LunchSettings {
80
- hasLunch: boolean;
81
- hasVegetablesInLunch: boolean;
82
- hasPulsesInLunch: boolean;
83
- hasMeatInLunch: boolean;
84
- hasRotiInLunch: boolean;
85
- hasRiceInLunch: boolean;
86
- lunchVegetableIntake: string;
87
- lunchPulseIntake: string;
88
- lunchMeatIntake: string;
89
- lunchRotiIntake: string;
90
- lunchRiceIntake: string;
91
- }
92
- export interface BreakfastSettings {
93
- hasBreakfast: boolean;
94
- breakfastMealSize: string;
95
- hasMealInBreakfast: boolean;
96
- hasBeverageInBreakfast: boolean;
97
- }
98
- export interface DinnerSettings {
99
- hasDinner: boolean;
100
- hasVegetablesInDinner: boolean;
101
- hasPulsesInDinner: boolean;
102
- hasMeatInDinner: boolean;
103
- hasRotiInDinner: boolean;
104
- hasRiceInDinner: boolean;
105
- dinnerVegetableIntake: string;
106
- dinnerPulseIntake: string;
107
- dinnerMeatIntake: string;
108
- dinnerRotiIntake: string;
109
- dinnerRiceIntake: string;
110
- }
111
76
  export interface MedicalSettings {
112
77
  medicalConditions: string[];
113
78
  recentSurgery: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taphealth/kafka",
3
- "version": "1.3.8",
3
+ "version": "1.3.11",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,5 +0,0 @@
1
- export declare enum RefundStatus {
2
- Initiate = "initiate",
3
- Processed = "processed",
4
- Failed = "failed"
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RefundStatus = void 0;
4
- var RefundStatus;
5
- (function (RefundStatus) {
6
- RefundStatus["Initiate"] = "initiate";
7
- RefundStatus["Processed"] = "processed";
8
- RefundStatus["Failed"] = "failed";
9
- })(RefundStatus || (exports.RefundStatus = RefundStatus = {}));