-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OF-253 Add project settings methods support
- Loading branch information
Showing
32 changed files
with
909 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { | ||
PaymasterDepositorCreateRequest, | ||
PaymasterDepositorResponse, | ||
PaymasterDepositorListResponse, | ||
PaymasterDepositorDeleteResponse, | ||
} from "../models"; | ||
import { BaseApiWrapper } from "./baseApiWrapper"; | ||
import { SettingsApi } from "../generated"; | ||
import { httpErrorHandler } from "../utilities/httpErrorHandler"; | ||
|
||
@httpErrorHandler | ||
export class SettingsApiWrapper extends BaseApiWrapper<SettingsApi> { | ||
constructor(accessToken: string, basePath?: string) { | ||
super(SettingsApi, accessToken, basePath); | ||
} | ||
|
||
/** | ||
* Adds a depositor address to a project environment. | ||
* @param req Parameters to add a depositor address to s project environment | ||
*/ | ||
public async addDepositorAddress(req: PaymasterDepositorCreateRequest): Promise<PaymasterDepositorResponse> { | ||
return await this.api.addDepositorAddress(req); | ||
} | ||
|
||
/** | ||
* Lists the depositor addresses of a project. | ||
*/ | ||
public async getDepositorAddresses(): Promise<PaymasterDepositorListResponse> { | ||
return await this.api.getDepositorAddresses(); | ||
} | ||
|
||
/** | ||
* Removes a depositor address from a project. | ||
* @param id Id of the depositor address to remove | ||
*/ | ||
public async removeDepositorAddress(id: string): Promise<PaymasterDepositorDeleteResponse> { | ||
return await this.api.removeDepositorAddress(id); | ||
} | ||
|
||
/** | ||
* Creates or updates webhook address in a project environment configuration. | ||
* @param url Url of the webhook | ||
*/ | ||
public async updateWebhook(url: string): Promise<void> { | ||
return await this.api.updateWebhook({url}); | ||
} | ||
|
||
/** | ||
* Removes the webhook configuration from the project environment. | ||
*/ | ||
public async removeWebhook(): Promise<void> { | ||
return await this.api.removeWebhook(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.