@alfabit/keycloak 0.0.17 → 0.0.19
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/package.json +1 -1
- package/src/api/wallet/client.ts +38 -38
- package/src/api/wallet/endpoints/index.ts +31 -1
- package/src/api/wallet/endpoints/public/public/index.ts +1 -1
- package/src/api/wallet/endpoints/public/public/post.web-login.ts +11 -11
- package/src/api/wallet/swagger-types.ts +12450 -12450
- package/src/api/wallet/types-ext.ts +55 -55
- package/src/composables/use-keycloak.ts +11 -0
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import type { WalletsResponse } from "./swagger-types";
|
|
1
|
+
// import type { WalletsResponse } from "./swagger-types";
|
|
2
2
|
|
|
3
|
-
export interface WalletExt {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
3
|
+
// export interface WalletExt {
|
|
4
|
+
// total: string;
|
|
5
|
+
// frozen: number;
|
|
6
|
+
// broker_balance_raw: string;
|
|
7
|
+
// brokerBalanceFormatted: string;
|
|
8
|
+
// frozenFormatted: string;
|
|
9
|
+
// totalFormatted: string;
|
|
10
|
+
// rate: number;
|
|
11
|
+
// priceUsdt: number | string;
|
|
12
|
+
// is_deposit_active: boolean;
|
|
13
|
+
// is_withdraw_active: boolean;
|
|
14
|
+
// is_internal_transfer_active: boolean;
|
|
15
|
+
// is_coin_api_deposit_allowed: boolean;
|
|
16
|
+
// is_invoice_active: boolean;
|
|
17
|
+
// }
|
|
18
18
|
|
|
19
|
-
export interface IWallet extends WalletExt, WalletsResponse {}
|
|
19
|
+
// export interface IWallet extends WalletExt, WalletsResponse {}
|
|
20
20
|
|
|
21
|
-
export interface IResponseGetAssetsMetaDataPublic {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
21
|
+
// export interface IResponseGetAssetsMetaDataPublic {
|
|
22
|
+
// address: string;
|
|
23
|
+
// bchCode: string;
|
|
24
|
+
// bchFullName: string;
|
|
25
|
+
// chainIcon: string;
|
|
26
|
+
// chainId: number;
|
|
27
|
+
// changePrice24Percent: number;
|
|
28
|
+
// code: string;
|
|
29
|
+
// decimals: number;
|
|
30
|
+
// imgUrl: string;
|
|
31
|
+
// isNative: boolean;
|
|
32
|
+
// minDeposit: number;
|
|
33
|
+
// name: string;
|
|
34
|
+
// netFeeButch: number;
|
|
35
|
+
// netFeeOne: number;
|
|
36
|
+
// price: number;
|
|
37
|
+
// regexp: RegExp;
|
|
38
|
+
// symbol: string;
|
|
39
|
+
// uniqueCurrencyCode: string;
|
|
40
|
+
// uniqueCurrencyName: string;
|
|
41
|
+
// }
|
|
42
42
|
|
|
43
|
-
export interface IResponseGetProfilePublicAvailableExchangeSymbols {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
43
|
+
// export interface IResponseGetProfilePublicAvailableExchangeSymbols {
|
|
44
|
+
// mainSymbol: string;
|
|
45
|
+
// minValue: string;
|
|
46
|
+
// minorSymbol: string;
|
|
47
|
+
// price: string;
|
|
48
|
+
// priceOut: string;
|
|
49
|
+
// priceTo: string;
|
|
50
|
+
// step: string;
|
|
51
|
+
// symbol: string;
|
|
52
|
+
// limit_price_step: string;
|
|
53
|
+
// price_step: string;
|
|
54
|
+
// base_asset_precision: string;
|
|
55
|
+
// quote_asset_precision: string;
|
|
56
|
+
// min_value_minor?: string;
|
|
57
|
+
// maxValue?: string;
|
|
58
|
+
// max_value_minor?: string;
|
|
59
|
+
// }
|
|
@@ -223,6 +223,17 @@ export const getAuthMethods = () => {
|
|
|
223
223
|
console.warn('Keycloak not defined! #loginWithTelegram');
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
|
+
changePassword(redirectUri?: string) {
|
|
227
|
+
if (keycloak.value) {
|
|
228
|
+
document.cookie = 'from=passport; SameSite=None; Secure';
|
|
229
|
+
void keycloak.value.login({
|
|
230
|
+
action: 'UPDATE_PASSWORD',
|
|
231
|
+
redirectUri: redirectUri ?? getUrl(),
|
|
232
|
+
});
|
|
233
|
+
} else {
|
|
234
|
+
console.warn('Keycloak not defined! #changePassword');
|
|
235
|
+
}
|
|
236
|
+
},
|
|
226
237
|
});
|
|
227
238
|
return methods;
|
|
228
239
|
};
|