@rabby-wallet/rabby-api 0.9.62 → 0.9.63-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 +5 -1
- package/dist/index.js +31 -0
- package/dist/types.d.ts +64 -0
- 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, TokenPriceListResponse, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, GasAccountBridgeSupportTokenList, GasAccountBridgeQuote, GasAccountBridgeCreateResponse, GasAccountRechargeStatus, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem, UserFeedbackItem, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse, PerpTopTokenV3, PerpTopTokenCategory, StakingFilterListParams, StakingFilterListResponse, StakingPoolCurveParams, StakingPoolCurveResponse, StakingPoolListParams, StakingPoolListResponse, StakingPoolParams, StakingPoolResponse } 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, TokenPriceListResponse, TotalBalanceResponse, Tx, TxAllHistoryResult, TxHistoryResult, TxPushType, TxRequest, UsedChain, BridgeTokenPair, BridgeQuote, BridgeHistory, ContractInfo, GasAccountCheckResult, ParseCommonResponse, WithdrawListAddressItem, BuyCountryItem, BuyQuoteItem, BuyHistoryList, BuyPaymentMethod, GasAccountInfo, GasAccountBridgeSupportTokenList, GasAccountBridgeQuote, GasAccountBridgeCreateResponse, GasAccountRechargeStatus, TokenEntityDetail, TokenItemWithEntity, ProjectItem, CopyTradeTokenListResponse, CopyTradeRecentBuyListResponse, CopyTradePnlListResponse, AppChainListResponse, CopyTradeTokenListV2Response, CopyTradeRecentBuyListV2Response, CopyTradeTokenItemV2, CopyTradeSameToken, DefaultRPCRes, TokenDetailWithPriceCurve, GiftEligibilityItem, UserFeedbackItem, GetClientFeedbackMessagesParams, GetClientFeedbackMessagesResponse, GetClientFeedbackUnreadParams, GetClientFeedbackUnreadResponse, PostClientFeedbackMessageParams, PostClientFeedbackMessageResponse, UploadClientFeedbackParams, UploadClientFeedbackResponse, PerpTopToken, KlineDataItem, TokenMarketInfo, TokenHolderInfo, TokenSupplyInfo, MarketSummary, MarketTradingHistoryItem, TokenHolderSummary, TokenHolderItem, CurrencyItem, PerpBridgeQuote, LiquidityPoolItem, LiquidityPoolHistoryItem, NFTDetail, NFTTradingConfig, PrepareAcceptNFTOfferResponse, PrepareListingNFTResponse, CreateListingNFTOfferResponse, NFTListingResponse, MemeListResponse, TokenMarketCategoryListResponse, TokenMarketTokenListResponse, PerpTopTokenV3, PerpTopTokenCategory, StakingFilterListParams, StakingFilterListResponse, StakingPoolCurveParams, StakingPoolCurveResponse, StakingPoolListParams, StakingPoolListResponse, StakingPoolParams, StakingPoolResponse } from './types';
|
|
5
5
|
interface OpenApiStore {
|
|
6
6
|
host: string;
|
|
7
7
|
testnetHost?: string;
|
|
@@ -1285,6 +1285,10 @@ export declare class OpenApiService {
|
|
|
1285
1285
|
}) => Promise<{
|
|
1286
1286
|
success: boolean;
|
|
1287
1287
|
}>;
|
|
1288
|
+
postClientFeedbackMessage: (data: PostClientFeedbackMessageParams) => Promise<PostClientFeedbackMessageResponse>;
|
|
1289
|
+
getClientFeedbackMessages: (params: GetClientFeedbackMessagesParams) => Promise<GetClientFeedbackMessagesResponse>;
|
|
1290
|
+
getClientFeedbackUnread: (params: GetClientFeedbackUnreadParams) => Promise<GetClientFeedbackUnreadResponse>;
|
|
1291
|
+
uploadClientFeedback: (params: UploadClientFeedbackParams) => Promise<UploadClientFeedbackResponse>;
|
|
1288
1292
|
/**
|
|
1289
1293
|
* @deprecated
|
|
1290
1294
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1650,6 +1650,37 @@ export class OpenApiService {
|
|
|
1650
1650
|
text,
|
|
1651
1651
|
});
|
|
1652
1652
|
});
|
|
1653
|
+
this.postClientFeedbackMessage = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
1654
|
+
const { data: response } = yield this.request.post('/v1/client_feedback/message', data);
|
|
1655
|
+
return response;
|
|
1656
|
+
});
|
|
1657
|
+
this.getClientFeedbackMessages = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1658
|
+
const { data } = yield this.request.get('/v1/client_feedback/messages', {
|
|
1659
|
+
params,
|
|
1660
|
+
});
|
|
1661
|
+
return data;
|
|
1662
|
+
});
|
|
1663
|
+
this.getClientFeedbackUnread = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1664
|
+
const { data } = yield this.request.get('/v1/client_feedback/unread', {
|
|
1665
|
+
params,
|
|
1666
|
+
});
|
|
1667
|
+
return data;
|
|
1668
|
+
});
|
|
1669
|
+
this.uploadClientFeedback = (params) => __awaiter(this, void 0, void 0, function* () {
|
|
1670
|
+
const isFormData = typeof FormData !== 'undefined' && params instanceof FormData;
|
|
1671
|
+
const formData = isFormData ? params : new FormData();
|
|
1672
|
+
if (!isFormData) {
|
|
1673
|
+
const { file, filename } = params;
|
|
1674
|
+
if (filename) {
|
|
1675
|
+
formData.append('file', file, filename);
|
|
1676
|
+
}
|
|
1677
|
+
else {
|
|
1678
|
+
formData.append('file', file);
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
const { data } = yield this.request.post('/v1/client_feedback/upload', formData);
|
|
1682
|
+
return data;
|
|
1683
|
+
});
|
|
1653
1684
|
/**
|
|
1654
1685
|
* @deprecated
|
|
1655
1686
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -1740,6 +1740,70 @@ export declare type UserFeedbackItem = {
|
|
|
1740
1740
|
comment_at: number | null;
|
|
1741
1741
|
extra?: any | null;
|
|
1742
1742
|
};
|
|
1743
|
+
export declare type ClientFeedbackSource = 'app-ios' | 'app-android' | 'app' | 'extension' | 'desktop' | '';
|
|
1744
|
+
export declare type ClientFeedbackStatus = 'pending' | 'replied' | 'closed';
|
|
1745
|
+
export declare type ClientFeedbackSender = 'user' | 'ops';
|
|
1746
|
+
export declare type ClientFeedbackExtra = Record<string, any>;
|
|
1747
|
+
export interface ClientFeedbackConversation {
|
|
1748
|
+
id: string;
|
|
1749
|
+
source: ClientFeedbackSource;
|
|
1750
|
+
status: ClientFeedbackStatus;
|
|
1751
|
+
last_message_at: number;
|
|
1752
|
+
client_read_at: number | null;
|
|
1753
|
+
comment_user_id: number | null;
|
|
1754
|
+
create_at: number;
|
|
1755
|
+
extra: ClientFeedbackExtra;
|
|
1756
|
+
}
|
|
1757
|
+
export interface ClientFeedbackMessage {
|
|
1758
|
+
id: string;
|
|
1759
|
+
conversation_id: string;
|
|
1760
|
+
sender: ClientFeedbackSender;
|
|
1761
|
+
ops_user_id: number | null;
|
|
1762
|
+
content: string;
|
|
1763
|
+
image_url_list: string[];
|
|
1764
|
+
video_url_list: string[];
|
|
1765
|
+
source: ClientFeedbackSource;
|
|
1766
|
+
create_at: number;
|
|
1767
|
+
}
|
|
1768
|
+
export interface PostClientFeedbackMessageParams {
|
|
1769
|
+
device_id: string;
|
|
1770
|
+
content?: string;
|
|
1771
|
+
image_url_list?: string[];
|
|
1772
|
+
video_url_list?: string[];
|
|
1773
|
+
extra?: ClientFeedbackExtra;
|
|
1774
|
+
}
|
|
1775
|
+
export interface PostClientFeedbackMessageResponse {
|
|
1776
|
+
conversation: ClientFeedbackConversation;
|
|
1777
|
+
message: ClientFeedbackMessage;
|
|
1778
|
+
}
|
|
1779
|
+
export interface GetClientFeedbackMessagesParams {
|
|
1780
|
+
device_id: string;
|
|
1781
|
+
start?: number;
|
|
1782
|
+
limit?: number;
|
|
1783
|
+
}
|
|
1784
|
+
export interface GetClientFeedbackMessagesResponse {
|
|
1785
|
+
conversation: ClientFeedbackConversation | null;
|
|
1786
|
+
messages: ClientFeedbackMessage[];
|
|
1787
|
+
total_count: number;
|
|
1788
|
+
}
|
|
1789
|
+
export interface GetClientFeedbackUnreadParams {
|
|
1790
|
+
device_id: string;
|
|
1791
|
+
}
|
|
1792
|
+
export interface GetClientFeedbackUnreadResponse {
|
|
1793
|
+
unread_count: number;
|
|
1794
|
+
status: ClientFeedbackStatus | null;
|
|
1795
|
+
}
|
|
1796
|
+
export declare type UploadClientFeedbackParams = FormData | {
|
|
1797
|
+
file: Blob;
|
|
1798
|
+
filename?: string;
|
|
1799
|
+
};
|
|
1800
|
+
export declare type UploadClientFeedbackResponse = {
|
|
1801
|
+
image_url: string;
|
|
1802
|
+
video_url?: never;
|
|
1803
|
+
} | {
|
|
1804
|
+
image_url?: never;
|
|
1805
|
+
video_url: string;
|
|
1806
|
+
};
|
|
1743
1807
|
export declare type CurrencyItem = {
|
|
1744
1808
|
symbol: string;
|
|
1745
1809
|
code: string;
|