@connectedxm/admin 7.0.7 → 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,16 +39251,42 @@ 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,
39257
- accountId,
39283
+ threadAccountId,
39258
39284
  adminApiParams,
39259
39285
  queryClient
39260
39286
  }) => {
39261
39287
  const connectedXM = await GetAdminAPI(adminApiParams);
39262
39288
  const { data } = await connectedXM.delete(
39263
- `/threads/${threadId}/accounts/${accountId}`
39289
+ `/threads/${threadId}/accounts/${threadAccountId}`
39264
39290
  );
39265
39291
  if (queryClient && data.status === "ok") {
39266
39292
  queryClient.invalidateQueries({
@@ -39279,14 +39305,14 @@ var useDeleteThreadAccount = (options = {}) => {
39279
39305
  // src/mutations/threads/accounts/useUpdateThreadAccount.ts
39280
39306
  var UpdateThreadAccount = async ({
39281
39307
  threadId,
39282
- accountId,
39308
+ threadAccountId,
39283
39309
  threadAccount,
39284
39310
  adminApiParams,
39285
39311
  queryClient
39286
39312
  }) => {
39287
39313
  const connectedXM = await GetAdminAPI(adminApiParams);
39288
39314
  const { data } = await connectedXM.put(
39289
- `/threads/${threadId}/accounts/${accountId}`,
39315
+ `/threads/${threadId}/accounts/${threadAccountId}`,
39290
39316
  threadAccount
39291
39317
  );
39292
39318
  if (queryClient && data.status === "ok") {
@@ -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,9 +89102,73 @@
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
- "/threads/{threadId}/accounts/{accountId}": {
89171
+ "/threads/{threadId}/accounts/{threadAccountId}": {
89108
89172
  "put": {
89109
89173
  "operationId": "UpdateThreadAccount",
89110
89174
  "summary": "Update Thread Account",
@@ -89121,11 +89185,11 @@
89121
89185
  },
89122
89186
  {
89123
89187
  "in": "path",
89124
- "name": "accountId",
89188
+ "name": "threadAccountId",
89125
89189
  "schema": {
89126
89190
  "type": "string"
89127
89191
  },
89128
- "description": "The account identifier",
89192
+ "description": "The threadAccount identifier",
89129
89193
  "required": true
89130
89194
  }
89131
89195
  ],
@@ -89191,11 +89255,11 @@
89191
89255
  },
89192
89256
  {
89193
89257
  "in": "path",
89194
- "name": "accountId",
89258
+ "name": "threadAccountId",
89195
89259
  "schema": {
89196
89260
  "type": "string"
89197
89261
  },
89198
- "description": "The account identifier",
89262
+ "description": "The threadAccount identifier",
89199
89263
  "required": true
89200
89264
  }
89201
89265
  ],
@@ -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.7",
3
+ "version": "7.0.9",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",