@qnx/client 0.0.3 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +15 -0
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -11,6 +11,11 @@ export interface ApiResponseInterface<T> {
11
11
  getErrors(): ApiErrors | undefined;
12
12
  getError(): ApiError | undefined;
13
13
  }
14
+ /**
15
+ * Represents the response value returned by the API.
16
+ *
17
+ * @template T - The type of the response data.
18
+ */
14
19
  export interface ApiResponseValue<T = any> {
15
20
  readonly data?: T;
16
21
  readonly errorCode?: ApiErrorCode;
@@ -35,6 +40,12 @@ export interface ApiSuccessResponseInterface<T> {
35
40
  getData: () => T;
36
41
  getMessage: () => ApiMessage;
37
42
  }
43
+ /**
44
+ * Represents a successful API response value.
45
+ * It includes the response data and a message.
46
+ *
47
+ * @template T - The type of the response data.
48
+ */
38
49
  export type ApiSuccessResponseValue<T> = Pick<Required<ApiResponseValue<T>>, "data" | "message">;
39
50
  /**
40
51
  * Will use collect data from success api response
@@ -50,6 +61,10 @@ export interface ApiErrorResponseInterface {
50
61
  getErrors: () => Record<string, string[]> | undefined;
51
62
  getErrorCode: () => string | undefined;
52
63
  }
64
+ /**
65
+ * Represents an error API response value.
66
+ * It includes error details such as error messages and error codes.
67
+ */
53
68
  export type ApiErrorResponseValue = Pick<Required<ApiResponseValue<unknown>>, "errors" | "error"> & Pick<ApiResponseValue<unknown>, "errorCode">;
54
69
  /**
55
70
  * Will use collect data from error api response
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@qnx/client",
3
3
  "description": "QNX client for handling response",
4
4
  "author": "Yatendra Kushwaha <https://github.com/yatendra121>",
5
- "version": "0.0.3",
5
+ "version": "0.0.6",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "dist"
@@ -33,4 +33,4 @@
33
33
  "format:scripts": "prettier . --write",
34
34
  "format": "npm run format:scripts"
35
35
  }
36
- }
36
+ }