1/// <reference path="./base-service.ts" /> 2var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 3 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 4 return new (P || (P = Promise))(function (resolve, reject) { 5 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 6 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 7 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 8 step((generator = generator.apply(thisArg, _arguments || [])).next()); 9 }); 10}; 11var __generator = (this && this.__generator) || function (thisArg, body) { 12 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); 13 return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; 14 function verb(n) { return function (v) { return step([n, v]); }; } 15 function step(op) { 16 if (f) throw new TypeError("Generator is already executing."); 17 while (g && (g = 0, op[0] && (_ = 0)), _) try { 18 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; 19 if (y = 0, t) op = [op[0] & 2, t.value]; 20 switch (op[0]) { 21 case 0: case 1: t = op; break; 22 case 4: _.label++; return { value: op[1], done: false }; 23 case 5: _.label++; y = op[1]; op = [0]; continue; 24 case 7: op = _.ops.pop(); _.trys.pop(); continue; 25 default: 26 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } 27 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } 28 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } 29 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } 30 if (t[2]) _.ops.pop(); 31 _.trys.pop(); continue; 32 } 33 op = body.call(thisArg, _); 34 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } 35 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; 36 } 37}; 38var AppServices; 39(function (AppServices) { 40 var ProfessionalService = /** @class */ (function () { 41 function ProfessionalService() { 42 this.baseUrl = '/api/professional/'; 43 this._api = null; 44 this._api = new BaseService.ApiService(); 45 } 46 ProfessionalService.prototype.GetProfessionals = function (payload) { 47 return __awaiter(this, void 0, void 0, function () { 48 var url, result, error_1; 49 return __generator(this, function (_a) { 50 switch (_a.label) { 51 case 0: 52 url = this.baseUrl + "GetProfessionals"; 53 _a.label = 1; 54 case 1: 55 _a.trys.push([1, 3, , 4]); 56 return [4 /*yield*/, this._api.post(url, payload)]; 57 case 2: 58 result = _a.sent(); 59 return [2 /*return*/, result.data]; 60 case 3: 61 error_1 = _a.sent(); 62 return [2 /*return*/, { 63 successful: false, 64 errorMessage: error_1.response, 65 }]; 66 case 4: return [2 /*return*/]; 67 } 68 }); 69 }); 70 }; 71 ProfessionalService.prototype.GetVenues = function (payload) { 72 return __awaiter(this, void 0, void 0, function () { 73 var url, result, error_2; 74 return __generator(this, function (_a) { 75 switch (_a.label) { 76 case 0: 77 url = this.baseUrl + "GetVenues"; 78 _a.label = 1; 79 case 1: 80 _a.trys.push([1, 3, , 4]); 81 return [4 /*yield*/, this._api.post(url, payload)]; 82 case 2: 83 result = _a.sent(); 84 return [2 /*return*/, result.data]; 85 case 3: 86 error_2 = _a.sent(); 87 return [2 /*return*/, { 88 successful: false, 89 errorMessage: error_2.response, 90 }]; 91 case 4: return [2 /*return*/]; 92 } 93 }); 94 }); 95 }; 96 ProfessionalService.prototype.GetAllRegion = function () { 97 return __awaiter(this, void 0, void 0, function () { 98 var url, result, error_3; 99 return __generator(this, function (_a) { 100 switch (_a.label) { 101 case 0: 102 url = this.baseUrl + "GetAllRegion"; 103 _a.label = 1; 104 case 1: 105 _a.trys.push([1, 3, , 4]); 106 return [4 /*yield*/, this._api.get(url)]; 107 case 2: 108 result = _a.sent(); 109 return [2 /*return*/, result.data]; 110 case 3: 111 error_3 = _a.sent(); 112 return [2 /*return*/, { 113 successful: false, 114 errorMessage: error_3.response, 115 }]; 116 case 4: return [2 /*return*/]; 117 } 118 }); 119 }); 120 }; 121 ProfessionalService.prototype.GetCoachProfileDetails = function (formData) { 122 return __awaiter(this, void 0, void 0, function () { 123 var url, result, e_1; 124 return __generator(this, function (_a) { 125 switch (_a.label) { 126 case 0: 127 url = this.baseUrl + "GetCoachProfileDetails"; 128 _a.label = 1; 129 case 1: 130 _a.trys.push([1, 3, , 4]); 131 return [4 /*yield*/, this._api.post(url, formData)]; 132 case 2: 133 result = _a.sent(); 134 return [2 /*return*/, result.data]; 135 case 3: 136 e_1 = _a.sent(); 137 return [2 /*return*/, { 138 successful: false, 139 errorMessage: e_1.response, 140 }]; 141 case 4: return [2 /*return*/]; 142 } 143 }); 144 }); 145 }; 146 ProfessionalService.prototype.GetPlayerList = function (formData) { 147 return __awaiter(this, void 0, void 0, function () { 148 var url, result, e_2; 149 return __generator(this, function (_a) { 150 switch (_a.label) { 151 case 0: 152 url = this.baseUrl + "GetPlayerList"; 153 _a.label = 1; 154 case 1: 155 _a.trys.push([1, 3, , 4]); 156 return [4 /*yield*/, this._api.post(url, formData)]; 157 case 2: 158 result = _a.sent(); 159 return [2 /*return*/, result.data]; 160 case 3: 161 e_2 = _a.sent(); 162 return [2 /*return*/, { 163 successful: false, 164 errorMessage: e_2.response, 165 }]; 166 case 4: return [2 /*return*/]; 167 } 168 }); 169 }); 170 }; 171 ProfessionalService.prototype.GetCoachByCategory = function (formData) { 172 return __awaiter(this, void 0, void 0, function () { 173 var url, result, error_4; 174 return __generator(this, function (_a) { 175 switch (_a.label) { 176 case 0: 177 url = this.baseUrl + "GetCoachByCategory"; 178 _a.label = 1; 179 case 1: 180 _a.trys.push([1, 3, , 4]); 181 return [4 /*yield*/, this._api.post(url, formData)]; 182 case 2: 183 result = _a.sent(); 184 return [2 /*return*/, result.data]; 185 case 3: 186 error_4 = _a.sent(); 187 return [2 /*return*/, { 188 successful: false, 189 errorMessage: error_4.response, 190 }]; 191 case 4: return [2 /*return*/]; 192 } 193 }); 194 }); 195 }; 196 ProfessionalService.prototype.GetCoachByRegion = function (formData) { 197 return __awaiter(this, void 0, void 0, function () { 198 var url, result, error_5; 199 return __generator(this, function (_a) { 200 switch (_a.label) { 201 case 0: 202 url = this.baseUrl + "GetCoachByRegion"; 203 _a.label = 1; 204 case 1: 205 _a.trys.push([1, 3, , 4]); 206 return [4 /*yield*/, this._api.post(url, formData)]; 207 case 2: 208 result = _a.sent(); 209 return [2 /*return*/, result.data]; 210 case 3: 211 error_5 = _a.sent(); 212 return [2 /*return*/, { 213 successful: false, 214 errorMessage: error_5.response, 215 }]; 216 case 4: return [2 /*return*/]; 217 } 218 }); 219 }); 220 }; 221 ProfessionalService.prototype.GetCoachByFilter = function (formData) { 222 return __awaiter(this, void 0, void 0, function () { 223 var url, result, error_6; 224 return __generator(this, function (_a) { 225 switch (_a.label) { 226 case 0: 227 url = this.baseUrl + "GetCoachByFilter"; 228 _a.label = 1; 229 case 1: 230 _a.trys.push([1, 3, , 4]); 231 return [4 /*yield*/, this._api.post(url, formData)]; 232 case 2: 233 result = _a.sent(); 234 return [2 /*return*/, result.data]; 235 case 3: 236 error_6 = _a.sent(); 237 return [2 /*return*/, { 238 successful: false, 239 errorMessage: error_6.response, 240 }]; 241 case 4: return [2 /*return*/]; 242 } 243 }); 244 }); 245 }; 246 ProfessionalService.prototype.GetProGolfServices = function (payload) { 247 return __awaiter(this, void 0, void 0, function () { 248 var url, result, error_7; 249 return __generator(this, function (_a) { 250 switch (_a.label) { 251 case 0: 252 url = this.baseUrl + "GetProGolfServices"; 253 _a.label = 1; 254 case 1: 255 _a.trys.push([1, 3, , 4]); 256 return [4 /*yield*/, this._api.get(url, { 257 filterHeadings: payload, 258 })]; 259 case 2: 260 result = _a.sent(); 261 return [2 /*return*/, result.data]; 262 case 3: 263 error_7 = _a.sent(); 264 return [2 /*return*/, { 265 successful: false, 266 errorMessage: error_7.response, 267 }]; 268 case 4: return [2 /*return*/]; 269 } 270 }); 271 }); 272 }; 273 ProfessionalService.prototype.GetProfessionalsByVenueId = function (venueId) { 274 return __awaiter(this, void 0, void 0, function () { 275 var url, result, error_8; 276 return __generator(this, function (_a) { 277 switch (_a.label) { 278 case 0: 279 url = this.baseUrl + "GetProfessionalsByVenueId"; 280 _a.label = 1; 281 case 1: 282 _a.trys.push([1, 3, , 4]); 283 return [4 /*yield*/, this._api.get(url, { 284 venueId: venueId 285 })]; 286 case 2: 287 result = _a.sent(); 288 return [2 /*return*/, result.data]; 289 case 3: 290 error_8 = _a.sent(); 291 return [2 /*return*/, { 292 successful: false, 293 errorMessage: error_8.response, 294 }]; 295 case 4: return [2 /*return*/]; 296 } 297 }); 298 }); 299 }; 300 ProfessionalService.prototype.GetProfessionalsByClubIdOrAlias = function (clubId, clubAlias) { 301 return __awaiter(this, void 0, void 0, function () { 302 var url, result, error_9; 303 return __generator(this, function (_a) { 304 switch (_a.label) { 305 case 0: 306 url = this.baseUrl + "GetProfessionalsByClubIdOrAlias"; 307 _a.label = 1; 308 case 1: 309 _a.trys.push([1, 3, , 4]); 310 return [4 /*yield*/, this._api.get(url, { 311 clubId: clubId, 312 clubAlias: clubAlias, 313 })]; 314 case 2: 315 result = _a.sent(); 316 return [2 /*return*/, result.data]; 317 case 3: 318 error_9 = _a.sent(); 319 return [2 /*return*/, { 320 successful: false, 321 errorMessage: error_9.response, 322 }]; 323 case 4: return [2 /*return*/]; 324 } 325 }); 326 }); 327 }; 328 return ProfessionalService; 329 }()); 330 AppServices.ProfessionalService = ProfessionalService; 331})(AppServices || (AppServices = {}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.