@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.
@@ -0,0 +1,91 @@
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
+ export interface ConfigurationParameters {
13
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
14
+ username?: string;
15
+ password?: string;
16
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
17
+ basePath?: string;
18
+ serverIndex?: number;
19
+ baseOptions?: any;
20
+ formDataCtor?: new () => any;
21
+ }
22
+ export declare class Configuration {
23
+ /**
24
+ * parameter for apiKey security
25
+ * @param name security name
26
+ * @memberof Configuration
27
+ */
28
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
29
+ /**
30
+ * parameter for basic security
31
+ *
32
+ * @type {string}
33
+ * @memberof Configuration
34
+ */
35
+ username?: string;
36
+ /**
37
+ * parameter for basic security
38
+ *
39
+ * @type {string}
40
+ * @memberof Configuration
41
+ */
42
+ password?: string;
43
+ /**
44
+ * parameter for oauth2 security
45
+ * @param name security name
46
+ * @param scopes oauth2 scope
47
+ * @memberof Configuration
48
+ */
49
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
50
+ /**
51
+ * override base path
52
+ *
53
+ * @type {string}
54
+ * @memberof Configuration
55
+ */
56
+ basePath?: string;
57
+ /**
58
+ * override server index
59
+ *
60
+ * @type {number}
61
+ * @memberof Configuration
62
+ */
63
+ serverIndex?: number;
64
+ /**
65
+ * base options for axios calls
66
+ *
67
+ * @type {any}
68
+ * @memberof Configuration
69
+ */
70
+ baseOptions?: any;
71
+ /**
72
+ * The FormData constructor that will be used to create multipart form data
73
+ * requests. You can inject this here so that execution environments that
74
+ * do not support the FormData class can still run the generated client.
75
+ *
76
+ * @type {new () => FormData}
77
+ */
78
+ formDataCtor?: new () => any;
79
+ constructor(param?: ConfigurationParameters);
80
+ /**
81
+ * Check if the given MIME is a JSON MIME.
82
+ * JSON MIME examples:
83
+ * application/json
84
+ * application/json; charset=UTF8
85
+ * APPLICATION/JSON
86
+ * application/vnd.company+json
87
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
88
+ * @return True if the given MIME is JSON, false otherwise.
89
+ */
90
+ isJsonMime(mime: string): boolean;
91
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Pickle Ball API
6
+ * API for managing pickle ball games and players
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Configuration = void 0;
17
+ class Configuration {
18
+ constructor(param = {}) {
19
+ var _a;
20
+ this.apiKey = param.apiKey;
21
+ this.username = param.username;
22
+ this.password = param.password;
23
+ this.accessToken = param.accessToken;
24
+ this.basePath = param.basePath;
25
+ this.serverIndex = param.serverIndex;
26
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
27
+ this.formDataCtor = param.formDataCtor;
28
+ }
29
+ /**
30
+ * Check if the given MIME is a JSON MIME.
31
+ * JSON MIME examples:
32
+ * application/json
33
+ * application/json; charset=UTF8
34
+ * APPLICATION/JSON
35
+ * application/vnd.company+json
36
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
37
+ * @return True if the given MIME is JSON, false otherwise.
38
+ */
39
+ isJsonMime(mime) {
40
+ const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
41
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
42
+ }
43
+ }
44
+ exports.Configuration = Configuration;
@@ -0,0 +1,467 @@
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 { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import type { RequestArgs } from './base';
15
+ import { BaseAPI } from './base';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface Booking
20
+ */
21
+ export interface Booking {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof Booking
26
+ */
27
+ 'userId': string;
28
+ /**
29
+ *
30
+ * @type {Array<string>}
31
+ * @memberof Booking
32
+ */
33
+ 'playersIds'?: Array<string>;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof Booking
38
+ */
39
+ 'status': BookingStatusEnum;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof Booking
44
+ */
45
+ 'stripeStatus': BookingStripeStatusEnum;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof Booking
50
+ */
51
+ 'stripePaymentIntentId': string;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof Booking
56
+ */
57
+ 'totalPrice': number;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof Booking
62
+ */
63
+ 'slotId': string;
64
+ }
65
+ export declare const BookingStatusEnum: {
66
+ readonly Active: "active";
67
+ readonly Inactive: "inactive";
68
+ };
69
+ export type BookingStatusEnum = typeof BookingStatusEnum[keyof typeof BookingStatusEnum];
70
+ export declare const BookingStripeStatusEnum: {
71
+ readonly Pending: "pending";
72
+ readonly Paid: "paid";
73
+ readonly Failed: "failed";
74
+ readonly Refunded: "refunded";
75
+ readonly Canceled: "canceled";
76
+ };
77
+ export type BookingStripeStatusEnum = typeof BookingStripeStatusEnum[keyof typeof BookingStripeStatusEnum];
78
+ /**
79
+ *
80
+ * @export
81
+ * @interface Court
82
+ */
83
+ export interface Court {
84
+ /**
85
+ *
86
+ * @type {string}
87
+ * @memberof Court
88
+ */
89
+ 'name': string;
90
+ /**
91
+ *
92
+ * @type {string}
93
+ * @memberof Court
94
+ */
95
+ 'status': CourtStatusEnum;
96
+ /**
97
+ *
98
+ * @type {string}
99
+ * @memberof Court
100
+ */
101
+ 'comments'?: string;
102
+ /**
103
+ *
104
+ * @type {number}
105
+ * @memberof Court
106
+ */
107
+ 'pricePerSlot': number;
108
+ /**
109
+ *
110
+ * @type {number}
111
+ * @memberof Court
112
+ */
113
+ 'slotDefaultDuration': number;
114
+ /**
115
+ *
116
+ * @type {number}
117
+ * @memberof Court
118
+ */
119
+ 'startTimeInTheDayInMinutes': number;
120
+ /**
121
+ *
122
+ * @type {number}
123
+ * @memberof Court
124
+ */
125
+ 'endTimeInTheDayInMinutes': number;
126
+ }
127
+ export declare const CourtStatusEnum: {
128
+ readonly Available: "available";
129
+ readonly Unavailable: "unavailable";
130
+ };
131
+ export type CourtStatusEnum = typeof CourtStatusEnum[keyof typeof CourtStatusEnum];
132
+ /**
133
+ *
134
+ * @export
135
+ * @interface Slot
136
+ */
137
+ export interface Slot {
138
+ /**
139
+ *
140
+ * @type {string}
141
+ * @memberof Slot
142
+ */
143
+ 'startDate': string;
144
+ /**
145
+ *
146
+ * @type {string}
147
+ * @memberof Slot
148
+ */
149
+ 'endDate': string;
150
+ /**
151
+ *
152
+ * @type {string}
153
+ * @memberof Slot
154
+ */
155
+ 'courtId': string;
156
+ }
157
+ /**
158
+ *
159
+ * @export
160
+ * @interface SlotException
161
+ */
162
+ export interface SlotException {
163
+ /**
164
+ *
165
+ * @type {string}
166
+ * @memberof SlotException
167
+ */
168
+ 'startDate': string;
169
+ /**
170
+ *
171
+ * @type {string}
172
+ * @memberof SlotException
173
+ */
174
+ 'endDate': string;
175
+ /**
176
+ *
177
+ * @type {string}
178
+ * @memberof SlotException
179
+ */
180
+ 'courtId': string;
181
+ /**
182
+ *
183
+ * @type {string}
184
+ * @memberof SlotException
185
+ */
186
+ 'reason': string;
187
+ }
188
+ /**
189
+ *
190
+ * @export
191
+ * @interface User
192
+ */
193
+ export interface User {
194
+ /**
195
+ *
196
+ * @type {string}
197
+ * @memberof User
198
+ */
199
+ 'username'?: string;
200
+ /**
201
+ *
202
+ * @type {string}
203
+ * @memberof User
204
+ */
205
+ 'firstName': string;
206
+ /**
207
+ *
208
+ * @type {string}
209
+ * @memberof User
210
+ */
211
+ 'lastName': string;
212
+ /**
213
+ *
214
+ * @type {string}
215
+ * @memberof User
216
+ */
217
+ 'email': string;
218
+ /**
219
+ *
220
+ * @type {boolean}
221
+ * @memberof User
222
+ */
223
+ 'isAccountVerified'?: boolean;
224
+ /**
225
+ *
226
+ * @type {string}
227
+ * @memberof User
228
+ */
229
+ 'level'?: string;
230
+ /**
231
+ *
232
+ * @type {string}
233
+ * @memberof User
234
+ */
235
+ 'stripeCustomerId'?: string;
236
+ /**
237
+ *
238
+ * @type {string}
239
+ * @memberof User
240
+ */
241
+ 'phone'?: string;
242
+ /**
243
+ *
244
+ * @type {string}
245
+ * @memberof User
246
+ */
247
+ 'password': string;
248
+ /**
249
+ *
250
+ * @type {string}
251
+ * @memberof User
252
+ */
253
+ 'profilePicture'?: string;
254
+ /**
255
+ *
256
+ * @type {boolean}
257
+ * @memberof User
258
+ */
259
+ 'isAdmin'?: boolean;
260
+ }
261
+ /**
262
+ * AuthApi - axios parameter creator
263
+ * @export
264
+ */
265
+ export declare const AuthApiAxiosParamCreator: (configuration?: Configuration) => {
266
+ /**
267
+ *
268
+ * @summary Register a new user
269
+ * @param {string} firstName
270
+ * @param {string} lastName
271
+ * @param {string} email
272
+ * @param {string} password
273
+ * @param {string} [username]
274
+ * @param {boolean} [isAccountVerified]
275
+ * @param {string} [level]
276
+ * @param {string} [stripeCustomerId]
277
+ * @param {string} [phone]
278
+ * @param {string} [profilePicture]
279
+ * @param {boolean} [isAdmin]
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ apiAuthRegisterPost: (firstName: string, lastName: string, email: string, password: string, username?: string, isAccountVerified?: boolean, level?: string, stripeCustomerId?: string, phone?: string, profilePicture?: string, isAdmin?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
284
+ };
285
+ /**
286
+ * AuthApi - functional programming interface
287
+ * @export
288
+ */
289
+ export declare const AuthApiFp: (configuration?: Configuration) => {
290
+ /**
291
+ *
292
+ * @summary Register a new user
293
+ * @param {string} firstName
294
+ * @param {string} lastName
295
+ * @param {string} email
296
+ * @param {string} password
297
+ * @param {string} [username]
298
+ * @param {boolean} [isAccountVerified]
299
+ * @param {string} [level]
300
+ * @param {string} [stripeCustomerId]
301
+ * @param {string} [phone]
302
+ * @param {string} [profilePicture]
303
+ * @param {boolean} [isAdmin]
304
+ * @param {*} [options] Override http request option.
305
+ * @throws {RequiredError}
306
+ */
307
+ apiAuthRegisterPost(firstName: string, lastName: string, email: string, password: string, username?: string, isAccountVerified?: boolean, level?: string, stripeCustomerId?: string, phone?: string, profilePicture?: string, isAdmin?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>>;
308
+ };
309
+ /**
310
+ * AuthApi - factory interface
311
+ * @export
312
+ */
313
+ export declare const AuthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
314
+ /**
315
+ *
316
+ * @summary Register a new user
317
+ * @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
318
+ * @param {*} [options] Override http request option.
319
+ * @throws {RequiredError}
320
+ */
321
+ apiAuthRegisterPost(requestParameters: AuthApiApiAuthRegisterPostRequest, options?: RawAxiosRequestConfig): AxiosPromise<User>;
322
+ };
323
+ /**
324
+ * Request parameters for apiAuthRegisterPost operation in AuthApi.
325
+ * @export
326
+ * @interface AuthApiApiAuthRegisterPostRequest
327
+ */
328
+ export interface AuthApiApiAuthRegisterPostRequest {
329
+ /**
330
+ *
331
+ * @type {string}
332
+ * @memberof AuthApiApiAuthRegisterPost
333
+ */
334
+ readonly firstName: string;
335
+ /**
336
+ *
337
+ * @type {string}
338
+ * @memberof AuthApiApiAuthRegisterPost
339
+ */
340
+ readonly lastName: string;
341
+ /**
342
+ *
343
+ * @type {string}
344
+ * @memberof AuthApiApiAuthRegisterPost
345
+ */
346
+ readonly email: string;
347
+ /**
348
+ *
349
+ * @type {string}
350
+ * @memberof AuthApiApiAuthRegisterPost
351
+ */
352
+ readonly password: string;
353
+ /**
354
+ *
355
+ * @type {string}
356
+ * @memberof AuthApiApiAuthRegisterPost
357
+ */
358
+ readonly username?: string;
359
+ /**
360
+ *
361
+ * @type {boolean}
362
+ * @memberof AuthApiApiAuthRegisterPost
363
+ */
364
+ readonly isAccountVerified?: boolean;
365
+ /**
366
+ *
367
+ * @type {string}
368
+ * @memberof AuthApiApiAuthRegisterPost
369
+ */
370
+ readonly level?: string;
371
+ /**
372
+ *
373
+ * @type {string}
374
+ * @memberof AuthApiApiAuthRegisterPost
375
+ */
376
+ readonly stripeCustomerId?: string;
377
+ /**
378
+ *
379
+ * @type {string}
380
+ * @memberof AuthApiApiAuthRegisterPost
381
+ */
382
+ readonly phone?: string;
383
+ /**
384
+ *
385
+ * @type {string}
386
+ * @memberof AuthApiApiAuthRegisterPost
387
+ */
388
+ readonly profilePicture?: string;
389
+ /**
390
+ *
391
+ * @type {boolean}
392
+ * @memberof AuthApiApiAuthRegisterPost
393
+ */
394
+ readonly isAdmin?: boolean;
395
+ }
396
+ /**
397
+ * AuthApi - object-oriented interface
398
+ * @export
399
+ * @class AuthApi
400
+ * @extends {BaseAPI}
401
+ */
402
+ export declare class AuthApi extends BaseAPI {
403
+ /**
404
+ *
405
+ * @summary Register a new user
406
+ * @param {AuthApiApiAuthRegisterPostRequest} requestParameters Request parameters.
407
+ * @param {*} [options] Override http request option.
408
+ * @throws {RequiredError}
409
+ * @memberof AuthApi
410
+ */
411
+ apiAuthRegisterPost(requestParameters: AuthApiApiAuthRegisterPostRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<User, any>>;
412
+ }
413
+ /**
414
+ * UsersApi - axios parameter creator
415
+ * @export
416
+ */
417
+ export declare const UsersApiAxiosParamCreator: (configuration?: Configuration) => {
418
+ /**
419
+ *
420
+ * @summary Retrieve all users
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ */
424
+ apiUsersGet: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
425
+ };
426
+ /**
427
+ * UsersApi - functional programming interface
428
+ * @export
429
+ */
430
+ export declare const UsersApiFp: (configuration?: Configuration) => {
431
+ /**
432
+ *
433
+ * @summary Retrieve all users
434
+ * @param {*} [options] Override http request option.
435
+ * @throws {RequiredError}
436
+ */
437
+ apiUsersGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<User>>>;
438
+ };
439
+ /**
440
+ * UsersApi - factory interface
441
+ * @export
442
+ */
443
+ export declare const UsersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
444
+ /**
445
+ *
446
+ * @summary Retrieve all users
447
+ * @param {*} [options] Override http request option.
448
+ * @throws {RequiredError}
449
+ */
450
+ apiUsersGet(options?: RawAxiosRequestConfig): AxiosPromise<Array<User>>;
451
+ };
452
+ /**
453
+ * UsersApi - object-oriented interface
454
+ * @export
455
+ * @class UsersApi
456
+ * @extends {BaseAPI}
457
+ */
458
+ export declare class UsersApi extends BaseAPI {
459
+ /**
460
+ *
461
+ * @summary Retrieve all users
462
+ * @param {*} [options] Override http request option.
463
+ * @throws {RequiredError}
464
+ * @memberof UsersApi
465
+ */
466
+ apiUsersGet(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<User[], any>>;
467
+ }