@yuno-payments/dashboard-api-mfe 1.5.0 → 1.6.0
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 +9 -0
- package/build/cjs/types/mutations/checkouts/checkouts.mutation.d.ts +1 -0
- package/build/cjs/types/queries/checkouts/checkouts.query.d.ts +2 -0
- package/build/cjs/types/types/checkout/checkout.d.ts +92 -58
- package/build/esm/index.js +6 -6
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/api/api.d.ts +9 -0
- package/build/esm/types/mutations/checkouts/checkouts.mutation.d.ts +1 -0
- package/build/esm/types/queries/checkouts/checkouts.query.d.ts +2 -0
- package/build/esm/types/types/checkout/checkout.d.ts +92 -58
- package/build/index.d.ts +105 -59
- package/package.json +1 -1
|
@@ -251,10 +251,19 @@ export declare class Api extends HttpClient {
|
|
|
251
251
|
}): Promise<AxiosResponse<Checkout.CheckoutList[]>>;
|
|
252
252
|
getNameAndIcon({ paymentMethodType, type, }: Checkout.GetNameAndIconArgs): Promise<AxiosResponse<Checkout.GetNameAndIconResponse>>;
|
|
253
253
|
getRequiredFields({ paymentMethodType, type, }: Checkout.GetRequiredFieldsArgs): Promise<AxiosResponse<Checkout.GetRequiredFieldsResponse>>;
|
|
254
|
+
getPaymentMethodAccounts({ paymentMethod, organizationCode, }: Checkout.GetPaymentMethodAccountsArgs): Promise<AxiosResponse<Checkout.GetPaymentMethodAccountsResponse>>;
|
|
255
|
+
/**
|
|
256
|
+
* @deprecated since v0.28.6. Use changeStylingSettings instead
|
|
257
|
+
*/
|
|
258
|
+
updateCheckoutTemplate<T>({ accountCode, template, }: {
|
|
259
|
+
accountCode: string;
|
|
260
|
+
template: Checkout.CheckoutTemplateResponse['template'];
|
|
261
|
+
}): Promise<AxiosResponse<T>>;
|
|
254
262
|
updateIsActiveCheckout(args: Checkout.UpdateIsActiveCheckoutParams): Promise<AxiosResponse>;
|
|
255
263
|
getCountryData({ accountCode, }: {
|
|
256
264
|
accountCode: string;
|
|
257
265
|
}): Promise<AxiosResponse<Checkout.GetCountryDataResponse>>;
|
|
266
|
+
publishCheckout(args: Checkout.PublishCheckoutParams): Promise<AxiosResponse>;
|
|
258
267
|
getStylingSdkDynamic({ accountCode }: {
|
|
259
268
|
accountCode: any;
|
|
260
269
|
}): Promise<AxiosResponse<Styling.Settings, any, {}>>;
|
|
@@ -2,3 +2,4 @@ import { UseMutationOptions } from '@tanstack/react-query';
|
|
|
2
2
|
import { Checkout } from '../../types';
|
|
3
3
|
import { AxiosResponse } from 'axios';
|
|
4
4
|
export declare function useUpdateIsActiveCheckout(options?: UseMutationOptions<AxiosResponse, unknown, Checkout.UpdateIsActiveCheckoutParams>): import("@tanstack/react-query").UseMutationResult<AxiosResponse<any, any, {}>, unknown, Checkout.UpdateIsActiveCheckoutParams, unknown>;
|
|
5
|
+
export declare function usePublishCheckout(options?: UseMutationOptions<AxiosResponse, unknown, Checkout.PublishCheckoutParams>): import("@tanstack/react-query").UseMutationResult<AxiosResponse<any, any, {}>, unknown, Checkout.PublishCheckoutParams, unknown>;
|
|
@@ -8,3 +8,5 @@ export declare const useGetNameAndIcon: ({ paymentMethodType, type }: Checkout.G
|
|
|
8
8
|
export declare const getQueryKeyRequiredFields: ({ paymentMethodType, type, }: Checkout.GetRequiredFieldsArgs) => string[];
|
|
9
9
|
export declare const useGetRequiredFields: ({ paymentMethodType, type }: Checkout.GetRequiredFieldsArgs, option?: UseQueryOptions<Checkout.GetRequiredFieldsResponse, unknown, Checkout.GetRequiredFieldsResponse>) => import("@tanstack/react-query").UseQueryResult<Checkout.GetRequiredFieldsResponse, unknown>;
|
|
10
10
|
export declare const useGetCountryData: (accountCode: string) => import("@tanstack/react-query").UseQueryResult<Checkout.GetCountryDataResponse, unknown>;
|
|
11
|
+
export declare const getQueryKeyPaymentMethodAccounts: ({ paymentMethod, organizationCode, }: Checkout.GetPaymentMethodAccountsArgs) => string[];
|
|
12
|
+
export declare const useGetPaymentMethodAccounts: ({ paymentMethod, organizationCode }: Checkout.GetPaymentMethodAccountsArgs, option?: UseQueryOptions<Checkout.GetPaymentMethodAccountsResponse, unknown, Checkout.GetPaymentMethodAccountsResponse>) => import("@tanstack/react-query").UseQueryResult<Checkout.GetPaymentMethodAccountsResponse, unknown>;
|
|
@@ -171,67 +171,69 @@ export declare namespace Checkout {
|
|
|
171
171
|
created_at: string;
|
|
172
172
|
updated_at: string;
|
|
173
173
|
}
|
|
174
|
+
export interface IconNameOverride {
|
|
175
|
+
is_active: boolean;
|
|
176
|
+
name: string | null;
|
|
177
|
+
icon: string | null;
|
|
178
|
+
description: string | null;
|
|
179
|
+
}
|
|
180
|
+
export interface RequiredFieldOverride {
|
|
181
|
+
current_value: string | null;
|
|
182
|
+
field_name: string;
|
|
183
|
+
is_active: boolean;
|
|
184
|
+
}
|
|
185
|
+
export interface RequiredFieldsOverride {
|
|
186
|
+
is_active: boolean | null;
|
|
187
|
+
fields: RequiredFieldOverride[];
|
|
188
|
+
enrollment_fields: RequiredFieldOverride[];
|
|
189
|
+
is_enrollment_active: boolean | null;
|
|
190
|
+
}
|
|
191
|
+
export interface ConditionEntry {
|
|
192
|
+
icon: string | null;
|
|
193
|
+
condition_type: string;
|
|
194
|
+
conditional: string;
|
|
195
|
+
values: string[];
|
|
196
|
+
id: string | null;
|
|
197
|
+
condition_set_id: string | null;
|
|
198
|
+
additional_field_name: string | null;
|
|
199
|
+
time_period_start_time: string | null;
|
|
200
|
+
metadata_key: string | null;
|
|
201
|
+
time_period_end_time: string | null;
|
|
202
|
+
time_period_repeat_amount: string | null;
|
|
203
|
+
time_period_repeat_frequency: string | null;
|
|
204
|
+
time_period_repetition_days: string | null;
|
|
205
|
+
complex_index: number | null;
|
|
206
|
+
complex_name: string | null;
|
|
207
|
+
detail: {
|
|
208
|
+
operators: string[] | null;
|
|
209
|
+
payment_method: string | null;
|
|
210
|
+
value_source: string | null;
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export interface ConditionSet {
|
|
214
|
+
name: string;
|
|
215
|
+
order: number;
|
|
216
|
+
payment_method_data: {
|
|
217
|
+
name: string | null;
|
|
218
|
+
description: string | null;
|
|
219
|
+
logo: string | null;
|
|
220
|
+
};
|
|
221
|
+
conditions: ConditionEntry[];
|
|
222
|
+
}
|
|
223
|
+
export interface BasePaymentMethodEntry {
|
|
224
|
+
is_active: boolean;
|
|
225
|
+
payment_method_type: string;
|
|
226
|
+
order_to_show: number;
|
|
227
|
+
active_enrollment_type?: string;
|
|
228
|
+
type: string;
|
|
229
|
+
icon_name_to_override?: IconNameOverride;
|
|
230
|
+
required_fields_to_override?: RequiredFieldsOverride;
|
|
231
|
+
conditions_to_override?: ConditionSet[];
|
|
232
|
+
}
|
|
174
233
|
export interface UpdateIsActiveCheckoutParams {
|
|
175
234
|
accountCode?: string;
|
|
176
235
|
checkoutCode: string;
|
|
177
|
-
paymentMethods:
|
|
178
|
-
is_active: boolean;
|
|
179
|
-
payment_method_type: string;
|
|
180
|
-
order_to_show: number;
|
|
181
|
-
active_enrollment_type?: string;
|
|
182
|
-
type: string;
|
|
183
|
-
icon_name_to_override?: {
|
|
184
|
-
is_active: boolean;
|
|
185
|
-
name: string | null;
|
|
186
|
-
icon: string | null;
|
|
187
|
-
description: string | null;
|
|
188
|
-
};
|
|
189
|
-
required_fields_to_override?: {
|
|
190
|
-
is_active: boolean | null;
|
|
191
|
-
fields: {
|
|
192
|
-
current_value: string | null;
|
|
193
|
-
field_name: string;
|
|
194
|
-
is_active: boolean;
|
|
195
|
-
}[];
|
|
196
|
-
enrollment_fields: {
|
|
197
|
-
current_value: string | null;
|
|
198
|
-
field_name: string;
|
|
199
|
-
is_active: boolean;
|
|
200
|
-
}[];
|
|
201
|
-
is_enrollment_active: boolean | null;
|
|
202
|
-
};
|
|
203
|
-
conditions_to_override?: {
|
|
204
|
-
name: string;
|
|
205
|
-
order: number;
|
|
206
|
-
payment_method_data: {
|
|
207
|
-
name: string | null;
|
|
208
|
-
description: string | null;
|
|
209
|
-
logo: string | null;
|
|
210
|
-
};
|
|
211
|
-
conditions: {
|
|
212
|
-
icon: string | null;
|
|
213
|
-
condition_type: string;
|
|
214
|
-
conditional: string;
|
|
215
|
-
values: string[];
|
|
216
|
-
id: string | null;
|
|
217
|
-
condition_set_id: string | null;
|
|
218
|
-
additional_field_name: string | null;
|
|
219
|
-
time_period_start_time: string | null;
|
|
220
|
-
metadata_key: string | null;
|
|
221
|
-
time_period_end_time: string | null;
|
|
222
|
-
time_period_repeat_amount: string | null;
|
|
223
|
-
time_period_repeat_frequency: string | null;
|
|
224
|
-
time_period_repetition_days: string | null;
|
|
225
|
-
complex_index: number | null;
|
|
226
|
-
complex_name: string | null;
|
|
227
|
-
detail: {
|
|
228
|
-
operators: string[] | null;
|
|
229
|
-
payment_method: string | null;
|
|
230
|
-
value_source: string | null;
|
|
231
|
-
};
|
|
232
|
-
}[];
|
|
233
|
-
}[];
|
|
234
|
-
}[];
|
|
236
|
+
paymentMethods: BasePaymentMethodEntry[];
|
|
235
237
|
general_settings?: GeneralSettings;
|
|
236
238
|
}
|
|
237
239
|
export interface DocumentType {
|
|
@@ -251,5 +253,37 @@ export declare namespace Checkout {
|
|
|
251
253
|
icon_url: string;
|
|
252
254
|
document_types: DocumentType[];
|
|
253
255
|
}[];
|
|
256
|
+
export type GetPaymentMethodAccountsArgs = {
|
|
257
|
+
paymentMethod: string;
|
|
258
|
+
organizationCode: string;
|
|
259
|
+
};
|
|
260
|
+
export type PaymentMethodAccountProvider = {
|
|
261
|
+
provider_id: string;
|
|
262
|
+
icon: string;
|
|
263
|
+
};
|
|
264
|
+
export type PaymentMethodAccount = {
|
|
265
|
+
id: string;
|
|
266
|
+
name: string;
|
|
267
|
+
enabled: boolean;
|
|
268
|
+
providers: PaymentMethodAccountProvider[] | null;
|
|
269
|
+
};
|
|
270
|
+
export type GetPaymentMethodAccountsResponse = {
|
|
271
|
+
accounts: PaymentMethodAccount[];
|
|
272
|
+
};
|
|
273
|
+
export interface CopyToAccount {
|
|
274
|
+
account_code: string;
|
|
275
|
+
is_active: boolean;
|
|
276
|
+
}
|
|
277
|
+
export interface PublishCheckoutParams {
|
|
278
|
+
accountCode?: string;
|
|
279
|
+
checkoutCode: string;
|
|
280
|
+
paymentMethods: (Omit<BasePaymentMethodEntry, 'conditions_to_override'> & {
|
|
281
|
+
copy_to_accounts?: CopyToAccount[];
|
|
282
|
+
conditions_to_override?: (ConditionSet & {
|
|
283
|
+
is_active?: boolean;
|
|
284
|
+
})[];
|
|
285
|
+
})[];
|
|
286
|
+
general_settings?: GeneralSettings;
|
|
287
|
+
}
|
|
254
288
|
export {};
|
|
255
289
|
}
|