@yuno-payments/dashboard-api-mfe 1.7.6 → 1.7.9-export-beta.1
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/build/cjs/index.js +6 -6
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/api/api.d.ts +14 -0
- package/build/cjs/types/msw/handlers/recipients.d.ts +1 -0
- package/build/cjs/types/msw/mocks/recipients/recipients.mock.d.ts +775 -0
- package/build/cjs/types/mutations/index.d.ts +1 -0
- package/build/cjs/types/mutations/recipients/index.d.ts +1 -0
- package/build/cjs/types/mutations/recipients/recipients.mutation.d.ts +14 -0
- package/build/cjs/types/queries/recipients/recipients.query.d.ts +5 -1
- package/build/cjs/types/types/recipients/index.d.ts +2 -0
- package/build/cjs/types/types/recipients/recipients-export.d.ts +52 -0
- package/build/cjs/types/types/recipients/recipients-mutations.d.ts +136 -0
- package/build/cjs/types/types/recipients/recipients.d.ts +7 -0
- package/build/esm/index.js +6 -6
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/api/api.d.ts +14 -0
- package/build/esm/types/msw/handlers/recipients.d.ts +1 -0
- package/build/esm/types/msw/mocks/recipients/recipients.mock.d.ts +775 -0
- package/build/esm/types/mutations/index.d.ts +1 -0
- package/build/esm/types/mutations/recipients/index.d.ts +1 -0
- package/build/esm/types/mutations/recipients/recipients.mutation.d.ts +14 -0
- package/build/esm/types/queries/recipients/recipients.query.d.ts +5 -1
- package/build/esm/types/types/recipients/index.d.ts +2 -0
- package/build/esm/types/types/recipients/recipients-export.d.ts +52 -0
- package/build/esm/types/types/recipients/recipients-mutations.d.ts +136 -0
- package/build/esm/types/types/recipients/recipients.d.ts +7 -0
- package/build/index.d.ts +225 -2
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './recipients.mutation';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosError } from 'axios';
|
|
2
|
+
import { UseMutationResult } from '@tanstack/react-query';
|
|
3
|
+
import { RecipientsExport } from '../../types/recipients';
|
|
4
|
+
import { CreateRecipientParams, UpdateRecipientParams, DeleteRecipientParams, CreateOnboardingParams, UpdateOnboardingParams, BlockOnboardingParams, UnblockOnboardingParams } from '../../types/recipients/recipients-mutations';
|
|
5
|
+
import { Recipients } from '../../types/recipients/recipients';
|
|
6
|
+
import { BFFErrorResponse } from '../smart-routing/smart-routing.mutation';
|
|
7
|
+
export declare function useCreateRecipientExport(): UseMutationResult<RecipientsExport.ExportItem, unknown>;
|
|
8
|
+
export declare function useCreateRecipient(): UseMutationResult<Recipients.RecipientDetail, AxiosError<BFFErrorResponse, any>, CreateRecipientParams, unknown>;
|
|
9
|
+
export declare function useUpdateRecipient(): UseMutationResult<Recipients.RecipientDetail, AxiosError<BFFErrorResponse, any>, UpdateRecipientParams, unknown>;
|
|
10
|
+
export declare function useDeleteRecipient(): UseMutationResult<void, AxiosError<BFFErrorResponse, any>, DeleteRecipientParams, unknown>;
|
|
11
|
+
export declare function useCreateOnboarding(): UseMutationResult<Recipients.OnboardingDetail, AxiosError<BFFErrorResponse, any>, CreateOnboardingParams, unknown>;
|
|
12
|
+
export declare function useUpdateOnboarding(): UseMutationResult<Recipients.OnboardingDetail, AxiosError<BFFErrorResponse, any>, UpdateOnboardingParams, unknown>;
|
|
13
|
+
export declare function useBlockOnboarding(): UseMutationResult<void, AxiosError<BFFErrorResponse, any>, BlockOnboardingParams, unknown>;
|
|
14
|
+
export declare function useUnblockOnboarding(): UseMutationResult<void, AxiosError<BFFErrorResponse, any>, UnblockOnboardingParams, unknown>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { AxiosError } from 'axios';
|
|
2
2
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
3
|
-
import { Recipients, GetRecipientsParams, GetRecipientByIdParams, GetOnboardingDetailParams, GetOnboardingTimelineParams } from '../../types/recipients';
|
|
3
|
+
import { Recipients, GetRecipientsParams, GetRecipientByIdParams, GetOnboardingDetailParams, GetOnboardingTimelineParams, RecipientsExport, GetRecipientExportsParams } from '../../types/recipients';
|
|
4
4
|
import { BFFErrorResponse } from '../../mutations';
|
|
5
5
|
export declare function useGetRecipients(organizationCode: string, params: GetRecipientsParams, enabled?: boolean): UseQueryResult<Recipients.RecipientListResponse, AxiosError<BFFErrorResponse>>;
|
|
6
6
|
export declare function useGetRecipientById(organizationCode: string, params: GetRecipientByIdParams, enabled?: boolean): UseQueryResult<Recipients.RecipientDetail, AxiosError<BFFErrorResponse>>;
|
|
7
7
|
export declare function useGetOnboardingDetail(organizationCode: string, params: GetOnboardingDetailParams, enabled?: boolean): UseQueryResult<Recipients.OnboardingDetail, AxiosError<BFFErrorResponse>>;
|
|
8
8
|
export declare function useGetOnboardingTimeline(organizationCode: string, params: GetOnboardingTimelineParams, enabled?: boolean): UseQueryResult<Recipients.OnboardingTimeline, AxiosError<BFFErrorResponse>>;
|
|
9
|
+
export declare function useGetRecipientExports(accountCode: string, params: GetRecipientExportsParams, enabled?: boolean): UseQueryResult<RecipientsExport.ExportListResponse, AxiosError<BFFErrorResponse>>;
|
|
10
|
+
export declare function useGetRecipientExportDownload(accountCode: string, exportCode: string, enabled?: boolean): UseQueryResult<{
|
|
11
|
+
redirect_link: string;
|
|
12
|
+
}, AxiosError<BFFErrorResponse>>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export declare namespace RecipientsExport {
|
|
2
|
+
interface ExportFilters {
|
|
3
|
+
type?: string;
|
|
4
|
+
countries?: string[];
|
|
5
|
+
entity_types?: string[];
|
|
6
|
+
sort_by?: string;
|
|
7
|
+
sort_order?: string;
|
|
8
|
+
columns?: string[];
|
|
9
|
+
}
|
|
10
|
+
interface CreateExportRequest {
|
|
11
|
+
export_name: string;
|
|
12
|
+
filters: ExportFilters;
|
|
13
|
+
}
|
|
14
|
+
interface ExportItem {
|
|
15
|
+
code: string;
|
|
16
|
+
export_name: string;
|
|
17
|
+
status: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
|
|
18
|
+
download_url: string | null;
|
|
19
|
+
error_message: string | null;
|
|
20
|
+
created_at: string;
|
|
21
|
+
}
|
|
22
|
+
interface ExportListResponse {
|
|
23
|
+
content: ExportItem[];
|
|
24
|
+
empty: boolean;
|
|
25
|
+
first: boolean;
|
|
26
|
+
last: boolean;
|
|
27
|
+
number: number;
|
|
28
|
+
number_of_elements: number;
|
|
29
|
+
size: number;
|
|
30
|
+
pageable: {
|
|
31
|
+
offset: number;
|
|
32
|
+
page_number: number;
|
|
33
|
+
page_size: number;
|
|
34
|
+
paged: boolean;
|
|
35
|
+
sort: {
|
|
36
|
+
empty: boolean;
|
|
37
|
+
sorted: boolean;
|
|
38
|
+
unsorted: boolean;
|
|
39
|
+
};
|
|
40
|
+
unpaged: boolean;
|
|
41
|
+
};
|
|
42
|
+
sort: {
|
|
43
|
+
empty: boolean;
|
|
44
|
+
sorted: boolean;
|
|
45
|
+
unsorted: boolean;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export interface GetRecipientExportsParams {
|
|
50
|
+
page?: number;
|
|
51
|
+
size?: number;
|
|
52
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export interface CreateRecipientDocument {
|
|
2
|
+
document_number: string;
|
|
3
|
+
document_type: string;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateRecipientPhone {
|
|
6
|
+
country_code: string;
|
|
7
|
+
number: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CreateRecipientAddress {
|
|
10
|
+
address_line_1?: string;
|
|
11
|
+
address_line_2?: string;
|
|
12
|
+
city?: string;
|
|
13
|
+
country?: string;
|
|
14
|
+
state?: string;
|
|
15
|
+
zip_code?: string;
|
|
16
|
+
neighborhood?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateRecipientBank {
|
|
19
|
+
code?: string;
|
|
20
|
+
branch?: string;
|
|
21
|
+
branch_digit?: string;
|
|
22
|
+
account?: string;
|
|
23
|
+
account_digit?: string;
|
|
24
|
+
account_type?: string;
|
|
25
|
+
routing?: string;
|
|
26
|
+
country?: string;
|
|
27
|
+
currency?: string;
|
|
28
|
+
payout_schedule?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface CreateRecipientWithdrawalMethod {
|
|
31
|
+
bank?: CreateRecipientBank;
|
|
32
|
+
}
|
|
33
|
+
export interface CreateRecipientDocumentation {
|
|
34
|
+
file_name: string;
|
|
35
|
+
content_type: string;
|
|
36
|
+
content_category: string;
|
|
37
|
+
content: string;
|
|
38
|
+
}
|
|
39
|
+
export interface CreateRecipientLegalRepresentative {
|
|
40
|
+
merchant_reference?: string;
|
|
41
|
+
first_name?: string;
|
|
42
|
+
last_name?: string;
|
|
43
|
+
email?: string;
|
|
44
|
+
date_of_birth?: string;
|
|
45
|
+
document?: CreateRecipientDocument;
|
|
46
|
+
phone?: CreateRecipientPhone;
|
|
47
|
+
address?: CreateRecipientAddress;
|
|
48
|
+
country?: string;
|
|
49
|
+
nationality?: string;
|
|
50
|
+
title?: string;
|
|
51
|
+
publicly_exposed_person?: boolean;
|
|
52
|
+
ultimate_beneficial_owner?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface CreateOnboardingProvider {
|
|
55
|
+
id: string;
|
|
56
|
+
connection_id: string;
|
|
57
|
+
recipient_id?: string;
|
|
58
|
+
recipient_type?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface CreateOnboardingTermsOfService {
|
|
61
|
+
acceptance: boolean;
|
|
62
|
+
date?: string;
|
|
63
|
+
ip?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface CreateOnboardingPayload {
|
|
66
|
+
account_id?: string;
|
|
67
|
+
type: string;
|
|
68
|
+
workflow: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
callback_url?: string;
|
|
71
|
+
provider: CreateOnboardingProvider;
|
|
72
|
+
documentation?: CreateRecipientDocumentation[];
|
|
73
|
+
withdrawal_methods?: CreateRecipientWithdrawalMethod[];
|
|
74
|
+
legal_representatives?: CreateRecipientLegalRepresentative[];
|
|
75
|
+
terms_of_service?: CreateOnboardingTermsOfService;
|
|
76
|
+
}
|
|
77
|
+
export interface CreateRecipientPayload {
|
|
78
|
+
account_id: string;
|
|
79
|
+
merchant_recipient_id: string;
|
|
80
|
+
national_entity: string;
|
|
81
|
+
entity_type?: string;
|
|
82
|
+
first_name: string;
|
|
83
|
+
last_name: string;
|
|
84
|
+
date_of_birth?: string;
|
|
85
|
+
legal_name?: string;
|
|
86
|
+
email?: string;
|
|
87
|
+
country: string;
|
|
88
|
+
website?: string;
|
|
89
|
+
industry?: string;
|
|
90
|
+
merchant_category_code?: string;
|
|
91
|
+
document?: CreateRecipientDocument;
|
|
92
|
+
phone?: CreateRecipientPhone;
|
|
93
|
+
address?: CreateRecipientAddress;
|
|
94
|
+
legal_representatives?: CreateRecipientLegalRepresentative[];
|
|
95
|
+
withdrawal_methods?: CreateRecipientWithdrawalMethod;
|
|
96
|
+
documentation?: CreateRecipientDocumentation[];
|
|
97
|
+
onboardings?: CreateOnboardingPayload[];
|
|
98
|
+
}
|
|
99
|
+
export type UpdateRecipientPayload = Partial<Omit<CreateRecipientPayload, 'account_id' | 'onboardings'>>;
|
|
100
|
+
export type UpdateOnboardingPayload = Partial<Omit<CreateOnboardingPayload, 'type' | 'workflow' | 'provider'>> & {
|
|
101
|
+
provider?: Partial<CreateOnboardingProvider>;
|
|
102
|
+
};
|
|
103
|
+
export interface CreateRecipientParams {
|
|
104
|
+
organizationCode: string;
|
|
105
|
+
payload: CreateRecipientPayload;
|
|
106
|
+
}
|
|
107
|
+
export interface UpdateRecipientParams {
|
|
108
|
+
organizationCode: string;
|
|
109
|
+
recipientId: string;
|
|
110
|
+
payload: UpdateRecipientPayload;
|
|
111
|
+
}
|
|
112
|
+
export interface DeleteRecipientParams {
|
|
113
|
+
organizationCode: string;
|
|
114
|
+
recipientId: string;
|
|
115
|
+
}
|
|
116
|
+
export interface CreateOnboardingParams {
|
|
117
|
+
organizationCode: string;
|
|
118
|
+
recipientId: string;
|
|
119
|
+
payload: CreateOnboardingPayload;
|
|
120
|
+
}
|
|
121
|
+
export interface UpdateOnboardingParams {
|
|
122
|
+
organizationCode: string;
|
|
123
|
+
recipientId: string;
|
|
124
|
+
onboardingId: string;
|
|
125
|
+
payload: UpdateOnboardingPayload;
|
|
126
|
+
}
|
|
127
|
+
export interface BlockOnboardingParams {
|
|
128
|
+
organizationCode: string;
|
|
129
|
+
recipientId: string;
|
|
130
|
+
onboardingId: string;
|
|
131
|
+
}
|
|
132
|
+
export interface UnblockOnboardingParams {
|
|
133
|
+
organizationCode: string;
|
|
134
|
+
recipientId: string;
|
|
135
|
+
onboardingId: string;
|
|
136
|
+
}
|
|
@@ -90,6 +90,7 @@ export declare namespace Recipients {
|
|
|
90
90
|
address: Address | null;
|
|
91
91
|
withdrawal_method: WithdrawalMethod | null;
|
|
92
92
|
documentation: Documentation[];
|
|
93
|
+
legal_representatives: LegalRepresentative[];
|
|
93
94
|
onboardings: OnboardingSummary[];
|
|
94
95
|
}
|
|
95
96
|
interface OnboardingProvider {
|
|
@@ -112,6 +113,7 @@ export declare namespace Recipients {
|
|
|
112
113
|
number: string | null;
|
|
113
114
|
}
|
|
114
115
|
interface LegalRepresentative {
|
|
116
|
+
merchant_reference: string | null;
|
|
115
117
|
first_name: string | null;
|
|
116
118
|
last_name: string | null;
|
|
117
119
|
email: string | null;
|
|
@@ -119,6 +121,11 @@ export declare namespace Recipients {
|
|
|
119
121
|
phone: Phone | null;
|
|
120
122
|
address: Address | null;
|
|
121
123
|
date_of_birth: string | null;
|
|
124
|
+
country: string | null;
|
|
125
|
+
nationality: string | null;
|
|
126
|
+
title: string | null;
|
|
127
|
+
publicly_exposed_person: boolean | null;
|
|
128
|
+
ultimate_beneficial_owner: boolean | null;
|
|
122
129
|
}
|
|
123
130
|
interface Requirement {
|
|
124
131
|
field: string | null;
|