@yuno-payments/dashboard-api-mfe 0.40.13 → 0.40.14

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.
@@ -10,6 +10,8 @@ import { AllowedList } from '../types/allowed-list';
10
10
  import { Cost } from '../types/connection/costs';
11
11
  import { Styling, StylingSettings, UpdateStylingThemeParams } from '../types/checkout/styling/styling';
12
12
  import { FeatureFlags } from '../types/feature-flags/intex';
13
+ import { DuplicateAccountBody, DuplicateAccountResponse, RetryDuplicateAccountResponse } from '../mutations/accounts/types';
14
+ import { PendingDuplicateAccountsResponse } from '../queries/accounts/types';
13
15
  import { FeatureFlagsResult, PatchChartGPTPayload } from '../queries';
14
16
  interface S3Payload {
15
17
  payload: S3Client.PayloadV2;
@@ -303,6 +305,14 @@ export declare class Api extends HttpClient {
303
305
  putAccountsUserMassive<T>(organizationCode: any, userCode: any, payload: any): Promise<AxiosResponse<T, any>>;
304
306
  deleteAccountsUserMassive<T, K>(organizationCode: string, userCode: string, payload: any): Promise<AxiosResponse<T, K>>;
305
307
  postAccount<T>(name: string, principal: boolean): Promise<AxiosResponse<T>>;
308
+ duplicateAccount(body: DuplicateAccountBody): Promise<AxiosResponse<DuplicateAccountResponse>>;
309
+ retryDuplicateAccount(account_code: string): Promise<AxiosResponse<RetryDuplicateAccountResponse>>;
310
+ getPendingDuplicateAccounts(): Promise<AxiosResponse<PendingDuplicateAccountsResponse>>;
311
+ patchAccount<T>({ name, code, principal, }: {
312
+ name: string;
313
+ code: string;
314
+ principal: boolean;
315
+ }): Promise<AxiosResponse<T>>;
306
316
  patchAccountV2<T>({ name, code, principal, }: {
307
317
  name: string;
308
318
  code: string;
@@ -1,15 +1,18 @@
1
1
  import { Organization, Webhook } from '../../types';
2
+ import { UseMutationResult } from '@tanstack/react-query';
2
3
  import { DeleteMutation } from './delete-mutation';
4
+ import { DuplicateAccountResponse, RetryDuplicateAccountResponse } from './types';
5
+ import { AxiosError, AxiosResponse } from 'axios';
3
6
  export declare function usePostWebhookMultiAccount({ onSuccessCallback, }: {
4
7
  onSuccessCallback?: (data: any) => void;
5
- }): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<unknown, any, {}>, unknown, {
8
+ }): UseMutationResult<AxiosResponse<unknown, any, {}>, unknown, {
6
9
  payload: Webhook.WebHookV2MultiAccount;
7
10
  }, {
8
11
  payload: Webhook.WebHookV2MultiAccount;
9
12
  }>;
10
13
  export declare function useDeleteWebhookV2({ onSuccessCallback, }: {
11
14
  onSuccessCallback?: (data: any) => void;
12
- }): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<null, any, {}>, unknown, {
15
+ }): UseMutationResult<AxiosResponse<null, any, {}>, unknown, {
13
16
  code: string;
14
17
  accountCode: string;
15
18
  }, {
@@ -18,7 +21,7 @@ export declare function useDeleteWebhookV2({ onSuccessCallback, }: {
18
21
  }>;
19
22
  export declare function useUpdateWebhookV2({ onSuccessCallback, }: {
20
23
  onSuccessCallback?: (data: any) => void;
21
- }): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Webhook.WebHookV2, any, {}>, unknown, {
24
+ }): UseMutationResult<AxiosResponse<Webhook.WebHookV2, any, {}>, unknown, {
22
25
  code: string;
23
26
  payload: any;
24
27
  accountCode: string;
@@ -27,19 +30,21 @@ export declare function useUpdateWebhookV2({ onSuccessCallback, }: {
27
30
  payload: any;
28
31
  accountCode: string;
29
32
  }>;
30
- export declare function usePostAccount(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Organization.Account, any, {}>, unknown, {
33
+ export declare function usePostAccount(): UseMutationResult<AxiosResponse<Organization.Account, any, {}>, unknown, {
31
34
  name: string;
32
35
  principal: boolean;
33
36
  }, unknown>;
34
- export declare function usePatchAccountV2(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Organization.Account, any, {}>, unknown, {
37
+ export declare function useDuplicateAccount(): UseMutationResult<AxiosResponse<DuplicateAccountResponse>, AxiosError>;
38
+ export declare function useRetryDuplicateAccount(): UseMutationResult<AxiosResponse<RetryDuplicateAccountResponse>, AxiosError>;
39
+ export declare function usePatchAccountV2(): UseMutationResult<AxiosResponse<Organization.Account, any, {}>, unknown, {
35
40
  name: string;
36
41
  code: string;
37
42
  principal: boolean;
38
43
  }, unknown>;
39
- export declare function usePutAccountPrincipal(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Organization.Account, any, {}>, unknown, {
44
+ export declare function usePutAccountPrincipal(): UseMutationResult<AxiosResponse<Organization.Account, any, {}>, unknown, {
40
45
  account_code: string;
41
46
  }, unknown>;
42
- export declare function usePutAccountsUserMassive(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Organization.Account, any, {}>, unknown, {
47
+ export declare function usePutAccountsUserMassive(): UseMutationResult<AxiosResponse<Organization.Account, any, {}>, unknown, {
43
48
  organizationCode: string;
44
49
  userCode: string;
45
50
  payload: {
@@ -1 +1,2 @@
1
1
  export * from './accounts.mutation';
2
+ export * from './types';
@@ -0,0 +1,25 @@
1
+ export type DuplicateAccountBody = {
2
+ source_account_code: string;
3
+ source_account_name: string;
4
+ target_account_name: string;
5
+ duplicate_order: DuplicateSetting[];
6
+ include_testing_mode: boolean;
7
+ };
8
+ export declare enum DuplicateSetting {
9
+ ACCOUNT = "ACCOUNT",
10
+ CHECKOUT_BUILDER = "CHECKOUT_BUILDER",
11
+ CONNECTION = "CONNECTION",
12
+ ROUTING = "ROUTING",
13
+ RISK_CONDITIONS = "RISK_CONDITIONS",
14
+ WEBHOOKS = "WEBHOOKS"
15
+ }
16
+ export type DuplicateAccountResponse = {
17
+ account_code: string;
18
+ account_name: string;
19
+ };
20
+ export type RetryDuplicateAccountBody = {
21
+ account_code: string;
22
+ };
23
+ export type RetryDuplicateAccountResponse = {
24
+ account_code: string;
25
+ };
@@ -1,6 +1,7 @@
1
- import { AxiosError } from 'axios';
1
+ import { AxiosError, AxiosResponse } from 'axios';
2
2
  import { UseQueryResult } from '@tanstack/react-query';
3
3
  import { Organization, Webhook } from '../../types';
4
+ import { PendingDuplicateAccountsResponse } from './types';
4
5
  export declare function useGetWebhookParamsV2(): UseQueryResult<Webhook.Param[], unknown>;
5
6
  export declare function useGetWebhooksV3({ accountCode, name, }: {
6
7
  accountCode: string;
@@ -22,3 +23,4 @@ export declare function useGetAccountsForImpersonation(organizationCode?: string
22
23
  code_live: string;
23
24
  code_testing: string;
24
25
  }>, unknown>;
26
+ export declare function useGetPendingDuplicateAccounts(refetchInterval?: number): UseQueryResult<AxiosResponse<PendingDuplicateAccountsResponse>, AxiosError>;
@@ -1 +1,2 @@
1
1
  export * from './accounts.query';
2
+ export * from './types';
@@ -0,0 +1,21 @@
1
+ export type PendingDuplicateAccount = {
2
+ code: string;
3
+ target_account_name: string;
4
+ source_account_name: string;
5
+ duplicate_account_status: string;
6
+ duplicate_connection_status: string | null;
7
+ duplicate_routing_status: string | null;
8
+ duplicate_checkout_builder_status: string | null;
9
+ duplicate_webhook_status: string | null;
10
+ duplicate_risk_conditions_status: string | null;
11
+ created_at: string;
12
+ updated_at: string;
13
+ };
14
+ export type PendingDuplicateAccountsResponse = {
15
+ orders: PendingDuplicateAccount[];
16
+ };
17
+ export declare enum PendingDuplicateAccountStatus {
18
+ IN_PROGRESS = "IN_PROGRESS",
19
+ COMPLETED = "COMPLETED",
20
+ FAILED = "FAILED"
21
+ }