syntax = "v1"

info (
	title:   "IAP API"
	desc:    "API for ppanel"
	author:  "Tension"
	email:   "tension@ppanel.com"
	version: "0.0.1"
)

import "../types.api"

@server (
	prefix:     v1/public/iap/apple
	group:      public/iap/apple
	middleware: AuthMiddleware,DeviceMiddleware
)
service ppanel {
	@doc "Attach Apple Transaction"
	@handler AttachAppleTransaction
	post /transactions/attach (AttachAppleTransactionRequest) returns (AttachAppleTransactionResponse)

	@doc "Attach Apple Transaction By Id"
	@handler AttachAppleTransactionById
	post /transactions/attach/id (AttachAppleTransactionByIdRequest) returns (AttachAppleTransactionResponse)

	@doc "Restore Apple Transactions"
	@handler RestoreAppleTransactions
	post /transactions/restore (RestoreAppleTransactionsRequest)

	@doc "Get Apple IAP Status"
	@handler GetAppleStatus
	get /status returns (GetAppleStatusResponse)
}
