@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.
Files changed (33) hide show
  1. package/dist/environments/environment.d.ts +1 -0
  2. package/dist/index.cjs +18 -11
  3. package/dist/index.mjs +5213 -2273
  4. package/dist/lib/accounts/core/services/AccountService.d.ts +1 -1
  5. package/dist/lib/accounts/hooks/useAccount.d.ts +2 -2
  6. package/dist/lib/constants/eventBusWildcards.d.ts +16 -0
  7. package/dist/lib/constants/i18n.d.ts +5 -0
  8. package/dist/lib/constants/index.d.ts +2 -0
  9. package/dist/lib/i18n/buildTranslations.d.ts +2 -0
  10. package/dist/lib/i18n/index.d.ts +2 -0
  11. package/dist/lib/i18n/init.d.ts +1 -0
  12. package/dist/lib/index.d.ts +2 -0
  13. package/dist/lib/mobx/index.d.ts +0 -1
  14. package/dist/lib/nizza-store/ConfigManager.d.ts +13 -0
  15. package/dist/lib/nizza-store/DefaultEventBus.d.ts +7 -0
  16. package/dist/lib/{mobx → nizza-store}/NizzaStore.d.ts +6 -6
  17. package/dist/lib/nizza-store/helpers.d.ts +1 -0
  18. package/dist/lib/nizza-store/index.d.ts +1 -0
  19. package/dist/lib/types/api-graphql-types.d.ts +265 -0
  20. package/dist/lib/types/api.d.ts +1 -0
  21. package/dist/lib/types/i18n.d.ts +3 -0
  22. package/dist/lib/types/index.d.ts +1 -0
  23. package/dist/lib/types/nizza/chat.d.ts +28 -0
  24. package/dist/lib/types/nizza/eventBus.d.ts +15 -0
  25. package/dist/lib/types/nizza/index.d.ts +2 -0
  26. package/dist/lib/types/utils.d.ts +1 -1
  27. package/dist/lib/utils/customFetch.d.ts +6 -1
  28. package/dist/lib/utils/downloadFile.d.ts +6 -0
  29. package/dist/lib/utils/helpers.d.ts +19 -2
  30. package/dist/lib/utils/index.d.ts +2 -0
  31. package/dist/lib/utils/logger.d.ts +28 -0
  32. package/dist/package.json +1 -1
  33. package/package.json +1 -1
@@ -1,3 +1,20 @@
1
- import { Primitive } from '../types';
2
1
  export declare const shortId: (length?: number) => string;
3
- export declare const searchParams: (params: Record<string, Primitive>) => string;
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;
@@ -1,2 +1,4 @@
1
1
  export * from './customFetch';
2
+ export * from './downloadFile';
2
3
  export * from './helpers';
4
+ export * from './logger';
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.3.2-beta.0",
3
+ "version": "0.4.0-alpha.1",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.3.2-beta.0",
3
+ "version": "0.4.0-alpha.1",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",