-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmiragejs.ts
154 lines (117 loc) · 5.35 KB
/
miragejs.ts
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
import { Server, Response } from 'miragejs';
const routes = function () {
this.post('/v1/auth/register/', () => {
return new Response(200, {}, { message: 'Register route handled' });
});
this.post('/v1/auth/request-authentication/', () => {
return new Response(200, {}, { message: 'Request authentication route handled' });
});
this.post('/v1/auth/authenticate/', () => {
return new Response(200, {}, { message: 'Authenticate route handled' });
});
this.post('/v1/auth/refresh-token/', () => {
return new Response(200, {}, { message: 'Refresh token route handled' });
});
this.post('/v1/account/register-device/', () => {
return new Response(200, {}, { message: 'Register device route handled' });
});
this.put('/v1/account/update-personal-data/', () => {
return new Response(200, {}, { message: 'Update personal data route handled' });
});
this.post('/v1/account/change-email/', () => {
return new Response(200, {}, { message: 'Change email route handled' });
});
this.post('/v1/account/request-verification-email/', () => {
return new Response(200, {}, { message: 'Request verification email route handled' });
});
this.put('/v1/account/update-medical/', () => {
return new Response(200, {}, { message: 'Update medical route handled' });
});
this.put('/v1/account/update-consent/', () => {
return new Response(200, {}, { message: 'Update consent route handled' });
});
this.post('/v1/account/create-appointment/', () => {
return new Response(200, {}, { message: 'Create appointment route handled' });
});
this.get('/v1/account/me/', () => {
return new Response(200, {}, { message: 'Get account route handled' });
});
this.put('/v1/account/update/', () => {
return new Response(200, {}, { message: 'Update account route handled' });
});
this.delete('/v1/account/delete/', () => {
return new Response(200, {}, { message: 'Delete account route handled' });
});
this.get('/v1/subusers/', () => {
return new Response(200, {}, { message: 'Get subusers route handled' });
});
this.post('/v1/subusers/', () => {
return new Response(200, {}, { message: 'Create subuser route handled' });
});
this.post('/v1/subusers/:subuser_id/login/', (schema, request) => {
const subuserId = request.params.subuser_id;
return new Response(200, {}, { message: `Login for subuser ${subuserId} route handled` });
});
this.post('/v1/caregiver-requests/', () => {
return new Response(200, {}, { message: 'Create caregiver request route handled' });
});
this.put('/v1/caregiver-requests/:id/', (schema, request) => {
const requestId = request.params.id;
return new Response(200, {}, { message: `Update caregiver request ${requestId} route handled` });
});
this.get('/v1/dossier/prescriptions/', () => {
return new Response(200, {}, { message: 'Get prescriptions route handled' });
});
this.get('/v1/dossier/prescriptions/:prescription_id/', (schema, request) => {
const prescriptionId = request.params.prescription_id;
return new Response(200, {}, { message: `Get prescription ${prescriptionId} route handled` });
});
this.get('/v1/dossier/medicines/', () => {
return new Response(200, {}, { message: 'Get medicines route handled' });
});
this.get('/v1/dossier/medicines/:medicine_id/', (schema, request) => {
const medicineId = request.params.medicine_id;
return new Response(200, {}, { message: `Get medicine ${medicineId} route handled` });
});
this.get('/v1/dossier/prescription-requests/', () => {
return new Response(200, {}, { message: 'Get prescription requests route handled' });
});
this.post('/v1/dossier/prescription-requests/', () => {
return new Response(200, {}, { message: 'Create prescription request route handled' });
});
this.post('/v1/dossier/orders/', () => {
return new Response(200, {}, { message: 'Create order route handled' });
});
this.get('/v1/dossier/orders/:order_id/', (schema, request) => {
const orderId = request.params.order_id;
return new Response(200, {}, { message: `Get order ${orderId} route handled` });
});
this.get('/v1/dossier/timeline/', () => {
return new Response(200, {}, { message: 'Get timeline route handled' });
});
this.post('/v1/dossier/timeline/close/', () => {
return new Response(200, {}, { message: 'Close timeline route handled' });
});
this.post('/v1/phone-number-verification/', () => {
return new Response(200, {}, { message: 'Phone number verification route handled' });
});
this.post('/v1/verify-token/', () => {
return new Response(200, {}, { message: 'Verify token route handled' });
});
this.get('/v1/available-timeslots/', () => {
return new Response(200, {}, { message: 'Get available timeslots route handled' });
});
this.get('/v1/general-practitioners-search/', () => {
return new Response(200, {}, { message: 'General practitioners search route handled' });
});
this.get('/v1/suggest-order-eta/', () => {
return new Response(200, {}, { message: 'Suggest order ETA route handled' });
});
this.post('/v1/address-lookup/', () => {
return new Response(200, {}, { message: 'Address lookup route handled' });
});
this.post('/v1/prescription-upload/retrieve-url/', () => {
return new Response(200, {}, { message: 'Retrieve prescription upload URL route handled' });
});
this.passthrough();
};