@transcommerce/cwm-shared 1.0.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 (58) hide show
  1. package/README.md +63 -0
  2. package/fesm2022/transcommerce-cwm-shared.mjs +27479 -0
  3. package/fesm2022/transcommerce-cwm-shared.mjs.map +1 -0
  4. package/index.d.ts +5 -0
  5. package/lib/factories/msal-interceptor-config.factory.d.ts +2 -0
  6. package/lib/factories/msal.guard.config.factory.d.ts +2 -0
  7. package/lib/factories/msal.instance.factory.d.ts +2 -0
  8. package/lib/helpers/async-utils.d.ts +21 -0
  9. package/lib/helpers/db-keys.d.ts +18 -0
  10. package/lib/helpers/jwt.d.ts +2 -0
  11. package/lib/helpers/time-span-overflow-error.d.ts +2 -0
  12. package/lib/helpers/time-span.d.ts +32 -0
  13. package/lib/helpers/utilities.d.ts +64 -0
  14. package/lib/models/add-subscription-request.d.ts +8 -0
  15. package/lib/models/cannabinoid-information.d.ts +7 -0
  16. package/lib/models/card-types.d.ts +6 -0
  17. package/lib/models/category.d.ts +7 -0
  18. package/lib/models/color.d.ts +2 -0
  19. package/lib/models/config/api-config.d.ts +9 -0
  20. package/lib/models/config/auth-config.d.ts +13 -0
  21. package/lib/models/config/carousel-config.d.ts +10 -0
  22. package/lib/models/config/configuration.d.ts +12 -0
  23. package/lib/models/config/display-config.d.ts +14 -0
  24. package/lib/models/config/menu-board-config.d.ts +5 -0
  25. package/lib/models/credit-card.d.ts +9 -0
  26. package/lib/models/customer.d.ts +23 -0
  27. package/lib/models/flowhub-product.d.ts +49 -0
  28. package/lib/models/font.d.ts +9 -0
  29. package/lib/models/image.d.ts +8 -0
  30. package/lib/models/inventory-api-response.d.ts +6 -0
  31. package/lib/models/justifications.d.ts +6 -0
  32. package/lib/models/log-levels.d.ts +1 -0
  33. package/lib/models/logging-verbosity.d.ts +7 -0
  34. package/lib/models/model-map.d.ts +4 -0
  35. package/lib/models/named-colors.d.ts +8 -0
  36. package/lib/models/on-element-style.d.ts +3 -0
  37. package/lib/models/product.d.ts +15 -0
  38. package/lib/models/profile.d.ts +20 -0
  39. package/lib/models/slide.d.ts +8 -0
  40. package/lib/models/subscription.d.ts +7 -0
  41. package/lib/models/user-types.d.ts +4 -0
  42. package/lib/models/weight-tier-information.d.ts +5 -0
  43. package/lib/models/window.d.ts +4 -0
  44. package/lib/modules/cwm-shared.module.d.ts +10 -0
  45. package/lib/pipes/safe-html.pipe.d.ts +10 -0
  46. package/lib/services/auth.service.d.ts +8 -0
  47. package/lib/services/base-api.service.d.ts +17 -0
  48. package/lib/services/config.service.d.ts +19 -0
  49. package/lib/services/customer-api.service.d.ts +11 -0
  50. package/lib/services/ibase-api.service.d.ts +12 -0
  51. package/lib/services/inventory-api.service.d.ts +15 -0
  52. package/lib/services/local-storage.service.d.ts +48 -0
  53. package/lib/services/log.service.d.ts +19 -0
  54. package/lib/services/mocks/mock-inventory-api-response.d.ts +2 -0
  55. package/lib/services/mocks/mock-location-config.d.ts +2 -0
  56. package/lib/services/mocks/mock-profile.d.ts +2 -0
  57. package/package.json +28 -0
  58. package/public-api.d.ts +51 -0
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@transcommerce/cwm-shared" />
5
+ export * from './public-api';
@@ -0,0 +1,2 @@
1
+ import { MsalInterceptorConfiguration } from '@azure/msal-angular';
2
+ export declare function MSALInterceptorConfigFactory(): MsalInterceptorConfiguration;
@@ -0,0 +1,2 @@
1
+ import { MsalGuardConfiguration } from "@azure/msal-angular";
2
+ export declare function MSALGuardConfigFactory(): MsalGuardConfiguration;
@@ -0,0 +1,2 @@
1
+ import { IPublicClientApplication } from "@azure/msal-browser";
2
+ export declare function MSALInstanceFactory(): IPublicClientApplication;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A wrapper around setTimeout which returns a promise. Useful for waiting for an amount of
3
+ * time from an async function. e.g. await waitFor(1000);
4
+ *
5
+ * @param milliseconds The amount of time to wait.
6
+ * @returns A promise that resolves once the given number of milliseconds has ellapsed.
7
+ */
8
+ export declare function waitFor(milliseconds: number): Promise<void>;
9
+ /**
10
+ * Used to ensure that only a single task for the given lock name can be executed at once.
11
+ * While JS is generally single threaded, this method can be useful when running asynchronous
12
+ * tasks which may interact with external systems (HTTP API calls, React Native plugins, etc)
13
+ * which will cause the main JS thread's event loop to become unblocked. By using the same
14
+ * lock name for a group of tasks you can ensure the only one task will ever be in progress
15
+ * at a given time.
16
+ *
17
+ * @param lockName The name of the lock to be obtained.
18
+ * @param task The task to execute.
19
+ * @returns The value returned by the task.
20
+ */
21
+ export declare function doWithLock<T>(lockName: string, task: () => Promise<T>): Promise<T>;
@@ -0,0 +1,18 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DbKeys {
3
+ static readonly CURRENT_USER = "current_user";
4
+ static readonly USER_PERMISSIONS = "user_permissions";
5
+ static readonly USER_DATA = "user_data";
6
+ static readonly SYNC_KEYS = "sync_keys";
7
+ static readonly AUTH_PROVIDER = "auth_provider";
8
+ static readonly REMEMBER_ME = "remember_me";
9
+ static readonly LANGUAGE = "language";
10
+ static readonly HOME_URL = "home_url";
11
+ static readonly THEME_ID = "themeId";
12
+ static readonly SHOW_DASHBOARD_STATISTICS = "show_dashboard_statistics";
13
+ static readonly SHOW_DASHBOARD_NOTIFICATIONS = "show_dashboard_notifications";
14
+ static readonly SHOW_DASHBOARD_TODO = "show_dashboard_todo";
15
+ static readonly SHOW_DASHBOARD_BANNER = "show_dashboard_banner";
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbKeys, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<DbKeys>;
18
+ }
@@ -0,0 +1,2 @@
1
+ export declare function decodeToken(token: string): any;
2
+ export declare function isTokenValid(input: string | number): boolean;
@@ -0,0 +1,2 @@
1
+ export declare class TimeSpanOverflowError extends Error {
2
+ }
@@ -0,0 +1,32 @@
1
+ export declare class TimeSpan {
2
+ private _millis;
3
+ private static interval;
4
+ private static round;
5
+ private static timeToMilliseconds;
6
+ static get zero(): TimeSpan;
7
+ static get maxValue(): TimeSpan;
8
+ static get minValue(): TimeSpan;
9
+ static fromDays(value: number): TimeSpan;
10
+ static fromHours(value: number): TimeSpan;
11
+ static fromMilliseconds(value: number): TimeSpan;
12
+ static fromMinutes(value: number): TimeSpan;
13
+ static fromSeconds(value: number): TimeSpan;
14
+ static fromTime(hours: number, minutes: number, seconds: number): TimeSpan;
15
+ static fromTime(days: number, hours: number, minutes: number, seconds: number, milliseconds: number): TimeSpan;
16
+ private static fromTimeStartingFromHours;
17
+ private static fromTimeStartingFromDays;
18
+ constructor(millis: number);
19
+ get days(): number;
20
+ get hours(): number;
21
+ get minutes(): number;
22
+ get seconds(): number;
23
+ get milliseconds(): number;
24
+ get totalDays(): number;
25
+ get totalHours(): number;
26
+ get totalMinutes(): number;
27
+ get totalSeconds(): number;
28
+ get totalMilliseconds(): number;
29
+ add(ts: TimeSpan): TimeSpan;
30
+ subtract(ts: TimeSpan): TimeSpan;
31
+ static fromString(value: string): TimeSpan;
32
+ }
@@ -0,0 +1,64 @@
1
+ import { HttpResponse, HttpResponseBase } from '@angular/common/http';
2
+ import * as i0 from "@angular/core";
3
+ export declare class Utilities {
4
+ static readonly captionAndMessageSeparator = ":";
5
+ static readonly noNetworkMessageCaption = "No Network";
6
+ static readonly noNetworkMessageDetail = "The server cannot be reached";
7
+ static readonly accessDeniedMessageCaption = "Access Denied!";
8
+ static readonly accessDeniedMessageDetail = "";
9
+ static readonly notFoundMessageCaption = "Not Found";
10
+ static readonly notFoundMessageDetail = "The target resource cannot be found";
11
+ static cookies: {
12
+ getItem: (sKey: string) => string | null;
13
+ setItem: (sKey: string, sValue: string, vEnd: any, sPath: string, sDomain: string, bSecure: unknown) => boolean;
14
+ removeItem: (sKey: string | number | boolean, sPath: string, sDomain: string) => boolean;
15
+ hasItem: (sKey: string | number | boolean) => boolean;
16
+ keys: () => string[];
17
+ };
18
+ static getHttpResponseMessages(data: HttpResponseBase): string[];
19
+ static getHttpResponseMessage(data: HttpResponseBase | any): string;
20
+ static findHttpResponseMessage(messageToFind: string, data: HttpResponse<any> | any, searchInCaptionOnly?: boolean, includeCaptionInResult?: boolean): any;
21
+ static getResponseBody(response: HttpResponseBase): any;
22
+ static checkNoNetwork(response: HttpResponseBase): boolean;
23
+ static checkAccessDenied(response: HttpResponseBase): boolean;
24
+ static checkNotFound(response: HttpResponseBase): boolean;
25
+ static checkIsLocalHost(url: string, base?: string): boolean;
26
+ static getQueryParamsFromString(paramString: string): {
27
+ [key: string]: string;
28
+ } | null;
29
+ static splitInTwo(text: string, separator: string): {
30
+ firstPart: string;
31
+ secondPart: any;
32
+ };
33
+ static safeStringify(object: {
34
+ [x: string]: any;
35
+ hasOwnProperty: (arg0: string) => any;
36
+ }): string;
37
+ static JsonTryParse(value: string): any;
38
+ static TestIsObjectEmpty(obj: any): boolean;
39
+ static TestIsUndefined(value: any): value is undefined;
40
+ static TestIsString(value: any): value is string | String;
41
+ static capitalizeFirstLetter(text: string): string;
42
+ static toTitleCase(text: string): string;
43
+ static toLowerCase(items: string): any;
44
+ static toLowerCase(items: string[]): any;
45
+ static uniqueId(): string;
46
+ static randomNumber(min: number, max: number): number;
47
+ static baseUrl(): string;
48
+ static printDateOnly(date: Date): string;
49
+ static printTimeOnly(date: Date): string;
50
+ static printDate(date: Date, separator?: string): string;
51
+ static printFriendlyDate(date: Date, separator?: string): string;
52
+ static printShortDate(date: Date, separator?: string, dateTimeSeparator?: string): string;
53
+ static parseDate(date: any): "" | Date;
54
+ static printDuration(start: Date, end: Date): string;
55
+ static getAge(birthDate: string | number | Date, otherDate: string | number | Date): number;
56
+ static deepCloneArray<T>(items: T[]): T[];
57
+ static searchArray(searchTerm: string, caseSensitive: boolean, ...values: any[]): boolean;
58
+ static moveArrayItem(array: any[], oldIndex: number, newIndex: number): void;
59
+ static expandCamelCase(text: string): string;
60
+ static testIsAbsoluteUrl(url: string): boolean;
61
+ static convertToAbsoluteUrl(url: string): string;
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<Utilities, never>;
63
+ static ɵprov: i0.ɵɵInjectableDeclaration<Utilities>;
64
+ }
@@ -0,0 +1,8 @@
1
+ import { Customer } from "./customer";
2
+ import { CreditCard } from "./credit-card";
3
+ import { Subscription } from "./subscription";
4
+ export interface AddSubscriptionRequest {
5
+ customer: Customer;
6
+ creditCard: CreditCard;
7
+ subscription: Subscription;
8
+ }
@@ -0,0 +1,7 @@
1
+ export type CannabinoidInformation = {
2
+ lowerRange: string | number;
3
+ name: string;
4
+ unitOfMeasure: string;
5
+ unitOfMeasureToGramsMultiplier: null | number | string;
6
+ upperRange: string | number;
7
+ };
@@ -0,0 +1,6 @@
1
+ export declare enum CardTypes {
2
+ Amex = "Amex",
3
+ Visa = "Visa",
4
+ Discover = "Discover",
5
+ MasterCard = "MasterCard"
6
+ }
@@ -0,0 +1,7 @@
1
+ export declare class Category {
2
+ id: string;
3
+ name: string;
4
+ description: string;
5
+ static MapToString(from: Category): string;
6
+ static MapFromString(from: string): Category;
7
+ }
@@ -0,0 +1,2 @@
1
+ import { NamedColors } from './named-colors';
2
+ export type Color = NamedColors | `#${string}`;
@@ -0,0 +1,9 @@
1
+ export type ApiConfig = {
2
+ apiBaseUrl: string;
3
+ addCustomerApiRoute: string;
4
+ addSubscriptionApiRoute: string;
5
+ getInventoryApiRoute: string;
6
+ apiKey: string;
7
+ clientId: string;
8
+ locationId: string;
9
+ };
@@ -0,0 +1,13 @@
1
+ import { LogLevels } from '../log-levels';
2
+ export type AuthConfig = {
3
+ logLevel: LogLevels;
4
+ clientId: string;
5
+ tenantId: string;
6
+ authority: string;
7
+ scopes: string;
8
+ menu_uri: string;
9
+ redirect_uri: string;
10
+ logout_redirect_uri: string;
11
+ prompt: string;
12
+ configConnectString: string;
13
+ };
@@ -0,0 +1,10 @@
1
+ export type CarouselConfig = {
2
+ slidesToShow: number;
3
+ slidesToScroll: number;
4
+ dots: boolean;
5
+ infinite: boolean;
6
+ autoplay: boolean;
7
+ autoplaySpeed: number;
8
+ speed: number;
9
+ arrows: boolean;
10
+ };
@@ -0,0 +1,12 @@
1
+ import { ApiConfig } from "./api-config";
2
+ import { MenuBoardConfig } from "./menu-board-config";
3
+ import { CarouselConfig } from "./carousel-config";
4
+ import { Slide } from "../slide";
5
+ import { AuthConfig } from "./auth-config";
6
+ export type Configuration = {
7
+ authConfig: AuthConfig;
8
+ apiConfig: ApiConfig;
9
+ menuBoardConfig: MenuBoardConfig;
10
+ footerCarouselConfig: CarouselConfig;
11
+ footerCarouselSlideConfig: Slide[];
12
+ };
@@ -0,0 +1,14 @@
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
+ };
@@ -0,0 +1,5 @@
1
+ export type MenuBoardConfig = {
2
+ amountToScroll: number;
3
+ autoScrollTimeout: number;
4
+ dataAgeThreshold: number;
5
+ };
@@ -0,0 +1,9 @@
1
+ import { CardTypes } from "./card-types";
2
+ export interface CreditCard {
3
+ nameOnCard: string;
4
+ cardType: CardTypes;
5
+ number: string;
6
+ expiration: string;
7
+ ccv: string;
8
+ billZipCode: string;
9
+ }
@@ -0,0 +1,23 @@
1
+ import { UserTypes } from './user-types';
2
+ import { Profile } from './profile';
3
+ export declare class Customer {
4
+ id: string;
5
+ userType: UserTypes;
6
+ displayName: string;
7
+ givenName: string;
8
+ surName: string;
9
+ emailAddress: string;
10
+ jobTitle: string;
11
+ companyName: string;
12
+ streetAddress: string;
13
+ city: string;
14
+ state: string;
15
+ postalCode: string;
16
+ country: string;
17
+ phoneNumber: string;
18
+ apiClientId: string;
19
+ apiLocationId: string;
20
+ subscriptionId: string;
21
+ static MapToProfile(from: Customer): Profile;
22
+ static MapFromProfile(from: Profile): Customer;
23
+ }
@@ -0,0 +1,49 @@
1
+ import { CannabinoidInformation } from "./cannabinoid-information";
2
+ import { WeightTierInformation } from "./weight-tier-information";
3
+ export type FlowhubProduct = {
4
+ brand: null | string;
5
+ cannabinoidInformation: CannabinoidInformation[] | null;
6
+ category: string;
7
+ clientId: string;
8
+ costInMinorUnits: number;
9
+ createdAt: string | Date | null;
10
+ currencyCode: string;
11
+ customCategoryName: null;
12
+ erpId: string | null;
13
+ erpName: string | null;
14
+ expirationDate: string | Date | null;
15
+ inventoryUnitOfMeasure: string;
16
+ inventoryUnitOfMeasureToGramsMultiplier: number | null;
17
+ invoiceNumber: string | null;
18
+ isMixAndMatch: boolean | null;
19
+ isSoldByWeight: boolean;
20
+ isStackable: boolean | null;
21
+ locationId: string;
22
+ manifestId: string | null;
23
+ locationName: string;
24
+ nutrients: null;
25
+ parentproductId: string;
26
+ parentproductName: string;
27
+ postTaxPriceInPennies: number;
28
+ preTaxPriceInPennies: number;
29
+ priceInMinorUnits: number;
30
+ productDescription: string;
31
+ productId: string;
32
+ productName: string;
33
+ productPictureURL: null;
34
+ productUnitOfMeasure: string;
35
+ productUnitOfMeasureToGramsMultiplier: number | null;
36
+ productUpdatedAt: string | Date | null;
37
+ productWeight: number | null;
38
+ purchaseCategory: string;
39
+ quantity: number;
40
+ regulatoryId: string;
41
+ sku: string;
42
+ speciesName: string | null;
43
+ supplierName: string | null;
44
+ terpenes: unknown[] | null;
45
+ type: null | string;
46
+ variantId: string;
47
+ variantName: string;
48
+ weightTierInformation: WeightTierInformation[] | null;
49
+ };
@@ -0,0 +1,9 @@
1
+ export type Font = {
2
+ name: string;
3
+ family: string;
4
+ size: number;
5
+ italic: boolean;
6
+ bold: boolean;
7
+ underline: boolean;
8
+ color: string;
9
+ };
@@ -0,0 +1,8 @@
1
+ export type Image = {
2
+ source: string;
3
+ justification: "left" | "right" | "center" | "absolute";
4
+ width: number;
5
+ height: number;
6
+ top: number;
7
+ left: number;
8
+ };
@@ -0,0 +1,6 @@
1
+ import { HttpStatusCode } from "@angular/common/http";
2
+ import { FlowhubProduct } from "./flowhub-product";
3
+ export type InventoryApiResponse = {
4
+ status: HttpStatusCode;
5
+ data: FlowhubProduct[];
6
+ };
@@ -0,0 +1,6 @@
1
+ export declare enum Justifications {
2
+ Left = "left",
3
+ Right = "right",
4
+ Center = "center",
5
+ Absolute = "absolute"
6
+ }
@@ -0,0 +1 @@
1
+ export type LogLevels = "Error" | "Warn" | "Debug" | "Info" | "None";
@@ -0,0 +1,7 @@
1
+ export declare enum LoggingVerbosity {
2
+ Error = "Error",
3
+ Warning = "Warn",
4
+ Debug = "Debug",
5
+ Information = "Info",
6
+ None = "None"
7
+ }
@@ -0,0 +1,4 @@
1
+ export interface ModelMap<T> {
2
+ MapTo(): T;
3
+ MapFrom(from: T): any;
4
+ }
@@ -0,0 +1,8 @@
1
+ export declare enum NamedColors {
2
+ Red = "red",
3
+ Green = "green",
4
+ Blue = "blue",
5
+ Yellow = "yellow",
6
+ Black = "black",
7
+ White = "white"
8
+ }
@@ -0,0 +1,3 @@
1
+ export declare abstract class OnElementStyle {
2
+ abstract cwmOnElementStyle(element: HTMLElement): StylePropertyMap;
3
+ }
@@ -0,0 +1,15 @@
1
+ import { FlowhubProduct } from './flowhub-product';
2
+ export declare class Product {
3
+ id: string;
4
+ name: string;
5
+ description: string;
6
+ brand: null | string;
7
+ price: number;
8
+ thcPercentage: number | null;
9
+ category: string;
10
+ quantity: number;
11
+ type: string;
12
+ pictureURL: null;
13
+ terpenes: unknown[] | null;
14
+ static FromFlowhubProduct(from: FlowhubProduct): Product;
15
+ }
@@ -0,0 +1,20 @@
1
+ import { Customer } from './customer';
2
+ export declare class Profile {
3
+ givenName?: string;
4
+ surname?: string;
5
+ displayName?: string;
6
+ userPrincipalName?: string;
7
+ id?: string;
8
+ businessPhones?: string[];
9
+ jobTitle?: string;
10
+ mail?: string;
11
+ mobilePhone?: string;
12
+ officeLocation?: string;
13
+ preferredLanguage?: string;
14
+ photoUrl?: string;
15
+ companyName?: string;
16
+ promoCode?: string;
17
+ employeeType?: string;
18
+ static MapFromCustomer(from: Customer): Profile;
19
+ static MapToCustomer(from: Profile): Customer;
20
+ }
@@ -0,0 +1,8 @@
1
+ export type Slide = {
2
+ image: string;
3
+ title: string;
4
+ description: string;
5
+ highlighted: boolean;
6
+ textColor: 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'white';
7
+ backgroundColor: 'red' | 'green' | 'blue' | 'yellow' | 'black' | 'white';
8
+ };
@@ -0,0 +1,7 @@
1
+ export interface Subscription {
2
+ id: string;
3
+ amount: number;
4
+ days: number;
5
+ totalOccurrences: number;
6
+ trialOccurrences: number;
7
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum UserTypes {
2
+ User = "User",
3
+ Administrator = "Administrator"
4
+ }
@@ -0,0 +1,5 @@
1
+ export type WeightTierInformation = {
2
+ gramAmount: number;
3
+ name: string;
4
+ pricePerUnitInMinorUnits: number;
5
+ };
@@ -0,0 +1,4 @@
1
+ import { Configuration } from "./config/configuration";
2
+ export default interface Window {
3
+ config: Configuration;
4
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "../pipes/safe-html.pipe";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/platform-browser";
5
+ import * as i4 from "@azure/msal-angular";
6
+ export declare class CwmSharedModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<CwmSharedModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CwmSharedModule, [typeof i1.SafeHtmlPipe], [typeof i2.CommonModule, typeof i3.BrowserModule, typeof i4.MsalModule], never>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<CwmSharedModule>;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SafeHtmlPipe implements PipeTransform {
5
+ private sanitizer;
6
+ constructor(sanitizer: DomSanitizer);
7
+ transform(value: string): SafeHtml;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", false>;
10
+ }
@@ -0,0 +1,8 @@
1
+ import { AuthConfig } from '../models/config/auth-config';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AuthService {
4
+ constructor();
5
+ static getAuthConfig(): AuthConfig;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
8
+ }
@@ -0,0 +1,17 @@
1
+ import { IBaseApiService } from './ibase-api.service';
2
+ import { ApiConfig } from '../models/config/api-config';
3
+ import { ConfigService } from './config.service';
4
+ import { HttpClient } from '@angular/common/http';
5
+ import { LogService } from './log.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class BaseApiService implements IBaseApiService {
8
+ configService: ConfigService;
9
+ httpClient: HttpClient;
10
+ logService: LogService;
11
+ config: ApiConfig;
12
+ get apiBaseUrl(): string;
13
+ get apiFullUrl(): string;
14
+ constructor(configService: ConfigService, httpClient: HttpClient, logService: LogService);
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseApiService, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaseApiService>;
17
+ }
@@ -0,0 +1,19 @@
1
+ import { Configuration } from '../models/config/configuration';
2
+ import { LogService } from './log.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ConfigService {
5
+ private logService;
6
+ mockData: boolean;
7
+ private readonly configClient;
8
+ private readonly configConnectString;
9
+ private _configCache;
10
+ protected get configCache(): Configuration;
11
+ protected set configCache(value: Configuration);
12
+ constructor(logService: LogService);
13
+ getConfigurationSettingAsync(key: string, label: string): Promise<string | undefined>;
14
+ setConfigurationSettingAsync(templateName: string, label: string, setting: any, contentType?: "Text" | "HTML" | "JSON" | "XML"): Promise<void>;
15
+ getConfigAsync(company: string): Promise<Configuration>;
16
+ saveConfigAsync(config: Configuration, company: string): Promise<void>;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfigService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConfigService>;
19
+ }
@@ -0,0 +1,11 @@
1
+ import { Customer } from '../models/customer';
2
+ import { BaseApiService } from './base-api.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CustomerApiService extends BaseApiService {
5
+ get apiFullUrl(): string;
6
+ getCustomerAsync(customerId: string): Promise<Customer | undefined>;
7
+ getCustomersAsync(): Promise<Customer[] | undefined>;
8
+ setCustomerAsync(companyName: string, customer: Customer): Promise<void>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomerApiService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<CustomerApiService>;
11
+ }
@@ -0,0 +1,12 @@
1
+ import { ConfigService } from './config.service';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { ApiConfig } from '../models/config/api-config';
4
+ import { LogService } from './log.service';
5
+ export interface IBaseApiService {
6
+ config: ApiConfig;
7
+ get apiBaseUrl(): string;
8
+ get apiFullUrl(): string;
9
+ configService: ConfigService;
10
+ logService: LogService;
11
+ httpClient: HttpClient;
12
+ }
@@ -0,0 +1,15 @@
1
+ import { KeyValue } from '@angular/common';
2
+ import { InventoryApiResponse } from '../models/inventory-api-response';
3
+ import { Product } from '../models/product';
4
+ import { BaseApiService } from './base-api.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class InventoryApiService extends BaseApiService {
7
+ demoData: boolean;
8
+ private get httpHeaders();
9
+ get apiFullUrl(): string;
10
+ getProductsAsync(companyName: string): Promise<InventoryApiResponse>;
11
+ getCategoriesAsync(companyName: string): Promise<string[]>;
12
+ getProductsByAllCategories(companyName: string): Promise<KeyValue<string, Product[]>[]>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<InventoryApiService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<InventoryApiService>;
15
+ }