diff --git a/api/awtis/documentation/1.0.0/awtis.json b/api/awtis/documentation/1.0.0/awtis.json index a2e1eec..48ae398 100644 --- a/api/awtis/documentation/1.0.0/awtis.json +++ b/api/awtis/documentation/1.0.0/awtis.json @@ -660,6 +660,12 @@ "eksplisit": { "type": "boolean" }, + "komante": { + "type": "array", + "items": { + "type": "string" + } + }, "published_at": { "type": "string" }, diff --git a/api/komante/config/routes.json b/api/komante/config/routes.json new file mode 100644 index 0000000..59124ee --- /dev/null +++ b/api/komante/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/komante", + "handler": "komante.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/komante/count", + "handler": "komante.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/komante/:id", + "handler": "komante.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/komante", + "handler": "komante.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/komante/:id", + "handler": "komante.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/komante/:id", + "handler": "komante.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/api/komante/controllers/komante.js b/api/komante/controllers/komante.js new file mode 100644 index 0000000..0d1e990 --- /dev/null +++ b/api/komante/controllers/komante.js @@ -0,0 +1,70 @@ +'use strict'; + +const {default: createStrapi} = require('strapi'); +const {parseMultipartData, sanitizeEntity} = require('strapi-utils') + +const findUser = async userId => { + const user = await strapi.query('user', 'users-permissions').findOne({id: userId}) + return user +} + +module.exports = { + async create(ctx) { + let entity + if (ctx.is('multipart')) { + let {data} = parseMultipartData(ctx) + data.sentAt = new Date() + data.published_at = null + entity = await createStrapi.services.komante.create(data) + } else { + let {body} = ctx.request + body.sentAt = new Date() + body.published_at = null + entity = await strapi.services.komante.create(body) + } + + return sanitizeEntity(entity, {model: strapi.models.komante}) + }, + async find(ctx) { + let entities + if (ctx.query._q) { + entities = await strapi.services.komante.search(ctx.query, []) + for (const entity of entities) { + const user = await findUser(entity.user) + + if (!user) { + throw strapi.errors.badRequest('Not found') + } + + entity.username = user.username + } + } else { + entities = await strapi.services.komante.find(ctx.query, []) + for (const entity of entities) { + const user = await findUser(entity.user) + + if (!user) { + throw strapi.errors.badRequest('Not found') + } + + entity.username = user.username + } + } + + return entities.map(entity => sanitizeEntity(entity, {model: strapi.models.komante})); + }, + async findOne(ctx) { + const {id} = ctx.params + + const entity = await strapi.services.komante.findOne({id}, []) + const user = await findUser(entity.user) + + if (!user) { + throw strapi.errors.badRequest('Not found') + } + + entity.username = user.username + + return sanitizeEntity(entity, {model: strapi.models.komante}) + }, +} diff --git a/api/komante/documentation/1.0.0/komante.json b/api/komante/documentation/1.0.0/komante.json new file mode 100644 index 0000000..6fc693d --- /dev/null +++ b/api/komante/documentation/1.0.0/komante.json @@ -0,0 +1,689 @@ +{ + "paths": { + "/komante": { + "get": { + "deprecated": false, + "description": "Find all the komante's records", + "responses": { + "200": { + "description": "Retrieve komante document(s)", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Komante" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "parameters": [ + { + "name": "_limit", + "in": "query", + "required": false, + "description": "Maximum number of results possible", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "_sort", + "in": "query", + "required": false, + "description": "Sort according to a specific field.", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_start", + "in": "query", + "required": false, + "description": "Skip a specific number of entries (especially useful for pagination)", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "=", + "in": "query", + "required": false, + "description": "Get entries that matches exactly your input", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_ne", + "in": "query", + "required": false, + "description": "Get records that are not equals to something", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lt", + "in": "query", + "required": false, + "description": "Get record that are lower than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lte", + "in": "query", + "required": false, + "description": "Get records that are lower than or equal to a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gt", + "in": "query", + "required": false, + "description": "Get records that are greater than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gte", + "in": "query", + "required": false, + "description": "Get records that are greater than or equal a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_contains", + "in": "query", + "required": false, + "description": "Get records that contains a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_containss", + "in": "query", + "required": false, + "description": "Get records that contains (case sensitive) a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_in", + "in": "query", + "required": false, + "description": "Get records that matches any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + }, + { + "name": "_nin", + "in": "query", + "required": false, + "description": "Get records that doesn't match any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + } + ] + }, + "post": { + "deprecated": false, + "description": "Create a new komante record", + "responses": { + "200": { + "description": "Retrieve komante document(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Komante" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewKomante" + } + } + } + } + } + }, + "/komante/count": { + "get": { + "deprecated": false, + "description": "Retrieve the numver of komante documents", + "responses": { + "200": { + "description": "Retrieve komante document(s)", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "type": "integer" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "parameters": [] + } + }, + "/komante/{id}": { + "get": { + "deprecated": false, + "description": "Find one komante record", + "responses": { + "200": { + "description": "Retrieve komante document(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Komante" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "put": { + "deprecated": false, + "description": "Update a single komante record", + "responses": { + "200": { + "description": "Retrieve komante document(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Komante" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewKomante" + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "delete": { + "deprecated": false, + "description": "Delete a single komante record", + "responses": { + "200": { + "description": "deletes a single komante based on the ID supplied", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + } + } + }, + "components": { + "schemas": { + "Komante": { + "required": [ + "id", + "kontni", + "sentAt" + ], + "properties": { + "id": { + "type": "string" + }, + "kontni": { + "type": "string" + }, + "user": { + "required": [ + "id", + "username", + "email" + ], + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "password": { + "type": "string" + }, + "resetPasswordToken": { + "type": "string" + }, + "confirmationToken": { + "type": "string" + }, + "confirmed": { + "type": "boolean" + }, + "blocked": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + }, + "teks": { + "required": [ + "id", + "tit", + "transkripsyon" + ], + "properties": { + "id": { + "type": "string" + }, + "tit": { + "type": "string" + }, + "transkripsyon": { + "type": "string" + }, + "tradiksyon": { + "type": "component" + }, + "lanne": { + "type": "integer" + }, + "lyen": { + "type": "component" + }, + "awtis": { + "type": "array", + "items": { + "type": "string" + } + }, + "kouteyAchtey": { + "type": "component" + }, + "slug": { + "type": "string" + }, + "kouveti": { + "type": "string" + }, + "okiMizikID": { + "type": "integer" + }, + "user": { + "type": "string" + }, + "eksplisit": { + "type": "boolean" + }, + "komante": { + "type": "array", + "items": { + "type": "string" + } + }, + "published_at": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + }, + "sentAt": { + "type": "string", + "format": "date-time" + }, + "published_at": { + "type": "string", + "format": "date-time" + } + } + }, + "NewKomante": { + "required": [ + "kontni", + "sentAt" + ], + "properties": { + "kontni": { + "type": "string" + }, + "user": { + "type": "string" + }, + "teks": { + "type": "string" + }, + "sentAt": { + "type": "string", + "format": "date-time" + }, + "published_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + } + } + }, + "tags": [ + { + "name": "Komante" + } + ] +} \ No newline at end of file diff --git a/api/komante/models/komante.js b/api/komante/models/komante.js new file mode 100644 index 0000000..e974cb9 --- /dev/null +++ b/api/komante/models/komante.js @@ -0,0 +1,39 @@ +'use strict'; + +const jwennTeksEpiId = async teksId => { + const teks = await strapi.query('teks').find({_id: teksId}) + return teks +} + +const jwennUserEpiId = async userId => { + const user = await strapi.query('user', 'users-permissions').find({_id: userId}) + return user +} + +module.exports = { + lifecycles: { + beforeCreate: async data => { + if (data.kontni && data.teks && data.user) { + const teks = await jwennTeksEpiId(data.teks) + const user = await jwennUserEpiId(data.user) + + if(!teks.length > 0 || !user.length > 0) { + throw strapi.errors.badRequest('Not found') + } + + } else { + throw strapi.errors.badRequest('Missing fields') + } + }, + afterCreate: async data => { + if (data.user) { + strapi.services.email.send( + process.env.SMTP_FROM, + process.env.SMTP_SEND_TO, + `Nouveau commentaire de ${data.user.username}`, + data.kontni + ) + } + } + } +}; diff --git a/api/komante/models/komante.settings.json b/api/komante/models/komante.settings.json new file mode 100644 index 0000000..653e8c4 --- /dev/null +++ b/api/komante/models/komante.settings.json @@ -0,0 +1,35 @@ +{ + "kind": "collectionType", + "collectionName": "komante", + "info": { + "name": "komante", + "description": "" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": true, + "privateAttributes": [ + "createdAt", + "updatedAt" + ] + }, + "attributes": { + "kontni": { + "type": "richtext", + "required": true + }, + "user": { + "plugin": "users-permissions", + "model": "user" + }, + "teks": { + "model": "teks", + "via": "komante" + }, + "sentAt": { + "type": "datetime", + "required": true + } + } +} diff --git a/api/komante/services/komante.js b/api/komante/services/komante.js new file mode 100644 index 0000000..6538a8c --- /dev/null +++ b/api/komante/services/komante.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/api/teks/documentation/1.0.0/teks.json b/api/teks/documentation/1.0.0/teks.json index b27bc81..63d07da 100644 --- a/api/teks/documentation/1.0.0/teks.json +++ b/api/teks/documentation/1.0.0/teks.json @@ -790,6 +790,42 @@ "eksplisit": { "type": "boolean" }, + "komante": { + "type": "array", + "items": { + "required": [ + "id", + "kontni", + "sentAt" + ], + "properties": { + "id": { + "type": "string" + }, + "kontni": { + "type": "string" + }, + "user": { + "type": "string" + }, + "teks": { + "type": "string" + }, + "sentAt": { + "type": "string" + }, + "published_at": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + } + }, "published_at": { "type": "string", "format": "date-time" @@ -912,6 +948,12 @@ "eksplisit": { "type": "boolean" }, + "komante": { + "type": "array", + "items": { + "type": "string" + } + }, "published_at": { "type": "string", "format": "date-time" diff --git a/api/teks/models/teks.settings.json b/api/teks/models/teks.settings.json index 8e85d10..e49a30b 100644 --- a/api/teks/models/teks.settings.json +++ b/api/teks/models/teks.settings.json @@ -64,6 +64,10 @@ }, "eksplisit": { "type": "boolean" + }, + "komante": { + "via": "teks", + "collection": "komante" } } } diff --git a/extensions/documentation/documentation/1.0.0/full_documentation.json b/extensions/documentation/documentation/1.0.0/full_documentation.json index fda777e..9b4e9f7 100644 --- a/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -11,7 +11,7 @@ "url": "https://o-k-i.net" }, "license": null, - "x-generation-date": "06/17/2021 11:24:28 PM" + "x-generation-date": "06/23/2021 12:07:22 AM" }, "x-strapi-config": { "path": "/dokiman", @@ -414,6 +414,517 @@ ] } }, + "/komante": { + "get": { + "deprecated": false, + "description": "Find all the komante's records", + "responses": { + "200": { + "description": "Retrieve komante document(s)", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Komante" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "parameters": [ + { + "name": "_limit", + "in": "query", + "required": false, + "description": "Maximum number of results possible", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "_sort", + "in": "query", + "required": false, + "description": "Sort according to a specific field.", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_start", + "in": "query", + "required": false, + "description": "Skip a specific number of entries (especially useful for pagination)", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "=", + "in": "query", + "required": false, + "description": "Get entries that matches exactly your input", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_ne", + "in": "query", + "required": false, + "description": "Get records that are not equals to something", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lt", + "in": "query", + "required": false, + "description": "Get record that are lower than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lte", + "in": "query", + "required": false, + "description": "Get records that are lower than or equal to a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gt", + "in": "query", + "required": false, + "description": "Get records that are greater than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gte", + "in": "query", + "required": false, + "description": "Get records that are greater than or equal a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_contains", + "in": "query", + "required": false, + "description": "Get records that contains a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_containss", + "in": "query", + "required": false, + "description": "Get records that contains (case sensitive) a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_in", + "in": "query", + "required": false, + "description": "Get records that matches any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + }, + { + "name": "_nin", + "in": "query", + "required": false, + "description": "Get records that doesn't match any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + } + ] + }, + "post": { + "deprecated": false, + "description": "Create a new komante record", + "responses": { + "200": { + "description": "Retrieve komante document(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Komante" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewKomante" + } + } + } + } + } + }, + "/komante/count": { + "get": { + "deprecated": false, + "description": "Retrieve the numver of komante documents", + "responses": { + "200": { + "description": "Retrieve komante document(s)", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "type": "integer" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "parameters": [] + } + }, + "/komante/{id}": { + "get": { + "deprecated": false, + "description": "Find one komante record", + "responses": { + "200": { + "description": "Retrieve komante document(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Komante" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "put": { + "deprecated": false, + "description": "Update a single komante record", + "responses": { + "200": { + "description": "Retrieve komante document(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Komante" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewKomante" + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "delete": { + "deprecated": false, + "description": "Delete a single komante record", + "responses": { + "200": { + "description": "deletes a single komante based on the ID supplied", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "Komante" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, "/slugs": { "get": { "deprecated": false, @@ -994,6 +1505,12 @@ "eksplisit": { "type": "boolean" }, + "komante": { + "type": "array", + "items": { + "type": "string" + } + }, "published_at": { "type": "string" }, @@ -1099,6 +1616,171 @@ } } }, + "Komante": { + "required": [ + "id", + "kontni", + "sentAt" + ], + "properties": { + "id": { + "type": "string" + }, + "kontni": { + "type": "string" + }, + "user": { + "required": [ + "id", + "username", + "email" + ], + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "password": { + "type": "string" + }, + "resetPasswordToken": { + "type": "string" + }, + "confirmationToken": { + "type": "string" + }, + "confirmed": { + "type": "boolean" + }, + "blocked": { + "type": "boolean" + }, + "role": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + }, + "teks": { + "required": [ + "id", + "tit", + "transkripsyon" + ], + "properties": { + "id": { + "type": "string" + }, + "tit": { + "type": "string" + }, + "transkripsyon": { + "type": "string" + }, + "tradiksyon": { + "type": "component" + }, + "lanne": { + "type": "integer" + }, + "lyen": { + "type": "component" + }, + "awtis": { + "type": "array", + "items": { + "type": "string" + } + }, + "kouteyAchtey": { + "type": "component" + }, + "slug": { + "type": "string" + }, + "kouveti": { + "type": "string" + }, + "okiMizikID": { + "type": "integer" + }, + "user": { + "type": "string" + }, + "eksplisit": { + "type": "boolean" + }, + "komante": { + "type": "array", + "items": { + "type": "string" + } + }, + "published_at": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + }, + "sentAt": { + "type": "string", + "format": "date-time" + }, + "published_at": { + "type": "string", + "format": "date-time" + } + } + }, + "NewKomante": { + "required": [ + "kontni", + "sentAt" + ], + "properties": { + "kontni": { + "type": "string" + }, + "user": { + "type": "string" + }, + "teks": { + "type": "string" + }, + "sentAt": { + "type": "string", + "format": "date-time" + }, + "published_at": { + "type": "string", + "format": "date-time" + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + }, "Teks": { "required": [ "id", @@ -1375,6 +2057,42 @@ "eksplisit": { "type": "boolean" }, + "komante": { + "type": "array", + "items": { + "required": [ + "id", + "kontni", + "sentAt" + ], + "properties": { + "id": { + "type": "string" + }, + "kontni": { + "type": "string" + }, + "user": { + "type": "string" + }, + "teks": { + "type": "string" + }, + "sentAt": { + "type": "string" + }, + "published_at": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + } + }, "published_at": { "type": "string", "format": "date-time" @@ -1497,6 +2215,12 @@ "eksplisit": { "type": "boolean" }, + "komante": { + "type": "array", + "items": { + "type": "string" + } + }, "published_at": { "type": "string", "format": "date-time" @@ -1537,6 +2261,9 @@ { "name": "Awtis" }, + { + "name": "Komante" + }, { "name": "Slugs" },