@plyaz/types 1.13.16 → 1.13.17

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.
package/dist/api/index.js CHANGED
@@ -1,5 +1,3 @@
1
- import { HTTP_STATUS } from '@plyaz/config';
2
-
3
1
  // @plyaz package - Built with tsup
4
2
  var __defProp = Object.defineProperty;
5
3
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -719,6 +717,66 @@ var COMMON_STORAGE_TYPES = {
719
717
  REDIS: "redis",
720
718
  DATABASE: "database"
721
719
  };
720
+
721
+ // src/http/constants.ts
722
+ var HTTP_STATUS = {
723
+ // 2xx Success
724
+ /**
725
+ * 200 OK - The request succeeded
726
+ */
727
+ OK: 200,
728
+ // 4xx Client Errors
729
+ /**
730
+ * 400 Bad Request - The server cannot process the request due to client error
731
+ */
732
+ BAD_REQUEST: 400,
733
+ /**
734
+ * 401 Unauthorized - Authentication is required and has failed or not been provided
735
+ */
736
+ UNAUTHORIZED: 401,
737
+ /**
738
+ * 403 Forbidden - The server understood the request but refuses to authorize it
739
+ */
740
+ FORBIDDEN: 403,
741
+ /**
742
+ * 404 Not Found - The server cannot find the requested resource
743
+ */
744
+ NOT_FOUND: 404,
745
+ /**
746
+ * 408 Request Timeout - The server timed out waiting for the request
747
+ */
748
+ REQUEST_TIMEOUT: 408,
749
+ /**
750
+ * 409 Conflict - The request conflicts with the current state of the server
751
+ */
752
+ CONFLICT: 409,
753
+ /**
754
+ * 429 Too Many Requests - The user has sent too many requests in a given amount of time
755
+ */
756
+ TOO_MANY_REQUESTS: 429,
757
+ // 5xx Server Errors
758
+ /**
759
+ * 500 Internal Server Error - The server encountered an unexpected condition
760
+ */
761
+ INTERNAL_SERVER_ERROR: 500,
762
+ /**
763
+ * 501 Not Implemented - The server does not support the functionality required to fulfill the request
764
+ */
765
+ NOT_IMPLEMENTED: 501,
766
+ /**
767
+ * 502 Bad Gateway - The server received an invalid response from the upstream server
768
+ */
769
+ BAD_GATEWAY: 502,
770
+ /**
771
+ * 503 Service Unavailable - The server is not ready to handle the request
772
+ */
773
+ SERVICE_UNAVAILABLE: 503,
774
+ /**
775
+ * 504 Gateway Timeout - The server did not get a response in time from the upstream server
776
+ */
777
+ GATEWAY_TIMEOUT: 504};
778
+
779
+ // src/errors/codes.ts
722
780
  var ERROR_CODES = {
723
781
  // ===== API Package Errors =====
724
782
  // Client Configuration