Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions dist/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,32 @@ paths:
$ref: '#/components/schemas/ErrorResponse'
tags:
- Places
/emergencecies:
get:
operationId: StudentNs_getEmergencies
summary: Show emergencecies text and number | Mostra testi e numeri di emergenza
parameters: []
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
$ref: '#/components/schemas/EmergencyResponse'
'400':
description: The server could not understand the request due to invalid syntax.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
tags:
- Student
/esc:
delete:
operationId: Esc_escDelete
Expand Down Expand Up @@ -5173,6 +5199,102 @@ components:
unreadEmails:
type: string
example: 99+
EmergencyContent:
type: object
required:
- content
- cta
properties:
title:
type: string
example: Emergency Title
content:
type: string
example: Important information regarding the emergency.
cta:
$ref: '#/components/schemas/EmergencyCta'
EmergencyCta:
type: object
required:
- text
- action
- color
- primary
properties:
text:
type: string
example: Emergenza 112
action:
$ref: '#/components/schemas/EmergencySite'
icon:
type: string
example: fa-phone
color:
type: string
example: '#E11D48'
primary:
type: boolean
example: true
EmergencyHour:
type: object
required:
- day
- open
- close
properties:
day:
type: string
example: Monday
open:
type: string
example: '09:00'
close:
type: string
example: '18:00'
EmergencyResponse:
type: object
required:
- icon
- name
- content
- cta
properties:
icon:
type: string
example: fa-warning
name:
type: string
example: Emergency Name
content:
type: array
items:
$ref: '#/components/schemas/EmergencyContent'
cta:
type: array
items:
$ref: '#/components/schemas/EmergencyCta'
EmergencySite:
type: object
required:
- places
- phoneNumber
- hours
- backup
properties:
places:
type: array
items:
$ref: '#/components/schemas/PlaceRef'
phoneNumber:
type: string
example: +39 011 090 1234
hours:
type: array
items:
$ref: '#/components/schemas/EmergencyHour'
backup:
type: boolean
example: true
EnrolMfaRequest:
type: object
required:
Expand Down
65 changes: 65 additions & 0 deletions src/routes/student.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,66 @@ model Guide {
sections: GuideSection[];
}

model EmergencyHour {
@example("Monday")
day: string;

@example("09:00")
open: string;

@example("18:00")
close: string;
}

model EmergencySite {
places: PlaceRef[];

@example("+39 011 090 1234")
phoneNumber: string;

hours: EmergencyHour[];

@example(true)
backup: boolean;
}

model EmergencyCta {
@example("Emergenza 112")
text: string;

action: EmergencySite;

@example("fa-phone")
icon?: string;

@example("#E11D48")
color: string;

@example(true)
primary: boolean;
}

model EmergencyContent {
@example("Emergency Title")
title?: string;

@example("Important information regarding the emergency.")
content: string;

cta: EmergencyCta;
}

model EmergencyResponse {
@example("fa-warning")
icon: string;

@example("Emergency Name")
name: string;

content: EmergencyContent[];
cta: EmergencyCta[];
}

model Student {
@example("s290683")
username: string;
Expand Down Expand Up @@ -343,6 +403,11 @@ interface StudentNs {
@get
@summary("Get guides | Mostra guide")
getGuides(): OkDataResponse<Guide[]> | BaseErrors;

@route("/emergencecies")
@get
@summary("Show emergencecies text and number | Mostra testi e numeri di emergenza")
getEmergencies(): EmergencyResponse | BaseErrors;
}

@tag("Student")
Expand Down