@hello.nrfcloud.com/proto
Version:
Documents the communication protocol between the hello.nrfcloud.com backend and the web application
36 lines (35 loc) • 2.25 kB
JavaScript
import { Type } from '@sinclair/typebox';
/**
* @see https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
*/ export var HttpStatusCode = /*#__PURE__*/ function(HttpStatusCode) {
/**
* Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an entity corresponding to the requested resource. In a POST request, the response will contain an entity describing or containing the result of the action.
*/ HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK";
/**
* The request has been fulfilled, resulting in the creation of a new resource.
*/ HttpStatusCode[HttpStatusCode["CREATED"] = 201] = "CREATED";
/**
* The request has been accepted for processing, but the processing has not been completed. The request might or might not be eventually acted upon, and may be disallowed when processing occurs.
*/ HttpStatusCode[HttpStatusCode["ACCEPTED"] = 202] = "ACCEPTED";
/**
* The server cannot or will not process the request due to an apparent client error
* (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).
*/ HttpStatusCode[HttpStatusCode["BAD_REQUEST"] = 400] = "BAD_REQUEST";
/**
* The request contained valid data and was understood by the server, but the server is refusing action.
* The request should not be repeated.
*/ HttpStatusCode[HttpStatusCode["FORBIDDEN"] = 403] = "FORBIDDEN";
/**
* The requested resource could not be found but may be available in the future.
* Subsequent requests by the client are permissible.
*/ HttpStatusCode[HttpStatusCode["NOT_FOUND"] = 404] = "NOT_FOUND";
/**
* Indicates that the request could not be processed because of conflict in the request,
* such as an edit conflict between multiple simultaneous updates.
*/ HttpStatusCode[HttpStatusCode["CONFLICT"] = 409] = "CONFLICT";
/**
* A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
*/ HttpStatusCode[HttpStatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
return HttpStatusCode;
}({});
export var StatusCode = Type.Enum(HttpStatusCode);