Files
textbee/web/config/api.ts

45 lines
1.6 KiB
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',
sendEmailVerificationEmail: () => '/auth/send-email-verification-email',
verifyEmail: () => '/auth/verify-email',
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`,
getMessages: (id: string) => `/gateway/devices/${id}/messages`,
getWebhooks: () => '/webhooks',
createWebhook: () => '/webhooks',
updateWebhook: (id: string) => `/webhooks/${id}`,
getStats: () => '/gateway/stats',
},
billing: {
currentSubscription: () => '/billing/current-subscription',
checkout: () => '/billing/checkout',
plans: () => '/billing/plans',
},
support: {
customerSupport: () => '/support/customer-support',
requestAccountDeletion: () => '/support/request-account-deletion',
},
}