@eleven-am/pondsocket 0.1.114 → 0.1.115
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/nest.d.ts +1 -0
- package/nest.js +11 -1
- package/package.json +1 -1
- package/types.d.ts +6 -0
package/nest.d.ts
CHANGED
package/nest.js
CHANGED
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.PondSocketModule = exports.Endpoint = exports.Channel = exports.EndpointInstance = exports.ChannelInstance = exports.OnLeaveEvent = exports.OnEvent = exports.OnJoinRequest = exports.OnConnectionRequest = exports.GetLeaveEvent = exports.GetEventRequest = exports.GetEventResponse = exports.GetEventQuery = exports.GetEventParams = exports.GetEventPayload = exports.GetJoinParams = exports.GetJoinResponse = exports.GetJoinRequest = exports.GetConnectionQuery = exports.GetConnectionHeaders = exports.GetConnectionParams = exports.GetConnectionRequestId = exports.GetConnectionResponse = exports.GetConnectionRequest = exports.GetUserPresences = exports.GetInternalChannel = exports.GetUserData = exports.createParamDecorator = exports.PondGuards = void 0;
|
|
23
|
+
exports.PondSocketModule = exports.Endpoint = exports.Channel = exports.EndpointInstance = exports.ChannelInstance = exports.OnLeaveEvent = exports.OnEvent = exports.OnJoinRequest = exports.OnConnectionRequest = exports.GetChannel = exports.GetLeaveEvent = exports.GetEventRequest = exports.GetEventResponse = exports.GetEventQuery = exports.GetEventParams = exports.GetEventPayload = exports.GetJoinParams = exports.GetJoinResponse = exports.GetJoinRequest = exports.GetConnectionQuery = exports.GetConnectionHeaders = exports.GetConnectionParams = exports.GetConnectionRequestId = exports.GetConnectionResponse = exports.GetConnectionRequest = exports.GetUserPresences = exports.GetInternalChannel = exports.GetUserData = exports.createParamDecorator = exports.PondGuards = void 0;
|
|
24
24
|
const http_1 = require("http");
|
|
25
25
|
const common_1 = require("@nestjs/common");
|
|
26
26
|
// eslint-disable-next-line import/no-unresolved
|
|
@@ -517,6 +517,16 @@ function GetLeaveEvent() {
|
|
|
517
517
|
})(null);
|
|
518
518
|
}
|
|
519
519
|
exports.GetLeaveEvent = GetLeaveEvent;
|
|
520
|
+
function GetChannel() {
|
|
521
|
+
return createParamDecorator((_, context) => {
|
|
522
|
+
const channel = context.channel;
|
|
523
|
+
if (!channel) {
|
|
524
|
+
throw new Error('Invalid decorator usage: GetChannel');
|
|
525
|
+
}
|
|
526
|
+
return channel;
|
|
527
|
+
})(null);
|
|
528
|
+
}
|
|
529
|
+
exports.GetChannel = GetChannel;
|
|
520
530
|
function manageAction(instance, moduleRef, originalMethod, propertyKey, request, response) {
|
|
521
531
|
return __awaiter(this, void 0, void 0, function* () {
|
|
522
532
|
const req = {};
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -854,6 +854,12 @@ declare function GetConnectionQuery(): ParameterDecorator;
|
|
|
854
854
|
*/
|
|
855
855
|
declare function GetLeaveEvent(): ParameterDecorator;
|
|
856
856
|
|
|
857
|
+
/**
|
|
858
|
+
* @desc The Decorator for retrieving the Channel object from the request in a handler
|
|
859
|
+
* @returns {Channel}
|
|
860
|
+
*/
|
|
861
|
+
declare function GetChannel (): ParameterDecorator;
|
|
862
|
+
|
|
857
863
|
/**
|
|
858
864
|
* @desc Function to create a param decorator
|
|
859
865
|
* @param callback - The callback to call when the decorator is used
|