@yuno-payments/dashboard-api-mfe 0.36.42 → 0.36.45

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.
@@ -8,7 +8,7 @@ import { ChangePaymentsWebhook } from '../mutations';
8
8
  import { S3Client } from '../types/s3-client';
9
9
  import { AllowedList } from '../types/allowed-list';
10
10
  import { Cost } from '../types/connection/costs';
11
- import { Styling, StylingSettings } from '../types/checkout/styling/styling';
11
+ import { Styling, StylingSettings, UpdateStylingThemeParams } from '../types/checkout/styling/styling';
12
12
  import { FeatureFlags } from '../types/feature-flags/intex';
13
13
  import { FeatureFlagsResult } from '../queries';
14
14
  interface S3Payload {
@@ -213,7 +213,23 @@ export declare class Api extends HttpClient {
213
213
  getStylingSdkDynamic({ accountCode }: {
214
214
  accountCode: any;
215
215
  }): Promise<AxiosResponse<Styling.Settings, any>>;
216
- getStylingSettings({ accountCode, environment, }: {
216
+ /**
217
+ * @deprecated since version 0.36.27. use getStylingSettings instead
218
+ */
219
+ getStylingTheme({ accountCode }: {
220
+ accountCode: string;
221
+ }): Promise<AxiosResponse<Styling.Theme, any>>;
222
+ /**
223
+ * @deprecated since version 0.36.27. use changeStylingSettings instead
224
+ */
225
+ updateStylingTheme({ accountCode, theme }: UpdateStylingThemeParams): Promise<AxiosResponse<unknown, any>>;
226
+ /**
227
+ * @deprecated since version 0.36.27. use getStylingSettingsV2 instead
228
+ */
229
+ getStylingSettings({ accountCode }: {
230
+ accountCode: any;
231
+ }): Promise<AxiosResponse<Styling.Settings, any>>;
232
+ getStylingSettingsV2({ accountCode, environment, }: {
217
233
  accountCode: string;
218
234
  environment?: string;
219
235
  }): Promise<AxiosResponse<StylingSettings.UpdateSettingsResponse, any>>;
@@ -1 +1,2 @@
1
1
  export * from './checkouts.mutation';
2
+ export * from './styling/styling.mutation';
@@ -0,0 +1,2 @@
1
+ import { UpdateStylingThemeParams } from '../../../types/checkout/styling/styling';
2
+ export declare function useUpdateStylingTheme(): import("@tanstack/react-query").UseMutationResult<unknown, unknown, UpdateStylingThemeParams, unknown>;
@@ -2,7 +2,19 @@ import { StylingSettings } from '../../../types/checkout/styling/styling';
2
2
  export declare function useGetStylingSdkDynamic({ accountCode, }: {
3
3
  accountCode: string;
4
4
  }): import("@tanstack/react-query").UseQueryResult<import("../../../types/checkout/styling/styling").Styling.Settings, unknown>;
5
- export declare function useGetStylingSettings({ accountCode, environment, }: {
5
+ /**
6
+ * @deprecated since version 0.36.27 use useGetStylingSettingsV2 instead
7
+ */
8
+ export declare function useGetStylingTheme({ accountCode }: {
9
+ accountCode: string;
10
+ }): import("@tanstack/react-query").UseQueryResult<import("../../../types/checkout/styling/styling").Styling.Theme, unknown>;
11
+ /**
12
+ * @deprecated since version 0.36.27 use useGetStylingSettingsV2 instead
13
+ */
14
+ export declare function useGetStylingSettings({ accountCode, }: {
15
+ accountCode: string;
16
+ }): import("@tanstack/react-query").UseQueryResult<import("../../../types/checkout/styling/styling").Styling.Settings, unknown>;
17
+ export declare function useGetStylingSettingsV2({ accountCode, environment, }: {
6
18
  accountCode: string;
7
19
  environment?: string;
8
20
  }): import("@tanstack/react-query").UseQueryResult<StylingSettings.UpdateSettingsResponse, unknown>;
@@ -102,6 +102,7 @@ export declare namespace StylingSettings {
102
102
  mobile?: 'SEAMLESS' | 'FULL';
103
103
  };
104
104
  card?: {
105
+ enable_ocr?: boolean;
105
106
  save_on_success?: boolean;
106
107
  visualization_mode?: VisualizationMode;
107
108
  };
@@ -135,3 +136,73 @@ export declare enum VisualizationMode {
135
136
  ONE_STEP = "ONE_STEP",
136
137
  STEP_BY_STEP = "STEP_BY_STEP"
137
138
  }
139
+ /**
140
+ * @deprecated since version 0.36.27. Remove all the code below when new styling section is fully implemented
141
+ */
142
+ type Mode = 'default';
143
+ interface Spacing {
144
+ top: number;
145
+ right: number;
146
+ bottom: number;
147
+ left: number;
148
+ }
149
+ interface BorderRadius {
150
+ top_left: number;
151
+ top_right: number;
152
+ bottom_right: number;
153
+ bottom_left: number;
154
+ }
155
+ interface Decorator {
156
+ hover: StyleProps;
157
+ disabled: StyleProps;
158
+ focused: StyleProps;
159
+ error: StyleProps;
160
+ }
161
+ type StyleProps = {
162
+ color: string;
163
+ font_family: string;
164
+ font_size: number;
165
+ font_weight: string | number;
166
+ line_height: number;
167
+ padding: Spacing;
168
+ margin: Spacing;
169
+ background_color: string;
170
+ border_radius: BorderRadius;
171
+ decorator: Decorator;
172
+ text_align: string;
173
+ width: number;
174
+ height: number;
175
+ weight: number;
176
+ border_color: string;
177
+ border_style: string;
178
+ border_width: number;
179
+ };
180
+ type Style = {
181
+ props: StyleProps;
182
+ ref: string;
183
+ };
184
+ type Variables = {
185
+ color_primary: string;
186
+ background_color: string;
187
+ };
188
+ interface Section {
189
+ mode: Mode;
190
+ variables?: Variables;
191
+ styles: Style[];
192
+ }
193
+ interface Sections {
194
+ general: Section;
195
+ pm_list: Section;
196
+ apm: Section;
197
+ card_one_step: Section;
198
+ card_step_by_step: Section;
199
+ }
200
+ interface ThemeWithPartialSections {
201
+ account_code: string;
202
+ sections: Partial<Sections>;
203
+ }
204
+ export interface UpdateStylingThemeParams {
205
+ accountCode: string;
206
+ theme: ThemeWithPartialSections;
207
+ }
208
+ export {};