@taphealth/kafka 1.3.9 → 1.3.12
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.
- package/dist/events/payment-captured.d.ts +9 -3
- package/dist/events/payment-failed.d.ts +8 -3
- package/dist/events/refund-initiate.d.ts +9 -3
- package/dist/events/refund-processed.d.ts +9 -3
- package/dist/events/subscription-status.d.ts +14 -0
- package/dist/events/subscription-status.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/topics.d.ts +2 -1
- package/dist/topics.js +1 -0
- package/dist/types/payment.d.ts +5 -3
- package/dist/types/payment.js +7 -4
- package/package.json +1 -1
- package/dist/types/refund.d.ts +0 -5
- package/dist/types/refund.js +0 -9
|
@@ -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
|
-
|
|
8
|
-
|
|
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
|
-
|
|
8
|
-
|
|
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
|
-
|
|
8
|
-
|
|
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
|
-
|
|
8
|
-
|
|
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
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Topics } from "../topics";
|
|
2
|
+
import { PaymentProvider, PaymentType } from "../types/payment";
|
|
3
|
+
export interface SubscriptionStatusEvent {
|
|
4
|
+
topic: Topics.PaymentFailed;
|
|
5
|
+
data: {
|
|
6
|
+
type: PaymentType.SUBSCRIPTION;
|
|
7
|
+
provider: PaymentProvider;
|
|
8
|
+
status: string;
|
|
9
|
+
providerMetadata: {
|
|
10
|
+
subscriptionId?: string;
|
|
11
|
+
};
|
|
12
|
+
error?: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
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";
|
|
@@ -33,3 +32,4 @@ export * from "./events/activity-logged";
|
|
|
33
32
|
export * from "./events/steps-logging";
|
|
34
33
|
export * from "./events/reward-created";
|
|
35
34
|
export * from "./events/proactive-check-in";
|
|
35
|
+
export * from "./events/subscription-status";
|
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);
|
|
@@ -49,3 +48,4 @@ __exportStar(require("./events/activity-logged"), exports);
|
|
|
49
48
|
__exportStar(require("./events/steps-logging"), exports);
|
|
50
49
|
__exportStar(require("./events/reward-created"), exports);
|
|
51
50
|
__exportStar(require("./events/proactive-check-in"), exports);
|
|
51
|
+
__exportStar(require("./events/subscription-status"), exports);
|
package/dist/topics.d.ts
CHANGED
|
@@ -23,5 +23,6 @@ export declare enum Topics {
|
|
|
23
23
|
ActivityLogged = "activity-logged",
|
|
24
24
|
RewardCreated = "reward-created",
|
|
25
25
|
StepsLogging = "steps-logging",
|
|
26
|
-
ProactiveCheckIn = "proactive-check-in"
|
|
26
|
+
ProactiveCheckIn = "proactive-check-in",
|
|
27
|
+
SubscriptionStateChangeEvent = "subscription-state-change"
|
|
27
28
|
}
|
package/dist/topics.js
CHANGED
|
@@ -28,4 +28,5 @@ var Topics;
|
|
|
28
28
|
Topics["RewardCreated"] = "reward-created";
|
|
29
29
|
Topics["StepsLogging"] = "steps-logging";
|
|
30
30
|
Topics["ProactiveCheckIn"] = "proactive-check-in";
|
|
31
|
+
Topics["SubscriptionStateChangeEvent"] = "subscription-state-change";
|
|
31
32
|
})(Topics || (exports.Topics = Topics = {}));
|
package/dist/types/payment.d.ts
CHANGED
package/dist/types/payment.js
CHANGED
|
@@ -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["
|
|
7
|
-
PaymentType["
|
|
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 = {}));
|
package/package.json
CHANGED
package/dist/types/refund.d.ts
DELETED
package/dist/types/refund.js
DELETED
|
@@ -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 = {}));
|