@wrcb/cb-common 1.0.410 → 1.0.412

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,15 @@
1
+ import { Tenant } from 'src/types/tenant';
2
+ import { Subjects } from '../subjects';
3
+ import { LiveType } from '../../types/liveType';
4
+ export interface LiveEndedEvent {
5
+ subject: Subjects.LiveEnded;
6
+ data: {
7
+ tenant: Tenant.PrivateShow;
8
+ liveId: string;
9
+ streamerId: string;
10
+ viewerId: string;
11
+ liveType: LiveType;
12
+ duration: number;
13
+ totalViewers: number;
14
+ };
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { Tenant } from 'src/types/tenant';
2
+ import { Subjects } from '../subjects';
3
+ import { LiveType } from '../../types/liveType';
4
+ export interface LiveStartedEvent {
5
+ subject: Subjects.LiveStarted;
6
+ data: {
7
+ tenant: Tenant.PrivateShow;
8
+ liveId: string;
9
+ streamerId: string;
10
+ liveType: LiveType.Free;
11
+ roomName: string;
12
+ };
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { Tenant } from 'src/types/tenant';
2
+ import { Subjects } from '../subjects';
3
+ import { LiveType } from '../../types/liveType';
4
+ export interface LiveTypeChangedEvent {
5
+ subject: Subjects.LiveTypeChanged;
6
+ data: {
7
+ tenant: Tenant.PrivateShow;
8
+ liveId: string;
9
+ streamerId: string;
10
+ fromLiveType: LiveType;
11
+ toLiveType: LiveType;
12
+ viewerId?: string;
13
+ };
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { Tenant } from 'src/types/tenant';
2
+ import { Subjects } from '../subjects';
3
+ import { LiveType } from '../../types/liveType';
4
+ export interface PaymentFinishedEvent {
5
+ subject: Subjects.PaymentFinished;
6
+ data: {
7
+ tenant: Tenant.PrivateShow;
8
+ liveId: string;
9
+ streamerId: string;
10
+ viewerId: string;
11
+ liveType: LiveType;
12
+ };
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { Tenant } from 'src/types/tenant';
2
+ import { Subjects } from '../subjects';
3
+ import { LiveType } from '../../types/liveType';
4
+ export interface PaymentStartedEvent {
5
+ subject: Subjects.PaymentStarted;
6
+ data: {
7
+ tenant: Tenant.PrivateShow;
8
+ liveId: string;
9
+ streamerId: string;
10
+ viewerId: string;
11
+ liveType: LiveType;
12
+ };
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { Tenant } from 'src/types/tenant';
2
+ import { Subjects } from '../subjects';
3
+ import { LiveType } from '../../types/liveType';
4
+ export interface ViewerJoinedEvent {
5
+ subject: Subjects.ViewerJoined;
6
+ data: {
7
+ tenant: Tenant.PrivateShow;
8
+ liveId: string;
9
+ streamerId: string;
10
+ viewerId: string;
11
+ liveType: LiveType;
12
+ };
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { Tenant } from 'src/types/tenant';
2
+ import { Subjects } from '../subjects';
3
+ import { LiveType } from '../../types/liveType';
4
+ export interface ViewerLeftEvent {
5
+ subject: Subjects.ViewerLeft;
6
+ data: {
7
+ tenant: Tenant.PrivateShow;
8
+ liveId: string;
9
+ streamerId: string;
10
+ viewerId: string;
11
+ liveType: LiveType;
12
+ };
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -21,5 +21,12 @@ export declare enum Subjects {
21
21
  BetMade = "BetMade",
22
22
  ChargeMade = "ChargeMade",
23
23
  WithdrawalMade = "WithdrawalMade",
24
- FeedPostCreated = "FeedPostCreated"
24
+ FeedPostCreated = "FeedPostCreated",
25
+ LiveEnded = "LiveEnded",
26
+ LiveStarted = "LiveStarted",
27
+ LiveTypeChanged = "LiveTypeChanged",
28
+ PaymentFinished = "PaymentFinished",
29
+ PaymentStarted = "PaymentStarted",
30
+ ViewerJoined = "ViewerJoined",
31
+ ViewerLeft = "ViewerLeft"
25
32
  }
@@ -27,4 +27,11 @@ var Subjects;
27
27
  Subjects["WithdrawalMade"] = "WithdrawalMade";
28
28
  // private show
29
29
  Subjects["FeedPostCreated"] = "FeedPostCreated";
30
+ Subjects["LiveEnded"] = "LiveEnded";
31
+ Subjects["LiveStarted"] = "LiveStarted";
32
+ Subjects["LiveTypeChanged"] = "LiveTypeChanged";
33
+ Subjects["PaymentFinished"] = "PaymentFinished";
34
+ Subjects["PaymentStarted"] = "PaymentStarted";
35
+ Subjects["ViewerJoined"] = "ViewerJoined";
36
+ Subjects["ViewerLeft"] = "ViewerLeft";
30
37
  })(Subjects || (exports.Subjects = Subjects = {}));
package/build/index.d.ts CHANGED
@@ -18,6 +18,8 @@ export * from './types/userCategory';
18
18
  export * from './types/productTypes';
19
19
  export * from './types/orderStatus';
20
20
  export * from './types/feedPostType';
21
+ export * from './types/liveType';
22
+ export * from './types/liveStatus';
21
23
  export * from './events/subjects';
22
24
  export * from './services/TenantDataService';
23
25
  export * from './storage/types';
package/build/index.js CHANGED
@@ -34,6 +34,8 @@ __exportStar(require("./types/userCategory"), exports);
34
34
  __exportStar(require("./types/productTypes"), exports);
35
35
  __exportStar(require("./types/orderStatus"), exports);
36
36
  __exportStar(require("./types/feedPostType"), exports);
37
+ __exportStar(require("./types/liveType"), exports);
38
+ __exportStar(require("./types/liveStatus"), exports);
37
39
  __exportStar(require("./events/subjects"), exports);
38
40
  __exportStar(require("./services/TenantDataService"), exports);
39
41
  __exportStar(require("./storage/types"), exports);
package/build/server.d.ts CHANGED
@@ -43,6 +43,13 @@ export * from './events/couponUsedOnUserSignup';
43
43
  export * from './events/toggledBlockUserEvent';
44
44
  export * from './events/linkAndCodeToVerifyEmailCreatedEvent';
45
45
  export * from './events/linkAndcodeToVerifyWhatsappCreatedEvent';
46
+ export * from './events/private-show/liveEndedEvent';
47
+ export * from './events/private-show/liveStartedEvent';
48
+ export * from './events/private-show/liveTypeChangedEvent';
49
+ export * from './events/private-show/paymentFinishedEvent';
50
+ export * from './events/private-show/paymentStartedEvent';
51
+ export * from './events/private-show/viewerJoinedEvent';
52
+ export * from './events/private-show/viewerLeftEvent';
46
53
  export * from './services/RedisService';
47
54
  export * from './services/TenantDataService';
48
55
  export * from './storage/services/storageService';
package/build/server.js CHANGED
@@ -59,6 +59,13 @@ __exportStar(require("./events/couponUsedOnUserSignup"), exports);
59
59
  __exportStar(require("./events/toggledBlockUserEvent"), exports);
60
60
  __exportStar(require("./events/linkAndCodeToVerifyEmailCreatedEvent"), exports);
61
61
  __exportStar(require("./events/linkAndcodeToVerifyWhatsappCreatedEvent"), exports);
62
+ __exportStar(require("./events/private-show/liveEndedEvent"), exports);
63
+ __exportStar(require("./events/private-show/liveStartedEvent"), exports);
64
+ __exportStar(require("./events/private-show/liveTypeChangedEvent"), exports);
65
+ __exportStar(require("./events/private-show/paymentFinishedEvent"), exports);
66
+ __exportStar(require("./events/private-show/paymentStartedEvent"), exports);
67
+ __exportStar(require("./events/private-show/viewerJoinedEvent"), exports);
68
+ __exportStar(require("./events/private-show/viewerLeftEvent"), exports);
62
69
  __exportStar(require("./services/RedisService"), exports);
63
70
  __exportStar(require("./services/TenantDataService"), exports);
64
71
  __exportStar(require("./storage/services/storageService"), exports);
@@ -0,0 +1,4 @@
1
+ export declare enum LiveStatus {
2
+ Active = "Active",
3
+ Ended = "Ended"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiveStatus = void 0;
4
+ var LiveStatus;
5
+ (function (LiveStatus) {
6
+ LiveStatus["Active"] = "Active";
7
+ LiveStatus["Ended"] = "Ended";
8
+ })(LiveStatus || (exports.LiveStatus = LiveStatus = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum LiveType {
2
+ Free = "Free",
3
+ Private = "Private",
4
+ VIP = "VIP"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiveType = void 0;
4
+ var LiveType;
5
+ (function (LiveType) {
6
+ LiveType["Free"] = "Free";
7
+ LiveType["Private"] = "Private";
8
+ LiveType["VIP"] = "VIP";
9
+ })(LiveType || (exports.LiveType = LiveType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.410",
3
+ "version": "1.0.412",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",