@yuno-payments/dashboard-api-mfe 0.36.0-beta.1 → 0.36.4

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 } 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 } from '../queries';
14
16
  interface S3Payload {
15
17
  payload: S3Client.PayloadV2;
@@ -308,6 +310,9 @@ export declare class Api extends HttpClient {
308
310
  putAccountsUserMassive<T>(organizationCode: any, userCode: any, payload: any): Promise<AxiosResponse<T, any>>;
309
311
  deleteAccountsUserMassive<T, K>(organizationCode: string, userCode: string, payload: any): Promise<AxiosResponse<T, K>>;
310
312
  postAccount<T>(name: string, principal: boolean): Promise<AxiosResponse<T>>;
313
+ duplicateAccount(body: DuplicateAccountBody): Promise<AxiosResponse<DuplicateAccountResponse>>;
314
+ retryDuplicateAccount(account_code: string): Promise<AxiosResponse<RetryDuplicateAccountResponse>>;
315
+ getPendingDuplicateAccounts(): Promise<AxiosResponse<PendingDuplicateAccountsResponse>>;
311
316
  patchAccount<T>({ name, code, principal, }: {
312
317
  name: string;
313
318
  code: string;
@@ -1,8 +1,11 @@
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 usePostWebhook({ onSuccessCallback, }: {
4
7
  onSuccessCallback?: (data?: any) => void;
5
- }): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<{
8
+ }): UseMutationResult<AxiosResponse<{
6
9
  code: string;
7
10
  }, any>, unknown, {
8
11
  payload: Webhook.WebhookRequestPayload;
@@ -13,7 +16,7 @@ export declare function usePostWebhook({ onSuccessCallback, }: {
13
16
  }>;
14
17
  export declare function usePostWebhookV2({ onSuccessCallback, }: {
15
18
  onSuccessCallback?: (data: any) => void;
16
- }): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<{
19
+ }): UseMutationResult<AxiosResponse<{
17
20
  code: string;
18
21
  }, any>, unknown, {
19
22
  payload: Webhook.WebHookV2;
@@ -24,21 +27,21 @@ export declare function usePostWebhookV2({ onSuccessCallback, }: {
24
27
  }>;
25
28
  export declare function usePostWebhookMultiAccount({ onSuccessCallback, }: {
26
29
  onSuccessCallback?: (data: any) => void;
27
- }): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<unknown, any>, unknown, {
30
+ }): UseMutationResult<AxiosResponse<unknown, any>, unknown, {
28
31
  payload: Webhook.WebHookV2MultiAccount;
29
32
  }, {
30
33
  payload: Webhook.WebHookV2MultiAccount;
31
34
  }>;
32
35
  export declare function useDeleteWebhook({ onSuccessCallback, }: {
33
36
  onSuccessCallback?: (data?: any) => void;
34
- }): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<any, any>, unknown, {
37
+ }): UseMutationResult<AxiosResponse<any, any>, unknown, {
35
38
  code: string;
36
39
  }, {
37
40
  code: string;
38
41
  }>;
39
42
  export declare function useDeleteWebhookV2({ onSuccessCallback, }: {
40
43
  onSuccessCallback?: (data: any) => void;
41
- }): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<null, any>, unknown, {
44
+ }): UseMutationResult<AxiosResponse<null, any>, unknown, {
42
45
  code: string;
43
46
  accountCode: string;
44
47
  }, {
@@ -47,7 +50,7 @@ export declare function useDeleteWebhookV2({ onSuccessCallback, }: {
47
50
  }>;
48
51
  export declare function useUpdateWebhook({ onSuccessCallback, }: {
49
52
  onSuccessCallback?: (data?: any) => void;
50
- }): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<any, any>, unknown, {
53
+ }): UseMutationResult<AxiosResponse<any, any>, unknown, {
51
54
  code: string;
52
55
  payload: any;
53
56
  }, {
@@ -56,7 +59,7 @@ export declare function useUpdateWebhook({ onSuccessCallback, }: {
56
59
  }>;
57
60
  export declare function useUpdateWebhookV2({ onSuccessCallback, }: {
58
61
  onSuccessCallback?: (data: any) => void;
59
- }): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Webhook.WebHookV2, any>, unknown, {
62
+ }): UseMutationResult<AxiosResponse<Webhook.WebHookV2, any>, unknown, {
60
63
  code: string;
61
64
  payload: any;
62
65
  accountCode: string;
@@ -65,24 +68,26 @@ export declare function useUpdateWebhookV2({ onSuccessCallback, }: {
65
68
  payload: any;
66
69
  accountCode: string;
67
70
  }>;
68
- export declare function usePostAccount(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Organization.Account, any>, unknown, {
71
+ export declare function usePostAccount(): UseMutationResult<AxiosResponse<Organization.Account, any>, unknown, {
69
72
  name: string;
70
73
  principal: boolean;
71
74
  }, unknown>;
72
- export declare function usePatchAccount(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Organization.Account, any>, unknown, {
75
+ export declare function useDuplicateAccount(): UseMutationResult<AxiosResponse<DuplicateAccountResponse>, AxiosError>;
76
+ export declare function useRetryDuplicateAccount(): UseMutationResult<AxiosResponse<RetryDuplicateAccountResponse>, AxiosError>;
77
+ export declare function usePatchAccount(): UseMutationResult<AxiosResponse<Organization.Account, any>, unknown, {
73
78
  name: string;
74
79
  code: string;
75
80
  principal: boolean;
76
81
  }, unknown>;
77
- export declare function usePatchAccountV2(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Organization.Account, any>, unknown, {
82
+ export declare function usePatchAccountV2(): UseMutationResult<AxiosResponse<Organization.Account, any>, unknown, {
78
83
  name: string;
79
84
  code: string;
80
85
  principal: boolean;
81
86
  }, unknown>;
82
- export declare function usePutAccountPrincipal(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Organization.Account, any>, unknown, {
87
+ export declare function usePutAccountPrincipal(): UseMutationResult<AxiosResponse<Organization.Account, any>, unknown, {
83
88
  account_code: string;
84
89
  }, unknown>;
85
- export declare function usePutAccountsUser(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Organization.Account, any>, unknown, {
90
+ export declare function usePutAccountsUser(): UseMutationResult<AxiosResponse<Organization.Account, any>, unknown, {
86
91
  organizationCode: string;
87
92
  userCode: string;
88
93
  payload: {
@@ -90,7 +95,7 @@ export declare function usePutAccountsUser(): import("@tanstack/react-query").Us
90
95
  account_code: string;
91
96
  };
92
97
  }, unknown>;
93
- export declare function usePutAccountsUserMassive(): import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<Organization.Account, any>, unknown, {
98
+ export declare function usePutAccountsUserMassive(): UseMutationResult<AxiosResponse<Organization.Account, any>, unknown, {
94
99
  organizationCode: string;
95
100
  userCode: string;
96
101
  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 useGetWebhookParams(): UseQueryResult<any[], unknown>;
5
6
  export declare function useGetWebhookParamsV2(): UseQueryResult<Webhook.Param[], unknown>;
6
7
  export declare function useGetWebhooks({ accountCode, }: {
@@ -23,3 +24,4 @@ export declare function useGetAccountsByUser(userCode: string): UseQueryResult<{
23
24
  accountsV2ByUser: Organization.Account[];
24
25
  error?: AxiosError;
25
26
  }, unknown>;
27
+ 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
+ }