@tennac-booking/sdk 1.0.0 → 1.0.1
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 +13 -11
- package/README.md +26 -1
- package/api.ts +644 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +115 -0
- package/dist/api.d.ts +467 -0
- package/dist/api.js +308 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +65 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +161 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +44 -0
- package/dist/esm/api.d.ts +467 -0
- package/dist/esm/api.js +297 -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 -3
- package/dist/esm/index.js +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +15 -5
- package/docs/AuthApi.md +88 -0
- package/docs/Booking.md +32 -0
- package/docs/Court.md +32 -0
- package/docs/Slot.md +24 -0
- package/docs/SlotException.md +26 -0
- package/docs/User.md +40 -0
- package/docs/UsersApi.md +51 -0
- package/git_push.sh +57 -0
- package/index.ts +16 -3
- package/package.json +17 -4
- package/tsconfig.json +4 -2
package/dist/esm/api.js
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Pickle Ball API
|
|
5
|
+
* API for managing pickle ball games and players
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import globalAxios from 'axios';
|
|
24
|
+
// Some imports not used depending on template conditions
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, toPathString, createRequestFunction } from './common';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from './base';
|
|
29
|
+
export const BookingStatusEnum = {
|
|
30
|
+
Active: 'active',
|
|
31
|
+
Inactive: 'inactive'
|
|
32
|
+
};
|
|
33
|
+
export const BookingStripeStatusEnum = {
|
|
34
|
+
Pending: 'pending',
|
|
35
|
+
Paid: 'paid',
|
|
36
|
+
Failed: 'failed',
|
|
37
|
+
Refunded: 'refunded',
|
|
38
|
+
Canceled: 'canceled'
|
|
39
|
+
};
|
|
40
|
+
export const CourtStatusEnum = {
|
|
41
|
+
Available: 'available',
|
|
42
|
+
Unavailable: 'unavailable'
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* AuthApi - axios parameter creator
|
|
46
|
+
* @export
|
|
47
|
+
*/
|
|
48
|
+
export const AuthApiAxiosParamCreator = function (configuration) {
|
|
49
|
+
return {
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @summary Register a new user
|
|
53
|
+
* @param {string} firstName
|
|
54
|
+
* @param {string} lastName
|
|
55
|
+
* @param {string} email
|
|
56
|
+
* @param {string} password
|
|
57
|
+
* @param {string} [username]
|
|
58
|
+
* @param {boolean} [isAccountVerified]
|
|
59
|
+
* @param {string} [level]
|
|
60
|
+
* @param {string} [stripeCustomerId]
|
|
61
|
+
* @param {string} [phone]
|
|
62
|
+
* @param {string} [profilePicture]
|
|
63
|
+
* @param {boolean} [isAdmin]
|
|
64
|
+
* @param {*} [options] Override http request option.
|
|
65
|
+
* @throws {RequiredError}
|
|
66
|
+
*/
|
|
67
|
+
apiAuthRegisterPost: (firstName_1, lastName_1, email_1, password_1, username_1, isAccountVerified_1, level_1, stripeCustomerId_1, phone_1, profilePicture_1, isAdmin_1, ...args_1) => __awaiter(this, [firstName_1, lastName_1, email_1, password_1, username_1, isAccountVerified_1, level_1, stripeCustomerId_1, phone_1, profilePicture_1, isAdmin_1, ...args_1], void 0, function* (firstName, lastName, email, password, username, isAccountVerified, level, stripeCustomerId, phone, profilePicture, isAdmin, options = {}) {
|
|
68
|
+
// verify required parameter 'firstName' is not null or undefined
|
|
69
|
+
assertParamExists('apiAuthRegisterPost', 'firstName', firstName);
|
|
70
|
+
// verify required parameter 'lastName' is not null or undefined
|
|
71
|
+
assertParamExists('apiAuthRegisterPost', 'lastName', lastName);
|
|
72
|
+
// verify required parameter 'email' is not null or undefined
|
|
73
|
+
assertParamExists('apiAuthRegisterPost', 'email', email);
|
|
74
|
+
// verify required parameter 'password' is not null or undefined
|
|
75
|
+
assertParamExists('apiAuthRegisterPost', 'password', password);
|
|
76
|
+
const localVarPath = `/api/auth/register`;
|
|
77
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
78
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
79
|
+
let baseOptions;
|
|
80
|
+
if (configuration) {
|
|
81
|
+
baseOptions = configuration.baseOptions;
|
|
82
|
+
}
|
|
83
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
84
|
+
const localVarHeaderParameter = {};
|
|
85
|
+
const localVarQueryParameter = {};
|
|
86
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
87
|
+
if (username !== undefined) {
|
|
88
|
+
localVarFormParams.append('username', username);
|
|
89
|
+
}
|
|
90
|
+
if (firstName !== undefined) {
|
|
91
|
+
localVarFormParams.append('firstName', firstName);
|
|
92
|
+
}
|
|
93
|
+
if (lastName !== undefined) {
|
|
94
|
+
localVarFormParams.append('lastName', lastName);
|
|
95
|
+
}
|
|
96
|
+
if (email !== undefined) {
|
|
97
|
+
localVarFormParams.append('email', email);
|
|
98
|
+
}
|
|
99
|
+
if (isAccountVerified !== undefined) {
|
|
100
|
+
localVarFormParams.append('isAccountVerified', String(isAccountVerified));
|
|
101
|
+
}
|
|
102
|
+
if (level !== undefined) {
|
|
103
|
+
localVarFormParams.append('level', level);
|
|
104
|
+
}
|
|
105
|
+
if (stripeCustomerId !== undefined) {
|
|
106
|
+
localVarFormParams.append('stripeCustomerId', stripeCustomerId);
|
|
107
|
+
}
|
|
108
|
+
if (phone !== undefined) {
|
|
109
|
+
localVarFormParams.append('phone', phone);
|
|
110
|
+
}
|
|
111
|
+
if (password !== undefined) {
|
|
112
|
+
localVarFormParams.append('password', password);
|
|
113
|
+
}
|
|
114
|
+
if (profilePicture !== undefined) {
|
|
115
|
+
localVarFormParams.append('profilePicture', profilePicture);
|
|
116
|
+
}
|
|
117
|
+
if (isAdmin !== undefined) {
|
|
118
|
+
localVarFormParams.append('isAdmin', String(isAdmin));
|
|
119
|
+
}
|
|
120
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
121
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
122
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
123
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
124
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
125
|
+
return {
|
|
126
|
+
url: toPathString(localVarUrlObj),
|
|
127
|
+
options: localVarRequestOptions,
|
|
128
|
+
};
|
|
129
|
+
}),
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* AuthApi - functional programming interface
|
|
134
|
+
* @export
|
|
135
|
+
*/
|
|
136
|
+
export const AuthApiFp = function (configuration) {
|
|
137
|
+
const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration);
|
|
138
|
+
return {
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* @summary Register a new user
|
|
142
|
+
* @param {string} firstName
|
|
143
|
+
* @param {string} lastName
|
|
144
|
+
* @param {string} email
|
|
145
|
+
* @param {string} password
|
|
146
|
+
* @param {string} [username]
|
|
147
|
+
* @param {boolean} [isAccountVerified]
|
|
148
|
+
* @param {string} [level]
|
|
149
|
+
* @param {string} [stripeCustomerId]
|
|
150
|
+
* @param {string} [phone]
|
|
151
|
+
* @param {string} [profilePicture]
|
|
152
|
+
* @param {boolean} [isAdmin]
|
|
153
|
+
* @param {*} [options] Override http request option.
|
|
154
|
+
* @throws {RequiredError}
|
|
155
|
+
*/
|
|
156
|
+
apiAuthRegisterPost(firstName, lastName, email, password, username, isAccountVerified, level, stripeCustomerId, phone, profilePicture, isAdmin, options) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
var _a, _b, _c;
|
|
159
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiAuthRegisterPost(firstName, lastName, email, password, username, isAccountVerified, level, stripeCustomerId, phone, profilePicture, isAdmin, options);
|
|
160
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
161
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AuthApi.apiAuthRegisterPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
162
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* AuthApi - factory interface
|
|
169
|
+
* @export
|
|
170
|
+
*/
|
|
171
|
+
export const AuthApiFactory = function (configuration, basePath, axios) {
|
|
172
|
+
const localVarFp = AuthApiFp(configuration);
|
|
173
|
+
return {
|
|
174
|
+
/**
|
|
175
|
+
*
|
|
176
|
+
* @summary Register a new user
|
|
177
|
+
* @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
|
|
178
|
+
* @param {*} [options] Override http request option.
|
|
179
|
+
* @throws {RequiredError}
|
|
180
|
+
*/
|
|
181
|
+
apiAuthRegisterPost(requestParameters, options) {
|
|
182
|
+
return localVarFp.apiAuthRegisterPost(requestParameters.firstName, requestParameters.lastName, requestParameters.email, requestParameters.password, requestParameters.username, requestParameters.isAccountVerified, requestParameters.level, requestParameters.stripeCustomerId, requestParameters.phone, requestParameters.profilePicture, requestParameters.isAdmin, options).then((request) => request(axios, basePath));
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* AuthApi - object-oriented interface
|
|
188
|
+
* @export
|
|
189
|
+
* @class AuthApi
|
|
190
|
+
* @extends {BaseAPI}
|
|
191
|
+
*/
|
|
192
|
+
export class AuthApi extends BaseAPI {
|
|
193
|
+
/**
|
|
194
|
+
*
|
|
195
|
+
* @summary Register a new user
|
|
196
|
+
* @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
|
|
197
|
+
* @param {*} [options] Override http request option.
|
|
198
|
+
* @throws {RequiredError}
|
|
199
|
+
* @memberof AuthApi
|
|
200
|
+
*/
|
|
201
|
+
apiAuthRegisterPost(requestParameters, options) {
|
|
202
|
+
return AuthApiFp(this.configuration).apiAuthRegisterPost(requestParameters.firstName, requestParameters.lastName, requestParameters.email, requestParameters.password, requestParameters.username, requestParameters.isAccountVerified, requestParameters.level, requestParameters.stripeCustomerId, requestParameters.phone, requestParameters.profilePicture, requestParameters.isAdmin, options).then((request) => request(this.axios, this.basePath));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* UsersApi - axios parameter creator
|
|
207
|
+
* @export
|
|
208
|
+
*/
|
|
209
|
+
export const UsersApiAxiosParamCreator = function (configuration) {
|
|
210
|
+
return {
|
|
211
|
+
/**
|
|
212
|
+
*
|
|
213
|
+
* @summary Retrieve all users
|
|
214
|
+
* @param {*} [options] Override http request option.
|
|
215
|
+
* @throws {RequiredError}
|
|
216
|
+
*/
|
|
217
|
+
apiUsersGet: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
218
|
+
const localVarPath = `/api/users`;
|
|
219
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
220
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
221
|
+
let baseOptions;
|
|
222
|
+
if (configuration) {
|
|
223
|
+
baseOptions = configuration.baseOptions;
|
|
224
|
+
}
|
|
225
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
226
|
+
const localVarHeaderParameter = {};
|
|
227
|
+
const localVarQueryParameter = {};
|
|
228
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
229
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
230
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
231
|
+
return {
|
|
232
|
+
url: toPathString(localVarUrlObj),
|
|
233
|
+
options: localVarRequestOptions,
|
|
234
|
+
};
|
|
235
|
+
}),
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* UsersApi - functional programming interface
|
|
240
|
+
* @export
|
|
241
|
+
*/
|
|
242
|
+
export const UsersApiFp = function (configuration) {
|
|
243
|
+
const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration);
|
|
244
|
+
return {
|
|
245
|
+
/**
|
|
246
|
+
*
|
|
247
|
+
* @summary Retrieve all users
|
|
248
|
+
* @param {*} [options] Override http request option.
|
|
249
|
+
* @throws {RequiredError}
|
|
250
|
+
*/
|
|
251
|
+
apiUsersGet(options) {
|
|
252
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
253
|
+
var _a, _b, _c;
|
|
254
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.apiUsersGet(options);
|
|
255
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
256
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UsersApi.apiUsersGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
257
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* UsersApi - factory interface
|
|
264
|
+
* @export
|
|
265
|
+
*/
|
|
266
|
+
export const UsersApiFactory = function (configuration, basePath, axios) {
|
|
267
|
+
const localVarFp = UsersApiFp(configuration);
|
|
268
|
+
return {
|
|
269
|
+
/**
|
|
270
|
+
*
|
|
271
|
+
* @summary Retrieve all users
|
|
272
|
+
* @param {*} [options] Override http request option.
|
|
273
|
+
* @throws {RequiredError}
|
|
274
|
+
*/
|
|
275
|
+
apiUsersGet(options) {
|
|
276
|
+
return localVarFp.apiUsersGet(options).then((request) => request(axios, basePath));
|
|
277
|
+
},
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* UsersApi - object-oriented interface
|
|
282
|
+
* @export
|
|
283
|
+
* @class UsersApi
|
|
284
|
+
* @extends {BaseAPI}
|
|
285
|
+
*/
|
|
286
|
+
export class UsersApi extends BaseAPI {
|
|
287
|
+
/**
|
|
288
|
+
*
|
|
289
|
+
* @summary Retrieve all users
|
|
290
|
+
* @param {*} [options] Override http request option.
|
|
291
|
+
* @throws {RequiredError}
|
|
292
|
+
* @memberof UsersApi
|
|
293
|
+
*/
|
|
294
|
+
apiUsersGet(options) {
|
|
295
|
+
return UsersApiFp(this.configuration).apiUsersGet(options).then((request) => request(this.axios, this.basePath));
|
|
296
|
+
}
|
|
297
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pickle Ball API
|
|
3
|
+
* API for managing pickle ball games and players
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const COLLECTION_FORMATS: {
|
|
20
|
+
csv: string;
|
|
21
|
+
ssv: string;
|
|
22
|
+
tsv: string;
|
|
23
|
+
pipes: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface RequestArgs
|
|
29
|
+
*/
|
|
30
|
+
export interface RequestArgs {
|
|
31
|
+
url: string;
|
|
32
|
+
options: RawAxiosRequestConfig;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @class BaseAPI
|
|
38
|
+
*/
|
|
39
|
+
export declare class BaseAPI {
|
|
40
|
+
protected basePath: string;
|
|
41
|
+
protected axios: AxiosInstance;
|
|
42
|
+
protected configuration: Configuration | undefined;
|
|
43
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @class RequiredError
|
|
49
|
+
* @extends {Error}
|
|
50
|
+
*/
|
|
51
|
+
export declare class RequiredError extends Error {
|
|
52
|
+
field: string;
|
|
53
|
+
constructor(field: string, msg?: string);
|
|
54
|
+
}
|
|
55
|
+
interface ServerMap {
|
|
56
|
+
[key: string]: {
|
|
57
|
+
url: string;
|
|
58
|
+
description: string;
|
|
59
|
+
}[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const operationServerMap: ServerMap;
|
|
66
|
+
export {};
|
package/dist/esm/base.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Pickle Ball API
|
|
5
|
+
* API for managing pickle ball games and players
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
export const BASE_PATH = "https://api.mon-domaine.com".replace(/\/+$/, "");
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const COLLECTION_FORMATS = {
|
|
21
|
+
csv: ",",
|
|
22
|
+
ssv: " ",
|
|
23
|
+
tsv: "\t",
|
|
24
|
+
pipes: "|",
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @class BaseAPI
|
|
30
|
+
*/
|
|
31
|
+
export class BaseAPI {
|
|
32
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
33
|
+
var _a;
|
|
34
|
+
this.basePath = basePath;
|
|
35
|
+
this.axios = axios;
|
|
36
|
+
if (configuration) {
|
|
37
|
+
this.configuration = configuration;
|
|
38
|
+
this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @export
|
|
46
|
+
* @class RequiredError
|
|
47
|
+
* @extends {Error}
|
|
48
|
+
*/
|
|
49
|
+
export class RequiredError extends Error {
|
|
50
|
+
constructor(field, msg) {
|
|
51
|
+
super(msg);
|
|
52
|
+
this.field = field;
|
|
53
|
+
this.name = "RequiredError";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @export
|
|
59
|
+
*/
|
|
60
|
+
export const operationServerMap = {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pickle Ball API
|
|
3
|
+
* API for managing pickle ball games and players
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from "./configuration";
|
|
13
|
+
import type { RequestArgs } from "./base";
|
|
14
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @throws {RequiredError}
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @export
|
|
44
|
+
*/
|
|
45
|
+
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @export
|
|
49
|
+
*/
|
|
50
|
+
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @export
|
|
54
|
+
*/
|
|
55
|
+
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @export
|
|
59
|
+
*/
|
|
60
|
+
export declare const toPathString: (url: URL) => string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Pickle Ball API
|
|
5
|
+
* API for managing pickle ball games and players
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import { RequiredError } from "./base";
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
export const DUMMY_BASE_URL = 'https://example.com';
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @throws {RequiredError}
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export const assertParamExists = function (functionName, paramName, paramValue) {
|
|
35
|
+
if (paramValue === null || paramValue === undefined) {
|
|
36
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @export
|
|
42
|
+
*/
|
|
43
|
+
export const setApiKeyToObject = function (object, keyParamName, configuration) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
if (configuration && configuration.apiKey) {
|
|
46
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
47
|
+
? yield configuration.apiKey(keyParamName)
|
|
48
|
+
: yield configuration.apiKey;
|
|
49
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @export
|
|
56
|
+
*/
|
|
57
|
+
export const setBasicAuthToObject = function (object, configuration) {
|
|
58
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
59
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @export
|
|
65
|
+
*/
|
|
66
|
+
export const setBearerAuthToObject = function (object, configuration) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
if (configuration && configuration.accessToken) {
|
|
69
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
70
|
+
? yield configuration.accessToken()
|
|
71
|
+
: yield configuration.accessToken;
|
|
72
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @export
|
|
79
|
+
*/
|
|
80
|
+
export const setOAuthToObject = function (object, name, scopes, configuration) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
if (configuration && configuration.accessToken) {
|
|
83
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
84
|
+
? yield configuration.accessToken(name, scopes)
|
|
85
|
+
: yield configuration.accessToken;
|
|
86
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
91
|
+
if (parameter == null)
|
|
92
|
+
return;
|
|
93
|
+
if (typeof parameter === "object") {
|
|
94
|
+
if (Array.isArray(parameter)) {
|
|
95
|
+
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
if (urlSearchParams.has(key)) {
|
|
103
|
+
urlSearchParams.append(key, parameter);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
urlSearchParams.set(key, parameter);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
* @export
|
|
113
|
+
*/
|
|
114
|
+
export const setSearchParams = function (url, ...objects) {
|
|
115
|
+
const searchParams = new URLSearchParams(url.search);
|
|
116
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
117
|
+
url.search = searchParams.toString();
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @export
|
|
122
|
+
*/
|
|
123
|
+
export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
124
|
+
const nonString = typeof value !== 'string';
|
|
125
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
126
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
127
|
+
: nonString;
|
|
128
|
+
return needsSerialization
|
|
129
|
+
? JSON.stringify(value !== undefined ? value : {})
|
|
130
|
+
: (value || "");
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @export
|
|
135
|
+
*/
|
|
136
|
+
export const toPathString = function (url) {
|
|
137
|
+
return url.pathname + url.search + url.hash;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* @export
|
|
142
|
+
*/
|
|
143
|
+
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
144
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
145
|
+
var _a;
|
|
146
|
+
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 });
|
|
147
|
+
return axios.request(axiosRequestArgs);
|
|
148
|
+
};
|
|
149
|
+
};
|