feat(sdk): enhance authentication and account management API endpoints

- Added new authentication routes for user sign-in, sign-up, and password reset functionalities.
- Updated account management routes to include bulk delete and validation for accounts.
- Refactored type definitions to utilize utility functions for better type safety and clarity.
- Introduced new methods for handling user authentication and account operations in the SDK.
This commit is contained in:
Ahmed Bouhuolia
2026-03-05 01:07:14 +02:00
parent 8960ea1ca2
commit ac8dcfed67
42 changed files with 1362 additions and 960 deletions

View File

@@ -62,6 +62,182 @@
]
}
},
"/api/auth/signin": {
"post": {
"operationId": "AuthController_signin",
"summary": "Sign in a user",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["email", "password"],
"properties": {
"email": { "type": "string", "example": "user@example.com", "description": "User email address" },
"password": { "type": "string", "example": "password123", "description": "User password" }
}
}
}
}
},
"responses": {
"200": {
"description": "Sign-in successful",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"accessToken": { "type": "string", "description": "JWT access token" },
"organizationId": { "type": "string", "description": "Organization ID" },
"tenantId": { "type": "number", "description": "Tenant ID" },
"userId": { "type": "number", "description": "User ID" }
}
}
}
}
}
},
"tags": ["Auth"]
}
},
"/api/auth/signup": {
"post": {
"operationId": "AuthController_signup",
"summary": "Sign up a new user",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["firstName", "lastName", "email", "password"],
"properties": {
"firstName": { "type": "string", "example": "John", "description": "User first name" },
"lastName": { "type": "string", "example": "Doe", "description": "User last name" },
"email": { "type": "string", "format": "email", "example": "john.doe@example.com", "description": "User email address" },
"password": { "type": "string", "example": "password123", "description": "User password" }
}
}
}
}
},
"responses": {
"201": { "description": "Sign-up initiated. Check email for confirmation." }
},
"tags": ["Auth"]
}
},
"/api/auth/signup/verify": {
"post": {
"operationId": "AuthController_signupConfirm",
"summary": "Confirm user signup",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["email", "token"],
"properties": {
"email": { "type": "string", "example": "user@example.com", "description": "User email address" },
"token": { "type": "string", "example": "confirmation-token", "description": "Signup confirmation token from email" }
}
}
}
}
},
"responses": {
"200": { "description": "Signup confirmed successfully." }
},
"tags": ["Auth"]
}
},
"/api/auth/send_reset_password": {
"post": {
"operationId": "AuthController_sendResetPassword",
"summary": "Send reset password email",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["email"],
"properties": {
"email": { "type": "string", "example": "user@example.com", "description": "User email address to send reset link to" }
}
}
}
}
},
"responses": {
"200": { "description": "Reset password email sent if the account exists." }
},
"tags": ["Auth"]
}
},
"/api/auth/reset_password/{token}": {
"post": {
"operationId": "AuthController_resetPassword",
"summary": "Reset password using token",
"parameters": [
{
"name": "token",
"in": "path",
"required": true,
"description": "Reset password token from email link",
"schema": { "type": "string" }
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["password"],
"properties": {
"password": { "type": "string", "example": "new-password", "description": "New password" }
}
}
}
}
},
"responses": {
"200": { "description": "Password reset successfully." }
},
"tags": ["Auth"]
}
},
"/api/auth/meta": {
"get": {
"operationId": "AuthController_meta",
"summary": "Get auth metadata (e.g. signup disabled)",
"parameters": [],
"responses": {
"200": {
"description": "Auth metadata for the login/signup page",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"signupDisabled": { "type": "boolean", "description": "Whether signup is disabled" }
}
}
}
}
}
},
"tags": ["Auth"]
}
},
"/api/api-keys/generate": {
"post": {
"operationId": "AuthApiKeysController_generate",