@arkyn/server 3.0.1-beta.166 → 3.0.1-beta.170

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 (135) hide show
  1. package/package.json +4 -3
  2. package/dist/http/api/_logRequest.d.ts +0 -58
  3. package/dist/http/api/_logRequest.d.ts.map +0 -1
  4. package/dist/http/api/_makeRequest.d.ts +0 -61
  5. package/dist/http/api/_makeRequest.d.ts.map +0 -1
  6. package/dist/http/api/deleteRequest.d.ts +0 -17
  7. package/dist/http/api/deleteRequest.d.ts.map +0 -1
  8. package/dist/http/api/getRequest.d.ts +0 -16
  9. package/dist/http/api/getRequest.d.ts.map +0 -1
  10. package/dist/http/api/patchRequest.d.ts +0 -17
  11. package/dist/http/api/patchRequest.d.ts.map +0 -1
  12. package/dist/http/api/postRequest.d.ts +0 -17
  13. package/dist/http/api/postRequest.d.ts.map +0 -1
  14. package/dist/http/api/putRequest.d.ts +0 -17
  15. package/dist/http/api/putRequest.d.ts.map +0 -1
  16. package/dist/http/badResponses/_badResponse.d.ts +0 -25
  17. package/dist/http/badResponses/_badResponse.d.ts.map +0 -1
  18. package/dist/http/badResponses/badGateway.d.ts +0 -24
  19. package/dist/http/badResponses/badGateway.d.ts.map +0 -1
  20. package/dist/http/badResponses/badRequest.d.ts +0 -22
  21. package/dist/http/badResponses/badRequest.d.ts.map +0 -1
  22. package/dist/http/badResponses/conflict.d.ts +0 -22
  23. package/dist/http/badResponses/conflict.d.ts.map +0 -1
  24. package/dist/http/badResponses/forbidden.d.ts +0 -22
  25. package/dist/http/badResponses/forbidden.d.ts.map +0 -1
  26. package/dist/http/badResponses/notFound.d.ts +0 -22
  27. package/dist/http/badResponses/notFound.d.ts.map +0 -1
  28. package/dist/http/badResponses/notImplemented.d.ts +0 -22
  29. package/dist/http/badResponses/notImplemented.d.ts.map +0 -1
  30. package/dist/http/badResponses/serverError.d.ts +0 -22
  31. package/dist/http/badResponses/serverError.d.ts.map +0 -1
  32. package/dist/http/badResponses/unauthorized.d.ts +0 -22
  33. package/dist/http/badResponses/unauthorized.d.ts.map +0 -1
  34. package/dist/http/badResponses/unprocessableEntity.d.ts +0 -34
  35. package/dist/http/badResponses/unprocessableEntity.d.ts.map +0 -1
  36. package/dist/http/successResponses/_successResponse.d.ts +0 -36
  37. package/dist/http/successResponses/_successResponse.d.ts.map +0 -1
  38. package/dist/http/successResponses/created.d.ts +0 -22
  39. package/dist/http/successResponses/created.d.ts.map +0 -1
  40. package/dist/http/successResponses/found.d.ts +0 -22
  41. package/dist/http/successResponses/found.d.ts.map +0 -1
  42. package/dist/http/successResponses/noContent.d.ts +0 -20
  43. package/dist/http/successResponses/noContent.d.ts.map +0 -1
  44. package/dist/http/successResponses/success.d.ts +0 -22
  45. package/dist/http/successResponses/success.d.ts.map +0 -1
  46. package/dist/http/successResponses/updated.d.ts +0 -23
  47. package/dist/http/successResponses/updated.d.ts.map +0 -1
  48. package/dist/index.d.ts +0 -34
  49. package/dist/index.d.ts.map +0 -1
  50. package/dist/index.js +0 -1065
  51. package/dist/modules/http/api/_logRequest.js +0 -56
  52. package/dist/modules/http/api/_makeRequest.js +0 -70
  53. package/dist/modules/http/api/deleteRequest.js +0 -13
  54. package/dist/modules/http/api/getRequest.js +0 -12
  55. package/dist/modules/http/api/patchRequest.js +0 -13
  56. package/dist/modules/http/api/postRequest.js +0 -13
  57. package/dist/modules/http/api/putRequest.js +0 -13
  58. package/dist/modules/http/badResponses/_badResponse.js +0 -63
  59. package/dist/modules/http/badResponses/badGateway.js +0 -24
  60. package/dist/modules/http/badResponses/badRequest.js +0 -24
  61. package/dist/modules/http/badResponses/conflict.js +0 -24
  62. package/dist/modules/http/badResponses/forbidden.js +0 -24
  63. package/dist/modules/http/badResponses/notFound.js +0 -24
  64. package/dist/modules/http/badResponses/notImplemented.js +0 -24
  65. package/dist/modules/http/badResponses/serverError.js +0 -24
  66. package/dist/modules/http/badResponses/unauthorized.js +0 -24
  67. package/dist/modules/http/badResponses/unprocessableEntity.js +0 -28
  68. package/dist/modules/http/successResponses/_successResponse.js +0 -62
  69. package/dist/modules/http/successResponses/created.js +0 -24
  70. package/dist/modules/http/successResponses/found.js +0 -24
  71. package/dist/modules/http/successResponses/noContent.js +0 -17
  72. package/dist/modules/http/successResponses/success.js +0 -24
  73. package/dist/modules/http/successResponses/updated.js +0 -24
  74. package/dist/modules/index.js +0 -34
  75. package/dist/modules/services/apiService.js +0 -109
  76. package/dist/modules/services/debugService.js +0 -36
  77. package/dist/modules/services/logMapperService.js +0 -29
  78. package/dist/modules/services/logService.js +0 -21
  79. package/dist/modules/utilities/decodeRequestBody.js +0 -20
  80. package/dist/modules/utilities/decodeRequestErrorMessage.js +0 -6
  81. package/dist/modules/utilities/errorHandler.js +0 -39
  82. package/dist/modules/utilities/flushDebugLogs.js +0 -16
  83. package/dist/modules/utilities/formAsyncParse.js +0 -14
  84. package/dist/modules/utilities/formParse.js +0 -14
  85. package/dist/modules/utilities/getScopedParams.js +0 -9
  86. package/dist/modules/utilities/schemaValidator.js +0 -55
  87. package/dist/modules/validations/validateCep.js +0 -9
  88. package/dist/modules/validations/validateCnpj.js +0 -54
  89. package/dist/modules/validations/validateCpf.js +0 -27
  90. package/dist/modules/validations/validateDate.js +0 -26
  91. package/dist/modules/validations/validateEmail.js +0 -54
  92. package/dist/modules/validations/validatePassword.js +0 -12
  93. package/dist/modules/validations/validatePhone.js +0 -10
  94. package/dist/modules/validations/validateRg.js +0 -8
  95. package/dist/services/apiService.d.ts +0 -83
  96. package/dist/services/apiService.d.ts.map +0 -1
  97. package/dist/services/debugService.d.ts +0 -37
  98. package/dist/services/debugService.d.ts.map +0 -1
  99. package/dist/services/logMapperService.d.ts +0 -86
  100. package/dist/services/logMapperService.d.ts.map +0 -1
  101. package/dist/services/logService.d.ts +0 -33
  102. package/dist/services/logService.d.ts.map +0 -1
  103. package/dist/utilities/decodeRequestBody.d.ts +0 -18
  104. package/dist/utilities/decodeRequestBody.d.ts.map +0 -1
  105. package/dist/utilities/decodeRequestErrorMessage.d.ts +0 -19
  106. package/dist/utilities/decodeRequestErrorMessage.d.ts.map +0 -1
  107. package/dist/utilities/errorHandler.d.ts +0 -25
  108. package/dist/utilities/errorHandler.d.ts.map +0 -1
  109. package/dist/utilities/flushDebugLogs.d.ts +0 -24
  110. package/dist/utilities/flushDebugLogs.d.ts.map +0 -1
  111. package/dist/utilities/formAsyncParse.d.ts +0 -38
  112. package/dist/utilities/formAsyncParse.d.ts.map +0 -1
  113. package/dist/utilities/formParse.d.ts +0 -38
  114. package/dist/utilities/formParse.d.ts.map +0 -1
  115. package/dist/utilities/getScopedParams.d.ts +0 -19
  116. package/dist/utilities/getScopedParams.d.ts.map +0 -1
  117. package/dist/utilities/schemaValidator.d.ts +0 -75
  118. package/dist/utilities/schemaValidator.d.ts.map +0 -1
  119. package/dist/validations/validateCep.d.ts +0 -19
  120. package/dist/validations/validateCep.d.ts.map +0 -1
  121. package/dist/validations/validateCnpj.d.ts +0 -21
  122. package/dist/validations/validateCnpj.d.ts.map +0 -1
  123. package/dist/validations/validateCpf.d.ts +0 -16
  124. package/dist/validations/validateCpf.d.ts.map +0 -1
  125. package/dist/validations/validateDate.d.ts +0 -23
  126. package/dist/validations/validateDate.d.ts.map +0 -1
  127. package/dist/validations/validateEmail.d.ts +0 -21
  128. package/dist/validations/validateEmail.d.ts.map +0 -1
  129. package/dist/validations/validatePassword.d.ts +0 -20
  130. package/dist/validations/validatePassword.d.ts.map +0 -1
  131. package/dist/validations/validatePhone.d.ts +0 -16
  132. package/dist/validations/validatePhone.d.ts.map +0 -1
  133. package/dist/validations/validateRg.d.ts +0 -21
  134. package/dist/validations/validateRg.d.ts.map +0 -1
  135. package/generate-version.ts +0 -74
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/server",
3
- "version": "3.0.1-beta.166",
3
+ "version": "3.0.1-beta.170",
4
4
  "author": "Arkyn | Lucas Gonçalves",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -22,14 +22,15 @@
22
22
  "homepage": "https://docs.arkyn.dev/en/server/introduction",
23
23
  "repository": {
24
24
  "type": "git",
25
- "url": "git+https://github.com/Lucas-Eduardo-Goncalves/arkyn.git",
25
+ "url": "git+https://github.com/Lucas-Eduardo-Goncalves/arkyn-library.git",
26
26
  "directory": "packages/server"
27
27
  },
28
28
  "sideEffects": false,
29
29
  "scripts": {
30
30
  "audit": "bun audit --workspace packages/server",
31
31
  "build": "bunx vite build && bunx tsc --project tsconfig.json --emitDeclarationOnly && bun ./generate-exports.ts",
32
- "publish:beta": "bun publish --tag beta",
32
+ "publish:beta": "npm publish --tag beta",
33
+ "publish:latest": "npm publish --tag latest",
33
34
  "release:beta": "bun ./generate-version.ts beta",
34
35
  "release:patch": "bun ./generate-version.ts patch",
35
36
  "release:minor": "bun ./generate-version.ts minor",
@@ -1,58 +0,0 @@
1
- type ConfigProps = {
2
- rawUrl: string;
3
- status: number;
4
- method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
5
- token: string | null;
6
- elapsedTime: number;
7
- requestHeaders: Record<string, string>;
8
- requestBody: Record<string, string>;
9
- queryParams: Record<string, string>;
10
- responseHeaders: Record<string, string>;
11
- responseBody: Record<string, string>;
12
- };
13
- /**
14
- * Sends a request to the inbox flow API with the provided configuration.
15
- *
16
- * - This function retrieves the inbox flow configuration using `LogService.getConfig()`.
17
- * - If the configuration is not available, the function will return early without performing any action.
18
- * - In a development environment (`NODE_ENV === "development"`), the function will also return early.
19
- * - The request is sent as a POST request to the inbox API URL with the provided configuration details.
20
- * - If an error occurs during the request, it will be logged using the `httpDebug` service.
21
- *
22
- * @param {ConfigProps} config - The configuration object for the request.
23
- * @param {string} config.rawUrl - The raw URL of the request.
24
- * @param {number} config.status - The HTTP status code associated with the request.
25
- * @param {"GET" | "POST" | "PUT" | "DELETE" | "PATCH"} config.method - The HTTP method used for the request. Can be "POST", "GET", "PUT", "DELETE", or "PATCH".
26
- * @param {string | null} config.token - The authentication token for the request.
27
- * @param {number} config.elapsedTime - The elapsed time for the request in milliseconds.
28
- * @param {Record<string, string>} config.requestHeaders - The headers sent with the request.
29
- * @param {Record<string, string>} config.requestBody - The body of the request, if applicable.
30
- * @param {Record<string, string>} config.queryParams - The query parameters for the request.
31
- * @param {Record<string, string>} config.responseHeaders - The headers received in the response.
32
- * @param {Record<string, string>} config.responseBody - The body of the response received.
33
- *
34
- * @remarks
35
- *
36
- * @returns {Promise<void>} A promise that resolves when the request is complete.
37
- *
38
- * @example
39
- * ```typescript
40
- * const config = {
41
- * rawUrl: "https://example.com/api/data",
42
- * status: 200,
43
- * method: "GET",
44
- * token: "auth-token-123",
45
- * elapsedTime: 150,
46
- * requestHeaders: { "Accept": "application/json", "Authorization": "Bearer token123" },
47
- * requestBody: {},
48
- * queryParams: { "page": "1", "limit": "10" },
49
- * responseHeaders: { "Content-Type": "application/json" },
50
- * responseBody: { "data": "example response" }
51
- * };
52
- *
53
- * await logRequest(config);
54
- * ```
55
- */
56
- declare function logRequest(config: ConfigProps): Promise<void>;
57
- export { logRequest };
58
- //# sourceMappingURL=_logRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_logRequest.d.ts","sourceRoot":"","sources":["../../../src/http/api/_logRequest.ts"],"names":[],"mappings":"AAIA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,iBAAe,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA8E5D;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,61 +0,0 @@
1
- type InputProps = {
2
- url: string;
3
- method: "POST" | "PUT" | "DELETE" | "PATCH" | "GET";
4
- urlParams?: Record<string, string>;
5
- headers?: HeadersInit;
6
- body?: any;
7
- };
8
- type ApiSuccessResponse<T = any> = {
9
- success: true;
10
- status: number;
11
- message: string;
12
- response: T;
13
- cause: null;
14
- };
15
- type ApiFailedResponse = {
16
- success: false;
17
- status: number;
18
- message: string;
19
- response: any;
20
- cause: string | Error | null;
21
- };
22
- type ApiResponseDTO<T = any> = ApiSuccessResponse<T> | ApiFailedResponse;
23
- /**
24
- * Makes an HTTP request using the Fetch API and returns a standardized response.
25
- *
26
- * @template {any} T - The expected type of the response data.
27
- *
28
- * @param {"POST" | "PUT" | "DELETE" | "PATCH" | "GET"} method - The HTTP method to use for the request. Supported methods are:
29
- * - "POST": Create a new resource.
30
- * - "PUT": Update an existing resource.
31
- * - "DELETE": Remove a resource.
32
- * - "PATCH": Partially update a resource.
33
- * - "GET": Retrieve a resource.
34
- * @param {string} url - The URL to which the request is sent.
35
- * @param {HeadersInit} headers - Optional headers to include in the request. Defaults to an empty object.
36
- * @param {any} body - Optional body to include in the request. Should be serializable to JSON.
37
- *
38
- * @returns {ApiResponseDTO<T>} A promise that resolves to an `ApiResponseDTO<T>` object containing:
39
- * - `success`: A boolean indicating whether the request was successful.
40
- * - `status`: The HTTP status code of the response.
41
- * - `message`: A message describing the result of the request.
42
- * - `response`: The parsed JSON response data, or `null` if parsing fails.
43
- * - `cause`: Additional error information, if applicable.
44
- *
45
- * @example
46
- * ```typescript
47
- * import { makeRequest } from "./makeRequest";
48
- *
49
- * async function fetchData() {
50
- * const response = await makeRequest("GET", "https://api.example.com/data");
51
- * if (response.success) {
52
- * console.log("Data:", response.response);
53
- * } else {
54
- * console.error("Error:", response.message);
55
- * }
56
- * }
57
- * ```
58
- */
59
- declare function makeRequest<T = any>(input: InputProps): Promise<ApiResponseDTO<T>>;
60
- export { makeRequest, type ApiResponseDTO };
61
- //# sourceMappingURL=_makeRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_makeRequest.d.ts","sourceRoot":"","sources":["../../../src/http/api/_makeRequest.ts"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF,KAAK,kBAAkB,CAAC,CAAC,GAAG,GAAG,IAAI;IACjC,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,CAAC;IACZ,KAAK,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,GAAG,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,KAAK,cAAc,CAAC,CAAC,GAAG,GAAG,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,iBAAe,WAAW,CAAC,CAAC,GAAG,GAAG,EAChC,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAoF5B;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -1,17 +0,0 @@
1
- import { type ApiResponseDTO } from "./_makeRequest";
2
- type InputProps = {
3
- url: string;
4
- urlParams?: Record<string, string>;
5
- headers?: HeadersInit;
6
- body?: any;
7
- };
8
- /**
9
- * Sends a DELETE request to the specified URL with optional headers and body.
10
- *
11
- * @template T - The expected type of the response data.
12
- * @param {InputProps} input - The options for the DELETE request, including URL, URL parameters, headers, and body.
13
- * @returns {Promise<ApiResponseDTO<T>>} A promise that resolves to the API response.
14
- */
15
- declare function deleteRequest<T = any>(input: InputProps): Promise<ApiResponseDTO<T>>;
16
- export { deleteRequest };
17
- //# sourceMappingURL=deleteRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deleteRequest.d.ts","sourceRoot":"","sources":["../../../src/http/api/deleteRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAElE,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF;;;;;;GAMG;AAEH,iBAAe,aAAa,CAAC,CAAC,GAAG,GAAG,EAClC,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAQ5B;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,16 +0,0 @@
1
- import { type ApiResponseDTO } from "./_makeRequest";
2
- type InputProps = {
3
- url: string;
4
- urlParams?: Record<string, string>;
5
- headers?: HeadersInit;
6
- };
7
- /**
8
- * Sends a GET request to the specified URL with optional headers.
9
- *
10
- * @template T - The expected type of the response data.
11
- * @param {InputProps} input - The options for the GET request, including URL, URL parameters, and headers.
12
- * @returns {Promise<ApiResponseDTO<T>>} A promise that resolves to the API response.
13
- */
14
- declare function getRequest<T = any>(input: InputProps): Promise<ApiResponseDTO<T>>;
15
- export { getRequest };
16
- //# sourceMappingURL=getRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getRequest.d.ts","sourceRoot":"","sources":["../../../src/http/api/getRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAElE,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF;;;;;;GAMG;AAEH,iBAAe,UAAU,CAAC,CAAC,GAAG,GAAG,EAC/B,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAO5B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,17 +0,0 @@
1
- import { type ApiResponseDTO } from "./_makeRequest";
2
- type InputProps = {
3
- url: string;
4
- urlParams?: Record<string, string>;
5
- headers?: HeadersInit;
6
- body?: any;
7
- };
8
- /**
9
- * Sends a PATCH request to the specified URL with optional headers and body.
10
- *
11
- * @template T - The expected type of the response data.
12
- * @param {InputProps} input - The options for the PATCH request, including URL, URL parameters, headers, and body.
13
- * @returns {Promise<ApiResponseDTO<T>>} A promise that resolves to the API response.
14
- */
15
- declare function patchRequest<T = any>(input: InputProps): Promise<ApiResponseDTO<T>>;
16
- export { patchRequest };
17
- //# sourceMappingURL=patchRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patchRequest.d.ts","sourceRoot":"","sources":["../../../src/http/api/patchRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAElE,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF;;;;;;GAMG;AAEH,iBAAe,YAAY,CAAC,CAAC,GAAG,GAAG,EACjC,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAQ5B;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,17 +0,0 @@
1
- import { type ApiResponseDTO } from "./_makeRequest";
2
- type InputProps = {
3
- url: string;
4
- urlParams?: Record<string, string>;
5
- headers?: HeadersInit;
6
- body?: any;
7
- };
8
- /**
9
- * Sends a POST request to the specified URL with optional headers and body.
10
- *
11
- * @template T - The expected type of the response data.
12
- * @param {InputProps} input - The options for the POST request, including URL, URL parameters, headers, and body.
13
- * @returns {Promise<ApiResponseDTO<T>>} A promise that resolves to the API response.
14
- */
15
- declare function postRequest<T = any>(input: InputProps): Promise<ApiResponseDTO<T>>;
16
- export { postRequest };
17
- //# sourceMappingURL=postRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postRequest.d.ts","sourceRoot":"","sources":["../../../src/http/api/postRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAElE,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF;;;;;;GAMG;AAEH,iBAAe,WAAW,CAAC,CAAC,GAAG,GAAG,EAChC,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAQ5B;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,17 +0,0 @@
1
- import { type ApiResponseDTO } from "./_makeRequest";
2
- type InputProps = {
3
- url: string;
4
- urlParams?: Record<string, string>;
5
- headers?: HeadersInit;
6
- body?: any;
7
- };
8
- /**
9
- * Sends a PUT request to the specified URL with optional headers and body.
10
- *
11
- * @template T - The expected type of the response data.
12
- * @param {InputProps} input - The options for the PUT request, including URL, URL parameters, headers, and body.
13
- * @returns {Promise<ApiResponseDTO<T>>} A promise that resolves to the API response.
14
- */
15
- declare function putRequest<T = any>(input: InputProps): Promise<ApiResponseDTO<T>>;
16
- export { putRequest };
17
- //# sourceMappingURL=putRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"putRequest.d.ts","sourceRoot":"","sources":["../../../src/http/api/putRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAElE,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ,CAAC;AAEF;;;;;;GAMG;AAEH,iBAAe,UAAU,CAAC,CAAC,GAAG,GAAG,EAC/B,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAQ5B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,25 +0,0 @@
1
- declare class BadResponse {
2
- private _cause?;
3
- private _name;
4
- private _status;
5
- private _statusText;
6
- private _debugColor;
7
- get cause(): any;
8
- set cause(value: any);
9
- get name(): string;
10
- set name(value: string);
11
- get status(): number;
12
- set status(value: number);
13
- get statusText(): string;
14
- set statusText(value: string);
15
- get debugColor(): "green" | "yellow" | "cyan" | "red";
16
- set debugColor(value: "green" | "yellow" | "cyan" | "red");
17
- onDebug(): void;
18
- makeBody(): {
19
- name: string;
20
- message: string;
21
- cause: any;
22
- };
23
- }
24
- export { BadResponse };
25
- //# sourceMappingURL=_badResponse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_badResponse.d.ts","sourceRoot":"","sources":["../../../src/http/badResponses/_badResponse.ts"],"names":[],"mappings":"AAKA,cAAM,WAAW;IACf,OAAO,CAAC,MAAM,CAAC,CAAM;IACrB,OAAO,CAAC,KAAK,CAAyB;IACtC,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,WAAW,CAA2B;IAC9C,OAAO,CAAC,WAAW,CAA8C;IAEjE,IAAI,KAAK,IAAI,GAAG,CAEf;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,GAAG,EAEnB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAEvB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,UAAU,CAAC,KAAK,EAAE,MAAM,EAE3B;IAED,IAAI,UAAU,IAAI,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAEpD;IAED,IAAI,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,EAGxD;IAED,OAAO;IAeP,QAAQ;;;;;CAOT;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,24 +0,0 @@
1
- import { BadResponse } from "./_badResponse";
2
- /**
3
- * HTTP 502 Bad Gateway — the upstream server returned an invalid or unexpected response.
4
- *
5
- * Throw inside a server action/loader and catch with `errorHandler`, or call `.toJson()` directly.
6
- *
7
- * @example
8
- * ```typescript
9
- * throw new BadGateway("Payment gateway unavailable");
10
- * ```
11
- */
12
- declare class BadGateway extends BadResponse {
13
- /**
14
- * @param message - Error description sent in the response body and logged for debugging.
15
- * @param cause - Optional extra context (serialized to JSON in the response).
16
- */
17
- constructor(message: string, cause?: any);
18
- /** Converts to a `Response` with `Content-Type: application/json` header. */
19
- toResponse(): Response;
20
- /** Converts to a `Response` using `Response.json()`. Alternative to `toResponse()`. */
21
- toJson(): Response;
22
- }
23
- export { BadGateway };
24
- //# sourceMappingURL=badGateway.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badGateway.d.ts","sourceRoot":"","sources":["../../../src/http/badResponses/badGateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;;GASG;AACH,cAAM,UAAW,SAAQ,WAAW;IAClC;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;IAWxC,6EAA6E;IAC7E,UAAU,IAAI,QAAQ;IAUtB,uFAAuF;IACvF,MAAM,IAAI,QAAQ;CAQnB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,22 +0,0 @@
1
- import { BadResponse } from "./_badResponse";
2
- /**
3
- * HTTP 400 Bad Request — the request is malformed or contains invalid data.
4
- *
5
- * @example
6
- * ```typescript
7
- * throw new BadRequest("Invalid request body");
8
- * ```
9
- */
10
- declare class BadRequest extends BadResponse {
11
- /**
12
- * @param message - Error description.
13
- * @param cause - Optional extra context (serialized to JSON).
14
- */
15
- constructor(message: string, cause?: any);
16
- /** Converts to a `Response` with `Content-Type: application/json` header. */
17
- toResponse(): Response;
18
- /** Converts to a `Response` using `Response.json()`. Alternative to `toResponse()`. */
19
- toJson(): Response;
20
- }
21
- export { BadRequest };
22
- //# sourceMappingURL=badRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badRequest.d.ts","sourceRoot":"","sources":["../../../src/http/badResponses/badRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;GAOG;AACH,cAAM,UAAW,SAAQ,WAAW;IAClC;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;IAWxC,6EAA6E;IAC7E,UAAU,IAAI,QAAQ;IAUtB,uFAAuF;IACvF,MAAM,IAAI,QAAQ;CAQnB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,22 +0,0 @@
1
- import { BadResponse } from "./_badResponse";
2
- /**
3
- * HTTP 409 Conflict — the request conflicts with the current state of the server (e.g. duplicate record).
4
- *
5
- * @example
6
- * ```typescript
7
- * throw new Conflict("Email already in use");
8
- * ```
9
- */
10
- declare class Conflict extends BadResponse {
11
- /**
12
- * @param message - Error description.
13
- * @param cause - Optional extra context (serialized to JSON).
14
- */
15
- constructor(message: string, cause?: any);
16
- /** Converts to a `Response` with `Content-Type: application/json` header. */
17
- toResponse(): Response;
18
- /** Converts to a `Response` using `Response.json()`. Alternative to `toResponse()`. */
19
- toJson(): Response;
20
- }
21
- export { Conflict };
22
- //# sourceMappingURL=conflict.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conflict.d.ts","sourceRoot":"","sources":["../../../src/http/badResponses/conflict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;GAOG;AACH,cAAM,QAAS,SAAQ,WAAW;IAChC;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;IAYxC,6EAA6E;IAC7E,UAAU,IAAI,QAAQ;IAUtB,uFAAuF;IACvF,MAAM,IAAI,QAAQ;CAQnB;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,22 +0,0 @@
1
- import { BadResponse } from "./_badResponse";
2
- /**
3
- * HTTP 403 Forbidden — authenticated but not authorized to access this resource.
4
- *
5
- * @example
6
- * ```typescript
7
- * throw new Forbidden("You don't have permission to delete this resource");
8
- * ```
9
- */
10
- declare class Forbidden extends BadResponse {
11
- /**
12
- * @param message - Error description.
13
- * @param cause - Optional extra context (serialized to JSON).
14
- */
15
- constructor(message: string, cause?: any);
16
- /** Converts to a `Response` with `Content-Type: application/json` header. */
17
- toResponse(): Response;
18
- /** Converts to a `Response` using `Response.json()`. Alternative to `toResponse()`. */
19
- toJson(): Response;
20
- }
21
- export { Forbidden };
22
- //# sourceMappingURL=forbidden.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"forbidden.d.ts","sourceRoot":"","sources":["../../../src/http/badResponses/forbidden.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;GAOG;AACH,cAAM,SAAU,SAAQ,WAAW;IACjC;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;IAWxC,6EAA6E;IAC7E,UAAU,IAAI,QAAQ;IAUtB,uFAAuF;IACvF,MAAM,IAAI,QAAQ;CAQnB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -1,22 +0,0 @@
1
- import { BadResponse } from "./_badResponse";
2
- /**
3
- * HTTP 404 Not Found — the requested resource does not exist.
4
- *
5
- * @example
6
- * ```typescript
7
- * throw new NotFound("Product not found");
8
- * ```
9
- */
10
- declare class NotFound extends BadResponse {
11
- /**
12
- * @param message - Error description.
13
- * @param cause - Optional extra context (serialized to JSON).
14
- */
15
- constructor(message: string, cause?: any);
16
- /** Converts to a `Response` with `Content-Type: application/json` header. */
17
- toResponse(): Response;
18
- /** Converts to a `Response` using `Response.json()`. Alternative to `toResponse()`. */
19
- toJson(): Response;
20
- }
21
- export { NotFound };
22
- //# sourceMappingURL=notFound.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notFound.d.ts","sourceRoot":"","sources":["../../../src/http/badResponses/notFound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;GAOG;AACH,cAAM,QAAS,SAAQ,WAAW;IAChC;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;IAWxC,6EAA6E;IAC7E,UAAU,IAAI,QAAQ;IAUtB,uFAAuF;IACvF,MAAM,IAAI,QAAQ;CAQnB;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,22 +0,0 @@
1
- import { BadResponse } from "./_badResponse";
2
- /**
3
- * HTTP 501 Not Implemented — the server does not support the functionality required to fulfill the request.
4
- *
5
- * @example
6
- * ```typescript
7
- * throw new NotImplemented("Webhook delivery is not yet implemented");
8
- * ```
9
- */
10
- declare class NotImplemented extends BadResponse {
11
- /**
12
- * @param message - Error description.
13
- * @param cause - Optional extra context (serialized to JSON).
14
- */
15
- constructor(message: string, cause?: any);
16
- /** Converts to a `Response` with `Content-Type: application/json` header. */
17
- toResponse(): Response;
18
- /** Converts to a `Response` using `Response.json()`. Alternative to `toResponse()`. */
19
- toJson(): Response;
20
- }
21
- export { NotImplemented };
22
- //# sourceMappingURL=notImplemented.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notImplemented.d.ts","sourceRoot":"","sources":["../../../src/http/badResponses/notImplemented.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;GAOG;AACH,cAAM,cAAe,SAAQ,WAAW;IACtC;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;IAWxC,6EAA6E;IAC7E,UAAU,IAAI,QAAQ;IAUtB,uFAAuF;IACvF,MAAM,IAAI,QAAQ;CAQnB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1,22 +0,0 @@
1
- import { BadResponse } from "./_badResponse";
2
- /**
3
- * HTTP 500 Internal Server Error — an unexpected condition prevented the server from fulfilling the request.
4
- *
5
- * @example
6
- * ```typescript
7
- * throw new ServerError("Failed to connect to the database");
8
- * ```
9
- */
10
- declare class ServerError extends BadResponse {
11
- /**
12
- * @param message - Error description.
13
- * @param cause - Optional extra context (serialized to JSON).
14
- */
15
- constructor(message: string, cause?: any);
16
- /** Converts to a `Response` with `Content-Type: application/json` header. */
17
- toResponse(): Response;
18
- /** Converts to a `Response` using `Response.json()`. Alternative to `toResponse()`. */
19
- toJson(): Response;
20
- }
21
- export { ServerError };
22
- //# sourceMappingURL=serverError.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"serverError.d.ts","sourceRoot":"","sources":["../../../src/http/badResponses/serverError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;GAOG;AACH,cAAM,WAAY,SAAQ,WAAW;IACnC;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;IAWxC,6EAA6E;IAC7E,UAAU,IAAI,QAAQ;IAUtB,uFAAuF;IACvF,MAAM,IAAI,QAAQ;CAQnB;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,22 +0,0 @@
1
- import { BadResponse } from "./_badResponse";
2
- /**
3
- * HTTP 401 Unauthorized — the request lacks valid authentication credentials.
4
- *
5
- * @example
6
- * ```typescript
7
- * throw new Unauthorized("Invalid or expired token");
8
- * ```
9
- */
10
- declare class Unauthorized extends BadResponse {
11
- /**
12
- * @param message - Error description.
13
- * @param cause - Optional extra context (serialized to JSON).
14
- */
15
- constructor(message: string, cause?: any);
16
- /** Converts to a `Response` with `Content-Type: application/json` header. */
17
- toResponse(): Response;
18
- /** Converts to a `Response` using `Response.json()`. Alternative to `toResponse()`. */
19
- toJson(): Response;
20
- }
21
- export { Unauthorized };
22
- //# sourceMappingURL=unauthorized.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unauthorized.d.ts","sourceRoot":"","sources":["../../../src/http/badResponses/unauthorized.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;GAOG;AACH,cAAM,YAAa,SAAQ,WAAW;IACpC;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG;IAYxC,6EAA6E;IAC7E,UAAU,IAAI,QAAQ;IAUtB,uFAAuF;IACvF,MAAM,IAAI,QAAQ;CAQnB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,34 +0,0 @@
1
- import { BadResponse } from "./_badResponse";
2
- /**
3
- * HTTP 422 Unprocessable Entity — the request is well-formed but contains semantic validation errors.
4
- * Typically used for form field validation failures.
5
- *
6
- * @example
7
- * ```typescript
8
- * throw new UnprocessableEntity({
9
- * message: "Validation failed",
10
- * fieldErrors: { email: "Invalid email format", age: "Must be 18 or older" },
11
- * fields: { email: "not-an-email", age: "15" },
12
- * });
13
- * ```
14
- */
15
- declare class UnprocessableEntity extends BadResponse {
16
- /**
17
- * @param props.message - Human-readable description of the error.
18
- * @param props.fieldErrors - Per-field validation messages keyed by field name.
19
- * @param props.fields - Original submitted field values (useful for repopulating forms).
20
- * @param props.data - Any extra data to include in the response body.
21
- */
22
- constructor(props: {
23
- data?: any;
24
- fieldErrors?: Record<string, string>;
25
- fields?: Record<string, string>;
26
- message?: string;
27
- });
28
- /** Converts to a `Response` with `Content-Type: application/json` header. */
29
- toResponse(): Response;
30
- /** Converts to a `Response` using `Response.json()`. Alternative to `toResponse()`. */
31
- toJson(): Response;
32
- }
33
- export { UnprocessableEntity };
34
- //# sourceMappingURL=unprocessableEntity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unprocessableEntity.d.ts","sourceRoot":"","sources":["../../../src/http/badResponses/unprocessableEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;;;;;GAYG;AACH,cAAM,mBAAoB,SAAQ,WAAW;IAC3C;;;;;OAKG;gBACS,KAAK,EAAE;QACjB,IAAI,CAAC,EAAE,GAAG,CAAC;QACX,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACrC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IAgBD,6EAA6E;IAC7E,UAAU,IAAI,QAAQ;IAUtB,uFAAuF;IACvF,MAAM,IAAI,QAAQ;CAQnB;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Base class for handling successful HTTP responses with debugging capabilities.
3
- * Provides logging functionality to track response and their context.
4
- */
5
- declare class SuccessResponse {
6
- private _body;
7
- private _name;
8
- private _status;
9
- private _statusText;
10
- private _debugColor;
11
- get body(): any;
12
- set body(value: any);
13
- get name(): string;
14
- set name(value: string);
15
- get status(): number;
16
- set status(value: number);
17
- get statusText(): string;
18
- set statusText(value: string);
19
- get debugColor(): "green" | "yellow" | "cyan" | "red";
20
- set debugColor(value: "green" | "yellow" | "cyan" | "red");
21
- /**
22
- * Logs debug information for success responses including caller context and response details.
23
- *
24
- * @param {any} body - The response body or success data to be logged
25
- *
26
- * @example
27
- * ```typescript
28
- * const SuccessResponse = new SuccessResponse();
29
- * SuccessResponse.onDebug({ data: "Operation completed successfully" });
30
- * ```
31
- */
32
- onDebug(body?: any): void;
33
- makeBody(): any;
34
- }
35
- export { SuccessResponse };
36
- //# sourceMappingURL=_successResponse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_successResponse.d.ts","sourceRoot":"","sources":["../../../src/http/successResponses/_successResponse.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,cAAM,eAAe;IACnB,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,KAAK,CAA6B;IAC1C,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,WAAW,CAAgD;IAEnE,IAAI,IAAI,IAAI,GAAG,CAEd;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,GAAG,EAElB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAEvB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,UAAU,CAAC,KAAK,EAAE,MAAM,EAE3B;IAED,IAAI,UAAU,IAAI,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAEpD;IAED,IAAI,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,EAGxD;IAED;;;;;;;;;;OAUG;IACH,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;IAazB,QAAQ,IAAI,GAAG;CAOhB;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,22 +0,0 @@
1
- import { SuccessResponse } from "./_successResponse";
2
- /**
3
- * HTTP 201 Created — the request succeeded and a new resource was created.
4
- *
5
- * @example
6
- * ```typescript
7
- * return new Created("User created successfully", { id: user.id }).toJson();
8
- * ```
9
- */
10
- declare class Created extends SuccessResponse {
11
- /**
12
- * @param message - Description included in the response status text.
13
- * @param body - Data to include in the response body.
14
- */
15
- constructor(message: string, body?: any);
16
- /** Converts to a `Response` with `Content-Type: application/json` header. */
17
- toResponse(): Response;
18
- /** Converts to a `Response` using `Response.json()`. Alternative to `toResponse()`. */
19
- toJson(): Response;
20
- }
21
- export { Created };
22
- //# sourceMappingURL=created.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"created.d.ts","sourceRoot":"","sources":["../../../src/http/successResponses/created.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;GAOG;AACH,cAAM,OAAQ,SAAQ,eAAe;IACnC;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG;IAWvC,6EAA6E;IAC7E,UAAU,IAAI,QAAQ;IAUtB,uFAAuF;IACvF,MAAM,IAAI,QAAQ;CAQnB;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}