-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
167 lines (141 loc) · 3 KB
/
schema.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
type Address {
house: String!
isPrimary: Boolean!
landmark: String!
postalCodeId: String
street: String!
}
input AddressInput {
house: String!
landmark: String!
postalCodeId: String!
street: String!
}
union Contact = ContactOrg | ContactPerson
type ContactOrg {
id: ID!
name: String!
}
type ContactPerson {
familyName: String!
givenName: String!
id: ID!
middleName: String!
}
"""
A date string, such as 2007-12-03, compliant with the `full-date` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
"""
scalar Date
type Email {
address: String!
isPrimary: Boolean!
}
input EmailInput {
address: String!
isPrimary: Boolean!
}
scalar Gender
type Invitation {
email: String!
firstName: String!
id: ID!
lastName: String!
}
type Mutation {
acceptInvitation(inviteId: String!): Boolean!
claimInvitation(inviteCode: String!, password: String!): Boolean!
"""Create a new organization type contact"""
createContactOrganization(input: OrganizationInput!, tenantId: String!): Organization!
"""Create a new individual type contact"""
createContactPerson(input: PersonInput!, tenantId: String!): Person!
createTenant(input: NewTenantInput!): NewTenantResponse!
forgotPassword(userName: String!): Boolean!
inviteUser(input: NewInvitationInput!, tenantId: String!): Boolean!
resetPassword(newPassword: String!, resetToken: String!): Boolean!
}
input NewInvitationInput {
email: String!
firstName: String!
lastName: String!
}
input NewTenantInput {
description: String!
email: String!
firstName: String!
lastName: String!
name: String!
}
type NewTenantResponse {
description: String!
id: ID!
}
type Organization {
addresses: [Address!]!
emails: [Email!]!
id: ID!
name: String!
people: [Person!]!
phones: [Phone!]!
}
input OrganizationInput {
addresses: [AddressInput!]!
emails: [EmailInput!]!
name: String!
people: [PersonInput!]!
phones: [PhoneInput!]!
}
input Page {
number: Int!
size: Int!
}
type Person {
dob: Date
familyName: String!
givenName: String!
id: ID!
middleName: String!
}
input PersonInput {
addresses: [AddressInput!]!
dob: Date
emails: [EmailInput!]!
familyName: String!
gender: Gender!
givenName: String!
middleName: String
phones: [PhoneInput!]!
}
type Phone {
countryId: String!
isPrimary: Boolean!
number: String!
}
input PhoneInput {
countryId: String!
isPrimary: Boolean!
number: String!
}
type Query {
"""Get all contacts"""
getContacts(page: Page!, tenantId: String!): [Contact!]!
getInvitation(invitationCode: String!): Invitation!
getMyTenants: [Tenant!]!
getResetToken(resetToken: String!): ResetPasswordRequest!
getTenants: [Tenant!]!
getUsers(tenantId: String!): [User!]!
hello: String!
}
type ResetPasswordRequest {
id: ID!
userId: ID!
}
type Tenant {
description: String!
id: ID!
name: String!
}
type User {
firstName: String!
id: ID!
lastName: String!
}