@athos-sdk/api-types 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +107 -234
- package/dist/index.d.ts +107 -234
- package/dist/index.js +129 -166
- package/dist/index.mjs +129 -166
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -150,282 +150,245 @@ var ROUTES = {
|
|
|
150
150
|
};
|
|
151
151
|
|
|
152
152
|
// src/api-routes.ts
|
|
153
|
+
function defineRoute(def) {
|
|
154
|
+
return def;
|
|
155
|
+
}
|
|
153
156
|
var auth = {
|
|
154
|
-
register: {
|
|
157
|
+
register: defineRoute({
|
|
155
158
|
method: "POST",
|
|
156
|
-
path: "/auth/register"
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
login: {
|
|
159
|
+
path: "/auth/register"
|
|
160
|
+
}),
|
|
161
|
+
login: defineRoute({
|
|
161
162
|
method: "POST",
|
|
162
|
-
path: "/auth/login"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
deleteMe: {
|
|
163
|
+
path: "/auth/login"
|
|
164
|
+
}),
|
|
165
|
+
deleteMe: defineRoute({
|
|
167
166
|
method: "DELETE",
|
|
168
167
|
path: "/auth/me"
|
|
169
|
-
}
|
|
168
|
+
})
|
|
170
169
|
};
|
|
171
170
|
var members = {
|
|
172
|
-
join: {
|
|
171
|
+
join: defineRoute({
|
|
173
172
|
method: "POST",
|
|
174
|
-
path: "/members/join"
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
me: {
|
|
173
|
+
path: "/members/join"
|
|
174
|
+
}),
|
|
175
|
+
me: defineRoute({
|
|
179
176
|
method: "GET",
|
|
180
177
|
path: "/members/me"
|
|
181
|
-
},
|
|
182
|
-
updateMe: {
|
|
178
|
+
}),
|
|
179
|
+
updateMe: defineRoute({
|
|
183
180
|
method: "PATCH",
|
|
184
|
-
path: "/members/me"
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
},
|
|
188
|
-
meStats: {
|
|
181
|
+
path: "/members/me"
|
|
182
|
+
}),
|
|
183
|
+
meStats: defineRoute({
|
|
189
184
|
method: "GET",
|
|
190
185
|
path: "/members/me/stats"
|
|
191
|
-
}
|
|
186
|
+
})
|
|
192
187
|
};
|
|
193
188
|
var checkIns = {
|
|
194
|
-
create: {
|
|
189
|
+
create: defineRoute({
|
|
195
190
|
method: "POST",
|
|
196
|
-
path: "/check-ins"
|
|
197
|
-
|
|
198
|
-
_res: void 0
|
|
199
|
-
}
|
|
191
|
+
path: "/check-ins"
|
|
192
|
+
})
|
|
200
193
|
};
|
|
201
194
|
var leaderboards = {
|
|
202
|
-
list: {
|
|
195
|
+
list: defineRoute({
|
|
203
196
|
method: "GET",
|
|
204
197
|
path: "/leaderboards"
|
|
205
|
-
},
|
|
206
|
-
create: {
|
|
198
|
+
}),
|
|
199
|
+
create: defineRoute({
|
|
207
200
|
method: "POST",
|
|
208
|
-
path: "/leaderboards"
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
},
|
|
212
|
-
submitEntry: {
|
|
201
|
+
path: "/leaderboards"
|
|
202
|
+
}),
|
|
203
|
+
submitEntry: defineRoute({
|
|
213
204
|
method: "POST",
|
|
214
|
-
path: "/leaderboards/entries"
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
// entry type if needed
|
|
218
|
-
},
|
|
219
|
-
reviewEntry: {
|
|
205
|
+
path: "/leaderboards/entries"
|
|
206
|
+
}),
|
|
207
|
+
reviewEntry: defineRoute({
|
|
220
208
|
method: "POST",
|
|
221
|
-
path: "/leaderboards/entries/review"
|
|
222
|
-
|
|
223
|
-
_res: void 0
|
|
224
|
-
}
|
|
209
|
+
path: "/leaderboards/entries/review"
|
|
210
|
+
})
|
|
225
211
|
};
|
|
226
212
|
var challenges = {
|
|
227
|
-
|
|
213
|
+
list: defineRoute({
|
|
214
|
+
method: "GET",
|
|
215
|
+
path: "/challenges"
|
|
216
|
+
}),
|
|
217
|
+
create: defineRoute({
|
|
228
218
|
method: "POST",
|
|
229
|
-
path: "/challenges"
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
},
|
|
233
|
-
createOccurrence: {
|
|
219
|
+
path: "/challenges"
|
|
220
|
+
}),
|
|
221
|
+
createOccurrence: defineRoute({
|
|
234
222
|
method: "POST",
|
|
235
|
-
path: "/challenges/occurrences"
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
},
|
|
239
|
-
meActive: {
|
|
223
|
+
path: "/challenges/occurrences"
|
|
224
|
+
}),
|
|
225
|
+
meActive: defineRoute({
|
|
240
226
|
method: "GET",
|
|
241
227
|
path: "/challenges/me/active"
|
|
242
|
-
},
|
|
243
|
-
join: {
|
|
228
|
+
}),
|
|
229
|
+
join: defineRoute({
|
|
244
230
|
method: "POST",
|
|
245
|
-
path: "/challenges/join"
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
},
|
|
249
|
-
complete: {
|
|
231
|
+
path: "/challenges/join"
|
|
232
|
+
}),
|
|
233
|
+
complete: defineRoute({
|
|
250
234
|
method: "POST",
|
|
251
|
-
path: "/challenges/complete"
|
|
252
|
-
|
|
253
|
-
_res: void 0
|
|
254
|
-
}
|
|
235
|
+
path: "/challenges/complete"
|
|
236
|
+
})
|
|
255
237
|
};
|
|
256
238
|
var bookings = {
|
|
257
|
-
create: {
|
|
239
|
+
create: defineRoute({
|
|
258
240
|
method: "POST",
|
|
259
|
-
path: "/bookings"
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
updateStatus: {
|
|
241
|
+
path: "/bookings"
|
|
242
|
+
}),
|
|
243
|
+
updateStatus: defineRoute({
|
|
264
244
|
method: "POST",
|
|
265
|
-
path: "/bookings/status"
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
},
|
|
269
|
-
meMember: {
|
|
245
|
+
path: "/bookings/status"
|
|
246
|
+
}),
|
|
247
|
+
meMember: defineRoute({
|
|
270
248
|
method: "GET",
|
|
271
249
|
path: "/bookings/me/member"
|
|
272
|
-
},
|
|
273
|
-
meExpert: {
|
|
250
|
+
}),
|
|
251
|
+
meExpert: defineRoute({
|
|
274
252
|
method: "GET",
|
|
275
253
|
path: "/bookings/me/expert"
|
|
276
|
-
}
|
|
254
|
+
})
|
|
277
255
|
};
|
|
278
256
|
var rewards = {
|
|
279
|
-
list: {
|
|
257
|
+
list: defineRoute({
|
|
280
258
|
method: "GET",
|
|
281
259
|
path: "/rewards"
|
|
282
|
-
},
|
|
283
|
-
me: {
|
|
260
|
+
}),
|
|
261
|
+
me: defineRoute({
|
|
284
262
|
method: "GET",
|
|
285
263
|
path: "/rewards/me"
|
|
286
|
-
}
|
|
264
|
+
})
|
|
287
265
|
};
|
|
288
266
|
var experts = {
|
|
289
|
-
list: {
|
|
267
|
+
list: defineRoute({
|
|
290
268
|
method: "GET",
|
|
291
269
|
path: "/experts"
|
|
292
|
-
},
|
|
293
|
-
me: {
|
|
270
|
+
}),
|
|
271
|
+
me: defineRoute({
|
|
294
272
|
method: "GET",
|
|
295
273
|
path: "/experts/me"
|
|
296
|
-
},
|
|
297
|
-
availability: (id) => ({
|
|
274
|
+
}),
|
|
275
|
+
availability: (id) => defineRoute({
|
|
298
276
|
method: "GET",
|
|
299
|
-
path: `/experts/${id}/availability
|
|
300
|
-
_res: void 0
|
|
277
|
+
path: `/experts/${id}/availability`
|
|
301
278
|
}),
|
|
302
|
-
meAvailability: {
|
|
279
|
+
meAvailability: defineRoute({
|
|
303
280
|
method: "POST",
|
|
304
|
-
path: "/experts/me/availability"
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
},
|
|
308
|
-
meAvailabilityExceptions: {
|
|
281
|
+
path: "/experts/me/availability"
|
|
282
|
+
}),
|
|
283
|
+
meAvailabilityExceptions: defineRoute({
|
|
309
284
|
method: "POST",
|
|
310
|
-
path: "/experts/me/availability-exceptions"
|
|
311
|
-
|
|
312
|
-
_res: void 0
|
|
313
|
-
}
|
|
285
|
+
path: "/experts/me/availability-exceptions"
|
|
286
|
+
})
|
|
314
287
|
};
|
|
315
288
|
var notifications = {
|
|
316
|
-
me: {
|
|
289
|
+
me: defineRoute({
|
|
317
290
|
method: "GET",
|
|
318
291
|
path: "/notifications/me"
|
|
319
|
-
},
|
|
320
|
-
meReadAll: {
|
|
292
|
+
}),
|
|
293
|
+
meReadAll: defineRoute({
|
|
321
294
|
method: "POST",
|
|
322
295
|
path: "/notifications/me/read-all"
|
|
323
|
-
}
|
|
296
|
+
})
|
|
324
297
|
};
|
|
325
298
|
var activities = {
|
|
326
|
-
me: {
|
|
299
|
+
me: defineRoute({
|
|
327
300
|
method: "GET",
|
|
328
301
|
path: "/activities/me"
|
|
329
|
-
}
|
|
302
|
+
})
|
|
330
303
|
};
|
|
331
304
|
var media = {
|
|
332
|
-
upload: {
|
|
305
|
+
upload: defineRoute({
|
|
333
306
|
method: "POST",
|
|
334
|
-
path: "/media"
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
},
|
|
338
|
-
delete: (id) => ({
|
|
307
|
+
path: "/media"
|
|
308
|
+
}),
|
|
309
|
+
delete: (id) => defineRoute({
|
|
339
310
|
method: "DELETE",
|
|
340
311
|
path: `/media/${id}`
|
|
341
312
|
})
|
|
342
313
|
};
|
|
343
314
|
var admin = {
|
|
344
|
-
summary: {
|
|
315
|
+
summary: defineRoute({
|
|
345
316
|
method: "GET",
|
|
346
317
|
path: "/admin/summary"
|
|
347
|
-
},
|
|
348
|
-
gym: {
|
|
318
|
+
}),
|
|
319
|
+
gym: defineRoute({
|
|
349
320
|
method: "GET",
|
|
350
321
|
path: "/admin/gym"
|
|
351
|
-
},
|
|
352
|
-
updateGym: {
|
|
322
|
+
}),
|
|
323
|
+
updateGym: defineRoute({
|
|
353
324
|
method: "PATCH",
|
|
354
|
-
path: "/admin/gym"
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
},
|
|
358
|
-
members: {
|
|
325
|
+
path: "/admin/gym"
|
|
326
|
+
}),
|
|
327
|
+
members: defineRoute({
|
|
359
328
|
method: "GET",
|
|
360
329
|
path: "/admin/members"
|
|
361
|
-
},
|
|
362
|
-
createMember: {
|
|
330
|
+
}),
|
|
331
|
+
createMember: defineRoute({
|
|
363
332
|
method: "POST",
|
|
364
|
-
path: "/admin/members"
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
},
|
|
368
|
-
rewards: {
|
|
333
|
+
path: "/admin/members"
|
|
334
|
+
}),
|
|
335
|
+
rewards: defineRoute({
|
|
369
336
|
method: "GET",
|
|
370
337
|
path: "/admin/rewards"
|
|
371
|
-
},
|
|
372
|
-
createReward: {
|
|
338
|
+
}),
|
|
339
|
+
createReward: defineRoute({
|
|
373
340
|
method: "POST",
|
|
374
|
-
path: "/admin/rewards"
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
},
|
|
378
|
-
updateReward: (id) => ({
|
|
341
|
+
path: "/admin/rewards"
|
|
342
|
+
}),
|
|
343
|
+
updateReward: (id) => defineRoute({
|
|
379
344
|
method: "PATCH",
|
|
380
|
-
path: `/admin/rewards/${id}
|
|
381
|
-
_req: void 0,
|
|
382
|
-
_res: void 0
|
|
345
|
+
path: `/admin/rewards/${id}`
|
|
383
346
|
}),
|
|
384
|
-
deleteReward: (id) => ({
|
|
347
|
+
deleteReward: (id) => defineRoute({
|
|
385
348
|
method: "DELETE",
|
|
386
349
|
path: `/admin/rewards/${id}`
|
|
387
350
|
}),
|
|
388
|
-
staff: {
|
|
351
|
+
staff: defineRoute({
|
|
389
352
|
method: "GET",
|
|
390
353
|
path: "/admin/staff"
|
|
391
|
-
},
|
|
392
|
-
createStaff: {
|
|
354
|
+
}),
|
|
355
|
+
createStaff: defineRoute({
|
|
393
356
|
method: "POST",
|
|
394
|
-
path: "/admin/staff"
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
},
|
|
398
|
-
deleteStaff: (userId) => ({
|
|
357
|
+
path: "/admin/staff"
|
|
358
|
+
}),
|
|
359
|
+
deleteStaff: (userId) => defineRoute({
|
|
399
360
|
method: "DELETE",
|
|
400
361
|
path: `/admin/staff/${userId}`
|
|
401
362
|
}),
|
|
402
|
-
disableStaff: (userId) => ({
|
|
363
|
+
disableStaff: (userId) => defineRoute({
|
|
403
364
|
method: "PATCH",
|
|
404
365
|
path: `/admin/staff/${userId}/disable`
|
|
405
366
|
}),
|
|
406
|
-
enableStaff: (userId) => ({
|
|
367
|
+
enableStaff: (userId) => defineRoute({
|
|
407
368
|
method: "PATCH",
|
|
408
369
|
path: `/admin/staff/${userId}/enable`
|
|
409
370
|
}),
|
|
410
|
-
experts: {
|
|
371
|
+
experts: defineRoute({
|
|
411
372
|
method: "GET",
|
|
412
373
|
path: "/admin/experts"
|
|
413
|
-
},
|
|
414
|
-
|
|
374
|
+
}),
|
|
375
|
+
bookings: defineRoute({
|
|
376
|
+
method: "GET",
|
|
377
|
+
path: "/admin/bookings"
|
|
378
|
+
}),
|
|
379
|
+
createExpert: defineRoute({
|
|
415
380
|
method: "POST",
|
|
416
|
-
path: "/admin/experts"
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
},
|
|
420
|
-
deleteExpert: (userId) => ({
|
|
381
|
+
path: "/admin/experts"
|
|
382
|
+
}),
|
|
383
|
+
deleteExpert: (userId) => defineRoute({
|
|
421
384
|
method: "DELETE",
|
|
422
385
|
path: `/admin/experts/${userId}`
|
|
423
386
|
}),
|
|
424
|
-
disableExpert: (userId) => ({
|
|
387
|
+
disableExpert: (userId) => defineRoute({
|
|
425
388
|
method: "PATCH",
|
|
426
389
|
path: `/admin/experts/${userId}/disable`
|
|
427
390
|
}),
|
|
428
|
-
enableExpert: (userId) => ({
|
|
391
|
+
enableExpert: (userId) => defineRoute({
|
|
429
392
|
method: "PATCH",
|
|
430
393
|
path: `/admin/experts/${userId}/enable`
|
|
431
394
|
})
|