@connectedxm/admin 3.4.6 → 3.4.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.cjs +3 -2
- package/dist/index.d.cts +25 -12
- package/dist/index.d.ts +25 -12
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22569,9 +22569,10 @@ var useConnectedMutation = (mutation, options, permission) => {
|
|
|
22569
22569
|
});
|
|
22570
22570
|
},
|
|
22571
22571
|
...options,
|
|
22572
|
-
onError: (error, variables, context) => {
|
|
22572
|
+
onError: (error, variables, onMutateResult, context) => {
|
|
22573
22573
|
if (onMutationError) onMutationError(error, variables, context);
|
|
22574
|
-
if (options?.onError)
|
|
22574
|
+
if (options?.onError)
|
|
22575
|
+
options.onError(error, variables, onMutateResult, context);
|
|
22575
22576
|
}
|
|
22576
22577
|
});
|
|
22577
22578
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import * as axios from 'axios';
|
|
|
2
2
|
import { AxiosError, AxiosInstance } from 'axios';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
|
-
import { QueryClient, QueryKey, InfiniteData, UseQueryOptions, UseInfiniteQueryOptions, Updater, SetDataOptions, UseMutationOptions
|
|
5
|
+
import { QueryClient, QueryKey, InfiniteData, UseQueryOptions, UseInfiniteQueryOptions, Updater, SetDataOptions, UseMutationOptions } from '@tanstack/react-query';
|
|
6
6
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
7
7
|
|
|
8
8
|
interface ConnectedXMResponse<TData> {
|
|
@@ -281,6 +281,7 @@ interface AccountAddress extends BaseAccountAddress {
|
|
|
281
281
|
}
|
|
282
282
|
interface BaseAPILog {
|
|
283
283
|
id: string;
|
|
284
|
+
login: BaseLogin | null;
|
|
284
285
|
account: BaseAccount | null;
|
|
285
286
|
user: BaseUser | null;
|
|
286
287
|
source: "admin" | "client";
|
|
@@ -1679,6 +1680,7 @@ interface Payment extends BasePayment {
|
|
|
1679
1680
|
space: BaseBookingSpace | null;
|
|
1680
1681
|
membership: BaseMembership | null;
|
|
1681
1682
|
coupon: BaseCoupon | null;
|
|
1683
|
+
invoice: BaseInvoice | null;
|
|
1682
1684
|
metadata?: any;
|
|
1683
1685
|
lineItems: Omit<PaymentLineItem, "payment">[];
|
|
1684
1686
|
}
|
|
@@ -1707,6 +1709,7 @@ interface BasePaymentLineItem {
|
|
|
1707
1709
|
discount: number;
|
|
1708
1710
|
deferred: number;
|
|
1709
1711
|
salesTax: number;
|
|
1712
|
+
refundedSalesTax: number;
|
|
1710
1713
|
paymentId: number;
|
|
1711
1714
|
taxCode: string | null;
|
|
1712
1715
|
taxIncluded: boolean;
|
|
@@ -1716,7 +1719,6 @@ interface BasePaymentLineItem {
|
|
|
1716
1719
|
passAddOnId: string | null;
|
|
1717
1720
|
reservationId: string | null;
|
|
1718
1721
|
accessId: string | null;
|
|
1719
|
-
invoiceId: string | null;
|
|
1720
1722
|
bookingId: string | null;
|
|
1721
1723
|
subscriptionId: string | null;
|
|
1722
1724
|
}
|
|
@@ -1726,7 +1728,6 @@ interface PaymentLineItem extends BasePaymentLineItem {
|
|
|
1726
1728
|
passAddOn: BasePassAddOn | null;
|
|
1727
1729
|
reservation: BaseEventRoomTypeReservation | null;
|
|
1728
1730
|
access: BaseEventSessionAccess | null;
|
|
1729
|
-
invoice: BaseInvoice | null;
|
|
1730
1731
|
booking: BaseBooking | null;
|
|
1731
1732
|
subscription: BaseSubscription | null;
|
|
1732
1733
|
coupon: BaseCoupon | null;
|
|
@@ -1878,6 +1879,7 @@ interface BaseRegistrationQuestion {
|
|
|
1878
1879
|
mutable: boolean;
|
|
1879
1880
|
min: string | null;
|
|
1880
1881
|
max: string | null;
|
|
1882
|
+
masked: boolean;
|
|
1881
1883
|
validation: string | null;
|
|
1882
1884
|
validationMessage: string | null;
|
|
1883
1885
|
locationOption: LocationQuestionOption | null;
|
|
@@ -2282,6 +2284,7 @@ interface BaseEventSessionQuestion {
|
|
|
2282
2284
|
mutable: boolean;
|
|
2283
2285
|
min: string | null;
|
|
2284
2286
|
max: string | null;
|
|
2287
|
+
masked: boolean;
|
|
2285
2288
|
validation: string | null;
|
|
2286
2289
|
validationMessage: string | null;
|
|
2287
2290
|
locationOption: LocationQuestionOption | null;
|
|
@@ -3520,6 +3523,7 @@ interface BaseSurveyQuestion {
|
|
|
3520
3523
|
mutable: boolean;
|
|
3521
3524
|
min: string | null;
|
|
3522
3525
|
max: string | null;
|
|
3526
|
+
masked: boolean;
|
|
3523
3527
|
validation: string | null;
|
|
3524
3528
|
validationMessage: string | null;
|
|
3525
3529
|
locationOption: LocationQuestionOption | null;
|
|
@@ -3844,23 +3848,25 @@ interface ImportCreateInputs {
|
|
|
3844
3848
|
type?: ImportType | null;
|
|
3845
3849
|
}
|
|
3846
3850
|
interface BaseActivityEntityInput {
|
|
3847
|
-
type: ActivityEntityType;
|
|
3851
|
+
type: keyof typeof ActivityEntityType;
|
|
3848
3852
|
startIndex: number;
|
|
3849
3853
|
endIndex: number;
|
|
3850
3854
|
marks: ("bold" | "italic" | "underline" | "strike")[];
|
|
3851
3855
|
}
|
|
3852
3856
|
interface MentionInputs extends BaseActivityEntityInput {
|
|
3853
|
-
type:
|
|
3854
|
-
|
|
3855
|
-
}
|
|
3856
|
-
interface LinkInputs extends BaseActivityEntityInput {
|
|
3857
|
-
type: ActivityEntityType.link;
|
|
3857
|
+
type: "mention";
|
|
3858
|
+
username: string;
|
|
3858
3859
|
}
|
|
3859
3860
|
interface InterestInputs extends BaseActivityEntityInput {
|
|
3860
|
-
type:
|
|
3861
|
+
type: "interest";
|
|
3862
|
+
interest: string;
|
|
3863
|
+
}
|
|
3864
|
+
interface LinkInputs extends BaseActivityEntityInput {
|
|
3865
|
+
type: "link";
|
|
3866
|
+
href: string;
|
|
3861
3867
|
}
|
|
3862
3868
|
interface SegmentInputs extends BaseActivityEntityInput {
|
|
3863
|
-
type:
|
|
3869
|
+
type: "segment";
|
|
3864
3870
|
}
|
|
3865
3871
|
type ActivityEntityInputs = MentionInputs | LinkInputs | InterestInputs | SegmentInputs;
|
|
3866
3872
|
interface ActivityCreateInputs {
|
|
@@ -3876,6 +3882,7 @@ interface ActivityCreateInputs {
|
|
|
3876
3882
|
createdAt?: string | null;
|
|
3877
3883
|
}
|
|
3878
3884
|
interface ActivityUpdateInputs {
|
|
3885
|
+
accountId?: string | null;
|
|
3879
3886
|
message?: string | null;
|
|
3880
3887
|
entities?: ActivityEntityInputs[] | null;
|
|
3881
3888
|
moderation?: keyof typeof ModerationStatus | null;
|
|
@@ -4513,6 +4520,7 @@ interface EventSessionQuestionCreateInputs {
|
|
|
4513
4520
|
price?: number | string | null;
|
|
4514
4521
|
supply?: number | string | null;
|
|
4515
4522
|
searchListId?: string | null;
|
|
4523
|
+
masked?: boolean;
|
|
4516
4524
|
}
|
|
4517
4525
|
interface EventSessionQuestionTranslationUpdateInputs {
|
|
4518
4526
|
label?: string | null;
|
|
@@ -4531,6 +4539,7 @@ interface EventSessionQuestionUpdateInputs {
|
|
|
4531
4539
|
mutable?: boolean;
|
|
4532
4540
|
min?: string | null;
|
|
4533
4541
|
max?: string | null;
|
|
4542
|
+
masked?: boolean;
|
|
4534
4543
|
validation?: string | null;
|
|
4535
4544
|
validationMessage?: string | null;
|
|
4536
4545
|
locationOption?: LocationQuestionOption | null;
|
|
@@ -4922,6 +4931,7 @@ interface EventQuestionCreateInputs {
|
|
|
4922
4931
|
featured?: boolean;
|
|
4923
4932
|
choices?: string[] | null;
|
|
4924
4933
|
searchListId?: string | null;
|
|
4934
|
+
masked?: boolean;
|
|
4925
4935
|
}
|
|
4926
4936
|
interface EventQuestionTranslationUpdateInputs {
|
|
4927
4937
|
label?: string | null;
|
|
@@ -4940,6 +4950,7 @@ interface EventQuestionUpdateInputs {
|
|
|
4940
4950
|
mutable?: boolean;
|
|
4941
4951
|
min?: string | null;
|
|
4942
4952
|
max?: string | null;
|
|
4953
|
+
masked?: boolean;
|
|
4943
4954
|
validation?: string | null;
|
|
4944
4955
|
validationMessage?: string | null;
|
|
4945
4956
|
locationOption?: LocationQuestionOption | null;
|
|
@@ -5712,6 +5723,7 @@ interface SurveyQuestionCreateInputs {
|
|
|
5712
5723
|
featured?: boolean;
|
|
5713
5724
|
choices?: string[] | null;
|
|
5714
5725
|
searchListId?: string | null;
|
|
5726
|
+
masked?: boolean;
|
|
5715
5727
|
}
|
|
5716
5728
|
interface SurveyQuestionTranslationUpdateInputs {
|
|
5717
5729
|
label?: string | null;
|
|
@@ -5730,6 +5742,7 @@ interface SurveyQuestionUpdateInputs {
|
|
|
5730
5742
|
mutable?: boolean;
|
|
5731
5743
|
min?: string | null;
|
|
5732
5744
|
max?: string | null;
|
|
5745
|
+
masked?: boolean;
|
|
5733
5746
|
validation?: string | null;
|
|
5734
5747
|
validationMessage?: string | null;
|
|
5735
5748
|
locationOption?: LocationQuestionOption | null;
|
|
@@ -17170,7 +17183,7 @@ interface MutationParams {
|
|
|
17170
17183
|
}
|
|
17171
17184
|
interface ConnectedXMMutationOptions<TResponseData, TMutationParams> extends UseMutationOptions<TResponseData, AxiosError<TResponseData>, TMutationParams> {
|
|
17172
17185
|
}
|
|
17173
|
-
declare const useConnectedMutation: <TMutationParams extends MutationParams, TResponseData extends ConnectedXMResponse<any>>(mutation:
|
|
17186
|
+
declare const useConnectedMutation: <TMutationParams extends MutationParams, TResponseData extends ConnectedXMResponse<any>>(mutation: (params: TMutationParams) => Promise<TResponseData>, options?: Omit<ConnectedXMMutationOptions<TResponseData, Omit<TMutationParams, "queryClient" | "adminApiParams">>, "mutationFn">, permission?: {
|
|
17174
17187
|
domain: PermissionDomain | PermissionDomain[];
|
|
17175
17188
|
type: PermissionType | PermissionType[];
|
|
17176
17189
|
}) => _tanstack_react_query.UseMutationResult<TResponseData, AxiosError<TResponseData, any>, Omit<TMutationParams, "queryClient" | "adminApiParams">, unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as axios from 'axios';
|
|
|
2
2
|
import { AxiosError, AxiosInstance } from 'axios';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
|
-
import { QueryClient, QueryKey, InfiniteData, UseQueryOptions, UseInfiniteQueryOptions, Updater, SetDataOptions, UseMutationOptions
|
|
5
|
+
import { QueryClient, QueryKey, InfiniteData, UseQueryOptions, UseInfiniteQueryOptions, Updater, SetDataOptions, UseMutationOptions } from '@tanstack/react-query';
|
|
6
6
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
7
7
|
|
|
8
8
|
interface ConnectedXMResponse<TData> {
|
|
@@ -281,6 +281,7 @@ interface AccountAddress extends BaseAccountAddress {
|
|
|
281
281
|
}
|
|
282
282
|
interface BaseAPILog {
|
|
283
283
|
id: string;
|
|
284
|
+
login: BaseLogin | null;
|
|
284
285
|
account: BaseAccount | null;
|
|
285
286
|
user: BaseUser | null;
|
|
286
287
|
source: "admin" | "client";
|
|
@@ -1679,6 +1680,7 @@ interface Payment extends BasePayment {
|
|
|
1679
1680
|
space: BaseBookingSpace | null;
|
|
1680
1681
|
membership: BaseMembership | null;
|
|
1681
1682
|
coupon: BaseCoupon | null;
|
|
1683
|
+
invoice: BaseInvoice | null;
|
|
1682
1684
|
metadata?: any;
|
|
1683
1685
|
lineItems: Omit<PaymentLineItem, "payment">[];
|
|
1684
1686
|
}
|
|
@@ -1707,6 +1709,7 @@ interface BasePaymentLineItem {
|
|
|
1707
1709
|
discount: number;
|
|
1708
1710
|
deferred: number;
|
|
1709
1711
|
salesTax: number;
|
|
1712
|
+
refundedSalesTax: number;
|
|
1710
1713
|
paymentId: number;
|
|
1711
1714
|
taxCode: string | null;
|
|
1712
1715
|
taxIncluded: boolean;
|
|
@@ -1716,7 +1719,6 @@ interface BasePaymentLineItem {
|
|
|
1716
1719
|
passAddOnId: string | null;
|
|
1717
1720
|
reservationId: string | null;
|
|
1718
1721
|
accessId: string | null;
|
|
1719
|
-
invoiceId: string | null;
|
|
1720
1722
|
bookingId: string | null;
|
|
1721
1723
|
subscriptionId: string | null;
|
|
1722
1724
|
}
|
|
@@ -1726,7 +1728,6 @@ interface PaymentLineItem extends BasePaymentLineItem {
|
|
|
1726
1728
|
passAddOn: BasePassAddOn | null;
|
|
1727
1729
|
reservation: BaseEventRoomTypeReservation | null;
|
|
1728
1730
|
access: BaseEventSessionAccess | null;
|
|
1729
|
-
invoice: BaseInvoice | null;
|
|
1730
1731
|
booking: BaseBooking | null;
|
|
1731
1732
|
subscription: BaseSubscription | null;
|
|
1732
1733
|
coupon: BaseCoupon | null;
|
|
@@ -1878,6 +1879,7 @@ interface BaseRegistrationQuestion {
|
|
|
1878
1879
|
mutable: boolean;
|
|
1879
1880
|
min: string | null;
|
|
1880
1881
|
max: string | null;
|
|
1882
|
+
masked: boolean;
|
|
1881
1883
|
validation: string | null;
|
|
1882
1884
|
validationMessage: string | null;
|
|
1883
1885
|
locationOption: LocationQuestionOption | null;
|
|
@@ -2282,6 +2284,7 @@ interface BaseEventSessionQuestion {
|
|
|
2282
2284
|
mutable: boolean;
|
|
2283
2285
|
min: string | null;
|
|
2284
2286
|
max: string | null;
|
|
2287
|
+
masked: boolean;
|
|
2285
2288
|
validation: string | null;
|
|
2286
2289
|
validationMessage: string | null;
|
|
2287
2290
|
locationOption: LocationQuestionOption | null;
|
|
@@ -3520,6 +3523,7 @@ interface BaseSurveyQuestion {
|
|
|
3520
3523
|
mutable: boolean;
|
|
3521
3524
|
min: string | null;
|
|
3522
3525
|
max: string | null;
|
|
3526
|
+
masked: boolean;
|
|
3523
3527
|
validation: string | null;
|
|
3524
3528
|
validationMessage: string | null;
|
|
3525
3529
|
locationOption: LocationQuestionOption | null;
|
|
@@ -3844,23 +3848,25 @@ interface ImportCreateInputs {
|
|
|
3844
3848
|
type?: ImportType | null;
|
|
3845
3849
|
}
|
|
3846
3850
|
interface BaseActivityEntityInput {
|
|
3847
|
-
type: ActivityEntityType;
|
|
3851
|
+
type: keyof typeof ActivityEntityType;
|
|
3848
3852
|
startIndex: number;
|
|
3849
3853
|
endIndex: number;
|
|
3850
3854
|
marks: ("bold" | "italic" | "underline" | "strike")[];
|
|
3851
3855
|
}
|
|
3852
3856
|
interface MentionInputs extends BaseActivityEntityInput {
|
|
3853
|
-
type:
|
|
3854
|
-
|
|
3855
|
-
}
|
|
3856
|
-
interface LinkInputs extends BaseActivityEntityInput {
|
|
3857
|
-
type: ActivityEntityType.link;
|
|
3857
|
+
type: "mention";
|
|
3858
|
+
username: string;
|
|
3858
3859
|
}
|
|
3859
3860
|
interface InterestInputs extends BaseActivityEntityInput {
|
|
3860
|
-
type:
|
|
3861
|
+
type: "interest";
|
|
3862
|
+
interest: string;
|
|
3863
|
+
}
|
|
3864
|
+
interface LinkInputs extends BaseActivityEntityInput {
|
|
3865
|
+
type: "link";
|
|
3866
|
+
href: string;
|
|
3861
3867
|
}
|
|
3862
3868
|
interface SegmentInputs extends BaseActivityEntityInput {
|
|
3863
|
-
type:
|
|
3869
|
+
type: "segment";
|
|
3864
3870
|
}
|
|
3865
3871
|
type ActivityEntityInputs = MentionInputs | LinkInputs | InterestInputs | SegmentInputs;
|
|
3866
3872
|
interface ActivityCreateInputs {
|
|
@@ -3876,6 +3882,7 @@ interface ActivityCreateInputs {
|
|
|
3876
3882
|
createdAt?: string | null;
|
|
3877
3883
|
}
|
|
3878
3884
|
interface ActivityUpdateInputs {
|
|
3885
|
+
accountId?: string | null;
|
|
3879
3886
|
message?: string | null;
|
|
3880
3887
|
entities?: ActivityEntityInputs[] | null;
|
|
3881
3888
|
moderation?: keyof typeof ModerationStatus | null;
|
|
@@ -4513,6 +4520,7 @@ interface EventSessionQuestionCreateInputs {
|
|
|
4513
4520
|
price?: number | string | null;
|
|
4514
4521
|
supply?: number | string | null;
|
|
4515
4522
|
searchListId?: string | null;
|
|
4523
|
+
masked?: boolean;
|
|
4516
4524
|
}
|
|
4517
4525
|
interface EventSessionQuestionTranslationUpdateInputs {
|
|
4518
4526
|
label?: string | null;
|
|
@@ -4531,6 +4539,7 @@ interface EventSessionQuestionUpdateInputs {
|
|
|
4531
4539
|
mutable?: boolean;
|
|
4532
4540
|
min?: string | null;
|
|
4533
4541
|
max?: string | null;
|
|
4542
|
+
masked?: boolean;
|
|
4534
4543
|
validation?: string | null;
|
|
4535
4544
|
validationMessage?: string | null;
|
|
4536
4545
|
locationOption?: LocationQuestionOption | null;
|
|
@@ -4922,6 +4931,7 @@ interface EventQuestionCreateInputs {
|
|
|
4922
4931
|
featured?: boolean;
|
|
4923
4932
|
choices?: string[] | null;
|
|
4924
4933
|
searchListId?: string | null;
|
|
4934
|
+
masked?: boolean;
|
|
4925
4935
|
}
|
|
4926
4936
|
interface EventQuestionTranslationUpdateInputs {
|
|
4927
4937
|
label?: string | null;
|
|
@@ -4940,6 +4950,7 @@ interface EventQuestionUpdateInputs {
|
|
|
4940
4950
|
mutable?: boolean;
|
|
4941
4951
|
min?: string | null;
|
|
4942
4952
|
max?: string | null;
|
|
4953
|
+
masked?: boolean;
|
|
4943
4954
|
validation?: string | null;
|
|
4944
4955
|
validationMessage?: string | null;
|
|
4945
4956
|
locationOption?: LocationQuestionOption | null;
|
|
@@ -5712,6 +5723,7 @@ interface SurveyQuestionCreateInputs {
|
|
|
5712
5723
|
featured?: boolean;
|
|
5713
5724
|
choices?: string[] | null;
|
|
5714
5725
|
searchListId?: string | null;
|
|
5726
|
+
masked?: boolean;
|
|
5715
5727
|
}
|
|
5716
5728
|
interface SurveyQuestionTranslationUpdateInputs {
|
|
5717
5729
|
label?: string | null;
|
|
@@ -5730,6 +5742,7 @@ interface SurveyQuestionUpdateInputs {
|
|
|
5730
5742
|
mutable?: boolean;
|
|
5731
5743
|
min?: string | null;
|
|
5732
5744
|
max?: string | null;
|
|
5745
|
+
masked?: boolean;
|
|
5733
5746
|
validation?: string | null;
|
|
5734
5747
|
validationMessage?: string | null;
|
|
5735
5748
|
locationOption?: LocationQuestionOption | null;
|
|
@@ -17170,7 +17183,7 @@ interface MutationParams {
|
|
|
17170
17183
|
}
|
|
17171
17184
|
interface ConnectedXMMutationOptions<TResponseData, TMutationParams> extends UseMutationOptions<TResponseData, AxiosError<TResponseData>, TMutationParams> {
|
|
17172
17185
|
}
|
|
17173
|
-
declare const useConnectedMutation: <TMutationParams extends MutationParams, TResponseData extends ConnectedXMResponse<any>>(mutation:
|
|
17186
|
+
declare const useConnectedMutation: <TMutationParams extends MutationParams, TResponseData extends ConnectedXMResponse<any>>(mutation: (params: TMutationParams) => Promise<TResponseData>, options?: Omit<ConnectedXMMutationOptions<TResponseData, Omit<TMutationParams, "queryClient" | "adminApiParams">>, "mutationFn">, permission?: {
|
|
17174
17187
|
domain: PermissionDomain | PermissionDomain[];
|
|
17175
17188
|
type: PermissionType | PermissionType[];
|
|
17176
17189
|
}) => _tanstack_react_query.UseMutationResult<TResponseData, AxiosError<TResponseData, any>, Omit<TMutationParams, "queryClient" | "adminApiParams">, unknown>;
|
package/dist/index.js
CHANGED
|
@@ -19448,9 +19448,10 @@ var useConnectedMutation = (mutation, options, permission) => {
|
|
|
19448
19448
|
});
|
|
19449
19449
|
},
|
|
19450
19450
|
...options,
|
|
19451
|
-
onError: (error, variables, context) => {
|
|
19451
|
+
onError: (error, variables, onMutateResult, context) => {
|
|
19452
19452
|
if (onMutationError) onMutationError(error, variables, context);
|
|
19453
|
-
if (options?.onError)
|
|
19453
|
+
if (options?.onError)
|
|
19454
|
+
options.onError(error, variables, onMutateResult, context);
|
|
19454
19455
|
}
|
|
19455
19456
|
});
|
|
19456
19457
|
};
|