Skip to content

Commit abc1420

Browse files
committed
working outline for developer docs
1 parent 96b86eb commit abc1420

File tree

8 files changed

+266
-31
lines changed

8 files changed

+266
-31
lines changed

docs/api-overview.mdx

Lines changed: 0 additions & 8 deletions
This file was deleted.
File renamed without changes.

docs/api/reports.mdx

Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
---
2+
title: Reports
3+
description: API documentation for managing report recipients and report generation
4+
---
5+
6+
# Reports
7+
8+
The Reports API allows you to manage report recipients who receive automated weekly and monthly reports. All report recipient operations require admin authentication.
9+
10+
## ReportRecipient Type
11+
12+
<ParamField body="email" type="String!" required>
13+
The email address of the report recipient
14+
</ParamField>
15+
16+
<ParamField body="weekly" type="Boolean!" required>
17+
Whether the recipient should receive weekly reports
18+
</ParamField>
19+
20+
<ParamField body="monthly" type="Boolean!" required>
21+
Whether the recipient should receive monthly reports
22+
</ParamField>
23+
24+
---
25+
26+
## getReportRecipients
27+
28+
Get a list of all report recipients.
29+
30+
<RequestExample>
31+
32+
```graphql
33+
query getReportRecipients {
34+
getReportRecipients {
35+
email
36+
weekly
37+
monthly
38+
}
39+
}
40+
```
41+
42+
</RequestExample>
43+
44+
<ResponseExample>
45+
46+
```json
47+
{
48+
"data": {
49+
"getReportRecipients": [
50+
{
51+
"email": "admin@example.com",
52+
"weekly": true,
53+
"monthly": true
54+
},
55+
{
56+
"email": "manager@example.com",
57+
"weekly": false,
58+
"monthly": true
59+
}
60+
]
61+
}
62+
}
63+
```
64+
65+
</ResponseExample>
66+
67+
---
68+
69+
## createReportRecipient
70+
71+
Create a new report recipient.
72+
73+
<ParamField body="email" type="String!" required>
74+
The email address of the report recipient
75+
</ParamField>
76+
77+
<ParamField body="weekly" type="Boolean!" required>
78+
Whether the recipient should receive weekly reports
79+
</ParamField>
80+
81+
<ParamField body="monthly" type="Boolean!" required>
82+
Whether the recipient should receive monthly reports
83+
</ParamField>
84+
85+
<RequestExample>
86+
87+
```graphql
88+
mutation createReportRecipient(
89+
$email: String!
90+
$weekly: Boolean!
91+
$monthly: Boolean!
92+
) {
93+
createReportRecipient(
94+
email: $email
95+
weekly: $weekly
96+
monthly: $monthly
97+
) {
98+
email
99+
weekly
100+
monthly
101+
}
102+
}
103+
```
104+
105+
</RequestExample>
106+
107+
<RequestVariables>
108+
109+
```json
110+
{
111+
"email": "newrecipient@example.com",
112+
"weekly": true,
113+
"monthly": true
114+
}
115+
```
116+
117+
</RequestVariables>
118+
119+
<ResponseExample>
120+
121+
```json
122+
{
123+
"data": {
124+
"createReportRecipient": {
125+
"email": "newrecipient@example.com",
126+
"weekly": true,
127+
"monthly": true
128+
}
129+
}
130+
}
131+
```
132+
133+
</ResponseExample>
134+
135+
---
136+
137+
## updateReportRecipient
138+
139+
Update an existing report recipient's preferences.
140+
141+
<ParamField body="email" type="String!" required>
142+
The email address of the report recipient to update
143+
</ParamField>
144+
145+
<ParamField body="weekly" type="Boolean">
146+
Whether the recipient should receive weekly reports (optional)
147+
</ParamField>
148+
149+
<ParamField body="monthly" type="Boolean">
150+
Whether the recipient should receive monthly reports (optional)
151+
</ParamField>
152+
153+
<RequestExample>
154+
155+
```graphql
156+
mutation updateReportRecipient(
157+
$email: String!
158+
$weekly: Boolean
159+
$monthly: Boolean
160+
) {
161+
updateReportRecipient(
162+
email: $email
163+
weekly: $weekly
164+
monthly: $monthly
165+
) {
166+
email
167+
weekly
168+
monthly
169+
}
170+
}
171+
```
172+
173+
</RequestExample>
174+
175+
<RequestVariables>
176+
177+
```json
178+
{
179+
"email": "admin@example.com",
180+
"weekly": false,
181+
"monthly": true
182+
}
183+
```
184+
185+
</RequestVariables>
186+
187+
<ResponseExample>
188+
189+
```json
190+
{
191+
"data": {
192+
"updateReportRecipient": {
193+
"email": "admin@example.com",
194+
"weekly": false,
195+
"monthly": true
196+
}
197+
}
198+
}
199+
```
200+
201+
</ResponseExample>
202+
203+
<Warning>
204+
At least one of `weekly` or `monthly` must be provided. If both are omitted, the mutation will return an error.
205+
</Warning>
206+
207+
---
208+
209+
## deleteReportRecipient
210+
211+
Delete a report recipient.
212+
213+
<ParamField body="email" type="String!" required>
214+
The email address of the report recipient to delete
215+
</ParamField>
216+
217+
<RequestExample>
218+
219+
```graphql
220+
mutation deleteReportRecipient($email: String!) {
221+
deleteReportRecipient(email: $email) {
222+
email
223+
weekly
224+
monthly
225+
}
226+
}
227+
```
228+
229+
</RequestExample>
230+
231+
<RequestVariables>
232+
233+
```json
234+
{
235+
"email": "oldrecipient@example.com"
236+
}
237+
```
238+
239+
</RequestVariables>
240+
241+
<ResponseExample>
242+
243+
```json
244+
{
245+
"data": {
246+
"deleteReportRecipient": {
247+
"email": "oldrecipient@example.com",
248+
"weekly": true,
249+
"monthly": false
250+
}
251+
}
252+
}
253+
```
254+
255+
</ResponseExample>

docs/authentication.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22
title: Authentication
33
---
44

5-
# Authentication
6-
7-
Documentation for authentication in the Marillac Place API.
8-
5+
# todo

docs/database.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Database
3+
---
4+
5+
# Welcome
6+
7+
add database schema

docs/mint.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
"group": "Getting Started",
1212
"pages": [
1313
"introduction",
14-
"database"
14+
"database",
15+
"authentication"
1516
]
1617
},
1718
{
1819
"group": "API Reference",
1920
"pages": [
20-
"api-overview",
21-
"reports"
21+
"api/reports"
2222
]
2323
}
2424
]

docs/reports.mdx

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/setup.mdx

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)