Files
textbee/web/config/api.ts
2024-12-07 10:04:02 +03:00

29 lines
1008 B
TypeScript

export const ApiEndpoints = {
auth: {
login: () => '/auth/login',
register: () => '/auth/register',
signInWithGoogle: () => '/auth/google-login',
updateProfile: () => '/auth/update-profile',
changePassword: () => '/auth/change-password',
whoAmI: () => '/auth/who-am-i',
requestPasswordReset: () => '/auth/request-password-reset',
resetPassword: () => '/auth/reset-password',
generateApiKey: () => '/auth/api-keys',
listApiKeys: () => '/auth/api-keys',
revokeApiKey: (id: string) => `/auth/api-keys/${id}/revoke`,
renameApiKey: (id: string) => `/auth/api-keys/${id}/rename`,
deleteApiKey: (id: string) => `/auth/api-keys/${id}`,
},
gateway: {
listDevices: () => '/gateway/devices',
sendSMS: (id: string) => `/gateway/devices/${id}/send-sms`,
sendBulkSMS: (id: string) => `/gateway/devices/${id}/send-bulk-sms`,
getReceivedSMS: (id: string) => `/gateway/devices/${id}/get-received-sms`,
getStats: () => '/gateway/stats',
},
}