<?php

namespace App\PackagesApi\Docs\v3;

class GlobalApiDoc extends AbstractV3Doc
{
	/**
	 * @return array
	 */
    public static function endPoints()
    {
        return [
            'title' => 'Global',
            'endpoints' => [

                [
                    'title' => 'Global settings',
                    'desc' => 'Backend settings, credentials',

                    'route' => route('global.settings'),
                    'method' => 'GET',
                    'headers' => self::middlewareHeaders(),

                    'response' => [
                        200 => [
                            'headers' => self::responseHeaders(),
                            'body' => [
                                'success' => true,
                                'settings' => [
                                    [
                                        'aws_access' => "Encrypted with public key AWS access key",
                                        'aws_secret' => "Encrypted with public key AWS access key",
                                        'video' => [
                                            'bucket' => 'Destination bucket where to upload video',
                                            'region' => 'Destination region',
                                            'endpoint' => 'Destination endpoint',
                                        ]
                                    ]
                                ]
                            ],
                        ]
                    ],
                ],

                [
                    'title' => 'Server Time',
                    'desc' => 'Backend server time',

                    'route' => route('global.server-time'),
                    'method' => 'GET',
                    'headers' => self::middlewareHeaders(),

                    'response' => [
                        200 => [
                            'headers' => self::responseHeaders(),
                            'body' => [
                                'success' => true,
                                'time' => "2019-05-21 15:09:30",
                                'timezone' => "UTC"
                            ],
                        ]
                    ],
                ],

//                [
//                    'title' => 'Global messages',
//                    'desc' => 'Backend messages',
//
//                    'route' => route('global.messages'),
//                    'method' => 'GET',
//                    'headers' => self::middlewareHeaders(),
//
//                    'response' => [
//                        200 => [
//                            'headers' => self::responseHeaders(),
//                            'body' => [
//                                'success' => true,
//                                'messages' => [
//                                    [
//                                        'invite_text' => "",
//                                    ]
//                                ]
//                            ],
//                        ]
//                    ],
//                ],

            ]
        ];
    }

}
