diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index 6c6e77231..c28f8c9af 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -2609,6 +2609,113 @@ var doc = `{ } } }, + "/migration/trello/auth": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns the auth url where the user needs to get its auth code. This code can then be used to migrate everything from trello to Vikunja.", + "produces": [ + "application/json" + ], + "tags": [ + "migration" + ], + "summary": "Get the auth url from trello", + "responses": { + "200": { + "description": "The auth url.", + "schema": { + "$ref": "#/definitions/handler.AuthURL" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, + "/migration/trello/migrate": { + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Migrates all projects, tasks, notes, reminders, subtasks and files from trello to vikunja.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "migration" + ], + "summary": "Migrate all lists, tasks etc. from trello", + "parameters": [ + { + "description": "The auth token previously obtained from the auth url. See the docs for /migration/trello/auth.", + "name": "migrationCode", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/trello.Migration" + } + } + ], + "responses": { + "200": { + "description": "A message telling you everything was migrated successfully.", + "schema": { + "$ref": "#/definitions/models.Message" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, + "/migration/trello/status": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns if the current user already did the migation or not. This is useful to show a confirmation message in the frontend if the user is trying to do the same migration again.", + "produces": [ + "application/json" + ], + "tags": [ + "migration" + ], + "summary": "Get migration status", + "responses": { + "200": { + "description": "The migration status", + "schema": { + "$ref": "#/definitions/migration.Status" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/migration/wunderlist/auth": { "get": { "security": [ @@ -7626,6 +7733,14 @@ var doc = `{ } } }, + "trello.Migration": { + "type": "object", + "properties": { + "code": { + "type": "string" + } + } + }, "user.APIUserPassword": { "type": "object", "properties": { diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index 28280ba85..49bd76d01 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -2592,6 +2592,113 @@ } } }, + "/migration/trello/auth": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns the auth url where the user needs to get its auth code. This code can then be used to migrate everything from trello to Vikunja.", + "produces": [ + "application/json" + ], + "tags": [ + "migration" + ], + "summary": "Get the auth url from trello", + "responses": { + "200": { + "description": "The auth url.", + "schema": { + "$ref": "#/definitions/handler.AuthURL" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, + "/migration/trello/migrate": { + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Migrates all projects, tasks, notes, reminders, subtasks and files from trello to vikunja.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "migration" + ], + "summary": "Migrate all lists, tasks etc. from trello", + "parameters": [ + { + "description": "The auth token previously obtained from the auth url. See the docs for /migration/trello/auth.", + "name": "migrationCode", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/trello.Migration" + } + } + ], + "responses": { + "200": { + "description": "A message telling you everything was migrated successfully.", + "schema": { + "$ref": "#/definitions/models.Message" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, + "/migration/trello/status": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Returns if the current user already did the migation or not. This is useful to show a confirmation message in the frontend if the user is trying to do the same migration again.", + "produces": [ + "application/json" + ], + "tags": [ + "migration" + ], + "summary": "Get migration status", + "responses": { + "200": { + "description": "The migration status", + "schema": { + "$ref": "#/definitions/migration.Status" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/migration/wunderlist/auth": { "get": { "security": [ @@ -7609,6 +7716,14 @@ } } }, + "trello.Migration": { + "type": "object", + "properties": { + "code": { + "type": "string" + } + } + }, "user.APIUserPassword": { "type": "object", "properties": { diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index b69133e67..860a8b373 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -829,6 +829,11 @@ definitions: code: type: string type: object + trello.Migration: + properties: + code: + type: string + type: object user.APIUserPassword: properties: email: @@ -2732,6 +2737,72 @@ paths: summary: Get migration status tags: - migration + /migration/trello/auth: + get: + description: Returns the auth url where the user needs to get its auth code. This code can then be used to migrate everything from trello to Vikunja. + produces: + - application/json + responses: + "200": + description: The auth url. + schema: + $ref: '#/definitions/handler.AuthURL' + "500": + description: Internal server error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Get the auth url from trello + tags: + - migration + /migration/trello/migrate: + post: + consumes: + - application/json + description: Migrates all projects, tasks, notes, reminders, subtasks and files from trello to vikunja. + parameters: + - description: The auth token previously obtained from the auth url. See the docs for /migration/trello/auth. + in: body + name: migrationCode + required: true + schema: + $ref: '#/definitions/trello.Migration' + produces: + - application/json + responses: + "200": + description: A message telling you everything was migrated successfully. + schema: + $ref: '#/definitions/models.Message' + "500": + description: Internal server error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Migrate all lists, tasks etc. from trello + tags: + - migration + /migration/trello/status: + get: + description: Returns if the current user already did the migation or not. This is useful to show a confirmation message in the frontend if the user is trying to do the same migration again. + produces: + - application/json + responses: + "200": + description: The migration status + schema: + $ref: '#/definitions/migration.Status' + "500": + description: Internal server error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Get migration status + tags: + - migration /migration/wunderlist/auth: get: description: Returns the auth url where the user needs to get its auth code. This code can then be used to migrate everything from wunderlist to Vikunja.