diff --git a/src/flextype/core/Files/Files.php b/src/flextype/core/Files/Files.php new file mode 100644 index 00000000..c5f889a0 --- /dev/null +++ b/src/flextype/core/Files/Files.php @@ -0,0 +1,45 @@ +flextype = $flextype; + } + + /** + * Create file + * + * @param string $data Unique identifier of the entry(entries). + * @return array The entry array data. + * + * @access public + */ + public function create(string $data) : array + { + + } +} diff --git a/src/flextype/endpoints/delivery/files.php b/src/flextype/endpoints/delivery/files.php new file mode 100644 index 00000000..210539c7 --- /dev/null +++ b/src/flextype/endpoints/delivery/files.php @@ -0,0 +1,29 @@ + ['type' => 'Error', 'id' => 'AccessTokenInvalid'], 'message' => 'The access token you sent could not be found or is invalid.']; +$api_sys_messages['NotFound'] = ['sys' => ['type' => 'Error', 'id' => 'NotFound'], 'message' => 'The resource could not be found.']; + +/** + * Validate delivery files token + */ +function validate_delivery_files_token($token) : bool +{ + return Filesystem::has(PATH['project'] . '/tokens/delivery/files/' . $token . '/token.yaml'); +}