@messenger-box/platform-client 10.0.3-alpha.46 → 10.0.3-alpha.48

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [10.0.3-alpha.48](https://github.com/CDEBase/messenger-box/compare/v10.0.3-alpha.47...v10.0.3-alpha.48) (2025-05-30)
7
+
8
+ **Note:** Version bump only for package @messenger-box/platform-client
9
+
10
+ ## [10.0.3-alpha.47](https://github.com/CDEBase/messenger-box/compare/v10.0.3-alpha.46...v10.0.3-alpha.47) (2025-05-26)
11
+
12
+ **Note:** Version bump only for package @messenger-box/platform-client
13
+
6
14
  ## [10.0.3-alpha.46](https://github.com/CDEBase/messenger-box/compare/v10.0.3-alpha.45...v10.0.3-alpha.46) (2025-05-19)
7
15
 
8
16
  **Note:** Version bump only for package @messenger-box/platform-client
@@ -1 +1 @@
1
- {"version":3,"file":"channel-policies.d.ts","sourceRoot":"","sources":["../../../src/graphql/policies/channel-policies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,eAAO,MAAM,eAAe,EAAE,YAyD7B,CAAC"}
1
+ {"version":3,"file":"channel-policies.d.ts","sourceRoot":"","sources":["../../../src/graphql/policies/channel-policies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,eAAO,MAAM,eAAe,EAAE,YA8D7B,CAAC"}
@@ -46,6 +46,11 @@ const channelPolicies = {
46
46
  const members = readField('members');
47
47
  return members && Array.isArray(members) ? members.length : 0;
48
48
  }
49
+ },
50
+ lastMessage: {
51
+ read(lastMessage) {
52
+ return lastMessage || null;
53
+ }
49
54
  }
50
55
  }
51
56
  },
@@ -1 +1 @@
1
- {"version":3,"file":"channel-policies.js","sources":["../../../src/graphql/policies/channel-policies.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEa,MAAA,eAAe,GAAiB;AACzC,EAAA,KAAA,EAAK;AACD,IAAA,MAAA,EAAA;AACI,MAAA,cAAA,EAAA;AACI,QAAA,KAAA,CAAA,QAAM,GAAA,EAAA,EAAA,QAAe,EAAQ;;AAEzB,UAAA,OAAA,QAAA;;;AAGJ,QAAA,OAAA,EAAA,CAAA,UAAU,EAAA,MAAU,EAAE,OAAM,CAAE;;AAE9B,QAAA,IAAA,CAAA,QAAK,EAAA;;AAED,SAAA,EAAA;AAAe;AACf,UAAA,IAAA,CAAA,QAAA,EAAA,gBAAgB;iBACnB,QAAA;AACJ;AACJ;AACJ;AACD,GAAA;SACa,EAAA;AACT,IAAA,SAAA,EAAQ,CAAA,IAAA,CAAA;AACJ,IAAA,MAAA,EAAA;AACI,MAAA,OAAA,EAAA;AACI,QAAA,KAAA,CAAA,QAAA,GAAA,EAAO,UAAS,EAAA;iBACnB,QAAA;AACJ;;AAED;AACI,MAAA,KAAA,EAAA;oBACI;iBACH,KAAA,IAAA,EAAA;AACJ;AACD,OAAA;AACI,MAAA,WAAA,EAAA;wBACW,EAAA;iBACV,WAAA,IAAA,EAAA;AACJ;;AAED;AACI,MAAA,WAAA,EAAA;AACI,QAAA,IAAA,CAAA,CAAA,EAAA;AACA,UAAA;;AAEP,UAAA,MAAA,OAAA,GAAA,SAAA,CAAA,SAAA,CAAA;AACJ,UAAA,OAAA,OAAA,IAAA,KAAA,CAAA,OAAA,CAAA,OAAA,CAAA,GAAA,OAAA,CAAA,MAAA,GAAA,CAAA;AACJ;;AAED;;AAEI;AACI,EAAA,aAAA,EAAM;gBACF,IAA6C,CAAA;AAC7C,IAAA,MAAA,EAAA;AACH,MAAA,IAAA,EAAA;AACJ;AACJ,QAAA,KAAA,EAAA;;;;"}
1
+ {"version":3,"file":"channel-policies.js","sources":["../../../src/graphql/policies/channel-policies.ts"],"sourcesContent":[null],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$criteria: AnyObject, $limit: Int, $skip:
20
20
  }
21
21
 
22
22
 
23
+ query GetChannelsByUserWithLastMessage($role: String, $criteria: AnyObject, $limit: Int, $skip: Int, $sort: Sort) {
24
+ channelsByUser(role: $role, criteria: $criteria, limit: $limit, skip: $skip, sort: $sort) {
25
+ id
26
+ title
27
+ description
28
+ type
29
+ displayName
30
+ members {
31
+ id
32
+ user {
33
+ ...MessengerUser
34
+ }
35
+ }
36
+ creator {
37
+ ...MessengerUser
38
+ }
39
+ lastMessage {
40
+ ...Post
41
+ }
42
+ createdAt
43
+ updatedAt
44
+ }
45
+ }
46
+
47
+
23
48
 
24
49
  query GetChannelsByUserWithServiceChannels($role: String, $criteria: AnyObject, $supportServiceCriteria: AnyObject, $limit: Int, $skip: Int, $sort: Sort,$supportServices:Boolean = true) {
25
50
  supportServiceChannels(role: $role, criteria: $supportServiceCriteria, limit: $limit, skip: $skip, sort: $sort) @include(if: $supportServices) {
@@ -18,3 +18,7 @@ query GetPostThread($postThreadId: ID, $channelId: ID, $postParentId: ID, $role:
18
18
  }
19
19
  }
20
20
  }
21
+
22
+ query ThreadMessagesCount($channelId: ID, $postParentId: ID, $role: String, $participantsIds: [String], $selectedFields: String, $isServiceThreads: Boolean) {
23
+ threadMessagesCount(channelId: $channelId, postParentId: $postParentId, role: $role, participantsIds: $participantsIds, selectedFields: $selectedFields, isServiceThreads: $isServiceThreads)
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@messenger-box/platform-client",
3
- "version": "10.0.3-alpha.46",
3
+ "version": "10.0.3-alpha.48",
4
4
  "description": "Sample core for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@container-stack/file-info-client": "^5.4.1-alpha.6",
24
- "@messenger-box/core": "10.0.3-alpha.46",
24
+ "@messenger-box/core": "10.0.3-alpha.48",
25
25
  "key-mirror": "1.0.1",
26
26
  "moment-timezone": "0.5.33"
27
27
  },
@@ -35,5 +35,5 @@
35
35
  "typescript": {
36
36
  "definition": "lib/index.d.ts"
37
37
  },
38
- "gitHead": "5bc321d4000aa9d26ae0bdad9461598851b75174"
38
+ "gitHead": "164356479ddd307a52d0d622fa8447311c017bc2"
39
39
  }
@@ -45,6 +45,11 @@ export const channelPolicies: TypePolicies = {
45
45
  return members && Array.isArray(members) ? members.length : 0;
46
46
  },
47
47
  },
48
+ lastMessage: {
49
+ read(lastMessage) {
50
+ return lastMessage || null;
51
+ },
52
+ },
48
53
  },
49
54
  },
50
55
  // Add policies for ChannelMember type
@@ -20,6 +20,31 @@ query GetChannelsByUser($role: String, $criteria: AnyObject, $limit: Int, $skip:
20
20
  }
21
21
 
22
22
 
23
+ query GetChannelsByUserWithLastMessage($role: String, $criteria: AnyObject, $limit: Int, $skip: Int, $sort: Sort) {
24
+ channelsByUser(role: $role, criteria: $criteria, limit: $limit, skip: $skip, sort: $sort) {
25
+ id
26
+ title
27
+ description
28
+ type
29
+ displayName
30
+ members {
31
+ id
32
+ user {
33
+ ...MessengerUser
34
+ }
35
+ }
36
+ creator {
37
+ ...MessengerUser
38
+ }
39
+ lastMessage {
40
+ ...Post
41
+ }
42
+ createdAt
43
+ updatedAt
44
+ }
45
+ }
46
+
47
+
23
48
 
24
49
  query GetChannelsByUserWithServiceChannels($role: String, $criteria: AnyObject, $supportServiceCriteria: AnyObject, $limit: Int, $skip: Int, $sort: Sort,$supportServices:Boolean = true) {
25
50
  supportServiceChannels(role: $role, criteria: $supportServiceCriteria, limit: $limit, skip: $skip, sort: $sort) @include(if: $supportServices) {
@@ -18,3 +18,7 @@ query GetPostThread($postThreadId: ID, $channelId: ID, $postParentId: ID, $role:
18
18
  }
19
19
  }
20
20
  }
21
+
22
+ query ThreadMessagesCount($channelId: ID, $postParentId: ID, $role: String, $participantsIds: [String], $selectedFields: String, $isServiceThreads: Boolean) {
23
+ threadMessagesCount(channelId: $channelId, postParentId: $postParentId, role: $role, participantsIds: $participantsIds, selectedFields: $selectedFields, isServiceThreads: $isServiceThreads)
24
+ }