Replicating airbnb following the atomic design principles...
@nextbnb/common is a package containing the interfaces and functions to validate the interface that can be utilized in other packages.
Interfaces have a prefix of ‘I’
| Class | Description | 
|---|---|
| ApiError | Blueprint for the ApiError | 
| BaseError | Blueprint for the BaseError which will be extended by other specific errors | 
| Experience | Class to create the Experience instance | 
| UnauthorizedError | Customized error to be thrown when the user tries to perform an authorized action | 
| Enumeration | Description | 
|---|---|
| HttpMethods | List of all the HTTP methods | 
| Service | List of all the Services | 
| Function | Description | 
|---|---|
| isExperience(arg) | Checks whether a given value is an IExperience | 
| isStay(arg) | Checks whether a given value is an IStay | 
| isUser(arg) | Checks whether a given value is an IUser | 
| Interface | Description | 
|---|---|
| IApiError | Interface for the ApiError class | 
| IBaseError | Interface for the BaseError instance | 
| IBaseErrorConstructor | Interface for constructing the BaseError instance | 
| IContext | Interface of the Context | 
| IExperience | An experience posted by the user | 
| IHost | Interface for the Host | 
| IHostConstructor | Params to be passed to create the Host instance | 
| IRole | Interface of the serviceRoles property in Context | 
| IStay | A stay posted by the user | 
| IUnauthorizedError | Interface for the IUnauthorizedError instance | 
| IUser | A user | 
| Variable | Description | 
|---|---|
| createExperience | Factory to create Experience | 
| createHost | Factory to create Hosts | 
| createStay | Factory to create the Stay instance | 
| createUser | Factory to create the User instance | 
| isHost | Checks whether a given value is an IHost | 
| Type Alias | Description | 
|---|---|
| TEnvironment | Type of environment |