Spaces:
Sleeping
Sleeping
Commit ·
56e28b7
1
Parent(s): 40f1c60
Deploy files from GitHub repository
Browse files- controllers/event_controller.go +17 -10
- models/dto/payment_dto.go +20 -0
- swagger/docs/docs.go +331 -54
- swagger/docs/swagger.json +331 -54
- swagger/docs/swagger.yaml +196 -13
controllers/event_controller.go
CHANGED
|
@@ -4,6 +4,7 @@ import (
|
|
| 4 |
"errors"
|
| 5 |
"net/http"
|
| 6 |
"strconv"
|
|
|
|
| 7 |
|
| 8 |
"abdanhafidz.com/go-boilerplate/models/dto"
|
| 9 |
entity "abdanhafidz.com/go-boilerplate/models/entity"
|
|
@@ -126,7 +127,7 @@ func (c *eventController) DetailBySlug(ctx *gin.Context) {
|
|
| 126 |
// @Param request body dto.JoinEventRequest true "Join Event Request"
|
| 127 |
// @Success 200 {object} dto.SuccessResponse[dto.EventDetailResponse]
|
| 128 |
// @Failure 400 {object} dto.ErrorResponse
|
| 129 |
-
// @Failure 402 {object} dto.
|
| 130 |
// @Security BearerAuth
|
| 131 |
// @Router /api/v1/events/register-event [post]
|
| 132 |
func (c *eventController) Join(ctx *gin.Context) {
|
|
@@ -141,16 +142,22 @@ func (c *eventController) Join(ctx *gin.Context) {
|
|
| 141 |
res, err := c.eventService.JoinByCode(ctx.Request.Context(), accountId, req.EventCode)
|
| 142 |
|
| 143 |
if errors.Is(err, http_error.PAYMENT_REQUIRED) {
|
| 144 |
-
ctx.JSON(http.StatusPaymentRequired, dto.
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
|
|
|
|
|
|
|
|
|
| 153 |
},
|
|
|
|
|
|
|
|
|
|
| 154 |
})
|
| 155 |
return
|
| 156 |
}
|
|
|
|
| 4 |
"errors"
|
| 5 |
"net/http"
|
| 6 |
"strconv"
|
| 7 |
+
"time"
|
| 8 |
|
| 9 |
"abdanhafidz.com/go-boilerplate/models/dto"
|
| 10 |
entity "abdanhafidz.com/go-boilerplate/models/entity"
|
|
|
|
| 127 |
// @Param request body dto.JoinEventRequest true "Join Event Request"
|
| 128 |
// @Success 200 {object} dto.SuccessResponse[dto.EventDetailResponse]
|
| 129 |
// @Failure 400 {object} dto.ErrorResponse
|
| 130 |
+
// @Failure 402 {object} dto.RegisterEventPaymentActionRequiredResponse
|
| 131 |
// @Security BearerAuth
|
| 132 |
// @Router /api/v1/events/register-event [post]
|
| 133 |
func (c *eventController) Join(ctx *gin.Context) {
|
|
|
|
| 142 |
res, err := c.eventService.JoinByCode(ctx.Request.Context(), accountId, req.EventCode)
|
| 143 |
|
| 144 |
if errors.Is(err, http_error.PAYMENT_REQUIRED) {
|
| 145 |
+
ctx.JSON(http.StatusPaymentRequired, dto.RegisterEventPaymentActionRequiredResponse{
|
| 146 |
+
Data: dto.RegisterEventPaymentActionRequiredData{
|
| 147 |
+
AccountID: res.EventPayment.AccountId.String(),
|
| 148 |
+
Amount: res.EventPayment.Amount,
|
| 149 |
+
EventID: res.EventPayment.EventId.String(),
|
| 150 |
+
ExpiredAt: res.EventPayment.ExpiredAt.Format(time.RFC3339),
|
| 151 |
+
ID: res.EventPayment.Id.String(),
|
| 152 |
+
InvoiceID: res.EventPayment.InvoiceId,
|
| 153 |
+
InvoiceURL: res.EventPayment.InvoiceUrl,
|
| 154 |
+
Status: res.EventPayment.Status,
|
| 155 |
+
TransactionAt: res.EventPayment.TransactionAt.Format(time.RFC3339),
|
| 156 |
+
MayarTransactionID: res.EventPayment.ExternalId,
|
| 157 |
},
|
| 158 |
+
Message: http_error.PAYMENT_REQUIRED.Error(),
|
| 159 |
+
MetaData: req.EventCode,
|
| 160 |
+
Status: "action_required",
|
| 161 |
})
|
| 162 |
return
|
| 163 |
}
|
models/dto/payment_dto.go
CHANGED
|
@@ -16,3 +16,23 @@ type PaymentCallbackResponse struct {
|
|
| 16 |
Amount float64 `json:"amount"`
|
| 17 |
Timestamp time.Time `json:"timestamp"`
|
| 18 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
Amount float64 `json:"amount"`
|
| 17 |
Timestamp time.Time `json:"timestamp"`
|
| 18 |
}
|
| 19 |
+
|
| 20 |
+
type RegisterEventPaymentActionRequiredData struct {
|
| 21 |
+
AccountID string `json:"account_id"`
|
| 22 |
+
Amount float64 `json:"amount"`
|
| 23 |
+
EventID string `json:"event_id"`
|
| 24 |
+
ExpiredAt string `json:"expired_at"`
|
| 25 |
+
ID string `json:"id"`
|
| 26 |
+
InvoiceID string `json:"invoice_id"`
|
| 27 |
+
InvoiceURL string `json:"invoice_url"`
|
| 28 |
+
Status string `json:"status"`
|
| 29 |
+
TransactionAt string `json:"transaction_at"`
|
| 30 |
+
MayarTransactionID string `json:"mayar_transaction_id"`
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
type RegisterEventPaymentActionRequiredResponse struct {
|
| 34 |
+
Data RegisterEventPaymentActionRequiredData `json:"data"`
|
| 35 |
+
Message string `json:"message"`
|
| 36 |
+
MetaData string `json:"meta_data"`
|
| 37 |
+
Status string `json:"status"`
|
| 38 |
+
}
|
swagger/docs/docs.go
CHANGED
|
@@ -3729,6 +3729,84 @@ const docTemplate = `{
|
|
| 3729 |
}
|
| 3730 |
}
|
| 3731 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3732 |
"/api/v1/events/register-event": {
|
| 3733 |
"post": {
|
| 3734 |
"security": [
|
|
@@ -3774,7 +3852,7 @@ const docTemplate = `{
|
|
| 3774 |
"402": {
|
| 3775 |
"description": "Payment Required",
|
| 3776 |
"schema": {
|
| 3777 |
-
"$ref": "#/definitions/dto.
|
| 3778 |
}
|
| 3779 |
}
|
| 3780 |
}
|
|
@@ -3955,67 +4033,76 @@ const docTemplate = `{
|
|
| 3955 |
}
|
| 3956 |
}
|
| 3957 |
},
|
| 3958 |
-
"/api/v1/events/{event_slug}/
|
| 3959 |
-
"
|
| 3960 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3961 |
"consumes": [
|
| 3962 |
-
"
|
| 3963 |
],
|
| 3964 |
"produces": [
|
| 3965 |
"application/json"
|
| 3966 |
],
|
| 3967 |
"tags": [
|
| 3968 |
-
"
|
| 3969 |
],
|
| 3970 |
-
"summary": "
|
| 3971 |
"parameters": [
|
| 3972 |
{
|
| 3973 |
"type": "string",
|
| 3974 |
-
"description": "Event
|
| 3975 |
-
"name": "
|
| 3976 |
-
"in": "
|
| 3977 |
"required": true
|
| 3978 |
},
|
| 3979 |
{
|
| 3980 |
-
"type": "
|
| 3981 |
-
"
|
| 3982 |
-
"
|
| 3983 |
-
"
|
| 3984 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3985 |
},
|
| 3986 |
{
|
| 3987 |
"type": "string",
|
| 3988 |
-
"description": "
|
| 3989 |
-
"name": "
|
| 3990 |
-
"in": "
|
| 3991 |
-
"required": true
|
| 3992 |
},
|
| 3993 |
{
|
| 3994 |
-
"type": "
|
| 3995 |
-
"description": "
|
| 3996 |
-
"name": "
|
| 3997 |
-
"in": "
|
| 3998 |
-
"required": true
|
| 3999 |
},
|
| 4000 |
{
|
| 4001 |
"type": "string",
|
| 4002 |
-
"description": "
|
| 4003 |
-
"name": "
|
| 4004 |
-
"in": "
|
| 4005 |
-
"required": true
|
| 4006 |
},
|
| 4007 |
{
|
| 4008 |
-
"type": "
|
| 4009 |
-
"description": "
|
| 4010 |
-
"name": "
|
| 4011 |
-
"in": "
|
| 4012 |
}
|
| 4013 |
],
|
| 4014 |
"responses": {
|
| 4015 |
"200": {
|
| 4016 |
"description": "OK",
|
| 4017 |
"schema": {
|
| 4018 |
-
"$ref": "#/definitions/dto.SuccessResponse-
|
| 4019 |
}
|
| 4020 |
},
|
| 4021 |
"400": {
|
|
@@ -4023,12 +4110,6 @@ const docTemplate = `{
|
|
| 4023 |
"schema": {
|
| 4024 |
"$ref": "#/definitions/dto.ErrorResponse"
|
| 4025 |
}
|
| 4026 |
-
},
|
| 4027 |
-
"500": {
|
| 4028 |
-
"description": "Internal Server Error",
|
| 4029 |
-
"schema": {
|
| 4030 |
-
"$ref": "#/definitions/dto.ErrorResponse"
|
| 4031 |
-
}
|
| 4032 |
}
|
| 4033 |
}
|
| 4034 |
}
|
|
@@ -4080,6 +4161,12 @@ const docTemplate = `{
|
|
| 4080 |
"name": "page",
|
| 4081 |
"in": "query"
|
| 4082 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4083 |
{
|
| 4084 |
"type": "string",
|
| 4085 |
"description": "Sort field: 'score' (default) or 'duration'",
|
|
@@ -4089,6 +4176,12 @@ const docTemplate = `{
|
|
| 4089 |
{
|
| 4090 |
"type": "string",
|
| 4091 |
"description": "Sort order: 'asc' or 'desc'",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4092 |
"name": "order",
|
| 4093 |
"in": "query"
|
| 4094 |
}
|
|
@@ -4462,6 +4555,52 @@ const docTemplate = `{
|
|
| 4462 |
}
|
| 4463 |
}
|
| 4464 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4465 |
"/api/v1/super-admin/users": {
|
| 4466 |
"get": {
|
| 4467 |
"security": [
|
|
@@ -5104,6 +5243,9 @@ const docTemplate = `{
|
|
| 5104 |
"is_public": {
|
| 5105 |
"type": "boolean"
|
| 5106 |
},
|
|
|
|
|
|
|
|
|
|
| 5107 |
"slug": {
|
| 5108 |
"type": "string"
|
| 5109 |
},
|
|
@@ -5145,7 +5287,6 @@ const docTemplate = `{
|
|
| 5145 |
"type": "object",
|
| 5146 |
"required": [
|
| 5147 |
"end_event",
|
| 5148 |
-
"event_code",
|
| 5149 |
"img_banner",
|
| 5150 |
"overview",
|
| 5151 |
"start_event",
|
|
@@ -5167,6 +5308,9 @@ const docTemplate = `{
|
|
| 5167 |
"overview": {
|
| 5168 |
"type": "string"
|
| 5169 |
},
|
|
|
|
|
|
|
|
|
|
| 5170 |
"start_event": {
|
| 5171 |
"type": "string"
|
| 5172 |
},
|
|
@@ -5287,7 +5431,9 @@ const docTemplate = `{
|
|
| 5287 |
"dto.ErrorResponse": {
|
| 5288 |
"type": "object",
|
| 5289 |
"properties": {
|
| 5290 |
-
"errors": {
|
|
|
|
|
|
|
| 5291 |
"message": {},
|
| 5292 |
"meta_data": {},
|
| 5293 |
"status": {
|
|
@@ -5309,6 +5455,20 @@ const docTemplate = `{
|
|
| 5309 |
}
|
| 5310 |
}
|
| 5311 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5312 |
"dto.ExamScoreboardItem": {
|
| 5313 |
"type": "object",
|
| 5314 |
"properties": {
|
|
@@ -5505,6 +5665,101 @@ const docTemplate = `{
|
|
| 5505 |
}
|
| 5506 |
}
|
| 5507 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5508 |
"dto.ResetPasswordRequest": {
|
| 5509 |
"type": "object",
|
| 5510 |
"required": [
|
|
@@ -5600,6 +5855,22 @@ const docTemplate = `{
|
|
| 5600 |
}
|
| 5601 |
}
|
| 5602 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5603 |
"dto.SuccessResponse-array_dto_ExamScoreboardItem": {
|
| 5604 |
"type": "object",
|
| 5605 |
"properties": {
|
|
@@ -5931,6 +6202,19 @@ const docTemplate = `{
|
|
| 5931 |
}
|
| 5932 |
}
|
| 5933 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5934 |
"dto.SuccessResponse-dto_UserResponse": {
|
| 5935 |
"type": "object",
|
| 5936 |
"properties": {
|
|
@@ -6100,19 +6384,6 @@ const docTemplate = `{
|
|
| 6100 |
}
|
| 6101 |
}
|
| 6102 |
},
|
| 6103 |
-
"dto.SuccessResponse-models_EventPaymentTransaction": {
|
| 6104 |
-
"type": "object",
|
| 6105 |
-
"properties": {
|
| 6106 |
-
"data": {
|
| 6107 |
-
"$ref": "#/definitions/models.EventPaymentTransaction"
|
| 6108 |
-
},
|
| 6109 |
-
"message": {},
|
| 6110 |
-
"meta_data": {},
|
| 6111 |
-
"status": {
|
| 6112 |
-
"type": "string"
|
| 6113 |
-
}
|
| 6114 |
-
}
|
| 6115 |
-
},
|
| 6116 |
"dto.SuccessResponse-models_Events": {
|
| 6117 |
"type": "object",
|
| 6118 |
"properties": {
|
|
@@ -6190,6 +6461,9 @@ const docTemplate = `{
|
|
| 6190 |
"is_public": {
|
| 6191 |
"type": "boolean"
|
| 6192 |
},
|
|
|
|
|
|
|
|
|
|
| 6193 |
"slug": {
|
| 6194 |
"type": "string"
|
| 6195 |
},
|
|
@@ -6247,6 +6521,9 @@ const docTemplate = `{
|
|
| 6247 |
"overview": {
|
| 6248 |
"type": "string"
|
| 6249 |
},
|
|
|
|
|
|
|
|
|
|
| 6250 |
"start_event": {
|
| 6251 |
"type": "string"
|
| 6252 |
},
|
|
|
|
| 3729 |
}
|
| 3730 |
}
|
| 3731 |
},
|
| 3732 |
+
"/api/v1/events/logs/{event_slug}/exam/{exam_slug}/proctoring": {
|
| 3733 |
+
"post": {
|
| 3734 |
+
"description": "Create a new proctoring log entry with optional file attachment",
|
| 3735 |
+
"consumes": [
|
| 3736 |
+
"multipart/form-data"
|
| 3737 |
+
],
|
| 3738 |
+
"produces": [
|
| 3739 |
+
"application/json"
|
| 3740 |
+
],
|
| 3741 |
+
"tags": [
|
| 3742 |
+
"Event Exam Proctoring"
|
| 3743 |
+
],
|
| 3744 |
+
"summary": "Create Proctoring Log",
|
| 3745 |
+
"parameters": [
|
| 3746 |
+
{
|
| 3747 |
+
"type": "string",
|
| 3748 |
+
"description": "Event ID",
|
| 3749 |
+
"name": "id_event",
|
| 3750 |
+
"in": "formData",
|
| 3751 |
+
"required": true
|
| 3752 |
+
},
|
| 3753 |
+
{
|
| 3754 |
+
"type": "string",
|
| 3755 |
+
"description": "Exam ID",
|
| 3756 |
+
"name": "id_exam",
|
| 3757 |
+
"in": "formData",
|
| 3758 |
+
"required": true
|
| 3759 |
+
},
|
| 3760 |
+
{
|
| 3761 |
+
"type": "string",
|
| 3762 |
+
"description": "Account ID",
|
| 3763 |
+
"name": "id_account",
|
| 3764 |
+
"in": "formData",
|
| 3765 |
+
"required": true
|
| 3766 |
+
},
|
| 3767 |
+
{
|
| 3768 |
+
"type": "integer",
|
| 3769 |
+
"description": "Violation Score",
|
| 3770 |
+
"name": "violation_score",
|
| 3771 |
+
"in": "formData",
|
| 3772 |
+
"required": true
|
| 3773 |
+
},
|
| 3774 |
+
{
|
| 3775 |
+
"type": "string",
|
| 3776 |
+
"description": "Violation Category",
|
| 3777 |
+
"name": "violation_category",
|
| 3778 |
+
"in": "formData",
|
| 3779 |
+
"required": true
|
| 3780 |
+
},
|
| 3781 |
+
{
|
| 3782 |
+
"type": "file",
|
| 3783 |
+
"description": "Attachment File",
|
| 3784 |
+
"name": "file",
|
| 3785 |
+
"in": "formData"
|
| 3786 |
+
}
|
| 3787 |
+
],
|
| 3788 |
+
"responses": {
|
| 3789 |
+
"200": {
|
| 3790 |
+
"description": "OK",
|
| 3791 |
+
"schema": {
|
| 3792 |
+
"$ref": "#/definitions/dto.SuccessResponse-string"
|
| 3793 |
+
}
|
| 3794 |
+
},
|
| 3795 |
+
"400": {
|
| 3796 |
+
"description": "Bad Request",
|
| 3797 |
+
"schema": {
|
| 3798 |
+
"$ref": "#/definitions/dto.ErrorResponse"
|
| 3799 |
+
}
|
| 3800 |
+
},
|
| 3801 |
+
"500": {
|
| 3802 |
+
"description": "Internal Server Error",
|
| 3803 |
+
"schema": {
|
| 3804 |
+
"$ref": "#/definitions/dto.ErrorResponse"
|
| 3805 |
+
}
|
| 3806 |
+
}
|
| 3807 |
+
}
|
| 3808 |
+
}
|
| 3809 |
+
},
|
| 3810 |
"/api/v1/events/register-event": {
|
| 3811 |
"post": {
|
| 3812 |
"security": [
|
|
|
|
| 3852 |
"402": {
|
| 3853 |
"description": "Payment Required",
|
| 3854 |
"schema": {
|
| 3855 |
+
"$ref": "#/definitions/dto.RegisterEventPaymentActionRequiredResponse"
|
| 3856 |
}
|
| 3857 |
}
|
| 3858 |
}
|
|
|
|
| 4033 |
}
|
| 4034 |
}
|
| 4035 |
},
|
| 4036 |
+
"/api/v1/events/{event_slug}/scoreboard": {
|
| 4037 |
+
"get": {
|
| 4038 |
+
"security": [
|
| 4039 |
+
{
|
| 4040 |
+
"BearerAuth": []
|
| 4041 |
+
}
|
| 4042 |
+
],
|
| 4043 |
+
"description": "Retrieve a paginated scoreboard of participants based on total score across all exams in an event",
|
| 4044 |
"consumes": [
|
| 4045 |
+
"application/json"
|
| 4046 |
],
|
| 4047 |
"produces": [
|
| 4048 |
"application/json"
|
| 4049 |
],
|
| 4050 |
"tags": [
|
| 4051 |
+
"Exam Event"
|
| 4052 |
],
|
| 4053 |
+
"summary": "Event Scoreboard",
|
| 4054 |
"parameters": [
|
| 4055 |
{
|
| 4056 |
"type": "string",
|
| 4057 |
+
"description": "Event Slug",
|
| 4058 |
+
"name": "event_slug",
|
| 4059 |
+
"in": "path",
|
| 4060 |
"required": true
|
| 4061 |
},
|
| 4062 |
{
|
| 4063 |
+
"type": "integer",
|
| 4064 |
+
"default": 10,
|
| 4065 |
+
"description": "Number of items per page",
|
| 4066 |
+
"name": "limit",
|
| 4067 |
+
"in": "query"
|
| 4068 |
+
},
|
| 4069 |
+
{
|
| 4070 |
+
"type": "integer",
|
| 4071 |
+
"default": 1,
|
| 4072 |
+
"description": "Page number",
|
| 4073 |
+
"name": "page",
|
| 4074 |
+
"in": "query"
|
| 4075 |
},
|
| 4076 |
{
|
| 4077 |
"type": "string",
|
| 4078 |
+
"description": "Search keyword",
|
| 4079 |
+
"name": "search",
|
| 4080 |
+
"in": "query"
|
|
|
|
| 4081 |
},
|
| 4082 |
{
|
| 4083 |
+
"type": "string",
|
| 4084 |
+
"description": "Sort field: 'total_score' (default), 'username', or 'full_name'",
|
| 4085 |
+
"name": "sortBy",
|
| 4086 |
+
"in": "query"
|
|
|
|
| 4087 |
},
|
| 4088 |
{
|
| 4089 |
"type": "string",
|
| 4090 |
+
"description": "Sort order: 'asc' or 'desc'",
|
| 4091 |
+
"name": "orderBy",
|
| 4092 |
+
"in": "query"
|
|
|
|
| 4093 |
},
|
| 4094 |
{
|
| 4095 |
+
"type": "string",
|
| 4096 |
+
"description": "Sort order alias: 'asc' or 'desc'",
|
| 4097 |
+
"name": "order",
|
| 4098 |
+
"in": "query"
|
| 4099 |
}
|
| 4100 |
],
|
| 4101 |
"responses": {
|
| 4102 |
"200": {
|
| 4103 |
"description": "OK",
|
| 4104 |
"schema": {
|
| 4105 |
+
"$ref": "#/definitions/dto.SuccessResponse-array_dto_EventScoreboardItem"
|
| 4106 |
}
|
| 4107 |
},
|
| 4108 |
"400": {
|
|
|
|
| 4110 |
"schema": {
|
| 4111 |
"$ref": "#/definitions/dto.ErrorResponse"
|
| 4112 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4113 |
}
|
| 4114 |
}
|
| 4115 |
}
|
|
|
|
| 4161 |
"name": "page",
|
| 4162 |
"in": "query"
|
| 4163 |
},
|
| 4164 |
+
{
|
| 4165 |
+
"type": "string",
|
| 4166 |
+
"description": "Search keyword",
|
| 4167 |
+
"name": "search",
|
| 4168 |
+
"in": "query"
|
| 4169 |
+
},
|
| 4170 |
{
|
| 4171 |
"type": "string",
|
| 4172 |
"description": "Sort field: 'score' (default) or 'duration'",
|
|
|
|
| 4176 |
{
|
| 4177 |
"type": "string",
|
| 4178 |
"description": "Sort order: 'asc' or 'desc'",
|
| 4179 |
+
"name": "orderBy",
|
| 4180 |
+
"in": "query"
|
| 4181 |
+
},
|
| 4182 |
+
{
|
| 4183 |
+
"type": "string",
|
| 4184 |
+
"description": "Sort order alias: 'asc' or 'desc'",
|
| 4185 |
"name": "order",
|
| 4186 |
"in": "query"
|
| 4187 |
}
|
|
|
|
| 4555 |
}
|
| 4556 |
}
|
| 4557 |
},
|
| 4558 |
+
"/api/v1/payment/callback": {
|
| 4559 |
+
"post": {
|
| 4560 |
+
"description": "Handle asynchronous payment callback and update transaction status",
|
| 4561 |
+
"consumes": [
|
| 4562 |
+
"application/json"
|
| 4563 |
+
],
|
| 4564 |
+
"produces": [
|
| 4565 |
+
"application/json"
|
| 4566 |
+
],
|
| 4567 |
+
"tags": [
|
| 4568 |
+
"Payment"
|
| 4569 |
+
],
|
| 4570 |
+
"summary": "Payment Callback",
|
| 4571 |
+
"parameters": [
|
| 4572 |
+
{
|
| 4573 |
+
"description": "Payment Callback Request",
|
| 4574 |
+
"name": "request",
|
| 4575 |
+
"in": "body",
|
| 4576 |
+
"required": true,
|
| 4577 |
+
"schema": {
|
| 4578 |
+
"$ref": "#/definitions/dto.PaymentCallbackRequest"
|
| 4579 |
+
}
|
| 4580 |
+
}
|
| 4581 |
+
],
|
| 4582 |
+
"responses": {
|
| 4583 |
+
"200": {
|
| 4584 |
+
"description": "OK",
|
| 4585 |
+
"schema": {
|
| 4586 |
+
"$ref": "#/definitions/dto.SuccessResponse-dto_PaymentCallbackResponse"
|
| 4587 |
+
}
|
| 4588 |
+
},
|
| 4589 |
+
"400": {
|
| 4590 |
+
"description": "Bad Request",
|
| 4591 |
+
"schema": {
|
| 4592 |
+
"$ref": "#/definitions/dto.ErrorResponse"
|
| 4593 |
+
}
|
| 4594 |
+
},
|
| 4595 |
+
"404": {
|
| 4596 |
+
"description": "Not Found",
|
| 4597 |
+
"schema": {
|
| 4598 |
+
"$ref": "#/definitions/dto.ErrorResponse"
|
| 4599 |
+
}
|
| 4600 |
+
}
|
| 4601 |
+
}
|
| 4602 |
+
}
|
| 4603 |
+
},
|
| 4604 |
"/api/v1/super-admin/users": {
|
| 4605 |
"get": {
|
| 4606 |
"security": [
|
|
|
|
| 5243 |
"is_public": {
|
| 5244 |
"type": "boolean"
|
| 5245 |
},
|
| 5246 |
+
"price": {
|
| 5247 |
+
"type": "number"
|
| 5248 |
+
},
|
| 5249 |
"slug": {
|
| 5250 |
"type": "string"
|
| 5251 |
},
|
|
|
|
| 5287 |
"type": "object",
|
| 5288 |
"required": [
|
| 5289 |
"end_event",
|
|
|
|
| 5290 |
"img_banner",
|
| 5291 |
"overview",
|
| 5292 |
"start_event",
|
|
|
|
| 5308 |
"overview": {
|
| 5309 |
"type": "string"
|
| 5310 |
},
|
| 5311 |
+
"price": {
|
| 5312 |
+
"type": "number"
|
| 5313 |
+
},
|
| 5314 |
"start_event": {
|
| 5315 |
"type": "string"
|
| 5316 |
},
|
|
|
|
| 5431 |
"dto.ErrorResponse": {
|
| 5432 |
"type": "object",
|
| 5433 |
"properties": {
|
| 5434 |
+
"errors": {
|
| 5435 |
+
"type": "string"
|
| 5436 |
+
},
|
| 5437 |
"message": {},
|
| 5438 |
"meta_data": {},
|
| 5439 |
"status": {
|
|
|
|
| 5455 |
}
|
| 5456 |
}
|
| 5457 |
},
|
| 5458 |
+
"dto.EventScoreboardItem": {
|
| 5459 |
+
"type": "object",
|
| 5460 |
+
"properties": {
|
| 5461 |
+
"full_name": {
|
| 5462 |
+
"type": "string"
|
| 5463 |
+
},
|
| 5464 |
+
"total_score": {
|
| 5465 |
+
"type": "number"
|
| 5466 |
+
},
|
| 5467 |
+
"username": {
|
| 5468 |
+
"type": "string"
|
| 5469 |
+
}
|
| 5470 |
+
}
|
| 5471 |
+
},
|
| 5472 |
"dto.ExamScoreboardItem": {
|
| 5473 |
"type": "object",
|
| 5474 |
"properties": {
|
|
|
|
| 5665 |
}
|
| 5666 |
}
|
| 5667 |
},
|
| 5668 |
+
"dto.PaymentCallbackRequest": {
|
| 5669 |
+
"type": "object",
|
| 5670 |
+
"required": [
|
| 5671 |
+
"amount",
|
| 5672 |
+
"status",
|
| 5673 |
+
"timestamp",
|
| 5674 |
+
"transaction_id"
|
| 5675 |
+
],
|
| 5676 |
+
"properties": {
|
| 5677 |
+
"amount": {
|
| 5678 |
+
"type": "number"
|
| 5679 |
+
},
|
| 5680 |
+
"status": {
|
| 5681 |
+
"type": "string"
|
| 5682 |
+
},
|
| 5683 |
+
"timestamp": {
|
| 5684 |
+
"type": "string"
|
| 5685 |
+
},
|
| 5686 |
+
"transaction_id": {
|
| 5687 |
+
"type": "string"
|
| 5688 |
+
}
|
| 5689 |
+
}
|
| 5690 |
+
},
|
| 5691 |
+
"dto.PaymentCallbackResponse": {
|
| 5692 |
+
"type": "object",
|
| 5693 |
+
"properties": {
|
| 5694 |
+
"amount": {
|
| 5695 |
+
"type": "number"
|
| 5696 |
+
},
|
| 5697 |
+
"payment_type": {
|
| 5698 |
+
"type": "string"
|
| 5699 |
+
},
|
| 5700 |
+
"status": {
|
| 5701 |
+
"type": "string"
|
| 5702 |
+
},
|
| 5703 |
+
"timestamp": {
|
| 5704 |
+
"type": "string"
|
| 5705 |
+
},
|
| 5706 |
+
"transaction_id": {
|
| 5707 |
+
"type": "string"
|
| 5708 |
+
}
|
| 5709 |
+
}
|
| 5710 |
+
},
|
| 5711 |
+
"dto.RegisterEventPaymentActionRequiredData": {
|
| 5712 |
+
"type": "object",
|
| 5713 |
+
"properties": {
|
| 5714 |
+
"account_id": {
|
| 5715 |
+
"type": "string"
|
| 5716 |
+
},
|
| 5717 |
+
"amount": {
|
| 5718 |
+
"type": "number"
|
| 5719 |
+
},
|
| 5720 |
+
"event_id": {
|
| 5721 |
+
"type": "string"
|
| 5722 |
+
},
|
| 5723 |
+
"expired_at": {
|
| 5724 |
+
"type": "string"
|
| 5725 |
+
},
|
| 5726 |
+
"id": {
|
| 5727 |
+
"type": "string"
|
| 5728 |
+
},
|
| 5729 |
+
"invoice_id": {
|
| 5730 |
+
"type": "string"
|
| 5731 |
+
},
|
| 5732 |
+
"invoice_url": {
|
| 5733 |
+
"type": "string"
|
| 5734 |
+
},
|
| 5735 |
+
"mayar_transaction_id": {
|
| 5736 |
+
"type": "string"
|
| 5737 |
+
},
|
| 5738 |
+
"status": {
|
| 5739 |
+
"type": "string"
|
| 5740 |
+
},
|
| 5741 |
+
"transaction_at": {
|
| 5742 |
+
"type": "string"
|
| 5743 |
+
}
|
| 5744 |
+
}
|
| 5745 |
+
},
|
| 5746 |
+
"dto.RegisterEventPaymentActionRequiredResponse": {
|
| 5747 |
+
"type": "object",
|
| 5748 |
+
"properties": {
|
| 5749 |
+
"data": {
|
| 5750 |
+
"$ref": "#/definitions/dto.RegisterEventPaymentActionRequiredData"
|
| 5751 |
+
},
|
| 5752 |
+
"message": {
|
| 5753 |
+
"type": "string"
|
| 5754 |
+
},
|
| 5755 |
+
"meta_data": {
|
| 5756 |
+
"type": "string"
|
| 5757 |
+
},
|
| 5758 |
+
"status": {
|
| 5759 |
+
"type": "string"
|
| 5760 |
+
}
|
| 5761 |
+
}
|
| 5762 |
+
},
|
| 5763 |
"dto.ResetPasswordRequest": {
|
| 5764 |
"type": "object",
|
| 5765 |
"required": [
|
|
|
|
| 5855 |
}
|
| 5856 |
}
|
| 5857 |
},
|
| 5858 |
+
"dto.SuccessResponse-array_dto_EventScoreboardItem": {
|
| 5859 |
+
"type": "object",
|
| 5860 |
+
"properties": {
|
| 5861 |
+
"data": {
|
| 5862 |
+
"type": "array",
|
| 5863 |
+
"items": {
|
| 5864 |
+
"$ref": "#/definitions/dto.EventScoreboardItem"
|
| 5865 |
+
}
|
| 5866 |
+
},
|
| 5867 |
+
"message": {},
|
| 5868 |
+
"meta_data": {},
|
| 5869 |
+
"status": {
|
| 5870 |
+
"type": "string"
|
| 5871 |
+
}
|
| 5872 |
+
}
|
| 5873 |
+
},
|
| 5874 |
"dto.SuccessResponse-array_dto_ExamScoreboardItem": {
|
| 5875 |
"type": "object",
|
| 5876 |
"properties": {
|
|
|
|
| 6202 |
}
|
| 6203 |
}
|
| 6204 |
},
|
| 6205 |
+
"dto.SuccessResponse-dto_PaymentCallbackResponse": {
|
| 6206 |
+
"type": "object",
|
| 6207 |
+
"properties": {
|
| 6208 |
+
"data": {
|
| 6209 |
+
"$ref": "#/definitions/dto.PaymentCallbackResponse"
|
| 6210 |
+
},
|
| 6211 |
+
"message": {},
|
| 6212 |
+
"meta_data": {},
|
| 6213 |
+
"status": {
|
| 6214 |
+
"type": "string"
|
| 6215 |
+
}
|
| 6216 |
+
}
|
| 6217 |
+
},
|
| 6218 |
"dto.SuccessResponse-dto_UserResponse": {
|
| 6219 |
"type": "object",
|
| 6220 |
"properties": {
|
|
|
|
| 6384 |
}
|
| 6385 |
}
|
| 6386 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6387 |
"dto.SuccessResponse-models_Events": {
|
| 6388 |
"type": "object",
|
| 6389 |
"properties": {
|
|
|
|
| 6461 |
"is_public": {
|
| 6462 |
"type": "boolean"
|
| 6463 |
},
|
| 6464 |
+
"price": {
|
| 6465 |
+
"type": "number"
|
| 6466 |
+
},
|
| 6467 |
"slug": {
|
| 6468 |
"type": "string"
|
| 6469 |
},
|
|
|
|
| 6521 |
"overview": {
|
| 6522 |
"type": "string"
|
| 6523 |
},
|
| 6524 |
+
"price": {
|
| 6525 |
+
"type": "number"
|
| 6526 |
+
},
|
| 6527 |
"start_event": {
|
| 6528 |
"type": "string"
|
| 6529 |
},
|
swagger/docs/swagger.json
CHANGED
|
@@ -3726,6 +3726,84 @@
|
|
| 3726 |
}
|
| 3727 |
}
|
| 3728 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3729 |
"/api/v1/events/register-event": {
|
| 3730 |
"post": {
|
| 3731 |
"security": [
|
|
@@ -3771,7 +3849,7 @@
|
|
| 3771 |
"402": {
|
| 3772 |
"description": "Payment Required",
|
| 3773 |
"schema": {
|
| 3774 |
-
"$ref": "#/definitions/dto.
|
| 3775 |
}
|
| 3776 |
}
|
| 3777 |
}
|
|
@@ -3952,67 +4030,76 @@
|
|
| 3952 |
}
|
| 3953 |
}
|
| 3954 |
},
|
| 3955 |
-
"/api/v1/events/{event_slug}/
|
| 3956 |
-
"
|
| 3957 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3958 |
"consumes": [
|
| 3959 |
-
"
|
| 3960 |
],
|
| 3961 |
"produces": [
|
| 3962 |
"application/json"
|
| 3963 |
],
|
| 3964 |
"tags": [
|
| 3965 |
-
"
|
| 3966 |
],
|
| 3967 |
-
"summary": "
|
| 3968 |
"parameters": [
|
| 3969 |
{
|
| 3970 |
"type": "string",
|
| 3971 |
-
"description": "Event
|
| 3972 |
-
"name": "
|
| 3973 |
-
"in": "
|
| 3974 |
"required": true
|
| 3975 |
},
|
| 3976 |
{
|
| 3977 |
-
"type": "
|
| 3978 |
-
"
|
| 3979 |
-
"
|
| 3980 |
-
"
|
| 3981 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3982 |
},
|
| 3983 |
{
|
| 3984 |
"type": "string",
|
| 3985 |
-
"description": "
|
| 3986 |
-
"name": "
|
| 3987 |
-
"in": "
|
| 3988 |
-
"required": true
|
| 3989 |
},
|
| 3990 |
{
|
| 3991 |
-
"type": "
|
| 3992 |
-
"description": "
|
| 3993 |
-
"name": "
|
| 3994 |
-
"in": "
|
| 3995 |
-
"required": true
|
| 3996 |
},
|
| 3997 |
{
|
| 3998 |
"type": "string",
|
| 3999 |
-
"description": "
|
| 4000 |
-
"name": "
|
| 4001 |
-
"in": "
|
| 4002 |
-
"required": true
|
| 4003 |
},
|
| 4004 |
{
|
| 4005 |
-
"type": "
|
| 4006 |
-
"description": "
|
| 4007 |
-
"name": "
|
| 4008 |
-
"in": "
|
| 4009 |
}
|
| 4010 |
],
|
| 4011 |
"responses": {
|
| 4012 |
"200": {
|
| 4013 |
"description": "OK",
|
| 4014 |
"schema": {
|
| 4015 |
-
"$ref": "#/definitions/dto.SuccessResponse-
|
| 4016 |
}
|
| 4017 |
},
|
| 4018 |
"400": {
|
|
@@ -4020,12 +4107,6 @@
|
|
| 4020 |
"schema": {
|
| 4021 |
"$ref": "#/definitions/dto.ErrorResponse"
|
| 4022 |
}
|
| 4023 |
-
},
|
| 4024 |
-
"500": {
|
| 4025 |
-
"description": "Internal Server Error",
|
| 4026 |
-
"schema": {
|
| 4027 |
-
"$ref": "#/definitions/dto.ErrorResponse"
|
| 4028 |
-
}
|
| 4029 |
}
|
| 4030 |
}
|
| 4031 |
}
|
|
@@ -4077,6 +4158,12 @@
|
|
| 4077 |
"name": "page",
|
| 4078 |
"in": "query"
|
| 4079 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4080 |
{
|
| 4081 |
"type": "string",
|
| 4082 |
"description": "Sort field: 'score' (default) or 'duration'",
|
|
@@ -4086,6 +4173,12 @@
|
|
| 4086 |
{
|
| 4087 |
"type": "string",
|
| 4088 |
"description": "Sort order: 'asc' or 'desc'",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4089 |
"name": "order",
|
| 4090 |
"in": "query"
|
| 4091 |
}
|
|
@@ -4459,6 +4552,52 @@
|
|
| 4459 |
}
|
| 4460 |
}
|
| 4461 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4462 |
"/api/v1/super-admin/users": {
|
| 4463 |
"get": {
|
| 4464 |
"security": [
|
|
@@ -5101,6 +5240,9 @@
|
|
| 5101 |
"is_public": {
|
| 5102 |
"type": "boolean"
|
| 5103 |
},
|
|
|
|
|
|
|
|
|
|
| 5104 |
"slug": {
|
| 5105 |
"type": "string"
|
| 5106 |
},
|
|
@@ -5142,7 +5284,6 @@
|
|
| 5142 |
"type": "object",
|
| 5143 |
"required": [
|
| 5144 |
"end_event",
|
| 5145 |
-
"event_code",
|
| 5146 |
"img_banner",
|
| 5147 |
"overview",
|
| 5148 |
"start_event",
|
|
@@ -5164,6 +5305,9 @@
|
|
| 5164 |
"overview": {
|
| 5165 |
"type": "string"
|
| 5166 |
},
|
|
|
|
|
|
|
|
|
|
| 5167 |
"start_event": {
|
| 5168 |
"type": "string"
|
| 5169 |
},
|
|
@@ -5284,7 +5428,9 @@
|
|
| 5284 |
"dto.ErrorResponse": {
|
| 5285 |
"type": "object",
|
| 5286 |
"properties": {
|
| 5287 |
-
"errors": {
|
|
|
|
|
|
|
| 5288 |
"message": {},
|
| 5289 |
"meta_data": {},
|
| 5290 |
"status": {
|
|
@@ -5306,6 +5452,20 @@
|
|
| 5306 |
}
|
| 5307 |
}
|
| 5308 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5309 |
"dto.ExamScoreboardItem": {
|
| 5310 |
"type": "object",
|
| 5311 |
"properties": {
|
|
@@ -5502,6 +5662,101 @@
|
|
| 5502 |
}
|
| 5503 |
}
|
| 5504 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5505 |
"dto.ResetPasswordRequest": {
|
| 5506 |
"type": "object",
|
| 5507 |
"required": [
|
|
@@ -5597,6 +5852,22 @@
|
|
| 5597 |
}
|
| 5598 |
}
|
| 5599 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5600 |
"dto.SuccessResponse-array_dto_ExamScoreboardItem": {
|
| 5601 |
"type": "object",
|
| 5602 |
"properties": {
|
|
@@ -5928,6 +6199,19 @@
|
|
| 5928 |
}
|
| 5929 |
}
|
| 5930 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5931 |
"dto.SuccessResponse-dto_UserResponse": {
|
| 5932 |
"type": "object",
|
| 5933 |
"properties": {
|
|
@@ -6097,19 +6381,6 @@
|
|
| 6097 |
}
|
| 6098 |
}
|
| 6099 |
},
|
| 6100 |
-
"dto.SuccessResponse-models_EventPaymentTransaction": {
|
| 6101 |
-
"type": "object",
|
| 6102 |
-
"properties": {
|
| 6103 |
-
"data": {
|
| 6104 |
-
"$ref": "#/definitions/models.EventPaymentTransaction"
|
| 6105 |
-
},
|
| 6106 |
-
"message": {},
|
| 6107 |
-
"meta_data": {},
|
| 6108 |
-
"status": {
|
| 6109 |
-
"type": "string"
|
| 6110 |
-
}
|
| 6111 |
-
}
|
| 6112 |
-
},
|
| 6113 |
"dto.SuccessResponse-models_Events": {
|
| 6114 |
"type": "object",
|
| 6115 |
"properties": {
|
|
@@ -6187,6 +6458,9 @@
|
|
| 6187 |
"is_public": {
|
| 6188 |
"type": "boolean"
|
| 6189 |
},
|
|
|
|
|
|
|
|
|
|
| 6190 |
"slug": {
|
| 6191 |
"type": "string"
|
| 6192 |
},
|
|
@@ -6244,6 +6518,9 @@
|
|
| 6244 |
"overview": {
|
| 6245 |
"type": "string"
|
| 6246 |
},
|
|
|
|
|
|
|
|
|
|
| 6247 |
"start_event": {
|
| 6248 |
"type": "string"
|
| 6249 |
},
|
|
|
|
| 3726 |
}
|
| 3727 |
}
|
| 3728 |
},
|
| 3729 |
+
"/api/v1/events/logs/{event_slug}/exam/{exam_slug}/proctoring": {
|
| 3730 |
+
"post": {
|
| 3731 |
+
"description": "Create a new proctoring log entry with optional file attachment",
|
| 3732 |
+
"consumes": [
|
| 3733 |
+
"multipart/form-data"
|
| 3734 |
+
],
|
| 3735 |
+
"produces": [
|
| 3736 |
+
"application/json"
|
| 3737 |
+
],
|
| 3738 |
+
"tags": [
|
| 3739 |
+
"Event Exam Proctoring"
|
| 3740 |
+
],
|
| 3741 |
+
"summary": "Create Proctoring Log",
|
| 3742 |
+
"parameters": [
|
| 3743 |
+
{
|
| 3744 |
+
"type": "string",
|
| 3745 |
+
"description": "Event ID",
|
| 3746 |
+
"name": "id_event",
|
| 3747 |
+
"in": "formData",
|
| 3748 |
+
"required": true
|
| 3749 |
+
},
|
| 3750 |
+
{
|
| 3751 |
+
"type": "string",
|
| 3752 |
+
"description": "Exam ID",
|
| 3753 |
+
"name": "id_exam",
|
| 3754 |
+
"in": "formData",
|
| 3755 |
+
"required": true
|
| 3756 |
+
},
|
| 3757 |
+
{
|
| 3758 |
+
"type": "string",
|
| 3759 |
+
"description": "Account ID",
|
| 3760 |
+
"name": "id_account",
|
| 3761 |
+
"in": "formData",
|
| 3762 |
+
"required": true
|
| 3763 |
+
},
|
| 3764 |
+
{
|
| 3765 |
+
"type": "integer",
|
| 3766 |
+
"description": "Violation Score",
|
| 3767 |
+
"name": "violation_score",
|
| 3768 |
+
"in": "formData",
|
| 3769 |
+
"required": true
|
| 3770 |
+
},
|
| 3771 |
+
{
|
| 3772 |
+
"type": "string",
|
| 3773 |
+
"description": "Violation Category",
|
| 3774 |
+
"name": "violation_category",
|
| 3775 |
+
"in": "formData",
|
| 3776 |
+
"required": true
|
| 3777 |
+
},
|
| 3778 |
+
{
|
| 3779 |
+
"type": "file",
|
| 3780 |
+
"description": "Attachment File",
|
| 3781 |
+
"name": "file",
|
| 3782 |
+
"in": "formData"
|
| 3783 |
+
}
|
| 3784 |
+
],
|
| 3785 |
+
"responses": {
|
| 3786 |
+
"200": {
|
| 3787 |
+
"description": "OK",
|
| 3788 |
+
"schema": {
|
| 3789 |
+
"$ref": "#/definitions/dto.SuccessResponse-string"
|
| 3790 |
+
}
|
| 3791 |
+
},
|
| 3792 |
+
"400": {
|
| 3793 |
+
"description": "Bad Request",
|
| 3794 |
+
"schema": {
|
| 3795 |
+
"$ref": "#/definitions/dto.ErrorResponse"
|
| 3796 |
+
}
|
| 3797 |
+
},
|
| 3798 |
+
"500": {
|
| 3799 |
+
"description": "Internal Server Error",
|
| 3800 |
+
"schema": {
|
| 3801 |
+
"$ref": "#/definitions/dto.ErrorResponse"
|
| 3802 |
+
}
|
| 3803 |
+
}
|
| 3804 |
+
}
|
| 3805 |
+
}
|
| 3806 |
+
},
|
| 3807 |
"/api/v1/events/register-event": {
|
| 3808 |
"post": {
|
| 3809 |
"security": [
|
|
|
|
| 3849 |
"402": {
|
| 3850 |
"description": "Payment Required",
|
| 3851 |
"schema": {
|
| 3852 |
+
"$ref": "#/definitions/dto.RegisterEventPaymentActionRequiredResponse"
|
| 3853 |
}
|
| 3854 |
}
|
| 3855 |
}
|
|
|
|
| 4030 |
}
|
| 4031 |
}
|
| 4032 |
},
|
| 4033 |
+
"/api/v1/events/{event_slug}/scoreboard": {
|
| 4034 |
+
"get": {
|
| 4035 |
+
"security": [
|
| 4036 |
+
{
|
| 4037 |
+
"BearerAuth": []
|
| 4038 |
+
}
|
| 4039 |
+
],
|
| 4040 |
+
"description": "Retrieve a paginated scoreboard of participants based on total score across all exams in an event",
|
| 4041 |
"consumes": [
|
| 4042 |
+
"application/json"
|
| 4043 |
],
|
| 4044 |
"produces": [
|
| 4045 |
"application/json"
|
| 4046 |
],
|
| 4047 |
"tags": [
|
| 4048 |
+
"Exam Event"
|
| 4049 |
],
|
| 4050 |
+
"summary": "Event Scoreboard",
|
| 4051 |
"parameters": [
|
| 4052 |
{
|
| 4053 |
"type": "string",
|
| 4054 |
+
"description": "Event Slug",
|
| 4055 |
+
"name": "event_slug",
|
| 4056 |
+
"in": "path",
|
| 4057 |
"required": true
|
| 4058 |
},
|
| 4059 |
{
|
| 4060 |
+
"type": "integer",
|
| 4061 |
+
"default": 10,
|
| 4062 |
+
"description": "Number of items per page",
|
| 4063 |
+
"name": "limit",
|
| 4064 |
+
"in": "query"
|
| 4065 |
+
},
|
| 4066 |
+
{
|
| 4067 |
+
"type": "integer",
|
| 4068 |
+
"default": 1,
|
| 4069 |
+
"description": "Page number",
|
| 4070 |
+
"name": "page",
|
| 4071 |
+
"in": "query"
|
| 4072 |
},
|
| 4073 |
{
|
| 4074 |
"type": "string",
|
| 4075 |
+
"description": "Search keyword",
|
| 4076 |
+
"name": "search",
|
| 4077 |
+
"in": "query"
|
|
|
|
| 4078 |
},
|
| 4079 |
{
|
| 4080 |
+
"type": "string",
|
| 4081 |
+
"description": "Sort field: 'total_score' (default), 'username', or 'full_name'",
|
| 4082 |
+
"name": "sortBy",
|
| 4083 |
+
"in": "query"
|
|
|
|
| 4084 |
},
|
| 4085 |
{
|
| 4086 |
"type": "string",
|
| 4087 |
+
"description": "Sort order: 'asc' or 'desc'",
|
| 4088 |
+
"name": "orderBy",
|
| 4089 |
+
"in": "query"
|
|
|
|
| 4090 |
},
|
| 4091 |
{
|
| 4092 |
+
"type": "string",
|
| 4093 |
+
"description": "Sort order alias: 'asc' or 'desc'",
|
| 4094 |
+
"name": "order",
|
| 4095 |
+
"in": "query"
|
| 4096 |
}
|
| 4097 |
],
|
| 4098 |
"responses": {
|
| 4099 |
"200": {
|
| 4100 |
"description": "OK",
|
| 4101 |
"schema": {
|
| 4102 |
+
"$ref": "#/definitions/dto.SuccessResponse-array_dto_EventScoreboardItem"
|
| 4103 |
}
|
| 4104 |
},
|
| 4105 |
"400": {
|
|
|
|
| 4107 |
"schema": {
|
| 4108 |
"$ref": "#/definitions/dto.ErrorResponse"
|
| 4109 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4110 |
}
|
| 4111 |
}
|
| 4112 |
}
|
|
|
|
| 4158 |
"name": "page",
|
| 4159 |
"in": "query"
|
| 4160 |
},
|
| 4161 |
+
{
|
| 4162 |
+
"type": "string",
|
| 4163 |
+
"description": "Search keyword",
|
| 4164 |
+
"name": "search",
|
| 4165 |
+
"in": "query"
|
| 4166 |
+
},
|
| 4167 |
{
|
| 4168 |
"type": "string",
|
| 4169 |
"description": "Sort field: 'score' (default) or 'duration'",
|
|
|
|
| 4173 |
{
|
| 4174 |
"type": "string",
|
| 4175 |
"description": "Sort order: 'asc' or 'desc'",
|
| 4176 |
+
"name": "orderBy",
|
| 4177 |
+
"in": "query"
|
| 4178 |
+
},
|
| 4179 |
+
{
|
| 4180 |
+
"type": "string",
|
| 4181 |
+
"description": "Sort order alias: 'asc' or 'desc'",
|
| 4182 |
"name": "order",
|
| 4183 |
"in": "query"
|
| 4184 |
}
|
|
|
|
| 4552 |
}
|
| 4553 |
}
|
| 4554 |
},
|
| 4555 |
+
"/api/v1/payment/callback": {
|
| 4556 |
+
"post": {
|
| 4557 |
+
"description": "Handle asynchronous payment callback and update transaction status",
|
| 4558 |
+
"consumes": [
|
| 4559 |
+
"application/json"
|
| 4560 |
+
],
|
| 4561 |
+
"produces": [
|
| 4562 |
+
"application/json"
|
| 4563 |
+
],
|
| 4564 |
+
"tags": [
|
| 4565 |
+
"Payment"
|
| 4566 |
+
],
|
| 4567 |
+
"summary": "Payment Callback",
|
| 4568 |
+
"parameters": [
|
| 4569 |
+
{
|
| 4570 |
+
"description": "Payment Callback Request",
|
| 4571 |
+
"name": "request",
|
| 4572 |
+
"in": "body",
|
| 4573 |
+
"required": true,
|
| 4574 |
+
"schema": {
|
| 4575 |
+
"$ref": "#/definitions/dto.PaymentCallbackRequest"
|
| 4576 |
+
}
|
| 4577 |
+
}
|
| 4578 |
+
],
|
| 4579 |
+
"responses": {
|
| 4580 |
+
"200": {
|
| 4581 |
+
"description": "OK",
|
| 4582 |
+
"schema": {
|
| 4583 |
+
"$ref": "#/definitions/dto.SuccessResponse-dto_PaymentCallbackResponse"
|
| 4584 |
+
}
|
| 4585 |
+
},
|
| 4586 |
+
"400": {
|
| 4587 |
+
"description": "Bad Request",
|
| 4588 |
+
"schema": {
|
| 4589 |
+
"$ref": "#/definitions/dto.ErrorResponse"
|
| 4590 |
+
}
|
| 4591 |
+
},
|
| 4592 |
+
"404": {
|
| 4593 |
+
"description": "Not Found",
|
| 4594 |
+
"schema": {
|
| 4595 |
+
"$ref": "#/definitions/dto.ErrorResponse"
|
| 4596 |
+
}
|
| 4597 |
+
}
|
| 4598 |
+
}
|
| 4599 |
+
}
|
| 4600 |
+
},
|
| 4601 |
"/api/v1/super-admin/users": {
|
| 4602 |
"get": {
|
| 4603 |
"security": [
|
|
|
|
| 5240 |
"is_public": {
|
| 5241 |
"type": "boolean"
|
| 5242 |
},
|
| 5243 |
+
"price": {
|
| 5244 |
+
"type": "number"
|
| 5245 |
+
},
|
| 5246 |
"slug": {
|
| 5247 |
"type": "string"
|
| 5248 |
},
|
|
|
|
| 5284 |
"type": "object",
|
| 5285 |
"required": [
|
| 5286 |
"end_event",
|
|
|
|
| 5287 |
"img_banner",
|
| 5288 |
"overview",
|
| 5289 |
"start_event",
|
|
|
|
| 5305 |
"overview": {
|
| 5306 |
"type": "string"
|
| 5307 |
},
|
| 5308 |
+
"price": {
|
| 5309 |
+
"type": "number"
|
| 5310 |
+
},
|
| 5311 |
"start_event": {
|
| 5312 |
"type": "string"
|
| 5313 |
},
|
|
|
|
| 5428 |
"dto.ErrorResponse": {
|
| 5429 |
"type": "object",
|
| 5430 |
"properties": {
|
| 5431 |
+
"errors": {
|
| 5432 |
+
"type": "string"
|
| 5433 |
+
},
|
| 5434 |
"message": {},
|
| 5435 |
"meta_data": {},
|
| 5436 |
"status": {
|
|
|
|
| 5452 |
}
|
| 5453 |
}
|
| 5454 |
},
|
| 5455 |
+
"dto.EventScoreboardItem": {
|
| 5456 |
+
"type": "object",
|
| 5457 |
+
"properties": {
|
| 5458 |
+
"full_name": {
|
| 5459 |
+
"type": "string"
|
| 5460 |
+
},
|
| 5461 |
+
"total_score": {
|
| 5462 |
+
"type": "number"
|
| 5463 |
+
},
|
| 5464 |
+
"username": {
|
| 5465 |
+
"type": "string"
|
| 5466 |
+
}
|
| 5467 |
+
}
|
| 5468 |
+
},
|
| 5469 |
"dto.ExamScoreboardItem": {
|
| 5470 |
"type": "object",
|
| 5471 |
"properties": {
|
|
|
|
| 5662 |
}
|
| 5663 |
}
|
| 5664 |
},
|
| 5665 |
+
"dto.PaymentCallbackRequest": {
|
| 5666 |
+
"type": "object",
|
| 5667 |
+
"required": [
|
| 5668 |
+
"amount",
|
| 5669 |
+
"status",
|
| 5670 |
+
"timestamp",
|
| 5671 |
+
"transaction_id"
|
| 5672 |
+
],
|
| 5673 |
+
"properties": {
|
| 5674 |
+
"amount": {
|
| 5675 |
+
"type": "number"
|
| 5676 |
+
},
|
| 5677 |
+
"status": {
|
| 5678 |
+
"type": "string"
|
| 5679 |
+
},
|
| 5680 |
+
"timestamp": {
|
| 5681 |
+
"type": "string"
|
| 5682 |
+
},
|
| 5683 |
+
"transaction_id": {
|
| 5684 |
+
"type": "string"
|
| 5685 |
+
}
|
| 5686 |
+
}
|
| 5687 |
+
},
|
| 5688 |
+
"dto.PaymentCallbackResponse": {
|
| 5689 |
+
"type": "object",
|
| 5690 |
+
"properties": {
|
| 5691 |
+
"amount": {
|
| 5692 |
+
"type": "number"
|
| 5693 |
+
},
|
| 5694 |
+
"payment_type": {
|
| 5695 |
+
"type": "string"
|
| 5696 |
+
},
|
| 5697 |
+
"status": {
|
| 5698 |
+
"type": "string"
|
| 5699 |
+
},
|
| 5700 |
+
"timestamp": {
|
| 5701 |
+
"type": "string"
|
| 5702 |
+
},
|
| 5703 |
+
"transaction_id": {
|
| 5704 |
+
"type": "string"
|
| 5705 |
+
}
|
| 5706 |
+
}
|
| 5707 |
+
},
|
| 5708 |
+
"dto.RegisterEventPaymentActionRequiredData": {
|
| 5709 |
+
"type": "object",
|
| 5710 |
+
"properties": {
|
| 5711 |
+
"account_id": {
|
| 5712 |
+
"type": "string"
|
| 5713 |
+
},
|
| 5714 |
+
"amount": {
|
| 5715 |
+
"type": "number"
|
| 5716 |
+
},
|
| 5717 |
+
"event_id": {
|
| 5718 |
+
"type": "string"
|
| 5719 |
+
},
|
| 5720 |
+
"expired_at": {
|
| 5721 |
+
"type": "string"
|
| 5722 |
+
},
|
| 5723 |
+
"id": {
|
| 5724 |
+
"type": "string"
|
| 5725 |
+
},
|
| 5726 |
+
"invoice_id": {
|
| 5727 |
+
"type": "string"
|
| 5728 |
+
},
|
| 5729 |
+
"invoice_url": {
|
| 5730 |
+
"type": "string"
|
| 5731 |
+
},
|
| 5732 |
+
"mayar_transaction_id": {
|
| 5733 |
+
"type": "string"
|
| 5734 |
+
},
|
| 5735 |
+
"status": {
|
| 5736 |
+
"type": "string"
|
| 5737 |
+
},
|
| 5738 |
+
"transaction_at": {
|
| 5739 |
+
"type": "string"
|
| 5740 |
+
}
|
| 5741 |
+
}
|
| 5742 |
+
},
|
| 5743 |
+
"dto.RegisterEventPaymentActionRequiredResponse": {
|
| 5744 |
+
"type": "object",
|
| 5745 |
+
"properties": {
|
| 5746 |
+
"data": {
|
| 5747 |
+
"$ref": "#/definitions/dto.RegisterEventPaymentActionRequiredData"
|
| 5748 |
+
},
|
| 5749 |
+
"message": {
|
| 5750 |
+
"type": "string"
|
| 5751 |
+
},
|
| 5752 |
+
"meta_data": {
|
| 5753 |
+
"type": "string"
|
| 5754 |
+
},
|
| 5755 |
+
"status": {
|
| 5756 |
+
"type": "string"
|
| 5757 |
+
}
|
| 5758 |
+
}
|
| 5759 |
+
},
|
| 5760 |
"dto.ResetPasswordRequest": {
|
| 5761 |
"type": "object",
|
| 5762 |
"required": [
|
|
|
|
| 5852 |
}
|
| 5853 |
}
|
| 5854 |
},
|
| 5855 |
+
"dto.SuccessResponse-array_dto_EventScoreboardItem": {
|
| 5856 |
+
"type": "object",
|
| 5857 |
+
"properties": {
|
| 5858 |
+
"data": {
|
| 5859 |
+
"type": "array",
|
| 5860 |
+
"items": {
|
| 5861 |
+
"$ref": "#/definitions/dto.EventScoreboardItem"
|
| 5862 |
+
}
|
| 5863 |
+
},
|
| 5864 |
+
"message": {},
|
| 5865 |
+
"meta_data": {},
|
| 5866 |
+
"status": {
|
| 5867 |
+
"type": "string"
|
| 5868 |
+
}
|
| 5869 |
+
}
|
| 5870 |
+
},
|
| 5871 |
"dto.SuccessResponse-array_dto_ExamScoreboardItem": {
|
| 5872 |
"type": "object",
|
| 5873 |
"properties": {
|
|
|
|
| 6199 |
}
|
| 6200 |
}
|
| 6201 |
},
|
| 6202 |
+
"dto.SuccessResponse-dto_PaymentCallbackResponse": {
|
| 6203 |
+
"type": "object",
|
| 6204 |
+
"properties": {
|
| 6205 |
+
"data": {
|
| 6206 |
+
"$ref": "#/definitions/dto.PaymentCallbackResponse"
|
| 6207 |
+
},
|
| 6208 |
+
"message": {},
|
| 6209 |
+
"meta_data": {},
|
| 6210 |
+
"status": {
|
| 6211 |
+
"type": "string"
|
| 6212 |
+
}
|
| 6213 |
+
}
|
| 6214 |
+
},
|
| 6215 |
"dto.SuccessResponse-dto_UserResponse": {
|
| 6216 |
"type": "object",
|
| 6217 |
"properties": {
|
|
|
|
| 6381 |
}
|
| 6382 |
}
|
| 6383 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6384 |
"dto.SuccessResponse-models_Events": {
|
| 6385 |
"type": "object",
|
| 6386 |
"properties": {
|
|
|
|
| 6458 |
"is_public": {
|
| 6459 |
"type": "boolean"
|
| 6460 |
},
|
| 6461 |
+
"price": {
|
| 6462 |
+
"type": "number"
|
| 6463 |
+
},
|
| 6464 |
"slug": {
|
| 6465 |
"type": "string"
|
| 6466 |
},
|
|
|
|
| 6518 |
"overview": {
|
| 6519 |
"type": "string"
|
| 6520 |
},
|
| 6521 |
+
"price": {
|
| 6522 |
+
"type": "number"
|
| 6523 |
+
},
|
| 6524 |
"start_event": {
|
| 6525 |
"type": "string"
|
| 6526 |
},
|
swagger/docs/swagger.yaml
CHANGED
|
@@ -215,6 +215,8 @@ definitions:
|
|
| 215 |
type: string
|
| 216 |
is_public:
|
| 217 |
type: boolean
|
|
|
|
|
|
|
| 218 |
slug:
|
| 219 |
type: string
|
| 220 |
title:
|
|
@@ -253,13 +255,14 @@ definitions:
|
|
| 253 |
type: boolean
|
| 254 |
overview:
|
| 255 |
type: string
|
|
|
|
|
|
|
| 256 |
start_event:
|
| 257 |
type: string
|
| 258 |
title:
|
| 259 |
type: string
|
| 260 |
required:
|
| 261 |
- end_event
|
| 262 |
-
- event_code
|
| 263 |
- img_banner
|
| 264 |
- overview
|
| 265 |
- start_event
|
|
@@ -340,7 +343,8 @@ definitions:
|
|
| 340 |
type: object
|
| 341 |
dto.ErrorResponse:
|
| 342 |
properties:
|
| 343 |
-
errors:
|
|
|
|
| 344 |
message: {}
|
| 345 |
meta_data: {}
|
| 346 |
status:
|
|
@@ -355,6 +359,15 @@ definitions:
|
|
| 355 |
register_status:
|
| 356 |
type: integer
|
| 357 |
type: object
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 358 |
dto.ExamScoreboardItem:
|
| 359 |
properties:
|
| 360 |
duration:
|
|
@@ -483,6 +496,69 @@ definitions:
|
|
| 483 |
- option_name
|
| 484 |
- option_values
|
| 485 |
type: object
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 486 |
dto.ResetPasswordRequest:
|
| 487 |
properties:
|
| 488 |
new_password:
|
|
@@ -548,6 +624,17 @@ definitions:
|
|
| 548 |
status:
|
| 549 |
type: string
|
| 550 |
type: object
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 551 |
dto.SuccessResponse-array_dto_ExamScoreboardItem:
|
| 552 |
properties:
|
| 553 |
data:
|
|
@@ -776,6 +863,15 @@ definitions:
|
|
| 776 |
status:
|
| 777 |
type: string
|
| 778 |
type: object
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 779 |
dto.SuccessResponse-dto_UserResponse:
|
| 780 |
properties:
|
| 781 |
data:
|
|
@@ -893,15 +989,6 @@ definitions:
|
|
| 893 |
status:
|
| 894 |
type: string
|
| 895 |
type: object
|
| 896 |
-
dto.SuccessResponse-models_EventPaymentTransaction:
|
| 897 |
-
properties:
|
| 898 |
-
data:
|
| 899 |
-
$ref: '#/definitions/models.EventPaymentTransaction'
|
| 900 |
-
message: {}
|
| 901 |
-
meta_data: {}
|
| 902 |
-
status:
|
| 903 |
-
type: string
|
| 904 |
-
type: object
|
| 905 |
dto.SuccessResponse-models_Events:
|
| 906 |
properties:
|
| 907 |
data:
|
|
@@ -955,6 +1042,8 @@ definitions:
|
|
| 955 |
type: string
|
| 956 |
is_public:
|
| 957 |
type: boolean
|
|
|
|
|
|
|
| 958 |
slug:
|
| 959 |
type: string
|
| 960 |
title:
|
|
@@ -992,6 +1081,8 @@ definitions:
|
|
| 992 |
type: boolean
|
| 993 |
overview:
|
| 994 |
type: string
|
|
|
|
|
|
|
| 995 |
start_event:
|
| 996 |
type: string
|
| 997 |
title:
|
|
@@ -4144,11 +4235,19 @@ paths:
|
|
| 4144 |
in: query
|
| 4145 |
name: page
|
| 4146 |
type: integer
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4147 |
- description: 'Sort field: ''score'' (default) or ''duration'''
|
| 4148 |
in: query
|
| 4149 |
name: sortBy
|
| 4150 |
type: string
|
| 4151 |
- description: 'Sort order: ''asc'' or ''desc'''
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4152 |
in: query
|
| 4153 |
name: order
|
| 4154 |
type: string
|
|
@@ -4259,7 +4358,61 @@ paths:
|
|
| 4259 |
summary: Attempt Exam Event
|
| 4260 |
tags:
|
| 4261 |
- Exam Event
|
| 4262 |
-
/api/v1/events/{event_slug}/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4263 |
post:
|
| 4264 |
consumes:
|
| 4265 |
- multipart/form-data
|
|
@@ -4338,7 +4491,7 @@ paths:
|
|
| 4338 |
"402":
|
| 4339 |
description: Payment Required
|
| 4340 |
schema:
|
| 4341 |
-
$ref: '#/definitions/dto.
|
| 4342 |
security:
|
| 4343 |
- BearerAuth: []
|
| 4344 |
summary: Join Event
|
|
@@ -4575,6 +4728,36 @@ paths:
|
|
| 4575 |
summary: Seed Provinces
|
| 4576 |
tags:
|
| 4577 |
- Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4578 |
/api/v1/super-admin/users:
|
| 4579 |
get:
|
| 4580 |
consumes:
|
|
|
|
| 215 |
type: string
|
| 216 |
is_public:
|
| 217 |
type: boolean
|
| 218 |
+
price:
|
| 219 |
+
type: number
|
| 220 |
slug:
|
| 221 |
type: string
|
| 222 |
title:
|
|
|
|
| 255 |
type: boolean
|
| 256 |
overview:
|
| 257 |
type: string
|
| 258 |
+
price:
|
| 259 |
+
type: number
|
| 260 |
start_event:
|
| 261 |
type: string
|
| 262 |
title:
|
| 263 |
type: string
|
| 264 |
required:
|
| 265 |
- end_event
|
|
|
|
| 266 |
- img_banner
|
| 267 |
- overview
|
| 268 |
- start_event
|
|
|
|
| 343 |
type: object
|
| 344 |
dto.ErrorResponse:
|
| 345 |
properties:
|
| 346 |
+
errors:
|
| 347 |
+
type: string
|
| 348 |
message: {}
|
| 349 |
meta_data: {}
|
| 350 |
status:
|
|
|
|
| 359 |
register_status:
|
| 360 |
type: integer
|
| 361 |
type: object
|
| 362 |
+
dto.EventScoreboardItem:
|
| 363 |
+
properties:
|
| 364 |
+
full_name:
|
| 365 |
+
type: string
|
| 366 |
+
total_score:
|
| 367 |
+
type: number
|
| 368 |
+
username:
|
| 369 |
+
type: string
|
| 370 |
+
type: object
|
| 371 |
dto.ExamScoreboardItem:
|
| 372 |
properties:
|
| 373 |
duration:
|
|
|
|
| 496 |
- option_name
|
| 497 |
- option_values
|
| 498 |
type: object
|
| 499 |
+
dto.PaymentCallbackRequest:
|
| 500 |
+
properties:
|
| 501 |
+
amount:
|
| 502 |
+
type: number
|
| 503 |
+
status:
|
| 504 |
+
type: string
|
| 505 |
+
timestamp:
|
| 506 |
+
type: string
|
| 507 |
+
transaction_id:
|
| 508 |
+
type: string
|
| 509 |
+
required:
|
| 510 |
+
- amount
|
| 511 |
+
- status
|
| 512 |
+
- timestamp
|
| 513 |
+
- transaction_id
|
| 514 |
+
type: object
|
| 515 |
+
dto.PaymentCallbackResponse:
|
| 516 |
+
properties:
|
| 517 |
+
amount:
|
| 518 |
+
type: number
|
| 519 |
+
payment_type:
|
| 520 |
+
type: string
|
| 521 |
+
status:
|
| 522 |
+
type: string
|
| 523 |
+
timestamp:
|
| 524 |
+
type: string
|
| 525 |
+
transaction_id:
|
| 526 |
+
type: string
|
| 527 |
+
type: object
|
| 528 |
+
dto.RegisterEventPaymentActionRequiredData:
|
| 529 |
+
properties:
|
| 530 |
+
account_id:
|
| 531 |
+
type: string
|
| 532 |
+
amount:
|
| 533 |
+
type: number
|
| 534 |
+
event_id:
|
| 535 |
+
type: string
|
| 536 |
+
expired_at:
|
| 537 |
+
type: string
|
| 538 |
+
id:
|
| 539 |
+
type: string
|
| 540 |
+
invoice_id:
|
| 541 |
+
type: string
|
| 542 |
+
invoice_url:
|
| 543 |
+
type: string
|
| 544 |
+
mayar_transaction_id:
|
| 545 |
+
type: string
|
| 546 |
+
status:
|
| 547 |
+
type: string
|
| 548 |
+
transaction_at:
|
| 549 |
+
type: string
|
| 550 |
+
type: object
|
| 551 |
+
dto.RegisterEventPaymentActionRequiredResponse:
|
| 552 |
+
properties:
|
| 553 |
+
data:
|
| 554 |
+
$ref: '#/definitions/dto.RegisterEventPaymentActionRequiredData'
|
| 555 |
+
message:
|
| 556 |
+
type: string
|
| 557 |
+
meta_data:
|
| 558 |
+
type: string
|
| 559 |
+
status:
|
| 560 |
+
type: string
|
| 561 |
+
type: object
|
| 562 |
dto.ResetPasswordRequest:
|
| 563 |
properties:
|
| 564 |
new_password:
|
|
|
|
| 624 |
status:
|
| 625 |
type: string
|
| 626 |
type: object
|
| 627 |
+
dto.SuccessResponse-array_dto_EventScoreboardItem:
|
| 628 |
+
properties:
|
| 629 |
+
data:
|
| 630 |
+
items:
|
| 631 |
+
$ref: '#/definitions/dto.EventScoreboardItem'
|
| 632 |
+
type: array
|
| 633 |
+
message: {}
|
| 634 |
+
meta_data: {}
|
| 635 |
+
status:
|
| 636 |
+
type: string
|
| 637 |
+
type: object
|
| 638 |
dto.SuccessResponse-array_dto_ExamScoreboardItem:
|
| 639 |
properties:
|
| 640 |
data:
|
|
|
|
| 863 |
status:
|
| 864 |
type: string
|
| 865 |
type: object
|
| 866 |
+
dto.SuccessResponse-dto_PaymentCallbackResponse:
|
| 867 |
+
properties:
|
| 868 |
+
data:
|
| 869 |
+
$ref: '#/definitions/dto.PaymentCallbackResponse'
|
| 870 |
+
message: {}
|
| 871 |
+
meta_data: {}
|
| 872 |
+
status:
|
| 873 |
+
type: string
|
| 874 |
+
type: object
|
| 875 |
dto.SuccessResponse-dto_UserResponse:
|
| 876 |
properties:
|
| 877 |
data:
|
|
|
|
| 989 |
status:
|
| 990 |
type: string
|
| 991 |
type: object
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 992 |
dto.SuccessResponse-models_Events:
|
| 993 |
properties:
|
| 994 |
data:
|
|
|
|
| 1042 |
type: string
|
| 1043 |
is_public:
|
| 1044 |
type: boolean
|
| 1045 |
+
price:
|
| 1046 |
+
type: number
|
| 1047 |
slug:
|
| 1048 |
type: string
|
| 1049 |
title:
|
|
|
|
| 1081 |
type: boolean
|
| 1082 |
overview:
|
| 1083 |
type: string
|
| 1084 |
+
price:
|
| 1085 |
+
type: number
|
| 1086 |
start_event:
|
| 1087 |
type: string
|
| 1088 |
title:
|
|
|
|
| 4235 |
in: query
|
| 4236 |
name: page
|
| 4237 |
type: integer
|
| 4238 |
+
- description: Search keyword
|
| 4239 |
+
in: query
|
| 4240 |
+
name: search
|
| 4241 |
+
type: string
|
| 4242 |
- description: 'Sort field: ''score'' (default) or ''duration'''
|
| 4243 |
in: query
|
| 4244 |
name: sortBy
|
| 4245 |
type: string
|
| 4246 |
- description: 'Sort order: ''asc'' or ''desc'''
|
| 4247 |
+
in: query
|
| 4248 |
+
name: orderBy
|
| 4249 |
+
type: string
|
| 4250 |
+
- description: 'Sort order alias: ''asc'' or ''desc'''
|
| 4251 |
in: query
|
| 4252 |
name: order
|
| 4253 |
type: string
|
|
|
|
| 4358 |
summary: Attempt Exam Event
|
| 4359 |
tags:
|
| 4360 |
- Exam Event
|
| 4361 |
+
/api/v1/events/{event_slug}/scoreboard:
|
| 4362 |
+
get:
|
| 4363 |
+
consumes:
|
| 4364 |
+
- application/json
|
| 4365 |
+
description: Retrieve a paginated scoreboard of participants based on total
|
| 4366 |
+
score across all exams in an event
|
| 4367 |
+
parameters:
|
| 4368 |
+
- description: Event Slug
|
| 4369 |
+
in: path
|
| 4370 |
+
name: event_slug
|
| 4371 |
+
required: true
|
| 4372 |
+
type: string
|
| 4373 |
+
- default: 10
|
| 4374 |
+
description: Number of items per page
|
| 4375 |
+
in: query
|
| 4376 |
+
name: limit
|
| 4377 |
+
type: integer
|
| 4378 |
+
- default: 1
|
| 4379 |
+
description: Page number
|
| 4380 |
+
in: query
|
| 4381 |
+
name: page
|
| 4382 |
+
type: integer
|
| 4383 |
+
- description: Search keyword
|
| 4384 |
+
in: query
|
| 4385 |
+
name: search
|
| 4386 |
+
type: string
|
| 4387 |
+
- description: 'Sort field: ''total_score'' (default), ''username'', or ''full_name'''
|
| 4388 |
+
in: query
|
| 4389 |
+
name: sortBy
|
| 4390 |
+
type: string
|
| 4391 |
+
- description: 'Sort order: ''asc'' or ''desc'''
|
| 4392 |
+
in: query
|
| 4393 |
+
name: orderBy
|
| 4394 |
+
type: string
|
| 4395 |
+
- description: 'Sort order alias: ''asc'' or ''desc'''
|
| 4396 |
+
in: query
|
| 4397 |
+
name: order
|
| 4398 |
+
type: string
|
| 4399 |
+
produces:
|
| 4400 |
+
- application/json
|
| 4401 |
+
responses:
|
| 4402 |
+
"200":
|
| 4403 |
+
description: OK
|
| 4404 |
+
schema:
|
| 4405 |
+
$ref: '#/definitions/dto.SuccessResponse-array_dto_EventScoreboardItem'
|
| 4406 |
+
"400":
|
| 4407 |
+
description: Bad Request
|
| 4408 |
+
schema:
|
| 4409 |
+
$ref: '#/definitions/dto.ErrorResponse'
|
| 4410 |
+
security:
|
| 4411 |
+
- BearerAuth: []
|
| 4412 |
+
summary: Event Scoreboard
|
| 4413 |
+
tags:
|
| 4414 |
+
- Exam Event
|
| 4415 |
+
/api/v1/events/logs/{event_slug}/exam/{exam_slug}/proctoring:
|
| 4416 |
post:
|
| 4417 |
consumes:
|
| 4418 |
- multipart/form-data
|
|
|
|
| 4491 |
"402":
|
| 4492 |
description: Payment Required
|
| 4493 |
schema:
|
| 4494 |
+
$ref: '#/definitions/dto.RegisterEventPaymentActionRequiredResponse'
|
| 4495 |
security:
|
| 4496 |
- BearerAuth: []
|
| 4497 |
summary: Join Event
|
|
|
|
| 4728 |
summary: Seed Provinces
|
| 4729 |
tags:
|
| 4730 |
- Region
|
| 4731 |
+
/api/v1/payment/callback:
|
| 4732 |
+
post:
|
| 4733 |
+
consumes:
|
| 4734 |
+
- application/json
|
| 4735 |
+
description: Handle asynchronous payment callback and update transaction status
|
| 4736 |
+
parameters:
|
| 4737 |
+
- description: Payment Callback Request
|
| 4738 |
+
in: body
|
| 4739 |
+
name: request
|
| 4740 |
+
required: true
|
| 4741 |
+
schema:
|
| 4742 |
+
$ref: '#/definitions/dto.PaymentCallbackRequest'
|
| 4743 |
+
produces:
|
| 4744 |
+
- application/json
|
| 4745 |
+
responses:
|
| 4746 |
+
"200":
|
| 4747 |
+
description: OK
|
| 4748 |
+
schema:
|
| 4749 |
+
$ref: '#/definitions/dto.SuccessResponse-dto_PaymentCallbackResponse'
|
| 4750 |
+
"400":
|
| 4751 |
+
description: Bad Request
|
| 4752 |
+
schema:
|
| 4753 |
+
$ref: '#/definitions/dto.ErrorResponse'
|
| 4754 |
+
"404":
|
| 4755 |
+
description: Not Found
|
| 4756 |
+
schema:
|
| 4757 |
+
$ref: '#/definitions/dto.ErrorResponse'
|
| 4758 |
+
summary: Payment Callback
|
| 4759 |
+
tags:
|
| 4760 |
+
- Payment
|
| 4761 |
/api/v1/super-admin/users:
|
| 4762 |
get:
|
| 4763 |
consumes:
|