UNPKG

corellium-typescript

Version:
1 lines 466 B
"use strict";exports.createUserEndpoints=r=>({create:async e=>{const t=await r.POST("/v1/users",{body:e});if(t.error)throw new Error(t.error.error);return t.data},delete:async e=>{const t=await r.DELETE("/v1/users/{userId}",{params:{path:{userId:e}}});if(t.error)throw new Error(t.error.error);return t.data},update:async(e,t)=>{const a=await r.PATCH("/v1/users/{userId}",{params:{path:{userId:e}},body:t});if(a.error)throw new Error(a.error.error);return a.data}});