@connectedxm/admin 1.3.0 → 1.3.2

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.mjs CHANGED
@@ -3909,6 +3909,42 @@ var useGetEventPassAddOns = (eventId = "", passId = "", params = {}, options = {
3909
3909
  );
3910
3910
  };
3911
3911
 
3912
+ // src/queries/events/passes/useGetEventPassQuestionSections.ts
3913
+ var EVENT_PASS_QUESTION_SECTIONS_QUERY_KEY = (eventId, passId) => [...EVENT_PASS_QUERY_KEY(eventId, passId), "SECTIONS"];
3914
+ var SET_EVENT_PASS_QUESTION_SECTIONS_QUERY_DATA = (client, keyParams, response) => {
3915
+ client.setQueryData(
3916
+ EVENT_PASS_QUESTION_SECTIONS_QUERY_KEY(...keyParams),
3917
+ response
3918
+ );
3919
+ };
3920
+ var GetEventPassQuestionSections = async ({
3921
+ eventId,
3922
+ accountId,
3923
+ passId,
3924
+ adminApiParams
3925
+ }) => {
3926
+ const connectedXM = await GetAdminAPI(adminApiParams);
3927
+ const { data } = await connectedXM.get(`/events/${eventId}/attendees/${accountId}/passes/${passId}/questions`);
3928
+ return data;
3929
+ };
3930
+ var useGetEventPassQuestionSections = (eventId = "", accountId = "", passId = "", params = {}, options = {}) => {
3931
+ return useConnectedInfiniteQuery(
3932
+ EVENT_PASS_QUESTION_SECTIONS_QUERY_KEY(eventId, passId),
3933
+ (params2) => GetEventPassQuestionSections({
3934
+ ...params2,
3935
+ eventId,
3936
+ accountId,
3937
+ passId
3938
+ }),
3939
+ params,
3940
+ {
3941
+ ...options,
3942
+ enabled: !!eventId && !!accountId && !!passId
3943
+ },
3944
+ "events"
3945
+ );
3946
+ };
3947
+
3912
3948
  // src/queries/events/passes/useGetEventPassResponses.ts
3913
3949
  var EVENT_PASS_RESPONSES_QUERY_KEY = (eventId, passId) => [...EVENT_PASS_QUERY_KEY(eventId, passId), "RESPONSES"];
3914
3950
  var SET_EVENT_PASS_RESPONSES_QUERY_DATA = (client, keyParams, response) => {
@@ -4038,42 +4074,6 @@ var useGetEventPassResponseChanges = (eventId = "", passId = "", questionId = ""
4038
4074
  );
4039
4075
  };
4040
4076
 
4041
- // src/queries/events/passes/useGetEventPassQuestionSections.ts
4042
- var EVENT_PASS_QUESTION_SECTIONS_QUERY_KEY = (eventId, passId) => [...EVENT_PASS_QUERY_KEY(eventId, passId), "SECTIONS"];
4043
- var SET_EVENT_PASS_QUESTION_SECTIONS_QUERY_DATA = (client, keyParams, response) => {
4044
- client.setQueryData(
4045
- EVENT_PASS_QUESTION_SECTIONS_QUERY_KEY(...keyParams),
4046
- response
4047
- );
4048
- };
4049
- var GetEventPassQuestionSections = async ({
4050
- eventId,
4051
- accountId,
4052
- passId,
4053
- adminApiParams
4054
- }) => {
4055
- const connectedXM = await GetAdminAPI(adminApiParams);
4056
- const { data } = await connectedXM.get(`/events/${eventId}/attendees/${accountId}/passes/${passId}/questions`);
4057
- return data;
4058
- };
4059
- var useGetEventPassQuestionSections = (eventId = "", accountId = "", passId = "", params = {}, options = {}) => {
4060
- return useConnectedInfiniteQuery(
4061
- EVENT_PASS_QUESTION_SECTIONS_QUERY_KEY(eventId, passId),
4062
- (params2) => GetEventPassQuestionSections({
4063
- ...params2,
4064
- eventId,
4065
- accountId,
4066
- passId
4067
- }),
4068
- params,
4069
- {
4070
- ...options,
4071
- enabled: !!eventId && !!accountId && !!passId
4072
- },
4073
- "events"
4074
- );
4075
- };
4076
-
4077
4077
  // src/queries/events/passes/useGetEventPassTransferLogs.ts
4078
4078
  var EVENT_PASS_TRANSFER_LOGS_QUERY_KEY = (eventId, passId) => [...EVENT_PASS_QUERY_KEY(eventId, passId), "TRANSFER_LOGS"];
4079
4079
  var SET_EVENT_PASS_TRANSFER_LOGS_QUERY_DATA = (client, keyParams, response) => {
@@ -9310,6 +9310,13 @@ var PaymentType = /* @__PURE__ */ ((PaymentType2) => {
9310
9310
  PaymentType2["refund"] = "refund";
9311
9311
  return PaymentType2;
9312
9312
  })(PaymentType || {});
9313
+ var TaxIntegrationType = /* @__PURE__ */ ((TaxIntegrationType2) => {
9314
+ TaxIntegrationType2["stripe"] = "stripe";
9315
+ TaxIntegrationType2["taxjar"] = "taxjar";
9316
+ TaxIntegrationType2["vertex"] = "vertex";
9317
+ TaxIntegrationType2["avalara"] = "avalara";
9318
+ return TaxIntegrationType2;
9319
+ })(TaxIntegrationType || {});
9313
9320
  var SubscriptionProductPriceType = /* @__PURE__ */ ((SubscriptionProductPriceType2) => {
9314
9321
  SubscriptionProductPriceType2["flat"] = "flat";
9315
9322
  SubscriptionProductPriceType2["payWhatYouWant"] = "payWhatYouWant";
@@ -10883,6 +10890,72 @@ var useGetPayment = (paymentId = "", options = {}) => {
10883
10890
  );
10884
10891
  };
10885
10892
 
10893
+ // src/queries/organization/tax/useGetTaxIntegrations.ts
10894
+ var TAX_INTEGRATIONS_QUERY_KEY = () => ["TAX_INTEGRATIONS"];
10895
+ var SET_TAX_INTEGRATIONS_QUERY_DATA = (client, keyParams, response) => {
10896
+ client.setQueryData(TAX_INTEGRATIONS_QUERY_KEY(...keyParams), response);
10897
+ };
10898
+ var GetTaxIntegrations = async ({
10899
+ pageParam,
10900
+ pageSize,
10901
+ orderBy,
10902
+ search,
10903
+ adminApiParams
10904
+ }) => {
10905
+ const adminApi = await GetAdminAPI(adminApiParams);
10906
+ const { data } = await adminApi.get(`/organization/tax`, {
10907
+ params: {
10908
+ page: pageParam || void 0,
10909
+ pageSize: pageSize || void 0,
10910
+ orderBy: orderBy || void 0,
10911
+ search: search || void 0
10912
+ }
10913
+ });
10914
+ return data;
10915
+ };
10916
+ var useGetTaxIntegrations = (params = {}, options = {}) => {
10917
+ return useConnectedInfiniteQuery(
10918
+ TAX_INTEGRATIONS_QUERY_KEY(),
10919
+ (params2) => GetTaxIntegrations(params2),
10920
+ params,
10921
+ options,
10922
+ "org"
10923
+ );
10924
+ };
10925
+
10926
+ // src/queries/organization/tax/useGetTaxIntegration.ts
10927
+ var TAX_INTEGRATION_QUERY_KEY = (type) => [
10928
+ ...TAX_INTEGRATIONS_QUERY_KEY(),
10929
+ type
10930
+ ];
10931
+ var SET_TAX_INTEGRATION_QUERY_DATA = (client, keyParams, response) => {
10932
+ client.setQueryData(TAX_INTEGRATION_QUERY_KEY(...keyParams), response);
10933
+ };
10934
+ var GetTaxIntegration = async ({
10935
+ type,
10936
+ adminApiParams
10937
+ }) => {
10938
+ const adminApi = await GetAdminAPI(adminApiParams);
10939
+ const { data } = await adminApi.get(
10940
+ `/organization/tax/${type}`
10941
+ );
10942
+ return data;
10943
+ };
10944
+ var useGetTaxIntegration = (type = "", options = {}) => {
10945
+ return useConnectedSingleQuery(
10946
+ TAX_INTEGRATION_QUERY_KEY(type),
10947
+ (params) => GetTaxIntegration({
10948
+ type,
10949
+ ...params
10950
+ }),
10951
+ {
10952
+ ...options,
10953
+ enabled: !!type && (options.enabled ?? true)
10954
+ },
10955
+ "org"
10956
+ );
10957
+ };
10958
+
10886
10959
  // src/queries/organization/triggers/useGetOrganizationTrigger.ts
10887
10960
  var ORGANIZATION_TRIGGER_QUERY_KEY = (type) => ["TRIGGER", type];
10888
10961
  var SET_ORGANIZATION_TRIGGER_QUERY_DATA = (client, keyParams, response) => {
@@ -22857,6 +22930,79 @@ var useToggleOrganizationPaymentIntegration = (options = {}) => {
22857
22930
  });
22858
22931
  };
22859
22932
 
22933
+ // src/mutations/organization/tax/useCreateTaxIntegration.ts
22934
+ var CreateTaxIntegration = async ({
22935
+ type,
22936
+ integration,
22937
+ adminApiParams,
22938
+ queryClient
22939
+ }) => {
22940
+ const connectedXM = await GetAdminAPI(adminApiParams);
22941
+ const { data } = await connectedXM.post(
22942
+ `/organization/tax/${type}`,
22943
+ integration
22944
+ );
22945
+ if (queryClient && data.status === "ok") {
22946
+ queryClient.invalidateQueries({ queryKey: TAX_INTEGRATIONS_QUERY_KEY() });
22947
+ SET_TAX_INTEGRATION_QUERY_DATA(queryClient, [data.data?.id], data);
22948
+ }
22949
+ return data;
22950
+ };
22951
+ var useCreateTaxIntegration = (options = {}) => {
22952
+ return useConnectedMutation(CreateTaxIntegration, options, {
22953
+ domain: "org",
22954
+ type: "create"
22955
+ });
22956
+ };
22957
+
22958
+ // src/mutations/organization/tax/useDeleteTaxIntegration.ts
22959
+ var DeleteTaxIntegration = async ({
22960
+ type,
22961
+ adminApiParams,
22962
+ queryClient
22963
+ }) => {
22964
+ const connectedXM = await GetAdminAPI(adminApiParams);
22965
+ const { data } = await connectedXM.delete(
22966
+ `/organization/tax/${type}`
22967
+ );
22968
+ if (queryClient && data.status === "ok") {
22969
+ queryClient.invalidateQueries({ queryKey: TAX_INTEGRATIONS_QUERY_KEY() });
22970
+ queryClient.removeQueries({
22971
+ queryKey: TAX_INTEGRATION_QUERY_KEY(type)
22972
+ });
22973
+ }
22974
+ return data;
22975
+ };
22976
+ var useDeleteTaxIntegration = (options = {}) => {
22977
+ return useConnectedMutation(DeleteTaxIntegration, options, {
22978
+ domain: "org",
22979
+ type: "del"
22980
+ });
22981
+ };
22982
+
22983
+ // src/mutations/organization/tax/useToggleTaxIntegration.ts
22984
+ var ToggleTaxIntegration = async ({
22985
+ type,
22986
+ adminApiParams,
22987
+ queryClient
22988
+ }) => {
22989
+ const connectedXM = await GetAdminAPI(adminApiParams);
22990
+ const { data } = await connectedXM.put(
22991
+ `/organization/tax/${type}`
22992
+ );
22993
+ if (queryClient && data.status === "ok") {
22994
+ queryClient.invalidateQueries({ queryKey: TAX_INTEGRATIONS_QUERY_KEY() });
22995
+ SET_TAX_INTEGRATION_QUERY_DATA(queryClient, [type], data);
22996
+ }
22997
+ return data;
22998
+ };
22999
+ var useToggleTaxIntegration = (options = {}) => {
23000
+ return useConnectedMutation(ToggleTaxIntegration, options, {
23001
+ domain: "org",
23002
+ type: "update"
23003
+ });
23004
+ };
23005
+
22860
23006
  // src/mutations/organization/triggers/useUpdateOrganizationTrigger.ts
22861
23007
  var UpdateOrganizationTrigger = async ({
22862
23008
  type,
@@ -24828,6 +24974,7 @@ export {
24828
24974
  CreateSubscriptionProductPrice,
24829
24975
  CreateSupportTicket,
24830
24976
  CreateSupportTicketNote,
24977
+ CreateTaxIntegration,
24831
24978
  CreateThread,
24832
24979
  CreateTier,
24833
24980
  Currency,
@@ -24919,6 +25066,7 @@ export {
24919
25066
  DeleteSubscriptionProductPrice,
24920
25067
  DeleteSupportTicket,
24921
25068
  DeleteSupportTicketNote,
25069
+ DeleteTaxIntegration,
24922
25070
  DeleteThread,
24923
25071
  DeleteTier,
24924
25072
  DeleteUserImage,
@@ -25381,6 +25529,8 @@ export {
25381
25529
  GetSubscriptions,
25382
25530
  GetSupportTicket,
25383
25531
  GetSupportTickets,
25532
+ GetTaxIntegration,
25533
+ GetTaxIntegrations,
25384
25534
  GetThread,
25385
25535
  GetThreadMember,
25386
25536
  GetThreadMembers,
@@ -25826,6 +25976,8 @@ export {
25826
25976
  SET_SUBSCRIPTION_QUERY_DATA,
25827
25977
  SET_SUPPORT_TICKETS_QUERY_DATA,
25828
25978
  SET_SUPPORT_TICKET_QUERY_DATA,
25979
+ SET_TAX_INTEGRATIONS_QUERY_DATA,
25980
+ SET_TAX_INTEGRATION_QUERY_DATA,
25829
25981
  SET_THREADS_QUERY_DATA,
25830
25982
  SET_THREAD_MESSAGES_QUERY_DATA,
25831
25983
  SET_THREAD_MESSAGE_QUERY_DATA,
@@ -25864,6 +26016,8 @@ export {
25864
26016
  SupportTicketState,
25865
26017
  SupportTicketType,
25866
26018
  SwitchImage,
26019
+ TAX_INTEGRATIONS_QUERY_KEY,
26020
+ TAX_INTEGRATION_QUERY_KEY,
25867
26021
  THREADS_QUERY_KEY,
25868
26022
  THREAD_MEMBERS_QUERY_KEY,
25869
26023
  THREAD_MEMBER_QUERY_KEY,
@@ -25879,11 +26033,13 @@ export {
25879
26033
  TIER_IMPORT_QUERY_KEY,
25880
26034
  TIER_QUERY_KEY,
25881
26035
  TIER_SUBSCRIBERS_QUERY_KEY,
26036
+ TaxIntegrationType,
25882
26037
  ThreadAccessLevel,
25883
26038
  ThreadInvitationStatus,
25884
26039
  ThreadMemberRole,
25885
26040
  ThreadMessageType,
25886
26041
  ToggleOrganizationPaymentIntegration,
26042
+ ToggleTaxIntegration,
25887
26043
  TransferEventPass,
25888
26044
  TransformPrice,
25889
26045
  UNAPPROVED_EVENTS_QUERY_KEY,
@@ -26137,6 +26293,7 @@ export {
26137
26293
  useCreateSubscriptionProductPrice,
26138
26294
  useCreateSupportTicket,
26139
26295
  useCreateSupportTicketNote,
26296
+ useCreateTaxIntegration,
26140
26297
  useCreateThread,
26141
26298
  useCreateTier,
26142
26299
  useDeleteAccount,
@@ -26225,6 +26382,7 @@ export {
26225
26382
  useDeleteSubscriptionProductPrice,
26226
26383
  useDeleteSupportTicket,
26227
26384
  useDeleteSupportTicketNote,
26385
+ useDeleteTaxIntegration,
26228
26386
  useDeleteThread,
26229
26387
  useDeleteTier,
26230
26388
  useDeleteUserImage,
@@ -26523,6 +26681,8 @@ export {
26523
26681
  useGetSubscriptions,
26524
26682
  useGetSupportTicket,
26525
26683
  useGetSupportTickets,
26684
+ useGetTaxIntegration,
26685
+ useGetTaxIntegrations,
26526
26686
  useGetThread,
26527
26687
  useGetThreadMember,
26528
26688
  useGetThreadMembers,
@@ -26605,6 +26765,7 @@ export {
26605
26765
  useSelfLeaveOrganization,
26606
26766
  useSwitchImage,
26607
26767
  useToggleOrganizationPaymentIntegration,
26768
+ useToggleTaxIntegration,
26608
26769
  useTransferEventPass,
26609
26770
  useUpdateAccount,
26610
26771
  useUpdateAccountAddress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "repository": {