@nizza/core 0.3.2-beta.0 → 0.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/environments/environment.d.ts +1 -0
- package/dist/index.cjs +18 -11
- package/dist/index.mjs +5213 -2273
- package/dist/lib/accounts/core/services/AccountService.d.ts +1 -1
- package/dist/lib/accounts/hooks/useAccount.d.ts +2 -2
- package/dist/lib/constants/eventBusWildcards.d.ts +16 -0
- package/dist/lib/constants/i18n.d.ts +5 -0
- package/dist/lib/constants/index.d.ts +2 -0
- package/dist/lib/i18n/buildTranslations.d.ts +2 -0
- package/dist/lib/i18n/index.d.ts +2 -0
- package/dist/lib/i18n/init.d.ts +1 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/mobx/index.d.ts +0 -1
- package/dist/lib/nizza-store/ConfigManager.d.ts +13 -0
- package/dist/lib/nizza-store/DefaultEventBus.d.ts +7 -0
- package/dist/lib/{mobx → nizza-store}/NizzaStore.d.ts +6 -6
- package/dist/lib/nizza-store/helpers.d.ts +1 -0
- package/dist/lib/nizza-store/index.d.ts +1 -0
- package/dist/lib/types/api-graphql-types.d.ts +265 -0
- package/dist/lib/types/api.d.ts +1 -0
- package/dist/lib/types/i18n.d.ts +3 -0
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/nizza/chat.d.ts +28 -0
- package/dist/lib/types/nizza/eventBus.d.ts +15 -0
- package/dist/lib/types/nizza/index.d.ts +2 -0
- package/dist/lib/types/utils.d.ts +1 -1
- package/dist/lib/utils/customFetch.d.ts +6 -1
- package/dist/lib/utils/downloadFile.d.ts +6 -0
- package/dist/lib/utils/helpers.d.ts +19 -2
- package/dist/lib/utils/index.d.ts +2 -0
- package/dist/lib/utils/logger.d.ts +28 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,20 @@
|
|
|
1
|
-
import { Primitive } from '../types';
|
|
2
1
|
export declare const shortId: (length?: number) => string;
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Constructs a search parameter string from a given object of key-value pairs.
|
|
4
|
+
*
|
|
5
|
+
* @param {Record<string, any>} params - The object containing key-value pairs.
|
|
6
|
+
* @returns {string} The search parameter string formatted as '?key1=value1&key2=value2&key3=value3', or an empty string if no valid parameters are provided.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const params = {
|
|
10
|
+
* key1: 'value1',
|
|
11
|
+
* key2: 'value2',
|
|
12
|
+
* key3: undefined,
|
|
13
|
+
* key4: 'value4'
|
|
14
|
+
* };
|
|
15
|
+
*
|
|
16
|
+
* const searchParamString = searchParams(params);
|
|
17
|
+
* console.log(searchParamString); // Output: "?key1=value1&key2=value2&key4=value4"
|
|
18
|
+
*/
|
|
19
|
+
export declare const searchParams: (params: Record<string, any>) => string;
|
|
20
|
+
export declare function fileOrigin(): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import log from 'loglevel';
|
|
2
|
+
type Logger = log.Logger;
|
|
3
|
+
export declare const logger: log.Logger;
|
|
4
|
+
/**
|
|
5
|
+
* Create a LogLevel instance for given context
|
|
6
|
+
* @param {string} context - The context to create logger for
|
|
7
|
+
* @returns {Logger} LogLevel logger instance
|
|
8
|
+
*/
|
|
9
|
+
export declare function createLogger(context: string): Logger;
|
|
10
|
+
/**
|
|
11
|
+
* Register a logger instance in registry
|
|
12
|
+
* @param {string} context - The context of the logger to register
|
|
13
|
+
* @param {Logger} logger - The logger instance
|
|
14
|
+
*/
|
|
15
|
+
export declare function registerLogger(context: string, logger: Logger): void;
|
|
16
|
+
/**
|
|
17
|
+
* Get a logger instance from registry by context
|
|
18
|
+
* @param {string} context - The context to get the logger for
|
|
19
|
+
* @returns {Logger} The registered LogLevel logger
|
|
20
|
+
*/
|
|
21
|
+
export declare function getLogger(context: string): Logger;
|
|
22
|
+
/**
|
|
23
|
+
* Initialize a logger - create, register and return instance
|
|
24
|
+
* @param {string} context - The context to initialize logger for
|
|
25
|
+
* @returns {Logger} The initialized LogLevel logger instance
|
|
26
|
+
*/
|
|
27
|
+
export declare function initializeLogger(context: string): Logger;
|
|
28
|
+
export {};
|
package/dist/package.json
CHANGED