@connectedxm/admin 6.9.5 → 6.9.7

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
@@ -323,6 +323,16 @@ var SessionAccess = /* @__PURE__ */ ((SessionAccess2) => {
323
323
  SessionAccess2["private"] = "PRIVATE";
324
324
  return SessionAccess2;
325
325
  })(SessionAccess || {});
326
+ var AccountAttributeType = /* @__PURE__ */ ((AccountAttributeType2) => {
327
+ AccountAttributeType2["text"] = "text";
328
+ AccountAttributeType2["number"] = "number";
329
+ AccountAttributeType2["date"] = "date";
330
+ AccountAttributeType2["boolean"] = "boolean";
331
+ AccountAttributeType2["search"] = "search";
332
+ AccountAttributeType2["select"] = "select";
333
+ AccountAttributeType2["location"] = "location";
334
+ return AccountAttributeType2;
335
+ })(AccountAttributeType || {});
326
336
  var EventActivationType = /* @__PURE__ */ ((EventActivationType2) => {
327
337
  EventActivationType2["public"] = "public";
328
338
  EventActivationType2["private"] = "private";
@@ -17674,6 +17684,79 @@ var useGetSeriesRegistrationPayments = (seriesId = "", registrationId = "", para
17674
17684
  );
17675
17685
  };
17676
17686
 
17687
+ // src/queries/series/translations/useGetSeriesTranslations.ts
17688
+ var SERIES_TRANSLATIONS_QUERY_KEY = (seriesId) => [
17689
+ ...SERIES_QUERY_KEY(seriesId),
17690
+ "TRANSLATIONS"
17691
+ ];
17692
+ var SET_SERIES_TRANSLATIONS_QUERY_DATA = (client, keyParams, response) => {
17693
+ client.setQueryData(SERIES_TRANSLATIONS_QUERY_KEY(...keyParams), response);
17694
+ };
17695
+ var GetSeriesTranslations = async ({
17696
+ pageParam,
17697
+ pageSize,
17698
+ orderBy,
17699
+ search,
17700
+ seriesId,
17701
+ adminApiParams
17702
+ }) => {
17703
+ const adminApi = await GetAdminAPI(adminApiParams);
17704
+ const { data } = await adminApi.get(`/series/${seriesId}/translations`, {
17705
+ params: {
17706
+ page: pageParam || void 0,
17707
+ pageSize: pageSize || void 0,
17708
+ orderBy: orderBy || void 0,
17709
+ search: search || void 0
17710
+ }
17711
+ });
17712
+ return data;
17713
+ };
17714
+ var useGetSeriesTranslations = (seriesId = "", params = {}, options = {}) => {
17715
+ return useConnectedInfiniteQuery(
17716
+ SERIES_TRANSLATIONS_QUERY_KEY(seriesId),
17717
+ (params2) => GetSeriesTranslations({
17718
+ ...params2,
17719
+ seriesId
17720
+ }),
17721
+ params,
17722
+ {
17723
+ ...options,
17724
+ enabled: !!seriesId && (options.enabled ?? true)
17725
+ }
17726
+ );
17727
+ };
17728
+
17729
+ // src/queries/series/translations/useGetSeriesTranslation.ts
17730
+ var SERIES_TRANSLATION_QUERY_KEY = (seriesId, locale) => [...SERIES_TRANSLATIONS_QUERY_KEY(seriesId), locale];
17731
+ var SET_SERIES_TRANSLATION_QUERY_DATA = (client, keyParams, response) => {
17732
+ client.setQueryData(SERIES_TRANSLATION_QUERY_KEY(...keyParams), response);
17733
+ };
17734
+ var GetSeriesTranslation = async ({
17735
+ seriesId,
17736
+ locale,
17737
+ adminApiParams
17738
+ }) => {
17739
+ const adminApi = await GetAdminAPI(adminApiParams);
17740
+ const { data } = await adminApi.get(
17741
+ `/series/${seriesId}/translations/${locale}`
17742
+ );
17743
+ return data;
17744
+ };
17745
+ var useGetSeriesTranslation = (seriesId = "", locale = "", options = {}) => {
17746
+ return useConnectedSingleQuery(
17747
+ SERIES_TRANSLATION_QUERY_KEY(seriesId, locale),
17748
+ (params) => GetSeriesTranslation({
17749
+ seriesId,
17750
+ locale,
17751
+ ...params
17752
+ }),
17753
+ {
17754
+ ...options,
17755
+ enabled: !!seriesId && !!locale && locale !== "en" && (options?.enabled ?? true)
17756
+ }
17757
+ );
17758
+ };
17759
+
17677
17760
  // src/queries/series/useGetSeriesEvents.ts
17678
17761
  var SERIES_EVENTS_QUERY_KEY = (seriesId) => [
17679
17762
  ...EVENT_QUERY_KEY(seriesId),
@@ -34195,6 +34278,60 @@ var useUpdateSeriesRegistration = (options = {}) => {
34195
34278
  return useConnectedMutation(UpdateSeriesRegistration, options);
34196
34279
  };
34197
34280
 
34281
+ // src/mutations/series/translations/useDeleteSeriesTranslation.ts
34282
+ var DeleteSeriesTranslation = async ({
34283
+ seriesId,
34284
+ locale,
34285
+ adminApiParams,
34286
+ queryClient
34287
+ }) => {
34288
+ const connectedXM = await GetAdminAPI(adminApiParams);
34289
+ const { data } = await connectedXM.delete(
34290
+ `/series/${seriesId}/translations/${locale}`
34291
+ );
34292
+ if (queryClient && data.status === "ok") {
34293
+ queryClient.invalidateQueries({
34294
+ queryKey: SERIES_TRANSLATIONS_QUERY_KEY(seriesId)
34295
+ });
34296
+ queryClient.invalidateQueries({
34297
+ queryKey: SERIES_TRANSLATION_QUERY_KEY(seriesId, locale)
34298
+ });
34299
+ }
34300
+ return data;
34301
+ };
34302
+ var useDeleteSeriesTranslation = (options = {}) => {
34303
+ return useConnectedMutation(DeleteSeriesTranslation, options);
34304
+ };
34305
+
34306
+ // src/mutations/series/translations/useUpdateSeriesTranslation.ts
34307
+ var UpdateSeriesTranslation = async ({
34308
+ seriesId,
34309
+ seriesTranslation,
34310
+ adminApiParams,
34311
+ locale,
34312
+ queryClient
34313
+ }) => {
34314
+ const connectedXM = await GetAdminAPI(adminApiParams);
34315
+ const { data } = await connectedXM.put(
34316
+ `/series/${seriesId}/translations/${locale}`,
34317
+ seriesTranslation
34318
+ );
34319
+ if (queryClient && data.status === "ok") {
34320
+ queryClient.invalidateQueries({
34321
+ queryKey: SERIES_TRANSLATIONS_QUERY_KEY(seriesId)
34322
+ });
34323
+ SET_SERIES_TRANSLATION_QUERY_DATA(
34324
+ queryClient,
34325
+ [seriesId, locale],
34326
+ data
34327
+ );
34328
+ }
34329
+ return data;
34330
+ };
34331
+ var useUpdateSeriesTranslation = (options = {}) => {
34332
+ return useConnectedMutation(UpdateSeriesTranslation, options);
34333
+ };
34334
+
34198
34335
  // src/mutations/series/useAddSeriesEvent.ts
34199
34336
  var AddSeriesEvent = async ({
34200
34337
  seriesId,
@@ -36847,6 +36984,7 @@ export {
36847
36984
  AUTH_SESSION_QUERY_KEY,
36848
36985
  AcceptGroupRequest,
36849
36986
  AccountAccess,
36987
+ AccountAttributeType,
36850
36988
  ActivityEntityType,
36851
36989
  ActivityPreference,
36852
36990
  ActivityStatus,
@@ -37221,6 +37359,7 @@ export {
37221
37359
  DeleteSelfApiKey,
37222
37360
  DeleteSeries,
37223
37361
  DeleteSeriesRegistration,
37362
+ DeleteSeriesTranslation,
37224
37363
  DeleteStreamInput,
37225
37364
  DeleteStreamInputOutput,
37226
37365
  DeleteSupportTicket,
@@ -37932,6 +38071,8 @@ export {
37932
38071
  GetSeriesRegistrationPasses,
37933
38072
  GetSeriesRegistrationPayments,
37934
38073
  GetSeriesRegistrations,
38074
+ GetSeriesTranslation,
38075
+ GetSeriesTranslations,
37935
38076
  GetStreamInput,
37936
38077
  GetStreamInputOutput,
37937
38078
  GetStreamInputOutputs,
@@ -38225,6 +38366,8 @@ export {
38225
38366
  SERIES_REGISTRATION_PASSES_QUERY_KEY,
38226
38367
  SERIES_REGISTRATION_PAYMENTS_QUERY_KEY,
38227
38368
  SERIES_REGISTRATION_QUERY_KEY,
38369
+ SERIES_TRANSLATIONS_QUERY_KEY,
38370
+ SERIES_TRANSLATION_QUERY_KEY,
38228
38371
  SET_ACCOUNTS_QUERY_DATA,
38229
38372
  SET_ACCOUNT_ACTIVITIES_QUERY_DATA,
38230
38373
  SET_ACCOUNT_ADDRESSES_QUERY_DATA,
@@ -38642,6 +38785,8 @@ export {
38642
38785
  SET_SERIES_LIST_QUERY_DATA,
38643
38786
  SET_SERIES_QUERY_DATA,
38644
38787
  SET_SERIES_REGISTRATION_QUERY_DATA,
38788
+ SET_SERIES_TRANSLATIONS_QUERY_DATA,
38789
+ SET_SERIES_TRANSLATION_QUERY_DATA,
38645
38790
  SET_STREAM_INPUTS_QUERY_DATA,
38646
38791
  SET_STREAM_INPUT_OUTPUTS_QUERY_DATA,
38647
38792
  SET_STREAM_INPUT_OUTPUT_QUERY_DATA,
@@ -38949,6 +39094,7 @@ export {
38949
39094
  UpdateSelf,
38950
39095
  UpdateSeries,
38951
39096
  UpdateSeriesRegistration,
39097
+ UpdateSeriesTranslation,
38952
39098
  UpdateStream,
38953
39099
  UpdateStreamInputConfig,
38954
39100
  UpdateStreamInputOutput,
@@ -39300,6 +39446,7 @@ export {
39300
39446
  useDeleteSelfApiKey,
39301
39447
  useDeleteSeries,
39302
39448
  useDeleteSeriesRegistration,
39449
+ useDeleteSeriesTranslation,
39303
39450
  useDeleteStreamInput,
39304
39451
  useDeleteStreamInputOutput,
39305
39452
  useDeleteSupportTicket,
@@ -39765,6 +39912,8 @@ export {
39765
39912
  useGetSeriesRegistrationPasses,
39766
39913
  useGetSeriesRegistrationPayments,
39767
39914
  useGetSeriesRegistrations,
39915
+ useGetSeriesTranslation,
39916
+ useGetSeriesTranslations,
39768
39917
  useGetStreamInput,
39769
39918
  useGetStreamInputOutput,
39770
39919
  useGetStreamInputOutputs,
@@ -40080,6 +40229,7 @@ export {
40080
40229
  useUpdateSelf,
40081
40230
  useUpdateSeries,
40082
40231
  useUpdateSeriesRegistration,
40232
+ useUpdateSeriesTranslation,
40083
40233
  useUpdateStreamInput,
40084
40234
  useUpdateStreamInputConfig,
40085
40235
  useUpdateStreamInputOutput,
package/openapi.json CHANGED
@@ -72593,6 +72593,18 @@
72593
72593
  "PRIVATE"
72594
72594
  ]
72595
72595
  },
72596
+ "AccountAttributeType": {
72597
+ "type": "string",
72598
+ "enum": [
72599
+ "text",
72600
+ "number",
72601
+ "date",
72602
+ "boolean",
72603
+ "search",
72604
+ "select",
72605
+ "location"
72606
+ ]
72607
+ },
72596
72608
  "BaseAccountAttribute": {
72597
72609
  "type": "object",
72598
72610
  "properties": {
@@ -72606,13 +72618,7 @@
72606
72618
  "type": "string"
72607
72619
  },
72608
72620
  "type": {
72609
- "type": "string",
72610
- "enum": [
72611
- "text",
72612
- "number",
72613
- "date",
72614
- "boolean"
72615
- ]
72621
+ "$ref": "#/components/schemas/AccountAttributeType"
72616
72622
  },
72617
72623
  "description": {
72618
72624
  "type": "string",
@@ -81468,6 +81474,18 @@
81468
81474
  "taxLocation": {
81469
81475
  "$ref": "#/components/schemas/TaxLocationType"
81470
81476
  },
81477
+ "subject": {
81478
+ "type": "string",
81479
+ "nullable": true
81480
+ },
81481
+ "replyTo": {
81482
+ "type": "string",
81483
+ "nullable": true
81484
+ },
81485
+ "body": {
81486
+ "type": "string",
81487
+ "nullable": true
81488
+ },
81471
81489
  "createdAt": {
81472
81490
  "type": "string"
81473
81491
  },
@@ -81483,12 +81501,67 @@
81483
81501
  "taxCode",
81484
81502
  "taxIncluded",
81485
81503
  "taxLocation",
81504
+ "subject",
81505
+ "replyTo",
81506
+ "body",
81486
81507
  "createdAt",
81487
81508
  "updatedAt"
81488
81509
  ]
81489
81510
  }
81490
81511
  ]
81491
81512
  },
81513
+ "SeriesTranslation": {
81514
+ "type": "object",
81515
+ "properties": {
81516
+ "id": {
81517
+ "type": "number"
81518
+ },
81519
+ "locale": {
81520
+ "type": "string"
81521
+ },
81522
+ "name": {
81523
+ "type": "string"
81524
+ },
81525
+ "description": {
81526
+ "type": "string",
81527
+ "nullable": true
81528
+ },
81529
+ "longDescription": {
81530
+ "type": "string",
81531
+ "nullable": true
81532
+ },
81533
+ "subject": {
81534
+ "type": "string",
81535
+ "nullable": true
81536
+ },
81537
+ "replyTo": {
81538
+ "type": "string",
81539
+ "nullable": true
81540
+ },
81541
+ "body": {
81542
+ "type": "string",
81543
+ "nullable": true
81544
+ },
81545
+ "createdAt": {
81546
+ "type": "string"
81547
+ },
81548
+ "updatedAt": {
81549
+ "type": "string"
81550
+ }
81551
+ },
81552
+ "required": [
81553
+ "id",
81554
+ "locale",
81555
+ "name",
81556
+ "description",
81557
+ "longDescription",
81558
+ "subject",
81559
+ "replyTo",
81560
+ "body",
81561
+ "createdAt",
81562
+ "updatedAt"
81563
+ ]
81564
+ },
81492
81565
  "BaseSeriesRegistration": {
81493
81566
  "type": "object",
81494
81567
  "properties": {
@@ -96067,6 +96140,18 @@
96067
96140
  },
96068
96141
  "taxLocation": {
96069
96142
  "$ref": "#/components/schemas/TaxLocationType"
96143
+ },
96144
+ "subject": {
96145
+ "type": "string",
96146
+ "nullable": true
96147
+ },
96148
+ "replyTo": {
96149
+ "type": "string",
96150
+ "nullable": true
96151
+ },
96152
+ "body": {
96153
+ "type": "string",
96154
+ "nullable": true
96070
96155
  }
96071
96156
  },
96072
96157
  "required": [
@@ -96123,6 +96208,43 @@
96123
96208
  },
96124
96209
  "taxLocation": {
96125
96210
  "$ref": "#/components/schemas/TaxLocationType"
96211
+ },
96212
+ "subject": {
96213
+ "type": "string",
96214
+ "nullable": true
96215
+ },
96216
+ "replyTo": {
96217
+ "type": "string",
96218
+ "nullable": true
96219
+ },
96220
+ "body": {
96221
+ "type": "string",
96222
+ "nullable": true
96223
+ }
96224
+ }
96225
+ },
96226
+ "SeriesTranslationUpdateInputs": {
96227
+ "type": "object",
96228
+ "properties": {
96229
+ "name": {
96230
+ "type": "string",
96231
+ "nullable": true
96232
+ },
96233
+ "description": {
96234
+ "type": "string",
96235
+ "nullable": true
96236
+ },
96237
+ "longDescription": {
96238
+ "type": "string",
96239
+ "nullable": true
96240
+ },
96241
+ "subject": {
96242
+ "type": "string",
96243
+ "nullable": true
96244
+ },
96245
+ "body": {
96246
+ "type": "string",
96247
+ "nullable": true
96126
96248
  }
96127
96249
  }
96128
96250
  },
@@ -99603,13 +99725,7 @@
99603
99725
  "type": "string"
99604
99726
  },
99605
99727
  "type": {
99606
- "type": "string",
99607
- "enum": [
99608
- "text",
99609
- "number",
99610
- "date",
99611
- "boolean"
99612
- ]
99728
+ "$ref": "#/components/schemas/AccountAttributeType"
99613
99729
  },
99614
99730
  "description": {
99615
99731
  "type": "string",
@@ -99640,6 +99756,17 @@
99640
99756
  }
99641
99757
  ],
99642
99758
  "nullable": true
99759
+ },
99760
+ "searchListId": {
99761
+ "type": "string",
99762
+ "nullable": true
99763
+ },
99764
+ "options": {
99765
+ "type": "array",
99766
+ "items": {
99767
+ "type": "string"
99768
+ },
99769
+ "nullable": true
99643
99770
  }
99644
99771
  },
99645
99772
  "required": [
@@ -99684,6 +99811,17 @@
99684
99811
  }
99685
99812
  ],
99686
99813
  "nullable": true
99814
+ },
99815
+ "searchListId": {
99816
+ "type": "string",
99817
+ "nullable": true
99818
+ },
99819
+ "options": {
99820
+ "type": "array",
99821
+ "items": {
99822
+ "type": "string"
99823
+ },
99824
+ "nullable": true
99687
99825
  }
99688
99826
  }
99689
99827
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "6.9.5",
3
+ "version": "6.9.7",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",