Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
voloshinskii committed May 13, 2024
1 parent 0167ceb commit c2942bf
Show file tree
Hide file tree
Showing 25 changed files with 570 additions and 91 deletions.
58 changes: 58 additions & 0 deletions packages/@core-js/src/BatteryAPI/BatteryGenerated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ export interface Balance {
units: BalanceUnitsEnum;
}

export interface RechargeMethods {
methods: {
/** @example "https://example.com/image.png" */
image?: string;
jetton_master?: string;
/** @example "10.0" */
min_bootstrap_value?: string;
type: RechargeMethodsTypeEnum;
/** @example "10.250" */
rate: string;
/** @example "usdt" */
symbol: string;
/** @example 6 */
decimals: number;
}[];
}

export interface Purchases {
/** @example 1 */
total_purchases: number;
Expand Down Expand Up @@ -82,6 +99,8 @@ export interface AndroidBatteryPurchaseStatus {
}[];
}

export type AppStoreResponse = object;

export interface IOSBatteryPurchaseStatus {
transactions: {
/** @example "1000000790000000" */
Expand Down Expand Up @@ -138,6 +157,11 @@ export enum BalanceUnitsEnum {
Ton = 'ton',
}

export enum RechargeMethodsTypeEnum {
Jetton = 'jetton',
Ton = 'ton',
}

/** @example "android" */
export enum PurchasesTypeEnum {
RegularPurchase = 'regular-purchase',
Expand Down Expand Up @@ -524,6 +548,20 @@ export class BatteryGenerated<SecurityDataType extends unknown> {
...params,
});

/**
* @description This method returns on-chain recharge methods.
*
* @name GetRechargeMethods
* @request GET:/recharge-methods
*/
getRechargeMethods = (params: RequestParams = {}) =>
this.http.request<RechargeMethods, Error>({
path: `/recharge-methods`,
method: 'GET',
format: 'json',
...params,
});

/**
* @description This method returns a list of purchases made by a specific user.
*
Expand Down Expand Up @@ -604,6 +642,26 @@ export class BatteryGenerated<SecurityDataType extends unknown> {
}),
};
ios = {
/**
* No description
*
* @name AppStoreNotification
* @request POST:/purchase-battery/ios/app-store-notification
*/
appStoreNotification: (
data: {
signedPayload: string;
},
params: RequestParams = {},
) =>
this.http.request<AppStoreResponse, Error>({
path: `/purchase-battery/ios/app-store-notification`,
method: 'POST',
body: data,
format: 'json',
...params,
}),

/**
* @description verify an in-app purchase
*
Expand Down
Loading

0 comments on commit c2942bf

Please sign in to comment.