@nizza/core 0.5.9-beta.1 → 0.5.9-beta.2

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.
@@ -0,0 +1,2 @@
1
+ export * from './interfaces';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/clean-architecture/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,9 @@
1
+ export type PostRequestInput = {
2
+ data?: any;
3
+ ignoreError?: boolean;
4
+ };
5
+ export interface HttpClient {
6
+ get<T>(path: string): Promise<T>;
7
+ post<T>(path: string, input: PostRequestInput): Promise<T>;
8
+ }
9
+ //# sourceMappingURL=http.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.client.d.ts","sourceRoot":"","sources":["../../../../../src/lib/clean-architecture/domain/interfaces/http.client.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC5D"}
@@ -0,0 +1,2 @@
1
+ export * from './http.client';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/clean-architecture/domain/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './domain';
2
+ export * from './infrastructure';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/clean-architecture/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { HttpClient, PostRequestInput } from '../../domain';
2
+ import { Logger } from 'loglevel';
3
+
4
+ type Config = {
5
+ baseUrl: string;
6
+ logger: Logger;
7
+ accessToken?: string;
8
+ };
9
+ export declare class HttpAxiosClient implements HttpClient {
10
+ private logger;
11
+ private axiosInstance;
12
+ constructor(config: Config);
13
+ /**
14
+ * Performs a GET request to the specified path.
15
+ *
16
+ * @param {string} path - The endpoint path.
17
+ * @returns {Promise<T>} - The response data.
18
+ */
19
+ get<T>(path: string): Promise<T>;
20
+ /**
21
+ * Performs a POST request to the specified path with the provided data.
22
+ *
23
+ * @param {string} path - The endpoint path.
24
+ * @param {PostRequestInput} input - The request config.
25
+ * @returns {Promise<T>} - The response data.
26
+ */
27
+ post<T>(path: string, input: PostRequestInput): Promise<T>;
28
+ /**
29
+ * Logs the error details using the provided logger.
30
+ *
31
+ * @param {AxiosError} error - The error object from Axios.
32
+ */
33
+ private handleError;
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=http-axios.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-axios.client.d.ts","sourceRoot":"","sources":["../../../../../src/lib/clean-architecture/infrastructure/clients/http-axios.client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE5D,KAAK,MAAM,GAAG;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,qBAAa,eAAgB,YAAW,UAAU;IAChD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,aAAa,CAAgB;gBAEzB,MAAM,EAAE,MAAM;IAU1B;;;;;OAKG;IACG,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAUtC;;;;;;OAMG;IACG,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC;IAkBhE;;;;OAIG;IACH,OAAO,CAAC,WAAW;CAMpB"}
@@ -0,0 +1,2 @@
1
+ export * from './http-axios.client';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/clean-architecture/infrastructure/clients/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './clients';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/clean-architecture/infrastructure/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from './accounts';
2
2
  export * from './add-to-cart';
3
+ export * from './clean-architecture';
3
4
  export * from './constants';
4
5
  export * from './domain';
5
6
  export * from './errors';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.5.9-beta.1",
3
+ "version": "0.5.9-beta.2",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",
@@ -1,15 +0,0 @@
1
- import { NizzaConfig } from '../types';
2
- import { NizzaAccount } from '../accounts';
3
-
4
- export declare class ConfigManager {
5
- private _config;
6
- private _account;
7
- constructor();
8
- configure(config: NizzaConfig): Promise<void>;
9
- get config(): NizzaConfig | null;
10
- get account(): NizzaAccount;
11
- get ok(): boolean;
12
- get accountName(): string;
13
- setAccount(account: NizzaAccount): void;
14
- }
15
- //# sourceMappingURL=ConfigManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConfigManager.d.ts","sourceRoot":"","sources":["../../../src/lib/nizza-store/ConfigManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,QAAQ,CAAgB;;IAU1B,SAAS,CAAC,MAAM,EAAE,WAAW;IASnC,IAAI,MAAM,uBAGT;IAED,IAAI,OAAO,iBAGV;IAED,IAAI,EAAE,YAGL;IAED,IAAI,WAAW,WAGd;IAED,UAAU,CAAC,OAAO,EAAE,YAAY;CAGjC"}