@connectedxm/admin 7.0.8 → 7.0.9

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
@@ -39251,6 +39251,32 @@ var useUpdateSurvey = (options = {}) => {
39251
39251
  return useConnectedMutation(UpdateSurvey, options);
39252
39252
  };
39253
39253
 
39254
+ // src/mutations/threads/accounts/useAddThreadAccounts.ts
39255
+ var AddThreadAccounts = async ({
39256
+ threadId,
39257
+ accounts,
39258
+ adminApiParams,
39259
+ queryClient
39260
+ }) => {
39261
+ const connectedXM = await GetAdminAPI(adminApiParams);
39262
+ const { data } = await connectedXM.post(
39263
+ `/threads/${threadId}/accounts`,
39264
+ accounts
39265
+ );
39266
+ if (queryClient && data.status === "ok") {
39267
+ queryClient.invalidateQueries({
39268
+ queryKey: THREAD_ACCOUNTS_QUERY_KEY(threadId)
39269
+ });
39270
+ queryClient.invalidateQueries({
39271
+ queryKey: THREAD_QUERY_KEY(threadId)
39272
+ });
39273
+ }
39274
+ return data;
39275
+ };
39276
+ var useAddThreadAccounts = (options = {}) => {
39277
+ return useConnectedMutation(AddThreadAccounts, options);
39278
+ };
39279
+
39254
39280
  // src/mutations/threads/accounts/useDeleteThreadAccount.ts
39255
39281
  var DeleteThreadAccount = async ({
39256
39282
  threadId,
@@ -39823,6 +39849,7 @@ export {
39823
39849
  AddSurveyQuestionChoiceSubQuestion,
39824
39850
  AddSurveySectionQuestion,
39825
39851
  AddSurveySession,
39852
+ AddThreadAccounts,
39826
39853
  AdminNotificationSource,
39827
39854
  AdminNotificationType,
39828
39855
  AdvertisementType,
@@ -42110,6 +42137,7 @@ export {
42110
42137
  useAddSurveyQuestionChoiceSubQuestion,
42111
42138
  useAddSurveySectionQuestion,
42112
42139
  useAddSurveySession,
42140
+ useAddThreadAccounts,
42113
42141
  useApproveEventPass,
42114
42142
  useArchiveActivity,
42115
42143
  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}": {
@@ -118534,6 +118598,20 @@
118534
118598
  }
118535
118599
  }
118536
118600
  },
118601
+ "ThreadAccountsAddInputs": {
118602
+ "type": "object",
118603
+ "properties": {
118604
+ "accountIds": {
118605
+ "type": "array",
118606
+ "items": {
118607
+ "type": "string"
118608
+ }
118609
+ }
118610
+ },
118611
+ "required": [
118612
+ "accountIds"
118613
+ ]
118614
+ },
118537
118615
  "ThreadMessageReactionCreateInputs": {
118538
118616
  "type": "object",
118539
118617
  "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.9",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",