diff --git a/assets/highlight.css b/assets/highlight.css index 6367f94..96f23cf 100644 --- a/assets/highlight.css +++ b/assets/highlight.css @@ -7,6 +7,18 @@ --dark-hl-2: #CE9178; --light-hl-3: #0000FF; --dark-hl-3: #569CD6; + --light-hl-4: #AF00DB; + --dark-hl-4: #C586C0; + --light-hl-5: #001080; + --dark-hl-5: #9CDCFE; + --light-hl-6: #0070C1; + --dark-hl-6: #4FC1FF; + --light-hl-7: #008000; + --dark-hl-7: #6A9955; + --light-hl-8: #098658; + --dark-hl-8: #B5CEA8; + --light-hl-9: #EE0000; + --dark-hl-9: #D7BA7D; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } @@ -16,6 +28,12 @@ --hl-1: var(--light-hl-1); --hl-2: var(--light-hl-2); --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); --code-background: var(--light-code-background); } } @@ -24,6 +42,12 @@ --hl-1: var(--dark-hl-1); --hl-2: var(--dark-hl-2); --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); --code-background: var(--dark-code-background); } } @@ -32,6 +56,12 @@ --hl-1: var(--light-hl-1); --hl-2: var(--light-hl-2); --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); --code-background: var(--light-code-background); } @@ -40,6 +70,12 @@ --hl-1: var(--dark-hl-1); --hl-2: var(--dark-hl-2); --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); --code-background: var(--dark-code-background); } @@ -47,4 +83,10 @@ .hl-1 { color: var(--hl-1); } .hl-2 { color: var(--hl-2); } .hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } pre, code { background: var(--code-background); } diff --git a/assets/navigation.js b/assets/navigation.js index eb6167a..c726182 100644 --- a/assets/navigation.js +++ b/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA52XTU/cMBCG/0vOqMC2UMptixbogXYFoj1UPbjOoFj1OtHY2YJQ/3udJpD426602pXjd57X9nrGzvfnSsGjqs6rz/pn3bFbkF0rJHzsGa8Bq4OqI6rR/ZQTKUEe+nVvGrXjWvyLibo6P16d/Tl4JX+6QCAK7uXwwTuQkrXiS6f0t5z5TCjAB0K1RSzANFqdnKaM9EB7rvJ9Rn2GzTemGr0QW2w7mTEbjzzT5A5wD1ji40ZErTaiIYKCHt1FK4aHm0eg/RA3tf1+ybAc03Go/+MbjYxaX4F6+SfWNGkXUkctxsFtEFu8JqLmrwP1ewTlUZNp48Z2uCFJwV5SYJhrELcUlQCHZhZ0aEbBy0zyE5eKbFQ0t0qz18rCjG0WiyixSk6jrDjoSd+wWu/I3wRhhqqnTvOMToty9OH98clqQXLKhU1zBJlEoxAEoIYmxXUy3oY6gmLiv1Qfs/Ir4b2zssmAYkcrXQI2vpRJs+0KFIB7q1AuPW+ZylZoKDXrPVEE75F72EZ/ijdnwnBFuuyFd+v4VSm2ez7YXFeRxwwnt92f4k1HjY2ZHmdGXxN5hW3fbRFqRvV1JoBzdPn8LeCOTadN0sQjzne6bTlkeBiyTPp0XgagU2+KtTzULglVLT7ZQI+khBrYrB5JDtU5Hn1cR1RIjiyEq0qxJW1gR2bWniAjP7nmjT1m/NtlKPW8m8ygh6lwyEOfzsSevnOw/iuUDQ1fowLIxQLFqQuhA/7xF83eiiiUDgAA" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA52XX0/bMBTFv4ufyzK6wba+ZajAHjaqorKHiQfjXBRrrm3ZTgma9t2nkEAT/8+kviQ+93cc1+c6+fUHGWgNWqEf0JpS0i1oKbiGrw1lFSi0QBKbGq0QYVhr0IVf9642e4YW6DflFVqdLj//XbyRdxxaCcRANapbKyU89LDWcVj0RWiFjK5OqD6B1oDimKGR97cLBdjATnc/dQtaU8FvpKGC66M75QbUIyagi1jBdArLs/OU0RZ0w0y+T6/PsPlJTV1KulFC6oyn8cgzTW5BHUDN8XErolZrXmNOoJT0QvDu5roF0nR1w7XfL1mWY9pP9X98o5VR6yswr/9ESZJ2IXXUop/cS2iuMa/Y20T9HkF51GTYuLEdPpGkYK8R6J41iBuL5gC7yyxodxkFj5PkJ44V2ahotuam10phxjaLVcyxSj7GvOZQSvqdVhWDJ6zgCDXPEnQxGbQo7798Oj1bjkhOu7BpjiCTOGkEAehEk+I6ibehjmA28SXqfSrvMGuclU0WzHa04hKw8UUmzbY7UADu7UK59LxlmrdCXaspD9hgtVPMw56Mp3jHJHSvZ5cN924dvyrFds8Hm+sq8pjhcNvjKd5w1NiY4XZm9TXWV0o0cqOgogQbZ1YhXT5/A2pPh9MmaeIR5zttBYMMj4kskz6clwHoMJpijQ+1S0yMUM820COZQw1sVo8kh+ocjz6uI5pJjiyEq0qxNalhj4+sA1YUPzDQRT8yrf8wLiWeb5Mj6HFoHLrw6abY848O1v8KZUPDr1EB5GiB4tSRMAI2tRJPN9z7Perjx/S2TeTL9f4fXrExXpEPAAA=" \ No newline at end of file diff --git a/assets/search.js b/assets/search.js index aff0ccc..05f1410 100644 --- a/assets/search.js +++ b/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA81dW4/TyB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p+Wn9G0aqiYP1hN34ZVT3dkmVQKriCjfrtAHKPpCOPtdPstIw0ybvywcREKKATaxJIJcO5oZKEH24BRJci7QllLdFAimwMwiXHZqzm88KWrFireD2PT5IoYAtrZ5C8AEm0mkCKAEWYQlMUmwGDigoYFXEFVR7FNC/e71rnqYPAAJSGCGatQhP/azMr/WT0MHCBQ8XXO/WYqh4gM6tOIiqPQGqFHj6rJYsxVUM1d4ADn51TJS1HK7dHZLT+h4tBKDKJBdAdCcnyO0I5raqV01u2TV3ilvrtoqhCFb//oj3daAoJRfybi0BoCSXcIcz1gSCHHI8zQNhwTIG2Mq4+FzvaB/hCsICUqpi57Ky23IkiI7iVp3qzlhQRyuIRDMH4SCp/zc1rQDAzwVKP+Vt3TwcFqQySCSfS13NvDFP+QSQAqU+lwia8a59sCpQC5LP57JWc28zjK4P2kXANVTNuNuv60dHAm5Q+AGXFSX36a58dCJgBvUauEL12DxNr9N5fHgM4/22l2goApWtUwIzzIHZxjU9YpQQwUbNazYPjzie8IbAA0XpVwM+xbl/ypM1sjiAJc1hfsZlHIA6Dquzf+TgxTsPODlgY1RtPFDzALGNm0LmqqMSUB9pDu2dw8AUeDhhT5utpHa9oMXBIwt7TmzF6V5FC4ILELvF5wdTCmbTqhm1cjkBt1l39eMUANqgKELOGCiDqKsAeBRykSF3amgFgJsiLnMsKYRDEjgUkevP56tF4Uu6zXYF0e3nnz//D+1O5h3abAAA"; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA81dW4+byBL+L8yrz8QNdAPzNmcy2ay0J4ly2fNgRStiMxm0HtsH8GxWUf77UTe3Kqhqbl4pUiQnpu5fVXV3gcl3Jzv+lTs3m+/On+lh59x47so5xE+Jc+Pk28fkKXZWzjnbOzfOc5yl8Zd9kr8oL1w/Fk97Z+Vs93GeJ7lz4zg/VrUYdx0FQraybk/pf9Ldbp/8FWdJI7L4+5TkL9A1q1QlpacamX/8ofkHhV01dEDmyjnFWXIoeqYBF2Sr6tc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W4uh4gE6d8BBVO0JUKXA02e1ZAVcxVDtDeDgVcdEWcvh2t0pLraPaCEAVSa5AKInOUFuhzC3g3rV5JZd86R4Z90OIiiC1X/M8b4OFKXkQt6vJQCU5BLudMaaQJAVx9O8EBYsY4CtjIvH9Y72Fa4gLCClKnYuK/stR4LoBNyqUz0ZC+poDZFo5iAcJPV/U9MKAPxcoPRb3rbNy2FBKoNE8rjU1cw785ZPAClQ6nGJoBkf2herArUg+TwuazX3PsXoeqBd+FxD1YyH47Z+dSTgBoXvc1lRchcP5asTATOoV98WqufmbXq9zuPBYxjvd3eJhiJQ2VolMMMcmG1c0yNGCSFs1Lxm8/KIvMAbAhcUpVcN+ALO/SKLt8hiH5Y0h/kZl7EP6lhVZ//Qwot3HnBywMao2nig5gFiGzWFzFVHJaA+0pzaJ4eBKfBwwp42W0ntekGLg0cW9pzYitO9ihYEFyB2i88PpgKYTetm1MrlBNxmPdSvUwBog6JQnDFQBlFXPvBIcZEhd2poBYCbIi5zOlIIhyRwKCTXn88r55Sekn16SJybzecfP/4P7U7mHdpsAAA="; \ No newline at end of file diff --git a/classes/NextApiResponseBuilder.html b/classes/NextApiResponseBuilder.html index bfbaf12..9ec7724 100644 --- a/classes/NextApiResponseBuilder.html +++ b/classes/NextApiResponseBuilder.html @@ -1,5 +1,5 @@ NextApiResponseBuilder | @egomobile/next-utils

Next.js version of ApiResponseBuilder class.

-

Hierarchy

  • ApiResponseBuilder
    • NextApiResponseBuilder

Constructors

Hierarchy

  • ApiResponseBuilder
    • NextApiResponseBuilder

Constructors

Properties

Accessors

data @@ -16,7 +16,7 @@ withList withStatus withSuccess -

Constructors

Properties

request: IHttpRequest<any>

The underlying request context.

+

Constructors

Properties

request: IHttpRequest<any>

The underlying request context.

response: IHttpResponse

The underlying response context.

Accessors

  • get data(): Nullable<ApiResponseData>
  • Gets the data to return.

    Returns Nullable<ApiResponseData>

    The data to return.

    @@ -51,4 +51,4 @@
  • Sets the value of the 'success' property.

    Parameters

    • Optional value: boolean

      The new value.

    Returns NextApiResponseBuilder

    That instance.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/UnexpectedApiResponseError.html b/classes/UnexpectedApiResponseError.html new file mode 100644 index 0000000..1dcb986 --- /dev/null +++ b/classes/UnexpectedApiResponseError.html @@ -0,0 +1,16 @@ +UnexpectedApiResponseError | @egomobile/next-utils

Class UnexpectedApiResponseError

Is thrown on an unexpected API response.

+

Hierarchy

  • Error
    • UnexpectedApiResponseError

Constructors

  • Initializes a new instance of that class.

    +

    Parameters

    • response: AxiosResponse

      The response context.

      +
    • Optional message: string

      The optional message.

      +

    Returns UnexpectedApiResponseError

Properties

message: string
name: string
response: AxiosResponse
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    +

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/createUseUserSession.html b/functions/createUseUserSession.html index 2773c3e..da0d7d2 100644 --- a/functions/createUseUserSession.html +++ b/functions/createUseUserSession.html @@ -1,4 +1,4 @@ createUseUserSession | @egomobile/next-utils

Function createUseUserSession

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/createWithApiProps.html b/functions/createWithApiProps.html index 3631cd5..ef7d1fd 100644 --- a/functions/createWithApiProps.html +++ b/functions/createWithApiProps.html @@ -2,4 +2,4 @@ that is used for API endpoints in Next.js.

Type Parameters

Parameters

Returns WithApiPropsFactory<TContext>

The new factory function.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/createWithServerProps.html b/functions/createWithServerProps.html index 805640f..aac9641 100644 --- a/functions/createWithServerProps.html +++ b/functions/createWithServerProps.html @@ -2,4 +2,4 @@ that is used for SSR rendered pages in Next.js.

Type Parameters

Parameters

Returns WithServerPropsFactory<TContext>

The new factory function.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/throwOnUnexpectedApiResponse.html b/functions/throwOnUnexpectedApiResponse.html new file mode 100644 index 0000000..f306b38 --- /dev/null +++ b/functions/throwOnUnexpectedApiResponse.html @@ -0,0 +1,7 @@ +throwOnUnexpectedApiResponse | @egomobile/next-utils

Function throwOnUnexpectedApiResponse

  • Throws an exception on an unexpected API response.

    +

    Parameters

    • response: AxiosResponse

      The response context.

      +
    • expectedStatusCodes: number[]

      One or more expected HTTP status codes.

      +
    • Optional errorMessages: Nilable<ApiResponseErrorMessages>

      An optional repository of error messages by status code.

      +

    Returns Promise<void>

    Example

    import axios from "axios"
    import { throwOnUnexpectedApiResponse } from "@egomobile/api-utils"

    const response = await axios.get("https://api.example.com")

    // we expect `200` as response
    await throwOnUnexpectedApiResponse(response, 200)

    // same as an array, which makes it possible to expect more than
    // one possible status code
    await throwOnUnexpectedApiResponse(response, [200])

    // as validator function
    await throwOnUnexpectedApiResponse(response, (context) => context.response.status === 200)

    // this will throw special errors messages, for status codes beginning with 4 or 5
    //
    // the first match always "wins"
    //
    // following template placeholders are supported:
    // - {{body}} => response body as text with a maximum length of 131072 chars
    // - {{headers}} => list of HTTP response headers as one single text
    // - {{messages}} => list of extracted API messages items as one single text
    // - {{statusCode}} => HTTP status code, like 200, 404, 500 etc.
    // - {{statusText}} => text representation of HTTP status code, like `OK`, `Not Found`, `Internal Server Error` etc.
    //
    await throwOnUnexpectedApiResponse(response, 200, {
    "^4": "Unexpected client error: {{statusCode}} {{statusText}}\n\n{{body}}",
    "^5": "Unexpected server error: {{statusCode}} {{statusText}}\n\n{{body}}"
    }) +
    +
  • Parameters

    • response: AxiosResponse
    • expectedStatusCode: number
    • Optional errorMessages: Nilable<ApiResponseErrorMessages>

    Returns Promise<void>

  • Parameters

    • response: AxiosResponse
    • validator: ApiResponseValidator
    • Optional errorMessages: Nilable<ApiResponseErrorMessages>

    Returns Promise<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/index.html b/index.html index 8bab158..0a515d1 100644 --- a/index.html +++ b/index.html @@ -11,4 +11,4 @@

TBD

Documentation

The API documentation can be found here.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ICreateUseUserSessionOptions.html b/interfaces/ICreateUseUserSessionOptions.html index 9f553a9..69fe933 100644 --- a/interfaces/ICreateUseUserSessionOptions.html +++ b/interfaces/ICreateUseUserSessionOptions.html @@ -1,5 +1,5 @@ ICreateUseUserSessionOptions | @egomobile/next-utils

Interface ICreateUseUserSessionOptions<TSessionProp>

Options for createUseUserSession() function.

-
interface ICreateUseUserSessionOptions {
    adminGroup?: Nilable<string>;
    adminPermission?: Nilable<string>;
    adminRole?: Nilable<string>;
    blockedGroup?: Nilable<string>;
    blockedPermission?: Nilable<string>;
    blockedRole?: Nilable<string>;
    context: Context<Nullable<TSessionProp>>;
    getUserAvatarUrl?: Nilable<GetUserAvatarUrl<IUserSessionProp>>;
}

Type Parameters

Properties

interface ICreateUseUserSessionOptions {
    adminGroup?: Nilable<string>;
    adminPermission?: Nilable<string>;
    adminRole?: Nilable<string>;
    blockedGroup?: Nilable<string>;
    blockedPermission?: Nilable<string>;
    blockedRole?: Nilable<string>;
    context: Context<Nullable<TSessionProp>>;
    getUserAvatarUrl?: Nilable<GetUserAvatarUrl<IUserSessionProp>>;
}

Type Parameters

Properties

Properties

adminGroup?: Nilable<string>

Custom name of "super-admin" group.

Default

"admin"
 
-
adminPermission?: Nilable<string>

Custom name of "super-admin" permission.

+
adminPermission?: Nilable<string>

Custom name of "super-admin" permission.

Default

"admin"
 
-
adminRole?: Nilable<string>

Custom name of "super-admin" role.

+
adminRole?: Nilable<string>

Custom name of "super-admin" role.

Default

"admin"
 
-
blockedGroup?: Nilable<string>

Custom name of "totally blocked" group.

+
blockedGroup?: Nilable<string>

Custom name of "totally blocked" group.

Default

"blocked"
 
-
blockedPermission?: Nilable<string>

Custom name of "totally blocked" permission.

+
blockedPermission?: Nilable<string>

Custom name of "totally blocked" permission.

Default

"blocked"
 
-
blockedRole?: Nilable<string>

Custom name of "totally blocked" role.

+
blockedRole?: Nilable<string>

Custom name of "totally blocked" role.

Default

"blocked"
 
-
context: Context<Nullable<TSessionProp>>

The context, which stores the session prop.

-
getUserAvatarUrl?: Nilable<GetUserAvatarUrl<IUserSessionProp>>

Returns a user avatar by session.

-

Generated using TypeDoc

\ No newline at end of file +
context: Context<Nullable<TSessionProp>>

The context, which stores the session prop.

+
getUserAvatarUrl?: Nilable<GetUserAvatarUrl<IUserSessionProp>>

Returns a user avatar by session.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ICreateUseUserSessionResult.html b/interfaces/ICreateUseUserSessionResult.html index 96459c3..0a34ce5 100644 --- a/interfaces/ICreateUseUserSessionResult.html +++ b/interfaces/ICreateUseUserSessionResult.html @@ -1,6 +1,6 @@ ICreateUseUserSessionResult | @egomobile/next-utils

Interface ICreateUseUserSessionResult<TSessionProp>

Result of createUseUserSession() function.

-
interface ICreateUseUserSessionResult {
    useUser: UseUser<TSessionProp>;
    useUserSession: UseUserSession<TSessionProp>;
}

Type Parameters

Properties

interface ICreateUseUserSessionResult {
    useUser: UseUser<TSessionProp>;
    useUserSession: UseUserSession<TSessionProp>;
}

Type Parameters

Properties

useUser: UseUser<TSessionProp>

The new useUser() hook.

-
useUserSession: UseUserSession<TSessionProp>

The new useUserSession() hook.

-

Generated using TypeDoc

\ No newline at end of file +
useUserSession: UseUserSession<TSessionProp>

The new useUserSession() hook.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ICreateWithApiPropsOptions.html b/interfaces/ICreateWithApiPropsOptions.html index ac63e55..d7ef308 100644 --- a/interfaces/ICreateWithApiPropsOptions.html +++ b/interfaces/ICreateWithApiPropsOptions.html @@ -1,6 +1,6 @@ ICreateWithApiPropsOptions | @egomobile/next-utils

Interface ICreateWithApiPropsOptions<TContext>

Options for createWithApiProps() function.

-
interface ICreateWithApiPropsOptions {
    enhanceContext?: Nilable<EnhanceApiContext<TContext, any>>;
    onError?: Nilable<ServerErrorHandler>;
}

Type Parameters

Properties

interface ICreateWithApiPropsOptions {
    enhanceContext?: Nilable<EnhanceApiContext<TContext, any>>;
    onError?: Nilable<ServerErrorHandler>;
}

Type Parameters

Properties

enhanceContext?: Nilable<EnhanceApiContext<TContext, any>>

The optional and custom function, that enhances the TContext based object.

-
onError?: Nilable<ServerErrorHandler>

Custom and additional error handler.

-

Generated using TypeDoc

\ No newline at end of file +
onError?: Nilable<ServerErrorHandler>

Custom and additional error handler.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/ICreateWithServerPropsOptions.html b/interfaces/ICreateWithServerPropsOptions.html index 411fa43..d9230dc 100644 --- a/interfaces/ICreateWithServerPropsOptions.html +++ b/interfaces/ICreateWithServerPropsOptions.html @@ -1,6 +1,6 @@ ICreateWithServerPropsOptions | @egomobile/next-utils

Interface ICreateWithServerPropsOptions<TContext>

Options for createWithServerProps() function.

-
interface ICreateWithServerPropsOptions {
    enhanceContext?: Nilable<EnhanceServerContext<TContext>>;
    onError?: Nilable<ServerErrorHandler>;
}

Type Parameters

Properties

interface ICreateWithServerPropsOptions {
    enhanceContext?: Nilable<EnhanceServerContext<TContext>>;
    onError?: Nilable<ServerErrorHandler>;
}

Type Parameters

Properties

enhanceContext?: Nilable<EnhanceServerContext<TContext>>

The optional and custom function, that enhances the TContext based object.

-
onError?: Nilable<ServerErrorHandler>

Custom and additional error handler.

-

Generated using TypeDoc

\ No newline at end of file +
onError?: Nilable<ServerErrorHandler>

Custom and additional error handler.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IEnhanceApiContextExecutionContext.html b/interfaces/IEnhanceApiContextExecutionContext.html index b462d51..f02e0b0 100644 --- a/interfaces/IEnhanceApiContextExecutionContext.html +++ b/interfaces/IEnhanceApiContextExecutionContext.html @@ -1,9 +1,9 @@ IEnhanceApiContextExecutionContext | @egomobile/next-utils

Interface IEnhanceApiContextExecutionContext<TContext, TResponse>

Context for an EnhanceApiContext function.

-
interface IEnhanceApiContextExecutionContext {
    context: TContext;
    options: Nullable<Partial<IWithApiPropsOptions<TContext, TResponse>>>;
    shouldStop: boolean;
}

Type Parameters

Properties

interface IEnhanceApiContextExecutionContext {
    context: TContext;
    options: Nullable<Partial<IWithApiPropsOptions<TContext, TResponse>>>;
    shouldStop: boolean;
}

Type Parameters

Properties

context: TContext

The context to enhance.

-
options: Nullable<Partial<IWithApiPropsOptions<TContext, TResponse>>>

The options.

-
shouldStop: boolean

Gets or sets if the execution should be stopped or not.

+
options: Nullable<Partial<IWithApiPropsOptions<TContext, TResponse>>>

The options.

+
shouldStop: boolean

Gets or sets if the execution should be stopped or not.

Default

false

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IEnhanceServerContextExecutionContext.html b/interfaces/IEnhanceServerContextExecutionContext.html index 9282b2b..241646a 100644 --- a/interfaces/IEnhanceServerContextExecutionContext.html +++ b/interfaces/IEnhanceServerContextExecutionContext.html @@ -1,11 +1,11 @@ IEnhanceServerContextExecutionContext | @egomobile/next-utils

Interface IEnhanceServerContextExecutionContext<TContext>

Context for an EnhanceServerContext function.

-
interface IEnhanceServerContextExecutionContext {
    context: TContext;
    options: Nullable<Partial<IWithServerPropsOptions>>;
    result: GetServerSidePropsResult<any>;
    shouldStop: boolean;
}

Type Parameters

Properties

interface IEnhanceServerContextExecutionContext {
    context: TContext;
    options: Nullable<Partial<IWithServerPropsOptions>>;
    result: GetServerSidePropsResult<any>;
    shouldStop: boolean;
}

Type Parameters

Properties

context: TContext

The context to enhance.

-
options: Nullable<Partial<IWithServerPropsOptions>>

The options.

-
result: GetServerSidePropsResult<any>

The props result.

-
shouldStop: boolean

Gets or sets if the execution should be stopped or not.

+
options: Nullable<Partial<IWithServerPropsOptions>>

The options.

+
result: GetServerSidePropsResult<any>

The props result.

+
shouldStop: boolean

Gets or sets if the execution should be stopped or not.

Default

false

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IGetApiPropsActionContext.html b/interfaces/IGetApiPropsActionContext.html index 3ee156d..40397c3 100644 --- a/interfaces/IGetApiPropsActionContext.html +++ b/interfaces/IGetApiPropsActionContext.html @@ -1,5 +1,5 @@ IGetApiPropsActionContext | @egomobile/next-utils

Interface IGetApiPropsActionContext<TResponse>

Context for a GetApiPropsAction action.

-
interface IGetApiPropsActionContext {
    request: NextApiRequest;
    response: NextApiResponse<TResponse>;
    sendConflict: ((message?) => void);
    sendData: ((data, code?) => void);
    sendForbidden: (() => void);
    sendList: ((items, code?) => void);
    sendNoContent: (() => void);
    sendNotFound: ((message) => void);
    sendValidationError: ((validationError) => void);
}

Type Parameters

  • TResponse = any

Properties

interface IGetApiPropsActionContext {
    request: NextApiRequest;
    response: NextApiResponse<TResponse>;
    sendConflict: ((message?) => void);
    sendData: ((data, code?) => void);
    sendForbidden: (() => void);
    sendList: ((items, code?) => void);
    sendNoContent: (() => void);
    sendNotFound: ((message) => void);
    sendValidationError: ((validationError) => void);
}

Type Parameters

  • TResponse = any

Properties

request: NextApiRequest

The request context.

-
response: NextApiResponse<TResponse>

The response context.

-
sendConflict: ((message?) => void)

Type declaration

response: NextApiResponse<TResponse>

The response context.

+
sendConflict: ((message?) => void)

Type declaration

    • (message?): void
    • Sends a standarized API 409 response.

      Parameters

      • Optional message: string

        The custom message. Default: 'Conflict'

        -

      Returns void

sendData: ((data, code?) => void)

Type declaration

    • (data, code?): void
    • Sends data on a standarized way.

      +

Returns void

sendData: ((data, code?) => void)

Type declaration

    • (data, code?): void
    • Sends data on a standarized way.

      Parameters

      • data: any

        The data to send.

      • Optional code: number

        The custom response status code.

        -

      Returns void

sendForbidden: (() => void)

Type declaration

    • (): void
    • Sends a standarized API response for a forbidden resource.

      -

      Returns void

sendList: ((items, code?) => void)

Type declaration

    • (items, code?): void
    • Sends an standarized API response for a list.

      +

Returns void

sendForbidden: (() => void)

Type declaration

    • (): void
    • Sends a standarized API response for a forbidden resource.

      +

      Returns void

sendList: ((items, code?) => void)

Type declaration

    • (items, code?): void
    • Sends an standarized API response for a list.

      Parameters

      • items: List<any>

        The items to send.

      • Optional code: number

        The custom response status code.

        -

      Returns void

sendNoContent: (() => void)

Type declaration

    • (): void
    • Sends a 204 response.

      -

      Returns void

sendNotFound: ((message) => void)

Type declaration

    • (message): void
    • Sends a standarized API 404 response.

      +

Returns void

sendNoContent: (() => void)

Type declaration

sendNotFound: ((message) => void)

Type declaration

sendValidationError: ((validationError) => void)

Type declaration

Returns void

sendValidationError: ((validationError) => void)

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IServerErrorHandlerContext.html b/interfaces/IServerErrorHandlerContext.html index b18e627..d465e76 100644 --- a/interfaces/IServerErrorHandlerContext.html +++ b/interfaces/IServerErrorHandlerContext.html @@ -1,11 +1,11 @@ IServerErrorHandlerContext | @egomobile/next-utils

Interface IServerErrorHandlerContext

A context for a server error handler.

-
interface IServerErrorHandlerContext {
    error: any;
    executeDefault: boolean;
    request: IncomingMessage;
    response: ServerResponse<IncomingMessage>;
}

Properties

interface IServerErrorHandlerContext {
    error: any;
    executeDefault: boolean;
    request: IncomingMessage;
    response: ServerResponse<IncomingMessage>;
}

Properties

error: any

The thrown error.

-
executeDefault: boolean

Also execute default logic or not.

+
executeDefault: boolean

Also execute default logic or not.

Default

true

-
request: IncomingMessage

The request context.

-
response: ServerResponse<IncomingMessage>

The response context.

-

Generated using TypeDoc

\ No newline at end of file +
request: IncomingMessage

The request context.

+
response: ServerResponse<IncomingMessage>

The response context.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IUseUserResult.html b/interfaces/IUseUserResult.html index 3373ac9..204413d 100644 --- a/interfaces/IUseUserResult.html +++ b/interfaces/IUseUserResult.html @@ -1,5 +1,5 @@ IUseUserResult | @egomobile/next-utils

Interface IUseUserResult<TSessionProp>

Result of an useUser() hook.

-
interface IUseUserResult {
    displayName: Nullable<string>;
    groups: string[];
    hasGroup: UseUserHasGroupPredicate;
    hasPermission: UseUserHasPermissionPredicate;
    hasRole: UseUserHasRolePredicate;
    permissions: string[];
    photoUrl: Nullable<string>;
    roles: string[];
    session: Nullable<TSessionProp>;
}

Type Parameters

Properties

interface IUseUserResult {
    displayName: Nullable<string>;
    groups: string[];
    hasGroup: UseUserHasGroupPredicate;
    hasPermission: UseUserHasPermissionPredicate;
    hasRole: UseUserHasRolePredicate;
    permissions: string[];
    photoUrl: Nullable<string>;
    roles: string[];
    session: Nullable<TSessionProp>;
}

Type Parameters

Properties

Properties

displayName: Nullable<string>

The display name of the user, if available.

-
groups: string[]

The list of groups the user belongs to. If no user is logged, this array is empty.

-

Checks for groups of current user. Alsways false if there is no user.

-

Checks for permissions of current user. Alsways false if there is no user.

-

Checks for roles of current user. Alsways false if there is no user.

-
permissions: string[]

The list of permissions the user belongs to. If no user is logged, this array is empty.

-
photoUrl: Nullable<string>

The URL of the avatar of the current user. null if there is no user.

-
roles: string[]

The list of roles the user belongs to. If no user is logged, this array is empty.

-
session: Nullable<TSessionProp>

The current user session, if available.

-

Generated using TypeDoc

\ No newline at end of file +
groups: string[]

The list of groups the user belongs to. If no user is logged, this array is empty.

+
hasGroup: UseUserHasGroupPredicate

Checks for groups of current user. Alsways false if there is no user.

+
hasPermission: UseUserHasPermissionPredicate

Checks for permissions of current user. Alsways false if there is no user.

+
hasRole: UseUserHasRolePredicate

Checks for roles of current user. Alsways false if there is no user.

+
permissions: string[]

The list of permissions the user belongs to. If no user is logged, this array is empty.

+
photoUrl: Nullable<string>

The URL of the avatar of the current user. null if there is no user.

+
roles: string[]

The list of roles the user belongs to. If no user is logged, this array is empty.

+
session: Nullable<TSessionProp>

The current user session, if available.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IUserSessionProp.html b/interfaces/IUserSessionProp.html index 4c8487d..b079f6c 100644 --- a/interfaces/IUserSessionProp.html +++ b/interfaces/IUserSessionProp.html @@ -1,4 +1,4 @@ IUserSessionProp | @egomobile/next-utils

Interface IUserSessionProp

A basic structure of a user session prop.

-
interface IUserSessionProp {
    user: IUserSessionPropUser;
}

Properties

interface IUserSessionProp {
    user: IUserSessionPropUser;
}

Properties

Properties

Information about the current user.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IUserSessionPropUser.html b/interfaces/IUserSessionPropUser.html index b8ab522..1152344 100644 --- a/interfaces/IUserSessionPropUser.html +++ b/interfaces/IUserSessionPropUser.html @@ -1,12 +1,12 @@ IUserSessionPropUser | @egomobile/next-utils

Interface IUserSessionPropUser

User part of IUserSessionProp.

-
interface IUserSessionPropUser {
    displayName: string;
    groups: string[];
    id: string;
    permissions: string[];
    roles: string[];
}

Properties

interface IUserSessionPropUser {
    displayName: string;
    groups: string[];
    id: string;
    permissions: string[];
    roles: string[];
}

Properties

displayName: string

The display name.

-
groups: string[]

The list of groups.

-
id: string

The ID of the user.

-
permissions: string[]

The list of permissions.

-
roles: string[]

The list of roles.

-

Generated using TypeDoc

\ No newline at end of file +
groups: string[]

The list of groups.

+
id: string

The ID of the user.

+
permissions: string[]

The list of permissions.

+
roles: string[]

The list of roles.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IWithApiProps.html b/interfaces/IWithApiProps.html index 9b109ec..3048e8c 100644 --- a/interfaces/IWithApiProps.html +++ b/interfaces/IWithApiProps.html @@ -1,4 +1,4 @@ IWithApiProps | @egomobile/next-utils

Interface IWithApiProps

Contains props.

-
interface IWithApiProps {
    props: GetApiPropsActionProps;
}

Properties

interface IWithApiProps {
    props: GetApiPropsActionProps;
}

Properties

Properties

The stored props.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IWithApiPropsOptions.html b/interfaces/IWithApiPropsOptions.html index 44b7a17..3e83e43 100644 --- a/interfaces/IWithApiPropsOptions.html +++ b/interfaces/IWithApiPropsOptions.html @@ -1,5 +1,5 @@ IWithApiPropsOptions | @egomobile/next-utils

Interface IWithApiPropsOptions<TContext, TResponse>

Options for a withApiProps() function call.

-
interface IWithApiPropsOptions {
    CONNECT: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    DELETE: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    GET: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    HEAD: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    OPTIONS: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    PATCH: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    POST: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    PUT: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    TRACE: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    getProps: GetApiPropsAction<TContext>;
    use: Nilable<ApiMiddleware[]>;
}

Type Parameters

Properties

interface IWithApiPropsOptions {
    CONNECT: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    DELETE: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    GET: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    HEAD: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    OPTIONS: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    PATCH: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    POST: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    PUT: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    TRACE: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>;
    getProps: GetApiPropsAction<TContext>;
    use: Nilable<ApiMiddleware[]>;
}

Type Parameters

Properties

CONNECT DELETE GET HEAD @@ -11,14 +11,14 @@ getProps use

Properties

CONNECT: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a CONNECT request.

-
DELETE: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a DELETE request.

-
GET: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a GET request.

-
HEAD: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a HEAD request.

-
OPTIONS: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a OPTIONS request.

-
PATCH: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a PATCH request.

-
POST: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a POST request.

-
PUT: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a PUT request.

-
TRACE: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a TRACE request.

-
getProps: GetApiPropsAction<TContext>

A function which returns the props for all WithApiPropsHandlers.

-
use: Nilable<ApiMiddleware[]>

One or more middlewares to use.

-

Generated using TypeDoc

\ No newline at end of file +
DELETE: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a DELETE request.

+
GET: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a GET request.

+
HEAD: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a HEAD request.

+
OPTIONS: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a OPTIONS request.

+
PATCH: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a PATCH request.

+
POST: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a POST request.

+
PUT: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a PUT request.

+
TRACE: Nilable<WithApiPropsHandler<TContext & IWithApiProps, TResponse>>

The action for a TRACE request.

+
getProps: GetApiPropsAction<TContext>

A function which returns the props for all WithApiPropsHandlers.

+
use: Nilable<ApiMiddleware[]>

One or more middlewares to use.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IWithServerPropsActionContext.html b/interfaces/IWithServerPropsActionContext.html index dca3b8e..a1be662 100644 --- a/interfaces/IWithServerPropsActionContext.html +++ b/interfaces/IWithServerPropsActionContext.html @@ -1,4 +1,4 @@ IWithServerPropsActionContext | @egomobile/next-utils

Interface IWithServerPropsActionContext

A context for a WithServerPropsAction action.

-
interface IWithServerPropsActionContext {
    nextContext: GetServerSidePropsContext<ParsedUrlQuery, PreviewData>;
}

Properties

interface IWithServerPropsActionContext {
    nextContext: GetServerSidePropsContext<ParsedUrlQuery, PreviewData>;
}

Properties

Properties

nextContext: GetServerSidePropsContext<ParsedUrlQuery, PreviewData>

The Next.js context.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/IWithServerPropsOptions.html b/interfaces/IWithServerPropsOptions.html index 57d5220..dbb5144 100644 --- a/interfaces/IWithServerPropsOptions.html +++ b/interfaces/IWithServerPropsOptions.html @@ -1,4 +1,4 @@ IWithServerPropsOptions | @egomobile/next-utils

Interface IWithServerPropsOptions

Additional options for withServerProps() function.

-
interface IWithServerPropsOptions {
    use: Nilable<ServerMiddleware[]>;
}

Properties

use +
interface IWithServerPropsOptions {
    use: Nilable<ServerMiddleware[]>;
}

Properties

Properties

use: Nilable<ServerMiddleware[]>

One or more middlewares to use.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/modules.html b/modules.html index 72a1a6e..08430e2 100644 --- a/modules.html +++ b/modules.html @@ -1,4 +1,5 @@ @egomobile/next-utils

@egomobile/next-utils

Index

Classes

Interfaces

Functions

Generated using TypeDoc

\ No newline at end of file +throwOnUnexpectedApiResponse +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ApiMiddleware.html b/types/ApiMiddleware.html index 3d48a30..5969850 100644 --- a/types/ApiMiddleware.html +++ b/types/ApiMiddleware.html @@ -2,4 +2,4 @@

Parameters

Returns any

Generated using TypeDoc

\ No newline at end of file +

Returns any

Generated using TypeDoc

\ No newline at end of file diff --git a/types/EnhanceApiContext.html b/types/EnhanceApiContext.html index 92a661f..1714ced 100644 --- a/types/EnhanceApiContext.html +++ b/types/EnhanceApiContext.html @@ -1,3 +1,3 @@ EnhanceApiContext | @egomobile/next-utils

Type alias EnhanceApiContext<TContext, TResponse>

EnhanceApiContext<TContext, TResponse>: ((context) => void | PromiseLike<void>)

Type Parameters

Type declaration

    • (context): void | PromiseLike<void>
    • Function that enhances an API context.

      Parameters

      Returns void | PromiseLike<void>

Generated using TypeDoc

\ No newline at end of file +

Returns void | PromiseLike<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/types/EnhanceServerContext.html b/types/EnhanceServerContext.html index 328c74e..8b150b1 100644 --- a/types/EnhanceServerContext.html +++ b/types/EnhanceServerContext.html @@ -1,3 +1,3 @@ EnhanceServerContext | @egomobile/next-utils

Type alias EnhanceServerContext<TContext>

EnhanceServerContext<TContext>: ((context) => void | PromiseLike<void>)

Type Parameters

Type declaration

    • (context): void | PromiseLike<void>
    • Function that enhances a server context.

      Parameters

      Returns void | PromiseLike<void>

Generated using TypeDoc

\ No newline at end of file +

Returns void | PromiseLike<void>

Generated using TypeDoc

\ No newline at end of file diff --git a/types/GetApiPropsAction.html b/types/GetApiPropsAction.html index 85a3b7b..4daa877 100644 --- a/types/GetApiPropsAction.html +++ b/types/GetApiPropsAction.html @@ -1,2 +1,2 @@ GetApiPropsAction | @egomobile/next-utils

Type alias GetApiPropsAction<TContext>

GetApiPropsAction<TContext>: ((context) => GetApiPropsActionResult)

Type Parameters

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns GetApiPropsActionResult

Generated using TypeDoc

\ No newline at end of file diff --git a/types/GetApiPropsActionErrorResultValue.html b/types/GetApiPropsActionErrorResultValue.html index f32a1f4..1aa0c97 100644 --- a/types/GetApiPropsActionErrorResultValue.html +++ b/types/GetApiPropsActionErrorResultValue.html @@ -1,2 +1,2 @@ GetApiPropsActionErrorResultValue | @egomobile/next-utils

Type alias GetApiPropsActionErrorResultValue

GetApiPropsActionErrorResultValue: true | string

Possible value for an "error prop" of a GetApiPropsActionResultValue instance.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/GetApiPropsActionProps.html b/types/GetApiPropsActionProps.html index 45ec142..a37fb5a 100644 --- a/types/GetApiPropsActionProps.html +++ b/types/GetApiPropsActionProps.html @@ -1,3 +1,3 @@ GetApiPropsActionProps | @egomobile/next-utils

Type alias GetApiPropsActionProps

GetApiPropsActionProps: Record<string, any>

Possible value for a props property of a non-error result of a GetApiPropsAction action.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/GetApiPropsActionResult.html b/types/GetApiPropsActionResult.html index ebf11f1..330cf34 100644 --- a/types/GetApiPropsActionResult.html +++ b/types/GetApiPropsActionResult.html @@ -1,2 +1,2 @@ GetApiPropsActionResult | @egomobile/next-utils

Type alias GetApiPropsActionResult

GetApiPropsActionResult: PromiseLike<GetApiPropsActionResultValue>

Possible result value of a GetApiPropsAction call.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/GetApiPropsActionResultValue.html b/types/GetApiPropsActionResultValue.html index b7fa0fe..810da10 100644 --- a/types/GetApiPropsActionResultValue.html +++ b/types/GetApiPropsActionResultValue.html @@ -1,2 +1,2 @@ GetApiPropsActionResultValue | @egomobile/next-utils

Type alias GetApiPropsActionResultValue

GetApiPropsActionResultValue: {
    props: GetApiPropsActionProps;
} | {
    badRequest: GetApiPropsActionErrorResultValue;
} | {
    notFound: GetApiPropsActionErrorResultValue;
}

Possible result value of a GetApiPropsAction call.

-

Type declaration

Type declaration

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Type declaration

Type declaration

Type declaration

Generated using TypeDoc

\ No newline at end of file diff --git a/types/GetUserAvatarUrl.html b/types/GetUserAvatarUrl.html index 4ce9cc8..1005a32 100644 --- a/types/GetUserAvatarUrl.html +++ b/types/GetUserAvatarUrl.html @@ -1,4 +1,4 @@ GetUserAvatarUrl | @egomobile/next-utils

Type alias GetUserAvatarUrl<TSessionProp>

GetUserAvatarUrl<TSessionProp>: ((session) => Nullable<string>)

Type Parameters

Type declaration

    • (session): Nullable<string>
    • Returns a user avatar by session.

      Parameters

      • session: TSessionProp

        The current session.

      Returns Nullable<string>

      The URL or null if not available.

      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/MiddlewareNextFunction.html b/types/MiddlewareNextFunction.html index 27c6954..b68f59d 100644 --- a/types/MiddlewareNextFunction.html +++ b/types/MiddlewareNextFunction.html @@ -1,3 +1,3 @@ MiddlewareNextFunction | @egomobile/next-utils

Type alias MiddlewareNextFunction

MiddlewareNextFunction: ((error?) => any)

Type declaration

    • (error?): any
    • A next function for a middleware.

      Parameters

      • Optional error: any

        The error, if occurred.

        -

      Returns any

Generated using TypeDoc

\ No newline at end of file +

Returns any

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ServerErrorHandler.html b/types/ServerErrorHandler.html index cc80fe5..02f0d3a 100644 --- a/types/ServerErrorHandler.html +++ b/types/ServerErrorHandler.html @@ -1,3 +1,3 @@ ServerErrorHandler | @egomobile/next-utils

Type alias ServerErrorHandler

ServerErrorHandler: ((context) => any)

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Returns any

Generated using TypeDoc

\ No newline at end of file diff --git a/types/ServerMiddleware.html b/types/ServerMiddleware.html index 8b508e8..7b7f851 100644 --- a/types/ServerMiddleware.html +++ b/types/ServerMiddleware.html @@ -2,4 +2,4 @@

Parameters

Returns any

Generated using TypeDoc

\ No newline at end of file +

Returns any

Generated using TypeDoc

\ No newline at end of file diff --git a/types/UseUser.html b/types/UseUser.html index b136395..586ea43 100644 --- a/types/UseUser.html +++ b/types/UseUser.html @@ -1,3 +1,3 @@ UseUser | @egomobile/next-utils

Type alias UseUser<TSessionProp>

UseUser<TSessionProp>: (() => IUseUserResult<TSessionProp>)

Type Parameters

Type declaration

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/UseUserHasGroupPredicate.html b/types/UseUserHasGroupPredicate.html index 92ab6d4..ca282d0 100644 --- a/types/UseUserHasGroupPredicate.html +++ b/types/UseUserHasGroupPredicate.html @@ -1,4 +1,4 @@ UseUserHasGroupPredicate | @egomobile/next-utils

Type alias UseUserHasGroupPredicate

UseUserHasGroupPredicate: ((...groupsToCheck) => boolean)

Type declaration

    • (...groupsToCheck): boolean
    • A function that checks if current user is part of all groups.

      Parameters

      • Rest ...groupsToCheck: string[]

      Returns boolean

      Is part of all groupsToCheck or not.

      Params

      [groupsToCheck] Name of one or more groups to check.

      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/UseUserHasPermissionPredicate.html b/types/UseUserHasPermissionPredicate.html index 063d519..4272770 100644 --- a/types/UseUserHasPermissionPredicate.html +++ b/types/UseUserHasPermissionPredicate.html @@ -1,4 +1,4 @@ UseUserHasPermissionPredicate | @egomobile/next-utils

Type alias UseUserHasPermissionPredicate

UseUserHasPermissionPredicate: ((...permissionsToCheck) => boolean)

Type declaration

    • (...permissionsToCheck): boolean
    • A function that checks if current user is part of all permissions.

      Parameters

      • Rest ...permissionsToCheck: string[]

      Returns boolean

      Is part of all permissionsToCheck or not.

      Params

      [permissionsToCheck] Name of one or more groups to check.

      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/UseUserHasRolePredicate.html b/types/UseUserHasRolePredicate.html index bc6d719..6272486 100644 --- a/types/UseUserHasRolePredicate.html +++ b/types/UseUserHasRolePredicate.html @@ -1,4 +1,4 @@ UseUserHasRolePredicate | @egomobile/next-utils

Type alias UseUserHasRolePredicate

UseUserHasRolePredicate: ((...rolesToCheck) => boolean)

Type declaration

    • (...rolesToCheck): boolean
    • A function that checks if current user is part of all roles.

      Parameters

      • Rest ...rolesToCheck: string[]

      Returns boolean

      Is part of all rolesToCheck or not.

      Params

      [rolesToCheck] Name of one or more groups to check.

      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/UseUserSession.html b/types/UseUserSession.html index 0db0852..0a15db2 100644 --- a/types/UseUserSession.html +++ b/types/UseUserSession.html @@ -1,4 +1,4 @@ UseUserSession | @egomobile/next-utils

Type alias UseUserSession<TSessionProp>

UseUserSession<TSessionProp>: ((required?) => Nullable<TSessionProp>)

Type Parameters

Type declaration

    • (required?): Nullable<TSessionProp>
    • Structure of a useUserSession hook.

      Parameters

      • Optional required: Optional<boolean>

        If true, an exception is throw if no session is available, otherwise null will be returned.

      Returns Nullable<TSessionProp>

      The session or null if there is no session.

      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/WithApiPropsFactory.html b/types/WithApiPropsFactory.html index 8bb6355..30250e8 100644 --- a/types/WithApiPropsFactory.html +++ b/types/WithApiPropsFactory.html @@ -2,4 +2,4 @@ that is used for API endpoints in Next.js.

Type Parameters

Parameters

Returns NextApiHandler<TResponse>

The new function.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/WithApiPropsHandler.html b/types/WithApiPropsHandler.html index 6d2ee17..976eb51 100644 --- a/types/WithApiPropsHandler.html +++ b/types/WithApiPropsHandler.html @@ -1,4 +1,4 @@ WithApiPropsHandler | @egomobile/next-utils

Type alias WithApiPropsHandler<TContext, TResponse>

WithApiPropsHandler<TContext, TResponse>: ((context) => PromiseLike<TResponse>)

Type Parameters

Type declaration

    • (context): PromiseLike<TResponse>
    • A handler of a "method prop" instide an IWithApiPropsOptions instance.

      Parameters

      • context: TContext

        The context.

      Returns PromiseLike<TResponse>

      The promise with the response data.

      -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/WithServerPropsAction.html b/types/WithServerPropsAction.html index a9c6d57..24c1a74 100644 --- a/types/WithServerPropsAction.html +++ b/types/WithServerPropsAction.html @@ -1,3 +1,3 @@ WithServerPropsAction | @egomobile/next-utils

Type alias WithServerPropsAction<TContext>

WithServerPropsAction<TContext>: ((context) => Promise<GetServerSidePropsResult<any>>)

Type Parameters

Type declaration

    • (context): Promise<GetServerSidePropsResult<any>>
    • An action for a withServerProps() call.

      Parameters

      • context: TContext

        The context.

        -

      Returns Promise<GetServerSidePropsResult<any>>

Generated using TypeDoc

\ No newline at end of file +

Returns Promise<GetServerSidePropsResult<any>>

Generated using TypeDoc

\ No newline at end of file diff --git a/types/WithServerPropsFactory.html b/types/WithServerPropsFactory.html index dceba77..c8d40a1 100644 --- a/types/WithServerPropsFactory.html +++ b/types/WithServerPropsFactory.html @@ -3,4 +3,4 @@

Parameters

Returns GetServerSideProps

The new function.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/variables/schema.html b/variables/schema.html index e5c438c..c183e42 100644 --- a/variables/schema.html +++ b/variables/schema.html @@ -1,2 +1,2 @@ schema | @egomobile/next-utils

Variable schemaConst

schema: Root = ...

Alias for 'joi' module.

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file