gunsmith-common 2.3.7 → 2.3.9

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 (35) hide show
  1. package/esm2020/shared/services/dealer.service.mjs +13 -27
  2. package/esm2020/shared/services/firearm-milling-type.service.mjs +25 -0
  3. package/esm2020/shared/services/index.mjs +3 -1
  4. package/esm2020/shared/services/milling-type-addon.service.mjs +25 -0
  5. package/esm2020/shared/services/sight.service.mjs +4 -1
  6. package/esm2020/shared/types/configuration.mjs +1 -1
  7. package/esm2020/shared/types/dealer.mjs +1 -1
  8. package/esm2020/shared/types/index.mjs +4 -1
  9. package/esm2020/shared/types/milling-detail.mjs +2 -1
  10. package/esm2020/shared/types/milling-type-addon-option.mjs +4 -0
  11. package/esm2020/shared/types/milling-type-addon.mjs +7 -0
  12. package/esm2020/shared/types/milling-type.mjs +2 -2
  13. package/esm2020/shared/types/optic-report-item.mjs +1 -1
  14. package/esm2020/shared/types/sight-report-item.mjs +2 -0
  15. package/fesm2015/gunsmith-common.mjs +71 -28
  16. package/fesm2015/gunsmith-common.mjs.map +1 -1
  17. package/fesm2020/gunsmith-common.mjs +67 -28
  18. package/fesm2020/gunsmith-common.mjs.map +1 -1
  19. package/gunsmith-common-2.3.9.tgz +0 -0
  20. package/package.json +1 -1
  21. package/shared/services/dealer.service.d.ts +5 -9
  22. package/shared/services/firearm-milling-type.service.d.ts +11 -0
  23. package/shared/services/index.d.ts +2 -0
  24. package/shared/services/milling-type-addon.service.d.ts +11 -0
  25. package/shared/services/sight.service.d.ts +3 -1
  26. package/shared/types/configuration.d.ts +1 -0
  27. package/shared/types/dealer.d.ts +1 -0
  28. package/shared/types/index.d.ts +3 -0
  29. package/shared/types/milling-detail.d.ts +2 -0
  30. package/shared/types/milling-type-addon-option.d.ts +5 -0
  31. package/shared/types/milling-type-addon.d.ts +8 -0
  32. package/shared/types/milling-type.d.ts +2 -2
  33. package/shared/types/optic-report-item.d.ts +2 -0
  34. package/shared/types/sight-report-item.d.ts +10 -0
  35. package/gunsmith-common-2.3.7.tgz +0 -0
@@ -303,6 +303,7 @@ var SightTypeEnum;
303
303
 
304
304
  class MillingDetail {
305
305
  constructor() {
306
+ this.millingAddons = [];
306
307
  this.barrelCrown = false;
307
308
  this.bushingInstallation = false;
308
309
  this.opticPulled = false;
@@ -328,7 +329,7 @@ class MillingType {
328
329
  this.price = 0.00;
329
330
  this.isCosmetic = false;
330
331
  this.mustRefinish = false;
331
- this.firearms = [];
332
+ this.addons = [];
332
333
  this.active = true;
333
334
  }
334
335
  }
@@ -521,6 +522,16 @@ class SlideAddon {
521
522
  }
522
523
  }
523
524
 
525
+ class MillingTypeAddonOption extends MillingType {
526
+ }
527
+
528
+ class MillingTypeAddon {
529
+ constructor() {
530
+ this.addonOptions = [];
531
+ this.active = true;
532
+ }
533
+ }
534
+
524
535
  class CustomerService {
525
536
  constructor(http, env) {
526
537
  this.http = http;
@@ -1002,45 +1013,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1002
1013
  args: ['env']
1003
1014
  }] }]; } });
1004
1015
 
1005
- class DealerService {
1016
+ class DealerService extends BaseService {
1006
1017
  constructor(http, env) {
1018
+ super(http);
1007
1019
  this.http = http;
1008
1020
  this.env = env;
1009
- this.url = this.env.baseUrl + 'api/dealers';
1010
- }
1011
- readDealers(includeInactive = false) {
1012
- return this.http.get(this.url, {
1013
- params: {
1014
- includeInactive: includeInactive.toString()
1015
- }
1016
- });
1017
- }
1018
- readDealer(id) {
1019
- return this.http.get(`${this.url}/${id}`);
1020
- }
1021
- createDealer(dealer) {
1022
- return this.http.post(this.url, dealer);
1023
- }
1024
- updateDealer(id, dealer) {
1025
- return this.http.put(`${this.url}/${id}`, dealer);
1026
- }
1027
- deleteDealer(id) {
1028
- return this.http.delete(`${this.url}/${id}`);
1021
+ this.urlSegments = [`${this.env.baseUrl}api/dealers`];
1029
1022
  }
1030
1023
  updateDealerCoupon(dealerId, couponId, dealerCoupon) {
1031
- return this.http.put(`${this.url}/${dealerId}/coupons/${couponId}`, dealerCoupon);
1024
+ return this.http.put(`${this.getUrl(dealerId)}/coupons/${couponId}`, dealerCoupon);
1025
+ }
1026
+ sendExpiredEmail() {
1027
+ return this.http.get(`${this.getUrl()}/expired-email`);
1032
1028
  }
1033
1029
  }
1034
- DealerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
1035
- DealerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, providedIn: 'root' });
1030
+ DealerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
1031
+ DealerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, providedIn: "root" });
1036
1032
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, decorators: [{
1037
1033
  type: Injectable,
1038
1034
  args: [{
1039
- providedIn: 'root'
1035
+ providedIn: "root",
1040
1036
  }]
1041
1037
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1042
1038
  type: Inject,
1043
- args: ['env']
1039
+ args: ["env"]
1044
1040
  }] }]; } });
1045
1041
 
1046
1042
  class FileUploadService {
@@ -1720,6 +1716,9 @@ class SightService extends BaseService {
1720
1716
  this.env = env;
1721
1717
  this.urlSegments = [`${this.env.baseUrl}api/sights`];
1722
1718
  }
1719
+ getSightReport() {
1720
+ return this.http.get(`${this.env.baseUrl}api/sights/report`);
1721
+ }
1723
1722
  }
1724
1723
  SightService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SightService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
1725
1724
  SightService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SightService, providedIn: 'root' });
@@ -1961,6 +1960,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1961
1960
  }]
1962
1961
  }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: WorkHolidayService }]; } });
1963
1962
 
1963
+ class MillingTypeAddonService extends BaseService {
1964
+ constructor(http, env) {
1965
+ super(http);
1966
+ this.http = http;
1967
+ this.env = env;
1968
+ this.urlSegments = [`${this.env.baseUrl}api/milling-types`, "addons"];
1969
+ }
1970
+ }
1971
+ MillingTypeAddonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MillingTypeAddonService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
1972
+ MillingTypeAddonService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MillingTypeAddonService, providedIn: "root" });
1973
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MillingTypeAddonService, decorators: [{
1974
+ type: Injectable,
1975
+ args: [{
1976
+ providedIn: "root",
1977
+ }]
1978
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1979
+ type: Inject,
1980
+ args: ["env"]
1981
+ }] }]; } });
1982
+
1983
+ class FirearmMillingTypeService extends BaseService {
1984
+ constructor(http, env) {
1985
+ super(http);
1986
+ this.http = http;
1987
+ this.env = env;
1988
+ this.urlSegments = [`${this.env.baseUrl}api/firearms`, "milling-types"];
1989
+ }
1990
+ }
1991
+ FirearmMillingTypeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmMillingTypeService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
1992
+ FirearmMillingTypeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmMillingTypeService, providedIn: "root" });
1993
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmMillingTypeService, decorators: [{
1994
+ type: Injectable,
1995
+ args: [{
1996
+ providedIn: "root",
1997
+ }]
1998
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1999
+ type: Inject,
2000
+ args: ["env"]
2001
+ }] }]; } });
2002
+
1964
2003
  class PhonePipe {
1965
2004
  transform(value, args) {
1966
2005
  if (value && value.length >= 10) {
@@ -2473,5 +2512,5 @@ var NotificationType;
2473
2512
  * Generated bundle index. Do not edit.
2474
2513
  */
2475
2514
 
2476
- export { BaseService, BundleItem, ChangeOrderPackageDetail, ChangeOrderStatus, Coating, CoatingService, CoatingValue, CoatingValueService, Configuration, ConfigurationService, Customer, CustomerService, Dealer, DealerContact, DealerCoupon, DealerService, DisableControlDirective, EnumPipe, FileNamePipe, FileUploadService, FilterOptions, FinishDateHelperService, Firearm, FirearmOptic, FirearmOpticService, FirearmService, FirearmSightService, FormErrorMessageComponent, FrameMaterial, FrameMaterialPipe, GunCaliber, GunPart, GunPartOption, GunPartService, InventoryItem, InventoryService, JFile, Material, MaterialService, MillingDetail, MillingItem, MillingType, MillingTypeService, ModalHeaderComponent, MountType, MountTypeService, NewLinePipe, NotificationBarComponent, NotificationModule, NotificationService, NotificationType, Optic, OpticService, OpticSight, OpticStatus, Package, PackageItem, PackageOptionalItem, PackageOptionalItemService, PackageSelectorComponent, PackageService, PackageTotal, PackageVariation, PackageVariationOption, PackageVariationService, PhonePipe, Product, ProductService, ProjectType, PurchaseOrder, PurchaseOrderRefinishItem, PurchaseOrderService, PurchaseOrderStatus, QuickbooksService, RearSightPosition, RefinishCode, RefinishCodeService, RefinishDetail, ReportMillingItem, ReportRefinishItem, SharedModule, ShieldRMSOptions, Sight, SightMaterialService, SightMaterialType, SightService, SightType, SightTypeEnum, SightTypeService, SlideAddon, SlideAddonService, State, StateService, StatusHistoryService, Total, TotalItem, TotalsService, UserService, Vendor, VendorContact, VendorService, WaitlistAction, WaitlistCustomerService, WaitlistGun, WaitlistGunPackageDetail, WaitlistHistory, WaitlistItem, WaitlistProjectService, WaitlistService, WaitlistStatus, WorkChangeOrder, WorkHoliday, WorkHolidayService, WorkOrder, WorkOrderAction, WorkOrderDiscount, WorkOrderDiscountService, WorkOrderHistory, WorkOrderInventoryItem, WorkOrderListItem, WorkOrderNonInventoryItem, WorkOrderNonInventoryItemService, WorkOrderPackageDetail, WorkOrderRefinishItem, WorkOrderService, WorkOrderShippingItem, WorkOrderShippingItemService, WorkOrderStatus, WorkOrderType, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
2515
+ export { BaseService, BundleItem, ChangeOrderPackageDetail, ChangeOrderStatus, Coating, CoatingService, CoatingValue, CoatingValueService, Configuration, ConfigurationService, Customer, CustomerService, Dealer, DealerContact, DealerCoupon, DealerService, DisableControlDirective, EnumPipe, FileNamePipe, FileUploadService, FilterOptions, FinishDateHelperService, Firearm, FirearmMillingTypeService, FirearmOptic, FirearmOpticService, FirearmService, FirearmSightService, FormErrorMessageComponent, FrameMaterial, FrameMaterialPipe, GunCaliber, GunPart, GunPartOption, GunPartService, InventoryItem, InventoryService, JFile, Material, MaterialService, MillingDetail, MillingItem, MillingType, MillingTypeAddon, MillingTypeAddonOption, MillingTypeAddonService, MillingTypeService, ModalHeaderComponent, MountType, MountTypeService, NewLinePipe, NotificationBarComponent, NotificationModule, NotificationService, NotificationType, Optic, OpticService, OpticSight, OpticStatus, Package, PackageItem, PackageOptionalItem, PackageOptionalItemService, PackageSelectorComponent, PackageService, PackageTotal, PackageVariation, PackageVariationOption, PackageVariationService, PhonePipe, Product, ProductService, ProjectType, PurchaseOrder, PurchaseOrderRefinishItem, PurchaseOrderService, PurchaseOrderStatus, QuickbooksService, RearSightPosition, RefinishCode, RefinishCodeService, RefinishDetail, ReportMillingItem, ReportRefinishItem, SharedModule, ShieldRMSOptions, Sight, SightMaterialService, SightMaterialType, SightService, SightType, SightTypeEnum, SightTypeService, SlideAddon, SlideAddonService, State, StateService, StatusHistoryService, Total, TotalItem, TotalsService, UserService, Vendor, VendorContact, VendorService, WaitlistAction, WaitlistCustomerService, WaitlistGun, WaitlistGunPackageDetail, WaitlistHistory, WaitlistItem, WaitlistProjectService, WaitlistService, WaitlistStatus, WorkChangeOrder, WorkHoliday, WorkHolidayService, WorkOrder, WorkOrderAction, WorkOrderDiscount, WorkOrderDiscountService, WorkOrderHistory, WorkOrderInventoryItem, WorkOrderListItem, WorkOrderNonInventoryItem, WorkOrderNonInventoryItemService, WorkOrderPackageDetail, WorkOrderRefinishItem, WorkOrderService, WorkOrderShippingItem, WorkOrderShippingItemService, WorkOrderStatus, WorkOrderType, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
2477
2516
  //# sourceMappingURL=gunsmith-common.mjs.map