gunsmith-common 2.3.8 → 2.3.10
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/esm2020/shared/services/dealer.service.mjs +13 -27
- package/esm2020/shared/services/sight.service.mjs +4 -1
- package/esm2020/shared/services/waitlist.service.mjs +23 -15
- package/esm2020/shared/types/configuration.mjs +1 -1
- package/esm2020/shared/types/dealer.mjs +1 -1
- package/esm2020/shared/types/firearm-optic.mjs +2 -1
- package/esm2020/shared/types/index.mjs +2 -1
- package/esm2020/shared/types/milling-detail.mjs +2 -1
- package/esm2020/shared/types/optic-report-item.mjs +1 -1
- package/esm2020/shared/types/sight-report-item.mjs +2 -0
- package/esm2020/shared/types/waitlist-status.mjs +2 -1
- package/fesm2015/gunsmith-common.mjs +39 -40
- package/fesm2015/gunsmith-common.mjs.map +1 -1
- package/fesm2020/gunsmith-common.mjs +39 -40
- package/fesm2020/gunsmith-common.mjs.map +1 -1
- package/gunsmith-common-2.3.10.tgz +0 -0
- package/package.json +1 -1
- package/shared/services/dealer.service.d.ts +5 -9
- package/shared/services/sight.service.d.ts +3 -1
- package/shared/services/waitlist.service.d.ts +2 -0
- package/shared/types/configuration.d.ts +1 -0
- package/shared/types/dealer.d.ts +1 -0
- package/shared/types/firearm-optic.d.ts +1 -0
- package/shared/types/index.d.ts +1 -0
- package/shared/types/milling-detail.d.ts +1 -0
- package/shared/types/optic-report-item.d.ts +2 -0
- package/shared/types/sight-report-item.d.ts +10 -0
- package/shared/types/waitlist-status.d.ts +2 -1
- package/gunsmith-common-2.3.8.tgz +0 -0
|
@@ -168,6 +168,7 @@ var WaitlistStatus;
|
|
|
168
168
|
WaitlistStatus[WaitlistStatus["Voided"] = 10] = "Voided";
|
|
169
169
|
WaitlistStatus[WaitlistStatus["Pending"] = 11] = "Pending";
|
|
170
170
|
WaitlistStatus[WaitlistStatus["Rejected"] = 12] = "Rejected";
|
|
171
|
+
WaitlistStatus[WaitlistStatus["NewInBoxPending"] = 13] = "NewInBoxPending";
|
|
171
172
|
})(WaitlistStatus || (WaitlistStatus = {}));
|
|
172
173
|
|
|
173
174
|
var WorkOrderType;
|
|
@@ -306,6 +307,7 @@ class MillingDetail {
|
|
|
306
307
|
this.millingAddons = [];
|
|
307
308
|
this.barrelCrown = false;
|
|
308
309
|
this.bushingInstallation = false;
|
|
310
|
+
this.weightReduction = false;
|
|
309
311
|
this.opticPulled = false;
|
|
310
312
|
}
|
|
311
313
|
}
|
|
@@ -508,6 +510,7 @@ class FirearmOptic {
|
|
|
508
510
|
this.rearSights = [];
|
|
509
511
|
this.keepDovetail = false;
|
|
510
512
|
this.removeDovetail = false;
|
|
513
|
+
this.weightReduction = false;
|
|
511
514
|
this.active = true;
|
|
512
515
|
}
|
|
513
516
|
}
|
|
@@ -1013,45 +1016,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1013
1016
|
args: ['env']
|
|
1014
1017
|
}] }]; } });
|
|
1015
1018
|
|
|
1016
|
-
class DealerService {
|
|
1019
|
+
class DealerService extends BaseService {
|
|
1017
1020
|
constructor(http, env) {
|
|
1021
|
+
super(http);
|
|
1018
1022
|
this.http = http;
|
|
1019
1023
|
this.env = env;
|
|
1020
|
-
this.
|
|
1021
|
-
}
|
|
1022
|
-
readDealers(includeInactive = false) {
|
|
1023
|
-
return this.http.get(this.url, {
|
|
1024
|
-
params: {
|
|
1025
|
-
includeInactive: includeInactive.toString()
|
|
1026
|
-
}
|
|
1027
|
-
});
|
|
1028
|
-
}
|
|
1029
|
-
readDealer(id) {
|
|
1030
|
-
return this.http.get(`${this.url}/${id}`);
|
|
1031
|
-
}
|
|
1032
|
-
createDealer(dealer) {
|
|
1033
|
-
return this.http.post(this.url, dealer);
|
|
1034
|
-
}
|
|
1035
|
-
updateDealer(id, dealer) {
|
|
1036
|
-
return this.http.put(`${this.url}/${id}`, dealer);
|
|
1037
|
-
}
|
|
1038
|
-
deleteDealer(id) {
|
|
1039
|
-
return this.http.delete(`${this.url}/${id}`);
|
|
1024
|
+
this.urlSegments = [`${this.env.baseUrl}api/dealers`];
|
|
1040
1025
|
}
|
|
1041
1026
|
updateDealerCoupon(dealerId, couponId, dealerCoupon) {
|
|
1042
|
-
return this.http.put(`${this.
|
|
1027
|
+
return this.http.put(`${this.getUrl(dealerId)}/coupons/${couponId}`, dealerCoupon);
|
|
1028
|
+
}
|
|
1029
|
+
sendExpiredEmail() {
|
|
1030
|
+
return this.http.get(`${this.getUrl()}/expired-email`);
|
|
1043
1031
|
}
|
|
1044
1032
|
}
|
|
1045
|
-
DealerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, deps: [{ token: i1.HttpClient }, { token:
|
|
1046
|
-
DealerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, providedIn:
|
|
1033
|
+
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 });
|
|
1034
|
+
DealerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, providedIn: "root" });
|
|
1047
1035
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, decorators: [{
|
|
1048
1036
|
type: Injectable,
|
|
1049
1037
|
args: [{
|
|
1050
|
-
providedIn:
|
|
1038
|
+
providedIn: "root",
|
|
1051
1039
|
}]
|
|
1052
1040
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1053
1041
|
type: Inject,
|
|
1054
|
-
args: [
|
|
1042
|
+
args: ["env"]
|
|
1055
1043
|
}] }]; } });
|
|
1056
1044
|
|
|
1057
1045
|
class FileUploadService {
|
|
@@ -1086,33 +1074,33 @@ class WaitlistService {
|
|
|
1086
1074
|
constructor(http, env) {
|
|
1087
1075
|
this.http = http;
|
|
1088
1076
|
this.env = env;
|
|
1089
|
-
this.url = this.env.baseUrl +
|
|
1077
|
+
this.url = this.env.baseUrl + "api/waitlist-items";
|
|
1090
1078
|
}
|
|
1091
1079
|
retrieveWaitlistItems(statuses = null, id = null, customerName = null, customerEmail = null, serialNumber = null, workOrderTypes = null, projectTypes = null) {
|
|
1092
1080
|
const params = {};
|
|
1093
1081
|
if (statuses) {
|
|
1094
|
-
params[
|
|
1082
|
+
params["statuses"] = statuses.map((status) => status.toString());
|
|
1095
1083
|
}
|
|
1096
1084
|
if (id) {
|
|
1097
|
-
params[
|
|
1085
|
+
params["id"] = id.toString();
|
|
1098
1086
|
}
|
|
1099
1087
|
if (customerName) {
|
|
1100
|
-
params[
|
|
1088
|
+
params["customerName"] = customerName;
|
|
1101
1089
|
}
|
|
1102
1090
|
if (customerEmail) {
|
|
1103
|
-
params[
|
|
1091
|
+
params["customerEmail"] = customerEmail;
|
|
1104
1092
|
}
|
|
1105
1093
|
if (serialNumber) {
|
|
1106
|
-
params[
|
|
1094
|
+
params["serialNumber"] = serialNumber;
|
|
1107
1095
|
}
|
|
1108
1096
|
if (workOrderTypes) {
|
|
1109
|
-
params[
|
|
1097
|
+
params["workOrderTypes"] = workOrderTypes.map((t) => t.toString());
|
|
1110
1098
|
}
|
|
1111
1099
|
if (projectTypes) {
|
|
1112
|
-
params[
|
|
1100
|
+
params["projectTypes"] = projectTypes.map((t) => t.toString());
|
|
1113
1101
|
}
|
|
1114
1102
|
return this.http.get(this.url, {
|
|
1115
|
-
params: params
|
|
1103
|
+
params: params,
|
|
1116
1104
|
});
|
|
1117
1105
|
}
|
|
1118
1106
|
retrieveWaitlistItem(id) {
|
|
@@ -1133,8 +1121,16 @@ class WaitlistService {
|
|
|
1133
1121
|
}
|
|
1134
1122
|
return this.http.get(`${this.url}/${id}/actions/${actionId}`);
|
|
1135
1123
|
}
|
|
1124
|
+
sendNIBEmail(id) {
|
|
1125
|
+
return this.http.get(`${this.url}/${id}/send-nib-email`);
|
|
1126
|
+
}
|
|
1127
|
+
sendNIBReminderEmails() {
|
|
1128
|
+
return this.http.get(`${this.url}/send-nib-reminder-emails`);
|
|
1129
|
+
}
|
|
1136
1130
|
retrieveProjectPdf(id, projectId) {
|
|
1137
|
-
return this.http.get(`${this.url}/${id}/projects/${projectId}/pdf`, {
|
|
1131
|
+
return this.http.get(`${this.url}/${id}/projects/${projectId}/pdf`, {
|
|
1132
|
+
responseType: "blob",
|
|
1133
|
+
});
|
|
1138
1134
|
}
|
|
1139
1135
|
retrieveProjects(waitlistId) {
|
|
1140
1136
|
return this.http.get(`${this.url}/${waitlistId}/projects`);
|
|
@@ -1158,16 +1154,16 @@ class WaitlistService {
|
|
|
1158
1154
|
return this.http.get(`${this.url}/trigger-update`);
|
|
1159
1155
|
}
|
|
1160
1156
|
}
|
|
1161
|
-
WaitlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WaitlistService, deps: [{ token: i1.HttpClient }, { token:
|
|
1162
|
-
WaitlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WaitlistService, providedIn:
|
|
1157
|
+
WaitlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WaitlistService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1158
|
+
WaitlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WaitlistService, providedIn: "root" });
|
|
1163
1159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WaitlistService, decorators: [{
|
|
1164
1160
|
type: Injectable,
|
|
1165
1161
|
args: [{
|
|
1166
|
-
providedIn:
|
|
1162
|
+
providedIn: "root",
|
|
1167
1163
|
}]
|
|
1168
1164
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1169
1165
|
type: Inject,
|
|
1170
|
-
args: [
|
|
1166
|
+
args: ["env"]
|
|
1171
1167
|
}] }]; } });
|
|
1172
1168
|
|
|
1173
1169
|
class ConfigurationService {
|
|
@@ -1731,6 +1727,9 @@ class SightService extends BaseService {
|
|
|
1731
1727
|
this.env = env;
|
|
1732
1728
|
this.urlSegments = [`${this.env.baseUrl}api/sights`];
|
|
1733
1729
|
}
|
|
1730
|
+
getSightReport() {
|
|
1731
|
+
return this.http.get(`${this.env.baseUrl}api/sights/report`);
|
|
1732
|
+
}
|
|
1734
1733
|
}
|
|
1735
1734
|
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 });
|
|
1736
1735
|
SightService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SightService, providedIn: 'root' });
|