@joao.sumi/qdule 0.0.3 → 0.0.5

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/dist/api.js CHANGED
@@ -84,7 +84,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
84
84
  return to.concat(ar || Array.prototype.slice.call(from));
85
85
  };
86
86
  Object.defineProperty(exports, "__esModule", { value: true });
87
- exports.WorkScheduleResourceApi = exports.WorkScheduleResourceApiFactory = exports.WorkScheduleResourceApiFp = exports.WorkScheduleResourceApiAxiosParamCreator = exports.UserResourceApi = exports.UserResourceApiFactory = exports.UserResourceApiFp = exports.UserResourceApiAxiosParamCreator = exports.TreatmentResourceApi = exports.TreatmentResourceApiFactory = exports.TreatmentResourceApiFp = exports.TreatmentResourceApiAxiosParamCreator = exports.ShiftResourceApi = exports.ShiftResourceApiFactory = exports.ShiftResourceApiFp = exports.ShiftResourceApiAxiosParamCreator = exports.ScheduleResourceApi = exports.ScheduleResourceApiFactory = exports.ScheduleResourceApiFp = exports.ScheduleResourceApiAxiosParamCreator = exports.ClientResourceApi = exports.ClientResourceApiFactory = exports.ClientResourceApiFp = exports.ClientResourceApiAxiosParamCreator = exports.ChangelogResourceApi = exports.ChangelogResourceApiFactory = exports.ChangelogResourceApiFp = exports.ChangelogResourceApiAxiosParamCreator = exports.AuthResourceApi = exports.AuthResourceApiFactory = exports.AuthResourceApiFp = exports.AuthResourceApiAxiosParamCreator = exports.TreatmentStatus = exports.ScheduleStatus = exports.DayOfWeek = void 0;
87
+ exports.UserResourceApi = exports.UserResourceApiFactory = exports.UserResourceApiFp = exports.UserResourceApiAxiosParamCreator = exports.TreatmentResourceApi = exports.TreatmentResourceApiFactory = exports.TreatmentResourceApiFp = exports.TreatmentResourceApiAxiosParamCreator = exports.ShiftResourceApi = exports.ShiftResourceApiFactory = exports.ShiftResourceApiFp = exports.ShiftResourceApiAxiosParamCreator = exports.ScheduleResourceApi = exports.ScheduleResourceApiFactory = exports.ScheduleResourceApiFp = exports.ScheduleResourceApiAxiosParamCreator = exports.ClientResourceApi = exports.ClientResourceApiFactory = exports.ClientResourceApiFp = exports.ClientResourceApiAxiosParamCreator = exports.ChangelogResourceApi = exports.ChangelogResourceApiFactory = exports.ChangelogResourceApiFp = exports.ChangelogResourceApiAxiosParamCreator = exports.AuthResourceApi = exports.AuthResourceApiFactory = exports.AuthResourceApiFp = exports.AuthResourceApiAxiosParamCreator = exports.TreatmentType = exports.TreatmentStatus = exports.ShiftStatus = exports.ScheduleStatus = exports.DayOfWeek = void 0;
88
88
  var axios_1 = require("axios");
89
89
  // Some imports not used depending on template conditions
90
90
  // @ts-ignore
@@ -107,10 +107,19 @@ exports.ScheduleStatus = {
107
107
  Pending: 'PENDING',
108
108
  Canceled: 'CANCELED',
109
109
  };
110
+ exports.ShiftStatus = {
111
+ Enabled: 'ENABLED',
112
+ Disabled: 'DISABLED',
113
+ };
110
114
  exports.TreatmentStatus = {
111
115
  Active: 'ACTIVE',
112
116
  Inactive: 'INACTIVE',
113
117
  };
118
+ exports.TreatmentType = {
119
+ Facial: 'FACIAL',
120
+ Body: 'BODY',
121
+ MassageTherapy: 'MASSAGE_THERAPY',
122
+ };
114
123
  /**
115
124
  * AuthResourceApi - axios parameter creator
116
125
  */
@@ -1104,20 +1113,27 @@ var ScheduleResourceApiAxiosParamCreator = function (configuration) {
1104
1113
  /**
1105
1114
  *
1106
1115
  * @summary Get Schedules
1107
- * @param {number} [page]
1108
- * @param {number} [size]
1116
+ * @param {number} page
1117
+ * @param {number} size
1118
+ * @param {string} [start]
1119
+ * @param {string} [end]
1120
+ * @param {ScheduleStatus} [status]
1109
1121
  * @param {*} [options] Override http request option.
1110
1122
  * @throws {RequiredError}
1111
1123
  */
1112
- schedulesGet: function (page_1, size_1) {
1124
+ schedulesGet: function (page_1, size_1, start_1, end_1, status_1) {
1113
1125
  var args_1 = [];
1114
- for (var _i = 2; _i < arguments.length; _i++) {
1115
- args_1[_i - 2] = arguments[_i];
1126
+ for (var _i = 5; _i < arguments.length; _i++) {
1127
+ args_1[_i - 5] = arguments[_i];
1116
1128
  }
1117
- return __awaiter(_this, __spreadArray([page_1, size_1], args_1, true), void 0, function (page, size, options) {
1129
+ return __awaiter(_this, __spreadArray([page_1, size_1, start_1, end_1, status_1], args_1, true), void 0, function (page, size, start, end, status, options) {
1118
1130
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1119
1131
  if (options === void 0) { options = {}; }
1120
1132
  return __generator(this, function (_a) {
1133
+ // verify required parameter 'page' is not null or undefined
1134
+ (0, common_1.assertParamExists)('schedulesGet', 'page', page);
1135
+ // verify required parameter 'size' is not null or undefined
1136
+ (0, common_1.assertParamExists)('schedulesGet', 'size', size);
1121
1137
  localVarPath = "/schedules";
1122
1138
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1123
1139
  if (configuration) {
@@ -1132,6 +1148,19 @@ var ScheduleResourceApiAxiosParamCreator = function (configuration) {
1132
1148
  if (size !== undefined) {
1133
1149
  localVarQueryParameter['size'] = size;
1134
1150
  }
1151
+ if (start !== undefined) {
1152
+ localVarQueryParameter['start'] = (start instanceof Date) ?
1153
+ start.toISOString() :
1154
+ start;
1155
+ }
1156
+ if (end !== undefined) {
1157
+ localVarQueryParameter['end'] = (end instanceof Date) ?
1158
+ end.toISOString() :
1159
+ end;
1160
+ }
1161
+ if (status !== undefined) {
1162
+ localVarQueryParameter['status'] = status;
1163
+ }
1135
1164
  localVarHeaderParameter['Accept'] = 'application/json';
1136
1165
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1137
1166
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -1297,36 +1326,26 @@ var ScheduleResourceApiAxiosParamCreator = function (configuration) {
1297
1326
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1298
1327
  if (options === void 0) { options = {}; }
1299
1328
  return __generator(this, function (_a) {
1300
- switch (_a.label) {
1301
- case 0:
1302
- // verify required parameter 'scheduleCreateRequest' is not null or undefined
1303
- (0, common_1.assertParamExists)('schedulesPost', 'scheduleCreateRequest', scheduleCreateRequest);
1304
- localVarPath = "/schedules";
1305
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1306
- if (configuration) {
1307
- baseOptions = configuration.baseOptions;
1308
- }
1309
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1310
- localVarHeaderParameter = {};
1311
- localVarQueryParameter = {};
1312
- // authentication SecurityScheme required
1313
- // http bearer authentication required
1314
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1315
- case 1:
1316
- // authentication SecurityScheme required
1317
- // http bearer authentication required
1318
- _a.sent();
1319
- localVarHeaderParameter['Content-Type'] = 'application/json';
1320
- localVarHeaderParameter['Accept'] = 'application/json';
1321
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1322
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1323
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1324
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(scheduleCreateRequest, localVarRequestOptions, configuration);
1325
- return [2 /*return*/, {
1326
- url: (0, common_1.toPathString)(localVarUrlObj),
1327
- options: localVarRequestOptions,
1328
- }];
1329
+ // verify required parameter 'scheduleCreateRequest' is not null or undefined
1330
+ (0, common_1.assertParamExists)('schedulesPost', 'scheduleCreateRequest', scheduleCreateRequest);
1331
+ localVarPath = "/schedules";
1332
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1333
+ if (configuration) {
1334
+ baseOptions = configuration.baseOptions;
1329
1335
  }
1336
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1337
+ localVarHeaderParameter = {};
1338
+ localVarQueryParameter = {};
1339
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1340
+ localVarHeaderParameter['Accept'] = 'application/json';
1341
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1342
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1343
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1344
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(scheduleCreateRequest, localVarRequestOptions, configuration);
1345
+ return [2 /*return*/, {
1346
+ url: (0, common_1.toPathString)(localVarUrlObj),
1347
+ options: localVarRequestOptions,
1348
+ }];
1330
1349
  });
1331
1350
  });
1332
1351
  },
@@ -1342,18 +1361,21 @@ var ScheduleResourceApiFp = function (configuration) {
1342
1361
  /**
1343
1362
  *
1344
1363
  * @summary Get Schedules
1345
- * @param {number} [page]
1346
- * @param {number} [size]
1364
+ * @param {number} page
1365
+ * @param {number} size
1366
+ * @param {string} [start]
1367
+ * @param {string} [end]
1368
+ * @param {ScheduleStatus} [status]
1347
1369
  * @param {*} [options] Override http request option.
1348
1370
  * @throws {RequiredError}
1349
1371
  */
1350
- schedulesGet: function (page, size, options) {
1372
+ schedulesGet: function (page, size, start, end, status, options) {
1351
1373
  return __awaiter(this, void 0, void 0, function () {
1352
1374
  var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1353
1375
  var _a, _b, _c;
1354
1376
  return __generator(this, function (_d) {
1355
1377
  switch (_d.label) {
1356
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.schedulesGet(page, size, options)];
1378
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.schedulesGet(page, size, start, end, status, options)];
1357
1379
  case 1:
1358
1380
  localVarAxiosArgs = _d.sent();
1359
1381
  localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
@@ -1473,8 +1495,7 @@ var ScheduleResourceApiFactory = function (configuration, basePath, axios) {
1473
1495
  * @throws {RequiredError}
1474
1496
  */
1475
1497
  schedulesGet: function (requestParameters, options) {
1476
- if (requestParameters === void 0) { requestParameters = {}; }
1477
- return localVarFp.schedulesGet(requestParameters.page, requestParameters.size, options).then(function (request) { return request(axios, basePath); });
1498
+ return localVarFp.schedulesGet(requestParameters.page, requestParameters.size, requestParameters.start, requestParameters.end, requestParameters.status, options).then(function (request) { return request(axios, basePath); });
1478
1499
  },
1479
1500
  /**
1480
1501
  *
@@ -1536,8 +1557,7 @@ var ScheduleResourceApi = /** @class */ (function (_super) {
1536
1557
  */
1537
1558
  ScheduleResourceApi.prototype.schedulesGet = function (requestParameters, options) {
1538
1559
  var _this = this;
1539
- if (requestParameters === void 0) { requestParameters = {}; }
1540
- return (0, exports.ScheduleResourceApiFp)(this.configuration).schedulesGet(requestParameters.page, requestParameters.size, options).then(function (request) { return request(_this.axios, _this.basePath); });
1560
+ return (0, exports.ScheduleResourceApiFp)(this.configuration).schedulesGet(requestParameters.page, requestParameters.size, requestParameters.start, requestParameters.end, requestParameters.status, options).then(function (request) { return request(_this.axios, _this.basePath); });
1541
1561
  };
1542
1562
  /**
1543
1563
  *
@@ -2098,15 +2118,16 @@ var TreatmentResourceApiAxiosParamCreator = function (configuration) {
2098
2118
  * @summary Get Treatments
2099
2119
  * @param {number} [page]
2100
2120
  * @param {number} [size]
2121
+ * @param {TreatmentType} [type]
2101
2122
  * @param {*} [options] Override http request option.
2102
2123
  * @throws {RequiredError}
2103
2124
  */
2104
- treatmentsGet: function (page_1, size_1) {
2125
+ treatmentsGet: function (page_1, size_1, type_1) {
2105
2126
  var args_1 = [];
2106
- for (var _i = 2; _i < arguments.length; _i++) {
2107
- args_1[_i - 2] = arguments[_i];
2127
+ for (var _i = 3; _i < arguments.length; _i++) {
2128
+ args_1[_i - 3] = arguments[_i];
2108
2129
  }
2109
- return __awaiter(_this, __spreadArray([page_1, size_1], args_1, true), void 0, function (page, size, options) {
2130
+ return __awaiter(_this, __spreadArray([page_1, size_1, type_1], args_1, true), void 0, function (page, size, type, options) {
2110
2131
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2111
2132
  if (options === void 0) { options = {}; }
2112
2133
  return __generator(this, function (_a) {
@@ -2124,6 +2145,9 @@ var TreatmentResourceApiAxiosParamCreator = function (configuration) {
2124
2145
  if (size !== undefined) {
2125
2146
  localVarQueryParameter['size'] = size;
2126
2147
  }
2148
+ if (type !== undefined) {
2149
+ localVarQueryParameter['type'] = type;
2150
+ }
2127
2151
  localVarHeaderParameter['Accept'] = 'application/json';
2128
2152
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2129
2153
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -2336,16 +2360,17 @@ var TreatmentResourceApiFp = function (configuration) {
2336
2360
  * @summary Get Treatments
2337
2361
  * @param {number} [page]
2338
2362
  * @param {number} [size]
2363
+ * @param {TreatmentType} [type]
2339
2364
  * @param {*} [options] Override http request option.
2340
2365
  * @throws {RequiredError}
2341
2366
  */
2342
- treatmentsGet: function (page, size, options) {
2367
+ treatmentsGet: function (page, size, type, options) {
2343
2368
  return __awaiter(this, void 0, void 0, function () {
2344
2369
  var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
2345
2370
  var _a, _b, _c;
2346
2371
  return __generator(this, function (_d) {
2347
2372
  switch (_d.label) {
2348
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.treatmentsGet(page, size, options)];
2373
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.treatmentsGet(page, size, type, options)];
2349
2374
  case 1:
2350
2375
  localVarAxiosArgs = _d.sent();
2351
2376
  localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
@@ -2466,7 +2491,7 @@ var TreatmentResourceApiFactory = function (configuration, basePath, axios) {
2466
2491
  */
2467
2492
  treatmentsGet: function (requestParameters, options) {
2468
2493
  if (requestParameters === void 0) { requestParameters = {}; }
2469
- return localVarFp.treatmentsGet(requestParameters.page, requestParameters.size, options).then(function (request) { return request(axios, basePath); });
2494
+ return localVarFp.treatmentsGet(requestParameters.page, requestParameters.size, requestParameters.type, options).then(function (request) { return request(axios, basePath); });
2470
2495
  },
2471
2496
  /**
2472
2497
  *
@@ -2529,7 +2554,7 @@ var TreatmentResourceApi = /** @class */ (function (_super) {
2529
2554
  TreatmentResourceApi.prototype.treatmentsGet = function (requestParameters, options) {
2530
2555
  var _this = this;
2531
2556
  if (requestParameters === void 0) { requestParameters = {}; }
2532
- return (0, exports.TreatmentResourceApiFp)(this.configuration).treatmentsGet(requestParameters.page, requestParameters.size, options).then(function (request) { return request(_this.axios, _this.basePath); });
2557
+ return (0, exports.TreatmentResourceApiFp)(this.configuration).treatmentsGet(requestParameters.page, requestParameters.size, requestParameters.type, options).then(function (request) { return request(_this.axios, _this.basePath); });
2533
2558
  };
2534
2559
  /**
2535
2560
  *
@@ -2791,494 +2816,3 @@ var UserResourceApi = /** @class */ (function (_super) {
2791
2816
  return UserResourceApi;
2792
2817
  }(base_1.BaseAPI));
2793
2818
  exports.UserResourceApi = UserResourceApi;
2794
- /**
2795
- * WorkScheduleResourceApi - axios parameter creator
2796
- */
2797
- var WorkScheduleResourceApiAxiosParamCreator = function (configuration) {
2798
- var _this = this;
2799
- return {
2800
- /**
2801
- *
2802
- * @summary Get Work Schedules
2803
- * @param {number} [page]
2804
- * @param {number} [size]
2805
- * @param {*} [options] Override http request option.
2806
- * @throws {RequiredError}
2807
- */
2808
- workSchedulesGet: function (page_1, size_1) {
2809
- var args_1 = [];
2810
- for (var _i = 2; _i < arguments.length; _i++) {
2811
- args_1[_i - 2] = arguments[_i];
2812
- }
2813
- return __awaiter(_this, __spreadArray([page_1, size_1], args_1, true), void 0, function (page, size, options) {
2814
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2815
- if (options === void 0) { options = {}; }
2816
- return __generator(this, function (_a) {
2817
- localVarPath = "/work-schedules";
2818
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2819
- if (configuration) {
2820
- baseOptions = configuration.baseOptions;
2821
- }
2822
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
2823
- localVarHeaderParameter = {};
2824
- localVarQueryParameter = {};
2825
- if (page !== undefined) {
2826
- localVarQueryParameter['page'] = page;
2827
- }
2828
- if (size !== undefined) {
2829
- localVarQueryParameter['size'] = size;
2830
- }
2831
- localVarHeaderParameter['Accept'] = 'application/json';
2832
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2833
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2834
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2835
- return [2 /*return*/, {
2836
- url: (0, common_1.toPathString)(localVarUrlObj),
2837
- options: localVarRequestOptions,
2838
- }];
2839
- });
2840
- });
2841
- },
2842
- /**
2843
- *
2844
- * @summary Delete Work Schedule By Id
2845
- * @param {number} id
2846
- * @param {*} [options] Override http request option.
2847
- * @throws {RequiredError}
2848
- */
2849
- workSchedulesIdDelete: function (id_1) {
2850
- var args_1 = [];
2851
- for (var _i = 1; _i < arguments.length; _i++) {
2852
- args_1[_i - 1] = arguments[_i];
2853
- }
2854
- return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
2855
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2856
- if (options === void 0) { options = {}; }
2857
- return __generator(this, function (_a) {
2858
- switch (_a.label) {
2859
- case 0:
2860
- // verify required parameter 'id' is not null or undefined
2861
- (0, common_1.assertParamExists)('workSchedulesIdDelete', 'id', id);
2862
- localVarPath = "/work-schedules/{id}"
2863
- .replace('{id}', encodeURIComponent(String(id)));
2864
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2865
- if (configuration) {
2866
- baseOptions = configuration.baseOptions;
2867
- }
2868
- localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
2869
- localVarHeaderParameter = {};
2870
- localVarQueryParameter = {};
2871
- // authentication SecurityScheme required
2872
- // http bearer authentication required
2873
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2874
- case 1:
2875
- // authentication SecurityScheme required
2876
- // http bearer authentication required
2877
- _a.sent();
2878
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2879
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2880
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2881
- return [2 /*return*/, {
2882
- url: (0, common_1.toPathString)(localVarUrlObj),
2883
- options: localVarRequestOptions,
2884
- }];
2885
- }
2886
- });
2887
- });
2888
- },
2889
- /**
2890
- *
2891
- * @summary Find Work Schedule By Id
2892
- * @param {number} id
2893
- * @param {*} [options] Override http request option.
2894
- * @throws {RequiredError}
2895
- */
2896
- workSchedulesIdGet: function (id_1) {
2897
- var args_1 = [];
2898
- for (var _i = 1; _i < arguments.length; _i++) {
2899
- args_1[_i - 1] = arguments[_i];
2900
- }
2901
- return __awaiter(_this, __spreadArray([id_1], args_1, true), void 0, function (id, options) {
2902
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2903
- if (options === void 0) { options = {}; }
2904
- return __generator(this, function (_a) {
2905
- // verify required parameter 'id' is not null or undefined
2906
- (0, common_1.assertParamExists)('workSchedulesIdGet', 'id', id);
2907
- localVarPath = "/work-schedules/{id}"
2908
- .replace('{id}', encodeURIComponent(String(id)));
2909
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2910
- if (configuration) {
2911
- baseOptions = configuration.baseOptions;
2912
- }
2913
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
2914
- localVarHeaderParameter = {};
2915
- localVarQueryParameter = {};
2916
- localVarHeaderParameter['Accept'] = 'application/json';
2917
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2918
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2919
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2920
- return [2 /*return*/, {
2921
- url: (0, common_1.toPathString)(localVarUrlObj),
2922
- options: localVarRequestOptions,
2923
- }];
2924
- });
2925
- });
2926
- },
2927
- /**
2928
- *
2929
- * @summary Update Work Schedule
2930
- * @param {number} id
2931
- * @param {WorkScheduleUpdateRequest} workScheduleUpdateRequest
2932
- * @param {*} [options] Override http request option.
2933
- * @throws {RequiredError}
2934
- */
2935
- workSchedulesIdPut: function (id_1, workScheduleUpdateRequest_1) {
2936
- var args_1 = [];
2937
- for (var _i = 2; _i < arguments.length; _i++) {
2938
- args_1[_i - 2] = arguments[_i];
2939
- }
2940
- return __awaiter(_this, __spreadArray([id_1, workScheduleUpdateRequest_1], args_1, true), void 0, function (id, workScheduleUpdateRequest, options) {
2941
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2942
- if (options === void 0) { options = {}; }
2943
- return __generator(this, function (_a) {
2944
- switch (_a.label) {
2945
- case 0:
2946
- // verify required parameter 'id' is not null or undefined
2947
- (0, common_1.assertParamExists)('workSchedulesIdPut', 'id', id);
2948
- // verify required parameter 'workScheduleUpdateRequest' is not null or undefined
2949
- (0, common_1.assertParamExists)('workSchedulesIdPut', 'workScheduleUpdateRequest', workScheduleUpdateRequest);
2950
- localVarPath = "/work-schedules/{id}"
2951
- .replace('{id}', encodeURIComponent(String(id)));
2952
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2953
- if (configuration) {
2954
- baseOptions = configuration.baseOptions;
2955
- }
2956
- localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
2957
- localVarHeaderParameter = {};
2958
- localVarQueryParameter = {};
2959
- // authentication SecurityScheme required
2960
- // http bearer authentication required
2961
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
2962
- case 1:
2963
- // authentication SecurityScheme required
2964
- // http bearer authentication required
2965
- _a.sent();
2966
- localVarHeaderParameter['Content-Type'] = 'application/json';
2967
- localVarHeaderParameter['Accept'] = 'application/json';
2968
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2969
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2970
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2971
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(workScheduleUpdateRequest, localVarRequestOptions, configuration);
2972
- return [2 /*return*/, {
2973
- url: (0, common_1.toPathString)(localVarUrlObj),
2974
- options: localVarRequestOptions,
2975
- }];
2976
- }
2977
- });
2978
- });
2979
- },
2980
- /**
2981
- *
2982
- * @summary Create Work Schedule
2983
- * @param {WorkScheduleCreateRequest} workScheduleCreateRequest
2984
- * @param {*} [options] Override http request option.
2985
- * @throws {RequiredError}
2986
- */
2987
- workSchedulesPost: function (workScheduleCreateRequest_1) {
2988
- var args_1 = [];
2989
- for (var _i = 1; _i < arguments.length; _i++) {
2990
- args_1[_i - 1] = arguments[_i];
2991
- }
2992
- return __awaiter(_this, __spreadArray([workScheduleCreateRequest_1], args_1, true), void 0, function (workScheduleCreateRequest, options) {
2993
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
2994
- if (options === void 0) { options = {}; }
2995
- return __generator(this, function (_a) {
2996
- switch (_a.label) {
2997
- case 0:
2998
- // verify required parameter 'workScheduleCreateRequest' is not null or undefined
2999
- (0, common_1.assertParamExists)('workSchedulesPost', 'workScheduleCreateRequest', workScheduleCreateRequest);
3000
- localVarPath = "/work-schedules";
3001
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3002
- if (configuration) {
3003
- baseOptions = configuration.baseOptions;
3004
- }
3005
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
3006
- localVarHeaderParameter = {};
3007
- localVarQueryParameter = {};
3008
- // authentication SecurityScheme required
3009
- // http bearer authentication required
3010
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
3011
- case 1:
3012
- // authentication SecurityScheme required
3013
- // http bearer authentication required
3014
- _a.sent();
3015
- localVarHeaderParameter['Content-Type'] = 'application/json';
3016
- localVarHeaderParameter['Accept'] = 'application/json';
3017
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3018
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3019
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3020
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(workScheduleCreateRequest, localVarRequestOptions, configuration);
3021
- return [2 /*return*/, {
3022
- url: (0, common_1.toPathString)(localVarUrlObj),
3023
- options: localVarRequestOptions,
3024
- }];
3025
- }
3026
- });
3027
- });
3028
- },
3029
- };
3030
- };
3031
- exports.WorkScheduleResourceApiAxiosParamCreator = WorkScheduleResourceApiAxiosParamCreator;
3032
- /**
3033
- * WorkScheduleResourceApi - functional programming interface
3034
- */
3035
- var WorkScheduleResourceApiFp = function (configuration) {
3036
- var localVarAxiosParamCreator = (0, exports.WorkScheduleResourceApiAxiosParamCreator)(configuration);
3037
- return {
3038
- /**
3039
- *
3040
- * @summary Get Work Schedules
3041
- * @param {number} [page]
3042
- * @param {number} [size]
3043
- * @param {*} [options] Override http request option.
3044
- * @throws {RequiredError}
3045
- */
3046
- workSchedulesGet: function (page, size, options) {
3047
- return __awaiter(this, void 0, void 0, function () {
3048
- var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3049
- var _a, _b, _c;
3050
- return __generator(this, function (_d) {
3051
- switch (_d.label) {
3052
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.workSchedulesGet(page, size, options)];
3053
- case 1:
3054
- localVarAxiosArgs = _d.sent();
3055
- localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3056
- localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WorkScheduleResourceApi.workSchedulesGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3057
- return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3058
- }
3059
- });
3060
- });
3061
- },
3062
- /**
3063
- *
3064
- * @summary Delete Work Schedule By Id
3065
- * @param {number} id
3066
- * @param {*} [options] Override http request option.
3067
- * @throws {RequiredError}
3068
- */
3069
- workSchedulesIdDelete: function (id, options) {
3070
- return __awaiter(this, void 0, void 0, function () {
3071
- var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3072
- var _a, _b, _c;
3073
- return __generator(this, function (_d) {
3074
- switch (_d.label) {
3075
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.workSchedulesIdDelete(id, options)];
3076
- case 1:
3077
- localVarAxiosArgs = _d.sent();
3078
- localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3079
- localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WorkScheduleResourceApi.workSchedulesIdDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3080
- return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3081
- }
3082
- });
3083
- });
3084
- },
3085
- /**
3086
- *
3087
- * @summary Find Work Schedule By Id
3088
- * @param {number} id
3089
- * @param {*} [options] Override http request option.
3090
- * @throws {RequiredError}
3091
- */
3092
- workSchedulesIdGet: function (id, options) {
3093
- return __awaiter(this, void 0, void 0, function () {
3094
- var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3095
- var _a, _b, _c;
3096
- return __generator(this, function (_d) {
3097
- switch (_d.label) {
3098
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.workSchedulesIdGet(id, options)];
3099
- case 1:
3100
- localVarAxiosArgs = _d.sent();
3101
- localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3102
- localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WorkScheduleResourceApi.workSchedulesIdGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3103
- return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3104
- }
3105
- });
3106
- });
3107
- },
3108
- /**
3109
- *
3110
- * @summary Update Work Schedule
3111
- * @param {number} id
3112
- * @param {WorkScheduleUpdateRequest} workScheduleUpdateRequest
3113
- * @param {*} [options] Override http request option.
3114
- * @throws {RequiredError}
3115
- */
3116
- workSchedulesIdPut: function (id, workScheduleUpdateRequest, options) {
3117
- return __awaiter(this, void 0, void 0, function () {
3118
- var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3119
- var _a, _b, _c;
3120
- return __generator(this, function (_d) {
3121
- switch (_d.label) {
3122
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.workSchedulesIdPut(id, workScheduleUpdateRequest, options)];
3123
- case 1:
3124
- localVarAxiosArgs = _d.sent();
3125
- localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3126
- localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WorkScheduleResourceApi.workSchedulesIdPut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3127
- return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3128
- }
3129
- });
3130
- });
3131
- },
3132
- /**
3133
- *
3134
- * @summary Create Work Schedule
3135
- * @param {WorkScheduleCreateRequest} workScheduleCreateRequest
3136
- * @param {*} [options] Override http request option.
3137
- * @throws {RequiredError}
3138
- */
3139
- workSchedulesPost: function (workScheduleCreateRequest, options) {
3140
- return __awaiter(this, void 0, void 0, function () {
3141
- var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3142
- var _a, _b, _c;
3143
- return __generator(this, function (_d) {
3144
- switch (_d.label) {
3145
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.workSchedulesPost(workScheduleCreateRequest, options)];
3146
- case 1:
3147
- localVarAxiosArgs = _d.sent();
3148
- localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3149
- localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WorkScheduleResourceApi.workSchedulesPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3150
- return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3151
- }
3152
- });
3153
- });
3154
- },
3155
- };
3156
- };
3157
- exports.WorkScheduleResourceApiFp = WorkScheduleResourceApiFp;
3158
- /**
3159
- * WorkScheduleResourceApi - factory interface
3160
- */
3161
- var WorkScheduleResourceApiFactory = function (configuration, basePath, axios) {
3162
- var localVarFp = (0, exports.WorkScheduleResourceApiFp)(configuration);
3163
- return {
3164
- /**
3165
- *
3166
- * @summary Get Work Schedules
3167
- * @param {WorkScheduleResourceApiWorkSchedulesGetRequest} requestParameters Request parameters.
3168
- * @param {*} [options] Override http request option.
3169
- * @throws {RequiredError}
3170
- */
3171
- workSchedulesGet: function (requestParameters, options) {
3172
- if (requestParameters === void 0) { requestParameters = {}; }
3173
- return localVarFp.workSchedulesGet(requestParameters.page, requestParameters.size, options).then(function (request) { return request(axios, basePath); });
3174
- },
3175
- /**
3176
- *
3177
- * @summary Delete Work Schedule By Id
3178
- * @param {WorkScheduleResourceApiWorkSchedulesIdDeleteRequest} requestParameters Request parameters.
3179
- * @param {*} [options] Override http request option.
3180
- * @throws {RequiredError}
3181
- */
3182
- workSchedulesIdDelete: function (requestParameters, options) {
3183
- return localVarFp.workSchedulesIdDelete(requestParameters.id, options).then(function (request) { return request(axios, basePath); });
3184
- },
3185
- /**
3186
- *
3187
- * @summary Find Work Schedule By Id
3188
- * @param {WorkScheduleResourceApiWorkSchedulesIdGetRequest} requestParameters Request parameters.
3189
- * @param {*} [options] Override http request option.
3190
- * @throws {RequiredError}
3191
- */
3192
- workSchedulesIdGet: function (requestParameters, options) {
3193
- return localVarFp.workSchedulesIdGet(requestParameters.id, options).then(function (request) { return request(axios, basePath); });
3194
- },
3195
- /**
3196
- *
3197
- * @summary Update Work Schedule
3198
- * @param {WorkScheduleResourceApiWorkSchedulesIdPutRequest} requestParameters Request parameters.
3199
- * @param {*} [options] Override http request option.
3200
- * @throws {RequiredError}
3201
- */
3202
- workSchedulesIdPut: function (requestParameters, options) {
3203
- return localVarFp.workSchedulesIdPut(requestParameters.id, requestParameters.workScheduleUpdateRequest, options).then(function (request) { return request(axios, basePath); });
3204
- },
3205
- /**
3206
- *
3207
- * @summary Create Work Schedule
3208
- * @param {WorkScheduleResourceApiWorkSchedulesPostRequest} requestParameters Request parameters.
3209
- * @param {*} [options] Override http request option.
3210
- * @throws {RequiredError}
3211
- */
3212
- workSchedulesPost: function (requestParameters, options) {
3213
- return localVarFp.workSchedulesPost(requestParameters.workScheduleCreateRequest, options).then(function (request) { return request(axios, basePath); });
3214
- },
3215
- };
3216
- };
3217
- exports.WorkScheduleResourceApiFactory = WorkScheduleResourceApiFactory;
3218
- /**
3219
- * WorkScheduleResourceApi - object-oriented interface
3220
- */
3221
- var WorkScheduleResourceApi = /** @class */ (function (_super) {
3222
- __extends(WorkScheduleResourceApi, _super);
3223
- function WorkScheduleResourceApi() {
3224
- return _super !== null && _super.apply(this, arguments) || this;
3225
- }
3226
- /**
3227
- *
3228
- * @summary Get Work Schedules
3229
- * @param {WorkScheduleResourceApiWorkSchedulesGetRequest} requestParameters Request parameters.
3230
- * @param {*} [options] Override http request option.
3231
- * @throws {RequiredError}
3232
- */
3233
- WorkScheduleResourceApi.prototype.workSchedulesGet = function (requestParameters, options) {
3234
- var _this = this;
3235
- if (requestParameters === void 0) { requestParameters = {}; }
3236
- return (0, exports.WorkScheduleResourceApiFp)(this.configuration).workSchedulesGet(requestParameters.page, requestParameters.size, options).then(function (request) { return request(_this.axios, _this.basePath); });
3237
- };
3238
- /**
3239
- *
3240
- * @summary Delete Work Schedule By Id
3241
- * @param {WorkScheduleResourceApiWorkSchedulesIdDeleteRequest} requestParameters Request parameters.
3242
- * @param {*} [options] Override http request option.
3243
- * @throws {RequiredError}
3244
- */
3245
- WorkScheduleResourceApi.prototype.workSchedulesIdDelete = function (requestParameters, options) {
3246
- var _this = this;
3247
- return (0, exports.WorkScheduleResourceApiFp)(this.configuration).workSchedulesIdDelete(requestParameters.id, options).then(function (request) { return request(_this.axios, _this.basePath); });
3248
- };
3249
- /**
3250
- *
3251
- * @summary Find Work Schedule By Id
3252
- * @param {WorkScheduleResourceApiWorkSchedulesIdGetRequest} requestParameters Request parameters.
3253
- * @param {*} [options] Override http request option.
3254
- * @throws {RequiredError}
3255
- */
3256
- WorkScheduleResourceApi.prototype.workSchedulesIdGet = function (requestParameters, options) {
3257
- var _this = this;
3258
- return (0, exports.WorkScheduleResourceApiFp)(this.configuration).workSchedulesIdGet(requestParameters.id, options).then(function (request) { return request(_this.axios, _this.basePath); });
3259
- };
3260
- /**
3261
- *
3262
- * @summary Update Work Schedule
3263
- * @param {WorkScheduleResourceApiWorkSchedulesIdPutRequest} requestParameters Request parameters.
3264
- * @param {*} [options] Override http request option.
3265
- * @throws {RequiredError}
3266
- */
3267
- WorkScheduleResourceApi.prototype.workSchedulesIdPut = function (requestParameters, options) {
3268
- var _this = this;
3269
- return (0, exports.WorkScheduleResourceApiFp)(this.configuration).workSchedulesIdPut(requestParameters.id, requestParameters.workScheduleUpdateRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
3270
- };
3271
- /**
3272
- *
3273
- * @summary Create Work Schedule
3274
- * @param {WorkScheduleResourceApiWorkSchedulesPostRequest} requestParameters Request parameters.
3275
- * @param {*} [options] Override http request option.
3276
- * @throws {RequiredError}
3277
- */
3278
- WorkScheduleResourceApi.prototype.workSchedulesPost = function (requestParameters, options) {
3279
- var _this = this;
3280
- return (0, exports.WorkScheduleResourceApiFp)(this.configuration).workSchedulesPost(requestParameters.workScheduleCreateRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
3281
- };
3282
- return WorkScheduleResourceApi;
3283
- }(base_1.BaseAPI));
3284
- exports.WorkScheduleResourceApi = WorkScheduleResourceApi;