Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Commit c989e33

Browse files
committed
ITokenResponse interface added comment lines.
1 parent 29ec77f commit c989e33

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

src/types/response.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,55 @@ import type { Status } from "./Status";
77
export interface IMessageResponse {
88
/**
99
* A descriptive message related to the response.
10-
* This could be a success message or any relevant information.
10+
* This could indicate success, provide information, or describe a result.
1111
*/
1212
message: string;
1313

1414
/**
1515
* The status of the response, indicating success or failure.
16-
* It should conform to the Status type defined elsewhere.
16+
* This should conform to the Status type defined elsewhere in the codebase.
1717
*/
1818
status: Status;
1919
}
2020

2121
/**
2222
* Interface representing an error response.
23-
* This extends IMessageResponse to include additional error-related information.
23+
* This extends IMessageResponse to include additional information related to errors.
2424
*/
2525
export interface IErrorResponse extends IMessageResponse {
2626
/**
27-
* Optional stack trace string for debugging purposes.
28-
* This is included only in development environments to help trace errors.
27+
* An optional stack trace string for debugging purposes.
28+
* This is included only in development environments to assist in tracing errors.
2929
*/
3030
stack?: string;
3131
}
3232

3333
/**
3434
* Interface representing a data response, which extends IMessageResponse.
35-
* This includes an additional data property to return requested data.
35+
* This includes an additional `data` property to return requested data to the client.
3636
*
3737
* @template T - The type of data being returned in the response.
3838
*/
3939
export interface IDataResponse<T> extends IMessageResponse {
4040
/**
4141
* The data associated with the response.
42-
* This could be any type of data, depending on the context.
42+
* This could be any type of data, depending on the specific context of the response.
4343
*/
4444
data: T;
4545
}
4646

47+
/**
48+
* Interface representing a token response.
49+
* This extends IMessageResponse to include information about the generated access token.
50+
*/
4751
export interface ITokenResponse extends IMessageResponse {
52+
/**
53+
* The generated access token for authentication.
54+
*/
4855
access_token: string;
56+
57+
/**
58+
* The duration in seconds until the access token expires.
59+
*/
4960
expires_in: number;
5061
}

0 commit comments

Comments
 (0)