Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexer codegen #663

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param language
* @param token
*/
@JsExport
@Serializable
data class AddressRegisterTokenBody(

val language: kotlin.String? = null,
val token: kotlin.String? = null
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param address
*/
@JsExport
@Serializable
data class IndexerAffiliateAddressResponse(

val address: kotlin.String? = null
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param referralCode
* @param isVolumeEligible
* @param isAffiliate
*/
@JsExport
@Serializable
data class IndexerAffiliateMetadataResponse(

val referralCode: kotlin.String? = null,
val isVolumeEligible: kotlin.Boolean? = null,
val isAffiliate: kotlin.Boolean? = null
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param affiliateList
* @param total
* @param currentOffset
*/
@JsExport
@Serializable
data class IndexerAffiliateSnapshotResponse(

val affiliateList: kotlin.Array<IndexerAffiliateSnapshotResponseObject>? = null,
val total: kotlin.Double? = null,
val currentOffset: kotlin.Double? = null
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param affiliateAddress
* @param affiliateReferralCode
* @param affiliateEarnings
* @param affiliateReferredTrades
* @param affiliateTotalReferredFees
* @param affiliateReferredUsers
* @param affiliateReferredNetProtocolEarnings
* @param affiliateReferredTotalVolume
*/
@JsExport
@Serializable
data class IndexerAffiliateSnapshotResponseObject(

val affiliateAddress: kotlin.String? = null,
val affiliateReferralCode: kotlin.String? = null,
val affiliateEarnings: kotlin.Double? = null,
val affiliateReferredTrades: kotlin.Double? = null,
val affiliateTotalReferredFees: kotlin.Double? = null,
val affiliateReferredUsers: kotlin.Double? = null,
val affiliateReferredNetProtocolEarnings: kotlin.Double? = null,
val affiliateReferredTotalVolume: kotlin.Double? = null
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param totalVolume
*/
@JsExport
@Serializable
data class IndexerAffiliateTotalVolumeResponse(

val totalVolume: kotlin.Double? = null
)
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import kotlin.js.JsExport
* @param price
* @param size
* @param fee
* @param affiliateRevShare
* @param createdAt
* @param createdAtHeight
* @param orderId
Expand All @@ -44,6 +45,7 @@ data class IndexerFillResponseObject(
val price: kotlin.String? = null,
val size: kotlin.String? = null,
val fee: kotlin.String? = null,
val affiliateRevShare: kotlin.String? = null,
val createdAt: IndexerIsoString? = null,
val createdAtHeight: kotlin.String? = null,
val orderId: kotlin.String? = null,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param megavaultPnl
*/
@JsExport
@Serializable
data class IndexerMegavaultHistoricalPnlResponse(

val megavaultPnl: kotlin.Array<IndexerPnlTicksResponseObject>? = null
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param positions
*/
@JsExport
@Serializable
data class IndexerMegavaultPositionResponse(

val positions: kotlin.Array<IndexerVaultPosition>? = null
)
26 changes: 26 additions & 0 deletions src/commonMain/kotlin/indexer/codegen/IndexerPnlTickInterval.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* Values: HOUR,DAY
*/
@JsExport
@Serializable
enum class IndexerPnlTickInterval(val value: kotlin.String) {
HOUR("hour"), // :/
DAY("day"); // :/
}
28 changes: 28 additions & 0 deletions src/commonMain/kotlin/indexer/codegen/IndexerVaultHistoricalPnl.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param ticker
* @param historicalPnl
*/
@JsExport
@Serializable
data class IndexerVaultHistoricalPnl(

val ticker: kotlin.String? = null,
val historicalPnl: kotlin.Array<IndexerPnlTicksResponseObject>? = null
)
32 changes: 32 additions & 0 deletions src/commonMain/kotlin/indexer/codegen/IndexerVaultPosition.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param ticker
* @param assetPosition
* @param perpetualPosition
* @param equity
*/
@JsExport
@Serializable
data class IndexerVaultPosition(

val ticker: kotlin.String? = null,
val assetPosition: IndexerAssetPositionResponseObject? = null,
val perpetualPosition: IndexerPerpetualPositionResponseObject? = null,
val equity: kotlin.String? = null
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* Indexer API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: v1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package indexer.codegen

import kotlinx.serialization.Serializable
import kotlin.js.JsExport

/**
*
* @param vaultsPnl
*/
@JsExport
@Serializable
data class IndexerVaultsHistoricalPnlResponse(

val vaultsPnl: kotlin.Array<IndexerVaultHistoricalPnl>? = null
)
2 changes: 2 additions & 0 deletions swagger_codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ sed -i '' 's/\ PerpetualPositionsMap/\ Map<String, IndexerPerpetualPositionRespo
# replace AssetPositionsMap with Map<String, AssetPositionResponseObject> in SubaccountResponseObject.kt
sed -i '' 's/\ AssetPositionsMap/\ Map<String, IndexerAssetPositionResponseObject>/g' generated/src/main/kotlin/indexer/codegen/SubaccountResponseObject.kt

# add import kotlinx.serialization.SerialName to the top of CandleResolution.kt
sed -i '' 's/package indexer.codegen/package indexer.codegen\n\nimport kotlinx.serialization.SerialName/' generated/src/main/kotlin/indexer/codegen/CandleResolution.kt
# add import kotlinx.serialization.Serializable to the top of CandleResolution.kt
sed -i '' 's/package indexer.codegen/package indexer.codegen\n\nimport kotlinx.serialization.Serializable/' generated/src/main/kotlin/indexer/codegen/CandleResolution.kt

Expand Down
Loading