@tennac-booking/sdk 1.0.225 → 1.0.227
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/.openapi-generator/FILES +30 -51
- package/README.md +48 -76
- package/api.ts +3538 -4733
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +3766 -4855
- package/dist/api.js +9858 -15754
- package/dist/base.d.ts +1 -1
- package/dist/base.js +11 -32
- package/dist/common.d.ts +1 -1
- package/dist/common.js +41 -133
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +8 -21
- package/dist/esm/api.d.ts +25620 -0
- package/dist/esm/api.js +17756 -0
- package/dist/esm/base.d.ts +66 -0
- package/dist/esm/base.js +60 -0
- package/dist/esm/common.d.ts +65 -0
- package/dist/esm/common.js +149 -0
- package/dist/esm/configuration.d.ts +91 -0
- package/dist/esm/configuration.js +40 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/AgendaBooking.md +0 -2
- package/docs/BookingPopulated.md +1 -9
- package/docs/BookingSummary.md +4 -4
- package/docs/BookingsApi.md +79 -25
- package/docs/BookingsStaffApi.md +57 -1
- package/docs/BookingsUserApi.md +6 -58
- package/docs/CheckInPlayerSumupRequest.md +22 -0
- package/docs/{CloseOpenBookingResponse.md → CheckInPlayerSumupResponse.md} +7 -5
- package/docs/CheckInSumupPaymentInfo.md +26 -0
- package/docs/ClubPageResponse.md +0 -16
- package/docs/ClubPricingPeriodResponse.md +6 -6
- package/docs/ClubReservationSettingsResponse.md +2 -2
- package/docs/ClubResponse.md +2 -12
- package/docs/ClubSummary.md +0 -6
- package/docs/CreateBookingRequest.md +2 -0
- package/docs/CreateOpenBookingRequest.md +4 -6
- package/docs/CreateSubscriptionPlanRequestDiscount.md +0 -4
- package/docs/EventBookingDetailSummary.md +0 -2
- package/docs/EventBookingResponse.md +0 -2
- package/docs/EventResponse.md +0 -2
- package/docs/EventsApi.md +0 -113
- package/docs/EventsStaffApi.md +25 -119
- package/docs/GetClubsWithVerificationDomains200ResponseInner.md +0 -2
- package/docs/GetOpenBookingPrice200Response.md +24 -0
- package/docs/GetOpenBookingPriceRequest.md +26 -0
- package/docs/IUserAttributes.md +0 -4
- package/docs/JoinPriceEstimateResponse.md +38 -0
- package/docs/JoinPriceEstimateResponseSubscriptionInfo.md +25 -0
- package/docs/MyClubInfosResponse.md +2 -0
- package/docs/OpenBookingInfo.md +5 -7
- package/docs/OpenBookingSlotInfo.md +24 -0
- package/docs/PaymentIntentResult.md +28 -0
- package/docs/{SupportedLanguage.md → PaymentProviderType.md} +3 -3
- package/docs/{NotificationActorType.md → PaymentStatus.md} +6 -4
- package/docs/PaymentsStaffApi.md +124 -0
- package/docs/PlayerPrice.md +1 -3
- package/docs/PublicEmailApi.md +4 -4
- package/docs/QuickReservationClubSummary.md +0 -12
- package/docs/SportResponse.md +0 -2
- package/docs/StaffEventBookingResponse.md +0 -2
- package/docs/StaffEventsPaginatedResponse.md +26 -0
- package/docs/StaffUserProfileResponse.md +0 -4
- package/docs/SubscriptionPlanDiscountResponse.md +0 -2
- package/docs/SubscriptionPlanDiscountUpdateRequest.md +0 -2
- package/docs/SumUpApi.md +63 -0
- package/docs/SumUpManagerApi.md +617 -0
- package/docs/SumupAccountStatusResponse.md +32 -0
- package/docs/{VerifyVerificationCodeResponse.md → SumupCancelPaymentRequest.md} +5 -5
- package/docs/{RequestVerificationCodeResponse.md → SumupConnectUrlResponse.md} +5 -5
- package/docs/SumupCreatePaymentRequest.md +32 -0
- package/docs/SumupOAuthCallbackResponse.md +24 -0
- package/docs/SumupPairReaderRequest.md +24 -0
- package/docs/{Health200Response.md → SumupPairReaderResponse.md} +5 -7
- package/docs/SumupReaderInfo.md +42 -0
- package/docs/{NotificationTargetPreview.md → SumupReaderInfoDevice.md} +7 -7
- package/docs/{MarkNotificationsReadResponse.md → SumupReaderResponse.md} +5 -5
- package/docs/SumupReaderStatusInfo.md +32 -0
- package/docs/SumupReaderStatusResponse.md +20 -0
- package/docs/SumupReadersResponse.md +20 -0
- package/docs/{NotificationResponseClub.md → SumupUpdateReaderRequest.md} +5 -7
- package/docs/UpdateClubHoursSettingsRequest.md +1 -1
- package/docs/UpdateClubReservationSettingsRequest.md +2 -2
- package/docs/UserClubMembership.md +0 -2
- package/docs/UserProfileResponse.md +0 -12
- package/docs/UsersApi.md +0 -273
- package/docs/WaitListStaffApi.md +0 -55
- package/index.ts +1 -1
- package/package.json +4 -2
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +2 -5
- package/docs/AuthApi.md +0 -113
- package/docs/ClubPageResponseClubCustomerStatus.md +0 -27
- package/docs/ClubPageResponseSportsIdsLookup.md +0 -23
- package/docs/ClubPricingPeriodPayload.md +0 -32
- package/docs/ComingEventsPageResponse.md +0 -22
- package/docs/CourtEnvironment.md +0 -10
- package/docs/EstimateOpenBookingJoinRequest.md +0 -24
- package/docs/GetOpenEventBookingsBySport200Response.md +0 -20
- package/docs/GetOpenEventBookingsBySport200ResponseEventBookingsInner.md +0 -46
- package/docs/JobResult.md +0 -24
- package/docs/JobsApi.md +0 -367
- package/docs/JoinOpenBookingRequest.md +0 -28
- package/docs/MarkNotificationsReadRequest.md +0 -22
- package/docs/NotificationData.md +0 -22
- package/docs/NotificationInitiator.md +0 -28
- package/docs/NotificationParticipantPreview.md +0 -24
- package/docs/NotificationPreview.md +0 -78
- package/docs/NotificationResponse.md +0 -46
- package/docs/NotificationSlotPreview.md +0 -24
- package/docs/NotificationSportPreview.md +0 -24
- package/docs/NotificationType.md +0 -26
- package/docs/OpenBookingBasePriceResponse.md +0 -24
- package/docs/OpenBookingJoinEstimateResponse.md +0 -26
- package/docs/OpenBookingPriceBody.md +0 -26
- package/docs/PartnerSearchItem.md +0 -28
- package/docs/PartnerSearchResponse.md +0 -22
- package/docs/PartnerSearchResponseMeta.md +0 -26
- package/docs/PricingPeriodDiscount.md +0 -24
- package/docs/QuickReservationCourtType.md +0 -10
- package/docs/RequestOrganizationEmailCodeBody.md +0 -22
- package/docs/RequestOrganizationEmailCodeResponse.md +0 -22
- package/docs/RequestVerificationCodeBody.md +0 -26
- package/docs/StaffEventsPageResponse.md +0 -22
- package/docs/UserNextBookingSummary.md +0 -26
- package/docs/UserNotificationsResponse.md +0 -22
- package/docs/UserNotificationsResponseMeta.md +0 -28
- package/docs/VerifyOrganizationEmailCodeBody.md +0 -24
- package/docs/VerifyOrganizationEmailCodeResponse.md +0 -22
- package/docs/VerifyVerificationCodeBody.md +0 -24
- package/docs/WaitListEntryWithPlayer.md +0 -44
- package/docs/WaitListPlayer.md +0 -28
- package/docs/WaitListPlayersListResponse.md +0 -22
package/dist/base.d.ts
CHANGED
package/dist/base.js
CHANGED
|
@@ -5,31 +5,16 @@
|
|
|
5
5
|
* openapi.json
|
|
6
6
|
* Pandook API Documentation
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.0.
|
|
8
|
+
* The version of the OpenAPI document: 1.0.177
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
|
-
var __extends = (this && this.__extends) || (function () {
|
|
16
|
-
var extendStatics = function (d, b) {
|
|
17
|
-
extendStatics = Object.setPrototypeOf ||
|
|
18
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
16
|
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
32
|
-
|
|
17
|
+
const axios_1 = require("axios");
|
|
33
18
|
exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
34
19
|
/**
|
|
35
20
|
*
|
|
@@ -46,10 +31,8 @@ exports.COLLECTION_FORMATS = {
|
|
|
46
31
|
* @export
|
|
47
32
|
* @class BaseAPI
|
|
48
33
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (basePath === void 0) { basePath = exports.BASE_PATH; }
|
|
52
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
34
|
+
class BaseAPI {
|
|
35
|
+
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
53
36
|
var _a;
|
|
54
37
|
this.basePath = basePath;
|
|
55
38
|
this.axios = axios;
|
|
@@ -58,8 +41,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
58
41
|
this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
|
|
59
42
|
}
|
|
60
43
|
}
|
|
61
|
-
|
|
62
|
-
}());
|
|
44
|
+
}
|
|
63
45
|
exports.BaseAPI = BaseAPI;
|
|
64
46
|
;
|
|
65
47
|
/**
|
|
@@ -68,16 +50,13 @@ exports.BaseAPI = BaseAPI;
|
|
|
68
50
|
* @class RequiredError
|
|
69
51
|
* @extends {Error}
|
|
70
52
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
_this.name = "RequiredError";
|
|
77
|
-
return _this;
|
|
53
|
+
class RequiredError extends Error {
|
|
54
|
+
constructor(field, msg) {
|
|
55
|
+
super(msg);
|
|
56
|
+
this.field = field;
|
|
57
|
+
this.name = "RequiredError";
|
|
78
58
|
}
|
|
79
|
-
|
|
80
|
-
}(Error));
|
|
59
|
+
}
|
|
81
60
|
exports.RequiredError = RequiredError;
|
|
82
61
|
/**
|
|
83
62
|
*
|
package/dist/common.d.ts
CHANGED
package/dist/common.js
CHANGED
|
@@ -5,24 +5,13 @@
|
|
|
5
5
|
* openapi.json
|
|
6
6
|
* Pandook API Documentation
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.0.
|
|
8
|
+
* The version of the OpenAPI document: 1.0.177
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
|
-
var __assign = (this && this.__assign) || function () {
|
|
16
|
-
__assign = Object.assign || function(t) {
|
|
17
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
18
|
-
s = arguments[i];
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
return __assign.apply(this, arguments);
|
|
25
|
-
};
|
|
26
15
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
27
16
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28
17
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -32,36 +21,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
21
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
33
22
|
});
|
|
34
23
|
};
|
|
35
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
36
|
-
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);
|
|
37
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
38
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
39
|
-
function step(op) {
|
|
40
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
41
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
42
|
-
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;
|
|
43
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
44
|
-
switch (op[0]) {
|
|
45
|
-
case 0: case 1: t = op; break;
|
|
46
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
47
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
48
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
49
|
-
default:
|
|
50
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
51
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
52
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
53
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
54
|
-
if (t[2]) _.ops.pop();
|
|
55
|
-
_.trys.pop(); continue;
|
|
56
|
-
}
|
|
57
|
-
op = body.call(thisArg, _);
|
|
58
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
59
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63
25
|
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
|
64
|
-
|
|
26
|
+
const base_1 = require("./base");
|
|
65
27
|
/**
|
|
66
28
|
*
|
|
67
29
|
* @export
|
|
@@ -72,9 +34,9 @@ exports.DUMMY_BASE_URL = 'https://example.com';
|
|
|
72
34
|
* @throws {RequiredError}
|
|
73
35
|
* @export
|
|
74
36
|
*/
|
|
75
|
-
|
|
37
|
+
const assertParamExists = function (functionName, paramName, paramValue) {
|
|
76
38
|
if (paramValue === null || paramValue === undefined) {
|
|
77
|
-
throw new base_1.RequiredError(paramName,
|
|
39
|
+
throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
78
40
|
}
|
|
79
41
|
};
|
|
80
42
|
exports.assertParamExists = assertParamExists;
|
|
@@ -82,29 +44,14 @@ exports.assertParamExists = assertParamExists;
|
|
|
82
44
|
*
|
|
83
45
|
* @export
|
|
84
46
|
*/
|
|
85
|
-
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return [4 /*yield*/, configuration.apiKey(keyParamName)];
|
|
94
|
-
case 1:
|
|
95
|
-
_a = _b.sent();
|
|
96
|
-
return [3 /*break*/, 4];
|
|
97
|
-
case 2: return [4 /*yield*/, configuration.apiKey];
|
|
98
|
-
case 3:
|
|
99
|
-
_a = _b.sent();
|
|
100
|
-
_b.label = 4;
|
|
101
|
-
case 4:
|
|
102
|
-
localVarApiKeyValue = _a;
|
|
103
|
-
object[keyParamName] = localVarApiKeyValue;
|
|
104
|
-
_b.label = 5;
|
|
105
|
-
case 5: return [2 /*return*/];
|
|
106
|
-
}
|
|
107
|
-
});
|
|
47
|
+
const setApiKeyToObject = function (object, keyParamName, configuration) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
if (configuration && configuration.apiKey) {
|
|
50
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
51
|
+
? yield configuration.apiKey(keyParamName)
|
|
52
|
+
: yield configuration.apiKey;
|
|
53
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
54
|
+
}
|
|
108
55
|
});
|
|
109
56
|
};
|
|
110
57
|
exports.setApiKeyToObject = setApiKeyToObject;
|
|
@@ -112,7 +59,7 @@ exports.setApiKeyToObject = setApiKeyToObject;
|
|
|
112
59
|
*
|
|
113
60
|
* @export
|
|
114
61
|
*/
|
|
115
|
-
|
|
62
|
+
const setBasicAuthToObject = function (object, configuration) {
|
|
116
63
|
if (configuration && (configuration.username || configuration.password)) {
|
|
117
64
|
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
118
65
|
}
|
|
@@ -122,29 +69,14 @@ exports.setBasicAuthToObject = setBasicAuthToObject;
|
|
|
122
69
|
*
|
|
123
70
|
* @export
|
|
124
71
|
*/
|
|
125
|
-
|
|
126
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return [4 /*yield*/, configuration.accessToken()];
|
|
134
|
-
case 1:
|
|
135
|
-
_a = _b.sent();
|
|
136
|
-
return [3 /*break*/, 4];
|
|
137
|
-
case 2: return [4 /*yield*/, configuration.accessToken];
|
|
138
|
-
case 3:
|
|
139
|
-
_a = _b.sent();
|
|
140
|
-
_b.label = 4;
|
|
141
|
-
case 4:
|
|
142
|
-
accessToken = _a;
|
|
143
|
-
object["Authorization"] = "Bearer " + accessToken;
|
|
144
|
-
_b.label = 5;
|
|
145
|
-
case 5: return [2 /*return*/];
|
|
146
|
-
}
|
|
147
|
-
});
|
|
72
|
+
const setBearerAuthToObject = function (object, configuration) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
if (configuration && configuration.accessToken) {
|
|
75
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
76
|
+
? yield configuration.accessToken()
|
|
77
|
+
: yield configuration.accessToken;
|
|
78
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
79
|
+
}
|
|
148
80
|
});
|
|
149
81
|
};
|
|
150
82
|
exports.setBearerAuthToObject = setBearerAuthToObject;
|
|
@@ -152,44 +84,26 @@ exports.setBearerAuthToObject = setBearerAuthToObject;
|
|
|
152
84
|
*
|
|
153
85
|
* @export
|
|
154
86
|
*/
|
|
155
|
-
|
|
156
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
return [4 /*yield*/, configuration.accessToken(name, scopes)];
|
|
164
|
-
case 1:
|
|
165
|
-
_a = _b.sent();
|
|
166
|
-
return [3 /*break*/, 4];
|
|
167
|
-
case 2: return [4 /*yield*/, configuration.accessToken];
|
|
168
|
-
case 3:
|
|
169
|
-
_a = _b.sent();
|
|
170
|
-
_b.label = 4;
|
|
171
|
-
case 4:
|
|
172
|
-
localVarAccessTokenValue = _a;
|
|
173
|
-
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
174
|
-
_b.label = 5;
|
|
175
|
-
case 5: return [2 /*return*/];
|
|
176
|
-
}
|
|
177
|
-
});
|
|
87
|
+
const setOAuthToObject = function (object, name, scopes, configuration) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
if (configuration && configuration.accessToken) {
|
|
90
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
91
|
+
? yield configuration.accessToken(name, scopes)
|
|
92
|
+
: yield configuration.accessToken;
|
|
93
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
94
|
+
}
|
|
178
95
|
});
|
|
179
96
|
};
|
|
180
97
|
exports.setOAuthToObject = setOAuthToObject;
|
|
181
|
-
function setFlattenedQueryParams(urlSearchParams, parameter, key) {
|
|
182
|
-
if (key === void 0) { key = ""; }
|
|
98
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
183
99
|
if (parameter == null)
|
|
184
100
|
return;
|
|
185
101
|
if (typeof parameter === "object") {
|
|
186
102
|
if (Array.isArray(parameter)) {
|
|
187
|
-
parameter.forEach(
|
|
103
|
+
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
188
104
|
}
|
|
189
105
|
else {
|
|
190
|
-
Object.keys(parameter).forEach(
|
|
191
|
-
return setFlattenedQueryParams(urlSearchParams, parameter[currentKey], "".concat(key).concat(key !== '' ? '.' : '').concat(currentKey));
|
|
192
|
-
});
|
|
106
|
+
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
193
107
|
}
|
|
194
108
|
}
|
|
195
109
|
else {
|
|
@@ -205,12 +119,8 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key) {
|
|
|
205
119
|
*
|
|
206
120
|
* @export
|
|
207
121
|
*/
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
211
|
-
objects[_i - 1] = arguments[_i];
|
|
212
|
-
}
|
|
213
|
-
var searchParams = new URLSearchParams(url.search);
|
|
122
|
+
const setSearchParams = function (url, ...objects) {
|
|
123
|
+
const searchParams = new URLSearchParams(url.search);
|
|
214
124
|
setFlattenedQueryParams(searchParams, objects);
|
|
215
125
|
url.search = searchParams.toString();
|
|
216
126
|
};
|
|
@@ -219,9 +129,9 @@ exports.setSearchParams = setSearchParams;
|
|
|
219
129
|
*
|
|
220
130
|
* @export
|
|
221
131
|
*/
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
132
|
+
const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
133
|
+
const nonString = typeof value !== 'string';
|
|
134
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
225
135
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
226
136
|
: nonString;
|
|
227
137
|
return needsSerialization
|
|
@@ -233,7 +143,7 @@ exports.serializeDataIfNeeded = serializeDataIfNeeded;
|
|
|
233
143
|
*
|
|
234
144
|
* @export
|
|
235
145
|
*/
|
|
236
|
-
|
|
146
|
+
const toPathString = function (url) {
|
|
237
147
|
return url.pathname + url.search + url.hash;
|
|
238
148
|
};
|
|
239
149
|
exports.toPathString = toPathString;
|
|
@@ -241,12 +151,10 @@ exports.toPathString = toPathString;
|
|
|
241
151
|
*
|
|
242
152
|
* @export
|
|
243
153
|
*/
|
|
244
|
-
|
|
245
|
-
return
|
|
154
|
+
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
155
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
246
156
|
var _a;
|
|
247
|
-
|
|
248
|
-
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
249
|
-
var axiosRequestArgs = __assign(__assign({}, axiosArgs.options), { url: (axios.defaults.baseURL ? '' : (_a = configuration === null || configuration === void 0 ? void 0 : configuration.basePath) !== null && _a !== void 0 ? _a : basePath) + axiosArgs.url });
|
|
157
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: (axios.defaults.baseURL ? '' : (_a = configuration === null || configuration === void 0 ? void 0 : configuration.basePath) !== null && _a !== void 0 ? _a : basePath) + axiosArgs.url });
|
|
250
158
|
return axios.request(axiosRequestArgs);
|
|
251
159
|
};
|
|
252
160
|
};
|
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
|
@@ -5,29 +5,17 @@
|
|
|
5
5
|
* openapi.json
|
|
6
6
|
* Pandook API Documentation
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.0.
|
|
8
|
+
* The version of the OpenAPI document: 1.0.177
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
12
|
* https://openapi-generator.tech
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
|
-
var __assign = (this && this.__assign) || function () {
|
|
16
|
-
__assign = Object.assign || function(t) {
|
|
17
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
18
|
-
s = arguments[i];
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
return __assign.apply(this, arguments);
|
|
25
|
-
};
|
|
26
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
16
|
exports.Configuration = void 0;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (param === void 0) { param = {}; }
|
|
17
|
+
class Configuration {
|
|
18
|
+
constructor(param = {}) {
|
|
31
19
|
var _a;
|
|
32
20
|
this.apiKey = param.apiKey;
|
|
33
21
|
this.username = param.username;
|
|
@@ -35,7 +23,7 @@ var Configuration = /** @class */ (function () {
|
|
|
35
23
|
this.accessToken = param.accessToken;
|
|
36
24
|
this.basePath = param.basePath;
|
|
37
25
|
this.serverIndex = param.serverIndex;
|
|
38
|
-
this.baseOptions =
|
|
26
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
39
27
|
this.formDataCtor = param.formDataCtor;
|
|
40
28
|
}
|
|
41
29
|
/**
|
|
@@ -48,10 +36,9 @@ var Configuration = /** @class */ (function () {
|
|
|
48
36
|
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
49
37
|
* @return True if the given MIME is JSON, false otherwise.
|
|
50
38
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
isJsonMime(mime) {
|
|
40
|
+
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
53
41
|
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
}());
|
|
42
|
+
}
|
|
43
|
+
}
|
|
57
44
|
exports.Configuration = Configuration;
|