@rabby-wallet/rabby-api 0.9.33-beta.2 → 0.9.34-alpha.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/dist/index.d.ts +11 -1
- package/dist/index.js +16 -0
- package/dist/types.d.ts +23 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AxiosAdapter, AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { RateLimitedAxiosInstance } from 'axios-rate-limit';
|
|
3
3
|
import { InitOptions, RabbyApiPlugin } from './plugins/intf';
|
|
4
|
-
import { AddrDescResponse, BridgeAggregator, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, DbkBridgeHistoryItem, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, NodeStatus, NodeStatusDetail, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SupportedChain, SwapTradeList, TokenApproval, TokenItem, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem } from './types';
|
|
4
|
+
import { AddrDescResponse, BridgeAggregator, ApprovalStatus, AssetItem, BasicDappInfo, CEXQuote, Cex, ChainListItem, ChainWithPendingCount, Collection, CollectionList, CollectionWithFloorPrice, ComplexProtocol, ContractCredit, DbkBridgeHistoryItem, ExplainTxResponse, ExplainTypedDataResponse, GasLevel, GetTxResponse, HistoryCurve, LatestExplainTxResponse, MempoolCheckDetail, NFTApprovalResponse, NFTItem, NodeStatus, NodeStatusDetail, ParseTextResponse, ParseTxResponse, ParseTypedDataResponse, PendingTxItem, Protocol, SecurityCheckResponse, ServerChain, SlippageStatus, Summary, SupportedChain, SwapTradeList, TokenApproval, TokenItem, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem, UserFeedbackItem, UserFeedbackUploadedImage } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -1249,5 +1249,15 @@ export declare class OpenApiService {
|
|
|
1249
1249
|
}>;
|
|
1250
1250
|
getHotTokenList: () => Promise<TokenDetailWithPriceCurve[]>;
|
|
1251
1251
|
getTokensDetailByUuids: (uuids: string[]) => Promise<TokenDetailWithPriceCurve[]>;
|
|
1252
|
+
postUserFeedback: (data: {
|
|
1253
|
+
title: string;
|
|
1254
|
+
image_url_list: string[];
|
|
1255
|
+
content: string;
|
|
1256
|
+
}) => Promise<UserFeedbackItem>;
|
|
1257
|
+
getUserFeedback: (id: string) => Promise<UserFeedbackItem>;
|
|
1258
|
+
uploadUserFeedbackImage: (data: {
|
|
1259
|
+
id: string;
|
|
1260
|
+
image: File;
|
|
1261
|
+
}) => Promise<UserFeedbackUploadedImage>;
|
|
1252
1262
|
}
|
|
1253
1263
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1626,6 +1626,22 @@ export class OpenApiService {
|
|
|
1626
1626
|
});
|
|
1627
1627
|
return data;
|
|
1628
1628
|
});
|
|
1629
|
+
this.postUserFeedback = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
1630
|
+
const { data: response } = yield this.request.post('/v1/feedback/app', data);
|
|
1631
|
+
return response;
|
|
1632
|
+
});
|
|
1633
|
+
this.getUserFeedback = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
1634
|
+
const { data } = yield this.request.get('/v1/feedback/app', {
|
|
1635
|
+
params: { id },
|
|
1636
|
+
});
|
|
1637
|
+
return data;
|
|
1638
|
+
});
|
|
1639
|
+
this.uploadUserFeedbackImage = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
1640
|
+
const formData = new FormData();
|
|
1641
|
+
formData.append('file', data.image);
|
|
1642
|
+
const { data: response } = yield this.request.post(`/v1/feedback/upload`, formData);
|
|
1643
|
+
return response;
|
|
1644
|
+
});
|
|
1629
1645
|
if (store instanceof Promise) {
|
|
1630
1646
|
store.then((resolvedStore) => {
|
|
1631
1647
|
this.store = resolvedStore;
|
package/dist/types.d.ts
CHANGED
|
@@ -1600,7 +1600,16 @@ export interface AppChainItem {
|
|
|
1600
1600
|
}
|
|
1601
1601
|
export interface AppChainListResponse {
|
|
1602
1602
|
apps: AppChainItem[];
|
|
1603
|
-
|
|
1603
|
+
error_apps: {
|
|
1604
|
+
create_at: number;
|
|
1605
|
+
id: string;
|
|
1606
|
+
is_support_portfolio: boolean;
|
|
1607
|
+
is_visible: boolean;
|
|
1608
|
+
logo_url: string;
|
|
1609
|
+
name: string;
|
|
1610
|
+
site_url: string;
|
|
1611
|
+
update_at: number;
|
|
1612
|
+
}[];
|
|
1604
1613
|
}
|
|
1605
1614
|
export declare type DefaultRPCRes = {
|
|
1606
1615
|
message: string;
|
|
@@ -1623,4 +1632,17 @@ export declare type GiftEligibilityItem = {
|
|
|
1623
1632
|
has_eligibility: boolean;
|
|
1624
1633
|
can_claimed_usd_value: number;
|
|
1625
1634
|
};
|
|
1635
|
+
export declare type UserFeedbackItem = {
|
|
1636
|
+
id: string;
|
|
1637
|
+
title: string;
|
|
1638
|
+
content: string;
|
|
1639
|
+
image_url_list: string[];
|
|
1640
|
+
status: 'pending' | 'reviewing' | 'closed';
|
|
1641
|
+
create_at: number;
|
|
1642
|
+
comment: string | null;
|
|
1643
|
+
comment_at: number | null;
|
|
1644
|
+
};
|
|
1645
|
+
export declare type UserFeedbackUploadedImage = {
|
|
1646
|
+
image_url: string;
|
|
1647
|
+
};
|
|
1626
1648
|
export {};
|