Skip to content

Commit

Permalink
generate SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
d4mr committed Feb 10, 2025
1 parent 6b98b19 commit fa79d26
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 14 additions & 4 deletions sdk/src/services/BalanceSubscriptionsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class BalanceSubscriptionsService {
* @throws ApiError
*/
public addBalanceSubscription(
requestBody: {
requestBody?: ({
/**
* A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
*/
Expand All @@ -93,11 +93,21 @@ export class BalanceSubscriptionsService {
max?: string;
};
};
} & ({
/**
* Webhook URL
* Webhook URL to create a new webhook
*/
webhookUrl?: string;
},
webhookUrl: string;
/**
* Optional label for the webhook when creating a new one
*/
webhookLabel?: string;
} | {
/**
* ID of an existing webhook to use
*/
webhookId: number;
})),
): CancelablePromise<{
result: {
id: string;
Expand Down
4 changes: 3 additions & 1 deletion src/scripts/generate-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ export class Engine extends EngineLogic {
const ercServices: string[] = ["erc20", "erc721", "erc1155"];

for (const tag of ercServices) {
const fileName = `${tag.charAt(0).toUpperCase() + tag.slice(1)}Service.ts`;
const fileName = `${
tag.charAt(0).toUpperCase() + tag.slice(1)
}Service.ts`;
const filePath = path.join(servicesDir, fileName);
const originalCode = fs.readFileSync(filePath, "utf-8");

Expand Down

0 comments on commit fa79d26

Please sign in to comment.