mirror of
https://github.com/vernu/textbee.git
synced 2026-04-17 13:28:36 -04:00
- Added a query parameter to filter API keys by status (active, revoked, all) in the getApiKey endpoint. - Updated the AuthService to handle status filtering logic for API key retrieval. - Modified the frontend to support status-based API key listing and added a button to view revoked keys.
50 lines
1.8 KiB
TypeScript
50 lines
1.8 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',
|
|
updateOnboarding: () => '/auth/onboarding',
|
|
|
|
sendEmailVerificationEmail: () => '/auth/send-email-verification-email',
|
|
verifyEmail: () => '/auth/verify-email',
|
|
|
|
requestPasswordReset: () => '/auth/request-password-reset',
|
|
resetPassword: () => '/auth/reset-password',
|
|
|
|
generateApiKey: () => '/auth/api-keys',
|
|
listApiKeys: (status?: 'active' | 'revoked' | 'all') =>
|
|
status
|
|
? `/auth/api-keys?status=${encodeURIComponent(status)}`
|
|
: '/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',
|
|
getWebhookNotifications: () => '/webhooks/notifications',
|
|
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',
|
|
},
|
|
}
|