@transcommerce/cwm-shared 1.1.35 → 1.1.37
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/fesm2022/transcommerce-cwm-shared.mjs +451 -454
- package/fesm2022/transcommerce-cwm-shared.mjs.map +1 -1
- package/lib/models/config/api-config.d.ts +1 -0
- package/lib/models/config/auth-config.d.ts +12 -4
- package/lib/models/config/carousel-config.d.ts +1 -0
- package/lib/models/config/configuration.d.ts +1 -0
- package/lib/models/config/menu-board-config.d.ts +1 -0
- package/lib/models/config/subscription-config.d.ts +8 -0
- package/lib/models/customer.d.ts +1 -0
- package/lib/models/inventory-api-response.d.ts +1 -0
- package/lib/models/log-levels.d.ts +6 -1
- package/lib/models/profile.d.ts +1 -0
- package/lib/models/slide.d.ts +1 -0
- package/lib/services/base-api.service.d.ts +3 -3
- package/lib/services/class-logger.service.d.ts +4 -4
- package/lib/services/config.service.d.ts +3 -3
- package/lib/services/ibase-api.service.d.ts +2 -2
- package/lib/services/inventory-api.service.d.ts +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/lib/models/config/display-config.d.ts +0 -14
- package/lib/models/config/msalLoginPrompts.d.ts +0 -5
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import { LogLevels } from '../log-levels';
|
|
2
|
-
import { MsalLoginPrompts } from './msalLoginPrompts';
|
|
3
1
|
export type AuthConfig = {
|
|
4
|
-
logLevel:
|
|
2
|
+
logLevel: "None" | // No logging at all
|
|
3
|
+
"Error" | // This will only contain Errors
|
|
4
|
+
"Warn" | // This will Warnings and Errors
|
|
5
|
+
"Info" | // Default log level. This will contain Information, Warnings, and Error. This is used to provide general information about app flow but shouldn't contain values.
|
|
6
|
+
"Debug" | // Useful for debugging, This will contain Debug, Information, Warnings, and Error. If actual values are put in the logs, this should be chosen; they may need to be sanitized
|
|
7
|
+
"Trace";
|
|
5
8
|
clientId: string;
|
|
6
9
|
tenantId: string;
|
|
7
10
|
authority: string;
|
|
8
11
|
scopes: string;
|
|
9
12
|
redirect_uri: string;
|
|
10
13
|
logout_redirect_uri: string;
|
|
11
|
-
prompt:
|
|
14
|
+
prompt: 'none' | // Silent auth only. Fails if user interaction is required. Useful for checking SSO state.
|
|
15
|
+
'login' | // Forces the user to enter credentials again. Always shows the sign‑in page.
|
|
16
|
+
'select_account' | // Shows the account picker UI, even if only one account exists.
|
|
17
|
+
'consent' | // Forces the consent screen to appear, even if consent was previously granted.
|
|
18
|
+
'create';
|
|
12
19
|
msalDiagnosticsEnabled: boolean;
|
|
13
20
|
showPii: boolean;
|
|
14
21
|
configConnectString: string;
|
|
15
22
|
};
|
|
23
|
+
export declare const DEFAULT_AUTH_CONFIG: AuthConfig;
|
package/lib/models/customer.d.ts
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
export type LogLevels = "
|
|
1
|
+
export type LogLevels = "None" | // No logging at all
|
|
2
|
+
"Error" | // This will only contain Errors
|
|
3
|
+
"Warn" | // This will Warnings and Errors
|
|
4
|
+
"Info" | // Default log level. This will contain Information, Warnings, and Error. This is used to provide general information about app flow but shouldn't contain values.
|
|
5
|
+
"Debug" | // Useful for debugging, This will contain Debug, Information, Warnings, and Error. If actual values are put in the logs, this should be chosen; they may need to be sanitized
|
|
6
|
+
"Trace";
|
package/lib/models/profile.d.ts
CHANGED
package/lib/models/slide.d.ts
CHANGED
|
@@ -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 {
|
|
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
|
-
|
|
10
|
+
logger: ClassLoggerService;
|
|
11
11
|
config: ApiConfig;
|
|
12
12
|
get apiBaseUrl(): string;
|
|
13
13
|
get apiFullUrl(): string;
|
|
14
|
-
constructor(configService: ConfigService, httpClient: HttpClient,
|
|
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
|
}
|
|
@@ -12,11 +12,11 @@ export declare class ClassLoggerService {
|
|
|
12
12
|
endOfMethod(): void;
|
|
13
13
|
private get targetName();
|
|
14
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
15
|
error(message?: any, ...optionalParams: any[]): void;
|
|
16
|
+
warn(message?: any, ...optionalParams: any[]): void;
|
|
17
|
+
info(message?: any, ...optionalParams: any[]): void;
|
|
18
|
+
debug(message?: any, ...optionalParams: any[]): void;
|
|
19
|
+
trace(message?: any, ...optionalParams: any[]): void;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<ClassLoggerService, never>;
|
|
21
21
|
static ɵprov: i0.ɵɵInjectableDeclaration<ClassLoggerService>;
|
|
22
22
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Configuration } from '../models/config/configuration';
|
|
2
|
-
import {
|
|
2
|
+
import { ClassLoggerService } from './class-logger.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ConfigService {
|
|
5
|
-
private
|
|
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(
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
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,
|
|
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
package/public-api.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ export * from './lib/models/config/api-config';
|
|
|
15
15
|
export * from './lib/models/config/auth-config';
|
|
16
16
|
export * from './lib/models/config/carousel-config';
|
|
17
17
|
export * from './lib/models/config/configuration';
|
|
18
|
-
export * from './lib/models/config/display-config';
|
|
19
18
|
export * from './lib/models/config/menu-board-config';
|
|
19
|
+
export * from './lib/models/config/subscription-config';
|
|
20
20
|
export * from './lib/models/add-subscription-request';
|
|
21
21
|
export * from './lib/models/cannabinoid-information';
|
|
22
22
|
export * from './lib/models/card-types';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Font } from "../font";
|
|
2
|
-
import { Image } from "../image";
|
|
3
|
-
import { Slide } from "../slide";
|
|
4
|
-
import { CarouselConfig } from "./carousel-config";
|
|
5
|
-
import { Color } from '../color';
|
|
6
|
-
export type DisplayConfig = {
|
|
7
|
-
companyName: string;
|
|
8
|
-
backgroundColor: Color;
|
|
9
|
-
font: Font;
|
|
10
|
-
headerLogo: Image;
|
|
11
|
-
showFooterCarousel: boolean;
|
|
12
|
-
footerCarouselConfig: CarouselConfig;
|
|
13
|
-
footerCarouselSlides: Slide[];
|
|
14
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
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';
|