@swp/ledger-sdk
Advanced tools
Comparing version 0.0.28 to 0.0.29
@@ -44,2 +44,7 @@ export declare enum ErrorCode { | ||
} | ||
export interface SwpSuccessResponse<T> { | ||
status: number; | ||
data: T; | ||
pagination?: Pagination; | ||
} | ||
export interface APIResponse { | ||
@@ -46,0 +51,0 @@ body: string; |
import { SwpHttp } from "./http"; | ||
import { SwpResponse } from "../common/http/dto"; | ||
import { SwpSuccessResponse } from "../common/http/dto"; | ||
import { BoletoDTO, NewBoletoDTO } from "../common/dto"; | ||
@@ -7,4 +7,4 @@ export declare class CashIn { | ||
constructor(http: SwpHttp); | ||
newBoleto(newBoleto: NewBoletoDTO): Promise<SwpResponse<BoletoDTO>>; | ||
getBoleto(id: string): Promise<SwpResponse<BoletoDTO>>; | ||
newBoleto(newBoleto: NewBoletoDTO): Promise<SwpSuccessResponse<BoletoDTO>>; | ||
getBoleto(id: string): Promise<SwpSuccessResponse<BoletoDTO>>; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { SwpResponse } from "../common/http/dto"; | ||
import { SwpSuccessResponse } from "../common/http/dto"; | ||
import { SearchOptions } from "../common/dto"; | ||
@@ -14,6 +14,6 @@ import { Options } from "./swipe"; | ||
private baseRequest; | ||
get<T>(path: string, options?: RequestOptions): Promise<SwpResponse<T>>; | ||
post<T>(path: string, options?: RequestOptions): Promise<SwpResponse<T>>; | ||
delete<T>(path: string, options?: RequestOptions): Promise<SwpResponse<T>>; | ||
get<T>(path: string, options?: RequestOptions): Promise<SwpSuccessResponse<T>>; | ||
post<T>(path: string, options?: RequestOptions): Promise<SwpSuccessResponse<T>>; | ||
delete<T>(path: string, options?: RequestOptions): Promise<SwpSuccessResponse<T>>; | ||
} | ||
export {}; |
import { SwpHttp } from "./http"; | ||
import { AccountDTO, ActionBatchDTO, AssetDTO, CredentialDTO, NewActionBatchDTO, NewWebHookDTO, SearchOptions, WebHookDTO } from "../common/dto"; | ||
import { SwpResponse } from "../common/http/dto"; | ||
import { SwpSuccessResponse } from "../common/http/dto"; | ||
export declare class Ledger { | ||
private http; | ||
constructor(http: SwpHttp); | ||
hello(): Promise<SwpResponse<string>>; | ||
getMyAccount(): Promise<SwpResponse<AccountDTO>>; | ||
getAllChildAccounts(opt?: SearchOptions): Promise<SwpResponse<AccountDTO[]>>; | ||
getChildAccount(id: string, opt?: SearchOptions): Promise<SwpResponse<AccountDTO>>; | ||
getAllAssets(opt?: SearchOptions): Promise<SwpResponse<AssetDTO[]>>; | ||
getAsset(id: string, opt?: SearchOptions): Promise<SwpResponse<AssetDTO>>; | ||
getAllActionBatches(opt?: SearchOptions): Promise<SwpResponse<ActionBatchDTO[]>>; | ||
getActionBatch(id: string, opt?: SearchOptions): Promise<SwpResponse<ActionBatchDTO>>; | ||
newActionBatch(batch: NewActionBatchDTO): Promise<SwpResponse<ActionBatchDTO>>; | ||
newWebHook(webHook: NewWebHookDTO): Promise<SwpResponse<WebHookDTO>>; | ||
reset(): Promise<SwpResponse<AccountDTO>>; | ||
createCredential(childAccountId: string): Promise<SwpResponse<CredentialDTO>>; | ||
getRevokeCredentialToken(): Promise<SwpResponse<string>>; | ||
revokeCredential(token: string): Promise<SwpResponse<undefined>>; | ||
hello(): Promise<SwpSuccessResponse<string>>; | ||
getMyAccount(): Promise<SwpSuccessResponse<AccountDTO>>; | ||
getAllChildAccounts(opt?: SearchOptions): Promise<SwpSuccessResponse<AccountDTO[]>>; | ||
getChildAccount(id: string, opt?: SearchOptions): Promise<SwpSuccessResponse<AccountDTO>>; | ||
getAllAssets(opt?: SearchOptions): Promise<SwpSuccessResponse<AssetDTO[]>>; | ||
getAsset(id: string, opt?: SearchOptions): Promise<SwpSuccessResponse<AssetDTO>>; | ||
getAllActionBatches(opt?: SearchOptions): Promise<SwpSuccessResponse<ActionBatchDTO[]>>; | ||
getActionBatch(id: string, opt?: SearchOptions): Promise<SwpSuccessResponse<ActionBatchDTO>>; | ||
newActionBatch(batch: NewActionBatchDTO): Promise<SwpSuccessResponse<ActionBatchDTO>>; | ||
newWebHook(webHook: NewWebHookDTO): Promise<SwpSuccessResponse<WebHookDTO>>; | ||
reset(): Promise<SwpSuccessResponse<AccountDTO>>; | ||
createCredential(childAccountId: string): Promise<SwpSuccessResponse<CredentialDTO>>; | ||
getRevokeCredentialToken(): Promise<SwpSuccessResponse<string>>; | ||
revokeCredential(token: string): Promise<SwpSuccessResponse<undefined>>; | ||
} |
{ | ||
"name": "@swp/ledger-sdk", | ||
"version": "0.0.28", | ||
"version": "0.0.29", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "private": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
102621
81
1579