@hytopia.com/server-protocol 1.4.20 → 1.4.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hytopia.com/server-protocol",
3
- "version": "1.4.20",
3
+ "version": "1.4.21",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -41,6 +41,7 @@ export enum PacketId {
41
41
  LIGHTS = 44,
42
42
  PLAYERS = 45,
43
43
  PARTICLE_EMITTERS = 46,
44
+ NOTIFICATION_PERMISSION_REQUEST = 47,
44
45
 
45
46
  // Standard Bi-Directional Packet Types: 116 - 127 range
46
47
  CONNECTION = 116,
@@ -0,0 +1,12 @@
1
+ import { definePacket, PacketId } from '../PacketCore';
2
+ import type { IPacket } from '../PacketCore';
3
+ import { notificationPermissionRequestSchema } from '../../schemas/NotificationPermissionRequest';
4
+ import type { NotificationPermissionRequestSchema } from '../../schemas/NotificationPermissionRequest';
5
+ import type { WorldTick } from '../PacketCore';
6
+
7
+ export type NotificationPermissionRequestPacket = IPacket<typeof PacketId.NOTIFICATION_PERMISSION_REQUEST, NotificationPermissionRequestSchema> & [WorldTick];
8
+
9
+ export const notificationPermissionRequestPacketDefinition = definePacket(
10
+ PacketId.NOTIFICATION_PERMISSION_REQUEST,
11
+ notificationPermissionRequestSchema,
12
+ );
@@ -6,6 +6,7 @@ export * from './ChatMessages';
6
6
  export * from './Chunks';
7
7
  export * from './Entities';
8
8
  export * from './Lights';
9
+ export * from './NotificationPermissionRequest';
9
10
  export * from './ParticleEmitters';
10
11
  export * from './PhysicsDebugRender';
11
12
  export * from './PhysicsDebugRaycasts';
@@ -0,0 +1,8 @@
1
+ import type { JSONSchemaType } from 'ajv';
2
+
3
+ export type NotificationPermissionRequestSchema = null;
4
+
5
+ export const notificationPermissionRequestSchema: JSONSchemaType<NotificationPermissionRequestSchema> = {
6
+ type: 'null',
7
+ nullable: true,
8
+ }
package/schemas/index.ts CHANGED
@@ -19,6 +19,7 @@ export * from './Input';
19
19
  export * from './Light';
20
20
  export * from './Lights';
21
21
  export * from './ModelNodeOverride';
22
+ export * from './NotificationPermissionRequest';
22
23
  export * from './ParticleEmitter';
23
24
  export * from './ParticleEmitters';
24
25
  export * from './PhysicsDebugRaycast';