@mx-space/api-client 1.13.2 → 1.14.1

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.
@@ -1,6 +1,7 @@
1
1
  import type { IRequestAdapter } from '~/interfaces/adapter'
2
2
  import type { IController } from '~/interfaces/controller'
3
3
  import type { IRequestHandler } from '~/interfaces/request'
4
+ import type { AuthUser } from '~/models'
4
5
  import type {
5
6
  ActivityPresence,
6
7
  LastYearPublication,
@@ -49,7 +50,10 @@ export class ActivityController<ResponseWrapper> implements IController {
49
50
  * @support core >= 5.0.0
50
51
  */
51
52
  getPresence(roomName: string) {
52
- return this.proxy.presence.get<Record<string, ActivityPresence>>({
53
+ return this.proxy.presence.get<{
54
+ data: Record<string, ActivityPresence>
55
+ readers: Record<string, AuthUser>
56
+ }>({
53
57
  params: {
54
58
  room_name: roomName,
55
59
  },
@@ -67,6 +71,7 @@ export class ActivityController<ResponseWrapper> implements IController {
67
71
  sid,
68
72
  ts,
69
73
  displayName,
74
+ readerId,
70
75
  }: {
71
76
  roomName: string
72
77
  position: number
@@ -75,6 +80,7 @@ export class ActivityController<ResponseWrapper> implements IController {
75
80
 
76
81
  displayName?: string
77
82
  ts?: number
83
+ readerId?: string
78
84
  }) {
79
85
  return this.proxy.presence.update.post({
80
86
  data: {
@@ -83,7 +89,7 @@ export class ActivityController<ResponseWrapper> implements IController {
83
89
  ts: ts || Date.now(),
84
90
  roomName,
85
91
  sid,
86
-
92
+ readerId,
87
93
  displayName,
88
94
  },
89
95
  })