@armoury/fivem-framework-common 1.0.22 → 1.0.23
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/cjs/decorators/event-listener.decorator.js +18 -7
- package/dist/cjs/shared/models/index.js +2 -0
- package/dist/cjs/shared/models/session-update-type.js +7 -0
- package/dist/cjs/shared/models/session.js +1 -1
- package/dist/esm/decorators/event-listener.decorator.js +18 -7
- package/dist/esm/shared/models/index.js +2 -0
- package/dist/esm/shared/models/session-update-type.js +4 -0
- package/dist/esm/shared/models/session.js +1 -1
- package/dist/types/shared/models/index.d.ts +2 -0
- package/dist/types/shared/models/session-update-type.d.ts +3 -0
- package/dist/types/shared/models/session.d.ts +3 -2
- package/package.json +1 -1
|
@@ -48,17 +48,28 @@ var EVENT_DIRECTIONS;
|
|
|
48
48
|
})(EVENT_DIRECTIONS || (exports.EVENT_DIRECTIONS = EVENT_DIRECTIONS = {}));
|
|
49
49
|
// TODO: Refactor this, so resources can add to it
|
|
50
50
|
exports.DEFAULT_EVENTS = {
|
|
51
|
-
|
|
51
|
+
/** Session */
|
|
52
|
+
onPlayerSessionCreated: 'armoury:session-created',
|
|
53
|
+
onPlayerSessionUpdated: 'armoury:session-updated',
|
|
54
|
+
onPlayerSessionDestroyed: 'armoury:session-destroyed',
|
|
55
|
+
/** Authentication */
|
|
56
|
+
onAuthenticationCreated: 'armoury:account-authentication-created',
|
|
57
|
+
onAuthenticationDestroyed: 'armoury:account-authentication-destroyed',
|
|
58
|
+
/** Connection */
|
|
52
59
|
onPlayerConnect: 'playerJoining',
|
|
53
|
-
onPlayerDeath: 'armoury:onPlayerDeath',
|
|
54
|
-
onPlayerAuthenticate: 'authentication:player-authenticated',
|
|
55
|
-
onPlayerLogout: 'armoury:player-logout',
|
|
56
60
|
onPlayerDisconnect: 'playerDropped',
|
|
57
|
-
|
|
58
|
-
onContextMenuItemPressed: 'armoury-overlay:context-menu-item-pressed',
|
|
61
|
+
/** Vehicle */
|
|
59
62
|
onPlayerEnterVehicle: 'armoury:onPlayerEnterVehicle',
|
|
60
63
|
onPlayerExitVehicle: 'armoury:onPlayerExitVehicle',
|
|
61
|
-
onPlayerClientsidedCacheLoaded: 'armoury:player-resource-cache-loaded',
|
|
62
64
|
onPlayerStartTowVehicle: 'armoury:onPlayerStartTowVehicle',
|
|
63
65
|
onPlayerStopTowVehicle: 'armoury:onPlayerStopTowVehicle',
|
|
66
|
+
/** Native */
|
|
67
|
+
onResourceStop: 'onResourceStop',
|
|
68
|
+
/** Other */
|
|
69
|
+
onAccountAuthenticate: 'authentication:account-success',
|
|
70
|
+
onPlayerDeath: 'armoury:onPlayerDeath',
|
|
71
|
+
onPlayerAuthenticate: 'authentication:player-authenticated',
|
|
72
|
+
onPlayerLogout: 'armoury:player-logout',
|
|
73
|
+
onContextMenuItemPressed: 'armoury-overlay:context-menu-item-pressed',
|
|
74
|
+
onPlayerClientsidedCacheLoaded: 'armoury:player-resource-cache-loaded',
|
|
64
75
|
};
|
|
@@ -16,4 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./account"), exports);
|
|
18
18
|
__exportStar(require("./character"), exports);
|
|
19
|
+
/** Session */
|
|
19
20
|
__exportStar(require("./session"), exports);
|
|
21
|
+
__exportStar(require("./session-update-type"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SessionUpdateType = void 0;
|
|
4
|
+
var SessionUpdateType;
|
|
5
|
+
(function (SessionUpdateType) {
|
|
6
|
+
SessionUpdateType[SessionUpdateType["PrincipalUpdate"] = 0] = "PrincipalUpdate";
|
|
7
|
+
})(SessionUpdateType || (exports.SessionUpdateType = SessionUpdateType = {}));
|
|
@@ -43,17 +43,28 @@ export var EVENT_DIRECTIONS;
|
|
|
43
43
|
})(EVENT_DIRECTIONS || (EVENT_DIRECTIONS = {}));
|
|
44
44
|
// TODO: Refactor this, so resources can add to it
|
|
45
45
|
export const DEFAULT_EVENTS = {
|
|
46
|
-
|
|
46
|
+
/** Session */
|
|
47
|
+
onPlayerSessionCreated: 'armoury:session-created',
|
|
48
|
+
onPlayerSessionUpdated: 'armoury:session-updated',
|
|
49
|
+
onPlayerSessionDestroyed: 'armoury:session-destroyed',
|
|
50
|
+
/** Authentication */
|
|
51
|
+
onAuthenticationCreated: 'armoury:account-authentication-created',
|
|
52
|
+
onAuthenticationDestroyed: 'armoury:account-authentication-destroyed',
|
|
53
|
+
/** Connection */
|
|
47
54
|
onPlayerConnect: 'playerJoining',
|
|
48
|
-
onPlayerDeath: 'armoury:onPlayerDeath',
|
|
49
|
-
onPlayerAuthenticate: 'authentication:player-authenticated',
|
|
50
|
-
onPlayerLogout: 'armoury:player-logout',
|
|
51
55
|
onPlayerDisconnect: 'playerDropped',
|
|
52
|
-
|
|
53
|
-
onContextMenuItemPressed: 'armoury-overlay:context-menu-item-pressed',
|
|
56
|
+
/** Vehicle */
|
|
54
57
|
onPlayerEnterVehicle: 'armoury:onPlayerEnterVehicle',
|
|
55
58
|
onPlayerExitVehicle: 'armoury:onPlayerExitVehicle',
|
|
56
|
-
onPlayerClientsidedCacheLoaded: 'armoury:player-resource-cache-loaded',
|
|
57
59
|
onPlayerStartTowVehicle: 'armoury:onPlayerStartTowVehicle',
|
|
58
60
|
onPlayerStopTowVehicle: 'armoury:onPlayerStopTowVehicle',
|
|
61
|
+
/** Native */
|
|
62
|
+
onResourceStop: 'onResourceStop',
|
|
63
|
+
/** Other */
|
|
64
|
+
onAccountAuthenticate: 'authentication:account-success',
|
|
65
|
+
onPlayerDeath: 'armoury:onPlayerDeath',
|
|
66
|
+
onPlayerAuthenticate: 'authentication:player-authenticated',
|
|
67
|
+
onPlayerLogout: 'armoury:player-logout',
|
|
68
|
+
onContextMenuItemPressed: 'armoury-overlay:context-menu-item-pressed',
|
|
69
|
+
onPlayerClientsidedCacheLoaded: 'armoury:player-resource-cache-loaded',
|
|
59
70
|
};
|
|
@@ -2,11 +2,12 @@ export interface Session {
|
|
|
2
2
|
readonly id: number;
|
|
3
3
|
readonly platformId: string;
|
|
4
4
|
readonly lastKnownName: string;
|
|
5
|
-
principal
|
|
5
|
+
principal?: number;
|
|
6
6
|
}
|
|
7
7
|
export declare class Session {
|
|
8
8
|
readonly id: number;
|
|
9
9
|
readonly platformId: string;
|
|
10
10
|
readonly lastKnownName: string;
|
|
11
|
-
|
|
11
|
+
principal?: number | undefined;
|
|
12
|
+
constructor(id: number, platformId: string, lastKnownName: string, principal?: number | undefined);
|
|
12
13
|
}
|