Skip to content

Commit

Permalink
Fix delegations auto-generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Oct 23, 2024
1 parent 62a4331 commit 28508bc
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 138 deletions.
137 changes: 68 additions & 69 deletions src/vendors/oasisscan-v2/models/AccountDebondingResponse.ts
Original file line number Diff line number Diff line change
@@ -1,96 +1,95 @@
/* tslint:disable */
/* eslint-disable */
/**
*
*
* This api document example is the Mainnet document, and the Testnet base URL is api.oasisscan.com/v2/testnet
*
* The version of the OpenAPI document:
*
* The version of the OpenAPI document:
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { exists, mapValues } from '../runtime';
import { exists, mapValues } from '../runtime'
import {
AccountDebondingInfo,
AccountDebondingInfoFromJSON,
AccountDebondingInfoFromJSONTyped,
AccountDebondingInfoToJSON,
} from './';
AccountDebondingInfo,
AccountDebondingInfoFromJSON,
AccountDebondingInfoFromJSONTyped,
AccountDebondingInfoToJSON,
} from './'

/**
*
*
* @export
* @interface AccountDebondingResponse
*/
export interface AccountDebondingResponse {
/**
*
* @type {Array<AccountDebondingInfo>}
* @memberof AccountDebondingResponse
*/
list: Array<AccountDebondingInfo>;
/**
*
* @type {number}
* @memberof AccountDebondingResponse
*/
page?: number;
/**
*
* @type {number}
* @memberof AccountDebondingResponse
*/
size?: number;
/**
*
* @type {number}
* @memberof AccountDebondingResponse
*/
maxPage?: number;
/**
*
* @type {number}
* @memberof AccountDebondingResponse
*/
totalSize?: number;
/**
*
* @type {Array<AccountDebondingInfo>}
* @memberof AccountDebondingResponse
*/
list: Array<AccountDebondingInfo>
/**
*
* @type {number}
* @memberof AccountDebondingResponse
*/
page?: number
/**
*
* @type {number}
* @memberof AccountDebondingResponse
*/
size?: number
/**
*
* @type {number}
* @memberof AccountDebondingResponse
*/
maxPage?: number
/**
*
* @type {number}
* @memberof AccountDebondingResponse
*/
totalSize?: number
}

export function AccountDebondingResponseFromJSON(json: any): AccountDebondingResponse {
return AccountDebondingResponseFromJSONTyped(json, false);
return AccountDebondingResponseFromJSONTyped(json.data, false)
}

export function AccountDebondingResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountDebondingResponse {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'list': ((json['list'] as Array<any>).map(AccountDebondingInfoFromJSON)),
'page': !exists(json, 'page') ? undefined : json['page'],
'size': !exists(json, 'size') ? undefined : json['size'],
'maxPage': !exists(json, 'maxPage') ? undefined : json['maxPage'],
'totalSize': !exists(json, 'totalSize') ? undefined : json['totalSize'],
};
export function AccountDebondingResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): AccountDebondingResponse {
if (json === undefined || json === null) {
return json
}
return {
list: (json['list'] as Array<any>).map(AccountDebondingInfoFromJSON),
page: !exists(json, 'page') ? undefined : json['page'],
size: !exists(json, 'size') ? undefined : json['size'],
maxPage: !exists(json, 'maxPage') ? undefined : json['maxPage'],
totalSize: !exists(json, 'totalSize') ? undefined : json['totalSize'],
}
}

export function AccountDebondingResponseToJSON(value?: AccountDebondingResponse | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'list': ((value.list as Array<any>).map(AccountDebondingInfoToJSON)),
'page': value.page,
'size': value.size,
'maxPage': value.maxPage,
'totalSize': value.totalSize,
};
if (value === undefined) {
return undefined
}
if (value === null) {
return null
}
return {
list: (value.list as Array<any>).map(AccountDebondingInfoToJSON),
page: value.page,
size: value.size,
maxPage: value.maxPage,
totalSize: value.totalSize,
}
}


137 changes: 68 additions & 69 deletions src/vendors/oasisscan-v2/models/AccountDelegationsResponse.ts
Original file line number Diff line number Diff line change
@@ -1,96 +1,95 @@
/* tslint:disable */
/* eslint-disable */
/**
*
*
* This api document example is the Mainnet document, and the Testnet base URL is api.oasisscan.com/v2/testnet
*
* The version of the OpenAPI document:
*
* The version of the OpenAPI document:
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { exists, mapValues } from '../runtime';
import { exists, mapValues } from '../runtime'
import {
AccountDelegationsInfo,
AccountDelegationsInfoFromJSON,
AccountDelegationsInfoFromJSONTyped,
AccountDelegationsInfoToJSON,
} from './';
AccountDelegationsInfo,
AccountDelegationsInfoFromJSON,
AccountDelegationsInfoFromJSONTyped,
AccountDelegationsInfoToJSON,
} from './'

/**
*
*
* @export
* @interface AccountDelegationsResponse
*/
export interface AccountDelegationsResponse {
/**
*
* @type {Array<AccountDelegationsInfo>}
* @memberof AccountDelegationsResponse
*/
list: Array<AccountDelegationsInfo>;
/**
*
* @type {number}
* @memberof AccountDelegationsResponse
*/
page?: number;
/**
*
* @type {number}
* @memberof AccountDelegationsResponse
*/
size?: number;
/**
*
* @type {number}
* @memberof AccountDelegationsResponse
*/
maxPage?: number;
/**
*
* @type {number}
* @memberof AccountDelegationsResponse
*/
totalSize?: number;
/**
*
* @type {Array<AccountDelegationsInfo>}
* @memberof AccountDelegationsResponse
*/
list: Array<AccountDelegationsInfo>
/**
*
* @type {number}
* @memberof AccountDelegationsResponse
*/
page?: number
/**
*
* @type {number}
* @memberof AccountDelegationsResponse
*/
size?: number
/**
*
* @type {number}
* @memberof AccountDelegationsResponse
*/
maxPage?: number
/**
*
* @type {number}
* @memberof AccountDelegationsResponse
*/
totalSize?: number
}

export function AccountDelegationsResponseFromJSON(json: any): AccountDelegationsResponse {
return AccountDelegationsResponseFromJSONTyped(json, false);
return AccountDelegationsResponseFromJSONTyped(json.data, false)
}

export function AccountDelegationsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountDelegationsResponse {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'list': ((json['list'] as Array<any>).map(AccountDelegationsInfoFromJSON)),
'page': !exists(json, 'page') ? undefined : json['page'],
'size': !exists(json, 'size') ? undefined : json['size'],
'maxPage': !exists(json, 'maxPage') ? undefined : json['maxPage'],
'totalSize': !exists(json, 'totalSize') ? undefined : json['totalSize'],
};
export function AccountDelegationsResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): AccountDelegationsResponse {
if (json === undefined || json === null) {
return json
}
return {
list: (json['list'] as Array<any>).map(AccountDelegationsInfoFromJSON),
page: !exists(json, 'page') ? undefined : json['page'],
size: !exists(json, 'size') ? undefined : json['size'],
maxPage: !exists(json, 'maxPage') ? undefined : json['maxPage'],
totalSize: !exists(json, 'totalSize') ? undefined : json['totalSize'],
}
}

export function AccountDelegationsResponseToJSON(value?: AccountDelegationsResponse | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'list': ((value.list as Array<any>).map(AccountDelegationsInfoToJSON)),
'page': value.page,
'size': value.size,
'maxPage': value.maxPage,
'totalSize': value.totalSize,
};
if (value === undefined) {
return undefined
}
if (value === null) {
return null
}
return {
list: (value.list as Array<any>).map(AccountDelegationsInfoToJSON),
page: value.page,
size: value.size,
maxPage: value.maxPage,
totalSize: value.totalSize,
}
}


0 comments on commit 28508bc

Please sign in to comment.