@connectedxm/admin 3.4.4 → 3.4.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.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) options.onError(error, variables, context);
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, MutationFunction } from '@tanstack/react-query';
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";
@@ -393,6 +394,7 @@ interface BaseActivity {
393
394
  id: string;
394
395
  message: string;
395
396
  featured: boolean;
397
+ pinned: boolean;
396
398
  giphyId: string | null;
397
399
  imageId: string | null;
398
400
  image: BaseImage | null;
@@ -1706,6 +1708,7 @@ interface BasePaymentLineItem {
1706
1708
  discount: number;
1707
1709
  deferred: number;
1708
1710
  salesTax: number;
1711
+ refundedSalesTax: number;
1709
1712
  paymentId: number;
1710
1713
  taxCode: string | null;
1711
1714
  taxIncluded: boolean;
@@ -3843,23 +3846,25 @@ interface ImportCreateInputs {
3843
3846
  type?: ImportType | null;
3844
3847
  }
3845
3848
  interface BaseActivityEntityInput {
3846
- type: ActivityEntityType;
3849
+ type: keyof typeof ActivityEntityType;
3847
3850
  startIndex: number;
3848
3851
  endIndex: number;
3849
3852
  marks: ("bold" | "italic" | "underline" | "strike")[];
3850
3853
  }
3851
3854
  interface MentionInputs extends BaseActivityEntityInput {
3852
- type: ActivityEntityType.mention;
3853
- accountId: string;
3854
- }
3855
- interface LinkInputs extends BaseActivityEntityInput {
3856
- type: ActivityEntityType.link;
3855
+ type: "mention";
3856
+ username: string;
3857
3857
  }
3858
3858
  interface InterestInputs extends BaseActivityEntityInput {
3859
- type: ActivityEntityType.interest;
3859
+ type: "interest";
3860
+ interest: string;
3861
+ }
3862
+ interface LinkInputs extends BaseActivityEntityInput {
3863
+ type: "link";
3864
+ href: string;
3860
3865
  }
3861
3866
  interface SegmentInputs extends BaseActivityEntityInput {
3862
- type: ActivityEntityType.segment;
3867
+ type: "segment";
3863
3868
  }
3864
3869
  type ActivityEntityInputs = MentionInputs | LinkInputs | InterestInputs | SegmentInputs;
3865
3870
  interface ActivityCreateInputs {
@@ -3875,10 +3880,12 @@ interface ActivityCreateInputs {
3875
3880
  createdAt?: string | null;
3876
3881
  }
3877
3882
  interface ActivityUpdateInputs {
3883
+ accountId?: string | null;
3878
3884
  message?: string | null;
3879
3885
  entities?: ActivityEntityInputs[] | null;
3880
3886
  moderation?: keyof typeof ModerationStatus | null;
3881
3887
  featured?: boolean;
3888
+ pinned?: boolean;
3882
3889
  imageId?: string | null;
3883
3890
  videoId?: string | null;
3884
3891
  createdAt?: string | null;
@@ -17168,7 +17175,7 @@ interface MutationParams {
17168
17175
  }
17169
17176
  interface ConnectedXMMutationOptions<TResponseData, TMutationParams> extends UseMutationOptions<TResponseData, AxiosError<TResponseData>, TMutationParams> {
17170
17177
  }
17171
- declare const useConnectedMutation: <TMutationParams extends MutationParams, TResponseData extends ConnectedXMResponse<any>>(mutation: MutationFunction<TResponseData, TMutationParams>, options?: Omit<ConnectedXMMutationOptions<TResponseData, Omit<TMutationParams, "queryClient" | "adminApiParams">>, "mutationFn">, permission?: {
17178
+ 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?: {
17172
17179
  domain: PermissionDomain | PermissionDomain[];
17173
17180
  type: PermissionType | PermissionType[];
17174
17181
  }) => _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, MutationFunction } from '@tanstack/react-query';
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";
@@ -393,6 +394,7 @@ interface BaseActivity {
393
394
  id: string;
394
395
  message: string;
395
396
  featured: boolean;
397
+ pinned: boolean;
396
398
  giphyId: string | null;
397
399
  imageId: string | null;
398
400
  image: BaseImage | null;
@@ -1706,6 +1708,7 @@ interface BasePaymentLineItem {
1706
1708
  discount: number;
1707
1709
  deferred: number;
1708
1710
  salesTax: number;
1711
+ refundedSalesTax: number;
1709
1712
  paymentId: number;
1710
1713
  taxCode: string | null;
1711
1714
  taxIncluded: boolean;
@@ -3843,23 +3846,25 @@ interface ImportCreateInputs {
3843
3846
  type?: ImportType | null;
3844
3847
  }
3845
3848
  interface BaseActivityEntityInput {
3846
- type: ActivityEntityType;
3849
+ type: keyof typeof ActivityEntityType;
3847
3850
  startIndex: number;
3848
3851
  endIndex: number;
3849
3852
  marks: ("bold" | "italic" | "underline" | "strike")[];
3850
3853
  }
3851
3854
  interface MentionInputs extends BaseActivityEntityInput {
3852
- type: ActivityEntityType.mention;
3853
- accountId: string;
3854
- }
3855
- interface LinkInputs extends BaseActivityEntityInput {
3856
- type: ActivityEntityType.link;
3855
+ type: "mention";
3856
+ username: string;
3857
3857
  }
3858
3858
  interface InterestInputs extends BaseActivityEntityInput {
3859
- type: ActivityEntityType.interest;
3859
+ type: "interest";
3860
+ interest: string;
3861
+ }
3862
+ interface LinkInputs extends BaseActivityEntityInput {
3863
+ type: "link";
3864
+ href: string;
3860
3865
  }
3861
3866
  interface SegmentInputs extends BaseActivityEntityInput {
3862
- type: ActivityEntityType.segment;
3867
+ type: "segment";
3863
3868
  }
3864
3869
  type ActivityEntityInputs = MentionInputs | LinkInputs | InterestInputs | SegmentInputs;
3865
3870
  interface ActivityCreateInputs {
@@ -3875,10 +3880,12 @@ interface ActivityCreateInputs {
3875
3880
  createdAt?: string | null;
3876
3881
  }
3877
3882
  interface ActivityUpdateInputs {
3883
+ accountId?: string | null;
3878
3884
  message?: string | null;
3879
3885
  entities?: ActivityEntityInputs[] | null;
3880
3886
  moderation?: keyof typeof ModerationStatus | null;
3881
3887
  featured?: boolean;
3888
+ pinned?: boolean;
3882
3889
  imageId?: string | null;
3883
3890
  videoId?: string | null;
3884
3891
  createdAt?: string | null;
@@ -17168,7 +17175,7 @@ interface MutationParams {
17168
17175
  }
17169
17176
  interface ConnectedXMMutationOptions<TResponseData, TMutationParams> extends UseMutationOptions<TResponseData, AxiosError<TResponseData>, TMutationParams> {
17170
17177
  }
17171
- declare const useConnectedMutation: <TMutationParams extends MutationParams, TResponseData extends ConnectedXMResponse<any>>(mutation: MutationFunction<TResponseData, TMutationParams>, options?: Omit<ConnectedXMMutationOptions<TResponseData, Omit<TMutationParams, "queryClient" | "adminApiParams">>, "mutationFn">, permission?: {
17178
+ 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?: {
17172
17179
  domain: PermissionDomain | PermissionDomain[];
17173
17180
  type: PermissionType | PermissionType[];
17174
17181
  }) => _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) options.onError(error, variables, context);
19453
+ if (options?.onError)
19454
+ options.onError(error, variables, onMutateResult, context);
19454
19455
  }
19455
19456
  });
19456
19457
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "3.4.4",
3
+ "version": "3.4.7",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",