@connectedxm/admin 3.2.7 → 3.2.8

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
@@ -15743,6 +15743,169 @@ var useGetTaxIntegration = (type = "", options = {}) => {
15743
15743
  );
15744
15744
  };
15745
15745
 
15746
+ // src/queries/organization/tax/useGetEntityUseCodes.ts
15747
+ var ENTITY_USE_CODES_QUERY_KEY = (type, search) => [
15748
+ ...TAX_INTEGRATION_QUERY_KEY(type),
15749
+ "ENTITY_USE_CODES",
15750
+ search
15751
+ ];
15752
+ var SET_ENTITY_USE_CODES_QUERY_DATA = (client, keyParams, response) => {
15753
+ client.setQueryData(ENTITY_USE_CODES_QUERY_KEY(...keyParams), response);
15754
+ };
15755
+ var GetEntityUseCodes = async ({
15756
+ type,
15757
+ search,
15758
+ adminApiParams
15759
+ }) => {
15760
+ const adminApi = await GetAdminAPI(adminApiParams);
15761
+ const { data } = await adminApi.get(
15762
+ `/organization/tax/${type}/entity-use-codes`,
15763
+ {
15764
+ params: {
15765
+ search
15766
+ }
15767
+ }
15768
+ );
15769
+ return data;
15770
+ };
15771
+ var useGetEntityUseCodes = (type = "", search, options = {}) => {
15772
+ return useConnectedSingleQuery(
15773
+ ENTITY_USE_CODES_QUERY_KEY(type, search),
15774
+ (params) => GetEntityUseCodes({
15775
+ type,
15776
+ search,
15777
+ ...params
15778
+ }),
15779
+ {
15780
+ ...options,
15781
+ enabled: !!type && (options.enabled ?? true)
15782
+ },
15783
+ "org"
15784
+ );
15785
+ };
15786
+
15787
+ // src/queries/organization/tax/useGetTaxCodes.ts
15788
+ var TAX_CODES_QUERY_KEY = (type, search) => [
15789
+ ...TAX_INTEGRATION_QUERY_KEY(type),
15790
+ "TAX_CODES",
15791
+ search
15792
+ ];
15793
+ var SET_TAX_CODES_QUERY_DATA = (client, keyParams, response) => {
15794
+ client.setQueryData(TAX_CODES_QUERY_KEY(...keyParams), response);
15795
+ };
15796
+ var GetTaxCodes = async ({
15797
+ type,
15798
+ search,
15799
+ adminApiParams
15800
+ }) => {
15801
+ const adminApi = await GetAdminAPI(adminApiParams);
15802
+ const { data } = await adminApi.get(
15803
+ `/organization/tax/${type}/tax-codes`,
15804
+ {
15805
+ params: {
15806
+ search
15807
+ }
15808
+ }
15809
+ );
15810
+ return data;
15811
+ };
15812
+ var useGetTaxCodes = (type = "", search, options = {}) => {
15813
+ return useConnectedSingleQuery(
15814
+ TAX_CODES_QUERY_KEY(type, search),
15815
+ (params) => GetTaxCodes({
15816
+ type,
15817
+ search,
15818
+ ...params
15819
+ }),
15820
+ {
15821
+ ...options,
15822
+ enabled: !!type && (options.enabled ?? true)
15823
+ },
15824
+ "org"
15825
+ );
15826
+ };
15827
+
15828
+ // src/queries/organization/tax/useGetTaxLog.ts
15829
+ var TAX_LOG_QUERY_KEY = (type, logId) => [
15830
+ ...TAX_INTEGRATION_QUERY_KEY(type),
15831
+ "LOG",
15832
+ logId
15833
+ ];
15834
+ var SET_TAX_LOG_QUERY_DATA = (client, keyParams, response) => {
15835
+ client.setQueryData(TAX_LOG_QUERY_KEY(...keyParams), response);
15836
+ };
15837
+ var GetTaxLog = async ({
15838
+ type,
15839
+ logId,
15840
+ adminApiParams
15841
+ }) => {
15842
+ const adminApi = await GetAdminAPI(adminApiParams);
15843
+ const { data } = await adminApi.get(
15844
+ `/organization/tax/${type}/logs/${logId}`
15845
+ );
15846
+ return data;
15847
+ };
15848
+ var useGetTaxLog = (type = "", logId = "", options = {}) => {
15849
+ return useConnectedSingleQuery(
15850
+ TAX_LOG_QUERY_KEY(type, logId),
15851
+ (params) => GetTaxLog({ ...params, type, logId }),
15852
+ {
15853
+ ...options,
15854
+ enabled: !!type && !!logId && (options.enabled ?? true)
15855
+ },
15856
+ "org"
15857
+ );
15858
+ };
15859
+
15860
+ // src/queries/organization/tax/useGetTaxLogs.ts
15861
+ var TAX_LOGS_QUERY_KEY = (type) => [
15862
+ ...TAX_INTEGRATION_QUERY_KEY(type),
15863
+ "LOGS"
15864
+ ];
15865
+ var SET_TAX_LOGS_QUERY_DATA = (client, keyParams, response, baseKeys = [""]) => {
15866
+ client.setQueryData(
15867
+ [
15868
+ ...TAX_LOGS_QUERY_KEY(...keyParams),
15869
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
15870
+ ],
15871
+ setFirstPageData(response)
15872
+ );
15873
+ };
15874
+ var GetTaxLogs = async ({
15875
+ type,
15876
+ pageParam,
15877
+ pageSize,
15878
+ orderBy,
15879
+ search,
15880
+ adminApiParams
15881
+ }) => {
15882
+ const adminApi = await GetAdminAPI(adminApiParams);
15883
+ const { data } = await adminApi.get(
15884
+ `/organization/tax/${type}/logs`,
15885
+ {
15886
+ params: {
15887
+ page: pageParam || void 0,
15888
+ pageSize: pageSize || void 0,
15889
+ orderBy: orderBy || void 0,
15890
+ search: search || void 0
15891
+ }
15892
+ }
15893
+ );
15894
+ return data;
15895
+ };
15896
+ var useGetTaxLogs = (type = "", params = {}, options = {}) => {
15897
+ return useConnectedInfiniteQuery(
15898
+ TAX_LOGS_QUERY_KEY(type),
15899
+ (params2) => GetTaxLogs({ ...params2, type }),
15900
+ params,
15901
+ {
15902
+ ...options,
15903
+ enabled: !!type && (options.enabled ?? true)
15904
+ },
15905
+ "org"
15906
+ );
15907
+ };
15908
+
15746
15909
  // src/queries/organization/useGetOrganizationDomain.ts
15747
15910
  var ORGANIZATION_DOMAIN_QUERY_KEY = () => ["ORGANIZATION_DOMAIN"];
15748
15911
  var SET_ORGANIZATION_DOMAIN_QUERY_DATA = (client, keyParams, response) => {
@@ -18534,6 +18697,23 @@ var TransformPrice = (value, currency) => {
18534
18697
  return formatter.format(value / 100);
18535
18698
  };
18536
18699
 
18700
+ // src/utilities/CalculateDuration.ts
18701
+ var CalculateDuration = (durationMilliseconds) => {
18702
+ if (durationMilliseconds < 1e3) {
18703
+ return `${Math.round(durationMilliseconds)} ms`;
18704
+ } else if (durationMilliseconds < 6e4) {
18705
+ return `${Math.round(durationMilliseconds / 1e3)}s`;
18706
+ } else {
18707
+ const minutes = Math.floor(durationMilliseconds / 6e4);
18708
+ const seconds = Math.round(durationMilliseconds % 6e4 / 1e3);
18709
+ if (seconds === 0) {
18710
+ return `${minutes}m`;
18711
+ } else {
18712
+ return `${minutes}m ${seconds}s`;
18713
+ }
18714
+ }
18715
+ };
18716
+
18537
18717
  // src/queries/threads/useGetThreadMessages.ts
18538
18718
  var THREAD_MESSAGES_QUERY_KEY = (threadId) => [
18539
18719
  ...THREAD_QUERY_KEY(threadId),
@@ -33664,6 +33844,24 @@ var useDeleteTaxIntegration = (options = {}) => {
33664
33844
  });
33665
33845
  };
33666
33846
 
33847
+ // src/mutations/organization/tax/useTestTaxIntegration.ts
33848
+ var TestTaxIntegration = async ({
33849
+ type,
33850
+ adminApiParams
33851
+ }) => {
33852
+ const connectedXM = await GetAdminAPI(adminApiParams);
33853
+ const { data } = await connectedXM.post(
33854
+ `/organization/tax/${type}/test`
33855
+ );
33856
+ return data;
33857
+ };
33858
+ var useTestTaxIntegration = (options = {}) => {
33859
+ return useConnectedMutation(TestTaxIntegration, options, {
33860
+ domain: "org",
33861
+ type: "read"
33862
+ });
33863
+ };
33864
+
33667
33865
  // src/mutations/organization/tax/useToggleTaxIntegration.ts
33668
33866
  var ToggleTaxIntegration = async ({
33669
33867
  type,
@@ -33672,7 +33870,7 @@ var ToggleTaxIntegration = async ({
33672
33870
  }) => {
33673
33871
  const connectedXM = await GetAdminAPI(adminApiParams);
33674
33872
  const { data } = await connectedXM.put(
33675
- `/organization/tax/${type}`
33873
+ `/organization/tax/${type}/toggle`
33676
33874
  );
33677
33875
  if (queryClient && data.status === "ok") {
33678
33876
  queryClient.invalidateQueries({ queryKey: TAX_INTEGRATIONS_QUERY_KEY() });
@@ -33687,6 +33885,26 @@ var useToggleTaxIntegration = (options = {}) => {
33687
33885
  });
33688
33886
  };
33689
33887
 
33888
+ // src/mutations/organization/tax/useUpdateTaxIntegration.ts
33889
+ var UpdateTaxIntegration = async ({
33890
+ type,
33891
+ taxIntegration,
33892
+ adminApiParams
33893
+ }) => {
33894
+ const connectedXM = await GetAdminAPI(adminApiParams);
33895
+ const { data } = await connectedXM.put(
33896
+ `/organization/tax/${type}`,
33897
+ taxIntegration
33898
+ );
33899
+ return data;
33900
+ };
33901
+ var useUpdateTaxIntegration = (options = {}) => {
33902
+ return useConnectedMutation(UpdateTaxIntegration, options, {
33903
+ domain: "org",
33904
+ type: "update"
33905
+ });
33906
+ };
33907
+
33690
33908
  // src/mutations/organization/useAddOrganizationUser.ts
33691
33909
  var AddOrganizationUser = async ({
33692
33910
  email,
@@ -37188,6 +37406,7 @@ export {
37188
37406
  CUSTOM_REPORT_QUERY_KEY,
37189
37407
  CUSTOM_REPORT_USERS_QUERY_KEY,
37190
37408
  CacheIndividualQueries,
37409
+ CalculateDuration,
37191
37410
  CancelAnnouncementSchedule,
37192
37411
  CancelChannelContentPublishSchedule,
37193
37412
  CancelEventPass,
@@ -37490,6 +37709,7 @@ export {
37490
37709
  DownloadVideoCaption,
37491
37710
  EMAIL_RECEIPTS_QUERY_KEY,
37492
37711
  EMAIL_RECEIPT_QUERY_KEY,
37712
+ ENTITY_USE_CODES_QUERY_KEY,
37493
37713
  EVENTS_QUERY_KEY,
37494
37714
  EVENT_ACCESS_USERS_QUERY_KEY,
37495
37715
  EVENT_ACTIVATIONS_QUERY_KEY,
@@ -37823,6 +38043,7 @@ export {
37823
38043
  GetDashboards,
37824
38044
  GetEmailReceipt,
37825
38045
  GetEmailReceipts,
38046
+ GetEntityUseCodes,
37826
38047
  GetErrorMessage,
37827
38048
  GetEvent,
37828
38049
  GetEventAccessUsers,
@@ -38150,8 +38371,11 @@ export {
38150
38371
  GetSurveyTranslation,
38151
38372
  GetSurveyTranslations,
38152
38373
  GetSurveys,
38374
+ GetTaxCodes,
38153
38375
  GetTaxIntegration,
38154
38376
  GetTaxIntegrations,
38377
+ GetTaxLog,
38378
+ GetTaxLogs,
38155
38379
  GetTemplates,
38156
38380
  GetThread,
38157
38381
  GetThreadAccounts,
@@ -38450,6 +38674,7 @@ export {
38450
38674
  SET_DASHBOARD_WIDGETS_QUERY_DATA,
38451
38675
  SET_EMAIL_RECEIPTS_QUERY_DATA,
38452
38676
  SET_EMAIL_RECEIPT_QUERY_DATA,
38677
+ SET_ENTITY_USE_CODES_QUERY_DATA,
38453
38678
  SET_EVENTS_QUERY_DATA,
38454
38679
  SET_EVENT_ACTIVATIONS_QUERY_DATA,
38455
38680
  SET_EVENT_ACTIVATION_COMPLETIONS_QUERY_DATA,
@@ -38767,8 +38992,11 @@ export {
38767
38992
  SET_SURVEY_SUBMISSION_RESPONSE_CHANGES_QUERY_DATA,
38768
38993
  SET_SURVEY_TRANSLATIONS_QUERY_DATA,
38769
38994
  SET_SURVEY_TRANSLATION_QUERY_DATA,
38995
+ SET_TAX_CODES_QUERY_DATA,
38770
38996
  SET_TAX_INTEGRATIONS_QUERY_DATA,
38771
38997
  SET_TAX_INTEGRATION_QUERY_DATA,
38998
+ SET_TAX_LOGS_QUERY_DATA,
38999
+ SET_TAX_LOG_QUERY_DATA,
38772
39000
  SET_THREADS_QUERY_DATA,
38773
39001
  SET_THREAD_CIRCLES_QUERY_DATA,
38774
39002
  SET_THREAD_CIRCLE_ACCOUNTS_QUERY_DATA,
@@ -38844,8 +39072,11 @@ export {
38844
39072
  SurveyQuestionType,
38845
39073
  SwitchImage,
38846
39074
  SystemEventLogStatus,
39075
+ TAX_CODES_QUERY_KEY,
38847
39076
  TAX_INTEGRATIONS_QUERY_KEY,
38848
39077
  TAX_INTEGRATION_QUERY_KEY,
39078
+ TAX_LOGS_QUERY_KEY,
39079
+ TAX_LOG_QUERY_KEY,
38849
39080
  THREADS_QUERY_KEY,
38850
39081
  THREAD_ACCOUNTS_QUERY_KEY,
38851
39082
  THREAD_CIRCLES_QUERY_KEY,
@@ -38870,6 +39101,7 @@ export {
38870
39101
  TIER_QUERY_KEY,
38871
39102
  TIER_SUBSCRIBERS_QUERY_KEY,
38872
39103
  TaxIntegrationType,
39104
+ TestTaxIntegration,
38873
39105
  ThreadCircleAccountRole,
38874
39106
  ThreadCircleType,
38875
39107
  ThreadInvitationStatus,
@@ -39031,6 +39263,7 @@ export {
39031
39263
  UpdateSurveySubmission,
39032
39264
  UpdateSurveySubmissionResponses,
39033
39265
  UpdateSurveyTranslation,
39266
+ UpdateTaxIntegration,
39034
39267
  UpdateThread,
39035
39268
  UpdateThreadCircle,
39036
39269
  UpdateThreadCircleAccount,
@@ -39503,6 +39736,7 @@ export {
39503
39736
  useGetDashboards,
39504
39737
  useGetEmailReceipt,
39505
39738
  useGetEmailReceipts,
39739
+ useGetEntityUseCodes,
39506
39740
  useGetEvent,
39507
39741
  useGetEventAccessUsers,
39508
39742
  useGetEventActivation,
@@ -39828,8 +40062,11 @@ export {
39828
40062
  useGetSurveyTranslation,
39829
40063
  useGetSurveyTranslations,
39830
40064
  useGetSurveys,
40065
+ useGetTaxCodes,
39831
40066
  useGetTaxIntegration,
39832
40067
  useGetTaxIntegrations,
40068
+ useGetTaxLog,
40069
+ useGetTaxLogs,
39833
40070
  useGetTemplates,
39834
40071
  useGetThread,
39835
40072
  useGetThreadAccounts,
@@ -39940,6 +40177,7 @@ export {
39940
40177
  useStartEventRoundMatchmaking,
39941
40178
  useStartEventSessionRoundMatchmaking,
39942
40179
  useSwitchImage,
40180
+ useTestTaxIntegration,
39943
40181
  useToggleOrganizationPaymentIntegration,
39944
40182
  useToggleTaxIntegration,
39945
40183
  useTransferEventPass,
@@ -40094,6 +40332,7 @@ export {
40094
40332
  useUpdateSurveySubmission,
40095
40333
  useUpdateSurveySubmissionResponses,
40096
40334
  useUpdateSurveyTranslation,
40335
+ useUpdateTaxIntegration,
40097
40336
  useUpdateThread,
40098
40337
  useUpdateThreadCircle,
40099
40338
  useUpdateThreadCircleAccount,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "3.2.7",
3
+ "version": "3.2.8",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",