This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
api_backend.graphql
105 lines (85 loc) · 2.05 KB
/
api_backend.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
directive @client on FIELD
directive @type(
name: String
) on FIELD
directive @rest(
path: String
type: String
method: String
bodyKey: String
bodySerializer: String
) on FIELD
type GetPaFromIpa {
ipa_pa: GetPaFromIpa_ipa_pa!
ipa_ou: GetPaFromIpa_ipa_ou!
}
type GetPaFromIpa_ipa_ou {
cod_ou: String!
nome_resp: String!
cogn_resp: String!
mail_resp: String!
cod_uni_ou: String!
}
type GetPaFromIpa_ipa_pa {
comune: String!
provincia: String!
regione: String!
"""PA description."""
des_amm: String!
"""IPA code."""
cod_amm: String!
"""Mail."""
mail2: String!
}
input LoginCredentialsInput {
secret: String!
}
input EmailLoginCredentialsInput {
email: String!
secret: String!
}
type UserProfile {
id: String!
email: String!
roles: [String!]!
}
type LoginResult {
backend_token: String!
graphql_token: String!
user: UserProfile!
}
input EmailPayloadInput {
email: String!
}
type EmailPayload {
email: String!
}
type SuccessResponse {
message: String
}
extend type mutation_root {
"""
Send an email with a secret code to the RTD of the Public Administration
(organization) identified by the IPA code.
Gets the information on the organization from the
[IPA](https://indicepa.gov.it) catalogue using the provided IPA code.
The secret code will be used by the client to login into the backend.
"""
post_auth_email_ipa_code(ipa_code: String!, body: String!): GetPaFromIpa!
"""
"""
post_auth_email_email_code(body: EmailPayloadInput!): EmailPayload!
"""
The client post a secret code and the IPA code of the Public Administration
he wants to personify. If the secret is valid for the provided IPA code,
then the backend returns a bearer token to authenicate subsequent API calls.
"""
post_auth_login_ipa_code(ipa_code: String!, body: LoginCredentialsInput!): LoginResult!
"""
"""
post_auth_login_email_code(body: EmailLoginCredentialsInput!): LoginResult!
"""
Delete the session identified by the provided bearer token.
"""
post_auth_logout(body: String!): SuccessResponse!
}