npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ibm-wch-sdk/services

v6.0.524

Published

Software development kit to simplify the development of Angular based single page applications against Watson Content Hub.

Downloads

13

Readme

ibm-wch-sdk-utils

Exposes framework independent APIs to support the implementation of ibm-wch-sdk-ng and similar SDK.

Details

Refer to the documentation.

Changes

CHANGELOG

Class documentation

Refer to the documentation.

Utils

TBD

Changelog

Current

Added

  • Added typecheck methods for the new group element type
  • New getCategoryLeaf helper function
  • Initial version

@ibm-wch-sdk/services

Index

External modules


@ibm-wch-sdk/services > "http/http.service.on.ajax"

External module: "http/http.service.on.ajax"

Index

Functions


Functions

createHttpServiceOnAjax

createHttpServiceOnAjax(): HttpService

Defined in http/http.service.on.ajax.ts:13

Implements the {@link HttpService} interface on top of the rxjs ajax implementation.

Returns: HttpService service implementation


@ibm-wch-sdk/services > "index"

External module: "index"

Index


@ibm-wch-sdk/services > "router/hash.route"

External module: "router/hash.route"

Index

Functions


Functions

_parseHash

_parseHash(aHash: string): string[]

Defined in router/hash.route.ts:19

Parses the hash into a decoded list of segments

Parameters:

| Name | Type | Description | | ------ | ------ | ------ | | aHash | string | the hash of the URL, starting with a # |

Returns: string[] the decoded segments


createHashRouter

createHashRouter(aWindow?: Window): RouterState

Defined in router/hash.route.ts:30

Parameters:

| Name | Type | | ------ | ------ | | Optional aWindow | Window |

Returns: RouterState


@ibm-wch-sdk/services > "router/router.state"

External module: "router/router.state"

Index

Interfaces


@ibm-wch-sdk/services > "sdk/wch.sdk"

External module: "sdk/wch.sdk"

Index

Classes

Variables


Variables

<Const> _MESSAGE_EVENT

● _MESSAGE_EVENT: "message" = "message"

Defined in sdk/wch.sdk.ts:29


@ibm-wch-sdk/services > "sdk/wch.sdk.logger"

External module: "sdk/wch.sdk.logger"

Index

Classes


@ibm-wch-sdk/services > "sdk/wch.sdk.router"

External module: "sdk/wch.sdk.router"

Index

Classes

Functions


Functions

_parsePath

_parsePath(aPath: string): string[]

Defined in sdk/wch.sdk.router.ts:20

Parses the hash into a decoded list of segments

Parameters:

| Name | Type | | ------ | ------ | | aPath | string |

Returns: string[] the decoded segments


@ibm-wch-sdk/services > "sdk/wch.sdk.search"

External module: "sdk/wch.sdk.search"

Index

Classes


@ibm-wch-sdk/services > "sdk/wch.sdk.version"

External module: "sdk/wch.sdk.version"

Index

Classes


@ibm-wch-sdk/services > "services/services"

External module: "services/services"

Index

Interfaces

Variables

Functions


Variables

<Const> DEFAULT_PUBLIC_URL

● DEFAULT_PUBLIC_URL: true = true

Defined in services/services.ts:18


<Let> INSTANCE

● INSTANCE: WchSdkImpl = null

Defined in services/services.ts:27


<Const> _MESSAGE_EVENT

● _MESSAGE_EVENT: "message" = "message"

Defined in services/services.ts:25


Functions

getSdkInstance

getSdkInstance(aRoot?: Window): WchSdk

Defined in services/services.ts:29

Parameters:

| Name | Type | | ------ | ------ | | Optional aRoot | Window |

Returns: WchSdk


initSdk

initSdk(aConfig: HubInfoConfig, aRoot?: Window): WchSdk

Defined in services/services.ts:36

Parameters:

| Name | Type | | ------ | ------ | | aConfig | HubInfoConfig | | Optional aRoot | Window |

Returns: WchSdk


@ibm-wch-sdk/services > "url/urls.service"

External module: "url/urls.service"

Index

Classes

Functions


Functions

_ensureTrailingSlash

_ensureTrailingSlash(aUrl: string): string

Defined in url/urls.service.ts:17

Parameters:

| Name | Type | | ------ | ------ | | aUrl | string |

Returns: string


_normalizeUrl

_normalizeUrl(aUrl: URL): URL

Defined in url/urls.service.ts:27

Ensures that the path of the URL object has a trailing slash

Parameters:

| Name | Type | Description | | ------ | ------ | ------ | | aUrl | URL | the URL object |

Returns: URL the normalized URL


@ibm-wch-sdk/services > "version"

External module: "version"

Index

Object literals


Object literals

<Const> VERSION

VERSION: object

Defined in version.ts:1

build

● build: string = "01a021c9-8427-4cdd-bdd1-18ad1dda695d"

Defined in version.ts:3


version

● version: string = "f507579f-a7b0-4d70-9027-87aa5e35b020"

Defined in version.ts:2



@ibm-wch-sdk/services > "wch/wch.service"

External module: "wch/wch.service"

Index

Classes


@ibm-wch-sdk/services

Index

External modules


@ibm-wch-sdk/services > "router/router.state" > RouterState

Interface: RouterState

Simple implementation of the router state that decodes the current route from the URL

Hierarchy

RouterState

Index

Properties


Properties

change

● change: Consumer<string[]>

Defined in router/router.state.ts:19

Triggers a change in navigation


onChanged

● onChanged: Observable<string[]>

Defined in router/router.state.ts:14

Callback invoked whenever the current route changes. The value is a parsed and unescaped list of URL segments


@ibm-wch-sdk/services > "sdk/wch.sdk" > WchSdkImpl

Class: WchSdkImpl

Hierarchy

WchSdkImpl

Implements

  • WchSdk

Index

Constructors

Properties


Constructors

constructor

new WchSdkImpl(aRouter: RouterState, aService: WchService, aWindow?: Window): WchSdkImpl

Defined in sdk/wch.sdk.ts:61

Parameters:

| Name | Type | | ------ | ------ | | aRouter | RouterState | | aService | WchService | | Optional aWindow | Window |

Returns: WchSdkImpl


Properties

dispose

● dispose: function

Defined in sdk/wch.sdk.ts:33

Type declaration

▸(): void

Returns: void


logger

● logger: LoggerService

Defined in sdk/wch.sdk.ts:54

Returns a factory to access loggers

returns: the logger service


refresh

● refresh: function

Defined in sdk/wch.sdk.ts:38

Refreshes the rendering context and all JSON data that is currently displayed

Type declaration

▸(): void

Returns: void


router

● router: WchSdkRouter

Defined in sdk/wch.sdk.ts:40


search

● search: WchSdkSearch

Defined in sdk/wch.sdk.ts:61


version

● version: WchSdkVersion

Defined in sdk/wch.sdk.ts:47


@ibm-wch-sdk/services > "sdk/wch.sdk.logger" > WchSdkLoggerService

Class: WchSdkLoggerService

Hierarchy

WchSdkLoggerService

Implements

  • LoggerService

Index

Constructors

Properties


Constructors

constructor

new WchSdkLoggerService(): WchSdkLoggerService

Defined in sdk/wch.sdk.logger.ts:11

Returns: WchSdkLoggerService


Properties

get

● get: function

Defined in sdk/wch.sdk.logger.ts:11

Returns a logger for the given name

param: name of the logger

returns: the logger singleton for this name

Type declaration

▸(name: string): Logger

Parameters:

| Name | Type | | ------ | ------ | | name | string |

Returns: Logger


@ibm-wch-sdk/services > "sdk/wch.sdk.router" > WchSdkRouterImpl

Class: WchSdkRouterImpl

Hierarchy

WchSdkRouterImpl

Implements

  • WchSdkRouter

Index

Constructors

Properties


Constructors

constructor

new WchSdkRouterImpl(aRouter: RouterState, aService: WchService): WchSdkRouterImpl

Defined in sdk/wch.sdk.router.ts:46

Parameters:

| Name | Type | | ------ | ------ | | aRouter | RouterState | | aService | WchService |

Returns: WchSdkRouterImpl


Properties

activeRenderingContext

● activeRenderingContext: function

Defined in sdk/wch.sdk.router.ts:46

Type declaration

▸(): Observable<RenderingContext>

Returns: Observable<RenderingContext>


activeRoute

● activeRoute: function

Defined in sdk/wch.sdk.router.ts:39

Type declaration

▸(): Observable<SitePage>

Returns: Observable<SitePage>


navigateByPath

● navigateByPath: function

Defined in sdk/wch.sdk.router.ts:32

Type declaration

▸(aPath: string): PromiseLike<boolean>

Parameters:

| Name | Type | | ------ | ------ | | aPath | string |

Returns: PromiseLike<boolean>


@ibm-wch-sdk/services > "sdk/wch.sdk.search" > WchSdkSearchImpl

Class: WchSdkSearchImpl

Hierarchy

WchSdkSearchImpl

Implements

  • WchSdkSearch

Index

Constructors

Properties


Constructors

constructor

new WchSdkSearchImpl(aWchService: WchService): WchSdkSearchImpl

Defined in sdk/wch.sdk.search.ts:23

Parameters:

| Name | Type | | ------ | ------ | | aWchService | WchService |

Returns: WchSdkSearchImpl


Properties

getRenderingContextById

● getRenderingContextById: function

Defined in sdk/wch.sdk.search.ts:15

Type declaration

▸(aId: string, aLevels?: number): Observable<RenderingContext>

Parameters:

| Name | Type | | ------ | ------ | | aId | string | | Optional aLevels | number |

Returns: Observable<RenderingContext>


getRenderingContexts

● getRenderingContexts: function

Defined in sdk/wch.sdk.search.ts:19

Type declaration

▸(aValue: QueryInput, aLevels?: number): Observable<RenderingContextQueryResult>

Parameters:

| Name | Type | | ------ | ------ | | aValue | QueryInput | | Optional aLevels | number |

Returns: Observable<RenderingContextQueryResult>


getSitePages

● getSitePages: function

Defined in sdk/wch.sdk.search.ts:23

Type declaration

▸(aValue: QueryInput): Observable<SitePagesQueryResult>

Parameters:

| Name | Type | | ------ | ------ | | aValue | QueryInput |

Returns: Observable<SitePagesQueryResult>


@ibm-wch-sdk/services > "sdk/wch.sdk.version" > WchSdkVersionImpl

Class: WchSdkVersionImpl

Hierarchy

WchSdkVersionImpl

Implements

  • WchSdkVersion

Index

Constructors

Properties


Constructors

constructor

new WchSdkVersionImpl(): WchSdkVersionImpl

Defined in sdk/wch.sdk.version.ts:13

Returns: WchSdkVersionImpl


Properties

build

● build: Date

Defined in sdk/wch.sdk.version.ts:13


version

● version: object

Defined in sdk/wch.sdk.version.ts:6

Type declaration

major: string

minor: string

patch: string


@ibm-wch-sdk/services > "services/services" > SdkServices

Interface: SdkServices

Hierarchy

SdkServices

Index

Properties


Properties

activePage

● activePage: Observable<RenderingContext>

Defined in services/services.ts:22


urlConfig

● urlConfig: UrlConfig

Defined in services/services.ts:21


@ibm-wch-sdk/services > "url/urls.service" > UrlsService

Class: UrlsService

Hierarchy

UrlsService

Implements

  • UrlConfig

Index

Constructors

Properties


Constructors

constructor

new UrlsService(aConfig: HubInfoConfig, aWindow?: Window): UrlsService

Defined in url/urls.service.ts:52

Parameters:

| Name | Type | | ------ | ------ | | aConfig | HubInfoConfig | | Optional aWindow | Window |

Returns: UrlsService


Properties

apiUrl

● apiUrl: URL

Defined in url/urls.service.ts:38

The API URL to content hub


<Optional> baseUrl

● baseUrl: URL

Defined in url/urls.service.ts:49

The base URL of the host the application is running on. This can be undefined if the application is rendered standalone as part of the universal renderer.


deliveryUrl

● deliveryUrl: URL

Defined in url/urls.service.ts:43

The Delivery URL to content hub


isPreviewMode

● isPreviewMode: boolean

Defined in url/urls.service.ts:52

True if the system runs in preview mode, else false.


@ibm-wch-sdk/services > "wch/wch.service" > WchService

Class: WchService

Hierarchy

InternalWchService

↳ WchService

Index

Constructors

Properties


Constructors

constructor

new WchService(aHttp: HttpService, wchConfig: HubInfoConfig, aUrlService: UrlConfig, clientStorage: ClientStorage, usePublicUrl: Observable<boolean>): WchService

Overrides InternalWchService.__constructor

Defined in wch/wch.service.ts:6

Parameters:

| Name | Type | | ------ | ------ | | aHttp | HttpService | | wchConfig | HubInfoConfig | | aUrlService | UrlConfig | | clientStorage | ClientStorage | | usePublicUrl | Observable<boolean> |

Returns: WchService


Properties

<Protected> createPollingTrigger

● createPollingTrigger: function

Inherited from InternalWchService.createPollingTrigger

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:23

Type declaration

▸(aOptions?: HttpResourceOptions): Observable<any>

Parameters:

| Name | Type | | ------ | ------ | | Optional aOptions | HttpResourceOptions |

Returns: Observable<any>


dispose

● dispose: function

Inherited from InternalWchService.dispose

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:6

Type declaration

▸(): void

Returns: void


getApiUrl

● getApiUrl: function

Inherited from InternalWchService.getApiUrl

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:8

Type declaration

▸(): URL

Returns: URL


getCorsWhitelist

● getCorsWhitelist: function

Inherited from InternalWchService.getCorsWhitelist

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:19

Type declaration

▸(): Observable<string[]>

Returns: Observable<string[]>


getDeliverOrigin

● getDeliverOrigin: function

Inherited from InternalWchService.getDeliverOrigin

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:11

Type declaration

▸(): string

Returns: string


getDeliveryUrl

● getDeliveryUrl: function

Inherited from InternalWchService.getDeliveryUrl

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:9

Type declaration

▸(): URL

Returns: URL


getJsonResource

● getJsonResource: function

Inherited from InternalWchService.getJsonResource

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:20

Type declaration

▸<T>(aUrl: string, aOptions?: HttpResourceOptions): Observable<T>

Type parameters:

T

Parameters:

| Name | Type | | ------ | ------ | | aUrl | string | | Optional aOptions | HttpResourceOptions |

Returns: Observable<T>


getRenderingContextById

● getRenderingContextById: function

Inherited from InternalWchService.getRenderingContextById

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:12

Type declaration

▸(aID: string | null | undefined, aLevels?: number): Observable<RenderingContext | null | undefined>

Parameters:

| Name | Type | | ------ | ------ | | aID | string | null | undefined | | Optional aLevels | number |

Returns: Observable<RenderingContext | null | undefined>


getRenderingContextByPage

● getRenderingContextByPage: function

Inherited from InternalWchService.getRenderingContextByPage

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:15

Type declaration

▸(aPage: SitePage, aLevels?: number): Observable<RenderingContext | null | undefined>

Parameters:

| Name | Type | | ------ | ------ | | aPage | SitePage | | Optional aLevels | number |

Returns: Observable<RenderingContext | null | undefined>


getRenderingContextByPath

● getRenderingContextByPath: function

Inherited from InternalWchService.getRenderingContextByPath

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:14

Type declaration

▸(aPath: string, aLevels?: number): Observable<RenderingContext | null | undefined>

Parameters:

| Name | Type | | ------ | ------ | | aPath | string | | Optional aLevels | number |

Returns: Observable<RenderingContext | null | undefined>


getRenderingContextByUrlSegments

● getRenderingContextByUrlSegments: function

Inherited from InternalWchService.getRenderingContextByUrlSegments

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:13

Type declaration

▸(aSegments: string[], aLevels?: number): Observable<RenderingContext | null | undefined>

Parameters:

| Name | Type | | ------ | ------ | | aSegments | string[] | | Optional aLevels | number |

Returns: Observable<RenderingContext | null | undefined>


getRenderingContextForAppConfig

● getRenderingContextForAppConfig: function

Inherited from InternalWchService.getRenderingContextForAppConfig

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:16

Type declaration

▸(aLevels?: number): Observable<RenderingContext>

Parameters:

| Name | Type | | ------ | ------ | | Optional aLevels | number |

Returns: Observable<RenderingContext>


getRenderingContextsByQuery

● getRenderingContextsByQuery: function

Inherited from InternalWchService.getRenderingContextsByQuery

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:17

Type declaration

▸(aQuery: string, aLevels?: number): Observable<RenderingContextQueryResult>

Parameters:

| Name | Type | | ------ | ------ | | aQuery | string | | Optional aLevels | number |

Returns: Observable<RenderingContextQueryResult>


getSitePagesByQuery

● getSitePagesByQuery: function

Inherited from InternalWchService.getSitePagesByQuery

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:18

Type declaration

▸(aQuery: string): Observable<SitePagesQueryResult>

Parameters:

| Name | Type | | ------ | ------ | | aQuery | string |

Returns: Observable<SitePagesQueryResult>


getTextResource

● getTextResource: function

Inherited from InternalWchService.getTextResource

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:21

Type declaration

▸(aUrl: string, aOptions?: HttpResourceOptions): Observable<string>

Parameters:

| Name | Type | | ------ | ------ | | aUrl | string | | Optional aOptions | HttpResourceOptions |

Returns: Observable<string>


isPreviewMode

● isPreviewMode: function

Inherited from InternalWchService.isPreviewMode

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:10

Type declaration

▸(): boolean

Returns: boolean


resolveRenderingContext

● resolveRenderingContext: function

Inherited from InternalWchService.resolveRenderingContext

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:22

Type declaration

▸(aRenderingContext?: RenderingContext, aStrategy?: CYCLE_HANDLING): Observable<RenderingContext | null | undefined>

Parameters:

| Name | Type | | ------ | ------ | | Optional aRenderingContext | RenderingContext | | Optional aStrategy | CYCLE_HANDLING |

Returns: Observable<RenderingContext | null | undefined>


triggerRefresh

● triggerRefresh: function

Inherited from InternalWchService.triggerRefresh

Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/wch/wch.service.d.ts:7

Type declaration

▸(): void

Returns: void