@connectedxm/admin 7.0.8 → 7.0.10

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
@@ -324,6 +324,7 @@ var FileSource = /* @__PURE__ */ ((FileSource2) => {
324
324
  FileSource2["admin"] = "admin";
325
325
  FileSource2["response"] = "response";
326
326
  FileSource2["content"] = "content";
327
+ FileSource2["thread"] = "thread";
327
328
  return FileSource2;
328
329
  })(FileSource || {});
329
330
  var AccountAttributeType = /* @__PURE__ */ ((AccountAttributeType2) => {
@@ -39251,6 +39252,32 @@ var useUpdateSurvey = (options = {}) => {
39251
39252
  return useConnectedMutation(UpdateSurvey, options);
39252
39253
  };
39253
39254
 
39255
+ // src/mutations/threads/accounts/useAddThreadAccounts.ts
39256
+ var AddThreadAccounts = async ({
39257
+ threadId,
39258
+ accounts,
39259
+ adminApiParams,
39260
+ queryClient
39261
+ }) => {
39262
+ const connectedXM = await GetAdminAPI(adminApiParams);
39263
+ const { data } = await connectedXM.post(
39264
+ `/threads/${threadId}/accounts`,
39265
+ accounts
39266
+ );
39267
+ if (queryClient && data.status === "ok") {
39268
+ queryClient.invalidateQueries({
39269
+ queryKey: THREAD_ACCOUNTS_QUERY_KEY(threadId)
39270
+ });
39271
+ queryClient.invalidateQueries({
39272
+ queryKey: THREAD_QUERY_KEY(threadId)
39273
+ });
39274
+ }
39275
+ return data;
39276
+ };
39277
+ var useAddThreadAccounts = (options = {}) => {
39278
+ return useConnectedMutation(AddThreadAccounts, options);
39279
+ };
39280
+
39254
39281
  // src/mutations/threads/accounts/useDeleteThreadAccount.ts
39255
39282
  var DeleteThreadAccount = async ({
39256
39283
  threadId,
@@ -39823,6 +39850,7 @@ export {
39823
39850
  AddSurveyQuestionChoiceSubQuestion,
39824
39851
  AddSurveySectionQuestion,
39825
39852
  AddSurveySession,
39853
+ AddThreadAccounts,
39826
39854
  AdminNotificationSource,
39827
39855
  AdminNotificationType,
39828
39856
  AdvertisementType,
@@ -42110,6 +42138,7 @@ export {
42110
42138
  useAddSurveyQuestionChoiceSubQuestion,
42111
42139
  useAddSurveySectionQuestion,
42112
42140
  useAddSurveySession,
42141
+ useAddThreadAccounts,
42113
42142
  useApproveEventPass,
42114
42143
  useArchiveActivity,
42115
42144
  useAttachBookingSpaceQuestionSearchList,
package/openapi.json CHANGED
@@ -89102,6 +89102,70 @@
89102
89102
  "tags": [
89103
89103
  "Threads::Accounts"
89104
89104
  ]
89105
+ },
89106
+ "post": {
89107
+ "operationId": "AddThreadAccounts",
89108
+ "summary": "Add Thread Accounts",
89109
+ "description": "Add Thread Accounts endpoint",
89110
+ "parameters": [
89111
+ {
89112
+ "in": "path",
89113
+ "name": "threadId",
89114
+ "schema": {
89115
+ "type": "string"
89116
+ },
89117
+ "description": "The thread identifier",
89118
+ "required": true
89119
+ }
89120
+ ],
89121
+ "requestBody": {
89122
+ "required": true,
89123
+ "content": {
89124
+ "application/json": {
89125
+ "schema": {
89126
+ "$ref": "#/components/schemas/ThreadAccountsAddInputs"
89127
+ }
89128
+ }
89129
+ }
89130
+ },
89131
+ "responses": {
89132
+ "200": {
89133
+ "description": "Successful response",
89134
+ "content": {
89135
+ "application/json": {
89136
+ "schema": {
89137
+ "type": "object",
89138
+ "properties": {
89139
+ "status": {
89140
+ "type": "string",
89141
+ "enum": [
89142
+ "ok"
89143
+ ]
89144
+ },
89145
+ "message": {
89146
+ "type": "string",
89147
+ "example": "Success message."
89148
+ },
89149
+ "data": {
89150
+ "type": "array",
89151
+ "items": {
89152
+ "$ref": "#/components/schemas/ThreadAccount"
89153
+ }
89154
+ }
89155
+ },
89156
+ "required": [
89157
+ "status",
89158
+ "message",
89159
+ "data"
89160
+ ]
89161
+ }
89162
+ }
89163
+ }
89164
+ }
89165
+ },
89166
+ "tags": [
89167
+ "Threads::Accounts"
89168
+ ]
89105
89169
  }
89106
89170
  },
89107
89171
  "/threads/{threadId}/accounts/{threadAccountId}": {
@@ -92693,7 +92757,8 @@
92693
92757
  "enum": [
92694
92758
  "admin",
92695
92759
  "response",
92696
- "content"
92760
+ "content",
92761
+ "thread"
92697
92762
  ]
92698
92763
  },
92699
92764
  "AccountAttributeType": {
@@ -118534,6 +118599,20 @@
118534
118599
  }
118535
118600
  }
118536
118601
  },
118602
+ "ThreadAccountsAddInputs": {
118603
+ "type": "object",
118604
+ "properties": {
118605
+ "accountIds": {
118606
+ "type": "array",
118607
+ "items": {
118608
+ "type": "string"
118609
+ }
118610
+ }
118611
+ },
118612
+ "required": [
118613
+ "accountIds"
118614
+ ]
118615
+ },
118537
118616
  "ThreadMessageReactionCreateInputs": {
118538
118617
  "type": "object",
118539
118618
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "7.0.8",
3
+ "version": "7.0.10",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",