@taphealth/kafka 1.6.41 → 1.6.43

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.
@@ -5,6 +5,10 @@ export interface PaymentCapturedEvent {
5
5
  data: {
6
6
  type: PaymentType;
7
7
  provider: PaymentProvider;
8
+ userId?: string;
9
+ paymentId?: string;
10
+ orderId?: string;
11
+ subscriptionId?: string;
8
12
  paymentMode: string;
9
13
  upi?: {
10
14
  vpa: string;
@@ -5,6 +5,12 @@ export interface PaymentFailedEvent {
5
5
  data: {
6
6
  type: PaymentType;
7
7
  provider: PaymentProvider;
8
+ userId?: string;
9
+ paymentId?: string;
10
+ orderId?: string;
11
+ subscriptionId?: string;
12
+ currency?: string;
13
+ paymentMode?: string;
8
14
  providerMetadata: {
9
15
  orderId?: string;
10
16
  subscriptionId?: string;
@@ -12,5 +18,8 @@ export interface PaymentFailedEvent {
12
18
  };
13
19
  amount: number;
14
20
  error?: string;
21
+ errorCode?: string;
22
+ errorDescription?: string;
23
+ retryCount?: number;
15
24
  };
16
25
  }
@@ -1,10 +1,11 @@
1
1
  import { Topics } from "../topics";
2
- import { PlanUpdatedTrigger } from "../types/plan";
2
+ import { PlanUpdatedTrigger, PlanUpdateTarget } from "../types/plan";
3
3
  export interface PlanUpdateEvent {
4
4
  topic: Topics.PlanUpdate;
5
5
  data: {
6
6
  userId: string;
7
7
  guidelines?: Record<string, string>;
8
8
  trigger: PlanUpdatedTrigger;
9
+ target?: PlanUpdateTarget;
9
10
  };
10
11
  }
@@ -1,10 +1,11 @@
1
1
  import { Topics } from "../topics";
2
- import { PlanUpdatedTrigger } from "../types/plan";
2
+ import { PlanUpdatedTrigger, PlanUpdateTarget } from "../types/plan";
3
3
  export interface PlanUpdatedEvent {
4
4
  topic: Topics.PlanUpdated;
5
5
  data: {
6
6
  userId: string;
7
7
  guidelines?: Record<string, string>;
8
8
  trigger: PlanUpdatedTrigger;
9
+ target?: PlanUpdateTarget;
9
10
  };
10
11
  }
@@ -5,6 +5,10 @@ export interface RefundProcessedEvent {
5
5
  data: {
6
6
  type: PaymentType;
7
7
  provider: PaymentProvider;
8
+ userId?: string;
9
+ paymentId?: string;
10
+ orderId?: string;
11
+ subscriptionId?: string;
8
12
  providerMetadata: {
9
13
  orderId?: string;
10
14
  subscriptionId?: string;
@@ -12,5 +16,6 @@ export interface RefundProcessedEvent {
12
16
  refundId: string;
13
17
  };
14
18
  amount: number;
19
+ refundReason?: string;
15
20
  };
16
21
  }
@@ -5,5 +5,12 @@ export interface SubscriptionCancelledEvent {
5
5
  userId: string;
6
6
  subscriptionId: string;
7
7
  gracePeriodEndDate: Date;
8
+ cancellationReason?: string;
9
+ cancellationRequested?: boolean;
10
+ requestedRefund?: boolean;
11
+ cancellationEffectiveDate?: Date;
12
+ isTrial?: boolean;
13
+ paymentRetryCount?: number;
14
+ phoneNumber?: string;
8
15
  };
9
16
  }
@@ -17,5 +17,8 @@ export interface SubscriptionStatusEvent {
17
17
  promotionCode?: string;
18
18
  };
19
19
  error?: string;
20
+ isTrial?: boolean;
21
+ trialEndDate?: Date;
22
+ paymentRetryCount?: number;
20
23
  };
21
24
  }
@@ -5,5 +5,6 @@ export interface UserTierUpdatedEvent {
5
5
  data: {
6
6
  userId: string;
7
7
  tier: UserTier;
8
+ oldTier?: UserTier;
8
9
  };
9
10
  }
@@ -3,3 +3,7 @@ export declare enum PlanUpdatedTrigger {
3
3
  Symptom = "Symptom",
4
4
  Routine = "Routine"
5
5
  }
6
+ export declare enum PlanUpdateTarget {
7
+ NextWeek = "NextWeek",
8
+ CurrentWeek = "CurrentWeek"
9
+ }
@@ -1,9 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PlanUpdatedTrigger = void 0;
3
+ exports.PlanUpdateTarget = exports.PlanUpdatedTrigger = void 0;
4
4
  var PlanUpdatedTrigger;
5
5
  (function (PlanUpdatedTrigger) {
6
6
  PlanUpdatedTrigger["LabReport"] = "LabReport";
7
7
  PlanUpdatedTrigger["Symptom"] = "Symptom";
8
8
  PlanUpdatedTrigger["Routine"] = "Routine";
9
9
  })(PlanUpdatedTrigger || (exports.PlanUpdatedTrigger = PlanUpdatedTrigger = {}));
10
+ var PlanUpdateTarget;
11
+ (function (PlanUpdateTarget) {
12
+ PlanUpdateTarget["NextWeek"] = "NextWeek";
13
+ PlanUpdateTarget["CurrentWeek"] = "CurrentWeek";
14
+ })(PlanUpdateTarget || (exports.PlanUpdateTarget = PlanUpdateTarget = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taphealth/kafka",
3
- "version": "1.6.41",
3
+ "version": "1.6.43",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",