feat: implement resolvers

This commit is contained in:
Lakhan Samani
2022-07-10 21:49:33 +05:30
parent 09c3eafe6b
commit e91a819067
87 changed files with 1807 additions and 428 deletions

View File

@@ -2,6 +2,13 @@
package model
type AddWebhookRequest struct {
EventName string `json:"event_name"`
Endpoint string `json:"endpoint"`
Enabled bool `json:"enabled"`
Headers map[string]interface{} `json:"headers"`
}
type AdminLoginInput struct {
AdminSecret string `json:"admin_secret"`
}
@@ -192,6 +199,17 @@ type SignUpInput struct {
RedirectURI *string `json:"redirect_uri"`
}
type TestEndpointRequest struct {
Endpoint string `json:"endpoint"`
EventName string `json:"event_name"`
Headers map[string]interface{} `json:"headers"`
}
type TestEndpointResponse struct {
HTTPStatus *int64 `json:"http_status"`
Response map[string]interface{} `json:"response"`
}
type UpdateAccessInput struct {
UserID string `json:"user_id"`
}
@@ -268,6 +286,14 @@ type UpdateUserInput struct {
Roles []*string `json:"roles"`
}
type UpdateWebhookRequest struct {
ID string `json:"id"`
EventName *string `json:"event_name"`
Endpoint *string `json:"endpoint"`
Enabled *bool `json:"enabled"`
Headers map[string]interface{} `json:"headers"`
}
type User struct {
ID string `json:"id"`
Email string `json:"email"`
@@ -326,12 +352,13 @@ type VerifyEmailInput struct {
}
type Webhook struct {
ID string `json:"id"`
EventName *string `json:"event_name"`
Endpoint *string `json:"endpoint"`
Enabled *bool `json:"enabled"`
CreatedAt *int64 `json:"created_at"`
UpdatedAt *int64 `json:"updated_at"`
ID string `json:"id"`
EventName *string `json:"event_name"`
Endpoint *string `json:"endpoint"`
Enabled *bool `json:"enabled"`
Headers map[string]interface{} `json:"headers"`
CreatedAt *int64 `json:"created_at"`
UpdatedAt *int64 `json:"updated_at"`
}
type WebhookLog struct {
@@ -349,6 +376,10 @@ type WebhookLogs struct {
WebhookLogs []*WebhookLog `json:"webhook_logs"`
}
type WebhookRequest struct {
ID string `json:"id"`
}
type Webhooks struct {
Pagination *Pagination `json:"pagination"`
Webhooks []*Webhook `json:"webhooks"`