@connectedxm/admin 7.0.2 → 7.0.5

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/index.js CHANGED
@@ -622,8 +622,14 @@ var VideoSource = /* @__PURE__ */ ((VideoSource2) => {
622
622
  VideoSource2["admin"] = "admin";
623
623
  VideoSource2["activity"] = "activity";
624
624
  VideoSource2["content"] = "content";
625
+ VideoSource2["thread"] = "thread";
625
626
  return VideoSource2;
626
627
  })(VideoSource || {});
628
+ var ThreadType = /* @__PURE__ */ ((ThreadType2) => {
629
+ ThreadType2["direct"] = "direct";
630
+ ThreadType2["default"] = "default";
631
+ return ThreadType2;
632
+ })(ThreadType || {});
627
633
  var ThreadMessageType = /* @__PURE__ */ ((ThreadMessageType2) => {
628
634
  ThreadMessageType2["user"] = "user";
629
635
  ThreadMessageType2["bot"] = "bot";
@@ -19409,7 +19415,7 @@ var useGetVideos = (source, params = {}, options = {}) => {
19409
19415
 
19410
19416
  // src/queries/storage/videos/useGetVideo.ts
19411
19417
  var VIDEO_QUERY_KEY = (videoId) => [
19412
- ...VIDEOS_QUERY_KEY(""),
19418
+ ...VIDEOS_QUERY_KEY(),
19413
19419
  videoId
19414
19420
  ];
19415
19421
  var SET_VIDEO_QUERY_DATA = (client, keyParams, response) => {
@@ -19475,7 +19481,7 @@ var useGetVideoCaptions = (videoId = "", params = {}, options = {}) => {
19475
19481
 
19476
19482
  // src/queries/storage/videos/useGetVideoDownloadStatus.ts
19477
19483
  var VIDEO_DOWNLOAD_STATUS_QUERY_KEY = (videoId) => [
19478
- ...VIDEOS_QUERY_KEY(""),
19484
+ ...VIDEOS_QUERY_KEY(),
19479
19485
  videoId,
19480
19486
  "download-status"
19481
19487
  ];
@@ -21119,8 +21125,10 @@ var useGetSurveySessions = (surveyId = "", params = {}, options = {}) => {
21119
21125
  };
21120
21126
 
21121
21127
  // src/queries/threads/useGetThreads.ts
21122
- var THREADS_QUERY_KEY = () => {
21123
- return ["THREADS"];
21128
+ var THREADS_QUERY_KEY = (type) => {
21129
+ const keys = ["THREADS"];
21130
+ if (type) keys.push(type);
21131
+ return keys;
21124
21132
  };
21125
21133
  var SET_THREADS_QUERY_DATA = (client, keyParams, response) => {
21126
21134
  client.setQueryData(THREADS_QUERY_KEY(...keyParams), response);
@@ -21130,6 +21138,7 @@ var GetThreads = async ({
21130
21138
  pageSize,
21131
21139
  orderBy,
21132
21140
  search,
21141
+ type,
21133
21142
  adminApiParams
21134
21143
  }) => {
21135
21144
  const adminApi = await GetAdminAPI(adminApiParams);
@@ -21138,15 +21147,16 @@ var GetThreads = async ({
21138
21147
  page: pageParam || void 0,
21139
21148
  pageSize: pageSize || void 0,
21140
21149
  orderBy: orderBy || void 0,
21141
- search: search || void 0
21150
+ search: search || void 0,
21151
+ type: type || void 0
21142
21152
  }
21143
21153
  });
21144
21154
  return data;
21145
21155
  };
21146
- var useGetThreads = (params = {}, options = {}) => {
21156
+ var useGetThreads = (type, params = {}, options = {}) => {
21147
21157
  return useConnectedInfiniteQuery(
21148
- THREADS_QUERY_KEY(),
21149
- (params2) => GetThreads({ ...params2 }),
21158
+ THREADS_QUERY_KEY(type),
21159
+ (params2) => GetThreads({ ...params2, type }),
21150
21160
  params,
21151
21161
  options
21152
21162
  );
@@ -37717,7 +37727,7 @@ var DeleteManyVideos = async ({
37717
37727
  videos
37718
37728
  );
37719
37729
  if (queryClient && data.status === "ok") {
37720
- queryClient.invalidateQueries({ queryKey: VIDEOS_QUERY_KEY("") });
37730
+ queryClient.invalidateQueries({ queryKey: VIDEOS_QUERY_KEY() });
37721
37731
  }
37722
37732
  return data;
37723
37733
  };
@@ -37756,7 +37766,7 @@ var InitiateVideoDownload = async ({
37756
37766
  if (queryClient && data.status === "ok") {
37757
37767
  queryClient.invalidateQueries({ queryKey: VIDEOS_QUERY_KEY() });
37758
37768
  if (data.data?.default?.url) {
37759
- queryClient.invalidateQueries({ queryKey: VIDEOS_QUERY_KEY(videoId) });
37769
+ queryClient.invalidateQueries({ queryKey: VIDEOS_QUERY_KEY() });
37760
37770
  }
37761
37771
  }
37762
37772
  return data;
@@ -41825,6 +41835,7 @@ export {
41825
41835
  TaxLocationType,
41826
41836
  TestTaxIntegration,
41827
41837
  ThreadMessageType,
41838
+ ThreadType,
41828
41839
  ToggleOrganizationPaymentIntegration,
41829
41840
  ToggleTaxIntegration,
41830
41841
  TransferEventPass,
package/openapi.json CHANGED
@@ -88693,6 +88693,15 @@
88693
88693
  "summary": "Get Threads",
88694
88694
  "description": "Get Threads endpoint",
88695
88695
  "parameters": [
88696
+ {
88697
+ "in": "query",
88698
+ "name": "type",
88699
+ "schema": {
88700
+ "$ref": "#/components/schemas/ThreadType"
88701
+ },
88702
+ "description": "Filter by type",
88703
+ "required": false
88704
+ },
88696
88705
  {
88697
88706
  "in": "query",
88698
88707
  "name": "page",
@@ -105983,7 +105992,8 @@
105983
105992
  "enum": [
105984
105993
  "admin",
105985
105994
  "activity",
105986
- "content"
105995
+ "content",
105996
+ "thread"
105987
105997
  ]
105988
105998
  },
105989
105999
  "BaseVideo": {
@@ -106296,12 +106306,22 @@
106296
106306
  }
106297
106307
  ]
106298
106308
  },
106309
+ "ThreadType": {
106310
+ "type": "string",
106311
+ "enum": [
106312
+ "direct",
106313
+ "default"
106314
+ ]
106315
+ },
106299
106316
  "BaseThread": {
106300
106317
  "type": "object",
106301
106318
  "properties": {
106302
106319
  "id": {
106303
106320
  "type": "string"
106304
106321
  },
106322
+ "type": {
106323
+ "$ref": "#/components/schemas/ThreadType"
106324
+ },
106305
106325
  "subject": {
106306
106326
  "type": "string"
106307
106327
  },
@@ -106331,6 +106351,7 @@
106331
106351
  },
106332
106352
  "required": [
106333
106353
  "id",
106354
+ "type",
106334
106355
  "subject",
106335
106356
  "imageId",
106336
106357
  "image",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "7.0.2",
3
+ "version": "7.0.5",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",