@transcommerce/cwm-shared 1.1.42 → 1.1.47

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.
@@ -338,7 +338,7 @@ function msalGuardConfigFactory(authConfig, injector) {
338
338
  function msalInstanceFactory(authConfig, injector) {
339
339
  const logService = injector ? injector.get(ClassLoggerService, null) : null;
340
340
  if (logService) {
341
- logService.className = 'AppModule';
341
+ //logService.className = 'AppModule';
342
342
  logService.methodName = 'msalInstanceFactory';
343
343
  }
344
344
  const publicClientApplication = new PublicClientApplication({
@@ -436,7 +436,7 @@ function msalInstanceFactory(authConfig, injector) {
436
436
  function msalInterceptorConfigFactory(authConfig, injector) {
437
437
  const logService = injector ? injector.get(ClassLoggerService, null) : null;
438
438
  if (logService) {
439
- logService.className = 'AppModule';
439
+ //logService.className = 'AppModule';
440
440
  logService.methodName = 'msalInterceptorConfigFactory';
441
441
  logService.info(`msalInterceptorConfigFactory: using clientId=${authConfig.clientId}`);
442
442
  }
@@ -1195,10 +1195,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
1195
1195
  }] });
1196
1196
 
1197
1197
  const DEFAULT_API_CONFIG = {
1198
- "apiBaseUrl": "https://cheap-weed-menus-webapi.azurewebsites.net",
1199
- "addCustomerApiRoute": "/AddCustomer",
1200
- "addSubscriptionApiRoute": "/subscription",
1201
- "getInventoryApiRoute": "/inventory",
1198
+ "apiBaseUrl": "https://api.cheapweedmenu.com",
1199
+ "createSubscriptionApiRoute": "/CreateSubscription",
1200
+ "getInventoryApiRoute": "/GetInventory",
1202
1201
  "apiKey": "8b66d117-5d23-4b81-8c2f-52142c67d0cd",
1203
1202
  "clientId": "5dd15878-aa4c-4adf-8650-b931f32a7b67",
1204
1203
  "locationId": "10f19fc5-31d0-4d76-bad4-ad593c9803ae"
@@ -1263,13 +1262,26 @@ const DEFAULT_CONFIGURATION = {
1263
1262
  footerCarouselSlideConfig: [DEFAULT_SLIDE]
1264
1263
  };
1265
1264
 
1266
- var CardTypes;
1267
- (function (CardTypes) {
1268
- CardTypes["Amex"] = "Amex";
1269
- CardTypes["Visa"] = "Visa";
1270
- CardTypes["Discover"] = "Discover";
1271
- CardTypes["MasterCard"] = "MasterCard";
1272
- })(CardTypes || (CardTypes = {}));
1265
+ const EXAMPLE_CREATE_SUBSCRIPTION_REQUEST = {
1266
+ "creditCard": {
1267
+ "firstName": "John",
1268
+ "lastName": "Doe",
1269
+ "company": "ACME Inc",
1270
+ "cardType": "Visa",
1271
+ "number": "4111111111111111",
1272
+ "expiration": "2028-12",
1273
+ "ccv": "123",
1274
+ "billZipCode": "90210",
1275
+ "country": "US"
1276
+ },
1277
+ "subscription": {
1278
+ "id": "1234567890",
1279
+ "amount": 999,
1280
+ "days": 30,
1281
+ "totalOccurrences": 12,
1282
+ "trialOccurrences": 0
1283
+ }
1284
+ };
1273
1285
 
1274
1286
  class Category {
1275
1287
  id;
@@ -27885,17 +27897,17 @@ class SubscriptionApiService extends BaseApiService {
27885
27897
  logger.className = "SubscriptionApiService";
27886
27898
  }
27887
27899
  get apiFullUrl() {
27888
- return `${this.apiBaseUrl}${(this.config ?? DEFAULT_API_CONFIG).addSubscriptionApiRoute}`;
27900
+ return `${this.apiBaseUrl}${(this.config ?? DEFAULT_API_CONFIG).createSubscriptionApiRoute}`;
27889
27901
  }
27890
- async addSubscriptionAsync(request) {
27902
+ async createSubscriptionAsync(request) {
27891
27903
  try {
27892
- this.logger.methodName = 'addSubscriptionAsync';
27893
- this.logger.debug(`Calling AddSubscription API at ${this.apiFullUrl}`);
27904
+ this.logger.methodName = 'createSubscriptionAsync';
27905
+ this.logger.debug(`Calling CreateSubscription API at ${this.apiFullUrl}`);
27894
27906
  await firstValueFrom(this.httpClient.post(this.apiFullUrl, request));
27895
- this.logger.info('Successfully added subscription');
27907
+ this.logger.info('Successfully created subscription');
27896
27908
  }
27897
27909
  catch (error) {
27898
- this.logger.error('Error adding subscription', error);
27910
+ this.logger.error('Error creating subscription', error);
27899
27911
  throw error;
27900
27912
  }
27901
27913
  finally {
@@ -27924,5 +27936,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
27924
27936
  * Generated bundle index. Do not edit.
27925
27937
  */
27926
27938
 
27927
- export { AUTH_CONFIG, BaseApiService, CardTypes, Category, ClassLoggerService, ConfigService, Customer, CwmSharedModule, DEFAULT_API_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CAROUSEL_CONFIG, DEFAULT_COMPANY_NAME, DEFAULT_CONFIGURATION, DEFAULT_CUSTOMER, DEFAULT_INVENTORY_API_RESPONSE, DEFAULT_MENU_BOARD_CONFIG, DEFAULT_PROFILE, DEFAULT_SLIDE, DEFAULT_SUBSCRIPTION_CONFIG, DbKeys, ExternalNavigationComponent, InventoryApiService, Justifications, LocalStorageService, LogService, LoggingVerbosity, MockConfig, MockCustomer, MockInventoryApiResponse, MockProfile, NamedColors, NavigateToRouteComponent, OnElementStyle, PageNotFoundComponent, Product, Profile, SafeHtmlPipe, Stack, SubscriptionApiService, TimeSpan, TimeSpanOverflowError, UserTypes, Utilities, decodeToken, doWithLock, isTokenValid, msalGuardConfigFactory, msalInstanceFactory, msalInterceptorConfigFactory, waitFor };
27939
+ export { AUTH_CONFIG, BaseApiService, Category, ClassLoggerService, ConfigService, Customer, CwmSharedModule, DEFAULT_API_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CAROUSEL_CONFIG, DEFAULT_COMPANY_NAME, DEFAULT_CONFIGURATION, DEFAULT_CUSTOMER, DEFAULT_INVENTORY_API_RESPONSE, DEFAULT_MENU_BOARD_CONFIG, DEFAULT_PROFILE, DEFAULT_SLIDE, DEFAULT_SUBSCRIPTION_CONFIG, DbKeys, EXAMPLE_CREATE_SUBSCRIPTION_REQUEST, ExternalNavigationComponent, InventoryApiService, Justifications, LocalStorageService, LogService, LoggingVerbosity, MockConfig, MockCustomer, MockInventoryApiResponse, MockProfile, NamedColors, NavigateToRouteComponent, OnElementStyle, PageNotFoundComponent, Product, Profile, SafeHtmlPipe, Stack, SubscriptionApiService, TimeSpan, TimeSpanOverflowError, UserTypes, Utilities, decodeToken, doWithLock, isTokenValid, msalGuardConfigFactory, msalInstanceFactory, msalInterceptorConfigFactory, waitFor };
27928
27940
  //# sourceMappingURL=transcommerce-cwm-shared.mjs.map