From 3a3fbaedba8df73b5d78f9ca306059cfc8954364 Mon Sep 17 00:00:00 2001 From: Pierre Ecarlat <pecarlat@grandlyon.com> Date: Fri, 23 Aug 2024 11:36:37 +0200 Subject: [PATCH] removed swagger --- docs/swagger.json | 1489 --------------------------------------------- docs/swagger.yaml | 985 ------------------------------ package-lock.json | 6 - 3 files changed, 2480 deletions(-) delete mode 100644 docs/swagger.json delete mode 100644 docs/swagger.yaml delete mode 100644 package-lock.json diff --git a/docs/swagger.json b/docs/swagger.json deleted file mode 100644 index 6d21452..0000000 --- a/docs/swagger.json +++ /dev/null @@ -1,1489 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "description": "This is backend of Ecolyo-Agent, a backoffice managing newsletters, SGE consents, fluid prices and custom alerts for Ecolyo", - "title": "Ecolyo-Agent API", - "termsOfService": "http://swagger.io/terms/", - "contact": { - "name": "API Support", - "email": "rpailharey@grandlyon.com" - }, - "version": "1.0.0" - }, - "paths": { - "/api/admin/consent": { - "get": { - "description": "Search for consents based on the pointID", - "produces": [ - "application/json" - ], - "tags": [ - "consent" - ], - "summary": "Search for consents", - "parameters": [ - { - "type": "string", - "description": "pointID to search", - "name": "search", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.GrdfConsentSwagger" - } - } - }, - "400": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/admin/sge/consent": { - "get": { - "description": "Search for consents based on the pointID", - "produces": [ - "application/json" - ], - "tags": [ - "consent" - ], - "summary": "Search for consents", - "parameters": [ - { - "type": "string", - "description": "pointID to search", - "name": "search", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.SgeConsentSwagger" - } - } - }, - "400": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/customPopup": { - "put": { - "description": "Update custom popup content", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "customPopup" - ], - "summary": "Update custom popup content", - "parameters": [ - { - "description": "CustomPopup to create/update with new content", - "name": "customPopup", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.CustomPopup" - } - } - ], - "responses": { - "200": { - "description": "Updated successfully", - "schema": { - "$ref": "#/definitions/models.CustomPopup" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "string" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/mailSubject": { - "put": { - "description": "Create/update a specific mailSubject' content", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "mailSubject" - ], - "summary": "Create/update a specific mailSubject' content", - "parameters": [ - { - "description": "MailSubject to create/update with new content", - "name": "mailSubject", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.MailSubject" - } - } - ], - "responses": { - "200": { - "description": "Updated successfully", - "schema": { - "$ref": "#/definitions/models.MailSubject" - } - }, - "201": { - "description": "Created successfully", - "schema": { - "$ref": "#/definitions/models.MailSubject" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "string" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/mailSubject/{year}/{month}": { - "get": { - "description": "Get details of a specific mailSubject", - "produces": [ - "application/json" - ], - "tags": [ - "mailSubject" - ], - "summary": "Get details of a specific mailSubject", - "parameters": [ - { - "type": "integer", - "description": "Year of the mailSubject", - "name": "year", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Month of the mailSubject", - "name": "month", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.MailSubject" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - }, - "delete": { - "description": "Delete a specific mailSubject", - "produces": [ - "application/json" - ], - "tags": [ - "mailSubject" - ], - "summary": "Delete a specific mailSubject", - "parameters": [ - { - "type": "integer", - "description": "Year of the mailSubject", - "name": "year", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Month of the mailSubject", - "name": "month", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "successful delete", - "schema": { - "type": "string" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/monthlyInfo": { - "get": { - "description": "Get details of all monthlyInfo", - "produces": [ - "application/json" - ], - "tags": [ - "monthlyInfo" - ], - "summary": "List all monthlyInfo", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.MonthlyInfo" - } - } - } - } - }, - "put": { - "description": "Create/update a specific monthlyInfo' content", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "monthlyInfo" - ], - "summary": "Create/update a specific monthlyInfo' content", - "parameters": [ - { - "description": "MonthlyInfo to create/update with new content", - "name": "monthlyInfo", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.MonthlyInfo" - } - } - ], - "responses": { - "200": { - "description": "Updated successfully", - "schema": { - "$ref": "#/definitions/models.MonthlyInfo" - } - }, - "201": { - "description": "Created successfully", - "schema": { - "$ref": "#/definitions/models.MonthlyInfo" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "string" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/monthlyInfo/{year}/{month}": { - "get": { - "description": "Get details of a specific monthlyInfo", - "produces": [ - "application/json" - ], - "tags": [ - "monthlyInfo" - ], - "summary": "Get details of a specific monthlyInfo", - "parameters": [ - { - "type": "integer", - "description": "Year of the monthlyInfo", - "name": "year", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Month of the monthlyInfo", - "name": "month", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.MonthlyInfo" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - }, - "delete": { - "description": "Delete a specific monthlyInfo", - "produces": [ - "application/json" - ], - "tags": [ - "monthlyInfo" - ], - "summary": "Delete a specific monthlyInfo", - "parameters": [ - { - "type": "integer", - "description": "Year of the monthlyInfo", - "name": "year", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Month of the monthlyInfo", - "name": "month", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "successful delete", - "schema": { - "type": "string" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/monthlyNews": { - "get": { - "description": "Get details of all monthlyNews", - "produces": [ - "application/json" - ], - "tags": [ - "monthlyNews" - ], - "summary": "List all monthlyNews", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.MonthlyNews" - } - } - } - } - }, - "put": { - "description": "Create/update a specific monthlyNews' content", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "monthlyNews" - ], - "summary": "Create/update a specific monthlyNews' content", - "parameters": [ - { - "description": "MonthlyNews to create/update with new content", - "name": "monthlyNews", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.MonthlyNews" - } - } - ], - "responses": { - "200": { - "description": "Updated successfully", - "schema": { - "$ref": "#/definitions/models.MonthlyNews" - } - }, - "201": { - "description": "Created successfully", - "schema": { - "$ref": "#/definitions/models.MonthlyNews" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "string" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/monthlyNews/{year}/{month}": { - "get": { - "description": "Get details of a specific monthlyNews", - "produces": [ - "application/json" - ], - "tags": [ - "monthlyNews" - ], - "summary": "Get details of a specific monthlyNews", - "parameters": [ - { - "type": "integer", - "description": "Year of the monthlyNews", - "name": "year", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Month of the monthlyNews", - "name": "month", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.MonthlyNews" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - }, - "delete": { - "description": "Delete a specific monthlyNews", - "produces": [ - "application/json" - ], - "tags": [ - "monthlyNews" - ], - "summary": "Delete a specific monthlyNews", - "parameters": [ - { - "type": "integer", - "description": "Year of the monthlyNews", - "name": "year", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Month of the monthlyNews", - "name": "month", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "successful delete", - "schema": { - "type": "string" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/partnersInfo": { - "put": { - "description": "Update partnersInfo' content", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "partnersInfo" - ], - "summary": "Update partnersInfo' content", - "parameters": [ - { - "description": "PartnersInfo to create/update with new content", - "name": "partnersInfo", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.PartnersInfo" - } - } - ], - "responses": { - "200": { - "description": "Updated successfully", - "schema": { - "$ref": "#/definitions/models.PartnersInfo" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "string" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/poll": { - "get": { - "description": "Get details of all polls", - "produces": [ - "application/json" - ], - "tags": [ - "poll" - ], - "summary": "List all polls", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/models.Poll" - } - } - } - } - }, - "put": { - "description": "Update a specific poll' content", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "poll" - ], - "summary": "Update a specific poll' content", - "parameters": [ - { - "description": "Poll to update with new content", - "name": "poll", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.Poll" - } - } - ], - "responses": { - "200": { - "description": "Updated successfully", - "schema": { - "$ref": "#/definitions/models.Poll" - } - }, - "201": { - "description": "Created successfully", - "schema": { - "$ref": "#/definitions/models.Poll" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "string" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/poll/{year}/{month}": { - "get": { - "description": "Get details of a specific poll", - "produces": [ - "application/json" - ], - "tags": [ - "poll" - ], - "summary": "Get details of a specific poll", - "parameters": [ - { - "type": "integer", - "description": "Year of the poll", - "name": "year", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Month of the poll", - "name": "month", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.Poll" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - }, - "delete": { - "description": "Delete a specific poll", - "produces": [ - "application/json" - ], - "tags": [ - "poll" - ], - "summary": "Delete a specific poll", - "parameters": [ - { - "type": "integer", - "description": "Year of the poll", - "name": "year", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Month of the poll", - "name": "month", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "successful delete", - "schema": { - "type": "string" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/animator/price": { - "put": { - "description": "Add a new price entry", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "prices" - ], - "summary": "Add a new price entry", - "parameters": [ - { - "description": "Price to create/update with new content", - "name": "price", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "Updated successfully", - "schema": { - "type": "object" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "string" - } - }, - "500": { - "description": "Internal server error", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/common/customPopup": { - "get": { - "description": "Give status of custom poup", - "produces": [ - "application/json" - ], - "tags": [ - "customPopup" - ], - "summary": "Give status of custom popup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.CustomPopup" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/common/monthlyReport/{year}/{month}": { - "get": { - "description": "Get details of a specific monthlyReport", - "produces": [ - "application/json" - ], - "tags": [ - "monthlyReport" - ], - "summary": "Get details of a specific monthlyReport", - "parameters": [ - { - "type": "integer", - "description": "Year of the monthlyReport", - "name": "year", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Month of the monthlyReport", - "name": "month", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.MonthlyReport" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/common/partnersInfo": { - "get": { - "description": "Give status of partners' services", - "produces": [ - "application/json" - ], - "tags": [ - "partnersInfo" - ], - "summary": "Give status of partners' services", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.PartnersInfo" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/common/prices": { - "get": { - "description": "Get all prices", - "produces": [ - "application/json" - ], - "tags": [ - "prices" - ], - "summary": "Get all prices", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/common/prices/fluidType": { - "get": { - "description": "Get all prices for a given fluid", - "produces": [ - "application/json" - ], - "tags": [ - "prices" - ], - "summary": "Get all prices for a given fluid", - "parameters": [ - { - "type": "integer", - "description": "FluidType requested", - "name": "fluidtype", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/grdf/consent": { - "post": { - "description": "Create a new consent", - "produces": [ - "application/json" - ], - "tags": [ - "consent" - ], - "summary": "Create a new consent", - "parameters": [ - { - "type": "integer", - "description": "ID of the consent", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/models.GrdfConsentSwagger" - } - }, - "400": { - "description": "Bad request", - "schema": { - "type": "string" - } - }, - "500": { - "description": "couldn't create consent", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/grdf/consent/{id}": { - "get": { - "description": "Get details of a specific consent", - "produces": [ - "application/json" - ], - "tags": [ - "consent" - ], - "summary": "Get details of a specific consent", - "parameters": [ - { - "type": "integer", - "description": "ID of the consent", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.GrdfConsentSwagger" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - }, - "delete": { - "description": "Delete a specific consent", - "produces": [ - "application/json" - ], - "tags": [ - "consent" - ], - "summary": "Delete a specific consent", - "parameters": [ - { - "type": "integer", - "description": "ID of the consent", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.GrdfConsentSwagger" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - }, - "500": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/sge/consent": { - "put": { - "description": "Update a consent, giving it a serviceID", - "produces": [ - "application/json" - ], - "tags": [ - "consent" - ], - "summary": "Update a consent, giving it a serviceID", - "parameters": [ - { - "description": "service ID", - "name": "id", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/models.UpdateSgeConsentBody" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.SgeConsentSwagger" - } - }, - "400": { - "description": "invalid service id", - "schema": { - "type": "string" - } - }, - "404": { - "description": "couldn't find consent", - "schema": { - "type": "string" - } - }, - "500": { - "description": "couldn't parse body", - "schema": { - "type": "string" - } - } - } - }, - "post": { - "description": "Create a new consent", - "produces": [ - "application/json" - ], - "tags": [ - "consent" - ], - "summary": "Create a new consent", - "parameters": [ - { - "type": "integer", - "description": "ID of the consent", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/models.SgeConsentSwagger" - } - }, - "400": { - "description": "Bad request", - "schema": { - "type": "string" - } - }, - "500": { - "description": "couldn't create consent", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/sge/consent/{id}": { - "get": { - "description": "Get details of a specific consent", - "produces": [ - "application/json" - ], - "tags": [ - "consent" - ], - "summary": "Get details of a specific consent", - "parameters": [ - { - "type": "integer", - "description": "ID of the consent", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.SgeConsentSwagger" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - }, - "delete": { - "description": "Delete a specific consent", - "produces": [ - "application/json" - ], - "tags": [ - "consent" - ], - "summary": "Delete a specific consent", - "parameters": [ - { - "type": "integer", - "description": "ID of the consent", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/models.SgeConsentSwagger" - } - }, - "404": { - "description": "Not found", - "schema": { - "type": "string" - } - }, - "500": { - "description": "Not found", - "schema": { - "type": "string" - } - } - } - } - } - }, - "definitions": { - "models.CustomPopup": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "popupEnabled": { - "type": "boolean" - }, - "title": { - "type": "string" - } - } - }, - "models.GrdfConsentSwagger": { - "type": "object", - "properties": { - "CreatedAt": { - "type": "string" - }, - "DeletedAt": { - "type": "string" - }, - "ID": { - "type": "integer" - }, - "UpdatedAt": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "pce": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "startDate": { - "type": "string" - } - } - }, - "models.MailSubject": { - "type": "object", - "properties": { - "month": { - "type": "integer" - }, - "subject": { - "type": "string" - }, - "year": { - "type": "integer" - } - } - }, - "models.MonthlyInfo": { - "type": "object", - "properties": { - "image": { - "type": "string" - }, - "info": { - "type": "string" - }, - "month": { - "type": "integer" - }, - "year": { - "type": "integer" - } - } - }, - "models.MonthlyNews": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "month": { - "type": "integer" - }, - "title": { - "type": "string" - }, - "year": { - "type": "integer" - } - } - }, - "models.MonthlyReport": { - "type": "object", - "properties": { - "image": { - "type": "string" - }, - "info": { - "type": "string" - }, - "link": { - "type": "string" - }, - "month": { - "type": "integer" - }, - "newsContent": { - "type": "string" - }, - "newsTitle": { - "type": "string" - }, - "question": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "year": { - "type": "integer" - } - } - }, - "models.PartnersInfo": { - "type": "object", - "properties": { - "egl_failure": { - "type": "boolean" - }, - "enedis_failure": { - "type": "boolean" - }, - "grdf_failure": { - "type": "boolean" - }, - "id": { - "type": "integer" - }, - "notification_activated": { - "type": "boolean" - } - } - }, - "models.Poll": { - "type": "object", - "properties": { - "link": { - "type": "string" - }, - "month": { - "type": "integer" - }, - "question": { - "type": "string" - }, - "year": { - "type": "integer" - } - } - }, - "models.SgeConsentSwagger": { - "type": "object", - "properties": { - "CreatedAt": { - "type": "string" - }, - "DeletedAt": { - "type": "string" - }, - "ID": { - "type": "integer" - }, - "UpdatedAt": { - "type": "string" - }, - "address": { - "type": "string" - }, - "city": { - "type": "string" - }, - "endDate": { - "type": "string" - }, - "firstname": { - "type": "string" - }, - "inseeCode": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "pointID": { - "type": "integer" - }, - "postalCode": { - "type": "string" - }, - "safetyOnBoarding": { - "type": "boolean" - }, - "serviceID": { - "type": "integer" - } - } - }, - "models.UpdateSgeConsentBody": { - "type": "object", - "properties": { - "serviceID": { - "type": "integer" - } - } - } - } -} \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml deleted file mode 100644 index e3198ce..0000000 --- a/docs/swagger.yaml +++ /dev/null @@ -1,985 +0,0 @@ -definitions: - models.CustomPopup: - properties: - description: - type: string - endDate: - type: string - id: - type: integer - popupEnabled: - type: boolean - title: - type: string - image: - type: string - type: object - models.GrdfConsentSwagger: - properties: - CreatedAt: - type: string - DeletedAt: - type: string - ID: - type: integer - UpdatedAt: - type: string - endDate: - type: string - firstname: - type: string - lastname: - type: string - pce: - type: string - postalCode: - type: string - startDate: - type: string - type: object - models.MailSubject: - properties: - month: - type: integer - subject: - type: string - year: - type: integer - type: object - models.MonthlyInfo: - properties: - image: - type: string - info: - type: string - month: - type: integer - year: - type: integer - type: object - models.MonthlyNews: - properties: - content: - type: string - month: - type: integer - title: - type: string - year: - type: integer - type: object - models.MonthlyReport: - properties: - image: - type: string - info: - type: string - link: - type: string - month: - type: integer - newsContent: - type: string - newsTitle: - type: string - question: - type: string - subject: - type: string - year: - type: integer - type: object - models.PartnersInfo: - properties: - egl_failure: - type: boolean - enedis_failure: - type: boolean - grdf_failure: - type: boolean - id: - type: integer - notification_activated: - type: boolean - type: object - models.Poll: - properties: - link: - type: string - month: - type: integer - question: - type: string - year: - type: integer - type: object - models.SgeConsentSwagger: - properties: - CreatedAt: - type: string - DeletedAt: - type: string - ID: - type: integer - UpdatedAt: - type: string - address: - type: string - city: - type: string - endDate: - type: string - firstname: - type: string - inseeCode: - type: string - lastname: - type: string - pointID: - type: integer - postalCode: - type: string - safetyOnBoarding: - type: boolean - serviceID: - type: integer - type: object - models.UpdateSgeConsentBody: - properties: - serviceID: - type: integer - type: object -info: - contact: - email: rpailharey@grandlyon.com - name: API Support - description: This is backend of Ecolyo-Agent, a backoffice managing newsletters, - SGE consents, fluid prices and custom alerts for Ecolyo - termsOfService: http://swagger.io/terms/ - title: Ecolyo-Agent API - version: 1.0.0 -paths: - /api/admin/consent: - get: - description: Search for consents based on the pointID - parameters: - - description: pointID to search - in: query - name: search - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - items: - $ref: '#/definitions/models.GrdfConsentSwagger' - type: array - "400": - description: Not found - schema: - type: string - summary: Search for consents - tags: - - consent - /api/admin/sge/consent: - get: - description: Search for consents based on the pointID - parameters: - - description: pointID to search - in: query - name: search - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - items: - $ref: '#/definitions/models.SgeConsentSwagger' - type: array - "400": - description: Not found - schema: - type: string - summary: Search for consents - tags: - - consent - /api/animator/customPopup: - put: - consumes: - - application/json - description: Update custom popup content - parameters: - - description: CustomPopup to create/update with new content - in: body - name: customPopup - required: true - schema: - $ref: '#/definitions/models.CustomPopup' - produces: - - application/json - responses: - "200": - description: Updated successfully - schema: - $ref: '#/definitions/models.CustomPopup' - "400": - description: Bad Request - schema: - type: string - "500": - description: Internal server error - schema: - type: string - summary: Update custom popup content - tags: - - customPopup - /api/animator/mailSubject: - put: - consumes: - - application/json - description: Create/update a specific mailSubject' content - parameters: - - description: MailSubject to create/update with new content - in: body - name: mailSubject - required: true - schema: - $ref: '#/definitions/models.MailSubject' - produces: - - application/json - responses: - "200": - description: Updated successfully - schema: - $ref: '#/definitions/models.MailSubject' - "201": - description: Created successfully - schema: - $ref: '#/definitions/models.MailSubject' - "400": - description: Bad Request - schema: - type: string - "500": - description: Internal server error - schema: - type: string - summary: Create/update a specific mailSubject' content - tags: - - mailSubject - /api/animator/mailSubject/{year}/{month}: - delete: - description: Delete a specific mailSubject - parameters: - - description: Year of the mailSubject - in: path - name: year - required: true - type: integer - - description: Month of the mailSubject - in: path - name: month - required: true - type: integer - produces: - - application/json - responses: - "200": - description: successful delete - schema: - type: string - "404": - description: Not found - schema: - type: string - summary: Delete a specific mailSubject - tags: - - mailSubject - get: - description: Get details of a specific mailSubject - parameters: - - description: Year of the mailSubject - in: path - name: year - required: true - type: integer - - description: Month of the mailSubject - in: path - name: month - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.MailSubject' - "404": - description: Not found - schema: - type: string - summary: Get details of a specific mailSubject - tags: - - mailSubject - /api/animator/monthlyInfo: - get: - description: Get details of all monthlyInfo - produces: - - application/json - responses: - "200": - description: OK - schema: - items: - $ref: '#/definitions/models.MonthlyInfo' - type: array - summary: List all monthlyInfo - tags: - - monthlyInfo - put: - consumes: - - application/json - description: Create/update a specific monthlyInfo' content - parameters: - - description: MonthlyInfo to create/update with new content - in: body - name: monthlyInfo - required: true - schema: - $ref: '#/definitions/models.MonthlyInfo' - produces: - - application/json - responses: - "200": - description: Updated successfully - schema: - $ref: '#/definitions/models.MonthlyInfo' - "201": - description: Created successfully - schema: - $ref: '#/definitions/models.MonthlyInfo' - "400": - description: Bad Request - schema: - type: string - "500": - description: Internal server error - schema: - type: string - summary: Create/update a specific monthlyInfo' content - tags: - - monthlyInfo - /api/animator/monthlyInfo/{year}/{month}: - delete: - description: Delete a specific monthlyInfo - parameters: - - description: Year of the monthlyInfo - in: path - name: year - required: true - type: integer - - description: Month of the monthlyInfo - in: path - name: month - required: true - type: integer - produces: - - application/json - responses: - "200": - description: successful delete - schema: - type: string - "404": - description: Not found - schema: - type: string - summary: Delete a specific monthlyInfo - tags: - - monthlyInfo - get: - description: Get details of a specific monthlyInfo - parameters: - - description: Year of the monthlyInfo - in: path - name: year - required: true - type: integer - - description: Month of the monthlyInfo - in: path - name: month - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.MonthlyInfo' - "404": - description: Not found - schema: - type: string - summary: Get details of a specific monthlyInfo - tags: - - monthlyInfo - /api/animator/monthlyNews: - get: - description: Get details of all monthlyNews - produces: - - application/json - responses: - "200": - description: OK - schema: - items: - $ref: '#/definitions/models.MonthlyNews' - type: array - summary: List all monthlyNews - tags: - - monthlyNews - put: - consumes: - - application/json - description: Create/update a specific monthlyNews' content - parameters: - - description: MonthlyNews to create/update with new content - in: body - name: monthlyNews - required: true - schema: - $ref: '#/definitions/models.MonthlyNews' - produces: - - application/json - responses: - "200": - description: Updated successfully - schema: - $ref: '#/definitions/models.MonthlyNews' - "201": - description: Created successfully - schema: - $ref: '#/definitions/models.MonthlyNews' - "400": - description: Bad Request - schema: - type: string - "500": - description: Internal server error - schema: - type: string - summary: Create/update a specific monthlyNews' content - tags: - - monthlyNews - /api/animator/monthlyNews/{year}/{month}: - delete: - description: Delete a specific monthlyNews - parameters: - - description: Year of the monthlyNews - in: path - name: year - required: true - type: integer - - description: Month of the monthlyNews - in: path - name: month - required: true - type: integer - produces: - - application/json - responses: - "200": - description: successful delete - schema: - type: string - "404": - description: Not found - schema: - type: string - summary: Delete a specific monthlyNews - tags: - - monthlyNews - get: - description: Get details of a specific monthlyNews - parameters: - - description: Year of the monthlyNews - in: path - name: year - required: true - type: integer - - description: Month of the monthlyNews - in: path - name: month - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.MonthlyNews' - "404": - description: Not found - schema: - type: string - summary: Get details of a specific monthlyNews - tags: - - monthlyNews - /api/animator/partnersInfo: - put: - consumes: - - application/json - description: Update partnersInfo' content - parameters: - - description: PartnersInfo to create/update with new content - in: body - name: partnersInfo - required: true - schema: - $ref: '#/definitions/models.PartnersInfo' - produces: - - application/json - responses: - "200": - description: Updated successfully - schema: - $ref: '#/definitions/models.PartnersInfo' - "400": - description: Bad Request - schema: - type: string - "500": - description: Internal server error - schema: - type: string - summary: Update partnersInfo' content - tags: - - partnersInfo - /api/animator/poll: - get: - description: Get details of all polls - produces: - - application/json - responses: - "200": - description: OK - schema: - items: - $ref: '#/definitions/models.Poll' - type: array - summary: List all polls - tags: - - poll - put: - consumes: - - application/json - description: Update a specific poll' content - parameters: - - description: Poll to update with new content - in: body - name: poll - required: true - schema: - $ref: '#/definitions/models.Poll' - produces: - - application/json - responses: - "200": - description: Updated successfully - schema: - $ref: '#/definitions/models.Poll' - "201": - description: Created successfully - schema: - $ref: '#/definitions/models.Poll' - "400": - description: Bad Request - schema: - type: string - "500": - description: Internal server error - schema: - type: string - summary: Update a specific poll' content - tags: - - poll - /api/animator/poll/{year}/{month}: - delete: - description: Delete a specific poll - parameters: - - description: Year of the poll - in: path - name: year - required: true - type: integer - - description: Month of the poll - in: path - name: month - required: true - type: integer - produces: - - application/json - responses: - "200": - description: successful delete - schema: - type: string - "404": - description: Not found - schema: - type: string - summary: Delete a specific poll - tags: - - poll - get: - description: Get details of a specific poll - parameters: - - description: Year of the poll - in: path - name: year - required: true - type: integer - - description: Month of the poll - in: path - name: month - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.Poll' - "404": - description: Not found - schema: - type: string - summary: Get details of a specific poll - tags: - - poll - /api/animator/price: - put: - consumes: - - application/json - description: Add a new price entry - parameters: - - description: Price to create/update with new content - in: body - name: price - required: true - schema: - type: object - produces: - - application/json - responses: - "200": - description: Updated successfully - schema: - type: object - "400": - description: Bad Request - schema: - type: string - "500": - description: Internal server error - schema: - type: string - summary: Add a new price entry - tags: - - prices - /api/common/customPopup: - get: - description: Give status of custom poup - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.CustomPopup' - "404": - description: Not found - schema: - type: string - summary: Give status of custom popup - tags: - - customPopup - /api/common/monthlyReport/{year}/{month}: - get: - description: Get details of a specific monthlyReport - parameters: - - description: Year of the monthlyReport - in: path - name: year - required: true - type: integer - - description: Month of the monthlyReport - in: path - name: month - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.MonthlyReport' - "404": - description: Not found - schema: - type: string - summary: Get details of a specific monthlyReport - tags: - - monthlyReport - /api/common/partnersInfo: - get: - description: Give status of partners' services - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.PartnersInfo' - "404": - description: Not found - schema: - type: string - summary: Give status of partners' services - tags: - - partnersInfo - /api/common/prices: - get: - description: Get all prices - produces: - - application/json - responses: - "200": - description: OK - schema: - type: object - "404": - description: Not found - schema: - type: string - summary: Get all prices - tags: - - prices - /api/common/prices/fluidType: - get: - description: Get all prices for a given fluid - parameters: - - description: FluidType requested - in: path - name: fluidtype - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - type: object - "404": - description: Not found - schema: - type: string - summary: Get all prices for a given fluid - tags: - - prices - /api/grdf/consent: - post: - description: Create a new consent - parameters: - - description: ID of the consent - in: path - name: id - required: true - type: integer - produces: - - application/json - responses: - "201": - description: Created - schema: - $ref: '#/definitions/models.GrdfConsentSwagger' - "400": - description: Bad request - schema: - type: string - "500": - description: couldn't create consent - schema: - type: string - summary: Create a new consent - tags: - - consent - /api/grdf/consent/{id}: - delete: - description: Delete a specific consent - parameters: - - description: ID of the consent - in: path - name: id - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.GrdfConsentSwagger' - "404": - description: Not found - schema: - type: string - "500": - description: Not found - schema: - type: string - summary: Delete a specific consent - tags: - - consent - get: - description: Get details of a specific consent - parameters: - - description: ID of the consent - in: path - name: id - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.GrdfConsentSwagger' - "404": - description: Not found - schema: - type: string - summary: Get details of a specific consent - tags: - - consent - /api/sge/consent: - post: - description: Create a new consent - parameters: - - description: ID of the consent - in: path - name: id - required: true - type: integer - produces: - - application/json - responses: - "201": - description: Created - schema: - $ref: '#/definitions/models.SgeConsentSwagger' - "400": - description: Bad request - schema: - type: string - "500": - description: couldn't create consent - schema: - type: string - summary: Create a new consent - tags: - - consent - put: - description: Update a consent, giving it a serviceID - parameters: - - description: service ID - in: body - name: id - required: true - schema: - $ref: '#/definitions/models.UpdateSgeConsentBody' - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.SgeConsentSwagger' - "400": - description: invalid service id - schema: - type: string - "404": - description: couldn't find consent - schema: - type: string - "500": - description: couldn't parse body - schema: - type: string - summary: Update a consent, giving it a serviceID - tags: - - consent - /api/sge/consent/{id}: - delete: - description: Delete a specific consent - parameters: - - description: ID of the consent - in: path - name: id - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.SgeConsentSwagger' - "404": - description: Not found - schema: - type: string - "500": - description: Not found - schema: - type: string - summary: Delete a specific consent - tags: - - consent - get: - description: Get details of a specific consent - parameters: - - description: ID of the consent - in: path - name: id - required: true - type: integer - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/models.SgeConsentSwagger' - "404": - description: Not found - schema: - type: string - summary: Get details of a specific consent - tags: - - consent -swagger: "2.0" diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index ae50268..0000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "backoffice-server", - "lockfileVersion": 3, - "requires": true, - "packages": {} -} -- GitLab