@transcommerce/cwm-shared 1.1.34 → 1.1.36

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.
@@ -1,4 +1,5 @@
1
1
  import { LogLevels } from '../log-levels';
2
+ import { MsalLoginPrompts } from './msalLoginPrompts';
2
3
  export type AuthConfig = {
3
4
  logLevel: LogLevels;
4
5
  clientId: string;
@@ -7,7 +8,7 @@ export type AuthConfig = {
7
8
  scopes: string;
8
9
  redirect_uri: string;
9
10
  logout_redirect_uri: string;
10
- prompt: string;
11
+ prompt: MsalLoginPrompts;
11
12
  msalDiagnosticsEnabled: boolean;
12
13
  showPii: boolean;
13
14
  configConnectString: string;
@@ -0,0 +1,5 @@
1
+ export type MsalLoginPrompts = 'none' | // Silent auth only. Fails if user interaction is required. Useful for checking SSO state.
2
+ 'login' | // Forces the user to enter credentials again. Always shows the sign‑in page.
3
+ 'select_account' | // Shows the account picker UI, even if only one account exists.
4
+ 'consent' | // Forces the consent screen to appear, even if consent was previously granted.
5
+ 'create';
@@ -2,16 +2,16 @@ import { IBaseApiService } from './ibase-api.service';
2
2
  import { ApiConfig } from '../models/config/api-config';
3
3
  import { ConfigService } from './config.service';
4
4
  import { HttpClient } from '@angular/common/http';
5
- import { LogService } from './log.service';
5
+ import { ClassLoggerService } from './class-logger.service';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class BaseApiService implements IBaseApiService {
8
8
  configService: ConfigService;
9
9
  httpClient: HttpClient;
10
- logService: LogService;
10
+ logger: ClassLoggerService;
11
11
  config: ApiConfig;
12
12
  get apiBaseUrl(): string;
13
13
  get apiFullUrl(): string;
14
- constructor(configService: ConfigService, httpClient: HttpClient, logService: LogService);
14
+ constructor(configService: ConfigService, httpClient: HttpClient, logger: ClassLoggerService);
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseApiService, never>;
16
16
  static ɵprov: i0.ɵɵInjectableDeclaration<BaseApiService>;
17
17
  }
@@ -0,0 +1,22 @@
1
+ import { LogLevels } from '../models/log-levels';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ClassLoggerService {
4
+ logLevel: LogLevels;
5
+ collapseGroups: boolean;
6
+ private _className;
7
+ get className(): string;
8
+ set className(value: string);
9
+ private callStack;
10
+ get methodName(): string;
11
+ set methodName(value: string);
12
+ endOfMethod(): void;
13
+ private get targetName();
14
+ private get prefix();
15
+ log(message?: any, ...optionalParams: any[]): void;
16
+ debug(message?: any, ...optionalParams: any[]): void;
17
+ info(message?: any, ...optionalParams: any[]): void;
18
+ warn(message?: any, ...optionalParams: any[]): void;
19
+ error(message?: any, ...optionalParams: any[]): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClassLoggerService, never>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClassLoggerService>;
22
+ }
@@ -1,15 +1,15 @@
1
1
  import { Configuration } from '../models/config/configuration';
2
- import { LogService } from './log.service';
2
+ import { ClassLoggerService } from './class-logger.service';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class ConfigService {
5
- private logService;
5
+ private logger;
6
6
  mockData: boolean;
7
7
  private readonly configClient;
8
8
  private readonly configConnectString;
9
9
  private _configCache;
10
10
  protected get configCache(): Configuration;
11
11
  protected set configCache(value: Configuration);
12
- constructor(logService: LogService);
12
+ constructor(logger: ClassLoggerService);
13
13
  getConfigurationSettingAsync(key: string, label: string): Promise<string | undefined>;
14
14
  setConfigurationSettingAsync(templateName: string, label: string, setting: any, contentType?: "Text" | "HTML" | "JSON" | "XML"): Promise<void>;
15
15
  getConfigAsync(company: string): Promise<Configuration>;
@@ -1,12 +1,12 @@
1
1
  import { ConfigService } from './config.service';
2
2
  import { HttpClient } from '@angular/common/http';
3
3
  import { ApiConfig } from '../models/config/api-config';
4
- import { LogService } from './log.service';
4
+ import { ClassLoggerService } from './class-logger.service';
5
5
  export interface IBaseApiService {
6
6
  config: ApiConfig;
7
7
  get apiBaseUrl(): string;
8
8
  get apiFullUrl(): string;
9
9
  configService: ConfigService;
10
- logService: LogService;
10
+ logger: ClassLoggerService;
11
11
  httpClient: HttpClient;
12
12
  }
@@ -4,11 +4,11 @@ import { InventoryApiResponse } from '../models/inventory-api-response';
4
4
  import { Product } from '../models/product';
5
5
  import { BaseApiService } from './base-api.service';
6
6
  import { ConfigService } from './config.service';
7
- import { LogService } from './log.service';
7
+ import { ClassLoggerService } from './class-logger.service';
8
8
  import * as i0 from "@angular/core";
9
9
  export declare class InventoryApiService extends BaseApiService {
10
10
  useMockData: boolean;
11
- constructor(configService: ConfigService, httpClient: HttpClient, logService: LogService);
11
+ constructor(configService: ConfigService, httpClient: HttpClient, logger: ClassLoggerService);
12
12
  private get httpHeaders();
13
13
  get apiFullUrl(): string;
14
14
  getProductsAsync(companyName: string): Promise<InventoryApiResponse>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transcommerce/cwm-shared",
3
- "version": "1.1.34",
3
+ "version": "1.1.36",
4
4
  "engines": {
5
5
  "node": ">=18.0.0 <21.0.0"
6
6
  },
package/public-api.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './lib/factories/msal-interceptor-config.factory';
7
7
  export * from './lib/helpers/async-utils';
8
8
  export * from './lib/helpers/db-keys';
9
9
  export * from './lib/helpers/jwt';
10
+ export * from './lib/helpers/stack';
10
11
  export * from './lib/helpers/time-span';
11
12
  export * from './lib/helpers/time-span-overflow-error';
12
13
  export * from './lib/helpers/utilities';
@@ -48,6 +49,7 @@ export * from './lib/services/mocks/mock-config';
48
49
  export * from './lib/services/mocks/mock-profile';
49
50
  export * from './lib/services/mocks/mock-customer';
50
51
  export * from './lib/services/base-api.service';
52
+ export * from './lib/services/class-logger.service';
51
53
  export * from './lib/services/config.service';
52
54
  export * from './lib/services/customer-api.service';
53
55
  export * from './lib/services/ibase-api.service';