defender-admin-client
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -9,2 +9,5 @@ import { BaseApiClient } from 'defender-base-client'; | ||
}; | ||
export interface ProposalResponseWithUrl extends ProposalResponse { | ||
url: string; | ||
} | ||
export declare class AdminClient extends BaseApiClient { | ||
@@ -14,3 +17,3 @@ protected getPoolId(): string; | ||
protected getApiUrl(): string; | ||
createProposal(proposal: CreateProposalRequest): Promise<ProposalResponse>; | ||
createProposal(proposal: CreateProposalRequest): Promise<ProposalResponseWithUrl>; | ||
proposeUpgrade(params: UpgradeParams, contract: CreateProposalRequest['contract']): Promise<ProposalResponse>; | ||
@@ -17,0 +20,0 @@ } |
@@ -5,2 +5,3 @@ "use strict"; | ||
const defender_base_client_1 = require("defender-base-client"); | ||
const utils_1 = require("./utils"); | ||
class AdminClient extends defender_base_client_1.BaseApiClient { | ||
@@ -18,3 +19,4 @@ getPoolId() { | ||
return this.apiCall(async (api) => { | ||
return (await api.post('/proposals', proposal)); | ||
const response = (await api.post('/proposals', proposal)); | ||
return { ...response, url: utils_1.getProposalUrl(response) }; | ||
}); | ||
@@ -21,0 +23,0 @@ } |
@@ -1,5 +0,4 @@ | ||
export { AdminClient } from './api'; | ||
export { AdminClient, ProposalResponseWithUrl as ProposalResponse } from './api'; | ||
export { ExternalApiCreateProposalRequest as CreateProposalRequest } from './models/proposal'; | ||
export { ExternalApiProposalResponse as ProposalResponse } from './models/response'; | ||
export declare const VERSION: any; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export declare type Network = 'mainnet' | 'ropsten' | 'rinkeby' | 'kovan' | 'goerli' | 'xdai' | 'sokol'; | ||
import { Network } from 'defender-base-client'; | ||
export declare type Address = string; | ||
@@ -3,0 +3,0 @@ export declare type ProposalType = 'upgrade' | 'custom'; |
"use strict"; | ||
// Copied from openzeppelin/defender/models/src/types/proposal-api.req.d.ts | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
{ | ||
"name": "defender-admin-client", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "", | ||
@@ -25,7 +25,7 @@ "main": "./lib/index.js", | ||
"axios": "^0.19.2", | ||
"defender-base-client": "1.3.0", | ||
"defender-base-client": "1.3.1", | ||
"lodash": "^4.17.19", | ||
"node-fetch": "^2.6.0" | ||
}, | ||
"gitHead": "0c31abf0fa6662014a75dd1b8ed4072c3f7333cf" | ||
"gitHead": "1c714c927a3dd79d822980418e2b7188bc8c58e3" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97715
18
118
+ Addeddefender-base-client@1.3.1(transitive)
- Removeddefender-base-client@1.3.0(transitive)
Updateddefender-base-client@1.3.1