701 lines
18 KiB
YAML
701 lines
18 KiB
YAML
openapi: 3.0.3
|
||
info:
|
||
title: MyInpulse Backend Api
|
||
description: this document servers as a documentation for the backend api.
|
||
version: 0.0.0
|
||
|
||
tags:
|
||
- name: Entrepreneurs API
|
||
description: La partie de l'api dédiée aux entrepreneurs
|
||
- name: Admin API
|
||
description: La partie de l'api dédiée aux entrepreneurs
|
||
- name: Shared API
|
||
description: La partie de l'api dédiée aux entrepreneurs et admins
|
||
|
||
|
||
components:
|
||
schemas:
|
||
founder:
|
||
type: object
|
||
properties:
|
||
user:
|
||
type: object
|
||
properties:
|
||
nom:
|
||
type: string
|
||
prenom:
|
||
type: string
|
||
email:
|
||
type: string
|
||
scondaryEmail:
|
||
type: string
|
||
tel:
|
||
type: string
|
||
entrepreneur:
|
||
type: object
|
||
properties:
|
||
ecole:
|
||
type: string
|
||
filiere:
|
||
type: string
|
||
status:
|
||
type: string
|
||
|
||
securitySchemes:
|
||
MyINPulse:
|
||
type: oauth2
|
||
flows:
|
||
implicit:
|
||
authorizationUrl: https://petstore3.swagger.io/oauth/authorize
|
||
scopes:
|
||
MyINPulse-admin: Administrateur
|
||
MyINPulse-entrepreneur: Utilisateur
|
||
|
||
paths:
|
||
/admin/projects:
|
||
get:
|
||
summary: Retourne la liste of projets associés à l'admin
|
||
tags:
|
||
- Admin API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
description:
|
||
JSON array of who’s elements are objects containing necessary information for the view
|
||
(project name, entrepreneur names, etc..)
|
||
of the projects an admin is watching over.
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
E_names:
|
||
type: string
|
||
description: entrepreneur names
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is missing or invalid
|
||
|
||
/admin/appointments/upcoming:
|
||
get:
|
||
summary: Retourne la list des prochains rendez-vous de l'admin
|
||
tags:
|
||
- Admin API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
description:
|
||
JSON array of upcoming appointment data (name, date, time etc..) for an admin.
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
date:
|
||
type: string
|
||
time:
|
||
type: string
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is missing or invalid
|
||
/admin/projects/pending:
|
||
get:
|
||
summary: Retourne la liste des projets en attente de validation
|
||
tags:
|
||
- Admin API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
description:
|
||
JSON array of who’s elements are objects containing
|
||
necessary information for the view (project name,
|
||
entrepreneur names, etc..) of all pending projects.
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
founder:
|
||
$ref: "#/components/schemas/founder"
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is missing or invalid
|
||
|
||
/projects/lcsection/{projectId}/{title}/{date}:
|
||
get:
|
||
summary: Retourne la liste de sections de LC avec un titre donné
|
||
tags:
|
||
- Shared API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
- MyINPulse-entrepreneur
|
||
description:
|
||
JSON array containing Lean Canvas
|
||
section data with a title for the
|
||
current date (or given date if the
|
||
date parameter is passed)
|
||
parameters:
|
||
- in: path
|
||
name: projectId
|
||
schema:
|
||
type: integer
|
||
required: true
|
||
- in: path
|
||
name: title
|
||
schema:
|
||
type: string
|
||
required: true
|
||
description: the name of lc section
|
||
- in: path
|
||
name: date
|
||
required: true
|
||
schema:
|
||
type: string
|
||
description: the date corresponding to the wanted version of lc section
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
type: object
|
||
properties:
|
||
section:
|
||
type: string
|
||
txt:
|
||
type: string
|
||
time:
|
||
type: string
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is missing or invalid
|
||
|
||
/projects/entrepreneurs/{projectId}:
|
||
get:
|
||
summary: Retourne la liste d'entrepreneurs associée à un projet donné
|
||
tags:
|
||
- Shared API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
- MyINPulse-entrepreneur
|
||
description:
|
||
JSON array of entrepreneur
|
||
names associated with a project
|
||
parameters:
|
||
- in: path
|
||
name: projectId
|
||
schema:
|
||
type: integer
|
||
required: true
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
type: string
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is missing or invalid
|
||
/projects/contacts/entrepreneurs/{projectId}:
|
||
get:
|
||
summary: Retourne la liste des contactes d'entrepreneurs associée à un projet donné
|
||
tags:
|
||
- Shared API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
- MyINPulse-entrepreneur
|
||
description:
|
||
JSON array of contacts for
|
||
each participant in the project with id
|
||
projectID.
|
||
parameters:
|
||
- in: path
|
||
name: projectId
|
||
schema:
|
||
type: integer
|
||
required: true
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
email:
|
||
type: string
|
||
tel:
|
||
type: string
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
/projects/contacts/admin/{projectId}:
|
||
get:
|
||
summary: Retourne les contacts de l'admin que accompagne le projet
|
||
tags:
|
||
- Shared API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
- MyINPulse-entrepreneur
|
||
description:
|
||
JSON object containing contact information (name, gmail, tel, etc..)
|
||
the admin supervising the project with id
|
||
projectID.
|
||
parameters:
|
||
- in: path
|
||
name: projectId
|
||
schema:
|
||
type: integer
|
||
required: true
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
email:
|
||
type: string
|
||
tel:
|
||
type: string
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
/projects/appointments/{projectId}:
|
||
get:
|
||
summary: Retourne les rendez-vous du project
|
||
tags:
|
||
- Shared API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
- MyINPulse-entrepreneur
|
||
description:
|
||
JSON array of upcoming and past appointment
|
||
data for the project with id projectID.
|
||
parameters:
|
||
- in: path
|
||
name: projectId
|
||
schema:
|
||
type: integer
|
||
required: true
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: array
|
||
items:
|
||
type: object
|
||
properties:
|
||
appointementId:
|
||
type: integer
|
||
name:
|
||
type: string
|
||
date:
|
||
type: string
|
||
time:
|
||
type: string
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
/projects/appointments/report/{apointementId}:
|
||
get:
|
||
summary: Retourne le rapport pdf du rendez-vous
|
||
tags:
|
||
- Shared API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
- MyINPulse-entrepreneur
|
||
description:
|
||
PDF file containing the ap-
|
||
pointment report
|
||
parameters:
|
||
- in: path
|
||
name: apointementId
|
||
schema:
|
||
type: integer
|
||
required: true
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
content:
|
||
application/pdf:
|
||
schema:
|
||
type: string
|
||
format: binary
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
/projects/request:
|
||
post:
|
||
summary: demander la création et validation d'un projet
|
||
tags:
|
||
- Entrepreneurs API
|
||
description:
|
||
Adds project to pending projects
|
||
to then be accepted or rejected by
|
||
an admin
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-entrepreneur
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
founder:
|
||
$ref: "#/components/schemas/founder"
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
/admin/projects/pending/decision:
|
||
post:
|
||
summary: valider un projet en attente de validation
|
||
tags:
|
||
- Admin API
|
||
description:
|
||
if the request is accepted the status of the
|
||
project is changed to ongoing, entrepreneur
|
||
account is confirmed and the project is linked
|
||
to the admin accepting the request and the
|
||
entrepreneur requesting it. Else the pending
|
||
project and user info are deleted.
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
pedingProjectId:
|
||
type: integer
|
||
decision:
|
||
type: boolean
|
||
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
/admin/projects/add:
|
||
post:
|
||
summary: Ajout mannuel d'un projet
|
||
description:
|
||
Adds a project with the
|
||
inputed details
|
||
tags:
|
||
- Admin API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
name:
|
||
type: string
|
||
founderName:
|
||
type: string
|
||
founderEmail:
|
||
type: string
|
||
school:
|
||
type: string
|
||
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
/admin/projects/remove/{projectId}:
|
||
delete:
|
||
summary: supression d'un project
|
||
description:
|
||
Removes the project
|
||
with the inputed id projectId
|
||
tags:
|
||
- Admin API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
parameters:
|
||
- in: path
|
||
name: projectId
|
||
required: true
|
||
schema:
|
||
type: integer
|
||
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
/lcsection/add/{projectId}:
|
||
post:
|
||
summary: ajouter une sections au LC
|
||
description:
|
||
Adds input data to the user’s LC
|
||
with a specified title.
|
||
tags:
|
||
- Entrepreneurs API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-entrepreneur
|
||
parameters:
|
||
- in: path
|
||
name: projectId
|
||
schema:
|
||
type: integer
|
||
required: true
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
title:
|
||
type: string
|
||
txt:
|
||
type: string
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
/lcsection/modify/{sectionId}:
|
||
put:
|
||
summary: modifier les données d'une section LC
|
||
description:
|
||
Modifies input Lean Canvas section by changing it to
|
||
the information in the request body and changes the
|
||
time stamp.
|
||
tags:
|
||
- Entrepreneurs API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-entrepreneur
|
||
parameters:
|
||
- in: path
|
||
name: sectionId
|
||
schema:
|
||
type: integer
|
||
required: true
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
title:
|
||
type: string
|
||
txt:
|
||
type: string
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
/lcsection/remove/{sectionId}:
|
||
delete:
|
||
summary: supprimer une section LC.
|
||
description:
|
||
Deletes section from Lean Canvas
|
||
tags:
|
||
- Entrepreneurs API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-entrepreneur
|
||
parameters:
|
||
- in: path
|
||
name: sectionId
|
||
schema:
|
||
type: integer
|
||
required: true
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
/appointments/request:
|
||
post:
|
||
summary: demander une rendez-vous
|
||
description:
|
||
will add an appointement request request by the applicant
|
||
to have an appointment to be confirmed or denied by the
|
||
specified participants of the appointement.
|
||
tags:
|
||
- Shared API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-entrepreneur
|
||
- MyINPulse-admin
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
title:
|
||
type: string
|
||
start_time:
|
||
type: string
|
||
end_time:
|
||
type: string
|
||
place:
|
||
type: string
|
||
applicantId:
|
||
type: integer
|
||
participants:
|
||
type: array
|
||
items:
|
||
type: integer
|
||
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
/admin/appointments/report/{appointmentId}:
|
||
post:
|
||
summary: enregistrer une rapport du rendez-vous
|
||
description:
|
||
Generate a PDF file formatted
|
||
from input text and links it
|
||
to the appointement.
|
||
tags:
|
||
- Admin API
|
||
security:
|
||
- MyINPulse:
|
||
- MyINPulse-admin
|
||
parameters:
|
||
- in: path
|
||
name: appointmentId
|
||
required: true
|
||
schema:
|
||
type: integer
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
type: object
|
||
properties:
|
||
title:
|
||
type: string
|
||
body:
|
||
type: string
|
||
conclusion:
|
||
type: string
|
||
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
"400":
|
||
description: Bad request
|
||
"401":
|
||
description: Authorization information is
|
||
missing or invalid
|
||
|
||
|
||
|