DWS Packages
    Preparing search index...

    Function entry

    • entry<
          TParams extends Record<string, string> = Record<string, string>,
          TLocales extends string = string,
      >(
          definition: {
              status:
                  | "CONTINUE"
                  | "SWITCHING_PROTOCOLS"
                  | "PROCESSING"
                  | "EARLY_HINTS"
                  | "OK"
                  | "CREATED"
                  | "ACCEPTED"
                  | "NON_AUTHORITATIVE_INFORMATION"
                  | "NO_CONTENT"
                  | "RESET_CONTENT"
                  | "PARTIAL_CONTENT"
                  | "MULTI_STATUS"
                  | "ALREADY_REPORTED"
                  | "IM_USED"
                  | "MULTIPLE_CHOICES"
                  | "MOVED_PERMANENTLY"
                  | "FOUND"
                  | "SEE_OTHER"
                  | "NOT_MODIFIED"
                  | "USE_PROXY"
                  | "SWITCH_PROXY"
                  | "TEMPORARY_REDIRECT"
                  | "PERMANENT_REDIRECT"
                  | "BAD_REQUEST"
                  | "UNAUTHORIZED"
                  | "PAYMENT_REQUIRED"
                  | "FORBIDDEN"
                  | "NOT_FOUND"
                  | "METHOD_NOT_ALLOWED"
                  | "NOT_ACCEPTABLE"
                  | "PROXY_AUTHENTICATION_REQUIRED"
                  | "REQUEST_TIMEOUT"
                  | "CONFLICT"
                  | "GONE"
                  | "LENGTH_REQUIRED"
                  | "PRECONDITION_FAILED"
                  | "PAYLOAD_TOO_LARGE"
                  | "URI_TOO_LONG"
                  | "UNSUPPORTED_MEDIA_TYPE"
                  | "RANGE_NOT_SATISFIABLE"
                  | "EXPECTATION_FAILED"
                  | "IM_A_TEAPOT"
                  | "MISDIRECTED_REQUEST"
                  | "UNPROCESSABLE_ENTITY"
                  | "LOCKED"
                  | "FAILED_DEPENDENCY"
                  | "TOO_EARLY"
                  | "UPGRADE_REQUIRED"
                  | "PRECONDITION_REQUIRED"
                  | "TOO_MANY_REQUESTS"
                  | "REQUEST_HEADER_FIELDS_TOO_LARGE"
                  | "UNAVAILABLE_FOR_LEGAL_REASONS"
                  | "INTERNAL_SERVER_ERROR"
                  | "NOT_IMPLEMENTED"
                  | "BAD_GATEWAY"
                  | "SERVICE_UNAVAILABLE"
                  | "GATEWAY_TIMEOUT"
                  | "HTTP_VERSION_NOT_SUPPORTED"
                  | "VARIANT_ALSO_NEGOTIATES"
                  | "INSUFFICIENT_STORAGE"
                  | "LOOP_DETECTED"
                  | "NOT_EXTENDED"
                  | "NETWORK_AUTHENTICATION_REQUIRED"
                  | HttpStatusCode;
              translations: Readonly<Record<TLocales, string>>;
          },
      ): ExceptionEntry<TParams, TLocales>

      Creates a single catalog entry for use inside defineExceptionCatalog or defineMessageCatalog.

      When status is included in the definition the return type narrows to ExceptionEntry; without it the return type is MessageEntry.

      Type Parameters

      • TParams extends Record<string, string> = Record<string, string>
      • TLocales extends string = string

      Parameters

      • definition: {
            status:
                | "CONTINUE"
                | "SWITCHING_PROTOCOLS"
                | "PROCESSING"
                | "EARLY_HINTS"
                | "OK"
                | "CREATED"
                | "ACCEPTED"
                | "NON_AUTHORITATIVE_INFORMATION"
                | "NO_CONTENT"
                | "RESET_CONTENT"
                | "PARTIAL_CONTENT"
                | "MULTI_STATUS"
                | "ALREADY_REPORTED"
                | "IM_USED"
                | "MULTIPLE_CHOICES"
                | "MOVED_PERMANENTLY"
                | "FOUND"
                | "SEE_OTHER"
                | "NOT_MODIFIED"
                | "USE_PROXY"
                | "SWITCH_PROXY"
                | "TEMPORARY_REDIRECT"
                | "PERMANENT_REDIRECT"
                | "BAD_REQUEST"
                | "UNAUTHORIZED"
                | "PAYMENT_REQUIRED"
                | "FORBIDDEN"
                | "NOT_FOUND"
                | "METHOD_NOT_ALLOWED"
                | "NOT_ACCEPTABLE"
                | "PROXY_AUTHENTICATION_REQUIRED"
                | "REQUEST_TIMEOUT"
                | "CONFLICT"
                | "GONE"
                | "LENGTH_REQUIRED"
                | "PRECONDITION_FAILED"
                | "PAYLOAD_TOO_LARGE"
                | "URI_TOO_LONG"
                | "UNSUPPORTED_MEDIA_TYPE"
                | "RANGE_NOT_SATISFIABLE"
                | "EXPECTATION_FAILED"
                | "IM_A_TEAPOT"
                | "MISDIRECTED_REQUEST"
                | "UNPROCESSABLE_ENTITY"
                | "LOCKED"
                | "FAILED_DEPENDENCY"
                | "TOO_EARLY"
                | "UPGRADE_REQUIRED"
                | "PRECONDITION_REQUIRED"
                | "TOO_MANY_REQUESTS"
                | "REQUEST_HEADER_FIELDS_TOO_LARGE"
                | "UNAVAILABLE_FOR_LEGAL_REASONS"
                | "INTERNAL_SERVER_ERROR"
                | "NOT_IMPLEMENTED"
                | "BAD_GATEWAY"
                | "SERVICE_UNAVAILABLE"
                | "GATEWAY_TIMEOUT"
                | "HTTP_VERSION_NOT_SUPPORTED"
                | "VARIANT_ALSO_NEGOTIATES"
                | "INSUFFICIENT_STORAGE"
                | "LOOP_DETECTED"
                | "NOT_EXTENDED"
                | "NETWORK_AUTHENTICATION_REQUIRED"
                | HttpStatusCode;
            translations: Readonly<Record<TLocales, string>>;
        }

        Translations (and optional status) for this entry.

      Returns ExceptionEntry<TParams, TLocales>

      The definition object, typed as either ExceptionEntry or MessageEntry based on the presence of status.

    • entry<
          TParams extends Record<string, string> = Record<string, string>,
          TLocales extends string = string,
      >(
          definition: { translations: Readonly<Record<TLocales, string>> },
      ): MessageEntry<TParams, TLocales>

      Creates a single catalog entry for use inside defineExceptionCatalog or defineMessageCatalog.

      When status is included in the definition the return type narrows to ExceptionEntry; without it the return type is MessageEntry.

      Type Parameters

      • TParams extends Record<string, string> = Record<string, string>
      • TLocales extends string = string

      Parameters

      • definition: { translations: Readonly<Record<TLocales, string>> }

        Translations (and optional status) for this entry.

      Returns MessageEntry<TParams, TLocales>

      The definition object, typed as either ExceptionEntry or MessageEntry based on the presence of status.